Skip to content

feat: add Shield Lists APIs (box/box-openapi#528) #622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "20cb559", "specHash": "a54170e", "version": "1.15.1" }
{ "engineHash": "20cb559", "specHash": "630fc85", "version": "1.15.1" }
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ the SDK are available by topic:
- [Shield information barrier segment restrictions](shieldInformationBarrierSegmentRestrictions.md)
- [Shield information barrier segments](shieldInformationBarrierSegments.md)
- [Shield information barriers](shieldInformationBarriers.md)
- [Shield lists](shieldLists.md)
- [Sign requests](signRequests.md)
- [Sign templates](signTemplates.md)
- [Skills](skills.md)
Expand Down
129 changes: 129 additions & 0 deletions docs/shieldLists.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# ShieldListsManager

- [Get all shield lists in enterprise](#get-all-shield-lists-in-enterprise)
- [Create shield list](#create-shield-list)
- [Get single shield list by shield list id](#get-single-shield-list-by-shield-list-id)
- [Delete single shield list by shield list id](#delete-single-shield-list-by-shield-list-id)
- [Update shield list](#update-shield-list)

## Get all shield lists in enterprise

Retrieves all shield lists in the enterprise.

This operation is performed by calling function `getShieldListsV2025R0`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/get-shield-lists/).

_Currently we don't have an example for calling `getShieldListsV2025R0` in integration tests_

### Arguments

- headersInput `GetShieldListsV2025R0HeadersInput`
- Headers of getShieldListsV2025R0 method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

### Returns

This function returns a value of type `ShieldListsV2025R0`.

Returns the list of shield list objects.

## Create shield list

Creates a shield list.

This operation is performed by calling function `createShieldListV2025R0`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/post-shield-lists/).

_Currently we don't have an example for calling `createShieldListV2025R0` in integration tests_

### Arguments

- requestBody `ShieldListsCreateV2025R0`
- Request body of createShieldListV2025R0 method
- optionalsInput `CreateShieldListV2025R0OptionalsInput`
-

### Returns

This function returns a value of type `ShieldListV2025R0`.

Returns the shield list object.

## Get single shield list by shield list id

Retrieves a single shield list by its ID.

This operation is performed by calling function `getShieldListByIdV2025R0`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/get-shield-lists-id/).

_Currently we don't have an example for calling `getShieldListByIdV2025R0` in integration tests_

### Arguments

- shieldListId `string`
- The unique identifier that represents a shield list. The ID for any Shield List can be determined by the response from the endpoint fetching all shield lists for the enterprise. Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 "
- optionalsInput `GetShieldListByIdV2025R0OptionalsInput`
-

### Returns

This function returns a value of type `ShieldListV2025R0`.

Returns the shield list object.

## Delete single shield list by shield list id

Delete a single shield list by its ID.

This operation is performed by calling function `deleteShieldListByIdV2025R0`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/delete-shield-lists-id/).

_Currently we don't have an example for calling `deleteShieldListByIdV2025R0` in integration tests_

### Arguments

- shieldListId `string`
- The unique identifier that represents a shield list. The ID for any Shield List can be determined by the response from the endpoint fetching all shield lists for the enterprise. Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 "
- optionalsInput `DeleteShieldListByIdV2025R0OptionalsInput`
-

### Returns

This function returns a value of type `undefined`.

Shield List correctly removed. No content in response.

## Update shield list

Updates a shield list.

This operation is performed by calling function `updateShieldListByIdV2025R0`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/v2025.0/put-shield-lists-id/).

_Currently we don't have an example for calling `updateShieldListByIdV2025R0` in integration tests_

### Arguments

- shieldListId `string`
- The unique identifier that represents a shield list. The ID for any Shield List can be determined by the response from the endpoint fetching all shield lists for the enterprise. Example: "90fb0e17-c332-40ed-b4f9-fa8908fbbb24 "
- requestBody `ShieldListsUpdateV2025R0`
- Request body of updateShieldListByIdV2025R0 method
- optionalsInput `UpdateShieldListByIdV2025R0OptionalsInput`
-

### Returns

This function returns a value of type `ShieldListV2025R0`.

Returns the shield list object.
6 changes: 3 additions & 3 deletions package-lock.json

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

7 changes: 7 additions & 0 deletions src/client.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ import { AiManager } from './managers/ai.generated.js';
import { AiStudioManager } from './managers/aiStudio.generated.js';
import { DocgenTemplateManager } from './managers/docgenTemplate.generated.js';
import { DocgenManager } from './managers/docgen.generated.js';
import { ShieldListsManager } from './managers/shieldLists.generated.js';
import { Authentication } from './networking/auth.generated.js';
import { NetworkSession } from './networking/network.generated.js';
import { BoxSdkError } from './box/errors.js';
Expand Down Expand Up @@ -171,6 +172,7 @@ export class BoxClient {
readonly aiStudio: AiStudioManager;
readonly docgenTemplate: DocgenTemplateManager;
readonly docgen: DocgenManager;
readonly shieldLists: ShieldListsManager;
constructor(
fields: Omit<
BoxClient,
Expand Down Expand Up @@ -248,6 +250,7 @@ export class BoxClient {
| 'aiStudio'
| 'docgenTemplate'
| 'docgen'
| 'shieldLists'
| 'networkSession'
| 'makeRequest'
| 'withAsUserHeader'
Expand Down Expand Up @@ -568,6 +571,10 @@ export class BoxClient {
auth: this.auth,
networkSession: this.networkSession,
});
this.shieldLists = new ShieldListsManager({
auth: this.auth,
networkSession: this.networkSession,
});
}
/**
* Make a custom http request using the client authentication and network session.
Expand Down
Loading
Loading