Skip to content
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": "43a5daf", "specHash": "eaa9cf0", "version": "1.16.0" }
{ "engineHash": "ac37b50", "specHash": "c27c421", "version": "1.16.0" }
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ the SDK are available by topic:
- [Ai](ai.md)
- [Ai studio](aiStudio.md)
- [App item associations](appItemAssociations.md)
- [Archives](archives.md)
- [Authorization](authorization.md)
- [Avatars](avatars.md)
- [Chunked uploads](chunkedUploads.md)
Expand Down
77 changes: 77 additions & 0 deletions docs/archives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ArchivesManager

- [List archives](#list-archives)
- [Create archive](#create-archive)
- [Delete archive](#delete-archive)

## List archives

Retrieves archives for an enterprise.

This operation is performed by calling function `getArchivesV2025R0`.

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

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

### Arguments

- queryParams `GetArchivesV2025R0QueryParams`
- Query parameters of getArchivesV2025R0 method
- headersInput `GetArchivesV2025R0HeadersInput`
- Headers of getArchivesV2025R0 method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

### Returns

This function returns a value of type `ArchivesV2025R0`.

Returns a list of archives in the enterprise.

## Create archive

Creates an archive.

This operation is performed by calling function `createArchiveV2025R0`.

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

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

### Arguments

- requestBody `CreateArchiveV2025R0RequestBody`
- Request body of createArchiveV2025R0 method
- optionalsInput `CreateArchiveV2025R0OptionalsInput`

### Returns

This function returns a value of type `ArchiveV2025R0`.

Returns a new archive object.

## Delete archive

Permanently deletes an archive.

This operation is performed by calling function `deleteArchiveByIdV2025R0`.

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

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

### Arguments

- archiveId `string`
- The ID of the archive. Example: "982312"
- optionalsInput `DeleteArchiveByIdV2025R0OptionalsInput`

### Returns

This function returns a value of type `undefined`.

Returns an empty response when the archive has been deleted.
22 changes: 11 additions & 11 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 @@ -80,6 +80,7 @@ import { HubsManager } from './managers/hubs.generated.js';
import { HubCollaborationsManager } from './managers/hubCollaborations.generated.js';
import { HubItemsManager } from './managers/hubItems.generated.js';
import { ShieldListsManager } from './managers/shieldLists.generated.js';
import { ArchivesManager } from './managers/archives.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 @@ -179,6 +180,7 @@ export class BoxClient {
readonly hubCollaborations: HubCollaborationsManager;
readonly hubItems: HubItemsManager;
readonly shieldLists: ShieldListsManager;
readonly archives: ArchivesManager;
constructor(
fields: Omit<
BoxClient,
Expand Down Expand Up @@ -260,6 +262,7 @@ export class BoxClient {
| 'hubCollaborations'
| 'hubItems'
| 'shieldLists'
| 'archives'
| 'networkSession'
| 'makeRequest'
| 'withAsUserHeader'
Expand Down Expand Up @@ -596,6 +599,10 @@ export class BoxClient {
auth: this.auth,
networkSession: this.networkSession,
});
this.archives = new ArchivesManager({
auth: this.auth,
networkSession: this.networkSession,
});
}
/**
* Make a custom http request using the client authentication and network session.
Expand Down
Loading