Skip to content

Commit eb36b36

Browse files
test: Update Metadata Taxonomies tests (box/box-codegen#909) (#1283)
1 parent 0935d71 commit eb36b36

File tree

77 files changed

+432
-335
lines changed

Some content is hidden

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

77 files changed

+432
-335
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "c370934", "specHash": "a4bdc72", "version": "10.2.0" }
1+
{ "engineHash": "41c28e1", "specHash": "1617aaf", "version": "10.2.0" }

.github/workflows/build_and_test_browser_daily.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build and Test browser daily
22
on:
33
schedule:
44
- cron: '50 0 * * 1-5'
5+
6+
permissions:
7+
contents: read
8+
59
jobs:
610
build-and-test:
711
runs-on: ubuntu-latest

.github/workflows/build_and_test_daily.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build and Test daily
22
on:
33
schedule:
44
- cron: '20 0 * * 1-5'
5+
6+
permissions:
7+
contents: read
8+
59
jobs:
610
build-and-test:
711
runs-on: ubuntu-latest

docs/metadataTaxonomies.md

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,24 @@ Returns an array of all taxonomy levels.
219219

220220
Updates an existing metadata taxonomy level.
221221

222-
This operation is performed by calling function `patchMetadataTaxonomiesIdIdLevelsId`.
222+
This operation is performed by calling function `updateMetadataTaxonomyLevelById`.
223223

224224
See the endpoint docs at
225225
[API Reference](https://developer.box.com/reference/patch-metadata-taxonomies-id-id-levels-id/).
226226

227-
_Currently we don't have an example for calling `patchMetadataTaxonomiesIdIdLevelsId` in integration tests_
227+
<!-- sample patch_metadata_taxonomies_id_id_levels_id -->
228+
229+
```ts
230+
await client.metadataTaxonomies.updateMetadataTaxonomyLevelById(
231+
namespace,
232+
taxonomyKey,
233+
1,
234+
{
235+
displayName: 'Continent UPDATED',
236+
description: 'Continent Level UPDATED',
237+
} satisfies UpdateMetadataTaxonomyLevelByIdRequestBody,
238+
);
239+
```
228240

229241
### Arguments
230242

@@ -234,9 +246,9 @@ _Currently we don't have an example for calling `patchMetadataTaxonomiesIdIdLeve
234246
- The key of the metadata taxonomy. Example: "geography"
235247
- levelIndex `number`
236248
- The index of the metadata taxonomy level. Example: 1
237-
- requestBody `PatchMetadataTaxonomiesIdIdLevelsIdRequestBody`
238-
- Request body of patchMetadataTaxonomiesIdIdLevelsId method
239-
- optionalsInput `PatchMetadataTaxonomiesIdIdLevelsIdOptionalsInput`
249+
- requestBody `UpdateMetadataTaxonomyLevelByIdRequestBody`
250+
- Request body of updateMetadataTaxonomyLevelById method
251+
- optionalsInput `UpdateMetadataTaxonomyLevelByIdOptionalsInput`
240252

241253
### Returns
242254

@@ -511,12 +523,20 @@ This operation is performed by calling function `getMetadataTemplateFieldOptions
511523
See the endpoint docs at
512524
[API Reference](https://developer.box.com/reference/get-metadata-templates-id-id-fields-id-options/).
513525

514-
_Currently we don't have an example for calling `getMetadataTemplateFieldOptions` in integration tests_
526+
<!-- sample get_metadata_templates_id_id_fields_id_options -->
527+
528+
```ts
529+
await client.metadataTaxonomies.getMetadataTemplateFieldOptions(
530+
namespace,
531+
metadataTemplateKey,
532+
'taxonomy',
533+
);
534+
```
515535

516536
### Arguments
517537

518-
- scope `GetMetadataTemplateFieldOptionsScope`
519-
- The scope of the metadata template. Example: "global"
538+
- namespace `string`
539+
- The namespace of the metadata taxonomy. Example: "enterprise_123456"
520540
- templateKey `string`
521541
- The name of the metadata template. Example: "properties"
522542
- fieldKey `string`

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/managers/aiStudio.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ export class AiStudioManager {
427427
url: ''.concat(
428428
this.networkSession.baseUrls.baseUrl,
429429
'/2.0/ai_agents/',
430-
toString(agentId) as string,
430+
(toString(agentId) as string)!,
431431
) as string,
432432
method: 'PUT',
433433
headers: headersMap,
@@ -479,7 +479,7 @@ export class AiStudioManager {
479479
url: ''.concat(
480480
this.networkSession.baseUrls.baseUrl,
481481
'/2.0/ai_agents/',
482-
toString(agentId) as string,
482+
(toString(agentId) as string)!,
483483
) as string,
484484
method: 'GET',
485485
params: queryParamsMap,
@@ -522,7 +522,7 @@ export class AiStudioManager {
522522
url: ''.concat(
523523
this.networkSession.baseUrls.baseUrl,
524524
'/2.0/ai_agents/',
525-
toString(agentId) as string,
525+
(toString(agentId) as string)!,
526526
) as string,
527527
method: 'DELETE',
528528
headers: headersMap,

src/managers/appItemAssociations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ export class AppItemAssociationsManager {
227227
url: ''.concat(
228228
this.networkSession.baseUrls.baseUrl,
229229
'/2.0/files/',
230-
toString(fileId) as string,
230+
(toString(fileId) as string)!,
231231
'/app_item_associations',
232232
) as string,
233233
method: 'GET',
@@ -293,7 +293,7 @@ export class AppItemAssociationsManager {
293293
url: ''.concat(
294294
this.networkSession.baseUrls.baseUrl,
295295
'/2.0/folders/',
296-
toString(folderId) as string,
296+
(toString(folderId) as string)!,
297297
'/app_item_associations',
298298
) as string,
299299
method: 'GET',

src/managers/archives.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ export class ArchivesManager {
433433
url: ''.concat(
434434
this.networkSession.baseUrls.baseUrl,
435435
'/2.0/archives/',
436-
toString(archiveId) as string,
436+
(toString(archiveId) as string)!,
437437
) as string,
438438
method: 'DELETE',
439439
headers: headersMap,
@@ -479,7 +479,7 @@ export class ArchivesManager {
479479
url: ''.concat(
480480
this.networkSession.baseUrls.baseUrl,
481481
'/2.0/archives/',
482-
toString(archiveId) as string,
482+
(toString(archiveId) as string)!,
483483
) as string,
484484
method: 'PUT',
485485
headers: headersMap,

src/managers/avatars.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export class AvatarsManager {
201201
url: ''.concat(
202202
this.networkSession.baseUrls.baseUrl,
203203
'/2.0/users/',
204-
toString(userId) as string,
204+
(toString(userId) as string)!,
205205
'/avatar',
206206
) as string,
207207
method: 'GET',
@@ -242,7 +242,7 @@ export class AvatarsManager {
242242
url: ''.concat(
243243
this.networkSession.baseUrls.baseUrl,
244244
'/2.0/users/',
245-
toString(userId) as string,
245+
(toString(userId) as string)!,
246246
'/avatar',
247247
) as string,
248248
method: 'POST',
@@ -294,7 +294,7 @@ export class AvatarsManager {
294294
url: ''.concat(
295295
this.networkSession.baseUrls.baseUrl,
296296
'/2.0/users/',
297-
toString(userId) as string,
297+
(toString(userId) as string)!,
298298
'/avatar',
299299
) as string,
300300
method: 'DELETE',

src/managers/chunkedUploads.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,7 +1027,7 @@ export class ChunkedUploadsManager {
10271027
url: ''.concat(
10281028
this.networkSession.baseUrls.uploadUrl,
10291029
'/2.0/files/',
1030-
toString(fileId) as string,
1030+
(toString(fileId) as string)!,
10311031
'/upload_sessions',
10321032
) as string,
10331033
method: 'POST',
@@ -1117,7 +1117,7 @@ export class ChunkedUploadsManager {
11171117
url: ''.concat(
11181118
this.networkSession.baseUrls.uploadUrl,
11191119
'/2.0/files/upload_sessions/',
1120-
toString(uploadSessionId) as string,
1120+
(toString(uploadSessionId) as string)!,
11211121
) as string,
11221122
method: 'GET',
11231123
headers: headersMap,
@@ -1231,7 +1231,7 @@ export class ChunkedUploadsManager {
12311231
url: ''.concat(
12321232
this.networkSession.baseUrls.uploadUrl,
12331233
'/2.0/files/upload_sessions/',
1234-
toString(uploadSessionId) as string,
1234+
(toString(uploadSessionId) as string)!,
12351235
) as string,
12361236
method: 'PUT',
12371237
headers: headersMap,
@@ -1321,7 +1321,7 @@ export class ChunkedUploadsManager {
13211321
url: ''.concat(
13221322
this.networkSession.baseUrls.uploadUrl,
13231323
'/2.0/files/upload_sessions/',
1324-
toString(uploadSessionId) as string,
1324+
(toString(uploadSessionId) as string)!,
13251325
) as string,
13261326
method: 'DELETE',
13271327
headers: headersMap,
@@ -1422,7 +1422,7 @@ export class ChunkedUploadsManager {
14221422
url: ''.concat(
14231423
this.networkSession.baseUrls.uploadUrl,
14241424
'/2.0/files/upload_sessions/',
1425-
toString(uploadSessionId) as string,
1425+
(toString(uploadSessionId) as string)!,
14261426
'/parts',
14271427
) as string,
14281428
method: 'GET',
@@ -1548,7 +1548,7 @@ export class ChunkedUploadsManager {
15481548
url: ''.concat(
15491549
this.networkSession.baseUrls.uploadUrl,
15501550
'/2.0/files/upload_sessions/',
1551-
toString(uploadSessionId) as string,
1551+
(toString(uploadSessionId) as string)!,
15521552
'/commit',
15531553
) as string,
15541554
method: 'POST',

0 commit comments

Comments
 (0)