Skip to content

Commit

Permalink
Add new API for files and file versions under retention (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwwoda authored and mhagmajer committed Jan 27, 2022
1 parent 2c3f6c0 commit 5be8709
Show file tree
Hide file tree
Showing 16 changed files with 389 additions and 45 deletions.
11 changes: 8 additions & 3 deletions docs/configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,17 @@ OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-v, --verbose Show verbose output, which can be helpful for debugging
--[no-]cache-tokens Enable token caching, which significantly improves performance.
Run with --no-cache-tokens and then --cache-tokens if your
application config updates are not reflected in your requests.
--[no-]cache-tokens Enable token caching, which significantly improves performance. Run with
--no-cache-tokens and then --cache-tokens if your application config updates are
not reflected in your requests.
--config-file-path=config-file-path Provide a file path to configuration file
--name=name New name of the environment
--no-color Turn off colors for logging
--private-key-path=private-key-path Provide a file path to application private key
--user-id=user-id Store a default user ID to use with the session commands. A default user ID can
Expand Down
1 change: 1 addition & 0 deletions docs/metadata-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ OPTIONS
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--copy-instance-on-item-copy Whether to include the metadata when a file or folder is copied
--csv Output formatted CSV
--date=date Add a date field with the provided display name
--description=description Set the description of a field
Expand Down
66 changes: 66 additions & 0 deletions docs/retention-policies.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ List all retention policies for your enterprise
* [`box retention-policies:assignments ID`](#box-retention-policiesassignments-id)
* [`box retention-policies:assignments:get ID`](#box-retention-policiesassignmentsget-id)
* [`box retention-policies:create POLICYNAME`](#box-retention-policiescreate-policyname)
* [`box retention-policies:files-under-retention:get ID`](#box-retention-policiesfile-retentionsget-id)
* [`box retention-policies:file-version-retentions`](#box-retention-policiesfile-version-retentions)
* [`box retention-policies:file-version-retentions:get ID`](#box-retention-policiesfile-version-retentionsget-id)
* [`box retention-policies:file-versions-under-retention:get ID`](#box-retention-policiesfile-version-retentionsget-for-assignment-id)
* [`box retention-policies:get ID`](#box-retention-policiesget-id)
* [`box retention-policies:update ID`](#box-retention-policiesupdate-id)

Expand Down Expand Up @@ -207,6 +209,38 @@ EXAMPLE

_See code: [src/commands/retention-policies/create.js](https://github.com/box/boxcli/blob/v2.9.0/src/commands/retention-policies/create.js)_

## `box retention-policies:files-under-retention:get ID`

Get information about files under retention for assignment

```
USAGE
$ box retention-policies:files-under-retention:get ID
ARGUMENTS
ID ID of the retention policy assignment
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:files-under-retention:get 77777
```

_See code: [src/commands/retention-policies/file-retentions/get.js](https://github.com/box/boxcli/blob/v2.9.0/src/commands/retention-policies/file-retentions/get.js)_

## `box retention-policies:file-version-retentions`

List all file version retentions for your enterprise
Expand Down Expand Up @@ -285,6 +319,38 @@ EXAMPLE

_See code: [src/commands/retention-policies/file-version-retentions/get.js](https://github.com/box/boxcli/blob/v2.9.0/src/commands/retention-policies/file-version-retentions/get.js)_

## `box retention-policies:file-versions-under-retention:get ID`

Get information about file versions under retention for assignment

```
USAGE
$ box retention-policies:file-versions-under-retention:get ID
ARGUMENTS
ID ID of the retention policy assignment
OPTIONS
-h, --help Show CLI help
-q, --quiet Suppress any non-error output to stderr
-s, --save Save report to default reports folder on disk
-t, --token=token Provide a token to perform this call
-v, --verbose Show verbose output, which can be helpful for debugging
-y, --yes Automatically respond yes to all confirmation prompts
--as-user=as-user Provide an ID for a user
--bulk-file-path=bulk-file-path File path to bulk .csv or .json objects
--csv Output formatted CSV
--fields=fields Comma separated list of fields to show
--json Output formatted JSON
--no-color Turn off colors for logging
--save-to-file-path=save-to-file-path Override default file path to save report
EXAMPLE
box retention-policies:file-versions-under-retention:get 77777
```

_See code: [src/commands/retention-policies/file-version-retentions/get-for-assignment.js](https://github.com/box/boxcli/blob/v2.9.0/src/commands/retention-policies/file-version-retentions/get-for-assignment.js)_

## `box retention-policies:get ID`

Get information about a retention policy
Expand Down
76 changes: 38 additions & 38 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@oclif/plugin-help": "^2.2.1",
"@oclif/plugin-not-found": "^1.2.0",
"archiver": "^3.0.0",
"box-node-sdk": "^1.37.2",
"box-node-sdk": "^1.38.0",
"chalk": "^2.4.1",
"cli-progress": "^2.1.0",
"csv": "^3.1.0",
Expand Down
7 changes: 6 additions & 1 deletion src/commands/collaboration-whitelist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ const CollaborationAllowlistListCommand = require('../collaboration-allowlist');

class CollaborationWhitelistListCommand extends CollaborationAllowlistListCommand {}

['description', 'examples', '_endpoint', 'flags'].forEach((name) => {
[
'description',
'examples',
'_endpoint',
'flags'
].forEach(name => {
CollaborationWhitelistListCommand[name] =
CollaborationAllowlistListCommand[name];
});
Expand Down
Loading

0 comments on commit 5be8709

Please sign in to comment.