From 249dd83ed583cf3686df58ab7d7533aed9a2cfdb Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Fri, 18 Oct 2024 09:46:23 -0700 Subject: [PATCH 1/5] feat: Support Try, Throw tags and some build-in functions in Java (box/box-codegen#579) --- .codegen.json | 2 +- package-lock.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.codegen.json b/.codegen.json index f9d7bd78..89ca8986 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "83d735e", "specHash": "f0c2ce4", "version": "1.7.0" } +{ "engineHash": "2443714", "specHash": "f0c2ce4", "version": "1.7.0" } diff --git a/package-lock.json b/package-lock.json index a1a56237..917a4324 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2141,9 +2141,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.40", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.40.tgz", - "integrity": "sha512-LYm78o6if4zTasnYclgQzxEcgMoIcybWOhkATWepN95uwVVWV0/IW10v+2sIeHE+bIYWipLneTftVyQm45UY7g==", + "version": "1.5.41", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz", + "integrity": "sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==", "dev": true }, "node_modules/emittery": { From 8959801b49d81ccbd5e7a578b69a6320a7702ab0 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 21 Oct 2024 12:39:33 -0700 Subject: [PATCH 2/5] feat: Modify schema for teams for integration mapping api (box/box-openapi#463) --- .codegen.json | 2 +- package-lock.json | 12 ++--- src/schemas/integrationMapping.generated.ts | 58 ++++++++++----------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/.codegen.json b/.codegen.json index 89ca8986..4d9e8916 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "2443714", "specHash": "f0c2ce4", "version": "1.7.0" } +{ "engineHash": "2443714", "specHash": "efab356", "version": "1.7.0" } diff --git a/package-lock.json b/package-lock.json index 917a4324..f4bc817a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1438,9 +1438,9 @@ } }, "node_modules/@types/node": { - "version": "22.7.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.6.tgz", - "integrity": "sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==", + "version": "22.7.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz", + "integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==", "dev": true, "dependencies": { "undici-types": "~6.19.2" @@ -3478,9 +3478,9 @@ } }, "node_modules/jose": { - "version": "5.9.4", - "resolved": "https://registry.npmjs.org/jose/-/jose-5.9.4.tgz", - "integrity": "sha512-WBBl6au1qg6OHj67yCffCgFR3BADJBXN8MdRvCgJDuMv3driV2nHr7jdGvaKX9IolosAsn+M0XRArqLXUhyJHQ==", + "version": "5.9.6", + "resolved": "https://registry.npmjs.org/jose/-/jose-5.9.6.tgz", + "integrity": "sha512-AMlnetc9+CV9asI19zHmrgS/WYsWUwCn2R7RzlbJWD7F9eWYUTGyBmU9o6PxngtLGOiDGPRu+Uc4fhKzbpteZQ==", "funding": { "url": "https://github.com/sponsors/panva" } diff --git a/src/schemas/integrationMapping.generated.ts b/src/schemas/integrationMapping.generated.ts index aecfcf7a..7d9c7422 100644 --- a/src/schemas/integrationMapping.generated.ts +++ b/src/schemas/integrationMapping.generated.ts @@ -2,22 +2,22 @@ import { serializeIntegrationMappingBaseTypeField } from './integrationMappingBa import { deserializeIntegrationMappingBaseTypeField } from './integrationMappingBase.generated.js'; import { serializeIntegrationMappingBase } from './integrationMappingBase.generated.js'; import { deserializeIntegrationMappingBase } from './integrationMappingBase.generated.js'; -import { serializeIntegrationMappingPartnerItemSlackUnion } from './integrationMappingPartnerItemSlackUnion.generated.js'; -import { deserializeIntegrationMappingPartnerItemSlackUnion } from './integrationMappingPartnerItemSlackUnion.generated.js'; -import { serializeFolderMini } from './folderMini.generated.js'; -import { deserializeFolderMini } from './folderMini.generated.js'; import { serializeIntegrationMappingSlackOptions } from './integrationMappingSlackOptions.generated.js'; import { deserializeIntegrationMappingSlackOptions } from './integrationMappingSlackOptions.generated.js'; import { serializeUserIntegrationMappings } from './userIntegrationMappings.generated.js'; import { deserializeUserIntegrationMappings } from './userIntegrationMappings.generated.js'; +import { serializeIntegrationMappingPartnerItemSlackUnion } from './integrationMappingPartnerItemSlackUnion.generated.js'; +import { deserializeIntegrationMappingPartnerItemSlackUnion } from './integrationMappingPartnerItemSlackUnion.generated.js'; +import { serializeFolderMini } from './folderMini.generated.js'; +import { deserializeFolderMini } from './folderMini.generated.js'; import { serializeDateTime } from '../internal/utils.js'; import { deserializeDateTime } from '../internal/utils.js'; import { IntegrationMappingBaseTypeField } from './integrationMappingBase.generated.js'; import { IntegrationMappingBase } from './integrationMappingBase.generated.js'; -import { IntegrationMappingPartnerItemSlackUnion } from './integrationMappingPartnerItemSlackUnion.generated.js'; -import { FolderMini } from './folderMini.generated.js'; import { IntegrationMappingSlackOptions } from './integrationMappingSlackOptions.generated.js'; import { UserIntegrationMappings } from './userIntegrationMappings.generated.js'; +import { IntegrationMappingPartnerItemSlackUnion } from './integrationMappingPartnerItemSlackUnion.generated.js'; +import { FolderMini } from './folderMini.generated.js'; import { DateTime } from '../internal/utils.js'; import { BoxSdkError } from '../box/errors.js'; import { SerializedData } from '../serialization/json.js'; @@ -30,12 +30,12 @@ import { sdIsMap } from '../serialization/json.js'; export type IntegrationMappingIntegrationTypeField = 'slack'; export class IntegrationMapping extends IntegrationMappingBase { readonly integrationType?: IntegrationMappingIntegrationTypeField; - readonly partnerItem!: IntegrationMappingPartnerItemSlackUnion; - readonly boxItem!: FolderMini; readonly isManuallyCreated?: boolean; readonly options?: IntegrationMappingSlackOptions; readonly createdBy?: UserIntegrationMappings; readonly modifiedBy?: UserIntegrationMappings; + readonly partnerItem!: IntegrationMappingPartnerItemSlackUnion; + readonly boxItem!: FolderMini; readonly createdAt?: DateTime; readonly modifiedAt?: DateTime; constructor(fields: IntegrationMapping) { @@ -75,10 +75,6 @@ export function serializeIntegrationMapping( : serializeIntegrationMappingIntegrationTypeField( val.integrationType ), - ['partner_item']: serializeIntegrationMappingPartnerItemSlackUnion( - val.partnerItem - ), - ['box_item']: serializeFolderMini(val.boxItem), ['is_manually_created']: val.isManuallyCreated == void 0 ? void 0 : val.isManuallyCreated, ['options']: @@ -93,6 +89,10 @@ export function serializeIntegrationMapping( val.modifiedBy == void 0 ? void 0 : serializeUserIntegrationMappings(val.modifiedBy), + ['partner_item']: serializeIntegrationMappingPartnerItemSlackUnion( + val.partnerItem + ), + ['box_item']: serializeFolderMini(val.boxItem), ['created_at']: val.createdAt == void 0 ? void 0 : serializeDateTime(val.createdAt), ['modified_at']: @@ -112,21 +112,6 @@ export function deserializeIntegrationMapping( val.integration_type == void 0 ? void 0 : deserializeIntegrationMappingIntegrationTypeField(val.integration_type); - if (val.partner_item == void 0) { - throw new BoxSdkError({ - message: - 'Expecting "partner_item" of type "IntegrationMapping" to be defined', - }); - } - const partnerItem: IntegrationMappingPartnerItemSlackUnion = - deserializeIntegrationMappingPartnerItemSlackUnion(val.partner_item); - if (val.box_item == void 0) { - throw new BoxSdkError({ - message: - 'Expecting "box_item" of type "IntegrationMapping" to be defined', - }); - } - const boxItem: FolderMini = deserializeFolderMini(val.box_item); if ( !(val.is_manually_created == void 0) && !sdIsBoolean(val.is_manually_created) @@ -150,6 +135,21 @@ export function deserializeIntegrationMapping( val.modified_by == void 0 ? void 0 : deserializeUserIntegrationMappings(val.modified_by); + if (val.partner_item == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "partner_item" of type "IntegrationMapping" to be defined', + }); + } + const partnerItem: IntegrationMappingPartnerItemSlackUnion = + deserializeIntegrationMappingPartnerItemSlackUnion(val.partner_item); + if (val.box_item == void 0) { + throw new BoxSdkError({ + message: + 'Expecting "box_item" of type "IntegrationMapping" to be defined', + }); + } + const boxItem: FolderMini = deserializeFolderMini(val.box_item); if (!(val.created_at == void 0) && !sdIsString(val.created_at)) { throw new BoxSdkError({ message: 'Expecting string for "created_at" of type "IntegrationMapping"', @@ -185,12 +185,12 @@ export function deserializeIntegrationMapping( deserializeIntegrationMappingBaseTypeField(val.type); return { integrationType: integrationType, - partnerItem: partnerItem, - boxItem: boxItem, isManuallyCreated: isManuallyCreated, options: options, createdBy: createdBy, modifiedBy: modifiedBy, + partnerItem: partnerItem, + boxItem: boxItem, createdAt: createdAt, modifiedAt: modifiedAt, id: id, From 1f05906ff02bc794c500ac406f34f6abfd38b283 Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Mon, 21 Oct 2024 13:11:01 -0700 Subject: [PATCH 3/5] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index 4d9e8916..1059d404 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "2443714", "specHash": "efab356", "version": "1.7.0" } +{ "engineHash": "2443714", "specHash": "9f75129", "version": "1.7.0" } From 5d879fe380b97b7a195b2ebae0a3230113d6fe1d Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 22 Oct 2024 06:39:29 -0700 Subject: [PATCH 4/5] fix: update client error schema to support schema errors (box/box-openapi#467) --- .codegen.json | 2 +- package-lock.json | 24 ++++++++++++------------ src/schemas/clientError.generated.ts | 15 ++------------- 3 files changed, 15 insertions(+), 26 deletions(-) diff --git a/.codegen.json b/.codegen.json index 1059d404..c67c6fe7 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "2443714", "specHash": "9f75129", "version": "1.7.0" } +{ "engineHash": "2443714", "specHash": "abd6037", "version": "1.7.0" } diff --git a/package-lock.json b/package-lock.json index f4bc817a..589637ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1438,9 +1438,9 @@ } }, "node_modules/@types/node": { - "version": "22.7.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.7.tgz", - "integrity": "sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==", + "version": "22.7.8", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.8.tgz", + "integrity": "sha512-a922jJy31vqR5sk+kAdIENJjHblqcZ4RmERviFsER4WJcEONqxKcjNOlk0q7OUfrF5sddT+vng070cdfMlrPLg==", "dev": true, "dependencies": { "undici-types": "~6.19.2" @@ -1762,9 +1762,9 @@ } }, "node_modules/browserslist": { - "version": "4.24.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", - "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", + "version": "4.24.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz", + "integrity": "sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==", "dev": true, "funding": [ { @@ -1781,10 +1781,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001663", - "electron-to-chromium": "^1.5.28", + "caniuse-lite": "^1.0.30001669", + "electron-to-chromium": "^1.5.41", "node-releases": "^2.0.18", - "update-browserslist-db": "^1.1.0" + "update-browserslist-db": "^1.1.1" }, "bin": { "browserslist": "cli.js" @@ -2141,9 +2141,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.41", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.41.tgz", - "integrity": "sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==", + "version": "1.5.42", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.42.tgz", + "integrity": "sha512-gIfKavKDw1mhvic9nbzA5lZw8QSHpdMwLwXc0cWidQz9B15pDoDdDH4boIatuFfeoCatb3a/NGL6CYRVFxGZ9g==", "dev": true }, "node_modules/emittery": { diff --git a/src/schemas/clientError.generated.ts b/src/schemas/clientError.generated.ts index 2c301144..8fdb1038 100644 --- a/src/schemas/clientError.generated.ts +++ b/src/schemas/clientError.generated.ts @@ -26,9 +26,6 @@ export type ClientErrorCodeField = | 'item_name_invalid' | 'insufficient_scope'; export interface ClientErrorContextInfoField { - /** - * More details on the error. */ - readonly message?: string; readonly rawData?: SerializedData; } export interface ClientError { @@ -135,7 +132,7 @@ export function deserializeClientErrorCodeField( export function serializeClientErrorContextInfoField( val: ClientErrorContextInfoField ): SerializedData { - return { ['message']: val.message == void 0 ? void 0 : val.message }; + return {}; } export function deserializeClientErrorContextInfoField( val: SerializedData @@ -145,15 +142,7 @@ export function deserializeClientErrorContextInfoField( message: 'Expecting a map for "ClientErrorContextInfoField"', }); } - if (!(val.message == void 0) && !sdIsString(val.message)) { - throw new BoxSdkError({ - message: - 'Expecting string for "message" of type "ClientErrorContextInfoField"', - }); - } - const message: undefined | string = - val.message == void 0 ? void 0 : val.message; - return { message: message } satisfies ClientErrorContextInfoField; + return {} satisfies ClientErrorContextInfoField; } export function serializeClientError(val: ClientError): SerializedData { return { From 27fc24c8e3b64a02d8ef4fff3ee9a84f0657995c Mon Sep 17 00:00:00 2001 From: box-sdk-build Date: Tue, 22 Oct 2024 08:11:14 -0700 Subject: [PATCH 5/5] chore: Update .codegen.json with commit hash of codegen and openapi spec --- .codegen.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codegen.json b/.codegen.json index c67c6fe7..87dbbcd6 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "2443714", "specHash": "abd6037", "version": "1.7.0" } +{ "engineHash": "11fbad9", "specHash": "abd6037", "version": "1.7.0" }