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
148 changes: 65 additions & 83 deletions docs/classifications.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
# ClassificationsManager

- [List all classifications](#list-all-classifications)
- [Delete all classifications](#delete-all-classifications)
- [Add classification](#add-classification)
- [Update classification](#update-classification)
- [Delete classification](#delete-classification)
- [Add initial classifications](#add-initial-classifications)

## List all classifications
Expand All @@ -16,17 +14,21 @@ This API can also be called by including the enterprise ID in the
URL explicitly, for example
`/metadata_templates/enterprise_12345/securityClassification-6VMVochwUWo/schema`.

This operation is performed by calling function `getMetadataTemplateEnterpriseSecurityClassificationSchema`.
This operation is performed by calling function `getClassificationTemplate`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/get-metadata-templates-enterprise-security-classification-6-vm-vochw-u-wo-schema/).

_Currently we don't have an example for calling `getMetadataTemplateEnterpriseSecurityClassificationSchema` in integration tests_
<!-- sample get_metadata_templates_enterprise_securityClassification-6VMVochwUWo_schema -->

```ts
await client.classifications.getClassificationTemplate();
```

### Arguments

- headers `GetMetadataTemplateEnterpriseSecurityClassificationSchemaHeadersArg`
- Headers of getMetadataTemplateEnterpriseSecurityClassificationSchema method
- headers `GetClassificationTemplateHeadersArg`
- Headers of getClassificationTemplate method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

Expand All @@ -38,32 +40,6 @@ Returns the `securityClassification` metadata template, which contains
a `Box__Security__Classification__Key` field that lists all the
classifications available to this enterprise.

## Delete all classifications

Delete all classifications by deleting the classification
metadata template.

This operation is performed by calling function `deleteMetadataTemplateEnterpriseSecurityClassificationSchema`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/delete-metadata-templates-enterprise-security-classification-6-vm-vochw-u-wo-schema/).

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

### Arguments

- headers `DeleteMetadataTemplateEnterpriseSecurityClassificationSchemaHeadersArg`
- Headers of deleteMetadataTemplateEnterpriseSecurityClassificationSchema method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

### Returns

This function returns a value of type `undefined`.

Returns an empty response when the metadata
template for classifications is successfully deleted.

## Add classification

Adds one or more new classifications to the list of classifications
Expand All @@ -73,19 +49,38 @@ This API can also be called by including the enterprise ID in the
URL explicitly, for example
`/metadata_templates/enterprise_12345/securityClassification-6VMVochwUWo/schema`.

This operation is performed by calling function `updateMetadataTemplateEnterpriseSecurityClassificationSchemaAdd`.
This operation is performed by calling function `addClassification`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/put-metadata-templates-enterprise-security-classification-6-vm-vochw-u-wo-schema-add/).

_Currently we don't have an example for calling `updateMetadataTemplateEnterpriseSecurityClassificationSchemaAdd` in integration tests_
<!-- sample put_metadata_templates_enterprise_securityClassification-6VMVochwUWo_schema#add -->

```ts
await client.classifications.addClassification([
{
op: 'addEnumOption' as AddClassificationRequestBodyArgOpField,
fieldKey:
'Box__Security__Classification__Key' as AddClassificationRequestBodyArgFieldKeyField,
data: {
key: getUuid(),
staticConfig: {
classification: {
colorId: 3,
classificationDefinition: 'Some description',
} satisfies AddClassificationRequestBodyArgDataFieldStaticConfigFieldClassificationField,
} satisfies AddClassificationRequestBodyArgDataFieldStaticConfigField,
} satisfies AddClassificationRequestBodyArgDataField,
} satisfies AddClassificationRequestBodyArg,
]);
```

### Arguments

- requestBody `readonly UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaAddRequestBodyArg[]`
- Request body of updateMetadataTemplateEnterpriseSecurityClassificationSchemaAdd method
- headers `UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaAddHeadersArg`
- Headers of updateMetadataTemplateEnterpriseSecurityClassificationSchemaAdd method
- requestBody `readonly AddClassificationRequestBodyArg[]`
- Request body of addClassification method
- headers `AddClassificationHeadersArg`
- Headers of addClassification method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

Expand All @@ -106,52 +101,39 @@ This API can also be called by including the enterprise ID in the
URL explicitly, for example
`/metadata_templates/enterprise_12345/securityClassification-6VMVochwUWo/schema`.

This operation is performed by calling function `updateMetadataTemplateEnterpriseSecurityClassificationSchemaUpdate`.
This operation is performed by calling function `updateClassification`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/put-metadata-templates-enterprise-security-classification-6-vm-vochw-u-wo-schema-update/).

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

### Arguments

- requestBody `readonly UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaUpdateRequestBodyArg[]`
- Request body of updateMetadataTemplateEnterpriseSecurityClassificationSchemaUpdate method
- headers `UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaUpdateHeadersArg`
- Headers of updateMetadataTemplateEnterpriseSecurityClassificationSchemaUpdate method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

### Returns

This function returns a value of type `ClassificationTemplate`.

Returns the updated `securityClassification` metadata template, which
contains a `Box__Security__Classification__Key` field that lists all
the classifications available to this enterprise.

## Delete classification

Removes a classification from the list of classifications
available to the enterprise.

This API can also be called by including the enterprise ID in the
URL explicitly, for example
`/metadata_templates/enterprise_12345/securityClassification-6VMVochwUWo/schema`.

This operation is performed by calling function `updateMetadataTemplateEnterpriseSecurityClassificationSchemaDelete`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/put-metadata-templates-enterprise-security-classification-6-vm-vochw-u-wo-schema-delete/).

_Currently we don't have an example for calling `updateMetadataTemplateEnterpriseSecurityClassificationSchemaDelete` in integration tests_
<!-- sample put_metadata_templates_enterprise_securityClassification-6VMVochwUWo_schema#update -->

```ts
await client.classifications.updateClassification([
{
op: 'editEnumOption' as UpdateClassificationRequestBodyArgOpField,
fieldKey:
'Box__Security__Classification__Key' as UpdateClassificationRequestBodyArgFieldKeyField,
enumOptionKey: classification.key,
data: {
key: updatedClassificationName,
staticConfig: {
classification: {
colorId: 2,
classificationDefinition: updatedClassificationDescription,
} satisfies UpdateClassificationRequestBodyArgDataFieldStaticConfigFieldClassificationField,
} satisfies UpdateClassificationRequestBodyArgDataFieldStaticConfigField,
} satisfies UpdateClassificationRequestBodyArgDataField,
} satisfies UpdateClassificationRequestBodyArg,
]);
```

### Arguments

- requestBody `readonly UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaDeleteRequestBodyArg[]`
- Request body of updateMetadataTemplateEnterpriseSecurityClassificationSchemaDelete method
- headers `UpdateMetadataTemplateEnterpriseSecurityClassificationSchemaDeleteHeadersArg`
- Headers of updateMetadataTemplateEnterpriseSecurityClassificationSchemaDelete method
- requestBody `readonly UpdateClassificationRequestBodyArg[]`
- Request body of updateClassification method
- headers `UpdateClassificationHeadersArg`
- Headers of updateClassification method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

Expand All @@ -173,19 +155,19 @@ If an enterprise already has a classification, the template will already
exist and instead an API call should be made to add additional
classifications.

This operation is performed by calling function `createMetadataTemplateSchemaClassification`.
This operation is performed by calling function `createClassificationTemplate`.

See the endpoint docs at
[API Reference](https://developer.box.com/reference/post-metadata-templates-schema-classifications/).

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

### Arguments

- requestBody `CreateMetadataTemplateSchemaClassificationRequestBodyArg`
- Request body of createMetadataTemplateSchemaClassification method
- headers `CreateMetadataTemplateSchemaClassificationHeadersArg`
- Headers of createMetadataTemplateSchemaClassification method
- requestBody `CreateClassificationTemplateRequestBodyArg`
- Request body of createClassificationTemplate method
- headers `CreateClassificationTemplateHeadersArg`
- Headers of createClassificationTemplate method
- cancellationToken `undefined | CancellationToken`
- Token used for request cancellation.

Expand Down
2 changes: 1 addition & 1 deletion docs/comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ await client.comments.createComment({

### Returns

This function returns a value of type `Comment`.
This function returns a value of type `CommentFull`.

Returns the newly created comment object.

Expand Down
4 changes: 2 additions & 2 deletions docs/fileMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ await client.fileMetadata.createFileMetadataById(

### Returns

This function returns a value of type `Metadata`.
This function returns a value of type `MetadataFull`.

Returns the instance of the template that was applied to the file,
including the data that was applied to the template.
Expand Down Expand Up @@ -167,7 +167,7 @@ await client.fileMetadata.updateFileMetadataById(fileId, scope, template, [

### Returns

This function returns a value of type `Metadata`.
This function returns a value of type `MetadataFull`.

Returns the updated metadata template instance, with the
custom template data included.
Expand Down
23 changes: 20 additions & 3 deletions docs/fileWatermarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ This operation is performed by calling function `getFileWatermark`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/get-files-id-watermark/).

_Currently we don't have an example for calling `getFileWatermark` in integration tests_
<!-- sample get_files_id_watermark -->

```ts
await client.fileWatermarks.getFileWatermark(file.id);
```

### Arguments

Expand All @@ -40,7 +44,16 @@ This operation is performed by calling function `updateFileWatermark`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/put-files-id-watermark/).

_Currently we don't have an example for calling `updateFileWatermark` in integration tests_
<!-- sample put_files_id_watermark -->

```ts
await client.fileWatermarks.updateFileWatermark(file.id, {
watermark: {
imprint:
'default' as UpdateFileWatermarkRequestBodyArgWatermarkFieldImprintField,
} satisfies UpdateFileWatermarkRequestBodyArgWatermarkField,
} satisfies UpdateFileWatermarkRequestBodyArg);
```

### Arguments

Expand Down Expand Up @@ -70,7 +83,11 @@ This operation is performed by calling function `deleteFileWatermark`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/delete-files-id-watermark/).

_Currently we don't have an example for calling `deleteFileWatermark` in integration tests_
<!-- sample delete_files_id_watermark -->

```ts
await client.fileWatermarks.deleteFileWatermark(file.id);
```

### Arguments

Expand Down
4 changes: 2 additions & 2 deletions docs/folderMetadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ await client.folderMetadata.createFolderMetadataById(

### Returns

This function returns a value of type `Metadata`.
This function returns a value of type `MetadataFull`.

Returns the instance of the template that was applied to the folder,
including the data that was applied to the template.
Expand Down Expand Up @@ -177,7 +177,7 @@ await client.folderMetadata.updateFolderMetadataById(

### Returns

This function returns a value of type `Metadata`.
This function returns a value of type `MetadataFull`.

Returns the updated metadata template instance, with the
custom template data included.
Expand Down
23 changes: 20 additions & 3 deletions docs/folderWatermarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ This operation is performed by calling function `getFolderWatermark`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/get-folders-id-watermark/).

_Currently we don't have an example for calling `getFolderWatermark` in integration tests_
<!-- sample get_folders_id_watermark -->

```ts
await client.folderWatermarks.getFolderWatermark(folder.id);
```

### Arguments

Expand All @@ -40,7 +44,16 @@ This operation is performed by calling function `updateFolderWatermark`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/put-folders-id-watermark/).

_Currently we don't have an example for calling `updateFolderWatermark` in integration tests_
<!-- sample put_folders_id_watermark -->

```ts
await client.folderWatermarks.updateFolderWatermark(folder.id, {
watermark: {
imprint:
'default' as UpdateFolderWatermarkRequestBodyArgWatermarkFieldImprintField,
} satisfies UpdateFolderWatermarkRequestBodyArgWatermarkField,
} satisfies UpdateFolderWatermarkRequestBodyArg);
```

### Arguments

Expand Down Expand Up @@ -70,7 +83,11 @@ This operation is performed by calling function `deleteFolderWatermark`.
See the endpoint docs at
[API Reference](https://developer.box.com/reference/delete-folders-id-watermark/).

_Currently we don't have an example for calling `deleteFolderWatermark` in integration tests_
<!-- sample delete_folders_id_watermark -->

```ts
await client.folderWatermarks.deleteFolderWatermark(folder.id);
```

### Arguments

Expand Down
2 changes: 1 addition & 1 deletion docs/groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ await client.groups.createGroup({

### Returns

This function returns a value of type `Group`.
This function returns a value of type `GroupFull`.

Returns the new group object.

Expand Down
2 changes: 1 addition & 1 deletion docs/metadataTemplates.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ See the endpoint docs at
<!-- sample get_metadata_templates_id -->

```ts
await client.metadataTemplates.getMetadataTemplateById(template.id!);
await client.metadataTemplates.getMetadataTemplateById(template.id);
```

### Arguments
Expand Down
Loading