From 327ab32f7a16193564091044c21a935325756ade Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 17:25:42 -0500 Subject: [PATCH 01/17] feat: Remove undocumented APIs --- README.md | 13 --- codegen/layouts/endpoints.hbs | 5 - .../partials/route-class-endpoint-export.hbs | 2 +- .../layouts/partials/route-class-endpoint.hbs | 5 - .../layouts/partials/route-class-methods.hbs | 5 - codegen/layouts/partials/route-imports.hbs | 6 +- codegen/lib/layouts/route.ts | 18 +--- codegen/smith.ts | 2 +- src/lib/seam/connect/options.ts | 1 - src/lib/seam/connect/parse-options.ts | 2 - test/seam/connect/undocumented.test.ts | 96 ------------------- 11 files changed, 7 insertions(+), 148 deletions(-) delete mode 100644 test/seam/connect/undocumented.test.ts diff --git a/README.md b/README.md index a7218b3d..85b15692 100644 --- a/README.md +++ b/README.md @@ -524,19 +524,6 @@ const seam = new SeamHttpEndpoints() const devices = await seam['/devices/list']() ``` -#### Enable undocumented API - -Pass the `isUndocumentedApiEnabled` option to allow using the undocumented API. -This API is used internally and is not directly supported. -Do not use the undocumented API in production environments. -Seam is not responsible for any issues you may encounter with the undocumented API. - -```ts -import { SeamHttp } from '@seamapi/http' - -const seam = new SeamHttp({ isUndocumentedApiEnabled: true }) -``` - #### Inspecting the Request All client methods return an instance of `SeamHttpRequest`. diff --git a/codegen/layouts/endpoints.hbs b/codegen/layouts/endpoints.hbs index 0dfb08f6..55c24bf8 100644 --- a/codegen/layouts/endpoints.hbs +++ b/codegen/layouts/endpoints.hbs @@ -26,11 +26,6 @@ export class {{className}} { get['{{path}}'](): {{> endpont-method-signature isFnType=true }} { const { client, defaults } = this - {{#if isUndocumented}} - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error('Cannot use undocumented API without isUndocumentedApiEnabled') - } - {{/if}} return function {{functionName}} (...args: Parameters<{{className}}['{{methodName}}']>): ReturnType<{{className}}['{{methodName}}']> { const seam = {{className}}.fromClient(client, defaults) diff --git a/codegen/layouts/partials/route-class-endpoint-export.hbs b/codegen/layouts/partials/route-class-endpoint-export.hbs index c03e1f1d..d55f3799 100644 --- a/codegen/layouts/partials/route-class-endpoint-export.hbs +++ b/codegen/layouts/partials/route-class-endpoint-export.hbs @@ -1,4 +1,4 @@ -export type {{parametersTypeName}} = {{#if isUndocumented}}RouteRequest{{requestFormatSuffix}}<'{{path}}'>{{else}}{{> request-object parameters=parameters}}{{/if}} +export type {{parametersTypeName}} = {{> request-object parameters=parameters}} /** * @deprecated Use {{parametersTypeName}} instead. diff --git a/codegen/layouts/partials/route-class-endpoint.hbs b/codegen/layouts/partials/route-class-endpoint.hbs index b21e05c8..f0c7bd28 100644 --- a/codegen/layouts/partials/route-class-endpoint.hbs +++ b/codegen/layouts/partials/route-class-endpoint.hbs @@ -1,11 +1,6 @@ {{methodName}} {{> endpont-method-signature }} { - {{#if isUndocumented}} - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error('Cannot use undocumented API without isUndocumentedApiEnabled') - } - {{/if}} return new SeamHttpRequest(this, { pathname: '{{path}}', method: '{{method}}', diff --git a/codegen/layouts/partials/route-class-methods.hbs b/codegen/layouts/partials/route-class-methods.hbs index 9a03faaa..f67a9208 100644 --- a/codegen/layouts/partials/route-class-methods.hbs +++ b/codegen/layouts/partials/route-class-methods.hbs @@ -5,11 +5,6 @@ static ltsVersion = seamApiLtsVersion constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) - {{#if isUndocumented}} - if (!options.isUndocumentedApiEnabled) { - throw new Error('Cannot use undocumented API without isUndocumentedApiEnabled') - } - {{/if}} this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } diff --git a/codegen/layouts/partials/route-imports.hbs b/codegen/layouts/partials/route-imports.hbs index c5547b13..1a1e43ac 100644 --- a/codegen/layouts/partials/route-imports.hbs +++ b/codegen/layouts/partials/route-imports.hbs @@ -1,10 +1,6 @@ import { seamApiLtsVersion } from 'lib/lts-version.js' {{#if hasLegacyTypes}} -import type { - RouteRequestBody, - RouteRequestParams, - RouteResponse, -} from '@seamapi/types/connect' +import type { RouteResponse } from '@seamapi/types/connect' {{/if}} {{#each resourceTypeImports}} import type { {{typeName}} } from 'lib/seam/connect/resources/{{fileName}}' diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 36fa4755..226d5085 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -6,7 +6,6 @@ import { getResourceTypeName } from './resources.js' export interface RouteLayoutContext { className: string - isUndocumented: boolean endpoints: EndpointLayoutContext[] subroutes: SubrouteLayoutContext[] skipClientSessionImport: boolean @@ -29,13 +28,11 @@ export interface EndpointLayoutContext { parametersTypeName: string legacyRequestTypeName: string responseTypeName: string - requestFormatSuffix: string optionsTypeName: string requestTypeName: string returnsActionAttempt: boolean returnsVoid: boolean isOptionalParamsOk: boolean - isUndocumented: boolean usesLegacyResponseType: boolean parameters: Parameter[] responseIsList: boolean @@ -59,16 +56,14 @@ export const setRouteLayoutContext = ( nodes: Array, ): void => { file.className = getClassName(node?.path ?? null) - file.isUndocumented = node?.isUndocumented ?? false file.skipClientSessionImport = node == null || node?.path === '/client_sessions' file.hasLegacyTypes = node != null && 'endpoints' in node ? node.endpoints.some( (endpoint) => - endpoint.isUndocumented || - (endpoint.response.responseType === 'resource' && - endpoint.response.resourceType === 'action_attempt'), + endpoint.response.responseType === 'resource' && + endpoint.response.resourceType === 'action_attempt', ) : false file.resourceTypeImports = @@ -77,7 +72,6 @@ export const setRouteLayoutContext = ( ...new Set( node.endpoints.flatMap((endpoint) => { if ( - endpoint.isUndocumented || endpoint.response.responseType === 'void' || (endpoint.response.responseType === 'resource' && endpoint.response.resourceType === 'action_attempt') @@ -107,7 +101,7 @@ export const setRouteLayoutContext = ( } const getSubrouteLayoutContext = ( - route: Pick, + route: Pick, ): SubrouteLayoutContext => { return { fileName: `${kebabCase(route.name)}/index.js`, @@ -134,8 +128,6 @@ export const getEndpointLayoutContext = ( ? 'params' : 'body' - const requestFormatSuffix = pascalCase(requestFormat) - const returnsActionAttempt = endpoint.response.responseType === 'resource' && endpoint.response.resourceType === 'action_attempt' @@ -149,7 +141,6 @@ export const getEndpointLayoutContext = ( method: endpoint.request.preferredMethod, className: getClassName(route.path), requestFormat, - requestFormatSuffix, returnsActionAttempt, parametersTypeName: `${prefix}Parameters`, legacyRequestTypeName: `${prefix}${pascalCase(legacyMethodParamName)}`, @@ -159,8 +150,7 @@ export const getEndpointLayoutContext = ( isOptionalParamsOk: endpoint.request.parameters.every( (parameter) => !parameter.isRequired, ), - isUndocumented: endpoint.isUndocumented, - usesLegacyResponseType: endpoint.isUndocumented || returnsActionAttempt, + usesLegacyResponseType: returnsActionAttempt, parameters: endpoint.request.parameters, responseIsList: endpoint.response.responseType === 'resource_list', responseResourceTypeName: diff --git a/codegen/smith.ts b/codegen/smith.ts index bf8950bb..3bda151b 100644 --- a/codegen/smith.ts +++ b/codegen/smith.ts @@ -22,7 +22,7 @@ Metalsmith(rootDir) .source('./content') .destination('../') .clean(false) - .use(blueprint({ types })) + .use(blueprint({ types, omitUndocumented: true })) .use(connect) .use( layouts({ diff --git a/src/lib/seam/connect/options.ts b/src/lib/seam/connect/options.ts index 7b1104d2..2594ceca 100644 --- a/src/lib/seam/connect/options.ts +++ b/src/lib/seam/connect/options.ts @@ -22,7 +22,6 @@ interface SeamHttpCommonOptions extends ClientOptions, SeamHttpRequestOptions { export interface SeamHttpRequestOptions { waitForActionAttempt?: boolean | ResolveActionAttemptOptions - isUndocumentedApiEnabled?: boolean } export interface SeamHttpFromPublishableKeyOptions extends SeamHttpCommonOptions {} diff --git a/src/lib/seam/connect/parse-options.ts b/src/lib/seam/connect/parse-options.ts index 65c4755d..4c94b620 100644 --- a/src/lib/seam/connect/parse-options.ts +++ b/src/lib/seam/connect/parse-options.ts @@ -64,7 +64,6 @@ const getNormalizedOptions = ( : apiKeyOrOptions const requestOptions = { - isUndocumentedApiEnabled: options.isUndocumentedApiEnabled ?? false, waitForActionAttempt: options.waitForActionAttempt ?? true, } @@ -182,7 +181,6 @@ export const isSeamHttpRequestOption = ( key: string, ): key is keyof SeamHttpRequestOptions => { const keys: Record = { - isUndocumentedApiEnabled: true, waitForActionAttempt: true, } return Object.keys(keys).includes(key) diff --git a/test/seam/connect/undocumented.test.ts b/test/seam/connect/undocumented.test.ts deleted file mode 100644 index 7c6b0cfb..00000000 --- a/test/seam/connect/undocumented.test.ts +++ /dev/null @@ -1,96 +0,0 @@ -import test from 'ava' -import { AxiosError } from 'axios' -import { getTestServer } from 'fixtures/seam/connect/api.js' - -import { - SeamHttp, - SeamHttpAcsAccessGroupsUnmanaged, - SeamHttpEndpoints, -} from '@seamapi/http/connect' - -test('SeamHttp: must use isUndocumentedApiEnabled to use undocumented route', async (t) => { - const { seed, endpoint } = await getTestServer(t) - const seam = SeamHttp.fromApiKey(seed.seam_apikey1_token, { endpoint }) - t.throws(() => seam.acs.accessGroups.unmanaged, { - message: /Cannot use undocumented/, - }) - const seamUndocumented = SeamHttp.fromApiKey(seed.seam_apikey1_token, { - endpoint, - isUndocumentedApiEnabled: true, - }) - t.truthy(seamUndocumented.acs.accessGroups.unmanaged) -}) - -test('SeamHttp: must use isUndocumentedApiEnabled to use undocumented endpoint', async (t) => { - const { seed, endpoint } = await getTestServer(t) - const seam = SeamHttp.fromApiKey(seed.seam_apikey1_token, { endpoint }) - t.truthy(seam.devices) - await t.throwsAsync( - async () => { - await seam.devices.delete({ device_id: seed.august_device_1 }) - }, - { - message: /Cannot use undocumented/, - }, - ) - const seamUndocumented = SeamHttp.fromApiKey(seed.seam_apikey1_token, { - endpoint, - isUndocumentedApiEnabled: true, - }) - t.truthy(seamUndocumented.devices) - await seamUndocumented.devices.delete({ device_id: seed.august_device_1 }) - t.pass() -}) - -test('SeamHttpAcsAccessGroupsUnmanaged: must use isUndocumentedApiEnabled', async (t) => { - const { seed, endpoint } = await getTestServer(t) - t.throws( - () => { - SeamHttpAcsAccessGroupsUnmanaged.fromApiKey(seed.seam_apikey1_token, { - endpoint, - }) - }, - { message: /Cannot use undocumented/ }, - ) - t.truthy( - SeamHttpAcsAccessGroupsUnmanaged.fromApiKey(seed.seam_apikey1_token, { - endpoint, - isUndocumentedApiEnabled: true, - }), - ) -}) - -test('SeamHttpEndpoints: cannot use undocumented endpoint', async (t) => { - const { seed, endpoint } = await getTestServer(t) - const seam = SeamHttpEndpoints.fromApiKey(seed.seam_apikey1_token, { - endpoint, - }) - await t.throwsAsync( - async () => { - await seam['/acs/access_groups/unmanaged/list']() - }, - { message: /Cannot use undocumented/ }, - ) - const seamUndocumented = SeamHttpEndpoints.fromApiKey( - seed.seam_apikey1_token, - { - endpoint, - isUndocumentedApiEnabled: true, - }, - ) - await t.throwsAsync( - async () => { - await seamUndocumented['/acs/access_groups/unmanaged/list']() - }, - { - instanceOf: AxiosError, - }, - ) -}) - -test.todo( - 'SeamHttpWithoutWorkspace: must use isUndocumentedApiEnabled to use undocumented route', -) -test.todo( - 'SeamHttpWithoutWorkspace: must use isUndocumentedApiEnabled to use undocumented endpoint', -) From a0e54c993bcce59b3f15384e16119bfb938a6b05 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 27 Jul 2026 22:26:40 +0000 Subject: [PATCH 02/17] ci: Generate code --- .../connect/resources/acs-credential-pool.ts | 20 - .../acs-credential-provisioning-automation.ts | 16 - src/lib/seam/connect/resources/acs-user.ts | 1 - src/lib/seam/connect/resources/batch.ts | 4 - .../resources/bridge-client-session.ts | 51 - .../resources/bridge-connected-systems.ts | 22 - .../seam/connect/resources/connect-webview.ts | 4 - src/lib/seam/connect/resources/customer.ts | 12 - .../resources/customization-profile.ts | 27 - src/lib/seam/connect/resources/device.ts | 2 - .../resources/enrollment-automation.ts | 16 - src/lib/seam/connect/resources/event.ts | 14 - src/lib/seam/connect/resources/index.ts | 13 - src/lib/seam/connect/resources/magic-link.ts | 16 - .../seam/connect/resources/phone-session.ts | 300 --- src/lib/seam/connect/resources/space.ts | 2 - .../seam/connect/resources/staff-member.ts | 23 - .../resources/unmanaged-acs-access-group.ts | 169 -- .../resources/unmanaged-acs-credential.ts | 127 - .../connect/resources/unmanaged-acs-user.ts | 262 -- .../routes/access-codes/access-codes.ts | 44 - .../access-codes/unmanaged/unmanaged.ts | 3 - .../routes/acs/access-groups/access-groups.ts | 9 - .../connect/routes/acs/access-groups/index.ts | 1 - .../acs/access-groups/unmanaged/index.ts | 6 - .../acs/access-groups/unmanaged/unmanaged.ts | 252 -- src/lib/seam/connect/routes/acs/acs.ts | 13 - .../acs/credential-pools/credential-pools.ts | 208 -- .../routes/acs/credential-pools/index.ts | 6 - .../credential-provisioning-automations.ts | 212 -- .../index.ts | 6 - .../routes/acs/credentials/credentials.ts | 60 - .../connect/routes/acs/credentials/index.ts | 1 - .../routes/acs/credentials/unmanaged/index.ts | 6 - .../acs/credentials/unmanaged/unmanaged.ts | 256 -- src/lib/seam/connect/routes/acs/index.ts | 2 - .../seam/connect/routes/acs/users/index.ts | 1 - .../routes/acs/users/unmanaged/index.ts | 6 - .../routes/acs/users/unmanaged/unmanaged.ts | 247 -- .../seam/connect/routes/acs/users/users.ts | 6 - .../seam/connect/routes/bridges/bridges.ts | 237 -- src/lib/seam/connect/routes/bridges/index.ts | 6 - .../connect-webviews/connect-webviews.ts | 1 - .../connected-accounts/connected-accounts.ts | 2 - .../connect/routes/customers/customers.ts | 7 - .../seam/connect/routes/customers/index.ts | 1 - .../routes/customers/reservations/index.ts | 6 - .../customers/reservations/reservations.ts | 209 -- .../seam/connect/routes/devices/devices.ts | 84 - .../routes/devices/unmanaged/unmanaged.ts | 48 - src/lib/seam/connect/routes/index.ts | 3 - src/lib/seam/connect/routes/locks/locks.ts | 52 - .../routes/noise-sensors/noise-sensors.ts | 48 - .../noise-thresholds/noise-thresholds.ts | 7 - .../seam-http-endpoints-without-workspace.ts | 56 +- .../connect/routes/seam-http-endpoints.ts | 2166 +---------------- src/lib/seam/connect/routes/seam-http.ts | 10 - .../connect/routes/seam/console/console.ts | 173 -- .../seam/connect/routes/seam/console/index.ts | 7 - .../connect/routes/seam/console/v1/index.ts | 10 - .../seam/console/v1/lynx-migration/index.ts | 6 - .../v1/lynx-migration/lynx-migration.ts | 336 --- .../routes/seam/console/v1/sites/index.ts | 6 - .../routes/seam/console/v1/sites/sites.ts | 322 --- .../routes/seam/console/v1/timelines/index.ts | 6 - .../seam/console/v1/timelines/timelines.ts | 209 -- .../seam/connect/routes/seam/console/v1/v1.ts | 228 -- .../workspace/feature-flags/feature-flags.ts | 256 -- .../v1/workspace/feature-flags/index.ts | 6 - .../routes/seam/console/v1/workspace/index.ts | 6 - .../connect/routes/seam/customer/index.ts | 6 - .../v1/access-grants/access-grants.ts | 252 -- .../seam/customer/v1/access-grants/index.ts | 6 - .../v1/access-methods/access-methods.ts | 215 -- .../seam/customer/v1/access-methods/index.ts | 6 - .../v1/automation-runs/automation-runs.ts | 212 -- .../seam/customer/v1/automation-runs/index.ts | 6 - .../customer/v1/automations/automations.ts | 292 --- .../seam/customer/v1/automations/index.ts | 6 - .../connector-customers.ts | 212 -- .../customer/v1/connector-customers/index.ts | 6 - .../seam/customer/v1/connectors/connectors.ts | 473 ---- .../external-sites/external-sites.ts | 212 -- .../v1/connectors/external-sites/index.ts | 6 - .../seam/customer/v1/connectors/ical/ical.ts | 212 -- .../seam/customer/v1/connectors/ical/index.ts | 6 - .../seam/customer/v1/connectors/index.ts | 8 - .../v1/customers/automations/automations.ts | 256 -- .../v1/customers/automations/index.ts | 6 - .../seam/customer/v1/customers/customers.ts | 302 --- .../seam/customer/v1/customers/index.ts | 7 - .../seam/customer/v1/encoders/encoders.ts | 209 -- .../routes/seam/customer/v1/encoders/index.ts | 6 - .../routes/seam/customer/v1/events/events.ts | 208 -- .../routes/seam/customer/v1/events/index.ts | 6 - .../connect/routes/seam/customer/v1/index.ts | 20 - .../routes/seam/customer/v1/portals/index.ts | 6 - .../seam/customer/v1/portals/portals.ts | 248 -- .../seam/customer/v1/reservations/index.ts | 6 - .../customer/v1/reservations/reservations.ts | 292 --- .../routes/seam/customer/v1/settings/index.ts | 7 - .../seam/customer/v1/settings/settings.ts | 262 -- .../vertical-resource-aliases/index.ts | 6 - .../vertical-resource-aliases.ts | 223 -- .../routes/seam/customer/v1/spaces/index.ts | 6 - .../routes/seam/customer/v1/spaces/spaces.ts | 328 --- .../seam/customer/v1/staff-members/index.ts | 6 - .../v1/staff-members/staff-members.ts | 252 -- .../connect/routes/seam/customer/v1/v1.ts | 265 -- src/lib/seam/connect/routes/seam/index.ts | 8 - .../seam/connect/routes/seam/partner/index.ts | 6 - .../v1/building-blocks/building-blocks.ts | 179 -- .../seam/partner/v1/building-blocks/index.ts | 7 - .../v1/building-blocks/spaces/index.ts | 6 - .../v1/building-blocks/spaces/spaces.ts | 212 -- .../connect/routes/seam/partner/v1/index.ts | 6 - src/lib/seam/connect/routes/spaces/spaces.ts | 5 - .../connect/routes/thermostats/thermostats.ts | 94 +- .../building-blocks/building-blocks.ts | 335 --- .../unstable-partner/building-blocks/index.ts | 6 - .../connect/routes/unstable-partner/index.ts | 7 - .../unstable-partner/unstable-partner.ts | 176 -- .../enrollment-automations.ts | 332 --- .../enrollment-automations/index.ts | 6 - .../connect/routes/user-identities/index.ts | 1 - .../routes/user-identities/user-identities.ts | 8 - .../customization-profiles.ts | 370 --- .../customization-profiles/index.ts | 6 - .../seam/connect/routes/workspaces/index.ts | 1 - .../connect/routes/workspaces/workspaces.ts | 50 +- 130 files changed, 78 insertions(+), 13766 deletions(-) delete mode 100644 src/lib/seam/connect/resources/acs-credential-pool.ts delete mode 100644 src/lib/seam/connect/resources/acs-credential-provisioning-automation.ts delete mode 100644 src/lib/seam/connect/resources/bridge-client-session.ts delete mode 100644 src/lib/seam/connect/resources/bridge-connected-systems.ts delete mode 100644 src/lib/seam/connect/resources/customer.ts delete mode 100644 src/lib/seam/connect/resources/customization-profile.ts delete mode 100644 src/lib/seam/connect/resources/enrollment-automation.ts delete mode 100644 src/lib/seam/connect/resources/magic-link.ts delete mode 100644 src/lib/seam/connect/resources/phone-session.ts delete mode 100644 src/lib/seam/connect/resources/staff-member.ts delete mode 100644 src/lib/seam/connect/resources/unmanaged-acs-access-group.ts delete mode 100644 src/lib/seam/connect/resources/unmanaged-acs-credential.ts delete mode 100644 src/lib/seam/connect/resources/unmanaged-acs-user.ts delete mode 100644 src/lib/seam/connect/routes/acs/access-groups/unmanaged/index.ts delete mode 100644 src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts delete mode 100644 src/lib/seam/connect/routes/acs/credential-pools/credential-pools.ts delete mode 100644 src/lib/seam/connect/routes/acs/credential-pools/index.ts delete mode 100644 src/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.ts delete mode 100644 src/lib/seam/connect/routes/acs/credential-provisioning-automations/index.ts delete mode 100644 src/lib/seam/connect/routes/acs/credentials/unmanaged/index.ts delete mode 100644 src/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.ts delete mode 100644 src/lib/seam/connect/routes/acs/users/unmanaged/index.ts delete mode 100644 src/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.ts delete mode 100644 src/lib/seam/connect/routes/bridges/bridges.ts delete mode 100644 src/lib/seam/connect/routes/bridges/index.ts delete mode 100644 src/lib/seam/connect/routes/customers/reservations/index.ts delete mode 100644 src/lib/seam/connect/routes/customers/reservations/reservations.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/console.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/lynx-migration/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/lynx-migration/lynx-migration.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/sites/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/timelines/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/v1.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/console/v1/workspace/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/access-grants/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/access-methods/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/automations/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/customers/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/events/events.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/events/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/portals/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/reservations/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/reservations/reservations.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/settings/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/spaces/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/staff-members/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts delete mode 100644 src/lib/seam/connect/routes/seam/customer/v1/v1.ts delete mode 100644 src/lib/seam/connect/routes/seam/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/partner/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.ts delete mode 100644 src/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.ts delete mode 100644 src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts delete mode 100644 src/lib/seam/connect/routes/seam/partner/v1/index.ts delete mode 100644 src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts delete mode 100644 src/lib/seam/connect/routes/unstable-partner/building-blocks/index.ts delete mode 100644 src/lib/seam/connect/routes/unstable-partner/index.ts delete mode 100644 src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts delete mode 100644 src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts delete mode 100644 src/lib/seam/connect/routes/user-identities/enrollment-automations/index.ts delete mode 100644 src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts delete mode 100644 src/lib/seam/connect/routes/workspaces/customization-profiles/index.ts diff --git a/src/lib/seam/connect/resources/acs-credential-pool.ts b/src/lib/seam/connect/resources/acs-credential-pool.ts deleted file mode 100644 index 55422d7d..00000000 --- a/src/lib/seam/connect/resources/acs-credential-pool.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type AcsCredentialPoolResource = { - acs_credential_pool_id: string - - acs_system_id: string - - created_at: string - - display_name: string - - external_type: 'hid_part_number' - - external_type_display_name: string - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/acs-credential-provisioning-automation.ts b/src/lib/seam/connect/resources/acs-credential-provisioning-automation.ts deleted file mode 100644 index d692f0c0..00000000 --- a/src/lib/seam/connect/resources/acs-credential-provisioning-automation.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type AcsCredentialProvisioningAutomationResource = { - acs_credential_provisioning_automation_id: string - - created_at: string - - credential_manager_acs_system_id: string - - user_identity_id: string - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/acs-user.ts b/src/lib/seam/connect/resources/acs-user.ts index fb0d8ec1..263d5a5c 100644 --- a/src/lib/seam/connect/resources/acs-user.ts +++ b/src/lib/seam/connect/resources/acs-user.ts @@ -84,7 +84,6 @@ export type AcsUserResource = { is_managed: boolean is_suspended?: boolean | undefined - last_successful_sync_at: string | null pending_mutations?: | Array< | { diff --git a/src/lib/seam/connect/resources/batch.ts b/src/lib/seam/connect/resources/batch.ts index 6ae4bed3..9d6ae5b3 100644 --- a/src/lib/seam/connect/resources/batch.ts +++ b/src/lib/seam/connect/resources/batch.ts @@ -17,7 +17,6 @@ export type BatchResource = { client_sessions?: Record | undefined connect_webviews?: Record | undefined connected_accounts?: Record | undefined - customization_profiles?: Record | undefined devices?: Record | undefined events?: Record | undefined instant_keys?: Record | undefined @@ -26,9 +25,6 @@ export type BatchResource = { thermostat_daily_programs?: Record | undefined thermostat_schedules?: Record | undefined unmanaged_access_codes?: Record | undefined - unmanaged_acs_access_groups?: Record | undefined - unmanaged_acs_credentials?: Record | undefined - unmanaged_acs_users?: Record | undefined unmanaged_devices?: Record | undefined user_identities?: Record | undefined workspaces?: Record | undefined diff --git a/src/lib/seam/connect/resources/bridge-client-session.ts b/src/lib/seam/connect/resources/bridge-client-session.ts deleted file mode 100644 index af0f467b..00000000 --- a/src/lib/seam/connect/resources/bridge-client-session.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type BridgeClientSessionResource = { - bridge_client_machine_identifier_key: string - - bridge_client_name: string - - bridge_client_session_id: string - - bridge_client_session_token: string - - bridge_client_time_zone: string - - created_at: string - - errors: Array< - | { - can_tailscale_proxy_reach_bridge: boolean | null - can_tailscale_proxy_reach_tailscale_network: boolean | null - created_at: string - - error_code: 'bridge_lan_unreachable' - - is_bridge_socks_server_healthy: boolean | null - is_tailscale_proxy_reachable: boolean | null - is_tailscale_proxy_socks_server_healthy: boolean | null - message: string - } - | { - created_at: string - - error_code: 'no_communication_from_bridge' - - message: string - } - > - - pairing_code: string - - pairing_code_expires_at: string - - tailscale_auth_key: string | null - tailscale_hostname: string - - telemetry_token: string | null - telemetry_token_expires_at: string | null - telemetry_url: string | null -} diff --git a/src/lib/seam/connect/resources/bridge-connected-systems.ts b/src/lib/seam/connect/resources/bridge-connected-systems.ts deleted file mode 100644 index dd04ca60..00000000 --- a/src/lib/seam/connect/resources/bridge-connected-systems.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type BridgeConnectedSystemsResource = { - acs_system_display_name: string - - acs_system_id: string - - bridge_created_at: string - - bridge_id: string - - connected_account_created_at: string - - connected_account_id: string - - workspace_display_name: string - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/connect-webview.ts b/src/lib/seam/connect/resources/connect-webview.ts index c36118a7..e953d0a0 100644 --- a/src/lib/seam/connect/resources/connect-webview.ts +++ b/src/lib/seam/connect/resources/connect-webview.ts @@ -8,12 +8,8 @@ export type ConnectWebviewResource = { 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > - accepted_devices: Array - accepted_providers: Array - any_device_allowed: boolean - any_provider_allowed: boolean authorized_at: string | null diff --git a/src/lib/seam/connect/resources/customer.ts b/src/lib/seam/connect/resources/customer.ts deleted file mode 100644 index 2c0783cf..00000000 --- a/src/lib/seam/connect/resources/customer.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type CustomerResource = { - created_at: string - - customer_key: string - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/customization-profile.ts b/src/lib/seam/connect/resources/customization-profile.ts deleted file mode 100644 index 3f4322ca..00000000 --- a/src/lib/seam/connect/resources/customization-profile.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type CustomizationProfileResource = { - created_at: string - - customer_portal_theme?: - | { - font_family?: string | undefined - mono_font_family?: string | undefined - primary_color?: string | undefined - primary_foreground_color?: string | undefined - secondary_color?: string | undefined - secondary_foreground_color?: string | undefined - } - | undefined - customization_profile_id: string - - logo_url?: string | undefined - message_overrides?: Record | undefined - name: string | null - primary_color?: string | undefined - secondary_color?: string | undefined - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/device.ts b/src/lib/seam/connect/resources/device.ts index 95eaa3d8..187ef3ee 100644 --- a/src/lib/seam/connect/resources/device.ts +++ b/src/lib/seam/connect/resources/device.ts @@ -704,8 +704,6 @@ export type DeviceResource = { product_type?: string | undefined } | undefined - _experimental_supported_code_from_access_codes_lengths?: - Array | undefined auto_lock_delay_seconds?: number | undefined auto_lock_enabled?: boolean | undefined backup_access_code_pool_enabled?: boolean | undefined diff --git a/src/lib/seam/connect/resources/enrollment-automation.ts b/src/lib/seam/connect/resources/enrollment-automation.ts deleted file mode 100644 index 57c01f80..00000000 --- a/src/lib/seam/connect/resources/enrollment-automation.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type EnrollmentAutomationResource = { - created_at: string - - credential_manager_acs_system_id: string - - enrollment_automation_id: string - - user_identity_id: string - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/event.ts b/src/lib/seam/connect/resources/event.ts index 8689893e..65362444 100644 --- a/src/lib/seam/connect/resources/event.ts +++ b/src/lib/seam/connect/resources/event.ts @@ -2657,20 +2657,6 @@ export type EventResource = | { created_at: string - enrollment_automation_id: string - - event_description?: string | undefined - event_id: string - - event_type: 'enrollment_automation.deleted' - - occurred_at: string - - workspace_id: string - } - | { - created_at: string - device_custom_metadata?: Record | undefined device_id: string diff --git a/src/lib/seam/connect/resources/index.ts b/src/lib/seam/connect/resources/index.ts index 1ce61559..a9bde99f 100644 --- a/src/lib/seam/connect/resources/index.ts +++ b/src/lib/seam/connect/resources/index.ts @@ -8,40 +8,27 @@ export type { AccessGrantResource } from './access-grant.js' export type { AccessMethodResource } from './access-method.js' export type { AcsAccessGroupResource } from './acs-access-group.js' export type { AcsCredentialResource } from './acs-credential.js' -export type { AcsCredentialPoolResource } from './acs-credential-pool.js' -export type { AcsCredentialProvisioningAutomationResource } from './acs-credential-provisioning-automation.js' export type { AcsEncoderResource } from './acs-encoder.js' export type { AcsEntranceResource } from './acs-entrance.js' export type { AcsSystemResource } from './acs-system.js' export type { AcsUserResource } from './acs-user.js' export type { ActionAttemptResource } from './action-attempt.js' export type { BatchResource } from './batch.js' -export type { BridgeClientSessionResource } from './bridge-client-session.js' -export type { BridgeConnectedSystemsResource } from './bridge-connected-systems.js' export type { ClientSessionResource } from './client-session.js' export type { ConnectWebviewResource } from './connect-webview.js' export type { ConnectedAccountResource } from './connected-account.js' -export type { CustomerResource } from './customer.js' export type { CustomerPortalResource } from './customer-portal.js' -export type { CustomizationProfileResource } from './customization-profile.js' export type { DeviceResource } from './device.js' export type { DeviceProviderResource } from './device-provider.js' -export type { EnrollmentAutomationResource } from './enrollment-automation.js' export type { EventResource } from './event.js' export type { InstantKeyResource } from './instant-key.js' -export type { MagicLinkResource } from './magic-link.js' export type { NoiseThresholdResource } from './noise-threshold.js' export type { PhoneResource } from './phone.js' -export type { PhoneSessionResource } from './phone-session.js' export type { SpaceResource } from './space.js' -export type { StaffMemberResource } from './staff-member.js' export type { ThermostatDailyProgramResource } from './thermostat-daily-program.js' export type { ThermostatScheduleResource } from './thermostat-schedule.js' export type { UnknownResource } from './unknown.js' export type { UnmanagedAccessCodeResource } from './unmanaged-access-code.js' -export type { UnmanagedAcsAccessGroupResource } from './unmanaged-acs-access-group.js' -export type { UnmanagedAcsCredentialResource } from './unmanaged-acs-credential.js' -export type { UnmanagedAcsUserResource } from './unmanaged-acs-user.js' export type { UnmanagedDeviceResource } from './unmanaged-device.js' export type { UserIdentityResource } from './user-identity.js' export type { WebhookResource } from './webhook.js' diff --git a/src/lib/seam/connect/resources/magic-link.ts b/src/lib/seam/connect/resources/magic-link.ts deleted file mode 100644 index 1f785ba3..00000000 --- a/src/lib/seam/connect/resources/magic-link.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type MagicLinkResource = { - created_at: string - - customer_key: string - - expires_at: string - - url: string - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/phone-session.ts b/src/lib/seam/connect/resources/phone-session.ts deleted file mode 100644 index 88e17a9b..00000000 --- a/src/lib/seam/connect/resources/phone-session.ts +++ /dev/null @@ -1,300 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type PhoneSessionResource = { - is_sandbox_workspace: boolean - - provider_sessions: Array<{ - acs_credentials: Array<{ - access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' - - acs_credential_id: string | null - acs_credential_pool_id?: string | undefined - acs_entrances: Array<{ - acs_entrance_id: string - - acs_system_id: string - - akiles_metadata?: - | { - actions?: - | Array<{ - id?: string | undefined - name?: string | undefined - }> - | undefined - gadget_id?: string | undefined - site_id?: string | undefined - site_name?: string | undefined - } - | undefined - assa_abloy_vostio_metadata?: - | { - door_name?: string | undefined - door_number?: number | undefined - door_type?: - | 'CommonDoor' - | 'EntranceDoor' - | 'GuestDoor' - | 'Elevator' - | undefined - pms_id?: string | undefined - stand_open?: boolean | undefined - } - | undefined - avigilon_alta_metadata?: - | { - entry_name?: string | undefined - entry_relays_total_count?: number | undefined - org_name?: string | undefined - site_id?: number | undefined - site_name?: string | undefined - zone_id?: number | undefined - zone_name?: string | undefined - } - | undefined - brivo_metadata?: - | { - access_point_id?: string | undefined - site_id?: number | undefined - site_name?: string | undefined - } - | undefined - can_belong_to_reservation?: boolean | undefined - can_unlock_with_card?: boolean | undefined - can_unlock_with_cloud_key?: boolean | undefined - can_unlock_with_code?: boolean | undefined - can_unlock_with_mobile_key?: boolean | undefined - connected_account_id: string - - created_at: string - - display_name: string - - dormakaba_ambiance_metadata?: - | { - access_point_name?: string | undefined - } - | undefined - dormakaba_community_metadata?: - | { - access_point_profile?: string | undefined - } - | undefined - errors: Array<{ - created_at: string - - error_code: string - - message: string - }> - - hotek_metadata?: - | { - common_area_name?: string | undefined - common_area_number?: string | undefined - room_number?: string | undefined - } - | undefined - is_locked?: boolean | undefined - latch_metadata?: - | { - accessibility_type?: string | undefined - door_name?: string | undefined - door_type?: string | undefined - is_connected?: boolean | undefined - } - | undefined - salto_ks_metadata?: - | { - battery_level?: string | undefined - door_name?: string | undefined - intrusion_alarm?: boolean | undefined - left_open_alarm?: boolean | undefined - lock_type?: string | undefined - locked_state?: string | undefined - online?: boolean | undefined - privacy_mode?: boolean | undefined - } - | undefined - salto_space_metadata?: - | { - audit_on_keys?: boolean | undefined - door_description?: string | undefined - door_id?: string | undefined - door_name?: string | undefined - room_description?: string | undefined - room_name?: string | undefined - } - | undefined - space_ids: Array - - visionline_metadata?: - | { - door_category?: - | 'entrance' - | 'guest' - | 'elevator reader' - | 'common' - | 'common (PMS)' - | undefined - door_name?: string | undefined - profiles?: - | Array<{ - visionline_door_profile_id?: string | undefined - visionline_door_profile_type?: - 'BLE' | 'commonDoor' | 'touch' | undefined - }> - | undefined - } - | undefined - warnings: Array<{ - created_at: string - - message: string - - warning_code: - | 'salto_ks_entrance_access_code_support_removed' - | 'entrance_shares_zone' - | 'entrance_setup_required' - | 'salto_ks_privacy_mode' - | 'privacy_mode' - }> - }> - - acs_system_id: string - - acs_user_id?: string | undefined - assa_abloy_vostio_metadata?: - | { - auto_join?: boolean | undefined - door_names?: Array | undefined - endpoint_id?: string | undefined - key_id?: string | undefined - key_issuing_request_id?: string | undefined - override_guest_acs_entrance_ids?: Array | undefined - } - | undefined - card_number?: string | null | undefined - code?: string | null | undefined - connected_account_id: string - - created_at: string - - display_name: string - - ends_at?: string | undefined - errors: Array<{ - created_at: string - - error_code: string - - message: string - }> - - external_type?: - | 'pti_card' - | 'brivo_credential' - | 'hid_credential' - | 'visionline_card' - | 'salto_ks_credential' - | 'assa_abloy_vostio_key' - | 'salto_space_key' - | 'latch_access' - | 'dormakaba_ambiance_credential' - | 'hotek_card' - | 'salto_ks_tag' - | 'avigilon_alta_credential' - | 'kisi_credential' - | undefined - external_type_display_name?: string | undefined - is_issued?: boolean | undefined - is_latest_desired_state_synced_with_provider?: boolean | null | undefined - is_managed: boolean - - is_multi_phone_sync_credential?: boolean | undefined - is_one_time_use?: boolean | undefined - issued_at?: string | null | undefined - latest_desired_state_synced_with_provider_at?: string | null | undefined - parent_acs_credential_id?: string | undefined - starts_at?: string | undefined - user_identity_id?: string | undefined - visionline_metadata?: - | { - auto_join?: boolean | undefined - card_function_type?: 'guest' | 'staff' | undefined - card_id?: string | undefined - common_acs_entrance_ids?: Array | undefined - credential_id?: string | undefined - guest_acs_entrance_ids?: Array | undefined - is_valid?: boolean | undefined - joiner_acs_credential_ids?: Array | undefined - } - | undefined - warnings: Array<{ - created_at: string - - message: string - - warning_code: - | 'waiting_to_be_issued' - | 'schedule_externally_modified' - | 'schedule_modified' - | 'being_deleted' - | 'unknown_issue_with_acs_credential' - | 'needs_to_be_reissued' - }> - - workspace_id: string - }> - - phone_registration: { - is_being_activated: boolean - - phone_registration_id: string - - provider_name: string | null - } - }> - - user_identity: { - acs_user_ids: Array - - created_at: string - - display_name: string - - email_address: string | null - errors: Array<{ - acs_system_id: string - - acs_user_id: string - - created_at: string - - error_code: 'issue_with_acs_user' - - message: string - }> - - full_name: string | null - phone_number: string | null - user_identity_id: string - - user_identity_key: string | null - warnings: Array<{ - created_at: string - - message: string - - warning_code: - 'being_deleted' | 'acs_user_profile_does_not_match_user_identity' - }> - - workspace_id: string - } - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/space.ts b/src/lib/seam/connect/resources/space.ts index a7c5bfeb..539760e7 100644 --- a/src/lib/seam/connect/resources/space.ts +++ b/src/lib/seam/connect/resources/space.ts @@ -31,8 +31,6 @@ export type SpaceResource = { | undefined name: string - parent_space_id?: string | undefined - parent_space_key?: string | undefined space_id: string space_key?: string | undefined diff --git a/src/lib/seam/connect/resources/staff-member.ts b/src/lib/seam/connect/resources/staff-member.ts deleted file mode 100644 index a0edc7ab..00000000 --- a/src/lib/seam/connect/resources/staff-member.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type StaffMemberResource = { - building_keys?: Array | undefined - common_area_keys?: Array | undefined - email_address?: string | undefined - facility_keys?: Array | undefined - listing_keys?: Array | undefined - name: string - - phone_number?: string | undefined - property_keys?: Array | undefined - property_listing_keys?: Array | undefined - room_keys?: Array | undefined - site_keys?: Array | undefined - space_keys?: Array | undefined - staff_member_key: string - - unit_keys?: Array | undefined -} diff --git a/src/lib/seam/connect/resources/unmanaged-acs-access-group.ts b/src/lib/seam/connect/resources/unmanaged-acs-access-group.ts deleted file mode 100644 index 646ed692..00000000 --- a/src/lib/seam/connect/resources/unmanaged-acs-access-group.ts +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type UnmanagedAcsAccessGroupResource = { - access_group_type: - | 'pti_unit' - | 'pti_access_level' - | 'salto_ks_access_group' - | 'brivo_group' - | 'salto_space_group' - | 'dormakaba_community_access_group' - | 'dormakaba_ambiance_access_group' - | 'avigilon_alta_group' - | 'kisi_access_group' - | 'akiles_member_group' - - access_group_type_display_name: string - - access_schedule?: - | { - ends_at: string | null - starts_at: string - } - | undefined - acs_access_group_id: string - - acs_system_id: string - - connected_account_id: string - - created_at: string - - display_name: string - - errors: Array<{ - created_at: string - - error_code: 'failed_to_create_on_acs_system' - - message: string - }> - - external_type: - | 'pti_unit' - | 'pti_access_level' - | 'salto_ks_access_group' - | 'brivo_group' - | 'salto_space_group' - | 'dormakaba_community_access_group' - | 'dormakaba_ambiance_access_group' - | 'avigilon_alta_group' - | 'kisi_access_group' - | 'akiles_member_group' - - external_type_display_name: string - - is_managed: boolean - - name: string - - pending_mutations: Array< - | { - created_at: string - - message: string - - mutation_code: 'creating' - } - | { - created_at: string - - message: string - - mutation_code: 'deleting' - } - | { - created_at: string - - message: string - - mutation_code: 'deferring_deletion' - } - | { - created_at: string - - from: { - name?: string | null | undefined - } - - message: string - - mutation_code: 'updating_group_information' - - to: { - name?: string | null | undefined - } - } - | { - created_at: string - - from: { - ends_at: string | null - starts_at: string | null - } - - message: string - - mutation_code: 'updating_access_schedule' - - to: { - ends_at: string | null - starts_at: string | null - } - } - | { - created_at: string - - from: { - acs_user_id: string | null - } - - message: string - - mutation_code: 'updating_user_membership' - - to: { - acs_user_id: string | null - } - } - | { - created_at: string - - from: { - acs_entrance_id: string | null - } - - message: string - - mutation_code: 'updating_entrance_membership' - - to: { - acs_entrance_id: string | null - } - } - | { - acs_user_id: string - - created_at: string - - message: string - - mutation_code: 'deferring_user_membership_update' - - variant: 'adding' | 'removing' - } - > - - warnings: Array<{ - created_at: string - - message: string - - warning_code: 'unknown_issue_with_acs_access_group' | 'being_deleted' - }> - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/unmanaged-acs-credential.ts b/src/lib/seam/connect/resources/unmanaged-acs-credential.ts deleted file mode 100644 index e5e2a629..00000000 --- a/src/lib/seam/connect/resources/unmanaged-acs-credential.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type UnmanagedAcsCredentialResource = { - access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' - - acs_credential_id: string - - acs_credential_pool_id?: string | undefined - acs_system_id: string - - acs_user_id?: string | undefined - assa_abloy_vostio_metadata?: - | { - auto_join?: boolean | undefined - door_names?: Array | undefined - endpoint_id?: string | undefined - key_id?: string | undefined - key_issuing_request_id?: string | undefined - override_guest_acs_entrance_ids?: Array | undefined - } - | undefined - card_number?: string | null | undefined - code?: string | null | undefined - connected_account_id: string - - created_at: string - - display_name: string - - ends_at?: string | undefined - errors: Array<{ - created_at: string - - error_code: string - - message: string - }> - - external_type?: - | 'pti_card' - | 'brivo_credential' - | 'hid_credential' - | 'visionline_card' - | 'salto_ks_credential' - | 'assa_abloy_vostio_key' - | 'salto_space_key' - | 'latch_access' - | 'dormakaba_ambiance_credential' - | 'hotek_card' - | 'salto_ks_tag' - | 'avigilon_alta_credential' - | 'kisi_credential' - | undefined - external_type_display_name?: string | undefined - is_issued?: boolean | undefined - is_latest_desired_state_synced_with_provider?: boolean | null | undefined - is_managed: boolean - - is_multi_phone_sync_credential?: boolean | undefined - is_one_time_use?: boolean | undefined - issued_at?: string | null | undefined - latest_desired_state_synced_with_provider_at?: string | null | undefined - parent_acs_credential_id?: string | undefined - starts_at?: string | undefined - user_identity_id?: string | undefined - visionline_metadata?: - | { - auto_join?: boolean | undefined - card_function_type?: 'guest' | 'staff' | undefined - card_id?: string | undefined - common_acs_entrance_ids?: Array | undefined - credential_id?: string | undefined - guest_acs_entrance_ids?: Array | undefined - is_valid?: boolean | undefined - joiner_acs_credential_ids?: Array | undefined - } - | undefined - warnings: Array< - | { - created_at: string - - message: string - - warning_code: 'waiting_to_be_issued' - } - | { - created_at: string - - message: string - - warning_code: 'schedule_externally_modified' - } - | { - created_at: string - - message: string - - warning_code: 'schedule_modified' - } - | { - created_at: string - - message: string - - warning_code: 'being_deleted' - } - | { - created_at: string - - message: string - - warning_code: 'unknown_issue_with_acs_credential' - } - | { - created_at: string - - message: string - - warning_code: 'needs_to_be_reissued' - } - > - - workspace_id: string -} diff --git a/src/lib/seam/connect/resources/unmanaged-acs-user.ts b/src/lib/seam/connect/resources/unmanaged-acs-user.ts deleted file mode 100644 index 0ae56d27..00000000 --- a/src/lib/seam/connect/resources/unmanaged-acs-user.ts +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type UnmanagedAcsUserResource = { - access_schedule?: - | { - ends_at: string | null - starts_at: string - } - | undefined - acs_system_id: string - - acs_user_id: string - - connected_account_id: string - - created_at: string - - display_name: string - - email?: string | undefined - email_address?: string | undefined - errors: Array< - | { - created_at: string - - error_code: 'deleted_externally' - - message: string - } - | { - created_at: string - - error_code: 'salto_ks_subscription_limit_exceeded' - - message: string - } - | { - created_at: string - - error_code: 'failed_to_create_on_acs_system' - - message: string - } - | { - created_at: string - - error_code: 'failed_to_update_on_acs_system' - - message: string - } - | { - created_at: string - - error_code: 'failed_to_delete_on_acs_system' - - message: string - } - | { - created_at: string - - error_code: 'latch_conflict_with_resident_user' - - message: string - } - > - - external_type?: - | 'pti_user' - | 'brivo_user' - | 'hid_credential_manager_user' - | 'salto_site_user' - | 'latch_user' - | 'dormakaba_community_user' - | 'salto_space_user' - | 'avigilon_alta_user' - | 'kisi_user' - | undefined - external_type_display_name?: string | undefined - full_name?: string | undefined - hid_acs_system_id?: string | undefined - is_managed: boolean - - is_suspended?: boolean | undefined - last_successful_sync_at: string | null - pending_mutations?: - | Array< - | { - created_at: string - - message: string - - mutation_code: 'creating' - } - | { - created_at: string - - message: string - - mutation_code: 'deleting' - } - | { - created_at: string - - message: string - - mutation_code: 'deferring_creation' - - scheduled_at?: string | null | undefined - } - | { - created_at: string - - from: { - email_address?: string | null | undefined - full_name?: string | null | undefined - phone_number?: string | null | undefined - } - - message: string - - mutation_code: 'updating_user_information' - - to: { - email_address?: string | null | undefined - full_name?: string | null | undefined - phone_number?: string | null | undefined - } - } - | { - created_at: string - - from: { - ends_at: string | null - starts_at: string | null - } - - message: string - - mutation_code: 'updating_access_schedule' - - to: { - ends_at: string | null - starts_at: string | null - } - } - | { - created_at: string - - from: { - is_suspended: boolean - } - - message: string - - mutation_code: 'updating_suspension_state' - - to: { - is_suspended: boolean - } - } - | { - created_at: string - - from: { - acs_access_group_id: string | null - } - - message: string - - mutation_code: 'updating_group_membership' - - to: { - acs_access_group_id: string | null - } - } - | { - acs_access_group_id: string - - created_at: string - - message: string - - mutation_code: 'deferring_group_membership_update' - - variant: 'adding' | 'removing' - } - | { - created_at: string - - from: { - acs_credential_id: string | null - } - - message: string - - mutation_code: 'updating_credential_assignment' - - to: { - acs_credential_id: string | null - } - } - > - | undefined - phone_number?: string | undefined - salto_ks_metadata?: - | { - is_subscribed?: boolean | undefined - } - | undefined - salto_space_metadata?: - | { - audit_openings?: boolean | undefined - user_id?: string | undefined - } - | undefined - user_identity_email_address?: string | null | undefined - user_identity_full_name?: string | null | undefined - user_identity_id?: string | undefined - user_identity_phone_number?: string | null | undefined - warnings: Array< - | { - created_at: string - - message: string - - warning_code: 'being_deleted' - } - | { - created_at: string - - message: string - - warning_code: 'salto_ks_user_not_subscribed' - } - | { - created_at: string - - message: string - - warning_code: 'acs_user_inactive' - } - | { - created_at: string - - message: string - - warning_code: 'unknown_issue_with_acs_user' - } - | { - created_at: string - - message: string - - warning_code: 'latch_resident_user' - } - > - - workspace_id: string -} diff --git a/src/lib/seam/connect/routes/access-codes/access-codes.ts b/src/lib/seam/connect/routes/access-codes/access-codes.ts index 43cd74d4..928641d1 100644 --- a/src/lib/seam/connect/routes/access-codes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes/access-codes.ts @@ -3,8 +3,6 @@ * 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, @@ -239,24 +237,6 @@ export class SeamHttpAccessCodes { }) } - getTimeline( - parameters: AccessCodesGetTimelineParameters, - options: AccessCodesGetTimelineOptions = {}, - ): AccessCodesGetTimelineRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/access_codes/get_timeline', - method: 'POST', - body: parameters, - responseKey: 'timeline_events', - options, - }) - } - list( parameters?: AccessCodesListParameters, options: AccessCodesListOptions = {}, @@ -339,7 +319,6 @@ export type AccessCodesCreateParameters = { prefer_native_scheduling?: boolean | undefined preferred_code_length?: number | undefined starts_at?: string | undefined - sync?: boolean | undefined use_backup_access_code_pool?: boolean | undefined use_offline_access_code?: boolean | undefined } @@ -401,7 +380,6 @@ export type AccessCodesDeleteParameters = { access_code_id: string device_id?: string | undefined - sync?: boolean | undefined } /** @@ -464,27 +442,6 @@ export type AccessCodesGetRequest = SeamHttpRequest< export interface AccessCodesGetOptions {} -export type AccessCodesGetTimelineParameters = - RouteRequestBody<'/access_codes/get_timeline'> - -/** - * @deprecated Use AccessCodesGetTimelineParameters instead. - */ -export type AccessCodesGetTimelineParams = AccessCodesGetTimelineParameters - -/** - * @deprecated Use AccessCodesGetTimelineRequest instead. - */ -export type AccessCodesGetTimelineResponse = - RouteResponse<'/access_codes/get_timeline'> - -export type AccessCodesGetTimelineRequest = SeamHttpRequest< - AccessCodesGetTimelineResponse, - 'timeline_events' -> - -export interface AccessCodesGetTimelineOptions {} - export type AccessCodesListParameters = { access_code_ids?: Array | undefined access_grant_id?: string | undefined @@ -584,7 +541,6 @@ export type AccessCodesUpdateParameters = { prefer_native_scheduling?: boolean | undefined preferred_code_length?: number | undefined starts_at?: string | undefined - sync?: boolean | undefined type?: 'ongoing' | 'time_bound' | undefined use_backup_access_code_pool?: boolean | undefined use_offline_access_code?: boolean | undefined diff --git a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts index c1252d49..59865348 100644 --- a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts @@ -233,7 +233,6 @@ export type AccessCodesUnmanagedConvertToManagedParameters = { allow_external_modification?: boolean | undefined force?: boolean | undefined is_external_modification_allowed?: boolean | undefined - sync?: boolean | undefined } /** @@ -256,8 +255,6 @@ export interface AccessCodesUnmanagedConvertToManagedOptions {} export type AccessCodesUnmanagedDeleteParameters = { access_code_id: string - - sync?: boolean | undefined } /** diff --git a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts index bec15c0f..ab33dd84 100644 --- a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts +++ b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts @@ -36,8 +36,6 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' -import { SeamHttpAcsAccessGroupsUnmanaged } from './unmanaged/index.js' - export class SeamHttpAcsAccessGroups { client: Client readonly defaults: Required @@ -165,13 +163,6 @@ export class SeamHttpAcsAccessGroups { await clientSessions.get() } - get unmanaged(): SeamHttpAcsAccessGroupsUnmanaged { - return SeamHttpAcsAccessGroupsUnmanaged.fromClient( - this.client, - this.defaults, - ) - } - addUser( parameters: AcsAccessGroupsAddUserParameters, options: AcsAccessGroupsAddUserOptions = {}, diff --git a/src/lib/seam/connect/routes/acs/access-groups/index.ts b/src/lib/seam/connect/routes/acs/access-groups/index.ts index 102271a5..bed34230 100644 --- a/src/lib/seam/connect/routes/acs/access-groups/index.ts +++ b/src/lib/seam/connect/routes/acs/access-groups/index.ts @@ -4,4 +4,3 @@ */ export * from './access-groups.js' -export * from './unmanaged/index.js' diff --git a/src/lib/seam/connect/routes/acs/access-groups/unmanaged/index.ts b/src/lib/seam/connect/routes/acs/access-groups/unmanaged/index.ts deleted file mode 100644 index bab8a37e..00000000 --- a/src/lib/seam/connect/routes/acs/access-groups/unmanaged/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './unmanaged.js' diff --git a/src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts deleted file mode 100644 index 8c346e94..00000000 --- a/src/lib/seam/connect/routes/acs/access-groups/unmanaged/unmanaged.ts +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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' - -export class SeamHttpAcsAccessGroupsUnmanaged { - 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 = {}, - ): SeamHttpAcsAccessGroupsUnmanaged { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpAcsAccessGroupsUnmanaged { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpAcsAccessGroupsUnmanaged { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpAcsAccessGroupsUnmanaged(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 SeamHttpAcsAccessGroupsUnmanaged.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpAcsAccessGroupsUnmanaged.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsAccessGroupsUnmanaged { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpAcsAccessGroupsUnmanaged(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsAccessGroupsUnmanaged { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpAcsAccessGroupsUnmanaged(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() - } - - get( - parameters: AcsAccessGroupsUnmanagedGetParameters, - options: AcsAccessGroupsUnmanagedGetOptions = {}, - ): AcsAccessGroupsUnmanagedGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/access_groups/unmanaged/get', - method: 'POST', - body: parameters, - responseKey: 'acs_access_group', - options, - }) - } - - list( - parameters?: AcsAccessGroupsUnmanagedListParameters, - options: AcsAccessGroupsUnmanagedListOptions = {}, - ): AcsAccessGroupsUnmanagedListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/access_groups/unmanaged/list', - method: 'POST', - body: parameters, - responseKey: 'acs_access_groups', - options, - }) - } -} - -export type AcsAccessGroupsUnmanagedGetParameters = - RouteRequestBody<'/acs/access_groups/unmanaged/get'> - -/** - * @deprecated Use AcsAccessGroupsUnmanagedGetParameters instead. - */ -export type AcsAccessGroupsUnmanagedGetParams = - AcsAccessGroupsUnmanagedGetParameters - -/** - * @deprecated Use AcsAccessGroupsUnmanagedGetRequest instead. - */ -export type AcsAccessGroupsUnmanagedGetResponse = - RouteResponse<'/acs/access_groups/unmanaged/get'> - -export type AcsAccessGroupsUnmanagedGetRequest = SeamHttpRequest< - AcsAccessGroupsUnmanagedGetResponse, - 'acs_access_group' -> - -export interface AcsAccessGroupsUnmanagedGetOptions {} - -export type AcsAccessGroupsUnmanagedListParameters = - RouteRequestBody<'/acs/access_groups/unmanaged/list'> - -/** - * @deprecated Use AcsAccessGroupsUnmanagedListParameters instead. - */ -export type AcsAccessGroupsUnmanagedListParams = - AcsAccessGroupsUnmanagedListParameters - -/** - * @deprecated Use AcsAccessGroupsUnmanagedListRequest instead. - */ -export type AcsAccessGroupsUnmanagedListResponse = - RouteResponse<'/acs/access_groups/unmanaged/list'> - -export type AcsAccessGroupsUnmanagedListRequest = SeamHttpRequest< - AcsAccessGroupsUnmanagedListResponse, - 'acs_access_groups' -> - -export interface AcsAccessGroupsUnmanagedListOptions {} diff --git a/src/lib/seam/connect/routes/acs/acs.ts b/src/lib/seam/connect/routes/acs/acs.ts index 3b244e41..51413396 100644 --- a/src/lib/seam/connect/routes/acs/acs.ts +++ b/src/lib/seam/connect/routes/acs/acs.ts @@ -34,8 +34,6 @@ import type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' import { SeamHttpAcsAccessGroups } from './access-groups/index.js' -import { SeamHttpAcsCredentialPools } from './credential-pools/index.js' -import { SeamHttpAcsCredentialProvisioningAutomations } from './credential-provisioning-automations/index.js' import { SeamHttpAcsCredentials } from './credentials/index.js' import { SeamHttpAcsEncoders } from './encoders/index.js' import { SeamHttpAcsEntrances } from './entrances/index.js' @@ -173,17 +171,6 @@ export class SeamHttpAcs { return SeamHttpAcsAccessGroups.fromClient(this.client, this.defaults) } - get credentialPools(): SeamHttpAcsCredentialPools { - return SeamHttpAcsCredentialPools.fromClient(this.client, this.defaults) - } - - get credentialProvisioningAutomations(): SeamHttpAcsCredentialProvisioningAutomations { - return SeamHttpAcsCredentialProvisioningAutomations.fromClient( - this.client, - this.defaults, - ) - } - get credentials(): SeamHttpAcsCredentials { return SeamHttpAcsCredentials.fromClient(this.client, this.defaults) } diff --git a/src/lib/seam/connect/routes/acs/credential-pools/credential-pools.ts b/src/lib/seam/connect/routes/acs/credential-pools/credential-pools.ts deleted file mode 100644 index b1f93f51..00000000 --- a/src/lib/seam/connect/routes/acs/credential-pools/credential-pools.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 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' - -export class SeamHttpAcsCredentialPools { - 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 = {}, - ): SeamHttpAcsCredentialPools { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpAcsCredentialPools(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpAcsCredentialPools { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpAcsCredentialPools(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpAcsCredentialPools { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpAcsCredentialPools(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 SeamHttpAcsCredentialPools.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpAcsCredentialPools.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsCredentialPools { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpAcsCredentialPools(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsCredentialPools { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpAcsCredentialPools(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: AcsCredentialPoolsListParameters, - options: AcsCredentialPoolsListOptions = {}, - ): AcsCredentialPoolsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/credential_pools/list', - method: 'POST', - body: parameters, - responseKey: 'acs_credential_pools', - options, - }) - } -} - -export type AcsCredentialPoolsListParameters = - RouteRequestBody<'/acs/credential_pools/list'> - -/** - * @deprecated Use AcsCredentialPoolsListParameters instead. - */ -export type AcsCredentialPoolsListParams = AcsCredentialPoolsListParameters - -/** - * @deprecated Use AcsCredentialPoolsListRequest instead. - */ -export type AcsCredentialPoolsListResponse = - RouteResponse<'/acs/credential_pools/list'> - -export type AcsCredentialPoolsListRequest = SeamHttpRequest< - AcsCredentialPoolsListResponse, - 'acs_credential_pools' -> - -export interface AcsCredentialPoolsListOptions {} diff --git a/src/lib/seam/connect/routes/acs/credential-pools/index.ts b/src/lib/seam/connect/routes/acs/credential-pools/index.ts deleted file mode 100644 index 359efb81..00000000 --- a/src/lib/seam/connect/routes/acs/credential-pools/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './credential-pools.js' diff --git a/src/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.ts b/src/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.ts deleted file mode 100644 index 0f545919..00000000 --- a/src/lib/seam/connect/routes/acs/credential-provisioning-automations/credential-provisioning-automations.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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' - -export class SeamHttpAcsCredentialProvisioningAutomations { - 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 = {}, - ): SeamHttpAcsCredentialProvisioningAutomations { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpAcsCredentialProvisioningAutomations { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpAcsCredentialProvisioningAutomations { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpAcsCredentialProvisioningAutomations(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 SeamHttpAcsCredentialProvisioningAutomations.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpAcsCredentialProvisioningAutomations.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsCredentialProvisioningAutomations { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpAcsCredentialProvisioningAutomations(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsCredentialProvisioningAutomations { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpAcsCredentialProvisioningAutomations(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() - } - - launch( - parameters: AcsCredentialProvisioningAutomationsLaunchParameters, - options: AcsCredentialProvisioningAutomationsLaunchOptions = {}, - ): AcsCredentialProvisioningAutomationsLaunchRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/credential_provisioning_automations/launch', - method: 'POST', - body: parameters, - responseKey: 'acs_credential_provisioning_automation', - options, - }) - } -} - -export type AcsCredentialProvisioningAutomationsLaunchParameters = - RouteRequestBody<'/acs/credential_provisioning_automations/launch'> - -/** - * @deprecated Use AcsCredentialProvisioningAutomationsLaunchParameters instead. - */ -export type AcsCredentialProvisioningAutomationsLaunchBody = - AcsCredentialProvisioningAutomationsLaunchParameters - -/** - * @deprecated Use AcsCredentialProvisioningAutomationsLaunchRequest instead. - */ -export type AcsCredentialProvisioningAutomationsLaunchResponse = - RouteResponse<'/acs/credential_provisioning_automations/launch'> - -export type AcsCredentialProvisioningAutomationsLaunchRequest = SeamHttpRequest< - AcsCredentialProvisioningAutomationsLaunchResponse, - 'acs_credential_provisioning_automation' -> - -export interface AcsCredentialProvisioningAutomationsLaunchOptions {} diff --git a/src/lib/seam/connect/routes/acs/credential-provisioning-automations/index.ts b/src/lib/seam/connect/routes/acs/credential-provisioning-automations/index.ts deleted file mode 100644 index 9f5a3c67..00000000 --- a/src/lib/seam/connect/routes/acs/credential-provisioning-automations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './credential-provisioning-automations.js' diff --git a/src/lib/seam/connect/routes/acs/credentials/credentials.ts b/src/lib/seam/connect/routes/acs/credentials/credentials.ts index 866b653a..b1109881 100644 --- a/src/lib/seam/connect/routes/acs/credentials/credentials.ts +++ b/src/lib/seam/connect/routes/acs/credentials/credentials.ts @@ -3,8 +3,6 @@ * 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, @@ -37,8 +35,6 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' -import { SeamHttpAcsCredentialsUnmanaged } from './unmanaged/index.js' - export class SeamHttpAcsCredentials { client: Client readonly defaults: Required @@ -166,13 +162,6 @@ export class SeamHttpAcsCredentials { await clientSessions.get() } - get unmanaged(): SeamHttpAcsCredentialsUnmanaged { - return SeamHttpAcsCredentialsUnmanaged.fromClient( - this.client, - this.defaults, - ) - } - assign( parameters: AcsCredentialsAssignParameters, options: AcsCredentialsAssignOptions = {}, @@ -199,24 +188,6 @@ export class SeamHttpAcsCredentials { }) } - createOfflineCode( - parameters: AcsCredentialsCreateOfflineCodeParameters, - options: AcsCredentialsCreateOfflineCodeOptions = {}, - ): AcsCredentialsCreateOfflineCodeRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/credentials/create_offline_code', - method: 'POST', - body: parameters, - responseKey: 'acs_credential', - options, - }) - } - delete( parameters: AcsCredentialsDeleteParameters, options: AcsCredentialsDeleteOptions = {}, @@ -334,28 +305,19 @@ export type AcsCredentialsCreateParameters = { code?: string | undefined credential_manager_acs_system_id?: string | undefined ends_at?: string | undefined - hotek_metadata?: - | { - auto_join?: boolean | undefined - override?: boolean | undefined - } - | undefined is_multi_phone_sync_credential?: boolean | undefined salto_space_metadata?: | { assign_new_key?: boolean | undefined - update_current_key?: boolean | undefined } | undefined starts_at?: string | undefined user_identity_id?: string | undefined visionline_metadata?: | { - assa_abloy_credential_service_mobile_endpoint_id?: string | undefined auto_join?: boolean | undefined card_format?: 'TLCode' | 'rfid48' | undefined card_function_type?: 'guest' | 'staff' | undefined - is_override_key?: boolean | undefined joiner_acs_credential_ids?: Array | undefined override?: boolean | undefined } @@ -381,28 +343,6 @@ export type AcsCredentialsCreateRequest = SeamHttpRequest< export interface AcsCredentialsCreateOptions {} -export type AcsCredentialsCreateOfflineCodeParameters = - RouteRequestBody<'/acs/credentials/create_offline_code'> - -/** - * @deprecated Use AcsCredentialsCreateOfflineCodeParameters instead. - */ -export type AcsCredentialsCreateOfflineCodeBody = - AcsCredentialsCreateOfflineCodeParameters - -/** - * @deprecated Use AcsCredentialsCreateOfflineCodeRequest instead. - */ -export type AcsCredentialsCreateOfflineCodeResponse = - RouteResponse<'/acs/credentials/create_offline_code'> - -export type AcsCredentialsCreateOfflineCodeRequest = SeamHttpRequest< - AcsCredentialsCreateOfflineCodeResponse, - 'acs_credential' -> - -export interface AcsCredentialsCreateOfflineCodeOptions {} - export type AcsCredentialsDeleteParameters = { acs_credential_id: string } diff --git a/src/lib/seam/connect/routes/acs/credentials/index.ts b/src/lib/seam/connect/routes/acs/credentials/index.ts index 62dedd6f..2d9bacd3 100644 --- a/src/lib/seam/connect/routes/acs/credentials/index.ts +++ b/src/lib/seam/connect/routes/acs/credentials/index.ts @@ -4,4 +4,3 @@ */ export * from './credentials.js' -export * from './unmanaged/index.js' diff --git a/src/lib/seam/connect/routes/acs/credentials/unmanaged/index.ts b/src/lib/seam/connect/routes/acs/credentials/unmanaged/index.ts deleted file mode 100644 index bab8a37e..00000000 --- a/src/lib/seam/connect/routes/acs/credentials/unmanaged/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './unmanaged.js' diff --git a/src/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.ts deleted file mode 100644 index 0c1c71ce..00000000 --- a/src/lib/seam/connect/routes/acs/credentials/unmanaged/unmanaged.ts +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { - RouteRequestBody, - RouteRequestParams, - 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' - -export class SeamHttpAcsCredentialsUnmanaged { - 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 = {}, - ): SeamHttpAcsCredentialsUnmanaged { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpAcsCredentialsUnmanaged(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpAcsCredentialsUnmanaged { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpAcsCredentialsUnmanaged(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpAcsCredentialsUnmanaged { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpAcsCredentialsUnmanaged(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 SeamHttpAcsCredentialsUnmanaged.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpAcsCredentialsUnmanaged.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsCredentialsUnmanaged { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpAcsCredentialsUnmanaged(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsCredentialsUnmanaged { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpAcsCredentialsUnmanaged(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() - } - - get( - parameters: AcsCredentialsUnmanagedGetParameters, - options: AcsCredentialsUnmanagedGetOptions = {}, - ): AcsCredentialsUnmanagedGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/credentials/unmanaged/get', - method: 'POST', - body: parameters, - responseKey: 'acs_credential', - options, - }) - } - - list( - parameters?: AcsCredentialsUnmanagedListParameters, - options: AcsCredentialsUnmanagedListOptions = {}, - ): AcsCredentialsUnmanagedListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/credentials/unmanaged/list', - method: 'GET', - params: parameters, - responseKey: 'acs_credentials', - options, - }) - } -} - -export type AcsCredentialsUnmanagedGetParameters = - RouteRequestBody<'/acs/credentials/unmanaged/get'> - -/** - * @deprecated Use AcsCredentialsUnmanagedGetParameters instead. - */ -export type AcsCredentialsUnmanagedGetParams = - AcsCredentialsUnmanagedGetParameters - -/** - * @deprecated Use AcsCredentialsUnmanagedGetRequest instead. - */ -export type AcsCredentialsUnmanagedGetResponse = - RouteResponse<'/acs/credentials/unmanaged/get'> - -export type AcsCredentialsUnmanagedGetRequest = SeamHttpRequest< - AcsCredentialsUnmanagedGetResponse, - 'acs_credential' -> - -export interface AcsCredentialsUnmanagedGetOptions {} - -export type AcsCredentialsUnmanagedListParameters = - RouteRequestParams<'/acs/credentials/unmanaged/list'> - -/** - * @deprecated Use AcsCredentialsUnmanagedListParameters instead. - */ -export type AcsCredentialsUnmanagedListParams = - AcsCredentialsUnmanagedListParameters - -/** - * @deprecated Use AcsCredentialsUnmanagedListRequest instead. - */ -export type AcsCredentialsUnmanagedListResponse = - RouteResponse<'/acs/credentials/unmanaged/list'> - -export type AcsCredentialsUnmanagedListRequest = SeamHttpRequest< - AcsCredentialsUnmanagedListResponse, - 'acs_credentials' -> - -export interface AcsCredentialsUnmanagedListOptions {} diff --git a/src/lib/seam/connect/routes/acs/index.ts b/src/lib/seam/connect/routes/acs/index.ts index b8b8f5bf..26399aa6 100644 --- a/src/lib/seam/connect/routes/acs/index.ts +++ b/src/lib/seam/connect/routes/acs/index.ts @@ -5,8 +5,6 @@ export * from './access-groups/index.js' export * from './acs.js' -export * from './credential-pools/index.js' -export * from './credential-provisioning-automations/index.js' export * from './credentials/index.js' export * from './encoders/index.js' export * from './entrances/index.js' diff --git a/src/lib/seam/connect/routes/acs/users/index.ts b/src/lib/seam/connect/routes/acs/users/index.ts index 747b84d5..7c31b60d 100644 --- a/src/lib/seam/connect/routes/acs/users/index.ts +++ b/src/lib/seam/connect/routes/acs/users/index.ts @@ -3,5 +3,4 @@ * Do not edit this file or add other files to this directory. */ -export * from './unmanaged/index.js' export * from './users.js' diff --git a/src/lib/seam/connect/routes/acs/users/unmanaged/index.ts b/src/lib/seam/connect/routes/acs/users/unmanaged/index.ts deleted file mode 100644 index bab8a37e..00000000 --- a/src/lib/seam/connect/routes/acs/users/unmanaged/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './unmanaged.js' diff --git a/src/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.ts deleted file mode 100644 index ba282848..00000000 --- a/src/lib/seam/connect/routes/acs/users/unmanaged/unmanaged.ts +++ /dev/null @@ -1,247 +0,0 @@ -/* - * 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' - -export class SeamHttpAcsUsersUnmanaged { - 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 = {}, - ): SeamHttpAcsUsersUnmanaged { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpAcsUsersUnmanaged(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpAcsUsersUnmanaged { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpAcsUsersUnmanaged(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpAcsUsersUnmanaged { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpAcsUsersUnmanaged(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 SeamHttpAcsUsersUnmanaged.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpAcsUsersUnmanaged.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsUsersUnmanaged { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpAcsUsersUnmanaged(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpAcsUsersUnmanaged { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpAcsUsersUnmanaged(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() - } - - get( - parameters: AcsUsersUnmanagedGetParameters, - options: AcsUsersUnmanagedGetOptions = {}, - ): AcsUsersUnmanagedGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/users/unmanaged/get', - method: 'POST', - body: parameters, - responseKey: 'acs_user', - options, - }) - } - - list( - parameters?: AcsUsersUnmanagedListParameters, - options: AcsUsersUnmanagedListOptions = {}, - ): AcsUsersUnmanagedListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/acs/users/unmanaged/list', - method: 'POST', - body: parameters, - responseKey: 'acs_users', - options, - }) - } -} - -export type AcsUsersUnmanagedGetParameters = - RouteRequestBody<'/acs/users/unmanaged/get'> - -/** - * @deprecated Use AcsUsersUnmanagedGetParameters instead. - */ -export type AcsUsersUnmanagedGetParams = AcsUsersUnmanagedGetParameters - -/** - * @deprecated Use AcsUsersUnmanagedGetRequest instead. - */ -export type AcsUsersUnmanagedGetResponse = - RouteResponse<'/acs/users/unmanaged/get'> - -export type AcsUsersUnmanagedGetRequest = SeamHttpRequest< - AcsUsersUnmanagedGetResponse, - 'acs_user' -> - -export interface AcsUsersUnmanagedGetOptions {} - -export type AcsUsersUnmanagedListParameters = - RouteRequestBody<'/acs/users/unmanaged/list'> - -/** - * @deprecated Use AcsUsersUnmanagedListParameters instead. - */ -export type AcsUsersUnmanagedListParams = AcsUsersUnmanagedListParameters - -/** - * @deprecated Use AcsUsersUnmanagedListRequest instead. - */ -export type AcsUsersUnmanagedListResponse = - RouteResponse<'/acs/users/unmanaged/list'> - -export type AcsUsersUnmanagedListRequest = SeamHttpRequest< - AcsUsersUnmanagedListResponse, - 'acs_users' -> - -export interface AcsUsersUnmanagedListOptions {} diff --git a/src/lib/seam/connect/routes/acs/users/users.ts b/src/lib/seam/connect/routes/acs/users/users.ts index d4a147e8..ba9467f0 100644 --- a/src/lib/seam/connect/routes/acs/users/users.ts +++ b/src/lib/seam/connect/routes/acs/users/users.ts @@ -35,8 +35,6 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' -import { SeamHttpAcsUsersUnmanaged } from './unmanaged/index.js' - export class SeamHttpAcsUsers { client: Client readonly defaults: Required @@ -164,10 +162,6 @@ export class SeamHttpAcsUsers { await clientSessions.get() } - get unmanaged(): SeamHttpAcsUsersUnmanaged { - return SeamHttpAcsUsersUnmanaged.fromClient(this.client, this.defaults) - } - addToAccessGroup( parameters: AcsUsersAddToAccessGroupParameters, options: AcsUsersAddToAccessGroupOptions = {}, diff --git a/src/lib/seam/connect/routes/bridges/bridges.ts b/src/lib/seam/connect/routes/bridges/bridges.ts deleted file mode 100644 index b04bf044..00000000 --- a/src/lib/seam/connect/routes/bridges/bridges.ts +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 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' - -export class SeamHttpBridges { - 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 = {}, - ): SeamHttpBridges { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpBridges(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpBridges { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpBridges(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpBridges { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpBridges(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 SeamHttpBridges.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpBridges.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpBridges { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpBridges(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpBridges { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpBridges(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() - } - - get( - parameters: BridgesGetParameters, - options: BridgesGetOptions = {}, - ): BridgesGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/bridges/get', - method: 'POST', - body: parameters, - responseKey: 'bridge', - options, - }) - } - - list( - parameters?: BridgesListParameters, - options: BridgesListOptions = {}, - ): BridgesListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/bridges/list', - method: 'POST', - body: parameters, - responseKey: 'bridges', - options, - }) - } -} - -export type BridgesGetParameters = RouteRequestBody<'/bridges/get'> - -/** - * @deprecated Use BridgesGetParameters instead. - */ -export type BridgesGetParams = BridgesGetParameters - -/** - * @deprecated Use BridgesGetRequest instead. - */ -export type BridgesGetResponse = RouteResponse<'/bridges/get'> - -export type BridgesGetRequest = SeamHttpRequest - -export interface BridgesGetOptions {} - -export type BridgesListParameters = RouteRequestBody<'/bridges/list'> - -/** - * @deprecated Use BridgesListParameters instead. - */ -export type BridgesListParams = BridgesListParameters - -/** - * @deprecated Use BridgesListRequest instead. - */ -export type BridgesListResponse = RouteResponse<'/bridges/list'> - -export type BridgesListRequest = SeamHttpRequest - -export interface BridgesListOptions {} diff --git a/src/lib/seam/connect/routes/bridges/index.ts b/src/lib/seam/connect/routes/bridges/index.ts deleted file mode 100644 index 17b80312..00000000 --- a/src/lib/seam/connect/routes/bridges/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './bridges.js' diff --git a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts index 949053ab..d935b655 100644 --- a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts @@ -296,7 +296,6 @@ export type ConnectWebviewsCreateParameters = { custom_redirect_failure_url?: string | undefined custom_redirect_url?: string | undefined customer_key?: string | undefined - device_selection_mode?: 'none' | 'single' | 'multiple' | undefined excluded_providers?: Array | undefined provider_category?: | 'stable' diff --git a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts index 9939d41d..5ff2ad4b 100644 --- a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts @@ -238,8 +238,6 @@ export class SeamHttpConnectedAccounts { export type ConnectedAccountsDeleteParameters = { connected_account_id: string - - sync?: boolean | undefined } /** diff --git a/src/lib/seam/connect/routes/customers/customers.ts b/src/lib/seam/connect/routes/customers/customers.ts index fcaa3255..0388bbdb 100644 --- a/src/lib/seam/connect/routes/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/customers.ts @@ -34,8 +34,6 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' -import { SeamHttpCustomersReservations } from './reservations/index.js' - export class SeamHttpCustomers { client: Client readonly defaults: Required @@ -163,10 +161,6 @@ export class SeamHttpCustomers { await clientSessions.get() } - get reservations(): SeamHttpCustomersReservations { - return SeamHttpCustomersReservations.fromClient(this.client, this.defaults) - } - createPortal( parameters?: CustomersCreatePortalParameters, options: CustomersCreatePortalOptions = {}, @@ -208,7 +202,6 @@ export class SeamHttpCustomers { } export type CustomersCreatePortalParameters = { - _dev?: boolean | undefined customer_resources_filters?: | Array<{ field?: string | undefined diff --git a/src/lib/seam/connect/routes/customers/index.ts b/src/lib/seam/connect/routes/customers/index.ts index 5dfe6520..9126f05d 100644 --- a/src/lib/seam/connect/routes/customers/index.ts +++ b/src/lib/seam/connect/routes/customers/index.ts @@ -4,4 +4,3 @@ */ export * from './customers.js' -export * from './reservations/index.js' diff --git a/src/lib/seam/connect/routes/customers/reservations/index.ts b/src/lib/seam/connect/routes/customers/reservations/index.ts deleted file mode 100644 index 72e7f4fc..00000000 --- a/src/lib/seam/connect/routes/customers/reservations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './reservations.js' diff --git a/src/lib/seam/connect/routes/customers/reservations/reservations.ts b/src/lib/seam/connect/routes/customers/reservations/reservations.ts deleted file mode 100644 index 313156cc..00000000 --- a/src/lib/seam/connect/routes/customers/reservations/reservations.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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' - -export class SeamHttpCustomersReservations { - 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 = {}, - ): SeamHttpCustomersReservations { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpCustomersReservations(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpCustomersReservations { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpCustomersReservations(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpCustomersReservations { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpCustomersReservations(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 SeamHttpCustomersReservations.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpCustomersReservations.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpCustomersReservations { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpCustomersReservations(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpCustomersReservations { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpCustomersReservations(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() - } - - createDeepLink( - parameters: CustomersReservationsCreateDeepLinkParameters, - options: CustomersReservationsCreateDeepLinkOptions = {}, - ): CustomersReservationsCreateDeepLinkRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/customers/reservations/create_deep_link', - method: 'POST', - body: parameters, - responseKey: 'deep_link', - options, - }) - } -} - -export type CustomersReservationsCreateDeepLinkParameters = - RouteRequestBody<'/customers/reservations/create_deep_link'> - -/** - * @deprecated Use CustomersReservationsCreateDeepLinkParameters instead. - */ -export type CustomersReservationsCreateDeepLinkBody = - CustomersReservationsCreateDeepLinkParameters - -/** - * @deprecated Use CustomersReservationsCreateDeepLinkRequest instead. - */ -export type CustomersReservationsCreateDeepLinkResponse = - RouteResponse<'/customers/reservations/create_deep_link'> - -export type CustomersReservationsCreateDeepLinkRequest = SeamHttpRequest< - CustomersReservationsCreateDeepLinkResponse, - 'deep_link' -> - -export interface CustomersReservationsCreateDeepLinkOptions {} diff --git a/src/lib/seam/connect/routes/devices/devices.ts b/src/lib/seam/connect/routes/devices/devices.ts index f79b108b..daf6b6ca 100644 --- a/src/lib/seam/connect/routes/devices/devices.ts +++ b/src/lib/seam/connect/routes/devices/devices.ts @@ -3,8 +3,6 @@ * 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, @@ -175,24 +173,6 @@ export class SeamHttpDevices { return SeamHttpDevicesUnmanaged.fromClient(this.client, this.defaults) } - delete( - parameters: DevicesDeleteParameters, - options: DevicesDeleteOptions = {}, - ): DevicesDeleteRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/devices/delete', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } - get( parameters?: DevicesGetParameters, options: DevicesGetOptions = {}, @@ -259,22 +239,6 @@ export class SeamHttpDevices { } } -export type DevicesDeleteParameters = RouteRequestBody<'/devices/delete'> - -/** - * @deprecated Use DevicesDeleteParameters instead. - */ -export type DevicesDeleteParams = DevicesDeleteParameters - -/** - * @deprecated Use DevicesDeleteRequest instead. - */ -export type DevicesDeleteResponse = RouteResponse<'/devices/delete'> - -export type DevicesDeleteRequest = SeamHttpRequest - -export interface DevicesDeleteOptions {} - export type DevicesGetParameters = { device_id?: string | undefined name?: string | undefined @@ -392,54 +356,6 @@ export type DevicesListParameters = { | 'ring_camera' > | undefined - exclude_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined - include_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined limit?: number | undefined manufacturer?: | 'akuvox' diff --git a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts index ddb2d287..e44c0943 100644 --- a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts @@ -321,54 +321,6 @@ export type DevicesUnmanagedListParameters = { | 'ring_camera' > | undefined - exclude_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined - include_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined limit?: number | undefined manufacturer?: | 'akuvox' diff --git a/src/lib/seam/connect/routes/index.ts b/src/lib/seam/connect/routes/index.ts index 7c121db5..4bf03881 100644 --- a/src/lib/seam/connect/routes/index.ts +++ b/src/lib/seam/connect/routes/index.ts @@ -8,7 +8,6 @@ export * from './access-grants/index.js' export * from './access-methods/index.js' export * from './acs/index.js' export * from './action-attempts/index.js' -export * from './bridges/index.js' export * from './client-sessions/index.js' export * from './connect-webviews/index.js' export * from './connected-accounts/index.js' @@ -19,14 +18,12 @@ export * from './instant-keys/index.js' export * from './locks/index.js' export * from './noise-sensors/index.js' export * from './phones/index.js' -export * from './seam/index.js' export * from './seam-http.js' export * from './seam-http-endpoints.js' export * from './seam-http-endpoints-without-workspace.js' export * from './seam-http-without-workspace.js' export * from './spaces/index.js' export * from './thermostats/index.js' -export * from './unstable-partner/index.js' export * from './user-identities/index.js' export * from './webhooks/index.js' export * from './workspaces/index.js' diff --git a/src/lib/seam/connect/routes/locks/locks.ts b/src/lib/seam/connect/routes/locks/locks.ts index b9a657d0..b04e3bb0 100644 --- a/src/lib/seam/connect/routes/locks/locks.ts +++ b/src/lib/seam/connect/routes/locks/locks.ts @@ -356,54 +356,6 @@ export type LocksListParameters = { | 'aqara_lock' > | undefined - exclude_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined - include_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined limit?: number | undefined manufacturer?: | 'akuvox' @@ -462,8 +414,6 @@ export interface LocksListOptions {} export type LocksLockDoorParameters = { device_id: string - - sync?: boolean | undefined } /** @@ -488,8 +438,6 @@ export type LocksLockDoorOptions = Pick< export type LocksUnlockDoorParameters = { device_id: string - - sync?: boolean | undefined } /** diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts index db138728..6e270e6e 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts @@ -199,54 +199,6 @@ export type NoiseSensorsListParameters = { device_ids?: Array | undefined device_type?: 'noiseaware_activity_zone' | 'minut_sensor' | undefined device_types?: Array<'noiseaware_activity_zone' | 'minut_sensor'> | undefined - exclude_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined - include_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined limit?: number | undefined manufacturer?: 'minut' | 'noiseaware' | undefined page_cursor?: string | undefined diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts index feaf6eac..135c8377 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts @@ -239,8 +239,6 @@ export type NoiseSensorsNoiseThresholdsCreateParameters = { noise_threshold_decibels?: number | undefined noise_threshold_nrs?: number | undefined starts_daily_at: string - - sync?: boolean | undefined } /** @@ -267,8 +265,6 @@ export type NoiseSensorsNoiseThresholdsDeleteParameters = { device_id: string noise_threshold_id: string - - sync?: boolean | undefined } /** @@ -315,8 +311,6 @@ export interface NoiseSensorsNoiseThresholdsGetOptions {} export type NoiseSensorsNoiseThresholdsListParameters = { device_id: string - - is_programmed?: boolean | undefined } /** @@ -349,7 +343,6 @@ export type NoiseSensorsNoiseThresholdsUpdateParameters = { noise_threshold_nrs?: number | undefined starts_daily_at?: string | undefined - sync?: boolean | undefined } /** diff --git a/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts b/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts index 95992b18..051026c6 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts @@ -21,18 +21,6 @@ import { parseOptions, } from 'lib/seam/connect/parse-options.js' -import { - type SeamConsoleV1WorkspaceFeatureFlagsListOptions, - type SeamConsoleV1WorkspaceFeatureFlagsListParameters, - type SeamConsoleV1WorkspaceFeatureFlagsListRequest, - SeamHttpSeamConsoleV1WorkspaceFeatureFlags, -} from './seam/console/v1/workspace/feature-flags/index.js' -import { - type SeamCustomerV1ConnectorsAuthorizeOptions, - type SeamCustomerV1ConnectorsAuthorizeParameters, - type SeamCustomerV1ConnectorsAuthorizeRequest, - SeamHttpSeamCustomerV1Connectors, -} from './seam/customer/v1/connectors/index.js' import { SeamHttpWorkspaces, type WorkspacesCreateOptions, @@ -106,45 +94,6 @@ export class SeamHttpEndpointsWithoutWorkspace { return new SeamHttpEndpointsWithoutWorkspace(constructorOptions) } - get '/seam/console/v1/workspace/feature_flags/list'(): ( - parameters?: SeamConsoleV1WorkspaceFeatureFlagsListParameters, - options?: SeamConsoleV1WorkspaceFeatureFlagsListOptions, - ) => SeamConsoleV1WorkspaceFeatureFlagsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1WorkspaceFeatureFlagsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/customer/v1/connectors/authorize'(): ( - parameters: SeamCustomerV1ConnectorsAuthorizeParameters, - options?: SeamCustomerV1ConnectorsAuthorizeOptions, - ) => SeamCustomerV1ConnectorsAuthorizeRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsAuthorize( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.authorize(...args) - } - } - get '/workspaces/create'(): ( parameters: WorkspacesCreateParameters, options?: WorkspacesCreateOptions, @@ -172,9 +121,6 @@ export class SeamHttpEndpointsWithoutWorkspace { } } -export type SeamHttpEndpointWithoutWorkspaceQueryPaths = - | '/seam/console/v1/workspace/feature_flags/list' - | '/seam/customer/v1/connectors/authorize' - | '/workspaces/list' +export type SeamHttpEndpointWithoutWorkspaceQueryPaths = '/workspaces/list' export type SeamHttpEndpointWithoutWorkspaceMutationPaths = '/workspaces/create' diff --git a/src/lib/seam/connect/routes/seam-http-endpoints.ts b/src/lib/seam/connect/routes/seam-http-endpoints.ts index f309a7d2..748e476b 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints.ts @@ -48,9 +48,6 @@ import { type AccessCodesGetOptions, type AccessCodesGetParameters, type AccessCodesGetRequest, - type AccessCodesGetTimelineOptions, - type AccessCodesGetTimelineParameters, - type AccessCodesGetTimelineRequest, type AccessCodesListOptions, type AccessCodesListParameters, type AccessCodesListRequest, @@ -185,34 +182,10 @@ import { type AcsAccessGroupsRemoveUserRequest, SeamHttpAcsAccessGroups, } from './acs/access-groups/index.js' -import { - type AcsAccessGroupsUnmanagedGetOptions, - type AcsAccessGroupsUnmanagedGetParameters, - type AcsAccessGroupsUnmanagedGetRequest, - type AcsAccessGroupsUnmanagedListOptions, - type AcsAccessGroupsUnmanagedListParameters, - type AcsAccessGroupsUnmanagedListRequest, - SeamHttpAcsAccessGroupsUnmanaged, -} from './acs/access-groups/unmanaged/index.js' -import { - type AcsCredentialPoolsListOptions, - type AcsCredentialPoolsListParameters, - type AcsCredentialPoolsListRequest, - SeamHttpAcsCredentialPools, -} from './acs/credential-pools/index.js' -import { - type AcsCredentialProvisioningAutomationsLaunchOptions, - type AcsCredentialProvisioningAutomationsLaunchParameters, - type AcsCredentialProvisioningAutomationsLaunchRequest, - SeamHttpAcsCredentialProvisioningAutomations, -} from './acs/credential-provisioning-automations/index.js' import { type AcsCredentialsAssignOptions, type AcsCredentialsAssignParameters, type AcsCredentialsAssignRequest, - type AcsCredentialsCreateOfflineCodeOptions, - type AcsCredentialsCreateOfflineCodeParameters, - type AcsCredentialsCreateOfflineCodeRequest, type AcsCredentialsCreateOptions, type AcsCredentialsCreateParameters, type AcsCredentialsCreateRequest, @@ -236,15 +209,6 @@ import { type AcsCredentialsUpdateRequest, SeamHttpAcsCredentials, } from './acs/credentials/index.js' -import { - type AcsCredentialsUnmanagedGetOptions, - type AcsCredentialsUnmanagedGetParameters, - type AcsCredentialsUnmanagedGetRequest, - type AcsCredentialsUnmanagedListOptions, - type AcsCredentialsUnmanagedListParameters, - type AcsCredentialsUnmanagedListRequest, - SeamHttpAcsCredentialsUnmanaged, -} from './acs/credentials/unmanaged/index.js' import { type AcsEncodersEncodeCredentialOptions, type AcsEncodersEncodeCredentialParameters, @@ -347,15 +311,6 @@ import { type AcsUsersUpdateRequest, SeamHttpAcsUsers, } from './acs/users/index.js' -import { - type AcsUsersUnmanagedGetOptions, - type AcsUsersUnmanagedGetParameters, - type AcsUsersUnmanagedGetRequest, - type AcsUsersUnmanagedListOptions, - type AcsUsersUnmanagedListParameters, - type AcsUsersUnmanagedListRequest, - SeamHttpAcsUsersUnmanaged, -} from './acs/users/unmanaged/index.js' import { type ActionAttemptsGetOptions, type ActionAttemptsGetParameters, @@ -365,15 +320,6 @@ import { type ActionAttemptsListRequest, SeamHttpActionAttempts, } from './action-attempts/index.js' -import { - type BridgesGetOptions, - type BridgesGetParameters, - type BridgesGetRequest, - type BridgesListOptions, - type BridgesListParameters, - type BridgesListRequest, - SeamHttpBridges, -} from './bridges/index.js' import { type ClientSessionsCreateOptions, type ClientSessionsCreateParameters, @@ -450,15 +396,6 @@ import { SeamHttpCustomers, } from './customers/index.js' import { - type CustomersReservationsCreateDeepLinkOptions, - type CustomersReservationsCreateDeepLinkParameters, - type CustomersReservationsCreateDeepLinkRequest, - SeamHttpCustomersReservations, -} from './customers/reservations/index.js' -import { - type DevicesDeleteOptions, - type DevicesDeleteParameters, - type DevicesDeleteRequest, type DevicesGetOptions, type DevicesGetParameters, type DevicesGetRequest, @@ -605,231 +542,6 @@ import { type PhonesSimulateCreateSandboxPhoneRequest, SeamHttpPhonesSimulate, } from './phones/simulate/index.js' -import { - type SeamConsoleV1GetResourceLocatorOptions, - type SeamConsoleV1GetResourceLocatorParameters, - type SeamConsoleV1GetResourceLocatorRequest, - SeamHttpSeamConsoleV1, -} from './seam/console/v1/index.js' -import { - type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusOptions, - type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParameters, - type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusRequest, - type SeamConsoleV1LynxMigrationGetReservationMigrationStatusOptions, - type SeamConsoleV1LynxMigrationGetReservationMigrationStatusParameters, - type SeamConsoleV1LynxMigrationGetReservationMigrationStatusRequest, - type SeamConsoleV1LynxMigrationListPropertyReservationsOptions, - type SeamConsoleV1LynxMigrationListPropertyReservationsParameters, - type SeamConsoleV1LynxMigrationListPropertyReservationsRequest, - type SeamConsoleV1LynxMigrationMigratePropertyOptions, - type SeamConsoleV1LynxMigrationMigratePropertyParameters, - type SeamConsoleV1LynxMigrationMigratePropertyRequest, - SeamHttpSeamConsoleV1LynxMigration, -} from './seam/console/v1/lynx-migration/index.js' -import { - type SeamConsoleV1SitesCreateOptions, - type SeamConsoleV1SitesCreateParameters, - type SeamConsoleV1SitesCreateRequest, - type SeamConsoleV1SitesDeleteOptions, - type SeamConsoleV1SitesDeleteParameters, - type SeamConsoleV1SitesDeleteRequest, - type SeamConsoleV1SitesListOptions, - type SeamConsoleV1SitesListParameters, - type SeamConsoleV1SitesListRequest, - type SeamConsoleV1SitesUpdateOptions, - type SeamConsoleV1SitesUpdateParameters, - type SeamConsoleV1SitesUpdateRequest, - SeamHttpSeamConsoleV1Sites, -} from './seam/console/v1/sites/index.js' -import { - type SeamConsoleV1TimelinesGetOptions, - type SeamConsoleV1TimelinesGetParameters, - type SeamConsoleV1TimelinesGetRequest, - SeamHttpSeamConsoleV1Timelines, -} from './seam/console/v1/timelines/index.js' -import { - type SeamConsoleV1WorkspaceFeatureFlagsListOptions, - type SeamConsoleV1WorkspaceFeatureFlagsListParameters, - type SeamConsoleV1WorkspaceFeatureFlagsListRequest, - type SeamConsoleV1WorkspaceFeatureFlagsUpdateOptions, - type SeamConsoleV1WorkspaceFeatureFlagsUpdateParameters, - type SeamConsoleV1WorkspaceFeatureFlagsUpdateRequest, - SeamHttpSeamConsoleV1WorkspaceFeatureFlags, -} from './seam/console/v1/workspace/feature-flags/index.js' -import { - type SeamCustomerV1AccessGrantsListOptions, - type SeamCustomerV1AccessGrantsListParameters, - type SeamCustomerV1AccessGrantsListRequest, - type SeamCustomerV1AccessGrantsUpdateOptions, - type SeamCustomerV1AccessGrantsUpdateParameters, - type SeamCustomerV1AccessGrantsUpdateRequest, - SeamHttpSeamCustomerV1AccessGrants, -} from './seam/customer/v1/access-grants/index.js' -import { - type SeamCustomerV1AccessMethodsEncodeOptions, - type SeamCustomerV1AccessMethodsEncodeParameters, - type SeamCustomerV1AccessMethodsEncodeRequest, - SeamHttpSeamCustomerV1AccessMethods, -} from './seam/customer/v1/access-methods/index.js' -import { - type SeamCustomerV1AutomationRunsListOptions, - type SeamCustomerV1AutomationRunsListParameters, - type SeamCustomerV1AutomationRunsListRequest, - SeamHttpSeamCustomerV1AutomationRuns, -} from './seam/customer/v1/automation-runs/index.js' -import { - type SeamCustomerV1AutomationsDeleteOptions, - type SeamCustomerV1AutomationsDeleteParameters, - type SeamCustomerV1AutomationsDeleteRequest, - type SeamCustomerV1AutomationsGetOptions, - type SeamCustomerV1AutomationsGetParameters, - type SeamCustomerV1AutomationsGetRequest, - type SeamCustomerV1AutomationsUpdateOptions, - type SeamCustomerV1AutomationsUpdateParameters, - type SeamCustomerV1AutomationsUpdateRequest, - SeamHttpSeamCustomerV1Automations, -} from './seam/customer/v1/automations/index.js' -import { - type SeamCustomerV1ConnectorCustomersListOptions, - type SeamCustomerV1ConnectorCustomersListParameters, - 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, - type SeamCustomerV1ConnectorsIcalValidateConfigRequest, - SeamHttpSeamCustomerV1ConnectorsIcal, -} from './seam/customer/v1/connectors/ical/index.js' -import { - type SeamCustomerV1ConnectorsAuthorizeOptions, - type SeamCustomerV1ConnectorsAuthorizeParameters, - type SeamCustomerV1ConnectorsAuthorizeRequest, - type SeamCustomerV1ConnectorsConnectorTypesOptions, - type SeamCustomerV1ConnectorsConnectorTypesParameters, - type SeamCustomerV1ConnectorsConnectorTypesRequest, - type SeamCustomerV1ConnectorsCreateOptions, - type SeamCustomerV1ConnectorsCreateParameters, - type SeamCustomerV1ConnectorsCreateRequest, - type SeamCustomerV1ConnectorsDeleteOptions, - type SeamCustomerV1ConnectorsDeleteParameters, - type SeamCustomerV1ConnectorsDeleteRequest, - type SeamCustomerV1ConnectorsListOptions, - type SeamCustomerV1ConnectorsListParameters, - type SeamCustomerV1ConnectorsListRequest, - type SeamCustomerV1ConnectorsSyncOptions, - type SeamCustomerV1ConnectorsSyncParameters, - type SeamCustomerV1ConnectorsSyncRequest, - type SeamCustomerV1ConnectorsUpdateOptions, - type SeamCustomerV1ConnectorsUpdateParameters, - type SeamCustomerV1ConnectorsUpdateRequest, - SeamHttpSeamCustomerV1Connectors, -} from './seam/customer/v1/connectors/index.js' -import { - type SeamCustomerV1CustomersAutomationsGetOptions, - type SeamCustomerV1CustomersAutomationsGetParameters, - type SeamCustomerV1CustomersAutomationsGetRequest, - type SeamCustomerV1CustomersAutomationsUpdateOptions, - type SeamCustomerV1CustomersAutomationsUpdateParameters, - type SeamCustomerV1CustomersAutomationsUpdateRequest, - SeamHttpSeamCustomerV1CustomersAutomations, -} from './seam/customer/v1/customers/automations/index.js' -import { - type SeamCustomerV1CustomersListOptions, - type SeamCustomerV1CustomersListParameters, - type SeamCustomerV1CustomersListRequest, - type SeamCustomerV1CustomersMeOptions, - type SeamCustomerV1CustomersMeParameters, - type SeamCustomerV1CustomersMeRequest, - type SeamCustomerV1CustomersOpenPortalOptions, - type SeamCustomerV1CustomersOpenPortalParameters, - type SeamCustomerV1CustomersOpenPortalRequest, - SeamHttpSeamCustomerV1Customers, -} from './seam/customer/v1/customers/index.js' -import { - type SeamCustomerV1EncodersListOptions, - type SeamCustomerV1EncodersListParameters, - type SeamCustomerV1EncodersListRequest, - SeamHttpSeamCustomerV1Encoders, -} from './seam/customer/v1/encoders/index.js' -import { - type SeamCustomerV1EventsListOptions, - type SeamCustomerV1EventsListParameters, - type SeamCustomerV1EventsListRequest, - SeamHttpSeamCustomerV1Events, -} from './seam/customer/v1/events/index.js' -import { - type SeamCustomerV1PortalsGetOptions, - type SeamCustomerV1PortalsGetParameters, - type SeamCustomerV1PortalsGetRequest, - type SeamCustomerV1PortalsUpdateOptions, - type SeamCustomerV1PortalsUpdateParameters, - type SeamCustomerV1PortalsUpdateRequest, - SeamHttpSeamCustomerV1Portals, -} from './seam/customer/v1/portals/index.js' -import { - type SeamCustomerV1ReservationsGetOptions, - type SeamCustomerV1ReservationsGetParameters, - type SeamCustomerV1ReservationsGetRequest, - type SeamCustomerV1ReservationsListAccessGrantsOptions, - type SeamCustomerV1ReservationsListAccessGrantsParameters, - type SeamCustomerV1ReservationsListAccessGrantsRequest, - type SeamCustomerV1ReservationsListOptions, - type SeamCustomerV1ReservationsListParameters, - type SeamCustomerV1ReservationsListRequest, - SeamHttpSeamCustomerV1Reservations, -} from './seam/customer/v1/reservations/index.js' -import { - type SeamCustomerV1SettingsGetOptions, - type SeamCustomerV1SettingsGetParameters, - type SeamCustomerV1SettingsGetRequest, - type SeamCustomerV1SettingsUpdateOptions, - type SeamCustomerV1SettingsUpdateParameters, - type SeamCustomerV1SettingsUpdateRequest, - SeamHttpSeamCustomerV1Settings, -} from './seam/customer/v1/settings/index.js' -import { - type SeamCustomerV1SettingsVerticalResourceAliasesGetOptions, - type SeamCustomerV1SettingsVerticalResourceAliasesGetParameters, - type SeamCustomerV1SettingsVerticalResourceAliasesGetRequest, - SeamHttpSeamCustomerV1SettingsVerticalResourceAliases, -} from './seam/customer/v1/settings/vertical-resource-aliases/index.js' -import { - type SeamCustomerV1SpacesCreateOptions, - type SeamCustomerV1SpacesCreateParameters, - type SeamCustomerV1SpacesCreateRequest, - type SeamCustomerV1SpacesListOptions, - type SeamCustomerV1SpacesListParameters, - type SeamCustomerV1SpacesListRequest, - type SeamCustomerV1SpacesListReservationsOptions, - type SeamCustomerV1SpacesListReservationsParameters, - type SeamCustomerV1SpacesListReservationsRequest, - type SeamCustomerV1SpacesPushCommonAreasOptions, - type SeamCustomerV1SpacesPushCommonAreasParameters, - type SeamCustomerV1SpacesPushCommonAreasRequest, - SeamHttpSeamCustomerV1Spaces, -} from './seam/customer/v1/spaces/index.js' -import { - type SeamCustomerV1StaffMembersGetOptions, - type SeamCustomerV1StaffMembersGetParameters, - type SeamCustomerV1StaffMembersGetRequest, - type SeamCustomerV1StaffMembersListOptions, - type SeamCustomerV1StaffMembersListParameters, - type SeamCustomerV1StaffMembersListRequest, - SeamHttpSeamCustomerV1StaffMembers, -} from './seam/customer/v1/staff-members/index.js' -import { - SeamHttpSeamPartnerV1BuildingBlocksSpaces, - type SeamPartnerV1BuildingBlocksSpacesAutoMapOptions, - type SeamPartnerV1BuildingBlocksSpacesAutoMapParameters, - type SeamPartnerV1BuildingBlocksSpacesAutoMapRequest, -} from './seam/partner/v1/building-blocks/spaces/index.js' import { SeamHttpSpaces, type SpacesAddAcsEntrancesOptions, @@ -895,9 +607,6 @@ import { type ThermostatsDeleteClimatePresetOptions, type ThermostatsDeleteClimatePresetParameters, type ThermostatsDeleteClimatePresetRequest, - type ThermostatsGetOptions, - type ThermostatsGetParameters, - type ThermostatsGetRequest, type ThermostatsHeatCoolOptions, type ThermostatsHeatCoolParameters, type ThermostatsHeatCoolRequest, @@ -956,36 +665,6 @@ import { type ThermostatsSimulateTemperatureReachedParameters, type ThermostatsSimulateTemperatureReachedRequest, } from './thermostats/simulate/index.js' -import { - SeamHttpUnstablePartnerBuildingBlocks, - type UnstablePartnerBuildingBlocksConnectAccountsOptions, - type UnstablePartnerBuildingBlocksConnectAccountsParameters, - type UnstablePartnerBuildingBlocksConnectAccountsRequest, - type UnstablePartnerBuildingBlocksGenerateMagicLinkOptions, - type UnstablePartnerBuildingBlocksGenerateMagicLinkParameters, - type UnstablePartnerBuildingBlocksGenerateMagicLinkRequest, - type UnstablePartnerBuildingBlocksManageDevicesOptions, - type UnstablePartnerBuildingBlocksManageDevicesParameters, - type UnstablePartnerBuildingBlocksManageDevicesRequest, - type UnstablePartnerBuildingBlocksOrganizeSpacesOptions, - type UnstablePartnerBuildingBlocksOrganizeSpacesParameters, - type UnstablePartnerBuildingBlocksOrganizeSpacesRequest, -} from './unstable-partner/building-blocks/index.js' -import { - SeamHttpUserIdentitiesEnrollmentAutomations, - type UserIdentitiesEnrollmentAutomationsDeleteOptions, - type UserIdentitiesEnrollmentAutomationsDeleteParameters, - type UserIdentitiesEnrollmentAutomationsDeleteRequest, - type UserIdentitiesEnrollmentAutomationsGetOptions, - type UserIdentitiesEnrollmentAutomationsGetParameters, - type UserIdentitiesEnrollmentAutomationsGetRequest, - type UserIdentitiesEnrollmentAutomationsLaunchOptions, - type UserIdentitiesEnrollmentAutomationsLaunchParameters, - type UserIdentitiesEnrollmentAutomationsLaunchRequest, - type UserIdentitiesEnrollmentAutomationsListOptions, - type UserIdentitiesEnrollmentAutomationsListParameters, - type UserIdentitiesEnrollmentAutomationsListRequest, -} from './user-identities/enrollment-automations/index.js' import { SeamHttpUserIdentities, type UserIdentitiesAddAcsUserOptions, @@ -1061,32 +740,11 @@ import { type WebhooksUpdateParameters, type WebhooksUpdateRequest, } from './webhooks/index.js' -import { - SeamHttpWorkspacesCustomizationProfiles, - type WorkspacesCustomizationProfilesCreateOptions, - type WorkspacesCustomizationProfilesCreateParameters, - type WorkspacesCustomizationProfilesCreateRequest, - type WorkspacesCustomizationProfilesGetOptions, - type WorkspacesCustomizationProfilesGetParameters, - type WorkspacesCustomizationProfilesGetRequest, - type WorkspacesCustomizationProfilesListOptions, - type WorkspacesCustomizationProfilesListParameters, - type WorkspacesCustomizationProfilesListRequest, - type WorkspacesCustomizationProfilesUpdateOptions, - type WorkspacesCustomizationProfilesUpdateParameters, - type WorkspacesCustomizationProfilesUpdateRequest, - type WorkspacesCustomizationProfilesUploadImagesOptions, - type WorkspacesCustomizationProfilesUploadImagesParameters, - type WorkspacesCustomizationProfilesUploadImagesRequest, -} from './workspaces/customization-profiles/index.js' import { SeamHttpWorkspaces, type WorkspacesCreateOptions, type WorkspacesCreateParameters, type WorkspacesCreateRequest, - type WorkspacesFindAnythingOptions, - type WorkspacesFindAnythingParameters, - type WorkspacesFindAnythingRequest, type WorkspacesGetOptions, type WorkspacesGetParameters, type WorkspacesGetRequest, @@ -1293,24 +951,6 @@ export class SeamHttpEndpoints { } } - get '/access_codes/get_timeline'(): ( - parameters: AccessCodesGetTimelineParameters, - options?: AccessCodesGetTimelineOptions, - ) => AccessCodesGetTimelineRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function accessCodesGetTimeline( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAccessCodes.fromClient(client, defaults) - return seam.getTimeline(...args) - } - } - get '/access_codes/list'(): ( parameters?: AccessCodesListParameters, options?: AccessCodesListOptions, @@ -1794,83 +1434,6 @@ export class SeamHttpEndpoints { } } - get '/acs/access_groups/unmanaged/get'(): ( - parameters: AcsAccessGroupsUnmanagedGetParameters, - options?: AcsAccessGroupsUnmanagedGetOptions, - ) => AcsAccessGroupsUnmanagedGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsAccessGroupsUnmanagedGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsAccessGroupsUnmanaged.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/acs/access_groups/unmanaged/list'(): ( - parameters?: AcsAccessGroupsUnmanagedListParameters, - options?: AcsAccessGroupsUnmanagedListOptions, - ) => AcsAccessGroupsUnmanagedListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsAccessGroupsUnmanagedList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsAccessGroupsUnmanaged.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/acs/credential_pools/list'(): ( - parameters: AcsCredentialPoolsListParameters, - options?: AcsCredentialPoolsListOptions, - ) => AcsCredentialPoolsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsCredentialPoolsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsCredentialPools.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/acs/credential_provisioning_automations/launch'(): ( - parameters: AcsCredentialProvisioningAutomationsLaunchParameters, - options?: AcsCredentialProvisioningAutomationsLaunchOptions, - ) => AcsCredentialProvisioningAutomationsLaunchRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsCredentialProvisioningAutomationsLaunch( - ...args: Parameters< - SeamHttpAcsCredentialProvisioningAutomations['launch'] - > - ): ReturnType { - const seam = SeamHttpAcsCredentialProvisioningAutomations.fromClient( - client, - defaults, - ) - return seam.launch(...args) - } - } - get '/acs/credentials/assign'(): ( parameters: AcsCredentialsAssignParameters, options?: AcsCredentialsAssignOptions, @@ -1897,24 +1460,6 @@ export class SeamHttpEndpoints { } } - get '/acs/credentials/create_offline_code'(): ( - parameters: AcsCredentialsCreateOfflineCodeParameters, - options?: AcsCredentialsCreateOfflineCodeOptions, - ) => AcsCredentialsCreateOfflineCodeRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsCredentialsCreateOfflineCode( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsCredentials.fromClient(client, defaults) - return seam.createOfflineCode(...args) - } - } - get '/acs/credentials/delete'(): ( parameters: AcsCredentialsDeleteParameters, options?: AcsCredentialsDeleteOptions, @@ -1993,42 +1538,6 @@ export class SeamHttpEndpoints { } } - get '/acs/credentials/unmanaged/get'(): ( - parameters: AcsCredentialsUnmanagedGetParameters, - options?: AcsCredentialsUnmanagedGetOptions, - ) => AcsCredentialsUnmanagedGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsCredentialsUnmanagedGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsCredentialsUnmanaged.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/acs/credentials/unmanaged/list'(): ( - parameters?: AcsCredentialsUnmanagedListParameters, - options?: AcsCredentialsUnmanagedListOptions, - ) => AcsCredentialsUnmanagedListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsCredentialsUnmanagedList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsCredentialsUnmanaged.fromClient(client, defaults) - return seam.list(...args) - } - } - get '/acs/encoders/encode_credential'(): ( parameters: AcsEncodersEncodeCredentialParameters, options?: AcsEncodersEncodeCredentialOptions, @@ -2422,42 +1931,6 @@ export class SeamHttpEndpoints { } } - get '/acs/users/unmanaged/get'(): ( - parameters: AcsUsersUnmanagedGetParameters, - options?: AcsUsersUnmanagedGetOptions, - ) => AcsUsersUnmanagedGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsUsersUnmanagedGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsUsersUnmanaged.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/acs/users/unmanaged/list'(): ( - parameters?: AcsUsersUnmanagedListParameters, - options?: AcsUsersUnmanagedListOptions, - ) => AcsUsersUnmanagedListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function acsUsersUnmanagedList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpAcsUsersUnmanaged.fromClient(client, defaults) - return seam.list(...args) - } - } - get '/action_attempts/get'(): ( parameters: ActionAttemptsGetParameters, options?: ActionAttemptsGetOptions, @@ -2484,42 +1957,6 @@ export class SeamHttpEndpoints { } } - get '/bridges/get'(): ( - parameters: BridgesGetParameters, - options?: BridgesGetOptions, - ) => BridgesGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function bridgesGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpBridges.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/bridges/list'(): ( - parameters?: BridgesListParameters, - options?: BridgesListOptions, - ) => BridgesListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function bridgesList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpBridges.fromClient(client, defaults) - return seam.list(...args) - } - } - get '/client_sessions/create'(): ( parameters?: ClientSessionsCreateParameters, options?: ClientSessionsCreateOptions, @@ -2783,42 +2220,6 @@ export class SeamHttpEndpoints { } } - get '/customers/reservations/create_deep_link'(): ( - parameters: CustomersReservationsCreateDeepLinkParameters, - options?: CustomersReservationsCreateDeepLinkOptions, - ) => CustomersReservationsCreateDeepLinkRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function customersReservationsCreateDeepLink( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpCustomersReservations.fromClient(client, defaults) - return seam.createDeepLink(...args) - } - } - - get '/devices/delete'(): ( - parameters: DevicesDeleteParameters, - options?: DevicesDeleteOptions, - ) => DevicesDeleteRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function devicesDelete( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpDevices.fromClient(client, defaults) - return seam.delete(...args) - } - } - get '/devices/get'(): ( parameters?: DevicesGetParameters, options?: DevicesGetOptions, @@ -3315,1128 +2716,114 @@ export class SeamHttpEndpoints { } } - get '/seam/console/v1/get_resource_locator'(): ( - parameters?: SeamConsoleV1GetResourceLocatorParameters, - options?: SeamConsoleV1GetResourceLocatorOptions, - ) => SeamConsoleV1GetResourceLocatorRequest { + get '/spaces/add_acs_entrances'(): ( + parameters: SpacesAddAcsEntrancesParameters, + options?: SpacesAddAcsEntrancesOptions, + ) => SpacesAddAcsEntrancesRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1GetResourceLocator( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1.fromClient(client, defaults) - return seam.getResourceLocator(...args) + return function spacesAddAcsEntrances( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.addAcsEntrances(...args) } } - get '/seam/console/v1/lynx_migration/get_property_migration_status'(): ( - parameters: SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParameters, - options?: SeamConsoleV1LynxMigrationGetPropertyMigrationStatusOptions, - ) => SeamConsoleV1LynxMigrationGetPropertyMigrationStatusRequest { + get '/spaces/add_connected_account'(): ( + parameters: SpacesAddConnectedAccountParameters, + options?: SpacesAddConnectedAccountOptions, + ) => SpacesAddConnectedAccountRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1LynxMigrationGetPropertyMigrationStatus( - ...args: Parameters< - SeamHttpSeamConsoleV1LynxMigration['getPropertyMigrationStatus'] - > - ): ReturnType< - SeamHttpSeamConsoleV1LynxMigration['getPropertyMigrationStatus'] - > { - const seam = SeamHttpSeamConsoleV1LynxMigration.fromClient( - client, - defaults, - ) - return seam.getPropertyMigrationStatus(...args) + return function spacesAddConnectedAccount( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.addConnectedAccount(...args) } } - get '/seam/console/v1/lynx_migration/get_reservation_migration_status'(): ( - parameters: SeamConsoleV1LynxMigrationGetReservationMigrationStatusParameters, - options?: SeamConsoleV1LynxMigrationGetReservationMigrationStatusOptions, - ) => SeamConsoleV1LynxMigrationGetReservationMigrationStatusRequest { + get '/spaces/add_devices'(): ( + parameters: SpacesAddDevicesParameters, + options?: SpacesAddDevicesOptions, + ) => SpacesAddDevicesRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1LynxMigrationGetReservationMigrationStatus( - ...args: Parameters< - SeamHttpSeamConsoleV1LynxMigration['getReservationMigrationStatus'] - > - ): ReturnType< - SeamHttpSeamConsoleV1LynxMigration['getReservationMigrationStatus'] - > { - const seam = SeamHttpSeamConsoleV1LynxMigration.fromClient( - client, - defaults, - ) - return seam.getReservationMigrationStatus(...args) + return function spacesAddDevices( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.addDevices(...args) } } - get '/seam/console/v1/lynx_migration/list_property_reservations'(): ( - parameters: SeamConsoleV1LynxMigrationListPropertyReservationsParameters, - options?: SeamConsoleV1LynxMigrationListPropertyReservationsOptions, - ) => SeamConsoleV1LynxMigrationListPropertyReservationsRequest { + get '/spaces/create'(): ( + parameters: SpacesCreateParameters, + options?: SpacesCreateOptions, + ) => SpacesCreateRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1LynxMigrationListPropertyReservations( - ...args: Parameters< - SeamHttpSeamConsoleV1LynxMigration['listPropertyReservations'] - > - ): ReturnType< - SeamHttpSeamConsoleV1LynxMigration['listPropertyReservations'] - > { - const seam = SeamHttpSeamConsoleV1LynxMigration.fromClient( - client, - defaults, - ) - return seam.listPropertyReservations(...args) + return function spacesCreate( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.create(...args) } } - get '/seam/console/v1/lynx_migration/migrate_property'(): ( - parameters: SeamConsoleV1LynxMigrationMigratePropertyParameters, - options?: SeamConsoleV1LynxMigrationMigratePropertyOptions, - ) => SeamConsoleV1LynxMigrationMigratePropertyRequest { + get '/spaces/delete'(): ( + parameters: SpacesDeleteParameters, + options?: SpacesDeleteOptions, + ) => SpacesDeleteRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1LynxMigrationMigrateProperty( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1LynxMigration.fromClient( - client, - defaults, - ) - return seam.migrateProperty(...args) + return function spacesDelete( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.delete(...args) } } - get '/seam/console/v1/sites/create'(): ( - parameters: SeamConsoleV1SitesCreateParameters, - options?: SeamConsoleV1SitesCreateOptions, - ) => SeamConsoleV1SitesCreateRequest { + get '/spaces/get'(): ( + parameters?: SpacesGetParameters, + options?: SpacesGetOptions, + ) => SpacesGetRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1SitesCreate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults) - return seam.create(...args) + return function spacesGet( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.get(...args) } } - get '/seam/console/v1/sites/delete'(): ( - parameters: SeamConsoleV1SitesDeleteParameters, - options?: SeamConsoleV1SitesDeleteOptions, - ) => SeamConsoleV1SitesDeleteRequest { + get '/spaces/get_related'(): ( + parameters?: SpacesGetRelatedParameters, + options?: SpacesGetRelatedOptions, + ) => SpacesGetRelatedRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1SitesDelete( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults) - return seam.delete(...args) + return function spacesGetRelated( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) + return seam.getRelated(...args) } } - get '/seam/console/v1/sites/list'(): ( - parameters?: SeamConsoleV1SitesListParameters, - options?: SeamConsoleV1SitesListOptions, - ) => SeamConsoleV1SitesListRequest { + get '/spaces/list'(): ( + parameters?: SpacesListParameters, + options?: SpacesListOptions, + ) => SpacesListRequest { const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1SitesList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults) + return function spacesList( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpSpaces.fromClient(client, defaults) return seam.list(...args) } } - get '/seam/console/v1/sites/update'(): ( - parameters: SeamConsoleV1SitesUpdateParameters, - options?: SeamConsoleV1SitesUpdateOptions, - ) => SeamConsoleV1SitesUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1SitesUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1Sites.fromClient(client, defaults) - return seam.update(...args) - } - } - - get '/seam/console/v1/timelines/get'(): ( - parameters: SeamConsoleV1TimelinesGetParameters, - options?: SeamConsoleV1TimelinesGetOptions, - ) => SeamConsoleV1TimelinesGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1TimelinesGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1Timelines.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/seam/console/v1/workspace/feature_flags/list'(): ( - parameters?: SeamConsoleV1WorkspaceFeatureFlagsListParameters, - options?: SeamConsoleV1WorkspaceFeatureFlagsListOptions, - ) => SeamConsoleV1WorkspaceFeatureFlagsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1WorkspaceFeatureFlagsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/console/v1/workspace/feature_flags/update'(): ( - parameters: SeamConsoleV1WorkspaceFeatureFlagsUpdateParameters, - options?: SeamConsoleV1WorkspaceFeatureFlagsUpdateOptions, - ) => SeamConsoleV1WorkspaceFeatureFlagsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamConsoleV1WorkspaceFeatureFlagsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClient( - client, - defaults, - ) - return seam.update(...args) - } - } - - get '/seam/customer/v1/access_grants/list'(): ( - parameters?: SeamCustomerV1AccessGrantsListParameters, - options?: SeamCustomerV1AccessGrantsListOptions, - ) => SeamCustomerV1AccessGrantsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AccessGrantsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1AccessGrants.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/customer/v1/access_grants/update'(): ( - parameters: SeamCustomerV1AccessGrantsUpdateParameters, - options?: SeamCustomerV1AccessGrantsUpdateOptions, - ) => SeamCustomerV1AccessGrantsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AccessGrantsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1AccessGrants.fromClient( - client, - defaults, - ) - return seam.update(...args) - } - } - - get '/seam/customer/v1/access_methods/encode'(): ( - parameters: SeamCustomerV1AccessMethodsEncodeParameters, - options?: SeamCustomerV1AccessMethodsEncodeOptions, - ) => SeamCustomerV1AccessMethodsEncodeRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AccessMethodsEncode( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1AccessMethods.fromClient( - client, - defaults, - ) - return seam.encode(...args) - } - } - - get '/seam/customer/v1/automation_runs/list'(): ( - parameters?: SeamCustomerV1AutomationRunsListParameters, - options?: SeamCustomerV1AutomationRunsListOptions, - ) => SeamCustomerV1AutomationRunsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AutomationRunsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1AutomationRuns.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/customer/v1/automations/delete'(): ( - parameters?: SeamCustomerV1AutomationsDeleteParameters, - options?: SeamCustomerV1AutomationsDeleteOptions, - ) => SeamCustomerV1AutomationsDeleteRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AutomationsDelete( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Automations.fromClient( - client, - defaults, - ) - return seam.delete(...args) - } - } - - get '/seam/customer/v1/automations/get'(): ( - parameters?: SeamCustomerV1AutomationsGetParameters, - options?: SeamCustomerV1AutomationsGetOptions, - ) => SeamCustomerV1AutomationsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AutomationsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Automations.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/seam/customer/v1/automations/update'(): ( - parameters?: SeamCustomerV1AutomationsUpdateParameters, - options?: SeamCustomerV1AutomationsUpdateOptions, - ) => SeamCustomerV1AutomationsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1AutomationsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Automations.fromClient( - client, - defaults, - ) - return seam.update(...args) - } - } - - get '/seam/customer/v1/connector_customers/list'(): ( - parameters?: SeamCustomerV1ConnectorCustomersListParameters, - options?: SeamCustomerV1ConnectorCustomersListOptions, - ) => SeamCustomerV1ConnectorCustomersListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorCustomersList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1ConnectorCustomers.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/customer/v1/connectors/authorize'(): ( - parameters: SeamCustomerV1ConnectorsAuthorizeParameters, - options?: SeamCustomerV1ConnectorsAuthorizeOptions, - ) => SeamCustomerV1ConnectorsAuthorizeRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsAuthorize( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.authorize(...args) - } - } - - get '/seam/customer/v1/connectors/connector_types'(): ( - parameters?: SeamCustomerV1ConnectorsConnectorTypesParameters, - options?: SeamCustomerV1ConnectorsConnectorTypesOptions, - ) => SeamCustomerV1ConnectorsConnectorTypesRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsConnectorTypes( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.connectorTypes(...args) - } - } - - get '/seam/customer/v1/connectors/create'(): ( - parameters: SeamCustomerV1ConnectorsCreateParameters, - options?: SeamCustomerV1ConnectorsCreateOptions, - ) => SeamCustomerV1ConnectorsCreateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsCreate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.create(...args) - } - } - - get '/seam/customer/v1/connectors/delete'(): ( - parameters: SeamCustomerV1ConnectorsDeleteParameters, - options?: SeamCustomerV1ConnectorsDeleteOptions, - ) => SeamCustomerV1ConnectorsDeleteRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsDelete( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.delete(...args) - } - } - - get '/seam/customer/v1/connectors/list'(): ( - parameters?: SeamCustomerV1ConnectorsListParameters, - options?: SeamCustomerV1ConnectorsListOptions, - ) => SeamCustomerV1ConnectorsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/seam/customer/v1/connectors/sync'(): ( - parameters: SeamCustomerV1ConnectorsSyncParameters, - 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 { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.sync(...args) - } - } - - get '/seam/customer/v1/connectors/update'(): ( - parameters: SeamCustomerV1ConnectorsUpdateParameters, - options?: SeamCustomerV1ConnectorsUpdateOptions, - ) => SeamCustomerV1ConnectorsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Connectors.fromClient(client, defaults) - return seam.update(...args) - } - } - - 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, - ) => SeamCustomerV1ConnectorsIcalValidateConfigRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ConnectorsIcalValidateConfig( - ...args: Parameters< - SeamHttpSeamCustomerV1ConnectorsIcal['validateConfig'] - > - ): ReturnType { - const seam = SeamHttpSeamCustomerV1ConnectorsIcal.fromClient( - client, - defaults, - ) - return seam.validateConfig(...args) - } - } - - get '/seam/customer/v1/customers/automations/get'(): ( - parameters?: SeamCustomerV1CustomersAutomationsGetParameters, - options?: SeamCustomerV1CustomersAutomationsGetOptions, - ) => SeamCustomerV1CustomersAutomationsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1CustomersAutomationsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/seam/customer/v1/customers/automations/update'(): ( - parameters?: SeamCustomerV1CustomersAutomationsUpdateParameters, - options?: SeamCustomerV1CustomersAutomationsUpdateOptions, - ) => SeamCustomerV1CustomersAutomationsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1CustomersAutomationsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1CustomersAutomations.fromClient( - client, - defaults, - ) - return seam.update(...args) - } - } - - get '/seam/customer/v1/customers/list'(): ( - parameters?: SeamCustomerV1CustomersListParameters, - options?: SeamCustomerV1CustomersListOptions, - ) => SeamCustomerV1CustomersListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1CustomersList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Customers.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/seam/customer/v1/customers/me'(): ( - parameters?: SeamCustomerV1CustomersMeParameters, - options?: SeamCustomerV1CustomersMeOptions, - ) => SeamCustomerV1CustomersMeRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1CustomersMe( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Customers.fromClient(client, defaults) - return seam.me(...args) - } - } - - get '/seam/customer/v1/customers/open_portal'(): ( - parameters: SeamCustomerV1CustomersOpenPortalParameters, - options?: SeamCustomerV1CustomersOpenPortalOptions, - ) => SeamCustomerV1CustomersOpenPortalRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1CustomersOpenPortal( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Customers.fromClient(client, defaults) - return seam.openPortal(...args) - } - } - - get '/seam/customer/v1/encoders/list'(): ( - parameters?: SeamCustomerV1EncodersListParameters, - options?: SeamCustomerV1EncodersListOptions, - ) => SeamCustomerV1EncodersListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1EncodersList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Encoders.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/seam/customer/v1/events/list'(): ( - parameters: SeamCustomerV1EventsListParameters, - options?: SeamCustomerV1EventsListOptions, - ) => SeamCustomerV1EventsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1EventsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Events.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/seam/customer/v1/portals/get'(): ( - parameters: SeamCustomerV1PortalsGetParameters, - options?: SeamCustomerV1PortalsGetOptions, - ) => SeamCustomerV1PortalsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1PortalsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Portals.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/seam/customer/v1/portals/update'(): ( - parameters: SeamCustomerV1PortalsUpdateParameters, - options?: SeamCustomerV1PortalsUpdateOptions, - ) => SeamCustomerV1PortalsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1PortalsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Portals.fromClient(client, defaults) - return seam.update(...args) - } - } - - get '/seam/customer/v1/reservations/get'(): ( - parameters?: SeamCustomerV1ReservationsGetParameters, - options?: SeamCustomerV1ReservationsGetOptions, - ) => SeamCustomerV1ReservationsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ReservationsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Reservations.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/seam/customer/v1/reservations/list'(): ( - parameters?: SeamCustomerV1ReservationsListParameters, - options?: SeamCustomerV1ReservationsListOptions, - ) => SeamCustomerV1ReservationsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ReservationsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Reservations.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/customer/v1/reservations/list_access_grants'(): ( - parameters: SeamCustomerV1ReservationsListAccessGrantsParameters, - options?: SeamCustomerV1ReservationsListAccessGrantsOptions, - ) => SeamCustomerV1ReservationsListAccessGrantsRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1ReservationsListAccessGrants( - ...args: Parameters< - SeamHttpSeamCustomerV1Reservations['listAccessGrants'] - > - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Reservations.fromClient( - client, - defaults, - ) - return seam.listAccessGrants(...args) - } - } - - get '/seam/customer/v1/settings/get'(): ( - parameters?: SeamCustomerV1SettingsGetParameters, - options?: SeamCustomerV1SettingsGetOptions, - ) => SeamCustomerV1SettingsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1SettingsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Settings.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/seam/customer/v1/settings/update'(): ( - parameters?: SeamCustomerV1SettingsUpdateParameters, - options?: SeamCustomerV1SettingsUpdateOptions, - ) => SeamCustomerV1SettingsUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1SettingsUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Settings.fromClient(client, defaults) - return seam.update(...args) - } - } - - get '/seam/customer/v1/settings/vertical_resource_aliases/get'(): ( - parameters?: SeamCustomerV1SettingsVerticalResourceAliasesGetParameters, - options?: SeamCustomerV1SettingsVerticalResourceAliasesGetOptions, - ) => SeamCustomerV1SettingsVerticalResourceAliasesGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1SettingsVerticalResourceAliasesGet( - ...args: Parameters< - SeamHttpSeamCustomerV1SettingsVerticalResourceAliases['get'] - > - ): ReturnType< - SeamHttpSeamCustomerV1SettingsVerticalResourceAliases['get'] - > { - const seam = - SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/seam/customer/v1/spaces/create'(): ( - parameters: SeamCustomerV1SpacesCreateParameters, - 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 { - const seam = SeamHttpSeamCustomerV1Spaces.fromClient(client, defaults) - return seam.create(...args) - } - } - - get '/seam/customer/v1/spaces/list'(): ( - parameters?: SeamCustomerV1SpacesListParameters, - 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 { - const seam = SeamHttpSeamCustomerV1Spaces.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/seam/customer/v1/spaces/list_reservations'(): ( - parameters: SeamCustomerV1SpacesListReservationsParameters, - options?: SeamCustomerV1SpacesListReservationsOptions, - ) => SeamCustomerV1SpacesListReservationsRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1SpacesListReservations( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Spaces.fromClient(client, defaults) - return seam.listReservations(...args) - } - } - - get '/seam/customer/v1/spaces/push_common_areas'(): ( - parameters?: SeamCustomerV1SpacesPushCommonAreasParameters, - options?: SeamCustomerV1SpacesPushCommonAreasOptions, - ) => SeamCustomerV1SpacesPushCommonAreasRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1SpacesPushCommonAreas( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1Spaces.fromClient(client, defaults) - return seam.pushCommonAreas(...args) - } - } - - get '/seam/customer/v1/staff_members/get'(): ( - parameters: SeamCustomerV1StaffMembersGetParameters, - options?: SeamCustomerV1StaffMembersGetOptions, - ) => SeamCustomerV1StaffMembersGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1StaffMembersGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1StaffMembers.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/seam/customer/v1/staff_members/list'(): ( - parameters?: SeamCustomerV1StaffMembersListParameters, - options?: SeamCustomerV1StaffMembersListOptions, - ) => SeamCustomerV1StaffMembersListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamCustomerV1StaffMembersList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamCustomerV1StaffMembers.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/seam/partner/v1/building_blocks/spaces/auto_map'(): ( - parameters?: SeamPartnerV1BuildingBlocksSpacesAutoMapParameters, - options?: SeamPartnerV1BuildingBlocksSpacesAutoMapOptions, - ) => SeamPartnerV1BuildingBlocksSpacesAutoMapRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function seamPartnerV1BuildingBlocksSpacesAutoMap( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromClient( - client, - defaults, - ) - return seam.autoMap(...args) - } - } - - get '/spaces/add_acs_entrances'(): ( - parameters: SpacesAddAcsEntrancesParameters, - options?: SpacesAddAcsEntrancesOptions, - ) => SpacesAddAcsEntrancesRequest { - const { client, defaults } = this - return function spacesAddAcsEntrances( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.addAcsEntrances(...args) - } - } - - get '/spaces/add_connected_account'(): ( - parameters: SpacesAddConnectedAccountParameters, - options?: SpacesAddConnectedAccountOptions, - ) => SpacesAddConnectedAccountRequest { - const { client, defaults } = this - return function spacesAddConnectedAccount( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.addConnectedAccount(...args) - } - } - - get '/spaces/add_devices'(): ( - parameters: SpacesAddDevicesParameters, - options?: SpacesAddDevicesOptions, - ) => SpacesAddDevicesRequest { - const { client, defaults } = this - return function spacesAddDevices( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.addDevices(...args) - } - } - - get '/spaces/create'(): ( - parameters: SpacesCreateParameters, - options?: SpacesCreateOptions, - ) => SpacesCreateRequest { - const { client, defaults } = this - return function spacesCreate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.create(...args) - } - } - - get '/spaces/delete'(): ( - parameters: SpacesDeleteParameters, - options?: SpacesDeleteOptions, - ) => SpacesDeleteRequest { - const { client, defaults } = this - return function spacesDelete( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.delete(...args) - } - } - - get '/spaces/get'(): ( - parameters?: SpacesGetParameters, - options?: SpacesGetOptions, - ) => SpacesGetRequest { - const { client, defaults } = this - return function spacesGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.get(...args) - } - } - - get '/spaces/get_related'(): ( - parameters?: SpacesGetRelatedParameters, - options?: SpacesGetRelatedOptions, - ) => SpacesGetRelatedRequest { - const { client, defaults } = this - return function spacesGetRelated( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.getRelated(...args) - } - } - - get '/spaces/list'(): ( - parameters?: SpacesListParameters, - options?: SpacesListOptions, - ) => SpacesListRequest { - const { client, defaults } = this - return function spacesList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSpaces.fromClient(client, defaults) - return seam.list(...args) - } - } - - get '/spaces/remove_acs_entrances'(): ( - parameters: SpacesRemoveAcsEntrancesParameters, - options?: SpacesRemoveAcsEntrancesOptions, - ) => SpacesRemoveAcsEntrancesRequest { + get '/spaces/remove_acs_entrances'(): ( + parameters: SpacesRemoveAcsEntrancesParameters, + options?: SpacesRemoveAcsEntrancesOptions, + ) => SpacesRemoveAcsEntrancesRequest { const { client, defaults } = this return function spacesRemoveAcsEntrances( ...args: Parameters @@ -4537,24 +2924,6 @@ export class SeamHttpEndpoints { } } - get '/thermostats/get'(): ( - parameters?: ThermostatsGetParameters, - options?: ThermostatsGetOptions, - ) => ThermostatsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function thermostatsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpThermostats.fromClient(client, defaults) - return seam.get(...args) - } - } - get '/thermostats/heat'(): ( parameters: ThermostatsHeatParameters, options?: ThermostatsHeatOptions, @@ -4815,98 +3184,6 @@ export class SeamHttpEndpoints { } } - get '/unstable_partner/building_blocks/connect_accounts'(): ( - parameters: UnstablePartnerBuildingBlocksConnectAccountsParameters, - options?: UnstablePartnerBuildingBlocksConnectAccountsOptions, - ) => UnstablePartnerBuildingBlocksConnectAccountsRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function unstablePartnerBuildingBlocksConnectAccounts( - ...args: Parameters< - SeamHttpUnstablePartnerBuildingBlocks['connectAccounts'] - > - ): ReturnType { - const seam = SeamHttpUnstablePartnerBuildingBlocks.fromClient( - client, - defaults, - ) - return seam.connectAccounts(...args) - } - } - - get '/unstable_partner/building_blocks/generate_magic_link'(): ( - parameters: UnstablePartnerBuildingBlocksGenerateMagicLinkParameters, - options?: UnstablePartnerBuildingBlocksGenerateMagicLinkOptions, - ) => UnstablePartnerBuildingBlocksGenerateMagicLinkRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function unstablePartnerBuildingBlocksGenerateMagicLink( - ...args: Parameters< - SeamHttpUnstablePartnerBuildingBlocks['generateMagicLink'] - > - ): ReturnType { - const seam = SeamHttpUnstablePartnerBuildingBlocks.fromClient( - client, - defaults, - ) - return seam.generateMagicLink(...args) - } - } - - get '/unstable_partner/building_blocks/manage_devices'(): ( - parameters: UnstablePartnerBuildingBlocksManageDevicesParameters, - options?: UnstablePartnerBuildingBlocksManageDevicesOptions, - ) => UnstablePartnerBuildingBlocksManageDevicesRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function unstablePartnerBuildingBlocksManageDevices( - ...args: Parameters< - SeamHttpUnstablePartnerBuildingBlocks['manageDevices'] - > - ): ReturnType { - const seam = SeamHttpUnstablePartnerBuildingBlocks.fromClient( - client, - defaults, - ) - return seam.manageDevices(...args) - } - } - - get '/unstable_partner/building_blocks/organize_spaces'(): ( - parameters: UnstablePartnerBuildingBlocksOrganizeSpacesParameters, - options?: UnstablePartnerBuildingBlocksOrganizeSpacesOptions, - ) => UnstablePartnerBuildingBlocksOrganizeSpacesRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function unstablePartnerBuildingBlocksOrganizeSpaces( - ...args: Parameters< - SeamHttpUnstablePartnerBuildingBlocks['organizeSpaces'] - > - ): ReturnType { - const seam = SeamHttpUnstablePartnerBuildingBlocks.fromClient( - client, - defaults, - ) - return seam.organizeSpaces(...args) - } - } - get '/user_identities/add_acs_user'(): ( parameters: UserIdentitiesAddAcsUserParameters, options?: UserIdentitiesAddAcsUserOptions, @@ -5089,90 +3366,6 @@ export class SeamHttpEndpoints { } } - get '/user_identities/enrollment_automations/delete'(): ( - parameters: UserIdentitiesEnrollmentAutomationsDeleteParameters, - options?: UserIdentitiesEnrollmentAutomationsDeleteOptions, - ) => UserIdentitiesEnrollmentAutomationsDeleteRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function userIdentitiesEnrollmentAutomationsDelete( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient( - client, - defaults, - ) - return seam.delete(...args) - } - } - - get '/user_identities/enrollment_automations/get'(): ( - parameters: UserIdentitiesEnrollmentAutomationsGetParameters, - options?: UserIdentitiesEnrollmentAutomationsGetOptions, - ) => UserIdentitiesEnrollmentAutomationsGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function userIdentitiesEnrollmentAutomationsGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/user_identities/enrollment_automations/launch'(): ( - parameters: UserIdentitiesEnrollmentAutomationsLaunchParameters, - options?: UserIdentitiesEnrollmentAutomationsLaunchOptions, - ) => UserIdentitiesEnrollmentAutomationsLaunchRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function userIdentitiesEnrollmentAutomationsLaunch( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient( - client, - defaults, - ) - return seam.launch(...args) - } - } - - get '/user_identities/enrollment_automations/list'(): ( - parameters: UserIdentitiesEnrollmentAutomationsListParameters, - options?: UserIdentitiesEnrollmentAutomationsListOptions, - ) => UserIdentitiesEnrollmentAutomationsListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function userIdentitiesEnrollmentAutomationsList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpUserIdentitiesEnrollmentAutomations.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - get '/user_identities/unmanaged/get'(): ( parameters: UserIdentitiesUnmanagedGetParameters, options?: UserIdentitiesUnmanagedGetOptions, @@ -5290,24 +3483,6 @@ export class SeamHttpEndpoints { } } - get '/workspaces/find_anything'(): ( - parameters: WorkspacesFindAnythingParameters, - options?: WorkspacesFindAnythingOptions, - ) => WorkspacesFindAnythingRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function workspacesFindAnything( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpWorkspaces.fromClient(client, defaults) - return seam.findAnything(...args) - } - } - get '/workspaces/get'(): ( parameters?: WorkspacesGetParameters, options?: WorkspacesGetOptions, @@ -5359,119 +3534,11 @@ export class SeamHttpEndpoints { return seam.update(...args) } } - - get '/workspaces/customization_profiles/create'(): ( - parameters?: WorkspacesCustomizationProfilesCreateParameters, - options?: WorkspacesCustomizationProfilesCreateOptions, - ) => WorkspacesCustomizationProfilesCreateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function workspacesCustomizationProfilesCreate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient( - client, - defaults, - ) - return seam.create(...args) - } - } - - get '/workspaces/customization_profiles/get'(): ( - parameters: WorkspacesCustomizationProfilesGetParameters, - options?: WorkspacesCustomizationProfilesGetOptions, - ) => WorkspacesCustomizationProfilesGetRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function workspacesCustomizationProfilesGet( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient( - client, - defaults, - ) - return seam.get(...args) - } - } - - get '/workspaces/customization_profiles/list'(): ( - parameters?: WorkspacesCustomizationProfilesListParameters, - options?: WorkspacesCustomizationProfilesListOptions, - ) => WorkspacesCustomizationProfilesListRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function workspacesCustomizationProfilesList( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient( - client, - defaults, - ) - return seam.list(...args) - } - } - - get '/workspaces/customization_profiles/update'(): ( - parameters: WorkspacesCustomizationProfilesUpdateParameters, - options?: WorkspacesCustomizationProfilesUpdateOptions, - ) => WorkspacesCustomizationProfilesUpdateRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function workspacesCustomizationProfilesUpdate( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient( - client, - defaults, - ) - return seam.update(...args) - } - } - - get '/workspaces/customization_profiles/upload_images'(): ( - parameters?: WorkspacesCustomizationProfilesUploadImagesParameters, - options?: WorkspacesCustomizationProfilesUploadImagesOptions, - ) => WorkspacesCustomizationProfilesUploadImagesRequest { - const { client, defaults } = this - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return function workspacesCustomizationProfilesUploadImages( - ...args: Parameters< - SeamHttpWorkspacesCustomizationProfiles['uploadImages'] - > - ): ReturnType { - const seam = SeamHttpWorkspacesCustomizationProfiles.fromClient( - client, - defaults, - ) - return seam.uploadImages(...args) - } - } } export type SeamHttpEndpointQueryPaths = | '/access_codes/generate_code' | '/access_codes/get' - | '/access_codes/get_timeline' | '/access_codes/list' | '/access_codes/unmanaged/get' | '/access_codes/unmanaged/list' @@ -5489,14 +3556,9 @@ export type SeamHttpEndpointQueryPaths = | '/acs/access_groups/list' | '/acs/access_groups/list_accessible_entrances' | '/acs/access_groups/list_users' - | '/acs/access_groups/unmanaged/get' - | '/acs/access_groups/unmanaged/list' - | '/acs/credential_pools/list' | '/acs/credentials/get' | '/acs/credentials/list' | '/acs/credentials/list_accessible_entrances' - | '/acs/credentials/unmanaged/get' - | '/acs/credentials/unmanaged/list' | '/acs/encoders/get' | '/acs/encoders/list' | '/acs/entrances/get' @@ -5508,12 +3570,8 @@ export type SeamHttpEndpointQueryPaths = | '/acs/users/get' | '/acs/users/list' | '/acs/users/list_accessible_entrances' - | '/acs/users/unmanaged/get' - | '/acs/users/unmanaged/list' | '/action_attempts/get' | '/action_attempts/list' - | '/bridges/get' - | '/bridges/list' | '/client_sessions/get' | '/client_sessions/list' | '/connect_webviews/get' @@ -5536,62 +3594,24 @@ export type SeamHttpEndpointQueryPaths = | '/noise_sensors/noise_thresholds/list' | '/phones/get' | '/phones/list' - | '/seam/console/v1/get_resource_locator' - | '/seam/console/v1/lynx_migration/get_property_migration_status' - | '/seam/console/v1/lynx_migration/get_reservation_migration_status' - | '/seam/console/v1/lynx_migration/list_property_reservations' - | '/seam/console/v1/sites/list' - | '/seam/console/v1/timelines/get' - | '/seam/console/v1/workspace/feature_flags/list' - | '/seam/customer/v1/access_grants/list' - | '/seam/customer/v1/automation_runs/list' - | '/seam/customer/v1/automations/get' - | '/seam/customer/v1/connector_customers/list' - | '/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' - | '/seam/customer/v1/encoders/list' - | '/seam/customer/v1/events/list' - | '/seam/customer/v1/portals/get' - | '/seam/customer/v1/reservations/get' - | '/seam/customer/v1/reservations/list' - | '/seam/customer/v1/reservations/list_access_grants' - | '/seam/customer/v1/settings/get' - | '/seam/customer/v1/settings/vertical_resource_aliases/get' - | '/seam/customer/v1/spaces/list' - | '/seam/customer/v1/spaces/list_reservations' - | '/seam/customer/v1/staff_members/get' - | '/seam/customer/v1/staff_members/list' - | '/seam/partner/v1/building_blocks/spaces/auto_map' | '/spaces/get' | '/spaces/get_related' | '/spaces/list' - | '/thermostats/get' | '/thermostats/list' | '/thermostats/schedules/get' | '/thermostats/schedules/list' - | '/unstable_partner/building_blocks/generate_magic_link' | '/user_identities/get' | '/user_identities/list' | '/user_identities/list_accessible_devices' | '/user_identities/list_accessible_entrances' | '/user_identities/list_acs_systems' | '/user_identities/list_acs_users' - | '/user_identities/enrollment_automations/get' - | '/user_identities/enrollment_automations/list' | '/user_identities/unmanaged/get' | '/user_identities/unmanaged/list' | '/webhooks/get' | '/webhooks/list' - | '/workspaces/find_anything' | '/workspaces/get' | '/workspaces/list' - | '/workspaces/customization_profiles/get' - | '/workspaces/customization_profiles/list' export type SeamHttpEndpointPaginatedQueryPaths = | '/access_codes/list' @@ -5608,10 +3628,6 @@ export type SeamHttpEndpointPaginatedQueryPaths = | '/connected_accounts/list' | '/devices/list' | '/devices/unmanaged/list' - | '/seam/customer/v1/automation_runs/list' - | '/seam/customer/v1/customers/list' - | '/seam/customer/v1/reservations/list' - | '/seam/customer/v1/staff_members/list' | '/spaces/list' | '/user_identities/list' | '/user_identities/unmanaged/list' @@ -5640,10 +3656,8 @@ export type SeamHttpEndpointMutationPaths = | '/acs/access_groups/add_user' | '/acs/access_groups/delete' | '/acs/access_groups/remove_user' - | '/acs/credential_provisioning_automations/launch' | '/acs/credentials/assign' | '/acs/credentials/create' - | '/acs/credentials/create_offline_code' | '/acs/credentials/delete' | '/acs/credentials/unassign' | '/acs/credentials/update' @@ -5679,8 +3693,6 @@ export type SeamHttpEndpointMutationPaths = | '/customers/create_portal' | '/customers/delete_data' | '/customers/push_data' - | '/customers/reservations/create_deep_link' - | '/devices/delete' | '/devices/report_provider_metadata' | '/devices/update' | '/devices/simulate/connect' @@ -5702,26 +3714,6 @@ export type SeamHttpEndpointMutationPaths = | '/noise_sensors/simulate/trigger_noise_threshold' | '/phones/deactivate' | '/phones/simulate/create_sandbox_phone' - | '/seam/console/v1/lynx_migration/migrate_property' - | '/seam/console/v1/sites/create' - | '/seam/console/v1/sites/delete' - | '/seam/console/v1/sites/update' - | '/seam/console/v1/workspace/feature_flags/update' - | '/seam/customer/v1/access_grants/update' - | '/seam/customer/v1/access_methods/encode' - | '/seam/customer/v1/automations/delete' - | '/seam/customer/v1/automations/update' - | '/seam/customer/v1/connectors/create' - | '/seam/customer/v1/connectors/delete' - | '/seam/customer/v1/connectors/sync' - | '/seam/customer/v1/connectors/update' - | '/seam/customer/v1/connectors/ical/validate-config' - | '/seam/customer/v1/customers/automations/update' - | '/seam/customer/v1/customers/open_portal' - | '/seam/customer/v1/portals/update' - | '/seam/customer/v1/settings/update' - | '/seam/customer/v1/spaces/create' - | '/seam/customer/v1/spaces/push_common_areas' | '/spaces/add_acs_entrances' | '/spaces/add_connected_account' | '/spaces/add_devices' @@ -5752,9 +3744,6 @@ export type SeamHttpEndpointMutationPaths = | '/thermostats/schedules/update' | '/thermostats/simulate/hvac_mode_adjusted' | '/thermostats/simulate/temperature_reached' - | '/unstable_partner/building_blocks/connect_accounts' - | '/unstable_partner/building_blocks/manage_devices' - | '/unstable_partner/building_blocks/organize_spaces' | '/user_identities/add_acs_user' | '/user_identities/create' | '/user_identities/delete' @@ -5763,8 +3752,6 @@ export type SeamHttpEndpointMutationPaths = | '/user_identities/remove_acs_user' | '/user_identities/revoke_access_to_device' | '/user_identities/update' - | '/user_identities/enrollment_automations/delete' - | '/user_identities/enrollment_automations/launch' | '/user_identities/unmanaged/update' | '/webhooks/create' | '/webhooks/delete' @@ -5772,6 +3759,3 @@ export type SeamHttpEndpointMutationPaths = | '/workspaces/create' | '/workspaces/reset_sandbox' | '/workspaces/update' - | '/workspaces/customization_profiles/create' - | '/workspaces/customization_profiles/update' - | '/workspaces/customization_profiles/upload_images' diff --git a/src/lib/seam/connect/routes/seam-http.ts b/src/lib/seam/connect/routes/seam-http.ts index c5c4e5fb..528bf4ae 100644 --- a/src/lib/seam/connect/routes/seam-http.ts +++ b/src/lib/seam/connect/routes/seam-http.ts @@ -37,7 +37,6 @@ import { SeamHttpAccessGrants } from './access-grants/index.js' import { SeamHttpAccessMethods } from './access-methods/index.js' import { SeamHttpAcs } from './acs/index.js' import { SeamHttpActionAttempts } from './action-attempts/index.js' -import { SeamHttpBridges } from './bridges/index.js' import { SeamHttpClientSessions } from './client-sessions/index.js' import { SeamHttpConnectWebviews } from './connect-webviews/index.js' import { SeamHttpConnectedAccounts } from './connected-accounts/index.js' @@ -50,7 +49,6 @@ import { SeamHttpNoiseSensors } from './noise-sensors/index.js' import { SeamHttpPhones } from './phones/index.js' import { SeamHttpSpaces } from './spaces/index.js' import { SeamHttpThermostats } from './thermostats/index.js' -import { SeamHttpUnstablePartner } from './unstable-partner/index.js' import { SeamHttpUserIdentities } from './user-identities/index.js' import { SeamHttpWebhooks } from './webhooks/index.js' import { SeamHttpWorkspaces } from './workspaces/index.js' @@ -202,10 +200,6 @@ export class SeamHttp { return SeamHttpActionAttempts.fromClient(this.client, this.defaults) } - get bridges(): SeamHttpBridges { - return SeamHttpBridges.fromClient(this.client, this.defaults) - } - get clientSessions(): SeamHttpClientSessions { return SeamHttpClientSessions.fromClient(this.client, this.defaults) } @@ -254,10 +248,6 @@ export class SeamHttp { return SeamHttpThermostats.fromClient(this.client, this.defaults) } - get unstablePartner(): SeamHttpUnstablePartner { - return SeamHttpUnstablePartner.fromClient(this.client, this.defaults) - } - get userIdentities(): SeamHttpUserIdentities { return SeamHttpUserIdentities.fromClient(this.client, this.defaults) } diff --git a/src/lib/seam/connect/routes/seam/console/console.ts b/src/lib/seam/connect/routes/seam/console/console.ts deleted file mode 100644 index 22980699..00000000 --- a/src/lib/seam/connect/routes/seam/console/console.ts +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -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 type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' -import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' - -import { SeamHttpSeamConsoleV1 } from './v1/index.js' - -export class SeamHttpSeamConsole { - 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 = {}, - ): SeamHttpSeamConsole { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamConsole(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamConsole { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamConsole(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamConsole { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamConsole(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 SeamHttpSeamConsole.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamConsole.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsole { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamConsole(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsole { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamConsole(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() - } - - get v1(): SeamHttpSeamConsoleV1 { - return SeamHttpSeamConsoleV1.fromClient(this.client, this.defaults) - } -} diff --git a/src/lib/seam/connect/routes/seam/console/index.ts b/src/lib/seam/connect/routes/seam/console/index.ts deleted file mode 100644 index 646f450f..00000000 --- a/src/lib/seam/connect/routes/seam/console/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './console.js' -export * from './v1/index.js' diff --git a/src/lib/seam/connect/routes/seam/console/v1/index.ts b/src/lib/seam/connect/routes/seam/console/v1/index.ts deleted file mode 100644 index 76a262f3..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/index.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './lynx-migration/index.js' -export * from './sites/index.js' -export * from './timelines/index.js' -export * from './v1.js' -export * from './workspace/index.js' diff --git a/src/lib/seam/connect/routes/seam/console/v1/lynx-migration/index.ts b/src/lib/seam/connect/routes/seam/console/v1/lynx-migration/index.ts deleted file mode 100644 index 3d495e3b..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/lynx-migration/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './lynx-migration.js' diff --git a/src/lib/seam/connect/routes/seam/console/v1/lynx-migration/lynx-migration.ts b/src/lib/seam/connect/routes/seam/console/v1/lynx-migration/lynx-migration.ts deleted file mode 100644 index 3b7277dc..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/lynx-migration/lynx-migration.ts +++ /dev/null @@ -1,336 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamConsoleV1LynxMigration { - 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 = {}, - ): SeamHttpSeamConsoleV1LynxMigration { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamConsoleV1LynxMigration(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamConsoleV1LynxMigration { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamConsoleV1LynxMigration(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamConsoleV1LynxMigration { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamConsoleV1LynxMigration(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 SeamHttpSeamConsoleV1LynxMigration.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamConsoleV1LynxMigration.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1LynxMigration { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1LynxMigration(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1LynxMigration { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1LynxMigration(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() - } - - getPropertyMigrationStatus( - parameters: SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParameters, - options: SeamConsoleV1LynxMigrationGetPropertyMigrationStatusOptions = {}, - ): SeamConsoleV1LynxMigrationGetPropertyMigrationStatusRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/lynx_migration/get_property_migration_status', - method: 'POST', - body: parameters, - responseKey: 'lynx_migration_property_run', - options, - }) - } - - getReservationMigrationStatus( - parameters: SeamConsoleV1LynxMigrationGetReservationMigrationStatusParameters, - options: SeamConsoleV1LynxMigrationGetReservationMigrationStatusOptions = {}, - ): SeamConsoleV1LynxMigrationGetReservationMigrationStatusRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: - '/seam/console/v1/lynx_migration/get_reservation_migration_status', - method: 'POST', - body: parameters, - responseKey: 'lynx_migration_reservation_run', - options, - }) - } - - listPropertyReservations( - parameters: SeamConsoleV1LynxMigrationListPropertyReservationsParameters, - options: SeamConsoleV1LynxMigrationListPropertyReservationsOptions = {}, - ): SeamConsoleV1LynxMigrationListPropertyReservationsRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/lynx_migration/list_property_reservations', - method: 'POST', - body: parameters, - responseKey: 'lynx_migration_property_plan', - options, - }) - } - - migrateProperty( - parameters: SeamConsoleV1LynxMigrationMigratePropertyParameters, - options: SeamConsoleV1LynxMigrationMigratePropertyOptions = {}, - ): SeamConsoleV1LynxMigrationMigratePropertyRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/lynx_migration/migrate_property', - method: 'POST', - body: parameters, - responseKey: 'lynx_migration_property_run', - options, - }) - } -} - -export type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParameters = - RouteRequestBody<'/seam/console/v1/lynx_migration/get_property_migration_status'> - -/** - * @deprecated Use SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParameters instead. - */ -export type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParams = - SeamConsoleV1LynxMigrationGetPropertyMigrationStatusParameters - -/** - * @deprecated Use SeamConsoleV1LynxMigrationGetPropertyMigrationStatusRequest instead. - */ -export type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusResponse = - RouteResponse<'/seam/console/v1/lynx_migration/get_property_migration_status'> - -export type SeamConsoleV1LynxMigrationGetPropertyMigrationStatusRequest = - SeamHttpRequest< - SeamConsoleV1LynxMigrationGetPropertyMigrationStatusResponse, - 'lynx_migration_property_run' - > - -export interface SeamConsoleV1LynxMigrationGetPropertyMigrationStatusOptions {} - -export type SeamConsoleV1LynxMigrationGetReservationMigrationStatusParameters = - RouteRequestBody<'/seam/console/v1/lynx_migration/get_reservation_migration_status'> - -/** - * @deprecated Use SeamConsoleV1LynxMigrationGetReservationMigrationStatusParameters instead. - */ -export type SeamConsoleV1LynxMigrationGetReservationMigrationStatusParams = - SeamConsoleV1LynxMigrationGetReservationMigrationStatusParameters - -/** - * @deprecated Use SeamConsoleV1LynxMigrationGetReservationMigrationStatusRequest instead. - */ -export type SeamConsoleV1LynxMigrationGetReservationMigrationStatusResponse = - RouteResponse<'/seam/console/v1/lynx_migration/get_reservation_migration_status'> - -export type SeamConsoleV1LynxMigrationGetReservationMigrationStatusRequest = - SeamHttpRequest< - SeamConsoleV1LynxMigrationGetReservationMigrationStatusResponse, - 'lynx_migration_reservation_run' - > - -export interface SeamConsoleV1LynxMigrationGetReservationMigrationStatusOptions {} - -export type SeamConsoleV1LynxMigrationListPropertyReservationsParameters = - RouteRequestBody<'/seam/console/v1/lynx_migration/list_property_reservations'> - -/** - * @deprecated Use SeamConsoleV1LynxMigrationListPropertyReservationsParameters instead. - */ -export type SeamConsoleV1LynxMigrationListPropertyReservationsParams = - SeamConsoleV1LynxMigrationListPropertyReservationsParameters - -/** - * @deprecated Use SeamConsoleV1LynxMigrationListPropertyReservationsRequest instead. - */ -export type SeamConsoleV1LynxMigrationListPropertyReservationsResponse = - RouteResponse<'/seam/console/v1/lynx_migration/list_property_reservations'> - -export type SeamConsoleV1LynxMigrationListPropertyReservationsRequest = - SeamHttpRequest< - SeamConsoleV1LynxMigrationListPropertyReservationsResponse, - 'lynx_migration_property_plan' - > - -export interface SeamConsoleV1LynxMigrationListPropertyReservationsOptions {} - -export type SeamConsoleV1LynxMigrationMigratePropertyParameters = - RouteRequestBody<'/seam/console/v1/lynx_migration/migrate_property'> - -/** - * @deprecated Use SeamConsoleV1LynxMigrationMigratePropertyParameters instead. - */ -export type SeamConsoleV1LynxMigrationMigratePropertyBody = - SeamConsoleV1LynxMigrationMigratePropertyParameters - -/** - * @deprecated Use SeamConsoleV1LynxMigrationMigratePropertyRequest instead. - */ -export type SeamConsoleV1LynxMigrationMigratePropertyResponse = - RouteResponse<'/seam/console/v1/lynx_migration/migrate_property'> - -export type SeamConsoleV1LynxMigrationMigratePropertyRequest = SeamHttpRequest< - SeamConsoleV1LynxMigrationMigratePropertyResponse, - 'lynx_migration_property_run' -> - -export interface SeamConsoleV1LynxMigrationMigratePropertyOptions {} diff --git a/src/lib/seam/connect/routes/seam/console/v1/sites/index.ts b/src/lib/seam/connect/routes/seam/console/v1/sites/index.ts deleted file mode 100644 index 02d6dacc..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/sites/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './sites.js' diff --git a/src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts b/src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts deleted file mode 100644 index b85ac7af..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/sites/sites.ts +++ /dev/null @@ -1,322 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamConsoleV1Sites { - 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 = {}, - ): SeamHttpSeamConsoleV1Sites { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamConsoleV1Sites(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamConsoleV1Sites { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamConsoleV1Sites(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamConsoleV1Sites { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamConsoleV1Sites(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 SeamHttpSeamConsoleV1Sites.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamConsoleV1Sites.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1Sites { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1Sites(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1Sites { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1Sites(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() - } - - create( - parameters: SeamConsoleV1SitesCreateParameters, - options: SeamConsoleV1SitesCreateOptions = {}, - ): SeamConsoleV1SitesCreateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/sites/create', - method: 'POST', - body: parameters, - responseKey: 'site', - options, - }) - } - - delete( - parameters: SeamConsoleV1SitesDeleteParameters, - options: SeamConsoleV1SitesDeleteOptions = {}, - ): SeamConsoleV1SitesDeleteRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/sites/delete', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } - - list( - parameters?: SeamConsoleV1SitesListParameters, - options: SeamConsoleV1SitesListOptions = {}, - ): SeamConsoleV1SitesListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/sites/list', - method: 'POST', - body: parameters, - responseKey: 'sites', - options, - }) - } - - update( - parameters: SeamConsoleV1SitesUpdateParameters, - options: SeamConsoleV1SitesUpdateOptions = {}, - ): SeamConsoleV1SitesUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/sites/update', - method: 'PATCH', - body: parameters, - responseKey: 'site', - options, - }) - } -} - -export type SeamConsoleV1SitesCreateParameters = - RouteRequestBody<'/seam/console/v1/sites/create'> - -/** - * @deprecated Use SeamConsoleV1SitesCreateParameters instead. - */ -export type SeamConsoleV1SitesCreateBody = SeamConsoleV1SitesCreateParameters - -/** - * @deprecated Use SeamConsoleV1SitesCreateRequest instead. - */ -export type SeamConsoleV1SitesCreateResponse = - RouteResponse<'/seam/console/v1/sites/create'> - -export type SeamConsoleV1SitesCreateRequest = SeamHttpRequest< - SeamConsoleV1SitesCreateResponse, - 'site' -> - -export interface SeamConsoleV1SitesCreateOptions {} - -export type SeamConsoleV1SitesDeleteParameters = - RouteRequestBody<'/seam/console/v1/sites/delete'> - -/** - * @deprecated Use SeamConsoleV1SitesDeleteParameters instead. - */ -export type SeamConsoleV1SitesDeleteParams = SeamConsoleV1SitesDeleteParameters - -/** - * @deprecated Use SeamConsoleV1SitesDeleteRequest instead. - */ -export type SeamConsoleV1SitesDeleteResponse = - RouteResponse<'/seam/console/v1/sites/delete'> - -export type SeamConsoleV1SitesDeleteRequest = SeamHttpRequest - -export interface SeamConsoleV1SitesDeleteOptions {} - -export type SeamConsoleV1SitesListParameters = - RouteRequestBody<'/seam/console/v1/sites/list'> - -/** - * @deprecated Use SeamConsoleV1SitesListParameters instead. - */ -export type SeamConsoleV1SitesListParams = SeamConsoleV1SitesListParameters - -/** - * @deprecated Use SeamConsoleV1SitesListRequest instead. - */ -export type SeamConsoleV1SitesListResponse = - RouteResponse<'/seam/console/v1/sites/list'> - -export type SeamConsoleV1SitesListRequest = SeamHttpRequest< - SeamConsoleV1SitesListResponse, - 'sites' -> - -export interface SeamConsoleV1SitesListOptions {} - -export type SeamConsoleV1SitesUpdateParameters = - RouteRequestBody<'/seam/console/v1/sites/update'> - -/** - * @deprecated Use SeamConsoleV1SitesUpdateParameters instead. - */ -export type SeamConsoleV1SitesUpdateBody = SeamConsoleV1SitesUpdateParameters - -/** - * @deprecated Use SeamConsoleV1SitesUpdateRequest instead. - */ -export type SeamConsoleV1SitesUpdateResponse = - RouteResponse<'/seam/console/v1/sites/update'> - -export type SeamConsoleV1SitesUpdateRequest = SeamHttpRequest< - SeamConsoleV1SitesUpdateResponse, - 'site' -> - -export interface SeamConsoleV1SitesUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/console/v1/timelines/index.ts b/src/lib/seam/connect/routes/seam/console/v1/timelines/index.ts deleted file mode 100644 index a4aa5669..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/timelines/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './timelines.js' diff --git a/src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts b/src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts deleted file mode 100644 index 42ba4189..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/timelines/timelines.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamConsoleV1Timelines { - 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 = {}, - ): SeamHttpSeamConsoleV1Timelines { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamConsoleV1Timelines(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamConsoleV1Timelines { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamConsoleV1Timelines(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamConsoleV1Timelines { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamConsoleV1Timelines(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 SeamHttpSeamConsoleV1Timelines.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamConsoleV1Timelines.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1Timelines { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1Timelines(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1Timelines { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1Timelines(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() - } - - get( - parameters: SeamConsoleV1TimelinesGetParameters, - options: SeamConsoleV1TimelinesGetOptions = {}, - ): SeamConsoleV1TimelinesGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/timelines/get', - method: 'POST', - body: parameters, - responseKey: 'timeline', - options, - }) - } -} - -export type SeamConsoleV1TimelinesGetParameters = - RouteRequestBody<'/seam/console/v1/timelines/get'> - -/** - * @deprecated Use SeamConsoleV1TimelinesGetParameters instead. - */ -export type SeamConsoleV1TimelinesGetParams = - SeamConsoleV1TimelinesGetParameters - -/** - * @deprecated Use SeamConsoleV1TimelinesGetRequest instead. - */ -export type SeamConsoleV1TimelinesGetResponse = - RouteResponse<'/seam/console/v1/timelines/get'> - -export type SeamConsoleV1TimelinesGetRequest = SeamHttpRequest< - SeamConsoleV1TimelinesGetResponse, - 'timeline' -> - -export interface SeamConsoleV1TimelinesGetOptions {} diff --git a/src/lib/seam/connect/routes/seam/console/v1/v1.ts b/src/lib/seam/connect/routes/seam/console/v1/v1.ts deleted file mode 100644 index 9bbcb8b5..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/v1.ts +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { RouteRequestParams, 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 { SeamHttpSeamConsoleV1LynxMigration } from './lynx-migration/index.js' -import { SeamHttpSeamConsoleV1Sites } from './sites/index.js' -import { SeamHttpSeamConsoleV1Timelines } from './timelines/index.js' - -export class SeamHttpSeamConsoleV1 { - 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 = {}, - ): SeamHttpSeamConsoleV1 { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamConsoleV1(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamConsoleV1 { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamConsoleV1(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamConsoleV1 { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamConsoleV1(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 SeamHttpSeamConsoleV1.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamConsoleV1.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1 { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1 { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1(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() - } - - get lynxMigration(): SeamHttpSeamConsoleV1LynxMigration { - return SeamHttpSeamConsoleV1LynxMigration.fromClient( - this.client, - this.defaults, - ) - } - - get sites(): SeamHttpSeamConsoleV1Sites { - return SeamHttpSeamConsoleV1Sites.fromClient(this.client, this.defaults) - } - - get timelines(): SeamHttpSeamConsoleV1Timelines { - return SeamHttpSeamConsoleV1Timelines.fromClient(this.client, this.defaults) - } - - getResourceLocator( - parameters?: SeamConsoleV1GetResourceLocatorParameters, - options: SeamConsoleV1GetResourceLocatorOptions = {}, - ): SeamConsoleV1GetResourceLocatorRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/get_resource_locator', - method: 'GET', - params: parameters, - responseKey: 'resource_locator', - options, - }) - } -} - -export type SeamConsoleV1GetResourceLocatorParameters = - RouteRequestParams<'/seam/console/v1/get_resource_locator'> - -/** - * @deprecated Use SeamConsoleV1GetResourceLocatorParameters instead. - */ -export type SeamConsoleV1GetResourceLocatorParams = - SeamConsoleV1GetResourceLocatorParameters - -/** - * @deprecated Use SeamConsoleV1GetResourceLocatorRequest instead. - */ -export type SeamConsoleV1GetResourceLocatorResponse = - RouteResponse<'/seam/console/v1/get_resource_locator'> - -export type SeamConsoleV1GetResourceLocatorRequest = SeamHttpRequest< - SeamConsoleV1GetResourceLocatorResponse, - 'resource_locator' -> - -export interface SeamConsoleV1GetResourceLocatorOptions {} diff --git a/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts b/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts deleted file mode 100644 index 984033c2..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/feature-flags.ts +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { - RouteRequestBody, - RouteRequestParams, - 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' - -export class SeamHttpSeamConsoleV1WorkspaceFeatureFlags { - 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 = {}, - ): SeamHttpSeamConsoleV1WorkspaceFeatureFlags { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamConsoleV1WorkspaceFeatureFlags { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamConsoleV1WorkspaceFeatureFlags { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamConsoleV1WorkspaceFeatureFlags(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 SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamConsoleV1WorkspaceFeatureFlags.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1WorkspaceFeatureFlags { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1WorkspaceFeatureFlags(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamConsoleV1WorkspaceFeatureFlags { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamConsoleV1WorkspaceFeatureFlags(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?: SeamConsoleV1WorkspaceFeatureFlagsListParameters, - options: SeamConsoleV1WorkspaceFeatureFlagsListOptions = {}, - ): SeamConsoleV1WorkspaceFeatureFlagsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/workspace/feature_flags/list', - method: 'GET', - params: parameters, - responseKey: 'feature_flags', - options, - }) - } - - update( - parameters: SeamConsoleV1WorkspaceFeatureFlagsUpdateParameters, - options: SeamConsoleV1WorkspaceFeatureFlagsUpdateOptions = {}, - ): SeamConsoleV1WorkspaceFeatureFlagsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/console/v1/workspace/feature_flags/update', - method: 'POST', - body: parameters, - responseKey: 'feature_flag', - options, - }) - } -} - -export type SeamConsoleV1WorkspaceFeatureFlagsListParameters = - RouteRequestParams<'/seam/console/v1/workspace/feature_flags/list'> - -/** - * @deprecated Use SeamConsoleV1WorkspaceFeatureFlagsListParameters instead. - */ -export type SeamConsoleV1WorkspaceFeatureFlagsListParams = - SeamConsoleV1WorkspaceFeatureFlagsListParameters - -/** - * @deprecated Use SeamConsoleV1WorkspaceFeatureFlagsListRequest instead. - */ -export type SeamConsoleV1WorkspaceFeatureFlagsListResponse = - RouteResponse<'/seam/console/v1/workspace/feature_flags/list'> - -export type SeamConsoleV1WorkspaceFeatureFlagsListRequest = SeamHttpRequest< - SeamConsoleV1WorkspaceFeatureFlagsListResponse, - 'feature_flags' -> - -export interface SeamConsoleV1WorkspaceFeatureFlagsListOptions {} - -export type SeamConsoleV1WorkspaceFeatureFlagsUpdateParameters = - RouteRequestBody<'/seam/console/v1/workspace/feature_flags/update'> - -/** - * @deprecated Use SeamConsoleV1WorkspaceFeatureFlagsUpdateParameters instead. - */ -export type SeamConsoleV1WorkspaceFeatureFlagsUpdateBody = - SeamConsoleV1WorkspaceFeatureFlagsUpdateParameters - -/** - * @deprecated Use SeamConsoleV1WorkspaceFeatureFlagsUpdateRequest instead. - */ -export type SeamConsoleV1WorkspaceFeatureFlagsUpdateResponse = - RouteResponse<'/seam/console/v1/workspace/feature_flags/update'> - -export type SeamConsoleV1WorkspaceFeatureFlagsUpdateRequest = SeamHttpRequest< - SeamConsoleV1WorkspaceFeatureFlagsUpdateResponse, - 'feature_flag' -> - -export interface SeamConsoleV1WorkspaceFeatureFlagsUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.ts b/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.ts deleted file mode 100644 index 3ac63360..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/workspace/feature-flags/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './feature-flags.js' diff --git a/src/lib/seam/connect/routes/seam/console/v1/workspace/index.ts b/src/lib/seam/connect/routes/seam/console/v1/workspace/index.ts deleted file mode 100644 index 3a97c552..00000000 --- a/src/lib/seam/connect/routes/seam/console/v1/workspace/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './feature-flags/index.js' diff --git a/src/lib/seam/connect/routes/seam/customer/index.ts b/src/lib/seam/connect/routes/seam/customer/index.ts deleted file mode 100644 index 2e9499e7..00000000 --- a/src/lib/seam/connect/routes/seam/customer/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './v1/index.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts b/src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts deleted file mode 100644 index a6899c38..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/access-grants/access-grants.ts +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1AccessGrants { - 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 = {}, - ): SeamHttpSeamCustomerV1AccessGrants { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1AccessGrants(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1AccessGrants { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1AccessGrants(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1AccessGrants { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1AccessGrants(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 SeamHttpSeamCustomerV1AccessGrants.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1AccessGrants.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1AccessGrants { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1AccessGrants(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1AccessGrants { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1AccessGrants(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?: SeamCustomerV1AccessGrantsListParameters, - options: SeamCustomerV1AccessGrantsListOptions = {}, - ): SeamCustomerV1AccessGrantsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/access_grants/list', - method: 'POST', - body: parameters, - responseKey: 'access_grants', - options, - }) - } - - update( - parameters: SeamCustomerV1AccessGrantsUpdateParameters, - options: SeamCustomerV1AccessGrantsUpdateOptions = {}, - ): SeamCustomerV1AccessGrantsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/access_grants/update', - method: 'PATCH', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type SeamCustomerV1AccessGrantsListParameters = - RouteRequestBody<'/seam/customer/v1/access_grants/list'> - -/** - * @deprecated Use SeamCustomerV1AccessGrantsListParameters instead. - */ -export type SeamCustomerV1AccessGrantsListParams = - SeamCustomerV1AccessGrantsListParameters - -/** - * @deprecated Use SeamCustomerV1AccessGrantsListRequest instead. - */ -export type SeamCustomerV1AccessGrantsListResponse = - RouteResponse<'/seam/customer/v1/access_grants/list'> - -export type SeamCustomerV1AccessGrantsListRequest = SeamHttpRequest< - SeamCustomerV1AccessGrantsListResponse, - 'access_grants' -> - -export interface SeamCustomerV1AccessGrantsListOptions {} - -export type SeamCustomerV1AccessGrantsUpdateParameters = - RouteRequestBody<'/seam/customer/v1/access_grants/update'> - -/** - * @deprecated Use SeamCustomerV1AccessGrantsUpdateParameters instead. - */ -export type SeamCustomerV1AccessGrantsUpdateBody = - SeamCustomerV1AccessGrantsUpdateParameters - -/** - * @deprecated Use SeamCustomerV1AccessGrantsUpdateRequest instead. - */ -export type SeamCustomerV1AccessGrantsUpdateResponse = - RouteResponse<'/seam/customer/v1/access_grants/update'> - -export type SeamCustomerV1AccessGrantsUpdateRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1AccessGrantsUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/access-grants/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/access-grants/index.ts deleted file mode 100644 index afe09729..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/access-grants/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './access-grants.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.ts b/src/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.ts deleted file mode 100644 index 8c8f1fa7..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.ts +++ /dev/null @@ -1,215 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1AccessMethods { - 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 = {}, - ): SeamHttpSeamCustomerV1AccessMethods { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1AccessMethods(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1AccessMethods { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1AccessMethods(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1AccessMethods { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1AccessMethods(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 SeamHttpSeamCustomerV1AccessMethods.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1AccessMethods.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1AccessMethods { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1AccessMethods(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1AccessMethods { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1AccessMethods(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() - } - - encode( - parameters: SeamCustomerV1AccessMethodsEncodeParameters, - options: SeamCustomerV1AccessMethodsEncodeOptions = {}, - ): SeamCustomerV1AccessMethodsEncodeRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/access_methods/encode', - method: 'POST', - body: parameters, - responseKey: 'action_attempt', - options, - }) - } -} - -export type SeamCustomerV1AccessMethodsEncodeParameters = - RouteRequestBody<'/seam/customer/v1/access_methods/encode'> - -/** - * @deprecated Use SeamCustomerV1AccessMethodsEncodeParameters instead. - */ -export type SeamCustomerV1AccessMethodsEncodeBody = - SeamCustomerV1AccessMethodsEncodeParameters - -/** - * @deprecated Use SeamCustomerV1AccessMethodsEncodeRequest instead. - */ -export type SeamCustomerV1AccessMethodsEncodeResponse = - RouteResponse<'/seam/customer/v1/access_methods/encode'> - -export type SeamCustomerV1AccessMethodsEncodeRequest = SeamHttpRequest< - SeamCustomerV1AccessMethodsEncodeResponse, - 'action_attempt' -> - -export type SeamCustomerV1AccessMethodsEncodeOptions = Pick< - SeamHttpRequestOptions, - 'waitForActionAttempt' -> diff --git a/src/lib/seam/connect/routes/seam/customer/v1/access-methods/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/access-methods/index.ts deleted file mode 100644 index f339d498..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/access-methods/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './access-methods.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts b/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts deleted file mode 100644 index 6d972cc4..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/automation-runs.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1AutomationRuns { - 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 = {}, - ): SeamHttpSeamCustomerV1AutomationRuns { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1AutomationRuns { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1AutomationRuns { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1AutomationRuns(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 SeamHttpSeamCustomerV1AutomationRuns.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1AutomationRuns.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1AutomationRuns { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1AutomationRuns(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1AutomationRuns { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1AutomationRuns(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?: SeamCustomerV1AutomationRunsListParameters, - options: SeamCustomerV1AutomationRunsListOptions = {}, - ): SeamCustomerV1AutomationRunsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/automation_runs/list', - method: 'POST', - body: parameters, - responseKey: 'automation_runs', - options, - }) - } -} - -export type SeamCustomerV1AutomationRunsListParameters = - RouteRequestBody<'/seam/customer/v1/automation_runs/list'> - -/** - * @deprecated Use SeamCustomerV1AutomationRunsListParameters instead. - */ -export type SeamCustomerV1AutomationRunsListParams = - SeamCustomerV1AutomationRunsListParameters - -/** - * @deprecated Use SeamCustomerV1AutomationRunsListRequest instead. - */ -export type SeamCustomerV1AutomationRunsListResponse = - RouteResponse<'/seam/customer/v1/automation_runs/list'> - -export type SeamCustomerV1AutomationRunsListRequest = SeamHttpRequest< - SeamCustomerV1AutomationRunsListResponse, - 'automation_runs' -> - -export interface SeamCustomerV1AutomationRunsListOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.ts deleted file mode 100644 index e2ea2ec6..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/automation-runs/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './automation-runs.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts b/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts deleted file mode 100644 index 09c54902..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/automations/automations.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1Automations { - 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 = {}, - ): SeamHttpSeamCustomerV1Automations { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Automations(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Automations { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Automations(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Automations { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Automations(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 SeamHttpSeamCustomerV1Automations.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Automations.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Automations { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Automations(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Automations { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Automations(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() - } - - delete( - parameters?: SeamCustomerV1AutomationsDeleteParameters, - options: SeamCustomerV1AutomationsDeleteOptions = {}, - ): SeamCustomerV1AutomationsDeleteRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/automations/delete', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } - - get( - parameters?: SeamCustomerV1AutomationsGetParameters, - options: SeamCustomerV1AutomationsGetOptions = {}, - ): SeamCustomerV1AutomationsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/automations/get', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } - - update( - parameters?: SeamCustomerV1AutomationsUpdateParameters, - options: SeamCustomerV1AutomationsUpdateOptions = {}, - ): SeamCustomerV1AutomationsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/automations/update', - method: 'PATCH', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type SeamCustomerV1AutomationsDeleteParameters = - RouteRequestBody<'/seam/customer/v1/automations/delete'> - -/** - * @deprecated Use SeamCustomerV1AutomationsDeleteParameters instead. - */ -export type SeamCustomerV1AutomationsDeleteParams = - SeamCustomerV1AutomationsDeleteParameters - -/** - * @deprecated Use SeamCustomerV1AutomationsDeleteRequest instead. - */ -export type SeamCustomerV1AutomationsDeleteResponse = - RouteResponse<'/seam/customer/v1/automations/delete'> - -export type SeamCustomerV1AutomationsDeleteRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1AutomationsDeleteOptions {} - -export type SeamCustomerV1AutomationsGetParameters = - RouteRequestBody<'/seam/customer/v1/automations/get'> - -/** - * @deprecated Use SeamCustomerV1AutomationsGetParameters instead. - */ -export type SeamCustomerV1AutomationsGetParams = - SeamCustomerV1AutomationsGetParameters - -/** - * @deprecated Use SeamCustomerV1AutomationsGetRequest instead. - */ -export type SeamCustomerV1AutomationsGetResponse = - RouteResponse<'/seam/customer/v1/automations/get'> - -export type SeamCustomerV1AutomationsGetRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1AutomationsGetOptions {} - -export type SeamCustomerV1AutomationsUpdateParameters = - RouteRequestBody<'/seam/customer/v1/automations/update'> - -/** - * @deprecated Use SeamCustomerV1AutomationsUpdateParameters instead. - */ -export type SeamCustomerV1AutomationsUpdateBody = - SeamCustomerV1AutomationsUpdateParameters - -/** - * @deprecated Use SeamCustomerV1AutomationsUpdateRequest instead. - */ -export type SeamCustomerV1AutomationsUpdateResponse = - RouteResponse<'/seam/customer/v1/automations/update'> - -export type SeamCustomerV1AutomationsUpdateRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1AutomationsUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/automations/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/automations/index.ts deleted file mode 100644 index 49fd0137..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/automations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './automations.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.ts b/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.ts deleted file mode 100644 index 69ea88be..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/connector-customers.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1ConnectorCustomers { - 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 = {}, - ): SeamHttpSeamCustomerV1ConnectorCustomers { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1ConnectorCustomers { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1ConnectorCustomers { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1ConnectorCustomers(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 SeamHttpSeamCustomerV1ConnectorCustomers.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1ConnectorCustomers.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1ConnectorCustomers { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1ConnectorCustomers(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1ConnectorCustomers { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1ConnectorCustomers(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?: SeamCustomerV1ConnectorCustomersListParameters, - options: SeamCustomerV1ConnectorCustomersListOptions = {}, - ): SeamCustomerV1ConnectorCustomersListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connector_customers/list', - method: 'POST', - body: parameters, - responseKey: 'connector_customers', - options, - }) - } -} - -export type SeamCustomerV1ConnectorCustomersListParameters = - RouteRequestBody<'/seam/customer/v1/connector_customers/list'> - -/** - * @deprecated Use SeamCustomerV1ConnectorCustomersListParameters instead. - */ -export type SeamCustomerV1ConnectorCustomersListParams = - SeamCustomerV1ConnectorCustomersListParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorCustomersListRequest instead. - */ -export type SeamCustomerV1ConnectorCustomersListResponse = - RouteResponse<'/seam/customer/v1/connector_customers/list'> - -export type SeamCustomerV1ConnectorCustomersListRequest = SeamHttpRequest< - SeamCustomerV1ConnectorCustomersListResponse, - 'connector_customers' -> - -export interface SeamCustomerV1ConnectorCustomersListOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.ts deleted file mode 100644 index 2ad2130e..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connector-customers/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './connector-customers.js' 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 deleted file mode 100644 index a63d361e..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/connectors.ts +++ /dev/null @@ -1,473 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { - RouteRequestBody, - RouteRequestParams, - 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 { SeamHttpSeamCustomerV1ConnectorsExternalSites } from './external-sites/index.js' -import { SeamHttpSeamCustomerV1ConnectorsIcal } from './ical/index.js' - -export class SeamHttpSeamCustomerV1Connectors { - 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 = {}, - ): SeamHttpSeamCustomerV1Connectors { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Connectors(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Connectors { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Connectors(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Connectors { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Connectors(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 SeamHttpSeamCustomerV1Connectors.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Connectors.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Connectors { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Connectors(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Connectors { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Connectors(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() - } - - get externalSites(): SeamHttpSeamCustomerV1ConnectorsExternalSites { - return SeamHttpSeamCustomerV1ConnectorsExternalSites.fromClient( - this.client, - this.defaults, - ) - } - - get ical(): SeamHttpSeamCustomerV1ConnectorsIcal { - return SeamHttpSeamCustomerV1ConnectorsIcal.fromClient( - this.client, - this.defaults, - ) - } - - authorize( - parameters: SeamCustomerV1ConnectorsAuthorizeParameters, - options: SeamCustomerV1ConnectorsAuthorizeOptions = {}, - ): SeamCustomerV1ConnectorsAuthorizeRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/authorize', - method: 'POST', - body: parameters, - responseKey: 'connector_authorize', - options, - }) - } - - connectorTypes( - parameters?: SeamCustomerV1ConnectorsConnectorTypesParameters, - options: SeamCustomerV1ConnectorsConnectorTypesOptions = {}, - ): SeamCustomerV1ConnectorsConnectorTypesRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/connector_types', - method: 'GET', - params: parameters, - responseKey: 'connector_types', - options, - }) - } - - create( - parameters: SeamCustomerV1ConnectorsCreateParameters, - options: SeamCustomerV1ConnectorsCreateOptions = {}, - ): SeamCustomerV1ConnectorsCreateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/create', - method: 'POST', - body: parameters, - responseKey: 'connector', - options, - }) - } - - delete( - parameters: SeamCustomerV1ConnectorsDeleteParameters, - options: SeamCustomerV1ConnectorsDeleteOptions = {}, - ): SeamCustomerV1ConnectorsDeleteRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/delete', - method: 'POST', - body: parameters, - responseKey: 'connector', - options, - }) - } - - list( - parameters?: SeamCustomerV1ConnectorsListParameters, - options: SeamCustomerV1ConnectorsListOptions = {}, - ): SeamCustomerV1ConnectorsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/list', - method: 'GET', - params: parameters, - responseKey: 'connectors', - options, - }) - } - - sync( - 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', - body: parameters, - responseKey: 'connector_sync', - options, - }) - } - - update( - parameters: SeamCustomerV1ConnectorsUpdateParameters, - options: SeamCustomerV1ConnectorsUpdateOptions = {}, - ): SeamCustomerV1ConnectorsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/update', - method: 'POST', - body: parameters, - responseKey: 'connector', - options, - }) - } -} - -export type SeamCustomerV1ConnectorsAuthorizeParameters = - RouteRequestBody<'/seam/customer/v1/connectors/authorize'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsAuthorizeParameters instead. - */ -export type SeamCustomerV1ConnectorsAuthorizeParams = - SeamCustomerV1ConnectorsAuthorizeParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsAuthorizeRequest instead. - */ -export type SeamCustomerV1ConnectorsAuthorizeResponse = - RouteResponse<'/seam/customer/v1/connectors/authorize'> - -export type SeamCustomerV1ConnectorsAuthorizeRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsAuthorizeResponse, - 'connector_authorize' -> - -export interface SeamCustomerV1ConnectorsAuthorizeOptions {} - -export type SeamCustomerV1ConnectorsConnectorTypesParameters = - RouteRequestParams<'/seam/customer/v1/connectors/connector_types'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsConnectorTypesParameters instead. - */ -export type SeamCustomerV1ConnectorsConnectorTypesParams = - SeamCustomerV1ConnectorsConnectorTypesParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsConnectorTypesRequest instead. - */ -export type SeamCustomerV1ConnectorsConnectorTypesResponse = - RouteResponse<'/seam/customer/v1/connectors/connector_types'> - -export type SeamCustomerV1ConnectorsConnectorTypesRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsConnectorTypesResponse, - 'connector_types' -> - -export interface SeamCustomerV1ConnectorsConnectorTypesOptions {} - -export type SeamCustomerV1ConnectorsCreateParameters = - RouteRequestBody<'/seam/customer/v1/connectors/create'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsCreateParameters instead. - */ -export type SeamCustomerV1ConnectorsCreateBody = - SeamCustomerV1ConnectorsCreateParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsCreateRequest instead. - */ -export type SeamCustomerV1ConnectorsCreateResponse = - RouteResponse<'/seam/customer/v1/connectors/create'> - -export type SeamCustomerV1ConnectorsCreateRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsCreateResponse, - 'connector' -> - -export interface SeamCustomerV1ConnectorsCreateOptions {} - -export type SeamCustomerV1ConnectorsDeleteParameters = - RouteRequestBody<'/seam/customer/v1/connectors/delete'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsDeleteParameters instead. - */ -export type SeamCustomerV1ConnectorsDeleteBody = - SeamCustomerV1ConnectorsDeleteParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsDeleteRequest instead. - */ -export type SeamCustomerV1ConnectorsDeleteResponse = - RouteResponse<'/seam/customer/v1/connectors/delete'> - -export type SeamCustomerV1ConnectorsDeleteRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsDeleteResponse, - 'connector' -> - -export interface SeamCustomerV1ConnectorsDeleteOptions {} - -export type SeamCustomerV1ConnectorsListParameters = - RouteRequestParams<'/seam/customer/v1/connectors/list'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsListParameters instead. - */ -export type SeamCustomerV1ConnectorsListParams = - SeamCustomerV1ConnectorsListParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsListRequest instead. - */ -export type SeamCustomerV1ConnectorsListResponse = - RouteResponse<'/seam/customer/v1/connectors/list'> - -export type SeamCustomerV1ConnectorsListRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsListResponse, - 'connectors' -> - -export interface SeamCustomerV1ConnectorsListOptions {} - -export type SeamCustomerV1ConnectorsSyncParameters = - RouteRequestBody<'/seam/customer/v1/connectors/sync'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsSyncParameters instead. - */ -export type SeamCustomerV1ConnectorsSyncBody = - SeamCustomerV1ConnectorsSyncParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsSyncRequest instead. - */ -export type SeamCustomerV1ConnectorsSyncResponse = - RouteResponse<'/seam/customer/v1/connectors/sync'> - -export type SeamCustomerV1ConnectorsSyncRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsSyncResponse, - 'connector_sync' -> - -export interface SeamCustomerV1ConnectorsSyncOptions {} - -export type SeamCustomerV1ConnectorsUpdateParameters = - RouteRequestBody<'/seam/customer/v1/connectors/update'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsUpdateParameters instead. - */ -export type SeamCustomerV1ConnectorsUpdateBody = - SeamCustomerV1ConnectorsUpdateParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsUpdateRequest instead. - */ -export type SeamCustomerV1ConnectorsUpdateResponse = - RouteResponse<'/seam/customer/v1/connectors/update'> - -export type SeamCustomerV1ConnectorsUpdateRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsUpdateResponse, - 'connector' -> - -export interface SeamCustomerV1ConnectorsUpdateOptions {} 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 deleted file mode 100644 index 810b2ba0..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/external-sites.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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' - -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 = - RouteResponse<'/seam/customer/v1/connectors/external_sites/list'> - -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 deleted file mode 100644 index 82756159..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/external-sites/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * 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/ical/ical.ts b/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts deleted file mode 100644 index a4462353..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/ical.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1ConnectorsIcal { - 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 = {}, - ): SeamHttpSeamCustomerV1ConnectorsIcal { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1ConnectorsIcal { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1ConnectorsIcal { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1ConnectorsIcal(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 SeamHttpSeamCustomerV1ConnectorsIcal.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1ConnectorsIcal.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1ConnectorsIcal { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1ConnectorsIcal(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1ConnectorsIcal { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1ConnectorsIcal(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() - } - - validateConfig( - parameters: SeamCustomerV1ConnectorsIcalValidateConfigParameters, - options: SeamCustomerV1ConnectorsIcalValidateConfigOptions = {}, - ): SeamCustomerV1ConnectorsIcalValidateConfigRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/connectors/ical/validate-config', - method: 'POST', - body: parameters, - responseKey: 'validation_result', - options, - }) - } -} - -export type SeamCustomerV1ConnectorsIcalValidateConfigParameters = - RouteRequestBody<'/seam/customer/v1/connectors/ical/validate-config'> - -/** - * @deprecated Use SeamCustomerV1ConnectorsIcalValidateConfigParameters instead. - */ -export type SeamCustomerV1ConnectorsIcalValidateConfigBody = - SeamCustomerV1ConnectorsIcalValidateConfigParameters - -/** - * @deprecated Use SeamCustomerV1ConnectorsIcalValidateConfigRequest instead. - */ -export type SeamCustomerV1ConnectorsIcalValidateConfigResponse = - RouteResponse<'/seam/customer/v1/connectors/ical/validate-config'> - -export type SeamCustomerV1ConnectorsIcalValidateConfigRequest = SeamHttpRequest< - SeamCustomerV1ConnectorsIcalValidateConfigResponse, - 'validation_result' -> - -export interface SeamCustomerV1ConnectorsIcalValidateConfigOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.ts deleted file mode 100644 index 1d8f8cd6..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/ical/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './ical.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 deleted file mode 100644 index 5c96db36..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/connectors/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './connectors.js' -export * from './external-sites/index.js' -export * from './ical/index.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts b/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts deleted file mode 100644 index f41e91a7..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { - RouteRequestBody, - RouteRequestParams, - 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' - -export class SeamHttpSeamCustomerV1CustomersAutomations { - 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 = {}, - ): SeamHttpSeamCustomerV1CustomersAutomations { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1CustomersAutomations { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1CustomersAutomations { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1CustomersAutomations(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 SeamHttpSeamCustomerV1CustomersAutomations.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1CustomersAutomations.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1CustomersAutomations { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1CustomersAutomations(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1CustomersAutomations { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1CustomersAutomations(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() - } - - get( - parameters?: SeamCustomerV1CustomersAutomationsGetParameters, - options: SeamCustomerV1CustomersAutomationsGetOptions = {}, - ): SeamCustomerV1CustomersAutomationsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/customers/automations/get', - method: 'GET', - params: parameters, - responseKey: 'automation', - options, - }) - } - - update( - parameters?: SeamCustomerV1CustomersAutomationsUpdateParameters, - options: SeamCustomerV1CustomersAutomationsUpdateOptions = {}, - ): SeamCustomerV1CustomersAutomationsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/customers/automations/update', - method: 'PATCH', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type SeamCustomerV1CustomersAutomationsGetParameters = - RouteRequestParams<'/seam/customer/v1/customers/automations/get'> - -/** - * @deprecated Use SeamCustomerV1CustomersAutomationsGetParameters instead. - */ -export type SeamCustomerV1CustomersAutomationsGetParams = - SeamCustomerV1CustomersAutomationsGetParameters - -/** - * @deprecated Use SeamCustomerV1CustomersAutomationsGetRequest instead. - */ -export type SeamCustomerV1CustomersAutomationsGetResponse = - RouteResponse<'/seam/customer/v1/customers/automations/get'> - -export type SeamCustomerV1CustomersAutomationsGetRequest = SeamHttpRequest< - SeamCustomerV1CustomersAutomationsGetResponse, - 'automation' -> - -export interface SeamCustomerV1CustomersAutomationsGetOptions {} - -export type SeamCustomerV1CustomersAutomationsUpdateParameters = - RouteRequestBody<'/seam/customer/v1/customers/automations/update'> - -/** - * @deprecated Use SeamCustomerV1CustomersAutomationsUpdateParameters instead. - */ -export type SeamCustomerV1CustomersAutomationsUpdateBody = - SeamCustomerV1CustomersAutomationsUpdateParameters - -/** - * @deprecated Use SeamCustomerV1CustomersAutomationsUpdateRequest instead. - */ -export type SeamCustomerV1CustomersAutomationsUpdateResponse = - RouteResponse<'/seam/customer/v1/customers/automations/update'> - -export type SeamCustomerV1CustomersAutomationsUpdateRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1CustomersAutomationsUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.ts deleted file mode 100644 index 49fd0137..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './automations.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts b/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts deleted file mode 100644 index 891ad219..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { - RouteRequestBody, - RouteRequestParams, - 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 { SeamHttpSeamCustomerV1CustomersAutomations } from './automations/index.js' - -export class SeamHttpSeamCustomerV1Customers { - 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 = {}, - ): SeamHttpSeamCustomerV1Customers { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Customers(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Customers { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Customers(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Customers { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Customers(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 SeamHttpSeamCustomerV1Customers.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Customers.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Customers { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Customers(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Customers { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Customers(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() - } - - get automations(): SeamHttpSeamCustomerV1CustomersAutomations { - return SeamHttpSeamCustomerV1CustomersAutomations.fromClient( - this.client, - this.defaults, - ) - } - - list( - parameters?: SeamCustomerV1CustomersListParameters, - options: SeamCustomerV1CustomersListOptions = {}, - ): SeamCustomerV1CustomersListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/customers/list', - method: 'POST', - body: parameters, - responseKey: 'customers', - options, - }) - } - - me( - parameters?: SeamCustomerV1CustomersMeParameters, - options: SeamCustomerV1CustomersMeOptions = {}, - ): SeamCustomerV1CustomersMeRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/customers/me', - method: 'GET', - params: parameters, - responseKey: undefined, - options, - }) - } - - openPortal( - parameters: SeamCustomerV1CustomersOpenPortalParameters, - options: SeamCustomerV1CustomersOpenPortalOptions = {}, - ): SeamCustomerV1CustomersOpenPortalRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/customers/open_portal', - method: 'POST', - body: parameters, - responseKey: 'magic_link', - options, - }) - } -} - -export type SeamCustomerV1CustomersListParameters = - RouteRequestBody<'/seam/customer/v1/customers/list'> - -/** - * @deprecated Use SeamCustomerV1CustomersListParameters instead. - */ -export type SeamCustomerV1CustomersListParams = - SeamCustomerV1CustomersListParameters - -/** - * @deprecated Use SeamCustomerV1CustomersListRequest instead. - */ -export type SeamCustomerV1CustomersListResponse = - RouteResponse<'/seam/customer/v1/customers/list'> - -export type SeamCustomerV1CustomersListRequest = SeamHttpRequest< - SeamCustomerV1CustomersListResponse, - 'customers' -> - -export interface SeamCustomerV1CustomersListOptions {} - -export type SeamCustomerV1CustomersMeParameters = - RouteRequestParams<'/seam/customer/v1/customers/me'> - -/** - * @deprecated Use SeamCustomerV1CustomersMeParameters instead. - */ -export type SeamCustomerV1CustomersMeParams = - SeamCustomerV1CustomersMeParameters - -/** - * @deprecated Use SeamCustomerV1CustomersMeRequest instead. - */ -export type SeamCustomerV1CustomersMeResponse = - RouteResponse<'/seam/customer/v1/customers/me'> - -export type SeamCustomerV1CustomersMeRequest = SeamHttpRequest - -export interface SeamCustomerV1CustomersMeOptions {} - -export type SeamCustomerV1CustomersOpenPortalParameters = - RouteRequestBody<'/seam/customer/v1/customers/open_portal'> - -/** - * @deprecated Use SeamCustomerV1CustomersOpenPortalParameters instead. - */ -export type SeamCustomerV1CustomersOpenPortalBody = - SeamCustomerV1CustomersOpenPortalParameters - -/** - * @deprecated Use SeamCustomerV1CustomersOpenPortalRequest instead. - */ -export type SeamCustomerV1CustomersOpenPortalResponse = - RouteResponse<'/seam/customer/v1/customers/open_portal'> - -export type SeamCustomerV1CustomersOpenPortalRequest = SeamHttpRequest< - SeamCustomerV1CustomersOpenPortalResponse, - 'magic_link' -> - -export interface SeamCustomerV1CustomersOpenPortalOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/customers/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/customers/index.ts deleted file mode 100644 index 78de25f4..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/customers/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './automations/index.js' -export * from './customers.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts b/src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts deleted file mode 100644 index dac83679..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts +++ /dev/null @@ -1,209 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1Encoders { - 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 = {}, - ): SeamHttpSeamCustomerV1Encoders { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Encoders(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Encoders { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Encoders(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Encoders { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Encoders(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 SeamHttpSeamCustomerV1Encoders.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Encoders.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Encoders { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Encoders(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Encoders { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Encoders(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?: SeamCustomerV1EncodersListParameters, - options: SeamCustomerV1EncodersListOptions = {}, - ): SeamCustomerV1EncodersListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/encoders/list', - method: 'POST', - body: parameters, - responseKey: 'encoders', - options, - }) - } -} - -export type SeamCustomerV1EncodersListParameters = - RouteRequestBody<'/seam/customer/v1/encoders/list'> - -/** - * @deprecated Use SeamCustomerV1EncodersListParameters instead. - */ -export type SeamCustomerV1EncodersListParams = - SeamCustomerV1EncodersListParameters - -/** - * @deprecated Use SeamCustomerV1EncodersListRequest instead. - */ -export type SeamCustomerV1EncodersListResponse = - RouteResponse<'/seam/customer/v1/encoders/list'> - -export type SeamCustomerV1EncodersListRequest = SeamHttpRequest< - SeamCustomerV1EncodersListResponse, - 'encoders' -> - -export interface SeamCustomerV1EncodersListOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts deleted file mode 100644 index e4fa625b..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './encoders.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/events/events.ts b/src/lib/seam/connect/routes/seam/customer/v1/events/events.ts deleted file mode 100644 index a73ae8d1..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/events/events.ts +++ /dev/null @@ -1,208 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1Events { - 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 = {}, - ): SeamHttpSeamCustomerV1Events { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Events(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Events { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Events(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Events { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Events(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 SeamHttpSeamCustomerV1Events.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Events.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Events { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Events(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Events { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Events(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: SeamCustomerV1EventsListParameters, - options: SeamCustomerV1EventsListOptions = {}, - ): SeamCustomerV1EventsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/events/list', - method: 'POST', - body: parameters, - responseKey: 'events', - options, - }) - } -} - -export type SeamCustomerV1EventsListParameters = - RouteRequestBody<'/seam/customer/v1/events/list'> - -/** - * @deprecated Use SeamCustomerV1EventsListParameters instead. - */ -export type SeamCustomerV1EventsListParams = SeamCustomerV1EventsListParameters - -/** - * @deprecated Use SeamCustomerV1EventsListRequest instead. - */ -export type SeamCustomerV1EventsListResponse = - RouteResponse<'/seam/customer/v1/events/list'> - -export type SeamCustomerV1EventsListRequest = SeamHttpRequest< - SeamCustomerV1EventsListResponse, - 'events' -> - -export interface SeamCustomerV1EventsListOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/events/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/events/index.ts deleted file mode 100644 index 80914354..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/events/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './events.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/index.ts deleted file mode 100644 index 06d5e025..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './access-grants/index.js' -export * from './access-methods/index.js' -export * from './automation-runs/index.js' -export * from './automations/index.js' -export * from './connector-customers/index.js' -export * from './connectors/index.js' -export * from './customers/index.js' -export * from './encoders/index.js' -export * from './events/index.js' -export * from './portals/index.js' -export * from './reservations/index.js' -export * from './settings/index.js' -export * from './spaces/index.js' -export * from './staff-members/index.js' -export * from './v1.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/portals/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/portals/index.ts deleted file mode 100644 index 31aa3aa4..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/portals/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './portals.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts b/src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts deleted file mode 100644 index e8fe8d10..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/portals/portals.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1Portals { - 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 = {}, - ): SeamHttpSeamCustomerV1Portals { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Portals(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Portals { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Portals(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Portals { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Portals(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 SeamHttpSeamCustomerV1Portals.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Portals.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Portals { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Portals(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Portals { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Portals(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() - } - - get( - parameters: SeamCustomerV1PortalsGetParameters, - options: SeamCustomerV1PortalsGetOptions = {}, - ): SeamCustomerV1PortalsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/portals/get', - method: 'POST', - body: parameters, - responseKey: 'customer_portal', - options, - }) - } - - update( - parameters: SeamCustomerV1PortalsUpdateParameters, - options: SeamCustomerV1PortalsUpdateOptions = {}, - ): SeamCustomerV1PortalsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/portals/update', - method: 'PATCH', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type SeamCustomerV1PortalsGetParameters = - RouteRequestBody<'/seam/customer/v1/portals/get'> - -/** - * @deprecated Use SeamCustomerV1PortalsGetParameters instead. - */ -export type SeamCustomerV1PortalsGetParams = SeamCustomerV1PortalsGetParameters - -/** - * @deprecated Use SeamCustomerV1PortalsGetRequest instead. - */ -export type SeamCustomerV1PortalsGetResponse = - RouteResponse<'/seam/customer/v1/portals/get'> - -export type SeamCustomerV1PortalsGetRequest = SeamHttpRequest< - SeamCustomerV1PortalsGetResponse, - 'customer_portal' -> - -export interface SeamCustomerV1PortalsGetOptions {} - -export type SeamCustomerV1PortalsUpdateParameters = - RouteRequestBody<'/seam/customer/v1/portals/update'> - -/** - * @deprecated Use SeamCustomerV1PortalsUpdateParameters instead. - */ -export type SeamCustomerV1PortalsUpdateBody = - SeamCustomerV1PortalsUpdateParameters - -/** - * @deprecated Use SeamCustomerV1PortalsUpdateRequest instead. - */ -export type SeamCustomerV1PortalsUpdateResponse = - RouteResponse<'/seam/customer/v1/portals/update'> - -export type SeamCustomerV1PortalsUpdateRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1PortalsUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/reservations/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/reservations/index.ts deleted file mode 100644 index 72e7f4fc..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/reservations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './reservations.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/reservations/reservations.ts b/src/lib/seam/connect/routes/seam/customer/v1/reservations/reservations.ts deleted file mode 100644 index 86aaae05..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/reservations/reservations.ts +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1Reservations { - 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 = {}, - ): SeamHttpSeamCustomerV1Reservations { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Reservations(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Reservations { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Reservations(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Reservations { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Reservations(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 SeamHttpSeamCustomerV1Reservations.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Reservations.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Reservations { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Reservations(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Reservations { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Reservations(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() - } - - get( - parameters?: SeamCustomerV1ReservationsGetParameters, - options: SeamCustomerV1ReservationsGetOptions = {}, - ): SeamCustomerV1ReservationsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/reservations/get', - method: 'POST', - body: parameters, - responseKey: 'reservation', - options, - }) - } - - list( - parameters?: SeamCustomerV1ReservationsListParameters, - options: SeamCustomerV1ReservationsListOptions = {}, - ): SeamCustomerV1ReservationsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/reservations/list', - method: 'POST', - body: parameters, - responseKey: 'reservations', - options, - }) - } - - listAccessGrants( - parameters: SeamCustomerV1ReservationsListAccessGrantsParameters, - options: SeamCustomerV1ReservationsListAccessGrantsOptions = {}, - ): SeamCustomerV1ReservationsListAccessGrantsRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/reservations/list_access_grants', - method: 'POST', - body: parameters, - responseKey: 'access_grants', - options, - }) - } -} - -export type SeamCustomerV1ReservationsGetParameters = - RouteRequestBody<'/seam/customer/v1/reservations/get'> - -/** - * @deprecated Use SeamCustomerV1ReservationsGetParameters instead. - */ -export type SeamCustomerV1ReservationsGetParams = - SeamCustomerV1ReservationsGetParameters - -/** - * @deprecated Use SeamCustomerV1ReservationsGetRequest instead. - */ -export type SeamCustomerV1ReservationsGetResponse = - RouteResponse<'/seam/customer/v1/reservations/get'> - -export type SeamCustomerV1ReservationsGetRequest = SeamHttpRequest< - SeamCustomerV1ReservationsGetResponse, - 'reservation' -> - -export interface SeamCustomerV1ReservationsGetOptions {} - -export type SeamCustomerV1ReservationsListParameters = - RouteRequestBody<'/seam/customer/v1/reservations/list'> - -/** - * @deprecated Use SeamCustomerV1ReservationsListParameters instead. - */ -export type SeamCustomerV1ReservationsListParams = - SeamCustomerV1ReservationsListParameters - -/** - * @deprecated Use SeamCustomerV1ReservationsListRequest instead. - */ -export type SeamCustomerV1ReservationsListResponse = - RouteResponse<'/seam/customer/v1/reservations/list'> - -export type SeamCustomerV1ReservationsListRequest = SeamHttpRequest< - SeamCustomerV1ReservationsListResponse, - 'reservations' -> - -export interface SeamCustomerV1ReservationsListOptions {} - -export type SeamCustomerV1ReservationsListAccessGrantsParameters = - RouteRequestBody<'/seam/customer/v1/reservations/list_access_grants'> - -/** - * @deprecated Use SeamCustomerV1ReservationsListAccessGrantsParameters instead. - */ -export type SeamCustomerV1ReservationsListAccessGrantsParams = - SeamCustomerV1ReservationsListAccessGrantsParameters - -/** - * @deprecated Use SeamCustomerV1ReservationsListAccessGrantsRequest instead. - */ -export type SeamCustomerV1ReservationsListAccessGrantsResponse = - RouteResponse<'/seam/customer/v1/reservations/list_access_grants'> - -export type SeamCustomerV1ReservationsListAccessGrantsRequest = SeamHttpRequest< - SeamCustomerV1ReservationsListAccessGrantsResponse, - 'access_grants' -> - -export interface SeamCustomerV1ReservationsListAccessGrantsOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/settings/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/settings/index.ts deleted file mode 100644 index 2d2ca6e4..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/settings/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './settings.js' -export * from './vertical-resource-aliases/index.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts b/src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts deleted file mode 100644 index 744c599d..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -import type { - RouteRequestBody, - RouteRequestParams, - 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 { SeamHttpSeamCustomerV1SettingsVerticalResourceAliases } from './vertical-resource-aliases/index.js' - -export class SeamHttpSeamCustomerV1Settings { - 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 = {}, - ): SeamHttpSeamCustomerV1Settings { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Settings(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Settings { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Settings(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Settings { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Settings(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 SeamHttpSeamCustomerV1Settings.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Settings.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Settings { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Settings(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Settings { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Settings(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() - } - - get verticalResourceAliases(): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - return SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromClient( - this.client, - this.defaults, - ) - } - - get( - parameters?: SeamCustomerV1SettingsGetParameters, - options: SeamCustomerV1SettingsGetOptions = {}, - ): SeamCustomerV1SettingsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/settings/get', - method: 'GET', - params: parameters, - responseKey: 'business_vertical', - options, - }) - } - - update( - parameters?: SeamCustomerV1SettingsUpdateParameters, - options: SeamCustomerV1SettingsUpdateOptions = {}, - ): SeamCustomerV1SettingsUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/settings/update', - method: 'PATCH', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type SeamCustomerV1SettingsGetParameters = - RouteRequestParams<'/seam/customer/v1/settings/get'> - -/** - * @deprecated Use SeamCustomerV1SettingsGetParameters instead. - */ -export type SeamCustomerV1SettingsGetParams = - SeamCustomerV1SettingsGetParameters - -/** - * @deprecated Use SeamCustomerV1SettingsGetRequest instead. - */ -export type SeamCustomerV1SettingsGetResponse = - RouteResponse<'/seam/customer/v1/settings/get'> - -export type SeamCustomerV1SettingsGetRequest = SeamHttpRequest< - SeamCustomerV1SettingsGetResponse, - 'business_vertical' -> - -export interface SeamCustomerV1SettingsGetOptions {} - -export type SeamCustomerV1SettingsUpdateParameters = - RouteRequestBody<'/seam/customer/v1/settings/update'> - -/** - * @deprecated Use SeamCustomerV1SettingsUpdateParameters instead. - */ -export type SeamCustomerV1SettingsUpdateBody = - SeamCustomerV1SettingsUpdateParameters - -/** - * @deprecated Use SeamCustomerV1SettingsUpdateRequest instead. - */ -export type SeamCustomerV1SettingsUpdateResponse = - RouteResponse<'/seam/customer/v1/settings/update'> - -export type SeamCustomerV1SettingsUpdateRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1SettingsUpdateOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.ts deleted file mode 100644 index dbbd1af2..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './vertical-resource-aliases.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.ts b/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.ts deleted file mode 100644 index 8982cf3b..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/settings/vertical-resource-aliases/vertical-resource-aliases.ts +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - 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 = {}, - ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases( - constructorOptions, - ) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases( - constructorOptions, - ) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases( - 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 SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1SettingsVerticalResourceAliases.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases( - constructorOptions, - ) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1SettingsVerticalResourceAliases { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1SettingsVerticalResourceAliases( - 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() - } - - get( - parameters?: SeamCustomerV1SettingsVerticalResourceAliasesGetParameters, - options: SeamCustomerV1SettingsVerticalResourceAliasesGetOptions = {}, - ): SeamCustomerV1SettingsVerticalResourceAliasesGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/settings/vertical_resource_aliases/get', - method: 'POST', - body: parameters, - responseKey: 'vertical_resource_aliases', - options, - }) - } -} - -export type SeamCustomerV1SettingsVerticalResourceAliasesGetParameters = - RouteRequestBody<'/seam/customer/v1/settings/vertical_resource_aliases/get'> - -/** - * @deprecated Use SeamCustomerV1SettingsVerticalResourceAliasesGetParameters instead. - */ -export type SeamCustomerV1SettingsVerticalResourceAliasesGetParams = - SeamCustomerV1SettingsVerticalResourceAliasesGetParameters - -/** - * @deprecated Use SeamCustomerV1SettingsVerticalResourceAliasesGetRequest instead. - */ -export type SeamCustomerV1SettingsVerticalResourceAliasesGetResponse = - RouteResponse<'/seam/customer/v1/settings/vertical_resource_aliases/get'> - -export type SeamCustomerV1SettingsVerticalResourceAliasesGetRequest = - SeamHttpRequest< - SeamCustomerV1SettingsVerticalResourceAliasesGetResponse, - 'vertical_resource_aliases' - > - -export interface SeamCustomerV1SettingsVerticalResourceAliasesGetOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/spaces/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/spaces/index.ts deleted file mode 100644 index af3f0bb2..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/spaces/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './spaces.js' 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 deleted file mode 100644 index c9415db6..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1Spaces { - 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 = {}, - ): SeamHttpSeamCustomerV1Spaces { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1Spaces(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1Spaces { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1Spaces(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1Spaces { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1Spaces(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 SeamHttpSeamCustomerV1Spaces.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1Spaces.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Spaces { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Spaces(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1Spaces { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1Spaces(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() - } - - create( - 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', - body: parameters, - responseKey: 'space', - options, - }) - } - - list( - 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', - body: parameters, - responseKey: 'spaces', - options, - }) - } - - listReservations( - parameters: SeamCustomerV1SpacesListReservationsParameters, - options: SeamCustomerV1SpacesListReservationsOptions = {}, - ): SeamCustomerV1SpacesListReservationsRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/spaces/list_reservations', - method: 'POST', - body: parameters, - responseKey: 'reservations', - options, - }) - } - - pushCommonAreas( - parameters?: SeamCustomerV1SpacesPushCommonAreasParameters, - options: SeamCustomerV1SpacesPushCommonAreasOptions = {}, - ): SeamCustomerV1SpacesPushCommonAreasRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/spaces/push_common_areas', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type SeamCustomerV1SpacesCreateParameters = - RouteRequestBody<'/seam/customer/v1/spaces/create'> - -/** - * @deprecated Use SeamCustomerV1SpacesCreateParameters instead. - */ -export type SeamCustomerV1SpacesCreateBody = - SeamCustomerV1SpacesCreateParameters - -/** - * @deprecated Use SeamCustomerV1SpacesCreateRequest instead. - */ -export type SeamCustomerV1SpacesCreateResponse = - RouteResponse<'/seam/customer/v1/spaces/create'> - -export type SeamCustomerV1SpacesCreateRequest = SeamHttpRequest< - SeamCustomerV1SpacesCreateResponse, - 'space' -> - -export interface SeamCustomerV1SpacesCreateOptions {} - -export type SeamCustomerV1SpacesListParameters = - RouteRequestBody<'/seam/customer/v1/spaces/list'> - -/** - * @deprecated Use SeamCustomerV1SpacesListParameters instead. - */ -export type SeamCustomerV1SpacesListParams = SeamCustomerV1SpacesListParameters - -/** - * @deprecated Use SeamCustomerV1SpacesListRequest instead. - */ -export type SeamCustomerV1SpacesListResponse = - RouteResponse<'/seam/customer/v1/spaces/list'> - -export type SeamCustomerV1SpacesListRequest = SeamHttpRequest< - SeamCustomerV1SpacesListResponse, - 'spaces' -> - -export interface SeamCustomerV1SpacesListOptions {} - -export type SeamCustomerV1SpacesListReservationsParameters = - RouteRequestBody<'/seam/customer/v1/spaces/list_reservations'> - -/** - * @deprecated Use SeamCustomerV1SpacesListReservationsParameters instead. - */ -export type SeamCustomerV1SpacesListReservationsParams = - SeamCustomerV1SpacesListReservationsParameters - -/** - * @deprecated Use SeamCustomerV1SpacesListReservationsRequest instead. - */ -export type SeamCustomerV1SpacesListReservationsResponse = - RouteResponse<'/seam/customer/v1/spaces/list_reservations'> - -export type SeamCustomerV1SpacesListReservationsRequest = SeamHttpRequest< - SeamCustomerV1SpacesListReservationsResponse, - 'reservations' -> - -export interface SeamCustomerV1SpacesListReservationsOptions {} - -export type SeamCustomerV1SpacesPushCommonAreasParameters = - RouteRequestBody<'/seam/customer/v1/spaces/push_common_areas'> - -/** - * @deprecated Use SeamCustomerV1SpacesPushCommonAreasParameters instead. - */ -export type SeamCustomerV1SpacesPushCommonAreasBody = - SeamCustomerV1SpacesPushCommonAreasParameters - -/** - * @deprecated Use SeamCustomerV1SpacesPushCommonAreasRequest instead. - */ -export type SeamCustomerV1SpacesPushCommonAreasResponse = - RouteResponse<'/seam/customer/v1/spaces/push_common_areas'> - -export type SeamCustomerV1SpacesPushCommonAreasRequest = SeamHttpRequest< - void, - undefined -> - -export interface SeamCustomerV1SpacesPushCommonAreasOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/staff-members/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/staff-members/index.ts deleted file mode 100644 index 152bf865..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/staff-members/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './staff-members.js' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts b/src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts deleted file mode 100644 index 3084da33..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/staff-members/staff-members.ts +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamCustomerV1StaffMembers { - 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 = {}, - ): SeamHttpSeamCustomerV1StaffMembers { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1StaffMembers(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1StaffMembers { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1StaffMembers(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1StaffMembers { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1StaffMembers(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 SeamHttpSeamCustomerV1StaffMembers.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1StaffMembers.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1StaffMembers { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1StaffMembers(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1StaffMembers { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1StaffMembers(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() - } - - get( - parameters: SeamCustomerV1StaffMembersGetParameters, - options: SeamCustomerV1StaffMembersGetOptions = {}, - ): SeamCustomerV1StaffMembersGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/staff_members/get', - method: 'POST', - body: parameters, - responseKey: 'staff_member', - options, - }) - } - - list( - parameters?: SeamCustomerV1StaffMembersListParameters, - options: SeamCustomerV1StaffMembersListOptions = {}, - ): SeamCustomerV1StaffMembersListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/customer/v1/staff_members/list', - method: 'POST', - body: parameters, - responseKey: 'staff_members', - options, - }) - } -} - -export type SeamCustomerV1StaffMembersGetParameters = - RouteRequestBody<'/seam/customer/v1/staff_members/get'> - -/** - * @deprecated Use SeamCustomerV1StaffMembersGetParameters instead. - */ -export type SeamCustomerV1StaffMembersGetParams = - SeamCustomerV1StaffMembersGetParameters - -/** - * @deprecated Use SeamCustomerV1StaffMembersGetRequest instead. - */ -export type SeamCustomerV1StaffMembersGetResponse = - RouteResponse<'/seam/customer/v1/staff_members/get'> - -export type SeamCustomerV1StaffMembersGetRequest = SeamHttpRequest< - SeamCustomerV1StaffMembersGetResponse, - 'staff_member' -> - -export interface SeamCustomerV1StaffMembersGetOptions {} - -export type SeamCustomerV1StaffMembersListParameters = - RouteRequestBody<'/seam/customer/v1/staff_members/list'> - -/** - * @deprecated Use SeamCustomerV1StaffMembersListParameters instead. - */ -export type SeamCustomerV1StaffMembersListParams = - SeamCustomerV1StaffMembersListParameters - -/** - * @deprecated Use SeamCustomerV1StaffMembersListRequest instead. - */ -export type SeamCustomerV1StaffMembersListResponse = - RouteResponse<'/seam/customer/v1/staff_members/list'> - -export type SeamCustomerV1StaffMembersListRequest = SeamHttpRequest< - SeamCustomerV1StaffMembersListResponse, - 'staff_members' -> - -export interface SeamCustomerV1StaffMembersListOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/v1.ts b/src/lib/seam/connect/routes/seam/customer/v1/v1.ts deleted file mode 100644 index 1ae1f396..00000000 --- a/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -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 type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' -import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' - -import { SeamHttpSeamCustomerV1AccessGrants } from './access-grants/index.js' -import { SeamHttpSeamCustomerV1AccessMethods } from './access-methods/index.js' -import { SeamHttpSeamCustomerV1AutomationRuns } from './automation-runs/index.js' -import { SeamHttpSeamCustomerV1Automations } from './automations/index.js' -import { SeamHttpSeamCustomerV1ConnectorCustomers } from './connector-customers/index.js' -import { SeamHttpSeamCustomerV1Connectors } from './connectors/index.js' -import { SeamHttpSeamCustomerV1Customers } from './customers/index.js' -import { SeamHttpSeamCustomerV1Encoders } from './encoders/index.js' -import { SeamHttpSeamCustomerV1Events } from './events/index.js' -import { SeamHttpSeamCustomerV1Portals } from './portals/index.js' -import { SeamHttpSeamCustomerV1Reservations } from './reservations/index.js' -import { SeamHttpSeamCustomerV1Settings } from './settings/index.js' -import { SeamHttpSeamCustomerV1Spaces } from './spaces/index.js' -import { SeamHttpSeamCustomerV1StaffMembers } from './staff-members/index.js' - -export class SeamHttpSeamCustomerV1 { - 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 = {}, - ): SeamHttpSeamCustomerV1 { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamCustomerV1(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamCustomerV1 { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamCustomerV1(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamCustomerV1 { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamCustomerV1(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 SeamHttpSeamCustomerV1.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamCustomerV1.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1 { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamCustomerV1 { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamCustomerV1(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() - } - - get accessGrants(): SeamHttpSeamCustomerV1AccessGrants { - return SeamHttpSeamCustomerV1AccessGrants.fromClient( - this.client, - this.defaults, - ) - } - - get accessMethods(): SeamHttpSeamCustomerV1AccessMethods { - return SeamHttpSeamCustomerV1AccessMethods.fromClient( - this.client, - this.defaults, - ) - } - - get automationRuns(): SeamHttpSeamCustomerV1AutomationRuns { - return SeamHttpSeamCustomerV1AutomationRuns.fromClient( - this.client, - this.defaults, - ) - } - - get automations(): SeamHttpSeamCustomerV1Automations { - return SeamHttpSeamCustomerV1Automations.fromClient( - this.client, - this.defaults, - ) - } - - get connectorCustomers(): SeamHttpSeamCustomerV1ConnectorCustomers { - return SeamHttpSeamCustomerV1ConnectorCustomers.fromClient( - this.client, - this.defaults, - ) - } - - get connectors(): SeamHttpSeamCustomerV1Connectors { - return SeamHttpSeamCustomerV1Connectors.fromClient( - this.client, - this.defaults, - ) - } - - get customers(): SeamHttpSeamCustomerV1Customers { - return SeamHttpSeamCustomerV1Customers.fromClient( - this.client, - this.defaults, - ) - } - - get encoders(): SeamHttpSeamCustomerV1Encoders { - return SeamHttpSeamCustomerV1Encoders.fromClient(this.client, this.defaults) - } - - get events(): SeamHttpSeamCustomerV1Events { - return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults) - } - - get portals(): SeamHttpSeamCustomerV1Portals { - return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults) - } - - get reservations(): SeamHttpSeamCustomerV1Reservations { - return SeamHttpSeamCustomerV1Reservations.fromClient( - this.client, - this.defaults, - ) - } - - get settings(): SeamHttpSeamCustomerV1Settings { - return SeamHttpSeamCustomerV1Settings.fromClient(this.client, this.defaults) - } - - get spaces(): SeamHttpSeamCustomerV1Spaces { - return SeamHttpSeamCustomerV1Spaces.fromClient(this.client, this.defaults) - } - - get staffMembers(): SeamHttpSeamCustomerV1StaffMembers { - return SeamHttpSeamCustomerV1StaffMembers.fromClient( - this.client, - this.defaults, - ) - } -} diff --git a/src/lib/seam/connect/routes/seam/index.ts b/src/lib/seam/connect/routes/seam/index.ts deleted file mode 100644 index 2ed07d2c..00000000 --- a/src/lib/seam/connect/routes/seam/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './console/index.js' -export * from './customer/index.js' -export * from './partner/index.js' diff --git a/src/lib/seam/connect/routes/seam/partner/index.ts b/src/lib/seam/connect/routes/seam/partner/index.ts deleted file mode 100644 index 2e9499e7..00000000 --- a/src/lib/seam/connect/routes/seam/partner/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './v1/index.js' diff --git a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.ts b/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.ts deleted file mode 100644 index bacf84da..00000000 --- a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/building-blocks.ts +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -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 type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' -import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' - -import { SeamHttpSeamPartnerV1BuildingBlocksSpaces } from './spaces/index.js' - -export class SeamHttpSeamPartnerV1BuildingBlocks { - 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 = {}, - ): SeamHttpSeamPartnerV1BuildingBlocks { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamPartnerV1BuildingBlocks { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamPartnerV1BuildingBlocks { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamPartnerV1BuildingBlocks(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 SeamHttpSeamPartnerV1BuildingBlocks.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamPartnerV1BuildingBlocks.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamPartnerV1BuildingBlocks { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamPartnerV1BuildingBlocks(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamPartnerV1BuildingBlocks { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamPartnerV1BuildingBlocks(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() - } - - get spaces(): SeamHttpSeamPartnerV1BuildingBlocksSpaces { - return SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromClient( - this.client, - this.defaults, - ) - } -} diff --git a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.ts b/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.ts deleted file mode 100644 index 234457d5..00000000 --- a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './building-blocks.js' -export * from './spaces/index.js' diff --git a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.ts b/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.ts deleted file mode 100644 index af3f0bb2..00000000 --- a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './spaces.js' diff --git a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts b/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts deleted file mode 100644 index 927399be..00000000 --- a/src/lib/seam/connect/routes/seam/partner/v1/building-blocks/spaces/spaces.ts +++ /dev/null @@ -1,212 +0,0 @@ -/* - * 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' - -export class SeamHttpSeamPartnerV1BuildingBlocksSpaces { - 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 = {}, - ): SeamHttpSeamPartnerV1BuildingBlocksSpaces { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpSeamPartnerV1BuildingBlocksSpaces { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpSeamPartnerV1BuildingBlocksSpaces { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpSeamPartnerV1BuildingBlocksSpaces(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 SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpSeamPartnerV1BuildingBlocksSpaces.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamPartnerV1BuildingBlocksSpaces { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpSeamPartnerV1BuildingBlocksSpaces(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpSeamPartnerV1BuildingBlocksSpaces { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpSeamPartnerV1BuildingBlocksSpaces(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() - } - - autoMap( - parameters?: SeamPartnerV1BuildingBlocksSpacesAutoMapParameters, - options: SeamPartnerV1BuildingBlocksSpacesAutoMapOptions = {}, - ): SeamPartnerV1BuildingBlocksSpacesAutoMapRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/seam/partner/v1/building_blocks/spaces/auto_map', - method: 'POST', - body: parameters, - responseKey: 'spaces', - options, - }) - } -} - -export type SeamPartnerV1BuildingBlocksSpacesAutoMapParameters = - RouteRequestBody<'/seam/partner/v1/building_blocks/spaces/auto_map'> - -/** - * @deprecated Use SeamPartnerV1BuildingBlocksSpacesAutoMapParameters instead. - */ -export type SeamPartnerV1BuildingBlocksSpacesAutoMapParams = - SeamPartnerV1BuildingBlocksSpacesAutoMapParameters - -/** - * @deprecated Use SeamPartnerV1BuildingBlocksSpacesAutoMapRequest instead. - */ -export type SeamPartnerV1BuildingBlocksSpacesAutoMapResponse = - RouteResponse<'/seam/partner/v1/building_blocks/spaces/auto_map'> - -export type SeamPartnerV1BuildingBlocksSpacesAutoMapRequest = SeamHttpRequest< - SeamPartnerV1BuildingBlocksSpacesAutoMapResponse, - 'spaces' -> - -export interface SeamPartnerV1BuildingBlocksSpacesAutoMapOptions {} diff --git a/src/lib/seam/connect/routes/seam/partner/v1/index.ts b/src/lib/seam/connect/routes/seam/partner/v1/index.ts deleted file mode 100644 index ee41d3d1..00000000 --- a/src/lib/seam/connect/routes/seam/partner/v1/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './building-blocks/index.js' diff --git a/src/lib/seam/connect/routes/spaces/spaces.ts b/src/lib/seam/connect/routes/spaces/spaces.ts index 90da18d9..172c4219 100644 --- a/src/lib/seam/connect/routes/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/spaces/spaces.ts @@ -491,12 +491,9 @@ export type SpacesGetRelatedRequest = SeamHttpRequest< export interface SpacesGetRelatedOptions {} export type SpacesListParameters = { - connected_account_id?: string | undefined customer_key?: string | undefined limit?: number | undefined page_cursor?: string | undefined - parent_space_id?: string | undefined - parent_space_key?: string | undefined search?: string | undefined space_key?: string | undefined } @@ -591,8 +588,6 @@ export type SpacesUpdateParameters = { | undefined device_ids?: Array | undefined name?: string | undefined - parent_space_id?: string | undefined - parent_space_key?: string | undefined space_id?: string | undefined space_key?: string | undefined } diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index 7a94d994..f98c7c93 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -3,7 +3,7 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' +import type { RouteResponse } from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -234,24 +234,6 @@ export class SeamHttpThermostats { }) } - get( - parameters?: ThermostatsGetParameters, - options: ThermostatsGetOptions = {}, - ): ThermostatsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/thermostats/get', - method: 'POST', - body: parameters, - responseKey: 'thermostat', - options, - }) - } - heat( parameters: ThermostatsHeatParameters, options: ThermostatsHeatOptions = {}, @@ -415,8 +397,6 @@ export type ThermostatsCoolParameters = { cooling_set_point_celsius?: number | undefined cooling_set_point_fahrenheit?: number | undefined device_id: string - - sync?: boolean | undefined } /** @@ -505,31 +485,11 @@ export type ThermostatsDeleteClimatePresetRequest = SeamHttpRequest< export interface ThermostatsDeleteClimatePresetOptions {} -export type ThermostatsGetParameters = RouteRequestBody<'/thermostats/get'> - -/** - * @deprecated Use ThermostatsGetParameters instead. - */ -export type ThermostatsGetParams = ThermostatsGetParameters - -/** - * @deprecated Use ThermostatsGetRequest instead. - */ -export type ThermostatsGetResponse = RouteResponse<'/thermostats/get'> - -export type ThermostatsGetRequest = SeamHttpRequest< - ThermostatsGetResponse, - 'thermostat' -> - -export interface ThermostatsGetOptions {} - export type ThermostatsHeatParameters = { device_id: string heating_set_point_celsius?: number | undefined heating_set_point_fahrenheit?: number | undefined - sync?: boolean | undefined } /** @@ -559,7 +519,6 @@ export type ThermostatsHeatCoolParameters = { heating_set_point_celsius?: number | undefined heating_set_point_fahrenheit?: number | undefined - sync?: boolean | undefined } /** @@ -609,54 +568,6 @@ export type ThermostatsListParameters = { | 'smartthings_thermostat' > | undefined - exclude_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined - include_if?: - | Array< - | 'can_remotely_unlock' - | 'can_remotely_lock' - | 'can_program_offline_access_codes' - | 'can_program_online_access_codes' - | 'can_hvac_heat' - | 'can_hvac_cool' - | 'can_hvac_heat_cool' - | 'can_turn_off_hvac' - | 'can_simulate_removal' - | 'can_simulate_connection' - | 'can_simulate_disconnection' - | 'can_unlock_with_code' - | 'can_run_thermostat_programs' - | 'can_program_thermostat_programs_as_weekday_weekend' - | 'can_program_thermostat_programs_as_different_each_day' - | 'can_program_thermostat_programs_as_same_each_day' - | 'can_simulate_hub_connection' - | 'can_simulate_hub_disconnection' - | 'can_simulate_paid_subscription' - | 'can_configure_auto_lock' - > - | undefined limit?: number | undefined manufacturer?: | 'ecobee' @@ -692,8 +603,6 @@ export interface ThermostatsListOptions {} export type ThermostatsOffParameters = { device_id: string - - sync?: boolean | undefined } /** @@ -745,7 +654,6 @@ export type ThermostatsSetFanModeParameters = { fan_mode?: 'auto' | 'on' | 'circulate' | undefined fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined - sync?: boolean | undefined } /** diff --git a/src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts b/src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts deleted file mode 100644 index 9b290367..00000000 --- a/src/lib/seam/connect/routes/unstable-partner/building-blocks/building-blocks.ts +++ /dev/null @@ -1,335 +0,0 @@ -/* - * 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' - -export class SeamHttpUnstablePartnerBuildingBlocks { - 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 = {}, - ): SeamHttpUnstablePartnerBuildingBlocks { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpUnstablePartnerBuildingBlocks { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpUnstablePartnerBuildingBlocks { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpUnstablePartnerBuildingBlocks(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 SeamHttpUnstablePartnerBuildingBlocks.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpUnstablePartnerBuildingBlocks.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpUnstablePartnerBuildingBlocks { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpUnstablePartnerBuildingBlocks(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpUnstablePartnerBuildingBlocks { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpUnstablePartnerBuildingBlocks(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() - } - - connectAccounts( - parameters: UnstablePartnerBuildingBlocksConnectAccountsParameters, - options: UnstablePartnerBuildingBlocksConnectAccountsOptions = {}, - ): UnstablePartnerBuildingBlocksConnectAccountsRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/unstable_partner/building_blocks/connect_accounts', - method: 'POST', - body: parameters, - responseKey: 'magic_link', - options, - }) - } - - generateMagicLink( - parameters: UnstablePartnerBuildingBlocksGenerateMagicLinkParameters, - options: UnstablePartnerBuildingBlocksGenerateMagicLinkOptions = {}, - ): UnstablePartnerBuildingBlocksGenerateMagicLinkRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/unstable_partner/building_blocks/generate_magic_link', - method: 'POST', - body: parameters, - responseKey: 'magic_link', - options, - }) - } - - manageDevices( - parameters: UnstablePartnerBuildingBlocksManageDevicesParameters, - options: UnstablePartnerBuildingBlocksManageDevicesOptions = {}, - ): UnstablePartnerBuildingBlocksManageDevicesRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/unstable_partner/building_blocks/manage_devices', - method: 'POST', - body: parameters, - responseKey: 'magic_link', - options, - }) - } - - organizeSpaces( - parameters: UnstablePartnerBuildingBlocksOrganizeSpacesParameters, - options: UnstablePartnerBuildingBlocksOrganizeSpacesOptions = {}, - ): UnstablePartnerBuildingBlocksOrganizeSpacesRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/unstable_partner/building_blocks/organize_spaces', - method: 'POST', - body: parameters, - responseKey: 'magic_link', - options, - }) - } -} - -export type UnstablePartnerBuildingBlocksConnectAccountsParameters = - RouteRequestBody<'/unstable_partner/building_blocks/connect_accounts'> - -/** - * @deprecated Use UnstablePartnerBuildingBlocksConnectAccountsParameters instead. - */ -export type UnstablePartnerBuildingBlocksConnectAccountsBody = - UnstablePartnerBuildingBlocksConnectAccountsParameters - -/** - * @deprecated Use UnstablePartnerBuildingBlocksConnectAccountsRequest instead. - */ -export type UnstablePartnerBuildingBlocksConnectAccountsResponse = - RouteResponse<'/unstable_partner/building_blocks/connect_accounts'> - -export type UnstablePartnerBuildingBlocksConnectAccountsRequest = - SeamHttpRequest< - UnstablePartnerBuildingBlocksConnectAccountsResponse, - 'magic_link' - > - -export interface UnstablePartnerBuildingBlocksConnectAccountsOptions {} - -export type UnstablePartnerBuildingBlocksGenerateMagicLinkParameters = - RouteRequestBody<'/unstable_partner/building_blocks/generate_magic_link'> - -/** - * @deprecated Use UnstablePartnerBuildingBlocksGenerateMagicLinkParameters instead. - */ -export type UnstablePartnerBuildingBlocksGenerateMagicLinkParams = - UnstablePartnerBuildingBlocksGenerateMagicLinkParameters - -/** - * @deprecated Use UnstablePartnerBuildingBlocksGenerateMagicLinkRequest instead. - */ -export type UnstablePartnerBuildingBlocksGenerateMagicLinkResponse = - RouteResponse<'/unstable_partner/building_blocks/generate_magic_link'> - -export type UnstablePartnerBuildingBlocksGenerateMagicLinkRequest = - SeamHttpRequest< - UnstablePartnerBuildingBlocksGenerateMagicLinkResponse, - 'magic_link' - > - -export interface UnstablePartnerBuildingBlocksGenerateMagicLinkOptions {} - -export type UnstablePartnerBuildingBlocksManageDevicesParameters = - RouteRequestBody<'/unstable_partner/building_blocks/manage_devices'> - -/** - * @deprecated Use UnstablePartnerBuildingBlocksManageDevicesParameters instead. - */ -export type UnstablePartnerBuildingBlocksManageDevicesBody = - UnstablePartnerBuildingBlocksManageDevicesParameters - -/** - * @deprecated Use UnstablePartnerBuildingBlocksManageDevicesRequest instead. - */ -export type UnstablePartnerBuildingBlocksManageDevicesResponse = - RouteResponse<'/unstable_partner/building_blocks/manage_devices'> - -export type UnstablePartnerBuildingBlocksManageDevicesRequest = SeamHttpRequest< - UnstablePartnerBuildingBlocksManageDevicesResponse, - 'magic_link' -> - -export interface UnstablePartnerBuildingBlocksManageDevicesOptions {} - -export type UnstablePartnerBuildingBlocksOrganizeSpacesParameters = - RouteRequestBody<'/unstable_partner/building_blocks/organize_spaces'> - -/** - * @deprecated Use UnstablePartnerBuildingBlocksOrganizeSpacesParameters instead. - */ -export type UnstablePartnerBuildingBlocksOrganizeSpacesBody = - UnstablePartnerBuildingBlocksOrganizeSpacesParameters - -/** - * @deprecated Use UnstablePartnerBuildingBlocksOrganizeSpacesRequest instead. - */ -export type UnstablePartnerBuildingBlocksOrganizeSpacesResponse = - RouteResponse<'/unstable_partner/building_blocks/organize_spaces'> - -export type UnstablePartnerBuildingBlocksOrganizeSpacesRequest = - SeamHttpRequest< - UnstablePartnerBuildingBlocksOrganizeSpacesResponse, - 'magic_link' - > - -export interface UnstablePartnerBuildingBlocksOrganizeSpacesOptions {} diff --git a/src/lib/seam/connect/routes/unstable-partner/building-blocks/index.ts b/src/lib/seam/connect/routes/unstable-partner/building-blocks/index.ts deleted file mode 100644 index fccad75d..00000000 --- a/src/lib/seam/connect/routes/unstable-partner/building-blocks/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './building-blocks.js' diff --git a/src/lib/seam/connect/routes/unstable-partner/index.ts b/src/lib/seam/connect/routes/unstable-partner/index.ts deleted file mode 100644 index 85ca7e0f..00000000 --- a/src/lib/seam/connect/routes/unstable-partner/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './building-blocks/index.js' -export * from './unstable-partner.js' diff --git a/src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts b/src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts deleted file mode 100644 index 403ff0ba..00000000 --- a/src/lib/seam/connect/routes/unstable-partner/unstable-partner.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -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 type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' -import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' - -import { SeamHttpUnstablePartnerBuildingBlocks } from './building-blocks/index.js' - -export class SeamHttpUnstablePartner { - 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 = {}, - ): SeamHttpUnstablePartner { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpUnstablePartner(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpUnstablePartner { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpUnstablePartner(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpUnstablePartner { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpUnstablePartner(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 SeamHttpUnstablePartner.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpUnstablePartner.fromClientSessionToken(token, options) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpUnstablePartner { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpUnstablePartner(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpUnstablePartner { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpUnstablePartner(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() - } - - get buildingBlocks(): SeamHttpUnstablePartnerBuildingBlocks { - return SeamHttpUnstablePartnerBuildingBlocks.fromClient( - this.client, - this.defaults, - ) - } -} diff --git a/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts b/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts deleted file mode 100644 index 443f8643..00000000 --- a/src/lib/seam/connect/routes/user-identities/enrollment-automations/enrollment-automations.ts +++ /dev/null @@ -1,332 +0,0 @@ -/* - * 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' - -export class SeamHttpUserIdentitiesEnrollmentAutomations { - 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 = {}, - ): SeamHttpUserIdentitiesEnrollmentAutomations { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpUserIdentitiesEnrollmentAutomations { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpUserIdentitiesEnrollmentAutomations { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpUserIdentitiesEnrollmentAutomations(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 SeamHttpUserIdentitiesEnrollmentAutomations.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpUserIdentitiesEnrollmentAutomations.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpUserIdentitiesEnrollmentAutomations { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpUserIdentitiesEnrollmentAutomations { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpUserIdentitiesEnrollmentAutomations(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() - } - - delete( - parameters: UserIdentitiesEnrollmentAutomationsDeleteParameters, - options: UserIdentitiesEnrollmentAutomationsDeleteOptions = {}, - ): UserIdentitiesEnrollmentAutomationsDeleteRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/user_identities/enrollment_automations/delete', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } - - get( - parameters: UserIdentitiesEnrollmentAutomationsGetParameters, - options: UserIdentitiesEnrollmentAutomationsGetOptions = {}, - ): UserIdentitiesEnrollmentAutomationsGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/user_identities/enrollment_automations/get', - method: 'POST', - body: parameters, - responseKey: 'enrollment_automation', - options, - }) - } - - launch( - parameters: UserIdentitiesEnrollmentAutomationsLaunchParameters, - options: UserIdentitiesEnrollmentAutomationsLaunchOptions = {}, - ): UserIdentitiesEnrollmentAutomationsLaunchRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/user_identities/enrollment_automations/launch', - method: 'POST', - body: parameters, - responseKey: 'enrollment_automation', - options, - }) - } - - list( - parameters: UserIdentitiesEnrollmentAutomationsListParameters, - options: UserIdentitiesEnrollmentAutomationsListOptions = {}, - ): UserIdentitiesEnrollmentAutomationsListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/user_identities/enrollment_automations/list', - method: 'POST', - body: parameters, - responseKey: 'enrollment_automations', - options, - }) - } -} - -export type UserIdentitiesEnrollmentAutomationsDeleteParameters = - RouteRequestBody<'/user_identities/enrollment_automations/delete'> - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsDeleteParameters instead. - */ -export type UserIdentitiesEnrollmentAutomationsDeleteParams = - UserIdentitiesEnrollmentAutomationsDeleteParameters - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsDeleteRequest instead. - */ -export type UserIdentitiesEnrollmentAutomationsDeleteResponse = - RouteResponse<'/user_identities/enrollment_automations/delete'> - -export type UserIdentitiesEnrollmentAutomationsDeleteRequest = SeamHttpRequest< - void, - undefined -> - -export interface UserIdentitiesEnrollmentAutomationsDeleteOptions {} - -export type UserIdentitiesEnrollmentAutomationsGetParameters = - RouteRequestBody<'/user_identities/enrollment_automations/get'> - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsGetParameters instead. - */ -export type UserIdentitiesEnrollmentAutomationsGetParams = - UserIdentitiesEnrollmentAutomationsGetParameters - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsGetRequest instead. - */ -export type UserIdentitiesEnrollmentAutomationsGetResponse = - RouteResponse<'/user_identities/enrollment_automations/get'> - -export type UserIdentitiesEnrollmentAutomationsGetRequest = SeamHttpRequest< - UserIdentitiesEnrollmentAutomationsGetResponse, - 'enrollment_automation' -> - -export interface UserIdentitiesEnrollmentAutomationsGetOptions {} - -export type UserIdentitiesEnrollmentAutomationsLaunchParameters = - RouteRequestBody<'/user_identities/enrollment_automations/launch'> - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsLaunchParameters instead. - */ -export type UserIdentitiesEnrollmentAutomationsLaunchBody = - UserIdentitiesEnrollmentAutomationsLaunchParameters - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsLaunchRequest instead. - */ -export type UserIdentitiesEnrollmentAutomationsLaunchResponse = - RouteResponse<'/user_identities/enrollment_automations/launch'> - -export type UserIdentitiesEnrollmentAutomationsLaunchRequest = SeamHttpRequest< - UserIdentitiesEnrollmentAutomationsLaunchResponse, - 'enrollment_automation' -> - -export interface UserIdentitiesEnrollmentAutomationsLaunchOptions {} - -export type UserIdentitiesEnrollmentAutomationsListParameters = - RouteRequestBody<'/user_identities/enrollment_automations/list'> - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsListParameters instead. - */ -export type UserIdentitiesEnrollmentAutomationsListParams = - UserIdentitiesEnrollmentAutomationsListParameters - -/** - * @deprecated Use UserIdentitiesEnrollmentAutomationsListRequest instead. - */ -export type UserIdentitiesEnrollmentAutomationsListResponse = - RouteResponse<'/user_identities/enrollment_automations/list'> - -export type UserIdentitiesEnrollmentAutomationsListRequest = SeamHttpRequest< - UserIdentitiesEnrollmentAutomationsListResponse, - 'enrollment_automations' -> - -export interface UserIdentitiesEnrollmentAutomationsListOptions {} diff --git a/src/lib/seam/connect/routes/user-identities/enrollment-automations/index.ts b/src/lib/seam/connect/routes/user-identities/enrollment-automations/index.ts deleted file mode 100644 index a5cf36fd..00000000 --- a/src/lib/seam/connect/routes/user-identities/enrollment-automations/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './enrollment-automations.js' diff --git a/src/lib/seam/connect/routes/user-identities/index.ts b/src/lib/seam/connect/routes/user-identities/index.ts index cd8f04b7..ba7de1d2 100644 --- a/src/lib/seam/connect/routes/user-identities/index.ts +++ b/src/lib/seam/connect/routes/user-identities/index.ts @@ -3,6 +3,5 @@ * Do not edit this file or add other files to this directory. */ -export * from './enrollment-automations/index.js' export * from './unmanaged/index.js' export * from './user-identities.js' diff --git a/src/lib/seam/connect/routes/user-identities/user-identities.ts b/src/lib/seam/connect/routes/user-identities/user-identities.ts index 78ebed85..4c67d0c8 100644 --- a/src/lib/seam/connect/routes/user-identities/user-identities.ts +++ b/src/lib/seam/connect/routes/user-identities/user-identities.ts @@ -39,7 +39,6 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' -import { SeamHttpUserIdentitiesEnrollmentAutomations } from './enrollment-automations/index.js' import { SeamHttpUserIdentitiesUnmanaged } from './unmanaged/index.js' export class SeamHttpUserIdentities { @@ -169,13 +168,6 @@ export class SeamHttpUserIdentities { await clientSessions.get() } - get enrollmentAutomations(): SeamHttpUserIdentitiesEnrollmentAutomations { - return SeamHttpUserIdentitiesEnrollmentAutomations.fromClient( - this.client, - this.defaults, - ) - } - get unmanaged(): SeamHttpUserIdentitiesUnmanaged { return SeamHttpUserIdentitiesUnmanaged.fromClient( this.client, diff --git a/src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts b/src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts deleted file mode 100644 index 3413ab90..00000000 --- a/src/lib/seam/connect/routes/workspaces/customization-profiles/customization-profiles.ts +++ /dev/null @@ -1,370 +0,0 @@ -/* - * 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' - -export class SeamHttpWorkspacesCustomizationProfiles { - 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 = {}, - ): SeamHttpWorkspacesCustomizationProfiles { - const constructorOptions = { ...options, client } - if (!isSeamHttpOptionsWithClient(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing client') - } - return new SeamHttpWorkspacesCustomizationProfiles(constructorOptions) - } - - static fromApiKey( - apiKey: SeamHttpOptionsWithApiKey['apiKey'], - options: Omit = {}, - ): SeamHttpWorkspacesCustomizationProfiles { - const constructorOptions = { ...options, apiKey } - if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing apiKey') - } - return new SeamHttpWorkspacesCustomizationProfiles(constructorOptions) - } - - static fromClientSessionToken( - clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], - options: Omit< - SeamHttpOptionsWithClientSessionToken, - 'clientSessionToken' - > = {}, - ): SeamHttpWorkspacesCustomizationProfiles { - const constructorOptions = { ...options, clientSessionToken } - if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') - } - return new SeamHttpWorkspacesCustomizationProfiles(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 SeamHttpWorkspacesCustomizationProfiles.fromPublishableKey', - ) - } - const client = createClient(clientOptions) - const clientSessions = SeamHttpClientSessions.fromClient(client) - const { token } = await clientSessions.getOrCreate({ - user_identifier_key: userIdentifierKey, - }) - return SeamHttpWorkspacesCustomizationProfiles.fromClientSessionToken( - token, - options, - ) - } - - static fromConsoleSessionToken( - consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], - workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithConsoleSessionToken, - 'consoleSessionToken' | 'workspaceId' - > = {}, - ): SeamHttpWorkspacesCustomizationProfiles { - const constructorOptions = { ...options, consoleSessionToken, workspaceId } - if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing consoleSessionToken or workspaceId', - ) - } - return new SeamHttpWorkspacesCustomizationProfiles(constructorOptions) - } - - static fromPersonalAccessToken( - personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], - workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], - options: Omit< - SeamHttpOptionsWithPersonalAccessToken, - 'personalAccessToken' | 'workspaceId' - > = {}, - ): SeamHttpWorkspacesCustomizationProfiles { - const constructorOptions = { ...options, personalAccessToken, workspaceId } - if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { - throw new SeamHttpInvalidOptionsError( - 'Missing personalAccessToken or workspaceId', - ) - } - return new SeamHttpWorkspacesCustomizationProfiles(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() - } - - create( - parameters?: WorkspacesCustomizationProfilesCreateParameters, - options: WorkspacesCustomizationProfilesCreateOptions = {}, - ): WorkspacesCustomizationProfilesCreateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/workspaces/customization_profiles/create', - method: 'POST', - body: parameters, - responseKey: 'customization_profile', - options, - }) - } - - get( - parameters: WorkspacesCustomizationProfilesGetParameters, - options: WorkspacesCustomizationProfilesGetOptions = {}, - ): WorkspacesCustomizationProfilesGetRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/workspaces/customization_profiles/get', - method: 'POST', - body: parameters, - responseKey: 'customization_profile', - options, - }) - } - - list( - parameters?: WorkspacesCustomizationProfilesListParameters, - options: WorkspacesCustomizationProfilesListOptions = {}, - ): WorkspacesCustomizationProfilesListRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/workspaces/customization_profiles/list', - method: 'POST', - body: parameters, - responseKey: 'customization_profiles', - options, - }) - } - - update( - parameters: WorkspacesCustomizationProfilesUpdateParameters, - options: WorkspacesCustomizationProfilesUpdateOptions = {}, - ): WorkspacesCustomizationProfilesUpdateRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/workspaces/customization_profiles/update', - method: 'PATCH', - body: parameters, - responseKey: undefined, - options, - }) - } - - uploadImages( - parameters?: WorkspacesCustomizationProfilesUploadImagesParameters, - options: WorkspacesCustomizationProfilesUploadImagesOptions = {}, - ): WorkspacesCustomizationProfilesUploadImagesRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/workspaces/customization_profiles/upload_images', - method: 'POST', - body: parameters, - responseKey: undefined, - options, - }) - } -} - -export type WorkspacesCustomizationProfilesCreateParameters = - RouteRequestBody<'/workspaces/customization_profiles/create'> - -/** - * @deprecated Use WorkspacesCustomizationProfilesCreateParameters instead. - */ -export type WorkspacesCustomizationProfilesCreateBody = - WorkspacesCustomizationProfilesCreateParameters - -/** - * @deprecated Use WorkspacesCustomizationProfilesCreateRequest instead. - */ -export type WorkspacesCustomizationProfilesCreateResponse = - RouteResponse<'/workspaces/customization_profiles/create'> - -export type WorkspacesCustomizationProfilesCreateRequest = SeamHttpRequest< - WorkspacesCustomizationProfilesCreateResponse, - 'customization_profile' -> - -export interface WorkspacesCustomizationProfilesCreateOptions {} - -export type WorkspacesCustomizationProfilesGetParameters = - RouteRequestBody<'/workspaces/customization_profiles/get'> - -/** - * @deprecated Use WorkspacesCustomizationProfilesGetParameters instead. - */ -export type WorkspacesCustomizationProfilesGetParams = - WorkspacesCustomizationProfilesGetParameters - -/** - * @deprecated Use WorkspacesCustomizationProfilesGetRequest instead. - */ -export type WorkspacesCustomizationProfilesGetResponse = - RouteResponse<'/workspaces/customization_profiles/get'> - -export type WorkspacesCustomizationProfilesGetRequest = SeamHttpRequest< - WorkspacesCustomizationProfilesGetResponse, - 'customization_profile' -> - -export interface WorkspacesCustomizationProfilesGetOptions {} - -export type WorkspacesCustomizationProfilesListParameters = - RouteRequestBody<'/workspaces/customization_profiles/list'> - -/** - * @deprecated Use WorkspacesCustomizationProfilesListParameters instead. - */ -export type WorkspacesCustomizationProfilesListParams = - WorkspacesCustomizationProfilesListParameters - -/** - * @deprecated Use WorkspacesCustomizationProfilesListRequest instead. - */ -export type WorkspacesCustomizationProfilesListResponse = - RouteResponse<'/workspaces/customization_profiles/list'> - -export type WorkspacesCustomizationProfilesListRequest = SeamHttpRequest< - WorkspacesCustomizationProfilesListResponse, - 'customization_profiles' -> - -export interface WorkspacesCustomizationProfilesListOptions {} - -export type WorkspacesCustomizationProfilesUpdateParameters = - RouteRequestBody<'/workspaces/customization_profiles/update'> - -/** - * @deprecated Use WorkspacesCustomizationProfilesUpdateParameters instead. - */ -export type WorkspacesCustomizationProfilesUpdateBody = - WorkspacesCustomizationProfilesUpdateParameters - -/** - * @deprecated Use WorkspacesCustomizationProfilesUpdateRequest instead. - */ -export type WorkspacesCustomizationProfilesUpdateResponse = - RouteResponse<'/workspaces/customization_profiles/update'> - -export type WorkspacesCustomizationProfilesUpdateRequest = SeamHttpRequest< - void, - undefined -> - -export interface WorkspacesCustomizationProfilesUpdateOptions {} - -export type WorkspacesCustomizationProfilesUploadImagesParameters = - RouteRequestBody<'/workspaces/customization_profiles/upload_images'> - -/** - * @deprecated Use WorkspacesCustomizationProfilesUploadImagesParameters instead. - */ -export type WorkspacesCustomizationProfilesUploadImagesBody = - WorkspacesCustomizationProfilesUploadImagesParameters - -/** - * @deprecated Use WorkspacesCustomizationProfilesUploadImagesRequest instead. - */ -export type WorkspacesCustomizationProfilesUploadImagesResponse = - RouteResponse<'/workspaces/customization_profiles/upload_images'> - -export type WorkspacesCustomizationProfilesUploadImagesRequest = - SeamHttpRequest - -export interface WorkspacesCustomizationProfilesUploadImagesOptions {} diff --git a/src/lib/seam/connect/routes/workspaces/customization-profiles/index.ts b/src/lib/seam/connect/routes/workspaces/customization-profiles/index.ts deleted file mode 100644 index b66419e4..00000000 --- a/src/lib/seam/connect/routes/workspaces/customization-profiles/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file or add other files to this directory. - */ - -export * from './customization-profiles.js' diff --git a/src/lib/seam/connect/routes/workspaces/index.ts b/src/lib/seam/connect/routes/workspaces/index.ts index 3c0fdf26..b420eebf 100644 --- a/src/lib/seam/connect/routes/workspaces/index.ts +++ b/src/lib/seam/connect/routes/workspaces/index.ts @@ -3,5 +3,4 @@ * Do not edit this file or add other files to this directory. */ -export * from './customization-profiles/index.js' export * from './workspaces.js' diff --git a/src/lib/seam/connect/routes/workspaces/workspaces.ts b/src/lib/seam/connect/routes/workspaces/workspaces.ts index 72182eef..0874a503 100644 --- a/src/lib/seam/connect/routes/workspaces/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces/workspaces.ts @@ -3,7 +3,7 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' +import type { RouteResponse } from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -36,8 +36,6 @@ import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' -import { SeamHttpWorkspacesCustomizationProfiles } from './customization-profiles/index.js' - export class SeamHttpWorkspaces { client: Client readonly defaults: Required @@ -165,13 +163,6 @@ export class SeamHttpWorkspaces { await clientSessions.get() } - get customizationProfiles(): SeamHttpWorkspacesCustomizationProfiles { - return SeamHttpWorkspacesCustomizationProfiles.fromClient( - this.client, - this.defaults, - ) - } - create( parameters: WorkspacesCreateParameters, options: WorkspacesCreateOptions = {}, @@ -185,24 +176,6 @@ export class SeamHttpWorkspaces { }) } - findAnything( - parameters: WorkspacesFindAnythingParameters, - options: WorkspacesFindAnythingOptions = {}, - ): WorkspacesFindAnythingRequest { - if (!this.defaults.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } - return new SeamHttpRequest(this, { - pathname: '/workspaces/find_anything', - method: 'POST', - body: parameters, - responseKey: 'batch', - options, - }) - } - get( parameters?: WorkspacesGetParameters, options: WorkspacesGetOptions = {}, @@ -294,27 +267,6 @@ export type WorkspacesCreateRequest = SeamHttpRequest< export interface WorkspacesCreateOptions {} -export type WorkspacesFindAnythingParameters = - RouteRequestBody<'/workspaces/find_anything'> - -/** - * @deprecated Use WorkspacesFindAnythingParameters instead. - */ -export type WorkspacesFindAnythingParams = WorkspacesFindAnythingParameters - -/** - * @deprecated Use WorkspacesFindAnythingRequest instead. - */ -export type WorkspacesFindAnythingResponse = - RouteResponse<'/workspaces/find_anything'> - -export type WorkspacesFindAnythingRequest = SeamHttpRequest< - WorkspacesFindAnythingResponse, - 'batch' -> - -export interface WorkspacesFindAnythingOptions {} - export type WorkspacesGetParameters = {} /** From 6ef3ea9fb3037942579541fceb694ad8f6700ddf Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:02:01 -0500 Subject: [PATCH 03/17] Remove forced legacy types --- .../partials/route-class-endpoint-export.hbs | 2 +- codegen/layouts/partials/route-imports.hbs | 3 --- codegen/lib/layouts/route.ts | 19 +------------------ 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/codegen/layouts/partials/route-class-endpoint-export.hbs b/codegen/layouts/partials/route-class-endpoint-export.hbs index d55f3799..67ba3cd0 100644 --- a/codegen/layouts/partials/route-class-endpoint-export.hbs +++ b/codegen/layouts/partials/route-class-endpoint-export.hbs @@ -8,7 +8,7 @@ export type {{legacyRequestTypeName}} = {{parametersTypeName}} /** * @deprecated Use {{requestTypeName}} instead. */ -export type {{responseTypeName}} = {{#if usesLegacyResponseType}}RouteResponse<'{{path}}'>{{else if returnsVoid}}void{{else}}{ {{json responseKey}}: {{#if responseIsList}}Array<{{responseResourceTypeName}}>{{else}}{{responseResourceTypeName}}{{/if}} }{{/if}} +export type {{responseTypeName}} = {{#if returnsVoid}}void{{else}}{ {{json responseKey}}: {{#if responseIsList}}Array<{{responseResourceTypeName}}>{{else}}{{responseResourceTypeName}}{{/if}} }{{/if}} export type {{requestTypeName}} = SeamHttpRequest<{{#if returnsVoid}}void, undefined{{else}}{{responseTypeName}}, '{{responseKey}}'{{/if}}> diff --git a/codegen/layouts/partials/route-imports.hbs b/codegen/layouts/partials/route-imports.hbs index 1a1e43ac..9eab82c0 100644 --- a/codegen/layouts/partials/route-imports.hbs +++ b/codegen/layouts/partials/route-imports.hbs @@ -1,7 +1,4 @@ import { seamApiLtsVersion } from 'lib/lts-version.js' -{{#if hasLegacyTypes}} -import type { RouteResponse } from '@seamapi/types/connect' -{{/if}} {{#each resourceTypeImports}} import type { {{typeName}} } from 'lib/seam/connect/resources/{{fileName}}' {{/each}} diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 226d5085..21dee560 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -9,7 +9,6 @@ export interface RouteLayoutContext { endpoints: EndpointLayoutContext[] subroutes: SubrouteLayoutContext[] skipClientSessionImport: boolean - hasLegacyTypes: boolean resourceTypeImports: ResourceTypeImport[] } @@ -33,7 +32,6 @@ export interface EndpointLayoutContext { returnsActionAttempt: boolean returnsVoid: boolean isOptionalParamsOk: boolean - usesLegacyResponseType: boolean parameters: Parameter[] responseIsList: boolean responseResourceTypeName: string @@ -58,26 +56,12 @@ export const setRouteLayoutContext = ( file.className = getClassName(node?.path ?? null) file.skipClientSessionImport = node == null || node?.path === '/client_sessions' - file.hasLegacyTypes = - node != null && 'endpoints' in node - ? node.endpoints.some( - (endpoint) => - endpoint.response.responseType === 'resource' && - endpoint.response.resourceType === 'action_attempt', - ) - : false file.resourceTypeImports = node != null && 'endpoints' in node ? [ ...new Set( node.endpoints.flatMap((endpoint) => { - if ( - endpoint.response.responseType === 'void' || - (endpoint.response.responseType === 'resource' && - endpoint.response.resourceType === 'action_attempt') - ) { - return [] - } + if (endpoint.response.responseType === 'void') return [] return [endpoint.response.resourceType] }), ), @@ -150,7 +134,6 @@ export const getEndpointLayoutContext = ( isOptionalParamsOk: endpoint.request.parameters.every( (parameter) => !parameter.isRequired, ), - usesLegacyResponseType: returnsActionAttempt, parameters: endpoint.request.parameters, responseIsList: endpoint.response.responseType === 'resource_list', responseResourceTypeName: From f8325e41d60eaff546616dad218fd8644eb7c14a Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 27 Jul 2026 23:03:04 +0000 Subject: [PATCH 04/17] ci: Generate code --- .../routes/access-methods/access-methods.ts | 18 +++++----- .../connect/routes/acs/encoders/encoders.ts | 18 +++++----- .../connect/routes/acs/entrances/entrances.ts | 7 ++-- .../routes/action-attempts/action-attempts.ts | 6 ++-- src/lib/seam/connect/routes/locks/locks.ts | 12 +++---- .../connect/routes/locks/simulate/simulate.ts | 13 +++---- .../daily-programs/daily-programs.ts | 8 ++--- .../connect/routes/thermostats/thermostats.ts | 34 +++++++++++-------- .../connect/routes/workspaces/workspaces.ts | 8 ++--- 9 files changed, 67 insertions(+), 57 deletions(-) diff --git a/src/lib/seam/connect/routes/access-methods/access-methods.ts b/src/lib/seam/connect/routes/access-methods/access-methods.ts index e326acfc..321bcc3f 100644 --- a/src/lib/seam/connect/routes/access-methods/access-methods.ts +++ b/src/lib/seam/connect/routes/access-methods/access-methods.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -32,6 +30,7 @@ import { parseOptions, } from 'lib/seam/connect/parse-options.js' import type { AccessMethodResource } from 'lib/seam/connect/resources/access-method.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' @@ -276,8 +275,9 @@ export type AccessMethodsAssignCardBody = AccessMethodsAssignCardParameters /** * @deprecated Use AccessMethodsAssignCardRequest instead. */ -export type AccessMethodsAssignCardResponse = - RouteResponse<'/access_methods/assign_card'> +export type AccessMethodsAssignCardResponse = { + action_attempt: ActionAttemptResource +} export type AccessMethodsAssignCardRequest = SeamHttpRequest< AccessMethodsAssignCardResponse, @@ -323,8 +323,9 @@ export type AccessMethodsEncodeBody = AccessMethodsEncodeParameters /** * @deprecated Use AccessMethodsEncodeRequest instead. */ -export type AccessMethodsEncodeResponse = - RouteResponse<'/access_methods/encode'> +export type AccessMethodsEncodeResponse = { + action_attempt: ActionAttemptResource +} export type AccessMethodsEncodeRequest = SeamHttpRequest< AccessMethodsEncodeResponse, @@ -447,8 +448,9 @@ export type AccessMethodsUnlockDoorBody = AccessMethodsUnlockDoorParameters /** * @deprecated Use AccessMethodsUnlockDoorRequest instead. */ -export type AccessMethodsUnlockDoorResponse = - RouteResponse<'/access_methods/unlock_door'> +export type AccessMethodsUnlockDoorResponse = { + action_attempt: ActionAttemptResource +} export type AccessMethodsUnlockDoorRequest = SeamHttpRequest< AccessMethodsUnlockDoorResponse, diff --git a/src/lib/seam/connect/routes/acs/encoders/encoders.ts b/src/lib/seam/connect/routes/acs/encoders/encoders.ts index 6ae6ecc9..9ceb24a2 100644 --- a/src/lib/seam/connect/routes/acs/encoders/encoders.ts +++ b/src/lib/seam/connect/routes/acs/encoders/encoders.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -32,6 +30,7 @@ import { parseOptions, } from 'lib/seam/connect/parse-options.js' import type { AcsEncoderResource } from 'lib/seam/connect/resources/acs-encoder.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.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' @@ -250,8 +249,9 @@ export type AcsEncodersEncodeCredentialBody = /** * @deprecated Use AcsEncodersEncodeCredentialRequest instead. */ -export type AcsEncodersEncodeCredentialResponse = - RouteResponse<'/acs/encoders/encode_credential'> +export type AcsEncodersEncodeCredentialResponse = { + action_attempt: ActionAttemptResource +} export type AcsEncodersEncodeCredentialRequest = SeamHttpRequest< AcsEncodersEncodeCredentialResponse, @@ -329,8 +329,9 @@ export type AcsEncodersScanCredentialBody = AcsEncodersScanCredentialParameters /** * @deprecated Use AcsEncodersScanCredentialRequest instead. */ -export type AcsEncodersScanCredentialResponse = - RouteResponse<'/acs/encoders/scan_credential'> +export type AcsEncodersScanCredentialResponse = { + action_attempt: ActionAttemptResource +} export type AcsEncodersScanCredentialRequest = SeamHttpRequest< AcsEncodersScanCredentialResponse, @@ -363,8 +364,9 @@ export type AcsEncodersScanToAssignCredentialBody = /** * @deprecated Use AcsEncodersScanToAssignCredentialRequest instead. */ -export type AcsEncodersScanToAssignCredentialResponse = - RouteResponse<'/acs/encoders/scan_to_assign_credential'> +export type AcsEncodersScanToAssignCredentialResponse = { + action_attempt: ActionAttemptResource +} export type AcsEncodersScanToAssignCredentialRequest = SeamHttpRequest< AcsEncodersScanToAssignCredentialResponse, diff --git a/src/lib/seam/connect/routes/acs/entrances/entrances.ts b/src/lib/seam/connect/routes/acs/entrances/entrances.ts index f50179ec..ef287e7b 100644 --- a/src/lib/seam/connect/routes/acs/entrances/entrances.ts +++ b/src/lib/seam/connect/routes/acs/entrances/entrances.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -33,6 +31,7 @@ import { } from 'lib/seam/connect/parse-options.js' import type { AcsCredentialResource } from 'lib/seam/connect/resources/acs-credential.js' import type { AcsEntranceResource } from 'lib/seam/connect/resources/acs-entrance.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.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' @@ -345,7 +344,9 @@ export type AcsEntrancesUnlockBody = AcsEntrancesUnlockParameters /** * @deprecated Use AcsEntrancesUnlockRequest instead. */ -export type AcsEntrancesUnlockResponse = RouteResponse<'/acs/entrances/unlock'> +export type AcsEntrancesUnlockResponse = { + action_attempt: ActionAttemptResource +} export type AcsEntrancesUnlockRequest = SeamHttpRequest< AcsEntrancesUnlockResponse, diff --git a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts index f329ed11..c7f2f9fd 100644 --- a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts +++ b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -202,7 +200,9 @@ export type ActionAttemptsGetParams = ActionAttemptsGetParameters /** * @deprecated Use ActionAttemptsGetRequest instead. */ -export type ActionAttemptsGetResponse = RouteResponse<'/action_attempts/get'> +export type ActionAttemptsGetResponse = { + action_attempt: ActionAttemptResource +} export type ActionAttemptsGetRequest = SeamHttpRequest< ActionAttemptsGetResponse, diff --git a/src/lib/seam/connect/routes/locks/locks.ts b/src/lib/seam/connect/routes/locks/locks.ts index b04e3bb0..9d030dbf 100644 --- a/src/lib/seam/connect/routes/locks/locks.ts +++ b/src/lib/seam/connect/routes/locks/locks.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' import type { DeviceResource } from 'lib/seam/connect/resources/device.js' import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' @@ -250,8 +249,9 @@ export type LocksConfigureAutoLockBody = LocksConfigureAutoLockParameters /** * @deprecated Use LocksConfigureAutoLockRequest instead. */ -export type LocksConfigureAutoLockResponse = - RouteResponse<'/locks/configure_auto_lock'> +export type LocksConfigureAutoLockResponse = { + action_attempt: ActionAttemptResource +} export type LocksConfigureAutoLockRequest = SeamHttpRequest< LocksConfigureAutoLockResponse, @@ -424,7 +424,7 @@ export type LocksLockDoorBody = LocksLockDoorParameters /** * @deprecated Use LocksLockDoorRequest instead. */ -export type LocksLockDoorResponse = RouteResponse<'/locks/lock_door'> +export type LocksLockDoorResponse = { action_attempt: ActionAttemptResource } export type LocksLockDoorRequest = SeamHttpRequest< LocksLockDoorResponse, @@ -448,7 +448,7 @@ export type LocksUnlockDoorBody = LocksUnlockDoorParameters /** * @deprecated Use LocksUnlockDoorRequest instead. */ -export type LocksUnlockDoorResponse = RouteResponse<'/locks/unlock_door'> +export type LocksUnlockDoorResponse = { action_attempt: ActionAttemptResource } export type LocksUnlockDoorRequest = SeamHttpRequest< LocksUnlockDoorResponse, diff --git a/src/lib/seam/connect/routes/locks/simulate/simulate.ts b/src/lib/seam/connect/routes/locks/simulate/simulate.ts index 95a16948..27dac291 100644 --- a/src/lib/seam/connect/routes/locks/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/locks/simulate/simulate.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.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' @@ -204,8 +203,9 @@ export type LocksSimulateKeypadCodeEntryBody = /** * @deprecated Use LocksSimulateKeypadCodeEntryRequest instead. */ -export type LocksSimulateKeypadCodeEntryResponse = - RouteResponse<'/locks/simulate/keypad_code_entry'> +export type LocksSimulateKeypadCodeEntryResponse = { + action_attempt: ActionAttemptResource +} export type LocksSimulateKeypadCodeEntryRequest = SeamHttpRequest< LocksSimulateKeypadCodeEntryResponse, @@ -230,8 +230,9 @@ export type LocksSimulateManualLockViaKeypadBody = /** * @deprecated Use LocksSimulateManualLockViaKeypadRequest instead. */ -export type LocksSimulateManualLockViaKeypadResponse = - RouteResponse<'/locks/simulate/manual_lock_via_keypad'> +export type LocksSimulateManualLockViaKeypadResponse = { + action_attempt: ActionAttemptResource +} export type LocksSimulateManualLockViaKeypadRequest = SeamHttpRequest< LocksSimulateManualLockViaKeypadResponse, diff --git a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts index 2ee6048e..0e382581 100644 --- a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +++ b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' import type { ThermostatDailyProgramResource } from 'lib/seam/connect/resources/thermostat-daily-program.js' import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' @@ -279,8 +278,9 @@ export type ThermostatsDailyProgramsUpdateBody = /** * @deprecated Use ThermostatsDailyProgramsUpdateRequest instead. */ -export type ThermostatsDailyProgramsUpdateResponse = - RouteResponse<'/thermostats/daily_programs/update'> +export type ThermostatsDailyProgramsUpdateResponse = { + action_attempt: ActionAttemptResource +} export type ThermostatsDailyProgramsUpdateRequest = SeamHttpRequest< ThermostatsDailyProgramsUpdateResponse, diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index f98c7c93..7f5109b3 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' import type { DeviceResource } from 'lib/seam/connect/resources/device.js' import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' @@ -380,8 +379,9 @@ export type ThermostatsActivateClimatePresetBody = /** * @deprecated Use ThermostatsActivateClimatePresetRequest instead. */ -export type ThermostatsActivateClimatePresetResponse = - RouteResponse<'/thermostats/activate_climate_preset'> +export type ThermostatsActivateClimatePresetResponse = { + action_attempt: ActionAttemptResource +} export type ThermostatsActivateClimatePresetRequest = SeamHttpRequest< ThermostatsActivateClimatePresetResponse, @@ -407,7 +407,7 @@ export type ThermostatsCoolBody = ThermostatsCoolParameters /** * @deprecated Use ThermostatsCoolRequest instead. */ -export type ThermostatsCoolResponse = RouteResponse<'/thermostats/cool'> +export type ThermostatsCoolResponse = { action_attempt: ActionAttemptResource } export type ThermostatsCoolRequest = SeamHttpRequest< ThermostatsCoolResponse, @@ -500,7 +500,7 @@ export type ThermostatsHeatBody = ThermostatsHeatParameters /** * @deprecated Use ThermostatsHeatRequest instead. */ -export type ThermostatsHeatResponse = RouteResponse<'/thermostats/heat'> +export type ThermostatsHeatResponse = { action_attempt: ActionAttemptResource } export type ThermostatsHeatRequest = SeamHttpRequest< ThermostatsHeatResponse, @@ -529,8 +529,9 @@ export type ThermostatsHeatCoolBody = ThermostatsHeatCoolParameters /** * @deprecated Use ThermostatsHeatCoolRequest instead. */ -export type ThermostatsHeatCoolResponse = - RouteResponse<'/thermostats/heat_cool'> +export type ThermostatsHeatCoolResponse = { + action_attempt: ActionAttemptResource +} export type ThermostatsHeatCoolRequest = SeamHttpRequest< ThermostatsHeatCoolResponse, @@ -613,7 +614,7 @@ export type ThermostatsOffBody = ThermostatsOffParameters /** * @deprecated Use ThermostatsOffRequest instead. */ -export type ThermostatsOffResponse = RouteResponse<'/thermostats/off'> +export type ThermostatsOffResponse = { action_attempt: ActionAttemptResource } export type ThermostatsOffRequest = SeamHttpRequest< ThermostatsOffResponse, @@ -664,8 +665,9 @@ export type ThermostatsSetFanModeBody = ThermostatsSetFanModeParameters /** * @deprecated Use ThermostatsSetFanModeRequest instead. */ -export type ThermostatsSetFanModeResponse = - RouteResponse<'/thermostats/set_fan_mode'> +export type ThermostatsSetFanModeResponse = { + action_attempt: ActionAttemptResource +} export type ThermostatsSetFanModeRequest = SeamHttpRequest< ThermostatsSetFanModeResponse, @@ -696,8 +698,9 @@ export type ThermostatsSetHvacModeBody = ThermostatsSetHvacModeParameters /** * @deprecated Use ThermostatsSetHvacModeRequest instead. */ -export type ThermostatsSetHvacModeResponse = - RouteResponse<'/thermostats/set_hvac_mode'> +export type ThermostatsSetHvacModeResponse = { + action_attempt: ActionAttemptResource +} export type ThermostatsSetHvacModeRequest = SeamHttpRequest< ThermostatsSetHvacModeResponse, @@ -799,8 +802,9 @@ export type ThermostatsUpdateWeeklyProgramBody = /** * @deprecated Use ThermostatsUpdateWeeklyProgramRequest instead. */ -export type ThermostatsUpdateWeeklyProgramResponse = - RouteResponse<'/thermostats/update_weekly_program'> +export type ThermostatsUpdateWeeklyProgramResponse = { + action_attempt: ActionAttemptResource +} export type ThermostatsUpdateWeeklyProgramRequest = SeamHttpRequest< ThermostatsUpdateWeeklyProgramResponse, diff --git a/src/lib/seam/connect/routes/workspaces/workspaces.ts b/src/lib/seam/connect/routes/workspaces/workspaces.ts index 0874a503..99937486 100644 --- a/src/lib/seam/connect/routes/workspaces/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces/workspaces.ts @@ -3,8 +3,6 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteResponse } from '@seamapi/types/connect' - import { seamApiLtsVersion } from 'lib/lts-version.js' import { getAuthHeadersForClientSessionToken, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' import type { WorkspaceResource } from 'lib/seam/connect/resources/workspace.js' import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' @@ -315,8 +314,9 @@ export type WorkspacesResetSandboxBody = WorkspacesResetSandboxParameters /** * @deprecated Use WorkspacesResetSandboxRequest instead. */ -export type WorkspacesResetSandboxResponse = - RouteResponse<'/workspaces/reset_sandbox'> +export type WorkspacesResetSandboxResponse = { + action_attempt: ActionAttemptResource +} export type WorkspacesResetSandboxRequest = SeamHttpRequest< WorkspacesResetSandboxResponse, From d49772134fbc49b07039b7ef818d95ecc5c5c072 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:03:45 -0500 Subject: [PATCH 05/17] Remove legacy types --- codegen/layouts/partials/route-class-endpoint-export.hbs | 5 ----- codegen/lib/layouts/route.ts | 8 -------- 2 files changed, 13 deletions(-) diff --git a/codegen/layouts/partials/route-class-endpoint-export.hbs b/codegen/layouts/partials/route-class-endpoint-export.hbs index 67ba3cd0..cf0f766a 100644 --- a/codegen/layouts/partials/route-class-endpoint-export.hbs +++ b/codegen/layouts/partials/route-class-endpoint-export.hbs @@ -1,10 +1,5 @@ export type {{parametersTypeName}} = {{> request-object parameters=parameters}} -/** - * @deprecated Use {{parametersTypeName}} instead. - */ -export type {{legacyRequestTypeName}} = {{parametersTypeName}} - /** * @deprecated Use {{requestTypeName}} instead. */ diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 21dee560..6f2307f9 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -25,7 +25,6 @@ export interface EndpointLayoutContext { responseKey: string requestFormat: 'params' | 'body' parametersTypeName: string - legacyRequestTypeName: string responseTypeName: string optionsTypeName: string requestTypeName: string @@ -100,12 +99,6 @@ export const getEndpointLayoutContext = ( ): EndpointLayoutContext => { const prefix = pascalCase([route.path.split('/'), endpoint.name].join('_')) - const legacyMethodParamName = ['GET', 'DELETE'].includes( - endpoint.request.semanticMethod, - ) - ? 'params' - : 'body' - const requestFormat = ['GET', 'DELETE'].includes( endpoint.request.preferredMethod, ) @@ -127,7 +120,6 @@ export const getEndpointLayoutContext = ( requestFormat, returnsActionAttempt, parametersTypeName: `${prefix}Parameters`, - legacyRequestTypeName: `${prefix}${pascalCase(legacyMethodParamName)}`, responseTypeName: `${prefix}Response`, optionsTypeName: `${prefix}Options`, requestTypeName: `${prefix}Request`, From e0d15acf0c8ce83bd3b4f9cc8334f0dc4ca40dd9 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 27 Jul 2026 23:04:40 +0000 Subject: [PATCH 06/17] ci: Generate code --- .../routes/access-codes/access-codes.ts | 52 ------------- .../routes/access-codes/simulate/simulate.ts | 6 -- .../access-codes/unmanaged/unmanaged.ts | 28 ------- .../routes/access-grants/access-grants.ts | 36 --------- .../access-grants/unmanaged/unmanaged.ts | 17 ---- .../routes/access-methods/access-methods.ts | 35 --------- .../access-methods/unmanaged/unmanaged.ts | 12 --- .../routes/acs/access-groups/access-groups.ts | 37 --------- .../routes/acs/credentials/credentials.ts | 41 ---------- .../connect/routes/acs/encoders/encoders.ts | 27 ------- .../routes/acs/encoders/simulate/simulate.ts | 24 ------ .../connect/routes/acs/entrances/entrances.ts | 26 ------- .../connect/routes/acs/systems/systems.ts | 21 ----- .../seam/connect/routes/acs/users/users.ts | 58 -------------- .../routes/action-attempts/action-attempts.ts | 10 --- .../routes/client-sessions/client-sessions.ts | 35 --------- .../connect-webviews/connect-webviews.ts | 20 ----- .../connected-accounts/connected-accounts.ts | 25 ------ .../connected-accounts/simulate/simulate.ts | 6 -- .../connect/routes/customers/customers.ts | 15 ---- .../seam/connect/routes/devices/devices.ts | 27 ------- .../routes/devices/simulate/simulate.ts | 33 -------- .../routes/devices/unmanaged/unmanaged.ts | 15 ---- src/lib/seam/connect/routes/events/events.ts | 10 --- .../routes/instant-keys/instant-keys.ts | 15 ---- src/lib/seam/connect/routes/locks/locks.ts | 25 ------ .../connect/routes/locks/simulate/simulate.ts | 12 --- .../routes/noise-sensors/noise-sensors.ts | 5 -- .../noise-thresholds/noise-thresholds.ts | 30 ------- .../routes/noise-sensors/simulate/simulate.ts | 6 -- src/lib/seam/connect/routes/phones/phones.ts | 15 ---- .../routes/phones/simulate/simulate.ts | 6 -- src/lib/seam/connect/routes/spaces/spaces.ts | 61 --------------- .../daily-programs/daily-programs.ts | 18 ----- .../routes/thermostats/schedules/schedules.ts | 28 ------- .../routes/thermostats/simulate/simulate.ts | 12 --- .../connect/routes/thermostats/thermostats.ts | 77 ------------------ .../user-identities/unmanaged/unmanaged.ts | 18 ----- .../routes/user-identities/user-identities.ts | 78 ------------------- .../seam/connect/routes/webhooks/webhooks.ts | 25 ------ .../connect/routes/workspaces/workspaces.ts | 25 ------ 41 files changed, 1072 deletions(-) diff --git a/src/lib/seam/connect/routes/access-codes/access-codes.ts b/src/lib/seam/connect/routes/access-codes/access-codes.ts index 928641d1..d0baee29 100644 --- a/src/lib/seam/connect/routes/access-codes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes/access-codes.ts @@ -323,11 +323,6 @@ export type AccessCodesCreateParameters = { use_offline_access_code?: boolean | undefined } -/** - * @deprecated Use AccessCodesCreateParameters instead. - */ -export type AccessCodesCreateBody = AccessCodesCreateParameters - /** * @deprecated Use AccessCodesCreateRequest instead. */ @@ -357,11 +352,6 @@ export type AccessCodesCreateMultipleParameters = { use_backup_access_code_pool?: boolean | undefined } -/** - * @deprecated Use AccessCodesCreateMultipleParameters instead. - */ -export type AccessCodesCreateMultipleBody = AccessCodesCreateMultipleParameters - /** * @deprecated Use AccessCodesCreateMultipleRequest instead. */ @@ -382,11 +372,6 @@ export type AccessCodesDeleteParameters = { device_id?: string | undefined } -/** - * @deprecated Use AccessCodesDeleteParameters instead. - */ -export type AccessCodesDeleteParams = AccessCodesDeleteParameters - /** * @deprecated Use AccessCodesDeleteRequest instead. */ @@ -400,11 +385,6 @@ export type AccessCodesGenerateCodeParameters = { device_id: string } -/** - * @deprecated Use AccessCodesGenerateCodeParameters instead. - */ -export type AccessCodesGenerateCodeParams = AccessCodesGenerateCodeParameters - /** * @deprecated Use AccessCodesGenerateCodeRequest instead. */ @@ -425,11 +405,6 @@ export type AccessCodesGetParameters = { device_id?: string | undefined } -/** - * @deprecated Use AccessCodesGetParameters instead. - */ -export type AccessCodesGetParams = AccessCodesGetParameters - /** * @deprecated Use AccessCodesGetRequest instead. */ @@ -455,11 +430,6 @@ export type AccessCodesListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use AccessCodesListParameters instead. - */ -export type AccessCodesListParams = AccessCodesListParameters - /** * @deprecated Use AccessCodesListRequest instead. */ @@ -478,12 +448,6 @@ export type AccessCodesPullBackupAccessCodeParameters = { access_code_id: string } -/** - * @deprecated Use AccessCodesPullBackupAccessCodeParameters instead. - */ -export type AccessCodesPullBackupAccessCodeBody = - AccessCodesPullBackupAccessCodeParameters - /** * @deprecated Use AccessCodesPullBackupAccessCodeRequest instead. */ @@ -506,12 +470,6 @@ export type AccessCodesReportDeviceConstraintsParameters = { supported_code_lengths?: Array | undefined } -/** - * @deprecated Use AccessCodesReportDeviceConstraintsParameters instead. - */ -export type AccessCodesReportDeviceConstraintsBody = - AccessCodesReportDeviceConstraintsParameters - /** * @deprecated Use AccessCodesReportDeviceConstraintsRequest instead. */ @@ -546,11 +504,6 @@ export type AccessCodesUpdateParameters = { use_offline_access_code?: boolean | undefined } -/** - * @deprecated Use AccessCodesUpdateParameters instead. - */ -export type AccessCodesUpdateBody = AccessCodesUpdateParameters - /** * @deprecated Use AccessCodesUpdateRequest instead. */ @@ -568,11 +521,6 @@ export type AccessCodesUpdateMultipleParameters = { starts_at?: string | undefined } -/** - * @deprecated Use AccessCodesUpdateMultipleParameters instead. - */ -export type AccessCodesUpdateMultipleBody = AccessCodesUpdateMultipleParameters - /** * @deprecated Use AccessCodesUpdateMultipleRequest instead. */ diff --git a/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts b/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts index 4a24f48d..d31cee7d 100644 --- a/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts @@ -183,12 +183,6 @@ export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { name: string } -/** - * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeParameters instead. - */ -export type AccessCodesSimulateCreateUnmanagedAccessCodeBody = - AccessCodesSimulateCreateUnmanagedAccessCodeParameters - /** * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeRequest instead. */ diff --git a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts index 59865348..0269e080 100644 --- a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts @@ -235,12 +235,6 @@ export type AccessCodesUnmanagedConvertToManagedParameters = { is_external_modification_allowed?: boolean | undefined } -/** - * @deprecated Use AccessCodesUnmanagedConvertToManagedParameters instead. - */ -export type AccessCodesUnmanagedConvertToManagedBody = - AccessCodesUnmanagedConvertToManagedParameters - /** * @deprecated Use AccessCodesUnmanagedConvertToManagedRequest instead. */ @@ -257,12 +251,6 @@ export type AccessCodesUnmanagedDeleteParameters = { access_code_id: string } -/** - * @deprecated Use AccessCodesUnmanagedDeleteParameters instead. - */ -export type AccessCodesUnmanagedDeleteParams = - AccessCodesUnmanagedDeleteParameters - /** * @deprecated Use AccessCodesUnmanagedDeleteRequest instead. */ @@ -278,11 +266,6 @@ export type AccessCodesUnmanagedGetParameters = { device_id?: string | undefined } -/** - * @deprecated Use AccessCodesUnmanagedGetParameters instead. - */ -export type AccessCodesUnmanagedGetParams = AccessCodesUnmanagedGetParameters - /** * @deprecated Use AccessCodesUnmanagedGetRequest instead. */ @@ -306,11 +289,6 @@ export type AccessCodesUnmanagedListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use AccessCodesUnmanagedListParameters instead. - */ -export type AccessCodesUnmanagedListParams = AccessCodesUnmanagedListParameters - /** * @deprecated Use AccessCodesUnmanagedListRequest instead. */ @@ -334,12 +312,6 @@ export type AccessCodesUnmanagedUpdateParameters = { is_managed: boolean } -/** - * @deprecated Use AccessCodesUnmanagedUpdateParameters instead. - */ -export type AccessCodesUnmanagedUpdateBody = - AccessCodesUnmanagedUpdateParameters - /** * @deprecated Use AccessCodesUnmanagedUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/access-grants/access-grants.ts b/src/lib/seam/connect/routes/access-grants/access-grants.ts index 39a03419..df5d3d27 100644 --- a/src/lib/seam/connect/routes/access-grants/access-grants.ts +++ b/src/lib/seam/connect/routes/access-grants/access-grants.ts @@ -296,11 +296,6 @@ export type AccessGrantsCreateParameters = { starts_at?: string | undefined } -/** - * @deprecated Use AccessGrantsCreateParameters instead. - */ -export type AccessGrantsCreateBody = AccessGrantsCreateParameters - /** * @deprecated Use AccessGrantsCreateRequest instead. */ @@ -317,11 +312,6 @@ export type AccessGrantsDeleteParameters = { access_grant_id: string } -/** - * @deprecated Use AccessGrantsDeleteParameters instead. - */ -export type AccessGrantsDeleteParams = AccessGrantsDeleteParameters - /** * @deprecated Use AccessGrantsDeleteRequest instead. */ @@ -336,11 +326,6 @@ export type AccessGrantsGetParameters = { access_grant_key?: string | undefined } -/** - * @deprecated Use AccessGrantsGetParameters instead. - */ -export type AccessGrantsGetParams = AccessGrantsGetParameters - /** * @deprecated Use AccessGrantsGetRequest instead. */ @@ -382,11 +367,6 @@ export type AccessGrantsGetRelatedParameters = { | undefined } -/** - * @deprecated Use AccessGrantsGetRelatedParameters instead. - */ -export type AccessGrantsGetRelatedParams = AccessGrantsGetRelatedParameters - /** * @deprecated Use AccessGrantsGetRelatedRequest instead. */ @@ -415,11 +395,6 @@ export type AccessGrantsListParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AccessGrantsListParameters instead. - */ -export type AccessGrantsListParams = AccessGrantsListParameters - /** * @deprecated Use AccessGrantsListRequest instead. */ @@ -444,12 +419,6 @@ export type AccessGrantsRequestAccessMethodsParameters = { }> } -/** - * @deprecated Use AccessGrantsRequestAccessMethodsParameters instead. - */ -export type AccessGrantsRequestAccessMethodsBody = - AccessGrantsRequestAccessMethodsParameters - /** * @deprecated Use AccessGrantsRequestAccessMethodsRequest instead. */ @@ -472,11 +441,6 @@ export type AccessGrantsUpdateParameters = { starts_at?: string | undefined } -/** - * @deprecated Use AccessGrantsUpdateParameters instead. - */ -export type AccessGrantsUpdateBody = AccessGrantsUpdateParameters - /** * @deprecated Use AccessGrantsUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts index 06b870aa..c8f18529 100644 --- a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts @@ -205,11 +205,6 @@ export type AccessGrantsUnmanagedGetParameters = { access_grant_id: string } -/** - * @deprecated Use AccessGrantsUnmanagedGetParameters instead. - */ -export type AccessGrantsUnmanagedGetParams = AccessGrantsUnmanagedGetParameters - /** * @deprecated Use AccessGrantsUnmanagedGetRequest instead. */ @@ -231,12 +226,6 @@ export type AccessGrantsUnmanagedListParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AccessGrantsUnmanagedListParameters instead. - */ -export type AccessGrantsUnmanagedListParams = - AccessGrantsUnmanagedListParameters - /** * @deprecated Use AccessGrantsUnmanagedListRequest instead. */ @@ -258,12 +247,6 @@ export type AccessGrantsUnmanagedUpdateParameters = { is_managed: boolean } -/** - * @deprecated Use AccessGrantsUnmanagedUpdateParameters instead. - */ -export type AccessGrantsUnmanagedUpdateBody = - AccessGrantsUnmanagedUpdateParameters - /** * @deprecated Use AccessGrantsUnmanagedUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/access-methods/access-methods.ts b/src/lib/seam/connect/routes/access-methods/access-methods.ts index 321bcc3f..19d2129f 100644 --- a/src/lib/seam/connect/routes/access-methods/access-methods.ts +++ b/src/lib/seam/connect/routes/access-methods/access-methods.ts @@ -267,11 +267,6 @@ export type AccessMethodsAssignCardParameters = { card_number: string } -/** - * @deprecated Use AccessMethodsAssignCardParameters instead. - */ -export type AccessMethodsAssignCardBody = AccessMethodsAssignCardParameters - /** * @deprecated Use AccessMethodsAssignCardRequest instead. */ @@ -295,11 +290,6 @@ export type AccessMethodsDeleteParameters = { reservation_key?: string | undefined } -/** - * @deprecated Use AccessMethodsDeleteParameters instead. - */ -export type AccessMethodsDeleteParams = AccessMethodsDeleteParameters - /** * @deprecated Use AccessMethodsDeleteRequest instead. */ @@ -315,11 +305,6 @@ export type AccessMethodsEncodeParameters = { acs_encoder_id: string } -/** - * @deprecated Use AccessMethodsEncodeParameters instead. - */ -export type AccessMethodsEncodeBody = AccessMethodsEncodeParameters - /** * @deprecated Use AccessMethodsEncodeRequest instead. */ @@ -341,11 +326,6 @@ export type AccessMethodsGetParameters = { access_method_id: string } -/** - * @deprecated Use AccessMethodsGetParameters instead. - */ -export type AccessMethodsGetParams = AccessMethodsGetParameters - /** * @deprecated Use AccessMethodsGetRequest instead. */ @@ -387,11 +367,6 @@ export type AccessMethodsGetRelatedParameters = { | undefined } -/** - * @deprecated Use AccessMethodsGetRelatedParameters instead. - */ -export type AccessMethodsGetRelatedParams = AccessMethodsGetRelatedParameters - /** * @deprecated Use AccessMethodsGetRelatedRequest instead. */ @@ -415,11 +390,6 @@ export type AccessMethodsListParameters = { space_id?: string | undefined } -/** - * @deprecated Use AccessMethodsListParameters instead. - */ -export type AccessMethodsListParams = AccessMethodsListParameters - /** * @deprecated Use AccessMethodsListRequest instead. */ @@ -440,11 +410,6 @@ export type AccessMethodsUnlockDoorParameters = { acs_entrance_id: string } -/** - * @deprecated Use AccessMethodsUnlockDoorParameters instead. - */ -export type AccessMethodsUnlockDoorBody = AccessMethodsUnlockDoorParameters - /** * @deprecated Use AccessMethodsUnlockDoorRequest instead. */ diff --git a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts index 3fbe1b72..9981fe4e 100644 --- a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts @@ -192,12 +192,6 @@ export type AccessMethodsUnmanagedGetParameters = { access_method_id: string } -/** - * @deprecated Use AccessMethodsUnmanagedGetParameters instead. - */ -export type AccessMethodsUnmanagedGetParams = - AccessMethodsUnmanagedGetParameters - /** * @deprecated Use AccessMethodsUnmanagedGetRequest instead. */ @@ -220,12 +214,6 @@ export type AccessMethodsUnmanagedListParameters = { space_id?: string | undefined } -/** - * @deprecated Use AccessMethodsUnmanagedListParameters instead. - */ -export type AccessMethodsUnmanagedListParams = - AccessMethodsUnmanagedListParameters - /** * @deprecated Use AccessMethodsUnmanagedListRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts index ab33dd84..27b85e53 100644 --- a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts +++ b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts @@ -262,11 +262,6 @@ export type AcsAccessGroupsAddUserParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsAccessGroupsAddUserParameters instead. - */ -export type AcsAccessGroupsAddUserBody = AcsAccessGroupsAddUserParameters - /** * @deprecated Use AcsAccessGroupsAddUserRequest instead. */ @@ -280,11 +275,6 @@ export type AcsAccessGroupsDeleteParameters = { acs_access_group_id: string } -/** - * @deprecated Use AcsAccessGroupsDeleteParameters instead. - */ -export type AcsAccessGroupsDeleteParams = AcsAccessGroupsDeleteParameters - /** * @deprecated Use AcsAccessGroupsDeleteRequest instead. */ @@ -298,11 +288,6 @@ export type AcsAccessGroupsGetParameters = { acs_access_group_id: string } -/** - * @deprecated Use AcsAccessGroupsGetParameters instead. - */ -export type AcsAccessGroupsGetParams = AcsAccessGroupsGetParameters - /** * @deprecated Use AcsAccessGroupsGetRequest instead. */ @@ -324,11 +309,6 @@ export type AcsAccessGroupsListParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsAccessGroupsListParameters instead. - */ -export type AcsAccessGroupsListParams = AcsAccessGroupsListParameters - /** * @deprecated Use AcsAccessGroupsListRequest instead. */ @@ -347,12 +327,6 @@ export type AcsAccessGroupsListAccessibleEntrancesParameters = { acs_access_group_id: string } -/** - * @deprecated Use AcsAccessGroupsListAccessibleEntrancesParameters instead. - */ -export type AcsAccessGroupsListAccessibleEntrancesParams = - AcsAccessGroupsListAccessibleEntrancesParameters - /** * @deprecated Use AcsAccessGroupsListAccessibleEntrancesRequest instead. */ @@ -371,11 +345,6 @@ export type AcsAccessGroupsListUsersParameters = { acs_access_group_id: string } -/** - * @deprecated Use AcsAccessGroupsListUsersParameters instead. - */ -export type AcsAccessGroupsListUsersParams = AcsAccessGroupsListUsersParameters - /** * @deprecated Use AcsAccessGroupsListUsersRequest instead. */ @@ -397,12 +366,6 @@ export type AcsAccessGroupsRemoveUserParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsAccessGroupsRemoveUserParameters instead. - */ -export type AcsAccessGroupsRemoveUserParams = - AcsAccessGroupsRemoveUserParameters - /** * @deprecated Use AcsAccessGroupsRemoveUserRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/credentials/credentials.ts b/src/lib/seam/connect/routes/acs/credentials/credentials.ts index b1109881..6c238ed9 100644 --- a/src/lib/seam/connect/routes/acs/credentials/credentials.ts +++ b/src/lib/seam/connect/routes/acs/credentials/credentials.ts @@ -274,11 +274,6 @@ export type AcsCredentialsAssignParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsCredentialsAssignParameters instead. - */ -export type AcsCredentialsAssignBody = AcsCredentialsAssignParameters - /** * @deprecated Use AcsCredentialsAssignRequest instead. */ @@ -324,11 +319,6 @@ export type AcsCredentialsCreateParameters = { | undefined } -/** - * @deprecated Use AcsCredentialsCreateParameters instead. - */ -export type AcsCredentialsCreateBody = AcsCredentialsCreateParameters - /** * @deprecated Use AcsCredentialsCreateRequest instead. */ @@ -347,11 +337,6 @@ export type AcsCredentialsDeleteParameters = { acs_credential_id: string } -/** - * @deprecated Use AcsCredentialsDeleteParameters instead. - */ -export type AcsCredentialsDeleteParams = AcsCredentialsDeleteParameters - /** * @deprecated Use AcsCredentialsDeleteRequest instead. */ @@ -365,11 +350,6 @@ export type AcsCredentialsGetParameters = { acs_credential_id: string } -/** - * @deprecated Use AcsCredentialsGetParameters instead. - */ -export type AcsCredentialsGetParams = AcsCredentialsGetParameters - /** * @deprecated Use AcsCredentialsGetRequest instead. */ @@ -395,11 +375,6 @@ export type AcsCredentialsListParameters = { search?: string | undefined } -/** - * @deprecated Use AcsCredentialsListParameters instead. - */ -export type AcsCredentialsListParams = AcsCredentialsListParameters - /** * @deprecated Use AcsCredentialsListRequest instead. */ @@ -418,12 +393,6 @@ export type AcsCredentialsListAccessibleEntrancesParameters = { acs_credential_id: string } -/** - * @deprecated Use AcsCredentialsListAccessibleEntrancesParameters instead. - */ -export type AcsCredentialsListAccessibleEntrancesParams = - AcsCredentialsListAccessibleEntrancesParameters - /** * @deprecated Use AcsCredentialsListAccessibleEntrancesRequest instead. */ @@ -445,11 +414,6 @@ export type AcsCredentialsUnassignParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsCredentialsUnassignParameters instead. - */ -export type AcsCredentialsUnassignBody = AcsCredentialsUnassignParameters - /** * @deprecated Use AcsCredentialsUnassignRequest instead. */ @@ -466,11 +430,6 @@ export type AcsCredentialsUpdateParameters = { ends_at?: string | undefined } -/** - * @deprecated Use AcsCredentialsUpdateParameters instead. - */ -export type AcsCredentialsUpdateBody = AcsCredentialsUpdateParameters - /** * @deprecated Use AcsCredentialsUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/encoders/encoders.ts b/src/lib/seam/connect/routes/acs/encoders/encoders.ts index 9ceb24a2..4399df39 100644 --- a/src/lib/seam/connect/routes/acs/encoders/encoders.ts +++ b/src/lib/seam/connect/routes/acs/encoders/encoders.ts @@ -240,12 +240,6 @@ export type AcsEncodersEncodeCredentialParameters = { acs_encoder_id: string } -/** - * @deprecated Use AcsEncodersEncodeCredentialParameters instead. - */ -export type AcsEncodersEncodeCredentialBody = - AcsEncodersEncodeCredentialParameters - /** * @deprecated Use AcsEncodersEncodeCredentialRequest instead. */ @@ -267,11 +261,6 @@ export type AcsEncodersGetParameters = { acs_encoder_id: string } -/** - * @deprecated Use AcsEncodersGetParameters instead. - */ -export type AcsEncodersGetParams = AcsEncodersGetParameters - /** * @deprecated Use AcsEncodersGetRequest instead. */ @@ -292,11 +281,6 @@ export type AcsEncodersListParameters = { page_cursor?: string | undefined } -/** - * @deprecated Use AcsEncodersListParameters instead. - */ -export type AcsEncodersListParams = AcsEncodersListParameters - /** * @deprecated Use AcsEncodersListRequest instead. */ @@ -321,11 +305,6 @@ export type AcsEncodersScanCredentialParameters = { | undefined } -/** - * @deprecated Use AcsEncodersScanCredentialParameters instead. - */ -export type AcsEncodersScanCredentialBody = AcsEncodersScanCredentialParameters - /** * @deprecated Use AcsEncodersScanCredentialRequest instead. */ @@ -355,12 +334,6 @@ export type AcsEncodersScanToAssignCredentialParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsEncodersScanToAssignCredentialParameters instead. - */ -export type AcsEncodersScanToAssignCredentialBody = - AcsEncodersScanToAssignCredentialParameters - /** * @deprecated Use AcsEncodersScanToAssignCredentialRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts b/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts index 64210a5f..8b3c44de 100644 --- a/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts @@ -225,12 +225,6 @@ export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { acs_credential_id?: string | undefined } -/** - * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillFailParameters instead. - */ -export type AcsEncodersSimulateNextCredentialEncodeWillFailBody = - AcsEncodersSimulateNextCredentialEncodeWillFailParameters - /** * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillFailRequest instead. */ @@ -247,12 +241,6 @@ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { scenario?: 'credential_is_issued' | undefined } -/** - * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters instead. - */ -export type AcsEncodersSimulateNextCredentialEncodeWillSucceedBody = - AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters - /** * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest instead. */ @@ -274,12 +262,6 @@ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { acs_credential_id_on_seam?: string | undefined } -/** - * @deprecated Use AcsEncodersSimulateNextCredentialScanWillFailParameters instead. - */ -export type AcsEncodersSimulateNextCredentialScanWillFailBody = - AcsEncodersSimulateNextCredentialScanWillFailParameters - /** * @deprecated Use AcsEncodersSimulateNextCredentialScanWillFailRequest instead. */ @@ -302,12 +284,6 @@ export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { | undefined } -/** - * @deprecated Use AcsEncodersSimulateNextCredentialScanWillSucceedParameters instead. - */ -export type AcsEncodersSimulateNextCredentialScanWillSucceedBody = - AcsEncodersSimulateNextCredentialScanWillSucceedParameters - /** * @deprecated Use AcsEncodersSimulateNextCredentialScanWillSucceedRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/entrances/entrances.ts b/src/lib/seam/connect/routes/acs/entrances/entrances.ts index ef287e7b..9fa30840 100644 --- a/src/lib/seam/connect/routes/acs/entrances/entrances.ts +++ b/src/lib/seam/connect/routes/acs/entrances/entrances.ts @@ -233,11 +233,6 @@ export type AcsEntrancesGetParameters = { acs_entrance_id: string } -/** - * @deprecated Use AcsEntrancesGetParameters instead. - */ -export type AcsEntrancesGetParams = AcsEntrancesGetParameters - /** * @deprecated Use AcsEntrancesGetRequest instead. */ @@ -257,11 +252,6 @@ export type AcsEntrancesGrantAccessParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsEntrancesGrantAccessParameters instead. - */ -export type AcsEntrancesGrantAccessBody = AcsEntrancesGrantAccessParameters - /** * @deprecated Use AcsEntrancesGrantAccessRequest instead. */ @@ -285,11 +275,6 @@ export type AcsEntrancesListParameters = { space_id?: string | undefined } -/** - * @deprecated Use AcsEntrancesListParameters instead. - */ -export type AcsEntrancesListParams = AcsEntrancesListParameters - /** * @deprecated Use AcsEntrancesListRequest instead. */ @@ -310,12 +295,6 @@ export type AcsEntrancesListCredentialsWithAccessParameters = { include_if?: Array<'visionline_metadata.is_valid'> | undefined } -/** - * @deprecated Use AcsEntrancesListCredentialsWithAccessParameters instead. - */ -export type AcsEntrancesListCredentialsWithAccessParams = - AcsEntrancesListCredentialsWithAccessParameters - /** * @deprecated Use AcsEntrancesListCredentialsWithAccessRequest instead. */ @@ -336,11 +315,6 @@ export type AcsEntrancesUnlockParameters = { acs_entrance_id: string } -/** - * @deprecated Use AcsEntrancesUnlockParameters instead. - */ -export type AcsEntrancesUnlockBody = AcsEntrancesUnlockParameters - /** * @deprecated Use AcsEntrancesUnlockRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/systems/systems.ts b/src/lib/seam/connect/routes/acs/systems/systems.ts index 36cfbaea..241acc7b 100644 --- a/src/lib/seam/connect/routes/acs/systems/systems.ts +++ b/src/lib/seam/connect/routes/acs/systems/systems.ts @@ -218,11 +218,6 @@ export type AcsSystemsGetParameters = { acs_system_id: string } -/** - * @deprecated Use AcsSystemsGetParameters instead. - */ -export type AcsSystemsGetParams = AcsSystemsGetParameters - /** * @deprecated Use AcsSystemsGetRequest instead. */ @@ -241,11 +236,6 @@ export type AcsSystemsListParameters = { search?: string | undefined } -/** - * @deprecated Use AcsSystemsListParameters instead. - */ -export type AcsSystemsListParams = AcsSystemsListParameters - /** * @deprecated Use AcsSystemsListRequest instead. */ @@ -262,12 +252,6 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { acs_system_id: string } -/** - * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters instead. - */ -export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParams = - AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters - /** * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest instead. */ @@ -309,11 +293,6 @@ export type AcsSystemsReportDevicesParameters = { acs_system_id: string } -/** - * @deprecated Use AcsSystemsReportDevicesParameters instead. - */ -export type AcsSystemsReportDevicesBody = AcsSystemsReportDevicesParameters - /** * @deprecated Use AcsSystemsReportDevicesRequest instead. */ diff --git a/src/lib/seam/connect/routes/acs/users/users.ts b/src/lib/seam/connect/routes/acs/users/users.ts index ba9467f0..9e506d7b 100644 --- a/src/lib/seam/connect/routes/acs/users/users.ts +++ b/src/lib/seam/connect/routes/acs/users/users.ts @@ -312,11 +312,6 @@ export type AcsUsersAddToAccessGroupParameters = { acs_user_id: string } -/** - * @deprecated Use AcsUsersAddToAccessGroupParameters instead. - */ -export type AcsUsersAddToAccessGroupBody = AcsUsersAddToAccessGroupParameters - /** * @deprecated Use AcsUsersAddToAccessGroupRequest instead. */ @@ -344,11 +339,6 @@ export type AcsUsersCreateParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersCreateParameters instead. - */ -export type AcsUsersCreateBody = AcsUsersCreateParameters - /** * @deprecated Use AcsUsersCreateRequest instead. */ @@ -367,11 +357,6 @@ export type AcsUsersDeleteParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersDeleteParameters instead. - */ -export type AcsUsersDeleteParams = AcsUsersDeleteParameters - /** * @deprecated Use AcsUsersDeleteRequest instead. */ @@ -387,11 +372,6 @@ export type AcsUsersGetParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersGetParameters instead. - */ -export type AcsUsersGetParams = AcsUsersGetParameters - /** * @deprecated Use AcsUsersGetRequest instead. */ @@ -415,11 +395,6 @@ export type AcsUsersListParameters = { user_identity_phone_number?: string | undefined } -/** - * @deprecated Use AcsUsersListParameters instead. - */ -export type AcsUsersListParams = AcsUsersListParameters - /** * @deprecated Use AcsUsersListRequest instead. */ @@ -438,12 +413,6 @@ export type AcsUsersListAccessibleEntrancesParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersListAccessibleEntrancesParameters instead. - */ -export type AcsUsersListAccessibleEntrancesParams = - AcsUsersListAccessibleEntrancesParameters - /** * @deprecated Use AcsUsersListAccessibleEntrancesRequest instead. */ @@ -465,12 +434,6 @@ export type AcsUsersRemoveFromAccessGroupParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersRemoveFromAccessGroupParameters instead. - */ -export type AcsUsersRemoveFromAccessGroupParams = - AcsUsersRemoveFromAccessGroupParameters - /** * @deprecated Use AcsUsersRemoveFromAccessGroupRequest instead. */ @@ -489,12 +452,6 @@ export type AcsUsersRevokeAccessToAllEntrancesParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersRevokeAccessToAllEntrancesParameters instead. - */ -export type AcsUsersRevokeAccessToAllEntrancesBody = - AcsUsersRevokeAccessToAllEntrancesParameters - /** * @deprecated Use AcsUsersRevokeAccessToAllEntrancesRequest instead. */ @@ -513,11 +470,6 @@ export type AcsUsersSuspendParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersSuspendParameters instead. - */ -export type AcsUsersSuspendBody = AcsUsersSuspendParameters - /** * @deprecated Use AcsUsersSuspendRequest instead. */ @@ -533,11 +485,6 @@ export type AcsUsersUnsuspendParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersUnsuspendParameters instead. - */ -export type AcsUsersUnsuspendBody = AcsUsersUnsuspendParameters - /** * @deprecated Use AcsUsersUnsuspendRequest instead. */ @@ -564,11 +511,6 @@ export type AcsUsersUpdateParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use AcsUsersUpdateParameters instead. - */ -export type AcsUsersUpdateBody = AcsUsersUpdateParameters - /** * @deprecated Use AcsUsersUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts index c7f2f9fd..81769793 100644 --- a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts +++ b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts @@ -192,11 +192,6 @@ export type ActionAttemptsGetParameters = { action_attempt_id: string } -/** - * @deprecated Use ActionAttemptsGetParameters instead. - */ -export type ActionAttemptsGetParams = ActionAttemptsGetParameters - /** * @deprecated Use ActionAttemptsGetRequest instead. */ @@ -221,11 +216,6 @@ export type ActionAttemptsListParameters = { page_cursor?: string | undefined } -/** - * @deprecated Use ActionAttemptsListParameters instead. - */ -export type ActionAttemptsListParams = ActionAttemptsListParameters - /** * @deprecated Use ActionAttemptsListRequest instead. */ diff --git a/src/lib/seam/connect/routes/client-sessions/client-sessions.ts b/src/lib/seam/connect/routes/client-sessions/client-sessions.ts index a2c23557..a18f41ea 100644 --- a/src/lib/seam/connect/routes/client-sessions/client-sessions.ts +++ b/src/lib/seam/connect/routes/client-sessions/client-sessions.ts @@ -263,11 +263,6 @@ export type ClientSessionsCreateParameters = { user_identity_ids?: Array | undefined } -/** - * @deprecated Use ClientSessionsCreateParameters instead. - */ -export type ClientSessionsCreateBody = ClientSessionsCreateParameters - /** * @deprecated Use ClientSessionsCreateRequest instead. */ @@ -286,11 +281,6 @@ export type ClientSessionsDeleteParameters = { client_session_id: string } -/** - * @deprecated Use ClientSessionsDeleteParameters instead. - */ -export type ClientSessionsDeleteParams = ClientSessionsDeleteParameters - /** * @deprecated Use ClientSessionsDeleteRequest instead. */ @@ -305,11 +295,6 @@ export type ClientSessionsGetParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use ClientSessionsGetParameters instead. - */ -export type ClientSessionsGetParams = ClientSessionsGetParameters - /** * @deprecated Use ClientSessionsGetRequest instead. */ @@ -333,11 +318,6 @@ export type ClientSessionsGetOrCreateParameters = { user_identity_ids?: Array | undefined } -/** - * @deprecated Use ClientSessionsGetOrCreateParameters instead. - */ -export type ClientSessionsGetOrCreateBody = ClientSessionsGetOrCreateParameters - /** * @deprecated Use ClientSessionsGetOrCreateRequest instead. */ @@ -361,11 +341,6 @@ export type ClientSessionsGrantAccessParameters = { user_identity_ids?: Array | undefined } -/** - * @deprecated Use ClientSessionsGrantAccessParameters instead. - */ -export type ClientSessionsGrantAccessBody = ClientSessionsGrantAccessParameters - /** * @deprecated Use ClientSessionsGrantAccessRequest instead. */ @@ -383,11 +358,6 @@ export type ClientSessionsListParameters = { without_user_identifier_key?: boolean | undefined } -/** - * @deprecated Use ClientSessionsListParameters instead. - */ -export type ClientSessionsListParams = ClientSessionsListParameters - /** * @deprecated Use ClientSessionsListRequest instead. */ @@ -406,11 +376,6 @@ export type ClientSessionsRevokeParameters = { client_session_id: string } -/** - * @deprecated Use ClientSessionsRevokeParameters instead. - */ -export type ClientSessionsRevokeBody = ClientSessionsRevokeParameters - /** * @deprecated Use ClientSessionsRevokeRequest instead. */ diff --git a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts index d935b655..d54f4de5 100644 --- a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts @@ -311,11 +311,6 @@ export type ConnectWebviewsCreateParameters = { wait_for_device_creation?: boolean | undefined } -/** - * @deprecated Use ConnectWebviewsCreateParameters instead. - */ -export type ConnectWebviewsCreateBody = ConnectWebviewsCreateParameters - /** * @deprecated Use ConnectWebviewsCreateRequest instead. */ @@ -334,11 +329,6 @@ export type ConnectWebviewsDeleteParameters = { connect_webview_id: string } -/** - * @deprecated Use ConnectWebviewsDeleteParameters instead. - */ -export type ConnectWebviewsDeleteParams = ConnectWebviewsDeleteParameters - /** * @deprecated Use ConnectWebviewsDeleteRequest instead. */ @@ -352,11 +342,6 @@ export type ConnectWebviewsGetParameters = { connect_webview_id: string } -/** - * @deprecated Use ConnectWebviewsGetParameters instead. - */ -export type ConnectWebviewsGetParams = ConnectWebviewsGetParameters - /** * @deprecated Use ConnectWebviewsGetRequest instead. */ @@ -380,11 +365,6 @@ export type ConnectWebviewsListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use ConnectWebviewsListParameters instead. - */ -export type ConnectWebviewsListParams = ConnectWebviewsListParameters - /** * @deprecated Use ConnectWebviewsListRequest instead. */ diff --git a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts index 5ff2ad4b..9c4c95a9 100644 --- a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts @@ -240,11 +240,6 @@ export type ConnectedAccountsDeleteParameters = { connected_account_id: string } -/** - * @deprecated Use ConnectedAccountsDeleteParameters instead. - */ -export type ConnectedAccountsDeleteParams = ConnectedAccountsDeleteParameters - /** * @deprecated Use ConnectedAccountsDeleteRequest instead. */ @@ -259,11 +254,6 @@ export type ConnectedAccountsGetParameters = { email?: string | undefined } -/** - * @deprecated Use ConnectedAccountsGetParameters instead. - */ -export type ConnectedAccountsGetParams = ConnectedAccountsGetParameters - /** * @deprecated Use ConnectedAccountsGetRequest instead. */ @@ -288,11 +278,6 @@ export type ConnectedAccountsListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use ConnectedAccountsListParameters instead. - */ -export type ConnectedAccountsListParams = ConnectedAccountsListParameters - /** * @deprecated Use ConnectedAccountsListRequest instead. */ @@ -311,11 +296,6 @@ export type ConnectedAccountsSyncParameters = { connected_account_id: string } -/** - * @deprecated Use ConnectedAccountsSyncParameters instead. - */ -export type ConnectedAccountsSyncBody = ConnectedAccountsSyncParameters - /** * @deprecated Use ConnectedAccountsSyncRequest instead. */ @@ -339,11 +319,6 @@ export type ConnectedAccountsUpdateParameters = { display_name?: string | undefined } -/** - * @deprecated Use ConnectedAccountsUpdateParameters instead. - */ -export type ConnectedAccountsUpdateBody = ConnectedAccountsUpdateParameters - /** * @deprecated Use ConnectedAccountsUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts b/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts index 7b89096b..86d0ed32 100644 --- a/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts @@ -181,12 +181,6 @@ export type ConnectedAccountsSimulateDisconnectParameters = { connected_account_id: string } -/** - * @deprecated Use ConnectedAccountsSimulateDisconnectParameters instead. - */ -export type ConnectedAccountsSimulateDisconnectBody = - ConnectedAccountsSimulateDisconnectParameters - /** * @deprecated Use ConnectedAccountsSimulateDisconnectRequest instead. */ diff --git a/src/lib/seam/connect/routes/customers/customers.ts b/src/lib/seam/connect/routes/customers/customers.ts index 0388bbdb..d9852dcd 100644 --- a/src/lib/seam/connect/routes/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/customers.ts @@ -517,11 +517,6 @@ export type CustomersCreatePortalParameters = { | undefined } -/** - * @deprecated Use CustomersCreatePortalParameters instead. - */ -export type CustomersCreatePortalBody = CustomersCreatePortalParameters - /** * @deprecated Use CustomersCreatePortalRequest instead. */ @@ -558,11 +553,6 @@ export type CustomersDeleteDataParameters = { user_keys?: Array | undefined } -/** - * @deprecated Use CustomersDeleteDataParameters instead. - */ -export type CustomersDeleteDataParams = CustomersDeleteDataParameters - /** * @deprecated Use CustomersDeleteDataRequest instead. */ @@ -782,11 +772,6 @@ export type CustomersPushDataParameters = { | undefined } -/** - * @deprecated Use CustomersPushDataParameters instead. - */ -export type CustomersPushDataBody = CustomersPushDataParameters - /** * @deprecated Use CustomersPushDataRequest instead. */ diff --git a/src/lib/seam/connect/routes/devices/devices.ts b/src/lib/seam/connect/routes/devices/devices.ts index daf6b6ca..edda1d0b 100644 --- a/src/lib/seam/connect/routes/devices/devices.ts +++ b/src/lib/seam/connect/routes/devices/devices.ts @@ -244,11 +244,6 @@ export type DevicesGetParameters = { name?: string | undefined } -/** - * @deprecated Use DevicesGetParameters instead. - */ -export type DevicesGetParams = DevicesGetParameters - /** * @deprecated Use DevicesGetRequest instead. */ @@ -417,11 +412,6 @@ export type DevicesListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use DevicesListParameters instead. - */ -export type DevicesListParams = DevicesListParameters - /** * @deprecated Use DevicesListRequest instead. */ @@ -444,12 +434,6 @@ export type DevicesListDeviceProvidersParameters = { | undefined } -/** - * @deprecated Use DevicesListDeviceProvidersParameters instead. - */ -export type DevicesListDeviceProvidersParams = - DevicesListDeviceProvidersParameters - /** * @deprecated Use DevicesListDeviceProvidersRequest instead. */ @@ -1775,12 +1759,6 @@ export type DevicesReportProviderMetadataParameters = { }> } -/** - * @deprecated Use DevicesReportProviderMetadataParameters instead. - */ -export type DevicesReportProviderMetadataBody = - DevicesReportProviderMetadataParameters - /** * @deprecated Use DevicesReportProviderMetadataRequest instead. */ @@ -1807,11 +1785,6 @@ export type DevicesUpdateParameters = { | undefined } -/** - * @deprecated Use DevicesUpdateParameters instead. - */ -export type DevicesUpdateBody = DevicesUpdateParameters - /** * @deprecated Use DevicesUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/devices/simulate/simulate.ts b/src/lib/seam/connect/routes/devices/simulate/simulate.ts index eb28f0e4..30845447 100644 --- a/src/lib/seam/connect/routes/devices/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/devices/simulate/simulate.ts @@ -243,11 +243,6 @@ export type DevicesSimulateConnectParameters = { device_id: string } -/** - * @deprecated Use DevicesSimulateConnectParameters instead. - */ -export type DevicesSimulateConnectBody = DevicesSimulateConnectParameters - /** * @deprecated Use DevicesSimulateConnectRequest instead. */ @@ -261,12 +256,6 @@ export type DevicesSimulateConnectToHubParameters = { device_id: string } -/** - * @deprecated Use DevicesSimulateConnectToHubParameters instead. - */ -export type DevicesSimulateConnectToHubBody = - DevicesSimulateConnectToHubParameters - /** * @deprecated Use DevicesSimulateConnectToHubRequest instead. */ @@ -283,11 +272,6 @@ export type DevicesSimulateDisconnectParameters = { device_id: string } -/** - * @deprecated Use DevicesSimulateDisconnectParameters instead. - */ -export type DevicesSimulateDisconnectBody = DevicesSimulateDisconnectParameters - /** * @deprecated Use DevicesSimulateDisconnectRequest instead. */ @@ -301,12 +285,6 @@ export type DevicesSimulateDisconnectFromHubParameters = { device_id: string } -/** - * @deprecated Use DevicesSimulateDisconnectFromHubParameters instead. - */ -export type DevicesSimulateDisconnectFromHubBody = - DevicesSimulateDisconnectFromHubParameters - /** * @deprecated Use DevicesSimulateDisconnectFromHubRequest instead. */ @@ -325,12 +303,6 @@ export type DevicesSimulatePaidSubscriptionParameters = { is_expired: boolean } -/** - * @deprecated Use DevicesSimulatePaidSubscriptionParameters instead. - */ -export type DevicesSimulatePaidSubscriptionBody = - DevicesSimulatePaidSubscriptionParameters - /** * @deprecated Use DevicesSimulatePaidSubscriptionRequest instead. */ @@ -347,11 +319,6 @@ export type DevicesSimulateRemoveParameters = { device_id: string } -/** - * @deprecated Use DevicesSimulateRemoveParameters instead. - */ -export type DevicesSimulateRemoveBody = DevicesSimulateRemoveParameters - /** * @deprecated Use DevicesSimulateRemoveRequest instead. */ diff --git a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts index e44c0943..32b94b27 100644 --- a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts @@ -206,11 +206,6 @@ export type DevicesUnmanagedGetParameters = { name?: string | undefined } -/** - * @deprecated Use DevicesUnmanagedGetParameters instead. - */ -export type DevicesUnmanagedGetParams = DevicesUnmanagedGetParameters - /** * @deprecated Use DevicesUnmanagedGetRequest instead. */ @@ -382,11 +377,6 @@ export type DevicesUnmanagedListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use DevicesUnmanagedListParameters instead. - */ -export type DevicesUnmanagedListParams = DevicesUnmanagedListParameters - /** * @deprecated Use DevicesUnmanagedListRequest instead. */ @@ -408,11 +398,6 @@ export type DevicesUnmanagedUpdateParameters = { is_managed?: boolean | undefined } -/** - * @deprecated Use DevicesUnmanagedUpdateParameters instead. - */ -export type DevicesUnmanagedUpdateBody = DevicesUnmanagedUpdateParameters - /** * @deprecated Use DevicesUnmanagedUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/events/events.ts b/src/lib/seam/connect/routes/events/events.ts index 15d8fb83..2aa20149 100644 --- a/src/lib/seam/connect/routes/events/events.ts +++ b/src/lib/seam/connect/routes/events/events.ts @@ -194,11 +194,6 @@ export type EventsGetParameters = { event_type?: string | undefined } -/** - * @deprecated Use EventsGetParameters instead. - */ -export type EventsGetParams = EventsGetParameters - /** * @deprecated Use EventsGetRequest instead. */ @@ -461,11 +456,6 @@ export type EventsListParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use EventsListParameters instead. - */ -export type EventsListParams = EventsListParameters - /** * @deprecated Use EventsListRequest instead. */ diff --git a/src/lib/seam/connect/routes/instant-keys/instant-keys.ts b/src/lib/seam/connect/routes/instant-keys/instant-keys.ts index 6ad20946..0b55ba28 100644 --- a/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +++ b/src/lib/seam/connect/routes/instant-keys/instant-keys.ts @@ -205,11 +205,6 @@ export type InstantKeysDeleteParameters = { instant_key_id: string } -/** - * @deprecated Use InstantKeysDeleteParameters instead. - */ -export type InstantKeysDeleteParams = InstantKeysDeleteParameters - /** * @deprecated Use InstantKeysDeleteRequest instead. */ @@ -224,11 +219,6 @@ export type InstantKeysGetParameters = { instant_key_url?: string | undefined } -/** - * @deprecated Use InstantKeysGetParameters instead. - */ -export type InstantKeysGetParams = InstantKeysGetParameters - /** * @deprecated Use InstantKeysGetRequest instead. */ @@ -245,11 +235,6 @@ export type InstantKeysListParameters = { user_identity_id?: string | undefined } -/** - * @deprecated Use InstantKeysListParameters instead. - */ -export type InstantKeysListParams = InstantKeysListParameters - /** * @deprecated Use InstantKeysListRequest instead. */ diff --git a/src/lib/seam/connect/routes/locks/locks.ts b/src/lib/seam/connect/routes/locks/locks.ts index 9d030dbf..ee04261d 100644 --- a/src/lib/seam/connect/routes/locks/locks.ts +++ b/src/lib/seam/connect/routes/locks/locks.ts @@ -241,11 +241,6 @@ export type LocksConfigureAutoLockParameters = { device_id: string } -/** - * @deprecated Use LocksConfigureAutoLockParameters instead. - */ -export type LocksConfigureAutoLockBody = LocksConfigureAutoLockParameters - /** * @deprecated Use LocksConfigureAutoLockRequest instead. */ @@ -268,11 +263,6 @@ export type LocksGetParameters = { name?: string | undefined } -/** - * @deprecated Use LocksGetParameters instead. - */ -export type LocksGetParams = LocksGetParameters - /** * @deprecated Use LocksGetRequest instead. */ @@ -398,11 +388,6 @@ export type LocksListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use LocksListParameters instead. - */ -export type LocksListParams = LocksListParameters - /** * @deprecated Use LocksListRequest instead. */ @@ -416,11 +401,6 @@ export type LocksLockDoorParameters = { device_id: string } -/** - * @deprecated Use LocksLockDoorParameters instead. - */ -export type LocksLockDoorBody = LocksLockDoorParameters - /** * @deprecated Use LocksLockDoorRequest instead. */ @@ -440,11 +420,6 @@ export type LocksUnlockDoorParameters = { device_id: string } -/** - * @deprecated Use LocksUnlockDoorParameters instead. - */ -export type LocksUnlockDoorBody = LocksUnlockDoorParameters - /** * @deprecated Use LocksUnlockDoorRequest instead. */ diff --git a/src/lib/seam/connect/routes/locks/simulate/simulate.ts b/src/lib/seam/connect/routes/locks/simulate/simulate.ts index 27dac291..04c8c3ef 100644 --- a/src/lib/seam/connect/routes/locks/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/locks/simulate/simulate.ts @@ -194,12 +194,6 @@ export type LocksSimulateKeypadCodeEntryParameters = { device_id: string } -/** - * @deprecated Use LocksSimulateKeypadCodeEntryParameters instead. - */ -export type LocksSimulateKeypadCodeEntryBody = - LocksSimulateKeypadCodeEntryParameters - /** * @deprecated Use LocksSimulateKeypadCodeEntryRequest instead. */ @@ -221,12 +215,6 @@ export type LocksSimulateManualLockViaKeypadParameters = { device_id: string } -/** - * @deprecated Use LocksSimulateManualLockViaKeypadParameters instead. - */ -export type LocksSimulateManualLockViaKeypadBody = - LocksSimulateManualLockViaKeypadParameters - /** * @deprecated Use LocksSimulateManualLockViaKeypadRequest instead. */ diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts index 6e270e6e..e2bc2275 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts @@ -208,11 +208,6 @@ export type NoiseSensorsListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use NoiseSensorsListParameters instead. - */ -export type NoiseSensorsListParams = NoiseSensorsListParameters - /** * @deprecated Use NoiseSensorsListRequest instead. */ diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts index 135c8377..98ed2f26 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts @@ -241,12 +241,6 @@ export type NoiseSensorsNoiseThresholdsCreateParameters = { starts_daily_at: string } -/** - * @deprecated Use NoiseSensorsNoiseThresholdsCreateParameters instead. - */ -export type NoiseSensorsNoiseThresholdsCreateBody = - NoiseSensorsNoiseThresholdsCreateParameters - /** * @deprecated Use NoiseSensorsNoiseThresholdsCreateRequest instead. */ @@ -267,12 +261,6 @@ export type NoiseSensorsNoiseThresholdsDeleteParameters = { noise_threshold_id: string } -/** - * @deprecated Use NoiseSensorsNoiseThresholdsDeleteParameters instead. - */ -export type NoiseSensorsNoiseThresholdsDeleteParams = - NoiseSensorsNoiseThresholdsDeleteParameters - /** * @deprecated Use NoiseSensorsNoiseThresholdsDeleteRequest instead. */ @@ -289,12 +277,6 @@ export type NoiseSensorsNoiseThresholdsGetParameters = { noise_threshold_id: string } -/** - * @deprecated Use NoiseSensorsNoiseThresholdsGetParameters instead. - */ -export type NoiseSensorsNoiseThresholdsGetParams = - NoiseSensorsNoiseThresholdsGetParameters - /** * @deprecated Use NoiseSensorsNoiseThresholdsGetRequest instead. */ @@ -313,12 +295,6 @@ export type NoiseSensorsNoiseThresholdsListParameters = { device_id: string } -/** - * @deprecated Use NoiseSensorsNoiseThresholdsListParameters instead. - */ -export type NoiseSensorsNoiseThresholdsListParams = - NoiseSensorsNoiseThresholdsListParameters - /** * @deprecated Use NoiseSensorsNoiseThresholdsListRequest instead. */ @@ -345,12 +321,6 @@ export type NoiseSensorsNoiseThresholdsUpdateParameters = { starts_daily_at?: string | undefined } -/** - * @deprecated Use NoiseSensorsNoiseThresholdsUpdateParameters instead. - */ -export type NoiseSensorsNoiseThresholdsUpdateBody = - NoiseSensorsNoiseThresholdsUpdateParameters - /** * @deprecated Use NoiseSensorsNoiseThresholdsUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts b/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts index c4af1933..26fd8c68 100644 --- a/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts @@ -178,12 +178,6 @@ export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { device_id: string } -/** - * @deprecated Use NoiseSensorsSimulateTriggerNoiseThresholdParameters instead. - */ -export type NoiseSensorsSimulateTriggerNoiseThresholdBody = - NoiseSensorsSimulateTriggerNoiseThresholdParameters - /** * @deprecated Use NoiseSensorsSimulateTriggerNoiseThresholdRequest instead. */ diff --git a/src/lib/seam/connect/routes/phones/phones.ts b/src/lib/seam/connect/routes/phones/phones.ts index 5ed19115..9bf1b161 100644 --- a/src/lib/seam/connect/routes/phones/phones.ts +++ b/src/lib/seam/connect/routes/phones/phones.ts @@ -211,11 +211,6 @@ export type PhonesDeactivateParameters = { device_id: string } -/** - * @deprecated Use PhonesDeactivateParameters instead. - */ -export type PhonesDeactivateParams = PhonesDeactivateParameters - /** * @deprecated Use PhonesDeactivateRequest instead. */ @@ -229,11 +224,6 @@ export type PhonesGetParameters = { device_id: string } -/** - * @deprecated Use PhonesGetParameters instead. - */ -export type PhonesGetParams = PhonesGetParameters - /** * @deprecated Use PhonesGetRequest instead. */ @@ -248,11 +238,6 @@ export type PhonesListParameters = { owner_user_identity_id?: string | undefined } -/** - * @deprecated Use PhonesListParameters instead. - */ -export type PhonesListParams = PhonesListParameters - /** * @deprecated Use PhonesListRequest instead. */ diff --git a/src/lib/seam/connect/routes/phones/simulate/simulate.ts b/src/lib/seam/connect/routes/phones/simulate/simulate.ts index 37d4c38b..c89a45fa 100644 --- a/src/lib/seam/connect/routes/phones/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/phones/simulate/simulate.ts @@ -198,12 +198,6 @@ export type PhonesSimulateCreateSandboxPhoneParameters = { user_identity_id: string } -/** - * @deprecated Use PhonesSimulateCreateSandboxPhoneParameters instead. - */ -export type PhonesSimulateCreateSandboxPhoneBody = - PhonesSimulateCreateSandboxPhoneParameters - /** * @deprecated Use PhonesSimulateCreateSandboxPhoneRequest instead. */ diff --git a/src/lib/seam/connect/routes/spaces/spaces.ts b/src/lib/seam/connect/routes/spaces/spaces.ts index 172c4219..bca8fb29 100644 --- a/src/lib/seam/connect/routes/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/spaces/spaces.ts @@ -325,11 +325,6 @@ export type SpacesAddAcsEntrancesParameters = { space_id: string } -/** - * @deprecated Use SpacesAddAcsEntrancesParameters instead. - */ -export type SpacesAddAcsEntrancesBody = SpacesAddAcsEntrancesParameters - /** * @deprecated Use SpacesAddAcsEntrancesRequest instead. */ @@ -345,11 +340,6 @@ export type SpacesAddConnectedAccountParameters = { space_id: string } -/** - * @deprecated Use SpacesAddConnectedAccountParameters instead. - */ -export type SpacesAddConnectedAccountBody = SpacesAddConnectedAccountParameters - /** * @deprecated Use SpacesAddConnectedAccountRequest instead. */ @@ -365,11 +355,6 @@ export type SpacesAddDevicesParameters = { space_id: string } -/** - * @deprecated Use SpacesAddDevicesParameters instead. - */ -export type SpacesAddDevicesBody = SpacesAddDevicesParameters - /** * @deprecated Use SpacesAddDevicesRequest instead. */ @@ -397,11 +382,6 @@ export type SpacesCreateParameters = { space_key?: string | undefined } -/** - * @deprecated Use SpacesCreateParameters instead. - */ -export type SpacesCreateBody = SpacesCreateParameters - /** * @deprecated Use SpacesCreateRequest instead. */ @@ -415,11 +395,6 @@ export type SpacesDeleteParameters = { space_id: string } -/** - * @deprecated Use SpacesDeleteParameters instead. - */ -export type SpacesDeleteParams = SpacesDeleteParameters - /** * @deprecated Use SpacesDeleteRequest instead. */ @@ -434,11 +409,6 @@ export type SpacesGetParameters = { space_key?: string | undefined } -/** - * @deprecated Use SpacesGetParameters instead. - */ -export type SpacesGetParams = SpacesGetParameters - /** * @deprecated Use SpacesGetRequest instead. */ @@ -473,11 +443,6 @@ export type SpacesGetRelatedParameters = { space_keys?: Array | undefined } -/** - * @deprecated Use SpacesGetRelatedParameters instead. - */ -export type SpacesGetRelatedParams = SpacesGetRelatedParameters - /** * @deprecated Use SpacesGetRelatedRequest instead. */ @@ -498,11 +463,6 @@ export type SpacesListParameters = { space_key?: string | undefined } -/** - * @deprecated Use SpacesListParameters instead. - */ -export type SpacesListParams = SpacesListParameters - /** * @deprecated Use SpacesListRequest instead. */ @@ -518,11 +478,6 @@ export type SpacesRemoveAcsEntrancesParameters = { space_id: string } -/** - * @deprecated Use SpacesRemoveAcsEntrancesParameters instead. - */ -export type SpacesRemoveAcsEntrancesParams = SpacesRemoveAcsEntrancesParameters - /** * @deprecated Use SpacesRemoveAcsEntrancesRequest instead. */ @@ -538,12 +493,6 @@ export type SpacesRemoveConnectedAccountParameters = { space_id: string } -/** - * @deprecated Use SpacesRemoveConnectedAccountParameters instead. - */ -export type SpacesRemoveConnectedAccountParams = - SpacesRemoveConnectedAccountParameters - /** * @deprecated Use SpacesRemoveConnectedAccountRequest instead. */ @@ -562,11 +511,6 @@ export type SpacesRemoveDevicesParameters = { space_id: string } -/** - * @deprecated Use SpacesRemoveDevicesParameters instead. - */ -export type SpacesRemoveDevicesParams = SpacesRemoveDevicesParameters - /** * @deprecated Use SpacesRemoveDevicesRequest instead. */ @@ -592,11 +536,6 @@ export type SpacesUpdateParameters = { space_key?: string | undefined } -/** - * @deprecated Use SpacesUpdateParameters instead. - */ -export type SpacesUpdateBody = SpacesUpdateParameters - /** * @deprecated Use SpacesUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts index 0e382581..af46a9a4 100644 --- a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +++ b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts @@ -216,12 +216,6 @@ export type ThermostatsDailyProgramsCreateParameters = { }> } -/** - * @deprecated Use ThermostatsDailyProgramsCreateParameters instead. - */ -export type ThermostatsDailyProgramsCreateBody = - ThermostatsDailyProgramsCreateParameters - /** * @deprecated Use ThermostatsDailyProgramsCreateRequest instead. */ @@ -240,12 +234,6 @@ export type ThermostatsDailyProgramsDeleteParameters = { thermostat_daily_program_id: string } -/** - * @deprecated Use ThermostatsDailyProgramsDeleteParameters instead. - */ -export type ThermostatsDailyProgramsDeleteParams = - ThermostatsDailyProgramsDeleteParameters - /** * @deprecated Use ThermostatsDailyProgramsDeleteRequest instead. */ @@ -269,12 +257,6 @@ export type ThermostatsDailyProgramsUpdateParameters = { thermostat_daily_program_id: string } -/** - * @deprecated Use ThermostatsDailyProgramsUpdateParameters instead. - */ -export type ThermostatsDailyProgramsUpdateBody = - ThermostatsDailyProgramsUpdateParameters - /** * @deprecated Use ThermostatsDailyProgramsUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts index b331a29d..113a00b3 100644 --- a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts +++ b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts @@ -240,12 +240,6 @@ export type ThermostatsSchedulesCreateParameters = { starts_at: string } -/** - * @deprecated Use ThermostatsSchedulesCreateParameters instead. - */ -export type ThermostatsSchedulesCreateBody = - ThermostatsSchedulesCreateParameters - /** * @deprecated Use ThermostatsSchedulesCreateRequest instead. */ @@ -264,12 +258,6 @@ export type ThermostatsSchedulesDeleteParameters = { thermostat_schedule_id: string } -/** - * @deprecated Use ThermostatsSchedulesDeleteParameters instead. - */ -export type ThermostatsSchedulesDeleteParams = - ThermostatsSchedulesDeleteParameters - /** * @deprecated Use ThermostatsSchedulesDeleteRequest instead. */ @@ -283,11 +271,6 @@ export type ThermostatsSchedulesGetParameters = { thermostat_schedule_id: string } -/** - * @deprecated Use ThermostatsSchedulesGetParameters instead. - */ -export type ThermostatsSchedulesGetParams = ThermostatsSchedulesGetParameters - /** * @deprecated Use ThermostatsSchedulesGetRequest instead. */ @@ -308,11 +291,6 @@ export type ThermostatsSchedulesListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use ThermostatsSchedulesListParameters instead. - */ -export type ThermostatsSchedulesListParams = ThermostatsSchedulesListParameters - /** * @deprecated Use ThermostatsSchedulesListRequest instead. */ @@ -337,12 +315,6 @@ export type ThermostatsSchedulesUpdateParameters = { thermostat_schedule_id: string } -/** - * @deprecated Use ThermostatsSchedulesUpdateParameters instead. - */ -export type ThermostatsSchedulesUpdateBody = - ThermostatsSchedulesUpdateParameters - /** * @deprecated Use ThermostatsSchedulesUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts b/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts index 08c6c5a6..48f6e491 100644 --- a/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts @@ -198,12 +198,6 @@ export type ThermostatsSimulateHvacModeAdjustedParameters = { heating_set_point_fahrenheit?: number | undefined } -/** - * @deprecated Use ThermostatsSimulateHvacModeAdjustedParameters instead. - */ -export type ThermostatsSimulateHvacModeAdjustedBody = - ThermostatsSimulateHvacModeAdjustedParameters - /** * @deprecated Use ThermostatsSimulateHvacModeAdjustedRequest instead. */ @@ -223,12 +217,6 @@ export type ThermostatsSimulateTemperatureReachedParameters = { temperature_fahrenheit?: number | undefined } -/** - * @deprecated Use ThermostatsSimulateTemperatureReachedParameters instead. - */ -export type ThermostatsSimulateTemperatureReachedBody = - ThermostatsSimulateTemperatureReachedParameters - /** * @deprecated Use ThermostatsSimulateTemperatureReachedRequest instead. */ diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index 7f5109b3..cab4ac7f 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -370,12 +370,6 @@ export type ThermostatsActivateClimatePresetParameters = { device_id: string } -/** - * @deprecated Use ThermostatsActivateClimatePresetParameters instead. - */ -export type ThermostatsActivateClimatePresetBody = - ThermostatsActivateClimatePresetParameters - /** * @deprecated Use ThermostatsActivateClimatePresetRequest instead. */ @@ -399,11 +393,6 @@ export type ThermostatsCoolParameters = { device_id: string } -/** - * @deprecated Use ThermostatsCoolParameters instead. - */ -export type ThermostatsCoolBody = ThermostatsCoolParameters - /** * @deprecated Use ThermostatsCoolRequest instead. */ @@ -443,12 +432,6 @@ export type ThermostatsCreateClimatePresetParameters = { name?: string | undefined } -/** - * @deprecated Use ThermostatsCreateClimatePresetParameters instead. - */ -export type ThermostatsCreateClimatePresetBody = - ThermostatsCreateClimatePresetParameters - /** * @deprecated Use ThermostatsCreateClimatePresetRequest instead. */ @@ -467,12 +450,6 @@ export type ThermostatsDeleteClimatePresetParameters = { device_id: string } -/** - * @deprecated Use ThermostatsDeleteClimatePresetParameters instead. - */ -export type ThermostatsDeleteClimatePresetParams = - ThermostatsDeleteClimatePresetParameters - /** * @deprecated Use ThermostatsDeleteClimatePresetRequest instead. */ @@ -492,11 +469,6 @@ export type ThermostatsHeatParameters = { heating_set_point_fahrenheit?: number | undefined } -/** - * @deprecated Use ThermostatsHeatParameters instead. - */ -export type ThermostatsHeatBody = ThermostatsHeatParameters - /** * @deprecated Use ThermostatsHeatRequest instead. */ @@ -521,11 +493,6 @@ export type ThermostatsHeatCoolParameters = { heating_set_point_fahrenheit?: number | undefined } -/** - * @deprecated Use ThermostatsHeatCoolParameters instead. - */ -export type ThermostatsHeatCoolBody = ThermostatsHeatCoolParameters - /** * @deprecated Use ThermostatsHeatCoolRequest instead. */ @@ -585,11 +552,6 @@ export type ThermostatsListParameters = { user_identifier_key?: string | undefined } -/** - * @deprecated Use ThermostatsListParameters instead. - */ -export type ThermostatsListParams = ThermostatsListParameters - /** * @deprecated Use ThermostatsListRequest instead. */ @@ -606,11 +568,6 @@ export type ThermostatsOffParameters = { device_id: string } -/** - * @deprecated Use ThermostatsOffParameters instead. - */ -export type ThermostatsOffBody = ThermostatsOffParameters - /** * @deprecated Use ThermostatsOffRequest instead. */ @@ -632,12 +589,6 @@ export type ThermostatsSetFallbackClimatePresetParameters = { device_id: string } -/** - * @deprecated Use ThermostatsSetFallbackClimatePresetParameters instead. - */ -export type ThermostatsSetFallbackClimatePresetBody = - ThermostatsSetFallbackClimatePresetParameters - /** * @deprecated Use ThermostatsSetFallbackClimatePresetRequest instead. */ @@ -657,11 +608,6 @@ export type ThermostatsSetFanModeParameters = { fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined } -/** - * @deprecated Use ThermostatsSetFanModeParameters instead. - */ -export type ThermostatsSetFanModeBody = ThermostatsSetFanModeParameters - /** * @deprecated Use ThermostatsSetFanModeRequest instead. */ @@ -690,11 +636,6 @@ export type ThermostatsSetHvacModeParameters = { heating_set_point_fahrenheit?: number | undefined } -/** - * @deprecated Use ThermostatsSetHvacModeParameters instead. - */ -export type ThermostatsSetHvacModeBody = ThermostatsSetHvacModeParameters - /** * @deprecated Use ThermostatsSetHvacModeRequest instead. */ @@ -721,12 +662,6 @@ export type ThermostatsSetTemperatureThresholdParameters = { upper_limit_fahrenheit?: number | undefined } -/** - * @deprecated Use ThermostatsSetTemperatureThresholdParameters instead. - */ -export type ThermostatsSetTemperatureThresholdBody = - ThermostatsSetTemperatureThresholdParameters - /** * @deprecated Use ThermostatsSetTemperatureThresholdRequest instead. */ @@ -763,12 +698,6 @@ export type ThermostatsUpdateClimatePresetParameters = { name?: string | undefined } -/** - * @deprecated Use ThermostatsUpdateClimatePresetParameters instead. - */ -export type ThermostatsUpdateClimatePresetBody = - ThermostatsUpdateClimatePresetParameters - /** * @deprecated Use ThermostatsUpdateClimatePresetRequest instead. */ @@ -793,12 +722,6 @@ export type ThermostatsUpdateWeeklyProgramParameters = { wednesday_program_id?: string | undefined } -/** - * @deprecated Use ThermostatsUpdateWeeklyProgramParameters instead. - */ -export type ThermostatsUpdateWeeklyProgramBody = - ThermostatsUpdateWeeklyProgramParameters - /** * @deprecated Use ThermostatsUpdateWeeklyProgramRequest instead. */ diff --git a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts index 307cb064..7614ec5c 100644 --- a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts @@ -208,12 +208,6 @@ export type UserIdentitiesUnmanagedGetParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesUnmanagedGetParameters instead. - */ -export type UserIdentitiesUnmanagedGetParams = - UserIdentitiesUnmanagedGetParameters - /** * @deprecated Use UserIdentitiesUnmanagedGetRequest instead. */ @@ -235,12 +229,6 @@ export type UserIdentitiesUnmanagedListParameters = { search?: string | undefined } -/** - * @deprecated Use UserIdentitiesUnmanagedListParameters instead. - */ -export type UserIdentitiesUnmanagedListParams = - UserIdentitiesUnmanagedListParameters - /** * @deprecated Use UserIdentitiesUnmanagedListRequest instead. */ @@ -263,12 +251,6 @@ export type UserIdentitiesUnmanagedUpdateParameters = { user_identity_key?: string | undefined } -/** - * @deprecated Use UserIdentitiesUnmanagedUpdateParameters instead. - */ -export type UserIdentitiesUnmanagedUpdateBody = - UserIdentitiesUnmanagedUpdateParameters - /** * @deprecated Use UserIdentitiesUnmanagedUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/user-identities/user-identities.ts b/src/lib/seam/connect/routes/user-identities/user-identities.ts index 4c67d0c8..743baafc 100644 --- a/src/lib/seam/connect/routes/user-identities/user-identities.ts +++ b/src/lib/seam/connect/routes/user-identities/user-identities.ts @@ -365,11 +365,6 @@ export type UserIdentitiesAddAcsUserParameters = { user_identity_key?: string | undefined } -/** - * @deprecated Use UserIdentitiesAddAcsUserParameters instead. - */ -export type UserIdentitiesAddAcsUserBody = UserIdentitiesAddAcsUserParameters - /** * @deprecated Use UserIdentitiesAddAcsUserRequest instead. */ @@ -387,11 +382,6 @@ export type UserIdentitiesCreateParameters = { user_identity_key?: string | undefined } -/** - * @deprecated Use UserIdentitiesCreateParameters instead. - */ -export type UserIdentitiesCreateBody = UserIdentitiesCreateParameters - /** * @deprecated Use UserIdentitiesCreateRequest instead. */ @@ -410,11 +400,6 @@ export type UserIdentitiesDeleteParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesDeleteParameters instead. - */ -export type UserIdentitiesDeleteParams = UserIdentitiesDeleteParameters - /** * @deprecated Use UserIdentitiesDeleteRequest instead. */ @@ -430,12 +415,6 @@ export type UserIdentitiesGenerateInstantKeyParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesGenerateInstantKeyParameters instead. - */ -export type UserIdentitiesGenerateInstantKeyBody = - UserIdentitiesGenerateInstantKeyParameters - /** * @deprecated Use UserIdentitiesGenerateInstantKeyRequest instead. */ @@ -455,11 +434,6 @@ export type UserIdentitiesGetParameters = { user_identity_key?: string | undefined } -/** - * @deprecated Use UserIdentitiesGetParameters instead. - */ -export type UserIdentitiesGetParams = UserIdentitiesGetParameters - /** * @deprecated Use UserIdentitiesGetRequest instead. */ @@ -478,12 +452,6 @@ export type UserIdentitiesGrantAccessToDeviceParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesGrantAccessToDeviceParameters instead. - */ -export type UserIdentitiesGrantAccessToDeviceBody = - UserIdentitiesGrantAccessToDeviceParameters - /** * @deprecated Use UserIdentitiesGrantAccessToDeviceRequest instead. */ @@ -505,11 +473,6 @@ export type UserIdentitiesListParameters = { user_identity_ids?: Array | undefined } -/** - * @deprecated Use UserIdentitiesListParameters instead. - */ -export type UserIdentitiesListParams = UserIdentitiesListParameters - /** * @deprecated Use UserIdentitiesListRequest instead. */ @@ -528,12 +491,6 @@ export type UserIdentitiesListAccessibleDevicesParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesListAccessibleDevicesParameters instead. - */ -export type UserIdentitiesListAccessibleDevicesParams = - UserIdentitiesListAccessibleDevicesParameters - /** * @deprecated Use UserIdentitiesListAccessibleDevicesRequest instead. */ @@ -552,12 +509,6 @@ export type UserIdentitiesListAccessibleEntrancesParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesListAccessibleEntrancesParameters instead. - */ -export type UserIdentitiesListAccessibleEntrancesParams = - UserIdentitiesListAccessibleEntrancesParameters - /** * @deprecated Use UserIdentitiesListAccessibleEntrancesRequest instead. */ @@ -576,12 +527,6 @@ export type UserIdentitiesListAcsSystemsParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesListAcsSystemsParameters instead. - */ -export type UserIdentitiesListAcsSystemsParams = - UserIdentitiesListAcsSystemsParameters - /** * @deprecated Use UserIdentitiesListAcsSystemsRequest instead. */ @@ -600,12 +545,6 @@ export type UserIdentitiesListAcsUsersParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesListAcsUsersParameters instead. - */ -export type UserIdentitiesListAcsUsersParams = - UserIdentitiesListAcsUsersParameters - /** * @deprecated Use UserIdentitiesListAcsUsersRequest instead. */ @@ -626,12 +565,6 @@ export type UserIdentitiesRemoveAcsUserParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesRemoveAcsUserParameters instead. - */ -export type UserIdentitiesRemoveAcsUserParams = - UserIdentitiesRemoveAcsUserParameters - /** * @deprecated Use UserIdentitiesRemoveAcsUserRequest instead. */ @@ -650,12 +583,6 @@ export type UserIdentitiesRevokeAccessToDeviceParameters = { user_identity_id: string } -/** - * @deprecated Use UserIdentitiesRevokeAccessToDeviceParameters instead. - */ -export type UserIdentitiesRevokeAccessToDeviceParams = - UserIdentitiesRevokeAccessToDeviceParameters - /** * @deprecated Use UserIdentitiesRevokeAccessToDeviceRequest instead. */ @@ -677,11 +604,6 @@ export type UserIdentitiesUpdateParameters = { user_identity_key?: string | undefined } -/** - * @deprecated Use UserIdentitiesUpdateParameters instead. - */ -export type UserIdentitiesUpdateBody = UserIdentitiesUpdateParameters - /** * @deprecated Use UserIdentitiesUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/webhooks/webhooks.ts b/src/lib/seam/connect/routes/webhooks/webhooks.ts index 1bb33cf0..43e99633 100644 --- a/src/lib/seam/connect/routes/webhooks/webhooks.ts +++ b/src/lib/seam/connect/routes/webhooks/webhooks.ts @@ -232,11 +232,6 @@ export type WebhooksCreateParameters = { url: string } -/** - * @deprecated Use WebhooksCreateParameters instead. - */ -export type WebhooksCreateBody = WebhooksCreateParameters - /** * @deprecated Use WebhooksCreateRequest instead. */ @@ -253,11 +248,6 @@ export type WebhooksDeleteParameters = { webhook_id: string } -/** - * @deprecated Use WebhooksDeleteParameters instead. - */ -export type WebhooksDeleteParams = WebhooksDeleteParameters - /** * @deprecated Use WebhooksDeleteRequest instead. */ @@ -271,11 +261,6 @@ export type WebhooksGetParameters = { webhook_id: string } -/** - * @deprecated Use WebhooksGetParameters instead. - */ -export type WebhooksGetParams = WebhooksGetParameters - /** * @deprecated Use WebhooksGetRequest instead. */ @@ -287,11 +272,6 @@ export interface WebhooksGetOptions {} export type WebhooksListParameters = {} -/** - * @deprecated Use WebhooksListParameters instead. - */ -export type WebhooksListParams = WebhooksListParameters - /** * @deprecated Use WebhooksListRequest instead. */ @@ -310,11 +290,6 @@ export type WebhooksUpdateParameters = { webhook_id: string } -/** - * @deprecated Use WebhooksUpdateParameters instead. - */ -export type WebhooksUpdateBody = WebhooksUpdateParameters - /** * @deprecated Use WebhooksUpdateRequest instead. */ diff --git a/src/lib/seam/connect/routes/workspaces/workspaces.ts b/src/lib/seam/connect/routes/workspaces/workspaces.ts index 99937486..184c6bd0 100644 --- a/src/lib/seam/connect/routes/workspaces/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces/workspaces.ts @@ -249,11 +249,6 @@ export type WorkspacesCreateParameters = { webview_success_message?: string | undefined } -/** - * @deprecated Use WorkspacesCreateParameters instead. - */ -export type WorkspacesCreateBody = WorkspacesCreateParameters - /** * @deprecated Use WorkspacesCreateRequest instead. */ @@ -268,11 +263,6 @@ export interface WorkspacesCreateOptions {} export type WorkspacesGetParameters = {} -/** - * @deprecated Use WorkspacesGetParameters instead. - */ -export type WorkspacesGetParams = WorkspacesGetParameters - /** * @deprecated Use WorkspacesGetRequest instead. */ @@ -287,11 +277,6 @@ export interface WorkspacesGetOptions {} export type WorkspacesListParameters = {} -/** - * @deprecated Use WorkspacesListParameters instead. - */ -export type WorkspacesListParams = WorkspacesListParameters - /** * @deprecated Use WorkspacesListRequest instead. */ @@ -306,11 +291,6 @@ export interface WorkspacesListOptions {} export type WorkspacesResetSandboxParameters = {} -/** - * @deprecated Use WorkspacesResetSandboxParameters instead. - */ -export type WorkspacesResetSandboxBody = WorkspacesResetSandboxParameters - /** * @deprecated Use WorkspacesResetSandboxRequest instead. */ @@ -344,11 +324,6 @@ export type WorkspacesUpdateParameters = { organization_id?: string | undefined } -/** - * @deprecated Use WorkspacesUpdateParameters instead. - */ -export type WorkspacesUpdateBody = WorkspacesUpdateParameters - /** * @deprecated Use WorkspacesUpdateRequest instead. */ From 301452cf06be9f3d22cf9870ae04404c98ab6588 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:13:21 -0500 Subject: [PATCH 07/17] Use ActionAttemptResource over one from @seamapi/types --- .../seam/connect/resolve-action-attempt.ts | 41 ++++++++++--------- src/lib/seam/connect/seam-http-request.ts | 4 +- 2 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/lib/seam/connect/resolve-action-attempt.ts b/src/lib/seam/connect/resolve-action-attempt.ts index 1801f6b5..48fc7bc0 100644 --- a/src/lib/seam/connect/resolve-action-attempt.ts +++ b/src/lib/seam/connect/resolve-action-attempt.ts @@ -1,5 +1,4 @@ -import type { ActionAttempt } from '@seamapi/types/connect' - +import type { ActionAttemptResource } from './resources/action-attempt.js' import type { SeamHttpActionAttempts } from './routes/index.js' export interface ResolveActionAttemptOptions { @@ -7,7 +6,7 @@ export interface ResolveActionAttemptOptions { pollingInterval?: number } -export const resolveActionAttempt = async ( +export const resolveActionAttempt = async ( actionAttempt: T, actionAttempts: SeamHttpActionAttempts, { timeout = 10_000, pollingInterval = 1_000 }: ResolveActionAttemptOptions, @@ -31,7 +30,7 @@ export const resolveActionAttempt = async ( } } -const pollActionAttempt = async ( +const pollActionAttempt = async ( actionAttempt: T, actionAttempts: SeamHttpActionAttempts, options: Pick, @@ -57,13 +56,15 @@ const pollActionAttempt = async ( ) } -export const isSeamActionAttemptError = ( +export const isSeamActionAttemptError = ( error: unknown, ): error is SeamActionAttemptError => { return error instanceof SeamActionAttemptError } -export class SeamActionAttemptError extends Error { +export class SeamActionAttemptError< + T extends ActionAttemptResource, +> extends Error { actionAttempt: T constructor(message: string, actionAttempt: T) { @@ -73,14 +74,14 @@ export class SeamActionAttemptError extends Error { } } -export const isSeamActionAttemptFailedError = ( +export const isSeamActionAttemptFailedError = ( error: unknown, ): error is SeamActionAttemptFailedError => { return error instanceof SeamActionAttemptFailedError } export class SeamActionAttemptFailedError< - T extends ActionAttempt, + T extends ActionAttemptResource, > extends SeamActionAttemptError { code: string @@ -91,14 +92,16 @@ export class SeamActionAttemptFailedError< } } -export const isSeamActionAttemptTimeoutError = ( +export const isSeamActionAttemptTimeoutError = < + T extends ActionAttemptResource, +>( error: unknown, ): error is SeamActionAttemptTimeoutError => { return error instanceof SeamActionAttemptTimeoutError } export class SeamActionAttemptTimeoutError< - T extends ActionAttempt, + T extends ActionAttemptResource, > extends SeamActionAttemptError { constructor(actionAttempt: T, timeout: number) { super( @@ -109,21 +112,19 @@ export class SeamActionAttemptTimeoutError< } } -const isSuccessfulActionAttempt = ( +const isSuccessfulActionAttempt = ( actionAttempt: T, ): actionAttempt is SucceededActionAttempt => actionAttempt.status === 'success' -const isFailedActionAttempt = ( +const isFailedActionAttempt = ( actionAttempt: T, ): actionAttempt is FailedActionAttempt => actionAttempt.status === 'error' -export type SucceededActionAttempt = Extract< - T, - { status: 'success' } -> +export type SucceededActionAttempt = T & { + status: 'success' +} -export type FailedActionAttempt = Extract< - T, - { status: 'error' } -> +export type FailedActionAttempt = T & { + status: 'error' +} diff --git a/src/lib/seam/connect/seam-http-request.ts b/src/lib/seam/connect/seam-http-request.ts index 5c959762..608ec66d 100644 --- a/src/lib/seam/connect/seam-http-request.ts +++ b/src/lib/seam/connect/seam-http-request.ts @@ -1,10 +1,10 @@ -import type { ActionAttempt } from '@seamapi/types/connect' import { serializeUrlSearchParams } from '@seamapi/url-search-params-serializer' import type { Method } from 'axios' import type { Client } from './client.js' import type { SeamHttpRequestOptions } from './options.js' import { resolveActionAttempt } from './resolve-action-attempt.js' +import type { ActionAttemptResource } from './resources/action-attempt.js' import { SeamHttpActionAttempts } from './routes/index.js' interface SeamHttpRequestParent { @@ -102,7 +102,7 @@ export class SeamHttpRequest< if (waitForActionAttempt !== false) { const actionAttempt = await resolveActionAttempt( - data as unknown as ActionAttempt, + data as unknown as ActionAttemptResource, SeamHttpActionAttempts.fromClient(this.#parent.client, { ...this.#parent.defaults, waitForActionAttempt: false, From 0a0653f4fbea74660a907b819c9950766f888b46 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:24:04 -0500 Subject: [PATCH 08/17] Remove Resources prefix from Resources types --- codegen/lib/layouts/resources.ts | 4 +-- .../seam/connect/resolve-action-attempt.ts | 30 ++++++++----------- src/lib/seam/connect/seam-http-request.ts | 4 +-- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/codegen/lib/layouts/resources.ts b/codegen/lib/layouts/resources.ts index 98c9f76a..4a536a6e 100644 --- a/codegen/lib/layouts/resources.ts +++ b/codegen/lib/layouts/resources.ts @@ -13,7 +13,7 @@ export interface ResourceIndexLayoutContext { } export const getResourceTypeName = (resourceType: string): string => - `${pascalCase(resourceType)}Resource` + resourceType === 'event' ? 'SeamEvent' : pascalCase(resourceType) export const getResourceLayoutContexts = ( blueprint: Blueprint, @@ -30,7 +30,7 @@ export const getResourceLayoutContexts = ( return [ { fileName: 'unknown.ts', - typeName: 'UnknownResource', + typeName: getResourceTypeName('unknown'), resources: [], isUnknown: true, }, diff --git a/src/lib/seam/connect/resolve-action-attempt.ts b/src/lib/seam/connect/resolve-action-attempt.ts index 48fc7bc0..49d1ae9e 100644 --- a/src/lib/seam/connect/resolve-action-attempt.ts +++ b/src/lib/seam/connect/resolve-action-attempt.ts @@ -1,4 +1,4 @@ -import type { ActionAttemptResource } from './resources/action-attempt.js' +import type { ActionAttempt } from './resources/action-attempt.js' import type { SeamHttpActionAttempts } from './routes/index.js' export interface ResolveActionAttemptOptions { @@ -6,7 +6,7 @@ export interface ResolveActionAttemptOptions { pollingInterval?: number } -export const resolveActionAttempt = async ( +export const resolveActionAttempt = async ( actionAttempt: T, actionAttempts: SeamHttpActionAttempts, { timeout = 10_000, pollingInterval = 1_000 }: ResolveActionAttemptOptions, @@ -30,7 +30,7 @@ export const resolveActionAttempt = async ( } } -const pollActionAttempt = async ( +const pollActionAttempt = async ( actionAttempt: T, actionAttempts: SeamHttpActionAttempts, options: Pick, @@ -56,15 +56,13 @@ const pollActionAttempt = async ( ) } -export const isSeamActionAttemptError = ( +export const isSeamActionAttemptError = ( error: unknown, ): error is SeamActionAttemptError => { return error instanceof SeamActionAttemptError } -export class SeamActionAttemptError< - T extends ActionAttemptResource, -> extends Error { +export class SeamActionAttemptError extends Error { actionAttempt: T constructor(message: string, actionAttempt: T) { @@ -74,14 +72,14 @@ export class SeamActionAttemptError< } } -export const isSeamActionAttemptFailedError = ( +export const isSeamActionAttemptFailedError = ( error: unknown, ): error is SeamActionAttemptFailedError => { return error instanceof SeamActionAttemptFailedError } export class SeamActionAttemptFailedError< - T extends ActionAttemptResource, + T extends ActionAttempt, > extends SeamActionAttemptError { code: string @@ -92,16 +90,14 @@ export class SeamActionAttemptFailedError< } } -export const isSeamActionAttemptTimeoutError = < - T extends ActionAttemptResource, ->( +export const isSeamActionAttemptTimeoutError = ( error: unknown, ): error is SeamActionAttemptTimeoutError => { return error instanceof SeamActionAttemptTimeoutError } export class SeamActionAttemptTimeoutError< - T extends ActionAttemptResource, + T extends ActionAttempt, > extends SeamActionAttemptError { constructor(actionAttempt: T, timeout: number) { super( @@ -112,19 +108,19 @@ export class SeamActionAttemptTimeoutError< } } -const isSuccessfulActionAttempt = ( +const isSuccessfulActionAttempt = ( actionAttempt: T, ): actionAttempt is SucceededActionAttempt => actionAttempt.status === 'success' -const isFailedActionAttempt = ( +const isFailedActionAttempt = ( actionAttempt: T, ): actionAttempt is FailedActionAttempt => actionAttempt.status === 'error' -export type SucceededActionAttempt = T & { +export type SucceededActionAttempt = T & { status: 'success' } -export type FailedActionAttempt = T & { +export type FailedActionAttempt = T & { status: 'error' } diff --git a/src/lib/seam/connect/seam-http-request.ts b/src/lib/seam/connect/seam-http-request.ts index 608ec66d..f83190af 100644 --- a/src/lib/seam/connect/seam-http-request.ts +++ b/src/lib/seam/connect/seam-http-request.ts @@ -4,7 +4,7 @@ import type { Method } from 'axios' import type { Client } from './client.js' import type { SeamHttpRequestOptions } from './options.js' import { resolveActionAttempt } from './resolve-action-attempt.js' -import type { ActionAttemptResource } from './resources/action-attempt.js' +import type { ActionAttempt } from './resources/action-attempt.js' import { SeamHttpActionAttempts } from './routes/index.js' interface SeamHttpRequestParent { @@ -102,7 +102,7 @@ export class SeamHttpRequest< if (waitForActionAttempt !== false) { const actionAttempt = await resolveActionAttempt( - data as unknown as ActionAttemptResource, + data as unknown as ActionAttempt, SeamHttpActionAttempts.fromClient(this.#parent.client, { ...this.#parent.defaults, waitForActionAttempt: false, From 3062e41836819b6a86ea35899217ba3eb80e5584 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:24:21 -0500 Subject: [PATCH 09/17] Fix test using legacy type --- test/seam/connect/client.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/seam/connect/client.test.ts b/test/seam/connect/client.test.ts index c94d54df..8c19818c 100644 --- a/test/seam/connect/client.test.ts +++ b/test/seam/connect/client.test.ts @@ -3,7 +3,7 @@ import { getTestServer } from 'fixtures/seam/connect/api.js' import { type DevicesGetResponse, - type DevicesListParams, + type DevicesListParameters, type DevicesListResponse, SeamHttp, SeamHttpWithoutWorkspace, @@ -55,7 +55,7 @@ test('SeamHttp: client serializes array params', async (t) => { const seam = new SeamHttp({ client: SeamHttp.fromApiKey(seed.seam_apikey1_token, { endpoint }).client, }) - const params: DevicesListParams = { + const params: DevicesListParameters = { device_ids: [seed.august_device_1], } const { From d0f247343ff1ddbeb3fddf1890cbfb848c154a90 Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 27 Jul 2026 23:25:24 +0000 Subject: [PATCH 10/17] ci: Generate code --- src/lib/seam/connect/resources/access-code.ts | 2 +- .../seam/connect/resources/access-grant.ts | 2 +- .../seam/connect/resources/access-method.ts | 2 +- .../connect/resources/acs-access-group.ts | 2 +- .../seam/connect/resources/acs-credential.ts | 2 +- src/lib/seam/connect/resources/acs-encoder.ts | 2 +- .../seam/connect/resources/acs-entrance.ts | 2 +- src/lib/seam/connect/resources/acs-system.ts | 2 +- src/lib/seam/connect/resources/acs-user.ts | 2 +- .../seam/connect/resources/action-attempt.ts | 2 +- src/lib/seam/connect/resources/batch.ts | 2 +- .../seam/connect/resources/client-session.ts | 2 +- .../seam/connect/resources/connect-webview.ts | 2 +- .../connect/resources/connected-account.ts | 2 +- .../seam/connect/resources/customer-portal.ts | 2 +- .../seam/connect/resources/device-provider.ts | 2 +- src/lib/seam/connect/resources/device.ts | 2 +- src/lib/seam/connect/resources/event.ts | 2 +- src/lib/seam/connect/resources/index.ts | 60 +++++++++---------- src/lib/seam/connect/resources/instant-key.ts | 2 +- .../seam/connect/resources/noise-threshold.ts | 2 +- src/lib/seam/connect/resources/phone.ts | 2 +- src/lib/seam/connect/resources/space.ts | 2 +- .../resources/thermostat-daily-program.ts | 2 +- .../connect/resources/thermostat-schedule.ts | 2 +- src/lib/seam/connect/resources/unknown.ts | 2 +- .../resources/unmanaged-access-code.ts | 2 +- .../connect/resources/unmanaged-device.ts | 2 +- .../seam/connect/resources/user-identity.ts | 2 +- src/lib/seam/connect/resources/webhook.ts | 2 +- src/lib/seam/connect/resources/workspace.ts | 2 +- .../routes/access-codes/access-codes.ts | 18 +++--- .../routes/access-codes/simulate/simulate.ts | 4 +- .../access-codes/unmanaged/unmanaged.ts | 6 +- .../routes/access-grants/access-grants.ts | 16 +++-- .../access-grants/unmanaged/unmanaged.ts | 6 +- .../routes/access-methods/access-methods.ts | 26 +++----- .../access-methods/unmanaged/unmanaged.ts | 8 +-- .../routes/acs/access-groups/access-groups.ts | 18 +++--- .../routes/acs/credentials/credentials.ts | 16 ++--- .../connect/routes/acs/encoders/encoders.ts | 16 +++-- .../connect/routes/acs/entrances/entrances.ts | 18 +++--- .../connect/routes/acs/systems/systems.ts | 8 +-- .../seam/connect/routes/acs/users/users.ts | 12 ++-- .../routes/action-attempts/action-attempts.ts | 8 +-- .../routes/client-sessions/client-sessions.ts | 14 ++--- .../connect-webviews/connect-webviews.ts | 12 ++-- .../connected-accounts/connected-accounts.ts | 6 +- .../connect/routes/customers/customers.ts | 6 +- .../seam/connect/routes/devices/devices.ts | 10 ++-- .../routes/devices/unmanaged/unmanaged.ts | 8 +-- src/lib/seam/connect/routes/events/events.ts | 6 +- .../routes/instant-keys/instant-keys.ts | 8 +-- src/lib/seam/connect/routes/locks/locks.ts | 16 +++-- .../connect/routes/locks/simulate/simulate.ts | 6 +- .../routes/noise-sensors/noise-sensors.ts | 4 +- .../noise-thresholds/noise-thresholds.ts | 8 +-- src/lib/seam/connect/routes/phones/phones.ts | 6 +- .../routes/phones/simulate/simulate.ts | 4 +- src/lib/seam/connect/routes/spaces/spaces.ts | 14 ++--- .../daily-programs/daily-programs.ts | 8 +-- .../routes/thermostats/schedules/schedules.ts | 8 +-- .../connect/routes/thermostats/thermostats.ts | 28 ++++----- .../user-identities/unmanaged/unmanaged.ts | 8 +-- .../routes/user-identities/user-identities.ts | 32 +++++----- .../seam/connect/routes/webhooks/webhooks.ts | 8 +-- .../connect/routes/workspaces/workspaces.ts | 14 ++--- 67 files changed, 236 insertions(+), 298 deletions(-) diff --git a/src/lib/seam/connect/resources/access-code.ts b/src/lib/seam/connect/resources/access-code.ts index 8d65b47f..c9ce853c 100644 --- a/src/lib/seam/connect/resources/access-code.ts +++ b/src/lib/seam/connect/resources/access-code.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AccessCodeResource = { +export type AccessCode = { access_code_id: string code: string | null diff --git a/src/lib/seam/connect/resources/access-grant.ts b/src/lib/seam/connect/resources/access-grant.ts index 834210b7..04e4fd24 100644 --- a/src/lib/seam/connect/resources/access-grant.ts +++ b/src/lib/seam/connect/resources/access-grant.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AccessGrantResource = { +export type AccessGrant = { access_grant_id: string access_grant_key?: string | undefined diff --git a/src/lib/seam/connect/resources/access-method.ts b/src/lib/seam/connect/resources/access-method.ts index 58252281..b897a8dc 100644 --- a/src/lib/seam/connect/resources/access-method.ts +++ b/src/lib/seam/connect/resources/access-method.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AccessMethodResource = { +export type AccessMethod = { access_method_id: string client_session_token?: string | undefined diff --git a/src/lib/seam/connect/resources/acs-access-group.ts b/src/lib/seam/connect/resources/acs-access-group.ts index e8f9f0f1..c3ea9236 100644 --- a/src/lib/seam/connect/resources/acs-access-group.ts +++ b/src/lib/seam/connect/resources/acs-access-group.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AcsAccessGroupResource = { +export type AcsAccessGroup = { access_group_type: | 'pti_unit' | 'pti_access_level' diff --git a/src/lib/seam/connect/resources/acs-credential.ts b/src/lib/seam/connect/resources/acs-credential.ts index e5411cab..98ce99fc 100644 --- a/src/lib/seam/connect/resources/acs-credential.ts +++ b/src/lib/seam/connect/resources/acs-credential.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AcsCredentialResource = { +export type AcsCredential = { access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' acs_credential_id: string diff --git a/src/lib/seam/connect/resources/acs-encoder.ts b/src/lib/seam/connect/resources/acs-encoder.ts index 5335bd8d..a64a8b44 100644 --- a/src/lib/seam/connect/resources/acs-encoder.ts +++ b/src/lib/seam/connect/resources/acs-encoder.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AcsEncoderResource = { +export type AcsEncoder = { acs_encoder_id: string acs_system_id: string diff --git a/src/lib/seam/connect/resources/acs-entrance.ts b/src/lib/seam/connect/resources/acs-entrance.ts index 8fb02d51..aaf554a7 100644 --- a/src/lib/seam/connect/resources/acs-entrance.ts +++ b/src/lib/seam/connect/resources/acs-entrance.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AcsEntranceResource = { +export type AcsEntrance = { acs_entrance_id: string acs_system_id: string diff --git a/src/lib/seam/connect/resources/acs-system.ts b/src/lib/seam/connect/resources/acs-system.ts index 9696390b..62adbf58 100644 --- a/src/lib/seam/connect/resources/acs-system.ts +++ b/src/lib/seam/connect/resources/acs-system.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AcsSystemResource = { +export type AcsSystem = { acs_access_group_count?: number | undefined acs_system_id: string diff --git a/src/lib/seam/connect/resources/acs-user.ts b/src/lib/seam/connect/resources/acs-user.ts index 263d5a5c..f2feaef2 100644 --- a/src/lib/seam/connect/resources/acs-user.ts +++ b/src/lib/seam/connect/resources/acs-user.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type AcsUserResource = { +export type AcsUser = { access_schedule?: | { ends_at: string | null diff --git a/src/lib/seam/connect/resources/action-attempt.ts b/src/lib/seam/connect/resources/action-attempt.ts index 2b601b7c..5fd6cc77 100644 --- a/src/lib/seam/connect/resources/action-attempt.ts +++ b/src/lib/seam/connect/resources/action-attempt.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type ActionAttemptResource = +export type ActionAttempt = | { action_attempt_id: string diff --git a/src/lib/seam/connect/resources/batch.ts b/src/lib/seam/connect/resources/batch.ts index 9d6ae5b3..d81807f8 100644 --- a/src/lib/seam/connect/resources/batch.ts +++ b/src/lib/seam/connect/resources/batch.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type BatchResource = { +export type Batch = { access_codes?: Record | undefined access_grants?: Record | undefined access_methods?: Record | undefined diff --git a/src/lib/seam/connect/resources/client-session.ts b/src/lib/seam/connect/resources/client-session.ts index 04f71532..49e65468 100644 --- a/src/lib/seam/connect/resources/client-session.ts +++ b/src/lib/seam/connect/resources/client-session.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type ClientSessionResource = { +export type ClientSession = { client_session_id: string connect_webview_ids: Array diff --git a/src/lib/seam/connect/resources/connect-webview.ts b/src/lib/seam/connect/resources/connect-webview.ts index e953d0a0..d06145c4 100644 --- a/src/lib/seam/connect/resources/connect-webview.ts +++ b/src/lib/seam/connect/resources/connect-webview.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type ConnectWebviewResource = { +export type ConnectWebview = { accepted_capabilities: Array< 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > diff --git a/src/lib/seam/connect/resources/connected-account.ts b/src/lib/seam/connect/resources/connected-account.ts index f92f0326..eb870756 100644 --- a/src/lib/seam/connect/resources/connected-account.ts +++ b/src/lib/seam/connect/resources/connected-account.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type ConnectedAccountResource = { +export type ConnectedAccount = { accepted_capabilities: Array< 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > diff --git a/src/lib/seam/connect/resources/customer-portal.ts b/src/lib/seam/connect/resources/customer-portal.ts index fde57bc2..722c6380 100644 --- a/src/lib/seam/connect/resources/customer-portal.ts +++ b/src/lib/seam/connect/resources/customer-portal.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type CustomerPortalResource = { +export type CustomerPortal = { created_at: string customer_key: string diff --git a/src/lib/seam/connect/resources/device-provider.ts b/src/lib/seam/connect/resources/device-provider.ts index 67056ff9..1f17fe43 100644 --- a/src/lib/seam/connect/resources/device-provider.ts +++ b/src/lib/seam/connect/resources/device-provider.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type DeviceProviderResource = { +export type DeviceProvider = { can_configure_auto_lock?: boolean | undefined can_hvac_cool?: boolean | undefined can_hvac_heat?: boolean | undefined diff --git a/src/lib/seam/connect/resources/device.ts b/src/lib/seam/connect/resources/device.ts index 187ef3ee..47c6cb80 100644 --- a/src/lib/seam/connect/resources/device.ts +++ b/src/lib/seam/connect/resources/device.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type DeviceResource = { +export type Device = { can_configure_auto_lock?: boolean | undefined can_hvac_cool?: boolean | undefined can_hvac_heat?: boolean | undefined diff --git a/src/lib/seam/connect/resources/event.ts b/src/lib/seam/connect/resources/event.ts index 65362444..f9678f53 100644 --- a/src/lib/seam/connect/resources/event.ts +++ b/src/lib/seam/connect/resources/event.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type EventResource = +export type SeamEvent = | { created_at?: string | undefined event_description?: string | undefined diff --git a/src/lib/seam/connect/resources/index.ts b/src/lib/seam/connect/resources/index.ts index a9bde99f..391f319e 100644 --- a/src/lib/seam/connect/resources/index.ts +++ b/src/lib/seam/connect/resources/index.ts @@ -3,33 +3,33 @@ * Do not edit this file. */ -export type { AccessCodeResource } from './access-code.js' -export type { AccessGrantResource } from './access-grant.js' -export type { AccessMethodResource } from './access-method.js' -export type { AcsAccessGroupResource } from './acs-access-group.js' -export type { AcsCredentialResource } from './acs-credential.js' -export type { AcsEncoderResource } from './acs-encoder.js' -export type { AcsEntranceResource } from './acs-entrance.js' -export type { AcsSystemResource } from './acs-system.js' -export type { AcsUserResource } from './acs-user.js' -export type { ActionAttemptResource } from './action-attempt.js' -export type { BatchResource } from './batch.js' -export type { ClientSessionResource } from './client-session.js' -export type { ConnectWebviewResource } from './connect-webview.js' -export type { ConnectedAccountResource } from './connected-account.js' -export type { CustomerPortalResource } from './customer-portal.js' -export type { DeviceResource } from './device.js' -export type { DeviceProviderResource } from './device-provider.js' -export type { EventResource } from './event.js' -export type { InstantKeyResource } from './instant-key.js' -export type { NoiseThresholdResource } from './noise-threshold.js' -export type { PhoneResource } from './phone.js' -export type { SpaceResource } from './space.js' -export type { ThermostatDailyProgramResource } from './thermostat-daily-program.js' -export type { ThermostatScheduleResource } from './thermostat-schedule.js' -export type { UnknownResource } from './unknown.js' -export type { UnmanagedAccessCodeResource } from './unmanaged-access-code.js' -export type { UnmanagedDeviceResource } from './unmanaged-device.js' -export type { UserIdentityResource } from './user-identity.js' -export type { WebhookResource } from './webhook.js' -export type { WorkspaceResource } from './workspace.js' +export type { AccessCode } from './access-code.js' +export type { AccessGrant } from './access-grant.js' +export type { AccessMethod } from './access-method.js' +export type { AcsAccessGroup } from './acs-access-group.js' +export type { AcsCredential } from './acs-credential.js' +export type { AcsEncoder } from './acs-encoder.js' +export type { AcsEntrance } from './acs-entrance.js' +export type { AcsSystem } from './acs-system.js' +export type { AcsUser } from './acs-user.js' +export type { ActionAttempt } from './action-attempt.js' +export type { Batch } from './batch.js' +export type { ClientSession } from './client-session.js' +export type { ConnectWebview } from './connect-webview.js' +export type { ConnectedAccount } from './connected-account.js' +export type { CustomerPortal } from './customer-portal.js' +export type { Device } from './device.js' +export type { DeviceProvider } from './device-provider.js' +export type { SeamEvent } from './event.js' +export type { InstantKey } from './instant-key.js' +export type { NoiseThreshold } from './noise-threshold.js' +export type { Phone } from './phone.js' +export type { Space } from './space.js' +export type { ThermostatDailyProgram } from './thermostat-daily-program.js' +export type { ThermostatSchedule } from './thermostat-schedule.js' +export type { Unknown } from './unknown.js' +export type { UnmanagedAccessCode } from './unmanaged-access-code.js' +export type { UnmanagedDevice } from './unmanaged-device.js' +export type { UserIdentity } from './user-identity.js' +export type { Webhook } from './webhook.js' +export type { Workspace } from './workspace.js' diff --git a/src/lib/seam/connect/resources/instant-key.ts b/src/lib/seam/connect/resources/instant-key.ts index 25773d4b..917f15e6 100644 --- a/src/lib/seam/connect/resources/instant-key.ts +++ b/src/lib/seam/connect/resources/instant-key.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type InstantKeyResource = { +export type InstantKey = { client_session_id: string created_at: string diff --git a/src/lib/seam/connect/resources/noise-threshold.ts b/src/lib/seam/connect/resources/noise-threshold.ts index dd398aed..ba6b6b5b 100644 --- a/src/lib/seam/connect/resources/noise-threshold.ts +++ b/src/lib/seam/connect/resources/noise-threshold.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type NoiseThresholdResource = { +export type NoiseThreshold = { device_id: string ends_daily_at: string diff --git a/src/lib/seam/connect/resources/phone.ts b/src/lib/seam/connect/resources/phone.ts index 02224d24..8ea83190 100644 --- a/src/lib/seam/connect/resources/phone.ts +++ b/src/lib/seam/connect/resources/phone.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type PhoneResource = { +export type Phone = { created_at: string custom_metadata: Record diff --git a/src/lib/seam/connect/resources/space.ts b/src/lib/seam/connect/resources/space.ts index 539760e7..1c3f3c8c 100644 --- a/src/lib/seam/connect/resources/space.ts +++ b/src/lib/seam/connect/resources/space.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type SpaceResource = { +export type Space = { acs_entrance_count: number created_at: string diff --git a/src/lib/seam/connect/resources/thermostat-daily-program.ts b/src/lib/seam/connect/resources/thermostat-daily-program.ts index 9f4f9eec..28092a2c 100644 --- a/src/lib/seam/connect/resources/thermostat-daily-program.ts +++ b/src/lib/seam/connect/resources/thermostat-daily-program.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type ThermostatDailyProgramResource = { +export type ThermostatDailyProgram = { created_at: string device_id: string diff --git a/src/lib/seam/connect/resources/thermostat-schedule.ts b/src/lib/seam/connect/resources/thermostat-schedule.ts index 5a249354..18469c12 100644 --- a/src/lib/seam/connect/resources/thermostat-schedule.ts +++ b/src/lib/seam/connect/resources/thermostat-schedule.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type ThermostatScheduleResource = { +export type ThermostatSchedule = { climate_preset_key: string created_at: string diff --git a/src/lib/seam/connect/resources/unknown.ts b/src/lib/seam/connect/resources/unknown.ts index 47d0b791..d23bfc63 100644 --- a/src/lib/seam/connect/resources/unknown.ts +++ b/src/lib/seam/connect/resources/unknown.ts @@ -3,4 +3,4 @@ * Do not edit this file. */ -export type UnknownResource = Record +export type Unknown = Record diff --git a/src/lib/seam/connect/resources/unmanaged-access-code.ts b/src/lib/seam/connect/resources/unmanaged-access-code.ts index 283e03ce..2e65576f 100644 --- a/src/lib/seam/connect/resources/unmanaged-access-code.ts +++ b/src/lib/seam/connect/resources/unmanaged-access-code.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type UnmanagedAccessCodeResource = { +export type UnmanagedAccessCode = { access_code_id: string cannot_be_managed?: boolean | undefined diff --git a/src/lib/seam/connect/resources/unmanaged-device.ts b/src/lib/seam/connect/resources/unmanaged-device.ts index e94e16f4..0f81a78a 100644 --- a/src/lib/seam/connect/resources/unmanaged-device.ts +++ b/src/lib/seam/connect/resources/unmanaged-device.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type UnmanagedDeviceResource = { +export type UnmanagedDevice = { can_configure_auto_lock?: boolean | undefined can_hvac_cool?: boolean | undefined can_hvac_heat?: boolean | undefined diff --git a/src/lib/seam/connect/resources/user-identity.ts b/src/lib/seam/connect/resources/user-identity.ts index e8f6b302..84e47704 100644 --- a/src/lib/seam/connect/resources/user-identity.ts +++ b/src/lib/seam/connect/resources/user-identity.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type UserIdentityResource = { +export type UserIdentity = { acs_user_ids: Array created_at: string diff --git a/src/lib/seam/connect/resources/webhook.ts b/src/lib/seam/connect/resources/webhook.ts index e64b9d88..b1d90b5b 100644 --- a/src/lib/seam/connect/resources/webhook.ts +++ b/src/lib/seam/connect/resources/webhook.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type WebhookResource = { +export type Webhook = { event_types?: Array | undefined secret?: string | undefined url: string diff --git a/src/lib/seam/connect/resources/workspace.ts b/src/lib/seam/connect/resources/workspace.ts index df5e9203..c8a58452 100644 --- a/src/lib/seam/connect/resources/workspace.ts +++ b/src/lib/seam/connect/resources/workspace.ts @@ -3,7 +3,7 @@ * Do not edit this file. */ -export type WorkspaceResource = { +export type Workspace = { company_name: string connect_partner_name: string | null diff --git a/src/lib/seam/connect/routes/access-codes/access-codes.ts b/src/lib/seam/connect/routes/access-codes/access-codes.ts index d0baee29..310d1729 100644 --- a/src/lib/seam/connect/routes/access-codes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes/access-codes.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AccessCodeResource } from 'lib/seam/connect/resources/access-code.js' +import type { AccessCode } from 'lib/seam/connect/resources/access-code.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' @@ -326,7 +326,7 @@ export type AccessCodesCreateParameters = { /** * @deprecated Use AccessCodesCreateRequest instead. */ -export type AccessCodesCreateResponse = { access_code: AccessCodeResource } +export type AccessCodesCreateResponse = { access_code: AccessCode } export type AccessCodesCreateRequest = SeamHttpRequest< AccessCodesCreateResponse, @@ -356,7 +356,7 @@ export type AccessCodesCreateMultipleParameters = { * @deprecated Use AccessCodesCreateMultipleRequest instead. */ export type AccessCodesCreateMultipleResponse = { - access_codes: Array + access_codes: Array } export type AccessCodesCreateMultipleRequest = SeamHttpRequest< @@ -388,9 +388,7 @@ export type AccessCodesGenerateCodeParameters = { /** * @deprecated Use AccessCodesGenerateCodeRequest instead. */ -export type AccessCodesGenerateCodeResponse = { - generated_code: AccessCodeResource -} +export type AccessCodesGenerateCodeResponse = { generated_code: AccessCode } export type AccessCodesGenerateCodeRequest = SeamHttpRequest< AccessCodesGenerateCodeResponse, @@ -408,7 +406,7 @@ export type AccessCodesGetParameters = { /** * @deprecated Use AccessCodesGetRequest instead. */ -export type AccessCodesGetResponse = { access_code: AccessCodeResource } +export type AccessCodesGetResponse = { access_code: AccessCode } export type AccessCodesGetRequest = SeamHttpRequest< AccessCodesGetResponse, @@ -433,9 +431,7 @@ export type AccessCodesListParameters = { /** * @deprecated Use AccessCodesListRequest instead. */ -export type AccessCodesListResponse = { - access_codes: Array -} +export type AccessCodesListResponse = { access_codes: Array } export type AccessCodesListRequest = SeamHttpRequest< AccessCodesListResponse, @@ -452,7 +448,7 @@ export type AccessCodesPullBackupAccessCodeParameters = { * @deprecated Use AccessCodesPullBackupAccessCodeRequest instead. */ export type AccessCodesPullBackupAccessCodeResponse = { - access_code: AccessCodeResource + access_code: AccessCode } export type AccessCodesPullBackupAccessCodeRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts b/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts index d31cee7d..511ce87e 100644 --- a/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { UnmanagedAccessCodeResource } from 'lib/seam/connect/resources/unmanaged-access-code.js' +import type { UnmanagedAccessCode } from 'lib/seam/connect/resources/unmanaged-access-code.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' @@ -187,7 +187,7 @@ export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeRequest instead. */ export type AccessCodesSimulateCreateUnmanagedAccessCodeResponse = { - access_code: UnmanagedAccessCodeResource + access_code: UnmanagedAccessCode } export type AccessCodesSimulateCreateUnmanagedAccessCodeRequest = diff --git a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts index 0269e080..30b3d932 100644 --- a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { UnmanagedAccessCodeResource } from 'lib/seam/connect/resources/unmanaged-access-code.js' +import type { UnmanagedAccessCode } from 'lib/seam/connect/resources/unmanaged-access-code.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' @@ -270,7 +270,7 @@ export type AccessCodesUnmanagedGetParameters = { * @deprecated Use AccessCodesUnmanagedGetRequest instead. */ export type AccessCodesUnmanagedGetResponse = { - access_code: UnmanagedAccessCodeResource + access_code: UnmanagedAccessCode } export type AccessCodesUnmanagedGetRequest = SeamHttpRequest< @@ -293,7 +293,7 @@ export type AccessCodesUnmanagedListParameters = { * @deprecated Use AccessCodesUnmanagedListRequest instead. */ export type AccessCodesUnmanagedListResponse = { - access_codes: Array + access_codes: Array } export type AccessCodesUnmanagedListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/access-grants/access-grants.ts b/src/lib/seam/connect/routes/access-grants/access-grants.ts index df5d3d27..503a0530 100644 --- a/src/lib/seam/connect/routes/access-grants/access-grants.ts +++ b/src/lib/seam/connect/routes/access-grants/access-grants.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AccessGrantResource } from 'lib/seam/connect/resources/access-grant.js' -import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' +import type { AccessGrant } from 'lib/seam/connect/resources/access-grant.js' +import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -299,7 +299,7 @@ export type AccessGrantsCreateParameters = { /** * @deprecated Use AccessGrantsCreateRequest instead. */ -export type AccessGrantsCreateResponse = { access_grant: AccessGrantResource } +export type AccessGrantsCreateResponse = { access_grant: AccessGrant } export type AccessGrantsCreateRequest = SeamHttpRequest< AccessGrantsCreateResponse, @@ -329,7 +329,7 @@ export type AccessGrantsGetParameters = { /** * @deprecated Use AccessGrantsGetRequest instead. */ -export type AccessGrantsGetResponse = { access_grant: AccessGrantResource } +export type AccessGrantsGetResponse = { access_grant: AccessGrant } export type AccessGrantsGetRequest = SeamHttpRequest< AccessGrantsGetResponse, @@ -370,7 +370,7 @@ export type AccessGrantsGetRelatedParameters = { /** * @deprecated Use AccessGrantsGetRelatedRequest instead. */ -export type AccessGrantsGetRelatedResponse = { batch: UnknownResource } +export type AccessGrantsGetRelatedResponse = { batch: Unknown } export type AccessGrantsGetRelatedRequest = SeamHttpRequest< AccessGrantsGetRelatedResponse, @@ -398,9 +398,7 @@ export type AccessGrantsListParameters = { /** * @deprecated Use AccessGrantsListRequest instead. */ -export type AccessGrantsListResponse = { - access_grants: Array -} +export type AccessGrantsListResponse = { access_grants: Array } export type AccessGrantsListRequest = SeamHttpRequest< AccessGrantsListResponse, @@ -423,7 +421,7 @@ export type AccessGrantsRequestAccessMethodsParameters = { * @deprecated Use AccessGrantsRequestAccessMethodsRequest instead. */ export type AccessGrantsRequestAccessMethodsResponse = { - access_grant: AccessGrantResource + access_grant: AccessGrant } export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts index c8f18529..1502a027 100644 --- a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' +import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -208,7 +208,7 @@ export type AccessGrantsUnmanagedGetParameters = { /** * @deprecated Use AccessGrantsUnmanagedGetRequest instead. */ -export type AccessGrantsUnmanagedGetResponse = { access_grant: UnknownResource } +export type AccessGrantsUnmanagedGetResponse = { access_grant: Unknown } export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< AccessGrantsUnmanagedGetResponse, @@ -230,7 +230,7 @@ export type AccessGrantsUnmanagedListParameters = { * @deprecated Use AccessGrantsUnmanagedListRequest instead. */ export type AccessGrantsUnmanagedListResponse = { - access_grants: Array + access_grants: Array } export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/access-methods/access-methods.ts b/src/lib/seam/connect/routes/access-methods/access-methods.ts index 19d2129f..647fe531 100644 --- a/src/lib/seam/connect/routes/access-methods/access-methods.ts +++ b/src/lib/seam/connect/routes/access-methods/access-methods.ts @@ -29,9 +29,9 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AccessMethodResource } from 'lib/seam/connect/resources/access-method.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' -import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' +import type { AccessMethod } from 'lib/seam/connect/resources/access-method.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' +import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -270,9 +270,7 @@ export type AccessMethodsAssignCardParameters = { /** * @deprecated Use AccessMethodsAssignCardRequest instead. */ -export type AccessMethodsAssignCardResponse = { - action_attempt: ActionAttemptResource -} +export type AccessMethodsAssignCardResponse = { action_attempt: ActionAttempt } export type AccessMethodsAssignCardRequest = SeamHttpRequest< AccessMethodsAssignCardResponse, @@ -308,9 +306,7 @@ export type AccessMethodsEncodeParameters = { /** * @deprecated Use AccessMethodsEncodeRequest instead. */ -export type AccessMethodsEncodeResponse = { - action_attempt: ActionAttemptResource -} +export type AccessMethodsEncodeResponse = { action_attempt: ActionAttempt } export type AccessMethodsEncodeRequest = SeamHttpRequest< AccessMethodsEncodeResponse, @@ -329,7 +325,7 @@ export type AccessMethodsGetParameters = { /** * @deprecated Use AccessMethodsGetRequest instead. */ -export type AccessMethodsGetResponse = { access_method: AccessMethodResource } +export type AccessMethodsGetResponse = { access_method: AccessMethod } export type AccessMethodsGetRequest = SeamHttpRequest< AccessMethodsGetResponse, @@ -370,7 +366,7 @@ export type AccessMethodsGetRelatedParameters = { /** * @deprecated Use AccessMethodsGetRelatedRequest instead. */ -export type AccessMethodsGetRelatedResponse = { batch: UnknownResource } +export type AccessMethodsGetRelatedResponse = { batch: Unknown } export type AccessMethodsGetRelatedRequest = SeamHttpRequest< AccessMethodsGetRelatedResponse, @@ -393,9 +389,7 @@ export type AccessMethodsListParameters = { /** * @deprecated Use AccessMethodsListRequest instead. */ -export type AccessMethodsListResponse = { - access_methods: Array -} +export type AccessMethodsListResponse = { access_methods: Array } export type AccessMethodsListRequest = SeamHttpRequest< AccessMethodsListResponse, @@ -413,9 +407,7 @@ export type AccessMethodsUnlockDoorParameters = { /** * @deprecated Use AccessMethodsUnlockDoorRequest instead. */ -export type AccessMethodsUnlockDoorResponse = { - action_attempt: ActionAttemptResource -} +export type AccessMethodsUnlockDoorResponse = { action_attempt: ActionAttempt } export type AccessMethodsUnlockDoorRequest = SeamHttpRequest< AccessMethodsUnlockDoorResponse, diff --git a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts index 9981fe4e..f525af61 100644 --- a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' +import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -195,9 +195,7 @@ export type AccessMethodsUnmanagedGetParameters = { /** * @deprecated Use AccessMethodsUnmanagedGetRequest instead. */ -export type AccessMethodsUnmanagedGetResponse = { - access_method: UnknownResource -} +export type AccessMethodsUnmanagedGetResponse = { access_method: Unknown } export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< AccessMethodsUnmanagedGetResponse, @@ -218,7 +216,7 @@ export type AccessMethodsUnmanagedListParameters = { * @deprecated Use AccessMethodsUnmanagedListRequest instead. */ export type AccessMethodsUnmanagedListResponse = { - access_methods: Array + access_methods: Array } export type AccessMethodsUnmanagedListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts index 27b85e53..2205435e 100644 --- a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts +++ b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts @@ -29,9 +29,9 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsAccessGroupResource } from 'lib/seam/connect/resources/acs-access-group.js' -import type { AcsEntranceResource } from 'lib/seam/connect/resources/acs-entrance.js' -import type { AcsUserResource } from 'lib/seam/connect/resources/acs-user.js' +import type { AcsAccessGroup } from 'lib/seam/connect/resources/acs-access-group.js' +import type { AcsEntrance } from 'lib/seam/connect/resources/acs-entrance.js' +import type { AcsUser } from 'lib/seam/connect/resources/acs-user.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' @@ -291,9 +291,7 @@ export type AcsAccessGroupsGetParameters = { /** * @deprecated Use AcsAccessGroupsGetRequest instead. */ -export type AcsAccessGroupsGetResponse = { - acs_access_group: AcsAccessGroupResource -} +export type AcsAccessGroupsGetResponse = { acs_access_group: AcsAccessGroup } export type AcsAccessGroupsGetRequest = SeamHttpRequest< AcsAccessGroupsGetResponse, @@ -313,7 +311,7 @@ export type AcsAccessGroupsListParameters = { * @deprecated Use AcsAccessGroupsListRequest instead. */ export type AcsAccessGroupsListResponse = { - acs_access_groups: Array + acs_access_groups: Array } export type AcsAccessGroupsListRequest = SeamHttpRequest< @@ -331,7 +329,7 @@ export type AcsAccessGroupsListAccessibleEntrancesParameters = { * @deprecated Use AcsAccessGroupsListAccessibleEntrancesRequest instead. */ export type AcsAccessGroupsListAccessibleEntrancesResponse = { - acs_entrances: Array + acs_entrances: Array } export type AcsAccessGroupsListAccessibleEntrancesRequest = SeamHttpRequest< @@ -348,9 +346,7 @@ export type AcsAccessGroupsListUsersParameters = { /** * @deprecated Use AcsAccessGroupsListUsersRequest instead. */ -export type AcsAccessGroupsListUsersResponse = { - acs_users: Array -} +export type AcsAccessGroupsListUsersResponse = { acs_users: Array } export type AcsAccessGroupsListUsersRequest = SeamHttpRequest< AcsAccessGroupsListUsersResponse, diff --git a/src/lib/seam/connect/routes/acs/credentials/credentials.ts b/src/lib/seam/connect/routes/acs/credentials/credentials.ts index 6c238ed9..55703158 100644 --- a/src/lib/seam/connect/routes/acs/credentials/credentials.ts +++ b/src/lib/seam/connect/routes/acs/credentials/credentials.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsCredentialResource } from 'lib/seam/connect/resources/acs-credential.js' -import type { AcsEntranceResource } from 'lib/seam/connect/resources/acs-entrance.js' +import type { AcsCredential } from 'lib/seam/connect/resources/acs-credential.js' +import type { AcsEntrance } from 'lib/seam/connect/resources/acs-entrance.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' @@ -322,9 +322,7 @@ export type AcsCredentialsCreateParameters = { /** * @deprecated Use AcsCredentialsCreateRequest instead. */ -export type AcsCredentialsCreateResponse = { - acs_credential: AcsCredentialResource -} +export type AcsCredentialsCreateResponse = { acs_credential: AcsCredential } export type AcsCredentialsCreateRequest = SeamHttpRequest< AcsCredentialsCreateResponse, @@ -353,9 +351,7 @@ export type AcsCredentialsGetParameters = { /** * @deprecated Use AcsCredentialsGetRequest instead. */ -export type AcsCredentialsGetResponse = { - acs_credential: AcsCredentialResource -} +export type AcsCredentialsGetResponse = { acs_credential: AcsCredential } export type AcsCredentialsGetRequest = SeamHttpRequest< AcsCredentialsGetResponse, @@ -379,7 +375,7 @@ export type AcsCredentialsListParameters = { * @deprecated Use AcsCredentialsListRequest instead. */ export type AcsCredentialsListResponse = { - acs_credentials: Array + acs_credentials: Array } export type AcsCredentialsListRequest = SeamHttpRequest< @@ -397,7 +393,7 @@ export type AcsCredentialsListAccessibleEntrancesParameters = { * @deprecated Use AcsCredentialsListAccessibleEntrancesRequest instead. */ export type AcsCredentialsListAccessibleEntrancesResponse = { - acs_entrances: Array + acs_entrances: Array } export type AcsCredentialsListAccessibleEntrancesRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/acs/encoders/encoders.ts b/src/lib/seam/connect/routes/acs/encoders/encoders.ts index 4399df39..7281f19d 100644 --- a/src/lib/seam/connect/routes/acs/encoders/encoders.ts +++ b/src/lib/seam/connect/routes/acs/encoders/encoders.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsEncoderResource } from 'lib/seam/connect/resources/acs-encoder.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' +import type { AcsEncoder } from 'lib/seam/connect/resources/acs-encoder.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.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' @@ -244,7 +244,7 @@ export type AcsEncodersEncodeCredentialParameters = { * @deprecated Use AcsEncodersEncodeCredentialRequest instead. */ export type AcsEncodersEncodeCredentialResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type AcsEncodersEncodeCredentialRequest = SeamHttpRequest< @@ -264,7 +264,7 @@ export type AcsEncodersGetParameters = { /** * @deprecated Use AcsEncodersGetRequest instead. */ -export type AcsEncodersGetResponse = { acs_encoder: AcsEncoderResource } +export type AcsEncodersGetResponse = { acs_encoder: AcsEncoder } export type AcsEncodersGetRequest = SeamHttpRequest< AcsEncodersGetResponse, @@ -284,9 +284,7 @@ export type AcsEncodersListParameters = { /** * @deprecated Use AcsEncodersListRequest instead. */ -export type AcsEncodersListResponse = { - acs_encoders: Array -} +export type AcsEncodersListResponse = { acs_encoders: Array } export type AcsEncodersListRequest = SeamHttpRequest< AcsEncodersListResponse, @@ -309,7 +307,7 @@ export type AcsEncodersScanCredentialParameters = { * @deprecated Use AcsEncodersScanCredentialRequest instead. */ export type AcsEncodersScanCredentialResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type AcsEncodersScanCredentialRequest = SeamHttpRequest< @@ -338,7 +336,7 @@ export type AcsEncodersScanToAssignCredentialParameters = { * @deprecated Use AcsEncodersScanToAssignCredentialRequest instead. */ export type AcsEncodersScanToAssignCredentialResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type AcsEncodersScanToAssignCredentialRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/acs/entrances/entrances.ts b/src/lib/seam/connect/routes/acs/entrances/entrances.ts index 9fa30840..84f0b00c 100644 --- a/src/lib/seam/connect/routes/acs/entrances/entrances.ts +++ b/src/lib/seam/connect/routes/acs/entrances/entrances.ts @@ -29,9 +29,9 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsCredentialResource } from 'lib/seam/connect/resources/acs-credential.js' -import type { AcsEntranceResource } from 'lib/seam/connect/resources/acs-entrance.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' +import type { AcsCredential } from 'lib/seam/connect/resources/acs-credential.js' +import type { AcsEntrance } from 'lib/seam/connect/resources/acs-entrance.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.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' @@ -236,7 +236,7 @@ export type AcsEntrancesGetParameters = { /** * @deprecated Use AcsEntrancesGetRequest instead. */ -export type AcsEntrancesGetResponse = { acs_entrance: AcsEntranceResource } +export type AcsEntrancesGetResponse = { acs_entrance: AcsEntrance } export type AcsEntrancesGetRequest = SeamHttpRequest< AcsEntrancesGetResponse, @@ -278,9 +278,7 @@ export type AcsEntrancesListParameters = { /** * @deprecated Use AcsEntrancesListRequest instead. */ -export type AcsEntrancesListResponse = { - acs_entrances: Array -} +export type AcsEntrancesListResponse = { acs_entrances: Array } export type AcsEntrancesListRequest = SeamHttpRequest< AcsEntrancesListResponse, @@ -299,7 +297,7 @@ export type AcsEntrancesListCredentialsWithAccessParameters = { * @deprecated Use AcsEntrancesListCredentialsWithAccessRequest instead. */ export type AcsEntrancesListCredentialsWithAccessResponse = { - acs_credentials: Array + acs_credentials: Array } export type AcsEntrancesListCredentialsWithAccessRequest = SeamHttpRequest< @@ -318,9 +316,7 @@ export type AcsEntrancesUnlockParameters = { /** * @deprecated Use AcsEntrancesUnlockRequest instead. */ -export type AcsEntrancesUnlockResponse = { - action_attempt: ActionAttemptResource -} +export type AcsEntrancesUnlockResponse = { action_attempt: ActionAttempt } export type AcsEntrancesUnlockRequest = SeamHttpRequest< AcsEntrancesUnlockResponse, diff --git a/src/lib/seam/connect/routes/acs/systems/systems.ts b/src/lib/seam/connect/routes/acs/systems/systems.ts index 241acc7b..0c407cbf 100644 --- a/src/lib/seam/connect/routes/acs/systems/systems.ts +++ b/src/lib/seam/connect/routes/acs/systems/systems.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsSystemResource } from 'lib/seam/connect/resources/acs-system.js' +import type { AcsSystem } from 'lib/seam/connect/resources/acs-system.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' @@ -221,7 +221,7 @@ export type AcsSystemsGetParameters = { /** * @deprecated Use AcsSystemsGetRequest instead. */ -export type AcsSystemsGetResponse = { acs_system: AcsSystemResource } +export type AcsSystemsGetResponse = { acs_system: AcsSystem } export type AcsSystemsGetRequest = SeamHttpRequest< AcsSystemsGetResponse, @@ -239,7 +239,7 @@ export type AcsSystemsListParameters = { /** * @deprecated Use AcsSystemsListRequest instead. */ -export type AcsSystemsListResponse = { acs_systems: Array } +export type AcsSystemsListResponse = { acs_systems: Array } export type AcsSystemsListRequest = SeamHttpRequest< AcsSystemsListResponse, @@ -256,7 +256,7 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest instead. */ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse = { - acs_systems: Array + acs_systems: Array } export type AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest = diff --git a/src/lib/seam/connect/routes/acs/users/users.ts b/src/lib/seam/connect/routes/acs/users/users.ts index 9e506d7b..c9d490e4 100644 --- a/src/lib/seam/connect/routes/acs/users/users.ts +++ b/src/lib/seam/connect/routes/acs/users/users.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsEntranceResource } from 'lib/seam/connect/resources/acs-entrance.js' -import type { AcsUserResource } from 'lib/seam/connect/resources/acs-user.js' +import type { AcsEntrance } from 'lib/seam/connect/resources/acs-entrance.js' +import type { AcsUser } from 'lib/seam/connect/resources/acs-user.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' @@ -342,7 +342,7 @@ export type AcsUsersCreateParameters = { /** * @deprecated Use AcsUsersCreateRequest instead. */ -export type AcsUsersCreateResponse = { acs_user: AcsUserResource } +export type AcsUsersCreateResponse = { acs_user: AcsUser } export type AcsUsersCreateRequest = SeamHttpRequest< AcsUsersCreateResponse, @@ -375,7 +375,7 @@ export type AcsUsersGetParameters = { /** * @deprecated Use AcsUsersGetRequest instead. */ -export type AcsUsersGetResponse = { acs_user: AcsUserResource } +export type AcsUsersGetResponse = { acs_user: AcsUser } export type AcsUsersGetRequest = SeamHttpRequest< AcsUsersGetResponse, @@ -398,7 +398,7 @@ export type AcsUsersListParameters = { /** * @deprecated Use AcsUsersListRequest instead. */ -export type AcsUsersListResponse = { acs_users: Array } +export type AcsUsersListResponse = { acs_users: Array } export type AcsUsersListRequest = SeamHttpRequest< AcsUsersListResponse, @@ -417,7 +417,7 @@ export type AcsUsersListAccessibleEntrancesParameters = { * @deprecated Use AcsUsersListAccessibleEntrancesRequest instead. */ export type AcsUsersListAccessibleEntrancesResponse = { - acs_entrances: Array + acs_entrances: Array } export type AcsUsersListAccessibleEntrancesRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts index 81769793..5658884b 100644 --- a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts +++ b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.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' @@ -195,9 +195,7 @@ export type ActionAttemptsGetParameters = { /** * @deprecated Use ActionAttemptsGetRequest instead. */ -export type ActionAttemptsGetResponse = { - action_attempt: ActionAttemptResource -} +export type ActionAttemptsGetResponse = { action_attempt: ActionAttempt } export type ActionAttemptsGetRequest = SeamHttpRequest< ActionAttemptsGetResponse, @@ -220,7 +218,7 @@ export type ActionAttemptsListParameters = { * @deprecated Use ActionAttemptsListRequest instead. */ export type ActionAttemptsListResponse = { - action_attempts: Array + action_attempts: Array } export type ActionAttemptsListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/client-sessions/client-sessions.ts b/src/lib/seam/connect/routes/client-sessions/client-sessions.ts index a18f41ea..96a8b964 100644 --- a/src/lib/seam/connect/routes/client-sessions/client-sessions.ts +++ b/src/lib/seam/connect/routes/client-sessions/client-sessions.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ClientSessionResource } from 'lib/seam/connect/resources/client-session.js' +import type { ClientSession } from 'lib/seam/connect/resources/client-session.js' import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -266,9 +266,7 @@ export type ClientSessionsCreateParameters = { /** * @deprecated Use ClientSessionsCreateRequest instead. */ -export type ClientSessionsCreateResponse = { - client_session: ClientSessionResource -} +export type ClientSessionsCreateResponse = { client_session: ClientSession } export type ClientSessionsCreateRequest = SeamHttpRequest< ClientSessionsCreateResponse, @@ -298,9 +296,7 @@ export type ClientSessionsGetParameters = { /** * @deprecated Use ClientSessionsGetRequest instead. */ -export type ClientSessionsGetResponse = { - client_session: ClientSessionResource -} +export type ClientSessionsGetResponse = { client_session: ClientSession } export type ClientSessionsGetRequest = SeamHttpRequest< ClientSessionsGetResponse, @@ -322,7 +318,7 @@ export type ClientSessionsGetOrCreateParameters = { * @deprecated Use ClientSessionsGetOrCreateRequest instead. */ export type ClientSessionsGetOrCreateResponse = { - client_session: ClientSessionResource + client_session: ClientSession } export type ClientSessionsGetOrCreateRequest = SeamHttpRequest< @@ -362,7 +358,7 @@ export type ClientSessionsListParameters = { * @deprecated Use ClientSessionsListRequest instead. */ export type ClientSessionsListResponse = { - client_sessions: Array + client_sessions: Array } export type ClientSessionsListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts index d54f4de5..f7c0ec56 100644 --- a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ConnectWebviewResource } from 'lib/seam/connect/resources/connect-webview.js' +import type { ConnectWebview } from 'lib/seam/connect/resources/connect-webview.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' @@ -314,9 +314,7 @@ export type ConnectWebviewsCreateParameters = { /** * @deprecated Use ConnectWebviewsCreateRequest instead. */ -export type ConnectWebviewsCreateResponse = { - connect_webview: ConnectWebviewResource -} +export type ConnectWebviewsCreateResponse = { connect_webview: ConnectWebview } export type ConnectWebviewsCreateRequest = SeamHttpRequest< ConnectWebviewsCreateResponse, @@ -345,9 +343,7 @@ export type ConnectWebviewsGetParameters = { /** * @deprecated Use ConnectWebviewsGetRequest instead. */ -export type ConnectWebviewsGetResponse = { - connect_webview: ConnectWebviewResource -} +export type ConnectWebviewsGetResponse = { connect_webview: ConnectWebview } export type ConnectWebviewsGetRequest = SeamHttpRequest< ConnectWebviewsGetResponse, @@ -369,7 +365,7 @@ export type ConnectWebviewsListParameters = { * @deprecated Use ConnectWebviewsListRequest instead. */ export type ConnectWebviewsListResponse = { - connect_webviews: Array + connect_webviews: Array } export type ConnectWebviewsListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts index 9c4c95a9..f8583724 100644 --- a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ConnectedAccountResource } from 'lib/seam/connect/resources/connected-account.js' +import type { ConnectedAccount } from 'lib/seam/connect/resources/connected-account.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' @@ -258,7 +258,7 @@ export type ConnectedAccountsGetParameters = { * @deprecated Use ConnectedAccountsGetRequest instead. */ export type ConnectedAccountsGetResponse = { - connected_account: ConnectedAccountResource + connected_account: ConnectedAccount } export type ConnectedAccountsGetRequest = SeamHttpRequest< @@ -282,7 +282,7 @@ export type ConnectedAccountsListParameters = { * @deprecated Use ConnectedAccountsListRequest instead. */ export type ConnectedAccountsListResponse = { - connected_accounts: Array + connected_accounts: Array } export type ConnectedAccountsListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/customers/customers.ts b/src/lib/seam/connect/routes/customers/customers.ts index d9852dcd..f077eaca 100644 --- a/src/lib/seam/connect/routes/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/customers.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { CustomerPortalResource } from 'lib/seam/connect/resources/customer-portal.js' +import type { CustomerPortal } from 'lib/seam/connect/resources/customer-portal.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' @@ -520,9 +520,7 @@ export type CustomersCreatePortalParameters = { /** * @deprecated Use CustomersCreatePortalRequest instead. */ -export type CustomersCreatePortalResponse = { - customer_portal: CustomerPortalResource -} +export type CustomersCreatePortalResponse = { customer_portal: CustomerPortal } export type CustomersCreatePortalRequest = SeamHttpRequest< CustomersCreatePortalResponse, diff --git a/src/lib/seam/connect/routes/devices/devices.ts b/src/lib/seam/connect/routes/devices/devices.ts index edda1d0b..ae8e001e 100644 --- a/src/lib/seam/connect/routes/devices/devices.ts +++ b/src/lib/seam/connect/routes/devices/devices.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { DeviceResource } from 'lib/seam/connect/resources/device.js' -import type { DeviceProviderResource } from 'lib/seam/connect/resources/device-provider.js' +import type { Device } from 'lib/seam/connect/resources/device.js' +import type { DeviceProvider } from 'lib/seam/connect/resources/device-provider.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' @@ -247,7 +247,7 @@ export type DevicesGetParameters = { /** * @deprecated Use DevicesGetRequest instead. */ -export type DevicesGetResponse = { device: DeviceResource } +export type DevicesGetResponse = { device: Device } export type DevicesGetRequest = SeamHttpRequest @@ -415,7 +415,7 @@ export type DevicesListParameters = { /** * @deprecated Use DevicesListRequest instead. */ -export type DevicesListResponse = { devices: Array } +export type DevicesListResponse = { devices: Array } export type DevicesListRequest = SeamHttpRequest @@ -438,7 +438,7 @@ export type DevicesListDeviceProvidersParameters = { * @deprecated Use DevicesListDeviceProvidersRequest instead. */ export type DevicesListDeviceProvidersResponse = { - device_providers: Array + device_providers: Array } export type DevicesListDeviceProvidersRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts index 32b94b27..de5c6341 100644 --- a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { UnmanagedDeviceResource } from 'lib/seam/connect/resources/unmanaged-device.js' +import type { UnmanagedDevice } from 'lib/seam/connect/resources/unmanaged-device.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' @@ -209,7 +209,7 @@ export type DevicesUnmanagedGetParameters = { /** * @deprecated Use DevicesUnmanagedGetRequest instead. */ -export type DevicesUnmanagedGetResponse = { device: UnmanagedDeviceResource } +export type DevicesUnmanagedGetResponse = { device: UnmanagedDevice } export type DevicesUnmanagedGetRequest = SeamHttpRequest< DevicesUnmanagedGetResponse, @@ -380,9 +380,7 @@ export type DevicesUnmanagedListParameters = { /** * @deprecated Use DevicesUnmanagedListRequest instead. */ -export type DevicesUnmanagedListResponse = { - devices: Array -} +export type DevicesUnmanagedListResponse = { devices: Array } export type DevicesUnmanagedListRequest = SeamHttpRequest< DevicesUnmanagedListResponse, diff --git a/src/lib/seam/connect/routes/events/events.ts b/src/lib/seam/connect/routes/events/events.ts index 2aa20149..1e7be7e5 100644 --- a/src/lib/seam/connect/routes/events/events.ts +++ b/src/lib/seam/connect/routes/events/events.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { EventResource } from 'lib/seam/connect/resources/event.js' +import type { SeamEvent } from 'lib/seam/connect/resources/event.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' @@ -197,7 +197,7 @@ export type EventsGetParameters = { /** * @deprecated Use EventsGetRequest instead. */ -export type EventsGetResponse = { event: EventResource } +export type EventsGetResponse = { event: SeamEvent } export type EventsGetRequest = SeamHttpRequest @@ -459,7 +459,7 @@ export type EventsListParameters = { /** * @deprecated Use EventsListRequest instead. */ -export type EventsListResponse = { events: Array } +export type EventsListResponse = { events: Array } export type EventsListRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/instant-keys/instant-keys.ts b/src/lib/seam/connect/routes/instant-keys/instant-keys.ts index 0b55ba28..8b11fbd1 100644 --- a/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +++ b/src/lib/seam/connect/routes/instant-keys/instant-keys.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { InstantKeyResource } from 'lib/seam/connect/resources/instant-key.js' +import type { InstantKey } from 'lib/seam/connect/resources/instant-key.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' @@ -222,7 +222,7 @@ export type InstantKeysGetParameters = { /** * @deprecated Use InstantKeysGetRequest instead. */ -export type InstantKeysGetResponse = { instant_key: InstantKeyResource } +export type InstantKeysGetResponse = { instant_key: InstantKey } export type InstantKeysGetRequest = SeamHttpRequest< InstantKeysGetResponse, @@ -238,9 +238,7 @@ export type InstantKeysListParameters = { /** * @deprecated Use InstantKeysListRequest instead. */ -export type InstantKeysListResponse = { - instant_keys: Array -} +export type InstantKeysListResponse = { instant_keys: Array } export type InstantKeysListRequest = SeamHttpRequest< InstantKeysListResponse, diff --git a/src/lib/seam/connect/routes/locks/locks.ts b/src/lib/seam/connect/routes/locks/locks.ts index ee04261d..2cdc07b6 100644 --- a/src/lib/seam/connect/routes/locks/locks.ts +++ b/src/lib/seam/connect/routes/locks/locks.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' -import type { DeviceResource } from 'lib/seam/connect/resources/device.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' +import type { Device } from 'lib/seam/connect/resources/device.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' @@ -244,9 +244,7 @@ export type LocksConfigureAutoLockParameters = { /** * @deprecated Use LocksConfigureAutoLockRequest instead. */ -export type LocksConfigureAutoLockResponse = { - action_attempt: ActionAttemptResource -} +export type LocksConfigureAutoLockResponse = { action_attempt: ActionAttempt } export type LocksConfigureAutoLockRequest = SeamHttpRequest< LocksConfigureAutoLockResponse, @@ -266,7 +264,7 @@ export type LocksGetParameters = { /** * @deprecated Use LocksGetRequest instead. */ -export type LocksGetResponse = { device: DeviceResource } +export type LocksGetResponse = { device: Device } export type LocksGetRequest = SeamHttpRequest @@ -391,7 +389,7 @@ export type LocksListParameters = { /** * @deprecated Use LocksListRequest instead. */ -export type LocksListResponse = { devices: Array } +export type LocksListResponse = { devices: Array } export type LocksListRequest = SeamHttpRequest @@ -404,7 +402,7 @@ export type LocksLockDoorParameters = { /** * @deprecated Use LocksLockDoorRequest instead. */ -export type LocksLockDoorResponse = { action_attempt: ActionAttemptResource } +export type LocksLockDoorResponse = { action_attempt: ActionAttempt } export type LocksLockDoorRequest = SeamHttpRequest< LocksLockDoorResponse, @@ -423,7 +421,7 @@ export type LocksUnlockDoorParameters = { /** * @deprecated Use LocksUnlockDoorRequest instead. */ -export type LocksUnlockDoorResponse = { action_attempt: ActionAttemptResource } +export type LocksUnlockDoorResponse = { action_attempt: ActionAttempt } export type LocksUnlockDoorRequest = SeamHttpRequest< LocksUnlockDoorResponse, diff --git a/src/lib/seam/connect/routes/locks/simulate/simulate.ts b/src/lib/seam/connect/routes/locks/simulate/simulate.ts index 04c8c3ef..ced2a8f4 100644 --- a/src/lib/seam/connect/routes/locks/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/locks/simulate/simulate.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.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' @@ -198,7 +198,7 @@ export type LocksSimulateKeypadCodeEntryParameters = { * @deprecated Use LocksSimulateKeypadCodeEntryRequest instead. */ export type LocksSimulateKeypadCodeEntryResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type LocksSimulateKeypadCodeEntryRequest = SeamHttpRequest< @@ -219,7 +219,7 @@ export type LocksSimulateManualLockViaKeypadParameters = { * @deprecated Use LocksSimulateManualLockViaKeypadRequest instead. */ export type LocksSimulateManualLockViaKeypadResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type LocksSimulateManualLockViaKeypadRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts index e2bc2275..e0db3dff 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { DeviceResource } from 'lib/seam/connect/resources/device.js' +import type { Device } from 'lib/seam/connect/resources/device.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' @@ -211,7 +211,7 @@ export type NoiseSensorsListParameters = { /** * @deprecated Use NoiseSensorsListRequest instead. */ -export type NoiseSensorsListResponse = { devices: Array } +export type NoiseSensorsListResponse = { devices: Array } export type NoiseSensorsListRequest = SeamHttpRequest< NoiseSensorsListResponse, diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts index 98ed2f26..843151c3 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { NoiseThresholdResource } from 'lib/seam/connect/resources/noise-threshold.js' +import type { NoiseThreshold } from 'lib/seam/connect/resources/noise-threshold.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' @@ -245,7 +245,7 @@ export type NoiseSensorsNoiseThresholdsCreateParameters = { * @deprecated Use NoiseSensorsNoiseThresholdsCreateRequest instead. */ export type NoiseSensorsNoiseThresholdsCreateResponse = { - noise_threshold: NoiseThresholdResource + noise_threshold: NoiseThreshold } export type NoiseSensorsNoiseThresholdsCreateRequest = SeamHttpRequest< @@ -281,7 +281,7 @@ export type NoiseSensorsNoiseThresholdsGetParameters = { * @deprecated Use NoiseSensorsNoiseThresholdsGetRequest instead. */ export type NoiseSensorsNoiseThresholdsGetResponse = { - noise_threshold: NoiseThresholdResource + noise_threshold: NoiseThreshold } export type NoiseSensorsNoiseThresholdsGetRequest = SeamHttpRequest< @@ -299,7 +299,7 @@ export type NoiseSensorsNoiseThresholdsListParameters = { * @deprecated Use NoiseSensorsNoiseThresholdsListRequest instead. */ export type NoiseSensorsNoiseThresholdsListResponse = { - noise_thresholds: Array + noise_thresholds: Array } export type NoiseSensorsNoiseThresholdsListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/phones/phones.ts b/src/lib/seam/connect/routes/phones/phones.ts index 9bf1b161..875e8552 100644 --- a/src/lib/seam/connect/routes/phones/phones.ts +++ b/src/lib/seam/connect/routes/phones/phones.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { PhoneResource } from 'lib/seam/connect/resources/phone.js' +import type { Phone } from 'lib/seam/connect/resources/phone.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' @@ -227,7 +227,7 @@ export type PhonesGetParameters = { /** * @deprecated Use PhonesGetRequest instead. */ -export type PhonesGetResponse = { phone: PhoneResource } +export type PhonesGetResponse = { phone: Phone } export type PhonesGetRequest = SeamHttpRequest @@ -241,7 +241,7 @@ export type PhonesListParameters = { /** * @deprecated Use PhonesListRequest instead. */ -export type PhonesListResponse = { phones: Array } +export type PhonesListResponse = { phones: Array } export type PhonesListRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/phones/simulate/simulate.ts b/src/lib/seam/connect/routes/phones/simulate/simulate.ts index c89a45fa..dff90df2 100644 --- a/src/lib/seam/connect/routes/phones/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/phones/simulate/simulate.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { PhoneResource } from 'lib/seam/connect/resources/phone.js' +import type { Phone } from 'lib/seam/connect/resources/phone.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' @@ -201,7 +201,7 @@ export type PhonesSimulateCreateSandboxPhoneParameters = { /** * @deprecated Use PhonesSimulateCreateSandboxPhoneRequest instead. */ -export type PhonesSimulateCreateSandboxPhoneResponse = { phone: PhoneResource } +export type PhonesSimulateCreateSandboxPhoneResponse = { phone: Phone } export type PhonesSimulateCreateSandboxPhoneRequest = SeamHttpRequest< PhonesSimulateCreateSandboxPhoneResponse, diff --git a/src/lib/seam/connect/routes/spaces/spaces.ts b/src/lib/seam/connect/routes/spaces/spaces.ts index bca8fb29..5c11d295 100644 --- a/src/lib/seam/connect/routes/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/spaces/spaces.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { SpaceResource } from 'lib/seam/connect/resources/space.js' -import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' +import type { Space } from 'lib/seam/connect/resources/space.js' +import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -385,7 +385,7 @@ export type SpacesCreateParameters = { /** * @deprecated Use SpacesCreateRequest instead. */ -export type SpacesCreateResponse = { space: SpaceResource } +export type SpacesCreateResponse = { space: Space } export type SpacesCreateRequest = SeamHttpRequest @@ -412,7 +412,7 @@ export type SpacesGetParameters = { /** * @deprecated Use SpacesGetRequest instead. */ -export type SpacesGetResponse = { space: SpaceResource } +export type SpacesGetResponse = { space: Space } export type SpacesGetRequest = SeamHttpRequest @@ -446,7 +446,7 @@ export type SpacesGetRelatedParameters = { /** * @deprecated Use SpacesGetRelatedRequest instead. */ -export type SpacesGetRelatedResponse = { batch: UnknownResource } +export type SpacesGetRelatedResponse = { batch: Unknown } export type SpacesGetRelatedRequest = SeamHttpRequest< SpacesGetRelatedResponse, @@ -466,7 +466,7 @@ export type SpacesListParameters = { /** * @deprecated Use SpacesListRequest instead. */ -export type SpacesListResponse = { spaces: Array } +export type SpacesListResponse = { spaces: Array } export type SpacesListRequest = SeamHttpRequest @@ -539,7 +539,7 @@ export type SpacesUpdateParameters = { /** * @deprecated Use SpacesUpdateRequest instead. */ -export type SpacesUpdateResponse = { space: SpaceResource } +export type SpacesUpdateResponse = { space: Space } export type SpacesUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts index af46a9a4..847adbe7 100644 --- a/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +++ b/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' -import type { ThermostatDailyProgramResource } from 'lib/seam/connect/resources/thermostat-daily-program.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' +import type { ThermostatDailyProgram } from 'lib/seam/connect/resources/thermostat-daily-program.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' @@ -220,7 +220,7 @@ export type ThermostatsDailyProgramsCreateParameters = { * @deprecated Use ThermostatsDailyProgramsCreateRequest instead. */ export type ThermostatsDailyProgramsCreateResponse = { - thermostat_daily_program: ThermostatDailyProgramResource + thermostat_daily_program: ThermostatDailyProgram } export type ThermostatsDailyProgramsCreateRequest = SeamHttpRequest< @@ -261,7 +261,7 @@ export type ThermostatsDailyProgramsUpdateParameters = { * @deprecated Use ThermostatsDailyProgramsUpdateRequest instead. */ export type ThermostatsDailyProgramsUpdateResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type ThermostatsDailyProgramsUpdateRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts index 113a00b3..feda5b7d 100644 --- a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts +++ b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ThermostatScheduleResource } from 'lib/seam/connect/resources/thermostat-schedule.js' +import type { ThermostatSchedule } from 'lib/seam/connect/resources/thermostat-schedule.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' @@ -244,7 +244,7 @@ export type ThermostatsSchedulesCreateParameters = { * @deprecated Use ThermostatsSchedulesCreateRequest instead. */ export type ThermostatsSchedulesCreateResponse = { - thermostat_schedule: ThermostatScheduleResource + thermostat_schedule: ThermostatSchedule } export type ThermostatsSchedulesCreateRequest = SeamHttpRequest< @@ -275,7 +275,7 @@ export type ThermostatsSchedulesGetParameters = { * @deprecated Use ThermostatsSchedulesGetRequest instead. */ export type ThermostatsSchedulesGetResponse = { - thermostat_schedule: ThermostatScheduleResource + thermostat_schedule: ThermostatSchedule } export type ThermostatsSchedulesGetRequest = SeamHttpRequest< @@ -295,7 +295,7 @@ export type ThermostatsSchedulesListParameters = { * @deprecated Use ThermostatsSchedulesListRequest instead. */ export type ThermostatsSchedulesListResponse = { - thermostat_schedules: Array + thermostat_schedules: Array } export type ThermostatsSchedulesListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index cab4ac7f..0124be30 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' -import type { DeviceResource } from 'lib/seam/connect/resources/device.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' +import type { Device } from 'lib/seam/connect/resources/device.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' @@ -374,7 +374,7 @@ export type ThermostatsActivateClimatePresetParameters = { * @deprecated Use ThermostatsActivateClimatePresetRequest instead. */ export type ThermostatsActivateClimatePresetResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type ThermostatsActivateClimatePresetRequest = SeamHttpRequest< @@ -396,7 +396,7 @@ export type ThermostatsCoolParameters = { /** * @deprecated Use ThermostatsCoolRequest instead. */ -export type ThermostatsCoolResponse = { action_attempt: ActionAttemptResource } +export type ThermostatsCoolResponse = { action_attempt: ActionAttempt } export type ThermostatsCoolRequest = SeamHttpRequest< ThermostatsCoolResponse, @@ -472,7 +472,7 @@ export type ThermostatsHeatParameters = { /** * @deprecated Use ThermostatsHeatRequest instead. */ -export type ThermostatsHeatResponse = { action_attempt: ActionAttemptResource } +export type ThermostatsHeatResponse = { action_attempt: ActionAttempt } export type ThermostatsHeatRequest = SeamHttpRequest< ThermostatsHeatResponse, @@ -496,9 +496,7 @@ export type ThermostatsHeatCoolParameters = { /** * @deprecated Use ThermostatsHeatCoolRequest instead. */ -export type ThermostatsHeatCoolResponse = { - action_attempt: ActionAttemptResource -} +export type ThermostatsHeatCoolResponse = { action_attempt: ActionAttempt } export type ThermostatsHeatCoolRequest = SeamHttpRequest< ThermostatsHeatCoolResponse, @@ -555,7 +553,7 @@ export type ThermostatsListParameters = { /** * @deprecated Use ThermostatsListRequest instead. */ -export type ThermostatsListResponse = { devices: Array } +export type ThermostatsListResponse = { devices: Array } export type ThermostatsListRequest = SeamHttpRequest< ThermostatsListResponse, @@ -571,7 +569,7 @@ export type ThermostatsOffParameters = { /** * @deprecated Use ThermostatsOffRequest instead. */ -export type ThermostatsOffResponse = { action_attempt: ActionAttemptResource } +export type ThermostatsOffResponse = { action_attempt: ActionAttempt } export type ThermostatsOffRequest = SeamHttpRequest< ThermostatsOffResponse, @@ -611,9 +609,7 @@ export type ThermostatsSetFanModeParameters = { /** * @deprecated Use ThermostatsSetFanModeRequest instead. */ -export type ThermostatsSetFanModeResponse = { - action_attempt: ActionAttemptResource -} +export type ThermostatsSetFanModeResponse = { action_attempt: ActionAttempt } export type ThermostatsSetFanModeRequest = SeamHttpRequest< ThermostatsSetFanModeResponse, @@ -639,9 +635,7 @@ export type ThermostatsSetHvacModeParameters = { /** * @deprecated Use ThermostatsSetHvacModeRequest instead. */ -export type ThermostatsSetHvacModeResponse = { - action_attempt: ActionAttemptResource -} +export type ThermostatsSetHvacModeResponse = { action_attempt: ActionAttempt } export type ThermostatsSetHvacModeRequest = SeamHttpRequest< ThermostatsSetHvacModeResponse, @@ -726,7 +720,7 @@ export type ThermostatsUpdateWeeklyProgramParameters = { * @deprecated Use ThermostatsUpdateWeeklyProgramRequest instead. */ export type ThermostatsUpdateWeeklyProgramResponse = { - action_attempt: ActionAttemptResource + action_attempt: ActionAttempt } export type ThermostatsUpdateWeeklyProgramRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts index 7614ec5c..bd42815b 100644 --- a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { UnknownResource } from 'lib/seam/connect/resources/unknown.js' +import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -211,9 +211,7 @@ export type UserIdentitiesUnmanagedGetParameters = { /** * @deprecated Use UserIdentitiesUnmanagedGetRequest instead. */ -export type UserIdentitiesUnmanagedGetResponse = { - user_identity: UnknownResource -} +export type UserIdentitiesUnmanagedGetResponse = { user_identity: Unknown } export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< UserIdentitiesUnmanagedGetResponse, @@ -233,7 +231,7 @@ export type UserIdentitiesUnmanagedListParameters = { * @deprecated Use UserIdentitiesUnmanagedListRequest instead. */ export type UserIdentitiesUnmanagedListResponse = { - user_identities: Array + user_identities: Array } export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/user-identities/user-identities.ts b/src/lib/seam/connect/routes/user-identities/user-identities.ts index 743baafc..c243c03d 100644 --- a/src/lib/seam/connect/routes/user-identities/user-identities.ts +++ b/src/lib/seam/connect/routes/user-identities/user-identities.ts @@ -29,12 +29,12 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { AcsEntranceResource } from 'lib/seam/connect/resources/acs-entrance.js' -import type { AcsSystemResource } from 'lib/seam/connect/resources/acs-system.js' -import type { AcsUserResource } from 'lib/seam/connect/resources/acs-user.js' -import type { DeviceResource } from 'lib/seam/connect/resources/device.js' -import type { InstantKeyResource } from 'lib/seam/connect/resources/instant-key.js' -import type { UserIdentityResource } from 'lib/seam/connect/resources/user-identity.js' +import type { AcsEntrance } from 'lib/seam/connect/resources/acs-entrance.js' +import type { AcsSystem } from 'lib/seam/connect/resources/acs-system.js' +import type { AcsUser } from 'lib/seam/connect/resources/acs-user.js' +import type { Device } from 'lib/seam/connect/resources/device.js' +import type { InstantKey } from 'lib/seam/connect/resources/instant-key.js' +import type { UserIdentity } from 'lib/seam/connect/resources/user-identity.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' @@ -385,9 +385,7 @@ export type UserIdentitiesCreateParameters = { /** * @deprecated Use UserIdentitiesCreateRequest instead. */ -export type UserIdentitiesCreateResponse = { - user_identity: UserIdentityResource -} +export type UserIdentitiesCreateResponse = { user_identity: UserIdentity } export type UserIdentitiesCreateRequest = SeamHttpRequest< UserIdentitiesCreateResponse, @@ -419,7 +417,7 @@ export type UserIdentitiesGenerateInstantKeyParameters = { * @deprecated Use UserIdentitiesGenerateInstantKeyRequest instead. */ export type UserIdentitiesGenerateInstantKeyResponse = { - instant_key: InstantKeyResource + instant_key: InstantKey } export type UserIdentitiesGenerateInstantKeyRequest = SeamHttpRequest< @@ -437,7 +435,7 @@ export type UserIdentitiesGetParameters = { /** * @deprecated Use UserIdentitiesGetRequest instead. */ -export type UserIdentitiesGetResponse = { user_identity: UserIdentityResource } +export type UserIdentitiesGetResponse = { user_identity: UserIdentity } export type UserIdentitiesGetRequest = SeamHttpRequest< UserIdentitiesGetResponse, @@ -477,7 +475,7 @@ export type UserIdentitiesListParameters = { * @deprecated Use UserIdentitiesListRequest instead. */ export type UserIdentitiesListResponse = { - user_identities: Array + user_identities: Array } export type UserIdentitiesListRequest = SeamHttpRequest< @@ -495,7 +493,7 @@ export type UserIdentitiesListAccessibleDevicesParameters = { * @deprecated Use UserIdentitiesListAccessibleDevicesRequest instead. */ export type UserIdentitiesListAccessibleDevicesResponse = { - devices: Array + devices: Array } export type UserIdentitiesListAccessibleDevicesRequest = SeamHttpRequest< @@ -513,7 +511,7 @@ export type UserIdentitiesListAccessibleEntrancesParameters = { * @deprecated Use UserIdentitiesListAccessibleEntrancesRequest instead. */ export type UserIdentitiesListAccessibleEntrancesResponse = { - acs_entrances: Array + acs_entrances: Array } export type UserIdentitiesListAccessibleEntrancesRequest = SeamHttpRequest< @@ -531,7 +529,7 @@ export type UserIdentitiesListAcsSystemsParameters = { * @deprecated Use UserIdentitiesListAcsSystemsRequest instead. */ export type UserIdentitiesListAcsSystemsResponse = { - acs_systems: Array + acs_systems: Array } export type UserIdentitiesListAcsSystemsRequest = SeamHttpRequest< @@ -548,9 +546,7 @@ export type UserIdentitiesListAcsUsersParameters = { /** * @deprecated Use UserIdentitiesListAcsUsersRequest instead. */ -export type UserIdentitiesListAcsUsersResponse = { - acs_users: Array -} +export type UserIdentitiesListAcsUsersResponse = { acs_users: Array } export type UserIdentitiesListAcsUsersRequest = SeamHttpRequest< UserIdentitiesListAcsUsersResponse, diff --git a/src/lib/seam/connect/routes/webhooks/webhooks.ts b/src/lib/seam/connect/routes/webhooks/webhooks.ts index 43e99633..f3a63d09 100644 --- a/src/lib/seam/connect/routes/webhooks/webhooks.ts +++ b/src/lib/seam/connect/routes/webhooks/webhooks.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { WebhookResource } from 'lib/seam/connect/resources/webhook.js' +import type { Webhook } from 'lib/seam/connect/resources/webhook.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' @@ -235,7 +235,7 @@ export type WebhooksCreateParameters = { /** * @deprecated Use WebhooksCreateRequest instead. */ -export type WebhooksCreateResponse = { webhook: WebhookResource } +export type WebhooksCreateResponse = { webhook: Webhook } export type WebhooksCreateRequest = SeamHttpRequest< WebhooksCreateResponse, @@ -264,7 +264,7 @@ export type WebhooksGetParameters = { /** * @deprecated Use WebhooksGetRequest instead. */ -export type WebhooksGetResponse = { webhook: WebhookResource } +export type WebhooksGetResponse = { webhook: Webhook } export type WebhooksGetRequest = SeamHttpRequest @@ -275,7 +275,7 @@ export type WebhooksListParameters = {} /** * @deprecated Use WebhooksListRequest instead. */ -export type WebhooksListResponse = { webhooks: Array } +export type WebhooksListResponse = { webhooks: Array } export type WebhooksListRequest = SeamHttpRequest< WebhooksListResponse, diff --git a/src/lib/seam/connect/routes/workspaces/workspaces.ts b/src/lib/seam/connect/routes/workspaces/workspaces.ts index 184c6bd0..a8145330 100644 --- a/src/lib/seam/connect/routes/workspaces/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces/workspaces.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { ActionAttemptResource } from 'lib/seam/connect/resources/action-attempt.js' -import type { WorkspaceResource } from 'lib/seam/connect/resources/workspace.js' +import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' +import type { Workspace } from 'lib/seam/connect/resources/workspace.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' @@ -252,7 +252,7 @@ export type WorkspacesCreateParameters = { /** * @deprecated Use WorkspacesCreateRequest instead. */ -export type WorkspacesCreateResponse = { workspace: WorkspaceResource } +export type WorkspacesCreateResponse = { workspace: Workspace } export type WorkspacesCreateRequest = SeamHttpRequest< WorkspacesCreateResponse, @@ -266,7 +266,7 @@ export type WorkspacesGetParameters = {} /** * @deprecated Use WorkspacesGetRequest instead. */ -export type WorkspacesGetResponse = { workspace: WorkspaceResource } +export type WorkspacesGetResponse = { workspace: Workspace } export type WorkspacesGetRequest = SeamHttpRequest< WorkspacesGetResponse, @@ -280,7 +280,7 @@ export type WorkspacesListParameters = {} /** * @deprecated Use WorkspacesListRequest instead. */ -export type WorkspacesListResponse = { workspaces: Array } +export type WorkspacesListResponse = { workspaces: Array } export type WorkspacesListRequest = SeamHttpRequest< WorkspacesListResponse, @@ -294,9 +294,7 @@ export type WorkspacesResetSandboxParameters = {} /** * @deprecated Use WorkspacesResetSandboxRequest instead. */ -export type WorkspacesResetSandboxResponse = { - action_attempt: ActionAttemptResource -} +export type WorkspacesResetSandboxResponse = { action_attempt: ActionAttempt } export type WorkspacesResetSandboxRequest = SeamHttpRequest< WorkspacesResetSandboxResponse, From 65cf1fca2e373c23025c34b61de4dace8d9228bc Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:25:16 -0500 Subject: [PATCH 11/17] Export resources --- src/lib/seam/connect/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/seam/connect/index.ts b/src/lib/seam/connect/index.ts index 48d44d5c..89639439 100644 --- a/src/lib/seam/connect/index.ts +++ b/src/lib/seam/connect/index.ts @@ -11,6 +11,7 @@ export { SeamActionAttemptTimeoutError, } from './resolve-action-attempt.js' export * from './routes/index.js' +export * from './resources/index.js' export * from './seam-http-error.js' export * from './seam-http-request.js' export * from './seam-paginator.js' From 46cc6962da2ec57f9d1dac888885c1872a84f51f Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Mon, 27 Jul 2026 23:26:10 +0000 Subject: [PATCH 12/17] ci: Format code --- src/lib/seam/connect/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/seam/connect/index.ts b/src/lib/seam/connect/index.ts index 89639439..210bbaf1 100644 --- a/src/lib/seam/connect/index.ts +++ b/src/lib/seam/connect/index.ts @@ -10,8 +10,8 @@ export { SeamActionAttemptFailedError, SeamActionAttemptTimeoutError, } from './resolve-action-attempt.js' -export * from './routes/index.js' export * from './resources/index.js' +export * from './routes/index.js' export * from './seam-http-error.js' export * from './seam-http-request.js' export * from './seam-paginator.js' From 8f6f47976225ddd0421d468b113cfea340d63c72 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 18:29:20 -0500 Subject: [PATCH 13/17] Remove unknown resource --- codegen/layouts/resource.hbs | 2 +- codegen/lib/layouts/resources.ts | 24 +++++++---------------- codegen/lib/layouts/route.ts | 11 +++++++++-- src/lib/seam/connect/resources/index.ts | 1 - src/lib/seam/connect/resources/unknown.ts | 6 ------ 5 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 src/lib/seam/connect/resources/unknown.ts diff --git a/codegen/layouts/resource.hbs b/codegen/layouts/resource.hbs index 1113c78b..250c3896 100644 --- a/codegen/layouts/resource.hbs +++ b/codegen/layouts/resource.hbs @@ -3,4 +3,4 @@ * Do not edit this file. */ -export type {{typeName}} = {{#if isUnknown}}Record{{else}}{{#each resources}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}}{{/if}} +export type {{typeName}} = {{#each resources}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}} diff --git a/codegen/lib/layouts/resources.ts b/codegen/lib/layouts/resources.ts index 4a536a6e..24bbbbbe 100644 --- a/codegen/lib/layouts/resources.ts +++ b/codegen/lib/layouts/resources.ts @@ -5,7 +5,6 @@ export interface ResourceLayoutContext { fileName: string typeName: string resources: Resource[] - isUnknown: boolean } export interface ResourceIndexLayoutContext { @@ -27,20 +26,11 @@ export const getResourceLayoutContexts = ( ...new Set(resources.map(({ resourceType }) => resourceType)), ] - return [ - { - fileName: 'unknown.ts', - typeName: getResourceTypeName('unknown'), - resources: [], - isUnknown: true, - }, - ...resourceTypes.map((resourceType) => ({ - fileName: `${kebabCase(resourceType)}.ts`, - typeName: getResourceTypeName(resourceType), - resources: resources.filter( - (resource) => resource.resourceType === resourceType, - ), - isUnknown: false, - })), - ] + return resourceTypes.map((resourceType) => ({ + fileName: `${kebabCase(resourceType)}.ts`, + typeName: getResourceTypeName(resourceType), + resources: resources.filter( + (resource) => resource.resourceType === resourceType, + ), + })) } diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 6f2307f9..6d403b8b 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -60,7 +60,12 @@ export const setRouteLayoutContext = ( ? [ ...new Set( node.endpoints.flatMap((endpoint) => { - if (endpoint.response.responseType === 'void') return [] + if ( + endpoint.response.responseType === 'void' || + endpoint.response.resourceType === 'unknown' + ) { + return [] + } return [endpoint.response.resourceType] }), ), @@ -131,7 +136,9 @@ export const getEndpointLayoutContext = ( responseResourceTypeName: endpoint.response.responseType === 'void' ? '' - : getResourceTypeName(endpoint.response.resourceType), + : endpoint.response.resourceType === 'unknown' + ? 'unknown' + : getResourceTypeName(endpoint.response.resourceType), ...getResponseContext(endpoint), } } diff --git a/src/lib/seam/connect/resources/index.ts b/src/lib/seam/connect/resources/index.ts index 391f319e..14b60430 100644 --- a/src/lib/seam/connect/resources/index.ts +++ b/src/lib/seam/connect/resources/index.ts @@ -27,7 +27,6 @@ export type { Phone } from './phone.js' export type { Space } from './space.js' export type { ThermostatDailyProgram } from './thermostat-daily-program.js' export type { ThermostatSchedule } from './thermostat-schedule.js' -export type { Unknown } from './unknown.js' export type { UnmanagedAccessCode } from './unmanaged-access-code.js' export type { UnmanagedDevice } from './unmanaged-device.js' export type { UserIdentity } from './user-identity.js' diff --git a/src/lib/seam/connect/resources/unknown.ts b/src/lib/seam/connect/resources/unknown.ts deleted file mode 100644 index d23bfc63..00000000 --- a/src/lib/seam/connect/resources/unknown.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Automatically generated by codegen/smith.ts. - * Do not edit this file. - */ - -export type Unknown = Record From 34505df27c24600fa2208d22e7c1242d4036a68a Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 20:29:51 -0500 Subject: [PATCH 14/17] Impliment batch resource --- codegen/layouts/resource.hbs | 16 ++++++++++++ codegen/lib/layouts/resources.ts | 29 +++++++++++++++++++++ codegen/lib/layouts/route.ts | 44 ++++++++++++++++++++++---------- 3 files changed, 76 insertions(+), 13 deletions(-) diff --git a/codegen/layouts/resource.hbs b/codegen/layouts/resource.hbs index 250c3896..855cbaec 100644 --- a/codegen/layouts/resource.hbs +++ b/codegen/layouts/resource.hbs @@ -3,4 +3,20 @@ * Do not edit this file. */ +{{#if isBatch}} +{{#each batchResources}} +import type { {{typeName}} } from './{{fileName}}' +{{/each}} + +interface BatchResourceMap { +{{#each batchResources}} + {{json batchKey}}: {{typeName}} +{{/each}} +} + +export type {{typeName}} = { + [K in TKey]?: Array | undefined +} +{{else}} export type {{typeName}} = {{#each resources}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}} +{{/if}} diff --git a/codegen/lib/layouts/resources.ts b/codegen/lib/layouts/resources.ts index 24bbbbbe..02326a62 100644 --- a/codegen/lib/layouts/resources.ts +++ b/codegen/lib/layouts/resources.ts @@ -5,12 +5,20 @@ export interface ResourceLayoutContext { fileName: string typeName: string resources: Resource[] + isBatch: boolean + batchResources: BatchResourceLayoutContext[] } export interface ResourceIndexLayoutContext { resources: Array> } +interface BatchResourceLayoutContext { + batchKey: string + fileName: string + typeName: string +} + export const getResourceTypeName = (resourceType: string): string => resourceType === 'event' ? 'SeamEvent' : pascalCase(resourceType) @@ -25,6 +33,7 @@ export const getResourceLayoutContexts = ( const resourceTypes = [ ...new Set(resources.map(({ resourceType }) => resourceType)), ] + const batchResources = getBatchResourceLayoutContexts(resources) return resourceTypes.map((resourceType) => ({ fileName: `${kebabCase(resourceType)}.ts`, @@ -32,5 +41,25 @@ export const getResourceLayoutContexts = ( resources: resources.filter( (resource) => resource.resourceType === resourceType, ), + isBatch: resourceType === 'batch', + batchResources: resourceType === 'batch' ? batchResources : [], })) } + +const getBatchResourceLayoutContexts = ( + resources: Resource[], +): BatchResourceLayoutContext[] => { + const batch = resources.find(({ resourceType }) => resourceType === 'batch') + if (batch == null) return [] + + return batch.properties.flatMap((property) => { + if (!('resourceType' in property)) return [] + return [ + { + batchKey: property.name, + fileName: `${kebabCase(property.resourceType)}.js`, + typeName: getResourceTypeName(property.resourceType), + }, + ] + }) +} diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 6d403b8b..f7e656fe 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -58,17 +58,7 @@ export const setRouteLayoutContext = ( file.resourceTypeImports = node != null && 'endpoints' in node ? [ - ...new Set( - node.endpoints.flatMap((endpoint) => { - if ( - endpoint.response.responseType === 'void' || - endpoint.response.resourceType === 'unknown' - ) { - return [] - } - return [endpoint.response.resourceType] - }), - ), + ...new Set(node.endpoints.flatMap(getEndpointResponseResourceTypes)), ].map((resourceType) => ({ fileName: `${kebabCase(resourceType)}.js`, typeName: getResourceTypeName(resourceType), @@ -104,6 +94,18 @@ export const getEndpointLayoutContext = ( ): EndpointLayoutContext => { const prefix = pascalCase([route.path.split('/'), endpoint.name].join('_')) + const batchResourceKeys = getBatchResourceKeys(endpoint) + + if ( + endpoint.response.responseType !== 'void' && + endpoint.response.resourceType === 'unknown' && + batchResourceKeys.length === 0 + ) { + throw new Error( + `Cannot generate ${endpoint.path}: response resource type is unknown`, + ) + } + const requestFormat = ['GET', 'DELETE'].includes( endpoint.request.preferredMethod, ) @@ -136,13 +138,29 @@ export const getEndpointLayoutContext = ( responseResourceTypeName: endpoint.response.responseType === 'void' ? '' - : endpoint.response.resourceType === 'unknown' - ? 'unknown' + : batchResourceKeys.length > 0 + ? `Batch<${batchResourceKeys.map((key) => `'${key}'`).join(' | ')}>` : getResourceTypeName(endpoint.response.resourceType), ...getResponseContext(endpoint), } } +const getEndpointResponseResourceTypes = (endpoint: Endpoint): string[] => { + if (endpoint.response.responseType === 'void') return [] + if (endpoint.response.responseType === 'resource') { + const { batchResourceTypes } = endpoint.response + if (batchResourceTypes != null) return ['batch'] + } + return [endpoint.response.resourceType] +} + +const getBatchResourceKeys = (endpoint: Endpoint): string[] => { + if (endpoint.response.responseType !== 'resource') return [] + return ( + endpoint.response.batchResourceTypes?.map(({ batchKey }) => batchKey) ?? [] + ) +} + const getResponseContext = ( endpoint: Endpoint, ): Pick => { From 1b9a1960032252e563d656d4bd43851e7f41ced6 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 20:30:05 -0500 Subject: [PATCH 15/17] Update types --- 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 30a51bd9..db8b1278 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^1.0.0", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.982.0", + "@seamapi/types": "1.983.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", @@ -1061,9 +1061,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.982.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.982.0.tgz", - "integrity": "sha512-u8jRqmsFwDEMAxtKBulXJQj1ZDHsqgJclxL/McLpS7si4eFnb5r2YJ3LObLMbVO1G5N/mPzpahZQi5bbrlAApw==", + "version": "1.983.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.983.0.tgz", + "integrity": "sha512-SMkfn1SVC70x67mtRAvLMJtpFh/0zaStLatb6LA+kz9n/rV1gBS/UlH8SzBFg7iStE22f/VPjkdltHTIY1paoA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 98e14ffc..6da0eb00 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "@seamapi/blueprint": "^1.0.0", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^1.1.0", - "@seamapi/types": "1.982.0", + "@seamapi/types": "1.983.0", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^24.10.9", "ava": "^8.0.1", From 2bdc40ea17bcc0125421b6564aaafb680aa51a7e Mon Sep 17 00:00:00 2001 From: Seam Bot Date: Tue, 28 Jul 2026 01:30:58 +0000 Subject: [PATCH 16/17] ci: Generate code --- package-lock.json | 2 +- package.json | 2 +- src/lib/seam/connect/resources/batch.ts | 81 ++++++--- src/lib/seam/connect/resources/index.ts | 3 + .../resources/unmanaged-access-grant.ts | 164 ++++++++++++++++++ .../resources/unmanaged-access-method.ts | 114 ++++++++++++ .../resources/unmanaged-user-identity.ts | 48 +++++ .../routes/access-grants/access-grants.ts | 15 +- .../access-grants/unmanaged/unmanaged.ts | 8 +- .../routes/access-methods/access-methods.ts | 15 +- .../access-methods/unmanaged/unmanaged.ts | 8 +- src/lib/seam/connect/routes/spaces/spaces.ts | 13 +- .../user-identities/unmanaged/unmanaged.ts | 8 +- 13 files changed, 439 insertions(+), 42 deletions(-) create mode 100644 src/lib/seam/connect/resources/unmanaged-access-grant.ts create mode 100644 src/lib/seam/connect/resources/unmanaged-access-method.ts create mode 100644 src/lib/seam/connect/resources/unmanaged-user-identity.ts diff --git a/package-lock.json b/package-lock.json index db8b1278..71f3daed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -47,7 +47,7 @@ "npm": ">=10.9.4" }, "peerDependencies": { - "@seamapi/types": "^1.982.0" + "@seamapi/types": "^1.983.0" }, "peerDependenciesMeta": { "@seamapi/types": { diff --git a/package.json b/package.json index 6da0eb00..91e66c98 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ } }, "peerDependencies": { - "@seamapi/types": "^1.982.0" + "@seamapi/types": "^1.983.0" }, "peerDependenciesMeta": { "@seamapi/types": { diff --git a/src/lib/seam/connect/resources/batch.ts b/src/lib/seam/connect/resources/batch.ts index d81807f8..22cd4768 100644 --- a/src/lib/seam/connect/resources/batch.ts +++ b/src/lib/seam/connect/resources/batch.ts @@ -3,29 +3,60 @@ * Do not edit this file. */ -export type Batch = { - access_codes?: Record | undefined - access_grants?: Record | undefined - access_methods?: Record | undefined - acs_access_groups?: Record | undefined - acs_credentials?: Record | undefined - acs_encoders?: Record | undefined - acs_entrances?: Record | undefined - acs_systems?: Record | undefined - acs_users?: Record | undefined - action_attempts?: Record | undefined - client_sessions?: Record | undefined - connect_webviews?: Record | undefined - connected_accounts?: Record | undefined - devices?: Record | undefined - events?: Record | undefined - instant_keys?: Record | undefined - noise_thresholds?: Record | undefined - spaces?: Record | undefined - thermostat_daily_programs?: Record | undefined - thermostat_schedules?: Record | undefined - unmanaged_access_codes?: Record | undefined - unmanaged_devices?: Record | undefined - user_identities?: Record | undefined - workspaces?: Record | undefined +import type { AccessCode } from './access-code.js' +import type { AccessGrant } from './access-grant.js' +import type { AccessMethod } from './access-method.js' +import type { AcsAccessGroup } from './acs-access-group.js' +import type { AcsCredential } from './acs-credential.js' +import type { AcsEncoder } from './acs-encoder.js' +import type { AcsEntrance } from './acs-entrance.js' +import type { AcsSystem } from './acs-system.js' +import type { AcsUser } from './acs-user.js' +import type { ActionAttempt } from './action-attempt.js' +import type { ClientSession } from './client-session.js' +import type { ConnectWebview } from './connect-webview.js' +import type { ConnectedAccount } from './connected-account.js' +import type { Device } from './device.js' +import type { SeamEvent } from './event.js' +import type { InstantKey } from './instant-key.js' +import type { NoiseThreshold } from './noise-threshold.js' +import type { Space } from './space.js' +import type { ThermostatDailyProgram } from './thermostat-daily-program.js' +import type { ThermostatSchedule } from './thermostat-schedule.js' +import type { UnmanagedAccessCode } from './unmanaged-access-code.js' +import type { UnmanagedDevice } from './unmanaged-device.js' +import type { UserIdentity } from './user-identity.js' +import type { Workspace } from './workspace.js' + +interface BatchResourceMap { + access_codes: AccessCode + access_grants: AccessGrant + access_methods: AccessMethod + acs_access_groups: AcsAccessGroup + acs_credentials: AcsCredential + acs_encoders: AcsEncoder + acs_entrances: AcsEntrance + acs_systems: AcsSystem + acs_users: AcsUser + action_attempts: ActionAttempt + client_sessions: ClientSession + connect_webviews: ConnectWebview + connected_accounts: ConnectedAccount + devices: Device + events: SeamEvent + instant_keys: InstantKey + noise_thresholds: NoiseThreshold + spaces: Space + thermostat_daily_programs: ThermostatDailyProgram + thermostat_schedules: ThermostatSchedule + unmanaged_access_codes: UnmanagedAccessCode + unmanaged_devices: UnmanagedDevice + user_identities: UserIdentity + workspaces: Workspace +} + +export type Batch< + TKey extends keyof BatchResourceMap = keyof BatchResourceMap, +> = { + [K in TKey]?: Array | undefined } diff --git a/src/lib/seam/connect/resources/index.ts b/src/lib/seam/connect/resources/index.ts index 14b60430..1570f8b1 100644 --- a/src/lib/seam/connect/resources/index.ts +++ b/src/lib/seam/connect/resources/index.ts @@ -28,7 +28,10 @@ export type { Space } from './space.js' export type { ThermostatDailyProgram } from './thermostat-daily-program.js' export type { ThermostatSchedule } from './thermostat-schedule.js' export type { UnmanagedAccessCode } from './unmanaged-access-code.js' +export type { UnmanagedAccessGrant } from './unmanaged-access-grant.js' +export type { UnmanagedAccessMethod } from './unmanaged-access-method.js' export type { UnmanagedDevice } from './unmanaged-device.js' +export type { UnmanagedUserIdentity } from './unmanaged-user-identity.js' export type { UserIdentity } from './user-identity.js' export type { Webhook } from './webhook.js' export type { Workspace } from './workspace.js' diff --git a/src/lib/seam/connect/resources/unmanaged-access-grant.ts b/src/lib/seam/connect/resources/unmanaged-access-grant.ts new file mode 100644 index 00000000..21751075 --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-access-grant.ts @@ -0,0 +1,164 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UnmanagedAccessGrant = { + access_grant_id: string + + access_method_ids: Array + + created_at: string + + display_name: string + + ends_at: string | null + errors: Array<{ + created_at: string + + error_code: 'cannot_create_requested_access_methods' + + message: string + + missing_device_ids?: Array | undefined + }> + + location_ids: Array + + name: string | null + pending_mutations: Array< + | { + created_at: string + + from: { + device_ids: Array + } + + message: string + + mutation_code: 'updating_spaces' + + to: { + common_code_key?: string | null | undefined + device_ids: Array + } + } + | { + access_method_ids: Array + + created_at: string + + from: { + ends_at: string | null + starts_at: string | null + } + + message: string + + mutation_code: 'updating_access_times' + + to: { + ends_at: string | null + starts_at: string | null + } + } + > + + requested_access_methods: Array<{ + code?: string | undefined + created_access_method_ids: Array + + created_at: string + + display_name: string + + instant_key_max_use_count?: number | undefined + mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' + }> + + reservation_key?: string | undefined + space_ids: Array + + starts_at: string + + user_identity_id?: string | undefined + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'being_deleted' + } + | { + created_at: string + + message: string + + warning_code: 'underprovisioned_access' + } + | { + created_at: string + + failed_devices?: + | Array<{ + device_id: string + + error_code: string + + message: string + }> + | undefined + message: string + + warning_code: 'overprovisioned_access' + } + | { + access_method_ids: Array + + created_at: string + + message: string + + warning_code: 'updating_access_times' + } + | { + created_at: string + + device_id: string + + message: string + + new_code: string + + original_code: string + + warning_code: 'requested_code_unavailable' + } + | { + created_at: string + + device_id: string + + message: string + + warning_code: 'device_does_not_support_access_codes' + } + | { + created_at: string + + device_id: string + + message: string + + reason: + | 'duration_exceeds_max' + | 'times_do_not_match_slots' + | 'ongoing_not_supported' + + warning_code: 'device_time_constraints_violated' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/unmanaged-access-method.ts b/src/lib/seam/connect/resources/unmanaged-access-method.ts new file mode 100644 index 00000000..7fc93d8c --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-access-method.ts @@ -0,0 +1,114 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UnmanagedAccessMethod = { + access_method_id: string + + code?: string | null | undefined + created_at: string + + display_name: string + + errors: Array<{ + created_at: string + + error_code: 'failed_to_issue' + + message: string + }> + + is_assignment_required?: boolean | undefined + is_encoding_required?: boolean | undefined + is_issued: boolean + + is_ready_for_assignment?: boolean | undefined + is_ready_for_encoding?: boolean | undefined + issued_at: string | null + mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' + + pending_mutations: Array< + | { + created_at: string + + from: { + device_ids: Array + } + + message: string + + mutation_code: 'provisioning_access' + + to: { + device_ids: Array + } + } + | { + created_at: string + + from: { + device_ids: Array + } + + message: string + + mutation_code: 'revoking_access' + + to: { + device_ids: Array + } + } + | { + created_at: string + + from: { + ends_at: string | null + starts_at: string | null + } + + message: string + + mutation_code: 'updating_access_times' + + to: { + ends_at: string | null + starts_at: string | null + } + } + > + + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'being_deleted' + } + | { + created_at: string + + message: string + + warning_code: 'updating_access_times' + } + | { + created_at: string + + message: string + + original_access_method_id?: string | undefined + warning_code: 'pulled_backup_access_code' + } + | { + created_at: string + + message: string + + warning_code: 'delay_in_issuing' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/unmanaged-user-identity.ts b/src/lib/seam/connect/resources/unmanaged-user-identity.ts new file mode 100644 index 00000000..d79c80e2 --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-user-identity.ts @@ -0,0 +1,48 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UnmanagedUserIdentity = { + acs_user_ids: Array + + created_at: string + + display_name: string + + email_address: string | null + errors: Array<{ + acs_system_id: string + + acs_user_id: string + + created_at: string + + error_code: 'issue_with_acs_user' + + message: string + }> + + full_name: string | null + phone_number: string | null + user_identity_id: string + + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'being_deleted' + } + | { + created_at: string + + message: string + + warning_code: 'acs_user_profile_does_not_match_user_identity' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/routes/access-grants/access-grants.ts b/src/lib/seam/connect/routes/access-grants/access-grants.ts index 503a0530..2afab059 100644 --- a/src/lib/seam/connect/routes/access-grants/access-grants.ts +++ b/src/lib/seam/connect/routes/access-grants/access-grants.ts @@ -30,7 +30,7 @@ import { parseOptions, } from 'lib/seam/connect/parse-options.js' import type { AccessGrant } from 'lib/seam/connect/resources/access-grant.js' -import type { Unknown } from 'lib/seam/connect/resources/unknown.js' +import type { Batch } from 'lib/seam/connect/resources/batch.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' @@ -370,7 +370,18 @@ export type AccessGrantsGetRelatedParameters = { /** * @deprecated Use AccessGrantsGetRelatedRequest instead. */ -export type AccessGrantsGetRelatedResponse = { batch: Unknown } +export type AccessGrantsGetRelatedResponse = { + batch: Batch< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'connected_accounts' + | 'acs_systems' + | 'user_identities' + | 'acs_access_groups' + | 'access_methods' + > +} export type AccessGrantsGetRelatedRequest = SeamHttpRequest< AccessGrantsGetRelatedResponse, diff --git a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts index 1502a027..b2f36f91 100644 --- a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { Unknown } from 'lib/seam/connect/resources/unknown.js' +import type { UnmanagedAccessGrant } from 'lib/seam/connect/resources/unmanaged-access-grant.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' @@ -208,7 +208,9 @@ export type AccessGrantsUnmanagedGetParameters = { /** * @deprecated Use AccessGrantsUnmanagedGetRequest instead. */ -export type AccessGrantsUnmanagedGetResponse = { access_grant: Unknown } +export type AccessGrantsUnmanagedGetResponse = { + access_grant: UnmanagedAccessGrant +} export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< AccessGrantsUnmanagedGetResponse, @@ -230,7 +232,7 @@ export type AccessGrantsUnmanagedListParameters = { * @deprecated Use AccessGrantsUnmanagedListRequest instead. */ export type AccessGrantsUnmanagedListResponse = { - access_grants: Array + access_grants: Array } export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/access-methods/access-methods.ts b/src/lib/seam/connect/routes/access-methods/access-methods.ts index 647fe531..61a32fbe 100644 --- a/src/lib/seam/connect/routes/access-methods/access-methods.ts +++ b/src/lib/seam/connect/routes/access-methods/access-methods.ts @@ -31,7 +31,7 @@ import { } from 'lib/seam/connect/parse-options.js' import type { AccessMethod } from 'lib/seam/connect/resources/access-method.js' import type { ActionAttempt } from 'lib/seam/connect/resources/action-attempt.js' -import type { Unknown } from 'lib/seam/connect/resources/unknown.js' +import type { Batch } from 'lib/seam/connect/resources/batch.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' @@ -366,7 +366,18 @@ export type AccessMethodsGetRelatedParameters = { /** * @deprecated Use AccessMethodsGetRelatedRequest instead. */ -export type AccessMethodsGetRelatedResponse = { batch: Unknown } +export type AccessMethodsGetRelatedResponse = { + batch: Batch< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'access_grants' + | 'access_methods' + | 'instant_keys' + | 'client_sessions' + | 'acs_credentials' + > +} export type AccessMethodsGetRelatedRequest = SeamHttpRequest< AccessMethodsGetRelatedResponse, diff --git a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts index f525af61..7c24da51 100644 --- a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { Unknown } from 'lib/seam/connect/resources/unknown.js' +import type { UnmanagedAccessMethod } from 'lib/seam/connect/resources/unmanaged-access-method.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' @@ -195,7 +195,9 @@ export type AccessMethodsUnmanagedGetParameters = { /** * @deprecated Use AccessMethodsUnmanagedGetRequest instead. */ -export type AccessMethodsUnmanagedGetResponse = { access_method: Unknown } +export type AccessMethodsUnmanagedGetResponse = { + access_method: UnmanagedAccessMethod +} export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< AccessMethodsUnmanagedGetResponse, @@ -216,7 +218,7 @@ export type AccessMethodsUnmanagedListParameters = { * @deprecated Use AccessMethodsUnmanagedListRequest instead. */ export type AccessMethodsUnmanagedListResponse = { - access_methods: Array + access_methods: Array } export type AccessMethodsUnmanagedListRequest = SeamHttpRequest< diff --git a/src/lib/seam/connect/routes/spaces/spaces.ts b/src/lib/seam/connect/routes/spaces/spaces.ts index 5c11d295..a1a7d624 100644 --- a/src/lib/seam/connect/routes/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/spaces/spaces.ts @@ -29,8 +29,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { Batch } from 'lib/seam/connect/resources/batch.js' import type { Space } from 'lib/seam/connect/resources/space.js' -import type { Unknown } from 'lib/seam/connect/resources/unknown.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' @@ -446,7 +446,16 @@ export type SpacesGetRelatedParameters = { /** * @deprecated Use SpacesGetRelatedRequest instead. */ -export type SpacesGetRelatedResponse = { batch: Unknown } +export type SpacesGetRelatedResponse = { + batch: Batch< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'connected_accounts' + | 'acs_systems' + | 'access_methods' + > +} export type SpacesGetRelatedRequest = SeamHttpRequest< SpacesGetRelatedResponse, diff --git a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts index bd42815b..052726ed 100644 --- a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts @@ -29,7 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' -import type { Unknown } from 'lib/seam/connect/resources/unknown.js' +import type { UnmanagedUserIdentity } from 'lib/seam/connect/resources/unmanaged-user-identity.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' @@ -211,7 +211,9 @@ export type UserIdentitiesUnmanagedGetParameters = { /** * @deprecated Use UserIdentitiesUnmanagedGetRequest instead. */ -export type UserIdentitiesUnmanagedGetResponse = { user_identity: Unknown } +export type UserIdentitiesUnmanagedGetResponse = { + user_identity: UnmanagedUserIdentity +} export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< UserIdentitiesUnmanagedGetResponse, @@ -231,7 +233,7 @@ export type UserIdentitiesUnmanagedListParameters = { * @deprecated Use UserIdentitiesUnmanagedListRequest instead. */ export type UserIdentitiesUnmanagedListResponse = { - user_identities: Array + user_identities: Array } export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< From cb1e0f94c98e1b2a62c30fd877c8a30c54af8ad0 Mon Sep 17 00:00:00 2001 From: Evan Sosenko Date: Mon, 27 Jul 2026 20:36:22 -0500 Subject: [PATCH 17/17] Update blueprint --- 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 71f3daed..249b1b3e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "axios-retry": "^4.4.2" }, "devDependencies": { - "@seamapi/blueprint": "^1.0.0", + "@seamapi/blueprint": "^1.1.0", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^1.1.0", "@seamapi/types": "1.983.0", @@ -977,9 +977,9 @@ "license": "MIT" }, "node_modules/@seamapi/blueprint": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.0.0.tgz", - "integrity": "sha512-tQLylewWRJL1PWNxt9fXH/NWKIY0oA4NaQnRtRul0Dewy5yFqQy1fdi5IRPa7G3v+D9rrEiCwVA/omWrfrPZ+Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@seamapi/blueprint/-/blueprint-1.1.0.tgz", + "integrity": "sha512-wX1HZkA/IK9hDQ6Qdxw5Mo+Ysfh82p9IEXQJafakO9VMbszW6n1U02eEhZHVY3CfzN/duk6t9h1veX0zRlhWBQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 91e66c98..27a8a64f 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "axios-retry": "^4.4.2" }, "devDependencies": { - "@seamapi/blueprint": "^1.0.0", + "@seamapi/blueprint": "^1.1.0", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^1.1.0", "@seamapi/types": "1.983.0",