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": "fd9728e", "specHash": "1698c95", "version": "0.5.2" }
{ "engineHash": "7b699f4", "specHash": "1698c95", "version": "0.5.2" }
14 changes: 4 additions & 10 deletions docs/classifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@ See the endpoint docs at

```ts
await client.classifications.addClassification([
{
op: 'addEnumOption' as AddClassificationRequestBodyOpField,
fieldKey:
'Box__Security__Classification__Key' as AddClassificationRequestBodyFieldKeyField,
new AddClassificationRequestBody({
data: {
key: getUuid(),
staticConfig: {
Expand All @@ -71,7 +68,7 @@ await client.classifications.addClassification([
} satisfies AddClassificationRequestBodyDataStaticConfigClassificationField,
} satisfies AddClassificationRequestBodyDataStaticConfigField,
} satisfies AddClassificationRequestBodyDataField,
} satisfies AddClassificationRequestBody,
}),
]);
```

Expand Down Expand Up @@ -110,10 +107,7 @@ See the endpoint docs at

```ts
await client.classifications.updateClassification([
{
op: 'editEnumOption' as UpdateClassificationRequestBodyOpField,
fieldKey:
'Box__Security__Classification__Key' as UpdateClassificationRequestBodyFieldKeyField,
new UpdateClassificationRequestBody({
enumOptionKey: classification.key,
data: {
key: updatedClassificationName,
Expand All @@ -124,7 +118,7 @@ await client.classifications.updateClassification([
} satisfies UpdateClassificationRequestBodyDataStaticConfigClassificationField,
} satisfies UpdateClassificationRequestBodyDataStaticConfigField,
} satisfies UpdateClassificationRequestBodyDataField,
} satisfies UpdateClassificationRequestBody,
}),
]);
```

Expand Down
6 changes: 2 additions & 4 deletions docs/fileClassifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ See the endpoint docs at

```ts
await client.fileClassifications.updateClassificationOnFile(file.id, [
{
op: 'replace' as UpdateClassificationOnFileRequestBodyOpField,
path: '/Box__Security__Classification__Key' as UpdateClassificationOnFileRequestBodyPathField,
new UpdateClassificationOnFileRequestBody({
value: secondClassification.key,
} satisfies UpdateClassificationOnFileRequestBody,
}),
]);
```

Expand Down
4 changes: 2 additions & 2 deletions docs/fileWatermarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ See the endpoint docs at

```ts
await client.fileWatermarks.updateFileWatermark(file.id, {
watermark: {
watermark: new UpdateFileWatermarkRequestBodyWatermarkField({
imprint: 'default' as UpdateFileWatermarkRequestBodyWatermarkImprintField,
} satisfies UpdateFileWatermarkRequestBodyWatermarkField,
}),
} satisfies UpdateFileWatermarkRequestBody);
```

Expand Down
6 changes: 2 additions & 4 deletions docs/folderClassifications.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,9 @@ See the endpoint docs at

```ts
await client.folderClassifications.updateClassificationOnFolder(folder.id, [
{
op: 'replace' as UpdateClassificationOnFolderRequestBodyOpField,
path: '/Box__Security__Classification__Key' as UpdateClassificationOnFolderRequestBodyPathField,
new UpdateClassificationOnFolderRequestBody({
value: secondClassification.key,
} satisfies UpdateClassificationOnFolderRequestBody,
}),
]);
```

Expand Down
4 changes: 2 additions & 2 deletions docs/folderWatermarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ See the endpoint docs at

```ts
await client.folderWatermarks.updateFolderWatermark(folder.id, {
watermark: {
watermark: new UpdateFolderWatermarkRequestBodyWatermarkField({
imprint: 'default' as UpdateFolderWatermarkRequestBodyWatermarkImprintField,
} satisfies UpdateFolderWatermarkRequestBodyWatermarkField,
}),
} satisfies UpdateFolderWatermarkRequestBody);
```

Expand Down
10 changes: 3 additions & 7 deletions docs/integrationMappings.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,11 @@ See the endpoint docs at

```ts
await userClient.integrationMappings.createSlackIntegrationMapping({
partnerItem: {
type: 'channel' as IntegrationMappingPartnerItemSlackTypeField,
partnerItem: new IntegrationMappingPartnerItemSlack({
id: partnerItemId,
slackOrgId: slackOrgId,
} satisfies IntegrationMappingPartnerItemSlack,
boxItem: {
id: folder.id,
type: 'folder' as IntegrationMappingBoxItemSlackTypeField,
} satisfies IntegrationMappingBoxItemSlack,
}),
boxItem: new IntegrationMappingBoxItemSlack({ id: folder.id }),
} satisfies IntegrationMappingSlackCreateRequest);
```

Expand Down
5 changes: 1 addition & 4 deletions docs/shieldInformationBarrierSegmentMembers.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,7 @@ await client.shieldInformationBarrierSegmentMembers.createShieldInformationBarri
id: segment.id!,
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentTypeField,
} satisfies CreateShieldInformationBarrierSegmentMemberRequestBodyShieldInformationBarrierSegmentField,
user: {
id: getEnvVar('USER_ID'),
type: 'user' as UserBaseTypeField,
} satisfies UserBase,
user: new UserBase({ id: getEnvVar('USER_ID') }),
} satisfies CreateShieldInformationBarrierSegmentMemberRequestBody
);
```
Expand Down
4 changes: 2 additions & 2 deletions docs/shieldInformationBarrierSegmentRestrictions.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ See the endpoint docs at

```ts
await client.shieldInformationBarrierSegmentRestrictions.createShieldInformationBarrierSegmentRestriction(
{
new CreateShieldInformationBarrierSegmentRestrictionRequestBody({
restrictedSegment: {
id: segmentToRestrictId,
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyRestrictedSegmentTypeField,
Expand All @@ -132,7 +132,7 @@ await client.shieldInformationBarrierSegmentRestrictions.createShieldInformation
type: 'shield_information_barrier_segment' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBodyShieldInformationBarrierSegmentField,
type: 'shield_information_barrier_segment_restriction' as CreateShieldInformationBarrierSegmentRestrictionRequestBodyTypeField,
} satisfies CreateShieldInformationBarrierSegmentRestrictionRequestBody
})
);
```

Expand Down
5 changes: 1 addition & 4 deletions docs/shieldInformationBarriers.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,7 @@ See the endpoint docs at

```ts
await client.shieldInformationBarriers.createShieldInformationBarrier({
enterprise: {
id: enterpriseId,
type: 'enterprise' as EnterpriseBaseTypeField,
} satisfies EnterpriseBase,
enterprise: { id: enterpriseId } satisfies EnterpriseBase,
} satisfies CreateShieldInformationBarrierRequestBody);
```

Expand Down
9 changes: 2 additions & 7 deletions docs/signRequests.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,8 @@ await client.signRequests.createSignRequest({
signerGroupId: 'user',
} satisfies SignRequestCreateSigner,
],
parentFolder: {
id: destinationFolder.id,
type: 'folder' as FolderBaseTypeField,
} satisfies FolderMini,
sourceFiles: [
{ id: fileToSign.id, type: 'file' as FileBaseTypeField } satisfies FileBase,
],
parentFolder: new FolderMini({ id: destinationFolder.id }),
sourceFiles: [new FileBase({ id: fileToSign.id })],
} satisfies SignRequestCreateRequest);
```

Expand Down
20 changes: 10 additions & 10 deletions docs/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ await client.skills.createBoxSkillCardsOnFile(file.id, {
code: 'license-plates',
message: titleMessage,
} satisfies KeywordSkillCardSkillCardTitleField,
skill: {
skill: new KeywordSkillCardSkillField({
id: skillId,
type: 'service' as KeywordSkillCardSkillTypeField,
} satisfies KeywordSkillCardSkillField,
invocation: {
}),
invocation: new KeywordSkillCardInvocationField({
id: invocationId,
type: 'skill_invocation' as KeywordSkillCardInvocationTypeField,
} satisfies KeywordSkillCardInvocationField,
}),
entries: [{ text: 'DN86 BOX' } satisfies KeywordSkillCardEntriesField],
} satisfies KeywordSkillCardOrStatusSkillCardOrTimelineSkillCardOrTranscriptSkillCard,
],
Expand Down Expand Up @@ -108,23 +108,23 @@ await client.skills.updateBoxSkillCardsOnFile(file.id, [
{
op: 'replace' as UpdateBoxSkillCardsOnFileRequestBodyOpField,
path: '/cards/0',
value: {
value: new KeywordSkillCard({
type: 'skill_card' as KeywordSkillCardTypeField,
skillCardType: 'keyword' as KeywordSkillCardSkillCardTypeField,
skillCardTitle: {
code: 'license-plates',
message: updatedTitleMessage,
} satisfies KeywordSkillCardSkillCardTitleField,
skill: {
skill: new KeywordSkillCardSkillField({
id: skillId,
type: 'service' as KeywordSkillCardSkillTypeField,
} satisfies KeywordSkillCardSkillField,
invocation: {
}),
invocation: new KeywordSkillCardInvocationField({
id: invocationId,
type: 'skill_invocation' as KeywordSkillCardInvocationTypeField,
} satisfies KeywordSkillCardInvocationField,
}),
entries: [{ text: 'DN86 BOX' } satisfies KeywordSkillCardEntriesField],
} satisfies KeywordSkillCard,
}),
} satisfies UpdateBoxSkillCardsOnFileRequestBody,
]);
```
Expand Down
15 changes: 7 additions & 8 deletions docs/storagePolicyAssignments.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ See the endpoint docs at

```ts
await client.storagePolicyAssignments.createStoragePolicyAssignment({
storagePolicy: {
id: policyId,
type: 'storage_policy' as CreateStoragePolicyAssignmentRequestBodyStoragePolicyTypeField,
} satisfies CreateStoragePolicyAssignmentRequestBodyStoragePolicyField,
storagePolicy: new CreateStoragePolicyAssignmentRequestBodyStoragePolicyField(
{ id: policyId }
),
assignedTo: {
id: userId,
type: 'user' as CreateStoragePolicyAssignmentRequestBodyAssignedToTypeField,
Expand Down Expand Up @@ -127,10 +126,10 @@ See the endpoint docs at
await client.storagePolicyAssignments.updateStoragePolicyAssignmentById(
storagePolicyAssignment.id,
{
storagePolicy: {
id: storagePolicy2.id,
type: 'storage_policy' as UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyTypeField,
} satisfies UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField,
storagePolicy:
new UpdateStoragePolicyAssignmentByIdRequestBodyStoragePolicyField({
id: storagePolicy2.id,
}),
} satisfies UpdateStoragePolicyAssignmentByIdRequestBody
);
```
Expand Down
4 changes: 2 additions & 2 deletions docs/taskAssignments.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ See the endpoint docs at

```ts
await client.taskAssignments.createTaskAssignment({
task: {
task: new CreateTaskAssignmentRequestBodyTaskField({
type: 'task' as CreateTaskAssignmentRequestBodyTaskTypeField,
id: task.id!,
} satisfies CreateTaskAssignmentRequestBodyTaskField,
}),
assignTo: {
id: currentUser.id,
} satisfies CreateTaskAssignmentRequestBodyAssignToField,
Expand Down
10 changes: 3 additions & 7 deletions docs/termsOfServiceUserStatuses.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,10 @@ See the endpoint docs at

```ts
await client.termsOfServiceUserStatuses.createTermsOfServiceStatusForUser({
tos: {
type: 'terms_of_service' as CreateTermsOfServiceStatusForUserRequestBodyTosTypeField,
id: tos.id,
} satisfies CreateTermsOfServiceStatusForUserRequestBodyTosField,
user: {
type: 'user' as CreateTermsOfServiceStatusForUserRequestBodyUserTypeField,
tos: new CreateTermsOfServiceStatusForUserRequestBodyTosField({ id: tos.id }),
user: new CreateTermsOfServiceStatusForUserRequestBodyUserField({
id: user.id,
} satisfies CreateTermsOfServiceStatusForUserRequestBodyUserField,
}),
isAccepted: false,
} satisfies CreateTermsOfServiceStatusForUserRequestBody);
```
Expand Down
Loading