Skip to content

Commit 28b266c

Browse files
feat: Define interfaces for headers input (box/box-codegen#468) (#134)
1 parent 15508bf commit 28b266c

File tree

153 files changed

+6813
-817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+6813
-817
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "7b699f4", "specHash": "1698c95", "version": "0.5.3" }
1+
{ "engineHash": "f3d7de8", "specHash": "1698c95", "version": "0.5.3" }

docs/authorization.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ _Currently we don't have an example for calling `authorizeUser` in integration t
2626

2727
- queryParams `AuthorizeUserQueryParams`
2828
- Query parameters of authorizeUser method
29-
- headers `AuthorizeUserHeaders`
29+
- headersInput `AuthorizeUserHeadersInput`
3030
- Headers of authorizeUser method
3131
- cancellationToken `undefined | CancellationToken`
3232
- Token used for request cancellation.
@@ -63,7 +63,7 @@ _Currently we don't have an example for calling `requestAccessToken` in integrat
6363

6464
- requestBody `PostOAuth2Token`
6565
- Request body of requestAccessToken method
66-
- headers `RequestAccessTokenHeaders`
66+
- headersInput `RequestAccessTokenHeadersInput`
6767
- Headers of requestAccessToken method
6868
- cancellationToken `undefined | CancellationToken`
6969
- Token used for request cancellation.
@@ -89,9 +89,9 @@ _Currently we don't have an example for calling `refreshAccessToken` in integrat
8989

9090
### Arguments
9191

92-
- requestBody `PostOAuth2TokenRefreshAccessToken`
92+
- requestBodyInput `PostOAuth2TokenRefreshAccessTokenInput`
9393
- Request body of refreshAccessToken method
94-
- headers `RefreshAccessTokenHeaders`
94+
- headersInput `RefreshAccessTokenHeadersInput`
9595
- Headers of refreshAccessToken method
9696
- cancellationToken `undefined | CancellationToken`
9797
- Token used for request cancellation.
@@ -120,7 +120,7 @@ _Currently we don't have an example for calling `revokeAccessToken` in integrati
120120

121121
- requestBody `PostOAuth2Revoke`
122122
- Request body of revokeAccessToken method
123-
- headers `RevokeAccessTokenHeaders`
123+
- headersInput `RevokeAccessTokenHeadersInput`
124124
- Headers of revokeAccessToken method
125125
- cancellationToken `undefined | CancellationToken`
126126
- Token used for request cancellation.

docs/avatars.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ await client.avatars.getUserAvatar(user.id);
2323

2424
- userId `string`
2525
- The ID of the user. Example: "12345"
26-
- headers `GetUserAvatarHeaders`
26+
- headersInput `GetUserAvatarHeadersInput`
2727
- Headers of getUserAvatar method
2828
- cancellationToken `undefined | CancellationToken`
2929
- Token used for request cancellation.
@@ -63,7 +63,7 @@ await client.avatars.createUserAvatar(user.id, {
6363
- The ID of the user. Example: "12345"
6464
- requestBody `CreateUserAvatarRequestBody`
6565
- Request body of createUserAvatar method
66-
- headers `CreateUserAvatarHeaders`
66+
- headersInput `CreateUserAvatarHeadersInput`
6767
- Headers of createUserAvatar method
6868
- cancellationToken `undefined | CancellationToken`
6969
- Token used for request cancellation.
@@ -96,7 +96,7 @@ await client.avatars.deleteUserAvatar(user.id);
9696

9797
- userId `string`
9898
- The ID of the user. Example: "12345"
99-
- headers `DeleteUserAvatarHeaders`
99+
- headersInput `DeleteUserAvatarHeadersInput`
100100
- Headers of deleteUserAvatar method
101101
- cancellationToken `undefined | CancellationToken`
102102
- Token used for request cancellation.

docs/chunkedUploads.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ await this.createFileUploadSession(
2929
fileSize: fileSize,
3030
folderId: parentFolderId,
3131
} satisfies CreateFileUploadSessionRequestBody,
32-
new CreateFileUploadSessionHeaders({}),
32+
{} satisfies CreateFileUploadSessionHeadersInput,
3333
cancellationToken
3434
);
3535
```
@@ -38,7 +38,7 @@ await this.createFileUploadSession(
3838

3939
- requestBody `CreateFileUploadSessionRequestBody`
4040
- Request body of createFileUploadSession method
41-
- headers `CreateFileUploadSessionHeaders`
41+
- headersInput `CreateFileUploadSessionHeadersInput`
4242
- Headers of createFileUploadSession method
4343
- cancellationToken `undefined | CancellationToken`
4444
- Token used for request cancellation.
@@ -66,7 +66,7 @@ _Currently we don't have an example for calling `createFileUploadSessionForExist
6666
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
6767
- requestBody `CreateFileUploadSessionForExistingFileRequestBody`
6868
- Request body of createFileUploadSessionForExistingFile method
69-
- headers `CreateFileUploadSessionForExistingFileHeaders`
69+
- headersInput `CreateFileUploadSessionForExistingFileHeadersInput`
7070
- Headers of createFileUploadSessionForExistingFile method
7171
- cancellationToken `undefined | CancellationToken`
7272
- Token used for request cancellation.
@@ -91,7 +91,7 @@ See the endpoint docs at
9191
```ts
9292
await this.getFileUploadSessionById(
9393
uploadSessionId,
94-
new GetFileUploadSessionByIdHeaders({}),
94+
{} satisfies GetFileUploadSessionByIdHeadersInput,
9595
cancellationToken
9696
);
9797
```
@@ -100,7 +100,7 @@ await this.getFileUploadSessionById(
100100

101101
- uploadSessionId `string`
102102
- The ID of the upload session. Example: "D5E3F7A"
103-
- headers `GetFileUploadSessionByIdHeaders`
103+
- headersInput `GetFileUploadSessionByIdHeadersInput`
104104
- Headers of getFileUploadSessionById method
105105
- cancellationToken `undefined | CancellationToken`
106106
- Token used for request cancellation.
@@ -126,7 +126,10 @@ See the endpoint docs at
126126
await this.uploadFilePart(
127127
acc.uploadSessionId,
128128
generateByteStreamFromBuffer(chunkBuffer),
129-
new UploadFilePartHeaders({ digest: digest, contentRange: contentRange })
129+
{
130+
digest: digest,
131+
contentRange: contentRange,
132+
} satisfies UploadFilePartHeadersInput
130133
);
131134
```
132135

@@ -136,7 +139,7 @@ await this.uploadFilePart(
136139
- The ID of the upload session. Example: "D5E3F7A"
137140
- requestBody `ByteStream`
138141
- Request body of uploadFilePart method
139-
- headers `UploadFilePartHeaders`
142+
- headersInput `UploadFilePartHeadersInput`
140143
- Headers of uploadFilePart method
141144
- cancellationToken `undefined | CancellationToken`
142145
- Token used for request cancellation.
@@ -164,7 +167,7 @@ _Currently we don't have an example for calling `deleteFileUploadSessionById` in
164167

165168
- uploadSessionId `string`
166169
- The ID of the upload session. Example: "D5E3F7A"
167-
- headers `DeleteFileUploadSessionByIdHeaders`
170+
- headersInput `DeleteFileUploadSessionByIdHeadersInput`
168171
- Headers of deleteFileUploadSessionById method
169172
- cancellationToken `undefined | CancellationToken`
170173
- Token used for request cancellation.
@@ -192,7 +195,7 @@ See the endpoint docs at
192195
await this.getFileUploadSessionParts(
193196
uploadSessionId,
194197
{} satisfies GetFileUploadSessionPartsQueryParams,
195-
new GetFileUploadSessionPartsHeaders({}),
198+
{} satisfies GetFileUploadSessionPartsHeadersInput,
196199
cancellationToken
197200
);
198201
```
@@ -203,7 +206,7 @@ await this.getFileUploadSessionParts(
203206
- The ID of the upload session. Example: "D5E3F7A"
204207
- queryParams `GetFileUploadSessionPartsQueryParams`
205208
- Query parameters of getFileUploadSessionParts method
206-
- headers `GetFileUploadSessionPartsHeaders`
209+
- headersInput `GetFileUploadSessionPartsHeadersInput`
207210
- Headers of getFileUploadSessionParts method
208211
- cancellationToken `undefined | CancellationToken`
209212
- Token used for request cancellation.
@@ -230,7 +233,7 @@ See the endpoint docs at
230233
await this.createFileUploadSessionCommit(
231234
uploadSessionId,
232235
{ parts: parts } satisfies CreateFileUploadSessionCommitRequestBody,
233-
new CreateFileUploadSessionCommitHeaders({ digest: digest }),
236+
{ digest: digest } satisfies CreateFileUploadSessionCommitHeadersInput,
234237
cancellationToken
235238
);
236239
```
@@ -241,7 +244,7 @@ await this.createFileUploadSessionCommit(
241244
- The ID of the upload session. Example: "D5E3F7A"
242245
- requestBody `CreateFileUploadSessionCommitRequestBody`
243246
- Request body of createFileUploadSessionCommit method
244-
- headers `CreateFileUploadSessionCommitHeaders`
247+
- headersInput `CreateFileUploadSessionCommitHeadersInput`
245248
- Headers of createFileUploadSessionCommit method
246249
- cancellationToken `undefined | CancellationToken`
247250
- Token used for request cancellation.

docs/classifications.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ await client.classifications.getClassificationTemplate();
2727

2828
### Arguments
2929

30-
- headers `GetClassificationTemplateHeaders`
30+
- headersInput `GetClassificationTemplateHeadersInput`
3131
- Headers of getClassificationTemplate method
3232
- cancellationToken `undefined | CancellationToken`
3333
- Token used for request cancellation.
@@ -76,7 +76,7 @@ await client.classifications.addClassification([
7676

7777
- requestBody `readonly AddClassificationRequestBody[]`
7878
- Request body of addClassification method
79-
- headers `AddClassificationHeaders`
79+
- headersInput `AddClassificationHeadersInput`
8080
- Headers of addClassification method
8181
- cancellationToken `undefined | CancellationToken`
8282
- Token used for request cancellation.
@@ -126,7 +126,7 @@ await client.classifications.updateClassification([
126126

127127
- requestBody `readonly UpdateClassificationRequestBody[]`
128128
- Request body of updateClassification method
129-
- headers `UpdateClassificationHeaders`
129+
- headersInput `UpdateClassificationHeadersInput`
130130
- Headers of updateClassification method
131131
- cancellationToken `undefined | CancellationToken`
132132
- Token used for request cancellation.
@@ -158,9 +158,9 @@ _Currently we don't have an example for calling `createClassificationTemplate` i
158158

159159
### Arguments
160160

161-
- requestBody `CreateClassificationTemplateRequestBody`
161+
- requestBodyInput `CreateClassificationTemplateRequestBodyInput`
162162
- Request body of createClassificationTemplate method
163-
- headers `CreateClassificationTemplateHeaders`
163+
- headersInput `CreateClassificationTemplateHeadersInput`
164164
- Headers of createClassificationTemplate method
165165
- cancellationToken `undefined | CancellationToken`
166166
- Token used for request cancellation.

docs/collaborationAllowlistEntries.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ await client.collaborationAllowlistEntries.getCollaborationWhitelistEntries();
2525

2626
- queryParams `GetCollaborationWhitelistEntriesQueryParams`
2727
- Query parameters of getCollaborationWhitelistEntries method
28-
- headers `GetCollaborationWhitelistEntriesHeaders`
28+
- headersInput `GetCollaborationWhitelistEntriesHeadersInput`
2929
- Headers of getCollaborationWhitelistEntries method
3030
- cancellationToken `undefined | CancellationToken`
3131
- Token used for request cancellation.
@@ -59,7 +59,7 @@ await client.collaborationAllowlistEntries.createCollaborationWhitelistEntry({
5959

6060
- requestBody `CreateCollaborationWhitelistEntryRequestBody`
6161
- Request body of createCollaborationWhitelistEntry method
62-
- headers `CreateCollaborationWhitelistEntryHeaders`
62+
- headersInput `CreateCollaborationWhitelistEntryHeadersInput`
6363
- Headers of createCollaborationWhitelistEntry method
6464
- cancellationToken `undefined | CancellationToken`
6565
- Token used for request cancellation.
@@ -92,7 +92,7 @@ await client.collaborationAllowlistEntries.getCollaborationWhitelistEntryById(
9292

9393
- collaborationWhitelistEntryId `string`
9494
- The ID of the entry in the list. Example: "213123"
95-
- headers `GetCollaborationWhitelistEntryByIdHeaders`
95+
- headersInput `GetCollaborationWhitelistEntryByIdHeadersInput`
9696
- Headers of getCollaborationWhitelistEntryById method
9797
- cancellationToken `undefined | CancellationToken`
9898
- Token used for request cancellation.
@@ -125,7 +125,7 @@ await client.collaborationAllowlistEntries.deleteCollaborationWhitelistEntryById
125125

126126
- collaborationWhitelistEntryId `string`
127127
- The ID of the entry in the list. Example: "213123"
128-
- headers `DeleteCollaborationWhitelistEntryByIdHeaders`
128+
- headersInput `DeleteCollaborationWhitelistEntryByIdHeadersInput`
129129
- Headers of deleteCollaborationWhitelistEntryById method
130130
- cancellationToken `undefined | CancellationToken`
131131
- Token used for request cancellation.

docs/collaborationAllowlistExemptTargets.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ await client.collaborationAllowlistExemptTargets.getCollaborationWhitelistExempt
2525

2626
- queryParams `GetCollaborationWhitelistExemptTargetsQueryParams`
2727
- Query parameters of getCollaborationWhitelistExemptTargets method
28-
- headers `GetCollaborationWhitelistExemptTargetsHeaders`
28+
- headersInput `GetCollaborationWhitelistExemptTargetsHeadersInput`
2929
- Headers of getCollaborationWhitelistExemptTargets method
3030
- cancellationToken `undefined | CancellationToken`
3131
- Token used for request cancellation.
@@ -62,7 +62,7 @@ await client.collaborationAllowlistExemptTargets.createCollaborationWhitelistExe
6262

6363
- requestBody `CreateCollaborationWhitelistExemptTargetRequestBody`
6464
- Request body of createCollaborationWhitelistExemptTarget method
65-
- headers `CreateCollaborationWhitelistExemptTargetHeaders`
65+
- headersInput `CreateCollaborationWhitelistExemptTargetHeadersInput`
6666
- Headers of createCollaborationWhitelistExemptTarget method
6767
- cancellationToken `undefined | CancellationToken`
6868
- Token used for request cancellation.
@@ -95,7 +95,7 @@ await client.collaborationAllowlistExemptTargets.getCollaborationWhitelistExempt
9595

9696
- collaborationWhitelistExemptTargetId `string`
9797
- The ID of the exemption to the list. Example: "984923"
98-
- headers `GetCollaborationWhitelistExemptTargetByIdHeaders`
98+
- headersInput `GetCollaborationWhitelistExemptTargetByIdHeadersInput`
9999
- Headers of getCollaborationWhitelistExemptTargetById method
100100
- cancellationToken `undefined | CancellationToken`
101101
- Token used for request cancellation.
@@ -128,7 +128,7 @@ await client.collaborationAllowlistExemptTargets.deleteCollaborationWhitelistExe
128128

129129
- collaborationWhitelistExemptTargetId `string`
130130
- The ID of the exemption to the list. Example: "984923"
131-
- headers `DeleteCollaborationWhitelistExemptTargetByIdHeaders`
131+
- headersInput `DeleteCollaborationWhitelistExemptTargetByIdHeadersInput`
132132
- Headers of deleteCollaborationWhitelistExemptTargetById method
133133
- cancellationToken `undefined | CancellationToken`
134134
- Token used for request cancellation.

docs/collections.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ await client.collections.getCollections();
2525

2626
- queryParams `GetCollectionsQueryParams`
2727
- Query parameters of getCollections method
28-
- headers `GetCollectionsHeaders`
28+
- headersInput `GetCollectionsHeadersInput`
2929
- Headers of getCollections method
3030
- cancellationToken `undefined | CancellationToken`
3131
- Token used for request cancellation.
@@ -58,7 +58,7 @@ await client.collections.getCollectionItems(favouriteCollection.id!);
5858
- The ID of the collection. Example: "926489"
5959
- queryParams `GetCollectionItemsQueryParams`
6060
- Query parameters of getCollectionItems method
61-
- headers `GetCollectionItemsHeaders`
61+
- headersInput `GetCollectionItemsHeadersInput`
6262
- Headers of getCollectionItems method
6363
- cancellationToken `undefined | CancellationToken`
6464
- Token used for request cancellation.

docs/comments.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ await client.comments.getFileComments(fileId);
2727
- The unique identifier that represents a file. The ID for any file can be determined by visiting a file in the web application and copying the ID from the URL. For example, for the URL `https://*.app.box.com/files/123` the `file_id` is `123`. Example: "12345"
2828
- queryParams `GetFileCommentsQueryParams`
2929
- Query parameters of getFileComments method
30-
- headers `GetFileCommentsHeaders`
30+
- headersInput `GetFileCommentsHeadersInput`
3131
- Headers of getFileComments method
3232
- cancellationToken `undefined | CancellationToken`
3333
- Token used for request cancellation.
@@ -61,7 +61,7 @@ await client.comments.getCommentById(newComment.id!);
6161
- The ID of the comment. Example: "12345"
6262
- queryParams `GetCommentByIdQueryParams`
6363
- Query parameters of getCommentById method
64-
- headers `GetCommentByIdHeaders`
64+
- headersInput `GetCommentByIdHeadersInput`
6565
- Headers of getCommentById method
6666
- cancellationToken `undefined | CancellationToken`
6767
- Token used for request cancellation.
@@ -97,7 +97,7 @@ await client.comments.updateCommentById(newReplyComment.id!, {
9797
- Request body of updateCommentById method
9898
- queryParams `UpdateCommentByIdQueryParams`
9999
- Query parameters of updateCommentById method
100-
- headers `UpdateCommentByIdHeaders`
100+
- headersInput `UpdateCommentByIdHeadersInput`
101101
- Headers of updateCommentById method
102102
- cancellationToken `undefined | CancellationToken`
103103
- Token used for request cancellation.
@@ -127,7 +127,7 @@ await client.comments.deleteCommentById(newComment.id!);
127127

128128
- commentId `string`
129129
- The ID of the comment. Example: "12345"
130-
- headers `DeleteCommentByIdHeaders`
130+
- headersInput `DeleteCommentByIdHeadersInput`
131131
- Headers of deleteCommentById method
132132
- cancellationToken `undefined | CancellationToken`
133133
- Token used for request cancellation.
@@ -166,7 +166,7 @@ await client.comments.createComment({
166166
- Request body of createComment method
167167
- queryParams `CreateCommentQueryParams`
168168
- Query parameters of createComment method
169-
- headers `CreateCommentHeaders`
169+
- headersInput `CreateCommentHeadersInput`
170170
- Headers of createComment method
171171
- cancellationToken `undefined | CancellationToken`
172172
- Token used for request cancellation.

docs/devicePinners.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ _Currently we don't have an example for calling `getDevicePinnerById` in integra
1919

2020
- devicePinnerId `string`
2121
- The ID of the device pin Example: "2324234"
22-
- headers `GetDevicePinnerByIdHeaders`
22+
- headersInput `GetDevicePinnerByIdHeadersInput`
2323
- Headers of getDevicePinnerById method
2424
- cancellationToken `undefined | CancellationToken`
2525
- Token used for request cancellation.
@@ -45,7 +45,7 @@ _Currently we don't have an example for calling `deleteDevicePinnerById` in inte
4545

4646
- devicePinnerId `string`
4747
- The ID of the device pin Example: "2324234"
48-
- headers `DeleteDevicePinnerByIdHeaders`
48+
- headersInput `DeleteDevicePinnerByIdHeadersInput`
4949
- Headers of deleteDevicePinnerById method
5050
- cancellationToken `undefined | CancellationToken`
5151
- Token used for request cancellation.
@@ -76,7 +76,7 @@ _Currently we don't have an example for calling `getEnterpriseDevicePinners` in
7676
- The ID of the enterprise Example: "3442311"
7777
- queryParams `GetEnterpriseDevicePinnersQueryParams`
7878
- Query parameters of getEnterpriseDevicePinners method
79-
- headers `GetEnterpriseDevicePinnersHeaders`
79+
- headersInput `GetEnterpriseDevicePinnersHeadersInput`
8080
- Headers of getEnterpriseDevicePinners method
8181
- cancellationToken `undefined | CancellationToken`
8282
- Token used for request cancellation.

0 commit comments

Comments
 (0)