From 5d5add4c60519f6da8f267dc3daca7149f29d7ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 19:05:59 +0000 Subject: [PATCH 1/2] feat(deps-dev): Bump @seamapi/types in the seam group Bumps the seam group with 1 update: [@seamapi/types](https://github.com/seamapi/types). Updates `@seamapi/types` from 1.819.0 to 1.844.0 - [Release notes](https://github.com/seamapi/types/releases) - [Commits](https://github.com/seamapi/types/compare/v1.819.0...v1.844.0) --- updated-dependencies: - dependency-name: "@seamapi/types" dependency-version: 1.844.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: seam ... Signed-off-by: dependabot[bot] --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9c0eb19e..e69993ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^0.52.2", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.819.0", + "@seamapi/types": "1.844.0", "@swc/core": "^1.11.29", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", @@ -1405,9 +1405,9 @@ "license": "MIT" }, "node_modules/@seamapi/types": { - "version": "1.819.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.819.0.tgz", - "integrity": "sha512-CQTtEL2BzlP290k1wB1D358wmMTXcamhp8E5hSZWs5kbIyU+rk5Pin6az9jx3ediUHltnDsxTWUKs7nxV6wMfg==", + "version": "1.844.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.844.0.tgz", + "integrity": "sha512-QgWKGnllQLQFzxCknJnhBhr35cfyOyVhUQc1DdzZLa/X3Lh12s4BM8s9bp2fxWVFLcVmAHXqtOM/Meg+B4h3sw==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 91834a80..7b869bf0 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "@seamapi/blueprint": "^0.52.2", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.819.0", + "@seamapi/types": "1.844.0", "@swc/core": "^1.11.29", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", From e02d8224eb45cfdfe4b1773eea51ac02c51c74d5 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Tue, 19 May 2026 19:07:10 +0000 Subject: [PATCH 2/2] ci: Generate code --- package-lock.json | 2 +- package.json | 2 +- .../connect/routes/seam-http-endpoints.ts | 28 +++ .../seam/customer/v1/connectors/connectors.ts | 8 + .../external-sites/external-sites.ts | 214 ++++++++++++++++++ .../v1/connectors/external-sites/index.ts | 6 + .../seam/customer/v1/connectors/index.ts | 1 + 7 files changed, 259 insertions(+), 2 deletions(-) create mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts create mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts diff --git a/package-lock.json b/package-lock.json index e69993ac..a83f15c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,7 +49,7 @@ "npm": ">=10.9.4" }, "peerDependencies": { - "@seamapi/types": "^1.819.0" + "@seamapi/types": "^1.844.0" }, "peerDependenciesMeta": { "@seamapi/types": { diff --git a/package.json b/package.json index 7b869bf0..309c2ba2 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "npm": ">=10.9.4" }, "peerDependencies": { - "@seamapi/types": "^1.819.0" + "@seamapi/types": "^1.844.0" }, "peerDependenciesMeta": { "@seamapi/types": { diff --git a/src/lib/seam/connect/routes/seam-http-endpoints.ts b/src/lib/seam/connect/routes/seam-http-endpoints.ts index 935eeca5..57f6daaa 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints.ts @@ -647,6 +647,12 @@ import { type SeamCustomerV1ConnectorCustomersListRequest, SeamHttpSeamCustomerV1ConnectorCustomers, } from './seam/customer/v1/connector-customers/index.js' +import { + type SeamCustomerV1ConnectorsExternalSitesListOptions, + type SeamCustomerV1ConnectorsExternalSitesListParameters, + type SeamCustomerV1ConnectorsExternalSitesListRequest, + SeamHttpSeamCustomerV1ConnectorsExternalSites, +} from './seam/customer/v1/connectors/external-sites/index.js' import { type SeamCustomerV1ConnectorsIcalValidateConfigOptions, type SeamCustomerV1ConnectorsIcalValidateConfigParameters, @@ -3552,6 +3558,27 @@ export class SeamHttpEndpoints { } } + get '/seam/customer/v1/connectors/external_sites/list'(): ( + parameters?: SeamCustomerV1ConnectorsExternalSitesListParameters, + options?: SeamCustomerV1ConnectorsExternalSitesListOptions, + ) => SeamCustomerV1ConnectorsExternalSitesListRequest { + const { client, defaults } = this + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } + return function seamCustomerV1ConnectorsExternalSitesList( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient( + client, + defaults, + ) + return seam.list(...args) + } + } + get '/seam/customer/v1/connectors/ical/validate-config'(): ( parameters?: SeamCustomerV1ConnectorsIcalValidateConfigParameters, options?: SeamCustomerV1ConnectorsIcalValidateConfigOptions, @@ -5221,6 +5248,7 @@ export type SeamHttpEndpointQueryPaths = | '/seam/customer/v1/connectors/authorize' | '/seam/customer/v1/connectors/connector_types' | '/seam/customer/v1/connectors/list' + | '/seam/customer/v1/connectors/external_sites/list' | '/seam/customer/v1/customers/automations/get' | '/seam/customer/v1/customers/list' | '/seam/customer/v1/customers/me' 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 f73752db..f3845800 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 @@ -40,6 +40,7 @@ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' import type { SetNonNullable } from 'lib/types.js' +import { SeamHttpSeamCustomerV1ConnectorsExternalSites } from './external-sites/index.js' import { SeamHttpSeamCustomerV1ConnectorsIcal } from './ical/index.js' export class SeamHttpSeamCustomerV1Connectors { @@ -177,6 +178,13 @@ export class SeamHttpSeamCustomerV1Connectors { await clientSessions.get() } + get externalSites(): SeamHttpSeamCustomerV1ConnectorsExternalSites { + return SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient( + this.client, + this.defaults, + ) + } + get ical(): SeamHttpSeamCustomerV1ConnectorsIcal { return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient( this.client, diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts b/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts new file mode 100644 index 00000000..d226ce4c --- /dev/null +++ b/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts @@ -0,0 +1,214 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file or add other files to this directory. + */ + +import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' + +import { seamApiLtsVersion } from 'lib/lts-version.js' +import { + getAuthHeadersForClientSessionToken, + warnOnInsecureuserIdentifierKey, +} from 'lib/seam/connect/auth.js' +import { type Client, createClient } from 'lib/seam/connect/client.js' +import { + isSeamHttpOptionsWithApiKey, + isSeamHttpOptionsWithClient, + isSeamHttpOptionsWithClientSessionToken, + isSeamHttpOptionsWithConsoleSessionToken, + isSeamHttpOptionsWithPersonalAccessToken, + type SeamHttpFromPublishableKeyOptions, + SeamHttpInvalidOptionsError, + type SeamHttpOptions, + type SeamHttpOptionsWithApiKey, + type SeamHttpOptionsWithClient, + type SeamHttpOptionsWithClientSessionToken, + type SeamHttpOptionsWithConsoleSessionToken, + type SeamHttpOptionsWithPersonalAccessToken, + type SeamHttpRequestOptions, +} from 'lib/seam/connect/options.js' +import { + limitToSeamHttpRequestOptions, + parseOptions, +} from 'lib/seam/connect/parse-options.js' +import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' +import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' +import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' +import type { SetNonNullable } from 'lib/types.js' + +export class SeamHttpSeamCustomerV1ConnectorsExternalSites { + client: Client + readonly defaults: Required + readonly ltsVersion = seamApiLtsVersion + static ltsVersion = seamApiLtsVersion + + 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) + } + + static fromClient( + client: SeamHttpOptionsWithClient['client'], + options: Omit = {}, + ): SeamHttpSeamCustomerV1ConnectorsExternalSites { + const constructorOptions = { ...options, client } + if (!isSeamHttpOptionsWithClient(constructorOptions)) { + throw new SeamHttpInvalidOptionsError('Missing client') + } + return new SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions) + } + + static fromApiKey( + apiKey: SeamHttpOptionsWithApiKey['apiKey'], + options: Omit = {}, + ): SeamHttpSeamCustomerV1ConnectorsExternalSites { + const constructorOptions = { ...options, apiKey } + if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { + throw new SeamHttpInvalidOptionsError('Missing apiKey') + } + return new SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions) + } + + static fromClientSessionToken( + clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], + options: Omit< + SeamHttpOptionsWithClientSessionToken, + 'clientSessionToken' + > = {}, + ): SeamHttpSeamCustomerV1ConnectorsExternalSites { + const constructorOptions = { ...options, clientSessionToken } + if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { + throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') + } + return new SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions) + } + + static async fromPublishableKey( + publishableKey: string, + userIdentifierKey: string, + options: SeamHttpFromPublishableKeyOptions = {}, + ): Promise { + warnOnInsecureuserIdentifierKey(userIdentifierKey) + const clientOptions = parseOptions({ ...options, publishableKey }) + if (isSeamHttpOptionsWithClient(clientOptions)) { + throw new SeamHttpInvalidOptionsError( + 'The client option cannot be used with SeamHttpSeamCustomerV1ConnectorsExternalSites.fromPublishableKey', + ) + } + const client = createClient(clientOptions) + const clientSessions = SeamHttpClientSessions.fromClient(client) + const { token } = await clientSessions.getOrCreate({ + user_identifier_key: userIdentifierKey, + }) + return SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClientSessionToken( + token, + options, + ) + } + + static fromConsoleSessionToken( + consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], + workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], + options: Omit< + SeamHttpOptionsWithConsoleSessionToken, + 'consoleSessionToken' | 'workspaceId' + > = {}, + ): SeamHttpSeamCustomerV1ConnectorsExternalSites { + const constructorOptions = { ...options, consoleSessionToken, workspaceId } + if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { + throw new SeamHttpInvalidOptionsError( + 'Missing consoleSessionToken or workspaceId', + ) + } + return new SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions) + } + + static fromPersonalAccessToken( + personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], + workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], + options: Omit< + SeamHttpOptionsWithPersonalAccessToken, + 'personalAccessToken' | 'workspaceId' + > = {}, + ): SeamHttpSeamCustomerV1ConnectorsExternalSites { + const constructorOptions = { ...options, personalAccessToken, workspaceId } + if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { + throw new SeamHttpInvalidOptionsError( + 'Missing personalAccessToken or workspaceId', + ) + } + return new SeamHttpSeamCustomerV1ConnectorsExternalSites(constructorOptions) + } + + createPaginator( + request: SeamHttpRequest, + ): SeamPaginator { + return new SeamPaginator(this, request) + } + + async updateClientSessionToken( + clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], + ): Promise { + const { headers } = this.client.defaults + const authHeaders = getAuthHeadersForClientSessionToken({ + clientSessionToken, + }) + for (const key of Object.keys(authHeaders)) { + if (headers[key] == null) { + throw new Error( + 'Cannot update a clientSessionToken on a client created without a clientSessionToken', + ) + } + } + this.client.defaults.headers = { ...headers, ...authHeaders } + const clientSessions = SeamHttpClientSessions.fromClient(this.client) + await clientSessions.get() + } + + list( + parameters?: SeamCustomerV1ConnectorsExternalSitesListParameters, + options: SeamCustomerV1ConnectorsExternalSitesListOptions = {}, + ): SeamCustomerV1ConnectorsExternalSitesListRequest { + if (!this.defaults.isUndocumentedApiEnabled) { + throw new Error( + 'Cannot use undocumented API without isUndocumentedApiEnabled', + ) + } + return new SeamHttpRequest(this, { + pathname: '/seam/customer/v1/connectors/external_sites/list', + method: 'POST', + body: parameters, + responseKey: 'external_sites', + options, + }) + } +} + +export type SeamCustomerV1ConnectorsExternalSitesListParameters = + RouteRequestBody<'/seam/customer/v1/connectors/external_sites/list'> + +/** + * @deprecated Use SeamCustomerV1ConnectorsExternalSitesListParameters instead. + */ +export type SeamCustomerV1ConnectorsExternalSitesListParams = + SeamCustomerV1ConnectorsExternalSitesListParameters + +/** + * @deprecated Use SeamCustomerV1ConnectorsExternalSitesListRequest instead. + */ +export type SeamCustomerV1ConnectorsExternalSitesListResponse = SetNonNullable< + Required> +> + +export type SeamCustomerV1ConnectorsExternalSitesListRequest = SeamHttpRequest< + SeamCustomerV1ConnectorsExternalSitesListResponse, + 'external_sites' +> + +export interface SeamCustomerV1ConnectorsExternalSitesListOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts new file mode 100644 index 00000000..82756159 --- /dev/null +++ b/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts @@ -0,0 +1,6 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file or add other files to this directory. + */ + +export * from './external-sites.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts index 08e965a8..5c96db36 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts @@ -4,4 +4,5 @@ */ export * from './connectors.js' +export * from './external-sites/index.js' export * from './ical/index.js'