diff --git a/package-lock.json b/package-lock.json index 124b2626..be490e5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^0.51.1", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.625.0", + "@seamapi/types": "1.626.0", "@swc/core": "^1.11.29", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^22.15.21", @@ -49,7 +49,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "^1.625.0" + "@seamapi/types": "^1.626.0" }, "peerDependenciesMeta": { "@seamapi/types": { @@ -1371,9 +1371,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.625.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.625.0.tgz", - "integrity": "sha512-NXY0AWqNUz/z+UGPHFpNgcFj37jaHJ4yuYInWisy43B23oIX1u+XYQo2Gm5/z9UrDrnsYW78op1l0/xaSohBtg==", + "version": "1.626.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.626.0.tgz", + "integrity": "sha512-Oo73aXaUjT9w2g2zB2J5uk1lgVmaPBanHpb4i7iEMopEJoymBU7DaBtMuismSqlbhDqglhQR4Yrwwd8MyjvPoA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 63502a67..abb9d5fe 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "^1.625.0" + "@seamapi/types": "^1.626.0" }, "peerDependenciesMeta": { "@seamapi/types": { @@ -102,7 +102,7 @@ "@seamapi/blueprint": "^0.51.1", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.625.0", + "@seamapi/types": "1.626.0", "@swc/core": "^1.11.29", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^22.15.21", diff --git a/src/lib/seam/connect/routes/seam-http-endpoints.ts b/src/lib/seam/connect/routes/seam-http-endpoints.ts index c4603292..2b1f6904 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints.ts @@ -3159,6 +3159,11 @@ export class SeamHttpEndpoints { options?: SeamCustomerV1ConnectorsSyncOptions, ) => SeamCustomerV1ConnectorsSyncRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function seamCustomerV1ConnectorsSync( ...args: Parameters ): ReturnType { @@ -3286,6 +3291,11 @@ export class SeamHttpEndpoints { options?: SeamCustomerV1SpacesCreateOptions, ) => SeamCustomerV1SpacesCreateRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function seamCustomerV1SpacesCreate( ...args: Parameters ): ReturnType { @@ -3299,6 +3309,11 @@ export class SeamHttpEndpoints { options?: SeamCustomerV1SpacesListOptions, ) => SeamCustomerV1SpacesListRequest { const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return function seamCustomerV1SpacesList( ...args: Parameters ): ReturnType { diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts b/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts index 857f75d4..159e3be8 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts @@ -48,6 +48,11 @@ export class SeamHttpSeamCustomerV1Connectors { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) + if (!options.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } @@ -210,6 +215,11 @@ export class SeamHttpSeamCustomerV1Connectors { parameters?: SeamCustomerV1ConnectorsSyncParameters, options: SeamCustomerV1ConnectorsSyncOptions = {}, ): SeamCustomerV1ConnectorsSyncRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/seam/customer/v1/connectors/sync', method: 'POST', diff --git a/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts b/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts index b07a2eaf..8b8f6311 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts @@ -44,6 +44,11 @@ export class SeamHttpSeamCustomerV1Spaces { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) + if (!options.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } @@ -167,6 +172,11 @@ export class SeamHttpSeamCustomerV1Spaces { parameters?: SeamCustomerV1SpacesCreateParameters, options: SeamCustomerV1SpacesCreateOptions = {}, ): SeamCustomerV1SpacesCreateRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/seam/customer/v1/spaces/create', method: 'POST', @@ -180,6 +190,11 @@ export class SeamHttpSeamCustomerV1Spaces { parameters?: SeamCustomerV1SpacesListParameters, options: SeamCustomerV1SpacesListOptions = {}, ): SeamCustomerV1SpacesListRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } return new SeamHttpRequest(this, { pathname: '/seam/customer/v1/spaces/list', method: 'POST', diff --git a/src/lib/seam/connect/routes/seam/customer/v1/v1.ts b/src/lib/seam/connect/routes/seam/customer/v1/v1.ts index 7eee0453..bf38ef4a 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/v1.ts @@ -51,6 +51,11 @@ export class SeamHttpSeamCustomerV1 { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) + if (!options.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) }