diff --git a/package-lock.json b/package-lock.json index 80430af8..ff99caea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@seamapi/blueprint": "^0.52.2", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.710.0", + "@seamapi/types": "1.725.0", "@swc/core": "^1.11.29", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^22.15.21", @@ -49,7 +49,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "^1.710.0" + "@seamapi/types": "^1.725.0" }, "peerDependenciesMeta": { "@seamapi/types": { @@ -1388,14 +1388,14 @@ } }, "node_modules/@seamapi/types": { - "version": "1.710.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.710.0.tgz", - "integrity": "sha512-sZU0h/PzE55v1ybC26H7OZobzCQHaU8ZMmIF4h85LbIPJJznuqGIT6/mBn+pUtQgiamMSGusW6hrBb1LIU47Pg==", + "version": "1.725.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.725.0.tgz", + "integrity": "sha512-Wd2Egv9Vb8vrZVjFXA+sfWHd+liwgHHqRtMAGW58o1654obHYTsdMxs+HDARebKoVQ6YBcVJGcMgz2mIM7lrVA==", "dev": true, "license": "MIT", "engines": { - "node": ">=20.9.0", - "npm": ">=10.1.0" + "node": ">=22.11.0", + "npm": ">=10.9.4" }, "peerDependencies": { "zod": "^3.24.0" diff --git a/package.json b/package.json index 41eda175..fc5252c2 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "npm": ">=10.1.0" }, "peerDependencies": { - "@seamapi/types": "^1.710.0" + "@seamapi/types": "^1.725.0" }, "peerDependenciesMeta": { "@seamapi/types": { @@ -102,7 +102,7 @@ "@seamapi/blueprint": "^0.52.2", "@seamapi/fake-seam-connect": "^1.77.0", "@seamapi/smith": "^0.5.2", - "@seamapi/types": "1.710.0", + "@seamapi/types": "1.725.0", "@swc/core": "^1.11.29", "@types/jsonwebtoken": "^9.0.6", "@types/node": "^22.15.21", 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 29b4aa1e..92dbd2e7 100644 --- a/src/lib/seam/connect/routes/access-codes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes/access-codes.ts @@ -239,6 +239,19 @@ export class SeamHttpAccessCodes { }) } + getTimeline( + parameters?: AccessCodesGetTimelineParameters, + options: AccessCodesGetTimelineOptions = {}, + ): AccessCodesGetTimelineRequest { + return new SeamHttpRequest(this, { + pathname: '/access_codes/get_timeline', + method: 'POST', + body: parameters, + responseKey: 'timeline_events', + options, + }) + } + list( parameters?: AccessCodesListParameters, options: AccessCodesListOptions = {}, @@ -411,6 +424,28 @@ 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 = SetNonNullable< + Required> +> + +export type AccessCodesGetTimelineRequest = SeamHttpRequest< + AccessCodesGetTimelineResponse, + 'timeline_events' +> + +export interface AccessCodesGetTimelineOptions {} + export type AccessCodesListParameters = RouteRequestBody<'/access_codes/list'> /** diff --git a/src/lib/seam/connect/routes/customers/customers.ts b/src/lib/seam/connect/routes/customers/customers.ts index c8145a61..a45515cf 100644 --- a/src/lib/seam/connect/routes/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/customers.ts @@ -36,6 +36,8 @@ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' import type { SetNonNullable } from 'lib/types.js' +import { SeamHttpCustomersReservations } from './reservations/index.js' + export class SeamHttpCustomers { client: Client readonly defaults: Required @@ -163,6 +165,10 @@ export class SeamHttpCustomers { await clientSessions.get() } + get reservations(): SeamHttpCustomersReservations { + return SeamHttpCustomersReservations.fromClient(this.client, this.defaults) + } + createPortal( parameters?: CustomersCreatePortalParameters, options: CustomersCreatePortalOptions = {}, diff --git a/src/lib/seam/connect/routes/customers/index.ts b/src/lib/seam/connect/routes/customers/index.ts index 9126f05d..5dfe6520 100644 --- a/src/lib/seam/connect/routes/customers/index.ts +++ b/src/lib/seam/connect/routes/customers/index.ts @@ -4,3 +4,4 @@ */ export * from './customers.js' +export * from './reservations/index.js' diff --git a/src/lib/seam/connect/routes/seam/v1/index.ts b/src/lib/seam/connect/routes/customers/reservations/index.ts similarity index 66% rename from src/lib/seam/connect/routes/seam/v1/index.ts rename to src/lib/seam/connect/routes/customers/reservations/index.ts index 60e5d0bd..72e7f4fc 100644 --- a/src/lib/seam/connect/routes/seam/v1/index.ts +++ b/src/lib/seam/connect/routes/customers/reservations/index.ts @@ -3,5 +3,4 @@ * Do not edit this file or add other files to this directory. */ -export * from './customers/index.js' -export * from './v1.js' +export * from './reservations.js' diff --git a/src/lib/seam/connect/routes/seam/v1/customers/customers.ts b/src/lib/seam/connect/routes/customers/reservations/reservations.ts similarity index 76% rename from src/lib/seam/connect/routes/seam/v1/customers/customers.ts rename to src/lib/seam/connect/routes/customers/reservations/reservations.ts index 23e14126..933e1720 100644 --- a/src/lib/seam/connect/routes/seam/v1/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/reservations/reservations.ts @@ -36,7 +36,7 @@ import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' import type { SetNonNullable } from 'lib/types.js' -export class SeamHttpSeamV1Customers { +export class SeamHttpCustomersReservations { client: Client readonly defaults: Required readonly ltsVersion = seamApiLtsVersion @@ -51,23 +51,23 @@ export class SeamHttpSeamV1Customers { static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, - ): SeamHttpSeamV1Customers { + ): SeamHttpCustomersReservations { const constructorOptions = { ...options, client } if (!isSeamHttpOptionsWithClient(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing client') } - return new SeamHttpSeamV1Customers(constructorOptions) + return new SeamHttpCustomersReservations(constructorOptions) } static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, - ): SeamHttpSeamV1Customers { + ): SeamHttpCustomersReservations { const constructorOptions = { ...options, apiKey } if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing apiKey') } - return new SeamHttpSeamV1Customers(constructorOptions) + return new SeamHttpCustomersReservations(constructorOptions) } static fromClientSessionToken( @@ -76,24 +76,24 @@ export class SeamHttpSeamV1Customers { SeamHttpOptionsWithClientSessionToken, 'clientSessionToken' > = {}, - ): SeamHttpSeamV1Customers { + ): SeamHttpCustomersReservations { const constructorOptions = { ...options, clientSessionToken } if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') } - return new SeamHttpSeamV1Customers(constructorOptions) + return new SeamHttpCustomersReservations(constructorOptions) } static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, options: SeamHttpFromPublishableKeyOptions = {}, - ): Promise { + ): Promise { warnOnInsecureuserIdentifierKey(userIdentifierKey) const clientOptions = parseOptions({ ...options, publishableKey }) if (isSeamHttpOptionsWithClient(clientOptions)) { throw new SeamHttpInvalidOptionsError( - 'The client option cannot be used with SeamHttpSeamV1Customers.fromPublishableKey', + 'The client option cannot be used with SeamHttpCustomersReservations.fromPublishableKey', ) } const client = createClient(clientOptions) @@ -101,7 +101,7 @@ export class SeamHttpSeamV1Customers { const { token } = await clientSessions.getOrCreate({ user_identifier_key: userIdentifierKey, }) - return SeamHttpSeamV1Customers.fromClientSessionToken(token, options) + return SeamHttpCustomersReservations.fromClientSessionToken(token, options) } static fromConsoleSessionToken( @@ -111,14 +111,14 @@ export class SeamHttpSeamV1Customers { SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId' > = {}, - ): SeamHttpSeamV1Customers { + ): SeamHttpCustomersReservations { const constructorOptions = { ...options, consoleSessionToken, workspaceId } if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError( 'Missing consoleSessionToken or workspaceId', ) } - return new SeamHttpSeamV1Customers(constructorOptions) + return new SeamHttpCustomersReservations(constructorOptions) } static fromPersonalAccessToken( @@ -128,14 +128,14 @@ export class SeamHttpSeamV1Customers { SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId' > = {}, - ): SeamHttpSeamV1Customers { + ): SeamHttpCustomersReservations { const constructorOptions = { ...options, personalAccessToken, workspaceId } if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError( 'Missing personalAccessToken or workspaceId', ) } - return new SeamHttpSeamV1Customers(constructorOptions) + return new SeamHttpCustomersReservations(constructorOptions) } createPaginator( @@ -163,35 +163,39 @@ export class SeamHttpSeamV1Customers { await clientSessions.get() } - pushData( - parameters?: SeamV1CustomersPushDataParameters, - options: SeamV1CustomersPushDataOptions = {}, - ): SeamV1CustomersPushDataRequest { + createDeepLink( + parameters?: CustomersReservationsCreateDeepLinkParameters, + options: CustomersReservationsCreateDeepLinkOptions = {}, + ): CustomersReservationsCreateDeepLinkRequest { return new SeamHttpRequest(this, { - pathname: '/seam/v1/customers/push_data', + pathname: '/customers/reservations/create_deep_link', method: 'POST', body: parameters, - responseKey: undefined, + responseKey: 'deep_link', options, }) } } -export type SeamV1CustomersPushDataParameters = - RouteRequestBody<'/seam/v1/customers/push_data'> +export type CustomersReservationsCreateDeepLinkParameters = + RouteRequestBody<'/customers/reservations/create_deep_link'> /** - * @deprecated Use SeamV1CustomersPushDataParameters instead. + * @deprecated Use CustomersReservationsCreateDeepLinkParameters instead. */ -export type SeamV1CustomersPushDataBody = SeamV1CustomersPushDataParameters +export type CustomersReservationsCreateDeepLinkBody = + CustomersReservationsCreateDeepLinkParameters /** - * @deprecated Use SeamV1CustomersPushDataRequest instead. + * @deprecated Use CustomersReservationsCreateDeepLinkRequest instead. */ -export type SeamV1CustomersPushDataResponse = SetNonNullable< - Required> +export type CustomersReservationsCreateDeepLinkResponse = SetNonNullable< + Required> > -export type SeamV1CustomersPushDataRequest = SeamHttpRequest +export type CustomersReservationsCreateDeepLinkRequest = SeamHttpRequest< + CustomersReservationsCreateDeepLinkResponse, + 'deep_link' +> -export interface SeamV1CustomersPushDataOptions {} +export interface CustomersReservationsCreateDeepLinkOptions {} diff --git a/src/lib/seam/connect/routes/seam-http-endpoints.ts b/src/lib/seam/connect/routes/seam-http-endpoints.ts index 1a0530ff..5ec8cf5b 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints.ts @@ -48,6 +48,9 @@ import { type AccessCodesGetOptions, type AccessCodesGetParameters, type AccessCodesGetRequest, + type AccessCodesGetTimelineOptions, + type AccessCodesGetTimelineParameters, + type AccessCodesGetTimelineRequest, type AccessCodesListOptions, type AccessCodesListParameters, type AccessCodesListRequest, @@ -434,6 +437,12 @@ import { type CustomersPushDataRequest, SeamHttpCustomers, } from './customers/index.js' +import { + type CustomersReservationsCreateDeepLinkOptions, + type CustomersReservationsCreateDeepLinkParameters, + type CustomersReservationsCreateDeepLinkRequest, + SeamHttpCustomersReservations, +} from './customers/reservations/index.js' import { type DevicesDeleteOptions, type DevicesDeleteParameters, @@ -597,8 +606,17 @@ 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, @@ -651,11 +669,20 @@ 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, @@ -696,6 +723,9 @@ import { type SeamCustomerV1SpacesListReservationsOptions, type SeamCustomerV1SpacesListReservationsParameters, type SeamCustomerV1SpacesListReservationsRequest, + type SeamCustomerV1SpacesPushCommonAreasOptions, + type SeamCustomerV1SpacesPushCommonAreasParameters, + type SeamCustomerV1SpacesPushCommonAreasRequest, SeamHttpSeamCustomerV1Spaces, } from './seam/customer/v1/spaces/index.js' import { @@ -713,12 +743,6 @@ import { type SeamPartnerV1BuildingBlocksSpacesAutoMapParameters, type SeamPartnerV1BuildingBlocksSpacesAutoMapRequest, } from './seam/partner/v1/building-blocks/spaces/index.js' -import { - SeamHttpSeamV1Customers, - type SeamV1CustomersPushDataOptions, - type SeamV1CustomersPushDataParameters, - type SeamV1CustomersPushDataRequest, -} from './seam/v1/customers/index.js' import { SeamHttpSpaces, type SpacesAddAcsEntrancesOptions, @@ -1173,6 +1197,19 @@ export class SeamHttpEndpoints { } } + get '/access_codes/get_timeline'(): ( + parameters?: AccessCodesGetTimelineParameters, + options?: AccessCodesGetTimelineOptions, + ) => AccessCodesGetTimelineRequest { + const { client, defaults } = this + return function accessCodesGetTimeline( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpAccessCodes.fromClient(client, defaults) + return seam.getTimeline(...args) + } + } + get '/access_codes/list'(): ( parameters?: AccessCodesListParameters, options?: AccessCodesListOptions, @@ -2593,6 +2630,19 @@ export class SeamHttpEndpoints { } } + get '/customers/reservations/create_deep_link'(): ( + parameters?: CustomersReservationsCreateDeepLinkParameters, + options?: CustomersReservationsCreateDeepLinkOptions, + ) => CustomersReservationsCreateDeepLinkRequest { + const { client, defaults } = this + return function customersReservationsCreateDeepLink( + ...args: Parameters + ): ReturnType { + const seam = SeamHttpCustomersReservations.fromClient(client, defaults) + return seam.createDeepLink(...args) + } + } + get '/devices/delete'(): ( parameters?: DevicesDeleteParameters, options?: DevicesDeleteOptions, @@ -3151,6 +3201,48 @@ export class SeamHttpEndpoints { } } + 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, @@ -3400,6 +3492,19 @@ export class SeamHttpEndpoints { } } + get '/seam/customer/v1/customers/me'(): ( + parameters?: SeamCustomerV1CustomersMeParameters, + options?: SeamCustomerV1CustomersMeOptions, + ) => SeamCustomerV1CustomersMeRequest { + const { client, defaults } = this + 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, @@ -3418,6 +3523,24 @@ export class SeamHttpEndpoints { } } + 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, @@ -3586,6 +3709,19 @@ export class SeamHttpEndpoints { } } + get '/seam/customer/v1/spaces/push_common_areas'(): ( + parameters?: SeamCustomerV1SpacesPushCommonAreasParameters, + options?: SeamCustomerV1SpacesPushCommonAreasOptions, + ) => SeamCustomerV1SpacesPushCommonAreasRequest { + const { client, defaults } = this + 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, @@ -3649,19 +3785,6 @@ export class SeamHttpEndpoints { } } - get '/seam/v1/customers/push_data'(): ( - parameters?: SeamV1CustomersPushDataParameters, - options?: SeamV1CustomersPushDataOptions, - ) => SeamV1CustomersPushDataRequest { - const { client, defaults } = this - return function seamV1CustomersPushData( - ...args: Parameters - ): ReturnType { - const seam = SeamHttpSeamV1Customers.fromClient(client, defaults) - return seam.pushData(...args) - } - } - get '/spaces/add_acs_entrances'(): ( parameters?: SpacesAddAcsEntrancesParameters, options?: SpacesAddAcsEntrancesOptions, @@ -4765,6 +4888,7 @@ export class SeamHttpEndpoints { 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' @@ -4839,6 +4963,8 @@ export type SeamHttpEndpointQueryPaths = | '/seam/customer/v1/connectors/connector_types' | '/seam/customer/v1/connectors/list' | '/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' @@ -4887,7 +5013,6 @@ export type SeamHttpEndpointPaginatedQueryPaths = | '/connected_accounts/list' | '/devices/list' | '/devices/unmanaged/list' - | '/seam/console/v1/timelines/get' | '/seam/customer/v1/automation_runs/list' | '/seam/customer/v1/customers/list' | '/seam/customer/v1/reservations/list' @@ -4954,6 +5079,7 @@ 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' @@ -4975,6 +5101,8 @@ export type SeamHttpEndpointMutationPaths = | '/noise_sensors/simulate/trigger_noise_threshold' | '/phones/deactivate' | '/phones/simulate/create_sandbox_phone' + | '/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' @@ -4984,7 +5112,7 @@ export type SeamHttpEndpointMutationPaths = | '/seam/customer/v1/customers/open_portal' | '/seam/customer/v1/settings/update' | '/seam/customer/v1/spaces/create' - | '/seam/v1/customers/push_data' + | '/seam/customer/v1/spaces/push_common_areas' | '/spaces/add_acs_entrances' | '/spaces/add_devices' | '/spaces/create' 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 index 7ab6aa80..880977d0 100644 --- 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 @@ -188,6 +188,24 @@ export class SeamHttpSeamCustomerV1AccessGrants { 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 = @@ -212,3 +230,26 @@ export type SeamCustomerV1AccessGrantsListRequest = SeamHttpRequest< > 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 = SetNonNullable< + Required> +> + +export type SeamCustomerV1AccessGrantsUpdateRequest = SeamHttpRequest< + void, + undefined +> + +export interface SeamCustomerV1AccessGrantsUpdateOptions {} 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 new file mode 100644 index 00000000..4e16b582 --- /dev/null +++ b/src/lib/seam/connect/routes/seam/customer/v1/access-methods/access-methods.ts @@ -0,0 +1,217 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file or add other files to this directory. + */ + +import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' + +import { seamApiLtsVersion } from 'lib/lts-version.js' +import { + getAuthHeadersForClientSessionToken, + warnOnInsecureuserIdentifierKey, +} from 'lib/seam/connect/auth.js' +import { type Client, createClient } from 'lib/seam/connect/client.js' +import { + isSeamHttpOptionsWithApiKey, + isSeamHttpOptionsWithClient, + isSeamHttpOptionsWithClientSessionToken, + isSeamHttpOptionsWithConsoleSessionToken, + isSeamHttpOptionsWithPersonalAccessToken, + type SeamHttpFromPublishableKeyOptions, + SeamHttpInvalidOptionsError, + type SeamHttpOptions, + type SeamHttpOptionsWithApiKey, + type SeamHttpOptionsWithClient, + type SeamHttpOptionsWithClientSessionToken, + type SeamHttpOptionsWithConsoleSessionToken, + type SeamHttpOptionsWithPersonalAccessToken, + type SeamHttpRequestOptions, +} from 'lib/seam/connect/options.js' +import { + limitToSeamHttpRequestOptions, + parseOptions, +} from 'lib/seam/connect/parse-options.js' +import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js' +import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' +import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' +import type { SetNonNullable } from 'lib/types.js' + +export class 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 = SetNonNullable< + Required> +> + +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 new file mode 100644 index 00000000..f339d498 --- /dev/null +++ b/src/lib/seam/connect/routes/seam/customer/v1/access-methods/index.ts @@ -0,0 +1,6 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file or add other files to this directory. + */ + +export * from './access-methods.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 index 7543a15a..52c1fcd6 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts @@ -3,7 +3,11 @@ * Do not edit this file or add other files to this directory. */ -import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' +import type { + RouteRequestBody, + RouteRequestParams, + RouteResponse, +} from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -44,11 +48,6 @@ export class SeamHttpSeamCustomerV1Customers { 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) } @@ -189,6 +188,19 @@ export class SeamHttpSeamCustomerV1Customers { }) } + me( + parameters?: SeamCustomerV1CustomersMeParameters, + options: SeamCustomerV1CustomersMeOptions = {}, + ): SeamCustomerV1CustomersMeRequest { + return new SeamHttpRequest(this, { + pathname: '/seam/customer/v1/customers/me', + method: 'GET', + params: parameters, + responseKey: undefined, + options, + }) + } + openPortal( parameters?: SeamCustomerV1CustomersOpenPortalParameters, options: SeamCustomerV1CustomersOpenPortalOptions = {}, @@ -231,6 +243,26 @@ export type SeamCustomerV1CustomersListRequest = SeamHttpRequest< 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 = SetNonNullable< + Required> +> + +export type SeamCustomerV1CustomersMeRequest = SeamHttpRequest + +export interface SeamCustomerV1CustomersMeOptions {} + export type SeamCustomerV1CustomersOpenPortalParameters = RouteRequestBody<'/seam/customer/v1/customers/open_portal'> diff --git a/src/lib/seam/connect/routes/seam/v1/v1.ts b/src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts similarity index 70% rename from src/lib/seam/connect/routes/seam/v1/v1.ts rename to src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts index a966fe8d..6e54005c 100644 --- a/src/lib/seam/connect/routes/seam/v1/v1.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/encoders/encoders.ts @@ -3,6 +3,8 @@ * 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, @@ -30,12 +32,11 @@ import { 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 { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' +import type { SetNonNullable } from 'lib/types.js' -import { SeamHttpSeamV1Customers } from './customers/index.js' - -export class SeamHttpSeamV1 { +export class SeamHttpSeamCustomerV1Encoders { client: Client readonly defaults: Required readonly ltsVersion = seamApiLtsVersion @@ -43,6 +44,11 @@ export class SeamHttpSeamV1 { 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) } @@ -50,23 +56,23 @@ export class SeamHttpSeamV1 { static fromClient( client: SeamHttpOptionsWithClient['client'], options: Omit = {}, - ): SeamHttpSeamV1 { + ): SeamHttpSeamCustomerV1Encoders { const constructorOptions = { ...options, client } if (!isSeamHttpOptionsWithClient(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing client') } - return new SeamHttpSeamV1(constructorOptions) + return new SeamHttpSeamCustomerV1Encoders(constructorOptions) } static fromApiKey( apiKey: SeamHttpOptionsWithApiKey['apiKey'], options: Omit = {}, - ): SeamHttpSeamV1 { + ): SeamHttpSeamCustomerV1Encoders { const constructorOptions = { ...options, apiKey } if (!isSeamHttpOptionsWithApiKey(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing apiKey') } - return new SeamHttpSeamV1(constructorOptions) + return new SeamHttpSeamCustomerV1Encoders(constructorOptions) } static fromClientSessionToken( @@ -75,24 +81,24 @@ export class SeamHttpSeamV1 { SeamHttpOptionsWithClientSessionToken, 'clientSessionToken' > = {}, - ): SeamHttpSeamV1 { + ): SeamHttpSeamCustomerV1Encoders { const constructorOptions = { ...options, clientSessionToken } if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError('Missing clientSessionToken') } - return new SeamHttpSeamV1(constructorOptions) + return new SeamHttpSeamCustomerV1Encoders(constructorOptions) } static async fromPublishableKey( publishableKey: string, userIdentifierKey: string, options: SeamHttpFromPublishableKeyOptions = {}, - ): Promise { + ): Promise { warnOnInsecureuserIdentifierKey(userIdentifierKey) const clientOptions = parseOptions({ ...options, publishableKey }) if (isSeamHttpOptionsWithClient(clientOptions)) { throw new SeamHttpInvalidOptionsError( - 'The client option cannot be used with SeamHttpSeamV1.fromPublishableKey', + 'The client option cannot be used with SeamHttpSeamCustomerV1Encoders.fromPublishableKey', ) } const client = createClient(clientOptions) @@ -100,7 +106,7 @@ export class SeamHttpSeamV1 { const { token } = await clientSessions.getOrCreate({ user_identifier_key: userIdentifierKey, }) - return SeamHttpSeamV1.fromClientSessionToken(token, options) + return SeamHttpSeamCustomerV1Encoders.fromClientSessionToken(token, options) } static fromConsoleSessionToken( @@ -110,14 +116,14 @@ export class SeamHttpSeamV1 { SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId' > = {}, - ): SeamHttpSeamV1 { + ): SeamHttpSeamCustomerV1Encoders { const constructorOptions = { ...options, consoleSessionToken, workspaceId } if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError( 'Missing consoleSessionToken or workspaceId', ) } - return new SeamHttpSeamV1(constructorOptions) + return new SeamHttpSeamCustomerV1Encoders(constructorOptions) } static fromPersonalAccessToken( @@ -127,14 +133,14 @@ export class SeamHttpSeamV1 { SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId' > = {}, - ): SeamHttpSeamV1 { + ): SeamHttpSeamCustomerV1Encoders { const constructorOptions = { ...options, personalAccessToken, workspaceId } if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) { throw new SeamHttpInvalidOptionsError( 'Missing personalAccessToken or workspaceId', ) } - return new SeamHttpSeamV1(constructorOptions) + return new SeamHttpSeamCustomerV1Encoders(constructorOptions) } createPaginator( @@ -162,7 +168,44 @@ export class SeamHttpSeamV1 { await clientSessions.get() } - get customers(): SeamHttpSeamV1Customers { - return SeamHttpSeamV1Customers.fromClient(this.client, this.defaults) + 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 = SetNonNullable< + Required> +> + +export type SeamCustomerV1EncodersListRequest = SeamHttpRequest< + SeamCustomerV1EncodersListResponse, + 'encoders' +> + +export interface SeamCustomerV1EncodersListOptions {} diff --git a/src/lib/seam/connect/routes/seam/v1/customers/index.ts b/src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts similarity index 79% rename from src/lib/seam/connect/routes/seam/v1/customers/index.ts rename to src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts index 9126f05d..e4fa625b 100644 --- a/src/lib/seam/connect/routes/seam/v1/customers/index.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/encoders/index.ts @@ -3,4 +3,4 @@ * Do not edit this file or add other files to this directory. */ -export * from './customers.js' +export * from './encoders.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 index 95888d8b..06d5e025 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/index.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/index.ts @@ -4,11 +4,13 @@ */ 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' diff --git a/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts b/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts index c4f62880..1d314c0f 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts @@ -44,11 +44,6 @@ export class SeamHttpSeamCustomerV1Spaces { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) - if (!options.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } @@ -221,6 +216,19 @@ export class SeamHttpSeamCustomerV1Spaces { options, }) } + + pushCommonAreas( + parameters?: SeamCustomerV1SpacesPushCommonAreasParameters, + options: SeamCustomerV1SpacesPushCommonAreasOptions = {}, + ): SeamCustomerV1SpacesPushCommonAreasRequest { + return new SeamHttpRequest(this, { + pathname: '/seam/customer/v1/spaces/push_common_areas', + method: 'POST', + body: parameters, + responseKey: undefined, + options, + }) + } } export type SeamCustomerV1SpacesCreateParameters = @@ -290,3 +298,26 @@ export type SeamCustomerV1SpacesListReservationsRequest = SeamHttpRequest< > 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 = SetNonNullable< + Required> +> + +export type SeamCustomerV1SpacesPushCommonAreasRequest = SeamHttpRequest< + void, + undefined +> + +export interface SeamCustomerV1SpacesPushCommonAreasOptions {} diff --git a/src/lib/seam/connect/routes/seam/customer/v1/v1.ts b/src/lib/seam/connect/routes/seam/customer/v1/v1.ts index 7421a890..6a29bc20 100644 --- a/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +++ b/src/lib/seam/connect/routes/seam/customer/v1/v1.ts @@ -34,11 +34,13 @@ 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' @@ -54,11 +56,6 @@ export class SeamHttpSeamCustomerV1 { constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) { const options = parseOptions(apiKeyOrOptions) - if (!options.isUndocumentedApiEnabled) { - throw new Error( - 'Cannot use undocumented API without isUndocumentedApiEnabled', - ) - } this.client = 'client' in options ? options.client : createClient(options) this.defaults = limitToSeamHttpRequestOptions(options) } @@ -185,6 +182,13 @@ export class SeamHttpSeamCustomerV1 { ) } + get accessMethods(): SeamHttpSeamCustomerV1AccessMethods { + return SeamHttpSeamCustomerV1AccessMethods.fromClient( + this.client, + this.defaults, + ) + } + get automationRuns(): SeamHttpSeamCustomerV1AutomationRuns { return SeamHttpSeamCustomerV1AutomationRuns.fromClient( this.client, @@ -220,6 +224,10 @@ export class SeamHttpSeamCustomerV1 { ) } + get encoders(): SeamHttpSeamCustomerV1Encoders { + return SeamHttpSeamCustomerV1Encoders.fromClient(this.client, this.defaults) + } + get events(): SeamHttpSeamCustomerV1Events { return SeamHttpSeamCustomerV1Events.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 index ff5baa89..2ed07d2c 100644 --- a/src/lib/seam/connect/routes/seam/index.ts +++ b/src/lib/seam/connect/routes/seam/index.ts @@ -6,4 +6,3 @@ export * from './console/index.js' export * from './customer/index.js' export * from './partner/index.js' -export * from './v1/index.js'