-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add support for modifiable retention policies & enable deleting…
… retention policy assignment (#420)
- Loading branch information
1 parent
32eac6c
commit 26ab5b4
Showing
13 changed files
with
227 additions
and
103 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
'use strict'; | ||
|
||
const BoxCommand = require('../../../box-command'); | ||
|
||
class RetentionPoliciesRemoveAssignmentCommand extends BoxCommand { | ||
async run() { | ||
const { flags, args } = this.parse(RetentionPoliciesRemoveAssignmentCommand); | ||
|
||
await this.client.retentionPolicies.deleteAssignment(args.id); | ||
this.info(`Removed retention policy assignment ${args.id}`); | ||
} | ||
} | ||
|
||
RetentionPoliciesRemoveAssignmentCommand.description = 'Remove a retention policy assignment applied to content'; | ||
RetentionPoliciesRemoveAssignmentCommand.examples = ['box retention-policies:assignments:remove 1235']; | ||
RetentionPoliciesRemoveAssignmentCommand._endpoint = 'delete_retention_policy_assignments_id'; | ||
|
||
RetentionPoliciesRemoveAssignmentCommand.flags = { | ||
...BoxCommand.flags | ||
}; | ||
|
||
RetentionPoliciesRemoveAssignmentCommand.args = [ | ||
{ | ||
name: 'id', | ||
required: true, | ||
hidden: false, | ||
description: 'ID of the retention policy assignment to remove', | ||
} | ||
]; | ||
|
||
module.exports = RetentionPoliciesRemoveAssignmentCommand; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters