diff --git a/codegen/layouts/partials/request-list-item-type.hbs b/codegen/layouts/partials/request-list-item-type.hbs new file mode 100644 index 00000000..1f267656 --- /dev/null +++ b/codegen/layouts/partials/request-list-item-type.hbs @@ -0,0 +1,7 @@ +{{#if (eq itemFormat "object")}} +{{> request-object parameters=itemParameters}} +{{else if (eq itemFormat "discriminated_object")}} +{{#each variants}}{{#unless @first}} | {{/unless}}{{> request-object parameters=parameters}}{{/each}} +{{else}} +{{> request-scalar-type format=itemFormat values=itemEnumValues}} +{{/if}} diff --git a/codegen/layouts/partials/request-object.hbs b/codegen/layouts/partials/request-object.hbs new file mode 100644 index 00000000..f287082c --- /dev/null +++ b/codegen/layouts/partials/request-object.hbs @@ -0,0 +1,5 @@ +{ +{{#each parameters}} + {{json name}}{{#unless isRequired}}?{{/unless}}: {{> request-parameter-type }}{{#unless isRequired}} | undefined{{/unless}} +{{/each}} +} diff --git a/codegen/layouts/partials/request-parameter-type.hbs b/codegen/layouts/partials/request-parameter-type.hbs new file mode 100644 index 00000000..8e2972a1 --- /dev/null +++ b/codegen/layouts/partials/request-parameter-type.hbs @@ -0,0 +1,7 @@ +{{#if (eq format "object")}} +{{> request-object parameters=parameters}} +{{else if (eq format "list")}} +Array<{{> request-list-item-type }}> +{{else}} +{{> request-scalar-type}} +{{/if}} diff --git a/codegen/layouts/partials/request-scalar-type.hbs b/codegen/layouts/partials/request-scalar-type.hbs new file mode 100644 index 00000000..4c39f808 --- /dev/null +++ b/codegen/layouts/partials/request-scalar-type.hbs @@ -0,0 +1 @@ +{{#if (eq format "boolean")}}boolean{{else if (eq format "number")}}number{{else if (eq format "record")}}Record{{else if (eq format "enum")}}{{#each values}}{{#unless @first}} | {{/unless}}{{json name}}{{else}}string{{/each}}{{else}}string{{/if}} diff --git a/codegen/layouts/partials/resource-list-item-type.hbs b/codegen/layouts/partials/resource-list-item-type.hbs new file mode 100644 index 00000000..ed882dff --- /dev/null +++ b/codegen/layouts/partials/resource-list-item-type.hbs @@ -0,0 +1,7 @@ +{{#if (eq itemFormat "object")}} +{{> resource-object properties=itemProperties}} +{{else if (eq itemFormat "discriminated_object")}} +{{#each variants}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}} +{{else}} +{{> resource-scalar-type format=itemFormat values=itemEnumValues}} +{{/if}} diff --git a/codegen/layouts/partials/resource-object.hbs b/codegen/layouts/partials/resource-object.hbs new file mode 100644 index 00000000..a08a673e --- /dev/null +++ b/codegen/layouts/partials/resource-object.hbs @@ -0,0 +1,5 @@ +{ +{{#each properties}} + {{json name}}{{#if isOptional}}?{{/if}}: {{> resource-property-type }}{{#if isNullable}} | null{{/if}}{{#if isOptional}} | undefined{{/if}} +{{/each}} +} diff --git a/codegen/layouts/partials/resource-property-type.hbs b/codegen/layouts/partials/resource-property-type.hbs new file mode 100644 index 00000000..6d675b77 --- /dev/null +++ b/codegen/layouts/partials/resource-property-type.hbs @@ -0,0 +1,7 @@ +{{#if (eq format "object")}} +{{> resource-object properties=properties}} +{{else if (eq format "list")}} +Array<{{> resource-list-item-type }}> +{{else}} +{{> resource-scalar-type}} +{{/if}} diff --git a/codegen/layouts/partials/resource-scalar-type.hbs b/codegen/layouts/partials/resource-scalar-type.hbs new file mode 100644 index 00000000..4c39f808 --- /dev/null +++ b/codegen/layouts/partials/resource-scalar-type.hbs @@ -0,0 +1 @@ +{{#if (eq format "boolean")}}boolean{{else if (eq format "number")}}number{{else if (eq format "record")}}Record{{else if (eq format "enum")}}{{#each values}}{{#unless @first}} | {{/unless}}{{json name}}{{else}}string{{/each}}{{else}}string{{/if}} diff --git a/codegen/layouts/partials/route-class-endpoint-export.hbs b/codegen/layouts/partials/route-class-endpoint-export.hbs index fede49c7..c03e1f1d 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}} = RouteRequest{{requestFormatSuffix}}<'{{path}}'> +export type {{parametersTypeName}} = {{#if isUndocumented}}RouteRequest{{requestFormatSuffix}}<'{{path}}'>{{else}}{{> request-object parameters=parameters}}{{/if}} /** * @deprecated Use {{parametersTypeName}} instead. @@ -8,7 +8,7 @@ export type {{legacyRequestTypeName}} = {{parametersTypeName}} /** * @deprecated Use {{requestTypeName}} instead. */ -export type {{responseTypeName}} = RouteResponse<'{{path}}'> +export type {{responseTypeName}} = {{#if usesLegacyResponseType}}RouteResponse<'{{path}}'>{{else 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 acd252e3..c5547b13 100644 --- a/codegen/layouts/partials/route-imports.hbs +++ b/codegen/layouts/partials/route-imports.hbs @@ -1,9 +1,14 @@ import { seamApiLtsVersion } from 'lib/lts-version.js' +{{#if hasLegacyTypes}} import type { RouteRequestBody, RouteRequestParams, RouteResponse, } from '@seamapi/types/connect' +{{/if}} +{{#each resourceTypeImports}} +import type { {{typeName}} } from 'lib/seam/connect/resources/{{fileName}}' +{{/each}} import { getAuthHeadersForClientSessionToken, diff --git a/codegen/layouts/resource-index.hbs b/codegen/layouts/resource-index.hbs new file mode 100644 index 00000000..3cd6ac98 --- /dev/null +++ b/codegen/layouts/resource-index.hbs @@ -0,0 +1,8 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +{{#each resources}} +export type { {{typeName}} } from './{{replaceExtension fileName ".js"}}' +{{/each}} diff --git a/codegen/layouts/resource.hbs b/codegen/layouts/resource.hbs new file mode 100644 index 00000000..1113c78b --- /dev/null +++ b/codegen/layouts/resource.hbs @@ -0,0 +1,6 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type {{typeName}} = {{#if isUnknown}}Record{{else}}{{#each resources}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}}{{/if}} diff --git a/codegen/lib/connect.ts b/codegen/lib/connect.ts index 6d4b7a36..d1c02cb4 100644 --- a/codegen/lib/connect.ts +++ b/codegen/lib/connect.ts @@ -6,6 +6,11 @@ import { type EndpointsLayoutContext, setEndpointsLayoutContext, } from './layouts/endpoints.js' +import { + getResourceLayoutContexts, + type ResourceIndexLayoutContext, + type ResourceLayoutContext, +} from './layouts/resources.js' import { type RouteIndexLayoutContext, type RouteLayoutContext, @@ -19,9 +24,12 @@ interface Metadata { type File = RouteLayoutContext & RouteIndexLayoutContext & - EndpointsLayoutContext & { layout: string } + EndpointsLayoutContext & + ResourceLayoutContext & + ResourceIndexLayoutContext & { layout: string } const rootPath = 'src/lib/seam/connect/routes' +const resourcesPath = 'src/lib/seam/connect/resources' const supportedAuthMethods: SeamAuthMethod[] = [ 'api_key', @@ -90,6 +98,22 @@ export const connect = ( }) routeIndexes['']?.add('seam-http-endpoints-without-workspace.js') + const resourceContexts = getResourceLayoutContexts(blueprint) + for (const resource of resourceContexts) { + const resourceFile = { + contents: Buffer.from('\n'), + layout: 'resource.hbs', + ...resource, + } + files[`${resourcesPath}/${resource.fileName}`] = resourceFile + } + const resourceIndexFile = { + contents: Buffer.from('\n'), + layout: 'resource-index.hbs', + resources: resourceContexts, + } + files[`${resourcesPath}/index.ts`] = resourceIndexFile + for (const node of nodes) { const path = toFilePath(node.path) const name = kebabCase(node.name) diff --git a/codegen/lib/handlebars-helpers.ts b/codegen/lib/handlebars-helpers.ts index dac2bee2..5d97ec8f 100644 --- a/codegen/lib/handlebars-helpers.ts +++ b/codegen/lib/handlebars-helpers.ts @@ -1 +1,6 @@ export const identity = (x: unknown): unknown => x + +export const json = (value: string): string => JSON.stringify(value) + +export const replaceExtension = (fileName: string, extension: string): string => + fileName.replace(/\.[^.]+$/, extension) diff --git a/codegen/lib/layouts/resources.ts b/codegen/lib/layouts/resources.ts new file mode 100644 index 00000000..98c9f76a --- /dev/null +++ b/codegen/lib/layouts/resources.ts @@ -0,0 +1,46 @@ +import type { Blueprint, Resource } from '@seamapi/blueprint' +import { kebabCase, pascalCase } from 'change-case' + +export interface ResourceLayoutContext { + fileName: string + typeName: string + resources: Resource[] + isUnknown: boolean +} + +export interface ResourceIndexLayoutContext { + resources: Array> +} + +export const getResourceTypeName = (resourceType: string): string => + `${pascalCase(resourceType)}Resource` + +export const getResourceLayoutContexts = ( + blueprint: Blueprint, +): ResourceLayoutContext[] => { + const resources = [ + ...blueprint.resources, + ...blueprint.events, + ...blueprint.actionAttempts, + ] + const resourceTypes = [ + ...new Set(resources.map(({ resourceType }) => resourceType)), + ] + + return [ + { + fileName: 'unknown.ts', + typeName: 'UnknownResource', + resources: [], + isUnknown: true, + }, + ...resourceTypes.map((resourceType) => ({ + fileName: `${kebabCase(resourceType)}.ts`, + typeName: getResourceTypeName(resourceType), + resources: resources.filter( + (resource) => resource.resourceType === resourceType, + ), + isUnknown: false, + })), + ] +} diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index 394223ed..36fa4755 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -1,13 +1,17 @@ -import type { Endpoint, Namespace, Route } from '@seamapi/blueprint' +import type { Endpoint, Namespace, Parameter, Route } from '@seamapi/blueprint' import type { Method } from 'axios' import { camelCase, kebabCase, pascalCase } from 'change-case' +import { getResourceTypeName } from './resources.js' + export interface RouteLayoutContext { className: string isUndocumented: boolean endpoints: EndpointLayoutContext[] subroutes: SubrouteLayoutContext[] skipClientSessionImport: boolean + hasLegacyTypes: boolean + resourceTypeImports: ResourceTypeImport[] } export interface RouteIndexLayoutContext { @@ -32,6 +36,10 @@ export interface EndpointLayoutContext { returnsVoid: boolean isOptionalParamsOk: boolean isUndocumented: boolean + usesLegacyResponseType: boolean + parameters: Parameter[] + responseIsList: boolean + responseResourceTypeName: string } export interface SubrouteLayoutContext { @@ -40,6 +48,11 @@ export interface SubrouteLayoutContext { fileName: string } +interface ResourceTypeImport { + fileName: string + typeName: string +} + export const setRouteLayoutContext = ( file: Partial, node: Route | Namespace | null, @@ -49,6 +62,36 @@ export const setRouteLayoutContext = ( 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'), + ) + : false + file.resourceTypeImports = + node != null && 'endpoints' in node + ? [ + ...new Set( + node.endpoints.flatMap((endpoint) => { + if ( + endpoint.isUndocumented || + endpoint.response.responseType === 'void' || + (endpoint.response.responseType === 'resource' && + endpoint.response.resourceType === 'action_attempt') + ) { + return [] + } + return [endpoint.response.resourceType] + }), + ), + ].map((resourceType) => ({ + fileName: `${kebabCase(resourceType)}.js`, + typeName: getResourceTypeName(resourceType), + })) + : [] file.endpoints = [] if (node != null && 'endpoints' in node) { @@ -117,6 +160,13 @@ export const getEndpointLayoutContext = ( (parameter) => !parameter.isRequired, ), isUndocumented: endpoint.isUndocumented, + usesLegacyResponseType: endpoint.isUndocumented || returnsActionAttempt, + parameters: endpoint.request.parameters, + responseIsList: endpoint.response.responseType === 'resource_list', + responseResourceTypeName: + endpoint.response.responseType === 'void' + ? '' + : getResourceTypeName(endpoint.response.resourceType), ...getResponseContext(endpoint), } } diff --git a/codegen/smith.ts b/codegen/smith.ts index 0b575bfd..bf8950bb 100644 --- a/codegen/smith.ts +++ b/codegen/smith.ts @@ -11,7 +11,10 @@ import { connect, helpers } from './lib/index.js' const rootDir = dirname(fileURLToPath(import.meta.url)) -await Promise.all([deleteAsync('./src/lib/seam/connect/routes')]) +await Promise.all([ + deleteAsync('./src/lib/seam/connect/routes'), + deleteAsync('./src/lib/seam/connect/resources'), +]) const partials = await getHandlebarsPartials(`${rootDir}/layouts/partials`) diff --git a/src/lib/seam/connect/resources/access-code.ts b/src/lib/seam/connect/resources/access-code.ts new file mode 100644 index 00000000..8d65b47f --- /dev/null +++ b/src/lib/seam/connect/resources/access-code.ts @@ -0,0 +1,404 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AccessCodeResource = { + access_code_id: string + + code: string | null + common_code_key: string | null + created_at: string + + device_id: string + + dormakaba_oracode_metadata?: + | { + is_cancellable?: boolean | undefined + is_early_checkin_able?: boolean | undefined + is_extendable?: boolean | undefined + is_overridable?: boolean | undefined + site_name?: string | undefined + stay_id?: number | undefined + user_level_id?: string | undefined + user_level_name?: string | null | undefined + } + | null + | undefined + ends_at?: string | null | undefined + errors: Array< + | { + created_at?: string | undefined + error_code: 'provider_issue' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'failed_to_set_on_device' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'failed_to_remove_from_device' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'duplicate_code_on_device' + + is_access_code_error: boolean + + managed_access_code_id?: string | undefined + message: string + + unmanaged_access_code_id?: string | undefined + } + | { + created_at?: string | undefined + error_code: 'no_space_for_access_code_on_device' + + is_access_code_error: boolean + + message: string + } + | { + change_type?: 'modified' | 'removed' | undefined + created_at?: string | undefined + error_code: 'conflicting_external_modification' + + is_access_code_error: boolean + + message: string + + modified_fields?: + | Array<{ + field: string + + from: string | null + to: string | null + }> + | undefined + } + | { + created_at?: string | undefined + error_code: 'access_code_inactive' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'insufficient_permissions' + + is_access_code_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'account_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'salto_ks_subscription_limit_exceeded' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'dormakaba_sites_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_offline' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_removed' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'hub_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'empty_backup_access_code_pool' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'august_lock_not_authorized' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'missing_device_credentials' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'auxiliary_heat_running' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'subscription_required' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'bridge_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + > + + is_backup?: boolean | undefined + is_backup_access_code_available: boolean + + is_external_modification_allowed: boolean + + is_managed: boolean + + is_offline_access_code: boolean + + is_one_time_use: boolean + + is_scheduled_on_device?: boolean | undefined + is_waiting_for_code_assignment?: boolean | undefined + name: string | null + pending_mutations: Array< + | { + created_at: string + + message: string + + mutation_code: 'creating' + } + | { + created_at: string + + message: string + + mutation_code: 'deferring_creation' + + scheduled_at: string + } + | { + created_at: string + + message: string + + mutation_code: 'deleting' + } + | { + created_at: string + + from: { + code: string | null + } + + message: string + + mutation_code: 'updating_code' + + to: { + code: string | null + } + } + | { + created_at: string + + from: { + name: string | null + } + + message: string + + mutation_code: 'updating_name' + + to: { + name: string | null + } + } + | { + created_at: string + + from: { + ends_at: string | null + starts_at: string | null + } + + message: string + + mutation_code: 'updating_time_frame' + + to: { + ends_at: string | null + starts_at: string | null + } + } + > + + pulled_backup_access_code_id?: string | null | undefined + starts_at?: string | null | undefined + status: 'setting' | 'set' | 'unset' | 'removing' | 'unknown' + + type: 'time_bound' | 'ongoing' + + warnings: Array< + | { + created_at?: string | undefined + message: string + + warning_code: 'code_rotates_periodically' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'time_frame_adjusted_for_unknown_time_zone' + } + | { + change_type?: 'modified' | 'removed' | undefined + created_at?: string | undefined + message: string + + modified_fields?: + | Array<{ + field: string + + from: string | null + to: string | null + }> + | undefined + warning_code: 'external_modification_in_effect' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'delay_in_setting_on_device' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'delay_in_removing_from_device' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'third_party_integration_detected' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'igloo_algopin_must_be_used_within_24_hours' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'management_transferred' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'using_backup_access_code' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'being_deleted' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'unknown_issue_with_access_code' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/access-grant.ts b/src/lib/seam/connect/resources/access-grant.ts new file mode 100644 index 00000000..834210b7 --- /dev/null +++ b/src/lib/seam/connect/resources/access-grant.ts @@ -0,0 +1,169 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AccessGrantResource = { + access_grant_id: string + + access_grant_key?: string | undefined + access_method_ids: Array + + client_session_token?: string | undefined + created_at: string + + customization_profile_id?: string | undefined + 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 + }> + + instant_key_url?: string | 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 + + 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/access-method.ts b/src/lib/seam/connect/resources/access-method.ts new file mode 100644 index 00000000..58252281 --- /dev/null +++ b/src/lib/seam/connect/resources/access-method.ts @@ -0,0 +1,117 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AccessMethodResource = { + access_method_id: string + + client_session_token?: string | undefined + code?: string | null | undefined + created_at: string + + customization_profile_id?: string | undefined + display_name: string + + errors: Array<{ + created_at: string + + error_code: 'failed_to_issue' + + message: string + }> + + instant_key_url?: string | undefined + 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/acs-access-group.ts b/src/lib/seam/connect/resources/acs-access-group.ts new file mode 100644 index 00000000..fd70b415 --- /dev/null +++ b/src/lib/seam/connect/resources/acs-access-group.ts @@ -0,0 +1,167 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AcsAccessGroupResource = { + 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' + + 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' + + 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/acs-credential-pool.ts b/src/lib/seam/connect/resources/acs-credential-pool.ts new file mode 100644 index 00000000..55422d7d --- /dev/null +++ b/src/lib/seam/connect/resources/acs-credential-pool.ts @@ -0,0 +1,20 @@ +/* + * 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 new file mode 100644 index 00000000..d692f0c0 --- /dev/null +++ b/src/lib/seam/connect/resources/acs-credential-provisioning-automation.ts @@ -0,0 +1,16 @@ +/* + * 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-credential.ts b/src/lib/seam/connect/resources/acs-credential.ts new file mode 100644 index 00000000..e5411cab --- /dev/null +++ b/src/lib/seam/connect/resources/acs-credential.ts @@ -0,0 +1,127 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AcsCredentialResource = { + 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/acs-encoder.ts b/src/lib/seam/connect/resources/acs-encoder.ts new file mode 100644 index 00000000..5335bd8d --- /dev/null +++ b/src/lib/seam/connect/resources/acs-encoder.ts @@ -0,0 +1,26 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AcsEncoderResource = { + acs_encoder_id: string + + acs_system_id: string + + connected_account_id: string + + created_at: string + + display_name: string + + errors: Array<{ + created_at: string + + error_code: 'acs_encoder_removed' + + message: string + }> + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/acs-entrance.ts b/src/lib/seam/connect/resources/acs-entrance.ts new file mode 100644 index 00000000..95692032 --- /dev/null +++ b/src/lib/seam/connect/resources/acs-entrance.ts @@ -0,0 +1,171 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AcsEntranceResource = { + acs_entrance_id: string + + acs_system_id: string + + 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' + } + | { + created_at: string + + message: string + + warning_code: 'entrance_shares_zone' + } + | { + created_at: string + + message: string + + warning_code: 'entrance_setup_required' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_privacy_mode' + } + | { + created_at: string + + message: string + + warning_code: 'privacy_mode' + } + > +} diff --git a/src/lib/seam/connect/resources/acs-system.ts b/src/lib/seam/connect/resources/acs-system.ts new file mode 100644 index 00000000..150404f8 --- /dev/null +++ b/src/lib/seam/connect/resources/acs-system.ts @@ -0,0 +1,161 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AcsSystemResource = { + acs_access_group_count?: number | undefined + acs_system_id: string + + acs_user_count?: number | undefined + connected_account_id: string + + connected_account_ids: Array + + created_at: string + + default_credential_manager_acs_system_id?: string | null | undefined + errors: Array< + | { + created_at: string + + error_code: 'seam_bridge_disconnected' + + message: string + } + | { + created_at: string + + error_code: 'bridge_disconnected' + + is_bridge_error?: boolean | undefined + message: string + } + | { + created_at: string + + error_code: 'visionline_instance_unreachable' + + message: string + } + | { + created_at: string + + error_code: 'salto_ks_subscription_limit_exceeded' + + message: string + } + | { + created_at: string + + error_code: 'acs_system_disconnected' + + message: string + } + | { + created_at: string + + error_code: 'account_disconnected' + + message: string + } + | { + created_at: string + + error_code: 'salto_ks_certification_expired' + + message: string + } + | { + created_at: string + + error_code: 'provider_service_unavailable' + + message: string + } + > + + external_type?: + | 'pti_site' + | 'avigilon_alta_org' + | 'salto_ks_site' + | 'salto_space_system' + | 'brivo_account' + | 'hid_credential_manager_organization' + | 'visionline_system' + | 'assa_abloy_credential_service' + | 'latch_building' + | 'dormakaba_community_site' + | 'dormakaba_ambiance_site' + | 'legic_connect_credential_service' + | 'assa_abloy_vostio' + | 'assa_abloy_vostio_credential_service' + | 'hotek_site' + | 'kisi_organization' + | undefined + external_type_display_name?: string | undefined + image_alt_text: string + + image_url: string + + is_credential_manager: boolean + + location: { + time_zone: string | null + } + + name: string + + system_type?: + | 'pti_site' + | 'avigilon_alta_org' + | 'salto_ks_site' + | 'salto_space_system' + | 'brivo_account' + | 'hid_credential_manager_organization' + | 'visionline_system' + | 'assa_abloy_credential_service' + | 'latch_building' + | 'dormakaba_community_site' + | 'dormakaba_ambiance_site' + | 'legic_connect_credential_service' + | 'assa_abloy_vostio' + | 'assa_abloy_vostio_credential_service' + | 'hotek_site' + | 'kisi_organization' + | undefined + system_type_display_name?: string | undefined + visionline_metadata?: + | { + lan_address?: string | undefined + mobile_access_uuid?: string | undefined + system_id?: string | undefined + } + | undefined + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'salto_ks_subscription_limit_almost_reached' + } + | { + created_at: string + + message: string + + misconfigured_acs_entrance_ids?: Array | undefined + warning_code: 'time_zone_does_not_match_location' + } + | { + created_at: string + + message: string + + warning_code: 'setup_required' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/acs-user.ts b/src/lib/seam/connect/resources/acs-user.ts new file mode 100644 index 00000000..fb0d8ec1 --- /dev/null +++ b/src/lib/seam/connect/resources/acs-user.ts @@ -0,0 +1,262 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type AcsUserResource = { + 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/resources/action-attempt.ts b/src/lib/seam/connect/resources/action-attempt.ts new file mode 100644 index 00000000..0558303d --- /dev/null +++ b/src/lib/seam/connect/resources/action-attempt.ts @@ -0,0 +1,726 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type ActionAttemptResource = + | { + action_attempt_id: string + + action_type: 'LOCK_DOOR' + + error: { + message: string + + type: string + } + + result: { + was_confirmed_by_device?: boolean | undefined + } + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'UNLOCK_DOOR' + + error: { + message: string + + type: string + } + + result: { + was_confirmed_by_device?: boolean | undefined + } + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SCAN_CREDENTIAL' + + error: { + message: string + + type: + | 'uncategorized_error' + | 'action_attempt_expired' + | 'no_credential_on_encoder' + | 'encoder_not_online' + | 'encoder_communication_timeout' + | 'bridge_disconnected' + } + + result: { + acs_credential_on_encoder: { + card_number: string | null + created_at: string | null + ends_at: string | null + is_issued: boolean | null + starts_at: string | null + visionline_metadata?: + | { + cancelled?: boolean | undefined + card_format?: 'TLCode' | 'rfid48' | undefined + card_holder?: string | undefined + card_id?: string | undefined + common_acs_entrance_ids?: Array | undefined + discarded?: boolean | undefined + expired?: boolean | undefined + guest_acs_entrance_ids?: Array | undefined + number_of_issued_cards?: number | undefined + overridden?: boolean | undefined + overwritten?: boolean | undefined + pending_auto_update?: boolean | undefined + } + | undefined + } | null + acs_credential_on_seam: { + 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' + | 'schedule_externally_modified' + | 'schedule_modified' + | 'being_deleted' + | 'unknown_issue_with_acs_credential' + | 'needs_to_be_reissued' + }> + + workspace_id: string + } + + warnings: Array<{ + warning_code: + | 'acs_credential_on_encoder_out_of_sync' + | 'acs_credential_on_seam_not_found' + + warning_message: string + }> + } + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'ENCODE_CREDENTIAL' + + error: { + message: string + + type: + | 'uncategorized_error' + | 'action_attempt_expired' + | 'no_credential_on_encoder' + | 'incompatible_card_format' + | 'credential_cannot_be_reissued' + | 'encoder_not_online' + | 'encoder_communication_timeout' + | 'bridge_disconnected' + | 'encoding_interrupted' + | 'credential_deleted' + } + + result: { + 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' + | 'schedule_externally_modified' + | 'schedule_modified' + | 'being_deleted' + | 'unknown_issue_with_acs_credential' + | 'needs_to_be_reissued' + }> + + workspace_id: string + } + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SCAN_TO_ASSIGN_CREDENTIAL' + + error: { + message: string + + type: + | 'uncategorized_error' + | 'action_attempt_expired' + | 'no_credential_on_encoder' + } + + result: { + 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' + | 'schedule_externally_modified' + | 'schedule_modified' + | 'being_deleted' + | 'unknown_issue_with_acs_credential' + | 'needs_to_be_reissued' + }> + + workspace_id: string + } + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'ASSIGN_CREDENTIAL' + + error: { + message: string + + type: + | 'uncategorized_error' + | 'action_attempt_expired' + | 'credential_not_found' + } + + result: { + access_method_id: string + + client_session_token?: string | undefined + code?: string | null | undefined + created_at: string + + customization_profile_id?: string | undefined + display_name: string + + errors: Array<{ + created_at: string + + error_code: 'failed_to_issue' + + message: string + }> + + instant_key_url?: string | undefined + 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: { + ends_at: string | null + starts_at: string | null + } + + message: string + + mutation_code: + | 'provisioning_access' + | 'revoking_access' + | 'updating_access_times' + + to: { + ends_at: string | null + starts_at: string | null + } + }> + + warnings: Array<{ + created_at: string + + message: string + + warning_code: + | 'being_deleted' + | 'updating_access_times' + | 'pulled_backup_access_code' + | 'delay_in_issuing' + + original_access_method_id?: string | undefined + }> + + workspace_id: string + } + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'RESET_SANDBOX_WORKSPACE' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SET_FAN_MODE' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SET_HVAC_MODE' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'ACTIVATE_CLIMATE_PRESET' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SIMULATE_KEYPAD_CODE_ENTRY' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SIMULATE_MANUAL_LOCK_VIA_KEYPAD' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'PUSH_THERMOSTAT_PROGRAMS' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'CONFIGURE_AUTO_LOCK' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'SYNC_ACCESS_CODES' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'CREATE_ACCESS_CODE' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'DELETE_ACCESS_CODE' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'UPDATE_ACCESS_CODE' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'CREATE_NOISE_THRESHOLD' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'DELETE_NOISE_THRESHOLD' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } + | { + action_attempt_id: string + + action_type: 'UPDATE_NOISE_THRESHOLD' + + error: { + message: string + + type: string + } + + result: {} + + status: 'success' | 'pending' | 'error' + } diff --git a/src/lib/seam/connect/resources/batch.ts b/src/lib/seam/connect/resources/batch.ts new file mode 100644 index 00000000..6ae4bed3 --- /dev/null +++ b/src/lib/seam/connect/resources/batch.ts @@ -0,0 +1,35 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type BatchResource = { + 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 + customization_profiles?: 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_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 new file mode 100644 index 00000000..af0f467b --- /dev/null +++ b/src/lib/seam/connect/resources/bridge-client-session.ts @@ -0,0 +1,51 @@ +/* + * 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 new file mode 100644 index 00000000..dd04ca60 --- /dev/null +++ b/src/lib/seam/connect/resources/bridge-connected-systems.ts @@ -0,0 +1,22 @@ +/* + * 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/client-session.ts b/src/lib/seam/connect/resources/client-session.ts new file mode 100644 index 00000000..04f71532 --- /dev/null +++ b/src/lib/seam/connect/resources/client-session.ts @@ -0,0 +1,27 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type ClientSessionResource = { + client_session_id: string + + connect_webview_ids: Array + + connected_account_ids: Array + + created_at: string + + customer_key?: string | undefined + device_count: number + + expires_at: string + + token: string + + user_identifier_key: string | null + user_identity_id?: string | undefined + user_identity_ids: Array + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/connect-webview.ts b/src/lib/seam/connect/resources/connect-webview.ts new file mode 100644 index 00000000..c36118a7 --- /dev/null +++ b/src/lib/seam/connect/resources/connect-webview.ts @@ -0,0 +1,44 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type ConnectWebviewResource = { + accepted_capabilities: Array< + '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 + automatically_manage_new_devices: boolean + + connect_webview_id: string + + connected_account_id: string | null + created_at: string + + custom_metadata: Record + + custom_redirect_failure_url: string | null + custom_redirect_url: string | null + customer_key?: string | undefined + device_selection_mode: 'none' | 'single' | 'multiple' + + login_successful: boolean + + selected_provider: string | null + status: 'pending' | 'failed' | 'authorized' + + url: string + + wait_for_device_creation: boolean + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/connected-account.ts b/src/lib/seam/connect/resources/connected-account.ts new file mode 100644 index 00000000..f92f0326 --- /dev/null +++ b/src/lib/seam/connect/resources/connected-account.ts @@ -0,0 +1,158 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type ConnectedAccountResource = { + accepted_capabilities: Array< + 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' + > + + account_type?: string | undefined + account_type_display_name: string + + automatically_manage_new_devices: boolean + + connected_account_id: string + + created_at?: string | undefined + custom_metadata: Record + + customer_key?: string | undefined + default_checkin_time?: string | undefined + default_checkout_time?: string | undefined + display_name: string + + errors: Array< + | { + created_at: string + + error_code: 'account_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + | { + created_at: string + + error_code: 'bridge_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + | { + created_at: string + + error_code: 'salto_ks_subscription_limit_exceeded' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + + salto_ks_metadata: { + sites?: + | Array<{ + site_id?: string | undefined + site_name?: string | undefined + site_user_subscription_limit?: number | undefined + subscribed_site_user_count?: number | undefined + }> + | undefined + } + } + | { + created_at: string + + error_code: 'dormakaba_sites_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + > + + ical_feed_origin?: string | undefined + ical_url?: string | undefined + image_url?: string | undefined + time_zone?: string | undefined + user_identifier?: + | { + api_url?: string | undefined + email?: string | undefined + exclusive?: boolean | undefined + phone?: string | undefined + username?: string | undefined + } + | undefined + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'scheduled_maintenance_window' + } + | { + created_at: string + + message: string + + warning_code: 'unknown_issue_with_connected_account' + } + | { + created_at: string + + message: string + + salto_ks_metadata: { + sites?: + | Array<{ + site_id?: string | undefined + site_name?: string | undefined + site_user_subscription_limit?: number | undefined + subscribed_site_user_count?: number | undefined + }> + | undefined + } + + warning_code: 'salto_ks_subscription_limit_almost_reached' + } + | { + created_at: string + + message: string + + warning_code: 'account_reauthorization_requested' + } + | { + created_at: string + + message: string + + warning_code: 'being_deleted' + } + | { + created_at: string + + message: string + + warning_code: 'provider_service_unavailable' + } + | { + created_at: string + + message: string + + warning_code: 'setup_required' + } + | { + created_at: string + + message: string + + warning_code: 'dormakaba_sites_unapproved' + } + > +} diff --git a/src/lib/seam/connect/resources/customer-portal.ts b/src/lib/seam/connect/resources/customer-portal.ts new file mode 100644 index 00000000..fde57bc2 --- /dev/null +++ b/src/lib/seam/connect/resources/customer-portal.ts @@ -0,0 +1,16 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type CustomerPortalResource = { + created_at: string + + customer_key: string + + expires_at: string + + url: string + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/customer.ts b/src/lib/seam/connect/resources/customer.ts new file mode 100644 index 00000000..2c0783cf --- /dev/null +++ b/src/lib/seam/connect/resources/customer.ts @@ -0,0 +1,12 @@ +/* + * 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 new file mode 100644 index 00000000..3f4322ca --- /dev/null +++ b/src/lib/seam/connect/resources/customization-profile.ts @@ -0,0 +1,27 @@ +/* + * 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-provider.ts b/src/lib/seam/connect/resources/device-provider.ts new file mode 100644 index 00000000..af3ccb00 --- /dev/null +++ b/src/lib/seam/connect/resources/device-provider.ts @@ -0,0 +1,105 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type DeviceProviderResource = { + can_configure_auto_lock?: boolean | undefined + can_hvac_cool?: boolean | undefined + can_hvac_heat?: boolean | undefined + can_hvac_heat_cool?: boolean | undefined + can_program_offline_access_codes?: boolean | undefined + can_program_online_access_codes?: boolean | undefined + can_program_thermostat_programs_as_different_each_day?: boolean | undefined + can_program_thermostat_programs_as_same_each_day?: boolean | undefined + can_program_thermostat_programs_as_weekday_weekend?: boolean | undefined + can_remotely_lock?: boolean | undefined + can_remotely_unlock?: boolean | undefined + can_run_thermostat_programs?: boolean | undefined + can_simulate_connection?: boolean | undefined + can_simulate_disconnection?: boolean | undefined + can_simulate_hub_connection?: boolean | undefined + can_simulate_hub_disconnection?: boolean | undefined + can_simulate_paid_subscription?: boolean | undefined + can_simulate_removal?: boolean | undefined + can_turn_off_hvac?: boolean | undefined + can_unlock_with_code?: boolean | undefined + device_provider_name: + | 'hotek' + | 'dormakaba_community' + | 'legic_connect' + | 'akuvox' + | 'august' + | 'avigilon_alta' + | 'brivo' + | 'butterflymx' + | 'schlage' + | 'smartthings' + | 'yale' + | 'genie' + | 'doorking' + | 'salto' + | 'salto_ks' + | 'salto_ks_accept' + | 'lockly' + | 'ttlock' + | 'linear' + | 'noiseaware' + | 'nuki' + | 'igloo' + | 'kwikset' + | 'minut' + | 'my_2n' + | 'controlbyweb' + | 'nest' + | 'igloohome' + | 'ecobee' + | 'four_suites' + | 'dormakaba_oracode' + | 'pti' + | 'wyze' + | 'seam_passport' + | 'visionline' + | 'assa_abloy_credential_service' + | 'tedee' + | 'honeywell_resideo' + | 'first_alert' + | 'latch' + | 'akiles' + | 'assa_abloy_vostio' + | 'assa_abloy_vostio_credential_service' + | 'tado' + | 'salto_space' + | 'sensi' + | 'keynest' + | 'korelock' + | 'keyincode' + | 'dormakaba_ambiance' + | 'ultraloq' + | 'dusaw' + | 'sifely' + | 'thirty_three_lock' + | 'ring' + | 'ical' + | 'lodgify' + | 'hostaway' + | 'guesty' + | 'acuity_scheduling' + | 'omnitec' + | 'kisi' + + display_name: string + + image_url: string + + provider_categories: Array< + | 'stable' + | 'consumer_smartlocks' + | 'beta' + | 'thermostats' + | 'noise_sensors' + | 'access_control_systems' + | 'cameras' + | 'connectors' + > +} diff --git a/src/lib/seam/connect/resources/device.ts b/src/lib/seam/connect/resources/device.ts new file mode 100644 index 00000000..28b59eea --- /dev/null +++ b/src/lib/seam/connect/resources/device.ts @@ -0,0 +1,1204 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type DeviceResource = { + can_configure_auto_lock?: boolean | undefined + can_hvac_cool?: boolean | undefined + can_hvac_heat?: boolean | undefined + can_hvac_heat_cool?: boolean | undefined + can_program_offline_access_codes?: boolean | undefined + can_program_online_access_codes?: boolean | undefined + can_program_thermostat_programs_as_different_each_day?: boolean | undefined + can_program_thermostat_programs_as_same_each_day?: boolean | undefined + can_program_thermostat_programs_as_weekday_weekend?: boolean | undefined + can_remotely_lock?: boolean | undefined + can_remotely_unlock?: boolean | undefined + can_run_thermostat_programs?: boolean | undefined + can_simulate_connection?: boolean | undefined + can_simulate_disconnection?: boolean | undefined + can_simulate_hub_connection?: boolean | undefined + can_simulate_hub_disconnection?: boolean | undefined + can_simulate_paid_subscription?: boolean | undefined + can_simulate_removal?: boolean | undefined + can_turn_off_hvac?: boolean | undefined + can_unlock_with_code?: boolean | undefined + capabilities_supported: Array< + | 'access_code' + | 'lock' + | 'noise_detection' + | 'thermostat' + | 'battery' + | 'phone' + > + + connected_account_id: string + + created_at: string + + custom_metadata: Record + + device_id: string + + device_manufacturer?: + | { + display_name: string + + image_url?: string | undefined + manufacturer: string + } + | undefined + device_provider?: + | { + device_provider_name: string + + display_name: string + + image_url?: string | undefined + provider_category: string + } + | undefined + device_type: + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | 'keynest_key' + | 'noiseaware_activity_zone' + | 'minut_sensor' + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | 'ios_phone' + | 'android_phone' + | 'ring_camera' + + display_name: string + + errors: Array< + | { + created_at: string + + error_code: 'account_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'salto_ks_subscription_limit_exceeded' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'dormakaba_sites_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_offline' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_removed' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'hub_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'empty_backup_access_code_pool' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'august_lock_not_authorized' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'missing_device_credentials' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'auxiliary_heat_running' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'subscription_required' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'bridge_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + > + + is_managed: boolean + + location?: + | { + location_name?: string | undefined + time_zone?: string | undefined + timezone?: string | undefined + } + | undefined + nickname?: string | undefined + properties: { + accessory_keypad?: + | { + battery?: + | { + level: number + } + | undefined + is_connected: boolean + } + | undefined + appearance: { + name: string + } + + battery?: + | { + level: number + + status: 'critical' | 'low' | 'good' | 'full' + } + | undefined + battery_level?: number | undefined + currently_triggering_noise_threshold_ids?: Array | undefined + has_direct_power?: boolean | undefined + image_alt_text?: string | undefined + image_url?: string | undefined + manufacturer?: string | undefined + model: { + accessory_keypad_supported?: boolean | undefined + can_connect_accessory_keypad?: boolean | undefined + display_name: string + + has_built_in_keypad?: boolean | undefined + manufacturer_display_name: string + + offline_access_codes_supported?: boolean | undefined + online_access_codes_supported?: boolean | undefined + } + + name: string + + noise_level_decibels?: number | undefined + offline_access_codes_enabled?: boolean | undefined + online: boolean + + online_access_codes_enabled?: boolean | undefined + serial_number?: string | undefined + supports_accessory_keypad?: boolean | undefined + supports_offline_access_codes?: boolean | undefined + assa_abloy_credential_service_metadata?: + | { + endpoints?: + | Array<{ + endpoint_id?: string | undefined + is_active?: boolean | undefined + }> + | undefined + has_active_endpoint?: boolean | undefined + } + | undefined + salto_space_credential_service_metadata?: + | { + has_active_phone?: boolean | undefined + } + | undefined + akiles_metadata?: + | { + _member_group_id?: string | undefined + gadget_id?: string | undefined + gadget_name?: string | undefined + product_name?: string | undefined + } + | undefined + assa_abloy_vostio_metadata?: + | { + encoder_name?: string | undefined + } + | undefined + august_metadata?: + | { + has_keypad?: boolean | undefined + house_id?: string | undefined + house_name?: string | undefined + keypad_battery_level?: string | undefined + lock_id?: string | undefined + lock_name?: string | undefined + model?: string | 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?: + | { + activation_enabled?: boolean | undefined + device_name?: string | undefined + } + | undefined + controlbyweb_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + relay_name?: string | null | undefined + } + | undefined + dormakaba_oracode_metadata?: + | { + device_id?: {} | undefined + door_id?: number | undefined + door_is_wireless?: boolean | undefined + door_name?: string | undefined + iana_timezone?: string | undefined + predefined_time_slots?: + | Array<{ + check_in_time?: string | undefined + check_out_time?: string | undefined + dormakaba_oracode_user_level_id?: string | undefined + dormakaba_oracode_user_level_prefix?: number | undefined + is_24_hour?: boolean | undefined + is_biweekly_mode?: boolean | undefined + is_master?: boolean | undefined + is_one_shot?: boolean | undefined + name?: string | undefined + prefix?: number | undefined + }> + | undefined + site_id?: number | null | undefined + site_name?: string | undefined + } + | undefined + ecobee_metadata?: + | { + device_name?: string | undefined + ecobee_device_id?: string | undefined + } + | undefined + four_suites_metadata?: + | { + device_id?: number | undefined + device_name?: string | undefined + reclose_delay_in_seconds?: number | undefined + } + | undefined + genie_metadata?: + | { + device_name?: string | undefined + door_name?: string | undefined + } + | undefined + honeywell_resideo_metadata?: + | { + device_name?: string | undefined + honeywell_resideo_device_id?: string | undefined + } + | undefined + igloo_metadata?: + | { + bridge_id?: string | undefined + device_id?: string | undefined + model?: string | undefined + } + | undefined + igloohome_metadata?: + | { + bridge_id?: string | undefined + bridge_name?: string | undefined + device_id?: string | undefined + device_name?: string | undefined + is_accessory_keypad_linked_to_bridge?: boolean | undefined + keypad_id?: string | undefined + } + | undefined + keynest_metadata?: + | { + address?: string | null | undefined + current_or_last_store_id?: number | undefined + current_status?: string | null | undefined + current_user_company?: string | null | undefined + current_user_email?: string | null | undefined + current_user_name?: string | null | undefined + current_user_phone_number?: string | null | undefined + default_office_id?: number | undefined + device_name?: string | undefined + fob_id?: number | undefined + handover_method?: string | null | undefined + has_photo?: boolean | undefined + is_quadient_locker?: boolean | undefined + key_id?: string | undefined + key_notes?: string | null | undefined + keynest_app_user?: string | null | undefined + last_movement?: string | undefined + property_id?: string | null | undefined + property_postcode?: string | null | undefined + status_type?: string | undefined + subscription_plan?: string | undefined + } + | undefined + kisi_metadata?: + | { + description?: string | null | undefined + lock_id?: number | undefined + lock_name?: string | undefined + place_name?: string | null | undefined + } + | undefined + korelock_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + firmware_version?: string | undefined + location_id?: string | null | undefined + model_code?: string | undefined + serial_number?: string | undefined + wifi_signal_strength?: number | undefined + } + | undefined + kwikset_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + model_number?: string | undefined + } + | undefined + lockly_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + model?: string | undefined + } + | undefined + minut_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + latest_sensor_values?: + | { + accelerometer_z?: + | { + time?: string | undefined + value?: number | undefined + } + | undefined + humidity?: + | { + time?: string | undefined + value?: number | undefined + } + | undefined + pressure?: + | { + time?: string | undefined + value?: number | undefined + } + | undefined + sound?: + | { + time?: string | undefined + value?: number | undefined + } + | undefined + temperature?: + | { + time?: string | undefined + value?: number | undefined + } + | undefined + } + | undefined + } + | undefined + nest_metadata?: + | { + device_custom_name?: string | undefined + device_name?: string | undefined + display_name?: string | undefined + nest_device_id?: string | undefined + } + | undefined + noiseaware_metadata?: + | { + device_id?: string | undefined + device_model?: 'indoor' | 'outdoor' | undefined + device_name?: string | undefined + noise_level_decibel?: number | undefined + noise_level_nrs?: number | undefined + } + | undefined + nuki_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + keypad_2_paired?: boolean | undefined + keypad_battery_critical?: boolean | undefined + keypad_paired?: boolean | undefined + } + | undefined + omnitec_metadata?: + | { + has_gateway?: boolean | undefined + lock_alias?: string | undefined + lock_id?: number | undefined + lock_mac?: string | undefined + lock_name?: string | undefined + time_zone?: string | null | undefined + timezone_raw_offset_ms?: number | undefined + } + | undefined + ring_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + } + | undefined + salto_ks_metadata?: + | { + battery_level?: string | undefined + customer_reference?: string | undefined + has_custom_pin_subscription?: boolean | undefined + lock_id?: string | undefined + lock_type?: string | undefined + locked_state?: string | undefined + model?: string | undefined + site_id?: string | undefined + site_name?: string | undefined + } + | undefined + salto_metadata?: + | { + battery_level?: string | undefined + customer_reference?: string | undefined + lock_id?: string | undefined + lock_type?: string | undefined + locked_state?: string | undefined + model?: string | undefined + site_id?: string | undefined + site_name?: string | undefined + } + | undefined + schlage_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + model?: string | undefined + } + | undefined + seam_bridge_metadata?: + | { + device_num?: number | undefined + name?: string | undefined + unlock_method?: 'bridge' | 'doorking' | undefined + } + | undefined + sensi_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + dual_setpoints_not_supported?: boolean | undefined + product_type?: string | undefined + } + | undefined + smartthings_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + location_id?: string | undefined + model?: string | undefined + } + | undefined + tado_metadata?: + | { + device_type?: string | undefined + serial_no?: string | undefined + } + | undefined + tedee_metadata?: + | { + bridge_id?: number | undefined + bridge_name?: string | undefined + device_id?: number | undefined + device_model?: string | undefined + device_name?: string | undefined + keypad_id?: number | undefined + serial_number?: string | undefined + } + | undefined + ttlock_metadata?: + | { + feature_value?: string | undefined + features?: + | { + auto_lock_time_config?: boolean | undefined + incomplete_keyboard_passcode?: boolean | undefined + lock_command?: boolean | undefined + passcode?: boolean | undefined + passcode_management?: boolean | undefined + unlock_via_gateway?: boolean | undefined + wifi?: boolean | undefined + } + | undefined + has_gateway?: boolean | undefined + lock_alias?: string | undefined + lock_id?: number | undefined + timezone_raw_offset_ms?: number | null | undefined + wireless_keypads?: + | Array<{ + wireless_keypad_id?: number | undefined + wireless_keypad_name?: string | undefined + }> + | undefined + } + | undefined + two_n_metadata?: + | { + device_id?: number | undefined + device_name?: string | undefined + } + | undefined + ultraloq_metadata?: + | { + device_id?: string | undefined + device_name?: string | undefined + device_type?: string | undefined + time_zone?: string | null | undefined + } + | undefined + visionline_metadata?: + | { + encoder_id?: string | undefined + } + | undefined + wyze_metadata?: + | { + device_id?: string | undefined + device_info_model?: string | undefined + device_name?: string | undefined + keypad_uuid?: string | undefined + locker_status_hardlock?: number | undefined + product_model?: string | undefined + product_name?: string | undefined + 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 + code_constraints?: + | Array<{ + constraint_type: + | 'no_zeros' + | 'cannot_start_with_12' + | 'no_triple_consecutive_ints' + | 'cannot_specify_pin_code' + | 'pin_code_matches_existing_set' + | 'start_date_in_future' + | 'no_ascending_or_descending_sequence' + | 'at_least_three_unique_digits' + | 'cannot_contain_089' + | 'cannot_contain_0789' + | 'unique_first_four_digits' + | 'no_all_same_digits' + | 'name_length' + | 'name_must_be_unique' + + max_length?: number | undefined + min_length?: number | undefined + }> + | undefined + door_open?: boolean | undefined + has_native_entry_events?: boolean | undefined + keypad_battery?: + | { + level: number + } + | undefined + locked?: boolean | undefined + max_active_codes_supported?: number | undefined + offline_time_frame_options?: + | Array<{ + display_name: string + + end_date_recurrence_rule?: string | undefined + matching_start_end_time?: boolean | undefined + max_duration?: string | undefined + min_duration?: string | undefined + start_date_recurrence_rule?: string | undefined + time_pairs?: + | Array<{ + display_name: string + + end_time: string + + start_time: string + }> + | undefined + time_zone?: string | undefined + }> + | undefined + online_time_frame_options?: + | Array<{ + display_name: string + + end_date_recurrence_rule?: string | undefined + matching_start_end_time?: boolean | undefined + max_duration?: string | undefined + min_duration?: string | undefined + start_date_recurrence_rule?: string | undefined + time_pairs?: + | Array<{ + display_name: string + + end_time: string + + start_time: string + }> + | undefined + time_zone?: string | undefined + }> + | undefined + supported_code_lengths?: Array | undefined + supports_backup_access_code_pool?: boolean | undefined + active_thermostat_schedule?: + | { + climate_preset_key: string + + created_at: string + + device_id: string + + ends_at: string + + errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + is_override_allowed?: boolean | undefined + max_override_period_minutes?: number | null | undefined + name: string | null + starts_at: string + + thermostat_schedule_id: string + + workspace_id: string + } + | null + | undefined + active_thermostat_schedule_id?: string | null | undefined + available_climate_preset_modes?: + | Array<'home' | 'away' | 'wake' | 'sleep' | 'occupied' | 'unoccupied'> + | undefined + available_climate_presets?: + | Array<{ + can_delete: boolean + + can_edit: boolean + + can_use_with_thermostat_daily_programs: boolean + + climate_preset_key: string + + climate_preset_mode?: + | 'home' + | 'away' + | 'wake' + | 'sleep' + | 'occupied' + | 'unoccupied' + | undefined + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + display_name: string + + ecobee_metadata?: + | { + climate_ref?: string | undefined + is_optimized?: boolean | undefined + owner?: 'user' | 'system' | undefined + } + | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + hvac_mode_setting?: + | 'off' + | 'heat' + | 'cool' + | 'heat_cool' + | 'eco' + | undefined + manual_override_allowed: boolean + + name?: string | null | undefined + }> + | undefined + available_fan_mode_settings?: Array<'auto' | 'on' | 'circulate'> | undefined + available_hvac_mode_settings?: + | Array<'off' | 'heat' | 'cool' | 'heat_cool' | 'eco'> + | undefined + current_climate_setting?: + | { + can_delete?: boolean | undefined + can_edit?: boolean | undefined + can_use_with_thermostat_daily_programs?: boolean | undefined + climate_preset_key?: string | undefined + climate_preset_mode?: + | 'home' + | 'away' + | 'wake' + | 'sleep' + | 'occupied' + | 'unoccupied' + | undefined + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + display_name?: string | undefined + ecobee_metadata?: + | { + climate_ref?: string | undefined + is_optimized?: boolean | undefined + owner?: 'user' | 'system' | undefined + } + | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + hvac_mode_setting?: + | 'off' + | 'heat' + | 'cool' + | 'heat_cool' + | 'eco' + | undefined + manual_override_allowed?: boolean | undefined + name?: string | null | undefined + } + | undefined + default_climate_setting?: + | { + can_delete?: boolean | undefined + can_edit?: boolean | undefined + can_use_with_thermostat_daily_programs?: boolean | undefined + climate_preset_key?: string | undefined + climate_preset_mode?: + | 'home' + | 'away' + | 'wake' + | 'sleep' + | 'occupied' + | 'unoccupied' + | undefined + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + display_name?: string | undefined + ecobee_metadata?: + | { + climate_ref?: string | undefined + is_optimized?: boolean | undefined + owner?: 'user' | 'system' | undefined + } + | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + hvac_mode_setting?: + | 'off' + | 'heat' + | 'cool' + | 'heat_cool' + | 'eco' + | undefined + manual_override_allowed?: boolean | undefined + name?: string | null | undefined + } + | undefined + fallback_climate_preset_key?: string | null | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + is_cooling?: boolean | undefined + is_fan_running?: boolean | undefined + is_heating?: boolean | undefined + is_temporary_manual_override_active?: boolean | undefined + max_cooling_set_point_celsius?: number | undefined + max_cooling_set_point_fahrenheit?: number | undefined + max_heating_set_point_celsius?: number | undefined + max_heating_set_point_fahrenheit?: number | undefined + max_thermostat_daily_program_periods_per_day?: number | undefined + max_unique_climate_presets_per_thermostat_weekly_program?: + | number + | undefined + min_cooling_set_point_celsius?: number | undefined + min_cooling_set_point_fahrenheit?: number | undefined + min_heating_cooling_delta_celsius?: number | undefined + min_heating_cooling_delta_fahrenheit?: number | undefined + min_heating_set_point_celsius?: number | undefined + min_heating_set_point_fahrenheit?: number | undefined + relative_humidity?: number | undefined + temperature_celsius?: number | undefined + temperature_fahrenheit?: number | undefined + temperature_threshold?: + | { + lower_limit_celsius: number | null + lower_limit_fahrenheit: number | null + upper_limit_celsius: number | null + upper_limit_fahrenheit: number | null + } + | undefined + thermostat_daily_program_period_precision_minutes?: number | undefined + thermostat_daily_programs?: + | Array<{ + created_at: string + + device_id: string + + name: string | null + periods: Array<{ + climate_preset_key: string + + starts_at_time: string + }> + + thermostat_daily_program_id: string + + workspace_id: string + }> + | undefined + thermostat_weekly_program?: + | { + created_at: string + + friday_program_id: string | null + monday_program_id: string | null + saturday_program_id: string | null + sunday_program_id: string | null + thursday_program_id: string | null + tuesday_program_id: string | null + wednesday_program_id: string | null + } + | null + | undefined + } + + space_ids: Array + + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'partial_backup_access_code_pool' + } + | { + created_at: string + + message: string + + warning_code: 'many_active_backup_codes' + } + | { + created_at: string + + message: string + + warning_code: 'third_party_integration_detected' + } + | { + created_at: string + + message: string + + warning_code: 'ttlock_lock_gateway_unlocking_not_enabled' + } + | { + created_at: string + + message: string + + warning_code: 'ttlock_weak_gateway_signal' + } + | { + created_at: string + + message: string + + warning_code: 'power_saving_mode' + } + | { + created_at: string + + message: string + + warning_code: 'temperature_threshold_exceeded' + } + | { + created_at: string + + message: string + + warning_code: 'device_communication_degraded' + } + | { + created_at: string + + message: string + + warning_code: 'scheduled_maintenance_window' + } + | { + created_at: string + + message: string + + warning_code: 'device_has_flaky_connection' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_office_mode' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_privacy_mode' + } + | { + created_at: string + + message: string + + warning_code: 'privacy_mode' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_subscription_limit_almost_reached' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_lock_access_code_support_removed' + } + | { + created_at: string + + message: string + + warning_code: 'unknown_issue_with_phone' + } + | { + created_at: string + + message: string + + warning_code: 'lockly_time_zone_not_configured' + } + | { + created_at: string + + message: string + + warning_code: 'ultraloq_time_zone_unknown' + } + | { + created_at: string + + message: string + + warning_code: 'time_zone_unknown' + } + | { + created_at: string + + message: string + + warning_code: 'time_zone_mismatch' + } + | { + created_at: string + + message: string + + warning_code: 'two_n_device_missing_timezone' + } + | { + created_at: string + + message: string + + warning_code: 'hub_required_for_additional_capabilities' + } + | { + created_at: string + + message: string + + warning_code: 'provider_issue' + } + | { + created_at: string + + message: string + + warning_code: 'keynest_unsupported_locker' + } + | { + created_at: string + + message: string + + warning_code: 'accessory_keypad_setup_required' + } + | { + created_at: string + + message: string + + warning_code: 'unreliable_online_status' + } + | { + active_access_code_count: number + + created_at: string + + max_active_access_code_count: number + + message: string + + warning_code: 'max_access_codes_reached' + } + | { + created_at: string + + message: string + + warning_code: 'insufficient_permissions' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/enrollment-automation.ts b/src/lib/seam/connect/resources/enrollment-automation.ts new file mode 100644 index 00000000..57c01f80 --- /dev/null +++ b/src/lib/seam/connect/resources/enrollment-automation.ts @@ -0,0 +1,16 @@ +/* + * 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 new file mode 100644 index 00000000..58a0b5de --- /dev/null +++ b/src/lib/seam/connect/resources/event.ts @@ -0,0 +1,2751 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type EventResource = + | { + created_at?: string | undefined + event_description?: string | undefined + event_id?: string | undefined + event_type?: + | 'access_code.created' + | 'access_code.changed' + | 'access_code.name_changed' + | 'access_code.code_changed' + | 'access_code.time_frame_changed' + | 'access_code.mutations_requested' + | 'access_code.scheduled_on_device' + | 'access_code.set_on_device' + | 'access_code.removed_from_device' + | 'access_code.delay_in_setting_on_device' + | 'access_code.failed_to_set_on_device' + | 'access_code.deleted' + | 'access_code.delay_in_removing_from_device' + | 'access_code.failed_to_remove_from_device' + | 'access_code.modified_external_to_seam' + | 'access_code.deleted_external_to_seam' + | 'access_code.backup_access_code_pulled' + | 'access_code.unmanaged.converted_to_managed' + | 'access_code.unmanaged.failed_to_convert_to_managed' + | 'access_code.unmanaged.created' + | 'access_code.unmanaged.removed' + | 'access_grant.created' + | 'access_grant.deleted' + | 'access_grant.access_granted_to_all_doors' + | 'access_grant.access_granted_to_door' + | 'access_grant.access_to_door_lost' + | 'access_grant.access_times_changed' + | 'access_grant.could_not_create_requested_access_methods' + | 'access_method.issued' + | 'access_method.revoked' + | 'access_method.card_encoding_required' + | 'access_method.deleted' + | 'access_method.reissued' + | 'access_method.created' + | 'access_method.delay_in_issuing' + | 'access_method.failed_to_issue' + | 'acs_system.connected' + | 'acs_system.added' + | 'acs_system.disconnected' + | 'acs_credential.deleted' + | 'acs_credential.issued' + | 'acs_credential.reissued' + | 'acs_credential.invalidated' + | 'acs_user.created' + | 'acs_user.deleted' + | 'acs_encoder.added' + | 'acs_encoder.removed' + | 'acs_access_group.deleted' + | 'acs_entrance.added' + | 'acs_entrance.removed' + | 'client_session.deleted' + | 'connected_account.connected' + | 'connected_account.created' + | 'connected_account.successful_login' + | 'connected_account.disconnected' + | 'connected_account.completed_first_sync' + | 'connected_account.deleted' + | 'connected_account.completed_first_sync_after_reconnection' + | 'connected_account.reauthorization_requested' + | 'action_attempt.lock_door.succeeded' + | 'action_attempt.lock_door.failed' + | 'action_attempt.unlock_door.succeeded' + | 'action_attempt.unlock_door.failed' + | 'action_attempt.simulate_keypad_code_entry.succeeded' + | 'action_attempt.simulate_keypad_code_entry.failed' + | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' + | 'action_attempt.simulate_manual_lock_via_keypad.failed' + | 'connect_webview.login_succeeded' + | 'connect_webview.login_failed' + | 'device.connected' + | 'device.added' + | 'device.converted_to_unmanaged' + | 'device.unmanaged.converted_to_managed' + | 'device.unmanaged.connected' + | 'device.disconnected' + | 'device.unmanaged.disconnected' + | 'device.tampered' + | 'device.low_battery' + | 'device.battery_status_changed' + | 'device.removed' + | 'device.deleted' + | 'device.third_party_integration_detected' + | 'device.third_party_integration_no_longer_detected' + | 'device.salto.privacy_mode_activated' + | 'device.salto.privacy_mode_deactivated' + | 'device.connection_became_flaky' + | 'device.connection_stabilized' + | 'device.error.subscription_required' + | 'device.error.subscription_required.resolved' + | 'device.accessory_keypad_connected' + | 'device.accessory_keypad_disconnected' + | 'noise_sensor.noise_threshold_triggered' + | 'lock.locked' + | 'lock.unlocked' + | 'lock.access_denied' + | 'thermostat.climate_preset_activated' + | 'thermostat.manually_adjusted' + | 'thermostat.temperature_threshold_exceeded' + | 'thermostat.temperature_threshold_no_longer_exceeded' + | 'thermostat.temperature_reached_set_point' + | 'thermostat.temperature_changed' + | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' + | 'enrollment_automation.deleted' + | 'phone.deactivated' + | 'space.device_membership_changed' + | 'space.created' + | 'space.deleted' + | undefined + occurred_at?: string | undefined + workspace_id?: string | undefined + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.created' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + change_reason?: string | undefined + changed_properties?: + | Array<{ + from: string | null + property: string + + to: string | null + }> + | undefined + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.changed' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + description: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.name_changed' + + from: { + name: string | null + } + + occurred_at: string + + to: { + name: string | null + } + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + description: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.code_changed' + + from: { + code: string | null + } + + occurred_at: string + + to: { + code: string | null + } + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + description: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.time_frame_changed' + + from: { + ends_at: string | null + starts_at: string | null + } + + occurred_at: string + + to: { + ends_at: string | null + starts_at: string | null + } + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.mutations_requested' + + occurred_at: string + + requested_mutations: Array<{ + from?: Record | undefined + mutation_code: + | 'updating_name' + | 'updating_code' + | 'updating_time_frame' + | 'deleting' + | 'creating' + | 'deferring_creation' + + to?: Record | undefined + }> + + workspace_id: string + } + | { + access_code_id: string + + code: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.scheduled_on_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + code: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.set_on_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.removed_from_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + access_code_id: string + + access_code_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.delay_in_setting_on_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + access_code_id: string + + access_code_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.failed_to_set_on_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + code: string | null + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.deleted' + + occurred_at: string + + workspace_id: string + } + | { + access_code_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + access_code_id: string + + access_code_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.delay_in_removing_from_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + access_code_id: string + + access_code_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.failed_to_remove_from_device' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.modified_external_to_seam' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.deleted_external_to_seam' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + backup_access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.backup_access_code_pulled' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.unmanaged.converted_to_managed' + + occurred_at: string + + workspace_id: string + } + | { + access_code_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + access_code_id: string + + access_code_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.unmanaged.failed_to_convert_to_managed' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.unmanaged.created' + + occurred_at: string + + workspace_id: string + } + | { + access_code_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_code.unmanaged.removed' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.created' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.deleted' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.access_granted_to_all_doors' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_id: string + + acs_entrance_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.access_granted_to_door' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_id: string + + acs_entrance_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.access_to_door_lost' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_id: string + + access_grant_key?: string | undefined + created_at: string + + ends_at?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.access_times_changed' + + occurred_at: string + + starts_at?: string | undefined + workspace_id: string + } + | { + access_grant_id: string + + created_at: string + + error_message: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_grant.could_not_create_requested_access_methods' + + missing_device_ids?: Array | undefined + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + code?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.issued' + + is_backup_code?: boolean | undefined + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.revoked' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.card_encoding_required' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.deleted' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + code?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.reissued' + + is_backup_code?: boolean | undefined + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.created' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.delay_in_issuing' + + occurred_at: string + + workspace_id: string + } + | { + access_grant_ids: Array + + access_grant_keys?: Array | undefined + access_method_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'access_method.failed_to_issue' + + occurred_at: string + + workspace_id: string + } + | { + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_system.connected' + + occurred_at: string + + workspace_id: string + } + | { + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_system.added' + + occurred_at: string + + workspace_id: string + } + | { + acs_system_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + acs_system_id: string + + acs_system_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id?: string | undefined + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_system.disconnected' + + occurred_at: string + + workspace_id: string + } + | { + acs_credential_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_credential.deleted' + + occurred_at: string + + workspace_id: string + } + | { + acs_credential_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_credential.issued' + + occurred_at: string + + workspace_id: string + } + | { + acs_credential_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_credential.reissued' + + occurred_at: string + + workspace_id: string + } + | { + acs_credential_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_credential.invalidated' + + occurred_at: string + + workspace_id: string + } + | { + acs_system_id: string + + acs_user_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_user.created' + + occurred_at: string + + workspace_id: string + } + | { + acs_system_id: string + + acs_user_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_user.deleted' + + occurred_at: string + + workspace_id: string + } + | { + acs_encoder_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_encoder.added' + + occurred_at: string + + workspace_id: string + } + | { + acs_encoder_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_encoder.removed' + + occurred_at: string + + workspace_id: string + } + | { + acs_access_group_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_access_group.deleted' + + occurred_at: string + + workspace_id: string + } + | { + acs_entrance_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_entrance.added' + + occurred_at: string + + workspace_id: string + } + | { + acs_entrance_id: string + + acs_system_id: string + + connected_account_id?: string | undefined + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'acs_entrance.removed' + + occurred_at: string + + workspace_id: string + } + | { + client_session_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'client_session.deleted' + + occurred_at: string + + workspace_id: string + } + | { + connect_webview_id?: string | undefined + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.connected' + + occurred_at: string + + workspace_id: string + } + | { + connect_webview_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.created' + + occurred_at: string + + workspace_id: string + } + | { + connect_webview_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.successful_login' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.disconnected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.completed_first_sync' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + connected_account_type?: string | undefined + created_at: string + + customer_key?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.deleted' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.completed_first_sync_after_reconnection' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connected_account.reauthorization_requested' + + occurred_at: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.lock_door.succeeded' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.lock_door.failed' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.unlock_door.succeeded' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.unlock_door.failed' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.simulate_keypad_code_entry.succeeded' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.simulate_keypad_code_entry.failed' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.simulate_manual_lock_via_keypad.succeeded' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + action_attempt_id: string + + action_type: string + + connected_account_id?: string | undefined + created_at: string + + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'action_attempt.simulate_manual_lock_via_keypad.failed' + + occurred_at: string + + status: string + + workspace_id: string + } + | { + connect_webview_id: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'connect_webview.login_succeeded' + + occurred_at: string + + workspace_id: string + } + | { + connect_webview_id: string + + created_at: string + + event_description?: string | undefined + event_id: string + + event_type: 'connect_webview.login_failed' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.connected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.added' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.converted_to_unmanaged' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.unmanaged.converted_to_managed' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.unmanaged.connected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + error_code: + | 'account_disconnected' + | 'hub_disconnected' + | 'device_disconnected' + + event_description?: string | undefined + event_id: string + + event_type: 'device.disconnected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + error_code: + | 'account_disconnected' + | 'hub_disconnected' + | 'device_disconnected' + + event_description?: string | undefined + event_id: string + + event_type: 'device.unmanaged.disconnected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.tampered' + + occurred_at: string + + workspace_id: string + } + | { + battery_level: number + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.low_battery' + + occurred_at: string + + workspace_id: string + } + | { + battery_level: number + + battery_status: 'critical' | 'low' | 'good' | 'full' + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.battery_status_changed' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.removed' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + device_name?: string | null | undefined + event_description?: string | undefined + event_id: string + + event_type: 'device.deleted' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.third_party_integration_detected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.third_party_integration_no_longer_detected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.salto.privacy_mode_activated' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.salto.privacy_mode_deactivated' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'device.connection_became_flaky' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.connection_stabilized' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'device.error.subscription_required' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.error.subscription_required.resolved' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.accessory_keypad_connected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + connected_account_id: string + + connected_account_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + device_id: string + + device_warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + event_description?: string | undefined + event_id: string + + event_type: 'device.accessory_keypad_disconnected' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'noise_sensor.noise_threshold_triggered' + + minut_metadata?: Record | undefined + noise_level_decibels?: number | undefined + noise_level_nrs?: number | undefined + noise_threshold_id?: string | undefined + noise_threshold_name?: string | undefined + noiseaware_metadata?: Record | undefined + occurred_at: string + + workspace_id: string + } + | { + access_code_id?: string | undefined + access_code_is_managed?: boolean | undefined + acs_entrance_id?: string | undefined + acs_system_id?: string | undefined + acs_user_id?: string | undefined + action_attempt_id?: string | undefined + code?: string | undefined + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'lock.locked' + + is_via_bluetooth?: boolean | undefined + is_via_nfc?: boolean | undefined + method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card' + + occurred_at: string + + user_identity_id?: string | undefined + workspace_id: string + } + | { + access_code_id?: string | undefined + access_code_is_managed?: boolean | undefined + acs_entrance_id?: string | undefined + acs_system_id?: string | undefined + acs_user_id?: string | undefined + action_attempt_id?: string | undefined + code?: string | undefined + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'lock.unlocked' + + is_via_bluetooth?: boolean | undefined + is_via_nfc?: boolean | undefined + method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card' + + occurred_at: string + + user_identity_id?: string | undefined + workspace_id: string + } + | { + access_code_id?: string | undefined + acs_entrance_id?: string | undefined + acs_system_id?: string | undefined + acs_user_id?: string | undefined + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id?: string | undefined + event_description?: string | undefined + event_id: string + + event_type: 'lock.access_denied' + + occurred_at: string + + reason?: + | { + message: string + + reason_code: + | 'unknown_code' + | 'expired_code' + | 'blocklisted_code' + | 'too_many_attempts' + | 'blocked_by_privacy_mode' + | 'credential_error' + } + | undefined + user_identity_id?: string | undefined + workspace_id: string + } + | { + climate_preset_key: string + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'thermostat.climate_preset_activated' + + is_fallback_climate_preset: boolean + + occurred_at: string + + thermostat_schedule_id: string | null + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'thermostat.manually_adjusted' + + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + hvac_mode_setting?: + | 'off' + | 'heat' + | 'cool' + | 'heat_cool' + | 'eco' + | undefined + method: 'seam' | 'external' + + occurred_at: string + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'thermostat.temperature_threshold_exceeded' + + lower_limit_celsius: number | null + lower_limit_fahrenheit: number | null + occurred_at: string + + temperature_celsius: number + + temperature_fahrenheit: number + + upper_limit_celsius: number | null + upper_limit_fahrenheit: number | null + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'thermostat.temperature_threshold_no_longer_exceeded' + + lower_limit_celsius: number | null + lower_limit_fahrenheit: number | null + occurred_at: string + + temperature_celsius: number + + temperature_fahrenheit: number + + upper_limit_celsius: number | null + upper_limit_fahrenheit: number | null + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + desired_temperature_celsius?: number | undefined + desired_temperature_fahrenheit?: number | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'thermostat.temperature_reached_set_point' + + occurred_at: string + + temperature_celsius: number + + temperature_fahrenheit: number + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'thermostat.temperature_changed' + + occurred_at: string + + temperature_celsius: number + + temperature_fahrenheit: number + + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + device_name: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.name_changed' + + occurred_at: string + + workspace_id: string + } + | { + activation_reason: 'motion_detected' + + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'camera.activated' + + image_url?: string | undefined + motion_sub_type?: 'human' | 'vehicle' | 'package' | 'other' | undefined + occurred_at: string + + video_url?: string | undefined + workspace_id: string + } + | { + connected_account_custom_metadata?: Record | undefined + connected_account_id: string + + created_at: string + + customer_key?: string | undefined + device_custom_metadata?: Record | undefined + device_id: string + + event_description?: string | undefined + event_id: string + + event_type: 'device.doorbell_rang' + + image_url?: string | undefined + occurred_at: string + + video_url?: string | undefined + workspace_id: string + } + | { + 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 + + event_description?: string | undefined + event_id: string + + event_type: 'phone.deactivated' + + occurred_at: string + + workspace_id: string + } + | { + acs_entrance_ids: Array + + created_at: string + + device_ids: Array + + event_description?: string | undefined + event_id: string + + event_type: 'space.device_membership_changed' + + occurred_at: string + + space_id: string + + space_key?: string | undefined + workspace_id: string + } + | { + acs_entrance_ids: Array + + created_at: string + + device_ids: Array + + event_description?: string | undefined + event_id: string + + event_type: 'space.created' + + occurred_at: string + + space_id: string + + space_key?: string | undefined + workspace_id: string + } + | { + acs_entrance_ids: Array + + created_at: string + + device_ids: Array + + event_description?: string | undefined + event_id: string + + event_type: 'space.deleted' + + occurred_at: string + + space_id: string + + space_key?: string | undefined + workspace_id: string + } diff --git a/src/lib/seam/connect/resources/index.ts b/src/lib/seam/connect/resources/index.ts new file mode 100644 index 00000000..1ce61559 --- /dev/null +++ b/src/lib/seam/connect/resources/index.ts @@ -0,0 +1,48 @@ +/* + * Automatically generated by codegen/smith.ts. + * 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 { 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' +export type { WorkspaceResource } from './workspace.js' diff --git a/src/lib/seam/connect/resources/instant-key.ts b/src/lib/seam/connect/resources/instant-key.ts new file mode 100644 index 00000000..25773d4b --- /dev/null +++ b/src/lib/seam/connect/resources/instant-key.ts @@ -0,0 +1,28 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type InstantKeyResource = { + client_session_id: string + + created_at: string + + customization?: + | { + logo_url?: string | undefined + primary_color?: string | undefined + secondary_color?: string | undefined + } + | undefined + customization_profile_id?: string | undefined + expires_at: string + + instant_key_id: string + + instant_key_url: string + + user_identity_id: string + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/magic-link.ts b/src/lib/seam/connect/resources/magic-link.ts new file mode 100644 index 00000000..1f785ba3 --- /dev/null +++ b/src/lib/seam/connect/resources/magic-link.ts @@ -0,0 +1,16 @@ +/* + * 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/noise-threshold.ts b/src/lib/seam/connect/resources/noise-threshold.ts new file mode 100644 index 00000000..dd398aed --- /dev/null +++ b/src/lib/seam/connect/resources/noise-threshold.ts @@ -0,0 +1,19 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type NoiseThresholdResource = { + device_id: string + + ends_daily_at: string + + name: string + + noise_threshold_decibels: number + + noise_threshold_id: string + + noise_threshold_nrs?: number | undefined + starts_daily_at: string +} diff --git a/src/lib/seam/connect/resources/phone-session.ts b/src/lib/seam/connect/resources/phone-session.ts new file mode 100644 index 00000000..3d991068 --- /dev/null +++ b/src/lib/seam/connect/resources/phone-session.ts @@ -0,0 +1,291 @@ +/* + * 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 + + 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/phone.ts b/src/lib/seam/connect/resources/phone.ts new file mode 100644 index 00000000..02224d24 --- /dev/null +++ b/src/lib/seam/connect/resources/phone.ts @@ -0,0 +1,54 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type PhoneResource = { + created_at: string + + custom_metadata: Record + + device_id: string + + device_type: 'ios_phone' | 'android_phone' + + display_name: string + + errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + nickname?: string | undefined + properties: { + assa_abloy_credential_service_metadata?: + | { + endpoints?: + | Array<{ + endpoint_id?: string | undefined + is_active?: boolean | undefined + }> + | undefined + has_active_endpoint?: boolean | undefined + } + | undefined + salto_space_credential_service_metadata?: + | { + has_active_phone?: boolean | undefined + } + | undefined + } + + warnings: Array<{ + created_at: string + + message: string + + warning_code: string + }> + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/space.ts b/src/lib/seam/connect/resources/space.ts new file mode 100644 index 00000000..a7c5bfeb --- /dev/null +++ b/src/lib/seam/connect/resources/space.ts @@ -0,0 +1,40 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type SpaceResource = { + acs_entrance_count: number + + created_at: string + + customer_data?: + | { + address?: string | null | undefined + default_checkin_time?: string | null | undefined + default_checkout_time?: string | null | undefined + time_zone?: string | null | undefined + } + | undefined + customer_key?: string | undefined + device_count: number + + display_name: string + + geolocation?: + | { + latitude: number + + longitude: number + } + | null + | undefined + name: string + + parent_space_id?: string | undefined + parent_space_key?: string | undefined + space_id: string + + space_key?: string | undefined + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/staff-member.ts b/src/lib/seam/connect/resources/staff-member.ts new file mode 100644 index 00000000..a0edc7ab --- /dev/null +++ b/src/lib/seam/connect/resources/staff-member.ts @@ -0,0 +1,23 @@ +/* + * 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/thermostat-daily-program.ts b/src/lib/seam/connect/resources/thermostat-daily-program.ts new file mode 100644 index 00000000..9f4f9eec --- /dev/null +++ b/src/lib/seam/connect/resources/thermostat-daily-program.ts @@ -0,0 +1,21 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type ThermostatDailyProgramResource = { + created_at: string + + device_id: string + + name: string | null + periods: Array<{ + climate_preset_key: string + + starts_at_time: string + }> + + thermostat_daily_program_id: string + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/thermostat-schedule.ts b/src/lib/seam/connect/resources/thermostat-schedule.ts new file mode 100644 index 00000000..5a249354 --- /dev/null +++ b/src/lib/seam/connect/resources/thermostat-schedule.ts @@ -0,0 +1,31 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type ThermostatScheduleResource = { + climate_preset_key: string + + created_at: string + + device_id: string + + ends_at: string + + errors: Array<{ + created_at: string + + error_code: string + + message: string + }> + + is_override_allowed?: boolean | undefined + max_override_period_minutes?: number | null | undefined + name: string | null + starts_at: string + + thermostat_schedule_id: string + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/unknown.ts b/src/lib/seam/connect/resources/unknown.ts new file mode 100644 index 00000000..47d0b791 --- /dev/null +++ b/src/lib/seam/connect/resources/unknown.ts @@ -0,0 +1,6 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UnknownResource = Record diff --git a/src/lib/seam/connect/resources/unmanaged-access-code.ts b/src/lib/seam/connect/resources/unmanaged-access-code.ts new file mode 100644 index 00000000..283e03ce --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-access-code.ts @@ -0,0 +1,320 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UnmanagedAccessCodeResource = { + access_code_id: string + + cannot_be_managed?: boolean | undefined + cannot_delete_unmanaged_access_code?: boolean | undefined + code: string | null + created_at: string + + device_id: string + + dormakaba_oracode_metadata?: + | { + is_cancellable?: boolean | undefined + is_early_checkin_able?: boolean | undefined + is_extendable?: boolean | undefined + is_overridable?: boolean | undefined + site_name?: string | undefined + stay_id?: number | undefined + user_level_id?: string | undefined + user_level_name?: string | null | undefined + } + | null + | undefined + ends_at?: string | null | undefined + errors: Array< + | { + created_at?: string | undefined + error_code: 'provider_issue' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'failed_to_set_on_device' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'failed_to_remove_from_device' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'duplicate_code_on_device' + + is_access_code_error: boolean + + managed_access_code_id?: string | undefined + message: string + + unmanaged_access_code_id?: string | undefined + } + | { + created_at?: string | undefined + error_code: 'no_space_for_access_code_on_device' + + is_access_code_error: boolean + + message: string + } + | { + change_type?: 'modified' | 'removed' | undefined + created_at?: string | undefined + error_code: 'conflicting_external_modification' + + is_access_code_error: boolean + + message: string + + modified_fields?: + | Array<{ + field: string + + from: string | null + to: string | null + }> + | undefined + } + | { + created_at?: string | undefined + error_code: 'access_code_inactive' + + is_access_code_error: boolean + + message: string + } + | { + created_at?: string | undefined + error_code: 'insufficient_permissions' + + is_access_code_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'account_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'salto_ks_subscription_limit_exceeded' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'dormakaba_sites_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_offline' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_removed' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'hub_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'empty_backup_access_code_pool' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'august_lock_not_authorized' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'missing_device_credentials' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'auxiliary_heat_running' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'subscription_required' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'bridge_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + > + + is_managed: boolean + + name: string | null + starts_at?: string | null | undefined + status: 'set' | 'unset' + + type: 'time_bound' | 'ongoing' + + warnings: Array< + | { + created_at?: string | undefined + message: string + + warning_code: 'code_rotates_periodically' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'time_frame_adjusted_for_unknown_time_zone' + } + | { + change_type?: 'modified' | 'removed' | undefined + created_at?: string | undefined + message: string + + modified_fields?: + | Array<{ + field: string + + from: string | null + to: string | null + }> + | undefined + warning_code: 'external_modification_in_effect' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'delay_in_setting_on_device' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'delay_in_removing_from_device' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'third_party_integration_detected' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'igloo_algopin_must_be_used_within_24_hours' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'management_transferred' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'using_backup_access_code' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'being_deleted' + } + | { + created_at?: string | undefined + message: string + + warning_code: 'unknown_issue_with_access_code' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/unmanaged-acs-access-group.ts b/src/lib/seam/connect/resources/unmanaged-acs-access-group.ts new file mode 100644 index 00000000..145c4fb8 --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-acs-access-group.ts @@ -0,0 +1,167 @@ +/* + * 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' + + 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' + + 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 new file mode 100644 index 00000000..e5e2a629 --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-acs-credential.ts @@ -0,0 +1,127 @@ +/* + * 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 new file mode 100644 index 00000000..0ae56d27 --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-acs-user.ts @@ -0,0 +1,262 @@ +/* + * 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/resources/unmanaged-device.ts b/src/lib/seam/connect/resources/unmanaged-device.ts new file mode 100644 index 00000000..768dad1c --- /dev/null +++ b/src/lib/seam/connect/resources/unmanaged-device.ts @@ -0,0 +1,468 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UnmanagedDeviceResource = { + can_configure_auto_lock?: boolean | undefined + can_hvac_cool?: boolean | undefined + can_hvac_heat?: boolean | undefined + can_hvac_heat_cool?: boolean | undefined + can_program_offline_access_codes?: boolean | undefined + can_program_online_access_codes?: boolean | undefined + can_program_thermostat_programs_as_different_each_day?: boolean | undefined + can_program_thermostat_programs_as_same_each_day?: boolean | undefined + can_program_thermostat_programs_as_weekday_weekend?: boolean | undefined + can_remotely_lock?: boolean | undefined + can_remotely_unlock?: boolean | undefined + can_run_thermostat_programs?: boolean | undefined + can_simulate_connection?: boolean | undefined + can_simulate_disconnection?: boolean | undefined + can_simulate_hub_connection?: boolean | undefined + can_simulate_hub_disconnection?: boolean | undefined + can_simulate_paid_subscription?: boolean | undefined + can_simulate_removal?: boolean | undefined + can_turn_off_hvac?: boolean | undefined + can_unlock_with_code?: boolean | undefined + capabilities_supported: Array< + | 'access_code' + | 'lock' + | 'noise_detection' + | 'thermostat' + | 'battery' + | 'phone' + > + + connected_account_id: string + + created_at: string + + custom_metadata: Record + + device_id: string + + device_type: + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | 'keynest_key' + | 'noiseaware_activity_zone' + | 'minut_sensor' + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | 'ios_phone' + | 'android_phone' + | 'ring_camera' + + errors: Array< + | { + created_at: string + + error_code: 'account_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'salto_ks_subscription_limit_exceeded' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'dormakaba_sites_disconnected' + + is_connected_account_error: boolean + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_offline' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_removed' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'hub_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'device_disconnected' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'empty_backup_access_code_pool' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'august_lock_not_authorized' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'missing_device_credentials' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'auxiliary_heat_running' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'subscription_required' + + is_device_error: boolean + + message: string + } + | { + created_at: string + + error_code: 'bridge_disconnected' + + is_bridge_error?: boolean | undefined + is_connected_account_error?: boolean | undefined + message: string + } + > + + is_managed: boolean + + location?: + | { + location_name?: string | undefined + time_zone?: string | undefined + timezone?: string | undefined + } + | undefined + properties: { + accessory_keypad?: + | { + battery?: + | { + level: number + } + | undefined + is_connected: boolean + } + | undefined + battery?: + | { + level: number + + status: 'critical' | 'low' | 'good' | 'full' + } + | undefined + battery_level?: number | undefined + image_alt_text?: string | undefined + image_url?: string | undefined + manufacturer?: string | undefined + model: { + accessory_keypad_supported?: boolean | undefined + can_connect_accessory_keypad?: boolean | undefined + display_name: string + + has_built_in_keypad?: boolean | undefined + manufacturer_display_name: string + + offline_access_codes_supported?: boolean | undefined + online_access_codes_supported?: boolean | undefined + } + + name: string + + offline_access_codes_enabled?: boolean | undefined + online: boolean + + online_access_codes_enabled?: boolean | undefined + } + + warnings: Array< + | { + created_at: string + + message: string + + warning_code: 'partial_backup_access_code_pool' + } + | { + created_at: string + + message: string + + warning_code: 'many_active_backup_codes' + } + | { + created_at: string + + message: string + + warning_code: 'third_party_integration_detected' + } + | { + created_at: string + + message: string + + warning_code: 'ttlock_lock_gateway_unlocking_not_enabled' + } + | { + created_at: string + + message: string + + warning_code: 'ttlock_weak_gateway_signal' + } + | { + created_at: string + + message: string + + warning_code: 'power_saving_mode' + } + | { + created_at: string + + message: string + + warning_code: 'temperature_threshold_exceeded' + } + | { + created_at: string + + message: string + + warning_code: 'device_communication_degraded' + } + | { + created_at: string + + message: string + + warning_code: 'scheduled_maintenance_window' + } + | { + created_at: string + + message: string + + warning_code: 'device_has_flaky_connection' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_office_mode' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_privacy_mode' + } + | { + created_at: string + + message: string + + warning_code: 'privacy_mode' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_subscription_limit_almost_reached' + } + | { + created_at: string + + message: string + + warning_code: 'salto_ks_lock_access_code_support_removed' + } + | { + created_at: string + + message: string + + warning_code: 'unknown_issue_with_phone' + } + | { + created_at: string + + message: string + + warning_code: 'lockly_time_zone_not_configured' + } + | { + created_at: string + + message: string + + warning_code: 'ultraloq_time_zone_unknown' + } + | { + created_at: string + + message: string + + warning_code: 'time_zone_unknown' + } + | { + created_at: string + + message: string + + warning_code: 'time_zone_mismatch' + } + | { + created_at: string + + message: string + + warning_code: 'two_n_device_missing_timezone' + } + | { + created_at: string + + message: string + + warning_code: 'hub_required_for_additional_capabilities' + } + | { + created_at: string + + message: string + + warning_code: 'provider_issue' + } + | { + created_at: string + + message: string + + warning_code: 'keynest_unsupported_locker' + } + | { + created_at: string + + message: string + + warning_code: 'accessory_keypad_setup_required' + } + | { + created_at: string + + message: string + + warning_code: 'unreliable_online_status' + } + | { + active_access_code_count: number + + created_at: string + + max_active_access_code_count: number + + message: string + + warning_code: 'max_access_codes_reached' + } + | { + created_at: string + + message: string + + warning_code: 'insufficient_permissions' + } + > + + workspace_id: string +} diff --git a/src/lib/seam/connect/resources/user-identity.ts b/src/lib/seam/connect/resources/user-identity.ts new file mode 100644 index 00000000..e8f6b302 --- /dev/null +++ b/src/lib/seam/connect/resources/user-identity.ts @@ -0,0 +1,49 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type UserIdentityResource = { + 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' + } + | { + 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/resources/webhook.ts b/src/lib/seam/connect/resources/webhook.ts new file mode 100644 index 00000000..e64b9d88 --- /dev/null +++ b/src/lib/seam/connect/resources/webhook.ts @@ -0,0 +1,12 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type WebhookResource = { + event_types?: Array | undefined + secret?: string | undefined + url: string + + webhook_id: string +} diff --git a/src/lib/seam/connect/resources/workspace.ts b/src/lib/seam/connect/resources/workspace.ts new file mode 100644 index 00000000..df5e9203 --- /dev/null +++ b/src/lib/seam/connect/resources/workspace.ts @@ -0,0 +1,29 @@ +/* + * Automatically generated by codegen/smith.ts. + * Do not edit this file. + */ + +export type WorkspaceResource = { + company_name: string + + connect_partner_name: string | null + connect_webview_customization: { + inviter_logo_url?: string | undefined + logo_shape?: 'circle' | 'square' | undefined + primary_button_color?: string | undefined + primary_button_text_color?: string | undefined + success_message?: string | undefined + } + + is_publishable_key_auth_enabled: boolean + + is_sandbox: boolean + + is_suspended: boolean + + name: string + + organization_id: string | null + publishable_key?: string | undefined + 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 afb50144..fc285f3b 100644 --- a/src/lib/seam/connect/routes/access-codes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes/access-codes.ts @@ -31,6 +31,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { AccessCodeResource } 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' @@ -322,8 +323,26 @@ export class SeamHttpAccessCodes { } } -export type AccessCodesCreateParameters = - RouteRequestBody<'/access_codes/create'> +export type AccessCodesCreateParameters = { + allow_external_modification?: boolean | undefined + attempt_for_offline_device?: boolean | undefined + code?: string | undefined + common_code_key?: string | undefined + device_id: string + + ends_at?: string | undefined + is_external_modification_allowed?: boolean | undefined + is_offline_access_code?: boolean | undefined + is_one_time_use?: boolean | undefined + max_time_rounding?: '1hour' | '1day' | '1h' | '1d' | undefined + name?: string | undefined + 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 +} /** * @deprecated Use AccessCodesCreateParameters instead. @@ -333,7 +352,7 @@ export type AccessCodesCreateBody = AccessCodesCreateParameters /** * @deprecated Use AccessCodesCreateRequest instead. */ -export type AccessCodesCreateResponse = RouteResponse<'/access_codes/create'> +export type AccessCodesCreateResponse = { access_code: AccessCodeResource } export type AccessCodesCreateRequest = SeamHttpRequest< AccessCodesCreateResponse, @@ -342,8 +361,24 @@ export type AccessCodesCreateRequest = SeamHttpRequest< export interface AccessCodesCreateOptions {} -export type AccessCodesCreateMultipleParameters = - RouteRequestBody<'/access_codes/create_multiple'> +export type AccessCodesCreateMultipleParameters = { + allow_external_modification?: boolean | undefined + attempt_for_offline_device?: boolean | undefined + behavior_when_code_cannot_be_shared?: + | 'throw' + | 'create_random_code' + | undefined + code?: string | undefined + device_ids: Array + + ends_at?: string | undefined + is_external_modification_allowed?: boolean | undefined + name?: string | undefined + prefer_native_scheduling?: boolean | undefined + preferred_code_length?: number | undefined + starts_at?: string | undefined + use_backup_access_code_pool?: boolean | undefined +} /** * @deprecated Use AccessCodesCreateMultipleParameters instead. @@ -353,8 +388,9 @@ export type AccessCodesCreateMultipleBody = AccessCodesCreateMultipleParameters /** * @deprecated Use AccessCodesCreateMultipleRequest instead. */ -export type AccessCodesCreateMultipleResponse = - RouteResponse<'/access_codes/create_multiple'> +export type AccessCodesCreateMultipleResponse = { + access_codes: Array +} export type AccessCodesCreateMultipleRequest = SeamHttpRequest< AccessCodesCreateMultipleResponse, @@ -363,8 +399,12 @@ export type AccessCodesCreateMultipleRequest = SeamHttpRequest< export interface AccessCodesCreateMultipleOptions {} -export type AccessCodesDeleteParameters = - RouteRequestBody<'/access_codes/delete'> +export type AccessCodesDeleteParameters = { + access_code_id: string + + device_id?: string | undefined + sync?: boolean | undefined +} /** * @deprecated Use AccessCodesDeleteParameters instead. @@ -374,14 +414,15 @@ export type AccessCodesDeleteParams = AccessCodesDeleteParameters /** * @deprecated Use AccessCodesDeleteRequest instead. */ -export type AccessCodesDeleteResponse = RouteResponse<'/access_codes/delete'> +export type AccessCodesDeleteResponse = void export type AccessCodesDeleteRequest = SeamHttpRequest export interface AccessCodesDeleteOptions {} -export type AccessCodesGenerateCodeParameters = - RouteRequestBody<'/access_codes/generate_code'> +export type AccessCodesGenerateCodeParameters = { + device_id: string +} /** * @deprecated Use AccessCodesGenerateCodeParameters instead. @@ -391,8 +432,9 @@ export type AccessCodesGenerateCodeParams = AccessCodesGenerateCodeParameters /** * @deprecated Use AccessCodesGenerateCodeRequest instead. */ -export type AccessCodesGenerateCodeResponse = - RouteResponse<'/access_codes/generate_code'> +export type AccessCodesGenerateCodeResponse = { + generated_code: AccessCodeResource +} export type AccessCodesGenerateCodeRequest = SeamHttpRequest< AccessCodesGenerateCodeResponse, @@ -401,7 +443,11 @@ export type AccessCodesGenerateCodeRequest = SeamHttpRequest< export interface AccessCodesGenerateCodeOptions {} -export type AccessCodesGetParameters = RouteRequestBody<'/access_codes/get'> +export type AccessCodesGetParameters = { + access_code_id?: string | undefined + code?: string | undefined + device_id?: string | undefined +} /** * @deprecated Use AccessCodesGetParameters instead. @@ -411,7 +457,7 @@ export type AccessCodesGetParams = AccessCodesGetParameters /** * @deprecated Use AccessCodesGetRequest instead. */ -export type AccessCodesGetResponse = RouteResponse<'/access_codes/get'> +export type AccessCodesGetResponse = { access_code: AccessCodeResource } export type AccessCodesGetRequest = SeamHttpRequest< AccessCodesGetResponse, @@ -441,7 +487,18 @@ export type AccessCodesGetTimelineRequest = SeamHttpRequest< export interface AccessCodesGetTimelineOptions {} -export type AccessCodesListParameters = RouteRequestBody<'/access_codes/list'> +export type AccessCodesListParameters = { + access_code_ids?: Array | undefined + access_grant_id?: string | undefined + access_grant_key?: string | undefined + access_method_id?: string | undefined + customer_key?: string | undefined + device_id?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use AccessCodesListParameters instead. @@ -451,7 +508,9 @@ export type AccessCodesListParams = AccessCodesListParameters /** * @deprecated Use AccessCodesListRequest instead. */ -export type AccessCodesListResponse = RouteResponse<'/access_codes/list'> +export type AccessCodesListResponse = { + access_codes: Array +} export type AccessCodesListRequest = SeamHttpRequest< AccessCodesListResponse, @@ -460,8 +519,9 @@ export type AccessCodesListRequest = SeamHttpRequest< export interface AccessCodesListOptions {} -export type AccessCodesPullBackupAccessCodeParameters = - RouteRequestBody<'/access_codes/pull_backup_access_code'> +export type AccessCodesPullBackupAccessCodeParameters = { + access_code_id: string +} /** * @deprecated Use AccessCodesPullBackupAccessCodeParameters instead. @@ -472,8 +532,9 @@ export type AccessCodesPullBackupAccessCodeBody = /** * @deprecated Use AccessCodesPullBackupAccessCodeRequest instead. */ -export type AccessCodesPullBackupAccessCodeResponse = - RouteResponse<'/access_codes/pull_backup_access_code'> +export type AccessCodesPullBackupAccessCodeResponse = { + access_code: AccessCodeResource +} export type AccessCodesPullBackupAccessCodeRequest = SeamHttpRequest< AccessCodesPullBackupAccessCodeResponse, @@ -482,8 +543,13 @@ export type AccessCodesPullBackupAccessCodeRequest = SeamHttpRequest< export interface AccessCodesPullBackupAccessCodeOptions {} -export type AccessCodesReportDeviceConstraintsParameters = - RouteRequestBody<'/access_codes/report_device_constraints'> +export type AccessCodesReportDeviceConstraintsParameters = { + device_id: string + + max_code_length?: number | undefined + min_code_length?: number | undefined + supported_code_lengths?: Array | undefined +} /** * @deprecated Use AccessCodesReportDeviceConstraintsParameters instead. @@ -494,8 +560,7 @@ export type AccessCodesReportDeviceConstraintsBody = /** * @deprecated Use AccessCodesReportDeviceConstraintsRequest instead. */ -export type AccessCodesReportDeviceConstraintsResponse = - RouteResponse<'/access_codes/report_device_constraints'> +export type AccessCodesReportDeviceConstraintsResponse = void export type AccessCodesReportDeviceConstraintsRequest = SeamHttpRequest< void, @@ -504,8 +569,28 @@ export type AccessCodesReportDeviceConstraintsRequest = SeamHttpRequest< export interface AccessCodesReportDeviceConstraintsOptions {} -export type AccessCodesUpdateParameters = - RouteRequestBody<'/access_codes/update'> +export type AccessCodesUpdateParameters = { + access_code_id: string + + allow_external_modification?: boolean | undefined + attempt_for_offline_device?: boolean | undefined + code?: string | undefined + device_id?: string | undefined + ends_at?: string | undefined + is_external_modification_allowed?: boolean | undefined + is_managed?: boolean | undefined + is_offline_access_code?: boolean | undefined + is_one_time_use?: boolean | undefined + max_time_rounding?: '1hour' | '1day' | '1h' | '1d' | undefined + name?: string | undefined + 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 +} /** * @deprecated Use AccessCodesUpdateParameters instead. @@ -515,14 +600,19 @@ export type AccessCodesUpdateBody = AccessCodesUpdateParameters /** * @deprecated Use AccessCodesUpdateRequest instead. */ -export type AccessCodesUpdateResponse = RouteResponse<'/access_codes/update'> +export type AccessCodesUpdateResponse = void export type AccessCodesUpdateRequest = SeamHttpRequest export interface AccessCodesUpdateOptions {} -export type AccessCodesUpdateMultipleParameters = - RouteRequestBody<'/access_codes/update_multiple'> +export type AccessCodesUpdateMultipleParameters = { + common_code_key: string + + ends_at?: string | undefined + name?: string | undefined + starts_at?: string | undefined +} /** * @deprecated Use AccessCodesUpdateMultipleParameters instead. @@ -532,8 +622,7 @@ export type AccessCodesUpdateMultipleBody = AccessCodesUpdateMultipleParameters /** * @deprecated Use AccessCodesUpdateMultipleRequest instead. */ -export type AccessCodesUpdateMultipleResponse = - RouteResponse<'/access_codes/update_multiple'> +export type AccessCodesUpdateMultipleResponse = void export type AccessCodesUpdateMultipleRequest = 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 74000f90..4a24f48d 100644 --- a/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/access-codes/simulate/simulate.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, @@ -31,6 +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 { 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' @@ -176,8 +175,13 @@ export class SeamHttpAccessCodesSimulate { } } -export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = - RouteRequestBody<'/access_codes/simulate/create_unmanaged_access_code'> +export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { + code: string + + device_id: string + + name: string +} /** * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeParameters instead. @@ -188,8 +192,9 @@ export type AccessCodesSimulateCreateUnmanagedAccessCodeBody = /** * @deprecated Use AccessCodesSimulateCreateUnmanagedAccessCodeRequest instead. */ -export type AccessCodesSimulateCreateUnmanagedAccessCodeResponse = - RouteResponse<'/access_codes/simulate/create_unmanaged_access_code'> +export type AccessCodesSimulateCreateUnmanagedAccessCodeResponse = { + access_code: UnmanagedAccessCodeResource +} export type AccessCodesSimulateCreateUnmanagedAccessCodeRequest = SeamHttpRequest< 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 2f3190f9..c1252d49 100644 --- a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.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, @@ -31,6 +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 { 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' @@ -228,8 +227,14 @@ export class SeamHttpAccessCodesUnmanaged { } } -export type AccessCodesUnmanagedConvertToManagedParameters = - RouteRequestBody<'/access_codes/unmanaged/convert_to_managed'> +export type AccessCodesUnmanagedConvertToManagedParameters = { + access_code_id: string + + allow_external_modification?: boolean | undefined + force?: boolean | undefined + is_external_modification_allowed?: boolean | undefined + sync?: boolean | undefined +} /** * @deprecated Use AccessCodesUnmanagedConvertToManagedParameters instead. @@ -240,8 +245,7 @@ export type AccessCodesUnmanagedConvertToManagedBody = /** * @deprecated Use AccessCodesUnmanagedConvertToManagedRequest instead. */ -export type AccessCodesUnmanagedConvertToManagedResponse = - RouteResponse<'/access_codes/unmanaged/convert_to_managed'> +export type AccessCodesUnmanagedConvertToManagedResponse = void export type AccessCodesUnmanagedConvertToManagedRequest = SeamHttpRequest< void, @@ -250,8 +254,11 @@ export type AccessCodesUnmanagedConvertToManagedRequest = SeamHttpRequest< export interface AccessCodesUnmanagedConvertToManagedOptions {} -export type AccessCodesUnmanagedDeleteParameters = - RouteRequestBody<'/access_codes/unmanaged/delete'> +export type AccessCodesUnmanagedDeleteParameters = { + access_code_id: string + + sync?: boolean | undefined +} /** * @deprecated Use AccessCodesUnmanagedDeleteParameters instead. @@ -262,15 +269,17 @@ export type AccessCodesUnmanagedDeleteParams = /** * @deprecated Use AccessCodesUnmanagedDeleteRequest instead. */ -export type AccessCodesUnmanagedDeleteResponse = - RouteResponse<'/access_codes/unmanaged/delete'> +export type AccessCodesUnmanagedDeleteResponse = void export type AccessCodesUnmanagedDeleteRequest = SeamHttpRequest export interface AccessCodesUnmanagedDeleteOptions {} -export type AccessCodesUnmanagedGetParameters = - RouteRequestBody<'/access_codes/unmanaged/get'> +export type AccessCodesUnmanagedGetParameters = { + access_code_id?: string | undefined + code?: string | undefined + device_id?: string | undefined +} /** * @deprecated Use AccessCodesUnmanagedGetParameters instead. @@ -280,8 +289,9 @@ export type AccessCodesUnmanagedGetParams = AccessCodesUnmanagedGetParameters /** * @deprecated Use AccessCodesUnmanagedGetRequest instead. */ -export type AccessCodesUnmanagedGetResponse = - RouteResponse<'/access_codes/unmanaged/get'> +export type AccessCodesUnmanagedGetResponse = { + access_code: UnmanagedAccessCodeResource +} export type AccessCodesUnmanagedGetRequest = SeamHttpRequest< AccessCodesUnmanagedGetResponse, @@ -290,8 +300,14 @@ export type AccessCodesUnmanagedGetRequest = SeamHttpRequest< export interface AccessCodesUnmanagedGetOptions {} -export type AccessCodesUnmanagedListParameters = - RouteRequestBody<'/access_codes/unmanaged/list'> +export type AccessCodesUnmanagedListParameters = { + device_id: string + + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use AccessCodesUnmanagedListParameters instead. @@ -301,8 +317,9 @@ export type AccessCodesUnmanagedListParams = AccessCodesUnmanagedListParameters /** * @deprecated Use AccessCodesUnmanagedListRequest instead. */ -export type AccessCodesUnmanagedListResponse = - RouteResponse<'/access_codes/unmanaged/list'> +export type AccessCodesUnmanagedListResponse = { + access_codes: Array +} export type AccessCodesUnmanagedListRequest = SeamHttpRequest< AccessCodesUnmanagedListResponse, @@ -311,8 +328,14 @@ export type AccessCodesUnmanagedListRequest = SeamHttpRequest< export interface AccessCodesUnmanagedListOptions {} -export type AccessCodesUnmanagedUpdateParameters = - RouteRequestBody<'/access_codes/unmanaged/update'> +export type AccessCodesUnmanagedUpdateParameters = { + access_code_id: string + + allow_external_modification?: boolean | undefined + force?: boolean | undefined + is_external_modification_allowed?: boolean | undefined + is_managed: boolean +} /** * @deprecated Use AccessCodesUnmanagedUpdateParameters instead. @@ -323,8 +346,7 @@ export type AccessCodesUnmanagedUpdateBody = /** * @deprecated Use AccessCodesUnmanagedUpdateRequest instead. */ -export type AccessCodesUnmanagedUpdateResponse = - RouteResponse<'/access_codes/unmanaged/update'> +export type AccessCodesUnmanagedUpdateResponse = void export type AccessCodesUnmanagedUpdateRequest = 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 0f5b3271..39a03419 100644 --- a/src/lib/seam/connect/routes/access-grants/access-grants.ts +++ b/src/lib/seam/connect/routes/access-grants/access-grants.ts @@ -3,12 +3,6 @@ * 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, @@ -35,6 +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 { 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' @@ -264,8 +260,41 @@ export class SeamHttpAccessGrants { } } -export type AccessGrantsCreateParameters = - RouteRequestBody<'/access_grants/create'> +export type AccessGrantsCreateParameters = { + user_identity_id?: string | undefined + user_identity?: + | { + email_address?: string | undefined + full_name?: string | undefined + phone_number?: string | undefined + user_identity_key?: string | undefined + } + | undefined + access_grant_key?: string | undefined + acs_entrance_ids?: Array | undefined + customization_profile_id?: string | undefined + device_ids?: Array | undefined + ends_at?: string | undefined + location?: + | { + acs_entrance_ids?: Array | undefined + device_ids?: Array | undefined + name?: string | undefined + } + | undefined + location_ids?: Array | undefined + name?: string | undefined + requested_access_methods: Array<{ + code?: string | undefined + instant_key_max_use_count?: number | undefined + mode?: 'code' | 'card' | 'mobile_key' | 'cloud_key' | undefined + }> + + reservation_key?: string | undefined + space_ids?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined +} /** * @deprecated Use AccessGrantsCreateParameters instead. @@ -275,7 +304,7 @@ export type AccessGrantsCreateBody = AccessGrantsCreateParameters /** * @deprecated Use AccessGrantsCreateRequest instead. */ -export type AccessGrantsCreateResponse = RouteResponse<'/access_grants/create'> +export type AccessGrantsCreateResponse = { access_grant: AccessGrantResource } export type AccessGrantsCreateRequest = SeamHttpRequest< AccessGrantsCreateResponse, @@ -284,8 +313,9 @@ export type AccessGrantsCreateRequest = SeamHttpRequest< export interface AccessGrantsCreateOptions {} -export type AccessGrantsDeleteParameters = - RouteRequestBody<'/access_grants/delete'> +export type AccessGrantsDeleteParameters = { + access_grant_id: string +} /** * @deprecated Use AccessGrantsDeleteParameters instead. @@ -295,13 +325,16 @@ export type AccessGrantsDeleteParams = AccessGrantsDeleteParameters /** * @deprecated Use AccessGrantsDeleteRequest instead. */ -export type AccessGrantsDeleteResponse = RouteResponse<'/access_grants/delete'> +export type AccessGrantsDeleteResponse = void export type AccessGrantsDeleteRequest = SeamHttpRequest export interface AccessGrantsDeleteOptions {} -export type AccessGrantsGetParameters = RouteRequestParams<'/access_grants/get'> +export type AccessGrantsGetParameters = { + access_grant_id?: string | undefined + access_grant_key?: string | undefined +} /** * @deprecated Use AccessGrantsGetParameters instead. @@ -311,7 +344,7 @@ export type AccessGrantsGetParams = AccessGrantsGetParameters /** * @deprecated Use AccessGrantsGetRequest instead. */ -export type AccessGrantsGetResponse = RouteResponse<'/access_grants/get'> +export type AccessGrantsGetResponse = { access_grant: AccessGrantResource } export type AccessGrantsGetRequest = SeamHttpRequest< AccessGrantsGetResponse, @@ -320,8 +353,34 @@ export type AccessGrantsGetRequest = SeamHttpRequest< export interface AccessGrantsGetOptions {} -export type AccessGrantsGetRelatedParameters = - RouteRequestBody<'/access_grants/get_related'> +export type AccessGrantsGetRelatedParameters = { + access_grant_ids?: Array | undefined + access_grant_keys?: Array | undefined + exclude?: + | Array< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'connected_accounts' + | 'acs_systems' + | 'user_identities' + | 'acs_access_groups' + | 'access_methods' + > + | undefined + include?: + | Array< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'connected_accounts' + | 'acs_systems' + | 'user_identities' + | 'acs_access_groups' + | 'access_methods' + > + | undefined +} /** * @deprecated Use AccessGrantsGetRelatedParameters instead. @@ -331,8 +390,7 @@ export type AccessGrantsGetRelatedParams = AccessGrantsGetRelatedParameters /** * @deprecated Use AccessGrantsGetRelatedRequest instead. */ -export type AccessGrantsGetRelatedResponse = - RouteResponse<'/access_grants/get_related'> +export type AccessGrantsGetRelatedResponse = { batch: UnknownResource } export type AccessGrantsGetRelatedRequest = SeamHttpRequest< AccessGrantsGetRelatedResponse, @@ -341,7 +399,21 @@ export type AccessGrantsGetRelatedRequest = SeamHttpRequest< export interface AccessGrantsGetRelatedOptions {} -export type AccessGrantsListParameters = RouteRequestBody<'/access_grants/list'> +export type AccessGrantsListParameters = { + access_code_id?: string | undefined + access_grant_ids?: Array | undefined + access_grant_key?: string | undefined + acs_entrance_id?: string | undefined + acs_system_id?: string | undefined + customer_key?: string | undefined + device_id?: string | undefined + limit?: number | undefined + location_id?: string | undefined + page_cursor?: string | undefined + reservation_key?: string | undefined + space_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AccessGrantsListParameters instead. @@ -351,7 +423,9 @@ export type AccessGrantsListParams = AccessGrantsListParameters /** * @deprecated Use AccessGrantsListRequest instead. */ -export type AccessGrantsListResponse = RouteResponse<'/access_grants/list'> +export type AccessGrantsListResponse = { + access_grants: Array +} export type AccessGrantsListRequest = SeamHttpRequest< AccessGrantsListResponse, @@ -360,8 +434,15 @@ export type AccessGrantsListRequest = SeamHttpRequest< export interface AccessGrantsListOptions {} -export type AccessGrantsRequestAccessMethodsParameters = - RouteRequestBody<'/access_grants/request_access_methods'> +export type AccessGrantsRequestAccessMethodsParameters = { + access_grant_id: string + + requested_access_methods: Array<{ + code?: string | undefined + instant_key_max_use_count?: number | undefined + mode?: 'code' | 'card' | 'mobile_key' | 'cloud_key' | undefined + }> +} /** * @deprecated Use AccessGrantsRequestAccessMethodsParameters instead. @@ -372,8 +453,9 @@ export type AccessGrantsRequestAccessMethodsBody = /** * @deprecated Use AccessGrantsRequestAccessMethodsRequest instead. */ -export type AccessGrantsRequestAccessMethodsResponse = - RouteResponse<'/access_grants/request_access_methods'> +export type AccessGrantsRequestAccessMethodsResponse = { + access_grant: AccessGrantResource +} export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest< AccessGrantsRequestAccessMethodsResponse, @@ -382,8 +464,13 @@ export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest< export interface AccessGrantsRequestAccessMethodsOptions {} -export type AccessGrantsUpdateParameters = - RouteRequestBody<'/access_grants/update'> +export type AccessGrantsUpdateParameters = { + access_grant_id?: string | undefined + access_grant_key?: string | undefined + ends_at?: string | undefined + name?: string | undefined + starts_at?: string | undefined +} /** * @deprecated Use AccessGrantsUpdateParameters instead. @@ -393,7 +480,7 @@ export type AccessGrantsUpdateBody = AccessGrantsUpdateParameters /** * @deprecated Use AccessGrantsUpdateRequest instead. */ -export type AccessGrantsUpdateResponse = RouteResponse<'/access_grants/update'> +export type AccessGrantsUpdateResponse = void export type AccessGrantsUpdateRequest = 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 d5741664..06b870aa 100644 --- a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -202,8 +201,9 @@ export class SeamHttpAccessGrantsUnmanaged { } } -export type AccessGrantsUnmanagedGetParameters = - RouteRequestBody<'/access_grants/unmanaged/get'> +export type AccessGrantsUnmanagedGetParameters = { + access_grant_id: string +} /** * @deprecated Use AccessGrantsUnmanagedGetParameters instead. @@ -213,8 +213,7 @@ export type AccessGrantsUnmanagedGetParams = AccessGrantsUnmanagedGetParameters /** * @deprecated Use AccessGrantsUnmanagedGetRequest instead. */ -export type AccessGrantsUnmanagedGetResponse = - RouteResponse<'/access_grants/unmanaged/get'> +export type AccessGrantsUnmanagedGetResponse = { access_grant: UnknownResource } export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< AccessGrantsUnmanagedGetResponse, @@ -223,8 +222,14 @@ export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< export interface AccessGrantsUnmanagedGetOptions {} -export type AccessGrantsUnmanagedListParameters = - RouteRequestBody<'/access_grants/unmanaged/list'> +export type AccessGrantsUnmanagedListParameters = { + acs_entrance_id?: string | undefined + acs_system_id?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + reservation_key?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AccessGrantsUnmanagedListParameters instead. @@ -235,8 +240,9 @@ export type AccessGrantsUnmanagedListParams = /** * @deprecated Use AccessGrantsUnmanagedListRequest instead. */ -export type AccessGrantsUnmanagedListResponse = - RouteResponse<'/access_grants/unmanaged/list'> +export type AccessGrantsUnmanagedListResponse = { + access_grants: Array +} export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< AccessGrantsUnmanagedListResponse, @@ -245,8 +251,12 @@ export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< export interface AccessGrantsUnmanagedListOptions {} -export type AccessGrantsUnmanagedUpdateParameters = - RouteRequestBody<'/access_grants/unmanaged/update'> +export type AccessGrantsUnmanagedUpdateParameters = { + access_grant_id: string + + access_grant_key?: string | undefined + is_managed: boolean +} /** * @deprecated Use AccessGrantsUnmanagedUpdateParameters instead. @@ -257,8 +267,7 @@ export type AccessGrantsUnmanagedUpdateBody = /** * @deprecated Use AccessGrantsUnmanagedUpdateRequest instead. */ -export type AccessGrantsUnmanagedUpdateResponse = - RouteResponse<'/access_grants/unmanaged/update'> +export type AccessGrantsUnmanagedUpdateResponse = void export type AccessGrantsUnmanagedUpdateRequest = SeamHttpRequest< void, 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 d252b265..a23daa38 100644 --- a/src/lib/seam/connect/routes/access-methods/access-methods.ts +++ b/src/lib/seam/connect/routes/access-methods/access-methods.ts @@ -3,11 +3,7 @@ * Do not edit this file or add other files to this directory. */ -import type { - RouteRequestBody, - RouteRequestParams, - RouteResponse, -} from '@seamapi/types/connect' +import type { RouteResponse } from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -35,6 +31,8 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { AccessMethodResource } from 'lib/seam/connect/resources/access-method.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -264,8 +262,11 @@ export class SeamHttpAccessMethods { } } -export type AccessMethodsAssignCardParameters = - RouteRequestBody<'/access_methods/assign_card'> +export type AccessMethodsAssignCardParameters = { + access_method_id: string + + card_number: string +} /** * @deprecated Use AccessMethodsAssignCardParameters instead. @@ -288,8 +289,11 @@ export type AccessMethodsAssignCardOptions = Pick< 'waitForActionAttempt' > -export type AccessMethodsDeleteParameters = - RouteRequestParams<'/access_methods/delete'> +export type AccessMethodsDeleteParameters = { + access_method_id?: string | undefined + access_grant_id?: string | undefined + reservation_key?: string | undefined +} /** * @deprecated Use AccessMethodsDeleteParameters instead. @@ -299,15 +303,17 @@ export type AccessMethodsDeleteParams = AccessMethodsDeleteParameters /** * @deprecated Use AccessMethodsDeleteRequest instead. */ -export type AccessMethodsDeleteResponse = - RouteResponse<'/access_methods/delete'> +export type AccessMethodsDeleteResponse = void export type AccessMethodsDeleteRequest = SeamHttpRequest export interface AccessMethodsDeleteOptions {} -export type AccessMethodsEncodeParameters = - RouteRequestBody<'/access_methods/encode'> +export type AccessMethodsEncodeParameters = { + access_method_id: string + + acs_encoder_id: string +} /** * @deprecated Use AccessMethodsEncodeParameters instead. @@ -330,7 +336,9 @@ export type AccessMethodsEncodeOptions = Pick< 'waitForActionAttempt' > -export type AccessMethodsGetParameters = RouteRequestBody<'/access_methods/get'> +export type AccessMethodsGetParameters = { + access_method_id: string +} /** * @deprecated Use AccessMethodsGetParameters instead. @@ -340,7 +348,7 @@ export type AccessMethodsGetParams = AccessMethodsGetParameters /** * @deprecated Use AccessMethodsGetRequest instead. */ -export type AccessMethodsGetResponse = RouteResponse<'/access_methods/get'> +export type AccessMethodsGetResponse = { access_method: AccessMethodResource } export type AccessMethodsGetRequest = SeamHttpRequest< AccessMethodsGetResponse, @@ -349,8 +357,34 @@ export type AccessMethodsGetRequest = SeamHttpRequest< export interface AccessMethodsGetOptions {} -export type AccessMethodsGetRelatedParameters = - RouteRequestBody<'/access_methods/get_related'> +export type AccessMethodsGetRelatedParameters = { + access_method_ids: Array + + exclude?: + | Array< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'access_grants' + | 'access_methods' + | 'instant_keys' + | 'client_sessions' + | 'acs_credentials' + > + | undefined + include?: + | Array< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'access_grants' + | 'access_methods' + | 'instant_keys' + | 'client_sessions' + | 'acs_credentials' + > + | undefined +} /** * @deprecated Use AccessMethodsGetRelatedParameters instead. @@ -360,8 +394,7 @@ export type AccessMethodsGetRelatedParams = AccessMethodsGetRelatedParameters /** * @deprecated Use AccessMethodsGetRelatedRequest instead. */ -export type AccessMethodsGetRelatedResponse = - RouteResponse<'/access_methods/get_related'> +export type AccessMethodsGetRelatedResponse = { batch: UnknownResource } export type AccessMethodsGetRelatedRequest = SeamHttpRequest< AccessMethodsGetRelatedResponse, @@ -370,8 +403,14 @@ export type AccessMethodsGetRelatedRequest = SeamHttpRequest< export interface AccessMethodsGetRelatedOptions {} -export type AccessMethodsListParameters = - RouteRequestBody<'/access_methods/list'> +export type AccessMethodsListParameters = { + access_code_id?: string | undefined + access_grant_id?: string | undefined + access_grant_key?: string | undefined + acs_entrance_id?: string | undefined + device_id?: string | undefined + space_id?: string | undefined +} /** * @deprecated Use AccessMethodsListParameters instead. @@ -381,7 +420,9 @@ export type AccessMethodsListParams = AccessMethodsListParameters /** * @deprecated Use AccessMethodsListRequest instead. */ -export type AccessMethodsListResponse = RouteResponse<'/access_methods/list'> +export type AccessMethodsListResponse = { + access_methods: Array +} export type AccessMethodsListRequest = SeamHttpRequest< AccessMethodsListResponse, @@ -390,8 +431,11 @@ export type AccessMethodsListRequest = SeamHttpRequest< export interface AccessMethodsListOptions {} -export type AccessMethodsUnlockDoorParameters = - RouteRequestBody<'/access_methods/unlock_door'> +export type AccessMethodsUnlockDoorParameters = { + access_method_id: string + + acs_entrance_id: string +} /** * @deprecated Use AccessMethodsUnlockDoorParameters 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 62a6fddb..3fbe1b72 100644 --- a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -189,8 +188,9 @@ export class SeamHttpAccessMethodsUnmanaged { } } -export type AccessMethodsUnmanagedGetParameters = - RouteRequestBody<'/access_methods/unmanaged/get'> +export type AccessMethodsUnmanagedGetParameters = { + access_method_id: string +} /** * @deprecated Use AccessMethodsUnmanagedGetParameters instead. @@ -201,8 +201,9 @@ export type AccessMethodsUnmanagedGetParams = /** * @deprecated Use AccessMethodsUnmanagedGetRequest instead. */ -export type AccessMethodsUnmanagedGetResponse = - RouteResponse<'/access_methods/unmanaged/get'> +export type AccessMethodsUnmanagedGetResponse = { + access_method: UnknownResource +} export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< AccessMethodsUnmanagedGetResponse, @@ -211,8 +212,13 @@ export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< export interface AccessMethodsUnmanagedGetOptions {} -export type AccessMethodsUnmanagedListParameters = - RouteRequestBody<'/access_methods/unmanaged/list'> +export type AccessMethodsUnmanagedListParameters = { + access_grant_id: string + + acs_entrance_id?: string | undefined + device_id?: string | undefined + space_id?: string | undefined +} /** * @deprecated Use AccessMethodsUnmanagedListParameters instead. @@ -223,8 +229,9 @@ export type AccessMethodsUnmanagedListParams = /** * @deprecated Use AccessMethodsUnmanagedListRequest instead. */ -export type AccessMethodsUnmanagedListResponse = - RouteResponse<'/access_methods/unmanaged/list'> +export type AccessMethodsUnmanagedListResponse = { + access_methods: Array +} export type AccessMethodsUnmanagedListRequest = SeamHttpRequest< AccessMethodsUnmanagedListResponse, 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 18463ce2..bec15c0f 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 @@ -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, @@ -31,6 +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 { 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' @@ -263,8 +264,12 @@ export class SeamHttpAcsAccessGroups { } } -export type AcsAccessGroupsAddUserParameters = - RouteRequestBody<'/acs/access_groups/add_user'> +export type AcsAccessGroupsAddUserParameters = { + acs_access_group_id: string + + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsAccessGroupsAddUserParameters instead. @@ -274,15 +279,15 @@ export type AcsAccessGroupsAddUserBody = AcsAccessGroupsAddUserParameters /** * @deprecated Use AcsAccessGroupsAddUserRequest instead. */ -export type AcsAccessGroupsAddUserResponse = - RouteResponse<'/acs/access_groups/add_user'> +export type AcsAccessGroupsAddUserResponse = void export type AcsAccessGroupsAddUserRequest = SeamHttpRequest export interface AcsAccessGroupsAddUserOptions {} -export type AcsAccessGroupsDeleteParameters = - RouteRequestBody<'/acs/access_groups/delete'> +export type AcsAccessGroupsDeleteParameters = { + acs_access_group_id: string +} /** * @deprecated Use AcsAccessGroupsDeleteParameters instead. @@ -292,15 +297,15 @@ export type AcsAccessGroupsDeleteParams = AcsAccessGroupsDeleteParameters /** * @deprecated Use AcsAccessGroupsDeleteRequest instead. */ -export type AcsAccessGroupsDeleteResponse = - RouteResponse<'/acs/access_groups/delete'> +export type AcsAccessGroupsDeleteResponse = void export type AcsAccessGroupsDeleteRequest = SeamHttpRequest export interface AcsAccessGroupsDeleteOptions {} -export type AcsAccessGroupsGetParameters = - RouteRequestBody<'/acs/access_groups/get'> +export type AcsAccessGroupsGetParameters = { + acs_access_group_id: string +} /** * @deprecated Use AcsAccessGroupsGetParameters instead. @@ -310,7 +315,9 @@ export type AcsAccessGroupsGetParams = AcsAccessGroupsGetParameters /** * @deprecated Use AcsAccessGroupsGetRequest instead. */ -export type AcsAccessGroupsGetResponse = RouteResponse<'/acs/access_groups/get'> +export type AcsAccessGroupsGetResponse = { + acs_access_group: AcsAccessGroupResource +} export type AcsAccessGroupsGetRequest = SeamHttpRequest< AcsAccessGroupsGetResponse, @@ -319,8 +326,12 @@ export type AcsAccessGroupsGetRequest = SeamHttpRequest< export interface AcsAccessGroupsGetOptions {} -export type AcsAccessGroupsListParameters = - RouteRequestBody<'/acs/access_groups/list'> +export type AcsAccessGroupsListParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + search?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsAccessGroupsListParameters instead. @@ -330,8 +341,9 @@ export type AcsAccessGroupsListParams = AcsAccessGroupsListParameters /** * @deprecated Use AcsAccessGroupsListRequest instead. */ -export type AcsAccessGroupsListResponse = - RouteResponse<'/acs/access_groups/list'> +export type AcsAccessGroupsListResponse = { + acs_access_groups: Array +} export type AcsAccessGroupsListRequest = SeamHttpRequest< AcsAccessGroupsListResponse, @@ -340,8 +352,9 @@ export type AcsAccessGroupsListRequest = SeamHttpRequest< export interface AcsAccessGroupsListOptions {} -export type AcsAccessGroupsListAccessibleEntrancesParameters = - RouteRequestBody<'/acs/access_groups/list_accessible_entrances'> +export type AcsAccessGroupsListAccessibleEntrancesParameters = { + acs_access_group_id: string +} /** * @deprecated Use AcsAccessGroupsListAccessibleEntrancesParameters instead. @@ -352,8 +365,9 @@ export type AcsAccessGroupsListAccessibleEntrancesParams = /** * @deprecated Use AcsAccessGroupsListAccessibleEntrancesRequest instead. */ -export type AcsAccessGroupsListAccessibleEntrancesResponse = - RouteResponse<'/acs/access_groups/list_accessible_entrances'> +export type AcsAccessGroupsListAccessibleEntrancesResponse = { + acs_entrances: Array +} export type AcsAccessGroupsListAccessibleEntrancesRequest = SeamHttpRequest< AcsAccessGroupsListAccessibleEntrancesResponse, @@ -362,8 +376,9 @@ export type AcsAccessGroupsListAccessibleEntrancesRequest = SeamHttpRequest< export interface AcsAccessGroupsListAccessibleEntrancesOptions {} -export type AcsAccessGroupsListUsersParameters = - RouteRequestBody<'/acs/access_groups/list_users'> +export type AcsAccessGroupsListUsersParameters = { + acs_access_group_id: string +} /** * @deprecated Use AcsAccessGroupsListUsersParameters instead. @@ -373,8 +388,9 @@ export type AcsAccessGroupsListUsersParams = AcsAccessGroupsListUsersParameters /** * @deprecated Use AcsAccessGroupsListUsersRequest instead. */ -export type AcsAccessGroupsListUsersResponse = - RouteResponse<'/acs/access_groups/list_users'> +export type AcsAccessGroupsListUsersResponse = { + acs_users: Array +} export type AcsAccessGroupsListUsersRequest = SeamHttpRequest< AcsAccessGroupsListUsersResponse, @@ -383,8 +399,12 @@ export type AcsAccessGroupsListUsersRequest = SeamHttpRequest< export interface AcsAccessGroupsListUsersOptions {} -export type AcsAccessGroupsRemoveUserParameters = - RouteRequestBody<'/acs/access_groups/remove_user'> +export type AcsAccessGroupsRemoveUserParameters = { + acs_access_group_id: string + + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsAccessGroupsRemoveUserParameters instead. @@ -395,8 +415,7 @@ export type AcsAccessGroupsRemoveUserParams = /** * @deprecated Use AcsAccessGroupsRemoveUserRequest instead. */ -export type AcsAccessGroupsRemoveUserResponse = - RouteResponse<'/acs/access_groups/remove_user'> +export type AcsAccessGroupsRemoveUserResponse = void export type AcsAccessGroupsRemoveUserRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/acs/credentials/credentials.ts b/src/lib/seam/connect/routes/acs/credentials/credentials.ts index d26316be..866b653a 100644 --- a/src/lib/seam/connect/routes/acs/credentials/credentials.ts +++ b/src/lib/seam/connect/routes/acs/credentials/credentials.ts @@ -3,11 +3,7 @@ * Do not edit this file or add other files to this directory. */ -import type { - RouteRequestBody, - RouteRequestParams, - RouteResponse, -} from '@seamapi/types/connect' +import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -35,6 +31,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 { 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' @@ -298,8 +296,12 @@ export class SeamHttpAcsCredentials { } } -export type AcsCredentialsAssignParameters = - RouteRequestBody<'/acs/credentials/assign'> +export type AcsCredentialsAssignParameters = { + acs_credential_id: string + + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsCredentialsAssignParameters instead. @@ -309,15 +311,56 @@ export type AcsCredentialsAssignBody = AcsCredentialsAssignParameters /** * @deprecated Use AcsCredentialsAssignRequest instead. */ -export type AcsCredentialsAssignResponse = - RouteResponse<'/acs/credentials/assign'> +export type AcsCredentialsAssignResponse = void export type AcsCredentialsAssignRequest = SeamHttpRequest export interface AcsCredentialsAssignOptions {} -export type AcsCredentialsCreateParameters = - RouteRequestBody<'/acs/credentials/create'> +export type AcsCredentialsCreateParameters = { + access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' + + acs_system_id?: string | undefined + acs_user_id?: string | undefined + allowed_acs_entrance_ids?: Array | undefined + assa_abloy_vostio_metadata?: + | { + auto_join?: boolean | undefined + join_all_guest_acs_entrances?: boolean | undefined + override_all_guest_acs_entrances?: boolean | undefined + override_guest_acs_entrance_ids?: Array | undefined + } + | undefined + 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 + } + | undefined +} /** * @deprecated Use AcsCredentialsCreateParameters instead. @@ -327,8 +370,9 @@ export type AcsCredentialsCreateBody = AcsCredentialsCreateParameters /** * @deprecated Use AcsCredentialsCreateRequest instead. */ -export type AcsCredentialsCreateResponse = - RouteResponse<'/acs/credentials/create'> +export type AcsCredentialsCreateResponse = { + acs_credential: AcsCredentialResource +} export type AcsCredentialsCreateRequest = SeamHttpRequest< AcsCredentialsCreateResponse, @@ -359,8 +403,9 @@ export type AcsCredentialsCreateOfflineCodeRequest = SeamHttpRequest< export interface AcsCredentialsCreateOfflineCodeOptions {} -export type AcsCredentialsDeleteParameters = - RouteRequestBody<'/acs/credentials/delete'> +export type AcsCredentialsDeleteParameters = { + acs_credential_id: string +} /** * @deprecated Use AcsCredentialsDeleteParameters instead. @@ -370,15 +415,15 @@ export type AcsCredentialsDeleteParams = AcsCredentialsDeleteParameters /** * @deprecated Use AcsCredentialsDeleteRequest instead. */ -export type AcsCredentialsDeleteResponse = - RouteResponse<'/acs/credentials/delete'> +export type AcsCredentialsDeleteResponse = void export type AcsCredentialsDeleteRequest = SeamHttpRequest export interface AcsCredentialsDeleteOptions {} -export type AcsCredentialsGetParameters = - RouteRequestBody<'/acs/credentials/get'> +export type AcsCredentialsGetParameters = { + acs_credential_id: string +} /** * @deprecated Use AcsCredentialsGetParameters instead. @@ -388,7 +433,9 @@ export type AcsCredentialsGetParams = AcsCredentialsGetParameters /** * @deprecated Use AcsCredentialsGetRequest instead. */ -export type AcsCredentialsGetResponse = RouteResponse<'/acs/credentials/get'> +export type AcsCredentialsGetResponse = { + acs_credential: AcsCredentialResource +} export type AcsCredentialsGetRequest = SeamHttpRequest< AcsCredentialsGetResponse, @@ -397,8 +444,16 @@ export type AcsCredentialsGetRequest = SeamHttpRequest< export interface AcsCredentialsGetOptions {} -export type AcsCredentialsListParameters = - RouteRequestParams<'/acs/credentials/list'> +export type AcsCredentialsListParameters = { + acs_user_id?: string | undefined + acs_system_id?: string | undefined + user_identity_id?: string | undefined + created_before?: string | undefined + is_multi_phone_sync_credential?: boolean | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined +} /** * @deprecated Use AcsCredentialsListParameters instead. @@ -408,7 +463,9 @@ export type AcsCredentialsListParams = AcsCredentialsListParameters /** * @deprecated Use AcsCredentialsListRequest instead. */ -export type AcsCredentialsListResponse = RouteResponse<'/acs/credentials/list'> +export type AcsCredentialsListResponse = { + acs_credentials: Array +} export type AcsCredentialsListRequest = SeamHttpRequest< AcsCredentialsListResponse, @@ -417,8 +474,9 @@ export type AcsCredentialsListRequest = SeamHttpRequest< export interface AcsCredentialsListOptions {} -export type AcsCredentialsListAccessibleEntrancesParameters = - RouteRequestBody<'/acs/credentials/list_accessible_entrances'> +export type AcsCredentialsListAccessibleEntrancesParameters = { + acs_credential_id: string +} /** * @deprecated Use AcsCredentialsListAccessibleEntrancesParameters instead. @@ -429,8 +487,9 @@ export type AcsCredentialsListAccessibleEntrancesParams = /** * @deprecated Use AcsCredentialsListAccessibleEntrancesRequest instead. */ -export type AcsCredentialsListAccessibleEntrancesResponse = - RouteResponse<'/acs/credentials/list_accessible_entrances'> +export type AcsCredentialsListAccessibleEntrancesResponse = { + acs_entrances: Array +} export type AcsCredentialsListAccessibleEntrancesRequest = SeamHttpRequest< AcsCredentialsListAccessibleEntrancesResponse, @@ -439,8 +498,12 @@ export type AcsCredentialsListAccessibleEntrancesRequest = SeamHttpRequest< export interface AcsCredentialsListAccessibleEntrancesOptions {} -export type AcsCredentialsUnassignParameters = - RouteRequestBody<'/acs/credentials/unassign'> +export type AcsCredentialsUnassignParameters = { + acs_credential_id: string + + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsCredentialsUnassignParameters instead. @@ -450,15 +513,18 @@ export type AcsCredentialsUnassignBody = AcsCredentialsUnassignParameters /** * @deprecated Use AcsCredentialsUnassignRequest instead. */ -export type AcsCredentialsUnassignResponse = - RouteResponse<'/acs/credentials/unassign'> +export type AcsCredentialsUnassignResponse = void export type AcsCredentialsUnassignRequest = SeamHttpRequest export interface AcsCredentialsUnassignOptions {} -export type AcsCredentialsUpdateParameters = - RouteRequestBody<'/acs/credentials/update'> +export type AcsCredentialsUpdateParameters = { + acs_credential_id: string + + code?: string | undefined + ends_at?: string | undefined +} /** * @deprecated Use AcsCredentialsUpdateParameters instead. @@ -468,8 +534,7 @@ export type AcsCredentialsUpdateBody = AcsCredentialsUpdateParameters /** * @deprecated Use AcsCredentialsUpdateRequest instead. */ -export type AcsCredentialsUpdateResponse = - RouteResponse<'/acs/credentials/update'> +export type AcsCredentialsUpdateResponse = void export type AcsCredentialsUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/acs/encoders/encoders.ts b/src/lib/seam/connect/routes/acs/encoders/encoders.ts index 690e8419..6ae6ecc9 100644 --- a/src/lib/seam/connect/routes/acs/encoders/encoders.ts +++ b/src/lib/seam/connect/routes/acs/encoders/encoders.ts @@ -3,11 +3,7 @@ * Do not edit this file or add other files to this directory. */ -import type { - RouteRequestBody, - RouteRequestParams, - RouteResponse, -} from '@seamapi/types/connect' +import type { RouteResponse } from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -35,6 +31,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { AcsEncoderResource } from 'lib/seam/connect/resources/acs-encoder.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' @@ -238,8 +235,11 @@ export class SeamHttpAcsEncoders { } } -export type AcsEncodersEncodeCredentialParameters = - RouteRequestBody<'/acs/encoders/encode_credential'> +export type AcsEncodersEncodeCredentialParameters = { + access_method_id?: string | undefined + acs_credential_id?: string | undefined + acs_encoder_id: string +} /** * @deprecated Use AcsEncodersEncodeCredentialParameters instead. @@ -263,7 +263,9 @@ export type AcsEncodersEncodeCredentialOptions = Pick< 'waitForActionAttempt' > -export type AcsEncodersGetParameters = RouteRequestBody<'/acs/encoders/get'> +export type AcsEncodersGetParameters = { + acs_encoder_id: string +} /** * @deprecated Use AcsEncodersGetParameters instead. @@ -273,7 +275,7 @@ export type AcsEncodersGetParams = AcsEncodersGetParameters /** * @deprecated Use AcsEncodersGetRequest instead. */ -export type AcsEncodersGetResponse = RouteResponse<'/acs/encoders/get'> +export type AcsEncodersGetResponse = { acs_encoder: AcsEncoderResource } export type AcsEncodersGetRequest = SeamHttpRequest< AcsEncodersGetResponse, @@ -282,7 +284,13 @@ export type AcsEncodersGetRequest = SeamHttpRequest< export interface AcsEncodersGetOptions {} -export type AcsEncodersListParameters = RouteRequestParams<'/acs/encoders/list'> +export type AcsEncodersListParameters = { + acs_system_id?: string | undefined + acs_system_ids?: Array | undefined + acs_encoder_ids?: Array | undefined + limit?: number | undefined + page_cursor?: string | undefined +} /** * @deprecated Use AcsEncodersListParameters instead. @@ -292,7 +300,9 @@ export type AcsEncodersListParams = AcsEncodersListParameters /** * @deprecated Use AcsEncodersListRequest instead. */ -export type AcsEncodersListResponse = RouteResponse<'/acs/encoders/list'> +export type AcsEncodersListResponse = { + acs_encoders: Array +} export type AcsEncodersListRequest = SeamHttpRequest< AcsEncodersListResponse, @@ -301,8 +311,15 @@ export type AcsEncodersListRequest = SeamHttpRequest< export interface AcsEncodersListOptions {} -export type AcsEncodersScanCredentialParameters = - RouteRequestBody<'/acs/encoders/scan_credential'> +export type AcsEncodersScanCredentialParameters = { + acs_encoder_id: string + + salto_ks_metadata?: + | { + detect_new_tags?: boolean | undefined + } + | undefined +} /** * @deprecated Use AcsEncodersScanCredentialParameters instead. @@ -325,8 +342,17 @@ export type AcsEncodersScanCredentialOptions = Pick< 'waitForActionAttempt' > -export type AcsEncodersScanToAssignCredentialParameters = - RouteRequestBody<'/acs/encoders/scan_to_assign_credential'> +export type AcsEncodersScanToAssignCredentialParameters = { + acs_encoder_id: string + + acs_user_id?: string | undefined + salto_ks_metadata?: + | { + detect_new_tags?: boolean | undefined + } + | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsEncodersScanToAssignCredentialParameters 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 2f3fb20f..64210a5f 100644 --- a/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.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, @@ -215,8 +213,17 @@ export class SeamHttpAcsEncodersSimulate { } } -export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = - RouteRequestBody<'/acs/encoders/simulate/next_credential_encode_will_fail'> +export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { + acs_encoder_id: string + + error_code?: + | 'no_credential_on_encoder' + | 'encoding_interrupted' + | 'uncategorized_error' + | 'action_attempt_expired' + | undefined + acs_credential_id?: string | undefined +} /** * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillFailParameters instead. @@ -227,16 +234,18 @@ export type AcsEncodersSimulateNextCredentialEncodeWillFailBody = /** * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillFailRequest instead. */ -export type AcsEncodersSimulateNextCredentialEncodeWillFailResponse = - RouteResponse<'/acs/encoders/simulate/next_credential_encode_will_fail'> +export type AcsEncodersSimulateNextCredentialEncodeWillFailResponse = void export type AcsEncodersSimulateNextCredentialEncodeWillFailRequest = SeamHttpRequest export interface AcsEncodersSimulateNextCredentialEncodeWillFailOptions {} -export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = - RouteRequestBody<'/acs/encoders/simulate/next_credential_encode_will_succeed'> +export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { + acs_encoder_id: string + + scenario?: 'credential_is_issued' | undefined +} /** * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters instead. @@ -247,16 +256,23 @@ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedBody = /** * @deprecated Use AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest instead. */ -export type AcsEncodersSimulateNextCredentialEncodeWillSucceedResponse = - RouteResponse<'/acs/encoders/simulate/next_credential_encode_will_succeed'> +export type AcsEncodersSimulateNextCredentialEncodeWillSucceedResponse = void export type AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest = SeamHttpRequest export interface AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions {} -export type AcsEncodersSimulateNextCredentialScanWillFailParameters = - RouteRequestBody<'/acs/encoders/simulate/next_credential_scan_will_fail'> +export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { + acs_encoder_id: string + + error_code?: + | 'no_credential_on_encoder' + | 'uncategorized_error' + | 'action_attempt_expired' + | undefined + acs_credential_id_on_seam?: string | undefined +} /** * @deprecated Use AcsEncodersSimulateNextCredentialScanWillFailParameters instead. @@ -267,16 +283,24 @@ export type AcsEncodersSimulateNextCredentialScanWillFailBody = /** * @deprecated Use AcsEncodersSimulateNextCredentialScanWillFailRequest instead. */ -export type AcsEncodersSimulateNextCredentialScanWillFailResponse = - RouteResponse<'/acs/encoders/simulate/next_credential_scan_will_fail'> +export type AcsEncodersSimulateNextCredentialScanWillFailResponse = void export type AcsEncodersSimulateNextCredentialScanWillFailRequest = SeamHttpRequest export interface AcsEncodersSimulateNextCredentialScanWillFailOptions {} -export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = - RouteRequestBody<'/acs/encoders/simulate/next_credential_scan_will_succeed'> +export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { + acs_credential_id_on_seam?: string | undefined + acs_encoder_id: string + + scenario?: + | 'credential_exists_on_seam' + | 'credential_on_encoder_needs_update' + | 'credential_does_not_exist_on_seam' + | 'credential_on_encoder_is_empty' + | undefined +} /** * @deprecated Use AcsEncodersSimulateNextCredentialScanWillSucceedParameters instead. @@ -287,8 +311,7 @@ export type AcsEncodersSimulateNextCredentialScanWillSucceedBody = /** * @deprecated Use AcsEncodersSimulateNextCredentialScanWillSucceedRequest instead. */ -export type AcsEncodersSimulateNextCredentialScanWillSucceedResponse = - RouteResponse<'/acs/encoders/simulate/next_credential_scan_will_succeed'> +export type AcsEncodersSimulateNextCredentialScanWillSucceedResponse = void export type AcsEncodersSimulateNextCredentialScanWillSucceedRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/acs/entrances/entrances.ts b/src/lib/seam/connect/routes/acs/entrances/entrances.ts index cb8119a8..36b14390 100644 --- a/src/lib/seam/connect/routes/acs/entrances/entrances.ts +++ b/src/lib/seam/connect/routes/acs/entrances/entrances.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 { @@ -31,6 +31,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 { 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' @@ -228,7 +230,9 @@ export class SeamHttpAcsEntrances { } } -export type AcsEntrancesGetParameters = RouteRequestBody<'/acs/entrances/get'> +export type AcsEntrancesGetParameters = { + acs_entrance_id: string +} /** * @deprecated Use AcsEntrancesGetParameters instead. @@ -238,7 +242,7 @@ export type AcsEntrancesGetParams = AcsEntrancesGetParameters /** * @deprecated Use AcsEntrancesGetRequest instead. */ -export type AcsEntrancesGetResponse = RouteResponse<'/acs/entrances/get'> +export type AcsEntrancesGetResponse = { acs_entrance: AcsEntranceResource } export type AcsEntrancesGetRequest = SeamHttpRequest< AcsEntrancesGetResponse, @@ -247,8 +251,12 @@ export type AcsEntrancesGetRequest = SeamHttpRequest< export interface AcsEntrancesGetOptions {} -export type AcsEntrancesGrantAccessParameters = - RouteRequestBody<'/acs/entrances/grant_access'> +export type AcsEntrancesGrantAccessParameters = { + acs_entrance_id: string + + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsEntrancesGrantAccessParameters instead. @@ -258,14 +266,24 @@ export type AcsEntrancesGrantAccessBody = AcsEntrancesGrantAccessParameters /** * @deprecated Use AcsEntrancesGrantAccessRequest instead. */ -export type AcsEntrancesGrantAccessResponse = - RouteResponse<'/acs/entrances/grant_access'> +export type AcsEntrancesGrantAccessResponse = void export type AcsEntrancesGrantAccessRequest = SeamHttpRequest export interface AcsEntrancesGrantAccessOptions {} -export type AcsEntrancesListParameters = RouteRequestBody<'/acs/entrances/list'> +export type AcsEntrancesListParameters = { + acs_credential_id?: string | undefined + acs_entrance_ids?: Array | undefined + acs_system_id?: string | undefined + connected_account_id?: string | undefined + customer_key?: string | undefined + limit?: number | undefined + location_id?: string | undefined + page_cursor?: string | undefined + search?: string | undefined + space_id?: string | undefined +} /** * @deprecated Use AcsEntrancesListParameters instead. @@ -275,7 +293,9 @@ export type AcsEntrancesListParams = AcsEntrancesListParameters /** * @deprecated Use AcsEntrancesListRequest instead. */ -export type AcsEntrancesListResponse = RouteResponse<'/acs/entrances/list'> +export type AcsEntrancesListResponse = { + acs_entrances: Array +} export type AcsEntrancesListRequest = SeamHttpRequest< AcsEntrancesListResponse, @@ -284,8 +304,11 @@ export type AcsEntrancesListRequest = SeamHttpRequest< export interface AcsEntrancesListOptions {} -export type AcsEntrancesListCredentialsWithAccessParameters = - RouteRequestBody<'/acs/entrances/list_credentials_with_access'> +export type AcsEntrancesListCredentialsWithAccessParameters = { + acs_entrance_id: string + + include_if?: Array<'visionline_metadata.is_valid'> | undefined +} /** * @deprecated Use AcsEntrancesListCredentialsWithAccessParameters instead. @@ -296,8 +319,9 @@ export type AcsEntrancesListCredentialsWithAccessParams = /** * @deprecated Use AcsEntrancesListCredentialsWithAccessRequest instead. */ -export type AcsEntrancesListCredentialsWithAccessResponse = - RouteResponse<'/acs/entrances/list_credentials_with_access'> +export type AcsEntrancesListCredentialsWithAccessResponse = { + acs_credentials: Array +} export type AcsEntrancesListCredentialsWithAccessRequest = SeamHttpRequest< AcsEntrancesListCredentialsWithAccessResponse, @@ -306,8 +330,11 @@ export type AcsEntrancesListCredentialsWithAccessRequest = SeamHttpRequest< export interface AcsEntrancesListCredentialsWithAccessOptions {} -export type AcsEntrancesUnlockParameters = - RouteRequestBody<'/acs/entrances/unlock'> +export type AcsEntrancesUnlockParameters = { + acs_credential_id: string + + acs_entrance_id: string +} /** * @deprecated Use AcsEntrancesUnlockParameters instead. diff --git a/src/lib/seam/connect/routes/acs/systems/systems.ts b/src/lib/seam/connect/routes/acs/systems/systems.ts index e73648df..36cfbaea 100644 --- a/src/lib/seam/connect/routes/acs/systems/systems.ts +++ b/src/lib/seam/connect/routes/acs/systems/systems.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { AcsSystemResource } 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' @@ -215,7 +214,9 @@ export class SeamHttpAcsSystems { } } -export type AcsSystemsGetParameters = RouteRequestBody<'/acs/systems/get'> +export type AcsSystemsGetParameters = { + acs_system_id: string +} /** * @deprecated Use AcsSystemsGetParameters instead. @@ -225,7 +226,7 @@ export type AcsSystemsGetParams = AcsSystemsGetParameters /** * @deprecated Use AcsSystemsGetRequest instead. */ -export type AcsSystemsGetResponse = RouteResponse<'/acs/systems/get'> +export type AcsSystemsGetResponse = { acs_system: AcsSystemResource } export type AcsSystemsGetRequest = SeamHttpRequest< AcsSystemsGetResponse, @@ -234,7 +235,11 @@ export type AcsSystemsGetRequest = SeamHttpRequest< export interface AcsSystemsGetOptions {} -export type AcsSystemsListParameters = RouteRequestBody<'/acs/systems/list'> +export type AcsSystemsListParameters = { + connected_account_id?: string | undefined + customer_key?: string | undefined + search?: string | undefined +} /** * @deprecated Use AcsSystemsListParameters instead. @@ -244,7 +249,7 @@ export type AcsSystemsListParams = AcsSystemsListParameters /** * @deprecated Use AcsSystemsListRequest instead. */ -export type AcsSystemsListResponse = RouteResponse<'/acs/systems/list'> +export type AcsSystemsListResponse = { acs_systems: Array } export type AcsSystemsListRequest = SeamHttpRequest< AcsSystemsListResponse, @@ -253,8 +258,9 @@ export type AcsSystemsListRequest = SeamHttpRequest< export interface AcsSystemsListOptions {} -export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = - RouteRequestBody<'/acs/systems/list_compatible_credential_manager_acs_systems'> +export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { + acs_system_id: string +} /** * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters instead. @@ -265,8 +271,9 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParams = /** * @deprecated Use AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest instead. */ -export type AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse = - RouteResponse<'/acs/systems/list_compatible_credential_manager_acs_systems'> +export type AcsSystemsListCompatibleCredentialManagerAcsSystemsResponse = { + acs_systems: Array +} export type AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest = SeamHttpRequest< @@ -276,8 +283,31 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest = export interface AcsSystemsListCompatibleCredentialManagerAcsSystemsOptions {} -export type AcsSystemsReportDevicesParameters = - RouteRequestBody<'/acs/systems/report_devices'> +export type AcsSystemsReportDevicesParameters = { + acs_encoders?: + | Array<{ + hotek_metadata?: + | { + encoder_number?: string | undefined + } + | undefined + is_removed?: boolean | undefined + }> + | undefined + acs_entrances?: + | Array<{ + hotek_metadata?: + | { + common_area_name?: string | undefined + common_area_number?: string | undefined + room_number?: string | undefined + } + | undefined + is_removed?: boolean | undefined + }> + | undefined + acs_system_id: string +} /** * @deprecated Use AcsSystemsReportDevicesParameters instead. @@ -287,8 +317,7 @@ export type AcsSystemsReportDevicesBody = AcsSystemsReportDevicesParameters /** * @deprecated Use AcsSystemsReportDevicesRequest instead. */ -export type AcsSystemsReportDevicesResponse = - RouteResponse<'/acs/systems/report_devices'> +export type AcsSystemsReportDevicesResponse = void export type AcsSystemsReportDevicesRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/acs/users/users.ts b/src/lib/seam/connect/routes/acs/users/users.ts index 460542ea..d4a147e8 100644 --- a/src/lib/seam/connect/routes/acs/users/users.ts +++ b/src/lib/seam/connect/routes/acs/users/users.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, @@ -31,6 +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 { 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' @@ -312,8 +312,11 @@ export class SeamHttpAcsUsers { } } -export type AcsUsersAddToAccessGroupParameters = - RouteRequestBody<'/acs/users/add_to_access_group'> +export type AcsUsersAddToAccessGroupParameters = { + acs_access_group_id: string + + acs_user_id: string +} /** * @deprecated Use AcsUsersAddToAccessGroupParameters instead. @@ -323,14 +326,29 @@ export type AcsUsersAddToAccessGroupBody = AcsUsersAddToAccessGroupParameters /** * @deprecated Use AcsUsersAddToAccessGroupRequest instead. */ -export type AcsUsersAddToAccessGroupResponse = - RouteResponse<'/acs/users/add_to_access_group'> +export type AcsUsersAddToAccessGroupResponse = void export type AcsUsersAddToAccessGroupRequest = SeamHttpRequest export interface AcsUsersAddToAccessGroupOptions {} -export type AcsUsersCreateParameters = RouteRequestBody<'/acs/users/create'> +export type AcsUsersCreateParameters = { + access_schedule?: + | { + ends_at?: string | undefined + starts_at?: string | undefined + } + | undefined + acs_access_group_ids?: Array | undefined + acs_system_id: string + + email?: string | undefined + email_address?: string | undefined + full_name: string + + phone_number?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersCreateParameters instead. @@ -340,7 +358,7 @@ export type AcsUsersCreateBody = AcsUsersCreateParameters /** * @deprecated Use AcsUsersCreateRequest instead. */ -export type AcsUsersCreateResponse = RouteResponse<'/acs/users/create'> +export type AcsUsersCreateResponse = { acs_user: AcsUserResource } export type AcsUsersCreateRequest = SeamHttpRequest< AcsUsersCreateResponse, @@ -349,7 +367,11 @@ export type AcsUsersCreateRequest = SeamHttpRequest< export interface AcsUsersCreateOptions {} -export type AcsUsersDeleteParameters = RouteRequestBody<'/acs/users/delete'> +export type AcsUsersDeleteParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersDeleteParameters instead. @@ -359,13 +381,17 @@ export type AcsUsersDeleteParams = AcsUsersDeleteParameters /** * @deprecated Use AcsUsersDeleteRequest instead. */ -export type AcsUsersDeleteResponse = RouteResponse<'/acs/users/delete'> +export type AcsUsersDeleteResponse = void export type AcsUsersDeleteRequest = SeamHttpRequest export interface AcsUsersDeleteOptions {} -export type AcsUsersGetParameters = RouteRequestBody<'/acs/users/get'> +export type AcsUsersGetParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersGetParameters instead. @@ -375,7 +401,7 @@ export type AcsUsersGetParams = AcsUsersGetParameters /** * @deprecated Use AcsUsersGetRequest instead. */ -export type AcsUsersGetResponse = RouteResponse<'/acs/users/get'> +export type AcsUsersGetResponse = { acs_user: AcsUserResource } export type AcsUsersGetRequest = SeamHttpRequest< AcsUsersGetResponse, @@ -384,7 +410,16 @@ export type AcsUsersGetRequest = SeamHttpRequest< export interface AcsUsersGetOptions {} -export type AcsUsersListParameters = RouteRequestBody<'/acs/users/list'> +export type AcsUsersListParameters = { + acs_system_id?: string | undefined + created_before?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined + user_identity_email_address?: string | undefined + user_identity_id?: string | undefined + user_identity_phone_number?: string | undefined +} /** * @deprecated Use AcsUsersListParameters instead. @@ -394,7 +429,7 @@ export type AcsUsersListParams = AcsUsersListParameters /** * @deprecated Use AcsUsersListRequest instead. */ -export type AcsUsersListResponse = RouteResponse<'/acs/users/list'> +export type AcsUsersListResponse = { acs_users: Array } export type AcsUsersListRequest = SeamHttpRequest< AcsUsersListResponse, @@ -403,8 +438,11 @@ export type AcsUsersListRequest = SeamHttpRequest< export interface AcsUsersListOptions {} -export type AcsUsersListAccessibleEntrancesParameters = - RouteRequestBody<'/acs/users/list_accessible_entrances'> +export type AcsUsersListAccessibleEntrancesParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersListAccessibleEntrancesParameters instead. @@ -415,8 +453,9 @@ export type AcsUsersListAccessibleEntrancesParams = /** * @deprecated Use AcsUsersListAccessibleEntrancesRequest instead. */ -export type AcsUsersListAccessibleEntrancesResponse = - RouteResponse<'/acs/users/list_accessible_entrances'> +export type AcsUsersListAccessibleEntrancesResponse = { + acs_entrances: Array +} export type AcsUsersListAccessibleEntrancesRequest = SeamHttpRequest< AcsUsersListAccessibleEntrancesResponse, @@ -425,8 +464,12 @@ export type AcsUsersListAccessibleEntrancesRequest = SeamHttpRequest< export interface AcsUsersListAccessibleEntrancesOptions {} -export type AcsUsersRemoveFromAccessGroupParameters = - RouteRequestBody<'/acs/users/remove_from_access_group'> +export type AcsUsersRemoveFromAccessGroupParameters = { + acs_access_group_id: string + + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersRemoveFromAccessGroupParameters instead. @@ -437,8 +480,7 @@ export type AcsUsersRemoveFromAccessGroupParams = /** * @deprecated Use AcsUsersRemoveFromAccessGroupRequest instead. */ -export type AcsUsersRemoveFromAccessGroupResponse = - RouteResponse<'/acs/users/remove_from_access_group'> +export type AcsUsersRemoveFromAccessGroupResponse = void export type AcsUsersRemoveFromAccessGroupRequest = SeamHttpRequest< void, @@ -447,8 +489,11 @@ export type AcsUsersRemoveFromAccessGroupRequest = SeamHttpRequest< export interface AcsUsersRemoveFromAccessGroupOptions {} -export type AcsUsersRevokeAccessToAllEntrancesParameters = - RouteRequestBody<'/acs/users/revoke_access_to_all_entrances'> +export type AcsUsersRevokeAccessToAllEntrancesParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersRevokeAccessToAllEntrancesParameters instead. @@ -459,8 +504,7 @@ export type AcsUsersRevokeAccessToAllEntrancesBody = /** * @deprecated Use AcsUsersRevokeAccessToAllEntrancesRequest instead. */ -export type AcsUsersRevokeAccessToAllEntrancesResponse = - RouteResponse<'/acs/users/revoke_access_to_all_entrances'> +export type AcsUsersRevokeAccessToAllEntrancesResponse = void export type AcsUsersRevokeAccessToAllEntrancesRequest = SeamHttpRequest< void, @@ -469,7 +513,11 @@ export type AcsUsersRevokeAccessToAllEntrancesRequest = SeamHttpRequest< export interface AcsUsersRevokeAccessToAllEntrancesOptions {} -export type AcsUsersSuspendParameters = RouteRequestBody<'/acs/users/suspend'> +export type AcsUsersSuspendParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersSuspendParameters instead. @@ -479,14 +527,17 @@ export type AcsUsersSuspendBody = AcsUsersSuspendParameters /** * @deprecated Use AcsUsersSuspendRequest instead. */ -export type AcsUsersSuspendResponse = RouteResponse<'/acs/users/suspend'> +export type AcsUsersSuspendResponse = void export type AcsUsersSuspendRequest = SeamHttpRequest export interface AcsUsersSuspendOptions {} -export type AcsUsersUnsuspendParameters = - RouteRequestBody<'/acs/users/unsuspend'> +export type AcsUsersUnsuspendParameters = { + acs_system_id?: string | undefined + acs_user_id?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersUnsuspendParameters instead. @@ -496,13 +547,28 @@ export type AcsUsersUnsuspendBody = AcsUsersUnsuspendParameters /** * @deprecated Use AcsUsersUnsuspendRequest instead. */ -export type AcsUsersUnsuspendResponse = RouteResponse<'/acs/users/unsuspend'> +export type AcsUsersUnsuspendResponse = void export type AcsUsersUnsuspendRequest = SeamHttpRequest export interface AcsUsersUnsuspendOptions {} -export type AcsUsersUpdateParameters = RouteRequestBody<'/acs/users/update'> +export type AcsUsersUpdateParameters = { + access_schedule?: + | { + ends_at?: string | undefined + starts_at?: string | undefined + } + | undefined + acs_system_id?: string | undefined + acs_user_id?: string | undefined + email?: string | undefined + email_address?: string | undefined + full_name?: string | undefined + hid_acs_system_id?: string | undefined + phone_number?: string | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use AcsUsersUpdateParameters instead. @@ -512,7 +578,7 @@ export type AcsUsersUpdateBody = AcsUsersUpdateParameters /** * @deprecated Use AcsUsersUpdateRequest instead. */ -export type AcsUsersUpdateResponse = RouteResponse<'/acs/users/update'> +export type AcsUsersUpdateResponse = void export type AcsUsersUpdateRequest = 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 27b1706d..f329ed11 100644 --- a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts +++ b/src/lib/seam/connect/routes/action-attempts/action-attempts.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 { @@ -31,6 +31,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' @@ -189,8 +190,9 @@ export class SeamHttpActionAttempts { } } -export type ActionAttemptsGetParameters = - RouteRequestBody<'/action_attempts/get'> +export type ActionAttemptsGetParameters = { + action_attempt_id: string +} /** * @deprecated Use ActionAttemptsGetParameters instead. @@ -212,8 +214,12 @@ export type ActionAttemptsGetOptions = Pick< 'waitForActionAttempt' > -export type ActionAttemptsListParameters = - RouteRequestBody<'/action_attempts/list'> +export type ActionAttemptsListParameters = { + action_attempt_ids?: Array | undefined + device_id?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined +} /** * @deprecated Use ActionAttemptsListParameters instead. @@ -223,7 +229,9 @@ export type ActionAttemptsListParams = ActionAttemptsListParameters /** * @deprecated Use ActionAttemptsListRequest instead. */ -export type ActionAttemptsListResponse = RouteResponse<'/action_attempts/list'> +export type ActionAttemptsListResponse = { + action_attempts: Array +} export type ActionAttemptsListRequest = SeamHttpRequest< ActionAttemptsListResponse, 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 bcd2f1ce..a2c23557 100644 --- a/src/lib/seam/connect/routes/client-sessions/client-sessions.ts +++ b/src/lib/seam/connect/routes/client-sessions/client-sessions.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ClientSessionResource } 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' @@ -253,8 +252,16 @@ export class SeamHttpClientSessions { } } -export type ClientSessionsCreateParameters = - RouteRequestBody<'/client_sessions/create'> +export type ClientSessionsCreateParameters = { + connect_webview_ids?: Array | undefined + connected_account_ids?: Array | undefined + customer_id?: string | undefined + customer_key?: string | undefined + expires_at?: string | undefined + user_identifier_key?: string | undefined + user_identity_id?: string | undefined + user_identity_ids?: Array | undefined +} /** * @deprecated Use ClientSessionsCreateParameters instead. @@ -264,8 +271,9 @@ export type ClientSessionsCreateBody = ClientSessionsCreateParameters /** * @deprecated Use ClientSessionsCreateRequest instead. */ -export type ClientSessionsCreateResponse = - RouteResponse<'/client_sessions/create'> +export type ClientSessionsCreateResponse = { + client_session: ClientSessionResource +} export type ClientSessionsCreateRequest = SeamHttpRequest< ClientSessionsCreateResponse, @@ -274,8 +282,9 @@ export type ClientSessionsCreateRequest = SeamHttpRequest< export interface ClientSessionsCreateOptions {} -export type ClientSessionsDeleteParameters = - RouteRequestBody<'/client_sessions/delete'> +export type ClientSessionsDeleteParameters = { + client_session_id: string +} /** * @deprecated Use ClientSessionsDeleteParameters instead. @@ -285,15 +294,16 @@ export type ClientSessionsDeleteParams = ClientSessionsDeleteParameters /** * @deprecated Use ClientSessionsDeleteRequest instead. */ -export type ClientSessionsDeleteResponse = - RouteResponse<'/client_sessions/delete'> +export type ClientSessionsDeleteResponse = void export type ClientSessionsDeleteRequest = SeamHttpRequest export interface ClientSessionsDeleteOptions {} -export type ClientSessionsGetParameters = - RouteRequestBody<'/client_sessions/get'> +export type ClientSessionsGetParameters = { + client_session_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use ClientSessionsGetParameters instead. @@ -303,7 +313,9 @@ export type ClientSessionsGetParams = ClientSessionsGetParameters /** * @deprecated Use ClientSessionsGetRequest instead. */ -export type ClientSessionsGetResponse = RouteResponse<'/client_sessions/get'> +export type ClientSessionsGetResponse = { + client_session: ClientSessionResource +} export type ClientSessionsGetRequest = SeamHttpRequest< ClientSessionsGetResponse, @@ -312,8 +324,14 @@ export type ClientSessionsGetRequest = SeamHttpRequest< export interface ClientSessionsGetOptions {} -export type ClientSessionsGetOrCreateParameters = - RouteRequestBody<'/client_sessions/get_or_create'> +export type ClientSessionsGetOrCreateParameters = { + connect_webview_ids?: Array | undefined + connected_account_ids?: Array | undefined + expires_at?: string | undefined + user_identifier_key?: string | undefined + user_identity_id?: string | undefined + user_identity_ids?: Array | undefined +} /** * @deprecated Use ClientSessionsGetOrCreateParameters instead. @@ -323,8 +341,9 @@ export type ClientSessionsGetOrCreateBody = ClientSessionsGetOrCreateParameters /** * @deprecated Use ClientSessionsGetOrCreateRequest instead. */ -export type ClientSessionsGetOrCreateResponse = - RouteResponse<'/client_sessions/get_or_create'> +export type ClientSessionsGetOrCreateResponse = { + client_session: ClientSessionResource +} export type ClientSessionsGetOrCreateRequest = SeamHttpRequest< ClientSessionsGetOrCreateResponse, @@ -333,8 +352,14 @@ export type ClientSessionsGetOrCreateRequest = SeamHttpRequest< export interface ClientSessionsGetOrCreateOptions {} -export type ClientSessionsGrantAccessParameters = - RouteRequestBody<'/client_sessions/grant_access'> +export type ClientSessionsGrantAccessParameters = { + client_session_id?: string | undefined + connect_webview_ids?: Array | undefined + connected_account_ids?: Array | undefined + user_identifier_key?: string | undefined + user_identity_id?: string | undefined + user_identity_ids?: Array | undefined +} /** * @deprecated Use ClientSessionsGrantAccessParameters instead. @@ -344,15 +369,19 @@ export type ClientSessionsGrantAccessBody = ClientSessionsGrantAccessParameters /** * @deprecated Use ClientSessionsGrantAccessRequest instead. */ -export type ClientSessionsGrantAccessResponse = - RouteResponse<'/client_sessions/grant_access'> +export type ClientSessionsGrantAccessResponse = void export type ClientSessionsGrantAccessRequest = SeamHttpRequest export interface ClientSessionsGrantAccessOptions {} -export type ClientSessionsListParameters = - RouteRequestBody<'/client_sessions/list'> +export type ClientSessionsListParameters = { + client_session_id?: string | undefined + connect_webview_id?: string | undefined + user_identifier_key?: string | undefined + user_identity_id?: string | undefined + without_user_identifier_key?: boolean | undefined +} /** * @deprecated Use ClientSessionsListParameters instead. @@ -362,7 +391,9 @@ export type ClientSessionsListParams = ClientSessionsListParameters /** * @deprecated Use ClientSessionsListRequest instead. */ -export type ClientSessionsListResponse = RouteResponse<'/client_sessions/list'> +export type ClientSessionsListResponse = { + client_sessions: Array +} export type ClientSessionsListRequest = SeamHttpRequest< ClientSessionsListResponse, @@ -371,8 +402,9 @@ export type ClientSessionsListRequest = SeamHttpRequest< export interface ClientSessionsListOptions {} -export type ClientSessionsRevokeParameters = - RouteRequestBody<'/client_sessions/revoke'> +export type ClientSessionsRevokeParameters = { + client_session_id: string +} /** * @deprecated Use ClientSessionsRevokeParameters instead. @@ -382,8 +414,7 @@ export type ClientSessionsRevokeBody = ClientSessionsRevokeParameters /** * @deprecated Use ClientSessionsRevokeRequest instead. */ -export type ClientSessionsRevokeResponse = - RouteResponse<'/client_sessions/revoke'> +export type ClientSessionsRevokeResponse = void export type ClientSessionsRevokeRequest = 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 d0aa77f9..4143b138 100644 --- a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ConnectWebviewResource } 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' @@ -215,8 +214,102 @@ export class SeamHttpConnectWebviews { } } -export type ConnectWebviewsCreateParameters = - RouteRequestBody<'/connect_webviews/create'> +export type ConnectWebviewsCreateParameters = { + accepted_capabilities?: + | Array< + 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' + > + | undefined + accepted_providers?: + | Array< + | 'hotek' + | 'dormakaba_community' + | 'legic_connect' + | 'akuvox' + | 'august' + | 'avigilon_alta' + | 'brivo' + | 'butterflymx' + | 'schlage' + | 'smartthings' + | 'yale' + | 'genie' + | 'doorking' + | 'salto' + | 'salto_ks' + | 'salto_ks_accept' + | 'lockly' + | 'ttlock' + | 'linear' + | 'noiseaware' + | 'nuki' + | 'igloo' + | 'kwikset' + | 'minut' + | 'my_2n' + | 'controlbyweb' + | 'nest' + | 'igloohome' + | 'ecobee' + | 'four_suites' + | 'dormakaba_oracode' + | 'pti' + | 'wyze' + | 'seam_passport' + | 'visionline' + | 'assa_abloy_credential_service' + | 'tedee' + | 'honeywell_resideo' + | 'first_alert' + | 'latch' + | 'akiles' + | 'assa_abloy_vostio' + | 'assa_abloy_vostio_credential_service' + | 'tado' + | 'salto_space' + | 'sensi' + | 'keynest' + | 'korelock' + | 'keyincode' + | 'dormakaba_ambiance' + | 'ultraloq' + | 'dusaw' + | 'sifely' + | 'thirty_three_lock' + | 'ring' + | 'ical' + | 'lodgify' + | 'hostaway' + | 'guesty' + | 'acuity_scheduling' + | 'omnitec' + | 'kisi' + | 'yale_access' + | 'hid_cm' + | 'google_nest' + | 'slack' + > + | undefined + automatically_manage_new_devices?: boolean | undefined + custom_metadata?: Record | undefined + 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' + | 'consumer_smartlocks' + | 'beta' + | 'thermostats' + | 'noise_sensors' + | 'access_control_systems' + | 'cameras' + | 'connectors' + | 'internal_beta' + | undefined + wait_for_device_creation?: boolean | undefined +} /** * @deprecated Use ConnectWebviewsCreateParameters instead. @@ -226,8 +319,9 @@ export type ConnectWebviewsCreateBody = ConnectWebviewsCreateParameters /** * @deprecated Use ConnectWebviewsCreateRequest instead. */ -export type ConnectWebviewsCreateResponse = - RouteResponse<'/connect_webviews/create'> +export type ConnectWebviewsCreateResponse = { + connect_webview: ConnectWebviewResource +} export type ConnectWebviewsCreateRequest = SeamHttpRequest< ConnectWebviewsCreateResponse, @@ -236,8 +330,9 @@ export type ConnectWebviewsCreateRequest = SeamHttpRequest< export interface ConnectWebviewsCreateOptions {} -export type ConnectWebviewsDeleteParameters = - RouteRequestBody<'/connect_webviews/delete'> +export type ConnectWebviewsDeleteParameters = { + connect_webview_id: string +} /** * @deprecated Use ConnectWebviewsDeleteParameters instead. @@ -247,15 +342,15 @@ export type ConnectWebviewsDeleteParams = ConnectWebviewsDeleteParameters /** * @deprecated Use ConnectWebviewsDeleteRequest instead. */ -export type ConnectWebviewsDeleteResponse = - RouteResponse<'/connect_webviews/delete'> +export type ConnectWebviewsDeleteResponse = void export type ConnectWebviewsDeleteRequest = SeamHttpRequest export interface ConnectWebviewsDeleteOptions {} -export type ConnectWebviewsGetParameters = - RouteRequestBody<'/connect_webviews/get'> +export type ConnectWebviewsGetParameters = { + connect_webview_id: string +} /** * @deprecated Use ConnectWebviewsGetParameters instead. @@ -265,7 +360,9 @@ export type ConnectWebviewsGetParams = ConnectWebviewsGetParameters /** * @deprecated Use ConnectWebviewsGetRequest instead. */ -export type ConnectWebviewsGetResponse = RouteResponse<'/connect_webviews/get'> +export type ConnectWebviewsGetResponse = { + connect_webview: ConnectWebviewResource +} export type ConnectWebviewsGetRequest = SeamHttpRequest< ConnectWebviewsGetResponse, @@ -274,8 +371,14 @@ export type ConnectWebviewsGetRequest = SeamHttpRequest< export interface ConnectWebviewsGetOptions {} -export type ConnectWebviewsListParameters = - RouteRequestBody<'/connect_webviews/list'> +export type ConnectWebviewsListParameters = { + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use ConnectWebviewsListParameters instead. @@ -285,8 +388,9 @@ export type ConnectWebviewsListParams = ConnectWebviewsListParameters /** * @deprecated Use ConnectWebviewsListRequest instead. */ -export type ConnectWebviewsListResponse = - RouteResponse<'/connect_webviews/list'> +export type ConnectWebviewsListResponse = { + connect_webviews: Array +} export type ConnectWebviewsListRequest = SeamHttpRequest< ConnectWebviewsListResponse, 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 9a7fd524..9939d41d 100644 --- a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts @@ -3,12 +3,6 @@ * 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, @@ -35,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ConnectedAccountResource } 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' @@ -241,8 +236,11 @@ export class SeamHttpConnectedAccounts { } } -export type ConnectedAccountsDeleteParameters = - RouteRequestBody<'/connected_accounts/delete'> +export type ConnectedAccountsDeleteParameters = { + connected_account_id: string + + sync?: boolean | undefined +} /** * @deprecated Use ConnectedAccountsDeleteParameters instead. @@ -252,15 +250,16 @@ export type ConnectedAccountsDeleteParams = ConnectedAccountsDeleteParameters /** * @deprecated Use ConnectedAccountsDeleteRequest instead. */ -export type ConnectedAccountsDeleteResponse = - RouteResponse<'/connected_accounts/delete'> +export type ConnectedAccountsDeleteResponse = void export type ConnectedAccountsDeleteRequest = SeamHttpRequest export interface ConnectedAccountsDeleteOptions {} -export type ConnectedAccountsGetParameters = - RouteRequestParams<'/connected_accounts/get'> +export type ConnectedAccountsGetParameters = { + connected_account_id?: string | undefined + email?: string | undefined +} /** * @deprecated Use ConnectedAccountsGetParameters instead. @@ -270,8 +269,9 @@ export type ConnectedAccountsGetParams = ConnectedAccountsGetParameters /** * @deprecated Use ConnectedAccountsGetRequest instead. */ -export type ConnectedAccountsGetResponse = - RouteResponse<'/connected_accounts/get'> +export type ConnectedAccountsGetResponse = { + connected_account: ConnectedAccountResource +} export type ConnectedAccountsGetRequest = SeamHttpRequest< ConnectedAccountsGetResponse, @@ -280,8 +280,15 @@ export type ConnectedAccountsGetRequest = SeamHttpRequest< export interface ConnectedAccountsGetOptions {} -export type ConnectedAccountsListParameters = - RouteRequestBody<'/connected_accounts/list'> +export type ConnectedAccountsListParameters = { + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined + space_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use ConnectedAccountsListParameters instead. @@ -291,8 +298,9 @@ export type ConnectedAccountsListParams = ConnectedAccountsListParameters /** * @deprecated Use ConnectedAccountsListRequest instead. */ -export type ConnectedAccountsListResponse = - RouteResponse<'/connected_accounts/list'> +export type ConnectedAccountsListResponse = { + connected_accounts: Array +} export type ConnectedAccountsListRequest = SeamHttpRequest< ConnectedAccountsListResponse, @@ -301,8 +309,9 @@ export type ConnectedAccountsListRequest = SeamHttpRequest< export interface ConnectedAccountsListOptions {} -export type ConnectedAccountsSyncParameters = - RouteRequestBody<'/connected_accounts/sync'> +export type ConnectedAccountsSyncParameters = { + connected_account_id: string +} /** * @deprecated Use ConnectedAccountsSyncParameters instead. @@ -312,15 +321,25 @@ export type ConnectedAccountsSyncBody = ConnectedAccountsSyncParameters /** * @deprecated Use ConnectedAccountsSyncRequest instead. */ -export type ConnectedAccountsSyncResponse = - RouteResponse<'/connected_accounts/sync'> +export type ConnectedAccountsSyncResponse = void export type ConnectedAccountsSyncRequest = SeamHttpRequest export interface ConnectedAccountsSyncOptions {} -export type ConnectedAccountsUpdateParameters = - RouteRequestBody<'/connected_accounts/update'> +export type ConnectedAccountsUpdateParameters = { + accepted_capabilities?: + | Array< + 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' + > + | undefined + automatically_manage_new_devices?: boolean | undefined + connected_account_id: string + + custom_metadata?: Record | undefined + customer_key?: string | undefined + display_name?: string | undefined +} /** * @deprecated Use ConnectedAccountsUpdateParameters instead. @@ -330,8 +349,7 @@ export type ConnectedAccountsUpdateBody = ConnectedAccountsUpdateParameters /** * @deprecated Use ConnectedAccountsUpdateRequest instead. */ -export type ConnectedAccountsUpdateResponse = - RouteResponse<'/connected_accounts/update'> +export type ConnectedAccountsUpdateResponse = void export type ConnectedAccountsUpdateRequest = SeamHttpRequest 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 5704e4e9..7b89096b 100644 --- a/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.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, @@ -179,8 +177,9 @@ export class SeamHttpConnectedAccountsSimulate { } } -export type ConnectedAccountsSimulateDisconnectParameters = - RouteRequestBody<'/connected_accounts/simulate/disconnect'> +export type ConnectedAccountsSimulateDisconnectParameters = { + connected_account_id: string +} /** * @deprecated Use ConnectedAccountsSimulateDisconnectParameters instead. @@ -191,8 +190,7 @@ export type ConnectedAccountsSimulateDisconnectBody = /** * @deprecated Use ConnectedAccountsSimulateDisconnectRequest instead. */ -export type ConnectedAccountsSimulateDisconnectResponse = - RouteResponse<'/connected_accounts/simulate/disconnect'> +export type ConnectedAccountsSimulateDisconnectResponse = void export type ConnectedAccountsSimulateDisconnectRequest = SeamHttpRequest< void, diff --git a/src/lib/seam/connect/routes/customers/customers.ts b/src/lib/seam/connect/routes/customers/customers.ts index c8765d2d..7f759e12 100644 --- a/src/lib/seam/connect/routes/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/customers.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { CustomerPortalResource } 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' @@ -208,8 +207,321 @@ export class SeamHttpCustomers { } } -export type CustomersCreatePortalParameters = - RouteRequestBody<'/customers/create_portal'> +export type CustomersCreatePortalParameters = { + _dev?: boolean | undefined + customer_resources_filters?: + | Array<{ + field?: string | undefined + operation?: '=' | undefined + value?: {} | undefined + }> + | undefined + customization_profile_id?: string | undefined + deep_link?: + | { + resource_key?: string | undefined + resource_type?: 'reservation' | 'space' | undefined + } + | undefined + exclude_locale_picker?: boolean | undefined + features?: + | { + configure?: + | { + allow_access_automation_rule_customization?: boolean | undefined + allow_climate_automation_rule_customization?: boolean | undefined + allow_instant_key_customization?: boolean | undefined + exclude?: boolean | undefined + } + | undefined + connect?: + | { + accepted_providers?: Array | undefined + exclude?: boolean | undefined + excluded_providers?: Array | undefined + } + | undefined + manage?: + | { + device_management_confirmation?: + | { + body?: string | undefined + cancel_button_label?: string | undefined + confirm_button_label?: string | undefined + title?: string | undefined + } + | undefined + events?: + | { + allowed_events?: Array | undefined + default_events?: Array | undefined + } + | undefined + exclude?: boolean | undefined + exclude_reservation_management?: boolean | undefined + exclude_reservation_technical_details?: boolean | undefined + exclude_staff_management?: boolean | undefined + } + | undefined + manage_devices?: + | { + exclude?: boolean | undefined + } + | undefined + organize?: + | { + exclude?: boolean | undefined + } + | undefined + } + | undefined + is_embedded?: boolean | undefined + landing_page?: + | { + manage?: + | { + space_key?: string | undefined + property_key?: string | undefined + room_key?: string | undefined + common_area_key?: string | undefined + unit_key?: string | undefined + facility_key?: string | undefined + building_key?: string | undefined + listing_key?: string | undefined + property_listing_key?: string | undefined + site_key?: string | undefined + reservation_key?: string | undefined + booking_key?: string | undefined + access_grant_key?: string | undefined + } + | undefined + } + | undefined + locale?: + | 'en-US' + | 'pt-PT' + | 'fr-FR' + | 'it-IT' + | 'es-ES' + | 'de-DE' + | 'nl-NL' + | 'el-GR' + | 'pl-PL' + | 'ru-RU' + | undefined + navigation_mode?: 'full' | 'restricted' | undefined + read_only?: boolean | undefined + customer_data?: + | { + access_grants?: + | Array<{ + access_grant_key?: string | undefined + building_keys?: Array | undefined + common_area_keys?: Array | undefined + ends_at?: string | undefined + facility_keys?: Array | undefined + guest_key?: string | undefined + listing_keys?: Array | undefined + name?: string | undefined + preferred_code?: string | undefined + property_keys?: Array | undefined + resident_key?: string | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined + tenant_key?: string | undefined + unit_keys?: Array | undefined + user_identity_key?: string | undefined + user_key?: string | undefined + }> + | undefined + bookings?: + | Array<{ + booking_key?: string | undefined + building_keys?: Array | undefined + common_area_keys?: Array | undefined + ends_at?: string | undefined + facility_keys?: Array | undefined + guest_key?: string | undefined + listing_keys?: Array | undefined + name?: string | undefined + preferred_code?: string | undefined + property_keys?: Array | undefined + resident_key?: string | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined + tenant_key?: string | undefined + unit_keys?: Array | undefined + user_identity_key?: string | undefined + user_key?: string | undefined + }> + | undefined + buildings?: + | Array<{ + building_key?: string | undefined + name?: string | undefined + }> + | undefined + common_areas?: + | Array<{ + common_area_key?: string | undefined + name?: string | undefined + parent_site_key?: string | undefined + }> + | undefined + customer_key?: string | undefined + facilities?: + | Array<{ + facility_key?: string | undefined + name?: string | undefined + }> + | undefined + guests?: + | Array<{ + email_address?: string | undefined + guest_key?: string | undefined + name?: string | undefined + phone_number?: string | undefined + }> + | undefined + listings?: + | Array<{ + listing_key?: string | undefined + name?: string | undefined + }> + | undefined + properties?: + | Array<{ + name?: string | undefined + property_key?: string | undefined + }> + | undefined + property_listings?: + | Array<{ + custom_metadata?: Record | undefined + name?: string | undefined + property_listing_key?: string | undefined + }> + | undefined + reservations?: + | Array<{ + building_keys?: Array | undefined + common_area_keys?: Array | undefined + custom_metadata?: Record | undefined + ends_at?: string | undefined + facility_keys?: Array | undefined + guest_key?: string | undefined + listing_keys?: Array | undefined + name?: string | undefined + preferred_code?: string | undefined + property_keys?: Array | undefined + reservation_key?: string | undefined + resident_key?: string | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined + tenant_key?: string | undefined + unit_keys?: Array | undefined + user_identity_key?: string | undefined + user_key?: string | undefined + }> + | undefined + residents?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + resident_key?: string | undefined + }> + | undefined + rooms?: + | Array<{ + name?: string | undefined + parent_site_key?: string | undefined + room_key?: string | undefined + }> + | undefined + sites?: + | Array<{ + name?: string | undefined + site_key?: string | undefined + }> + | undefined + spaces?: + | Array<{ + customer_data?: + | { + address?: string | undefined + default_checkin_time?: string | undefined + default_checkout_time?: string | undefined + time_zone?: string | undefined + } + | undefined + duration_minutes?: number | undefined + geolocation?: + | { + latitude?: number | undefined + longitude?: number | undefined + } + | undefined + name?: string | undefined + parent_site_key?: string | undefined + space_key?: string | undefined + }> + | undefined + staff_members?: + | Array<{ + building_keys?: Array | undefined + common_area_keys?: Array | undefined + email_address?: string | undefined + facility_keys?: Array | undefined + listing_keys?: Array | undefined + name?: string | undefined + 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 | undefined + unit_keys?: Array | undefined + }> + | undefined + tenants?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + tenant_key?: string | undefined + }> + | undefined + units?: + | Array<{ + name?: string | undefined + parent_site_key?: string | undefined + unit_key?: string | undefined + }> + | undefined + user_identities?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + user_identity_key?: string | undefined + }> + | undefined + users?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + user_key?: string | undefined + }> + | undefined + } + | undefined +} /** * @deprecated Use CustomersCreatePortalParameters instead. @@ -219,8 +531,9 @@ export type CustomersCreatePortalBody = CustomersCreatePortalParameters /** * @deprecated Use CustomersCreatePortalRequest instead. */ -export type CustomersCreatePortalResponse = - RouteResponse<'/customers/create_portal'> +export type CustomersCreatePortalResponse = { + customer_portal: CustomerPortalResource +} export type CustomersCreatePortalRequest = SeamHttpRequest< CustomersCreatePortalResponse, @@ -229,8 +542,27 @@ export type CustomersCreatePortalRequest = SeamHttpRequest< export interface CustomersCreatePortalOptions {} -export type CustomersDeleteDataParameters = - RouteRequestBody<'/customers/delete_data'> +export type CustomersDeleteDataParameters = { + access_grant_keys?: Array | undefined + booking_keys?: Array | undefined + building_keys?: Array | undefined + common_area_keys?: Array | undefined + customer_keys?: Array | undefined + facility_keys?: Array | undefined + guest_keys?: Array | undefined + listing_keys?: Array | undefined + property_keys?: Array | undefined + property_listing_keys?: Array | undefined + reservation_keys?: Array | undefined + resident_keys?: Array | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + staff_member_keys?: Array | undefined + tenant_keys?: Array | undefined + unit_keys?: Array | undefined + user_identity_keys?: Array | undefined + user_keys?: Array | undefined +} /** * @deprecated Use CustomersDeleteDataParameters instead. @@ -240,15 +572,221 @@ export type CustomersDeleteDataParams = CustomersDeleteDataParameters /** * @deprecated Use CustomersDeleteDataRequest instead. */ -export type CustomersDeleteDataResponse = - RouteResponse<'/customers/delete_data'> +export type CustomersDeleteDataResponse = void export type CustomersDeleteDataRequest = SeamHttpRequest export interface CustomersDeleteDataOptions {} -export type CustomersPushDataParameters = - RouteRequestBody<'/customers/push_data'> +export type CustomersPushDataParameters = { + access_grants?: + | Array<{ + access_grant_key?: string | undefined + building_keys?: Array | undefined + common_area_keys?: Array | undefined + ends_at?: string | undefined + facility_keys?: Array | undefined + guest_key?: string | undefined + listing_keys?: Array | undefined + name?: string | undefined + preferred_code?: string | undefined + property_keys?: Array | undefined + resident_key?: string | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined + tenant_key?: string | undefined + unit_keys?: Array | undefined + user_identity_key?: string | undefined + user_key?: string | undefined + }> + | undefined + bookings?: + | Array<{ + booking_key?: string | undefined + building_keys?: Array | undefined + common_area_keys?: Array | undefined + ends_at?: string | undefined + facility_keys?: Array | undefined + guest_key?: string | undefined + listing_keys?: Array | undefined + name?: string | undefined + preferred_code?: string | undefined + property_keys?: Array | undefined + resident_key?: string | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined + tenant_key?: string | undefined + unit_keys?: Array | undefined + user_identity_key?: string | undefined + user_key?: string | undefined + }> + | undefined + buildings?: + | Array<{ + building_key?: string | undefined + name?: string | undefined + }> + | undefined + common_areas?: + | Array<{ + common_area_key?: string | undefined + name?: string | undefined + parent_site_key?: string | undefined + }> + | undefined + customer_key: string + + facilities?: + | Array<{ + facility_key?: string | undefined + name?: string | undefined + }> + | undefined + guests?: + | Array<{ + email_address?: string | undefined + guest_key?: string | undefined + name?: string | undefined + phone_number?: string | undefined + }> + | undefined + listings?: + | Array<{ + listing_key?: string | undefined + name?: string | undefined + }> + | undefined + properties?: + | Array<{ + name?: string | undefined + property_key?: string | undefined + }> + | undefined + property_listings?: + | Array<{ + custom_metadata?: Record | undefined + name?: string | undefined + property_listing_key?: string | undefined + }> + | undefined + reservations?: + | Array<{ + building_keys?: Array | undefined + common_area_keys?: Array | undefined + custom_metadata?: Record | undefined + ends_at?: string | undefined + facility_keys?: Array | undefined + guest_key?: string | undefined + listing_keys?: Array | undefined + name?: string | undefined + preferred_code?: string | undefined + property_keys?: Array | undefined + reservation_key?: string | undefined + resident_key?: string | undefined + room_keys?: Array | undefined + space_keys?: Array | undefined + starts_at?: string | undefined + tenant_key?: string | undefined + unit_keys?: Array | undefined + user_identity_key?: string | undefined + user_key?: string | undefined + }> + | undefined + residents?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + resident_key?: string | undefined + }> + | undefined + rooms?: + | Array<{ + name?: string | undefined + parent_site_key?: string | undefined + room_key?: string | undefined + }> + | undefined + sites?: + | Array<{ + name?: string | undefined + site_key?: string | undefined + }> + | undefined + spaces?: + | Array<{ + customer_data?: + | { + address?: string | undefined + default_checkin_time?: string | undefined + default_checkout_time?: string | undefined + time_zone?: string | undefined + } + | undefined + duration_minutes?: number | undefined + geolocation?: + | { + latitude?: number | undefined + longitude?: number | undefined + } + | undefined + name?: string | undefined + parent_site_key?: string | undefined + space_key?: string | undefined + }> + | undefined + staff_members?: + | Array<{ + building_keys?: Array | undefined + common_area_keys?: Array | undefined + email_address?: string | undefined + facility_keys?: Array | undefined + listing_keys?: Array | undefined + name?: string | undefined + 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 | undefined + unit_keys?: Array | undefined + }> + | undefined + tenants?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + tenant_key?: string | undefined + }> + | undefined + units?: + | Array<{ + name?: string | undefined + parent_site_key?: string | undefined + unit_key?: string | undefined + }> + | undefined + user_identities?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + user_identity_key?: string | undefined + }> + | undefined + users?: + | Array<{ + email_address?: string | undefined + name?: string | undefined + phone_number?: string | undefined + user_key?: string | undefined + }> + | undefined +} /** * @deprecated Use CustomersPushDataParameters instead. @@ -258,7 +796,7 @@ export type CustomersPushDataBody = CustomersPushDataParameters /** * @deprecated Use CustomersPushDataRequest instead. */ -export type CustomersPushDataResponse = RouteResponse<'/customers/push_data'> +export type CustomersPushDataResponse = void export type CustomersPushDataRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/devices/devices.ts b/src/lib/seam/connect/routes/devices/devices.ts index 9b2cb026..2b27c0d8 100644 --- a/src/lib/seam/connect/routes/devices/devices.ts +++ b/src/lib/seam/connect/routes/devices/devices.ts @@ -31,6 +31,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 { 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' @@ -273,7 +275,10 @@ export type DevicesDeleteRequest = SeamHttpRequest export interface DevicesDeleteOptions {} -export type DevicesGetParameters = RouteRequestBody<'/devices/get'> +export type DevicesGetParameters = { + device_id?: string | undefined + name?: string | undefined +} /** * @deprecated Use DevicesGetParameters instead. @@ -283,13 +288,215 @@ export type DevicesGetParams = DevicesGetParameters /** * @deprecated Use DevicesGetRequest instead. */ -export type DevicesGetResponse = RouteResponse<'/devices/get'> +export type DevicesGetResponse = { device: DeviceResource } export type DevicesGetRequest = SeamHttpRequest export interface DevicesGetOptions {} -export type DevicesListParameters = RouteRequestBody<'/devices/list'> +export type DevicesListParameters = { + connect_webview_id?: string | undefined + connected_account_id?: string | undefined + connected_account_ids?: Array | undefined + created_before?: string | undefined + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + device_ids?: Array | undefined + device_type?: + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | 'keynest_key' + | 'noiseaware_activity_zone' + | 'minut_sensor' + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | 'ios_phone' + | 'android_phone' + | 'ring_camera' + | undefined + device_types?: + | Array< + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | 'keynest_key' + | 'noiseaware_activity_zone' + | 'minut_sensor' + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | 'ios_phone' + | 'android_phone' + | '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' + | 'august' + | 'avigilon_alta' + | 'brivo' + | 'butterflymx' + | 'doorking' + | 'four_suites' + | 'genie' + | 'igloo' + | 'keywe' + | 'kwikset' + | 'linear' + | 'lockly' + | 'nuki' + | 'philia' + | 'salto' + | 'samsung' + | 'schlage' + | 'seam' + | 'unknown' + | 'wyze' + | 'yale' + | 'two_n' + | 'ttlock' + | 'igloohome' + | 'controlbyweb' + | 'dormakaba_oracode' + | 'tedee' + | 'keyincode' + | 'akiles' + | 'ecobee' + | 'honeywell_resideo' + | 'keynest' + | 'korelock' + | 'minut' + | 'nest' + | 'noiseaware' + | 'sensi' + | 'smartthings' + | 'tado' + | 'ultraloq' + | 'ring' + | 'ical' + | 'lodgify' + | 'hostaway' + | 'guesty' + | 'acuity_scheduling' + | 'omnitec' + | 'kisi' + | 'slack' + | undefined + page_cursor?: string | undefined + search?: string | undefined + space_id?: string | undefined + unstable_location_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use DevicesListParameters instead. @@ -299,14 +506,24 @@ export type DevicesListParams = DevicesListParameters /** * @deprecated Use DevicesListRequest instead. */ -export type DevicesListResponse = RouteResponse<'/devices/list'> +export type DevicesListResponse = { devices: Array } export type DevicesListRequest = SeamHttpRequest export interface DevicesListOptions {} -export type DevicesListDeviceProvidersParameters = - RouteRequestBody<'/devices/list_device_providers'> +export type DevicesListDeviceProvidersParameters = { + provider_category?: + | 'stable' + | 'consumer_smartlocks' + | 'beta' + | 'thermostats' + | 'noise_sensors' + | 'access_control_systems' + | 'cameras' + | 'connectors' + | undefined +} /** * @deprecated Use DevicesListDeviceProvidersParameters instead. @@ -317,8 +534,9 @@ export type DevicesListDeviceProvidersParams = /** * @deprecated Use DevicesListDeviceProvidersRequest instead. */ -export type DevicesListDeviceProvidersResponse = - RouteResponse<'/devices/list_device_providers'> +export type DevicesListDeviceProvidersResponse = { + device_providers: Array +} export type DevicesListDeviceProvidersRequest = SeamHttpRequest< DevicesListDeviceProvidersResponse, @@ -327,8 +545,1316 @@ export type DevicesListDeviceProvidersRequest = SeamHttpRequest< export interface DevicesListDeviceProvidersOptions {} -export type DevicesReportProviderMetadataParameters = - RouteRequestBody<'/devices/report_provider_metadata'> +export type DevicesReportProviderMetadataParameters = { + devices: Array<{ + device_id?: string | undefined + omnitec_metadata?: + | { + time_zone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Kampala' + | 'Africa/Khartoum' + | 'Africa/Kigali' + | 'Africa/Kinshasa' + | 'Africa/Lagos' + | 'Africa/Libreville' + | 'Africa/Lome' + | 'Africa/Luanda' + | 'Africa/Lubumbashi' + | 'Africa/Lusaka' + | 'Africa/Malabo' + | 'Africa/Maputo' + | 'Africa/Maseru' + | 'Africa/Mbabane' + | 'Africa/Mogadishu' + | 'Africa/Monrovia' + | 'Africa/Nairobi' + | 'Africa/Ndjamena' + | 'Africa/Niamey' + | 'Africa/Nouakchott' + | 'Africa/Ouagadougou' + | 'Africa/Porto-Novo' + | 'Africa/Sao_Tome' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Anguilla' + | 'America/Antigua' + | 'America/Araguaina' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Aruba' + | 'America/Asuncion' + | 'America/Bahia' + | 'America/Bahia_Banderas' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Buenos_Aires' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Catamarca' + | 'America/Cayenne' + | 'America/Cayman' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Ciudad_Juarez' + | 'America/Coral_Harbour' + | 'America/Cordoba' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Curacao' + | 'America/Danmarkshavn' + | 'America/Dawson' + | 'America/Dawson_Creek' + | 'America/Denver' + | 'America/Detroit' + | 'America/Dominica' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Fort_Nelson' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Grenada' + | 'America/Guadeloupe' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Indianapolis' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Jujuy' + | 'America/Juneau' + | 'America/Kentucky/Monticello' + | 'America/Kralendijk' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Louisville' + | 'America/Lower_Princes' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Marigot' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Mendoza' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Montreal' + | 'America/Montserrat' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Panama' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Port_of_Spain' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Rio_Branco' + | 'America/Santa_Isabel' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Sitka' + | 'America/St_Barthelemy' + | 'America/St_Johns' + | 'America/St_Kitts' + | 'America/St_Lucia' + | 'America/St_Thomas' + | 'America/St_Vincent' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Tijuana' + | 'America/Toronto' + | 'America/Tortola' + | 'America/Vancouver' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Antarctica/McMurdo' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Arctic/Longyearbyen' + | 'Asia/Aden' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Bahrain' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Calcutta' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Colombo' + | 'Asia/Damascus' + | 'Asia/Dhaka' + | 'Asia/Dili' + | 'Asia/Dubai' + | 'Asia/Dushanbe' + | 'Asia/Famagusta' + | 'Asia/Gaza' + | 'Asia/Hebron' + | 'Asia/Hong_Kong' + | 'Asia/Hovd' + | 'Asia/Irkutsk' + | 'Asia/Jakarta' + | 'Asia/Jayapura' + | 'Asia/Jerusalem' + | 'Asia/Kabul' + | 'Asia/Kamchatka' + | 'Asia/Karachi' + | 'Asia/Katmandu' + | 'Asia/Khandyga' + | 'Asia/Krasnoyarsk' + | 'Asia/Kuala_Lumpur' + | 'Asia/Kuching' + | 'Asia/Kuwait' + | 'Asia/Macau' + | 'Asia/Magadan' + | 'Asia/Makassar' + | 'Asia/Manila' + | 'Asia/Muscat' + | 'Asia/Nicosia' + | 'Asia/Novokuznetsk' + | 'Asia/Novosibirsk' + | 'Asia/Omsk' + | 'Asia/Oral' + | 'Asia/Phnom_Penh' + | 'Asia/Pontianak' + | 'Asia/Pyongyang' + | 'Asia/Qatar' + | 'Asia/Qostanay' + | 'Asia/Qyzylorda' + | 'Asia/Rangoon' + | 'Asia/Riyadh' + | 'Asia/Saigon' + | 'Asia/Sakhalin' + | 'Asia/Samarkand' + | 'Asia/Seoul' + | 'Asia/Shanghai' + | 'Asia/Singapore' + | 'Asia/Srednekolymsk' + | 'Asia/Taipei' + | 'Asia/Tashkent' + | 'Asia/Tbilisi' + | 'Asia/Tehran' + | 'Asia/Thimphu' + | 'Asia/Tokyo' + | 'Asia/Tomsk' + | 'Asia/Ulaanbaatar' + | 'Asia/Urumqi' + | 'Asia/Ust-Nera' + | 'Asia/Vientiane' + | 'Asia/Vladivostok' + | 'Asia/Yakutsk' + | 'Asia/Yekaterinburg' + | 'Asia/Yerevan' + | 'Atlantic/Azores' + | 'Atlantic/Bermuda' + | 'Atlantic/Canary' + | 'Atlantic/Cape_Verde' + | 'Atlantic/Faeroe' + | 'Atlantic/Madeira' + | 'Atlantic/Reykjavik' + | 'Atlantic/South_Georgia' + | 'Atlantic/St_Helena' + | 'Atlantic/Stanley' + | 'Australia/Adelaide' + | 'Australia/Brisbane' + | 'Australia/Broken_Hill' + | 'Australia/Currie' + | 'Australia/Darwin' + | 'Australia/Eucla' + | 'Australia/Hobart' + | 'Australia/Lindeman' + | 'Australia/Lord_Howe' + | 'Australia/Melbourne' + | 'Australia/Perth' + | 'Australia/Sydney' + | 'Europe/Amsterdam' + | 'Europe/Andorra' + | 'Europe/Astrakhan' + | 'Europe/Athens' + | 'Europe/Belgrade' + | 'Europe/Berlin' + | 'Europe/Bratislava' + | 'Europe/Brussels' + | 'Europe/Bucharest' + | 'Europe/Budapest' + | 'Europe/Busingen' + | 'Europe/Chisinau' + | 'Europe/Copenhagen' + | 'Europe/Dublin' + | 'Europe/Gibraltar' + | 'Europe/Guernsey' + | 'Europe/Helsinki' + | 'Europe/Isle_of_Man' + | 'Europe/Istanbul' + | 'Europe/Jersey' + | 'Europe/Kaliningrad' + | 'Europe/Kiev' + | 'Europe/Kirov' + | 'Europe/Lisbon' + | 'Europe/Ljubljana' + | 'Europe/London' + | 'Europe/Luxembourg' + | 'Europe/Madrid' + | 'Europe/Malta' + | 'Europe/Mariehamn' + | 'Europe/Minsk' + | 'Europe/Monaco' + | 'Europe/Moscow' + | 'Europe/Oslo' + | 'Europe/Paris' + | 'Europe/Podgorica' + | 'Europe/Prague' + | 'Europe/Riga' + | 'Europe/Rome' + | 'Europe/Samara' + | 'Europe/San_Marino' + | 'Europe/Sarajevo' + | 'Europe/Saratov' + | 'Europe/Simferopol' + | 'Europe/Skopje' + | 'Europe/Sofia' + | 'Europe/Stockholm' + | 'Europe/Tallinn' + | 'Europe/Tirane' + | 'Europe/Ulyanovsk' + | 'Europe/Uzhgorod' + | 'Europe/Vaduz' + | 'Europe/Vatican' + | 'Europe/Vienna' + | 'Europe/Vilnius' + | 'Europe/Volgograd' + | 'Europe/Warsaw' + | 'Europe/Zagreb' + | 'Europe/Zaporozhye' + | 'Europe/Zurich' + | 'Indian/Antananarivo' + | 'Indian/Chagos' + | 'Indian/Christmas' + | 'Indian/Cocos' + | 'Indian/Comoro' + | 'Indian/Kerguelen' + | 'Indian/Mahe' + | 'Indian/Maldives' + | 'Indian/Mauritius' + | 'Indian/Mayotte' + | 'Indian/Reunion' + | 'Pacific/Apia' + | 'Pacific/Auckland' + | 'Pacific/Bougainville' + | 'Pacific/Chatham' + | 'Pacific/Easter' + | 'Pacific/Efate' + | 'Pacific/Enderbury' + | 'Pacific/Fakaofo' + | 'Pacific/Fiji' + | 'Pacific/Funafuti' + | 'Pacific/Galapagos' + | 'Pacific/Gambier' + | 'Pacific/Guadalcanal' + | 'Pacific/Guam' + | 'Pacific/Honolulu' + | 'Pacific/Johnston' + | 'Pacific/Kiritimati' + | 'Pacific/Kosrae' + | 'Pacific/Kwajalein' + | 'Pacific/Majuro' + | 'Pacific/Marquesas' + | 'Pacific/Midway' + | 'Pacific/Nauru' + | 'Pacific/Niue' + | 'Pacific/Norfolk' + | 'Pacific/Noumea' + | 'Pacific/Pago_Pago' + | 'Pacific/Palau' + | 'Pacific/Pitcairn' + | 'Pacific/Ponape' + | 'Pacific/Port_Moresby' + | 'Pacific/Rarotonga' + | 'Pacific/Saipan' + | 'Pacific/Tahiti' + | 'Pacific/Tarawa' + | 'Pacific/Tongatapu' + | 'Pacific/Truk' + | 'Pacific/Wake' + | 'Pacific/Wallis' + | undefined + } + | undefined + schlage_metadata?: + | { + time_zone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Kampala' + | 'Africa/Khartoum' + | 'Africa/Kigali' + | 'Africa/Kinshasa' + | 'Africa/Lagos' + | 'Africa/Libreville' + | 'Africa/Lome' + | 'Africa/Luanda' + | 'Africa/Lubumbashi' + | 'Africa/Lusaka' + | 'Africa/Malabo' + | 'Africa/Maputo' + | 'Africa/Maseru' + | 'Africa/Mbabane' + | 'Africa/Mogadishu' + | 'Africa/Monrovia' + | 'Africa/Nairobi' + | 'Africa/Ndjamena' + | 'Africa/Niamey' + | 'Africa/Nouakchott' + | 'Africa/Ouagadougou' + | 'Africa/Porto-Novo' + | 'Africa/Sao_Tome' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Anguilla' + | 'America/Antigua' + | 'America/Araguaina' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Aruba' + | 'America/Asuncion' + | 'America/Bahia' + | 'America/Bahia_Banderas' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Buenos_Aires' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Catamarca' + | 'America/Cayenne' + | 'America/Cayman' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Ciudad_Juarez' + | 'America/Coral_Harbour' + | 'America/Cordoba' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Curacao' + | 'America/Danmarkshavn' + | 'America/Dawson' + | 'America/Dawson_Creek' + | 'America/Denver' + | 'America/Detroit' + | 'America/Dominica' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Fort_Nelson' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Grenada' + | 'America/Guadeloupe' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Indianapolis' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Jujuy' + | 'America/Juneau' + | 'America/Kentucky/Monticello' + | 'America/Kralendijk' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Louisville' + | 'America/Lower_Princes' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Marigot' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Mendoza' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Montreal' + | 'America/Montserrat' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Panama' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Port_of_Spain' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Rio_Branco' + | 'America/Santa_Isabel' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Sitka' + | 'America/St_Barthelemy' + | 'America/St_Johns' + | 'America/St_Kitts' + | 'America/St_Lucia' + | 'America/St_Thomas' + | 'America/St_Vincent' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Tijuana' + | 'America/Toronto' + | 'America/Tortola' + | 'America/Vancouver' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Antarctica/McMurdo' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Arctic/Longyearbyen' + | 'Asia/Aden' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Bahrain' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Calcutta' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Colombo' + | 'Asia/Damascus' + | 'Asia/Dhaka' + | 'Asia/Dili' + | 'Asia/Dubai' + | 'Asia/Dushanbe' + | 'Asia/Famagusta' + | 'Asia/Gaza' + | 'Asia/Hebron' + | 'Asia/Hong_Kong' + | 'Asia/Hovd' + | 'Asia/Irkutsk' + | 'Asia/Jakarta' + | 'Asia/Jayapura' + | 'Asia/Jerusalem' + | 'Asia/Kabul' + | 'Asia/Kamchatka' + | 'Asia/Karachi' + | 'Asia/Katmandu' + | 'Asia/Khandyga' + | 'Asia/Krasnoyarsk' + | 'Asia/Kuala_Lumpur' + | 'Asia/Kuching' + | 'Asia/Kuwait' + | 'Asia/Macau' + | 'Asia/Magadan' + | 'Asia/Makassar' + | 'Asia/Manila' + | 'Asia/Muscat' + | 'Asia/Nicosia' + | 'Asia/Novokuznetsk' + | 'Asia/Novosibirsk' + | 'Asia/Omsk' + | 'Asia/Oral' + | 'Asia/Phnom_Penh' + | 'Asia/Pontianak' + | 'Asia/Pyongyang' + | 'Asia/Qatar' + | 'Asia/Qostanay' + | 'Asia/Qyzylorda' + | 'Asia/Rangoon' + | 'Asia/Riyadh' + | 'Asia/Saigon' + | 'Asia/Sakhalin' + | 'Asia/Samarkand' + | 'Asia/Seoul' + | 'Asia/Shanghai' + | 'Asia/Singapore' + | 'Asia/Srednekolymsk' + | 'Asia/Taipei' + | 'Asia/Tashkent' + | 'Asia/Tbilisi' + | 'Asia/Tehran' + | 'Asia/Thimphu' + | 'Asia/Tokyo' + | 'Asia/Tomsk' + | 'Asia/Ulaanbaatar' + | 'Asia/Urumqi' + | 'Asia/Ust-Nera' + | 'Asia/Vientiane' + | 'Asia/Vladivostok' + | 'Asia/Yakutsk' + | 'Asia/Yekaterinburg' + | 'Asia/Yerevan' + | 'Atlantic/Azores' + | 'Atlantic/Bermuda' + | 'Atlantic/Canary' + | 'Atlantic/Cape_Verde' + | 'Atlantic/Faeroe' + | 'Atlantic/Madeira' + | 'Atlantic/Reykjavik' + | 'Atlantic/South_Georgia' + | 'Atlantic/St_Helena' + | 'Atlantic/Stanley' + | 'Australia/Adelaide' + | 'Australia/Brisbane' + | 'Australia/Broken_Hill' + | 'Australia/Currie' + | 'Australia/Darwin' + | 'Australia/Eucla' + | 'Australia/Hobart' + | 'Australia/Lindeman' + | 'Australia/Lord_Howe' + | 'Australia/Melbourne' + | 'Australia/Perth' + | 'Australia/Sydney' + | 'Europe/Amsterdam' + | 'Europe/Andorra' + | 'Europe/Astrakhan' + | 'Europe/Athens' + | 'Europe/Belgrade' + | 'Europe/Berlin' + | 'Europe/Bratislava' + | 'Europe/Brussels' + | 'Europe/Bucharest' + | 'Europe/Budapest' + | 'Europe/Busingen' + | 'Europe/Chisinau' + | 'Europe/Copenhagen' + | 'Europe/Dublin' + | 'Europe/Gibraltar' + | 'Europe/Guernsey' + | 'Europe/Helsinki' + | 'Europe/Isle_of_Man' + | 'Europe/Istanbul' + | 'Europe/Jersey' + | 'Europe/Kaliningrad' + | 'Europe/Kiev' + | 'Europe/Kirov' + | 'Europe/Lisbon' + | 'Europe/Ljubljana' + | 'Europe/London' + | 'Europe/Luxembourg' + | 'Europe/Madrid' + | 'Europe/Malta' + | 'Europe/Mariehamn' + | 'Europe/Minsk' + | 'Europe/Monaco' + | 'Europe/Moscow' + | 'Europe/Oslo' + | 'Europe/Paris' + | 'Europe/Podgorica' + | 'Europe/Prague' + | 'Europe/Riga' + | 'Europe/Rome' + | 'Europe/Samara' + | 'Europe/San_Marino' + | 'Europe/Sarajevo' + | 'Europe/Saratov' + | 'Europe/Simferopol' + | 'Europe/Skopje' + | 'Europe/Sofia' + | 'Europe/Stockholm' + | 'Europe/Tallinn' + | 'Europe/Tirane' + | 'Europe/Ulyanovsk' + | 'Europe/Uzhgorod' + | 'Europe/Vaduz' + | 'Europe/Vatican' + | 'Europe/Vienna' + | 'Europe/Vilnius' + | 'Europe/Volgograd' + | 'Europe/Warsaw' + | 'Europe/Zagreb' + | 'Europe/Zaporozhye' + | 'Europe/Zurich' + | 'Indian/Antananarivo' + | 'Indian/Chagos' + | 'Indian/Christmas' + | 'Indian/Cocos' + | 'Indian/Comoro' + | 'Indian/Kerguelen' + | 'Indian/Mahe' + | 'Indian/Maldives' + | 'Indian/Mauritius' + | 'Indian/Mayotte' + | 'Indian/Reunion' + | 'Pacific/Apia' + | 'Pacific/Auckland' + | 'Pacific/Bougainville' + | 'Pacific/Chatham' + | 'Pacific/Easter' + | 'Pacific/Efate' + | 'Pacific/Enderbury' + | 'Pacific/Fakaofo' + | 'Pacific/Fiji' + | 'Pacific/Funafuti' + | 'Pacific/Galapagos' + | 'Pacific/Gambier' + | 'Pacific/Guadalcanal' + | 'Pacific/Guam' + | 'Pacific/Honolulu' + | 'Pacific/Johnston' + | 'Pacific/Kiritimati' + | 'Pacific/Kosrae' + | 'Pacific/Kwajalein' + | 'Pacific/Majuro' + | 'Pacific/Marquesas' + | 'Pacific/Midway' + | 'Pacific/Nauru' + | 'Pacific/Niue' + | 'Pacific/Norfolk' + | 'Pacific/Noumea' + | 'Pacific/Pago_Pago' + | 'Pacific/Palau' + | 'Pacific/Pitcairn' + | 'Pacific/Ponape' + | 'Pacific/Port_Moresby' + | 'Pacific/Rarotonga' + | 'Pacific/Saipan' + | 'Pacific/Tahiti' + | 'Pacific/Tarawa' + | 'Pacific/Tongatapu' + | 'Pacific/Truk' + | 'Pacific/Wake' + | 'Pacific/Wallis' + | undefined + } + | undefined + ultraloq_metadata?: + | { + time_zone?: + | 'Africa/Abidjan' + | 'Africa/Accra' + | 'Africa/Addis_Ababa' + | 'Africa/Algiers' + | 'Africa/Asmera' + | 'Africa/Bamako' + | 'Africa/Bangui' + | 'Africa/Banjul' + | 'Africa/Bissau' + | 'Africa/Blantyre' + | 'Africa/Brazzaville' + | 'Africa/Bujumbura' + | 'Africa/Cairo' + | 'Africa/Casablanca' + | 'Africa/Ceuta' + | 'Africa/Conakry' + | 'Africa/Dakar' + | 'Africa/Dar_es_Salaam' + | 'Africa/Djibouti' + | 'Africa/Douala' + | 'Africa/El_Aaiun' + | 'Africa/Freetown' + | 'Africa/Gaborone' + | 'Africa/Harare' + | 'Africa/Johannesburg' + | 'Africa/Juba' + | 'Africa/Kampala' + | 'Africa/Khartoum' + | 'Africa/Kigali' + | 'Africa/Kinshasa' + | 'Africa/Lagos' + | 'Africa/Libreville' + | 'Africa/Lome' + | 'Africa/Luanda' + | 'Africa/Lubumbashi' + | 'Africa/Lusaka' + | 'Africa/Malabo' + | 'Africa/Maputo' + | 'Africa/Maseru' + | 'Africa/Mbabane' + | 'Africa/Mogadishu' + | 'Africa/Monrovia' + | 'Africa/Nairobi' + | 'Africa/Ndjamena' + | 'Africa/Niamey' + | 'Africa/Nouakchott' + | 'Africa/Ouagadougou' + | 'Africa/Porto-Novo' + | 'Africa/Sao_Tome' + | 'Africa/Tripoli' + | 'Africa/Tunis' + | 'Africa/Windhoek' + | 'America/Adak' + | 'America/Anchorage' + | 'America/Anguilla' + | 'America/Antigua' + | 'America/Araguaina' + | 'America/Argentina/La_Rioja' + | 'America/Argentina/Rio_Gallegos' + | 'America/Argentina/Salta' + | 'America/Argentina/San_Juan' + | 'America/Argentina/San_Luis' + | 'America/Argentina/Tucuman' + | 'America/Argentina/Ushuaia' + | 'America/Aruba' + | 'America/Asuncion' + | 'America/Bahia' + | 'America/Bahia_Banderas' + | 'America/Barbados' + | 'America/Belem' + | 'America/Belize' + | 'America/Blanc-Sablon' + | 'America/Boa_Vista' + | 'America/Bogota' + | 'America/Boise' + | 'America/Buenos_Aires' + | 'America/Cambridge_Bay' + | 'America/Campo_Grande' + | 'America/Cancun' + | 'America/Caracas' + | 'America/Catamarca' + | 'America/Cayenne' + | 'America/Cayman' + | 'America/Chicago' + | 'America/Chihuahua' + | 'America/Ciudad_Juarez' + | 'America/Coral_Harbour' + | 'America/Cordoba' + | 'America/Costa_Rica' + | 'America/Creston' + | 'America/Cuiaba' + | 'America/Curacao' + | 'America/Danmarkshavn' + | 'America/Dawson' + | 'America/Dawson_Creek' + | 'America/Denver' + | 'America/Detroit' + | 'America/Dominica' + | 'America/Edmonton' + | 'America/Eirunepe' + | 'America/El_Salvador' + | 'America/Fort_Nelson' + | 'America/Fortaleza' + | 'America/Glace_Bay' + | 'America/Godthab' + | 'America/Goose_Bay' + | 'America/Grand_Turk' + | 'America/Grenada' + | 'America/Guadeloupe' + | 'America/Guatemala' + | 'America/Guayaquil' + | 'America/Guyana' + | 'America/Halifax' + | 'America/Havana' + | 'America/Hermosillo' + | 'America/Indiana/Knox' + | 'America/Indiana/Marengo' + | 'America/Indiana/Petersburg' + | 'America/Indiana/Tell_City' + | 'America/Indiana/Vevay' + | 'America/Indiana/Vincennes' + | 'America/Indiana/Winamac' + | 'America/Indianapolis' + | 'America/Inuvik' + | 'America/Iqaluit' + | 'America/Jamaica' + | 'America/Jujuy' + | 'America/Juneau' + | 'America/Kentucky/Monticello' + | 'America/Kralendijk' + | 'America/La_Paz' + | 'America/Lima' + | 'America/Los_Angeles' + | 'America/Louisville' + | 'America/Lower_Princes' + | 'America/Maceio' + | 'America/Managua' + | 'America/Manaus' + | 'America/Marigot' + | 'America/Martinique' + | 'America/Matamoros' + | 'America/Mazatlan' + | 'America/Mendoza' + | 'America/Menominee' + | 'America/Merida' + | 'America/Metlakatla' + | 'America/Mexico_City' + | 'America/Miquelon' + | 'America/Moncton' + | 'America/Monterrey' + | 'America/Montevideo' + | 'America/Montreal' + | 'America/Montserrat' + | 'America/Nassau' + | 'America/New_York' + | 'America/Nipigon' + | 'America/Nome' + | 'America/Noronha' + | 'America/North_Dakota/Beulah' + | 'America/North_Dakota/Center' + | 'America/North_Dakota/New_Salem' + | 'America/Ojinaga' + | 'America/Panama' + | 'America/Pangnirtung' + | 'America/Paramaribo' + | 'America/Phoenix' + | 'America/Port-au-Prince' + | 'America/Port_of_Spain' + | 'America/Porto_Velho' + | 'America/Puerto_Rico' + | 'America/Punta_Arenas' + | 'America/Rainy_River' + | 'America/Rankin_Inlet' + | 'America/Recife' + | 'America/Regina' + | 'America/Resolute' + | 'America/Rio_Branco' + | 'America/Santa_Isabel' + | 'America/Santarem' + | 'America/Santiago' + | 'America/Santo_Domingo' + | 'America/Sao_Paulo' + | 'America/Scoresbysund' + | 'America/Sitka' + | 'America/St_Barthelemy' + | 'America/St_Johns' + | 'America/St_Kitts' + | 'America/St_Lucia' + | 'America/St_Thomas' + | 'America/St_Vincent' + | 'America/Swift_Current' + | 'America/Tegucigalpa' + | 'America/Thule' + | 'America/Thunder_Bay' + | 'America/Tijuana' + | 'America/Toronto' + | 'America/Tortola' + | 'America/Vancouver' + | 'America/Whitehorse' + | 'America/Winnipeg' + | 'America/Yakutat' + | 'America/Yellowknife' + | 'Antarctica/Casey' + | 'Antarctica/Davis' + | 'Antarctica/DumontDUrville' + | 'Antarctica/Macquarie' + | 'Antarctica/Mawson' + | 'Antarctica/McMurdo' + | 'Antarctica/Palmer' + | 'Antarctica/Rothera' + | 'Antarctica/Syowa' + | 'Antarctica/Troll' + | 'Antarctica/Vostok' + | 'Arctic/Longyearbyen' + | 'Asia/Aden' + | 'Asia/Almaty' + | 'Asia/Amman' + | 'Asia/Anadyr' + | 'Asia/Aqtau' + | 'Asia/Aqtobe' + | 'Asia/Ashgabat' + | 'Asia/Atyrau' + | 'Asia/Baghdad' + | 'Asia/Bahrain' + | 'Asia/Baku' + | 'Asia/Bangkok' + | 'Asia/Barnaul' + | 'Asia/Beirut' + | 'Asia/Bishkek' + | 'Asia/Brunei' + | 'Asia/Calcutta' + | 'Asia/Chita' + | 'Asia/Choibalsan' + | 'Asia/Colombo' + | 'Asia/Damascus' + | 'Asia/Dhaka' + | 'Asia/Dili' + | 'Asia/Dubai' + | 'Asia/Dushanbe' + | 'Asia/Famagusta' + | 'Asia/Gaza' + | 'Asia/Hebron' + | 'Asia/Hong_Kong' + | 'Asia/Hovd' + | 'Asia/Irkutsk' + | 'Asia/Jakarta' + | 'Asia/Jayapura' + | 'Asia/Jerusalem' + | 'Asia/Kabul' + | 'Asia/Kamchatka' + | 'Asia/Karachi' + | 'Asia/Katmandu' + | 'Asia/Khandyga' + | 'Asia/Krasnoyarsk' + | 'Asia/Kuala_Lumpur' + | 'Asia/Kuching' + | 'Asia/Kuwait' + | 'Asia/Macau' + | 'Asia/Magadan' + | 'Asia/Makassar' + | 'Asia/Manila' + | 'Asia/Muscat' + | 'Asia/Nicosia' + | 'Asia/Novokuznetsk' + | 'Asia/Novosibirsk' + | 'Asia/Omsk' + | 'Asia/Oral' + | 'Asia/Phnom_Penh' + | 'Asia/Pontianak' + | 'Asia/Pyongyang' + | 'Asia/Qatar' + | 'Asia/Qostanay' + | 'Asia/Qyzylorda' + | 'Asia/Rangoon' + | 'Asia/Riyadh' + | 'Asia/Saigon' + | 'Asia/Sakhalin' + | 'Asia/Samarkand' + | 'Asia/Seoul' + | 'Asia/Shanghai' + | 'Asia/Singapore' + | 'Asia/Srednekolymsk' + | 'Asia/Taipei' + | 'Asia/Tashkent' + | 'Asia/Tbilisi' + | 'Asia/Tehran' + | 'Asia/Thimphu' + | 'Asia/Tokyo' + | 'Asia/Tomsk' + | 'Asia/Ulaanbaatar' + | 'Asia/Urumqi' + | 'Asia/Ust-Nera' + | 'Asia/Vientiane' + | 'Asia/Vladivostok' + | 'Asia/Yakutsk' + | 'Asia/Yekaterinburg' + | 'Asia/Yerevan' + | 'Atlantic/Azores' + | 'Atlantic/Bermuda' + | 'Atlantic/Canary' + | 'Atlantic/Cape_Verde' + | 'Atlantic/Faeroe' + | 'Atlantic/Madeira' + | 'Atlantic/Reykjavik' + | 'Atlantic/South_Georgia' + | 'Atlantic/St_Helena' + | 'Atlantic/Stanley' + | 'Australia/Adelaide' + | 'Australia/Brisbane' + | 'Australia/Broken_Hill' + | 'Australia/Currie' + | 'Australia/Darwin' + | 'Australia/Eucla' + | 'Australia/Hobart' + | 'Australia/Lindeman' + | 'Australia/Lord_Howe' + | 'Australia/Melbourne' + | 'Australia/Perth' + | 'Australia/Sydney' + | 'Europe/Amsterdam' + | 'Europe/Andorra' + | 'Europe/Astrakhan' + | 'Europe/Athens' + | 'Europe/Belgrade' + | 'Europe/Berlin' + | 'Europe/Bratislava' + | 'Europe/Brussels' + | 'Europe/Bucharest' + | 'Europe/Budapest' + | 'Europe/Busingen' + | 'Europe/Chisinau' + | 'Europe/Copenhagen' + | 'Europe/Dublin' + | 'Europe/Gibraltar' + | 'Europe/Guernsey' + | 'Europe/Helsinki' + | 'Europe/Isle_of_Man' + | 'Europe/Istanbul' + | 'Europe/Jersey' + | 'Europe/Kaliningrad' + | 'Europe/Kiev' + | 'Europe/Kirov' + | 'Europe/Lisbon' + | 'Europe/Ljubljana' + | 'Europe/London' + | 'Europe/Luxembourg' + | 'Europe/Madrid' + | 'Europe/Malta' + | 'Europe/Mariehamn' + | 'Europe/Minsk' + | 'Europe/Monaco' + | 'Europe/Moscow' + | 'Europe/Oslo' + | 'Europe/Paris' + | 'Europe/Podgorica' + | 'Europe/Prague' + | 'Europe/Riga' + | 'Europe/Rome' + | 'Europe/Samara' + | 'Europe/San_Marino' + | 'Europe/Sarajevo' + | 'Europe/Saratov' + | 'Europe/Simferopol' + | 'Europe/Skopje' + | 'Europe/Sofia' + | 'Europe/Stockholm' + | 'Europe/Tallinn' + | 'Europe/Tirane' + | 'Europe/Ulyanovsk' + | 'Europe/Uzhgorod' + | 'Europe/Vaduz' + | 'Europe/Vatican' + | 'Europe/Vienna' + | 'Europe/Vilnius' + | 'Europe/Volgograd' + | 'Europe/Warsaw' + | 'Europe/Zagreb' + | 'Europe/Zaporozhye' + | 'Europe/Zurich' + | 'Indian/Antananarivo' + | 'Indian/Chagos' + | 'Indian/Christmas' + | 'Indian/Cocos' + | 'Indian/Comoro' + | 'Indian/Kerguelen' + | 'Indian/Mahe' + | 'Indian/Maldives' + | 'Indian/Mauritius' + | 'Indian/Mayotte' + | 'Indian/Reunion' + | 'Pacific/Apia' + | 'Pacific/Auckland' + | 'Pacific/Bougainville' + | 'Pacific/Chatham' + | 'Pacific/Easter' + | 'Pacific/Efate' + | 'Pacific/Enderbury' + | 'Pacific/Fakaofo' + | 'Pacific/Fiji' + | 'Pacific/Funafuti' + | 'Pacific/Galapagos' + | 'Pacific/Gambier' + | 'Pacific/Guadalcanal' + | 'Pacific/Guam' + | 'Pacific/Honolulu' + | 'Pacific/Johnston' + | 'Pacific/Kiritimati' + | 'Pacific/Kosrae' + | 'Pacific/Kwajalein' + | 'Pacific/Majuro' + | 'Pacific/Marquesas' + | 'Pacific/Midway' + | 'Pacific/Nauru' + | 'Pacific/Niue' + | 'Pacific/Norfolk' + | 'Pacific/Noumea' + | 'Pacific/Pago_Pago' + | 'Pacific/Palau' + | 'Pacific/Pitcairn' + | 'Pacific/Ponape' + | 'Pacific/Port_Moresby' + | 'Pacific/Rarotonga' + | 'Pacific/Saipan' + | 'Pacific/Tahiti' + | 'Pacific/Tarawa' + | 'Pacific/Tongatapu' + | 'Pacific/Truk' + | 'Pacific/Wake' + | 'Pacific/Wallis' + | undefined + } + | undefined + }> +} /** * @deprecated Use DevicesReportProviderMetadataParameters instead. @@ -339,8 +1865,7 @@ export type DevicesReportProviderMetadataBody = /** * @deprecated Use DevicesReportProviderMetadataRequest instead. */ -export type DevicesReportProviderMetadataResponse = - RouteResponse<'/devices/report_provider_metadata'> +export type DevicesReportProviderMetadataResponse = void export type DevicesReportProviderMetadataRequest = SeamHttpRequest< void, @@ -349,7 +1874,19 @@ export type DevicesReportProviderMetadataRequest = SeamHttpRequest< export interface DevicesReportProviderMetadataOptions {} -export type DevicesUpdateParameters = RouteRequestBody<'/devices/update'> +export type DevicesUpdateParameters = { + backup_access_code_pool_enabled?: boolean | undefined + custom_metadata?: Record | undefined + device_id: string + + is_managed?: boolean | undefined + name?: string | undefined + properties?: + | { + name?: string | undefined + } + | undefined +} /** * @deprecated Use DevicesUpdateParameters instead. @@ -359,7 +1896,7 @@ export type DevicesUpdateBody = DevicesUpdateParameters /** * @deprecated Use DevicesUpdateRequest instead. */ -export type DevicesUpdateResponse = RouteResponse<'/devices/update'> +export type DevicesUpdateResponse = void export type DevicesUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/devices/simulate/simulate.ts b/src/lib/seam/connect/routes/devices/simulate/simulate.ts index 9430e2a0..eb28f0e4 100644 --- a/src/lib/seam/connect/routes/devices/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/devices/simulate/simulate.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, @@ -241,8 +239,9 @@ export class SeamHttpDevicesSimulate { } } -export type DevicesSimulateConnectParameters = - RouteRequestBody<'/devices/simulate/connect'> +export type DevicesSimulateConnectParameters = { + device_id: string +} /** * @deprecated Use DevicesSimulateConnectParameters instead. @@ -252,15 +251,15 @@ export type DevicesSimulateConnectBody = DevicesSimulateConnectParameters /** * @deprecated Use DevicesSimulateConnectRequest instead. */ -export type DevicesSimulateConnectResponse = - RouteResponse<'/devices/simulate/connect'> +export type DevicesSimulateConnectResponse = void export type DevicesSimulateConnectRequest = SeamHttpRequest export interface DevicesSimulateConnectOptions {} -export type DevicesSimulateConnectToHubParameters = - RouteRequestBody<'/devices/simulate/connect_to_hub'> +export type DevicesSimulateConnectToHubParameters = { + device_id: string +} /** * @deprecated Use DevicesSimulateConnectToHubParameters instead. @@ -271,8 +270,7 @@ export type DevicesSimulateConnectToHubBody = /** * @deprecated Use DevicesSimulateConnectToHubRequest instead. */ -export type DevicesSimulateConnectToHubResponse = - RouteResponse<'/devices/simulate/connect_to_hub'> +export type DevicesSimulateConnectToHubResponse = void export type DevicesSimulateConnectToHubRequest = SeamHttpRequest< void, @@ -281,8 +279,9 @@ export type DevicesSimulateConnectToHubRequest = SeamHttpRequest< export interface DevicesSimulateConnectToHubOptions {} -export type DevicesSimulateDisconnectParameters = - RouteRequestBody<'/devices/simulate/disconnect'> +export type DevicesSimulateDisconnectParameters = { + device_id: string +} /** * @deprecated Use DevicesSimulateDisconnectParameters instead. @@ -292,15 +291,15 @@ export type DevicesSimulateDisconnectBody = DevicesSimulateDisconnectParameters /** * @deprecated Use DevicesSimulateDisconnectRequest instead. */ -export type DevicesSimulateDisconnectResponse = - RouteResponse<'/devices/simulate/disconnect'> +export type DevicesSimulateDisconnectResponse = void export type DevicesSimulateDisconnectRequest = SeamHttpRequest export interface DevicesSimulateDisconnectOptions {} -export type DevicesSimulateDisconnectFromHubParameters = - RouteRequestBody<'/devices/simulate/disconnect_from_hub'> +export type DevicesSimulateDisconnectFromHubParameters = { + device_id: string +} /** * @deprecated Use DevicesSimulateDisconnectFromHubParameters instead. @@ -311,8 +310,7 @@ export type DevicesSimulateDisconnectFromHubBody = /** * @deprecated Use DevicesSimulateDisconnectFromHubRequest instead. */ -export type DevicesSimulateDisconnectFromHubResponse = - RouteResponse<'/devices/simulate/disconnect_from_hub'> +export type DevicesSimulateDisconnectFromHubResponse = void export type DevicesSimulateDisconnectFromHubRequest = SeamHttpRequest< void, @@ -321,8 +319,11 @@ export type DevicesSimulateDisconnectFromHubRequest = SeamHttpRequest< export interface DevicesSimulateDisconnectFromHubOptions {} -export type DevicesSimulatePaidSubscriptionParameters = - RouteRequestBody<'/devices/simulate/paid_subscription'> +export type DevicesSimulatePaidSubscriptionParameters = { + device_id: string + + is_expired: boolean +} /** * @deprecated Use DevicesSimulatePaidSubscriptionParameters instead. @@ -333,8 +334,7 @@ export type DevicesSimulatePaidSubscriptionBody = /** * @deprecated Use DevicesSimulatePaidSubscriptionRequest instead. */ -export type DevicesSimulatePaidSubscriptionResponse = - RouteResponse<'/devices/simulate/paid_subscription'> +export type DevicesSimulatePaidSubscriptionResponse = void export type DevicesSimulatePaidSubscriptionRequest = SeamHttpRequest< void, @@ -343,8 +343,9 @@ export type DevicesSimulatePaidSubscriptionRequest = SeamHttpRequest< export interface DevicesSimulatePaidSubscriptionOptions {} -export type DevicesSimulateRemoveParameters = - RouteRequestBody<'/devices/simulate/remove'> +export type DevicesSimulateRemoveParameters = { + device_id: string +} /** * @deprecated Use DevicesSimulateRemoveParameters instead. @@ -354,8 +355,7 @@ export type DevicesSimulateRemoveBody = DevicesSimulateRemoveParameters /** * @deprecated Use DevicesSimulateRemoveRequest instead. */ -export type DevicesSimulateRemoveResponse = - RouteResponse<'/devices/simulate/remove'> +export type DevicesSimulateRemoveResponse = void export type DevicesSimulateRemoveRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts index a992db3c..a394753b 100644 --- a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { UnmanagedDeviceResource } 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' @@ -202,8 +201,10 @@ export class SeamHttpDevicesUnmanaged { } } -export type DevicesUnmanagedGetParameters = - RouteRequestBody<'/devices/unmanaged/get'> +export type DevicesUnmanagedGetParameters = { + device_id?: string | undefined + name?: string | undefined +} /** * @deprecated Use DevicesUnmanagedGetParameters instead. @@ -213,8 +214,7 @@ export type DevicesUnmanagedGetParams = DevicesUnmanagedGetParameters /** * @deprecated Use DevicesUnmanagedGetRequest instead. */ -export type DevicesUnmanagedGetResponse = - RouteResponse<'/devices/unmanaged/get'> +export type DevicesUnmanagedGetResponse = { device: UnmanagedDeviceResource } export type DevicesUnmanagedGetRequest = SeamHttpRequest< DevicesUnmanagedGetResponse, @@ -223,8 +223,209 @@ export type DevicesUnmanagedGetRequest = SeamHttpRequest< export interface DevicesUnmanagedGetOptions {} -export type DevicesUnmanagedListParameters = - RouteRequestBody<'/devices/unmanaged/list'> +export type DevicesUnmanagedListParameters = { + connect_webview_id?: string | undefined + connected_account_id?: string | undefined + connected_account_ids?: Array | undefined + created_before?: string | undefined + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + device_ids?: Array | undefined + device_type?: + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | 'keynest_key' + | 'noiseaware_activity_zone' + | 'minut_sensor' + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | 'ios_phone' + | 'android_phone' + | 'ring_camera' + | undefined + device_types?: + | Array< + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | 'keynest_key' + | 'noiseaware_activity_zone' + | 'minut_sensor' + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | 'ios_phone' + | 'android_phone' + | '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' + | 'august' + | 'avigilon_alta' + | 'brivo' + | 'butterflymx' + | 'doorking' + | 'four_suites' + | 'genie' + | 'igloo' + | 'keywe' + | 'kwikset' + | 'linear' + | 'lockly' + | 'nuki' + | 'philia' + | 'salto' + | 'samsung' + | 'schlage' + | 'seam' + | 'unknown' + | 'wyze' + | 'yale' + | 'two_n' + | 'ttlock' + | 'igloohome' + | 'controlbyweb' + | 'dormakaba_oracode' + | 'tedee' + | 'keyincode' + | 'akiles' + | 'ecobee' + | 'honeywell_resideo' + | 'keynest' + | 'korelock' + | 'minut' + | 'nest' + | 'noiseaware' + | 'sensi' + | 'smartthings' + | 'tado' + | 'ultraloq' + | 'ring' + | 'ical' + | 'lodgify' + | 'hostaway' + | 'guesty' + | 'acuity_scheduling' + | 'omnitec' + | 'kisi' + | 'slack' + | undefined + page_cursor?: string | undefined + search?: string | undefined + space_id?: string | undefined + unstable_location_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use DevicesUnmanagedListParameters instead. @@ -234,8 +435,9 @@ export type DevicesUnmanagedListParams = DevicesUnmanagedListParameters /** * @deprecated Use DevicesUnmanagedListRequest instead. */ -export type DevicesUnmanagedListResponse = - RouteResponse<'/devices/unmanaged/list'> +export type DevicesUnmanagedListResponse = { + devices: Array +} export type DevicesUnmanagedListRequest = SeamHttpRequest< DevicesUnmanagedListResponse, @@ -244,8 +446,12 @@ export type DevicesUnmanagedListRequest = SeamHttpRequest< export interface DevicesUnmanagedListOptions {} -export type DevicesUnmanagedUpdateParameters = - RouteRequestBody<'/devices/unmanaged/update'> +export type DevicesUnmanagedUpdateParameters = { + custom_metadata?: Record | undefined + device_id: string + + is_managed?: boolean | undefined +} /** * @deprecated Use DevicesUnmanagedUpdateParameters instead. @@ -255,8 +461,7 @@ export type DevicesUnmanagedUpdateBody = DevicesUnmanagedUpdateParameters /** * @deprecated Use DevicesUnmanagedUpdateRequest instead. */ -export type DevicesUnmanagedUpdateResponse = - RouteResponse<'/devices/unmanaged/update'> +export type DevicesUnmanagedUpdateResponse = void export type DevicesUnmanagedUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/events/events.ts b/src/lib/seam/connect/routes/events/events.ts index 7216066d..15d8fb83 100644 --- a/src/lib/seam/connect/routes/events/events.ts +++ b/src/lib/seam/connect/routes/events/events.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { EventResource } 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' @@ -189,7 +188,11 @@ export class SeamHttpEvents { } } -export type EventsGetParameters = RouteRequestBody<'/events/get'> +export type EventsGetParameters = { + device_id?: string | undefined + event_id?: string | undefined + event_type?: string | undefined +} /** * @deprecated Use EventsGetParameters instead. @@ -199,13 +202,264 @@ export type EventsGetParams = EventsGetParameters /** * @deprecated Use EventsGetRequest instead. */ -export type EventsGetResponse = RouteResponse<'/events/get'> +export type EventsGetResponse = { event: EventResource } export type EventsGetRequest = SeamHttpRequest export interface EventsGetOptions {} -export type EventsListParameters = RouteRequestBody<'/events/list'> +export type EventsListParameters = { + access_code_id?: string | undefined + access_code_ids?: Array | undefined + access_grant_id?: string | undefined + access_grant_ids?: Array | undefined + access_method_id?: string | undefined + access_method_ids?: Array | undefined + acs_access_group_id?: string | undefined + acs_credential_id?: string | undefined + acs_encoder_id?: string | undefined + acs_entrance_id?: string | undefined + acs_system_id?: string | undefined + acs_system_ids?: Array | undefined + acs_user_id?: string | undefined + between?: Array<{}> | undefined + connect_webview_id?: string | undefined + connected_account_id?: string | undefined + customer_key?: string | undefined + device_id?: string | undefined + device_ids?: Array | undefined + event_ids?: Array | undefined + event_type?: + | 'access_code.created' + | 'access_code.changed' + | 'access_code.name_changed' + | 'access_code.code_changed' + | 'access_code.time_frame_changed' + | 'access_code.mutations_requested' + | 'access_code.scheduled_on_device' + | 'access_code.set_on_device' + | 'access_code.removed_from_device' + | 'access_code.delay_in_setting_on_device' + | 'access_code.failed_to_set_on_device' + | 'access_code.deleted' + | 'access_code.delay_in_removing_from_device' + | 'access_code.failed_to_remove_from_device' + | 'access_code.modified_external_to_seam' + | 'access_code.deleted_external_to_seam' + | 'access_code.backup_access_code_pulled' + | 'access_code.unmanaged.converted_to_managed' + | 'access_code.unmanaged.failed_to_convert_to_managed' + | 'access_code.unmanaged.created' + | 'access_code.unmanaged.removed' + | 'access_grant.created' + | 'access_grant.deleted' + | 'access_grant.access_granted_to_all_doors' + | 'access_grant.access_granted_to_door' + | 'access_grant.access_to_door_lost' + | 'access_grant.access_times_changed' + | 'access_grant.could_not_create_requested_access_methods' + | 'access_method.issued' + | 'access_method.revoked' + | 'access_method.card_encoding_required' + | 'access_method.deleted' + | 'access_method.reissued' + | 'access_method.created' + | 'access_method.delay_in_issuing' + | 'access_method.failed_to_issue' + | 'acs_system.connected' + | 'acs_system.added' + | 'acs_system.disconnected' + | 'acs_credential.deleted' + | 'acs_credential.issued' + | 'acs_credential.reissued' + | 'acs_credential.invalidated' + | 'acs_user.created' + | 'acs_user.deleted' + | 'acs_encoder.added' + | 'acs_encoder.removed' + | 'acs_access_group.deleted' + | 'acs_entrance.added' + | 'acs_entrance.removed' + | 'client_session.deleted' + | 'connected_account.connected' + | 'connected_account.created' + | 'connected_account.successful_login' + | 'connected_account.disconnected' + | 'connected_account.completed_first_sync' + | 'connected_account.deleted' + | 'connected_account.completed_first_sync_after_reconnection' + | 'connected_account.reauthorization_requested' + | 'action_attempt.lock_door.succeeded' + | 'action_attempt.lock_door.failed' + | 'action_attempt.unlock_door.succeeded' + | 'action_attempt.unlock_door.failed' + | 'action_attempt.simulate_keypad_code_entry.succeeded' + | 'action_attempt.simulate_keypad_code_entry.failed' + | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' + | 'action_attempt.simulate_manual_lock_via_keypad.failed' + | 'connect_webview.login_succeeded' + | 'connect_webview.login_failed' + | 'device.connected' + | 'device.added' + | 'device.converted_to_unmanaged' + | 'device.unmanaged.converted_to_managed' + | 'device.unmanaged.connected' + | 'device.disconnected' + | 'device.unmanaged.disconnected' + | 'device.tampered' + | 'device.low_battery' + | 'device.battery_status_changed' + | 'device.removed' + | 'device.deleted' + | 'device.third_party_integration_detected' + | 'device.third_party_integration_no_longer_detected' + | 'device.salto.privacy_mode_activated' + | 'device.salto.privacy_mode_deactivated' + | 'device.connection_became_flaky' + | 'device.connection_stabilized' + | 'device.error.subscription_required' + | 'device.error.subscription_required.resolved' + | 'device.accessory_keypad_connected' + | 'device.accessory_keypad_disconnected' + | 'noise_sensor.noise_threshold_triggered' + | 'lock.locked' + | 'lock.unlocked' + | 'lock.access_denied' + | 'thermostat.climate_preset_activated' + | 'thermostat.manually_adjusted' + | 'thermostat.temperature_threshold_exceeded' + | 'thermostat.temperature_threshold_no_longer_exceeded' + | 'thermostat.temperature_reached_set_point' + | 'thermostat.temperature_changed' + | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' + | 'enrollment_automation.deleted' + | 'phone.deactivated' + | 'space.device_membership_changed' + | 'space.created' + | 'space.deleted' + | undefined + event_types?: + | Array< + | 'access_code.created' + | 'access_code.changed' + | 'access_code.name_changed' + | 'access_code.code_changed' + | 'access_code.time_frame_changed' + | 'access_code.mutations_requested' + | 'access_code.scheduled_on_device' + | 'access_code.set_on_device' + | 'access_code.removed_from_device' + | 'access_code.delay_in_setting_on_device' + | 'access_code.failed_to_set_on_device' + | 'access_code.deleted' + | 'access_code.delay_in_removing_from_device' + | 'access_code.failed_to_remove_from_device' + | 'access_code.modified_external_to_seam' + | 'access_code.deleted_external_to_seam' + | 'access_code.backup_access_code_pulled' + | 'access_code.unmanaged.converted_to_managed' + | 'access_code.unmanaged.failed_to_convert_to_managed' + | 'access_code.unmanaged.created' + | 'access_code.unmanaged.removed' + | 'access_grant.created' + | 'access_grant.deleted' + | 'access_grant.access_granted_to_all_doors' + | 'access_grant.access_granted_to_door' + | 'access_grant.access_to_door_lost' + | 'access_grant.access_times_changed' + | 'access_grant.could_not_create_requested_access_methods' + | 'access_method.issued' + | 'access_method.revoked' + | 'access_method.card_encoding_required' + | 'access_method.deleted' + | 'access_method.reissued' + | 'access_method.created' + | 'access_method.delay_in_issuing' + | 'access_method.failed_to_issue' + | 'acs_system.connected' + | 'acs_system.added' + | 'acs_system.disconnected' + | 'acs_credential.deleted' + | 'acs_credential.issued' + | 'acs_credential.reissued' + | 'acs_credential.invalidated' + | 'acs_user.created' + | 'acs_user.deleted' + | 'acs_encoder.added' + | 'acs_encoder.removed' + | 'acs_access_group.deleted' + | 'acs_entrance.added' + | 'acs_entrance.removed' + | 'client_session.deleted' + | 'connected_account.connected' + | 'connected_account.created' + | 'connected_account.successful_login' + | 'connected_account.disconnected' + | 'connected_account.completed_first_sync' + | 'connected_account.deleted' + | 'connected_account.completed_first_sync_after_reconnection' + | 'connected_account.reauthorization_requested' + | 'action_attempt.lock_door.succeeded' + | 'action_attempt.lock_door.failed' + | 'action_attempt.unlock_door.succeeded' + | 'action_attempt.unlock_door.failed' + | 'action_attempt.simulate_keypad_code_entry.succeeded' + | 'action_attempt.simulate_keypad_code_entry.failed' + | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' + | 'action_attempt.simulate_manual_lock_via_keypad.failed' + | 'connect_webview.login_succeeded' + | 'connect_webview.login_failed' + | 'device.connected' + | 'device.added' + | 'device.converted_to_unmanaged' + | 'device.unmanaged.converted_to_managed' + | 'device.unmanaged.connected' + | 'device.disconnected' + | 'device.unmanaged.disconnected' + | 'device.tampered' + | 'device.low_battery' + | 'device.battery_status_changed' + | 'device.removed' + | 'device.deleted' + | 'device.third_party_integration_detected' + | 'device.third_party_integration_no_longer_detected' + | 'device.salto.privacy_mode_activated' + | 'device.salto.privacy_mode_deactivated' + | 'device.connection_became_flaky' + | 'device.connection_stabilized' + | 'device.error.subscription_required' + | 'device.error.subscription_required.resolved' + | 'device.accessory_keypad_connected' + | 'device.accessory_keypad_disconnected' + | 'noise_sensor.noise_threshold_triggered' + | 'lock.locked' + | 'lock.unlocked' + | 'lock.access_denied' + | 'thermostat.climate_preset_activated' + | 'thermostat.manually_adjusted' + | 'thermostat.temperature_threshold_exceeded' + | 'thermostat.temperature_threshold_no_longer_exceeded' + | 'thermostat.temperature_reached_set_point' + | 'thermostat.temperature_changed' + | 'device.name_changed' + | 'camera.activated' + | 'device.doorbell_rang' + | 'enrollment_automation.deleted' + | 'phone.deactivated' + | 'space.device_membership_changed' + | 'space.created' + | 'space.deleted' + > + | undefined + limit?: number | undefined + since?: string | undefined + space_id?: string | undefined + space_ids?: Array | undefined + unstable_offset?: number | undefined + user_identity_id?: string | undefined +} /** * @deprecated Use EventsListParameters instead. @@ -215,7 +469,7 @@ export type EventsListParams = EventsListParameters /** * @deprecated Use EventsListRequest instead. */ -export type EventsListResponse = RouteResponse<'/events/list'> +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 eab2ecd0..6ad20946 100644 --- a/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +++ b/src/lib/seam/connect/routes/instant-keys/instant-keys.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { InstantKeyResource } 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' @@ -202,8 +201,9 @@ export class SeamHttpInstantKeys { } } -export type InstantKeysDeleteParameters = - RouteRequestBody<'/instant_keys/delete'> +export type InstantKeysDeleteParameters = { + instant_key_id: string +} /** * @deprecated Use InstantKeysDeleteParameters instead. @@ -213,13 +213,16 @@ export type InstantKeysDeleteParams = InstantKeysDeleteParameters /** * @deprecated Use InstantKeysDeleteRequest instead. */ -export type InstantKeysDeleteResponse = RouteResponse<'/instant_keys/delete'> +export type InstantKeysDeleteResponse = void export type InstantKeysDeleteRequest = SeamHttpRequest export interface InstantKeysDeleteOptions {} -export type InstantKeysGetParameters = RouteRequestBody<'/instant_keys/get'> +export type InstantKeysGetParameters = { + instant_key_id?: string | undefined + instant_key_url?: string | undefined +} /** * @deprecated Use InstantKeysGetParameters instead. @@ -229,7 +232,7 @@ export type InstantKeysGetParams = InstantKeysGetParameters /** * @deprecated Use InstantKeysGetRequest instead. */ -export type InstantKeysGetResponse = RouteResponse<'/instant_keys/get'> +export type InstantKeysGetResponse = { instant_key: InstantKeyResource } export type InstantKeysGetRequest = SeamHttpRequest< InstantKeysGetResponse, @@ -238,7 +241,9 @@ export type InstantKeysGetRequest = SeamHttpRequest< export interface InstantKeysGetOptions {} -export type InstantKeysListParameters = RouteRequestBody<'/instant_keys/list'> +export type InstantKeysListParameters = { + user_identity_id?: string | undefined +} /** * @deprecated Use InstantKeysListParameters instead. @@ -248,7 +253,9 @@ export type InstantKeysListParams = InstantKeysListParameters /** * @deprecated Use InstantKeysListRequest instead. */ -export type InstantKeysListResponse = RouteResponse<'/instant_keys/list'> +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 d48b5524..7f478f14 100644 --- a/src/lib/seam/connect/routes/locks/locks.ts +++ b/src/lib/seam/connect/routes/locks/locks.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 { @@ -31,6 +31,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -234,8 +235,12 @@ export class SeamHttpLocks { } } -export type LocksConfigureAutoLockParameters = - RouteRequestBody<'/locks/configure_auto_lock'> +export type LocksConfigureAutoLockParameters = { + auto_lock_delay_seconds?: number | undefined + auto_lock_enabled: boolean + + device_id: string +} /** * @deprecated Use LocksConfigureAutoLockParameters instead. @@ -258,7 +263,10 @@ export type LocksConfigureAutoLockOptions = Pick< 'waitForActionAttempt' > -export type LocksGetParameters = RouteRequestBody<'/locks/get'> +export type LocksGetParameters = { + device_id?: string | undefined + name?: string | undefined +} /** * @deprecated Use LocksGetParameters instead. @@ -268,13 +276,172 @@ export type LocksGetParams = LocksGetParameters /** * @deprecated Use LocksGetRequest instead. */ -export type LocksGetResponse = RouteResponse<'/locks/get'> +export type LocksGetResponse = { device: DeviceResource } export type LocksGetRequest = SeamHttpRequest export interface LocksGetOptions {} -export type LocksListParameters = RouteRequestBody<'/locks/list'> +export type LocksListParameters = { + connect_webview_id?: string | undefined + connected_account_id?: string | undefined + connected_account_ids?: Array | undefined + created_before?: string | undefined + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + device_ids?: Array | undefined + device_type?: + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_lock' + | undefined + device_types?: + | Array< + | 'akuvox_lock' + | 'august_lock' + | 'brivo_access_point' + | 'butterflymx_panel' + | 'avigilon_alta_entry' + | 'doorking_lock' + | 'genie_door' + | 'igloo_lock' + | 'linear_lock' + | 'lockly_lock' + | 'kwikset_lock' + | 'nuki_lock' + | 'salto_lock' + | 'schlage_lock' + | 'smartthings_lock' + | 'wyze_lock' + | 'yale_lock' + | 'two_n_intercom' + | 'controlbyweb_device' + | 'ttlock_lock' + | 'igloohome_lock' + | 'four_suites_door' + | 'dormakaba_oracode_door' + | 'tedee_lock' + | 'akiles_lock' + | 'ultraloq_lock' + | 'keyincode_lock' + | 'omnitec_lock' + | 'kisi_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' + | 'august' + | 'brivo' + | 'butterflymx' + | 'avigilon_alta' + | 'doorking' + | 'genie' + | 'igloo' + | 'linear' + | 'lockly' + | 'kwikset' + | 'nuki' + | 'salto' + | 'schlage' + | 'seam' + | 'wyze' + | 'yale' + | 'two_n' + | 'controlbyweb' + | 'ttlock' + | 'igloohome' + | 'four_suites' + | 'dormakaba_oracode' + | 'tedee' + | 'keyincode' + | 'akiles' + | 'korelock' + | 'smartthings' + | 'ultraloq' + | 'omnitec' + | 'kisi' + | undefined + page_cursor?: string | undefined + search?: string | undefined + space_id?: string | undefined + unstable_location_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use LocksListParameters instead. @@ -284,13 +451,17 @@ export type LocksListParams = LocksListParameters /** * @deprecated Use LocksListRequest instead. */ -export type LocksListResponse = RouteResponse<'/locks/list'> +export type LocksListResponse = { devices: Array } export type LocksListRequest = SeamHttpRequest export interface LocksListOptions {} -export type LocksLockDoorParameters = RouteRequestBody<'/locks/lock_door'> +export type LocksLockDoorParameters = { + device_id: string + + sync?: boolean | undefined +} /** * @deprecated Use LocksLockDoorParameters instead. @@ -312,7 +483,11 @@ export type LocksLockDoorOptions = Pick< 'waitForActionAttempt' > -export type LocksUnlockDoorParameters = RouteRequestBody<'/locks/unlock_door'> +export type LocksUnlockDoorParameters = { + device_id: string + + sync?: boolean | undefined +} /** * @deprecated Use LocksUnlockDoorParameters instead. diff --git a/src/lib/seam/connect/routes/locks/simulate/simulate.ts b/src/lib/seam/connect/routes/locks/simulate/simulate.ts index e1bcabee..95a16948 100644 --- a/src/lib/seam/connect/routes/locks/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/locks/simulate/simulate.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 { @@ -189,8 +189,11 @@ export class SeamHttpLocksSimulate { } } -export type LocksSimulateKeypadCodeEntryParameters = - RouteRequestBody<'/locks/simulate/keypad_code_entry'> +export type LocksSimulateKeypadCodeEntryParameters = { + code: string + + device_id: string +} /** * @deprecated Use LocksSimulateKeypadCodeEntryParameters instead. @@ -214,8 +217,9 @@ export type LocksSimulateKeypadCodeEntryOptions = Pick< 'waitForActionAttempt' > -export type LocksSimulateManualLockViaKeypadParameters = - RouteRequestBody<'/locks/simulate/manual_lock_via_keypad'> +export type LocksSimulateManualLockViaKeypadParameters = { + device_id: string +} /** * @deprecated Use LocksSimulateManualLockViaKeypadParameters 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 f63a9ca0..db138728 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -190,7 +189,72 @@ export class SeamHttpNoiseSensors { } } -export type NoiseSensorsListParameters = RouteRequestBody<'/noise_sensors/list'> +export type NoiseSensorsListParameters = { + connect_webview_id?: string | undefined + connected_account_id?: string | undefined + connected_account_ids?: Array | undefined + created_before?: string | undefined + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + 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 + search?: string | undefined + space_id?: string | undefined + unstable_location_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use NoiseSensorsListParameters instead. @@ -200,7 +264,7 @@ export type NoiseSensorsListParams = NoiseSensorsListParameters /** * @deprecated Use NoiseSensorsListRequest instead. */ -export type NoiseSensorsListResponse = RouteResponse<'/noise_sensors/list'> +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 2bc796d4..feaf6eac 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 @@ -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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { NoiseThresholdResource } 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' @@ -231,8 +230,18 @@ export class SeamHttpNoiseSensorsNoiseThresholds { } } -export type NoiseSensorsNoiseThresholdsCreateParameters = - RouteRequestBody<'/noise_sensors/noise_thresholds/create'> +export type NoiseSensorsNoiseThresholdsCreateParameters = { + device_id: string + + ends_daily_at: string + + name?: string | undefined + noise_threshold_decibels?: number | undefined + noise_threshold_nrs?: number | undefined + starts_daily_at: string + + sync?: boolean | undefined +} /** * @deprecated Use NoiseSensorsNoiseThresholdsCreateParameters instead. @@ -243,8 +252,9 @@ export type NoiseSensorsNoiseThresholdsCreateBody = /** * @deprecated Use NoiseSensorsNoiseThresholdsCreateRequest instead. */ -export type NoiseSensorsNoiseThresholdsCreateResponse = - RouteResponse<'/noise_sensors/noise_thresholds/create'> +export type NoiseSensorsNoiseThresholdsCreateResponse = { + noise_threshold: NoiseThresholdResource +} export type NoiseSensorsNoiseThresholdsCreateRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsCreateResponse, @@ -253,8 +263,13 @@ export type NoiseSensorsNoiseThresholdsCreateRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsCreateOptions {} -export type NoiseSensorsNoiseThresholdsDeleteParameters = - RouteRequestBody<'/noise_sensors/noise_thresholds/delete'> +export type NoiseSensorsNoiseThresholdsDeleteParameters = { + device_id: string + + noise_threshold_id: string + + sync?: boolean | undefined +} /** * @deprecated Use NoiseSensorsNoiseThresholdsDeleteParameters instead. @@ -265,8 +280,7 @@ export type NoiseSensorsNoiseThresholdsDeleteParams = /** * @deprecated Use NoiseSensorsNoiseThresholdsDeleteRequest instead. */ -export type NoiseSensorsNoiseThresholdsDeleteResponse = - RouteResponse<'/noise_sensors/noise_thresholds/delete'> +export type NoiseSensorsNoiseThresholdsDeleteResponse = void export type NoiseSensorsNoiseThresholdsDeleteRequest = SeamHttpRequest< void, @@ -275,8 +289,9 @@ export type NoiseSensorsNoiseThresholdsDeleteRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsDeleteOptions {} -export type NoiseSensorsNoiseThresholdsGetParameters = - RouteRequestBody<'/noise_sensors/noise_thresholds/get'> +export type NoiseSensorsNoiseThresholdsGetParameters = { + noise_threshold_id: string +} /** * @deprecated Use NoiseSensorsNoiseThresholdsGetParameters instead. @@ -287,8 +302,9 @@ export type NoiseSensorsNoiseThresholdsGetParams = /** * @deprecated Use NoiseSensorsNoiseThresholdsGetRequest instead. */ -export type NoiseSensorsNoiseThresholdsGetResponse = - RouteResponse<'/noise_sensors/noise_thresholds/get'> +export type NoiseSensorsNoiseThresholdsGetResponse = { + noise_threshold: NoiseThresholdResource +} export type NoiseSensorsNoiseThresholdsGetRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsGetResponse, @@ -297,8 +313,11 @@ export type NoiseSensorsNoiseThresholdsGetRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsGetOptions {} -export type NoiseSensorsNoiseThresholdsListParameters = - RouteRequestBody<'/noise_sensors/noise_thresholds/list'> +export type NoiseSensorsNoiseThresholdsListParameters = { + device_id: string + + is_programmed?: boolean | undefined +} /** * @deprecated Use NoiseSensorsNoiseThresholdsListParameters instead. @@ -309,8 +328,9 @@ export type NoiseSensorsNoiseThresholdsListParams = /** * @deprecated Use NoiseSensorsNoiseThresholdsListRequest instead. */ -export type NoiseSensorsNoiseThresholdsListResponse = - RouteResponse<'/noise_sensors/noise_thresholds/list'> +export type NoiseSensorsNoiseThresholdsListResponse = { + noise_thresholds: Array +} export type NoiseSensorsNoiseThresholdsListRequest = SeamHttpRequest< NoiseSensorsNoiseThresholdsListResponse, @@ -319,8 +339,18 @@ export type NoiseSensorsNoiseThresholdsListRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsListOptions {} -export type NoiseSensorsNoiseThresholdsUpdateParameters = - RouteRequestBody<'/noise_sensors/noise_thresholds/update'> +export type NoiseSensorsNoiseThresholdsUpdateParameters = { + device_id: string + + ends_daily_at?: string | undefined + name?: string | undefined + noise_threshold_decibels?: number | undefined + noise_threshold_id: string + + noise_threshold_nrs?: number | undefined + starts_daily_at?: string | undefined + sync?: boolean | undefined +} /** * @deprecated Use NoiseSensorsNoiseThresholdsUpdateParameters instead. @@ -331,8 +361,7 @@ export type NoiseSensorsNoiseThresholdsUpdateBody = /** * @deprecated Use NoiseSensorsNoiseThresholdsUpdateRequest instead. */ -export type NoiseSensorsNoiseThresholdsUpdateResponse = - RouteResponse<'/noise_sensors/noise_thresholds/update'> +export type NoiseSensorsNoiseThresholdsUpdateResponse = void export type NoiseSensorsNoiseThresholdsUpdateRequest = SeamHttpRequest< void, 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 4155015f..c4af1933 100644 --- a/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.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, @@ -176,8 +174,9 @@ export class SeamHttpNoiseSensorsSimulate { } } -export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = - RouteRequestBody<'/noise_sensors/simulate/trigger_noise_threshold'> +export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { + device_id: string +} /** * @deprecated Use NoiseSensorsSimulateTriggerNoiseThresholdParameters instead. @@ -188,8 +187,7 @@ export type NoiseSensorsSimulateTriggerNoiseThresholdBody = /** * @deprecated Use NoiseSensorsSimulateTriggerNoiseThresholdRequest instead. */ -export type NoiseSensorsSimulateTriggerNoiseThresholdResponse = - RouteResponse<'/noise_sensors/simulate/trigger_noise_threshold'> +export type NoiseSensorsSimulateTriggerNoiseThresholdResponse = void export type NoiseSensorsSimulateTriggerNoiseThresholdRequest = SeamHttpRequest< void, diff --git a/src/lib/seam/connect/routes/phones/phones.ts b/src/lib/seam/connect/routes/phones/phones.ts index 86289436..5ed19115 100644 --- a/src/lib/seam/connect/routes/phones/phones.ts +++ b/src/lib/seam/connect/routes/phones/phones.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { PhoneResource } 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' @@ -208,7 +207,9 @@ export class SeamHttpPhones { } } -export type PhonesDeactivateParameters = RouteRequestBody<'/phones/deactivate'> +export type PhonesDeactivateParameters = { + device_id: string +} /** * @deprecated Use PhonesDeactivateParameters instead. @@ -218,13 +219,15 @@ export type PhonesDeactivateParams = PhonesDeactivateParameters /** * @deprecated Use PhonesDeactivateRequest instead. */ -export type PhonesDeactivateResponse = RouteResponse<'/phones/deactivate'> +export type PhonesDeactivateResponse = void export type PhonesDeactivateRequest = SeamHttpRequest export interface PhonesDeactivateOptions {} -export type PhonesGetParameters = RouteRequestBody<'/phones/get'> +export type PhonesGetParameters = { + device_id: string +} /** * @deprecated Use PhonesGetParameters instead. @@ -234,13 +237,16 @@ export type PhonesGetParams = PhonesGetParameters /** * @deprecated Use PhonesGetRequest instead. */ -export type PhonesGetResponse = RouteResponse<'/phones/get'> +export type PhonesGetResponse = { phone: PhoneResource } export type PhonesGetRequest = SeamHttpRequest export interface PhonesGetOptions {} -export type PhonesListParameters = RouteRequestBody<'/phones/list'> +export type PhonesListParameters = { + acs_credential_id?: string | undefined + owner_user_identity_id?: string | undefined +} /** * @deprecated Use PhonesListParameters instead. @@ -250,7 +256,7 @@ export type PhonesListParams = PhonesListParameters /** * @deprecated Use PhonesListRequest instead. */ -export type PhonesListResponse = RouteResponse<'/phones/list'> +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 e3405900..37d4c38b 100644 --- a/src/lib/seam/connect/routes/phones/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/phones/simulate/simulate.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { PhoneResource } 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' @@ -176,8 +175,28 @@ export class SeamHttpPhonesSimulate { } } -export type PhonesSimulateCreateSandboxPhoneParameters = - RouteRequestBody<'/phones/simulate/create_sandbox_phone'> +export type PhonesSimulateCreateSandboxPhoneParameters = { + assa_abloy_metadata?: + | { + application_version?: string | undefined + ble_capability?: boolean | undefined + hce_capability?: boolean | undefined + nfc_capability?: boolean | undefined + seos_applet_version?: string | undefined + seos_tsm_endpoint_id?: number | undefined + } + | undefined + custom_sdk_installation_id?: string | undefined + phone_metadata?: + | { + device_manufacturer?: string | undefined + device_model?: string | undefined + operating_system?: 'android' | 'ios' | undefined + os_version?: string | undefined + } + | undefined + user_identity_id: string +} /** * @deprecated Use PhonesSimulateCreateSandboxPhoneParameters instead. @@ -188,8 +207,7 @@ export type PhonesSimulateCreateSandboxPhoneBody = /** * @deprecated Use PhonesSimulateCreateSandboxPhoneRequest instead. */ -export type PhonesSimulateCreateSandboxPhoneResponse = - RouteResponse<'/phones/simulate/create_sandbox_phone'> +export type PhonesSimulateCreateSandboxPhoneResponse = { phone: PhoneResource } 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 e0b7d612..90da18d9 100644 --- a/src/lib/seam/connect/routes/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/spaces/spaces.ts @@ -3,12 +3,6 @@ * 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, @@ -35,6 +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 { 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' @@ -323,8 +319,11 @@ export class SeamHttpSpaces { } } -export type SpacesAddAcsEntrancesParameters = - RouteRequestBody<'/spaces/add_acs_entrances'> +export type SpacesAddAcsEntrancesParameters = { + acs_entrance_ids: Array + + space_id: string +} /** * @deprecated Use SpacesAddAcsEntrancesParameters instead. @@ -334,15 +333,17 @@ export type SpacesAddAcsEntrancesBody = SpacesAddAcsEntrancesParameters /** * @deprecated Use SpacesAddAcsEntrancesRequest instead. */ -export type SpacesAddAcsEntrancesResponse = - RouteResponse<'/spaces/add_acs_entrances'> +export type SpacesAddAcsEntrancesResponse = void export type SpacesAddAcsEntrancesRequest = SeamHttpRequest export interface SpacesAddAcsEntrancesOptions {} -export type SpacesAddConnectedAccountParameters = - RouteRequestBody<'/spaces/add_connected_account'> +export type SpacesAddConnectedAccountParameters = { + connected_account_id: string + + space_id: string +} /** * @deprecated Use SpacesAddConnectedAccountParameters instead. @@ -352,14 +353,17 @@ export type SpacesAddConnectedAccountBody = SpacesAddConnectedAccountParameters /** * @deprecated Use SpacesAddConnectedAccountRequest instead. */ -export type SpacesAddConnectedAccountResponse = - RouteResponse<'/spaces/add_connected_account'> +export type SpacesAddConnectedAccountResponse = void export type SpacesAddConnectedAccountRequest = SeamHttpRequest export interface SpacesAddConnectedAccountOptions {} -export type SpacesAddDevicesParameters = RouteRequestBody<'/spaces/add_devices'> +export type SpacesAddDevicesParameters = { + device_ids: Array + + space_id: string +} /** * @deprecated Use SpacesAddDevicesParameters instead. @@ -369,13 +373,29 @@ export type SpacesAddDevicesBody = SpacesAddDevicesParameters /** * @deprecated Use SpacesAddDevicesRequest instead. */ -export type SpacesAddDevicesResponse = RouteResponse<'/spaces/add_devices'> +export type SpacesAddDevicesResponse = void export type SpacesAddDevicesRequest = SeamHttpRequest export interface SpacesAddDevicesOptions {} -export type SpacesCreateParameters = RouteRequestBody<'/spaces/create'> +export type SpacesCreateParameters = { + acs_entrance_ids?: Array | undefined + connected_account_ids?: Array | undefined + customer_data?: + | { + address?: string | undefined + default_checkin_time?: string | undefined + default_checkout_time?: string | undefined + time_zone?: string | undefined + } + | undefined + customer_key?: string | undefined + device_ids?: Array | undefined + name: string + + space_key?: string | undefined +} /** * @deprecated Use SpacesCreateParameters instead. @@ -385,13 +405,15 @@ export type SpacesCreateBody = SpacesCreateParameters /** * @deprecated Use SpacesCreateRequest instead. */ -export type SpacesCreateResponse = RouteResponse<'/spaces/create'> +export type SpacesCreateResponse = { space: SpaceResource } export type SpacesCreateRequest = SeamHttpRequest export interface SpacesCreateOptions {} -export type SpacesDeleteParameters = RouteRequestBody<'/spaces/delete'> +export type SpacesDeleteParameters = { + space_id: string +} /** * @deprecated Use SpacesDeleteParameters instead. @@ -401,13 +423,16 @@ export type SpacesDeleteParams = SpacesDeleteParameters /** * @deprecated Use SpacesDeleteRequest instead. */ -export type SpacesDeleteResponse = RouteResponse<'/spaces/delete'> +export type SpacesDeleteResponse = void export type SpacesDeleteRequest = SeamHttpRequest export interface SpacesDeleteOptions {} -export type SpacesGetParameters = RouteRequestParams<'/spaces/get'> +export type SpacesGetParameters = { + space_id?: string | undefined + space_key?: string | undefined +} /** * @deprecated Use SpacesGetParameters instead. @@ -417,13 +442,36 @@ export type SpacesGetParams = SpacesGetParameters /** * @deprecated Use SpacesGetRequest instead. */ -export type SpacesGetResponse = RouteResponse<'/spaces/get'> +export type SpacesGetResponse = { space: SpaceResource } export type SpacesGetRequest = SeamHttpRequest export interface SpacesGetOptions {} -export type SpacesGetRelatedParameters = RouteRequestBody<'/spaces/get_related'> +export type SpacesGetRelatedParameters = { + exclude?: + | Array< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'connected_accounts' + | 'acs_systems' + | 'access_methods' + > + | undefined + include?: + | Array< + | 'spaces' + | 'devices' + | 'acs_entrances' + | 'connected_accounts' + | 'acs_systems' + | 'access_methods' + > + | undefined + space_ids?: Array | undefined + space_keys?: Array | undefined +} /** * @deprecated Use SpacesGetRelatedParameters instead. @@ -433,7 +481,7 @@ export type SpacesGetRelatedParams = SpacesGetRelatedParameters /** * @deprecated Use SpacesGetRelatedRequest instead. */ -export type SpacesGetRelatedResponse = RouteResponse<'/spaces/get_related'> +export type SpacesGetRelatedResponse = { batch: UnknownResource } export type SpacesGetRelatedRequest = SeamHttpRequest< SpacesGetRelatedResponse, @@ -442,7 +490,16 @@ export type SpacesGetRelatedRequest = SeamHttpRequest< export interface SpacesGetRelatedOptions {} -export type SpacesListParameters = RouteRequestBody<'/spaces/list'> +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 +} /** * @deprecated Use SpacesListParameters instead. @@ -452,14 +509,17 @@ export type SpacesListParams = SpacesListParameters /** * @deprecated Use SpacesListRequest instead. */ -export type SpacesListResponse = RouteResponse<'/spaces/list'> +export type SpacesListResponse = { spaces: Array } export type SpacesListRequest = SeamHttpRequest export interface SpacesListOptions {} -export type SpacesRemoveAcsEntrancesParameters = - RouteRequestBody<'/spaces/remove_acs_entrances'> +export type SpacesRemoveAcsEntrancesParameters = { + acs_entrance_ids: Array + + space_id: string +} /** * @deprecated Use SpacesRemoveAcsEntrancesParameters instead. @@ -469,15 +529,17 @@ export type SpacesRemoveAcsEntrancesParams = SpacesRemoveAcsEntrancesParameters /** * @deprecated Use SpacesRemoveAcsEntrancesRequest instead. */ -export type SpacesRemoveAcsEntrancesResponse = - RouteResponse<'/spaces/remove_acs_entrances'> +export type SpacesRemoveAcsEntrancesResponse = void export type SpacesRemoveAcsEntrancesRequest = SeamHttpRequest export interface SpacesRemoveAcsEntrancesOptions {} -export type SpacesRemoveConnectedAccountParameters = - RouteRequestBody<'/spaces/remove_connected_account'> +export type SpacesRemoveConnectedAccountParameters = { + connected_account_id: string + + space_id: string +} /** * @deprecated Use SpacesRemoveConnectedAccountParameters instead. @@ -488,8 +550,7 @@ export type SpacesRemoveConnectedAccountParams = /** * @deprecated Use SpacesRemoveConnectedAccountRequest instead. */ -export type SpacesRemoveConnectedAccountResponse = - RouteResponse<'/spaces/remove_connected_account'> +export type SpacesRemoveConnectedAccountResponse = void export type SpacesRemoveConnectedAccountRequest = SeamHttpRequest< void, @@ -498,8 +559,11 @@ export type SpacesRemoveConnectedAccountRequest = SeamHttpRequest< export interface SpacesRemoveConnectedAccountOptions {} -export type SpacesRemoveDevicesParameters = - RouteRequestBody<'/spaces/remove_devices'> +export type SpacesRemoveDevicesParameters = { + device_ids: Array + + space_id: string +} /** * @deprecated Use SpacesRemoveDevicesParameters instead. @@ -509,14 +573,29 @@ export type SpacesRemoveDevicesParams = SpacesRemoveDevicesParameters /** * @deprecated Use SpacesRemoveDevicesRequest instead. */ -export type SpacesRemoveDevicesResponse = - RouteResponse<'/spaces/remove_devices'> +export type SpacesRemoveDevicesResponse = void export type SpacesRemoveDevicesRequest = SeamHttpRequest export interface SpacesRemoveDevicesOptions {} -export type SpacesUpdateParameters = RouteRequestBody<'/spaces/update'> +export type SpacesUpdateParameters = { + acs_entrance_ids?: Array | undefined + customer_data?: + | { + address?: string | undefined + default_checkin_time?: string | undefined + default_checkout_time?: string | undefined + time_zone?: string | undefined + } + | 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 +} /** * @deprecated Use SpacesUpdateParameters instead. @@ -526,7 +605,7 @@ export type SpacesUpdateBody = SpacesUpdateParameters /** * @deprecated Use SpacesUpdateRequest instead. */ -export type SpacesUpdateResponse = RouteResponse<'/spaces/update'> +export type SpacesUpdateResponse = { space: SpaceResource } 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 ddf2441e..2ee6048e 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,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 { @@ -31,6 +31,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -205,8 +206,16 @@ export class SeamHttpThermostatsDailyPrograms { } } -export type ThermostatsDailyProgramsCreateParameters = - RouteRequestBody<'/thermostats/daily_programs/create'> +export type ThermostatsDailyProgramsCreateParameters = { + device_id: string + + name: string + + periods: Array<{ + climate_preset_key?: string | undefined + starts_at_time?: string | undefined + }> +} /** * @deprecated Use ThermostatsDailyProgramsCreateParameters instead. @@ -217,8 +226,9 @@ export type ThermostatsDailyProgramsCreateBody = /** * @deprecated Use ThermostatsDailyProgramsCreateRequest instead. */ -export type ThermostatsDailyProgramsCreateResponse = - RouteResponse<'/thermostats/daily_programs/create'> +export type ThermostatsDailyProgramsCreateResponse = { + thermostat_daily_program: ThermostatDailyProgramResource +} export type ThermostatsDailyProgramsCreateRequest = SeamHttpRequest< ThermostatsDailyProgramsCreateResponse, @@ -227,8 +237,9 @@ export type ThermostatsDailyProgramsCreateRequest = SeamHttpRequest< export interface ThermostatsDailyProgramsCreateOptions {} -export type ThermostatsDailyProgramsDeleteParameters = - RouteRequestBody<'/thermostats/daily_programs/delete'> +export type ThermostatsDailyProgramsDeleteParameters = { + thermostat_daily_program_id: string +} /** * @deprecated Use ThermostatsDailyProgramsDeleteParameters instead. @@ -239,8 +250,7 @@ export type ThermostatsDailyProgramsDeleteParams = /** * @deprecated Use ThermostatsDailyProgramsDeleteRequest instead. */ -export type ThermostatsDailyProgramsDeleteResponse = - RouteResponse<'/thermostats/daily_programs/delete'> +export type ThermostatsDailyProgramsDeleteResponse = void export type ThermostatsDailyProgramsDeleteRequest = SeamHttpRequest< void, @@ -249,8 +259,16 @@ export type ThermostatsDailyProgramsDeleteRequest = SeamHttpRequest< export interface ThermostatsDailyProgramsDeleteOptions {} -export type ThermostatsDailyProgramsUpdateParameters = - RouteRequestBody<'/thermostats/daily_programs/update'> +export type ThermostatsDailyProgramsUpdateParameters = { + name: string + + periods: Array<{ + climate_preset_key?: string | undefined + starts_at_time?: string | undefined + }> + + thermostat_daily_program_id: string +} /** * @deprecated Use ThermostatsDailyProgramsUpdateParameters instead. diff --git a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts index 1e325a59..b331a29d 100644 --- a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts +++ b/src/lib/seam/connect/routes/thermostats/schedules/schedules.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { ThermostatScheduleResource } 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' @@ -228,8 +227,18 @@ export class SeamHttpThermostatsSchedules { } } -export type ThermostatsSchedulesCreateParameters = - RouteRequestBody<'/thermostats/schedules/create'> +export type ThermostatsSchedulesCreateParameters = { + climate_preset_key: string + + device_id: string + + ends_at: string + + is_override_allowed?: boolean | undefined + max_override_period_minutes?: number | undefined + name?: string | undefined + starts_at: string +} /** * @deprecated Use ThermostatsSchedulesCreateParameters instead. @@ -240,8 +249,9 @@ export type ThermostatsSchedulesCreateBody = /** * @deprecated Use ThermostatsSchedulesCreateRequest instead. */ -export type ThermostatsSchedulesCreateResponse = - RouteResponse<'/thermostats/schedules/create'> +export type ThermostatsSchedulesCreateResponse = { + thermostat_schedule: ThermostatScheduleResource +} export type ThermostatsSchedulesCreateRequest = SeamHttpRequest< ThermostatsSchedulesCreateResponse, @@ -250,8 +260,9 @@ export type ThermostatsSchedulesCreateRequest = SeamHttpRequest< export interface ThermostatsSchedulesCreateOptions {} -export type ThermostatsSchedulesDeleteParameters = - RouteRequestBody<'/thermostats/schedules/delete'> +export type ThermostatsSchedulesDeleteParameters = { + thermostat_schedule_id: string +} /** * @deprecated Use ThermostatsSchedulesDeleteParameters instead. @@ -262,15 +273,15 @@ export type ThermostatsSchedulesDeleteParams = /** * @deprecated Use ThermostatsSchedulesDeleteRequest instead. */ -export type ThermostatsSchedulesDeleteResponse = - RouteResponse<'/thermostats/schedules/delete'> +export type ThermostatsSchedulesDeleteResponse = void export type ThermostatsSchedulesDeleteRequest = SeamHttpRequest export interface ThermostatsSchedulesDeleteOptions {} -export type ThermostatsSchedulesGetParameters = - RouteRequestBody<'/thermostats/schedules/get'> +export type ThermostatsSchedulesGetParameters = { + thermostat_schedule_id: string +} /** * @deprecated Use ThermostatsSchedulesGetParameters instead. @@ -280,8 +291,9 @@ export type ThermostatsSchedulesGetParams = ThermostatsSchedulesGetParameters /** * @deprecated Use ThermostatsSchedulesGetRequest instead. */ -export type ThermostatsSchedulesGetResponse = - RouteResponse<'/thermostats/schedules/get'> +export type ThermostatsSchedulesGetResponse = { + thermostat_schedule: ThermostatScheduleResource +} export type ThermostatsSchedulesGetRequest = SeamHttpRequest< ThermostatsSchedulesGetResponse, @@ -290,8 +302,11 @@ export type ThermostatsSchedulesGetRequest = SeamHttpRequest< export interface ThermostatsSchedulesGetOptions {} -export type ThermostatsSchedulesListParameters = - RouteRequestBody<'/thermostats/schedules/list'> +export type ThermostatsSchedulesListParameters = { + device_id: string + + user_identifier_key?: string | undefined +} /** * @deprecated Use ThermostatsSchedulesListParameters instead. @@ -301,8 +316,9 @@ export type ThermostatsSchedulesListParams = ThermostatsSchedulesListParameters /** * @deprecated Use ThermostatsSchedulesListRequest instead. */ -export type ThermostatsSchedulesListResponse = - RouteResponse<'/thermostats/schedules/list'> +export type ThermostatsSchedulesListResponse = { + thermostat_schedules: Array +} export type ThermostatsSchedulesListRequest = SeamHttpRequest< ThermostatsSchedulesListResponse, @@ -311,8 +327,15 @@ export type ThermostatsSchedulesListRequest = SeamHttpRequest< export interface ThermostatsSchedulesListOptions {} -export type ThermostatsSchedulesUpdateParameters = - RouteRequestBody<'/thermostats/schedules/update'> +export type ThermostatsSchedulesUpdateParameters = { + climate_preset_key?: string | undefined + ends_at?: string | undefined + is_override_allowed?: boolean | undefined + max_override_period_minutes?: number | undefined + name?: string | undefined + starts_at?: string | undefined + thermostat_schedule_id: string +} /** * @deprecated Use ThermostatsSchedulesUpdateParameters instead. @@ -323,8 +346,7 @@ export type ThermostatsSchedulesUpdateBody = /** * @deprecated Use ThermostatsSchedulesUpdateRequest instead. */ -export type ThermostatsSchedulesUpdateResponse = - RouteResponse<'/thermostats/schedules/update'> +export type ThermostatsSchedulesUpdateResponse = void export type ThermostatsSchedulesUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts b/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts index 240bf4bf..08c6c5a6 100644 --- a/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/thermostats/simulate/simulate.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, @@ -189,8 +187,16 @@ export class SeamHttpThermostatsSimulate { } } -export type ThermostatsSimulateHvacModeAdjustedParameters = - RouteRequestBody<'/thermostats/simulate/hvac_mode_adjusted'> +export type ThermostatsSimulateHvacModeAdjustedParameters = { + device_id: string + + hvac_mode: 'off' | 'cool' | 'heat' | 'heat_cool' + + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined +} /** * @deprecated Use ThermostatsSimulateHvacModeAdjustedParameters instead. @@ -201,8 +207,7 @@ export type ThermostatsSimulateHvacModeAdjustedBody = /** * @deprecated Use ThermostatsSimulateHvacModeAdjustedRequest instead. */ -export type ThermostatsSimulateHvacModeAdjustedResponse = - RouteResponse<'/thermostats/simulate/hvac_mode_adjusted'> +export type ThermostatsSimulateHvacModeAdjustedResponse = void export type ThermostatsSimulateHvacModeAdjustedRequest = SeamHttpRequest< void, @@ -211,8 +216,12 @@ export type ThermostatsSimulateHvacModeAdjustedRequest = SeamHttpRequest< export interface ThermostatsSimulateHvacModeAdjustedOptions {} -export type ThermostatsSimulateTemperatureReachedParameters = - RouteRequestBody<'/thermostats/simulate/temperature_reached'> +export type ThermostatsSimulateTemperatureReachedParameters = { + device_id: string + + temperature_celsius?: number | undefined + temperature_fahrenheit?: number | undefined +} /** * @deprecated Use ThermostatsSimulateTemperatureReachedParameters instead. @@ -223,8 +232,7 @@ export type ThermostatsSimulateTemperatureReachedBody = /** * @deprecated Use ThermostatsSimulateTemperatureReachedRequest instead. */ -export type ThermostatsSimulateTemperatureReachedResponse = - RouteResponse<'/thermostats/simulate/temperature_reached'> +export type ThermostatsSimulateTemperatureReachedResponse = void export type ThermostatsSimulateTemperatureReachedRequest = SeamHttpRequest< void, diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index 48bb48bf..c679960c 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -31,6 +31,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -382,8 +383,11 @@ export class SeamHttpThermostats { } } -export type ThermostatsActivateClimatePresetParameters = - RouteRequestBody<'/thermostats/activate_climate_preset'> +export type ThermostatsActivateClimatePresetParameters = { + climate_preset_key: string + + device_id: string +} /** * @deprecated Use ThermostatsActivateClimatePresetParameters instead. @@ -407,7 +411,13 @@ export type ThermostatsActivateClimatePresetOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsCoolParameters = RouteRequestBody<'/thermostats/cool'> +export type ThermostatsCoolParameters = { + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + device_id: string + + sync?: boolean | undefined +} /** * @deprecated Use ThermostatsCoolParameters instead. @@ -429,8 +439,35 @@ export type ThermostatsCoolOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsCreateClimatePresetParameters = - RouteRequestBody<'/thermostats/create_climate_preset'> +export type ThermostatsCreateClimatePresetParameters = { + climate_preset_key: string + + climate_preset_mode?: + | 'home' + | 'away' + | 'wake' + | 'sleep' + | 'occupied' + | 'unoccupied' + | undefined + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + device_id: string + + ecobee_metadata?: + | { + climate_ref?: string | undefined + is_optimized?: boolean | undefined + owner?: 'user' | 'system' | undefined + } + | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + manual_override_allowed?: boolean | undefined + name?: string | undefined +} /** * @deprecated Use ThermostatsCreateClimatePresetParameters instead. @@ -441,8 +478,7 @@ export type ThermostatsCreateClimatePresetBody = /** * @deprecated Use ThermostatsCreateClimatePresetRequest instead. */ -export type ThermostatsCreateClimatePresetResponse = - RouteResponse<'/thermostats/create_climate_preset'> +export type ThermostatsCreateClimatePresetResponse = void export type ThermostatsCreateClimatePresetRequest = SeamHttpRequest< void, @@ -451,8 +487,11 @@ export type ThermostatsCreateClimatePresetRequest = SeamHttpRequest< export interface ThermostatsCreateClimatePresetOptions {} -export type ThermostatsDeleteClimatePresetParameters = - RouteRequestBody<'/thermostats/delete_climate_preset'> +export type ThermostatsDeleteClimatePresetParameters = { + climate_preset_key: string + + device_id: string +} /** * @deprecated Use ThermostatsDeleteClimatePresetParameters instead. @@ -463,8 +502,7 @@ export type ThermostatsDeleteClimatePresetParams = /** * @deprecated Use ThermostatsDeleteClimatePresetRequest instead. */ -export type ThermostatsDeleteClimatePresetResponse = - RouteResponse<'/thermostats/delete_climate_preset'> +export type ThermostatsDeleteClimatePresetResponse = void export type ThermostatsDeleteClimatePresetRequest = SeamHttpRequest< void, @@ -492,7 +530,13 @@ export type ThermostatsGetRequest = SeamHttpRequest< export interface ThermostatsGetOptions {} -export type ThermostatsHeatParameters = RouteRequestBody<'/thermostats/heat'> +export type ThermostatsHeatParameters = { + device_id: string + + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + sync?: boolean | undefined +} /** * @deprecated Use ThermostatsHeatParameters instead. @@ -514,8 +558,15 @@ export type ThermostatsHeatOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsHeatCoolParameters = - RouteRequestBody<'/thermostats/heat_cool'> +export type ThermostatsHeatCoolParameters = { + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + device_id: string + + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + sync?: boolean | undefined +} /** * @deprecated Use ThermostatsHeatCoolParameters instead. @@ -538,7 +589,95 @@ export type ThermostatsHeatCoolOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsListParameters = RouteRequestBody<'/thermostats/list'> +export type ThermostatsListParameters = { + connect_webview_id?: string | undefined + connected_account_id?: string | undefined + connected_account_ids?: Array | undefined + created_before?: string | undefined + custom_metadata_has?: Record | undefined + customer_key?: string | undefined + device_ids?: Array | undefined + device_type?: + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | 'smartthings_thermostat' + | undefined + device_types?: + | Array< + | 'ecobee_thermostat' + | 'nest_thermostat' + | 'honeywell_resideo_thermostat' + | 'tado_thermostat' + | 'sensi_thermostat' + | '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' + | 'honeywell_resideo' + | 'nest' + | 'sensi' + | 'smartthings' + | 'tado' + | undefined + page_cursor?: string | undefined + search?: string | undefined + space_id?: string | undefined + unstable_location_id?: string | undefined + user_identifier_key?: string | undefined +} /** * @deprecated Use ThermostatsListParameters instead. @@ -548,7 +687,7 @@ export type ThermostatsListParams = ThermostatsListParameters /** * @deprecated Use ThermostatsListRequest instead. */ -export type ThermostatsListResponse = RouteResponse<'/thermostats/list'> +export type ThermostatsListResponse = { devices: Array } export type ThermostatsListRequest = SeamHttpRequest< ThermostatsListResponse, @@ -557,7 +696,11 @@ export type ThermostatsListRequest = SeamHttpRequest< export interface ThermostatsListOptions {} -export type ThermostatsOffParameters = RouteRequestBody<'/thermostats/off'> +export type ThermostatsOffParameters = { + device_id: string + + sync?: boolean | undefined +} /** * @deprecated Use ThermostatsOffParameters instead. @@ -579,8 +722,11 @@ export type ThermostatsOffOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsSetFallbackClimatePresetParameters = - RouteRequestBody<'/thermostats/set_fallback_climate_preset'> +export type ThermostatsSetFallbackClimatePresetParameters = { + climate_preset_key: string + + device_id: string +} /** * @deprecated Use ThermostatsSetFallbackClimatePresetParameters instead. @@ -591,8 +737,7 @@ export type ThermostatsSetFallbackClimatePresetBody = /** * @deprecated Use ThermostatsSetFallbackClimatePresetRequest instead. */ -export type ThermostatsSetFallbackClimatePresetResponse = - RouteResponse<'/thermostats/set_fallback_climate_preset'> +export type ThermostatsSetFallbackClimatePresetResponse = void export type ThermostatsSetFallbackClimatePresetRequest = SeamHttpRequest< void, @@ -601,8 +746,13 @@ export type ThermostatsSetFallbackClimatePresetRequest = SeamHttpRequest< export interface ThermostatsSetFallbackClimatePresetOptions {} -export type ThermostatsSetFanModeParameters = - RouteRequestBody<'/thermostats/set_fan_mode'> +export type ThermostatsSetFanModeParameters = { + device_id: string + + fan_mode?: 'auto' | 'on' | 'circulate' | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + sync?: boolean | undefined +} /** * @deprecated Use ThermostatsSetFanModeParameters instead. @@ -625,8 +775,16 @@ export type ThermostatsSetFanModeOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsSetHvacModeParameters = - RouteRequestBody<'/thermostats/set_hvac_mode'> +export type ThermostatsSetHvacModeParameters = { + device_id: string + + hvac_mode_setting: 'off' | 'cool' | 'heat' | 'heat_cool' | 'eco' + + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined +} /** * @deprecated Use ThermostatsSetHvacModeParameters instead. @@ -649,8 +807,14 @@ export type ThermostatsSetHvacModeOptions = Pick< 'waitForActionAttempt' > -export type ThermostatsSetTemperatureThresholdParameters = - RouteRequestBody<'/thermostats/set_temperature_threshold'> +export type ThermostatsSetTemperatureThresholdParameters = { + device_id: string + + lower_limit_celsius?: number | undefined + lower_limit_fahrenheit?: number | undefined + upper_limit_celsius?: number | undefined + upper_limit_fahrenheit?: number | undefined +} /** * @deprecated Use ThermostatsSetTemperatureThresholdParameters instead. @@ -661,8 +825,7 @@ export type ThermostatsSetTemperatureThresholdBody = /** * @deprecated Use ThermostatsSetTemperatureThresholdRequest instead. */ -export type ThermostatsSetTemperatureThresholdResponse = - RouteResponse<'/thermostats/set_temperature_threshold'> +export type ThermostatsSetTemperatureThresholdResponse = void export type ThermostatsSetTemperatureThresholdRequest = SeamHttpRequest< void, @@ -671,8 +834,35 @@ export type ThermostatsSetTemperatureThresholdRequest = SeamHttpRequest< export interface ThermostatsSetTemperatureThresholdOptions {} -export type ThermostatsUpdateClimatePresetParameters = - RouteRequestBody<'/thermostats/update_climate_preset'> +export type ThermostatsUpdateClimatePresetParameters = { + climate_preset_key: string + + climate_preset_mode?: + | 'home' + | 'away' + | 'wake' + | 'sleep' + | 'occupied' + | 'unoccupied' + | undefined + cooling_set_point_celsius?: number | undefined + cooling_set_point_fahrenheit?: number | undefined + device_id: string + + ecobee_metadata?: + | { + climate_ref?: string | undefined + is_optimized?: boolean | undefined + owner?: 'user' | 'system' | undefined + } + | undefined + fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + heating_set_point_celsius?: number | undefined + heating_set_point_fahrenheit?: number | undefined + hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + manual_override_allowed?: boolean | undefined + name?: string | undefined +} /** * @deprecated Use ThermostatsUpdateClimatePresetParameters instead. @@ -683,8 +873,7 @@ export type ThermostatsUpdateClimatePresetBody = /** * @deprecated Use ThermostatsUpdateClimatePresetRequest instead. */ -export type ThermostatsUpdateClimatePresetResponse = - RouteResponse<'/thermostats/update_climate_preset'> +export type ThermostatsUpdateClimatePresetResponse = void export type ThermostatsUpdateClimatePresetRequest = SeamHttpRequest< void, @@ -693,8 +882,17 @@ export type ThermostatsUpdateClimatePresetRequest = SeamHttpRequest< export interface ThermostatsUpdateClimatePresetOptions {} -export type ThermostatsUpdateWeeklyProgramParameters = - RouteRequestBody<'/thermostats/update_weekly_program'> +export type ThermostatsUpdateWeeklyProgramParameters = { + device_id: string + + friday_program_id?: string | undefined + monday_program_id?: string | undefined + saturday_program_id?: string | undefined + sunday_program_id?: string | undefined + thursday_program_id?: string | undefined + tuesday_program_id?: string | undefined + wednesday_program_id?: string | undefined +} /** * @deprecated Use ThermostatsUpdateWeeklyProgramParameters 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 d6d23fa7..307cb064 100644 --- a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.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, @@ -31,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -205,8 +204,9 @@ export class SeamHttpUserIdentitiesUnmanaged { } } -export type UserIdentitiesUnmanagedGetParameters = - RouteRequestBody<'/user_identities/unmanaged/get'> +export type UserIdentitiesUnmanagedGetParameters = { + user_identity_id: string +} /** * @deprecated Use UserIdentitiesUnmanagedGetParameters instead. @@ -217,8 +217,9 @@ export type UserIdentitiesUnmanagedGetParams = /** * @deprecated Use UserIdentitiesUnmanagedGetRequest instead. */ -export type UserIdentitiesUnmanagedGetResponse = - RouteResponse<'/user_identities/unmanaged/get'> +export type UserIdentitiesUnmanagedGetResponse = { + user_identity: UnknownResource +} export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< UserIdentitiesUnmanagedGetResponse, @@ -227,8 +228,12 @@ export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< export interface UserIdentitiesUnmanagedGetOptions {} -export type UserIdentitiesUnmanagedListParameters = - RouteRequestBody<'/user_identities/unmanaged/list'> +export type UserIdentitiesUnmanagedListParameters = { + created_before?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined +} /** * @deprecated Use UserIdentitiesUnmanagedListParameters instead. @@ -239,8 +244,9 @@ export type UserIdentitiesUnmanagedListParams = /** * @deprecated Use UserIdentitiesUnmanagedListRequest instead. */ -export type UserIdentitiesUnmanagedListResponse = - RouteResponse<'/user_identities/unmanaged/list'> +export type UserIdentitiesUnmanagedListResponse = { + user_identities: Array +} export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< UserIdentitiesUnmanagedListResponse, @@ -249,8 +255,13 @@ export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< export interface UserIdentitiesUnmanagedListOptions {} -export type UserIdentitiesUnmanagedUpdateParameters = - RouteRequestBody<'/user_identities/unmanaged/update'> +export type UserIdentitiesUnmanagedUpdateParameters = { + is_managed: boolean + + user_identity_id: string + + user_identity_key?: string | undefined +} /** * @deprecated Use UserIdentitiesUnmanagedUpdateParameters instead. @@ -261,8 +272,7 @@ export type UserIdentitiesUnmanagedUpdateBody = /** * @deprecated Use UserIdentitiesUnmanagedUpdateRequest instead. */ -export type UserIdentitiesUnmanagedUpdateResponse = - RouteResponse<'/user_identities/unmanaged/update'> +export type UserIdentitiesUnmanagedUpdateResponse = void export type UserIdentitiesUnmanagedUpdateRequest = SeamHttpRequest< void, 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 67d160fb..78ebed85 100644 --- a/src/lib/seam/connect/routes/user-identities/user-identities.ts +++ b/src/lib/seam/connect/routes/user-identities/user-identities.ts @@ -3,12 +3,6 @@ * 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, @@ -35,6 +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 { 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,8 +366,12 @@ export class SeamHttpUserIdentities { } } -export type UserIdentitiesAddAcsUserParameters = - RouteRequestBody<'/user_identities/add_acs_user'> +export type UserIdentitiesAddAcsUserParameters = { + acs_user_id: string + + user_identity_id?: string | undefined + user_identity_key?: string | undefined +} /** * @deprecated Use UserIdentitiesAddAcsUserParameters instead. @@ -377,15 +381,19 @@ export type UserIdentitiesAddAcsUserBody = UserIdentitiesAddAcsUserParameters /** * @deprecated Use UserIdentitiesAddAcsUserRequest instead. */ -export type UserIdentitiesAddAcsUserResponse = - RouteResponse<'/user_identities/add_acs_user'> +export type UserIdentitiesAddAcsUserResponse = void export type UserIdentitiesAddAcsUserRequest = SeamHttpRequest export interface UserIdentitiesAddAcsUserOptions {} -export type UserIdentitiesCreateParameters = - RouteRequestBody<'/user_identities/create'> +export type UserIdentitiesCreateParameters = { + acs_system_ids?: Array | undefined + email_address?: string | undefined + full_name?: string | undefined + phone_number?: string | undefined + user_identity_key?: string | undefined +} /** * @deprecated Use UserIdentitiesCreateParameters instead. @@ -395,8 +403,9 @@ export type UserIdentitiesCreateBody = UserIdentitiesCreateParameters /** * @deprecated Use UserIdentitiesCreateRequest instead. */ -export type UserIdentitiesCreateResponse = - RouteResponse<'/user_identities/create'> +export type UserIdentitiesCreateResponse = { + user_identity: UserIdentityResource +} export type UserIdentitiesCreateRequest = SeamHttpRequest< UserIdentitiesCreateResponse, @@ -405,8 +414,9 @@ export type UserIdentitiesCreateRequest = SeamHttpRequest< export interface UserIdentitiesCreateOptions {} -export type UserIdentitiesDeleteParameters = - RouteRequestBody<'/user_identities/delete'> +export type UserIdentitiesDeleteParameters = { + user_identity_id: string +} /** * @deprecated Use UserIdentitiesDeleteParameters instead. @@ -416,15 +426,17 @@ export type UserIdentitiesDeleteParams = UserIdentitiesDeleteParameters /** * @deprecated Use UserIdentitiesDeleteRequest instead. */ -export type UserIdentitiesDeleteResponse = - RouteResponse<'/user_identities/delete'> +export type UserIdentitiesDeleteResponse = void export type UserIdentitiesDeleteRequest = SeamHttpRequest export interface UserIdentitiesDeleteOptions {} -export type UserIdentitiesGenerateInstantKeyParameters = - RouteRequestBody<'/user_identities/generate_instant_key'> +export type UserIdentitiesGenerateInstantKeyParameters = { + customization_profile_id?: string | undefined + max_use_count?: number | undefined + user_identity_id: string +} /** * @deprecated Use UserIdentitiesGenerateInstantKeyParameters instead. @@ -435,8 +447,9 @@ export type UserIdentitiesGenerateInstantKeyBody = /** * @deprecated Use UserIdentitiesGenerateInstantKeyRequest instead. */ -export type UserIdentitiesGenerateInstantKeyResponse = - RouteResponse<'/user_identities/generate_instant_key'> +export type UserIdentitiesGenerateInstantKeyResponse = { + instant_key: InstantKeyResource +} export type UserIdentitiesGenerateInstantKeyRequest = SeamHttpRequest< UserIdentitiesGenerateInstantKeyResponse, @@ -445,8 +458,10 @@ export type UserIdentitiesGenerateInstantKeyRequest = SeamHttpRequest< export interface UserIdentitiesGenerateInstantKeyOptions {} -export type UserIdentitiesGetParameters = - RouteRequestParams<'/user_identities/get'> +export type UserIdentitiesGetParameters = { + user_identity_id?: string | undefined + user_identity_key?: string | undefined +} /** * @deprecated Use UserIdentitiesGetParameters instead. @@ -456,7 +471,7 @@ export type UserIdentitiesGetParams = UserIdentitiesGetParameters /** * @deprecated Use UserIdentitiesGetRequest instead. */ -export type UserIdentitiesGetResponse = RouteResponse<'/user_identities/get'> +export type UserIdentitiesGetResponse = { user_identity: UserIdentityResource } export type UserIdentitiesGetRequest = SeamHttpRequest< UserIdentitiesGetResponse, @@ -465,8 +480,11 @@ export type UserIdentitiesGetRequest = SeamHttpRequest< export interface UserIdentitiesGetOptions {} -export type UserIdentitiesGrantAccessToDeviceParameters = - RouteRequestBody<'/user_identities/grant_access_to_device'> +export type UserIdentitiesGrantAccessToDeviceParameters = { + device_id: string + + user_identity_id: string +} /** * @deprecated Use UserIdentitiesGrantAccessToDeviceParameters instead. @@ -477,8 +495,7 @@ export type UserIdentitiesGrantAccessToDeviceBody = /** * @deprecated Use UserIdentitiesGrantAccessToDeviceRequest instead. */ -export type UserIdentitiesGrantAccessToDeviceResponse = - RouteResponse<'/user_identities/grant_access_to_device'> +export type UserIdentitiesGrantAccessToDeviceResponse = void export type UserIdentitiesGrantAccessToDeviceRequest = SeamHttpRequest< void, @@ -487,8 +504,14 @@ export type UserIdentitiesGrantAccessToDeviceRequest = SeamHttpRequest< export interface UserIdentitiesGrantAccessToDeviceOptions {} -export type UserIdentitiesListParameters = - RouteRequestBody<'/user_identities/list'> +export type UserIdentitiesListParameters = { + created_before?: string | undefined + credential_manager_acs_system_id?: string | undefined + limit?: number | undefined + page_cursor?: string | undefined + search?: string | undefined + user_identity_ids?: Array | undefined +} /** * @deprecated Use UserIdentitiesListParameters instead. @@ -498,7 +521,9 @@ export type UserIdentitiesListParams = UserIdentitiesListParameters /** * @deprecated Use UserIdentitiesListRequest instead. */ -export type UserIdentitiesListResponse = RouteResponse<'/user_identities/list'> +export type UserIdentitiesListResponse = { + user_identities: Array +} export type UserIdentitiesListRequest = SeamHttpRequest< UserIdentitiesListResponse, @@ -507,8 +532,9 @@ export type UserIdentitiesListRequest = SeamHttpRequest< export interface UserIdentitiesListOptions {} -export type UserIdentitiesListAccessibleDevicesParameters = - RouteRequestBody<'/user_identities/list_accessible_devices'> +export type UserIdentitiesListAccessibleDevicesParameters = { + user_identity_id: string +} /** * @deprecated Use UserIdentitiesListAccessibleDevicesParameters instead. @@ -519,8 +545,9 @@ export type UserIdentitiesListAccessibleDevicesParams = /** * @deprecated Use UserIdentitiesListAccessibleDevicesRequest instead. */ -export type UserIdentitiesListAccessibleDevicesResponse = - RouteResponse<'/user_identities/list_accessible_devices'> +export type UserIdentitiesListAccessibleDevicesResponse = { + devices: Array +} export type UserIdentitiesListAccessibleDevicesRequest = SeamHttpRequest< UserIdentitiesListAccessibleDevicesResponse, @@ -529,8 +556,9 @@ export type UserIdentitiesListAccessibleDevicesRequest = SeamHttpRequest< export interface UserIdentitiesListAccessibleDevicesOptions {} -export type UserIdentitiesListAccessibleEntrancesParameters = - RouteRequestBody<'/user_identities/list_accessible_entrances'> +export type UserIdentitiesListAccessibleEntrancesParameters = { + user_identity_id: string +} /** * @deprecated Use UserIdentitiesListAccessibleEntrancesParameters instead. @@ -541,8 +569,9 @@ export type UserIdentitiesListAccessibleEntrancesParams = /** * @deprecated Use UserIdentitiesListAccessibleEntrancesRequest instead. */ -export type UserIdentitiesListAccessibleEntrancesResponse = - RouteResponse<'/user_identities/list_accessible_entrances'> +export type UserIdentitiesListAccessibleEntrancesResponse = { + acs_entrances: Array +} export type UserIdentitiesListAccessibleEntrancesRequest = SeamHttpRequest< UserIdentitiesListAccessibleEntrancesResponse, @@ -551,8 +580,9 @@ export type UserIdentitiesListAccessibleEntrancesRequest = SeamHttpRequest< export interface UserIdentitiesListAccessibleEntrancesOptions {} -export type UserIdentitiesListAcsSystemsParameters = - RouteRequestBody<'/user_identities/list_acs_systems'> +export type UserIdentitiesListAcsSystemsParameters = { + user_identity_id: string +} /** * @deprecated Use UserIdentitiesListAcsSystemsParameters instead. @@ -563,8 +593,9 @@ export type UserIdentitiesListAcsSystemsParams = /** * @deprecated Use UserIdentitiesListAcsSystemsRequest instead. */ -export type UserIdentitiesListAcsSystemsResponse = - RouteResponse<'/user_identities/list_acs_systems'> +export type UserIdentitiesListAcsSystemsResponse = { + acs_systems: Array +} export type UserIdentitiesListAcsSystemsRequest = SeamHttpRequest< UserIdentitiesListAcsSystemsResponse, @@ -573,8 +604,9 @@ export type UserIdentitiesListAcsSystemsRequest = SeamHttpRequest< export interface UserIdentitiesListAcsSystemsOptions {} -export type UserIdentitiesListAcsUsersParameters = - RouteRequestBody<'/user_identities/list_acs_users'> +export type UserIdentitiesListAcsUsersParameters = { + user_identity_id: string +} /** * @deprecated Use UserIdentitiesListAcsUsersParameters instead. @@ -585,8 +617,9 @@ export type UserIdentitiesListAcsUsersParams = /** * @deprecated Use UserIdentitiesListAcsUsersRequest instead. */ -export type UserIdentitiesListAcsUsersResponse = - RouteResponse<'/user_identities/list_acs_users'> +export type UserIdentitiesListAcsUsersResponse = { + acs_users: Array +} export type UserIdentitiesListAcsUsersRequest = SeamHttpRequest< UserIdentitiesListAcsUsersResponse, @@ -595,8 +628,11 @@ export type UserIdentitiesListAcsUsersRequest = SeamHttpRequest< export interface UserIdentitiesListAcsUsersOptions {} -export type UserIdentitiesRemoveAcsUserParameters = - RouteRequestBody<'/user_identities/remove_acs_user'> +export type UserIdentitiesRemoveAcsUserParameters = { + acs_user_id: string + + user_identity_id: string +} /** * @deprecated Use UserIdentitiesRemoveAcsUserParameters instead. @@ -607,8 +643,7 @@ export type UserIdentitiesRemoveAcsUserParams = /** * @deprecated Use UserIdentitiesRemoveAcsUserRequest instead. */ -export type UserIdentitiesRemoveAcsUserResponse = - RouteResponse<'/user_identities/remove_acs_user'> +export type UserIdentitiesRemoveAcsUserResponse = void export type UserIdentitiesRemoveAcsUserRequest = SeamHttpRequest< void, @@ -617,8 +652,11 @@ export type UserIdentitiesRemoveAcsUserRequest = SeamHttpRequest< export interface UserIdentitiesRemoveAcsUserOptions {} -export type UserIdentitiesRevokeAccessToDeviceParameters = - RouteRequestBody<'/user_identities/revoke_access_to_device'> +export type UserIdentitiesRevokeAccessToDeviceParameters = { + device_id: string + + user_identity_id: string +} /** * @deprecated Use UserIdentitiesRevokeAccessToDeviceParameters instead. @@ -629,8 +667,7 @@ export type UserIdentitiesRevokeAccessToDeviceParams = /** * @deprecated Use UserIdentitiesRevokeAccessToDeviceRequest instead. */ -export type UserIdentitiesRevokeAccessToDeviceResponse = - RouteResponse<'/user_identities/revoke_access_to_device'> +export type UserIdentitiesRevokeAccessToDeviceResponse = void export type UserIdentitiesRevokeAccessToDeviceRequest = SeamHttpRequest< void, @@ -639,8 +676,14 @@ export type UserIdentitiesRevokeAccessToDeviceRequest = SeamHttpRequest< export interface UserIdentitiesRevokeAccessToDeviceOptions {} -export type UserIdentitiesUpdateParameters = - RouteRequestBody<'/user_identities/update'> +export type UserIdentitiesUpdateParameters = { + email_address?: string | undefined + full_name?: string | undefined + phone_number?: string | undefined + user_identity_id: string + + user_identity_key?: string | undefined +} /** * @deprecated Use UserIdentitiesUpdateParameters instead. @@ -650,8 +693,7 @@ export type UserIdentitiesUpdateBody = UserIdentitiesUpdateParameters /** * @deprecated Use UserIdentitiesUpdateRequest instead. */ -export type UserIdentitiesUpdateResponse = - RouteResponse<'/user_identities/update'> +export type UserIdentitiesUpdateResponse = void export type UserIdentitiesUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/webhooks/webhooks.ts b/src/lib/seam/connect/routes/webhooks/webhooks.ts index c79030a6..1bb33cf0 100644 --- a/src/lib/seam/connect/routes/webhooks/webhooks.ts +++ b/src/lib/seam/connect/routes/webhooks/webhooks.ts @@ -3,12 +3,6 @@ * 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, @@ -35,6 +29,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.js' +import type { WebhookResource } 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' @@ -232,7 +227,10 @@ export class SeamHttpWebhooks { } } -export type WebhooksCreateParameters = RouteRequestBody<'/webhooks/create'> +export type WebhooksCreateParameters = { + event_types?: Array | undefined + url: string +} /** * @deprecated Use WebhooksCreateParameters instead. @@ -242,7 +240,7 @@ export type WebhooksCreateBody = WebhooksCreateParameters /** * @deprecated Use WebhooksCreateRequest instead. */ -export type WebhooksCreateResponse = RouteResponse<'/webhooks/create'> +export type WebhooksCreateResponse = { webhook: WebhookResource } export type WebhooksCreateRequest = SeamHttpRequest< WebhooksCreateResponse, @@ -251,7 +249,9 @@ export type WebhooksCreateRequest = SeamHttpRequest< export interface WebhooksCreateOptions {} -export type WebhooksDeleteParameters = RouteRequestBody<'/webhooks/delete'> +export type WebhooksDeleteParameters = { + webhook_id: string +} /** * @deprecated Use WebhooksDeleteParameters instead. @@ -261,13 +261,15 @@ export type WebhooksDeleteParams = WebhooksDeleteParameters /** * @deprecated Use WebhooksDeleteRequest instead. */ -export type WebhooksDeleteResponse = RouteResponse<'/webhooks/delete'> +export type WebhooksDeleteResponse = void export type WebhooksDeleteRequest = SeamHttpRequest export interface WebhooksDeleteOptions {} -export type WebhooksGetParameters = RouteRequestBody<'/webhooks/get'> +export type WebhooksGetParameters = { + webhook_id: string +} /** * @deprecated Use WebhooksGetParameters instead. @@ -277,13 +279,13 @@ export type WebhooksGetParams = WebhooksGetParameters /** * @deprecated Use WebhooksGetRequest instead. */ -export type WebhooksGetResponse = RouteResponse<'/webhooks/get'> +export type WebhooksGetResponse = { webhook: WebhookResource } export type WebhooksGetRequest = SeamHttpRequest export interface WebhooksGetOptions {} -export type WebhooksListParameters = RouteRequestParams<'/webhooks/list'> +export type WebhooksListParameters = {} /** * @deprecated Use WebhooksListParameters instead. @@ -293,7 +295,7 @@ export type WebhooksListParams = WebhooksListParameters /** * @deprecated Use WebhooksListRequest instead. */ -export type WebhooksListResponse = RouteResponse<'/webhooks/list'> +export type WebhooksListResponse = { webhooks: Array } export type WebhooksListRequest = SeamHttpRequest< WebhooksListResponse, @@ -302,7 +304,11 @@ export type WebhooksListRequest = SeamHttpRequest< export interface WebhooksListOptions {} -export type WebhooksUpdateParameters = RouteRequestBody<'/webhooks/update'> +export type WebhooksUpdateParameters = { + event_types: Array + + webhook_id: string +} /** * @deprecated Use WebhooksUpdateParameters instead. @@ -312,7 +318,7 @@ export type WebhooksUpdateBody = WebhooksUpdateParameters /** * @deprecated Use WebhooksUpdateRequest instead. */ -export type WebhooksUpdateResponse = RouteResponse<'/webhooks/update'> +export type WebhooksUpdateResponse = void export type WebhooksUpdateRequest = SeamHttpRequest diff --git a/src/lib/seam/connect/routes/workspaces/workspaces.ts b/src/lib/seam/connect/routes/workspaces/workspaces.ts index be7074ec..72182eef 100644 --- a/src/lib/seam/connect/routes/workspaces/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces/workspaces.ts @@ -3,11 +3,7 @@ * Do not edit this file or add other files to this directory. */ -import type { - RouteRequestBody, - RouteRequestParams, - RouteResponse, -} from '@seamapi/types/connect' +import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect' import { seamApiLtsVersion } from 'lib/lts-version.js' import { @@ -35,6 +31,7 @@ import { limitToSeamHttpRequestOptions, parseOptions, } from 'lib/seam/connect/parse-options.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' import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js' @@ -259,7 +256,26 @@ export class SeamHttpWorkspaces { } } -export type WorkspacesCreateParameters = RouteRequestBody<'/workspaces/create'> +export type WorkspacesCreateParameters = { + company_name?: string | undefined + connect_partner_name?: string | undefined + connect_webview_customization?: + | { + logo_shape?: 'circle' | 'square' | undefined + primary_button_color?: string | undefined + primary_button_text_color?: string | undefined + success_message?: string | undefined + } + | undefined + is_sandbox?: boolean | undefined + name: string + + organization_id?: string | undefined + webview_logo_shape?: 'circle' | 'square' | undefined + webview_primary_button_color?: string | undefined + webview_primary_button_text_color?: string | undefined + webview_success_message?: string | undefined +} /** * @deprecated Use WorkspacesCreateParameters instead. @@ -269,7 +285,7 @@ export type WorkspacesCreateBody = WorkspacesCreateParameters /** * @deprecated Use WorkspacesCreateRequest instead. */ -export type WorkspacesCreateResponse = RouteResponse<'/workspaces/create'> +export type WorkspacesCreateResponse = { workspace: WorkspaceResource } export type WorkspacesCreateRequest = SeamHttpRequest< WorkspacesCreateResponse, @@ -299,7 +315,7 @@ export type WorkspacesFindAnythingRequest = SeamHttpRequest< export interface WorkspacesFindAnythingOptions {} -export type WorkspacesGetParameters = RouteRequestParams<'/workspaces/get'> +export type WorkspacesGetParameters = {} /** * @deprecated Use WorkspacesGetParameters instead. @@ -309,7 +325,7 @@ export type WorkspacesGetParams = WorkspacesGetParameters /** * @deprecated Use WorkspacesGetRequest instead. */ -export type WorkspacesGetResponse = RouteResponse<'/workspaces/get'> +export type WorkspacesGetResponse = { workspace: WorkspaceResource } export type WorkspacesGetRequest = SeamHttpRequest< WorkspacesGetResponse, @@ -318,7 +334,7 @@ export type WorkspacesGetRequest = SeamHttpRequest< export interface WorkspacesGetOptions {} -export type WorkspacesListParameters = RouteRequestParams<'/workspaces/list'> +export type WorkspacesListParameters = {} /** * @deprecated Use WorkspacesListParameters instead. @@ -328,7 +344,7 @@ export type WorkspacesListParams = WorkspacesListParameters /** * @deprecated Use WorkspacesListRequest instead. */ -export type WorkspacesListResponse = RouteResponse<'/workspaces/list'> +export type WorkspacesListResponse = { workspaces: Array } export type WorkspacesListRequest = SeamHttpRequest< WorkspacesListResponse, @@ -337,8 +353,7 @@ export type WorkspacesListRequest = SeamHttpRequest< export interface WorkspacesListOptions {} -export type WorkspacesResetSandboxParameters = - RouteRequestBody<'/workspaces/reset_sandbox'> +export type WorkspacesResetSandboxParameters = {} /** * @deprecated Use WorkspacesResetSandboxParameters instead. @@ -361,7 +376,21 @@ export type WorkspacesResetSandboxOptions = Pick< 'waitForActionAttempt' > -export type WorkspacesUpdateParameters = RouteRequestBody<'/workspaces/update'> +export type WorkspacesUpdateParameters = { + connect_partner_name?: string | undefined + connect_webview_customization?: + | { + logo_shape?: 'circle' | 'square' | undefined + primary_button_color?: string | undefined + primary_button_text_color?: string | undefined + success_message?: string | undefined + } + | undefined + is_publishable_key_auth_enabled?: boolean | undefined + is_suspended?: boolean | undefined + name?: string | undefined + organization_id?: string | undefined +} /** * @deprecated Use WorkspacesUpdateParameters instead. @@ -371,7 +400,7 @@ export type WorkspacesUpdateBody = WorkspacesUpdateParameters /** * @deprecated Use WorkspacesUpdateRequest instead. */ -export type WorkspacesUpdateResponse = RouteResponse<'/workspaces/update'> +export type WorkspacesUpdateResponse = void export type WorkspacesUpdateRequest = SeamHttpRequest