diff --git a/.gitattributes b/.gitattributes index f8571a0b..5023db78 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ +src/lib/seam/connect/resources/** linguist-generated src/lib/seam/connect/routes/** linguist-generated diff --git a/codegen/layouts/endpoints.hbs b/codegen/layouts/endpoints.hbs index 55c24bf8..319fe2a8 100644 --- a/codegen/layouts/endpoints.hbs +++ b/codegen/layouts/endpoints.hbs @@ -23,6 +23,7 @@ export class {{className}} { {{/if}} {{#each endpoints}} + {{> doc}} get['{{path}}'](): {{> endpont-method-signature isFnType=true }} { const { client, defaults } = this diff --git a/codegen/layouts/partials/doc.hbs b/codegen/layouts/partials/doc.hbs new file mode 100644 index 00000000..306218a3 --- /dev/null +++ b/codegen/layouts/partials/doc.hbs @@ -0,0 +1,12 @@ +{{#if (or (trim description) isDeprecated)}} +/** +{{#each (lines description)}} + * {{replaceAll this "*/" "*\/"}} +{{/each}} +{{#if isDeprecated}} + * @deprecated{{#with (trim deprecationMessage)}} {{replaceAll this "*/" "*\/"}}{{/with}} +{{/if}} + */ +{{else}} +{{identity " "}} +{{/if}} diff --git a/codegen/layouts/partials/request-list-item-type.hbs b/codegen/layouts/partials/request-list-item-type.hbs index 1f267656..42d2f989 100644 --- a/codegen/layouts/partials/request-list-item-type.hbs +++ b/codegen/layouts/partials/request-list-item-type.hbs @@ -1,7 +1,8 @@ {{#if (eq itemFormat "object")}} {{> request-object parameters=itemParameters}} {{else if (eq itemFormat "discriminated_object")}} -{{#each variants}}{{#unless @first}} | {{/unless}}{{> request-object parameters=parameters}}{{/each}} +{{#each variants}}{{#unless @first}} | {{/unless}}{{> doc~}} +{{> 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 index f287082c..303e011a 100644 --- a/codegen/layouts/partials/request-object.hbs +++ b/codegen/layouts/partials/request-object.hbs @@ -1,5 +1,6 @@ { {{#each parameters}} + {{> doc}} {{json name}}{{#unless isRequired}}?{{/unless}}: {{> request-parameter-type }}{{#unless isRequired}} | undefined{{/unless}} {{/each}} } diff --git a/codegen/layouts/partials/request-scalar-type.hbs b/codegen/layouts/partials/request-scalar-type.hbs index 4c39f808..87eec456 100644 --- a/codegen/layouts/partials/request-scalar-type.hbs +++ b/codegen/layouts/partials/request-scalar-type.hbs @@ -1 +1,2 @@ -{{#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}} +{{#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}}{{> doc}} +{{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 index ed882dff..26db4788 100644 --- a/codegen/layouts/partials/resource-list-item-type.hbs +++ b/codegen/layouts/partials/resource-list-item-type.hbs @@ -1,7 +1,8 @@ {{#if (eq itemFormat "object")}} {{> resource-object properties=itemProperties}} {{else if (eq itemFormat "discriminated_object")}} -{{#each variants}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}} +{{#each variants}}{{#unless @first}} | {{/unless}}{{> doc~}} +{{> 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 index a08a673e..72aa86ee 100644 --- a/codegen/layouts/partials/resource-object.hbs +++ b/codegen/layouts/partials/resource-object.hbs @@ -1,5 +1,6 @@ { {{#each properties}} + {{> doc}} {{json name}}{{#if isOptional}}?{{/if}}: {{> resource-property-type }}{{#if isNullable}} | null{{/if}}{{#if isOptional}} | undefined{{/if}} {{/each}} } diff --git a/codegen/layouts/partials/resource-scalar-type.hbs b/codegen/layouts/partials/resource-scalar-type.hbs index 4c39f808..87eec456 100644 --- a/codegen/layouts/partials/resource-scalar-type.hbs +++ b/codegen/layouts/partials/resource-scalar-type.hbs @@ -1 +1,2 @@ -{{#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}} +{{#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}}{{> doc}} +{{json name}}{{else}}string{{/each}}{{else}}string{{/if}} diff --git a/codegen/layouts/partials/route-class-endpoint.hbs b/codegen/layouts/partials/route-class-endpoint.hbs index f0c7bd28..962e784f 100644 --- a/codegen/layouts/partials/route-class-endpoint.hbs +++ b/codegen/layouts/partials/route-class-endpoint.hbs @@ -1,3 +1,4 @@ +{{> doc}} {{methodName}} {{> endpont-method-signature }} { diff --git a/codegen/layouts/resource.hbs b/codegen/layouts/resource.hbs index 855cbaec..afe4a92f 100644 --- a/codegen/layouts/resource.hbs +++ b/codegen/layouts/resource.hbs @@ -14,9 +14,11 @@ interface BatchResourceMap { {{/each}} } +{{> doc resources.[0]}} export type {{typeName}} = { [K in TKey]?: Array | undefined } {{else}} +{{> doc resources.[0]}} export type {{typeName}} = {{#each resources}}{{#unless @first}} | {{/unless}}{{> resource-object properties=properties}}{{/each}} {{/if}} diff --git a/codegen/lib/handlebars-helpers.ts b/codegen/lib/handlebars-helpers.ts index 5d97ec8f..9805b634 100644 --- a/codegen/lib/handlebars-helpers.ts +++ b/codegen/lib/handlebars-helpers.ts @@ -4,3 +4,16 @@ export const json = (value: string): string => JSON.stringify(value) export const replaceExtension = (fileName: string, extension: string): string => fileName.replace(/\.[^.]+$/, extension) + +export const trim = (value = ''): string => value.trim() + +export const lines = (value = ''): string[] => { + const trimmed = trim(value) + return trimmed === '' ? [] : trimmed.split('\n') +} + +export const replaceAll = ( + value: string, + searchValue: string, + replaceValue: string, +): string => value.replaceAll(searchValue, replaceValue) diff --git a/codegen/lib/layouts/route.ts b/codegen/lib/layouts/route.ts index f7e656fe..c6882b25 100644 --- a/codegen/lib/layouts/route.ts +++ b/codegen/lib/layouts/route.ts @@ -17,6 +17,9 @@ export interface RouteIndexLayoutContext { } export interface EndpointLayoutContext { + description: string + isDeprecated: boolean + deprecationMessage: string path: string methodName: string functionName: string @@ -119,6 +122,9 @@ export const getEndpointLayoutContext = ( const methodName = camelCase(endpoint.name) return { + description: endpoint.description, + isDeprecated: endpoint.isDeprecated, + deprecationMessage: endpoint.deprecationMessage, path: endpoint.path, methodName, functionName: camelCase(prefix), diff --git a/src/lib/seam/connect/resources/access-code.ts b/src/lib/seam/connect/resources/access-code.ts index c9ce853c..6b4a1065 100644 --- a/src/lib/seam/connect/resources/access-code.ts +++ b/src/lib/seam/connect/resources/access-code.ts @@ -3,402 +3,1086 @@ * Do not edit this file. */ +/** + * Represents a smart lock [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. Using the Seam Access Code API, you can easily generate access codes on the hundreds of door lock models with which we integrate. + * + * Seam supports programming two types of access codes: [ongoing](https://docs.seam.co/low-level-apis/smart-locks/access-codes#ongoing-access-codes) and [time-bound](https://docs.seam.co/low-level-apis/smart-locks/access-codes#time-bound-access-codes). To differentiate between the two, refer to the `type` property of the access code. Ongoing codes display as `ongoing`, whereas time-bound codes are labeled `time_bound`. An ongoing access code is active, until it has been removed from the device. To specify an ongoing access code, leave both `starts_at` and `ends_at` empty. A time-bound access code will be programmed at the `starts_at` time and removed at the `ends_at` time. + * + * In addition, for certain devices, Seam also supports [offline access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes#offline-access-codes). Offline access (PIN) codes are designed for door locks that might not always maintain an internet connection. For this type of access code, the device manufacturer uses encryption keys (tokens) to create server-based registries of algorithmically-generated offline PIN codes. Because the tokens remain synchronized with the managed devices, the locks do not require an active internet connection—and you do not need to be near the locks—to create an offline access code. Then, owners or managers can share these offline codes with users through a variety of mechanisms, such as messaging applications. That is, lock users do not need to install a smartphone application to receive an offline access code. + * + * For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + */ export type AccessCode = { + /** + * Unique identifier for the access code. + */ access_code_id: string + /** + * Code used for access. Typically, a numeric or alphanumeric string. + */ code: string | null + /** + * Unique identifier for a group of access codes that share the same code. + */ common_code_key: string | null + /** + * Date and time at which the access code was created. + */ created_at: string + /** + * Unique identifier for the device associated with the access code. + */ device_id: string + /** + * Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices. + */ dormakaba_oracode_metadata?: | { + /** + * Indicates whether the stay can be cancelled via the Dormakaba Oracode API. + */ is_cancellable?: boolean | undefined + /** + * Indicates whether early check-in is available for this stay. + */ is_early_checkin_able?: boolean | undefined + /** + * Indicates whether the stay can be extended via the Dormakaba Oracode API. + */ is_extendable?: boolean | undefined + /** + * Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. + */ is_overridable?: boolean | undefined + /** + * Dormakaba Oracode site name associated with this access code. + */ site_name?: string | undefined + /** + * Dormakaba Oracode stay ID associated with this access code. + */ stay_id?: number | undefined + /** + * Dormakaba Oracode user level ID associated with this access code. + */ user_level_id?: string | undefined + /** + * Dormakaba Oracode user level name associated with this access code. + */ user_level_name?: string | null | undefined } | null | undefined + /** + * Date and time after which the time-bound access code becomes inactive. + */ ends_at?: string | null | undefined + /** + * Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + */ errors: Array< + /** + * Indicates a provider-specific issue that prevents the access code from being set or managed. Check the error message for details. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'provider_issue' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Failed to set code on device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'failed_to_set_on_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Failed to remove code from device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'failed_to_remove_from_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Duplicate access code detected on device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'duplicate_code_on_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * ID of the managed access code that conflicts with this managed access code, when Seam can identify it. + */ managed_access_code_id?: string | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. + */ unmanaged_access_code_id?: string | undefined - } + } /** + * No space for access code on device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'no_space_for_access_code_on_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Code was modified or removed externally after Seam successfully set it on the device. The external change conflicts with the state that Seam is trying to apply, so Seam will attempt to set the code on the device again. + */ | { + /** + * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + */ change_type?: 'modified' | 'removed' | undefined + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'conflicting_external_modification' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * List of fields that were changed externally, with their previous and new values. + */ modified_fields?: | Array<{ + /** + * The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + */ field: string + /** + * The previous value of the field. + */ from: string | null + /** + * The new value of the field. + */ to: string | null }> | undefined - } + } /** + * Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'access_code_inactive' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'insufficient_permissions' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the account is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'account_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Salto site user limit has been reached. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'dormakaba_sites_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is offline. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_offline' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device has been removed. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_removed' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the hub is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'hub_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'empty_backup_access_code_pool' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the user is not authorized to use the August lock. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'august_lock_not_authorized' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that device credentials are missing. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'missing_device_credentials' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the auxiliary heat is running. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'auxiliary_heat_running' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that a subscription is required to connect. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'subscription_required' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'bridge_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * Indicates whether the access code is a backup code. + */ is_backup?: boolean | undefined + /** + * Indicates whether a backup access code is available for use if the primary access code is lost or compromised. + */ is_backup_access_code_available: boolean + /** + * Indicates whether changes to the access code from external sources are permitted. + */ is_external_modification_allowed: boolean + /** + * Indicates whether Seam manages the access code. + */ is_managed: boolean + /** + * Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection. + */ is_offline_access_code: boolean + /** + * Indicates whether the access code can only be used once. If `true`, the code becomes invalid after the first use. + */ is_one_time_use: boolean + /** + * Indicates whether the code is set on the device according to a preconfigured schedule. + */ is_scheduled_on_device?: boolean | undefined + /** + * Indicates whether the access code is waiting for a code assignment. + */ is_waiting_for_code_assignment?: boolean | undefined + /** + * Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + */ name: string | null + /** + * Collection of pending mutations for the access code. Indicates changes that Seam is in the process of pushing to the device. + */ pending_mutations: Array< + /** + * Seam is in the process of setting an access code on the device. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of setting an access code on the device. + */ mutation_code: 'creating' - } + } /** + * Seam is waiting until closer to the access code's start time before programming it on the device. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is waiting until closer to the access code's start time before programming it on the device. + */ mutation_code: 'deferring_creation' + /** + * Date and time at which Seam will attempt to program this access code on the device. + */ scheduled_at: string - } + } /** + * Seam is in the process of removing an access code from the device. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of removing an access code from the device. + */ mutation_code: 'deleting' - } + } /** + * Seam is in the process of pushing an updated PIN code to the device. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous code configuration. + */ from: { + /** + * Previous PIN code. + */ code: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing an updated PIN code to the device. + */ mutation_code: 'updating_code' + /** + * New code configuration. + */ to: { + /** + * New PIN code. + */ code: string | null } - } + } /** + * Seam is in the process of pushing an updated access code name to the device. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous name configuration. + */ from: { + /** + * Previous access code name. + */ name: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing an updated access code name to the device. + */ mutation_code: 'updating_name' + /** + * New name configuration. + */ to: { + /** + * New access code name. + */ name: string | null } - } + } /** + * Seam is in the process of pushing an updated time frame to the device. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous time frame configuration. + */ from: { + /** + * Previous end time for the access code. + */ ends_at: string | null + /** + * Previous start time for the access code. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated access code time frame to the device. + */ mutation_code: 'updating_time_frame' + /** + * New time frame configuration. + */ to: { + /** + * New end time for the access code. + */ ends_at: string | null + /** + * New start time for the access code. + */ starts_at: string | null } } > + /** + * Identifier of the pulled backup access code. Used to associate the pulled backup access code with the original access code. + */ pulled_backup_access_code_id?: string | null | undefined + /** + * Date and time at which the time-bound access code becomes active. + */ starts_at?: string | null | undefined + /** + * Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes). + */ status: 'setting' | 'set' | 'unset' | 'removing' | 'unknown' + /** + * Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. + */ type: 'time_bound' | 'ongoing' + /** + * Warnings associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + */ warnings: Array< + /** + * The access code's PIN rotates periodically when the code is renewed. Retrieve the latest code before each use. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'code_rotates_periodically' - } + } /** + * The device's time zone is unknown and this code's time frame crosses a daylight-saving transition in at least one plausible time zone. A 1-hour safety buffer has been applied to the side of the time frame affected by the transition (`ends_at` for spring-forward, `starts_at` for fall-back) so the code stays active through the shift — the code may be usable up to 1 hour beyond your requested window. Set the device's time zone via `/devices/report_provider_metadata` to clear the buffer and guarantee exact handling. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_frame_adjusted_for_unknown_time_zone' - } + } /** + * Code was modified or removed externally after Seam successfully set it on the device. External modification is allowed for this code, so the externally modified state is being honored. + */ | { + /** + * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + */ change_type?: 'modified' | 'removed' | undefined + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * List of fields that were changed externally, with their previous and new values. + */ modified_fields?: | Array<{ + /** + * The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + */ field: string + /** + * The previous value of the field. + */ from: string | null + /** + * The new value of the field. + */ to: string | null }> | undefined + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'external_modification_in_effect' - } + } /** + * Delay in setting code on device. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'delay_in_setting_on_device' - } + } /** + * Delay in removing code from device. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'delay_in_removing_from_device' - } + } /** + * Third-party integration detected that may cause access codes to fail. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'third_party_integration_detected' - } + } /** + * Algopins must be used within 24 hours. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'igloo_algopin_must_be_used_within_24_hours' - } + } /** + * Management was transferred to another workspace. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'management_transferred' - } + } /** + * A backup access code has been pulled and is being used in place of this access code. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'using_backup_access_code' - } + } /** + * Access code is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * An unknown issue occurred with the access code. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_access_code' } > + /** + * Unique identifier for the Seam workspace associated with the 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 index 04e4fd24..ddaa271b 100644 --- a/src/lib/seam/connect/resources/access-grant.ts +++ b/src/lib/seam/connect/resources/access-grant.ts @@ -3,167 +3,435 @@ * Do not edit this file. */ +/** + * Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant. + */ export type AccessGrant = { + /** + * ID of the Access Grant. + */ access_grant_id: string + /** + * Unique key for the access grant within the workspace. + */ access_grant_key?: string | undefined + /** + * IDs of the access methods created for the Access Grant. + */ access_method_ids: Array + /** + * Client Session Token. Only returned if the Access Grant has a mobile_key access method. + */ client_session_token?: string | undefined + /** + * Date and time at which the Access Grant was created. + */ created_at: string + /** + * ID of the customization profile associated with the Access Grant. + */ customization_profile_id?: string | undefined + /** + * Display name of the Access Grant. + */ display_name: string + /** + * Date and time at which the Access Grant ends. + */ ends_at: string | null - errors: Array<{ - created_at: string - - error_code: 'cannot_create_requested_access_methods' - - message: string - - missing_device_ids?: Array | undefined - }> + /** + * Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access). + */ + errors: Array< + /** + * Indicates that Seam could not create one or more of the requested access methods for the access grant. + */ + { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'cannot_create_requested_access_methods' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + */ + missing_device_ids?: Array | undefined + } + > + /** + * Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method. + */ instant_key_url?: string | undefined + /** + * @deprecated Use `space_ids`. + */ location_ids: Array + /** + * Name of the Access Grant. If not provided, the display name will be computed. + */ name: string | null + /** + * List of pending mutations for the access grant. This shows updates that are in progress. + */ pending_mutations: Array< + /** + * Seam is in the process of updating the devices/spaces associated with this access grant. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous location configuration. + */ from: { + /** + * Previous device IDs where access codes existed. + */ device_ids: Array } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the spaces (devices) associated with this access grant. + */ mutation_code: 'updating_spaces' + /** + * New location configuration. + */ to: { + /** + * Common code key to ensure PIN code reuse across devices. + */ common_code_key?: string | null | undefined + /** + * New device IDs where access codes should be created. + */ device_ids: Array } - } + } /** + * Seam is in the process of updating the access times for this access grant. + */ | { + /** + * IDs of the access methods being updated. + */ access_method_ids: Array + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous access time configuration. + */ from: { + /** + * Previous end time for access. + */ ends_at: string | null + /** + * Previous start time for access. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the access times for this access grant. + */ mutation_code: 'updating_access_times' + /** + * New access time configuration. + */ to: { + /** + * New end time for access. + */ ends_at: string | null + /** + * New start time for access. + */ starts_at: string | null } } > + /** + * Access methods that the user requested for the Access Grant. + */ requested_access_methods: Array<{ + /** + * Specific PIN code to use for this access method. Only applicable when mode is 'code'. + */ code?: string | undefined + /** + * IDs of the access methods created for the requested access method. + */ created_access_method_ids: Array + /** + * Date and time at which the requested access method was added to the Access Grant. + */ created_at: string + /** + * Display name of the access method. + */ display_name: string + /** + * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + */ instant_key_max_use_count?: number | undefined + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' }> + /** + * Reservation key for the access grant. + */ reservation_key?: string | undefined + /** + * IDs of the spaces to which the Access Grant gives access. + */ space_ids: Array + /** + * Date and time at which the Access Grant starts. + */ starts_at: string + /** + * ID of user identity to which the Access Grant gives access. + */ user_identity_id: string + /** + * Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access). + */ warnings: Array< + /** + * Indicates that the [access grant](https://docs.seam.co/use-cases/granting-access) is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the access grant should have access to more locations than it currently does. Access methods are being created for the missing locations. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'underprovisioned_access' - } + } /** + * Indicates that the access grant has access to locations it should not have. Access methods are being removed from the extra locations. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + */ failed_devices?: | Array<{ + /** + * Device whose access code could not be revoked. + */ device_id: string + /** + * Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + */ error_code: string + /** + * Human-readable description of why revocation failed. + */ message: string }> | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'overprovisioned_access' - } + } /** + * Indicates that the access times for this [access grant](https://docs.seam.co/use-cases/granting-access) are being updated. + */ | { + /** + * IDs of the access methods being updated. + */ access_method_ids: Array + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'updating_access_times' - } + } /** + * Indicates that the requested PIN code was already in use on a device, so a different code was assigned. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * ID of the device where the requested code was unavailable. + */ device_id: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * The new PIN code that was assigned instead. + */ new_code: string + /** + * The originally requested PIN code that was unavailable. + */ original_code: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'requested_code_unavailable' - } + } /** + * Indicates that a device in the access grant does not support access codes and was excluded from code materialization. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * ID of the device that does not support access codes. + */ device_id: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_does_not_support_access_codes' - } + } /** + * Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * ID of the device whose time constraints the access grant violates. + */ device_id: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Specific reason why the grant's times are not programmable on the device. + */ reason: | 'duration_exceeds_max' | 'times_do_not_match_slots' | 'ongoing_not_supported' + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_time_constraints_violated' } > + /** + * ID of the Seam workspace associated with the Access Grant. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/access-method.ts b/src/lib/seam/connect/resources/access-method.ts index b897a8dc..60b5cc84 100644 --- a/src/lib/seam/connect/resources/access-method.ts +++ b/src/lib/seam/connect/resources/access-method.ts @@ -3,115 +3,310 @@ * Do not edit this file. */ +/** + * Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key. + */ export type AccessMethod = { + /** + * ID of the access method. + */ access_method_id: string + /** + * Token of the client session associated with the access method. + */ client_session_token?: string | undefined + /** + * The actual PIN code for code access methods. + */ code?: string | null | undefined + /** + * Date and time at which the access method was created. + */ created_at: string + /** + * ID of the customization profile associated with the access method. + */ customization_profile_id?: string | undefined + /** + * Display name of the access method. + */ display_name: string - errors: Array<{ - created_at: string + /** + * Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + */ + errors: Array< + /** + * Indicates that Seam was unable to issue this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access method is eventually issued. + */ + { + /** + * Date and time at which Seam created the error. + */ + created_at: string - error_code: 'failed_to_issue' + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_issue' - message: string - }> + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } + > + /** + * URL of the Instant Key for mobile key access methods. + */ instant_key_url?: string | undefined + /** + * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + */ is_assignment_required?: boolean | undefined + /** + * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + */ is_encoding_required?: boolean | undefined + /** + * Indicates whether the access method has been issued. + */ is_issued: boolean + /** + * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + */ is_ready_for_assignment?: boolean | undefined + /** + * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + */ is_ready_for_encoding?: boolean | undefined + /** + * Date and time at which the access method was issued. + */ issued_at: string | null + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + */ pending_mutations: Array< + /** + * Seam is in the process of provisioning access for this access method on new devices. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous device configuration. + */ from: { + /** + * Previous device IDs where access was provisioned. + */ device_ids: Array } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of provisioning access for this access method on new devices. + */ mutation_code: 'provisioning_access' + /** + * New device configuration. + */ to: { + /** + * New device IDs where access is being provisioned. + */ device_ids: Array } - } + } /** + * Seam is in the process of revoking access for this access method from devices. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous device configuration. + */ from: { + /** + * Previous device IDs where access existed. + */ device_ids: Array } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of revoking access for this access method from devices. + */ mutation_code: 'revoking_access' + /** + * New device configuration. + */ to: { + /** + * New device IDs where access should remain. + */ device_ids: Array } - } + } /** + * Seam is in the process of updating the access times for this access method. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous access time configuration. + */ from: { + /** + * Previous end time for access. + */ ends_at: string | null + /** + * Previous start time for access. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the access times for this access method. + */ mutation_code: 'updating_access_times' + /** + * New access time configuration. + */ to: { + /** + * New end time for access. + */ ends_at: string | null + /** + * New start time for access. + */ starts_at: string | null } } > + /** + * Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + */ warnings: Array< + /** + * Indicates that the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the access times for this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) are being updated. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'updating_access_times' - } + } /** + * Indicates that all attempts to create an access code on this device before the start time failed and a backup access code was used to ensure access was provided in time. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * ID of the original access method from which this backup access method was split, if applicable. + */ original_access_method_id?: string | undefined + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'pulled_backup_access_code' - } + } /** + * Indicates that Seam has not yet issued this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant), even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'delay_in_issuing' } > + /** + * ID of the Seam workspace associated with the access method. + */ 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 index c3ea9236..5e5726fd 100644 --- a/src/lib/seam/connect/resources/acs-access-group.ts +++ b/src/lib/seam/connect/resources/acs-access-group.ts @@ -3,7 +3,17 @@ * Do not edit this file. */ +/** + * Group that defines the entrances to which a set of users has access and, in some cases, the access schedule for these entrances and users. + * + * Some access control systems use [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups), which are sets of users, combined with sets of permissions. These permissions include both the set of areas or assets that the users can access and the schedule during which the users can access these areas or assets. Instead of assigning access rights individually to each access control system user, which can be time-consuming and error-prone, administrators can assign users to an access group, thereby ensuring that the users inherit all the permissions associated with the access group. Using access groups streamlines the process of managing large numbers of access control system users, especially in bigger organizations or complexes. + * + * To learn whether your access control system supports access groups, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). + */ export type AcsAccessGroup = { + /** + * @deprecated Use `external_type`. + */ access_group_type: | 'pti_unit' | 'pti_access_level' @@ -16,32 +26,79 @@ export type AcsAccessGroup = { | 'kisi_access_group' | 'akiles_member_group' + /** + * @deprecated Use `external_type_display_name`. + */ access_group_type_display_name: string + /** + * `starts_at` and `ends_at` timestamps for the access group's access. + */ access_schedule?: | { + /** + * Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ ends_at: string | null + /** + * Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at: string } | undefined + /** + * ID of the access group. + */ acs_access_group_id: string + /** + * ID of the access control system that contains the access group. + */ acs_system_id: string + /** + * ID of the connected account that contains the access group. + */ connected_account_id: string + /** + * Date and time at which the access group was created. + */ created_at: string + /** + * Display name for the access group. + */ display_name: string - errors: Array<{ - created_at: string - - error_code: 'failed_to_create_on_acs_system' - - message: string - }> + /** + * Errors associated with the `acs_access_group`. + */ + errors: Array< + /** + * Indicates that the [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups) was not created on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co). + */ + { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_create_on_acs_system' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } + > + /** + * Brand-specific terminology for the access group type. + */ external_type: | 'pti_unit' | 'pti_access_level' @@ -54,116 +111,292 @@ export type AcsAccessGroup = { | 'kisi_access_group' | 'akiles_member_group' + /** + * Display name that corresponds to the brand-specific terminology for the access group type. + */ external_type_display_name: string + /** + * Indicates whether Seam manages the access group. + */ is_managed: boolean + /** + * Name of the access group. + */ name: string + /** + * Collection of pending mutations for the access group. Represents operations that have been requested but not yet completed on the integrated access system. + */ pending_mutations: Array< + /** + * Seam is in the process of pushing an access group creation to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing an access group creation to the integrated access system. + */ mutation_code: 'creating' - } + } /** + * Seam is in the process of pushing an access group deletion to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing an access group deletion to the integrated access system. + */ mutation_code: 'deleting' - } + } /** + * This access group is scheduled for automatic deletion when its access window expires. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that this access group is scheduled for automatic deletion when its access window expires. + */ mutation_code: 'deferring_deletion' - } + } /** + * Seam is in the process of pushing an access group information update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old access group information. + */ from: { + /** + * Name of the access group. + */ name?: string | null | undefined } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated access group information to the integrated access system. + */ mutation_code: 'updating_group_information' + /** + * New access group information. + */ to: { + /** + * Name of the access group. + */ name?: string | null | undefined } - } + } /** + * Seam is in the process of pushing an access schedule update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old access schedule information. + */ from: { + /** + * Ending time for the access schedule. + */ ends_at: string | null + /** + * Starting time for the access schedule. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated access schedule information to the integrated access system. + */ mutation_code: 'updating_access_schedule' + /** + * New access schedule information. + */ to: { + /** + * Ending time for the access schedule. + */ ends_at: string | null + /** + * Starting time for the access schedule. + */ starts_at: string | null } - } + } /** + * Seam is in the process of pushing a user membership update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old user membership. + */ from: { + /** + * Old user ID. + */ acs_user_id: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated user membership information to the integrated access system. + */ mutation_code: 'updating_user_membership' + /** + * New user membership. + */ to: { + /** + * New user ID. + */ acs_user_id: string | null } - } + } /** + * Seam is in the process of pushing an entrance membership update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old entrance membership. + */ from: { + /** + * Old entrance ID. + */ acs_entrance_id: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated entrance membership information to the integrated access system. + */ mutation_code: 'updating_entrance_membership' + /** + * New entrance membership. + */ to: { + /** + * New entrance ID. + */ acs_entrance_id: string | null } - } + } /** + * A scheduled user membership change is pending for this access group. + */ | { + /** + * ID of the user involved in the scheduled change. + */ acs_user_id: string + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that a scheduled user membership change is pending for this access group. + */ mutation_code: 'deferring_user_membership_update' + /** + * Whether the user is scheduled to be added to or removed from this access group. + */ variant: 'adding' | 'removing' } > + /** + * Warnings associated with the `acs_access_group`. + */ warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_acs_access_group' | 'being_deleted' }> + /** + * ID of the workspace that contains the access group. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/acs-credential.ts b/src/lib/seam/connect/resources/acs-credential.ts index 98ce99fc..83d573b8 100644 --- a/src/lib/seam/connect/resources/acs-credential.ts +++ b/src/lib/seam/connect/resources/acs-credential.ts @@ -3,35 +3,104 @@ * Do not edit this file. */ +/** + * Means by which an [access control system user](https://docs.seam.co/low-level-apis/access-systems/user-management) gains access at an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). The `acs_credential` object represents a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) that provides an ACS user access within an [access control system](https://docs.seam.co/low-level-apis/access-systems). + * + * An access control system generally uses digital means of access to authorize a user trying to get through a specific entrance. Examples of credentials include plastic key cards, mobile keys, biometric identifiers, and PIN codes. The electronic nature of these credentials, as well as the fact that access is centralized, enables both the rapid provisioning and rescinding of access and the ability to compile access audit logs. + * + * For each `acs_credential`, you define the access method. You can also specify additional properties, such as a PIN code, depending on the credential type. + * + * For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach. Use the lower-level ACS credential API directly only when you specifically need to manage individual credentials. + */ export type AcsCredential = { + /** + * Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_credential_id: string + /** + * ID of the credential pool to which the credential belongs. + */ acs_credential_pool_id?: string | undefined + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_system_id: string + /** + * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ acs_user_id?: string | undefined + /** + * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ assa_abloy_vostio_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Names of the doors to which to grant access in the Vostio access system. + */ door_names?: Array | undefined + /** + * Endpoint ID in the Vostio access system. + */ endpoint_id?: string | undefined + /** + * Key ID in the Vostio access system. + */ key_id?: string | undefined + /** + * Key issuing request ID in the Vostio access system. + */ key_issuing_request_id?: string | undefined + /** + * IDs of the guest entrances to override in the Vostio access system. + */ override_guest_acs_entrance_ids?: Array | undefined } | undefined + /** + * Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_number?: string | null | undefined + /** + * Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ code?: string | null | undefined + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ connected_account_id: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ created_at: string + /** + * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ display_name: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: string @@ -39,6 +108,9 @@ export type AcsCredential = { message: string }> + /** + * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + */ external_type?: | 'pti_card' | 'brivo_credential' @@ -54,74 +126,207 @@ export type AcsCredential = { | 'avigilon_alta_credential' | 'kisi_credential' | undefined + /** + * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ external_type_display_name?: string | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + */ is_issued?: boolean | undefined + /** + * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + */ is_latest_desired_state_synced_with_provider?: boolean | null | undefined + /** + * Indicates whether Seam manages the credential. + */ is_managed: boolean + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + */ is_multi_phone_sync_credential?: boolean | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + */ is_one_time_use?: boolean | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + */ issued_at?: string | null | undefined + /** + * Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + */ latest_desired_state_synced_with_provider_at?: string | null | undefined + /** + * ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ parent_acs_credential_id?: string | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ user_identity_id?: string | undefined + /** + * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ visionline_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Card function type in the Visionline access system. + */ card_function_type?: 'guest' | 'staff' | undefined + /** + * ID of the card in the Visionline access system. + */ card_id?: string | undefined + /** + * Common entrance IDs in the Visionline access system. + */ common_acs_entrance_ids?: Array | undefined + /** + * ID of the credential in the Visionline access system. + */ credential_id?: string | undefined + /** + * Guest entrance IDs in the Visionline access system. + */ guest_acs_entrance_ids?: Array | undefined + /** + * Indicates whether the credential is valid. + */ is_valid?: boolean | undefined + /** + * IDs of the credentials to which you want to join. + */ joiner_acs_credential_ids?: Array | undefined } | undefined + /** + * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ warnings: Array< + /** + * Indicates that the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is waiting to be issued. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'waiting_to_be_issued' - } + } /** + * Indicates that the schedule of one of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials)'s children was modified externally. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'schedule_externally_modified' - } + } /** + * Indicates that the schedule of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was modified to avoid creating a credential with a start date in the past. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'schedule_modified' - } + } /** + * Indicates that the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * An unknown issue occurred while syncing the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with the provider. This issue may affect the proper functioning of the credential. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_acs_credential' - } + } /** + * Access permissions for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) have changed. [Reissue](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners/creating-and-encoding-card-based-credentials) (re-encode) the credential. This issue may affect the proper functioning of the credential. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'needs_to_be_reissued' } > + /** + * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/acs-encoder.ts b/src/lib/seam/connect/resources/acs-encoder.ts index a64a8b44..f05d484a 100644 --- a/src/lib/seam/connect/resources/acs-encoder.ts +++ b/src/lib/seam/connect/resources/acs-encoder.ts @@ -3,24 +3,70 @@ * Do not edit this file. */ +/** + * Represents a hardware device that encodes [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) data onto physical cards within an [access control system](https://docs.seam.co/low-level-apis/access-systems). + * + * Some access control systems require credentials to be encoded onto plastic key cards using a card encoder. This process involves the following two key steps: + * + * 1. Credential creation + * Configure the access parameters for the credential. + * 2. Card encoding + * Write the credential data onto the card using a compatible card encoder. + * + * Separately, the Seam API also supports card scanning, which enables you to scan and read the encoded data on a card. You can use this action to confirm consistency with access control system records or diagnose discrepancies if needed. + * + * See [Working with Card Encoders and Scanners](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + * + * To verify if your access control system requires a card encoder, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). + */ export type AcsEncoder = { + /** + * ID of the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ acs_encoder_id: string + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ acs_system_id: string + /** + * ID of the connected account that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ connected_account_id: string + /** + * Date and time at which the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) was created. + */ created_at: string + /** + * Display name for the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ display_name: string + /** + * Errors associated with the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'acs_encoder_removed' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the workspace that contains the [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/acs-entrance.ts b/src/lib/seam/connect/resources/acs-entrance.ts index aaf554a7..e82a0e92 100644 --- a/src/lib/seam/connect/resources/acs-entrance.ts +++ b/src/lib/seam/connect/resources/acs-entrance.ts @@ -3,123 +3,344 @@ * Do not edit this file. */ +/** + * Represents an [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) within an [access control system](https://docs.seam.co/low-level-apis/access-systems). + * + * In an access control system, an entrance is a secured door, gate, zone, or other method of entry. You can list details for all the `acs_entrance` resources in your workspace or get these details for a specific `acs_entrance`. You can also list all entrances associated with a specific credential, and you can list all credentials associated with a specific entrance. + */ export type AcsEntrance = { + /** + * ID of the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ acs_entrance_id: string + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ acs_system_id: string + /** + * Akiles-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ akiles_metadata?: | { + /** + * Actions the gadget exposes (for example, open). + */ actions?: | Array<{ + /** + * ID of the gadget action. + */ id?: string | undefined + /** + * Name of the gadget action. + */ name?: string | undefined }> | undefined + /** + * ID of the Akiles gadget. + */ gadget_id?: string | undefined + /** + * ID of the Akiles site the gadget belongs to. + */ site_id?: string | undefined + /** + * Name of the Akiles site the gadget belongs to. + */ site_name?: string | undefined } | undefined + /** + * ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ assa_abloy_vostio_metadata?: | { + /** + * Name of the door in the Vostio access system. + */ door_name?: string | undefined + /** + * Number of the door in the Vostio access system. + */ door_number?: number | undefined + /** + * Type of the door in the Vostio access system. + */ door_type?: 'CommonDoor' | 'EntranceDoor' | 'GuestDoor' | 'Elevator' | undefined + /** + * PMS ID of the door in the Vostio access system. + */ pms_id?: string | undefined + /** + * Indicates whether keys are allowed to set the door in stand open mode in the Vostio access system. + */ stand_open?: boolean | undefined } | undefined + /** + * Avigilon Alta-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ avigilon_alta_metadata?: | { + /** + * Entry name for an Avigilon Alta system. + */ entry_name?: string | undefined + /** + * Total count of entry relays for an Avigilon Alta system. + */ entry_relays_total_count?: number | undefined + /** + * Organization name for an Avigilon Alta system. + */ org_name?: string | undefined + /** + * Site ID for an Avigilon Alta system. + */ site_id?: number | undefined + /** + * Site name for an Avigilon Alta system. + */ site_name?: string | undefined + /** + * Zone ID for an Avigilon Alta system. + */ zone_id?: number | undefined + /** + * Zone name for an Avigilon Alta system. + */ zone_name?: string | undefined } | undefined + /** + * Brivo-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ brivo_metadata?: | { + /** + * ID of the access point in the Brivo access system. + */ access_point_id?: string | undefined + /** + * ID of the site that the access point belongs to. + */ site_id?: number | undefined + /** + * Name of the site that the access point belongs to. + */ site_name?: string | undefined } | undefined + /** + * Indicates whether the ACS entrance can belong to a reservation via an access_grant.reservation_key. + */ can_belong_to_reservation?: boolean | undefined + /** + * Indicates whether the ACS entrance can be unlocked with card credentials. + */ can_unlock_with_card?: boolean | undefined + /** + * Indicates whether the ACS entrance can be unlocked with cloud key credentials. + */ can_unlock_with_cloud_key?: boolean | undefined + /** + * Indicates whether the ACS entrance can be unlocked with pin codes. + */ can_unlock_with_code?: boolean | undefined + /** + * Indicates whether the ACS entrance can be unlocked with mobile key credentials. + */ can_unlock_with_mobile_key?: boolean | undefined + /** + * ID of the [connected account](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ connected_account_id: string + /** + * Date and time at which the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) was created. + */ created_at: string + /** + * Display name for the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ display_name: string + /** + * dormakaba Ambiance-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ dormakaba_ambiance_metadata?: | { + /** + * Name of the access point in the dormakaba Ambiance access system. + */ access_point_name?: string | undefined } | undefined + /** + * dormakaba Community-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ dormakaba_community_metadata?: | { + /** + * Type of access point profile in the dormakaba Community access system. + */ access_point_profile?: string | undefined } | undefined + /** + * Errors associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * Hotek-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ hotek_metadata?: | { + /** + * Display name of the entrance. + */ common_area_name?: string | undefined + /** + * Display name of the entrance. + */ common_area_number?: string | undefined + /** + * Room number of the entrance. + */ room_number?: string | undefined } | undefined + /** + * Indicates whether the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) is currently locked. + */ is_locked?: boolean | undefined + /** + * Latch-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ latch_metadata?: | { + /** + * Accessibility type in the Latch access system. + */ accessibility_type?: string | undefined + /** + * Name of the door in the Latch access system. + */ door_name?: string | undefined + /** + * Type of the door in the Latch access system. + */ door_type?: string | undefined + /** + * Indicates whether the entrance is connected. + */ is_connected?: boolean | undefined } | undefined + /** + * Salto KS-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ salto_ks_metadata?: | { + /** + * Battery level of the door access device. + */ battery_level?: string | undefined + /** + * Name of the door in the Salto KS access system. + */ door_name?: string | undefined + /** + * Indicates whether an intrusion alarm is active on the door. + */ intrusion_alarm?: boolean | undefined + /** + * Indicates whether the door is left open. + */ left_open_alarm?: boolean | undefined + /** + * Type of the lock in the Salto KS access system. + */ lock_type?: string | undefined + /** + * Locked state of the door in the Salto KS access system. + */ locked_state?: string | undefined + /** + * Indicates whether the door access device is online. + */ online?: boolean | undefined + /** + * Indicates whether privacy mode is enabled for the lock. + */ privacy_mode?: boolean | undefined } | undefined + /** + * Salto Space-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ salto_space_metadata?: | { + /** + * Indicates whether AuditOnKeys is enabled for the door in the Salto Space access system. + */ audit_on_keys?: boolean | undefined + /** + * Description of the door in the Salto Space access system. + */ door_description?: string | undefined + /** + * Door ID in the Salto Space access system. + */ door_id?: string | undefined + /** + * Name of the door in the Salto Space access system. + */ door_name?: string | undefined + /** + * Description of the room in the Salto Space access system. + */ room_description?: string | undefined + /** + * Name of the room in the Salto Space access system. + */ room_name?: string | undefined } | undefined + /** + * IDs of the spaces that the entrance is in. + */ space_ids: Array + /** + * Visionline-specific metadata associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ visionline_metadata?: | { + /** + * Category of the door in the Visionline access system. + */ door_category?: | 'entrance' | 'guest' @@ -127,50 +348,121 @@ export type AcsEntrance = { | 'common' | 'common (PMS)' | undefined + /** + * Name of the door in the Visionline access system. + */ door_name?: string | undefined + /** + * Profile for the door in the Visionline access system. + */ profiles?: | Array<{ + /** + * Door profile ID in the Visionline access system. + */ visionline_door_profile_id?: string | undefined + /** + * Door profile type in the Visionline access system. + */ visionline_door_profile_type?: 'BLE' | 'commonDoor' | 'touch' | undefined }> | undefined } | undefined + /** + * Warnings associated with the [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ warnings: Array< + /** + * Indicates that a change in the reported device model has been detected for this Salto KS entrance, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_entrance_access_code_support_removed' - } + } /** + * Indicates that this entrance shares a zone with other entrances in Avigilon Alta and cannot be added to an access group individually. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'entrance_shares_zone' - } + } /** + * Indicates that this entrance requires additional configuration in the access control system before Seam can fully manage it. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'entrance_setup_required' - } + } /** + * deprecated: Use `privacy_mode` instead. Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_privacy_mode' - } + } /** + * Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'privacy_mode' } > diff --git a/src/lib/seam/connect/resources/acs-system.ts b/src/lib/seam/connect/resources/acs-system.ts index 62adbf58..00336a48 100644 --- a/src/lib/seam/connect/resources/acs-system.ts +++ b/src/lib/seam/connect/resources/acs-system.ts @@ -3,78 +3,210 @@ * Do not edit this file. */ +/** + * Represents an [access control system](https://docs.seam.co/low-level-apis/access-systems). + * + * Within an `acs_system`, create [`acs_user`s](https://docs.seam.co/api/acs/users/object) and [`acs_credential`s](https://docs.seam.co/api/acs/credentials/object) to grant access to the `acs_user`s. + * + * For details about the resources associated with an access control system, see the [access control systems namespace](https://docs.seam.co/api/acs). + */ export type AcsSystem = { + /** + * Number of access groups in the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ acs_access_group_count?: number | undefined + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ acs_system_id: string + /** + * Number of users in the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ acs_user_count?: number | undefined + /** + * ID of the connected account associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ connected_account_id: string + /** + * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). + * @deprecated Use `connected_account_id`. + */ connected_account_ids: Array + /** + * Date and time at which the [access control system](https://docs.seam.co/low-level-apis/access-systems) was created. + */ created_at: string + /** + * ID of the default credential manager `acs_system` for this [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ default_credential_manager_acs_system_id?: string | null | undefined + /** + * Errors associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ errors: Array< + /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. + * This error might also occur if Seam Bridge is connected to the wrong [workspace](https://docs.seam.co/core-concepts/workspaces). + * See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'seam_bridge_disconnected' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. + * See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'bridge_disconnected' + /** + * Indicates whether the error is related to the [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge) is functioning correctly and the Seam API can communicate with Seam Bridge, but the Seam API cannot connect to the on-premises [Visionline access control system](https://docs.seam.co/device-and-system-integration-guides/assa-abloy-visionline-access-control-system). + * For example, the IP address of the on-premises access control system may be set incorrectly within the Seam [workspace](https://docs.seam.co/core-concepts/workspaces). + * See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-visionline_instance_unreachable). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'visionline_instance_unreachable' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the maximum number of users allowed for the site has been reached. This means that new access codes cannot be created. Contact Salto support to increase the user limit. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access control system](https://docs.seam.co/low-level-apis/access-systems) has been disconnected. See [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system) to resolve the issue. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'acs_system_disconnected' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the login credentials are invalid. Reconnect the account using a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) to restore access. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'account_disconnected' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access control system](https://docs.seam.co/low-level-apis/access-systems) has lost its Salto KS certification. Contact [support](mailto:support@seam.co) to regain access. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_certification_expired' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the access control system provider's service is temporarily unavailable. Seam will automatically retry and reconnect when the service becomes available again. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'provider_service_unavailable' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * Brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. + */ external_type?: | 'pti_site' | 'avigilon_alta_org' @@ -94,19 +226,43 @@ export type AcsSystem = { | 'kisi_organization' | 'akiles_organization' | undefined + /** + * Display name that corresponds to the brand-specific terminology for the [access control system](https://docs.seam.co/low-level-apis/access-systems) type. + */ external_type_display_name?: string | undefined + /** + * Alternative text for the [access control system](https://docs.seam.co/low-level-apis/access-systems) image. + */ image_alt_text: string + /** + * URL for the image that represents the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ image_url: string + /** + * Indicates whether the `acs_system` is a credential manager. + */ is_credential_manager: boolean + /** + * Location information for the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ location: { + /** + * Time zone in which the [access control system](https://docs.seam.co/low-level-apis/access-systems) is located. + */ time_zone: string | null } + /** + * Name of the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ name: string + /** + * @deprecated Use `external_type`. + */ system_type?: | 'pti_site' | 'avigilon_alta_org' @@ -126,38 +282,96 @@ export type AcsSystem = { | 'kisi_organization' | 'akiles_organization' | undefined + /** + * @deprecated Use `external_type_display_name`. + */ system_type_display_name?: string | undefined + /** + * Visionline-specific metadata for the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ visionline_metadata?: | { + /** + * IP address or hostname of the main Visionline server relative to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge) on the local network. + */ lan_address?: string | undefined + /** + * Keyset loaded into a reader. Mobile keys and reader administration tools securely authenticate only with readers programmed with a matching keyset. + */ mobile_access_uuid?: string | undefined + /** + * Unique ID assigned by the ASSA ABLOY licensing team that identifies each hotel in your credential manager. + */ system_id?: string | undefined } | undefined + /** + * Warnings associated with the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ warnings: Array< + /** + * Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site to rectify the issue. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_subscription_limit_almost_reached' - } + } /** + * Indicates the [access control system](https://docs.seam.co/low-level-apis/access-systems) time zone could not be determined because the reported physical location does not match the time zone configured on the physical [ACS entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * @deprecated this field is deprecated. + */ misconfigured_acs_entrance_ids?: Array | undefined + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_zone_does_not_match_location' - } + } /** + * Indicates that the access control system requires additional setup before it can be fully operational. Follow the instructions in the warning message to complete the setup. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'setup_required' } > + /** + * ID of the workspace that contains the [access control system](https://docs.seam.co/low-level-apis/access-systems). + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/acs-user.ts b/src/lib/seam/connect/resources/acs-user.ts index f2feaef2..9520b50a 100644 --- a/src/lib/seam/connect/resources/acs-user.ts +++ b/src/lib/seam/connect/resources/acs-user.ts @@ -3,70 +3,162 @@ * Do not edit this file. */ +/** + * Represents a [user](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access system](https://docs.seam.co/low-level-apis/access-systems). + * + * An access system user typically refers to an individual who requires access, like an employee or resident. Each user can possess multiple credentials that serve as their keys or identifiers for access. The type of credential can vary widely. For example, in the Salto system, a user can have a PIN code, a mobile app account, and a fob. In other platforms, it is not uncommon for a user to have more than one of the same credential type, such as multiple key cards. Additionally, these credentials can have a schedule or validity period. + * + * For details about how to configure users in your access system, see the corresponding [system integration guide](https://docs.seam.co/device-and-system-integration-guides#access-control-systems). + */ export type AcsUser = { + /** + * `starts_at` and `ends_at` timestamps for the [access system user's](https://docs.seam.co/low-level-apis/access-systems/user-management) access. + */ access_schedule?: | { + /** + * Date and time at which the user's access ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ ends_at: string | null + /** + * Date and time at which the user's access starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at: string } | undefined + /** + * ID of the [access system](https://docs.seam.co/low-level-apis/access-systems) that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ acs_system_id: string + /** + * ID of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ acs_user_id: string + /** + * The ID of the connected account that is associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ connected_account_id: string + /** + * Date and time at which the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created. + */ created_at: string + /** + * Display name for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ display_name: string + /** + * @deprecated use email_address. + */ email?: string | undefined + /** + * Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ email_address?: string | undefined + /** + * Errors associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ errors: Array< + /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was deleted from the [access system](https://docs.seam.co/low-level-apis/access-systems) outside of Seam. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: 'deleted_externally' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) could not be subscribed on Salto KS because the subscription limit has been exceeded. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was not created on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: 'failed_to_create_on_acs_system' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was not updated on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: 'failed_to_update_on_acs_system' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was not deleted on the [access system](https://docs.seam.co/low-level-apis/access-systems). This is likely due to an internal unexpected error. Contact Seam [support](mailto:support@seam.co). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: 'failed_to_delete_on_acs_system' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created from the Seam API but also exists on Mission Control. This is unsupported. Contact Seam [support](mailto:support@seam.co). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: 'latch_conflict_with_resident_user' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * Brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type. + */ external_type?: | 'pti_user' | 'brivo_user' @@ -78,184 +170,458 @@ export type AcsUser = { | 'avigilon_alta_user' | 'kisi_user' | undefined + /** + * Display name that corresponds to the brand-specific terminology for the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) type. + */ external_type_display_name?: string | undefined + /** + * Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ full_name?: string | undefined + /** + * ID of the HID access control system associated with the user. + */ hid_acs_system_id?: string | undefined + /** + * Indicates whether Seam manages the access system user. + */ is_managed: boolean + /** + * Indicates whether the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is currently [suspended](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users). + */ is_suspended?: boolean | undefined + /** + * Pending mutations associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Seam is in the process of pushing these mutations to the integrated access system. + */ pending_mutations?: | Array< + /** + * Seam is in the process of pushing a user creation to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing a user creation to the integrated access system. + */ mutation_code: 'creating' - } + } /** + * Seam is in the process of pushing a user deletion to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing a user deletion to the integrated access system. + */ mutation_code: 'deleting' - } + } /** + * User exists in Seam but has not been pushed to the provider yet. Will be created when a credential is issued. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is intentionally deferring the creation of the user on the access control system until the appropriate time. + */ mutation_code: 'deferring_creation' + /** + * Optional: When the user creation is scheduled to occur. + */ scheduled_at?: string | null | undefined } | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old access system user information. + */ from: { + /** + * Email address of the access system user. + */ email_address?: string | null | undefined + /** + * Full name of the access system user. + */ full_name?: string | null | undefined + /** + * Phone number of the access system user. + */ phone_number?: string | null | undefined } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated user information to the integrated access system. + */ mutation_code: 'updating_user_information' + /** + * New access system user information. + */ to: { + /** + * Email address of the access system user. + */ email_address?: string | null | undefined + /** + * Full name of the access system user. + */ full_name?: string | null | undefined + /** + * Phone number of the access system user. + */ phone_number?: string | null | undefined } - } + } /** + * Seam is in the process of pushing an access schedule update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old access schedule information. + */ from: { + /** + * Starting time for the access schedule. + */ ends_at: string | null + /** + * Starting time for the access schedule. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated access schedule information to the integrated access system. + */ mutation_code: 'updating_access_schedule' + /** + * New access schedule information. + */ to: { + /** + * Starting time for the access schedule. + */ ends_at: string | null + /** + * Starting time for the access schedule. + */ starts_at: string | null } - } + } /** + * Seam is in the process of pushing a suspension state update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old user suspension state information. + */ from: { is_suspended: boolean } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated user suspension state information to the integrated access system. + */ mutation_code: 'updating_suspension_state' + /** + * New user suspension state information. + */ to: { is_suspended: boolean } - } + } /** + * Seam is in the process of pushing an access group membership update to the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Old access group membership. + */ from: { + /** + * Old access group ID. + */ acs_access_group_id: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of pushing updated access group membership information to the integrated access system. + */ mutation_code: 'updating_group_membership' + /** + * New access group membership. + */ to: { + /** + * New access group ID. + */ acs_access_group_id: string | null } - } + } /** + * A scheduled access group membership change is pending for this user. + */ | { + /** + * ID of the access group involved in the scheduled change. + */ acs_access_group_id: string + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that a scheduled access group membership change is pending for this user. + */ mutation_code: 'deferring_group_membership_update' + /** + * Whether the user is scheduled to be added to or removed from the access group. + */ variant: 'adding' | 'removing' - } + } /** + * Seam is in the process of assigning or unassigning a credential to the user on the integrated access system. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous credential assignment. + */ from: { + /** + * Previous credential ID. + */ acs_credential_id: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of assigning or unassigning a credential to the user on the integrated access system. + */ mutation_code: 'updating_credential_assignment' + /** + * New credential assignment. + */ to: { + /** + * New credential ID. + */ acs_credential_id: string | null } } > | undefined + /** + * Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + */ phone_number?: string | undefined + /** + * Salto KS-specific metadata associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ salto_ks_metadata?: | { + /** + * Indicates whether the user holds an active subscription slot on the Salto KS site. Only subscribed users can unlock doors and count against the site's user-subscription limit. A user may not be subscribed because their access schedule has not started or has ended, the site has reached its subscription limit, or they were manually unsubscribed. This is distinct from `is_suspended`, which reflects whether the user has been explicitly blocked. + */ is_subscribed?: boolean | undefined } | undefined + /** + * Salto Space-specific metadata associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ salto_space_metadata?: | { + /** + * Indicates whether AuditOpenings is enabled for the user in the Salto Space access system. + */ audit_openings?: boolean | undefined + /** + * User ID in the Salto Space access system. + */ user_id?: string | undefined } | undefined + /** + * Email address of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ user_identity_email_address?: string | null | undefined + /** + * Full name of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ user_identity_full_name?: string | null | undefined + /** + * ID of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ user_identity_id?: string | undefined + /** + * Phone number of the user identity associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + */ user_identity_phone_number?: string | null | undefined + /** + * Warnings associated with the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ warnings: Array< + /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is being deleted from the [access system](https://docs.seam.co/low-level-apis/access-systems). This is a temporary state, and the access system user will be deleted shortly. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string warning_code: 'being_deleted' - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) is not subscribed on Salto KS, so they cannot unlock doors or perform any actions. This occurs when the their access schedule hasn’t started yet, if their access schedule has ended, if the site has reached its limit for active users (subscription slots), or if they have been manually unsubscribed. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string warning_code: 'salto_ks_user_not_subscribed' - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) exists but is not currently able to gain access—for example, because their access schedule has not started yet or has ended, the access system has reached its limit for active users, or they have been unsubscribed or deactivated. Refer to the warning message for the provider-specific reason. This is distinct from `is_suspended`, which indicates the user has been explicitly blocked. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string warning_code: 'acs_user_inactive' - } + } /** + * An unknown issue occurred while syncing the state of this [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) with the provider. This issue may affect the proper functioning of this user. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string warning_code: 'unknown_issue_with_acs_user' - } + } /** + * Indicates that the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) was created on Latch Mission Control. Please use the Latch Mission Control to manage this user. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string warning_code: 'latch_resident_user' } > + /** + * ID of the workspace that contains the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/action-attempt.ts b/src/lib/seam/connect/resources/action-attempt.ts index 5fd6cc77..9f6b776d 100644 --- a/src/lib/seam/connect/resources/action-attempt.ts +++ b/src/lib/seam/connect/resources/action-attempt.ts @@ -3,49 +3,106 @@ * Do not edit this file. */ +/** + * Locking a door is pending. + */ export type ActionAttempt = | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of locking a door. + */ action_type: 'LOCK_DOOR' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: { + /** + * Indicates whether the device confirmed that the lock action occurred. + */ was_confirmed_by_device?: boolean | undefined } status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of unlocking a door. + */ action_type: 'UNLOCK_DOOR' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: { + /** + * Indicates whether the device confirmed that the unlock action occurred. + */ was_confirmed_by_device?: boolean | undefined } status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of scanning a credential. + */ action_type: 'SCAN_CREDENTIAL' error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Error type to indicate that the Seam Bridge is disconnected or cannot reach the access control system. + */ type: | 'uncategorized_error' | 'action_attempt_expired' @@ -55,59 +112,182 @@ export type ActionAttempt = | 'bridge_disconnected' } + /** + * Result of scanning a card. If the attempt was successful, includes a snapshot of credential data read from the physical encoder, the corresponding data stored on Seam and the access system, and any associated warnings. + */ result: { + /** + * Snapshot of credential data read from the physical encoder. + */ acs_credential_on_encoder: { + /** + * A number or string that physically identifies the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_number: string | null + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ created_at: string | null + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) will stop being usable. + */ ends_at: string | null + /** + * Indicates whether the credential has been issued (encoded onto a card). + */ is_issued: boolean | null + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) becomes usable. + */ starts_at: string | null + /** + * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ visionline_metadata?: | { + /** + * Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is cancelled. + */ cancelled?: boolean | undefined + /** + * Format of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_format?: 'TLCode' | 'rfid48' | undefined + /** + * Holder of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_holder?: string | undefined + /** + * Card ID for the Visionline card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_id?: string | undefined + /** + * IDs of the common [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ common_acs_entrance_ids?: Array | undefined + /** + * Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is discarded. + */ discarded?: boolean | undefined + /** + * Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is expired. + */ expired?: boolean | undefined + /** + * IDs of the guest [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ guest_acs_entrance_ids?: Array | undefined + /** + * Number of issued cards associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ number_of_issued_cards?: number | undefined + /** + * Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is overridden. + */ overridden?: boolean | undefined + /** + * Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is overwritten. + */ overwritten?: boolean | undefined + /** + * Indicates whether the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is pending auto-update. + */ pending_auto_update?: boolean | undefined } | undefined } | null + /** + * Corresponding credential data as stored on Seam and the access system. + */ acs_credential_on_seam: { + /** + * Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_credential_id: string + /** + * ID of the credential pool to which the credential belongs. + */ acs_credential_pool_id?: string | undefined + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_system_id: string + /** + * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ acs_user_id?: string | undefined + /** + * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ assa_abloy_vostio_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Names of the doors to which to grant access in the Vostio access system. + */ door_names?: Array | undefined + /** + * Endpoint ID in the Vostio access system. + */ endpoint_id?: string | undefined + /** + * Key ID in the Vostio access system. + */ key_id?: string | undefined + /** + * Key issuing request ID in the Vostio access system. + */ key_issuing_request_id?: string | undefined + /** + * IDs of the guest entrances to override in the Vostio access system. + */ override_guest_acs_entrance_ids?: Array | undefined } | undefined + /** + * Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_number?: string | null | undefined + /** + * Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ code?: string | null | undefined + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ connected_account_id: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ created_at: string + /** + * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ display_name: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: string @@ -115,6 +295,9 @@ export type ActionAttempt = message: string }> + /** + * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + */ external_type?: | 'pti_card' | 'brivo_credential' @@ -130,37 +313,107 @@ export type ActionAttempt = | 'avigilon_alta_credential' | 'kisi_credential' | undefined + /** + * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ external_type_display_name?: string | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + */ is_issued?: boolean | undefined + /** + * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + */ is_latest_desired_state_synced_with_provider?: boolean | null | undefined + is_managed: boolean + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + */ is_multi_phone_sync_credential?: boolean | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + */ is_one_time_use?: boolean | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + */ issued_at?: string | null | undefined + /** + * Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + */ latest_desired_state_synced_with_provider_at?: string | null | undefined + /** + * ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ parent_acs_credential_id?: string | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ user_identity_id?: string | undefined + /** + * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ visionline_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Card function type in the Visionline access system. + */ card_function_type?: 'guest' | 'staff' | undefined + /** + * ID of the card in the Visionline access system. + */ card_id?: string | undefined + /** + * Common entrance IDs in the Visionline access system. + */ common_acs_entrance_ids?: Array | undefined + /** + * ID of the credential in the Visionline access system. + */ credential_id?: string | undefined + /** + * Guest entrance IDs in the Visionline access system. + */ guest_acs_entrance_ids?: Array | undefined + /** + * Indicates whether the credential is valid. + */ is_valid?: boolean | undefined + /** + * IDs of the credentials to which you want to join. + */ joiner_acs_credential_ids?: Array | undefined } | undefined + /** + * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: | 'waiting_to_be_issued' | 'schedule_externally_modified' @@ -170,14 +423,26 @@ export type ActionAttempt = | 'needs_to_be_reissued' }> + /** + * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ workspace_id: string } + /** + * Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system. + */ warnings: Array<{ + /** + * Indicates a warning related to scanning a credential. + */ warning_code: | 'acs_credential_on_encoder_out_of_sync' | 'acs_credential_on_seam_not_found' + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ warning_message: string }> } @@ -185,13 +450,25 @@ export type ActionAttempt = status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of encoding credential data from the physical encoder onto a card. + */ action_type: 'ENCODE_CREDENTIAL' error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Error type to indicate that the credential was deleted and can no longer be encoded. + */ type: | 'uncategorized_error' | 'action_attempt_expired' @@ -205,35 +482,98 @@ export type ActionAttempt = | 'credential_deleted' } + /** + * Result of an encoding attempt. If the attempt was successful, includes the credential data that was encoded onto the card. + */ result: { + /** + * Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_credential_id: string + /** + * ID of the credential pool to which the credential belongs. + */ acs_credential_pool_id?: string | undefined + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_system_id: string + /** + * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ acs_user_id?: string | undefined + /** + * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ assa_abloy_vostio_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Names of the doors to which to grant access in the Vostio access system. + */ door_names?: Array | undefined + /** + * Endpoint ID in the Vostio access system. + */ endpoint_id?: string | undefined + /** + * Key ID in the Vostio access system. + */ key_id?: string | undefined + /** + * Key issuing request ID in the Vostio access system. + */ key_issuing_request_id?: string | undefined + /** + * IDs of the guest entrances to override in the Vostio access system. + */ override_guest_acs_entrance_ids?: Array | undefined } | undefined + /** + * Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_number?: string | null | undefined + /** + * Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ code?: string | null | undefined + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ connected_account_id: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ created_at: string + /** + * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ display_name: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: string @@ -241,6 +581,9 @@ export type ActionAttempt = message: string }> + /** + * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + */ external_type?: | 'pti_card' | 'brivo_credential' @@ -256,36 +599,106 @@ export type ActionAttempt = | 'avigilon_alta_credential' | 'kisi_credential' | undefined + /** + * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ external_type_display_name?: string | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + */ is_issued?: boolean | undefined + /** + * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + */ is_latest_desired_state_synced_with_provider?: boolean | null | undefined + is_managed: boolean + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + */ is_multi_phone_sync_credential?: boolean | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + */ is_one_time_use?: boolean | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + */ issued_at?: string | null | undefined + /** + * Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + */ latest_desired_state_synced_with_provider_at?: string | null | undefined + /** + * ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ parent_acs_credential_id?: string | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ user_identity_id?: string | undefined + /** + * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ visionline_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Card function type in the Visionline access system. + */ card_function_type?: 'guest' | 'staff' | undefined + /** + * ID of the card in the Visionline access system. + */ card_id?: string | undefined + /** + * Common entrance IDs in the Visionline access system. + */ common_acs_entrance_ids?: Array | undefined + /** + * ID of the credential in the Visionline access system. + */ credential_id?: string | undefined + /** + * Guest entrance IDs in the Visionline access system. + */ guest_acs_entrance_ids?: Array | undefined + /** + * Indicates whether the credential is valid. + */ is_valid?: boolean | undefined + /** + * IDs of the credentials to which you want to join. + */ joiner_acs_credential_ids?: Array | undefined } | undefined + /** + * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: | 'waiting_to_be_issued' | 'schedule_externally_modified' @@ -295,54 +708,132 @@ export type ActionAttempt = | 'needs_to_be_reissued' }> + /** + * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ workspace_id: string } status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of scanning a physical card and assigning the credential to an ACS user. + */ action_type: 'SCAN_TO_ASSIGN_CREDENTIAL' error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Error type to indicate that there is no credential on the encoder. + */ type: | 'uncategorized_error' | 'action_attempt_expired' | 'no_credential_on_encoder' } + /** + * Result of a scan to assign attempt. If the attempt was successful, includes the credential data that was scanned and assigned. + */ result: { + /** + * Access method for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_credential_id: string + /** + * ID of the credential pool to which the credential belongs. + */ acs_credential_pool_id?: string | undefined + /** + * ID of the [access control system](https://docs.seam.co/low-level-apis/access-systems) that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ acs_system_id: string + /** + * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ acs_user_id?: string | undefined + /** + * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ assa_abloy_vostio_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Names of the doors to which to grant access in the Vostio access system. + */ door_names?: Array | undefined + /** + * Endpoint ID in the Vostio access system. + */ endpoint_id?: string | undefined + /** + * Key ID in the Vostio access system. + */ key_id?: string | undefined + /** + * Key issuing request ID in the Vostio access system. + */ key_issuing_request_id?: string | undefined + /** + * IDs of the guest entrances to override in the Vostio access system. + */ override_guest_acs_entrance_ids?: Array | undefined } | undefined + /** + * Number of the card associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ card_number?: string | null | undefined + /** + * Access (PIN) code for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ code?: string | null | undefined + /** + * ID of the [connected account](https://docs.seam.co/core-concepts/connected-accounts) to which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ connected_account_id: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was created. + */ created_at: string + /** + * Display name that corresponds to the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ display_name: string + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Errors associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string error_code: string @@ -350,6 +841,9 @@ export type ActionAttempt = message: string }> + /** + * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. + */ external_type?: | 'pti_card' | 'brivo_credential' @@ -365,36 +859,108 @@ export type ActionAttempt = | 'avigilon_alta_credential' | 'kisi_credential' | undefined + /** + * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. + */ external_type_display_name?: string | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been encoded onto a card. + */ is_issued?: boolean | undefined + /** + * Indicates whether the latest state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) has been synced from Seam to the provider. + */ is_latest_desired_state_synced_with_provider?: boolean | null | undefined + /** + * Indicates whether Seam manages the credential. + */ is_managed: boolean + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + */ is_multi_phone_sync_credential?: boolean | undefined + /** + * Indicates whether the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. + */ is_one_time_use?: boolean | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was encoded onto a card. + */ issued_at?: string | null | undefined + /** + * Date and time at which the state of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) was most recently synced from Seam to the provider. + */ latest_desired_state_synced_with_provider_at?: string | null | undefined + /** + * ID of the parent [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ parent_acs_credential_id?: string | undefined + /** + * Date and time at which the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/api/user_identities) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs. + */ user_identity_id?: string | undefined + /** + * Visionline-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ visionline_metadata?: | { + /** + * Indicates whether the credential should auto-join. For an auto-join credential, Seam automatically issues an override card if there are no other cards and a joiner card if there are existing cards on the doors. + */ auto_join?: boolean | undefined + /** + * Card function type in the Visionline access system. + */ card_function_type?: 'guest' | 'staff' | undefined + /** + * ID of the card in the Visionline access system. + */ card_id?: string | undefined + /** + * Common entrance IDs in the Visionline access system. + */ common_acs_entrance_ids?: Array | undefined + /** + * ID of the credential in the Visionline access system. + */ credential_id?: string | undefined + /** + * Guest entrance IDs in the Visionline access system. + */ guest_acs_entrance_ids?: Array | undefined + /** + * Indicates whether the credential is valid. + */ is_valid?: boolean | undefined + /** + * IDs of the credentials to which you want to join. + */ joiner_acs_credential_ids?: Array | undefined } | undefined + /** + * Warnings associated with the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: | 'waiting_to_be_issued' | 'schedule_externally_modified' @@ -404,312 +970,702 @@ export type ActionAttempt = | 'needs_to_be_reissued' }> + /** + * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ workspace_id: string } status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of assigning a pre-registered card credential to an access method. + */ action_type: 'ASSIGN_CREDENTIAL' error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Error type to indicate that no matching credential was found. + */ type: | 'uncategorized_error' | 'action_attempt_expired' | 'credential_not_found' } + /** + * Result of assigning a credential. If successful, includes the updated access method with the assigned credential. + */ result: { + /** + * ID of the access method. + */ access_method_id: string + /** + * Token of the client session associated with the access method. + */ client_session_token?: string | undefined + /** + * The actual PIN code for code access methods. + */ code?: string | null | undefined + /** + * Date and time at which the access method was created. + */ created_at: string + /** + * ID of the customization profile associated with the access method. + */ customization_profile_id?: string | undefined + /** + * Display name of the access method. + */ display_name: string + /** + * Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'failed_to_issue' + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * URL of the Instant Key for mobile key access methods. + */ instant_key_url?: string | undefined + /** + * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + */ is_assignment_required?: boolean | undefined + /** + * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + */ is_encoding_required?: boolean | undefined + /** + * Indicates whether the access method has been issued. + */ is_issued: boolean + /** + * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + */ is_ready_for_assignment?: boolean | undefined + /** + * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + */ is_ready_for_encoding?: boolean | undefined + /** + * Date and time at which the access method was issued. + */ issued_at: string | null + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + */ pending_mutations: Array<{ + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous access time configuration. + */ from: { + /** + * Previous end time for access. + */ ends_at: string | null + /** + * Previous start time for access. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the access times for this access method. + */ mutation_code: 'provisioning_access' | 'revoking_access' | 'updating_access_times' + /** + * New access time configuration. + */ to: { + /** + * New end time for access. + */ ends_at: string | null + /** + * New start time for access. + */ starts_at: string | null } }> + /** + * Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + */ warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: | 'being_deleted' | 'updating_access_times' | 'pulled_backup_access_code' | 'delay_in_issuing' + /** + * ID of the original access method from which this backup access method was split, if applicable. + */ original_access_method_id?: string | undefined }> + /** + * ID of the Seam workspace associated with the access method. + */ workspace_id: string } status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of resetting a sandbox workspace. + */ action_type: 'RESET_SANDBOX_WORKSPACE' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of setting the fan mode on a thermostat. + */ action_type: 'SET_FAN_MODE' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of setting the HVAC mode on a thermostat. + */ action_type: 'SET_HVAC_MODE' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of a climate preset activation. + */ action_type: 'ACTIVATE_CLIMATE_PRESET' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of simulating a keypad code entry. + */ action_type: 'SIMULATE_KEYPAD_CODE_ENTRY' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of simulating a manual lock action using a keypad. + */ action_type: 'SIMULATE_MANUAL_LOCK_VIA_KEYPAD' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of pushing thermostat programs. + */ action_type: 'PUSH_THERMOSTAT_PROGRAMS' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Action attempt to track the status of configuring the auto-lock on a lock. + */ action_type: 'CONFIGURE_AUTO_LOCK' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Syncing access codes is pending. + */ action_type: 'SYNC_ACCESS_CODES' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Creating an access code is pending. + */ action_type: 'CREATE_ACCESS_CODE' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Deleting an access code is pending. + */ action_type: 'DELETE_ACCESS_CODE' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Updating an access code is pending. + */ action_type: 'UPDATE_ACCESS_CODE' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Creating a noise threshold is pending. + */ action_type: 'CREATE_NOISE_THRESHOLD' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Deleting a noise threshold is pending. + */ action_type: 'DELETE_NOISE_THRESHOLD' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' } | { + /** + * ID of the action attempt. + */ action_attempt_id: string + /** + * Updating a noise threshold is pending. + */ action_type: 'UPDATE_NOISE_THRESHOLD' + /** + * Error associated with the action. + */ error: { + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Type of the error. + */ type: string } + /** + * Result of the action. + */ result: {} status: 'success' | 'pending' | 'error' diff --git a/src/lib/seam/connect/resources/batch.ts b/src/lib/seam/connect/resources/batch.ts index 22cd4768..5d39b883 100644 --- a/src/lib/seam/connect/resources/batch.ts +++ b/src/lib/seam/connect/resources/batch.ts @@ -55,6 +55,9 @@ interface BatchResourceMap { workspaces: Workspace } +/** + * A batch of workspace resources. + */ export type Batch< TKey extends keyof BatchResourceMap = keyof BatchResourceMap, > = { diff --git a/src/lib/seam/connect/resources/client-session.ts b/src/lib/seam/connect/resources/client-session.ts index 49e65468..d52099a3 100644 --- a/src/lib/seam/connect/resources/client-session.ts +++ b/src/lib/seam/connect/resources/client-session.ts @@ -3,25 +3,73 @@ * Do not edit this file. */ +/** + * Represents a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). If you want to restrict your users' access to their own devices, use client sessions. + * + * You create each client session with a custom `user_identifier_key`. Normally, the `user_identifier_key` is a user ID that your application provides. + * + * When calling the Seam API from your backend using an API key, you can pass the `user_identifier_key` as a parameter to limit results to the associated client session. For example, `/devices/list?user_identifier_key=123` only returns devices associated with the client session created with the `user_identifier_key` `123`. + * + * A client session has a token that you can use with the Seam JavaScript SDK to make requests from the client (browser) directly to the Seam API. The token restricts the user's access to only the devices that they own. + * + * See also [Get Started with React](https://docs.seam.co/ui-components/overview/getting-started-with-seam-components/get-started-with-react-components-and-client-session-tokens). + */ export type ClientSession = { + /** + * ID of the client session. + */ client_session_id: string + /** + * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ connect_webview_ids: Array + /** + * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ connected_account_ids: Array + /** + * Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) was created. + */ created_at: string + /** + * Customer key associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ customer_key?: string | undefined + /** + * Number of devices associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ device_count: number + /** + * Date and time at which the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) expires. + */ expires_at: string + /** + * Client session token associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ token: string + /** + * Your user ID for the user associated with the [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ user_identifier_key: string | null + /** + * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. + */ user_identity_id?: string | undefined + /** + * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with the client session. + * @deprecated Use `user_identity_id` instead. + */ user_identity_ids: Array + /** + * ID of the workspace associated with the client session. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/connect-webview.ts b/src/lib/seam/connect/resources/connect-webview.ts index d06145c4..c79909b8 100644 --- a/src/lib/seam/connect/resources/connect-webview.ts +++ b/src/lib/seam/connect/resources/connect-webview.ts @@ -3,38 +3,108 @@ * Do not edit this file. */ +/** + * Represents a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * Connect Webviews are fully-embedded client-side components that you add to your app. Your users interact with your embedded Connect Webviews to link their IoT device or system accounts to Seam. That is, Connect Webviews walk your users through the process of logging in to their device or system accounts. Seam handles all the authentication steps, and—once your user has completed the authorization through your app—you can access and control their devices or systems using the Seam API. + * + * Connect Webviews perform credential validation, multifactor authentication (when applicable), and error handling for each brand that Seam supports. Further, Connect Webviews work across all modern browsers and platforms, including Chrome, Safari, and Firefox. + * + * To enable a user to connect their device or system account to Seam through your app, first create a `connect_webview`. Once created, this `connect_webview` includes a URL that you can use to open an [iframe](https://www.w3schools.com/html/html_iframe.asp) or new window containing the Connect Webview for your user. + * + * When you create a Connect Webview, specify the desired provider category key in the `provider_category` parameter. Alternately, to specify a list of providers explicitly, use the `accepted_providers` parameter with a list of device provider keys. + * + * To list all providers within a category, use `/devices/list_device_providers` with the desired `provider_category` filter. To list all provider keys, use `/devices/list_device_providers` with no filters. + */ export type ConnectWebview = { + /** + * High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`. + */ accepted_capabilities: Array< 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > + /** + * List of accepted [provider keys](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + */ accepted_providers: Array + /** + * Indicates whether any provider is allowed. + */ any_provider_allowed: boolean + /** + * Date and time at which the user authorized (through the Connect Webview) the management of their devices. + */ authorized_at: string | null + /** + * Indicates whether Seam should [import all new devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API. + */ automatically_manage_new_devices: boolean + /** + * ID of the Connect Webview. + */ connect_webview_id: string + /** + * ID of the connected account associated with the Connect Webview. + */ connected_account_id: string | null + /** + * Date and time at which the Connect Webview was created. + */ created_at: string + /** + * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + */ custom_metadata: Record + /** + * URL to which the Connect Webview should redirect when an unexpected error occurs. + */ custom_redirect_failure_url: string | null + /** + * URL to which the Connect Webview should redirect when the user successfully pairs a device or system. If you do not set the `custom_redirect_failure_url`, the Connect Webview redirects to the `custom_redirect_url` when an unexpected error occurs. + */ custom_redirect_url: string | null + /** + * The customer key associated with this webview, if any. + */ customer_key?: string | undefined + /** + * Device selection mode of the Connect Webview. Supported values: `none`, `single`, `multiple`. + */ device_selection_mode: 'none' | 'single' | 'multiple' + /** + * Indicates whether the user logged in successfully using the Connect Webview. + */ login_successful: boolean + /** + * Selected provider of the Connect Webview, one of the [provider keys](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + */ selected_provider: string | null + /** + * Status of the Connect Webview. `authorized` indicates that the user has successfully logged into their device or system account, thereby completing the Connect Webview. + */ status: 'pending' | 'failed' | 'authorized' + /** + * URL for the Connect Webview. You use the URL to display the Connect Webview flow to your user. + */ url: string + /** + * Indicates whether Seam should [finish syncing all devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#wait_for_device_creation) in a newly-connected account before completing the associated Connect Webview. + */ wait_for_device_creation: boolean + /** + * ID of the workspace that contains the Connect Webview. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/connected-account.ts b/src/lib/seam/connect/resources/connected-account.ts index eb870756..789f7d45 100644 --- a/src/lib/seam/connect/resources/connected-account.ts +++ b/src/lib/seam/connect/resources/connected-account.ts @@ -3,155 +3,422 @@ * Do not edit this file. */ +/** + * Represents a [connected account](https://docs.seam.co/core-concepts/connected-accounts). A connected account is an external third-party account to which your user has authorized Seam to get access, for example, an August account with a list of door locks. + */ export type ConnectedAccount = { + /** + * List of capabilities that were accepted during the account connection process. + */ accepted_capabilities: Array< 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > + /** + * Type of connected account. + */ account_type?: string | undefined + /** + * Display name for the connected account type. + */ account_type_display_name: string + /** + * Indicates whether Seam should [import all new devices](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for management by the Seam API. + */ automatically_manage_new_devices: boolean + /** + * ID of the connected account. + */ connected_account_id: string + /** + * Date and time at which the connected account was created. + */ created_at?: string | undefined + /** + * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + */ custom_metadata: Record + /** + * Your unique key for the customer associated with this connected account. + */ customer_key?: string | undefined + /** + * Default reservation check-in time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration — set during the connect_webview for providers like Lodgify whose API does not expose check-in times. + */ default_checkin_time?: string | undefined + /** + * Default reservation check-out time for this connected account, as `HH:mm` (24-hour). Sourced from the connector configuration. + */ default_checkout_time?: string | undefined + /** + * Display name for the connected account. + */ display_name: string + /** + * Errors associated with the connected account. + */ errors: Array< + /** + * Indicates that the account is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'account_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'bridge_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the maximum number of users allowed for the site has been reached. This means that new access codes cannot be created. Contact Salto support to increase the user limit. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Salto KS metadata associated with the connected account that has an error. + */ salto_ks_metadata: { + /** + * Salto sites associated with the connected account that has an error. + */ sites?: | Array<{ + /** + * ID of a Salto site associated with the connected account that has an error. + */ site_id?: string | undefined + /** + * Name of a Salto site associated with the connected account that has an error. + */ site_name?: string | undefined + /** + * Subscription limit of site users for a Salto site associated with the connected account that has an error. + */ site_user_subscription_limit?: number | undefined + /** + * Count of subscribed site users for a Salto site associated with the connected account that has an error. + */ subscribed_site_user_count?: number | undefined }> | undefined } - } + } /** + * Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'dormakaba_sites_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * For iCal connected accounts, the platform that produced the feed (for example, `airbnb`, `vrbo`, or `booking`), or `unknown` when it could not be determined. Intended for rendering the source platform's logo. + */ ical_feed_origin?: string | undefined + /** + * For iCal connected accounts, the feed URL for the connection. Sourced from the connector configuration. + */ ical_url?: string | undefined + /** + * Logo URL for the connected account provider. + */ image_url?: string | undefined + /** + * IANA time zone (e.g. America/Los_Angeles) for this connected account. Sourced from the connector configuration. + */ time_zone?: string | undefined + /** + * User identifier associated with the connected account. + * @deprecated Use `display_name` instead. + */ user_identifier?: | { + /** + * API URL for the user identifier associated with the connected account. + */ api_url?: string | undefined + /** + * Email address of the user identifier associated with the connected account. + */ email?: string | undefined + /** + * Indicates whether the user identifier associated with the connected account is exclusive. + */ exclusive?: boolean | undefined + /** + * Phone number of the user identifier associated with the connected account. + */ phone?: string | undefined + /** + * Username of the user identifier associated with the connected account. + */ username?: string | undefined } | undefined + /** + * Warnings associated with the connected account. + */ warnings: Array< + /** + * Indicates that scheduled downtime is planned for the connected account. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'scheduled_maintenance_window' - } + } /** + * Indicates that an unknown issue occurred while syncing the state of the connected account with the provider. This issue may affect the proper functioning of one or more resources in the account. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_connected_account' - } + } /** + * Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Salto KS metadata associated with the connected account that has a warning. + */ salto_ks_metadata: { + /** + * Salto sites associated with the connected account that has a warning. + */ sites?: | Array<{ + /** + * ID of a Salto site associated with the connected account that has a warning. + */ site_id?: string | undefined + /** + * Name of a Salto site associated with the connected account that has a warning. + */ site_name?: string | undefined + /** + * Subscription limit of site users for a Salto site associated with the connected account that has a warning. + */ site_user_subscription_limit?: number | undefined + /** + * Count of subscribed site users for a Salto site associated with the connected account that has a warning. + */ subscribed_site_user_count?: number | undefined }> | undefined } + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_subscription_limit_almost_reached' - } + } /** + * Indicates that the Connected Account requires reauthorization using a new Connect Webview. The account is still connected, but cannot access new features. Delaying reauthorization too long will eventually cause the Connected Account to become disconnected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'account_reauthorization_requested' - } + } /** + * Indicates that the connected account is currently being deleted. All devices, access codes, and other resources associated with this account are in the process of being removed from Seam. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the connected account's provider service is temporarily unavailable. Seam will automatically retry and reconnect when the service becomes available again. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'provider_service_unavailable' - } + } /** + * Indicates that the connected account requires additional setup before it can be fully operational. Follow the instructions in the warning message to complete the setup. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'setup_required' - } + } /** + * Indicates that one or more dormakaba sites associated with the connected account are not approved. Contact support@getseam.com to finish setting up your account. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ 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 index 722c6380..4187b7ec 100644 --- a/src/lib/seam/connect/resources/customer-portal.ts +++ b/src/lib/seam/connect/resources/customer-portal.ts @@ -3,14 +3,36 @@ * Do not edit this file. */ +/** + * Represents a Customer Portal. Customer Portal is a hosted, customizable interface for managing device access. It enables you to embed secure, pre-authenticated access flows into your product—either by sharing a link with users or embedding a view in an iframe. + * + * With Customer Portal, you no longer need to build out frontend experiences for physical access, thermostats, and sensors. Instead, you can ship enterprise-grade access control experiences in a fraction of the time, while maintaining your product's branding and user experience. + * + * Seam hosts these flows, handling everything from account connection and device mapping to full-featured device control. + */ export type CustomerPortal = { + /** + * Date and time at which the customer portal link was created. + */ created_at: string + /** + * Customer key for the customer portal. + */ customer_key: string + /** + * Date and time at which the customer portal link expires. + */ expires_at: string + /** + * URL for the customer portal. + */ url: string + /** + * ID of the workspace associated with the customer portal. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/device-provider.ts b/src/lib/seam/connect/resources/device-provider.ts index 1f17fe43..c3c37131 100644 --- a/src/lib/seam/connect/resources/device-provider.ts +++ b/src/lib/seam/connect/resources/device-provider.ts @@ -4,26 +4,89 @@ */ export type DeviceProvider = { + /** + * Indicates whether the lock supports configuring automatic locking. + */ can_configure_auto_lock?: boolean | undefined + /** + * Indicates whether the thermostat supports cooling. + */ can_hvac_cool?: boolean | undefined + /** + * Indicates whether the thermostat supports heating. + */ can_hvac_heat?: boolean | undefined + /** + * Indicates whether the thermostat supports simultaneous heating and cooling. + */ can_hvac_heat_cool?: boolean | undefined + /** + * Indicates whether the device supports programming offline access codes. + */ can_program_offline_access_codes?: boolean | undefined + /** + * Indicates whether the device supports programming online access codes. + */ can_program_online_access_codes?: boolean | undefined + /** + * Indicates whether the thermostat supports different climate programs for each day of the week. + */ can_program_thermostat_programs_as_different_each_day?: boolean | undefined + /** + * Indicates whether the thermostat supports a single climate program applied to every day. + */ can_program_thermostat_programs_as_same_each_day?: boolean | undefined + /** + * Indicates whether the thermostat supports weekday/weekend climate programs. + */ can_program_thermostat_programs_as_weekday_weekend?: boolean | undefined + /** + * Indicates whether the device supports remote locking. + */ can_remotely_lock?: boolean | undefined + /** + * Indicates whether the device supports remote unlocking. + */ can_remotely_unlock?: boolean | undefined + /** + * Indicates whether the thermostat supports running climate programs. + */ can_run_thermostat_programs?: boolean | undefined + /** + * Indicates whether the device supports simulating connection in a sandbox. + */ can_simulate_connection?: boolean | undefined + /** + * Indicates whether the device supports simulating disconnection in a sandbox. + */ can_simulate_disconnection?: boolean | undefined + /** + * Indicates whether the hub supports simulating connection in a sandbox. + */ can_simulate_hub_connection?: boolean | undefined + /** + * Indicates whether the hub supports simulating disconnection in a sandbox. + */ can_simulate_hub_disconnection?: boolean | undefined + /** + * Indicates whether the device supports simulating a paid subscription in a sandbox. + */ can_simulate_paid_subscription?: boolean | undefined + /** + * Indicates whether the device supports simulating removal in a sandbox. + */ can_simulate_removal?: boolean | undefined + /** + * Indicates whether the thermostat can be turned off. + */ can_turn_off_hvac?: boolean | undefined + /** + * Indicates whether the lock supports unlocking with an access code. + */ can_unlock_with_code?: boolean | undefined + /** + * Name of the device provider. + */ device_provider_name: | 'hotek' | 'dormakaba_community' @@ -89,10 +152,19 @@ export type DeviceProvider = { | 'kisi' | 'aqara' + /** + * Display name for the device provider. + */ display_name: string + /** + * Image URL for the device provider. + */ image_url: string + /** + * List of provider categories to which the device provider belongs, such as `stable`, `consumer_smartlocks`, `thermostats`, and so on. + */ provider_categories: Array< | 'stable' | 'consumer_smartlocks' diff --git a/src/lib/seam/connect/resources/device.ts b/src/lib/seam/connect/resources/device.ts index 47c6cb80..53781964 100644 --- a/src/lib/seam/connect/resources/device.ts +++ b/src/lib/seam/connect/resources/device.ts @@ -3,27 +3,93 @@ * Do not edit this file. */ +/** + * Represents a [device](https://docs.seam.co/core-concepts/devices) that has been connected to Seam. + */ export type Device = { + /** + * Indicates whether the lock supports configuring automatic locking. + */ can_configure_auto_lock?: boolean | undefined + /** + * Indicates whether the thermostat supports cooling. + */ can_hvac_cool?: boolean | undefined + /** + * Indicates whether the thermostat supports heating. + */ can_hvac_heat?: boolean | undefined + /** + * Indicates whether the thermostat supports simultaneous heating and cooling. + */ can_hvac_heat_cool?: boolean | undefined + /** + * Indicates whether the device supports programming offline access codes. + */ can_program_offline_access_codes?: boolean | undefined + /** + * Indicates whether the device supports programming online access codes. + */ can_program_online_access_codes?: boolean | undefined + /** + * Indicates whether the thermostat supports different climate programs for each day of the week. + */ can_program_thermostat_programs_as_different_each_day?: boolean | undefined + /** + * Indicates whether the thermostat supports a single climate program applied to every day. + */ can_program_thermostat_programs_as_same_each_day?: boolean | undefined + /** + * Indicates whether the thermostat supports weekday/weekend climate programs. + */ can_program_thermostat_programs_as_weekday_weekend?: boolean | undefined + /** + * Indicates whether the device supports remote locking. + */ can_remotely_lock?: boolean | undefined + /** + * Indicates whether the device supports remote unlocking. + */ can_remotely_unlock?: boolean | undefined + /** + * Indicates whether the thermostat supports running climate programs. + */ can_run_thermostat_programs?: boolean | undefined + /** + * Indicates whether the device supports simulating connection in a sandbox. + */ can_simulate_connection?: boolean | undefined + /** + * Indicates whether the device supports simulating disconnection in a sandbox. + */ can_simulate_disconnection?: boolean | undefined + /** + * Indicates whether the hub supports simulating connection in a sandbox. + */ can_simulate_hub_connection?: boolean | undefined + /** + * Indicates whether the hub supports simulating disconnection in a sandbox. + */ can_simulate_hub_disconnection?: boolean | undefined + /** + * Indicates whether the device supports simulating a paid subscription in a sandbox. + */ can_simulate_paid_subscription?: boolean | undefined + /** + * Indicates whether the device supports simulating removal in a sandbox. + */ can_simulate_removal?: boolean | undefined + /** + * Indicates whether the thermostat can be turned off. + */ can_turn_off_hvac?: boolean | undefined + /** + * Indicates whether the lock supports unlocking with an access code. + */ can_unlock_with_code?: boolean | undefined + /** + * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). + */ capabilities_supported: Array< | 'access_code' | 'lock' @@ -33,32 +99,74 @@ export type Device = { | 'phone' > + /** + * Unique identifier for the account associated with the device. + */ connected_account_id: string + /** + * Date and time at which the device object was created. + */ created_at: string + /** + * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + */ custom_metadata: Record + /** + * ID of the device. + */ device_id: string + /** + * Manufacturer of the device. Represents the hardware brand, which may differ from the provider. + */ device_manufacturer?: | { + /** + * Display name for the manufacturer, such as `August`, `Yale`, `Salto`, and so on. + */ display_name: string + /** + * Image URL for the manufacturer logo. + */ image_url?: string | undefined + /** + * Manufacturer identifier, such as `august`, `yale`, `salto`, and so on. + */ manufacturer: string } | undefined + /** + * Provider of the device. Represents the third-party service through which the device is controlled. + */ device_provider?: | { + /** + * Device provider name. Corresponds to the integration type, such as `august`, `schlage`, `yale_access`, and so on. + */ device_provider_name: string + /** + * Display name for the device provider type. + */ display_name: string + /** + * Image URL for the device provider. + */ image_url?: string | undefined + /** + * Provider category. Indicates the third-party provider type, such as `stable`, for stable integrations, or `internal`, for internal integrations. + */ provider_category: string } | undefined + /** + * Type of the device. + */ device_type: | 'akuvox_lock' | 'august_lock' @@ -103,428 +211,1198 @@ export type Device = { | 'android_phone' | 'ring_camera' + /** + * Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices. + */ display_name: string + /** + * Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + */ errors: Array< + /** + * Indicates that the account is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'account_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Salto site user limit has been reached. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'dormakaba_sites_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is offline. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_offline' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device has been removed. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_removed' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the hub is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'hub_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'empty_backup_access_code_pool' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the user is not authorized to use the August lock. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'august_lock_not_authorized' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that device credentials are missing. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'missing_device_credentials' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the auxiliary heat is running. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'auxiliary_heat_running' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that a subscription is required to connect. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'subscription_required' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'bridge_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * Indicates whether Seam manages the device. See also [Managed and Unmanaged Devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + */ is_managed: boolean + /** + * Location information for the device. + */ location?: | { + /** + * Name of the device location. + */ location_name?: string | undefined + /** + * Time zone of the device location. + */ time_zone?: string | undefined + /** + * Time zone of the device location. + * @deprecated Use `time_zone` instead. + */ timezone?: string | undefined } | undefined + /** + * Optional nickname to describe the device, settable through Seam. + */ nickname?: string | undefined + /** + * Properties of the device. + */ properties: { + /** + * Accessory keypad properties and state. + */ accessory_keypad?: | { + /** + * Keypad battery properties. + */ battery?: | { level: number } | undefined + /** + * Indicates if an accessory keypad is connected to the device. + */ is_connected: boolean } | undefined + /** + * Appearance-related properties, as reported by the device. + */ appearance: { + /** + * Name of the device as seen from the provider API and application, not settable through Seam. + */ name: string } + /** + * Represents the current status of the battery charge level. + */ battery?: | { + /** + * Battery charge level as a value between 0 and 1, inclusive. + */ level: number + /** + * Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. + */ status: 'critical' | 'low' | 'good' | 'full' } | undefined + /** + * Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. + */ battery_level?: number | undefined + /** + * Array of noise threshold IDs that are currently triggering. + */ currently_triggering_noise_threshold_ids?: Array | undefined + /** + * Indicates whether the device has direct power. + */ has_direct_power?: boolean | undefined + /** + * Alt text for the device image. + */ image_alt_text?: string | undefined + /** + * Image URL for the device. + */ image_url?: string | undefined + /** + * Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. + */ manufacturer?: string | undefined + /** + * Device model-related properties. + */ model: { + /** + * @deprecated use device.properties.model.can_connect_accessory_keypad + */ accessory_keypad_supported?: boolean | undefined + /** + * Indicates whether the device can connect a accessory keypad. + */ can_connect_accessory_keypad?: boolean | undefined + /** + * Display name of the device model. + */ display_name: string + /** + * Indicates whether the device has a built in accessory keypad. + */ has_built_in_keypad?: boolean | undefined + /** + * Display name that corresponds to the manufacturer-specific terminology for the device. + */ manufacturer_display_name: string + /** + * @deprecated use device.can_program_offline_access_codes. + */ offline_access_codes_supported?: boolean | undefined + /** + * @deprecated use device.can_program_online_access_codes. + */ online_access_codes_supported?: boolean | undefined } + /** + * Name of the device. + * @deprecated use device.display_name instead + */ name: string + /** + * Indicates current noise level in decibels, if the device supports noise detection. + */ noise_level_decibels?: number | undefined + /** + * Indicates whether it is currently possible to use offline access codes for the device. + * @deprecated use device.can_program_offline_access_codes + */ offline_access_codes_enabled?: boolean | undefined + /** + * Indicates whether the device is online. + */ online: boolean + /** + * Indicates whether it is currently possible to use online access codes for the device. + * @deprecated use device.can_program_online_access_codes + */ online_access_codes_enabled?: boolean | undefined + /** + * Serial number of the device. + */ serial_number?: string | undefined + /** + * @deprecated use device.properties.model.can_connect_accessory_keypad + */ supports_accessory_keypad?: boolean | undefined + /** + * @deprecated use offline_access_codes_enabled + */ supports_offline_access_codes?: boolean | undefined + /** + * ASSA ABLOY Credential Service metadata for the phone. + */ assa_abloy_credential_service_metadata?: | { + /** + * Endpoints associated with the phone. + */ endpoints?: | Array<{ + /** + * ID of the associated endpoint. + */ endpoint_id?: string | undefined + /** + * Indicated whether the endpoint is active. + */ is_active?: boolean | undefined }> | undefined + /** + * Indicates whether the credential service has active endpoints associated with the phone. + */ has_active_endpoint?: boolean | undefined } | undefined + /** + * Salto Space credential service metadata for the phone. + */ salto_space_credential_service_metadata?: | { + /** + * Indicates whether the credential service has an active associated phone. + */ has_active_phone?: boolean | undefined } | undefined + /** + * Metadata for an Akiles device. + */ akiles_metadata?: | { + /** + * Group ID to which to add users for an Akiles device. + */ _member_group_id?: string | undefined + /** + * Gadget ID for an Akiles device. + */ gadget_id?: string | undefined + /** + * Gadget name for an Akiles device. + */ gadget_name?: string | undefined + /** + * Product name for an Akiles device. + */ product_name?: string | undefined } | undefined + /** + * Metadata for an Aqara device. + */ aqara_metadata?: | { + /** + * Device name for an Aqara device. + */ device_name?: string | undefined + /** + * Device ID (did) for an Aqara device. + */ did?: string | undefined + /** + * Firmware version for an Aqara device. + */ firmware_version?: string | null | undefined + /** + * Model identifier for an Aqara device. + */ model?: string | undefined + /** + * Model type for an Aqara device. + */ model_type?: number | undefined + /** + * Parent gateway device ID for an Aqara device. + */ parent_did?: string | undefined + /** + * Position (room) ID for an Aqara device. + */ position_id?: string | null | undefined + /** + * Time zone reported for an Aqara device (e.g. GMT-07:00). + */ time_zone?: string | null | undefined } | undefined + /** + * Metadata for an ASSA ABLOY Vostio system. + */ assa_abloy_vostio_metadata?: | { + /** + * Encoder name for an ASSA ABLOY Vostio system. + */ encoder_name?: string | undefined } | undefined + /** + * Metadata for an August device. + */ august_metadata?: | { + /** + * Indicates whether an August device has a keypad. + */ has_keypad?: boolean | undefined + /** + * House ID for an August device. + */ house_id?: string | undefined + /** + * House name for an August device. + */ house_name?: string | undefined + /** + * Keypad battery level for an August device. + */ keypad_battery_level?: string | undefined + /** + * Lock ID for an August device. + */ lock_id?: string | undefined + /** + * Lock name for an August device. + */ lock_name?: string | undefined + /** + * Model for an August device. + */ model?: string | undefined } | undefined + /** + * Metadata for an Avigilon Alta system. + */ avigilon_alta_metadata?: | { + /** + * Entry name for an Avigilon Alta system. + */ entry_name?: string | undefined + /** + * Total count of entry relays for an Avigilon Alta system. + */ entry_relays_total_count?: number | undefined + /** + * Organization name for an Avigilon Alta system. + */ org_name?: string | undefined + /** + * Site ID for an Avigilon Alta system. + */ site_id?: number | undefined + /** + * Site name for an Avigilon Alta system. + */ site_name?: string | undefined + /** + * Zone ID for an Avigilon Alta system. + */ zone_id?: number | undefined + /** + * Zone name for an Avigilon Alta system. + */ zone_name?: string | undefined } | undefined + /** + * Metadata for a Brivo device. + */ brivo_metadata?: | { + /** + * Indicates whether the Brivo access point has activation (remote unlock) enabled. + */ activation_enabled?: boolean | undefined + /** + * Device name for a Brivo device. + */ device_name?: string | undefined } | undefined + /** + * Metadata for a ControlByWeb device. + */ controlbyweb_metadata?: | { + /** + * Device ID for a ControlByWeb device. + */ device_id?: string | undefined + /** + * Device name for a ControlByWeb device. + */ device_name?: string | undefined + /** + * Relay name for a ControlByWeb device. + */ relay_name?: string | null | undefined } | undefined + /** + * Metadata for a dormakaba Oracode device. + */ dormakaba_oracode_metadata?: | { + /** + * Device ID for a dormakaba Oracode device. + */ device_id?: {} | undefined + /** + * Door ID for a dormakaba Oracode device. + */ door_id?: number | undefined + /** + * Indicates whether a door is wireless for a dormakaba Oracode device. + */ door_is_wireless?: boolean | undefined + /** + * Door name for a dormakaba Oracode device. + */ door_name?: string | undefined + /** + * IANA time zone for a dormakaba Oracode device. + */ iana_timezone?: string | undefined + /** + * Predefined time slots for a dormakaba Oracode device. + */ predefined_time_slots?: | Array<{ + /** + * Check in time for a time slot for a dormakaba Oracode device. + */ check_in_time?: string | undefined + /** + * Checkout time for a time slot for a dormakaba Oracode device. + */ check_out_time?: string | undefined + /** + * ID of a user level for a dormakaba Oracode device. + */ dormakaba_oracode_user_level_id?: string | undefined + /** + * Prefix for a user level for a dormakaba Oracode device. + */ dormakaba_oracode_user_level_prefix?: number | undefined + /** + * Indicates whether a time slot for a dormakaba Oracode device is a 24-hour time slot. + */ is_24_hour?: boolean | undefined + /** + * Indicates whether a time slot for a dormakaba Oracode device is in biweekly mode. + */ is_biweekly_mode?: boolean | undefined + /** + * Indicates whether a time slot for a dormakaba Oracode device is a master time slot. + */ is_master?: boolean | undefined + /** + * Indicates whether a time slot for a dormakaba Oracode device is a one-shot time slot. + */ is_one_shot?: boolean | undefined + /** + * Name of a time slot for a dormakaba Oracode device. + */ name?: string | undefined + /** + * Prefix for a time slot for a dormakaba Oracode device. + */ prefix?: number | undefined }> | undefined + /** + * Site ID for a dormakaba Oracode device. + * @deprecated Previously marked as "@DEPRECATED." + */ site_id?: number | null | undefined + /** + * Site name for a dormakaba Oracode device. + */ site_name?: string | undefined } | undefined + /** + * Metadata for an ecobee device. + */ ecobee_metadata?: | { + /** + * Device name for an ecobee device. + */ device_name?: string | undefined + /** + * Device ID for an ecobee device. + */ ecobee_device_id?: string | undefined } | undefined + /** + * Metadata for a 4SUITES device. + */ four_suites_metadata?: | { + /** + * Device ID for a 4SUITES device. + */ device_id?: number | undefined + /** + * Device name for a 4SUITES device. + */ device_name?: string | undefined + /** + * Reclose delay, in seconds, for a 4SUITES device. + */ reclose_delay_in_seconds?: number | undefined } | undefined + /** + * Metadata for a Genie device. + */ genie_metadata?: | { + /** + * Lock name for a Genie device. + */ device_name?: string | undefined + /** + * Door name for a Genie device. + */ door_name?: string | undefined } | undefined + /** + * Metadata for a Honeywell Resideo device. + */ honeywell_resideo_metadata?: | { + /** + * Device name for a Honeywell Resideo device. + */ device_name?: string | undefined + /** + * Device ID for a Honeywell Resideo device. + */ honeywell_resideo_device_id?: string | undefined } | undefined + /** + * Metadata for an igloo device. + */ igloo_metadata?: | { + /** + * Bridge ID for an igloo device. + */ bridge_id?: string | undefined + /** + * Device ID for an igloo device. + */ device_id?: string | undefined + /** + * Model for an igloo device. + */ model?: string | undefined } | undefined + /** + * Metadata for an igloohome device. + */ igloohome_metadata?: | { + /** + * Bridge ID for an igloohome device. + */ bridge_id?: string | undefined + /** + * Bridge name for an igloohome device. + */ bridge_name?: string | undefined + /** + * Device ID for an igloohome device. + */ device_id?: string | undefined + /** + * Device name for an igloohome device. + */ device_name?: string | undefined + /** + * Indicates whether a keypad is linked to a bridge for an igloohome device. + */ is_accessory_keypad_linked_to_bridge?: boolean | undefined + /** + * Keypad ID for an igloohome device. + */ keypad_id?: string | undefined } | undefined + /** + * Metadata for a KeyNest device. + */ keynest_metadata?: | { + /** + * Address for a KeyNest device. + */ address?: string | null | undefined + /** + * Current or last store ID for a KeyNest device. + */ current_or_last_store_id?: number | undefined + /** + * Current status for a KeyNest device. + */ current_status?: string | null | undefined + /** + * Current user company for a KeyNest device. + */ current_user_company?: string | null | undefined + /** + * Current user email for a KeyNest device. + */ current_user_email?: string | null | undefined + /** + * Current user name for a KeyNest device. + */ current_user_name?: string | null | undefined + /** + * Current user phone number for a KeyNest device. + */ current_user_phone_number?: string | null | undefined + /** + * Default office ID for a KeyNest device. + */ default_office_id?: number | undefined + /** + * Device name for a KeyNest device. + */ device_name?: string | undefined + /** + * Fob ID for a KeyNest device. + */ fob_id?: number | undefined + /** + * Handover method for a KeyNest device. + */ handover_method?: string | null | undefined + /** + * Whether the KeyNest device has a photo. + */ has_photo?: boolean | undefined + /** + * Whether the key is in a locker that does not support the access codes API. + */ is_quadient_locker?: boolean | undefined + /** + * Key ID for a KeyNest device. + */ key_id?: string | undefined + /** + * Key notes for a KeyNest device. + */ key_notes?: string | null | undefined + /** + * KeyNest app user for a KeyNest device. + */ keynest_app_user?: string | null | undefined + /** + * Last movement timestamp for a KeyNest device. + */ last_movement?: string | undefined + /** + * Property ID for a KeyNest device. + */ property_id?: string | null | undefined + /** + * Property postcode for a KeyNest device. + */ property_postcode?: string | null | undefined + /** + * Status type for a KeyNest device. + */ status_type?: string | undefined + /** + * Subscription plan for a KeyNest device. + */ subscription_plan?: string | undefined } | undefined + /** + * Metadata for a Kisi device. + */ kisi_metadata?: | { + /** + * Description for a Kisi device. + */ description?: string | null | undefined + /** + * Lock ID for a Kisi device. + */ lock_id?: number | undefined + /** + * Lock name for a Kisi device. + */ lock_name?: string | undefined + /** + * Place name for a Kisi device. + */ place_name?: string | null | undefined } | undefined + /** + * Metadata for a Korelock device. + */ korelock_metadata?: | { + /** + * Device ID for a Korelock device. + */ device_id?: string | undefined + /** + * Device name for a Korelock device. + */ device_name?: string | undefined + /** + * Firmware version for a Korelock device. + */ firmware_version?: string | undefined + /** + * Location ID for a Korelock device. Required for timebound access codes. + */ location_id?: string | null | undefined + /** + * Model code for a Korelock device. + */ model_code?: string | undefined + /** + * Serial number for a Korelock device. + */ serial_number?: string | undefined + /** + * WiFi signal strength (0-1) for a Korelock device. + */ wifi_signal_strength?: number | undefined } | undefined + /** + * Metadata for a Kwikset device. + */ kwikset_metadata?: | { + /** + * Device ID for a Kwikset device. + */ device_id?: string | undefined + /** + * Device name for a Kwikset device. + */ device_name?: string | undefined + /** + * Model number for a Kwikset device. + */ model_number?: string | undefined } | undefined + /** + * Metadata for a Lockly device. + */ lockly_metadata?: | { + /** + * Device ID for a Lockly device. + */ device_id?: string | undefined + /** + * Device name for a Lockly device. + */ device_name?: string | undefined + /** + * Model for a Lockly device. + */ model?: string | undefined } | undefined + /** + * Metadata for a Minut device. + */ minut_metadata?: | { + /** + * Device ID for a Minut device. + */ device_id?: string | undefined + /** + * Device name for a Minut device. + */ device_name?: string | undefined + /** + * Latest sensor values for a Minut device. + */ latest_sensor_values?: | { + /** + * Latest accelerometer Z-axis reading for a Minut device. + */ accelerometer_z?: | { + /** + * Time of latest accelerometer Z-axis reading for a Minut device. + */ time?: string | undefined + /** + * Value of latest accelerometer Z-axis reading for a Minut device. + */ value?: number | undefined } | undefined + /** + * Latest humidity reading for a Minut device. + */ humidity?: | { + /** + * Time of latest humidity reading for a Minut device. + */ time?: string | undefined + /** + * Value of latest humidity reading for a Minut device. + */ value?: number | undefined } | undefined + /** + * Latest pressure reading for a Minut device. + */ pressure?: | { + /** + * Time of latest pressure reading for a Minut device. + */ time?: string | undefined + /** + * Value of latest pressure reading for a Minut device. + */ value?: number | undefined } | undefined + /** + * Latest sound reading for a Minut device. + */ sound?: | { + /** + * Time of latest sound reading for a Minut device. + */ time?: string | undefined + /** + * Value of latest sound reading for a Minut device. + */ value?: number | undefined } | undefined + /** + * Latest temperature reading for a Minut device. + */ temperature?: | { + /** + * Time of latest temperature reading for a Minut device. + */ time?: string | undefined + /** + * Value of latest temperature reading for a Minut device. + */ value?: number | undefined } | undefined @@ -532,181 +1410,530 @@ export type Device = { | undefined } | undefined + /** + * Metadata for a Google Nest device. + */ nest_metadata?: | { + /** + * Custom device name for a Google Nest device. The device owner sets this value. + */ device_custom_name?: string | undefined + /** + * Device name for a Google Nest device. Google sets this value. + */ device_name?: string | undefined + /** + * Display name for a Google Nest device. + */ display_name?: string | undefined + /** + * Device ID for a Google Nest device. + */ nest_device_id?: string | undefined } | undefined + /** + * Metadata for a NoiseAware device. + */ noiseaware_metadata?: | { + /** + * Device ID for a NoiseAware device. + */ device_id?: string | undefined + /** + * Device model for a NoiseAware device. + */ device_model?: 'indoor' | 'outdoor' | undefined + /** + * Device name for a NoiseAware device. + */ device_name?: string | undefined + /** + * Noise level, in decibels, for a NoiseAware device. + */ noise_level_decibel?: number | undefined + /** + * Noise level, expressed as a Noise Risk Score (NRS), for a NoiseAware device. + */ noise_level_nrs?: number | undefined } | undefined + /** + * Metadata for a Nuki device. + */ nuki_metadata?: | { + /** + * Device ID for a Nuki device. + */ device_id?: string | undefined + /** + * Device name for a Nuki device. + */ device_name?: string | undefined + /** + * Indicates whether keypad 2 is paired for a Nuki device. + */ keypad_2_paired?: boolean | undefined + /** + * Indicates whether the keypad battery is in a critical state for a Nuki device. + */ keypad_battery_critical?: boolean | undefined + /** + * Indicates whether the keypad is paired for a Nuki device. + */ keypad_paired?: boolean | undefined } | undefined + /** + * Metadata for an Omnitec device. + */ omnitec_metadata?: | { + /** + * Whether the Omnitec lock has a connected gateway for remote operations. + */ has_gateway?: boolean | undefined + /** + * Operator-assigned alias for an Omnitec device. + */ lock_alias?: string | undefined + /** + * Lock ID for an Omnitec device. + */ lock_id?: number | undefined + /** + * Bluetooth MAC address for an Omnitec device. + */ lock_mac?: string | undefined + /** + * Lock name for an Omnitec device. + */ lock_name?: string | undefined + /** + * IANA time zone for the Omnitec device, used to schedule time-bound access codes at the correct local time (accounting for DST). + */ time_zone?: string | null | undefined + /** + * Static UTC offset of the Omnitec lock in milliseconds. Does not account for DST. + */ timezone_raw_offset_ms?: number | undefined } | undefined + /** + * Metadata for a Ring device. + */ ring_metadata?: | { + /** + * Device ID for a Ring device. + */ device_id?: string | undefined + /** + * Device name for a Ring device. + */ device_name?: string | undefined } | undefined + /** + * Metadata for a Salto KS device. + */ salto_ks_metadata?: | { + /** + * Battery level for a Salto KS device. + */ battery_level?: string | undefined + /** + * Customer reference for a Salto KS device. + */ customer_reference?: string | undefined + /** + * Indicates whether the site has a Salto KS subscription that supports custom PINs. + */ has_custom_pin_subscription?: boolean | undefined + /** + * Lock ID for a Salto KS device. + */ lock_id?: string | undefined + /** + * Lock type for a Salto KS device. + */ lock_type?: string | undefined + /** + * Locked state for a Salto KS device. + */ locked_state?: string | undefined + /** + * Model for a Salto KS device. + */ model?: string | undefined + /** + * Site ID for the Salto KS site to which the device belongs. + */ site_id?: string | undefined + /** + * Site name for the Salto KS site to which the device belongs. + */ site_name?: string | undefined } | undefined + /** + * Metada for a Salto device. + * @deprecated Use `salto_ks_metadata ` instead. + */ salto_metadata?: | { + /** + * Battery level for a Salto device. + */ battery_level?: string | undefined + /** + * Customer reference for a Salto device. + */ customer_reference?: string | undefined + /** + * Lock ID for a Salto device. + */ lock_id?: string | undefined + /** + * Lock type for a Salto device. + */ lock_type?: string | undefined + /** + * Locked state for a Salto device. + */ locked_state?: string | undefined + /** + * Model for a Salto device. + */ model?: string | undefined + /** + * Site ID for the Salto KS site to which the device belongs. + */ site_id?: string | undefined + /** + * Site name for the Salto KS site to which the device belongs. + */ site_name?: string | undefined } | undefined + /** + * Metadata for a Schlage device. + */ schlage_metadata?: | { + /** + * Device ID for a Schlage device. + */ device_id?: string | undefined + /** + * Device name for a Schlage device. + */ device_name?: string | undefined + /** + * Model for a Schlage device. + */ model?: string | undefined } | undefined + /** + * Metadata for Seam Bridge. + */ seam_bridge_metadata?: | { + /** + * Device number for Seam Bridge. + */ device_num?: number | undefined + /** + * Name for Seam Bridge. + */ name?: string | undefined + /** + * Unlock method for Seam Bridge. + */ unlock_method?: 'bridge' | 'doorking' | undefined } | undefined + /** + * Metadata for a Sensi device. + */ sensi_metadata?: | { + /** + * Device ID for a Sensi device. + */ device_id?: string | undefined + /** + * Device name for a Sensi device. + */ device_name?: string | undefined + /** + * Set to true when the device does not support the /dual-setpoints API endpoint. + */ dual_setpoints_not_supported?: boolean | undefined + /** + * Product type for a Sensi device. + */ product_type?: string | undefined } | undefined + /** + * Metadata for a SmartThings device. + */ smartthings_metadata?: | { + /** + * Device ID for a SmartThings device. + */ device_id?: string | undefined + /** + * Device name for a SmartThings device. + */ device_name?: string | undefined + /** + * Location ID for a SmartThings device. + */ location_id?: string | undefined + /** + * Model for a SmartThings device. + */ model?: string | undefined } | undefined + /** + * Metadata for a tado° device. + */ tado_metadata?: | { + /** + * Device type for a tado° device. + */ device_type?: string | undefined + /** + * Serial number for a tado° device. + */ serial_no?: string | undefined } | undefined + /** + * Metadata for a Tedee device. + */ tedee_metadata?: | { + /** + * Bridge ID for a Tedee device. + */ bridge_id?: number | undefined + /** + * Bridge name for a Tedee device. + */ bridge_name?: string | undefined + /** + * Device ID for a Tedee device. + */ device_id?: number | undefined + /** + * Device model for a Tedee device. + */ device_model?: string | undefined + /** + * Device name for a Tedee device. + */ device_name?: string | undefined + /** + * Keypad ID for a Tedee device. + */ keypad_id?: number | undefined + /** + * Serial number for a Tedee device. + */ serial_number?: string | undefined } | undefined + /** + * Metadata for a TTLock device. + */ ttlock_metadata?: | { + /** + * Feature value for a TTLock device. + */ feature_value?: string | undefined + /** + * Features for a TTLock device. + */ features?: | { + /** + * Indicates whether a TTLock device supports auto-lock time configuration. + */ auto_lock_time_config?: boolean | undefined + /** + * Indicates whether a TTLock device supports an incomplete keyboard passcode. + */ incomplete_keyboard_passcode?: boolean | undefined + /** + * Indicates whether a TTLock device supports the lock command. + */ lock_command?: boolean | undefined + /** + * Indicates whether a TTLock device supports a passcode. + */ passcode?: boolean | undefined + /** + * Indicates whether a TTLock device supports passcode management. + */ passcode_management?: boolean | undefined + /** + * Indicates whether a TTLock device supports unlock via gateway. + */ unlock_via_gateway?: boolean | undefined + /** + * Indicates whether a TTLock device supports Wi-Fi. + */ wifi?: boolean | undefined } | undefined + /** + * Indicates whether a TTLock device has a gateway. + */ has_gateway?: boolean | undefined + /** + * Lock alias for a TTLock device. + */ lock_alias?: string | undefined + /** + * Lock ID for a TTLock device. + */ lock_id?: number | undefined + /** + * Lock-side timezone offset in milliseconds east of UTC, as configured in the TTLock app. Source of truth for the lock's wall-clock interpretation of access code start/end times — a misconfigured value here is the typical cause of customer "codes offset by N hours" reports. Diagnostic only; Seam does not convert times based on this value. + */ timezone_raw_offset_ms?: number | null | undefined + /** + * Wireless keypads for a TTLock device. + */ wireless_keypads?: | Array<{ + /** + * ID for a wireless keypad for a TTLock device. + */ wireless_keypad_id?: number | undefined + /** + * Name for a wireless keypad for a TTLock device. + */ wireless_keypad_name?: string | undefined }> | undefined } | undefined + /** + * Metadata for a 2N device. + */ two_n_metadata?: | { + /** + * Device ID for a 2N device. + */ device_id?: number | undefined + /** + * Device name for a 2N device. + */ device_name?: string | undefined } | undefined + /** + * Metadata for an Ultraloq device. + */ ultraloq_metadata?: | { + /** + * Device ID for an Ultraloq device. + */ device_id?: string | undefined + /** + * Device name for an Ultraloq device. + */ device_name?: string | undefined + /** + * Device type for an Ultraloq device. + */ device_type?: string | undefined + /** + * IANA timezone for the Ultraloq device. + */ time_zone?: string | null | undefined } | undefined + /** + * Metadata for an ASSA ABLOY Visionline system. + */ visionline_metadata?: | { + /** + * Encoder ID for an ASSA ABLOY Visionline system. + */ encoder_id?: string | undefined } | undefined + /** + * Metadata for a Wyze device. + */ wyze_metadata?: | { + /** + * Device ID for a Wyze device. + */ device_id?: string | undefined + /** + * Device information model for a Wyze device. + */ device_info_model?: string | undefined + /** + * Device name for a Wyze device. + */ device_name?: string | undefined + /** + * Keypad UUID for a Wyze device. + */ keypad_uuid?: string | undefined + /** + * Locker status (hardlock) for a Wyze device. + */ locker_status_hardlock?: number | undefined + /** + * Product model for a Wyze device. + */ product_model?: string | undefined + /** + * Product name for a Wyze device. + */ product_name?: string | undefined + /** + * Product type for a Wyze device. + */ product_type?: string | undefined } | undefined + /** + * The delay in seconds before the lock automatically locks after being unlocked. + */ auto_lock_delay_seconds?: number | undefined + /** + * Indicates whether automatic locking is enabled. + */ auto_lock_enabled?: boolean | undefined + /** + * Indicates whether the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is currently enabled for the device. To disable it, set this to `false` using [/devices/update](https://docs.seam.co/api/devices/update). + */ backup_access_code_pool_enabled?: boolean | undefined + /** + * Constraints on access codes for the device. Seam represents each constraint as an object with a `constraint_type` property. Depending on the constraint type, there may also be additional properties. Note that some constraints are manufacturer- or device-specific. + */ code_constraints?: | Array<{ constraint_type: @@ -725,106 +1952,278 @@ export type Device = { | 'name_length' | 'name_must_be_unique' + /** + * Maximum name length constraint for access codes. + */ max_length?: number | undefined + /** + * Minimum name length constraint for access codes. + */ min_length?: number | undefined }> | undefined + /** + * Indicates whether the door is open. + */ door_open?: boolean | undefined + /** + * Indicates whether the device supports native entry events. + */ has_native_entry_events?: boolean | undefined + /** + * Keypad battery status. + */ keypad_battery?: | { + /** + * Keypad battery charge level. + */ level: number } | undefined + /** + * Indicates whether the lock is locked. + */ locked?: boolean | undefined + /** + * Maximum number of active access codes that the device supports. + */ max_active_codes_supported?: number | undefined + /** + * Time frames that may be requested when creating an offline access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. + */ offline_time_frame_options?: | Array<{ + /** + * Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). + */ display_name: string + /** + * iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. + */ end_date_recurrence_rule?: string | undefined + /** + * When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. + */ matching_start_end_time?: boolean | undefined + /** + * Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. + */ max_duration?: string | undefined + /** + * Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. + */ min_duration?: string | undefined + /** + * iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. + */ start_date_recurrence_rule?: string | undefined + /** + * Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. + */ time_pairs?: | Array<{ + /** + * Label for the start/end time pairing. + */ display_name: string + /** + * End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. + */ end_time: string + /** + * Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. + */ start_time: string }> | undefined + /** + * IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. + */ time_zone?: string | undefined }> | undefined + /** + * Time frames that may be requested when creating an online access code, expressed as a list of options. The caller picks one option (by matching the requested duration when the options' duration ranges do not overlap, or by `display_name` when they do) and satisfies that one option's rules. When `undefined`, any time frame works. + */ online_time_frame_options?: | Array<{ + /** + * Label for this option. For a single-option device, the product name (for example, `algoPIN` or `SmartPIN`); for a multi-option device, a label that distinguishes it (for example, `Hourly` or `Fixed start times`). + */ display_name: string + /** + * iCalendar recurrence rule (RRULE) that the end date must fall on. Constrains which calendar dates are selectable, independent of the time-of-day rules. + */ end_date_recurrence_rule?: string | undefined + /** + * When `true`, the start and end must fall at the same time of day (the caller picks which). Mutually exclusive with `time_pairs`. + */ matching_start_end_time?: boolean | undefined + /** + * Maximum duration this option covers, as an ISO 8601 duration (for example, `PT672H` or `P367D`). Omitted when there is no maximum. + */ max_duration?: string | undefined + /** + * Minimum duration this option covers, as an ISO 8601 duration (for example, `PT1H` or `P29D`). Omitted when there is no minimum. + */ min_duration?: string | undefined + /** + * iCalendar recurrence rule (RRULE) that the start date must fall on (for example, `FREQ=MONTHLY;BYDAY=1MO,3MO`). Constrains which calendar dates are selectable, independent of the time-of-day rules. + */ start_date_recurrence_rule?: string | undefined + /** + * Fixed start/end time pairings the caller chooses from. Mutually exclusive with `matching_start_end_time`. + */ time_pairs?: | Array<{ + /** + * Label for the start/end time pairing. + */ display_name: string + /** + * End time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. An `end_time` earlier on the clock than `start_time` means the end falls on a later date. + */ end_time: string + /** + * Start time of day as a 24-hour `HH:MM` value, interpreted in the option's `time_zone`. + */ start_time: string }> | undefined + /** + * IANA time zone for interpreting `time_pairs` and the date recurrence rules. Present only when the option fixes times or dates. + */ time_zone?: string | undefined }> | undefined + /** + * Supported code lengths for access codes. + */ supported_code_lengths?: Array | undefined + /** + * Indicates whether the device supports a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). + */ supports_backup_access_code_pool?: boolean | undefined + /** + * Active [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + * @deprecated Use `active_thermostat_schedule_id` with `/thermostats/schedules/get` instead. + */ active_thermostat_schedule?: | { + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ climate_preset_key: string + /** + * Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. + */ created_at: string + /** + * ID of the desired [thermostat](https://docs.seam.co/capability-guides/thermostats) device. + */ device_id: string + /** + * Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ ends_at: string + /** + * Errors associated with the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. + */ is_override_allowed?: boolean | undefined + /** + * Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ max_override_period_minutes?: number | null | undefined + /** + * User-friendly name to identify the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ name: string | null + /** + * Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at: string + /** + * ID of the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ thermostat_schedule_id: string + /** + * ID of the workspace that contains the thermostat schedule. + */ workspace_id: string } | null | undefined + /** + * ID of the active [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ active_thermostat_schedule_id?: string | null | undefined + /** + * Climate preset modes that the thermostat supports, such as "home", "away", "wake", "sleep", "occupied", and "unoccupied". + */ available_climate_preset_modes?: | Array<'home' | 'away' | 'wake' | 'sleep' | 'occupied' | 'unoccupied'> | undefined + /** + * Available [climate presets](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for the thermostat. + */ available_climate_presets?: | Array<{ + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. + */ can_delete: boolean + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. + */ can_edit: boolean + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. + */ can_use_with_thermostat_daily_programs: boolean + /** + * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ climate_preset_key: string + /** + * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + */ climate_preset_mode?: | 'home' | 'away' @@ -833,36 +2232,100 @@ export type Device = { | 'occupied' | 'unoccupied' | undefined + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_fahrenheit?: number | undefined + /** + * Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ display_name: string + /** + * Metadata specific to the Ecobee climate, if applicable. + */ ecobee_metadata?: | { + /** + * Reference to the Ecobee climate, if applicable. + */ climate_ref?: string | undefined + /** + * Indicates if the climate preset is optimized by Ecobee. + */ is_optimized?: boolean | undefined + /** + * Indicates whether the climate preset is owned by the user or the system. + */ owner?: 'user' | 'system' | undefined } | undefined + /** + * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_fahrenheit?: number | undefined + /** + * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + /** + * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * @deprecated Use 'thermostat_schedule.is_override_allowed' + */ manual_override_allowed: boolean + /** + * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ name?: string | null | undefined }> | undefined + /** + * Fan mode settings that the thermostat supports. + */ available_fan_mode_settings?: Array<'auto' | 'on' | 'circulate'> | undefined + /** + * HVAC mode settings that the thermostat supports. + */ available_hvac_mode_settings?: Array<'off' | 'heat' | 'cool' | 'heat_cool' | 'eco'> | undefined + /** + * Current climate setting. + */ current_climate_setting?: | { + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. + */ can_delete?: boolean | undefined + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. + */ can_edit?: boolean | undefined + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. + */ can_use_with_thermostat_daily_programs?: boolean | undefined + /** + * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ climate_preset_key?: string | undefined + /** + * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + */ climate_preset_mode?: | 'home' | 'away' @@ -871,31 +2334,89 @@ export type Device = { | 'occupied' | 'unoccupied' | undefined + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_fahrenheit?: number | undefined + /** + * Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ display_name?: string | undefined + /** + * Metadata specific to the Ecobee climate, if applicable. + */ ecobee_metadata?: | { + /** + * Reference to the Ecobee climate, if applicable. + */ climate_ref?: string | undefined + /** + * Indicates if the climate preset is optimized by Ecobee. + */ is_optimized?: boolean | undefined + /** + * Indicates whether the climate preset is owned by the user or the system. + */ owner?: 'user' | 'system' | undefined } | undefined + /** + * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_fahrenheit?: number | undefined + /** + * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + /** + * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * @deprecated Use 'thermostat_schedule.is_override_allowed' + */ manual_override_allowed?: boolean | undefined + /** + * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ name?: string | null | undefined } | undefined + /** + * @deprecated use fallback_climate_preset_key to specify a fallback climate preset instead. + */ default_climate_setting?: | { + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be deleted. + */ can_delete?: boolean | undefined + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be edited. + */ can_edit?: boolean | undefined + /** + * Indicates whether the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) key can be programmed in a thermostat daily program. + */ can_use_with_thermostat_daily_programs?: boolean | undefined + /** + * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ climate_preset_key?: string | undefined + /** + * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + */ climate_preset_mode?: | 'home' | 'away' @@ -904,294 +2425,793 @@ export type Device = { | 'occupied' | 'unoccupied' | undefined + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_fahrenheit?: number | undefined + /** + * Display name for the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ display_name?: string | undefined + /** + * Metadata specific to the Ecobee climate, if applicable. + */ ecobee_metadata?: | { + /** + * Reference to the Ecobee climate, if applicable. + */ climate_ref?: string | undefined + /** + * Indicates if the climate preset is optimized by Ecobee. + */ is_optimized?: boolean | undefined + /** + * Indicates whether the climate preset is owned by the user or the system. + */ owner?: 'user' | 'system' | undefined } | undefined + /** + * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_fahrenheit?: number | undefined + /** + * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + /** + * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * @deprecated Use 'thermostat_schedule.is_override_allowed' + */ manual_override_allowed?: boolean | undefined + /** + * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ name?: string | null | undefined } | undefined + /** + * Key of the [fallback climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) for the thermostat. + */ fallback_climate_preset_key?: string | null | undefined + /** + * @deprecated Use `current_climate_setting.fan_mode_setting` instead. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Indicates whether the connected HVAC system is currently cooling, as reported by the thermostat. + */ is_cooling?: boolean | undefined + /** + * Indicates whether the fan in the connected HVAC system is currently running, as reported by the thermostat. + */ is_fan_running?: boolean | undefined + /** + * Indicates whether the connected HVAC system is currently heating, as reported by the thermostat. + */ is_heating?: boolean | undefined + /** + * Indicates whether the current thermostat settings differ from the most recent active program or schedule that Seam activated. For this condition to occur, `current_climate_setting.manual_override_allowed` must also be `true`. + */ is_temporary_manual_override_active?: boolean | undefined + /** + * Maximum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. + */ max_cooling_set_point_celsius?: number | undefined + /** + * Maximum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. + */ max_cooling_set_point_fahrenheit?: number | undefined + /** + * Maximum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. + */ max_heating_set_point_celsius?: number | undefined + /** + * Maximum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. + */ max_heating_set_point_fahrenheit?: number | undefined + /** + * Maximum number of periods that the thermostat can support per day. For example, if the thermostat supports 4 periods per day, this value is 4. + */ max_thermostat_daily_program_periods_per_day?: number | undefined + /** + * Maximum number of climate presets that the thermostat can support for weekly programming. + */ max_unique_climate_presets_per_thermostat_weekly_program?: number | undefined + /** + * Minimum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °C. + */ min_cooling_set_point_celsius?: number | undefined + /** + * Minimum [cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#cooling-set-point) in °F. + */ min_cooling_set_point_fahrenheit?: number | undefined + /** + * Minimum [temperature difference](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °C between the cooling and heating set points when in heat-cool (auto) mode. + */ min_heating_cooling_delta_celsius?: number | undefined + /** + * Minimum [temperature difference](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#minimum-heating-cooling-temperature-delta) in °F between the cooling and heating set points when in heat-cool (auto) mode. + */ min_heating_cooling_delta_fahrenheit?: number | undefined + /** + * Minimum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °C. + */ min_heating_set_point_celsius?: number | undefined + /** + * Minimum [heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points#heating-set-point) in °F. + */ min_heating_set_point_fahrenheit?: number | undefined + /** + * Reported relative humidity, as a value between 0 and 1, inclusive. + */ relative_humidity?: number | undefined + /** + * Reported temperature in °C. + */ temperature_celsius?: number | undefined + /** + * Reported temperature in °F. + */ temperature_fahrenheit?: number | undefined + /** + * Current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + */ temperature_threshold?: | { + /** + * Lower limit in °C within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + */ lower_limit_celsius: number | null + /** + * Lower limit in °F within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + */ lower_limit_fahrenheit: number | null + /** + * Upper limit in °C within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + */ upper_limit_celsius: number | null + /** + * Upper limit in °F within the current [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) set for the thermostat. + */ upper_limit_fahrenheit: number | null } | undefined + /** + * Precision of the thermostat's period in minutes. For example, if the thermostat supports 15-minute periods, this value is 15. All values are relative to the top of the hour, so for 15 minutes, the periods would be 0, 15, 30, and 45 minutes past the hour. + */ thermostat_daily_program_period_precision_minutes?: number | undefined + /** + * Configured [daily programs](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. + */ thermostat_daily_programs?: | Array<{ + /** + * Date and time at which the thermostat daily program was created. + */ created_at: string + /** + * ID of the thermostat device on which the thermostat daily program is configured. + */ device_id: string + /** + * User-friendly name to identify the thermostat daily program. + */ name: string | null + /** + * Array of thermostat daily program periods. + */ periods: Array<{ + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + */ climate_preset_key: string + /** + * Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at_time: string }> + /** + * ID of the thermostat daily program. + */ thermostat_daily_program_id: string + /** + * ID of the workspace that contains the thermostat daily program. + */ workspace_id: string }> | undefined + /** + * Current [weekly program](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-programs) for the thermostat. + */ thermostat_weekly_program?: | { + /** + * Date and time at which the thermostat weekly program was created. + */ created_at: string + /** + * ID of the thermostat daily program to run on Fridays. + */ friday_program_id: string | null + /** + * ID of the thermostat daily program to run on Mondays. + */ monday_program_id: string | null + /** + * ID of the thermostat daily program to run on Saturdays. + */ saturday_program_id: string | null + /** + * ID of the thermostat daily program to run on Sundays. + */ sunday_program_id: string | null + /** + * ID of the thermostat daily program to run on Thursdays. + */ thursday_program_id: string | null + /** + * ID of the thermostat daily program to run on Tuesdays. + */ tuesday_program_id: string | null + /** + * ID of the thermostat daily program to run on Wednesdays. + */ wednesday_program_id: string | null } | null | undefined } + /** + * IDs of the spaces the device is in. + */ space_ids: Array + /** + * Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + */ warnings: Array< + /** + * Indicates that the backup access code is unhealthy. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'partial_backup_access_code_pool' - } + } /** + * Indicates that there are too many backup codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'many_active_backup_codes' - } + } /** + * Indicates that a third-party integration has been detected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'third_party_integration_detected' - } + } /** + * Indicates that the Remote Unlock feature is not enabled in the settings." + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'ttlock_lock_gateway_unlocking_not_enabled' - } + } /** + * Indicates that the gateway signal is weak. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'ttlock_weak_gateway_signal' - } + } /** + * Indicates that the device is in power saving mode and may have limited functionality. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'power_saving_mode' - } + } /** + * Indicates that the temperature threshold has been exceeded. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'temperature_threshold_exceeded' - } + } /** + * Indicates that the device appears to be unresponsive. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_communication_degraded' - } + } /** + * Indicates that a scheduled maintenance window has been detected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'scheduled_maintenance_window' - } + } /** + * Indicates that the device has a flaky connection. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_has_flaky_connection' - } + } /** + * Indicates that the Salto KS lock is in Office Mode. Access Codes will not unlock doors. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_office_mode' - } + } /** + * Indicates that the Salto KS lock is in Privacy Mode. Access Codes will not unlock doors. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_privacy_mode' - } + } /** + * Indicates that the lock is in Privacy Mode. Access codes and remote unlock are blocked until Privacy Mode is disabled. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'privacy_mode' - } + } /** + * Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_subscription_limit_almost_reached' - } + } /** + * Indicates that a change in the reported device model has been detected for this Salto KS lock, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_lock_access_code_support_removed' - } + } /** + * Indicates that an unknown issue occurred while syncing the state of the phone with the provider. This issue may affect the proper functioning of the phone. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_phone' - } + } /** + * Indicates that Seam detected that the Lockly device does not have a time zone configured. Time-bound codes may not work as expected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'lockly_time_zone_not_configured' - } + } /** + * Indicates that Seam does not know the time zone of the Ultraloq device. Set a time zone to enable time-bound access codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'ultraloq_time_zone_unknown' - } + } /** + * Indicates that Seam does not know the device's time zone. Set a time zone to enable time-bound access codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_zone_unknown' - } + } /** + * Indicates that the device's configured time zone does not match its hardware UTC offset. Time-bound access codes may activate at the wrong local time. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_zone_mismatch' - } + } /** + * Indicates that the 2N device does not have a time zone configured. Configure a time zone on the device to enable access codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'two_n_device_missing_timezone' - } + } /** + * Indicates that a hub or relay must be connected to unlock additional capabilities such as remote unlock. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'hub_required_for_additional_capabilities' - } + } /** + * Indicates a provider-specific issue that may affect device functionality. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'provider_issue' - } + } /** + * Indicates that the key is in a locker that does not support the access codes API. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'keynest_unsupported_locker' - } + } /** + * Indicates that the accessory keypad exists, but is not linked to the Igloohome Bridge. Online access code programming will fail until the keypad is linked to the Igloohome Bridge in the Igloohome app. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'accessory_keypad_setup_required' - } + } /** + * Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unreliable_online_status' - } + } /** + * Indicates that the device has reached its maximum number of active access codes. Delete existing codes before creating new ones. + */ | { + /** + * Number of active access codes on the device when the warning was set. + */ active_access_code_count: number + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Maximum number of active access codes supported by the device. + */ max_active_access_code_count: number + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'max_access_codes_reached' - } + } /** + * Indicates that the connected Kwikset account has member-level access to this lock's home. Admin or owner access is required to manage access codes and control the lock remotely. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'insufficient_permissions' } > + /** + * Unique identifier for the Seam workspace associated with the device. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/event.ts b/src/lib/seam/connect/resources/event.ts index f9678f53..b0f598c1 100644 --- a/src/lib/seam/connect/resources/event.ts +++ b/src/lib/seam/connect/resources/event.ts @@ -5,9 +5,19 @@ export type SeamEvent = | { + /** + * Date and time at which the event was created. + */ created_at?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id?: string | undefined + event_type?: | 'access_code.created' | 'access_code.changed' @@ -119,170 +129,428 @@ export type SeamEvent = | 'space.created' | 'space.deleted' | undefined + /** + * Date and time at which the event occurred. + */ occurred_at?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id?: string | undefined } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Human-readable reason for the change (e.g. `ongoing code auto-renewed`). + */ change_reason?: string | undefined + /** + * List of properties that changed on the access code. + */ changed_properties?: | Array<{ + /** + * Previous value of the property, or null if not set. + */ from: string | null + /** + * Name of the property that changed (e.g. `code`). + */ property: string + /** + * New value of the property, or null if cleared. + */ to: string | null }> | undefined + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.changed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the change and its source. + */ description: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.name_changed' + /** + * Previous access code name configuration. + */ from: { + /** + * Previous name of the access code. + */ name: string | null } + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * New access code name configuration. + */ to: { + /** + * New name of the access code. + */ name: string | null } + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the change and its source. + */ description: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.code_changed' + /** + * Previous pin code configuration. + */ from: { + /** + * Previous pin code. + */ code: string | null } + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * New pin code configuration. + */ to: { + /** + * New pin code. + */ code: string | null } + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the change and its source. + */ description: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.time_frame_changed' + /** + * Previous time frame configuration. + */ from: { + /** + * Previous end time. + */ ends_at: string | null + /** + * Previous start time. + */ starts_at: string | null } + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * New time frame configuration. + */ to: { + /** + * New end time. + */ ends_at: string | null + /** + * New start time. + */ starts_at: string | null } + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.mutations_requested' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Array of mutations requested on the access code, each containing the mutation type and from/to values. + */ requested_mutations: Array<{ + /** + * Previous property values before the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. + */ from?: Record | undefined + /** + * Code identifying the type of mutation requested, such as `updating_name`, `updating_code`, `updating_time_frame`, or `deleting`. + */ mutation_code: | 'updating_name' | 'updating_code' @@ -291,2137 +559,5390 @@ export type SeamEvent = | 'creating' | 'deferring_creation' + /** + * New property values after the requested change. Keys depend on the mutation type. Absent for non-property mutations like `deleting`. + */ to?: Record | undefined }> + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Code for the affected access code. + */ code: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.scheduled_on_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Code for the affected access code. + */ code: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.set_on_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.removed_from_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Errors associated with the access code. + */ access_code_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Warnings associated with the access code. + */ access_code_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.delay_in_setting_on_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Errors associated with the access code. + */ access_code_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Warnings associated with the access code. + */ access_code_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.failed_to_set_on_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Code for the affected access code. + */ code: string | null + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Errors associated with the access code. + */ access_code_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Warnings associated with the access code. + */ access_code_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.delay_in_removing_from_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Errors associated with the access code. + */ access_code_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Warnings associated with the access code. + */ access_code_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.failed_to_remove_from_device' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.modified_external_to_seam' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.deleted_external_to_seam' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * ID of the backup access code that was pulled from the pool. + */ backup_access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.backup_access_code_pulled' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.unmanaged.converted_to_managed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Errors associated with the access code. + */ access_code_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Warnings associated with the access code. + */ access_code_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.unmanaged.failed_to_convert_to_managed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.unmanaged.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access code. + */ access_code_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the affected access code. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the device associated with the affected access code. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_code.unmanaged.removed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.access_granted_to_all_doors' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * ID of the affected [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ acs_entrance_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.access_granted_to_door' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * ID of the affected [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ acs_entrance_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.access_to_door_lost' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * Key of the affected Access Grant (if present). + */ access_grant_key?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The new end time for the access grant. + */ ends_at?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.access_times_changed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * The new start time for the access grant. + */ starts_at?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Access Grant. + */ access_grant_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Description of why the access methods could not be created. + */ error_message: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_grant.could_not_create_requested_access_methods' + /** + * IDs of the devices that did not receive a requested access method. Use these to identify which specific devices failed without having to fetch the Access Grant. + */ missing_device_ids?: Array | undefined + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * The actual PIN code for code access methods (only present when mode is 'code'). + */ code?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.issued' + /** + * Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). + */ is_backup_code?: boolean | undefined + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.revoked' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.card_encoding_required' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * The actual PIN code for code access methods (only present when mode is 'code'). + */ code?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.reissued' + /** + * Indicates whether the code is a backup code (only present when mode is 'code' and a backup code was used). + */ is_backup_code?: boolean | undefined + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.delay_in_issuing' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of the access grants associated with this access method. + */ access_grant_ids: Array + /** + * Keys of the access grants associated with this access method (if present). + */ access_grant_keys?: Array | undefined + /** + * ID of the affected access method. + */ access_method_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'access_method.failed_to_issue' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_system.connected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_system.added' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Errors associated with the access control system. + */ acs_system_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the access system. + */ acs_system_id: string + /** + * Warnings associated with the access control system. + */ acs_system_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_system.disconnected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected credential. + */ acs_credential_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_credential.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected credential. + */ acs_credential_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_credential.issued' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected credential. + */ acs_credential_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_credential.reissued' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected credential. + */ acs_credential_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_credential.invalidated' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the affected access system user. + */ acs_user_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_user.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the affected access system user. + */ acs_user_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_user.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected encoder. + */ acs_encoder_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_encoder.added' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected encoder. + */ acs_encoder_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_encoder.removed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected access group. + */ acs_access_group_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_access_group.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected entrance. + */ acs_entrance_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_entrance.added' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected entrance. + */ acs_entrance_id: string + /** + * ID of the access system. + */ acs_system_id: string + /** + * ID of the connected account. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'acs_entrance.removed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected client session. + */ client_session_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'client_session.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the Connect Webview associated with the event. + */ connect_webview_id?: string | undefined + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with this connected account, if any. + */ customer_key?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.connected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the Connect Webview associated with the event. + */ connect_webview_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the Connect Webview associated with the event. + */ connect_webview_id: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.successful_login' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.disconnected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.completed_first_sync' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * undocumented: Unreleased. + */ connected_account_type?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with this connected account, if any. + */ customer_key?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.completed_first_sync_after_reconnection' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected connected account. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connected_account.reauthorization_requested' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.lock_door.succeeded' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.lock_door.failed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.unlock_door.succeeded' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.unlock_door.failed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.simulate_keypad_code_entry.succeeded' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.simulate_keypad_code_entry.failed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.simulate_manual_lock_via_keypad.succeeded' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected action attempt. + */ action_attempt_id: string + /** + * Type of the action. + */ action_type: string + /** + * ID of the connected account associated with the action attempt, if applicable. + */ connected_account_id?: string | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * ID of the device associated with the action attempt, if applicable. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'action_attempt.simulate_manual_lock_via_keypad.failed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Status of the action. + */ status: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Connect Webview. + */ connect_webview_id: string + /** + * Custom metadata of the connected account; present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with this connect webview, if any. + */ customer_key?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connect_webview.login_succeeded' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the affected Connect Webview. + */ connect_webview_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'connect_webview.login_failed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.connected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.added' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.converted_to_unmanaged' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.unmanaged.converted_to_managed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.unmanaged.connected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected device. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Error code associated with the disconnection event, if any. + */ error_code: 'account_disconnected' | 'hub_disconnected' | 'device_disconnected' + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.disconnected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected device. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Error code associated with the disconnection event, if any. + */ error_code: 'account_disconnected' | 'hub_disconnected' | 'device_disconnected' + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.unmanaged.disconnected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.tampered' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. + */ battery_level: number + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.low_battery' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device. + */ battery_level: number + /** + * Battery status of the affected device, calculated from the numeric `battery_level` value. + */ battery_status: 'critical' | 'low' | 'good' | 'full' + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.battery_status_changed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.removed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Name of the deleted device, captured at deletion time. The device record no longer exists when this event fires, so the name is preserved here. Null when the device had no resolvable name. + */ device_name?: string | null | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.third_party_integration_detected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.third_party_integration_no_longer_detected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.salto.privacy_mode_activated' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.salto.privacy_mode_deactivated' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected device. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.connection_became_flaky' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.connection_stabilized' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected device. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.error.subscription_required' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.error.subscription_required.resolved' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.accessory_keypad_connected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * Errors associated with the connected account. + */ connected_account_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Warnings associated with the connected account. + */ connected_account_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * Errors associated with the device. + */ device_errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * ID of the affected device. + */ device_id: string + /** + * Warnings associated with the device. + */ device_warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: string }> + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.accessory_keypad_disconnected' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'noise_sensor.noise_threshold_triggered' + /** + * Metadata from Minut. + */ minut_metadata?: Record | undefined + /** + * Detected noise level in decibels. + */ noise_level_decibels?: number | undefined + /** + * Detected noise level in Noiseaware Noise Risk Score (NRS). + */ noise_level_nrs?: number | undefined + /** + * ID of the noise threshold that was triggered. + */ noise_threshold_id?: string | undefined + /** + * Name of the noise threshold that was triggered. + */ noise_threshold_name?: string | undefined + /** + * Metadata from Noiseaware. + */ noiseaware_metadata?: Record | undefined + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access code that was used to lock the device. + */ access_code_id?: string | undefined + /** + * Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. + */ access_code_is_managed?: boolean | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS entrance associated with the lock event. + */ acs_entrance_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS system associated with the lock event. + */ acs_system_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS user associated with the lock event. + */ acs_user_id?: string | undefined + /** + * ID of the Seam action attempt that triggered this lock. Present only when the lock was initiated through Seam (via a `LOCK_DOOR` action attempt). + */ action_attempt_id?: string | undefined + /** + * Code (PIN) that was used to lock the device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. + */ code?: string | undefined + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'lock.locked' + /** + * Whether the lock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. + */ is_via_bluetooth?: boolean | undefined + /** + * Whether the lock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. + */ is_via_nfc?: boolean | undefined + /** + * Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined. + */ method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * undocumented: Unreleased. + * --- + * ID of the user identity associated with the lock event. + */ user_identity_id?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access code that was used to unlock the affected device. + */ access_code_id?: string | undefined + /** + * Whether the access code is managed by Seam (true) or unmanaged (false). Only present when access_code_id is set. + */ access_code_is_managed?: boolean | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS entrance associated with the unlock event. + */ acs_entrance_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS system associated with the unlock event. + */ acs_system_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS user associated with the unlock event. + */ acs_user_id?: string | undefined + /** + * ID of the Seam action attempt that triggered this unlock. Present only when the unlock was initiated through Seam (via an `UNLOCK_DOOR` action attempt). + */ action_attempt_id?: string | undefined + /** + * Code (PIN) that was used to unlock the affected device, if known. Taken from the matched managed or unmanaged access code, or from the code reported by the provider when no access code matched. + */ code?: string | undefined + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'lock.unlocked' + /** + * Whether the unlock action was performed over Bluetooth by a remote client (such as the provider's mobile app), rather than a direct physical interaction or a Seam-initiated remote action. + */ is_via_bluetooth?: boolean | undefined + /** + * Whether the unlock action was performed by an NFC credential tap (such as an Apple Home Key or an NFC key fob) presented to the lock, rather than a direct physical interaction or a Seam-initiated remote action. + */ is_via_nfc?: boolean | undefined + /** + * Method by which the lock was unlocked. `keycode`: an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined. + */ method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * undocumented: Unreleased. + * --- + * ID of the user identity associated with the unlock event. + */ user_identity_id?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * ID of the access code that was used in the unlock attempts. + */ access_code_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS entrance associated with the access-denied event. + */ acs_entrance_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS system associated with the access-denied event. + */ acs_system_id?: string | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the ACS user associated with the access-denied event. + */ acs_user_id?: string | undefined + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id?: string | undefined + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'lock.access_denied' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Why access was denied, when the provider reports a determinable cause. Omitted when unknown. + */ reason?: | { + /** + * Human-readable explanation of why access was denied. + */ message: string + /** + * Normalized reason a lock denied access. Provider-agnostic; not all providers report every value. + */ reason_code: | 'unknown_code' | 'expired_code' @@ -2431,298 +5952,792 @@ export type SeamEvent = | 'credential_error' } | undefined + /** + * undocumented: Unreleased. + * --- + * ID of the user identity associated with the access-denied event. + */ user_identity_id?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Key of the climate preset that was activated. + */ climate_preset_key: string + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'thermostat.climate_preset_activated' + /** + * Indicates whether the climate preset that was activated is the fallback climate preset for the thermostat. + */ is_fallback_climate_preset: boolean + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the thermostat schedule that prompted the affected climate preset to be activated. + */ thermostat_schedule_id: string | null + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_fahrenheit?: number | undefined + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'thermostat.manually_adjusted' + /** + * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_fahrenheit?: number | undefined + /** + * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + /** + * Method used to adjust the affected thermostat manually. `seam` indicates that the Seam API, Seam CLI, or Seam Console was used to adjust the thermostat. + */ method: 'seam' | 'external' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'thermostat.temperature_threshold_exceeded' + /** + * Lower temperature limit, in °C, defined by the set threshold. + */ lower_limit_celsius: number | null + /** + * Lower temperature limit, in °F, defined by the set threshold. + */ lower_limit_fahrenheit: number | null + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Temperature, in °C, reported by the affected thermostat. + */ temperature_celsius: number + /** + * Temperature, in °F, reported by the affected thermostat. + */ temperature_fahrenheit: number + /** + * Upper temperature limit, in °C, defined by the set threshold. + */ upper_limit_celsius: number | null + /** + * Upper temperature limit, in °F, defined by the set threshold. + */ upper_limit_fahrenheit: number | null + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'thermostat.temperature_threshold_no_longer_exceeded' + /** + * Lower temperature limit, in °C, defined by the set threshold. + */ lower_limit_celsius: number | null + /** + * Lower temperature limit, in °F, defined by the set threshold. + */ lower_limit_fahrenheit: number | null + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Temperature, in °C, reported by the affected thermostat. + */ temperature_celsius: number + /** + * Temperature, in °F, reported by the affected thermostat. + */ temperature_fahrenheit: number + /** + * Upper temperature limit, in °C, defined by the set threshold. + */ upper_limit_celsius: number | null + /** + * Upper temperature limit, in °F, defined by the set threshold. + */ upper_limit_fahrenheit: number | null + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Desired temperature, in °C, defined by the affected thermostat's cooling or heating set point. + */ desired_temperature_celsius?: number | undefined + /** + * Desired temperature, in °F, defined by the affected thermostat's cooling or heating set point. + */ desired_temperature_fahrenheit?: number | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'thermostat.temperature_reached_set_point' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Temperature, in °C, reported by the affected thermostat. + */ temperature_celsius: number + /** + * Temperature, in °F, reported by the affected thermostat. + */ temperature_fahrenheit: number + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'thermostat.temperature_changed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * Temperature, in °C, reported by the affected thermostat. + */ temperature_celsius: number + /** + * Temperature, in °F, reported by the affected thermostat. + */ temperature_fahrenheit: number + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * The new name of the affected device. + */ device_name: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.name_changed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * The reason the camera was activated. + */ activation_reason: 'motion_detected' + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'camera.activated' + /** + * URL to a thumbnail image captured at the time of activation. + */ image_url?: string | undefined + /** + * Sub-type of motion detected, if available. + */ motion_sub_type?: 'human' | 'vehicle' | 'package' | 'other' | undefined + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * URL to a short video clip captured at the time of activation. + */ video_url?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Custom metadata of the connected account, present when connected_account_id is provided. + */ connected_account_custom_metadata?: Record | undefined + /** + * ID of the connected account associated with the event. + */ connected_account_id: string + /** + * Date and time at which the event was created. + */ created_at: string + /** + * The customer key associated with the device, if any. + */ customer_key?: string | undefined + /** + * Custom metadata of the device, present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'device.doorbell_rang' + /** + * URL to a thumbnail image captured at the time the doorbell was pressed. + */ image_url?: string | undefined + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * URL to a short video clip captured at the time the doorbell was pressed. + */ video_url?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * Date and time at which the event was created. + */ created_at: string + /** + * Custom metadata of the device; present when device_id is provided. + */ device_custom_metadata?: Record | undefined + /** + * ID of the affected phone device. + */ device_id: string + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string event_type: 'phone.deactivated' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of all ACS entrances currently attached to the space. + */ acs_entrance_ids: Array + /** + * Date and time at which the event was created. + */ created_at: string + /** + * IDs of all devices currently attached to the space. + */ device_ids: Array + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string + /** + * Type of the event. + */ event_type: 'space.device_membership_changed' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the affected space. + */ space_id: string + /** + * Unique key for the space within the workspace. + */ space_key?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of all ACS entrances attached to the space when it was created. + */ acs_entrance_ids: Array + /** + * Date and time at which the event was created. + */ created_at: string + /** + * IDs of all devices attached to the space when it was created. + */ device_ids: Array + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string + /** + * Type of the event. + */ event_type: 'space.created' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the affected space. + */ space_id: string + /** + * Unique key for the space within the workspace. + */ space_key?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } | { + /** + * IDs of all ACS entrances currently attached to the space when it was deleted. + */ acs_entrance_ids: Array + /** + * Date and time at which the event was created. + */ created_at: string + /** + * IDs of all devices attached to the space when it was deleted. + */ device_ids: Array + /** + * Human-readable description of the event. Persisted when the event is created (so the creating code, including a provider, can supply a tailored description) and otherwise derived from the event. + */ event_description?: string | undefined + /** + * ID of the event. + */ event_id: string + /** + * Type of the event. + */ event_type: 'space.deleted' + /** + * Date and time at which the event occurred. + */ occurred_at: string + /** + * ID of the affected space. + */ space_id: string + /** + * Unique key for the space within the workspace. + */ space_key?: string | undefined + /** + * ID of the workspace associated with the event. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/instant-key.ts b/src/lib/seam/connect/resources/instant-key.ts index 917f15e6..fae5fe42 100644 --- a/src/lib/seam/connect/resources/instant-key.ts +++ b/src/lib/seam/connect/resources/instant-key.ts @@ -3,26 +3,67 @@ * Do not edit this file. */ +/** + * Represents a Seam Instant Key. For issuing Bluetooth mobile keys, Instant Keys are the fastest way to share access. With a single API call, you can create a mobile key and send it through text or email or embed it in your own app. + * + * There’s no app to install, nor account to create. Your user just taps a link and gets a lightweight, native-feeling experience using iOS App Clip or Instant Apps on Android. Further, Instant Keys work offline, so even in areas with poor cellular or Wi-Fi, like elevator banks or concrete-walled hallways, the Instant Keys still work. + */ export type InstantKey = { + /** + * ID of the client session associated with the Instant Key. + */ client_session_id: string + /** + * Date and time at which the Instant Key was created. + */ created_at: string + /** + * Customization applied to the Instant Key UI. + */ customization?: | { + /** + * URL of the logo displayed on the Instant Key. + */ logo_url?: string | undefined + /** + * Primary color used in the Instant Key UI. + */ primary_color?: string | undefined + /** + * Secondary color used in the Instant Key UI. + */ secondary_color?: string | undefined } | undefined + /** + * ID of the customization profile associated with the Instant Key. + */ customization_profile_id?: string | undefined + /** + * Date and time at which the Instant Key expires. + */ expires_at: string + /** + * ID of the Instant Key. + */ instant_key_id: string + /** + * Shareable URL for the Instant Key. Use the URL to deliver the Instant Key to your user through a link in a text message or email or by embedding it in your web app. + */ instant_key_url: string + /** + * ID of the user identity associated with the Instant Key. + */ user_identity_id: string + /** + * ID of the workspace that contains the Instant Key. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/noise-threshold.ts b/src/lib/seam/connect/resources/noise-threshold.ts index ba6b6b5b..79fe8e76 100644 --- a/src/lib/seam/connect/resources/noise-threshold.ts +++ b/src/lib/seam/connect/resources/noise-threshold.ts @@ -3,17 +3,41 @@ * Do not edit this file. */ +/** + * Represents a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + */ export type NoiseThreshold = { + /** + * Unique identifier for the device that contains the noise threshold. + */ device_id: string + /** + * Time at which the noise threshold should become inactive daily. + */ ends_daily_at: string + /** + * Name of the noise threshold. + */ name: string + /** + * Noise level in decibels for the noise threshold. + */ noise_threshold_decibels: number + /** + * Unique identifier for the noise threshold. + */ noise_threshold_id: string + /** + * Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). + */ noise_threshold_nrs?: number | undefined + /** + * Time at which the noise threshold should become active daily. + */ starts_daily_at: string } diff --git a/src/lib/seam/connect/resources/phone.ts b/src/lib/seam/connect/resources/phone.ts index 8ea83190..f1b53516 100644 --- a/src/lib/seam/connect/resources/phone.ts +++ b/src/lib/seam/connect/resources/phone.ts @@ -3,52 +3,124 @@ * Do not edit this file. */ +/** + * Represents an app user's mobile phone. + */ export type Phone = { + /** + * Date and time at which the phone was created. + */ created_at: string + /** + * Optional [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for the phone. + */ custom_metadata: Record + /** + * ID of the phone. + */ device_id: string + /** + * Type of the phone device, such as `ios_phone` or `android_phone`. + */ device_type: 'ios_phone' | 'android_phone' + /** + * Display name of the phone. Defaults to `nickname` (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the phone easily, especially when there are numerous phones. + */ display_name: string + /** + * Errors associated with the phone. + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. + */ error_code: string + /** + * Detailed description of the error. + */ message: string }> + /** + * Optional nickname to describe the phone, settable through Seam. + */ nickname?: string | undefined + /** + * Properties of the phone. + */ properties: { + /** + * ASSA ABLOY Credential Service metadata for the phone. + */ assa_abloy_credential_service_metadata?: | { + /** + * Endpoints associated with the phone. + */ endpoints?: | Array<{ + /** + * ID of the associated endpoint. + */ endpoint_id?: string | undefined + /** + * Indicated whether the endpoint is active. + */ is_active?: boolean | undefined }> | undefined + /** + * Indicates whether the credential service has active endpoints associated with the phone. + */ has_active_endpoint?: boolean | undefined } | undefined + /** + * Salto Space credential service metadata for the phone. + */ salto_space_credential_service_metadata?: | { + /** + * Indicates whether the credential service has an active associated phone. + */ has_active_phone?: boolean | undefined } | undefined } + /** + * Warnings associated with the phone. + */ warnings: Array<{ + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. + */ message: string + /** + * Unique identifier of the type of warning. + */ warning_code: string }> + /** + * ID of the workspace that contains the phone. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/space.ts b/src/lib/seam/connect/resources/space.ts index 1c3f3c8c..a6dcfd4f 100644 --- a/src/lib/seam/connect/resources/space.ts +++ b/src/lib/seam/connect/resources/space.ts @@ -3,36 +3,90 @@ * Do not edit this file. */ +/** + * Represents a space that is a logical grouping of devices and entrances. You can assign access to an entire space, thereby making granting access more efficient. + */ export type Space = { + /** + * Number of entrances in the space. + */ acs_entrance_count: number + /** + * Date and time at which the space was created. + */ created_at: string + /** + * Reservation/stay-related defaults for the space. Also carries the provider/PMS-supplied name under a `_name` key (e.g. `guesty_name`), which Seam preserves when you rename the space (read-only — managed by Seam). + */ customer_data?: | { + /** + * Postal address for the space. + */ address?: string | null | undefined + /** + * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkin_time?: string | null | undefined + /** + * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkout_time?: string | null | undefined + /** + * IANA time zone for the space, e.g. America/Los_Angeles. + */ time_zone?: string | null | undefined } | undefined + /** + * Customer key associated with the space. + */ customer_key?: string | undefined + /** + * Number of devices in the space. + */ device_count: number + /** + * Display name for the space. + */ display_name: string + /** + * Geographic coordinates (latitude and longitude) of the space. + */ geolocation?: | { + /** + * Latitude of the space, in decimal degrees. + */ latitude: number + /** + * Longitude of the space, in decimal degrees. + */ longitude: number } | null | undefined + /** + * Name of the space. + */ name: string + /** + * ID of the space. + */ space_id: string + /** + * Unique key for the space within the workspace. + */ space_key?: string | undefined + /** + * ID of the workspace associated with the space. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/thermostat-daily-program.ts b/src/lib/seam/connect/resources/thermostat-daily-program.ts index 28092a2c..a5815eb8 100644 --- a/src/lib/seam/connect/resources/thermostat-daily-program.ts +++ b/src/lib/seam/connect/resources/thermostat-daily-program.ts @@ -3,19 +3,46 @@ * Do not edit this file. */ +/** + * Represents a thermostat daily program, consisting of a set of periods, each of which has a starting time and the key that identifies the climate preset to apply at the starting time. + */ export type ThermostatDailyProgram = { + /** + * Date and time at which the thermostat daily program was created. + */ created_at: string + /** + * ID of the thermostat device on which the thermostat daily program is configured. + */ device_id: string + /** + * User-friendly name to identify the thermostat daily program. + */ name: string | null + /** + * Array of thermostat daily program periods. + */ periods: Array<{ + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + */ climate_preset_key: string + /** + * Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at_time: string }> + /** + * ID of the thermostat daily program. + */ thermostat_daily_program_id: string + /** + * ID of the workspace that contains the thermostat daily program. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/thermostat-schedule.ts b/src/lib/seam/connect/resources/thermostat-schedule.ts index 18469c12..23e7c1a5 100644 --- a/src/lib/seam/connect/resources/thermostat-schedule.ts +++ b/src/lib/seam/connect/resources/thermostat-schedule.ts @@ -3,29 +3,74 @@ * Do not edit this file. */ +/** + * Represents a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) that activates a configured [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) on a [thermostat](https://docs.seam.co/capability-guides/thermostats) at a specified starting time and deactivates the climate preset at a specified ending time. + */ export type ThermostatSchedule = { + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ climate_preset_key: string + /** + * Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) was created. + */ created_at: string + /** + * ID of the desired [thermostat](https://docs.seam.co/capability-guides/thermostats) device. + */ device_id: string + /** + * Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ ends_at: string + /** + * Errors associated with the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ errors: Array<{ + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: string + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string }> + /** + * Indicates whether a person at the thermostat can change the thermostat's settings after the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts. + */ is_override_allowed?: boolean | undefined + /** + * Number of minutes for which a person at the thermostat can change the thermostat's settings after the activation of the scheduled [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ max_override_period_minutes?: number | null | undefined + /** + * User-friendly name to identify the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ name: string | null + /** + * Date and time at which the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at: string + /** + * ID of the [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ thermostat_schedule_id: string + /** + * ID of the workspace that contains the thermostat schedule. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/unmanaged-access-code.ts b/src/lib/seam/connect/resources/unmanaged-access-code.ts index 2e65576f..2cbd7a6f 100644 --- a/src/lib/seam/connect/resources/unmanaged-access-code.ts +++ b/src/lib/seam/connect/resources/unmanaged-access-code.ts @@ -3,318 +3,868 @@ * Do not edit this file. */ +/** + * Represents an [unmanaged smart lock access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + * + * An access code is a code used for a keypad or pinpad device. Unlike physical keys, which can easily be lost or duplicated, PIN codes can be customized, tracked, and altered on the fly. + * + * When you create an access code on a device in Seam, it is created as a managed access code. Access codes that exist on a device that were not created through Seam are considered unmanaged codes. We strictly limit the operations that can be performed on unmanaged codes. + * + * Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace. + * + * Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes: + * + * - [Kwikset](https://docs.seam.co/device-and-system-integration-guides/kwikset-locks) + */ export type UnmanagedAccessCode = { + /** + * Unique identifier for the access code. + */ access_code_id: string + /** + * Indicates that Seam cannot convert this unmanaged access code to a managed access code. Some providers do not support management of unmanaged access codes through API integrations. + */ cannot_be_managed?: boolean | undefined + /** + * Indicates that Seam cannot delete this unmanaged access code through the provider. If this access code needs to be deleted, it will only be possible from the manufacturer app. + */ cannot_delete_unmanaged_access_code?: boolean | undefined + /** + * Code used for access. Typically, a numeric or alphanumeric string. + */ code: string | null + /** + * Date and time at which the access code was created. + */ created_at: string + /** + * Unique identifier for the device associated with the access code. + */ device_id: string + /** + * Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices. + */ dormakaba_oracode_metadata?: | { + /** + * Indicates whether the stay can be cancelled via the Dormakaba Oracode API. + */ is_cancellable?: boolean | undefined + /** + * Indicates whether early check-in is available for this stay. + */ is_early_checkin_able?: boolean | undefined + /** + * Indicates whether the stay can be extended via the Dormakaba Oracode API. + */ is_extendable?: boolean | undefined + /** + * Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached. + */ is_overridable?: boolean | undefined + /** + * Dormakaba Oracode site name associated with this access code. + */ site_name?: string | undefined + /** + * Dormakaba Oracode stay ID associated with this access code. + */ stay_id?: number | undefined + /** + * Dormakaba Oracode user level ID associated with this access code. + */ user_level_id?: string | undefined + /** + * Dormakaba Oracode user level name associated with this access code. + */ user_level_name?: string | null | undefined } | null | undefined + /** + * Date and time after which the time-bound access code becomes inactive. + */ ends_at?: string | null | undefined + /** + * Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + */ errors: Array< + /** + * Indicates a provider-specific issue that prevents the access code from being set or managed. Check the error message for details. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'provider_issue' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Failed to set code on device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'failed_to_set_on_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Failed to remove code from device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'failed_to_remove_from_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Duplicate access code detected on device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'duplicate_code_on_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * ID of the managed access code that conflicts with this managed access code, when Seam can identify it. + */ managed_access_code_id?: string | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * ID of the unmanaged access code that conflicts with this managed access code, when Seam can identify it. + */ unmanaged_access_code_id?: string | undefined - } + } /** + * No space for access code on device. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'no_space_for_access_code_on_device' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Code was modified or removed externally after Seam successfully set it on the device. The external change conflicts with the state that Seam is trying to apply, so Seam will attempt to set the code on the device again. + */ | { + /** + * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + */ change_type?: 'modified' | 'removed' | undefined + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'conflicting_external_modification' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * List of fields that were changed externally, with their previous and new values. + */ modified_fields?: | Array<{ + /** + * The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + */ field: string + /** + * The previous value of the field. + */ from: string | null + /** + * The new value of the field. + */ to: string | null }> | undefined - } + } /** + * Indicates that the access code is disabled or inactive on the device. The code exists but will not grant access until re-enabled. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'access_code_inactive' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at?: string | undefined + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'insufficient_permissions' + /** + * Indicates that this is an access code error. + */ is_access_code_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the account is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'account_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Salto site user limit has been reached. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'dormakaba_sites_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is offline. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_offline' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device has been removed. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_removed' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the hub is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'hub_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'empty_backup_access_code_pool' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the user is not authorized to use the August lock. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'august_lock_not_authorized' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that device credentials are missing. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'missing_device_credentials' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the auxiliary heat is running. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'auxiliary_heat_running' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that a subscription is required to connect. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'subscription_required' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'bridge_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * Indicates that Seam does not manage the access code. + */ is_managed: boolean + /** + * Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + */ name: string | null + /** + * Date and time at which the time-bound access code becomes active. + */ starts_at?: string | null | undefined + /** + * Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device. + */ status: 'set' | 'unset' + /** + * Type of the access code. `ongoing` access codes are active continuously until deactivated manually. `time_bound` access codes have a specific duration. + */ type: 'time_bound' | 'ongoing' + /** + * Warnings associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + */ warnings: Array< + /** + * The access code's PIN rotates periodically when the code is renewed. Retrieve the latest code before each use. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'code_rotates_periodically' - } + } /** + * The device's time zone is unknown and this code's time frame crosses a daylight-saving transition in at least one plausible time zone. A 1-hour safety buffer has been applied to the side of the time frame affected by the transition (`ends_at` for spring-forward, `starts_at` for fall-back) so the code stays active through the shift — the code may be usable up to 1 hour beyond your requested window. Set the device's time zone via `/devices/report_provider_metadata` to clear the buffer and guarantee exact handling. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_frame_adjusted_for_unknown_time_zone' - } + } /** + * Code was modified or removed externally after Seam successfully set it on the device. External modification is allowed for this code, so the externally modified state is being honored. + */ | { + /** + * Indicates the type of external modification. `modified` means the code's PIN or schedule was changed. `removed` means the code was deleted from the device. + */ change_type?: 'modified' | 'removed' | undefined + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * List of fields that were changed externally, with their previous and new values. + */ modified_fields?: | Array<{ + /** + * The name of the field that was changed (e.g. `code`, `starts_at`, `ends_at`). + */ field: string + /** + * The previous value of the field. + */ from: string | null + /** + * The new value of the field. + */ to: string | null }> | undefined + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'external_modification_in_effect' - } + } /** + * Delay in setting code on device. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'delay_in_setting_on_device' - } + } /** + * Delay in removing code from device. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'delay_in_removing_from_device' - } + } /** + * Third-party integration detected that may cause access codes to fail. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'third_party_integration_detected' - } + } /** + * Algopins must be used within 24 hours. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'igloo_algopin_must_be_used_within_24_hours' - } + } /** + * Management was transferred to another workspace. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'management_transferred' - } + } /** + * A backup access code has been pulled and is being used in place of this access code. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'using_backup_access_code' - } + } /** + * Access code is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * An unknown issue occurred with the access code. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at?: string | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_access_code' } > + /** + * Unique identifier for the Seam workspace associated with the access code. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/unmanaged-access-grant.ts b/src/lib/seam/connect/resources/unmanaged-access-grant.ts index 21751075..f8fb7087 100644 --- a/src/lib/seam/connect/resources/unmanaged-access-grant.ts +++ b/src/lib/seam/connect/resources/unmanaged-access-grant.ts @@ -3,162 +3,418 @@ * Do not edit this file. */ +/** + * Represents an unmanaged Access Grant. Unmanaged Access Grants do not have client sessions, instant keys, customization profiles, or keys. + */ export type UnmanagedAccessGrant = { + /** + * ID of the Access Grant. + */ access_grant_id: string + /** + * IDs of the access methods created for the Access Grant. + */ access_method_ids: Array + /** + * Date and time at which the Access Grant was created. + */ created_at: string + /** + * Display name of the Access Grant. + */ display_name: string + /** + * Date and time at which the Access Grant ends. + */ ends_at: string | null - errors: Array<{ - created_at: string - - error_code: 'cannot_create_requested_access_methods' - - message: string - - missing_device_ids?: Array | undefined - }> + /** + * Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access). + */ + errors: Array< + /** + * Indicates that Seam could not create one or more of the requested access methods for the access grant. + */ + { + /** + * Date and time at which Seam created the error. + */ + created_at: string + + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'cannot_create_requested_access_methods' + + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + + /** + * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure. + */ + missing_device_ids?: Array | undefined + } + > + /** + * @deprecated Use `space_ids`. + */ location_ids: Array + /** + * Name of the Access Grant. If not provided, the display name will be computed. + */ name: string | null + /** + * List of pending mutations for the access grant. This shows updates that are in progress. + */ pending_mutations: Array< + /** + * Seam is in the process of updating the devices/spaces associated with this access grant. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous location configuration. + */ from: { + /** + * Previous device IDs where access codes existed. + */ device_ids: Array } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the spaces (devices) associated with this access grant. + */ mutation_code: 'updating_spaces' + /** + * New location configuration. + */ to: { + /** + * Common code key to ensure PIN code reuse across devices. + */ common_code_key?: string | null | undefined + /** + * New device IDs where access codes should be created. + */ device_ids: Array } - } + } /** + * Seam is in the process of updating the access times for this access grant. + */ | { + /** + * IDs of the access methods being updated. + */ access_method_ids: Array + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous access time configuration. + */ from: { + /** + * Previous end time for access. + */ ends_at: string | null + /** + * Previous start time for access. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the access times for this access grant. + */ mutation_code: 'updating_access_times' + /** + * New access time configuration. + */ to: { + /** + * New end time for access. + */ ends_at: string | null + /** + * New start time for access. + */ starts_at: string | null } } > + /** + * Access methods that the user requested for the Access Grant. + */ requested_access_methods: Array<{ + /** + * Specific PIN code to use for this access method. Only applicable when mode is 'code'. + */ code?: string | undefined + /** + * IDs of the access methods created for the requested access method. + */ created_access_method_ids: Array + /** + * Date and time at which the requested access method was added to the Access Grant. + */ created_at: string + /** + * Display name of the access method. + */ display_name: string + /** + * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + */ instant_key_max_use_count?: number | undefined + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' }> + /** + * Reservation key for the access grant. + */ reservation_key?: string | undefined + /** + * IDs of the spaces to which the Access Grant gives access. + */ space_ids: Array + /** + * Date and time at which the Access Grant starts. + */ starts_at: string + /** + * ID of user identity to which the Access Grant gives access. + */ user_identity_id?: string | undefined + /** + * Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access). + */ warnings: Array< + /** + * Indicates that the [access grant](https://docs.seam.co/use-cases/granting-access) is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the access grant should have access to more locations than it currently does. Access methods are being created for the missing locations. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'underprovisioned_access' - } + } /** + * Indicates that the access grant has access to locations it should not have. Access methods are being removed from the extra locations. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget). + */ failed_devices?: | Array<{ + /** + * Device whose access code could not be revoked. + */ device_id: string + /** + * Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`). + */ error_code: string + /** + * Human-readable description of why revocation failed. + */ message: string }> | undefined + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'overprovisioned_access' - } + } /** + * Indicates that the access times for this [access grant](https://docs.seam.co/use-cases/granting-access) are being updated. + */ | { + /** + * IDs of the access methods being updated. + */ access_method_ids: Array + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'updating_access_times' - } + } /** + * Indicates that the requested PIN code was already in use on a device, so a different code was assigned. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * ID of the device where the requested code was unavailable. + */ device_id: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * The new PIN code that was assigned instead. + */ new_code: string + /** + * The originally requested PIN code that was unavailable. + */ original_code: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'requested_code_unavailable' - } + } /** + * Indicates that a device in the access grant does not support access codes and was excluded from code materialization. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * ID of the device that does not support access codes. + */ device_id: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_does_not_support_access_codes' - } + } /** + * Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * ID of the device whose time constraints the access grant violates. + */ device_id: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Specific reason why the grant's times are not programmable on the device. + */ reason: | 'duration_exceeds_max' | 'times_do_not_match_slots' | 'ongoing_not_supported' + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_time_constraints_violated' } > + /** + * ID of the Seam workspace associated with the Access Grant. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/unmanaged-access-method.ts b/src/lib/seam/connect/resources/unmanaged-access-method.ts index 7fc93d8c..fd55a5e9 100644 --- a/src/lib/seam/connect/resources/unmanaged-access-method.ts +++ b/src/lib/seam/connect/resources/unmanaged-access-method.ts @@ -3,112 +3,298 @@ * Do not edit this file. */ +/** + * Represents an unmanaged access method. Unmanaged access methods do not have client sessions, instant keys, customization profiles, or keys. + */ export type UnmanagedAccessMethod = { + /** + * ID of the access method. + */ access_method_id: string + /** + * The actual PIN code for code access methods. + */ code?: string | null | undefined + /** + * Date and time at which the access method was created. + */ created_at: string + /** + * Display name of the access method. + */ display_name: string - errors: Array<{ - created_at: string + /** + * Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + */ + errors: Array< + /** + * Indicates that Seam was unable to issue this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access method is eventually issued. + */ + { + /** + * Date and time at which Seam created the error. + */ + created_at: string - error_code: 'failed_to_issue' + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'failed_to_issue' - message: string - }> + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } + > + /** + * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment. + */ is_assignment_required?: boolean | undefined + /** + * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method. + */ is_encoding_required?: boolean | undefined + /** + * Indicates whether the access method has been issued. + */ is_issued: boolean + /** + * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment. + */ is_ready_for_assignment?: boolean | undefined + /** + * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued. + */ is_ready_for_encoding?: boolean | undefined + /** + * Date and time at which the access method was issued. + */ issued_at: string | null + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress. + */ pending_mutations: Array< + /** + * Seam is in the process of provisioning access for this access method on new devices. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous device configuration. + */ from: { + /** + * Previous device IDs where access was provisioned. + */ device_ids: Array } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of provisioning access for this access method on new devices. + */ mutation_code: 'provisioning_access' + /** + * New device configuration. + */ to: { + /** + * New device IDs where access is being provisioned. + */ device_ids: Array } - } + } /** + * Seam is in the process of revoking access for this access method from devices. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous device configuration. + */ from: { + /** + * Previous device IDs where access existed. + */ device_ids: Array } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of revoking access for this access method from devices. + */ mutation_code: 'revoking_access' + /** + * New device configuration. + */ to: { + /** + * New device IDs where access should remain. + */ device_ids: Array } - } + } /** + * Seam is in the process of updating the access times for this access method. + */ | { + /** + * Date and time at which the mutation was created. + */ created_at: string + /** + * Previous access time configuration. + */ from: { + /** + * Previous end time for access. + */ ends_at: string | null + /** + * Previous start time for access. + */ starts_at: string | null } + /** + * Detailed description of the mutation. + */ message: string + /** + * Mutation code to indicate that Seam is in the process of updating the access times for this access method. + */ mutation_code: 'updating_access_times' + /** + * New access time configuration. + */ to: { + /** + * New end time for access. + */ ends_at: string | null + /** + * New start time for access. + */ starts_at: string | null } } > + /** + * Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). + */ warnings: Array< + /** + * Indicates that the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) is being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the access times for this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) are being updated. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'updating_access_times' - } + } /** + * Indicates that all attempts to create an access code on this device before the start time failed and a backup access code was used to ensure access was provided in time. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * ID of the original access method from which this backup access method was split, if applicable. + */ original_access_method_id?: string | undefined + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'pulled_backup_access_code' - } + } /** + * Indicates that Seam has not yet issued this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant), even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'delay_in_issuing' } > + /** + * ID of the Seam workspace associated with the access method. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/unmanaged-device.ts b/src/lib/seam/connect/resources/unmanaged-device.ts index 0f81a78a..23874fc3 100644 --- a/src/lib/seam/connect/resources/unmanaged-device.ts +++ b/src/lib/seam/connect/resources/unmanaged-device.ts @@ -3,27 +3,93 @@ * Do not edit this file. */ +/** + * Represents an [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + */ export type UnmanagedDevice = { + /** + * Indicates whether the lock supports configuring automatic locking. + */ can_configure_auto_lock?: boolean | undefined + /** + * Indicates whether the thermostat supports cooling. + */ can_hvac_cool?: boolean | undefined + /** + * Indicates whether the thermostat supports heating. + */ can_hvac_heat?: boolean | undefined + /** + * Indicates whether the thermostat supports simultaneous heating and cooling. + */ can_hvac_heat_cool?: boolean | undefined + /** + * Indicates whether the device supports programming offline access codes. + */ can_program_offline_access_codes?: boolean | undefined + /** + * Indicates whether the device supports programming online access codes. + */ can_program_online_access_codes?: boolean | undefined + /** + * Indicates whether the thermostat supports different climate programs for each day of the week. + */ can_program_thermostat_programs_as_different_each_day?: boolean | undefined + /** + * Indicates whether the thermostat supports a single climate program applied to every day. + */ can_program_thermostat_programs_as_same_each_day?: boolean | undefined + /** + * Indicates whether the thermostat supports weekday/weekend climate programs. + */ can_program_thermostat_programs_as_weekday_weekend?: boolean | undefined + /** + * Indicates whether the device supports remote locking. + */ can_remotely_lock?: boolean | undefined + /** + * Indicates whether the device supports remote unlocking. + */ can_remotely_unlock?: boolean | undefined + /** + * Indicates whether the thermostat supports running climate programs. + */ can_run_thermostat_programs?: boolean | undefined + /** + * Indicates whether the device supports simulating connection in a sandbox. + */ can_simulate_connection?: boolean | undefined + /** + * Indicates whether the device supports simulating disconnection in a sandbox. + */ can_simulate_disconnection?: boolean | undefined + /** + * Indicates whether the hub supports simulating connection in a sandbox. + */ can_simulate_hub_connection?: boolean | undefined + /** + * Indicates whether the hub supports simulating disconnection in a sandbox. + */ can_simulate_hub_disconnection?: boolean | undefined + /** + * Indicates whether the device supports simulating a paid subscription in a sandbox. + */ can_simulate_paid_subscription?: boolean | undefined + /** + * Indicates whether the device supports simulating removal in a sandbox. + */ can_simulate_removal?: boolean | undefined + /** + * Indicates whether the thermostat can be turned off. + */ can_turn_off_hvac?: boolean | undefined + /** + * Indicates whether the lock supports unlocking with an access code. + */ can_unlock_with_code?: boolean | undefined + /** + * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags). + */ capabilities_supported: Array< | 'access_code' | 'lock' @@ -33,14 +99,29 @@ export type UnmanagedDevice = { | 'phone' > + /** + * Unique identifier for the account associated with the device. + */ connected_account_id: string + /** + * Date and time at which the device object was created. + */ created_at: string + /** + * Set of key:value pairs. Adding custom metadata to a resource, such as a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview), [connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account), or [device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device), enables you to store custom information, like customer details or internal IDs from your application. + */ custom_metadata: Record + /** + * ID of the device. + */ device_id: string + /** + * Type of the device. + */ device_type: | 'akuvox_lock' | 'august_lock' @@ -85,385 +166,992 @@ export type UnmanagedDevice = { | 'android_phone' | 'ring_camera' + /** + * Array of errors associated with the device. Each error object within the array contains two fields: `error_code` and `message`. `error_code` is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + */ errors: Array< + /** + * Indicates that the account is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'account_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Salto site user limit has been reached. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'salto_ks_subscription_limit_exceeded' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'dormakaba_sites_disconnected' + /** + * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error. + */ is_connected_account_error: boolean + /** + * Indicates that the error is not a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is offline. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_offline' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device has been removed. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_removed' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the hub is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'hub_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the device is disconnected. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'device_disconnected' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is empty. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'empty_backup_access_code_pool' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the user is not authorized to use the August lock. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'august_lock_not_authorized' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that device credentials are missing. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'missing_device_credentials' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the auxiliary heat is running. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'auxiliary_heat_running' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that a subscription is required to connect. + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'subscription_required' + /** + * Indicates that the error is a device error. + */ is_device_error: boolean + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string - } + } /** + * Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge), for example, if the Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system#acs_system-errors-seam_bridge_disconnected). + */ | { + /** + * Date and time at which Seam created the error. + */ created_at: string + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ error_code: 'bridge_disconnected' + /** + * Indicates whether the error is related to [Seam Bridge](https://docs.seam.co/capability-guides/seam-bridge). + */ is_bridge_error?: boolean | undefined + /** + * Indicates whether the error is related specifically to the connected account. + */ is_connected_account_error?: boolean | undefined + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ message: string } > + /** + * Indicates that Seam does not manage the device. + */ is_managed: boolean + /** + * Location information for the device. + */ location?: | { + /** + * Name of the device location. + */ location_name?: string | undefined + /** + * Time zone of the device location. + */ time_zone?: string | undefined + /** + * Time zone of the device location. + * @deprecated Use `time_zone` instead. + */ timezone?: string | undefined } | undefined + /** + * properties of the device. + */ properties: { + /** + * Accessory keypad properties and state. + */ accessory_keypad?: | { + /** + * Keypad battery properties. + */ battery?: | { level: number } | undefined + /** + * Indicates if an accessory keypad is connected to the device. + */ is_connected: boolean } | undefined + /** + * Represents the current status of the battery charge level. + */ battery?: | { + /** + * Battery charge level as a value between 0 and 1, inclusive. + */ level: number + /** + * Represents the current status of the battery charge level. Values are `critical`, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; `low`, which signifies that the battery is under the preferred threshold and should be charged soon; `good`, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and `full`, which represents a battery that is fully charged, providing the maximum duration of usage. + */ status: 'critical' | 'low' | 'good' | 'full' } | undefined + /** + * Indicates the battery level of the device as a decimal value between 0 and 1, inclusive. + */ battery_level?: number | undefined + /** + * Alt text for the device image. + */ image_alt_text?: string | undefined + /** + * Image URL for the device. + */ image_url?: string | undefined + /** + * Manufacturer of the device. When a device, such as a smart lock, is connected through a smart hub, the manufacturer of the device might be different from that of the smart hub. + */ manufacturer?: string | undefined + /** + * Device model-related properties. + */ model: { + /** + * @deprecated use device.properties.model.can_connect_accessory_keypad + */ accessory_keypad_supported?: boolean | undefined + /** + * Indicates whether the device can connect a accessory keypad. + */ can_connect_accessory_keypad?: boolean | undefined + /** + * Display name of the device model. + */ display_name: string + /** + * Indicates whether the device has a built in accessory keypad. + */ has_built_in_keypad?: boolean | undefined + /** + * Display name that corresponds to the manufacturer-specific terminology for the device. + */ manufacturer_display_name: string + /** + * @deprecated use device.can_program_offline_access_codes. + */ offline_access_codes_supported?: boolean | undefined + /** + * @deprecated use device.can_program_online_access_codes. + */ online_access_codes_supported?: boolean | undefined } + /** + * Name of the device. + * @deprecated use device.display_name instead + */ name: string + /** + * Indicates whether it is currently possible to use offline access codes for the device. + * @deprecated use device.can_program_offline_access_codes + */ offline_access_codes_enabled?: boolean | undefined + /** + * Indicates whether the device is online. + */ online: boolean + /** + * Indicates whether it is currently possible to use online access codes for the device. + * @deprecated use device.can_program_online_access_codes + */ online_access_codes_enabled?: boolean | undefined } + /** + * Array of warnings associated with the device. Each warning object within the array contains two fields: `warning_code` and `message`. `warning_code` is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. `message` provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + */ warnings: Array< + /** + * Indicates that the backup access code is unhealthy. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'partial_backup_access_code_pool' - } + } /** + * Indicates that there are too many backup codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'many_active_backup_codes' - } + } /** + * Indicates that a third-party integration has been detected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'third_party_integration_detected' - } + } /** + * Indicates that the Remote Unlock feature is not enabled in the settings." + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'ttlock_lock_gateway_unlocking_not_enabled' - } + } /** + * Indicates that the gateway signal is weak. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'ttlock_weak_gateway_signal' - } + } /** + * Indicates that the device is in power saving mode and may have limited functionality. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'power_saving_mode' - } + } /** + * Indicates that the temperature threshold has been exceeded. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'temperature_threshold_exceeded' - } + } /** + * Indicates that the device appears to be unresponsive. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_communication_degraded' - } + } /** + * Indicates that a scheduled maintenance window has been detected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'scheduled_maintenance_window' - } + } /** + * Indicates that the device has a flaky connection. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'device_has_flaky_connection' - } + } /** + * Indicates that the Salto KS lock is in Office Mode. Access Codes will not unlock doors. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_office_mode' - } + } /** + * Indicates that the Salto KS lock is in Privacy Mode. Access Codes will not unlock doors. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_privacy_mode' - } + } /** + * Indicates that the lock is in Privacy Mode. Access codes and remote unlock are blocked until Privacy Mode is disabled. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'privacy_mode' - } + } /** + * Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_subscription_limit_almost_reached' - } + } /** + * Indicates that a change in the reported device model has been detected for this Salto KS lock, which may occur after an IQ hub reset. Access code support may be affected. See https://help.getseam.com/articles/5098842588-salto-ks-lock-loses-access-code-support for troubleshooting steps. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'salto_ks_lock_access_code_support_removed' - } + } /** + * Indicates that an unknown issue occurred while syncing the state of the phone with the provider. This issue may affect the proper functioning of the phone. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unknown_issue_with_phone' - } + } /** + * Indicates that Seam detected that the Lockly device does not have a time zone configured. Time-bound codes may not work as expected. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'lockly_time_zone_not_configured' - } + } /** + * Indicates that Seam does not know the time zone of the Ultraloq device. Set a time zone to enable time-bound access codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'ultraloq_time_zone_unknown' - } + } /** + * Indicates that Seam does not know the device's time zone. Set a time zone to enable time-bound access codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_zone_unknown' - } + } /** + * Indicates that the device's configured time zone does not match its hardware UTC offset. Time-bound access codes may activate at the wrong local time. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'time_zone_mismatch' - } + } /** + * Indicates that the 2N device does not have a time zone configured. Configure a time zone on the device to enable access codes. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'two_n_device_missing_timezone' - } + } /** + * Indicates that a hub or relay must be connected to unlock additional capabilities such as remote unlock. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'hub_required_for_additional_capabilities' - } + } /** + * Indicates a provider-specific issue that may affect device functionality. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'provider_issue' - } + } /** + * Indicates that the key is in a locker that does not support the access codes API. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'keynest_unsupported_locker' - } + } /** + * Indicates that the accessory keypad exists, but is not linked to the Igloohome Bridge. Online access code programming will fail until the keypad is linked to the Igloohome Bridge in the Igloohome app. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'accessory_keypad_setup_required' - } + } /** + * Indicates that the device may optimistically be reported as online because the provider does not reliably report its online status. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'unreliable_online_status' - } + } /** + * Indicates that the device has reached its maximum number of active access codes. Delete existing codes before creating new ones. + */ | { + /** + * Number of active access codes on the device when the warning was set. + */ active_access_code_count: number + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Maximum number of active access codes supported by the device. + */ max_active_access_code_count: number + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'max_access_codes_reached' - } + } /** + * Indicates that the connected Kwikset account has member-level access to this lock's home. Admin or owner access is required to manage access codes and control the lock remotely. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'insufficient_permissions' } > + /** + * Unique identifier for the Seam workspace associated with the device. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/unmanaged-user-identity.ts b/src/lib/seam/connect/resources/unmanaged-user-identity.ts index d79c80e2..d2aee55f 100644 --- a/src/lib/seam/connect/resources/unmanaged-user-identity.ts +++ b/src/lib/seam/connect/resources/unmanaged-user-identity.ts @@ -3,46 +3,122 @@ * Do not edit this file. */ +/** + * Represents an unmanaged user identity. Unmanaged user identities do not have keys. + */ export type UnmanagedUserIdentity = { + /** + * Array of access system user IDs associated with the user identity. + */ acs_user_ids: Array + /** + * Date and time at which the user identity was created. + */ created_at: string + /** + * Display name for the user identity. + */ display_name: string + /** + * Unique email address for the user identity. + */ email_address: string | null - errors: Array<{ - acs_system_id: string + /** + * Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + */ + errors: Array< + /** + * Indicates that there is an issue with an access system user associated with this user identity. + */ + { + /** + * ID of the access system that the user identity is associated with. + */ + acs_system_id: string - acs_user_id: string + /** + * ID of the access system user that has an issue. + */ + acs_user_id: string - created_at: string + /** + * Date and time at which Seam created the error. + */ + created_at: string - error_code: 'issue_with_acs_user' + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'issue_with_acs_user' - message: string - }> + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } + > + /** + * Full name of the user associated with the user identity. + */ full_name: string | null + /** + * Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + */ phone_number: string | null + /** + * ID of the user identity. + */ user_identity_id: string + /** + * Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + */ warnings: Array< + /** + * Indicates that the user identity is currently being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the ACS user's profile does not match the user identity's profile + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'acs_user_profile_does_not_match_user_identity' } > + /** + * ID of the workspace that contains the user identity. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/user-identity.ts b/src/lib/seam/connect/resources/user-identity.ts index 84e47704..fe09f91a 100644 --- a/src/lib/seam/connect/resources/user-identity.ts +++ b/src/lib/seam/connect/resources/user-identity.ts @@ -3,47 +3,126 @@ * Do not edit this file. */ +/** + * Represents a [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account. + */ export type UserIdentity = { + /** + * Array of access system user IDs associated with the user identity. + */ acs_user_ids: Array + /** + * Date and time at which the user identity was created. + */ created_at: string + /** + * Display name for the user identity. + */ display_name: string + /** + * Unique email address for the user identity. + */ email_address: string | null - errors: Array<{ - acs_system_id: string + /** + * Array of errors associated with the user identity. Each error object within the array contains fields like "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it. + */ + errors: Array< + /** + * Indicates that there is an issue with an access system user associated with this user identity. + */ + { + /** + * ID of the access system that the user identity is associated with. + */ + acs_system_id: string - acs_user_id: string + /** + * ID of the access system user that has an issue. + */ + acs_user_id: string - created_at: string + /** + * Date and time at which Seam created the error. + */ + created_at: string - error_code: 'issue_with_acs_user' + /** + * Unique identifier of the type of error. Enables quick recognition and categorization of the issue. + */ + error_code: 'issue_with_acs_user' - message: string - }> + /** + * Detailed description of the error. Provides insights into the issue and potentially how to rectify it. + */ + message: string + } + > + /** + * Full name of the user associated with the user identity. + */ full_name: string | null + /** + * Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + */ phone_number: string | null + /** + * ID of the user identity. + */ user_identity_id: string + /** + * Unique key for the user identity. + */ user_identity_key: string | null + /** + * Array of warnings associated with the user identity. Each warning object within the array contains two fields: "warning_code" and "message." "warning_code" is a string that uniquely identifies the type of warning, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the warning, offering insights into the issue and potentially how to rectify it. + */ warnings: Array< + /** + * Indicates that the user identity is currently being deleted. + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'being_deleted' - } + } /** + * Indicates that the ACS user's profile does not match the user identity's profile + */ | { + /** + * Date and time at which Seam created the warning. + */ created_at: string + /** + * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. + */ message: string + /** + * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. + */ warning_code: 'acs_user_profile_does_not_match_user_identity' } > + /** + * ID of the workspace that contains the user identity. + */ workspace_id: string } diff --git a/src/lib/seam/connect/resources/webhook.ts b/src/lib/seam/connect/resources/webhook.ts index b1d90b5b..b5bf9d6c 100644 --- a/src/lib/seam/connect/resources/webhook.ts +++ b/src/lib/seam/connect/resources/webhook.ts @@ -3,10 +3,25 @@ * Do not edit this file. */ +/** + * Represents a [webhook](https://docs.seam.co/developer-tools/webhooks) that enables you to receive notifications of events. When you create a webhook, specify the endpoint URL at which you want to receive events and the set of event types that you want to receive. + */ export type Webhook = { + /** + * Types of events that the [webhook](https://docs.seam.co/developer-tools/webhooks) should receive. + */ event_types?: Array | undefined + /** + * Secret associated with the [webhook](https://docs.seam.co/developer-tools/webhooks). + */ secret?: string | undefined + /** + * URL for the [webhook](https://docs.seam.co/developer-tools/webhooks). + */ url: string + /** + * ID of the webhook. + */ webhook_id: string } diff --git a/src/lib/seam/connect/resources/workspace.ts b/src/lib/seam/connect/resources/workspace.ts index c8a58452..4a8dc54e 100644 --- a/src/lib/seam/connect/resources/workspace.ts +++ b/src/lib/seam/connect/resources/workspace.ts @@ -3,27 +3,73 @@ * Do not edit this file. */ +/** + * Represents a Seam [workspace](https://docs.seam.co/core-concepts/workspaces). A workspace is a top-level entity that encompasses all other resources below it, such as devices, connected accounts, and Connect Webviews. Seam provides two types of workspaces. A [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) is a special type of workspace designed for testing code. Sandbox workspaces offer test device accounts and virtual devices that you can connect and control. This ability to work with virtual devices is quite handy because it removes the need to own physical devices from multiple brands. To connect real devices and systems to Seam, use a [production workspace](https://docs.seam.co/core-concepts/workspaces#production-workspaces). + */ export type Workspace = { + /** + * Company name associated with the [workspace](https://docs.seam.co/core-concepts/workspaces). + */ company_name: string + /** + * @deprecated Use `company_name` instead. + */ connect_partner_name: string | null + connect_webview_customization: { + /** + * URL of the inviter logo for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ inviter_logo_url?: string | undefined + /** + * Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ logo_shape?: 'circle' | 'square' | undefined + /** + * Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ primary_button_color?: string | undefined + /** + * Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ primary_button_text_color?: string | undefined + /** + * Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ success_message?: string | undefined } + /** + * Indicates whether publishable key authentication is enabled for this workspace. + */ is_publishable_key_auth_enabled: boolean + /** + * Indicates whether the workspace is a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ is_sandbox: boolean + /** + * Indicates whether the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) is suspended. Seam suspends sandbox workspaces that have not been accessed in 14 days. + */ is_suspended: boolean + /** + * Name of the [workspace](https://docs.seam.co/core-concepts/workspaces). + */ name: string + /** + * ID of the organization to which the workspace belongs, or `null` if the workspace is not assigned to an organization. + */ organization_id: string | null + /** + * Publishable key for the [workspace](https://docs.seam.co/core-concepts/workspaces). This key is used to identify the workspace in client-side applications. + */ publishable_key?: string | undefined + /** + * ID of the workspace. + */ 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 310d1729..b100e447 100644 --- a/src/lib/seam/connect/routes/access-codes/access-codes.ts +++ b/src/lib/seam/connect/routes/access-codes/access-codes.ts @@ -172,6 +172,9 @@ export class SeamHttpAccessCodes { return SeamHttpAccessCodesUnmanaged.fromClient(this.client, this.defaults) } + /** + * Creates a new [access code](https://docs.seam.co/low-level-apis/access-codes). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. + */ create( parameters: AccessCodesCreateParameters, options: AccessCodesCreateOptions = {}, @@ -185,6 +188,19 @@ export class SeamHttpAccessCodes { }) } + /** + * Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + * + * Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. + * + * If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. + * + * If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. + * + * See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + * + * For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + */ createMultiple( parameters: AccessCodesCreateMultipleParameters, options: AccessCodesCreateMultipleOptions = {}, @@ -198,6 +214,9 @@ export class SeamHttpAccessCodes { }) } + /** + * Deletes an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + */ delete( parameters: AccessCodesDeleteParameters, options: AccessCodesDeleteOptions = {}, @@ -211,6 +230,9 @@ export class SeamHttpAccessCodes { }) } + /** + * Generates a code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), given a device ID. + */ generateCode( parameters: AccessCodesGenerateCodeParameters, options: AccessCodesGenerateCodeOptions = {}, @@ -224,6 +246,11 @@ export class SeamHttpAccessCodes { }) } + /** + * Returns a specified [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * You must specify either `access_code_id` or both `device_id` and `code`. + */ get( parameters?: AccessCodesGetParameters, options: AccessCodesGetOptions = {}, @@ -237,6 +264,11 @@ export class SeamHttpAccessCodes { }) } + /** + * Returns a list of all [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ list( parameters?: AccessCodesListParameters, options: AccessCodesListOptions = {}, @@ -250,6 +282,17 @@ export class SeamHttpAccessCodes { }) } + /** + * Retrieves a backup access code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). + * + * A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. + * + * You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. + * + * You can only pull backup access codes for time-bound access codes. + * + * Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. + */ pullBackupAccessCode( parameters: AccessCodesPullBackupAccessCodeParameters, options: AccessCodesPullBackupAccessCodeOptions = {}, @@ -263,6 +306,11 @@ export class SeamHttpAccessCodes { }) } + /** + * Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. + * + * Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + */ reportDeviceConstraints( parameters: AccessCodesReportDeviceConstraintsParameters, options: AccessCodesReportDeviceConstraintsOptions = {}, @@ -276,6 +324,11 @@ export class SeamHttpAccessCodes { }) } + /** + * Updates a specified active or upcoming [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * See also [Modifying Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes). + */ update( parameters: AccessCodesUpdateParameters, options: AccessCodesUpdateOptions = {}, @@ -289,6 +342,13 @@ export class SeamHttpAccessCodes { }) } + /** + * Updates [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + * + * Specify the `common_code_key` to identify the set of access codes that you want to update. + * + * See also [Update Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). + */ updateMultiple( parameters: AccessCodesUpdateMultipleParameters, options: AccessCodesUpdateMultipleOptions = {}, @@ -304,22 +364,74 @@ export class SeamHttpAccessCodes { } export type AccessCodesCreateParameters = { + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + */ allow_external_modification?: boolean | undefined + attempt_for_offline_device?: boolean | undefined + /** + * Code to be used for access. + */ code?: string | undefined + /** + * Key to identify access codes that should have the same code. Any two access codes with the same `common_code_key` are guaranteed to have the same `code`. See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + */ common_code_key?: string | undefined + /** + * ID of the device for which you want to create the new access code. + */ device_id: string + /** + * Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + */ is_external_modification_allowed?: boolean | undefined + /** + * Indicates whether the access code is an [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes). + */ is_offline_access_code?: boolean | undefined + /** + * Indicates whether the [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. + */ is_one_time_use?: boolean | undefined + /** + * Maximum rounding adjustment. To create a daily-bound [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. + */ max_time_rounding?: '1hour' | '1day' | '1h' | '1d' | undefined + /** + * Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + * + * Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + * + * To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + * + * To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + */ name?: string | undefined + /** + * Indicates whether [native scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. + */ prefer_native_scheduling?: boolean | undefined + /** + * Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. + */ preferred_code_length?: number | undefined + /** + * Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * Indicates whether to use a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code). + */ use_backup_access_code_pool?: boolean | undefined + /** + * @deprecated Use `is_offline_access_code` instead. + */ use_offline_access_code?: boolean | undefined } @@ -336,19 +448,59 @@ export type AccessCodesCreateRequest = SeamHttpRequest< export interface AccessCodesCreateOptions {} export type AccessCodesCreateMultipleParameters = { + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + */ allow_external_modification?: boolean | undefined + attempt_for_offline_device?: boolean | undefined + /** + * Desired behavior if any device cannot share a code. If `throw` (default), no access codes will be created if any device cannot share a code. If `create_random_code`, a random code will be created on devices that cannot share a code. + */ behavior_when_code_cannot_be_shared?: 'throw' | 'create_random_code' | undefined + /** + * Code to be used for access. + */ code?: string | undefined + /** + * IDs of the devices for which you want to create the new access codes. + */ device_ids: Array + /** + * Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + */ is_external_modification_allowed?: boolean | undefined + /** + * Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + * + * Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + * + * To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + * + * To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + */ name?: string | undefined + /** + * Indicates whether [native scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. + */ prefer_native_scheduling?: boolean | undefined + /** + * Preferred code length. If the affected devices do not support the preferred code length, Seam reverts to using the shortest supported code length. + */ preferred_code_length?: number | undefined + /** + * Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * Indicates whether to use a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code). + */ use_backup_access_code_pool?: boolean | undefined } @@ -367,8 +519,14 @@ export type AccessCodesCreateMultipleRequest = SeamHttpRequest< export interface AccessCodesCreateMultipleOptions {} export type AccessCodesDeleteParameters = { + /** + * ID of the access code that you want to delete. + */ access_code_id: string + /** + * ID of the device for which you want to delete the access code. + */ device_id?: string | undefined } @@ -382,6 +540,9 @@ export type AccessCodesDeleteRequest = SeamHttpRequest export interface AccessCodesDeleteOptions {} export type AccessCodesGenerateCodeParameters = { + /** + * ID of the device for which you want to generate a code. + */ device_id: string } @@ -398,8 +559,17 @@ export type AccessCodesGenerateCodeRequest = SeamHttpRequest< export interface AccessCodesGenerateCodeOptions {} export type AccessCodesGetParameters = { + /** + * ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + */ access_code_id?: string | undefined + /** + * Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + */ code?: string | undefined + /** + * ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + */ device_id?: string | undefined } @@ -416,15 +586,45 @@ export type AccessCodesGetRequest = SeamHttpRequest< export interface AccessCodesGetOptions {} export type AccessCodesListParameters = { + /** + * IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ access_code_ids?: Array | undefined + /** + * ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ access_grant_id?: string | undefined + /** + * Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ access_grant_key?: string | undefined + /** + * ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ access_method_id?: string | undefined + /** + * Customer key for which you want to list access codes. + */ customer_key?: string | undefined + /** + * ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ device_id?: string | undefined + /** + * Numerical limit on the number of access codes to return. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. + */ search?: string | undefined + /** + * Your user ID for the user by which to filter access codes. + */ user_identifier_key?: string | undefined } @@ -441,6 +641,9 @@ export type AccessCodesListRequest = SeamHttpRequest< export interface AccessCodesListOptions {} export type AccessCodesPullBackupAccessCodeParameters = { + /** + * ID of the access code for which you want to pull a backup access code. + */ access_code_id: string } @@ -459,10 +662,22 @@ export type AccessCodesPullBackupAccessCodeRequest = SeamHttpRequest< export interface AccessCodesPullBackupAccessCodeOptions {} export type AccessCodesReportDeviceConstraintsParameters = { + /** + * ID of the device for which you want to report constraints. + */ device_id: string + /** + * Maximum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. + */ max_code_length?: number | undefined + /** + * Minimum supported code length as an integer between 4 and 20, inclusive. You can specify either `min_code_length`/`max_code_length` or `supported_code_lengths`. + */ min_code_length?: number | undefined + /** + * Array of supported code lengths as integers between 4 and 20, inclusive. You can specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + */ supported_code_lengths?: Array | undefined } @@ -479,24 +694,82 @@ export type AccessCodesReportDeviceConstraintsRequest = SeamHttpRequest< export interface AccessCodesReportDeviceConstraintsOptions {} export type AccessCodesUpdateParameters = { + /** + * ID of the access code that you want to update. + */ access_code_id: string + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + */ allow_external_modification?: boolean | undefined + attempt_for_offline_device?: boolean | undefined + /** + * Code to be used for access. + */ code?: string | undefined + /** + * ID of the device containing the access code that you want to update. + */ device_id?: string | undefined + /** + * Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. Default: `false`. + */ is_external_modification_allowed?: boolean | undefined + /** + * Indicates whether the access code is managed through Seam. Note that to convert an unmanaged access code into a managed access code, use `/access_codes/unmanaged/convert_to_managed`. + */ is_managed?: boolean | undefined + /** + * Indicates whether the access code is an [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes). + */ is_offline_access_code?: boolean | undefined + /** + * Indicates whether the [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) is a single-use access code. + */ is_one_time_use?: boolean | undefined + /** + * Maximum rounding adjustment. To create a daily-bound [offline access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/offline-access-codes) for devices that support this feature, set this parameter to `1d`. + */ max_time_rounding?: '1hour' | '1day' | '1h' | '1d' | undefined + /** + * Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + * + * Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + * + * To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + * + * To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + */ name?: string | undefined + /** + * Indicates whether [native scheduling](https://docs.seam.co/low-level-apis/smart-locks/access-codes#native-scheduling) should be used for time-bound codes when supported by the provider. Default: `true`. + */ prefer_native_scheduling?: boolean | undefined + /** + * Preferred code length. Only applicable if you do not specify a `code`. If the affected device does not support the preferred code length, Seam reverts to using the shortest supported code length. + */ preferred_code_length?: number | undefined + /** + * Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * Type to which you want to convert the access code. To convert a time-bound access code to an ongoing access code, set `type` to `ongoing`. See also [Changing a time-bound access code to permanent access](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes#special-case-2-changing-a-time-bound-access-code-to-permanent-access). + */ type?: 'ongoing' | 'time_bound' | undefined + /** + * Indicates whether to use a [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) provided by Seam. If `true`, you can use [`/access_codes/pull_backup_access_code`](https://docs.seam.co/api/access_codes/pull_backup_access_code). + */ use_backup_access_code_pool?: boolean | undefined + /** + * @deprecated Use `is_offline_access_code` instead. + */ use_offline_access_code?: boolean | undefined } @@ -510,10 +783,28 @@ export type AccessCodesUpdateRequest = SeamHttpRequest export interface AccessCodesUpdateOptions {} export type AccessCodesUpdateMultipleParameters = { + /** + * Key that links the group of access codes, assigned on creation by `/access_codes/create_multiple`. + */ common_code_key: string + /** + * Date and time at which the validity of the new access code ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Name of the new access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. + * + * Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. + * + * To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. + * + * To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components). + */ name?: string | undefined + /** + * Date and time at which the validity of the new access code starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined } 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 511ce87e..f36ff6b7 100644 --- a/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts @@ -161,6 +161,9 @@ export class SeamHttpAccessCodesSimulate { await clientSessions.get() } + /** + * Simulates the creation of an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ createUnmanagedAccessCode( parameters: AccessCodesSimulateCreateUnmanagedAccessCodeParameters, options: AccessCodesSimulateCreateUnmanagedAccessCodeOptions = {}, @@ -176,10 +179,19 @@ export class SeamHttpAccessCodesSimulate { } export type AccessCodesSimulateCreateUnmanagedAccessCodeParameters = { + /** + * Code of the simulated unmanaged access code. + */ code: string + /** + * ID of the device for which you want to simulate the creation of an unmanaged access code. + */ device_id: string + /** + * Name of the simulated unmanaged access code. + */ name: string } 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 30b3d932..66ce20c9 100644 --- a/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts @@ -161,6 +161,13 @@ export class SeamHttpAccessCodesUnmanaged { await clientSessions.get() } + /** + * Converts an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. + * + * Note that not all device providers support converting an unmanaged access code to a managed access code. + */ convertToManaged( parameters: AccessCodesUnmanagedConvertToManagedParameters, options: AccessCodesUnmanagedConvertToManagedOptions = {}, @@ -174,6 +181,9 @@ export class SeamHttpAccessCodesUnmanaged { }) } + /** + * Deletes an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + */ delete( parameters: AccessCodesUnmanagedDeleteParameters, options: AccessCodesUnmanagedDeleteOptions = {}, @@ -187,6 +197,11 @@ export class SeamHttpAccessCodesUnmanaged { }) } + /** + * Returns a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + * + * You must specify either `access_code_id` or both `device_id` and `code`. + */ get( parameters?: AccessCodesUnmanagedGetParameters, options: AccessCodesUnmanagedGetOptions = {}, @@ -200,6 +215,9 @@ export class SeamHttpAccessCodesUnmanaged { }) } + /** + * Returns a list of all [unmanaged access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + */ list( parameters: AccessCodesUnmanagedListParameters, options: AccessCodesUnmanagedListOptions = {}, @@ -213,6 +231,9 @@ export class SeamHttpAccessCodesUnmanaged { }) } + /** + * Updates a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + */ update( parameters: AccessCodesUnmanagedUpdateParameters, options: AccessCodesUnmanagedUpdateOptions = {}, @@ -228,10 +249,22 @@ export class SeamHttpAccessCodesUnmanaged { } export type AccessCodesUnmanagedConvertToManagedParameters = { + /** + * ID of the unmanaged access code that you want to convert to a managed access code. + */ access_code_id: string + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. + */ allow_external_modification?: boolean | undefined + /** + * Indicates whether to force the access code conversion. To switch management of an access code from one Seam workspace to another, set `force` to `true`. + */ force?: boolean | undefined + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the access code is allowed. + */ is_external_modification_allowed?: boolean | undefined } @@ -248,6 +281,9 @@ export type AccessCodesUnmanagedConvertToManagedRequest = SeamHttpRequest< export interface AccessCodesUnmanagedConvertToManagedOptions {} export type AccessCodesUnmanagedDeleteParameters = { + /** + * ID of the unmanaged access code that you want to delete. + */ access_code_id: string } @@ -261,8 +297,17 @@ export type AccessCodesUnmanagedDeleteRequest = SeamHttpRequest export interface AccessCodesUnmanagedDeleteOptions {} export type AccessCodesUnmanagedGetParameters = { + /** + * ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + */ access_code_id?: string | undefined + /** + * Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + */ code?: string | undefined + /** + * ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`. + */ device_id?: string | undefined } @@ -281,11 +326,26 @@ export type AccessCodesUnmanagedGetRequest = SeamHttpRequest< export interface AccessCodesUnmanagedGetOptions {} export type AccessCodesUnmanagedListParameters = { + /** + * ID of the device for which you want to list unmanaged access codes. + */ device_id: string + /** + * Numerical limit on the number of unmanaged access codes to return. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`. + */ search?: string | undefined + /** + * Your user ID for the user by which to filter unmanaged access codes. + */ user_identifier_key?: string | undefined } @@ -304,11 +364,24 @@ export type AccessCodesUnmanagedListRequest = SeamHttpRequest< export interface AccessCodesUnmanagedListOptions {} export type AccessCodesUnmanagedUpdateParameters = { + /** + * ID of the unmanaged access code that you want to update. + */ access_code_id: string + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. + */ allow_external_modification?: boolean | undefined + /** + * Indicates whether to force the unmanaged access code update. + */ force?: boolean | undefined + /** + * Indicates whether [external modification](https://docs.seam.co/low-level-apis/smart-locks/access-codes#external-modification) of the code is allowed. + */ is_external_modification_allowed?: boolean | undefined + is_managed: boolean } 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 2afab059..5705bc5a 100644 --- a/src/lib/seam/connect/routes/access-grants/access-grants.ts +++ b/src/lib/seam/connect/routes/access-grants/access-grants.ts @@ -168,6 +168,9 @@ export class SeamHttpAccessGrants { return SeamHttpAccessGrantsUnmanaged.fromClient(this.client, this.defaults) } + /** + * Creates a new [Access Grant](https://docs.seam.co/use-cases/granting-access/access-grants). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. + */ create( parameters: AccessGrantsCreateParameters, options: AccessGrantsCreateOptions = {}, @@ -181,6 +184,9 @@ export class SeamHttpAccessGrants { }) } + /** + * Delete an Access Grant. + */ delete( parameters: AccessGrantsDeleteParameters, options: AccessGrantsDeleteOptions = {}, @@ -194,6 +200,9 @@ export class SeamHttpAccessGrants { }) } + /** + * Get an Access Grant. + */ get( parameters?: AccessGrantsGetParameters, options: AccessGrantsGetOptions = {}, @@ -207,6 +216,9 @@ export class SeamHttpAccessGrants { }) } + /** + * Gets all related resources for one or more Access Grants. + */ getRelated( parameters?: AccessGrantsGetRelatedParameters, options: AccessGrantsGetRelatedOptions = {}, @@ -220,6 +232,9 @@ export class SeamHttpAccessGrants { }) } + /** + * Gets an Access Grant. + */ list( parameters?: AccessGrantsListParameters, options: AccessGrantsListOptions = {}, @@ -233,6 +248,9 @@ export class SeamHttpAccessGrants { }) } + /** + * Adds additional requested access methods to an existing Access Grant. + */ requestAccessMethods( parameters: AccessGrantsRequestAccessMethodsParameters, options: AccessGrantsRequestAccessMethodsOptions = {}, @@ -246,6 +264,9 @@ export class SeamHttpAccessGrants { }) } + /** + * Updates an existing Access Grant's time window. + */ update( parameters?: AccessGrantsUpdateParameters, options: AccessGrantsUpdateOptions = {}, @@ -261,38 +282,111 @@ export class SeamHttpAccessGrants { } export type AccessGrantsCreateParameters = { + /** + * ID of user identity for whom access is being granted. + */ user_identity_id?: string | undefined + /** + * When used, creates a new user identity with the given details, and grants them access. + */ user_identity?: | { + /** + * Unique email address for the user identity. + */ email_address?: string | undefined + /** + * Full name of the user associated with the user identity. + */ full_name?: string | undefined + /** + * Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100). + */ phone_number?: string | undefined + /** + * Unique key for the user identity. + */ user_identity_key?: string | undefined } | undefined + /** + * Unique key for the access grant within the workspace. + */ access_grant_key?: string | undefined + /** + * Set of IDs of the [entrances](https://docs.seam.co/api/acs/systems/list) to which access is being granted. + */ acs_entrance_ids?: Array | undefined + /** + * ID of the customization profile to apply to the Access Grant and its access methods. + */ customization_profile_id?: string | undefined + /** + * Set of IDs of the [devices](https://docs.seam.co/api/devices/list) to which access is being granted. + */ device_ids?: Array | undefined + /** + * Date and time at which the validity of the new grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * @deprecated Create a space first, then reference it using `space_ids`. + */ location?: | { + /** + * @deprecated Use `acs_entrance_ids` at the top level. + */ acs_entrance_ids?: Array | undefined + /** + * @deprecated Use `device_ids` at the top level. + */ device_ids?: Array | undefined + /** + * Name of the location. + */ name?: string | undefined } | undefined + /** + * @deprecated Use `space_ids`. + */ location_ids?: Array | undefined + /** + * Name for the access grant. + */ name?: string | undefined + requested_access_methods: Array<{ + /** + * Specific PIN code to use for this access method. Only applicable when mode is 'code'. + */ code?: string | undefined + /** + * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + */ instant_key_max_use_count?: number | undefined + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode?: 'code' | 'card' | 'mobile_key' | 'cloud_key' | undefined }> + /** + * Reservation key for the access grant. + */ reservation_key?: string | undefined + /** + * Set of IDs of existing spaces to which access is being granted. + */ space_ids?: Array | undefined + /** + * Set of keys of existing spaces to which access is being granted. + */ space_keys?: Array | undefined + /** + * Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined } @@ -309,6 +403,9 @@ export type AccessGrantsCreateRequest = SeamHttpRequest< export interface AccessGrantsCreateOptions {} export type AccessGrantsDeleteParameters = { + /** + * ID of Access Grant to delete. + */ access_grant_id: string } @@ -322,7 +419,13 @@ export type AccessGrantsDeleteRequest = SeamHttpRequest export interface AccessGrantsDeleteOptions {} export type AccessGrantsGetParameters = { + /** + * ID of Access Grant to get. + */ access_grant_id?: string | undefined + /** + * Unique key of Access Grant to get. + */ access_grant_key?: string | undefined } @@ -339,8 +442,15 @@ export type AccessGrantsGetRequest = SeamHttpRequest< export interface AccessGrantsGetOptions {} export type AccessGrantsGetRelatedParameters = { + /** + * IDs of the access grants that you want to get along with their related resources. + */ access_grant_ids?: Array | undefined + /** + * Keys of the access grants that you want to get along with their related resources. + */ access_grant_keys?: Array | undefined + exclude?: | Array< | 'spaces' @@ -353,6 +463,7 @@ export type AccessGrantsGetRelatedParameters = { | 'access_methods' > | undefined + include?: | Array< | 'spaces' @@ -391,18 +502,57 @@ export type AccessGrantsGetRelatedRequest = SeamHttpRequest< export interface AccessGrantsGetRelatedOptions {} export type AccessGrantsListParameters = { + /** + * ID of the access code by which you want to filter the list of Access Grants. + */ access_code_id?: string | undefined + /** + * IDs of the access grants to retrieve. + */ access_grant_ids?: Array | undefined + /** + * Filter Access Grants by access_grant_key. Use null to filter for Access Grants without an access_grant_key. + */ access_grant_key?: string | undefined + /** + * ID of the entrance by which you want to filter the list of Access Grants. + */ acs_entrance_id?: string | undefined + /** + * ID of the access system by which you want to filter the list of Access Grants. + */ acs_system_id?: string | undefined + /** + * Customer key for which you want to list access grants. + */ customer_key?: string | undefined + /** + * ID of the device by which you want to filter the list of Access Grants. + */ device_id?: string | undefined + /** + * Numerical limit on the number of access grants to return. + */ limit?: number | undefined + /** + * @deprecated Use `space_id`. + */ location_id?: string | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * Filter Access Grants by reservation_key. + */ reservation_key?: string | undefined + /** + * ID of the space by which you want to filter the list of Access Grants. + */ space_id?: string | undefined + /** + * ID of user identity by which you want to filter the list of Access Grants. + */ user_identity_id?: string | undefined } @@ -419,11 +569,26 @@ export type AccessGrantsListRequest = SeamHttpRequest< export interface AccessGrantsListOptions {} export type AccessGrantsRequestAccessMethodsParameters = { + /** + * ID of the Access Grant to add access methods to. + */ access_grant_id: string + /** + * Array of requested access methods to add to the access grant. + */ requested_access_methods: Array<{ + /** + * Specific PIN code to use for this access method. Only applicable when mode is 'code'. + */ code?: string | undefined + /** + * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified. + */ instant_key_max_use_count?: number | undefined + /** + * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ mode?: 'code' | 'card' | 'mobile_key' | 'cloud_key' | undefined }> } @@ -443,10 +608,25 @@ export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest< export interface AccessGrantsRequestAccessMethodsOptions {} export type AccessGrantsUpdateParameters = { + /** + * ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. + */ access_grant_id?: string | undefined + /** + * Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`. + */ access_grant_key?: string | undefined + /** + * Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Display name for the access grant. + */ name?: string | undefined + /** + * Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined } 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 b2f36f91..9b04d7e5 100644 --- a/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts @@ -161,6 +161,9 @@ export class SeamHttpAccessGrantsUnmanaged { await clientSessions.get() } + /** + * Get an unmanaged Access Grant (where is_managed = false). + */ get( parameters: AccessGrantsUnmanagedGetParameters, options: AccessGrantsUnmanagedGetOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpAccessGrantsUnmanaged { }) } + /** + * Gets unmanaged Access Grants (where is_managed = false). + */ list( parameters?: AccessGrantsUnmanagedListParameters, options: AccessGrantsUnmanagedListOptions = {}, @@ -187,6 +193,13 @@ export class SeamHttpAccessGrantsUnmanaged { }) } + /** + * Updates an unmanaged Access Grant to make it managed. + * + * This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. + * + * When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. + */ update( parameters: AccessGrantsUnmanagedUpdateParameters, options: AccessGrantsUnmanagedUpdateOptions = {}, @@ -202,6 +215,9 @@ export class SeamHttpAccessGrantsUnmanaged { } export type AccessGrantsUnmanagedGetParameters = { + /** + * ID of unmanaged Access Grant to get. + */ access_grant_id: string } @@ -220,11 +236,29 @@ export type AccessGrantsUnmanagedGetRequest = SeamHttpRequest< export interface AccessGrantsUnmanagedGetOptions {} export type AccessGrantsUnmanagedListParameters = { + /** + * ID of the entrance by which you want to filter the list of unmanaged Access Grants. + */ acs_entrance_id?: string | undefined + /** + * ID of the access system by which you want to filter the list of unmanaged Access Grants. + */ acs_system_id?: string | undefined + /** + * Numerical limit on the number of unmanaged access grants to return. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * Filter unmanaged Access Grants by reservation_key. + */ reservation_key?: string | undefined + /** + * ID of user identity by which you want to filter the list of unmanaged Access Grants. + */ user_identity_id?: string | undefined } @@ -243,9 +277,18 @@ export type AccessGrantsUnmanagedListRequest = SeamHttpRequest< export interface AccessGrantsUnmanagedListOptions {} export type AccessGrantsUnmanagedUpdateParameters = { + /** + * ID of the unmanaged Access Grant to update. + */ access_grant_id: string + /** + * Unique key for the access grant. If not provided, the existing key will be preserved. + */ access_grant_key?: string | undefined + /** + * Must be set to true to convert the unmanaged access grant to managed. + */ is_managed: boolean } 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 61a32fbe..400f47af 100644 --- a/src/lib/seam/connect/routes/access-methods/access-methods.ts +++ b/src/lib/seam/connect/routes/access-methods/access-methods.ts @@ -169,6 +169,9 @@ export class SeamHttpAccessMethods { return SeamHttpAccessMethodsUnmanaged.fromClient(this.client, this.defaults) } + /** + * Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. + */ assignCard( parameters: AccessMethodsAssignCardParameters, options: AccessMethodsAssignCardOptions = {}, @@ -182,6 +185,9 @@ export class SeamHttpAccessMethods { }) } + /** + * Deletes an access method. + */ delete( parameters?: AccessMethodsDeleteParameters, options: AccessMethodsDeleteOptions = {}, @@ -195,6 +201,9 @@ export class SeamHttpAccessMethods { }) } + /** + * Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ encode( parameters: AccessMethodsEncodeParameters, options: AccessMethodsEncodeOptions = {}, @@ -208,6 +217,9 @@ export class SeamHttpAccessMethods { }) } + /** + * Gets an access method. + */ get( parameters: AccessMethodsGetParameters, options: AccessMethodsGetOptions = {}, @@ -221,6 +233,9 @@ export class SeamHttpAccessMethods { }) } + /** + * Gets all related resources for one or more Access Methods. + */ getRelated( parameters: AccessMethodsGetRelatedParameters, options: AccessMethodsGetRelatedOptions = {}, @@ -234,6 +249,9 @@ export class SeamHttpAccessMethods { }) } + /** + * Lists all access methods, usually filtered by Access Grant. + */ list( parameters?: AccessMethodsListParameters, options: AccessMethodsListOptions = {}, @@ -247,6 +265,9 @@ export class SeamHttpAccessMethods { }) } + /** + * Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. + */ unlockDoor( parameters: AccessMethodsUnlockDoorParameters, options: AccessMethodsUnlockDoorOptions = {}, @@ -262,8 +283,14 @@ export class SeamHttpAccessMethods { } export type AccessMethodsAssignCardParameters = { + /** + * ID of the `access_method` to assign the credential to. + */ access_method_id: string + /** + * Card number of the credential to assign. + */ card_number: string } @@ -283,8 +310,17 @@ export type AccessMethodsAssignCardOptions = Pick< > export type AccessMethodsDeleteParameters = { + /** + * ID of access method to delete. + */ access_method_id?: string | undefined + /** + * ID of access grant whose access methods should be deleted. + */ access_grant_id?: string | undefined + /** + * Reservation key of the access grant whose access methods should be deleted. + */ reservation_key?: string | undefined } @@ -298,8 +334,14 @@ export type AccessMethodsDeleteRequest = SeamHttpRequest export interface AccessMethodsDeleteOptions {} export type AccessMethodsEncodeParameters = { + /** + * ID of the `access_method` to encode onto a card. + */ access_method_id: string + /** + * ID of the `acs_encoder` to use to encode the `access_method`. + */ acs_encoder_id: string } @@ -319,6 +361,9 @@ export type AccessMethodsEncodeOptions = Pick< > export type AccessMethodsGetParameters = { + /** + * ID of access method to get. + */ access_method_id: string } @@ -335,6 +380,9 @@ export type AccessMethodsGetRequest = SeamHttpRequest< export interface AccessMethodsGetOptions {} export type AccessMethodsGetRelatedParameters = { + /** + * IDs of the access methods that you want to get along with their related resources. + */ access_method_ids: Array exclude?: @@ -349,6 +397,7 @@ export type AccessMethodsGetRelatedParameters = { | 'acs_credentials' > | undefined + include?: | Array< | 'spaces' @@ -387,13 +436,37 @@ export type AccessMethodsGetRelatedRequest = SeamHttpRequest< export interface AccessMethodsGetRelatedOptions {} export type AccessMethodsListParameters = { + /** + * ID of the access code by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. + */ access_code_id?: string | undefined + /** + * ID of Access Grant to list access methods for. + */ access_grant_id?: string | undefined + /** + * Key of Access Grant to list access methods for. + */ access_grant_key?: string | undefined + /** + * ID of the entrance for which you want to retrieve all access methods that grant access to it. + */ acs_entrance_id?: string | undefined + /** + * ID of the device by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. + */ device_id?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * ID of the space by which to filter the returned access methods. Must be combined with `access_grant_id`, `access_grant_key`, or `acs_entrance_id`. + */ space_id?: string | undefined } @@ -410,8 +483,14 @@ export type AccessMethodsListRequest = SeamHttpRequest< export interface AccessMethodsListOptions {} export type AccessMethodsUnlockDoorParameters = { + /** + * ID of the cloud_key `access_method` to use for the unlock operation. + */ access_method_id: string + /** + * ID of the entrance to unlock. + */ acs_entrance_id: string } 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 7c24da51..f22f3660 100644 --- a/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts @@ -161,6 +161,9 @@ export class SeamHttpAccessMethodsUnmanaged { await clientSessions.get() } + /** + * Gets an unmanaged access method (where is_managed = false). + */ get( parameters: AccessMethodsUnmanagedGetParameters, options: AccessMethodsUnmanagedGetOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpAccessMethodsUnmanaged { }) } + /** + * Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. + */ list( parameters: AccessMethodsUnmanagedListParameters, options: AccessMethodsUnmanagedListOptions = {}, @@ -189,6 +195,9 @@ export class SeamHttpAccessMethodsUnmanaged { } export type AccessMethodsUnmanagedGetParameters = { + /** + * ID of unmanaged access method to get. + */ access_method_id: string } @@ -207,10 +216,22 @@ export type AccessMethodsUnmanagedGetRequest = SeamHttpRequest< export interface AccessMethodsUnmanagedGetOptions {} export type AccessMethodsUnmanagedListParameters = { + /** + * ID of Access Grant to list unmanaged access methods for. + */ access_grant_id: string + /** + * ID of the entrance for which you want to retrieve all unmanaged access methods. + */ acs_entrance_id?: string | undefined + /** + * ID of the device for which you want to retrieve all unmanaged access methods. + */ device_id?: string | undefined + /** + * ID of the space for which you want to retrieve all unmanaged access methods. + */ space_id?: string | undefined } diff --git a/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts b/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts index 2205435e..8b2ab4db 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 @@ -163,6 +163,9 @@ export class SeamHttpAcsAccessGroups { await clientSessions.get() } + /** + * Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ addUser( parameters: AcsAccessGroupsAddUserParameters, options: AcsAccessGroupsAddUserOptions = {}, @@ -176,6 +179,9 @@ export class SeamHttpAcsAccessGroups { }) } + /** + * Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ delete( parameters: AcsAccessGroupsDeleteParameters, options: AcsAccessGroupsDeleteOptions = {}, @@ -189,6 +195,9 @@ export class SeamHttpAcsAccessGroups { }) } + /** + * Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get( parameters: AcsAccessGroupsGetParameters, options: AcsAccessGroupsGetOptions = {}, @@ -202,6 +211,9 @@ export class SeamHttpAcsAccessGroups { }) } + /** + * Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ list( parameters?: AcsAccessGroupsListParameters, options: AcsAccessGroupsListOptions = {}, @@ -215,6 +227,9 @@ export class SeamHttpAcsAccessGroups { }) } + /** + * Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ listAccessibleEntrances( parameters: AcsAccessGroupsListAccessibleEntrancesParameters, options: AcsAccessGroupsListAccessibleEntrancesOptions = {}, @@ -228,6 +243,9 @@ export class SeamHttpAcsAccessGroups { }) } + /** + * Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ listUsers( parameters: AcsAccessGroupsListUsersParameters, options: AcsAccessGroupsListUsersOptions = {}, @@ -241,6 +259,9 @@ export class SeamHttpAcsAccessGroups { }) } + /** + * Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ removeUser( parameters: AcsAccessGroupsRemoveUserParameters, options: AcsAccessGroupsRemoveUserOptions = {}, @@ -256,9 +277,18 @@ export class SeamHttpAcsAccessGroups { } export type AcsAccessGroupsAddUserParameters = { + /** + * ID of the access group to which you want to add an access system user. + */ acs_access_group_id: string + /** + * ID of the access system user that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the desired user identity that you want to add to an access group. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. + */ user_identity_id?: string | undefined } @@ -272,6 +302,9 @@ export type AcsAccessGroupsAddUserRequest = SeamHttpRequest export interface AcsAccessGroupsAddUserOptions {} export type AcsAccessGroupsDeleteParameters = { + /** + * ID of the access group that you want to delete. + */ acs_access_group_id: string } @@ -285,6 +318,9 @@ export type AcsAccessGroupsDeleteRequest = SeamHttpRequest export interface AcsAccessGroupsDeleteOptions {} export type AcsAccessGroupsGetParameters = { + /** + * ID of the access group that you want to get. + */ acs_access_group_id: string } @@ -301,9 +337,21 @@ export type AcsAccessGroupsGetRequest = SeamHttpRequest< export interface AcsAccessGroupsGetOptions {} export type AcsAccessGroupsListParameters = { + /** + * ID of the access system for which you want to retrieve all access groups. + */ acs_system_id?: string | undefined + /** + * ID of the access system user for which you want to retrieve all access groups. + */ acs_user_id?: string | undefined + /** + * String for which to search. Filters returned access groups to include all records that satisfy a partial match using `name` or `acs_access_group_id`. + */ search?: string | undefined + /** + * ID of the user identity for which you want to retrieve all access groups. + */ user_identity_id?: string | undefined } @@ -322,6 +370,9 @@ export type AcsAccessGroupsListRequest = SeamHttpRequest< export interface AcsAccessGroupsListOptions {} export type AcsAccessGroupsListAccessibleEntrancesParameters = { + /** + * ID of the access group for which you want to retrieve all accessible entrances. + */ acs_access_group_id: string } @@ -340,6 +391,9 @@ export type AcsAccessGroupsListAccessibleEntrancesRequest = SeamHttpRequest< export interface AcsAccessGroupsListAccessibleEntrancesOptions {} export type AcsAccessGroupsListUsersParameters = { + /** + * ID of the access group for which you want to retrieve all access system users. + */ acs_access_group_id: string } @@ -356,9 +410,18 @@ export type AcsAccessGroupsListUsersRequest = SeamHttpRequest< export interface AcsAccessGroupsListUsersOptions {} export type AcsAccessGroupsRemoveUserParameters = { + /** + * ID of the access group from which you want to remove an access system user. + */ acs_access_group_id: string + /** + * ID of the access system user that you want to remove from an access group. + */ acs_user_id?: string | undefined + /** + * ID of the user identity associated with the user that you want to remove from an access group. + */ user_identity_id?: string | undefined } diff --git a/src/lib/seam/connect/routes/acs/credentials/credentials.ts b/src/lib/seam/connect/routes/acs/credentials/credentials.ts index 55703158..0308bc79 100644 --- a/src/lib/seam/connect/routes/acs/credentials/credentials.ts +++ b/src/lib/seam/connect/routes/acs/credentials/credentials.ts @@ -162,6 +162,9 @@ export class SeamHttpAcsCredentials { await clientSessions.get() } + /** + * Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ assign( parameters: AcsCredentialsAssignParameters, options: AcsCredentialsAssignOptions = {}, @@ -175,6 +178,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. + */ create( parameters: AcsCredentialsCreateParameters, options: AcsCredentialsCreateOptions = {}, @@ -188,6 +194,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ delete( parameters: AcsCredentialsDeleteParameters, options: AcsCredentialsDeleteOptions = {}, @@ -201,6 +210,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ get( parameters: AcsCredentialsGetParameters, options: AcsCredentialsGetOptions = {}, @@ -214,6 +226,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ list( parameters?: AcsCredentialsListParameters, options: AcsCredentialsListOptions = {}, @@ -227,6 +242,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access. + */ listAccessibleEntrances( parameters: AcsCredentialsListAccessibleEntrancesParameters, options: AcsCredentialsListAccessibleEntrancesOptions = {}, @@ -240,6 +258,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ unassign( parameters: AcsCredentialsUnassignParameters, options: AcsCredentialsUnassignOptions = {}, @@ -253,6 +274,9 @@ export class SeamHttpAcsCredentials { }) } + /** + * Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ update( parameters: AcsCredentialsUpdateParameters, options: AcsCredentialsUpdateOptions = {}, @@ -268,9 +292,18 @@ export class SeamHttpAcsCredentials { } export type AcsCredentialsAssignParameters = { + /** + * ID of the credential that you want to assign to an access system user. + */ acs_credential_id: string + /** + * ID of the access system user to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity to whom you want to assign a credential. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. + */ user_identity_id?: string | undefined } @@ -284,36 +317,85 @@ export type AcsCredentialsAssignRequest = SeamHttpRequest export interface AcsCredentialsAssignOptions {} export type AcsCredentialsCreateParameters = { + /** + * Access method for the new credential. Supported values: `code`, `card`, `mobile_key`, `cloud_key`. + */ access_method: 'code' | 'card' | 'mobile_key' | 'cloud_key' + /** + * ID of the access system to which the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. + */ acs_system_id?: string | undefined + /** + * ID of the access system user to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. + */ acs_user_id?: string | undefined + /** + * Set of IDs of the [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) for which the new credential grants access. + */ allowed_acs_entrance_ids?: Array | undefined + /** + * Vostio-specific metadata for the new credential. + */ 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 + /** + * Access (PIN) code for the new credential. There may be manufacturer-specific code restrictions. For details, see the applicable [device or system integration guide](https://docs.seam.co/device-and-system-integration-guides). + */ code?: string | undefined + /** + * ACS system ID of the credential manager for the new credential. + */ credential_manager_acs_system_id?: string | undefined + /** + * Date and time at which the validity of the new credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`. + */ ends_at?: string | undefined + /** + * Indicates whether the new credential is a [multi-phone sync credential](https://docs.seam.co/capability-guides/mobile-access/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). + */ is_multi_phone_sync_credential?: boolean | undefined + /** + * Salto Space-specific metadata for the new credential. + */ salto_space_metadata?: | { + /** + * Indicates whether to assign a first, new card to a user. See also [Programming Salto Space Card-based Credentials](https://docs.seam.co/device-and-system-integration-guides/salto-proaccess-space-access-system/programming-salto-space-card-based-credentials). + */ assign_new_key?: boolean | undefined } | undefined + /** + * Date and time at which the validity of the new credential starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * ID of the user identity to whom the new credential belongs. You must provide either `acs_user_id` or the combination of `user_identity_id` and `acs_system_id`. If the access system contains a user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the credential belongs to the access system user. If the access system does not have a corresponding user, one is created. + */ user_identity_id?: string | undefined + /** + * Visionline-specific metadata for the new credential. + */ visionline_metadata?: | { auto_join?: boolean | undefined + card_format?: 'TLCode' | 'rfid48' | undefined + card_function_type?: 'guest' | 'staff' | undefined + joiner_acs_credential_ids?: Array | undefined + override?: boolean | undefined } | undefined @@ -332,6 +414,9 @@ export type AcsCredentialsCreateRequest = SeamHttpRequest< export interface AcsCredentialsCreateOptions {} export type AcsCredentialsDeleteParameters = { + /** + * ID of the credential that you want to delete. + */ acs_credential_id: string } @@ -345,6 +430,9 @@ export type AcsCredentialsDeleteRequest = SeamHttpRequest export interface AcsCredentialsDeleteOptions {} export type AcsCredentialsGetParameters = { + /** + * ID of the credential that you want to get. + */ acs_credential_id: string } @@ -361,13 +449,37 @@ export type AcsCredentialsGetRequest = SeamHttpRequest< export interface AcsCredentialsGetOptions {} export type AcsCredentialsListParameters = { + /** + * ID of the access system user for which you want to retrieve all credentials. + */ acs_user_id?: string | undefined + /** + * ID of the access system for which you want to retrieve all credentials. + */ acs_system_id?: string | undefined + /** + * ID of the user identity for which you want to retrieve all credentials. + */ user_identity_id?: string | undefined + /** + * Date and time, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format, before which events to return were created. + */ created_before?: string | undefined + /** + * Indicates whether you want to retrieve only multi-phone sync credentials or non-multi-phone sync credentials. + */ is_multi_phone_sync_credential?: boolean | undefined + /** + * Number of credentials to return. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned credentials to include all records that satisfy a partial match using `display_name`, `code`, `card_number`, `acs_user_id` or `acs_credential_id`. + */ search?: string | undefined } @@ -386,6 +498,9 @@ export type AcsCredentialsListRequest = SeamHttpRequest< export interface AcsCredentialsListOptions {} export type AcsCredentialsListAccessibleEntrancesParameters = { + /** + * ID of the credential for which you want to retrieve all entrances to which the credential grants access. + */ acs_credential_id: string } @@ -404,9 +519,18 @@ export type AcsCredentialsListAccessibleEntrancesRequest = SeamHttpRequest< export interface AcsCredentialsListAccessibleEntrancesOptions {} export type AcsCredentialsUnassignParameters = { + /** + * ID of the credential that you want to unassign from an access system user. + */ acs_credential_id: string + /** + * ID of the access system user from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity from which you want to unassign a credential. You can only provide one of acs_user_id or user_identity_id. + */ user_identity_id?: string | undefined } @@ -420,9 +544,18 @@ export type AcsCredentialsUnassignRequest = SeamHttpRequest export interface AcsCredentialsUnassignOptions {} export type AcsCredentialsUpdateParameters = { + /** + * ID of the credential that you want to update. + */ acs_credential_id: string + /** + * Replacement access (PIN) code for the credential that you want to update. + */ code?: string | undefined + /** + * Replacement date and time at which the validity of the credential ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after the `starts_at` value that you set when creating the credential. + */ ends_at?: string | undefined } diff --git a/src/lib/seam/connect/routes/acs/encoders/encoders.ts b/src/lib/seam/connect/routes/acs/encoders/encoders.ts index 7281f19d..82d90360 100644 --- a/src/lib/seam/connect/routes/acs/encoders/encoders.ts +++ b/src/lib/seam/connect/routes/acs/encoders/encoders.ts @@ -168,6 +168,9 @@ export class SeamHttpAcsEncoders { return SeamHttpAcsEncodersSimulate.fromClient(this.client, this.defaults) } + /** + * Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` + */ encodeCredential( parameters: AcsEncodersEncodeCredentialParameters, options: AcsEncodersEncodeCredentialOptions = {}, @@ -181,6 +184,9 @@ export class SeamHttpAcsEncoders { }) } + /** + * Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ get( parameters: AcsEncodersGetParameters, options: AcsEncodersGetOptions = {}, @@ -194,6 +200,9 @@ export class SeamHttpAcsEncoders { }) } + /** + * Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ list( parameters?: AcsEncodersListParameters, options: AcsEncodersListOptions = {}, @@ -207,6 +216,9 @@ export class SeamHttpAcsEncoders { }) } + /** + * Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ scanCredential( parameters: AcsEncodersScanCredentialParameters, options: AcsEncodersScanCredentialOptions = {}, @@ -220,6 +232,9 @@ export class SeamHttpAcsEncoders { }) } + /** + * Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. + */ scanToAssignCredential( parameters: AcsEncodersScanToAssignCredentialParameters, options: AcsEncodersScanToAssignCredentialOptions = {}, @@ -235,8 +250,17 @@ export class SeamHttpAcsEncoders { } export type AcsEncodersEncodeCredentialParameters = { + /** + * ID of the `access_method` to encode onto a card. + */ access_method_id?: string | undefined + /** + * ID of the `acs_credential` to encode onto a card. + */ acs_credential_id?: string | undefined + /** + * ID of the `acs_encoder` to use to encode the `acs_credential`. + */ acs_encoder_id: string } @@ -258,6 +282,9 @@ export type AcsEncodersEncodeCredentialOptions = Pick< > export type AcsEncodersGetParameters = { + /** + * ID of the encoder that you want to get. + */ acs_encoder_id: string } @@ -274,10 +301,25 @@ export type AcsEncodersGetRequest = SeamHttpRequest< export interface AcsEncodersGetOptions {} export type AcsEncodersListParameters = { + /** + * ID of the access system for which you want to retrieve all encoders. + */ acs_system_id?: string | undefined + /** + * IDs of the access systems for which you want to retrieve all encoders. + */ acs_system_ids?: Array | undefined + /** + * IDs of the encoders that you want to retrieve. + */ acs_encoder_ids?: Array | undefined + /** + * Number of encoders to return. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined } @@ -294,10 +336,19 @@ export type AcsEncodersListRequest = SeamHttpRequest< export interface AcsEncodersListOptions {} export type AcsEncodersScanCredentialParameters = { + /** + * ID of the encoder to use for the scan. + */ acs_encoder_id: string + /** + * Salto KS-specific metadata for the scan action. + */ salto_ks_metadata?: | { + /** + * When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. + */ detect_new_tags?: boolean | undefined } | undefined @@ -321,14 +372,29 @@ export type AcsEncodersScanCredentialOptions = Pick< > export type AcsEncodersScanToAssignCredentialParameters = { + /** + * ID of the `acs_encoder` to use to scan the credential. + */ acs_encoder_id: string + /** + * ID of the `acs_user` to assign the scanned credential to. + */ acs_user_id?: string | undefined + /** + * Salto KS-specific metadata for the scan action. + */ salto_ks_metadata?: | { + /** + * When true, activates tag registration mode on the encoder to detect new, unregistered tags. When false, only detects existing tags already registered in the system. Defaults to false. + */ detect_new_tags?: boolean | undefined } | undefined + /** + * ID of the `user_identity` to assign the scanned credential to. If the ACS system contains an ACS user linked to this user identity, it is used. Otherwise, one is created. + */ user_identity_id?: string | undefined } 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 8b3c44de..bf780e06 100644 --- a/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts @@ -160,6 +160,9 @@ export class SeamHttpAcsEncodersSimulate { await clientSessions.get() } + /** + * Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ nextCredentialEncodeWillFail( parameters: AcsEncodersSimulateNextCredentialEncodeWillFailParameters, options: AcsEncodersSimulateNextCredentialEncodeWillFailOptions = {}, @@ -173,6 +176,9 @@ export class SeamHttpAcsEncodersSimulate { }) } + /** + * Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ nextCredentialEncodeWillSucceed( parameters: AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters, options: AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions = {}, @@ -186,6 +192,9 @@ export class SeamHttpAcsEncodersSimulate { }) } + /** + * Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ nextCredentialScanWillFail( parameters: AcsEncodersSimulateNextCredentialScanWillFailParameters, options: AcsEncodersSimulateNextCredentialScanWillFailOptions = {}, @@ -199,6 +208,9 @@ export class SeamHttpAcsEncodersSimulate { }) } + /** + * Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ nextCredentialScanWillSucceed( parameters: AcsEncodersSimulateNextCredentialScanWillSucceedParameters, options: AcsEncodersSimulateNextCredentialScanWillSucceedOptions = {}, @@ -214,14 +226,23 @@ export class SeamHttpAcsEncodersSimulate { } export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = { + /** + * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. + */ acs_encoder_id: string + /** + * Code of the error to simulate. + */ error_code?: | 'no_credential_on_encoder' | 'encoding_interrupted' | 'uncategorized_error' | 'action_attempt_expired' | undefined + /** + * ID of the `acs_credential` that will fail to be encoded onto a card in the next request. + */ acs_credential_id?: string | undefined } @@ -236,8 +257,14 @@ export type AcsEncodersSimulateNextCredentialEncodeWillFailRequest = export interface AcsEncodersSimulateNextCredentialEncodeWillFailOptions {} export type AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters = { + /** + * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`. + */ acs_encoder_id: string + /** + * Scenario to simulate. + */ scenario?: 'credential_is_issued' | undefined } @@ -252,6 +279,9 @@ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest = export interface AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions {} export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { + /** + * ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request. + */ acs_encoder_id: string error_code?: @@ -259,6 +289,7 @@ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = { | 'uncategorized_error' | 'action_attempt_expired' | undefined + acs_credential_id_on_seam?: string | undefined } @@ -273,9 +304,18 @@ export type AcsEncodersSimulateNextCredentialScanWillFailRequest = export interface AcsEncodersSimulateNextCredentialScanWillFailOptions {} export type AcsEncodersSimulateNextCredentialScanWillSucceedParameters = { + /** + * ID of the Seam `acs_credential` that matches the `acs_credential` on the encoder in this simulation. + */ acs_credential_id_on_seam?: string | undefined + /** + * ID of the `acs_encoder` that will be used in the next request to scan the `acs_credential`. + */ acs_encoder_id: string + /** + * Scenario to simulate. + */ scenario?: | 'credential_exists_on_seam' | 'credential_on_encoder_needs_update' diff --git a/src/lib/seam/connect/routes/acs/entrances/entrances.ts b/src/lib/seam/connect/routes/acs/entrances/entrances.ts index 84f0b00c..3c8918a0 100644 --- a/src/lib/seam/connect/routes/acs/entrances/entrances.ts +++ b/src/lib/seam/connect/routes/acs/entrances/entrances.ts @@ -163,6 +163,9 @@ export class SeamHttpAcsEntrances { await clientSessions.get() } + /** + * Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ get( parameters: AcsEntrancesGetParameters, options: AcsEntrancesGetOptions = {}, @@ -176,6 +179,9 @@ export class SeamHttpAcsEntrances { }) } + /** + * Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ grantAccess( parameters: AcsEntrancesGrantAccessParameters, options: AcsEntrancesGrantAccessOptions = {}, @@ -189,6 +195,9 @@ export class SeamHttpAcsEntrances { }) } + /** + * Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ list( parameters?: AcsEntrancesListParameters, options: AcsEntrancesListOptions = {}, @@ -202,6 +211,9 @@ export class SeamHttpAcsEntrances { }) } + /** + * Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ listCredentialsWithAccess( parameters: AcsEntrancesListCredentialsWithAccessParameters, options: AcsEntrancesListCredentialsWithAccessOptions = {}, @@ -215,6 +227,9 @@ export class SeamHttpAcsEntrances { }) } + /** + * Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. + */ unlock( parameters: AcsEntrancesUnlockParameters, options: AcsEntrancesUnlockOptions = {}, @@ -230,6 +245,9 @@ export class SeamHttpAcsEntrances { } export type AcsEntrancesGetParameters = { + /** + * ID of the entrance that you want to get. + */ acs_entrance_id: string } @@ -246,9 +264,18 @@ export type AcsEntrancesGetRequest = SeamHttpRequest< export interface AcsEntrancesGetOptions {} export type AcsEntrancesGrantAccessParameters = { + /** + * ID of the entrance to which you want to grant an access system user access. + */ acs_entrance_id: string + /** + * ID of the access system user to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity to whom you want to grant access to an entrance. You can only provide one of acs_user_id or user_identity_id. If the ACS system contains an ACS user with the same `email_address` or `phone_number` as the user identity that you specify, they are linked, and the access group membership belongs to the ACS user. If the ACS system does not have a corresponding ACS user, one is created. + */ user_identity_id?: string | undefined } @@ -262,16 +289,49 @@ export type AcsEntrancesGrantAccessRequest = SeamHttpRequest export interface AcsEntrancesGrantAccessOptions {} export type AcsEntrancesListParameters = { + /** + * ID of the access method for which you want to retrieve all entrances to which it grants access. + */ access_method_id?: string | undefined + /** + * ID of the credential for which you want to retrieve all entrances. + */ acs_credential_id?: string | undefined + /** + * IDs of the entrances for which you want to retrieve all entrances. + */ acs_entrance_ids?: Array | undefined + /** + * ID of the access system for which you want to retrieve all entrances. + */ acs_system_id?: string | undefined + /** + * ID of the connected account for which you want to retrieve all entrances. + */ connected_account_id?: string | undefined + /** + * Customer key for which you want to list entrances. + */ customer_key?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * @deprecated Use `space_id`. + */ location_id?: string | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned entrances to include all records that satisfy a partial match using `display_name`. + */ search?: string | undefined + /** + * ID of the space for which you want to list entrances. + */ space_id?: string | undefined } @@ -288,8 +348,14 @@ export type AcsEntrancesListRequest = SeamHttpRequest< export interface AcsEntrancesListOptions {} export type AcsEntrancesListCredentialsWithAccessParameters = { + /** + * ID of the entrance for which you want to list all credentials that grant access. + */ acs_entrance_id: string + /** + * Conditions that credentials must meet to be included in the returned list. + */ include_if?: Array<'visionline_metadata.is_valid'> | undefined } @@ -308,8 +374,14 @@ export type AcsEntrancesListCredentialsWithAccessRequest = SeamHttpRequest< export interface AcsEntrancesListCredentialsWithAccessOptions {} export type AcsEntrancesUnlockParameters = { + /** + * ID of the cloud_key credential to use for the unlock operation. + */ acs_credential_id: string + /** + * ID of the entrance to unlock. + */ acs_entrance_id: string } diff --git a/src/lib/seam/connect/routes/acs/systems/systems.ts b/src/lib/seam/connect/routes/acs/systems/systems.ts index 0c407cbf..50fb6045 100644 --- a/src/lib/seam/connect/routes/acs/systems/systems.ts +++ b/src/lib/seam/connect/routes/acs/systems/systems.ts @@ -161,6 +161,9 @@ export class SeamHttpAcsSystems { await clientSessions.get() } + /** + * Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems). + */ get( parameters: AcsSystemsGetParameters, options: AcsSystemsGetOptions = {}, @@ -174,6 +177,11 @@ export class SeamHttpAcsSystems { }) } + /** + * Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems). + * + * To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. + */ list( parameters?: AcsSystemsListParameters, options: AcsSystemsListOptions = {}, @@ -187,6 +195,11 @@ export class SeamHttpAcsSystems { }) } + /** + * Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems). + * + * Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. + */ listCompatibleCredentialManagerAcsSystems( parameters: AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters, options: AcsSystemsListCompatibleCredentialManagerAcsSystemsOptions = {}, @@ -200,6 +213,9 @@ export class SeamHttpAcsSystems { }) } + /** + * Reports ACS system device status including encoders and entrances. + */ reportDevices( parameters: AcsSystemsReportDevicesParameters, options: AcsSystemsReportDevicesOptions = {}, @@ -215,6 +231,9 @@ export class SeamHttpAcsSystems { } export type AcsSystemsGetParameters = { + /** + * ID of the access system that you want to get. + */ acs_system_id: string } @@ -231,8 +250,17 @@ export type AcsSystemsGetRequest = SeamHttpRequest< export interface AcsSystemsGetOptions {} export type AcsSystemsListParameters = { + /** + * ID of the connected account by which you want to filter the list of access systems. + */ connected_account_id?: string | undefined + /** + * Customer key for which you want to list access systems. + */ customer_key?: string | undefined + /** + * String for which to search. Filters returned access systems to include all records that satisfy a partial match using `name` or `acs_system_id`. + */ search?: string | undefined } @@ -249,6 +277,9 @@ export type AcsSystemsListRequest = SeamHttpRequest< export interface AcsSystemsListOptions {} export type AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters = { + /** + * ID of the access system for which you want to retrieve all compatible credential manager systems. + */ acs_system_id: string } @@ -268,28 +299,61 @@ export type AcsSystemsListCompatibleCredentialManagerAcsSystemsRequest = export interface AcsSystemsListCompatibleCredentialManagerAcsSystemsOptions {} export type AcsSystemsReportDevicesParameters = { + /** + * Array of ACS encoders to report + */ acs_encoders?: | Array<{ + /** + * Hotek-specific metadata associated with the entrance. + */ hotek_metadata?: | { + /** + * The encoder number determined by the USB port connection. + */ encoder_number?: string | undefined } | undefined + /** + * Whether the encoder is removed + */ is_removed?: boolean | undefined }> | undefined + /** + * Array of ACS entrances to report + */ acs_entrances?: | Array<{ + /** + * Hotek-specific metadata associated with the entrance. + */ hotek_metadata?: | { + /** + * The common area name + */ common_area_name?: string | undefined + /** + * The room number identifier + */ common_area_number?: string | undefined + /** + * The room number identifier + */ room_number?: string | undefined } | undefined + /** + * Whether the entrance is removed + */ is_removed?: boolean | undefined }> | undefined + /** + * ID of the ACS system to report resources for + */ acs_system_id: string } diff --git a/src/lib/seam/connect/routes/acs/users/users.ts b/src/lib/seam/connect/routes/acs/users/users.ts index c9d490e4..2d81432c 100644 --- a/src/lib/seam/connect/routes/acs/users/users.ts +++ b/src/lib/seam/connect/routes/acs/users/users.ts @@ -162,6 +162,9 @@ export class SeamHttpAcsUsers { await clientSessions.get() } + /** + * Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ addToAccessGroup( parameters: AcsUsersAddToAccessGroupParameters, options: AcsUsersAddToAccessGroupOptions = {}, @@ -175,6 +178,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ create( parameters: AcsUsersCreateParameters, options: AcsUsersCreateOptions = {}, @@ -188,6 +194,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ delete( parameters?: AcsUsersDeleteParameters, options: AcsUsersDeleteOptions = {}, @@ -201,6 +210,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get( parameters?: AcsUsersGetParameters, options: AcsUsersGetOptions = {}, @@ -214,6 +226,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ list( parameters?: AcsUsersListParameters, options: AcsUsersListOptions = {}, @@ -227,6 +242,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access. + */ listAccessibleEntrances( parameters?: AcsUsersListAccessibleEntrancesParameters, options: AcsUsersListAccessibleEntrancesOptions = {}, @@ -240,6 +258,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ removeFromAccessGroup( parameters: AcsUsersRemoveFromAccessGroupParameters, options: AcsUsersRemoveFromAccessGroupOptions = {}, @@ -253,6 +274,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ revokeAccessToAllEntrances( parameters?: AcsUsersRevokeAccessToAllEntrancesParameters, options: AcsUsersRevokeAccessToAllEntrancesOptions = {}, @@ -266,6 +290,9 @@ export class SeamHttpAcsUsers { }) } + /** + * [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them. + */ suspend( parameters?: AcsUsersSuspendParameters, options: AcsUsersSuspendOptions = {}, @@ -279,6 +306,9 @@ export class SeamHttpAcsUsers { }) } + /** + * [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. + */ unsuspend( parameters?: AcsUsersUnsuspendParameters, options: AcsUsersUnsuspendOptions = {}, @@ -292,6 +322,9 @@ export class SeamHttpAcsUsers { }) } + /** + * Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ update( parameters?: AcsUsersUpdateParameters, options: AcsUsersUpdateOptions = {}, @@ -307,8 +340,14 @@ export class SeamHttpAcsUsers { } export type AcsUsersAddToAccessGroupParameters = { + /** + * ID of the access group to which you want to add an access system user. + */ acs_access_group_id: string + /** + * ID of the access system user that you want to add to an access group. + */ acs_user_id: string } @@ -322,20 +361,50 @@ export type AcsUsersAddToAccessGroupRequest = SeamHttpRequest export interface AcsUsersAddToAccessGroupOptions {} export type AcsUsersCreateParameters = { + /** + * `starts_at` and `ends_at` timestamps for the new access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. + */ access_schedule?: | { + /** + * Ending timestamp for the new access system user's access. + */ ends_at?: string | undefined + /** + * Starting timestamp for the new access system user's access. + */ starts_at?: string | undefined } | undefined + /** + * Array of access group IDs to indicate the access groups to which you want to add the new access system user. + */ acs_access_group_ids?: Array | undefined + /** + * ID of the access system to which you want to add the new access system user. + */ acs_system_id: string + /** + * @deprecated use email_address. + */ email?: string | undefined + /** + * Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ email_address?: string | undefined + /** + * Full name of the new access system user. + */ full_name: string + /** + * Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + */ phone_number?: string | undefined + /** + * ID of the user identity with which you want to associate the new access system user. + */ user_identity_id?: string | undefined } @@ -352,8 +421,17 @@ export type AcsUsersCreateRequest = SeamHttpRequest< export interface AcsUsersCreateOptions {} export type AcsUsersDeleteParameters = { + /** + * ID of the access system that you want to delete. You must provide acs_system_id with user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user that you want to delete. You must provide either acs_user_id or user_identity_id + */ acs_user_id?: string | undefined + /** + * ID of the user identity that you want to delete. You must provide either acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. + */ user_identity_id?: string | undefined } @@ -367,8 +445,17 @@ export type AcsUsersDeleteRequest = SeamHttpRequest export interface AcsUsersDeleteOptions {} export type AcsUsersGetParameters = { + /** + * ID of the access system that you want to get. You can only provide acs_user_id or user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user that you want to get. You can only provide acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity that you want to get. You can only provide acs_user_id or user_identity_id. + */ user_identity_id?: string | undefined } @@ -385,13 +472,37 @@ export type AcsUsersGetRequest = SeamHttpRequest< export interface AcsUsersGetOptions {} export type AcsUsersListParameters = { + /** + * ID of the `acs_system` for which you want to retrieve all access system users. + */ acs_system_id?: string | undefined + /** + * Timestamp by which to limit returned access system users. Returns users created before this timestamp. + */ created_before?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned access system users to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `acs_user_id`, `user_identity_id`, `user_identity_full_name` or `user_identity_phone_number`. + */ search?: string | undefined + /** + * Email address of the user identity for which you want to retrieve all access system users. + */ user_identity_email_address?: string | undefined + /** + * ID of the user identity for which you want to retrieve all access system users. + */ user_identity_id?: string | undefined + /** + * Phone number of the user identity for which you want to retrieve all access system users, in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, `+15555550100`). + */ user_identity_phone_number?: string | undefined } @@ -408,8 +519,17 @@ export type AcsUsersListRequest = SeamHttpRequest< export interface AcsUsersListOptions {} export type AcsUsersListAccessibleEntrancesParameters = { + /** + * ID of the access system for which you want to list accessible entrances. You can only provide acs_system_id with user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity for whom you want to list accessible entrances. You can only provide acs_user_id or user_identity_id. + */ user_identity_id?: string | undefined } @@ -428,9 +548,18 @@ export type AcsUsersListAccessibleEntrancesRequest = SeamHttpRequest< export interface AcsUsersListAccessibleEntrancesOptions {} export type AcsUsersRemoveFromAccessGroupParameters = { + /** + * ID of the access group from which you want to remove an access system user. + */ acs_access_group_id: string + /** + * ID of the access system user that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity that you want to remove from an access group. You can only provide acs_user_id or user_identity_id. + */ user_identity_id?: string | undefined } @@ -447,8 +576,17 @@ export type AcsUsersRemoveFromAccessGroupRequest = SeamHttpRequest< export interface AcsUsersRemoveFromAccessGroupOptions {} export type AcsUsersRevokeAccessToAllEntrancesParameters = { + /** + * ID of the access system for which you want to revoke access. You can only provide acs_system_id with user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity for whom you want to revoke access. You can only provide acs_user_id or user_identity_id. + */ user_identity_id?: string | undefined } @@ -465,8 +603,17 @@ export type AcsUsersRevokeAccessToAllEntrancesRequest = SeamHttpRequest< export interface AcsUsersRevokeAccessToAllEntrancesOptions {} export type AcsUsersSuspendParameters = { + /** + * ID of the access system that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity that you want to suspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + */ user_identity_id?: string | undefined } @@ -480,8 +627,17 @@ export type AcsUsersSuspendRequest = SeamHttpRequest export interface AcsUsersSuspendOptions {} export type AcsUsersUnsuspendParameters = { + /** + * ID of the access system of the user that you want to unsuspend. You can only provide acs_system_id with user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + */ acs_user_id?: string | undefined + /** + * ID of the user identity that you want to unsuspend. You can only provide acs_user_id or the combination of acs_system_id and user_identity_id. + */ user_identity_id?: string | undefined } @@ -495,19 +651,52 @@ export type AcsUsersUnsuspendRequest = SeamHttpRequest export interface AcsUsersUnsuspendOptions {} export type AcsUsersUpdateParameters = { + /** + * `starts_at` and `ends_at` timestamps for the access system user's access. If you specify an `access_schedule`, you may include both `starts_at` and `ends_at`. If you omit `starts_at`, it defaults to the current time. `ends_at` is optional and must be a time in the future and after `starts_at`. + */ access_schedule?: | { + /** + * Ending timestamp for the access system user's access. + */ ends_at?: string | undefined + /** + * Starting timestamp for the access system user's access. + */ starts_at?: string | undefined } | undefined + /** + * ID of the access system that you want to update. You can only provide acs_system_id with user_identity_id. + */ acs_system_id?: string | undefined + /** + * ID of the access system user that you want to update. You can only provide acs_user_id or user_identity_id. + */ acs_user_id?: string | undefined + /** + * @deprecated use email_address. + */ email?: string | undefined + /** + * Email address of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ email_address?: string | undefined + /** + * Full name of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ full_name?: string | undefined + /** + * ID of the HID access control system associated with the user. + */ hid_acs_system_id?: string | undefined + /** + * Phone number of the [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) in E.164 format (for example, `+15555550100`). + */ phone_number?: string | undefined + /** + * ID of the user identity that you want to update. You can only provide acs_user_id or user_identity_id. If you provide user_identity_id, you must also provide acs_system_id. + */ user_identity_id?: string | undefined } 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 5658884b..e1993c51 100644 --- a/src/lib/seam/connect/routes/action-attempts/action-attempts.ts +++ b/src/lib/seam/connect/routes/action-attempts/action-attempts.ts @@ -161,6 +161,9 @@ export class SeamHttpActionAttempts { await clientSessions.get() } + /** + * Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts). + */ get( parameters: ActionAttemptsGetParameters, options: ActionAttemptsGetOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpActionAttempts { }) } + /** + * Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. + */ list( parameters?: ActionAttemptsListParameters, options: ActionAttemptsListOptions = {}, @@ -189,6 +195,9 @@ export class SeamHttpActionAttempts { } export type ActionAttemptsGetParameters = { + /** + * ID of the action attempt that you want to get. + */ action_attempt_id: string } @@ -208,9 +217,21 @@ export type ActionAttemptsGetOptions = Pick< > export type ActionAttemptsListParameters = { + /** + * IDs of the action attempts that you want to retrieve. + */ action_attempt_ids?: Array | undefined + /** + * ID of the device to filter action attempts by. + */ device_id?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined } 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 96a8b964..801fcf0b 100644 --- a/src/lib/seam/connect/routes/client-sessions/client-sessions.ts +++ b/src/lib/seam/connect/routes/client-sessions/client-sessions.ts @@ -160,6 +160,9 @@ export class SeamHttpClientSessions { await clientSessions.get() } + /** + * Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ create( parameters?: ClientSessionsCreateParameters, options: ClientSessionsCreateOptions = {}, @@ -173,6 +176,9 @@ export class SeamHttpClientSessions { }) } + /** + * Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ delete( parameters: ClientSessionsDeleteParameters, options: ClientSessionsDeleteOptions = {}, @@ -186,6 +192,9 @@ export class SeamHttpClientSessions { }) } + /** + * Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ get( parameters?: ClientSessionsGetParameters, options: ClientSessionsGetOptions = {}, @@ -199,6 +208,9 @@ export class SeamHttpClientSessions { }) } + /** + * Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. + */ getOrCreate( parameters?: ClientSessionsGetOrCreateParameters, options: ClientSessionsGetOrCreateOptions = {}, @@ -212,6 +224,9 @@ export class SeamHttpClientSessions { }) } + /** + * Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. + */ grantAccess( parameters?: ClientSessionsGrantAccessParameters, options: ClientSessionsGrantAccessOptions = {}, @@ -225,6 +240,9 @@ export class SeamHttpClientSessions { }) } + /** + * Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ list( parameters?: ClientSessionsListParameters, options: ClientSessionsListOptions = {}, @@ -238,6 +256,11 @@ export class SeamHttpClientSessions { }) } + /** + * Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + * + * Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. + */ revoke( parameters: ClientSessionsRevokeParameters, options: ClientSessionsRevokeOptions = {}, @@ -253,13 +276,38 @@ export class SeamHttpClientSessions { } export type ClientSessionsCreateParameters = { + /** + * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) for which you want to create a client session. + */ connect_webview_ids?: Array | undefined + /** + * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) for which you want to create a client session. + */ connected_account_ids?: Array | undefined + /** + * Customer ID that you want to associate with the new client session. + */ customer_id?: string | undefined + /** + * Customer key that you want to associate with the new client session. + */ customer_key?: string | undefined + /** + * Date and time at which the client session should expire, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ expires_at?: string | undefined + /** + * Your user ID for the user for whom you want to create a client session. + */ user_identifier_key?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to create a client session. + */ user_identity_id?: string | undefined + /** + * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + * @deprecated Use `user_identity_id` instead. + */ user_identity_ids?: Array | undefined } @@ -276,6 +324,9 @@ export type ClientSessionsCreateRequest = SeamHttpRequest< export interface ClientSessionsCreateOptions {} export type ClientSessionsDeleteParameters = { + /** + * ID of the client session that you want to delete. + */ client_session_id: string } @@ -289,7 +340,13 @@ export type ClientSessionsDeleteRequest = SeamHttpRequest export interface ClientSessionsDeleteOptions {} export type ClientSessionsGetParameters = { + /** + * ID of the client session that you want to get. + */ client_session_id?: string | undefined + /** + * User identifier key associated with the client session that you want to get. + */ user_identifier_key?: string | undefined } @@ -306,11 +363,30 @@ export type ClientSessionsGetRequest = SeamHttpRequest< export interface ClientSessionsGetOptions {} export type ClientSessionsGetOrCreateParameters = { + /** + * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session (or that are already associated with the existing client session). + */ connect_webview_ids?: Array | undefined + /** + * IDs of the [connected accounts](https://docs.seam.co/api/connected_accounts) that you want to associate with the client session (or that are already associated with the existing client session). + */ connected_account_ids?: Array | undefined + /** + * Date and time at which the client session should expire in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. If the client session already exists, this will update the expiration before returning it. + */ expires_at?: string | undefined + /** + * Your user ID for the user that you want to associate with the client session (or that is already associated with the existing client session). + */ user_identifier_key?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session (or that are already associated with the existing client session). + */ user_identity_id?: string | undefined + /** + * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + * @deprecated Use `user_identity_id`. + */ user_identity_ids?: Array | undefined } @@ -329,11 +405,30 @@ export type ClientSessionsGetOrCreateRequest = SeamHttpRequest< export interface ClientSessionsGetOrCreateOptions {} export type ClientSessionsGrantAccessParameters = { + /** + * ID of the client session to which you want to grant access to resources. + */ client_session_id?: string | undefined + /** + * IDs of the [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) that you want to associate with the client session. + */ connect_webview_ids?: Array | undefined + /** + * IDs of the [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that you want to associate with the client session. + */ connected_account_ids?: Array | undefined + /** + * Your user ID for the user that you want to associate with the client session. + */ user_identifier_key?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + */ user_identity_id?: string | undefined + /** + * IDs of the [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) that you want to associate with the client session. + * @deprecated Use `user_identity_id`. + */ user_identity_ids?: Array | undefined } @@ -347,10 +442,25 @@ export type ClientSessionsGrantAccessRequest = SeamHttpRequest export interface ClientSessionsGrantAccessOptions {} export type ClientSessionsListParameters = { + /** + * ID of the client session that you want to retrieve. + */ client_session_id?: string | undefined + /** + * ID of the [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) for which you want to retrieve client sessions. + */ connect_webview_id?: string | undefined + /** + * Your user ID for the user by which you want to filter client sessions. + */ user_identifier_key?: string | undefined + /** + * ID of the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) for which you want to retrieve client sessions. + */ user_identity_id?: string | undefined + /** + * Indicates whether to retrieve only client sessions without associated user identifier keys. + */ without_user_identifier_key?: boolean | undefined } @@ -369,6 +479,9 @@ export type ClientSessionsListRequest = SeamHttpRequest< export interface ClientSessionsListOptions {} export type ClientSessionsRevokeParameters = { + /** + * ID of the client session that you want to revoke. + */ client_session_id: string } 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 f7c0ec56..8a885d8e 100644 --- a/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts +++ b/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts @@ -161,6 +161,15 @@ export class SeamHttpConnectWebviews { await clientSessions.get() } + /** + * Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. + * + * You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. + * + * See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process). + */ create( parameters?: ConnectWebviewsCreateParameters, options: ConnectWebviewsCreateOptions = {}, @@ -174,6 +183,11 @@ export class SeamHttpConnectWebviews { }) } + /** + * Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. + */ delete( parameters: ConnectWebviewsDeleteParameters, options: ConnectWebviewsDeleteOptions = {}, @@ -187,6 +201,11 @@ export class SeamHttpConnectWebviews { }) } + /** + * Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. + */ get( parameters: ConnectWebviewsGetParameters, options: ConnectWebviewsGetOptions = {}, @@ -200,6 +219,9 @@ export class SeamHttpConnectWebviews { }) } + /** + * Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). + */ list( parameters?: ConnectWebviewsListParameters, options: ConnectWebviewsListOptions = {}, @@ -215,11 +237,17 @@ export class SeamHttpConnectWebviews { } export type ConnectWebviewsCreateParameters = { + /** + * List of accepted device capabilities that restrict the types of devices that can be connected through the Connect Webview. If not provided, defaults will be determined based on the accepted providers. + */ accepted_capabilities?: | Array< 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > | undefined + /** + * Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with no filters. + */ accepted_providers?: | Array< | 'hotek' @@ -291,12 +319,33 @@ export type ConnectWebviewsCreateParameters = { | 'slack' > | undefined + /** + * Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). + */ automatically_manage_new_devices?: boolean | undefined + /** + * Custom metadata that you want to associate with the Connect Webview. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a Connect Webview](https://docs.seam.co/core-concepts/connect-webviews/attaching-custom-data-to-the-connect-webview) enables you to store custom information, like customer details or internal IDs from your application. The custom metadata is then transferred to any [connected accounts](https://docs.seam.co/core-concepts/connected-accounts) that were connected using the Connect Webview, making it easy to find and filter these resources in your [workspace](https://docs.seam.co/core-concepts/workspaces). You can also [filter Connect Webviews by custom metadata](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). + */ custom_metadata?: Record | undefined + /** + * Alternative URL that you want to redirect the user to on an error. If you do not set this parameter, the Connect Webview falls back to the `custom_redirect_url`. + */ custom_redirect_failure_url?: string | undefined + /** + * URL that you want to redirect the user to after the provider login is complete. + */ custom_redirect_url?: string | undefined + /** + * Associate the Connect Webview, the connected account, and all resources under the connected account with a customer. If the connected account already exists, it will be associated with the customer. If the connected account already exists, but is already associated with a customer, the Connect Webview will show an error. + */ customer_key?: string | undefined + /** + * List of provider keys to exclude from the Connect Webview. These providers will not be shown when the user tries to connect an account. + */ excluded_providers?: Array | undefined + /** + * Specifies the category of providers that you want to include. To list all providers within a category, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with the desired `provider_category` filter. + */ provider_category?: | 'stable' | 'consumer_smartlocks' @@ -308,6 +357,9 @@ export type ConnectWebviewsCreateParameters = { | 'connectors' | 'internal_beta' | undefined + /** + * Indicates whether Seam should finish syncing all devices in a newly-connected account before completing the associated Connect Webview. See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews). + */ wait_for_device_creation?: boolean | undefined } @@ -324,6 +376,9 @@ export type ConnectWebviewsCreateRequest = SeamHttpRequest< export interface ConnectWebviewsCreateOptions {} export type ConnectWebviewsDeleteParameters = { + /** + * ID of the Connect Webview that you want to delete. + */ connect_webview_id: string } @@ -337,6 +392,9 @@ export type ConnectWebviewsDeleteRequest = SeamHttpRequest export interface ConnectWebviewsDeleteOptions {} export type ConnectWebviewsGetParameters = { + /** + * ID of the Connect Webview that you want to get. + */ connect_webview_id: string } @@ -353,11 +411,29 @@ export type ConnectWebviewsGetRequest = SeamHttpRequest< export interface ConnectWebviewsGetOptions {} export type ConnectWebviewsListParameters = { + /** + * Custom metadata pairs by which you want to [filter Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/filtering-connect-webviews-by-custom-metadata). Returns Connect Webviews with `custom_metadata` that contains all of the provided key:value pairs. + */ custom_metadata_has?: Record | undefined + /** + * Customer key for which you want to list connect webviews. + */ customer_key?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned Connect Webviews to include all records that satisfy a partial match using `connect_webview_id`, `accepted_providers`, `custom_metadata`, or `customer_key`. + */ search?: string | undefined + /** + * Your user ID for the user by which you want to filter Connect Webviews. + */ user_identifier_key?: string | undefined } 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 f8583724..5dd2694a 100644 --- a/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts +++ b/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts @@ -170,6 +170,13 @@ export class SeamHttpConnectedAccounts { ) } + /** + * Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). + * + * Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. + * + * For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. + */ delete( parameters: ConnectedAccountsDeleteParameters, options: ConnectedAccountsDeleteOptions = {}, @@ -183,6 +190,9 @@ export class SeamHttpConnectedAccounts { }) } + /** + * Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). + */ get( parameters?: ConnectedAccountsGetParameters, options: ConnectedAccountsGetOptions = {}, @@ -196,6 +206,9 @@ export class SeamHttpConnectedAccounts { }) } + /** + * Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts). + */ list( parameters?: ConnectedAccountsListParameters, options: ConnectedAccountsListOptions = {}, @@ -209,6 +222,9 @@ export class SeamHttpConnectedAccounts { }) } + /** + * Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. + */ sync( parameters: ConnectedAccountsSyncParameters, options: ConnectedAccountsSyncOptions = {}, @@ -222,6 +238,9 @@ export class SeamHttpConnectedAccounts { }) } + /** + * Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts). + */ update( parameters: ConnectedAccountsUpdateParameters, options: ConnectedAccountsUpdateOptions = {}, @@ -237,6 +256,9 @@ export class SeamHttpConnectedAccounts { } export type ConnectedAccountsDeleteParameters = { + /** + * ID of the connected account that you want to delete. + */ connected_account_id: string } @@ -250,7 +272,13 @@ export type ConnectedAccountsDeleteRequest = SeamHttpRequest export interface ConnectedAccountsDeleteOptions {} export type ConnectedAccountsGetParameters = { + /** + * ID of the connected account that you want to get. + */ connected_account_id?: string | undefined + /** + * Email address associated with the connected account that you want to get. + */ email?: string | undefined } @@ -269,12 +297,33 @@ export type ConnectedAccountsGetRequest = SeamHttpRequest< export interface ConnectedAccountsGetOptions {} export type ConnectedAccountsListParameters = { + /** + * Custom metadata pairs by which you want to filter connected accounts. Returns connected accounts with `custom_metadata` that contains all of the provided key:value pairs. + */ custom_metadata_has?: Record | undefined + /** + * Customer key by which you want to filter connected accounts. + */ customer_key?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned connected accounts to include all records that satisfy a partial match using `connected_account_id`, `account_type`, `customer_key`, `custom_metadata`, `user_identifier.username`, `user_identifier.email` or `user_identifier.phone`. + */ search?: string | undefined + /** + * ID of the space by which you want to filter connected accounts. + */ space_id?: string | undefined + /** + * Your user ID for the user by which you want to filter connected accounts. + */ user_identifier_key?: string | undefined } @@ -293,6 +342,9 @@ export type ConnectedAccountsListRequest = SeamHttpRequest< export interface ConnectedAccountsListOptions {} export type ConnectedAccountsSyncParameters = { + /** + * ID of the connected account that you want to sync. + */ connected_account_id: string } @@ -306,16 +358,34 @@ export type ConnectedAccountsSyncRequest = SeamHttpRequest export interface ConnectedAccountsSyncOptions {} export type ConnectedAccountsUpdateParameters = { + /** + * List of accepted device capabilities that restrict the types of devices that can be connected through this connected account. Valid values are `lock`, `thermostat`, `noise_sensor`, and `access_control`. + */ accepted_capabilities?: | Array< 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera' > | undefined + /** + * Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + */ automatically_manage_new_devices?: boolean | undefined + /** + * ID of the connected account that you want to update. + */ connected_account_id: string + /** + * Custom metadata that you want to associate with the connected account. Entirely replaces the existing custom metadata object. If a new Connect Webview contains custom metadata and is used to reconnect a connected account, the custom metadata from the Connect Webview will entirely replace the entire custom metadata object on the connected account. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a connected account](https://docs.seam.co/core-concepts/connected-accounts/adding-custom-metadata-to-a-connected-account) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter connected accounts by the desired metadata](https://docs.seam.co/core-concepts/connected-accounts/filtering-connected-accounts-by-custom-metadata). + */ custom_metadata?: Record | undefined + /** + * The customer key to associate with this connected account. If provided, the connected account and all resources under the connected account will be moved to this customer. May only be provided if the connected account is not already associated with a customer. + */ customer_key?: string | undefined + /** + * Human-readable name for the connected account, shown in the dashboard. For example, `Booking from Airbnb House 1`. + */ display_name?: string | undefined } 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 86d0ed32..8832b88c 100644 --- a/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts @@ -163,6 +163,9 @@ export class SeamHttpConnectedAccountsSimulate { await clientSessions.get() } + /** + * Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ disconnect( parameters: ConnectedAccountsSimulateDisconnectParameters, options: ConnectedAccountsSimulateDisconnectOptions = {}, @@ -178,6 +181,9 @@ export class SeamHttpConnectedAccountsSimulate { } export type ConnectedAccountsSimulateDisconnectParameters = { + /** + * ID of the connected account you want to simulate as disconnected. + */ connected_account_id: string } diff --git a/src/lib/seam/connect/routes/customers/customers.ts b/src/lib/seam/connect/routes/customers/customers.ts index f077eaca..4482bece 100644 --- a/src/lib/seam/connect/routes/customers/customers.ts +++ b/src/lib/seam/connect/routes/customers/customers.ts @@ -161,6 +161,9 @@ export class SeamHttpCustomers { await clientSessions.get() } + /** + * Creates a new customer portal magic link with configurable features. + */ createPortal( parameters?: CustomersCreatePortalParameters, options: CustomersCreatePortalOptions = {}, @@ -174,6 +177,10 @@ export class SeamHttpCustomers { }) } + /** + * Deletes customer data including resources like spaces, properties, rooms, users, etc. + * This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + */ deleteData( parameters?: CustomersDeleteDataParameters, options: CustomersDeleteDataOptions = {}, @@ -187,6 +194,9 @@ export class SeamHttpCustomers { }) } + /** + * Pushes customer data including resources like spaces, properties, rooms, users, etc. + */ pushData( parameters: CustomersPushDataParameters, options: CustomersPushDataOptions = {}, @@ -202,95 +212,221 @@ export class SeamHttpCustomers { } export type CustomersCreatePortalParameters = { + /** + * Filter configuration for resources based on their custom_metadata. Each filter specifies a field, operation, and value to match against resource custom_metadata. + */ customer_resources_filters?: | Array<{ + /** + * The custom_metadata field name to filter on. + */ field?: string | undefined + /** + * The comparison operation. Currently only '=' is supported. + */ operation?: '=' | undefined + /** + * The value to compare against. + */ value?: {} | undefined }> | undefined + /** + * The ID of the customization profile to use for the portal. + */ customization_profile_id?: string | undefined + /** + * Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource. + */ deep_link?: | { resource_key?: string | undefined + resource_type?: 'reservation' | 'space' | 'device' | undefined + resource_id?: string | undefined } | undefined + /** + * Whether to exclude the option to select a locale within the portal UI. + */ exclude_locale_picker?: boolean | undefined + features?: | { + /** + * Configuration for the configure feature. + */ configure?: | { + /** + * Indicates whether the customer can customize the access automation rules for their properties. + */ allow_access_automation_rule_customization?: boolean | undefined + /** + * Indicates whether the customer can customize the climate automation rules for their properties. + */ allow_climate_automation_rule_customization?: boolean | undefined + /** + * Indicates whether the customer can customize the Instant Key profile for their properties. + */ allow_instant_key_customization?: boolean | undefined + /** + * Whether to exclude this feature from the portal. + */ exclude?: boolean | undefined } | undefined + /** + * Configuration for the connect accounts feature. + */ connect?: | { + /** + * List of provider keys to allow for the connect feature. These providers will be shown when the customer tries to connect an account. + */ accepted_providers?: Array | undefined + /** + * Whether to exclude this feature from the portal. + */ exclude?: boolean | undefined + /** + * List of provider keys to exclude from the connect feature. These providers will not be shown when the customer tries to connect an account. + */ excluded_providers?: Array | undefined } | undefined + /** + * Configuration for the manage feature. + */ manage?: | { + /** + * Custom copy for the confirmation modal shown before unmanaged devices are added to a space and begin being managed (and billed). Only takes effect when the MANAGE_DEVICES_CONFIRMATION_MODAL feature flag is enabled for the workspace. Any omitted string falls back to a localized default. + */ device_management_confirmation?: | { + /** + * Custom body text for the confirmation modal. May include the {count} token, which is replaced with the number of devices that will begin being managed. + */ body?: string | undefined + /** + * Custom label for the cancel button. + */ cancel_button_label?: string | undefined + /** + * Custom label for the confirm button. + */ confirm_button_label?: string | undefined + /** + * Custom title for the confirmation modal. + */ title?: string | undefined } | undefined + /** + * Configuration for event type filtering in the manage feature. + */ events?: | { + /** + * List of event types to show in the events filter. When set, only these event types will be available. Leave empty to show all events. + */ allowed_events?: Array | undefined + /** + * List of event types that are pre-selected in the events filter when the user first loads the events tab. + */ default_events?: Array | undefined } | undefined + /** + * Whether to exclude this feature from the portal. + */ exclude?: boolean | undefined + /** + * Indicates whether the customer can manage reservations for their properties. + */ exclude_reservation_management?: boolean | undefined + /** + * Indicates whether to exclude technical details from reservation views. + */ exclude_reservation_technical_details?: boolean | undefined + /** + * Indicates whether the customer can manage staff for their properties. + */ exclude_staff_management?: boolean | undefined } | undefined + /** + * Configuration for the manage devices feature. + * --- + * deprecated: Use `manage` instead. + * --- + */ manage_devices?: | { + /** + * Whether to exclude this feature from the portal. + */ exclude?: boolean | undefined } | undefined + /** + * Configuration for the organize feature. + */ organize?: | { + /** + * Whether to exclude this feature from the portal. + */ exclude?: boolean | undefined } | undefined } | undefined + /** + * Whether the portal is embedded in another application. + */ is_embedded?: boolean | undefined + /** + * Configuration for the landing page when the portal loads. + */ 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 + /** + * The locale to use for the portal. + */ locale?: | 'en-US' | 'pt-PT' @@ -303,213 +439,649 @@ export type CustomersCreatePortalParameters = { | 'pl-PL' | 'ru-RU' | undefined + /** + * Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links. + */ navigation_mode?: 'full' | 'restricted' | undefined + /** + * Whether the portal is read-only. When true, the customer can browse the portal but cannot perform any mutating action; write requests made with the portal's client session are rejected. + */ read_only?: boolean | undefined + customer_data?: | { + /** + * List of access grants. + */ access_grants?: | Array<{ + /** + * Your unique identifier for the access grant. + */ access_grant_key?: string | undefined + /** + * Building keys associated with the access grant. + */ building_keys?: Array | undefined + /** + * Common area keys associated with the access grant. + */ common_area_keys?: Array | undefined + /** + * Ending date and time for the access grant. + */ ends_at?: string | undefined + /** + * Facility keys associated with the access grant. + */ facility_keys?: Array | undefined + /** + * Guest key associated with the access grant. + */ guest_key?: string | undefined + /** + * Listing keys associated with the access grant. + */ listing_keys?: Array | undefined + /** + * Your name for this access grant resource. + */ name?: string | undefined + /** + * Preferred PIN code to use when creating access for this reservation. + */ preferred_code?: string | undefined + /** + * Property keys associated with the access grant. + */ property_keys?: Array | undefined + /** + * Resident key associated with the access grant. + */ resident_key?: string | undefined + /** + * Room keys associated with the access grant. + */ room_keys?: Array | undefined + /** + * Space keys associated with the access grant. + */ space_keys?: Array | undefined + /** + * Starting date and time for the access grant. + */ starts_at?: string | undefined + /** + * Tenant key associated with the access grant. + */ tenant_key?: string | undefined + /** + * Unit keys associated with the access grant. + */ unit_keys?: Array | undefined + /** + * User identity key associated with the access grant. + */ user_identity_key?: string | undefined + /** + * User key associated with the access grant. + */ user_key?: string | undefined }> | undefined + /** + * List of bookings. + */ bookings?: | Array<{ + /** + * Your unique identifier for the booking. + */ booking_key?: string | undefined + /** + * Building keys associated with the access grant. + */ building_keys?: Array | undefined + /** + * Common area keys associated with the access grant. + */ common_area_keys?: Array | undefined + /** + * Ending date and time for the access grant. + */ ends_at?: string | undefined + /** + * Facility keys associated with the access grant. + */ facility_keys?: Array | undefined + /** + * Guest key associated with the access grant. + */ guest_key?: string | undefined + /** + * Listing keys associated with the access grant. + */ listing_keys?: Array | undefined + /** + * Your name for this access grant resource. + */ name?: string | undefined + /** + * Preferred PIN code to use when creating access for this reservation. + */ preferred_code?: string | undefined + /** + * Property keys associated with the access grant. + */ property_keys?: Array | undefined + /** + * Resident key associated with the access grant. + */ resident_key?: string | undefined + /** + * Room keys associated with the access grant. + */ room_keys?: Array | undefined + /** + * Space keys associated with the access grant. + */ space_keys?: Array | undefined + /** + * Starting date and time for the access grant. + */ starts_at?: string | undefined + /** + * Tenant key associated with the access grant. + */ tenant_key?: string | undefined + /** + * Unit keys associated with the access grant. + */ unit_keys?: Array | undefined + /** + * User identity key associated with the access grant. + */ user_identity_key?: string | undefined + /** + * User key associated with the access grant. + */ user_key?: string | undefined }> | undefined + /** + * List of buildings. + */ buildings?: | Array<{ + /** + * Your unique identifier for the building. + */ building_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined }> | undefined + /** + * List of shared common areas. + */ common_areas?: | Array<{ + /** + * Your unique identifier for the common area. + */ common_area_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined }> | undefined + /** + * Your unique identifier for the customer. + */ customer_key?: string | undefined + /** + * List of gym or fitness facilities. + */ facilities?: | Array<{ + /** + * Your unique identifier for the facility. + */ facility_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined }> | undefined + /** + * List of guests. + */ guests?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your unique identifier for the guest. + */ guest_key?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined }> | undefined + /** + * List of property listings. + */ listings?: | Array<{ + /** + * Your unique identifier for the listing. + */ listing_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined }> | undefined + /** + * List of short-term rental properties. + */ properties?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the property. + */ property_key?: string | undefined }> | undefined + /** + * List of property listings. + */ property_listings?: | Array<{ + /** + * Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. + */ custom_metadata?: Record | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the property listing. + */ property_listing_key?: string | undefined }> | undefined + /** + * List of reservations. + */ reservations?: | Array<{ + /** + * Building keys associated with the access grant. + */ building_keys?: Array | undefined + /** + * Common area keys associated with the access grant. + */ common_area_keys?: Array | undefined + /** + * Set key:value pairs for filtering reservations by custom criteria. + */ custom_metadata?: Record | undefined + /** + * Ending date and time for the access grant. + */ ends_at?: string | undefined + /** + * Facility keys associated with the access grant. + */ facility_keys?: Array | undefined + /** + * Guest key associated with the access grant. + */ guest_key?: string | undefined + /** + * Listing keys associated with the access grant. + */ listing_keys?: Array | undefined + /** + * Your name for this access grant resource. + */ name?: string | undefined + /** + * Preferred PIN code to use when creating access for this reservation. + */ preferred_code?: string | undefined + /** + * Property keys associated with the access grant. + */ property_keys?: Array | undefined + /** + * Your unique identifier for the reservation. + */ reservation_key?: string | undefined + /** + * Resident key associated with the access grant. + */ resident_key?: string | undefined + /** + * Room keys associated with the access grant. + */ room_keys?: Array | undefined + /** + * Space keys associated with the access grant. + */ space_keys?: Array | undefined + /** + * Starting date and time for the access grant. + */ starts_at?: string | undefined + /** + * Tenant key associated with the access grant. + */ tenant_key?: string | undefined + /** + * Unit keys associated with the access grant. + */ unit_keys?: Array | undefined + /** + * User identity key associated with the access grant. + */ user_identity_key?: string | undefined + /** + * User key associated with the access grant. + */ user_key?: string | undefined }> | undefined + /** + * List of residents. + */ residents?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the resident. + */ resident_key?: string | undefined }> | undefined + /** + * List of hotel or hospitality rooms. + */ rooms?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined + /** + * Your unique identifier for the room. + */ room_key?: string | undefined }> | undefined + /** + * List of general sites or areas. + */ sites?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ site_key?: string | undefined }> | undefined + /** + * List of general spaces or areas. + */ spaces?: | Array<{ + /** + * Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). + */ customer_data?: | { + /** + * Postal address for the space. + */ address?: string | undefined + /** + * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkin_time?: string | undefined + /** + * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkout_time?: string | undefined + /** + * IANA time zone for the space, e.g. America/Los_Angeles. + */ time_zone?: string | undefined } | undefined + /** + * Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. + */ duration_minutes?: number | undefined + /** + * Geographic coordinates (latitude and longitude) of the space. + */ geolocation?: | { + /** + * Latitude of the space, in decimal degrees. + */ latitude?: number | undefined + /** + * Longitude of the space, in decimal degrees. + */ longitude?: number | undefined } | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined + /** + * Your unique identifier for the space. + */ space_key?: string | undefined }> | undefined + /** + * List of staff members. + */ staff_members?: | Array<{ + /** + * List of unique identifiers for the buildings the staff member is associated with. + */ building_keys?: Array | undefined + /** + * List of unique identifiers for the common areas the staff member is associated with. + */ common_area_keys?: Array | undefined + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * List of unique identifiers for the facilities the staff member is associated with. + */ facility_keys?: Array | undefined + /** + * List of unique identifiers for the listings the staff member is associated with. + */ listing_keys?: Array | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * List of unique identifiers for the properties the staff member is associated with. + */ property_keys?: Array | undefined + /** + * List of unique identifiers for the property listings the staff member is associated with. + */ property_listing_keys?: Array | undefined + /** + * List of unique identifiers for the rooms the staff member is associated with. + */ room_keys?: Array | undefined + /** + * List of unique identifiers for the sites the staff member is associated with. + */ site_keys?: Array | undefined + /** + * List of unique identifiers for the spaces the staff member is associated with. + */ space_keys?: Array | undefined + /** + * Your unique identifier for the staff. + */ staff_member_key?: string | undefined + /** + * List of unique identifiers for the units the staff member is associated with. + */ unit_keys?: Array | undefined }> | undefined + /** + * List of tenants. + */ tenants?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the tenant. + */ tenant_key?: string | undefined }> | undefined + /** + * List of multi-family residential units. + */ units?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined + /** + * Your unique identifier for the unit. + */ unit_key?: string | undefined }> | undefined + /** + * List of user identities. + */ user_identities?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the user identity. + */ user_identity_key?: string | undefined }> | undefined + /** + * List of users. + */ users?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the user. + */ user_key?: string | undefined }> | undefined @@ -530,24 +1102,81 @@ export type CustomersCreatePortalRequest = SeamHttpRequest< export interface CustomersCreatePortalOptions {} export type CustomersDeleteDataParameters = { + /** + * List of access grant keys to delete. + */ access_grant_keys?: Array | undefined + /** + * List of booking keys to delete. + */ booking_keys?: Array | undefined + /** + * List of building keys to delete. + */ building_keys?: Array | undefined + /** + * List of common area keys to delete. + */ common_area_keys?: Array | undefined + /** + * List of customer keys to delete all data for. + */ customer_keys?: Array | undefined + /** + * List of facility keys to delete. + */ facility_keys?: Array | undefined + /** + * List of guest keys to delete. + */ guest_keys?: Array | undefined + /** + * List of listing keys to delete. + */ listing_keys?: Array | undefined + /** + * List of property keys to delete. + */ property_keys?: Array | undefined + /** + * List of property listing keys to delete. + */ property_listing_keys?: Array | undefined + /** + * List of reservation keys to delete. + */ reservation_keys?: Array | undefined + /** + * List of resident keys to delete. + */ resident_keys?: Array | undefined + /** + * List of room keys to delete. + */ room_keys?: Array | undefined + /** + * List of space keys to delete. + */ space_keys?: Array | undefined + /** + * List of staff member keys to delete. + */ staff_member_keys?: Array | undefined + /** + * List of tenant keys to delete. + */ tenant_keys?: Array | undefined + /** + * List of unit keys to delete. + */ unit_keys?: Array | undefined + /** + * List of user identity keys to delete. + */ user_identity_keys?: Array | undefined + /** + * List of user keys to delete. + */ user_keys?: Array | undefined } @@ -561,210 +1190,639 @@ export type CustomersDeleteDataRequest = SeamHttpRequest export interface CustomersDeleteDataOptions {} export type CustomersPushDataParameters = { + /** + * List of access grants. + */ access_grants?: | Array<{ + /** + * Your unique identifier for the access grant. + */ access_grant_key?: string | undefined + /** + * Building keys associated with the access grant. + */ building_keys?: Array | undefined + /** + * Common area keys associated with the access grant. + */ common_area_keys?: Array | undefined + /** + * Ending date and time for the access grant. + */ ends_at?: string | undefined + /** + * Facility keys associated with the access grant. + */ facility_keys?: Array | undefined + /** + * Guest key associated with the access grant. + */ guest_key?: string | undefined + /** + * Listing keys associated with the access grant. + */ listing_keys?: Array | undefined + /** + * Your name for this access grant resource. + */ name?: string | undefined + /** + * Preferred PIN code to use when creating access for this reservation. + */ preferred_code?: string | undefined + /** + * Property keys associated with the access grant. + */ property_keys?: Array | undefined + /** + * Resident key associated with the access grant. + */ resident_key?: string | undefined + /** + * Room keys associated with the access grant. + */ room_keys?: Array | undefined + /** + * Space keys associated with the access grant. + */ space_keys?: Array | undefined + /** + * Starting date and time for the access grant. + */ starts_at?: string | undefined + /** + * Tenant key associated with the access grant. + */ tenant_key?: string | undefined + /** + * Unit keys associated with the access grant. + */ unit_keys?: Array | undefined + /** + * User identity key associated with the access grant. + */ user_identity_key?: string | undefined + /** + * User key associated with the access grant. + */ user_key?: string | undefined }> | undefined + /** + * List of bookings. + */ bookings?: | Array<{ + /** + * Your unique identifier for the booking. + */ booking_key?: string | undefined + /** + * Building keys associated with the access grant. + */ building_keys?: Array | undefined + /** + * Common area keys associated with the access grant. + */ common_area_keys?: Array | undefined + /** + * Ending date and time for the access grant. + */ ends_at?: string | undefined + /** + * Facility keys associated with the access grant. + */ facility_keys?: Array | undefined + /** + * Guest key associated with the access grant. + */ guest_key?: string | undefined + /** + * Listing keys associated with the access grant. + */ listing_keys?: Array | undefined + /** + * Your name for this access grant resource. + */ name?: string | undefined + /** + * Preferred PIN code to use when creating access for this reservation. + */ preferred_code?: string | undefined + /** + * Property keys associated with the access grant. + */ property_keys?: Array | undefined + /** + * Resident key associated with the access grant. + */ resident_key?: string | undefined + /** + * Room keys associated with the access grant. + */ room_keys?: Array | undefined + /** + * Space keys associated with the access grant. + */ space_keys?: Array | undefined + /** + * Starting date and time for the access grant. + */ starts_at?: string | undefined + /** + * Tenant key associated with the access grant. + */ tenant_key?: string | undefined + /** + * Unit keys associated with the access grant. + */ unit_keys?: Array | undefined + /** + * User identity key associated with the access grant. + */ user_identity_key?: string | undefined + /** + * User key associated with the access grant. + */ user_key?: string | undefined }> | undefined + /** + * List of buildings. + */ buildings?: | Array<{ + /** + * Your unique identifier for the building. + */ building_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined }> | undefined + /** + * List of shared common areas. + */ common_areas?: | Array<{ + /** + * Your unique identifier for the common area. + */ common_area_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined }> | undefined + /** + * Your unique identifier for the customer. + */ customer_key: string + /** + * List of gym or fitness facilities. + */ facilities?: | Array<{ + /** + * Your unique identifier for the facility. + */ facility_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined }> | undefined + /** + * List of guests. + */ guests?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your unique identifier for the guest. + */ guest_key?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined }> | undefined + /** + * List of property listings. + */ listings?: | Array<{ + /** + * Your unique identifier for the listing. + */ listing_key?: string | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined }> | undefined + /** + * List of short-term rental properties. + */ properties?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the property. + */ property_key?: string | undefined }> | undefined + /** + * List of property listings. + */ property_listings?: | Array<{ + /** + * Set key:value pairs. Accepts string or Boolean values. Adding custom metadata to a property listing enables you to store custom information, like customer details or internal IDs from your application. + */ custom_metadata?: Record | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the property listing. + */ property_listing_key?: string | undefined }> | undefined + /** + * List of reservations. + */ reservations?: | Array<{ + /** + * Building keys associated with the access grant. + */ building_keys?: Array | undefined + /** + * Common area keys associated with the access grant. + */ common_area_keys?: Array | undefined + /** + * Set key:value pairs for filtering reservations by custom criteria. + */ custom_metadata?: Record | undefined + /** + * Ending date and time for the access grant. + */ ends_at?: string | undefined + /** + * Facility keys associated with the access grant. + */ facility_keys?: Array | undefined + /** + * Guest key associated with the access grant. + */ guest_key?: string | undefined + /** + * Listing keys associated with the access grant. + */ listing_keys?: Array | undefined + /** + * Your name for this access grant resource. + */ name?: string | undefined + /** + * Preferred PIN code to use when creating access for this reservation. + */ preferred_code?: string | undefined + /** + * Property keys associated with the access grant. + */ property_keys?: Array | undefined + /** + * Your unique identifier for the reservation. + */ reservation_key?: string | undefined + /** + * Resident key associated with the access grant. + */ resident_key?: string | undefined + /** + * Room keys associated with the access grant. + */ room_keys?: Array | undefined + /** + * Space keys associated with the access grant. + */ space_keys?: Array | undefined + /** + * Starting date and time for the access grant. + */ starts_at?: string | undefined + /** + * Tenant key associated with the access grant. + */ tenant_key?: string | undefined + /** + * Unit keys associated with the access grant. + */ unit_keys?: Array | undefined + /** + * User identity key associated with the access grant. + */ user_identity_key?: string | undefined + /** + * User key associated with the access grant. + */ user_key?: string | undefined }> | undefined + /** + * List of residents. + */ residents?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the resident. + */ resident_key?: string | undefined }> | undefined + /** + * List of hotel or hospitality rooms. + */ rooms?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined + /** + * Your unique identifier for the room. + */ room_key?: string | undefined }> | undefined + /** + * List of general sites or areas. + */ sites?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ site_key?: string | undefined }> | undefined + /** + * List of general spaces or areas. + */ spaces?: | Array<{ + /** + * Reservation/stay-related defaults for the space (time zone, default check-in/out times, address). + */ customer_data?: | { + /** + * Postal address for the space. + */ address?: string | undefined + /** + * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkin_time?: string | undefined + /** + * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkout_time?: string | undefined + /** + * IANA time zone for the space, e.g. America/Los_Angeles. + */ time_zone?: string | undefined } | undefined + /** + * Default duration of this space in minutes, when the space represents a fixed-length bookable slot (e.g. an appointment type). Used to interpret reservations booked against this space. + */ duration_minutes?: number | undefined + /** + * Geographic coordinates (latitude and longitude) of the space. + */ geolocation?: | { + /** + * Latitude of the space, in decimal degrees. + */ latitude?: number | undefined + /** + * Longitude of the space, in decimal degrees. + */ longitude?: number | undefined } | undefined + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined + /** + * Your unique identifier for the space. + */ space_key?: string | undefined }> | undefined + /** + * List of staff members. + */ staff_members?: | Array<{ + /** + * List of unique identifiers for the buildings the staff member is associated with. + */ building_keys?: Array | undefined + /** + * List of unique identifiers for the common areas the staff member is associated with. + */ common_area_keys?: Array | undefined + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * List of unique identifiers for the facilities the staff member is associated with. + */ facility_keys?: Array | undefined + /** + * List of unique identifiers for the listings the staff member is associated with. + */ listing_keys?: Array | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * List of unique identifiers for the properties the staff member is associated with. + */ property_keys?: Array | undefined + /** + * List of unique identifiers for the property listings the staff member is associated with. + */ property_listing_keys?: Array | undefined + /** + * List of unique identifiers for the rooms the staff member is associated with. + */ room_keys?: Array | undefined + /** + * List of unique identifiers for the sites the staff member is associated with. + */ site_keys?: Array | undefined + /** + * List of unique identifiers for the spaces the staff member is associated with. + */ space_keys?: Array | undefined + /** + * Your unique identifier for the staff. + */ staff_member_key?: string | undefined + /** + * List of unique identifiers for the units the staff member is associated with. + */ unit_keys?: Array | undefined }> | undefined + /** + * List of tenants. + */ tenants?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the tenant. + */ tenant_key?: string | undefined }> | undefined + /** + * List of multi-family residential units. + */ units?: | Array<{ + /** + * Your display name for this location resource. + */ name?: string | undefined + /** + * Your unique identifier for the site. + */ parent_site_key?: string | undefined + /** + * Your unique identifier for the unit. + */ unit_key?: string | undefined }> | undefined + /** + * List of user identities. + */ user_identities?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the user identity. + */ user_identity_key?: string | undefined }> | undefined + /** + * List of users. + */ users?: | Array<{ + /** + * Email address associated with the user identity. + */ email_address?: string | undefined + /** + * Your display name for this user identity resource. + */ name?: string | undefined + /** + * Phone number associated with the user identity. + */ phone_number?: string | undefined + /** + * Your unique identifier for the user. + */ user_key?: string | undefined }> | undefined diff --git a/src/lib/seam/connect/routes/devices/devices.ts b/src/lib/seam/connect/routes/devices/devices.ts index ae8e001e..d260c7d0 100644 --- a/src/lib/seam/connect/routes/devices/devices.ts +++ b/src/lib/seam/connect/routes/devices/devices.ts @@ -173,6 +173,11 @@ export class SeamHttpDevices { return SeamHttpDevicesUnmanaged.fromClient(this.client, this.defaults) } + /** + * Returns a specified [device](https://docs.seam.co/core-concepts/devices). + * + * You must specify either `device_id` or `name`. + */ get( parameters?: DevicesGetParameters, options: DevicesGetOptions = {}, @@ -186,6 +191,9 @@ export class SeamHttpDevices { }) } + /** + * Returns a list of all [devices](https://docs.seam.co/core-concepts/devices). + */ list( parameters?: DevicesListParameters, options: DevicesListOptions = {}, @@ -199,6 +207,13 @@ export class SeamHttpDevices { }) } + /** + * Returns a list of all device providers. + * + * The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. + * + * When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + */ listDeviceProviders( parameters?: DevicesListDeviceProvidersParameters, options: DevicesListDeviceProvidersOptions = {}, @@ -212,6 +227,9 @@ export class SeamHttpDevices { }) } + /** + * Updates provider-specific metadata for devices. + */ reportProviderMetadata( parameters: DevicesReportProviderMetadataParameters, options: DevicesReportProviderMetadataOptions = {}, @@ -225,6 +243,11 @@ export class SeamHttpDevices { }) } + /** + * Updates a specified [device](https://docs.seam.co/core-concepts/devices). + * + * You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + */ update( parameters: DevicesUpdateParameters, options: DevicesUpdateOptions = {}, @@ -240,7 +263,13 @@ export class SeamHttpDevices { } export type DevicesGetParameters = { + /** + * ID of the device that you want to get. + */ device_id?: string | undefined + /** + * Name of the device that you want to get. + */ name?: string | undefined } @@ -254,13 +283,37 @@ export type DevicesGetRequest = SeamHttpRequest export interface DevicesGetOptions {} export type DevicesListParameters = { + /** + * ID of the Connect Webview for which you want to list devices. + */ connect_webview_id?: string | undefined + /** + * ID of the connected account for which you want to list devices. + */ connected_account_id?: string | undefined + /** + * Array of IDs of the connected accounts for which you want to list devices. + */ connected_account_ids?: Array | undefined + /** + * Timestamp by which to limit returned devices. Returns devices created before this timestamp. + */ created_before?: string | undefined + /** + * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. + */ custom_metadata_has?: Record | undefined + /** + * Customer key for which you want to list devices. + */ customer_key?: string | undefined + /** + * Array of device IDs for which you want to list devices. + */ device_ids?: Array | undefined + /** + * Device type for which you want to list devices. + */ device_type?: | 'akuvox_lock' | 'august_lock' @@ -305,6 +358,9 @@ export type DevicesListParameters = { | 'android_phone' | 'ring_camera' | undefined + /** + * Array of device types for which you want to list devices. + */ device_types?: | Array< | 'akuvox_lock' @@ -351,7 +407,13 @@ export type DevicesListParameters = { | 'ring_camera' > | undefined + /** + * Numerical limit on the number of devices to return. + */ limit?: number | undefined + /** + * Manufacturer for which you want to list devices. + */ manufacturer?: | 'akuvox' | 'august' @@ -405,10 +467,25 @@ export type DevicesListParameters = { | 'kisi' | 'slack' | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + */ search?: string | undefined + /** + * ID of the space for which you want to list devices. + */ space_id?: string | undefined + /** + * @deprecated Use `space_id`. + */ unstable_location_id?: string | undefined + /** + * Your own internal user ID for the user for which you want to list devices. + */ user_identifier_key?: string | undefined } @@ -422,6 +499,9 @@ export type DevicesListRequest = SeamHttpRequest export interface DevicesListOptions {} export type DevicesListDeviceProvidersParameters = { + /** + * Category for which you want to list providers. + */ provider_category?: | 'stable' | 'consumer_smartlocks' @@ -449,10 +529,22 @@ export type DevicesListDeviceProvidersRequest = SeamHttpRequest< export interface DevicesListDeviceProvidersOptions {} export type DevicesReportProviderMetadataParameters = { + /** + * Array of devices with provider metadata to update + */ devices: Array<{ + /** + * ID of the device to update + */ device_id?: string | undefined + /** + * Omnitec-specific metadata to update + */ omnitec_metadata?: | { + /** + * IANA timezone for the Omnitec device + */ time_zone?: | 'Africa/Abidjan' | 'Africa/Accra' @@ -886,8 +978,14 @@ export type DevicesReportProviderMetadataParameters = { | undefined } | undefined + /** + * Schlage-specific metadata to update + */ schlage_metadata?: | { + /** + * IANA timezone for the Schlage device + */ time_zone?: | 'Africa/Abidjan' | 'Africa/Accra' @@ -1321,8 +1419,14 @@ export type DevicesReportProviderMetadataParameters = { | undefined } | undefined + /** + * Ultraloq-specific metadata to update + */ ultraloq_metadata?: | { + /** + * IANA timezone for the Ultraloq device + */ time_zone?: | 'Africa/Abidjan' | 'Africa/Accra' @@ -1772,14 +1876,33 @@ export type DevicesReportProviderMetadataRequest = SeamHttpRequest< export interface DevicesReportProviderMetadataOptions {} export type DevicesUpdateParameters = { + /** + * Indicates whether the device's [backup access code pool](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes) is enabled. Set to `false` to disable the pool: Seam stops refilling it and removes any backup codes that have not yet been pulled into active use. + */ backup_access_code_pool_enabled?: boolean | undefined + /** + * Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. [Adding custom metadata to a device](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) enables you to store custom information, like customer details or internal IDs from your application. Then, you can [filter devices by the desired metadata](https://docs.seam.co/core-concepts/devices/filtering-devices-by-custom-metadata). + */ custom_metadata?: Record | undefined + /** + * ID of the device that you want to update. + */ device_id: string + /** + * Indicates whether the device is managed. To unmanage a device, set `is_managed` to `false`. + */ is_managed?: boolean | undefined + /** + * Name for the device. + */ name?: string | undefined + properties?: | { + /** + * Name for the device. + */ name?: string | undefined } | undefined diff --git a/src/lib/seam/connect/routes/devices/simulate/simulate.ts b/src/lib/seam/connect/routes/devices/simulate/simulate.ts index 30845447..6b43f886 100644 --- a/src/lib/seam/connect/routes/devices/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/devices/simulate/simulate.ts @@ -160,6 +160,9 @@ export class SeamHttpDevicesSimulate { await clientSessions.get() } + /** + * Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + */ connect( parameters: DevicesSimulateConnectParameters, options: DevicesSimulateConnectOptions = {}, @@ -173,6 +176,12 @@ export class SeamHttpDevicesSimulate { }) } + /** + * Simulates bringing the Wi‑Fi hub (bridge) back online for a device. + * Only applicable for sandbox workspaces and currently + * implemented for August and TTLock locks. + * This will clear the `hub_disconnected` error on the device. + */ connectToHub( parameters: DevicesSimulateConnectToHubParameters, options: DevicesSimulateConnectToHubOptions = {}, @@ -186,6 +195,9 @@ export class SeamHttpDevicesSimulate { }) } + /** + * Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + */ disconnect( parameters: DevicesSimulateDisconnectParameters, options: DevicesSimulateDisconnectOptions = {}, @@ -199,6 +211,13 @@ export class SeamHttpDevicesSimulate { }) } + /** + * Simulates taking the Wi‑Fi hub (bridge) offline for a device. + * Only applicable for sandbox workspaces and currently + * implemented for August, TTLock, and IglooHome devices. + * This will set the `hub_disconnected` error on the device, or mark the + * IglooHome bridge offline in sandbox. + */ disconnectFromHub( parameters: DevicesSimulateDisconnectFromHubParameters, options: DevicesSimulateDisconnectFromHubOptions = {}, @@ -212,6 +231,11 @@ export class SeamHttpDevicesSimulate { }) } + /** + * Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). + * Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. + * The actual device error is created/cleared by the poller after this state change. + */ paidSubscription( parameters: DevicesSimulatePaidSubscriptionParameters, options: DevicesSimulatePaidSubscriptionOptions = {}, @@ -225,6 +249,9 @@ export class SeamHttpDevicesSimulate { }) } + /** + * Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + */ remove( parameters: DevicesSimulateRemoveParameters, options: DevicesSimulateRemoveOptions = {}, @@ -240,6 +267,9 @@ export class SeamHttpDevicesSimulate { } export type DevicesSimulateConnectParameters = { + /** + * ID of the device that you want to simulate connecting to Seam. + */ device_id: string } @@ -253,6 +283,9 @@ export type DevicesSimulateConnectRequest = SeamHttpRequest export interface DevicesSimulateConnectOptions {} export type DevicesSimulateConnectToHubParameters = { + /** + * ID of the device whose hub you want to reconnect. + */ device_id: string } @@ -269,6 +302,9 @@ export type DevicesSimulateConnectToHubRequest = SeamHttpRequest< export interface DevicesSimulateConnectToHubOptions {} export type DevicesSimulateDisconnectParameters = { + /** + * ID of the device that you want to simulate disconnecting from Seam. + */ device_id: string } @@ -282,6 +318,9 @@ export type DevicesSimulateDisconnectRequest = SeamHttpRequest export interface DevicesSimulateDisconnectOptions {} export type DevicesSimulateDisconnectFromHubParameters = { + /** + * ID of the device whose hub you want to disconnect. + */ device_id: string } @@ -316,6 +355,9 @@ export type DevicesSimulatePaidSubscriptionRequest = SeamHttpRequest< export interface DevicesSimulatePaidSubscriptionOptions {} export type DevicesSimulateRemoveParameters = { + /** + * ID of the device that you want to simulate removing from Seam. + */ device_id: string } diff --git a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts index de5c6341..7a61b85f 100644 --- a/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts @@ -161,6 +161,13 @@ export class SeamHttpDevicesUnmanaged { await clientSessions.get() } + /** + * Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + * + * An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + * + * You must specify either `device_id` or `name`. + */ get( parameters?: DevicesUnmanagedGetParameters, options: DevicesUnmanagedGetOptions = {}, @@ -174,6 +181,11 @@ export class SeamHttpDevicesUnmanaged { }) } + /** + * Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + * + * An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + */ list( parameters?: DevicesUnmanagedListParameters, options: DevicesUnmanagedListOptions = {}, @@ -187,6 +199,11 @@ export class SeamHttpDevicesUnmanaged { }) } + /** + * Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. + * + * An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + */ update( parameters: DevicesUnmanagedUpdateParameters, options: DevicesUnmanagedUpdateOptions = {}, @@ -202,7 +219,13 @@ export class SeamHttpDevicesUnmanaged { } export type DevicesUnmanagedGetParameters = { + /** + * ID of the unmanaged device that you want to get. + */ device_id?: string | undefined + /** + * Name of the unmanaged device that you want to get. + */ name?: string | undefined } @@ -219,13 +242,37 @@ export type DevicesUnmanagedGetRequest = SeamHttpRequest< export interface DevicesUnmanagedGetOptions {} export type DevicesUnmanagedListParameters = { + /** + * ID of the Connect Webview for which you want to list devices. + */ connect_webview_id?: string | undefined + /** + * ID of the connected account for which you want to list devices. + */ connected_account_id?: string | undefined + /** + * Array of IDs of the connected accounts for which you want to list devices. + */ connected_account_ids?: Array | undefined + /** + * Timestamp by which to limit returned devices. Returns devices created before this timestamp. + */ created_before?: string | undefined + /** + * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. + */ custom_metadata_has?: Record | undefined + /** + * Customer key for which you want to list devices. + */ customer_key?: string | undefined + /** + * Array of device IDs for which you want to list devices. + */ device_ids?: Array | undefined + /** + * Device type for which you want to list devices. + */ device_type?: | 'akuvox_lock' | 'august_lock' @@ -270,6 +317,9 @@ export type DevicesUnmanagedListParameters = { | 'android_phone' | 'ring_camera' | undefined + /** + * Array of device types for which you want to list devices. + */ device_types?: | Array< | 'akuvox_lock' @@ -316,7 +366,13 @@ export type DevicesUnmanagedListParameters = { | 'ring_camera' > | undefined + /** + * Numerical limit on the number of devices to return. + */ limit?: number | undefined + /** + * Manufacturer for which you want to list devices. + */ manufacturer?: | 'akuvox' | 'august' @@ -370,10 +426,25 @@ export type DevicesUnmanagedListParameters = { | 'kisi' | 'slack' | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + */ search?: string | undefined + /** + * ID of the space for which you want to list devices. + */ space_id?: string | undefined + /** + * @deprecated Use `space_id`. + */ unstable_location_id?: string | undefined + /** + * Your own internal user ID for the user for which you want to list devices. + */ user_identifier_key?: string | undefined } @@ -390,9 +461,18 @@ export type DevicesUnmanagedListRequest = SeamHttpRequest< export interface DevicesUnmanagedListOptions {} export type DevicesUnmanagedUpdateParameters = { + /** + * Custom metadata that you want to associate with the device. Supports up to 50 JSON key:value pairs. + */ custom_metadata?: Record | undefined + /** + * ID of the unmanaged device that you want to update. + */ device_id: string + /** + * Indicates whether the device is managed. Set this parameter to `true` to convert an unmanaged device to managed. + */ is_managed?: boolean | undefined } diff --git a/src/lib/seam/connect/routes/events/events.ts b/src/lib/seam/connect/routes/events/events.ts index 1e7be7e5..1d13e345 100644 --- a/src/lib/seam/connect/routes/events/events.ts +++ b/src/lib/seam/connect/routes/events/events.ts @@ -161,6 +161,9 @@ export class SeamHttpEvents { await clientSessions.get() } + /** + * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place. + */ get( parameters?: EventsGetParameters, options: EventsGetOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpEvents { }) } + /** + * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place. + */ list( parameters?: EventsListParameters, options: EventsListOptions = {}, @@ -189,8 +195,17 @@ export class SeamHttpEvents { } export type EventsGetParameters = { + /** + * Unique identifier for the device that triggered the event that you want to get. + */ device_id?: string | undefined + /** + * Unique identifier for the event that you want to get. + */ event_id?: string | undefined + /** + * Type of the event that you want to get. + */ event_type?: string | undefined } @@ -204,26 +219,89 @@ export type EventsGetRequest = SeamHttpRequest export interface EventsGetOptions {} export type EventsListParameters = { + /** + * ID of the access code for which you want to list events. + */ access_code_id?: string | undefined + /** + * IDs of the access codes for which you want to list events. + */ access_code_ids?: Array | undefined + /** + * ID of the access grant for which you want to list events. + */ access_grant_id?: string | undefined + /** + * IDs of the access grants for which you want to list events. + */ access_grant_ids?: Array | undefined + /** + * ID of the access method for which you want to list events. + */ access_method_id?: string | undefined + /** + * IDs of the access methods for which you want to list events. + */ access_method_ids?: Array | undefined + /** + * ID of the ACS access group for which you want to list events. + */ acs_access_group_id?: string | undefined + /** + * ID of the ACS credential for which you want to list events. + */ acs_credential_id?: string | undefined + /** + * ID of the ACS encoder for which you want to list events. + */ acs_encoder_id?: string | undefined + /** + * ID of the ACS entrance for which you want to list events. + */ acs_entrance_id?: string | undefined + /** + * ID of the access system for which you want to list events. + */ acs_system_id?: string | undefined + /** + * IDs of the access systems for which you want to list events. + */ acs_system_ids?: Array | undefined + /** + * ID of the ACS user for which you want to list events. + */ acs_user_id?: string | undefined + /** + * Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. + */ between?: Array<{}> | undefined + /** + * ID of the Connect Webview for which you want to list events. + */ connect_webview_id?: string | undefined + /** + * ID of the connected account for which you want to list events. + */ connected_account_id?: string | undefined + /** + * Customer key for which you want to list events. + */ customer_key?: string | undefined + /** + * ID of the device for which you want to list events. + */ device_id?: string | undefined + /** + * IDs of the devices for which you want to list events. + */ device_ids?: Array | undefined + /** + * IDs of the events that you want to list. + */ event_ids?: Array | undefined + /** + * Type of the events that you want to list. + */ event_type?: | 'access_code.created' | 'access_code.changed' @@ -335,6 +413,9 @@ export type EventsListParameters = { | 'space.created' | 'space.deleted' | undefined + /** + * Types of the events that you want to list. + */ event_types?: | Array< | 'access_code.created' @@ -448,11 +529,29 @@ export type EventsListParameters = { | 'space.deleted' > | undefined + /** + * Numerical limit on the number of events to return. + */ limit?: number | undefined + /** + * Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`. + */ since?: string | undefined + /** + * ID of the space for which you want to list events. + */ space_id?: string | undefined + /** + * IDs of the spaces for which you want to list events. + */ space_ids?: Array | undefined + /** + * Offset for the events that you want to list. + */ unstable_offset?: number | undefined + /** + * ID of the user identity for which you want to list events. + */ user_identity_id?: string | undefined } 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 8b11fbd1..baad8292 100644 --- a/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +++ b/src/lib/seam/connect/routes/instant-keys/instant-keys.ts @@ -161,6 +161,9 @@ export class SeamHttpInstantKeys { await clientSessions.get() } + /** + * Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys). + */ delete( parameters: InstantKeysDeleteParameters, options: InstantKeysDeleteOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpInstantKeys { }) } + /** + * Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys). + */ get( parameters?: InstantKeysGetParameters, options: InstantKeysGetOptions = {}, @@ -187,6 +193,9 @@ export class SeamHttpInstantKeys { }) } + /** + * Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys). + */ list( parameters?: InstantKeysListParameters, options: InstantKeysListOptions = {}, @@ -202,6 +211,9 @@ export class SeamHttpInstantKeys { } export type InstantKeysDeleteParameters = { + /** + * ID of the Instant Key that you want to delete. + */ instant_key_id: string } @@ -215,7 +227,13 @@ export type InstantKeysDeleteRequest = SeamHttpRequest export interface InstantKeysDeleteOptions {} export type InstantKeysGetParameters = { + /** + * ID of the instant key to get. + */ instant_key_id?: string | undefined + /** + * URL of the instant key to get. + */ instant_key_url?: string | undefined } @@ -232,6 +250,9 @@ export type InstantKeysGetRequest = SeamHttpRequest< export interface InstantKeysGetOptions {} export type InstantKeysListParameters = { + /** + * ID of the user identity by which you want to filter the list of Instant Keys. + */ user_identity_id?: string | undefined } diff --git a/src/lib/seam/connect/routes/locks/locks.ts b/src/lib/seam/connect/routes/locks/locks.ts index 2cdc07b6..c75918ae 100644 --- a/src/lib/seam/connect/routes/locks/locks.ts +++ b/src/lib/seam/connect/routes/locks/locks.ts @@ -168,6 +168,9 @@ export class SeamHttpLocks { return SeamHttpLocksSimulate.fromClient(this.client, this.defaults) } + /** + * Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). + */ configureAutoLock( parameters: LocksConfigureAutoLockParameters, options: LocksConfigureAutoLockOptions = {}, @@ -181,6 +184,10 @@ export class SeamHttpLocks { }) } + /** + * Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). + * @deprecated Use `/devices/get` instead. + */ get( parameters?: LocksGetParameters, options: LocksGetOptions = {}, @@ -194,6 +201,9 @@ export class SeamHttpLocks { }) } + /** + * Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks). + */ list( parameters?: LocksListParameters, options: LocksListOptions = {}, @@ -207,6 +217,9 @@ export class SeamHttpLocks { }) } + /** + * Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). + */ lockDoor( parameters: LocksLockDoorParameters, options: LocksLockDoorOptions = {}, @@ -220,6 +233,9 @@ export class SeamHttpLocks { }) } + /** + * Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). + */ unlockDoor( parameters: LocksUnlockDoorParameters, options: LocksUnlockDoorOptions = {}, @@ -235,9 +251,18 @@ export class SeamHttpLocks { } export type LocksConfigureAutoLockParameters = { + /** + * Delay in seconds before the lock automatically locks. Required when enabling auto-lock. Must be between 1 and 60. + */ auto_lock_delay_seconds?: number | undefined + /** + * Whether to enable or disable auto-lock. + */ auto_lock_enabled: boolean + /** + * ID of the lock for which you want to configure the auto-lock. + */ device_id: string } @@ -257,7 +282,13 @@ export type LocksConfigureAutoLockOptions = Pick< > export type LocksGetParameters = { + /** + * ID of the lock that you want to get. + */ device_id?: string | undefined + /** + * Name of the lock that you want to get. + */ name?: string | undefined } @@ -271,13 +302,37 @@ export type LocksGetRequest = SeamHttpRequest export interface LocksGetOptions {} export type LocksListParameters = { + /** + * ID of the Connect Webview for which you want to list devices. + */ connect_webview_id?: string | undefined + /** + * ID of the connected account for which you want to list devices. + */ connected_account_id?: string | undefined + /** + * Array of IDs of the connected accounts for which you want to list devices. + */ connected_account_ids?: Array | undefined + /** + * Timestamp by which to limit returned devices. Returns devices created before this timestamp. + */ created_before?: string | undefined + /** + * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. + */ custom_metadata_has?: Record | undefined + /** + * Customer key for which you want to list devices. + */ customer_key?: string | undefined + /** + * Array of device IDs for which you want to list devices. + */ device_ids?: Array | undefined + /** + * Device type of the locks that you want to list. + */ device_type?: | 'akuvox_lock' | 'august_lock' @@ -310,6 +365,9 @@ export type LocksListParameters = { | 'kisi_lock' | 'aqara_lock' | undefined + /** + * Device types of the locks that you want to list. + */ device_types?: | Array< | 'akuvox_lock' @@ -344,7 +402,13 @@ export type LocksListParameters = { | 'aqara_lock' > | undefined + /** + * Numerical limit on the number of devices to return. + */ limit?: number | undefined + /** + * Manufacturer of the locks that you want to list. + */ manufacturer?: | 'akuvox' | 'august' @@ -379,10 +443,25 @@ export type LocksListParameters = { | 'omnitec' | 'kisi' | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + */ search?: string | undefined + /** + * ID of the space for which you want to list devices. + */ space_id?: string | undefined + /** + * @deprecated Use `space_id`. + */ unstable_location_id?: string | undefined + /** + * Your own internal user ID for the user for which you want to list devices. + */ user_identifier_key?: string | undefined } @@ -396,6 +475,9 @@ export type LocksListRequest = SeamHttpRequest export interface LocksListOptions {} export type LocksLockDoorParameters = { + /** + * ID of the lock that you want to lock. + */ device_id: string } @@ -415,6 +497,9 @@ export type LocksLockDoorOptions = Pick< > export type LocksUnlockDoorParameters = { + /** + * ID of the lock that you want to unlock. + */ device_id: string } diff --git a/src/lib/seam/connect/routes/locks/simulate/simulate.ts b/src/lib/seam/connect/routes/locks/simulate/simulate.ts index ced2a8f4..34210e47 100644 --- a/src/lib/seam/connect/routes/locks/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/locks/simulate/simulate.ts @@ -161,6 +161,9 @@ export class SeamHttpLocksSimulate { await clientSessions.get() } + /** + * Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ keypadCodeEntry( parameters: LocksSimulateKeypadCodeEntryParameters, options: LocksSimulateKeypadCodeEntryOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpLocksSimulate { }) } + /** + * Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ manualLockViaKeypad( parameters: LocksSimulateManualLockViaKeypadParameters, options: LocksSimulateManualLockViaKeypadOptions = {}, @@ -189,8 +195,14 @@ export class SeamHttpLocksSimulate { } export type LocksSimulateKeypadCodeEntryParameters = { + /** + * Code that you want to simulate entering on a keypad. + */ code: string + /** + * ID of the device for which you want to simulate a keypad code entry. + */ device_id: string } @@ -212,6 +224,9 @@ export type LocksSimulateKeypadCodeEntryOptions = Pick< > export type LocksSimulateManualLockViaKeypadParameters = { + /** + * ID of the device for which you want to simulate a manual lock action using a keypad. + */ device_id: string } 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 e0db3dff..976fd376 100644 --- a/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts +++ b/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts @@ -175,6 +175,9 @@ export class SeamHttpNoiseSensors { return SeamHttpNoiseSensorsSimulate.fromClient(this.client, this.defaults) } + /** + * Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors). + */ list( parameters?: NoiseSensorsListParameters, options: NoiseSensorsListOptions = {}, @@ -190,21 +193,69 @@ export class SeamHttpNoiseSensors { } export type NoiseSensorsListParameters = { + /** + * ID of the Connect Webview for which you want to list devices. + */ connect_webview_id?: string | undefined + /** + * ID of the connected account for which you want to list devices. + */ connected_account_id?: string | undefined + /** + * Array of IDs of the connected accounts for which you want to list devices. + */ connected_account_ids?: Array | undefined + /** + * Timestamp by which to limit returned devices. Returns devices created before this timestamp. + */ created_before?: string | undefined + /** + * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. + */ custom_metadata_has?: Record | undefined + /** + * Customer key for which you want to list devices. + */ customer_key?: string | undefined + /** + * Array of device IDs for which you want to list devices. + */ device_ids?: Array | undefined + /** + * Device type of the noise sensors that you want to list. + */ device_type?: 'noiseaware_activity_zone' | 'minut_sensor' | undefined + /** + * Device types of the noise sensors that you want to list. + */ device_types?: Array<'noiseaware_activity_zone' | 'minut_sensor'> | undefined + /** + * Numerical limit on the number of devices to return. + */ limit?: number | undefined + /** + * Manufacturers of the noise sensors that you want to list. + */ manufacturer?: 'minut' | 'noiseaware' | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + */ search?: string | undefined + /** + * ID of the space for which you want to list devices. + */ space_id?: string | undefined + /** + * @deprecated Use `space_id`. + */ unstable_location_id?: string | undefined + /** + * Your own internal user ID for the user for which you want to list devices. + */ user_identifier_key?: string | undefined } diff --git a/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts b/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts index 843151c3..944fa4d6 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 @@ -164,6 +164,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { await clientSessions.get() } + /** + * Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + */ create( parameters: NoiseSensorsNoiseThresholdsCreateParameters, options: NoiseSensorsNoiseThresholdsCreateOptions = {}, @@ -177,6 +180,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { }) } + /** + * Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ delete( parameters: NoiseSensorsNoiseThresholdsDeleteParameters, options: NoiseSensorsNoiseThresholdsDeleteOptions = {}, @@ -190,6 +196,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { }) } + /** + * Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ get( parameters: NoiseSensorsNoiseThresholdsGetParameters, options: NoiseSensorsNoiseThresholdsGetOptions = {}, @@ -203,6 +212,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { }) } + /** + * Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ list( parameters: NoiseSensorsNoiseThresholdsListParameters, options: NoiseSensorsNoiseThresholdsListOptions = {}, @@ -216,6 +228,9 @@ export class SeamHttpNoiseSensorsNoiseThresholds { }) } + /** + * Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ update( parameters: NoiseSensorsNoiseThresholdsUpdateParameters, options: NoiseSensorsNoiseThresholdsUpdateOptions = {}, @@ -231,13 +246,31 @@ export class SeamHttpNoiseSensorsNoiseThresholds { } export type NoiseSensorsNoiseThresholdsCreateParameters = { + /** + * ID of the device for which you want to create a noise threshold. + */ device_id: string + /** + * Time at which the new noise threshold should become inactive daily. + */ ends_daily_at: string + /** + * Name of the new noise threshold. + */ name?: string | undefined + /** + * Noise level in decibels for the new noise threshold. + */ noise_threshold_decibels?: number | undefined + /** + * Noise level in Noiseaware Noise Risk Score (NRS) for the new noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). + */ noise_threshold_nrs?: number | undefined + /** + * Time at which the new noise threshold should become active daily. + */ starts_daily_at: string } @@ -256,8 +289,14 @@ export type NoiseSensorsNoiseThresholdsCreateRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsCreateOptions {} export type NoiseSensorsNoiseThresholdsDeleteParameters = { + /** + * ID of the device that contains the noise threshold that you want to delete. + */ device_id: string + /** + * ID of the noise threshold that you want to delete. + */ noise_threshold_id: string } @@ -274,6 +313,9 @@ export type NoiseSensorsNoiseThresholdsDeleteRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsDeleteOptions {} export type NoiseSensorsNoiseThresholdsGetParameters = { + /** + * ID of the noise threshold that you want to get. + */ noise_threshold_id: string } @@ -292,6 +334,9 @@ export type NoiseSensorsNoiseThresholdsGetRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsGetOptions {} export type NoiseSensorsNoiseThresholdsListParameters = { + /** + * ID of the device for which you want to list noise thresholds. + */ device_id: string } @@ -310,14 +355,35 @@ export type NoiseSensorsNoiseThresholdsListRequest = SeamHttpRequest< export interface NoiseSensorsNoiseThresholdsListOptions {} export type NoiseSensorsNoiseThresholdsUpdateParameters = { + /** + * ID of the device that contains the noise threshold that you want to update. + */ device_id: string + /** + * Time at which the noise threshold should become inactive daily. + */ ends_daily_at?: string | undefined + /** + * Name of the noise threshold that you want to update. + */ name?: string | undefined + /** + * Noise level in decibels for the noise threshold. + */ noise_threshold_decibels?: number | undefined + /** + * ID of the noise threshold that you want to update. + */ noise_threshold_id: string + /** + * Noise level in Noiseaware Noise Risk Score (NRS) for the noise threshold. This parameter is only relevant for [Noiseaware sensors](https://docs.seam.co/device-and-system-integration-guides/noiseaware-sensors). + */ noise_threshold_nrs?: number | undefined + /** + * Time at which the noise threshold should become active daily. + */ starts_daily_at?: string | undefined } 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 26fd8c68..eb8af886 100644 --- a/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts @@ -160,6 +160,9 @@ export class SeamHttpNoiseSensorsSimulate { await clientSessions.get() } + /** + * Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ triggerNoiseThreshold( parameters: NoiseSensorsSimulateTriggerNoiseThresholdParameters, options: NoiseSensorsSimulateTriggerNoiseThresholdOptions = {}, @@ -175,6 +178,9 @@ export class SeamHttpNoiseSensorsSimulate { } export type NoiseSensorsSimulateTriggerNoiseThresholdParameters = { + /** + * ID of the device for which you want to simulate the triggering of a noise threshold. + */ device_id: string } diff --git a/src/lib/seam/connect/routes/phones/phones.ts b/src/lib/seam/connect/routes/phones/phones.ts index 875e8552..a42467a6 100644 --- a/src/lib/seam/connect/routes/phones/phones.ts +++ b/src/lib/seam/connect/routes/phones/phones.ts @@ -167,6 +167,9 @@ export class SeamHttpPhones { return SeamHttpPhonesSimulate.fromClient(this.client, this.defaults) } + /** + * Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). + */ deactivate( parameters: PhonesDeactivateParameters, options: PhonesDeactivateOptions = {}, @@ -180,6 +183,9 @@ export class SeamHttpPhones { }) } + /** + * Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). + */ get( parameters: PhonesGetParameters, options: PhonesGetOptions = {}, @@ -193,6 +199,9 @@ export class SeamHttpPhones { }) } + /** + * Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. + */ list( parameters?: PhonesListParameters, options: PhonesListOptions = {}, @@ -208,6 +217,9 @@ export class SeamHttpPhones { } export type PhonesDeactivateParameters = { + /** + * Device ID of the phone that you want to deactivate. + */ device_id: string } @@ -221,6 +233,9 @@ export type PhonesDeactivateRequest = SeamHttpRequest export interface PhonesDeactivateOptions {} export type PhonesGetParameters = { + /** + * Device ID of the phone that you want to get. + */ device_id: string } @@ -234,7 +249,13 @@ export type PhonesGetRequest = SeamHttpRequest export interface PhonesGetOptions {} export type PhonesListParameters = { + /** + * ID of the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) by which you want to filter the list of returned phones. + */ acs_credential_id?: string | undefined + /** + * ID of the user identity that represents the owner by which you want to filter the list of returned phones. + */ owner_user_identity_id?: string | undefined } diff --git a/src/lib/seam/connect/routes/phones/simulate/simulate.ts b/src/lib/seam/connect/routes/phones/simulate/simulate.ts index dff90df2..bdd76f9f 100644 --- a/src/lib/seam/connect/routes/phones/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/phones/simulate/simulate.ts @@ -161,6 +161,9 @@ export class SeamHttpPhonesSimulate { await clientSessions.get() } + /** + * Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). + */ createSandboxPhone( parameters: PhonesSimulateCreateSandboxPhoneParameters, options: PhonesSimulateCreateSandboxPhoneOptions = {}, @@ -176,25 +179,67 @@ export class SeamHttpPhonesSimulate { } export type PhonesSimulateCreateSandboxPhoneParameters = { + /** + * ASSA ABLOY metadata that you want to associate with the simulated phone. + */ assa_abloy_metadata?: | { + /** + * Application version that you want to use for the simulated phone. + */ application_version?: string | undefined + /** + * Indicates whether the simulated phone should have Bluetooth low energy (BLE) capability. + */ ble_capability?: boolean | undefined + /** + * Indicates whether the simulated phone should have host card emulation (HCE) capability. + */ hce_capability?: boolean | undefined + /** + * Indicates whether the simulated phone should have near-field communication (NFC) capability. + */ nfc_capability?: boolean | undefined + /** + * SEOS applet version that you want to use for the simulated phone. + */ seos_applet_version?: string | undefined + /** + * ID of the SEOS trusted service manager (TSM) endpoint that you want to use for the simulated phone. + */ seos_tsm_endpoint_id?: number | undefined } | undefined + /** + * ID of the custom SDK installation that you want to use for the simulated phone. + */ custom_sdk_installation_id?: string | undefined + /** + * Metadata that you want to associate with the simulated phone. + */ phone_metadata?: | { + /** + * Manufacturer that you want to use for the simulated phone. + */ device_manufacturer?: string | undefined + /** + * Device model that you want to use for the simulated phone. + */ device_model?: string | undefined + /** + * Mobile operating system that you want to use for the simulated phone. + */ operating_system?: 'android' | 'ios' | undefined + /** + * Mobile operating system version that you want to use for the simulated phone. + */ os_version?: string | undefined } | undefined + /** + * ID of the user identity that you want to associate with the simulated phone. + */ user_identity_id: string } diff --git a/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts b/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts index 051026c6..43cecd18 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts @@ -94,6 +94,9 @@ export class SeamHttpEndpointsWithoutWorkspace { return new SeamHttpEndpointsWithoutWorkspace(constructorOptions) } + /** + * Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). + */ get '/workspaces/create'(): ( parameters: WorkspacesCreateParameters, options?: WorkspacesCreateOptions, @@ -107,6 +110,9 @@ export class SeamHttpEndpointsWithoutWorkspace { } } + /** + * Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ get '/workspaces/list'(): ( parameters?: WorkspacesListParameters, options?: WorkspacesListOptions, diff --git a/src/lib/seam/connect/routes/seam-http-endpoints.ts b/src/lib/seam/connect/routes/seam-http-endpoints.ts index 748e476b..4f5d23c0 100644 --- a/src/lib/seam/connect/routes/seam-http-endpoints.ts +++ b/src/lib/seam/connect/routes/seam-http-endpoints.ts @@ -886,6 +886,9 @@ export class SeamHttpEndpoints { await clientSessions.get() } + /** + * Creates a new [access code](https://docs.seam.co/low-level-apis/access-codes). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they work across both standalone smart locks and access control systems and manage the underlying codes for you. Use this low-level endpoint only when you need direct control over a code on a single device, such as setting a custom PIN value. + */ get '/access_codes/create'(): ( parameters: AccessCodesCreateParameters, options?: AccessCodesCreateOptions, @@ -899,6 +902,19 @@ export class SeamHttpEndpoints { } } + /** + * Creates new [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + * + * Users with more than one door lock in a property may want to create groups of linked access codes, all of which have the same code (PIN). For example, a short-term rental host may want to provide guests the same PIN for both a front door lock and a back door lock. + * + * If you specify a custom code, Seam assigns this custom code to each of the resulting access codes. However, in this case, Seam does not link these access codes together with a `common_code_key`. That is, `common_code_key` remains null for these access codes. + * + * If you want to change these access codes that are not linked by a `common_code_key`, you cannot use `/access_codes/update_multiple`. However, you can update each of these access codes individually, using `/access_codes/update`. + * + * See also [Creating and Updating Multiple Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes). + * + * For granting a person access to a space, [Access Grants](https://docs.seam.co/use-cases/granting-access) are the default and recommended approach and work across both standalone smart locks and access systems. Use the lower-level Access Codes API directly only when you specifically need to manage individual PIN codes. + */ get '/access_codes/create_multiple'(): ( parameters: AccessCodesCreateMultipleParameters, options?: AccessCodesCreateMultipleOptions, @@ -912,6 +928,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + */ get '/access_codes/delete'(): ( parameters: AccessCodesDeleteParameters, options?: AccessCodesDeleteOptions, @@ -925,6 +944,9 @@ export class SeamHttpEndpoints { } } + /** + * Generates a code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), given a device ID. + */ get '/access_codes/generate_code'(): ( parameters: AccessCodesGenerateCodeParameters, options?: AccessCodesGenerateCodeOptions, @@ -938,6 +960,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * You must specify either `access_code_id` or both `device_id` and `code`. + */ get '/access_codes/get'(): ( parameters?: AccessCodesGetParameters, options?: AccessCodesGetOptions, @@ -951,6 +978,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`. + */ get '/access_codes/list'(): ( parameters?: AccessCodesListParameters, options?: AccessCodesListOptions, @@ -964,6 +996,17 @@ export class SeamHttpEndpoints { } } + /** + * Retrieves a backup access code for an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). See also [Managing Backup Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/backup-access-codes). + * + * A backup access code pool is a collection of pre-programmed access codes stored on a device, ready for use. These codes are programmed in addition to the regular access codes on Seam, serving as a safety net for any issues with the primary codes. If there's ever a complication with a primary access code—be it due to intermittent connectivity, manual removal from a device, or provider outages—a backup code can be retrieved. Its end time can then be adjusted to align with the original code, facilitating seamless and uninterrupted access. + * + * You can pull a backup access code from the pool at any time. These backup codes are guaranteed to work immediately and automatically programmed to be removed from the device after the access code ends. + * + * You can only pull backup access codes for time-bound access codes. + * + * Before pulling a backup access code, make sure that the device's `properties.supports_backup_access_code_pool` is `true`. Then, to activate the backup pool, set `use_backup_access_code_pool` to `true` when creating an access code. + */ get '/access_codes/pull_backup_access_code'(): ( parameters: AccessCodesPullBackupAccessCodeParameters, options?: AccessCodesPullBackupAccessCodeOptions, @@ -977,6 +1020,11 @@ export class SeamHttpEndpoints { } } + /** + * Enables you to report access code-related constraints for a device. Currently, supports reporting supported code length constraints for SmartThings devices. + * + * Specify either `supported_code_lengths` or `min_code_length`/`max_code_length`. + */ get '/access_codes/report_device_constraints'(): ( parameters: AccessCodesReportDeviceConstraintsParameters, options?: AccessCodesReportDeviceConstraintsOptions, @@ -990,6 +1038,11 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified active or upcoming [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * See also [Modifying Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/modifying-access-codes). + */ get '/access_codes/update'(): ( parameters: AccessCodesUpdateParameters, options?: AccessCodesUpdateOptions, @@ -1003,6 +1056,13 @@ export class SeamHttpEndpoints { } } + /** + * Updates [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes) that share a common code across multiple devices. + * + * Specify the `common_code_key` to identify the set of access codes that you want to update. + * + * See also [Update Linked Access Codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/creating-and-updating-multiple-linked-access-codes#update-linked-access-codes). + */ get '/access_codes/update_multiple'(): ( parameters: AccessCodesUpdateMultipleParameters, options?: AccessCodesUpdateMultipleOptions, @@ -1016,6 +1076,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates the creation of an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/access_codes/simulate/create_unmanaged_access_code'(): ( parameters: AccessCodesSimulateCreateUnmanagedAccessCodeParameters, options?: AccessCodesSimulateCreateUnmanagedAccessCodeOptions, @@ -1031,6 +1094,13 @@ export class SeamHttpEndpoints { } } + /** + * Converts an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) to an [access code managed through Seam](https://docs.seam.co/low-level-apis/smart-locks/access-codes). + * + * An unmanaged access code has a limited set of operations that you can perform on it. Once you convert an unmanaged access code to a managed access code, the full set of access code operations and lifecycle events becomes available for it. + * + * Note that not all device providers support converting an unmanaged access code to a managed access code. + */ get '/access_codes/unmanaged/convert_to_managed'(): ( parameters: AccessCodesUnmanagedConvertToManagedParameters, options?: AccessCodesUnmanagedConvertToManagedOptions, @@ -1044,6 +1114,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes an [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + */ get '/access_codes/unmanaged/delete'(): ( parameters: AccessCodesUnmanagedDeleteParameters, options?: AccessCodesUnmanagedDeleteOptions, @@ -1057,6 +1130,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + * + * You must specify either `access_code_id` or both `device_id` and `code`. + */ get '/access_codes/unmanaged/get'(): ( parameters?: AccessCodesUnmanagedGetParameters, options?: AccessCodesUnmanagedGetOptions, @@ -1070,6 +1148,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [unmanaged access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + */ get '/access_codes/unmanaged/list'(): ( parameters: AccessCodesUnmanagedListParameters, options?: AccessCodesUnmanagedListOptions, @@ -1083,6 +1164,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [unmanaged access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes). + */ get '/access_codes/unmanaged/update'(): ( parameters: AccessCodesUnmanagedUpdateParameters, options?: AccessCodesUnmanagedUpdateOptions, @@ -1096,6 +1180,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [Access Grant](https://docs.seam.co/use-cases/granting-access/access-grants). Access Grants are the default and recommended way to grant a user access to any physical space, irrespective of the locking hardware. They work with both standalone smart locks (using `device_ids`) and access control systems (using `acs_entrance_ids` or `space_ids`), and can issue PIN codes, key cards, and mobile keys through a single request. + */ get '/access_grants/create'(): ( parameters: AccessGrantsCreateParameters, options?: AccessGrantsCreateOptions, @@ -1109,6 +1196,9 @@ export class SeamHttpEndpoints { } } + /** + * Delete an Access Grant. + */ get '/access_grants/delete'(): ( parameters: AccessGrantsDeleteParameters, options?: AccessGrantsDeleteOptions, @@ -1122,6 +1212,9 @@ export class SeamHttpEndpoints { } } + /** + * Get an Access Grant. + */ get '/access_grants/get'(): ( parameters?: AccessGrantsGetParameters, options?: AccessGrantsGetOptions, @@ -1135,6 +1228,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets all related resources for one or more Access Grants. + */ get '/access_grants/get_related'(): ( parameters?: AccessGrantsGetRelatedParameters, options?: AccessGrantsGetRelatedOptions, @@ -1148,6 +1244,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets an Access Grant. + */ get '/access_grants/list'(): ( parameters?: AccessGrantsListParameters, options?: AccessGrantsListOptions, @@ -1161,6 +1260,9 @@ export class SeamHttpEndpoints { } } + /** + * Adds additional requested access methods to an existing Access Grant. + */ get '/access_grants/request_access_methods'(): ( parameters: AccessGrantsRequestAccessMethodsParameters, options?: AccessGrantsRequestAccessMethodsOptions, @@ -1174,6 +1276,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates an existing Access Grant's time window. + */ get '/access_grants/update'(): ( parameters?: AccessGrantsUpdateParameters, options?: AccessGrantsUpdateOptions, @@ -1187,6 +1292,9 @@ export class SeamHttpEndpoints { } } + /** + * Get an unmanaged Access Grant (where is_managed = false). + */ get '/access_grants/unmanaged/get'(): ( parameters: AccessGrantsUnmanagedGetParameters, options?: AccessGrantsUnmanagedGetOptions, @@ -1200,6 +1308,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets unmanaged Access Grants (where is_managed = false). + */ get '/access_grants/unmanaged/list'(): ( parameters?: AccessGrantsUnmanagedListParameters, options?: AccessGrantsUnmanagedListOptions, @@ -1213,6 +1324,13 @@ export class SeamHttpEndpoints { } } + /** + * Updates an unmanaged Access Grant to make it managed. + * + * This endpoint can only be used to convert unmanaged access grants to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed access grants back to unmanaged. + * + * When converting an unmanaged access grant to managed, all associated access methods will also be converted to managed. + */ get '/access_grants/unmanaged/update'(): ( parameters: AccessGrantsUnmanagedUpdateParameters, options?: AccessGrantsUnmanagedUpdateOptions, @@ -1226,6 +1344,9 @@ export class SeamHttpEndpoints { } } + /** + * Assigns a pre-registered card credential, identified by `card_number`, to a card-mode access method. Use this endpoint for access systems that use pre-registered cards, where a physical card must be associated with an access method before it can be used for access. Assigning a card credential also triggers issuance of the access method. + */ get '/access_methods/assign_card'(): ( parameters: AccessMethodsAssignCardParameters, options?: AccessMethodsAssignCardOptions, @@ -1239,6 +1360,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes an access method. + */ get '/access_methods/delete'(): ( parameters?: AccessMethodsDeleteParameters, options?: AccessMethodsDeleteOptions, @@ -1252,6 +1376,9 @@ export class SeamHttpEndpoints { } } + /** + * Encodes an existing access method onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ get '/access_methods/encode'(): ( parameters: AccessMethodsEncodeParameters, options?: AccessMethodsEncodeOptions, @@ -1265,6 +1392,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets an access method. + */ get '/access_methods/get'(): ( parameters: AccessMethodsGetParameters, options?: AccessMethodsGetOptions, @@ -1278,6 +1408,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets all related resources for one or more Access Methods. + */ get '/access_methods/get_related'(): ( parameters: AccessMethodsGetRelatedParameters, options?: AccessMethodsGetRelatedOptions, @@ -1291,6 +1424,9 @@ export class SeamHttpEndpoints { } } + /** + * Lists all access methods, usually filtered by Access Grant. + */ get '/access_methods/list'(): ( parameters?: AccessMethodsListParameters, options?: AccessMethodsListOptions, @@ -1304,6 +1440,9 @@ export class SeamHttpEndpoints { } } + /** + * Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using the cloud key credential associated with an access method. Returns an action attempt that tracks the progress of the unlock operation. + */ get '/access_methods/unlock_door'(): ( parameters: AccessMethodsUnlockDoorParameters, options?: AccessMethodsUnlockDoorOptions, @@ -1317,6 +1456,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets an unmanaged access method (where is_managed = false). + */ get '/access_methods/unmanaged/get'(): ( parameters: AccessMethodsUnmanagedGetParameters, options?: AccessMethodsUnmanagedGetOptions, @@ -1330,6 +1472,9 @@ export class SeamHttpEndpoints { } } + /** + * Lists all unmanaged access methods (where is_managed = false), usually filtered by Access Grant. + */ get '/access_methods/unmanaged/list'(): ( parameters: AccessMethodsUnmanagedListParameters, options?: AccessMethodsUnmanagedListOptions, @@ -1343,6 +1488,9 @@ export class SeamHttpEndpoints { } } + /** + * Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/add_user'(): ( parameters: AcsAccessGroupsAddUserParameters, options?: AcsAccessGroupsAddUserOptions, @@ -1356,6 +1504,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/delete'(): ( parameters: AcsAccessGroupsDeleteParameters, options?: AcsAccessGroupsDeleteOptions, @@ -1369,6 +1520,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/get'(): ( parameters: AcsAccessGroupsGetParameters, options?: AcsAccessGroupsGetOptions, @@ -1382,6 +1536,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access groups](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/list'(): ( parameters?: AcsAccessGroupsListParameters, options?: AcsAccessGroupsListOptions, @@ -1395,6 +1552,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all accessible entrances for a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/list_accessible_entrances'(): ( parameters: AcsAccessGroupsListAccessibleEntrancesParameters, options?: AcsAccessGroupsListAccessibleEntrancesOptions, @@ -1408,6 +1568,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) in an [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/list_users'(): ( parameters: AcsAccessGroupsListUsersParameters, options?: AcsAccessGroupsListUsersOptions, @@ -1421,6 +1584,9 @@ export class SeamHttpEndpoints { } } + /** + * Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/access_groups/remove_user'(): ( parameters: AcsAccessGroupsRemoveUserParameters, options?: AcsAccessGroupsRemoveUserOptions, @@ -1434,6 +1600,9 @@ export class SeamHttpEndpoints { } } + /** + * Assigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) to a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/credentials/assign'(): ( parameters: AcsCredentialsAssignParameters, options?: AcsCredentialsAssignOptions, @@ -1447,6 +1616,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [credential](https://docs.seam.co/low-level-apis/managing-credentials) for a specified [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management). For granting access, we recommend [Access Grants](https://docs.seam.co/use-cases/granting-access) instead: they create and manage the underlying credentials for you, across access systems and standalone smart locks alike. Use this low-level endpoint only when you need direct control over an individual ACS credential. + */ get '/acs/credentials/create'(): ( parameters: AcsCredentialsCreateParameters, options?: AcsCredentialsCreateOptions, @@ -1460,6 +1632,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ get '/acs/credentials/delete'(): ( parameters: AcsCredentialsDeleteParameters, options?: AcsCredentialsDeleteOptions, @@ -1473,6 +1648,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ get '/acs/credentials/get'(): ( parameters: AcsCredentialsGetParameters, options?: AcsCredentialsGetOptions, @@ -1486,6 +1664,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ get '/acs/credentials/list'(): ( parameters?: AcsCredentialsListParameters, options?: AcsCredentialsListOptions, @@ -1499,6 +1680,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [entrances](https://docs.seam.co/api/acs/entrances) to which a [credential](https://docs.seam.co/api/acs/credentials) grants access. + */ get '/acs/credentials/list_accessible_entrances'(): ( parameters: AcsCredentialsListAccessibleEntrancesParameters, options?: AcsCredentialsListAccessibleEntrancesOptions, @@ -1512,6 +1696,9 @@ export class SeamHttpEndpoints { } } + /** + * Unassigns a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/credentials/unassign'(): ( parameters: AcsCredentialsUnassignParameters, options?: AcsCredentialsUnassignOptions, @@ -1525,6 +1712,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates the code and ends at date and time for a specified [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ get '/acs/credentials/update'(): ( parameters: AcsCredentialsUpdateParameters, options?: AcsCredentialsUpdateOptions, @@ -1538,6 +1728,9 @@ export class SeamHttpEndpoints { } } + /** + * Encodes an existing [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) onto a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). Either provide an `acs_credential_id` or an `access_method_id` + */ get '/acs/encoders/encode_credential'(): ( parameters: AcsEncodersEncodeCredentialParameters, options?: AcsEncodersEncodeCredentialOptions, @@ -1551,6 +1744,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ get '/acs/encoders/get'(): ( parameters: AcsEncodersGetParameters, options?: AcsEncodersGetOptions, @@ -1564,6 +1760,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [encoders](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ get '/acs/encoders/list'(): ( parameters?: AcsEncodersListParameters, options?: AcsEncodersListOptions, @@ -1577,6 +1776,9 @@ export class SeamHttpEndpoints { } } + /** + * Scans an encoded [acs_credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) from a plastic card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners). + */ get '/acs/encoders/scan_credential'(): ( parameters: AcsEncodersScanCredentialParameters, options?: AcsEncodersScanCredentialOptions, @@ -1590,6 +1792,9 @@ export class SeamHttpEndpoints { } } + /** + * Scans a physical card placed on the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) and assigns the scanned credential to an ACS user. Provide either an `acs_user_id` or a `user_identity_id`. + */ get '/acs/encoders/scan_to_assign_credential'(): ( parameters: AcsEncodersScanToAssignCredentialParameters, options?: AcsEncodersScanToAssignCredentialOptions, @@ -1603,6 +1808,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/acs/encoders/simulate/next_credential_encode_will_fail'(): ( parameters: AcsEncodersSimulateNextCredentialEncodeWillFailParameters, options?: AcsEncodersSimulateNextCredentialEncodeWillFailOptions, @@ -1618,6 +1826,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates that the next attempt to encode a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/acs/encoders/simulate/next_credential_encode_will_succeed'(): ( parameters: AcsEncodersSimulateNextCredentialEncodeWillSucceedParameters, options?: AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions, @@ -1635,6 +1846,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will fail. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/acs/encoders/simulate/next_credential_scan_will_fail'(): ( parameters: AcsEncodersSimulateNextCredentialScanWillFailParameters, options?: AcsEncodersSimulateNextCredentialScanWillFailOptions, @@ -1650,6 +1864,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates that the next attempt to scan a [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) using the specified [encoder](https://docs.seam.co/low-level-apis/access-systems/working-with-card-encoders-and-scanners) will succeed. You can only perform this action within a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/acs/encoders/simulate/next_credential_scan_will_succeed'(): ( parameters: AcsEncodersSimulateNextCredentialScanWillSucceedParameters, options?: AcsEncodersSimulateNextCredentialScanWillSucceedOptions, @@ -1667,6 +1884,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ get '/acs/entrances/get'(): ( parameters: AcsEntrancesGetParameters, options?: AcsEntrancesGetOptions, @@ -1680,6 +1900,9 @@ export class SeamHttpEndpoints { } } + /** + * Grants a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) access to a specified [access system entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ get '/acs/entrances/grant_access'(): ( parameters: AcsEntrancesGrantAccessParameters, options?: AcsEntrancesGrantAccessOptions, @@ -1693,6 +1916,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access system entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ get '/acs/entrances/list'(): ( parameters?: AcsEntrancesListParameters, options?: AcsEntrancesListOptions, @@ -1706,6 +1932,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) with access to a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details). + */ get '/acs/entrances/list_credentials_with_access'(): ( parameters: AcsEntrancesListCredentialsWithAccessParameters, options?: AcsEntrancesListCredentialsWithAccessOptions, @@ -1719,6 +1948,9 @@ export class SeamHttpEndpoints { } } + /** + * Remotely unlocks a specified [entrance](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) using a cloud_key credential. Returns an action attempt that tracks the progress of the unlock operation. + */ get '/acs/entrances/unlock'(): ( parameters: AcsEntrancesUnlockParameters, options?: AcsEntrancesUnlockOptions, @@ -1732,6 +1964,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [access system](https://docs.seam.co/low-level-apis/access-systems). + */ get '/acs/systems/get'(): ( parameters: AcsSystemsGetParameters, options?: AcsSystemsGetOptions, @@ -1745,6 +1980,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems). + * + * To filter the list of returned access systems by a specific connected account ID, include the `connected_account_id` in the request body. If you omit the `connected_account_id` parameter, the response includes all access systems connected to your workspace. + */ get '/acs/systems/list'(): ( parameters?: AcsSystemsListParameters, options?: AcsSystemsListOptions, @@ -1758,6 +1998,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all credential manager systems that are compatible with a specified [access system](https://docs.seam.co/low-level-apis/access-systems). + * + * Specify the access system for which you want to retrieve all compatible credential manager systems by including the corresponding `acs_system_id` in the request body. + */ get '/acs/systems/list_compatible_credential_manager_acs_systems'(): ( parameters: AcsSystemsListCompatibleCredentialManagerAcsSystemsParameters, options?: AcsSystemsListCompatibleCredentialManagerAcsSystemsOptions, @@ -1775,6 +2020,9 @@ export class SeamHttpEndpoints { } } + /** + * Reports ACS system device status including encoders and entrances. + */ get '/acs/systems/report_devices'(): ( parameters: AcsSystemsReportDevicesParameters, options?: AcsSystemsReportDevicesOptions, @@ -1788,6 +2036,9 @@ export class SeamHttpEndpoints { } } + /** + * Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/users/add_to_access_group'(): ( parameters: AcsUsersAddToAccessGroupParameters, options?: AcsUsersAddToAccessGroupOptions, @@ -1801,6 +2052,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/users/create'(): ( parameters: AcsUsersCreateParameters, options?: AcsUsersCreateOptions, @@ -1814,6 +2068,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) and invalidates the access system user's [credentials](https://docs.seam.co/low-level-apis/access-systems/managing-credentials). + */ get '/acs/users/delete'(): ( parameters?: AcsUsersDeleteParameters, options?: AcsUsersDeleteOptions, @@ -1827,6 +2084,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/users/get'(): ( parameters?: AcsUsersGetParameters, options?: AcsUsersGetOptions, @@ -1840,6 +2100,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/users/list'(): ( parameters?: AcsUsersListParameters, options?: AcsUsersListOptions, @@ -1853,6 +2116,9 @@ export class SeamHttpEndpoints { } } + /** + * Lists the [entrances](https://docs.seam.co/api/acs/entrances) to which a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) has access. + */ get '/acs/users/list_accessible_entrances'(): ( parameters?: AcsUsersListAccessibleEntrancesParameters, options?: AcsUsersListAccessibleEntrancesOptions, @@ -1866,6 +2132,9 @@ export class SeamHttpEndpoints { } } + /** + * Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [access group](https://docs.seam.co/low-level-apis/access-systems/user-management/assigning-users-to-access-groups). + */ get '/acs/users/remove_from_access_group'(): ( parameters: AcsUsersRemoveFromAccessGroupParameters, options?: AcsUsersRemoveFromAccessGroupOptions, @@ -1879,6 +2148,9 @@ export class SeamHttpEndpoints { } } + /** + * Revokes access to all [entrances](https://docs.seam.co/api/acs/entrances) for a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/users/revoke_access_to_all_entrances'(): ( parameters?: AcsUsersRevokeAccessToAllEntrancesParameters, options?: AcsUsersRevokeAccessToAllEntrancesOptions, @@ -1892,6 +2164,9 @@ export class SeamHttpEndpoints { } } + /** + * [Suspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#suspend-an-acs-user) a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). Suspending an access system user revokes their access temporarily. To restore an access system user's access, you can [unsuspend](https://docs.seam.co/api/acs/users/unsuspend) them. + */ get '/acs/users/suspend'(): ( parameters?: AcsUsersSuspendParameters, options?: AcsUsersSuspendOptions, @@ -1905,6 +2180,9 @@ export class SeamHttpEndpoints { } } + /** + * [Unsuspends](https://docs.seam.co/low-level-apis/access-systems/user-management/suspending-and-unsuspending-users#unsuspend-an-acs-user) a specified suspended [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). While [suspending an access system user](https://docs.seam.co/api/acs/users/suspend) revokes their access temporarily, unsuspending the access system user restores their access. + */ get '/acs/users/unsuspend'(): ( parameters?: AcsUsersUnsuspendParameters, options?: AcsUsersUnsuspendOptions, @@ -1918,6 +2196,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates the properties of a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management). + */ get '/acs/users/update'(): ( parameters?: AcsUsersUpdateParameters, options?: AcsUsersUpdateOptions, @@ -1931,6 +2212,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [action attempt](https://docs.seam.co/core-concepts/action-attempts). + */ get '/action_attempts/get'(): ( parameters: ActionAttemptsGetParameters, options?: ActionAttemptsGetOptions, @@ -1944,6 +2228,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of the [action attempts](https://docs.seam.co/core-concepts/action-attempts) that you specify as an array of `action_attempt_id`s. + */ get '/action_attempts/list'(): ( parameters?: ActionAttemptsListParameters, options?: ActionAttemptsListOptions, @@ -1957,6 +2244,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ get '/client_sessions/create'(): ( parameters?: ClientSessionsCreateParameters, options?: ClientSessionsCreateOptions, @@ -1970,6 +2260,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ get '/client_sessions/delete'(): ( parameters: ClientSessionsDeleteParameters, options?: ClientSessionsDeleteOptions, @@ -1983,6 +2276,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ get '/client_sessions/get'(): ( parameters?: ClientSessionsGetParameters, options?: ClientSessionsGetOptions, @@ -1996,6 +2292,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) with specific characteristics or creates a new client session with these characteristics if it does not yet exist. + */ get '/client_sessions/get_or_create'(): ( parameters?: ClientSessionsGetOrCreateParameters, options?: ClientSessionsGetOrCreateOptions, @@ -2009,6 +2308,9 @@ export class SeamHttpEndpoints { } } + /** + * Grants a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens) access to one or more resources, such as [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews), [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity), and so on. + */ get '/client_sessions/grant_access'(): ( parameters?: ClientSessionsGrantAccessParameters, options?: ClientSessionsGrantAccessOptions, @@ -2022,6 +2324,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [client sessions](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + */ get '/client_sessions/list'(): ( parameters?: ClientSessionsListParameters, options?: ClientSessionsListOptions, @@ -2035,6 +2340,11 @@ export class SeamHttpEndpoints { } } + /** + * Revokes a [client session](https://docs.seam.co/core-concepts/authentication/client-session-tokens). + * + * Note that [deleting a client session](https://docs.seam.co/api/client_sessions/delete) is a separate action. + */ get '/client_sessions/revoke'(): ( parameters: ClientSessionsRevokeParameters, options?: ClientSessionsRevokeOptions, @@ -2048,6 +2358,15 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * To enable a user to connect their devices or systems to Seam, they must sign in to their device or system account. To enable a user to sign in, you create a `connect_webview`. After creating the Connect Webview, you receive a URL that you can use to display the visual component of this Connect Webview for your user. You can open an iframe or new window to display the Connect Webview. + * + * You should make a new `connect_webview` for each unique login request. Each `connect_webview` tracks the user that signed in with it. You receive an error if you reuse a Connect Webview for the same user twice or if you use the same Connect Webview for multiple users. + * + * See also: [Connect Webview Process](https://docs.seam.co/core-concepts/connect-webviews/connect-webview-process). + */ get '/connect_webviews/create'(): ( parameters?: ConnectWebviewsCreateParameters, options?: ConnectWebviewsCreateOptions, @@ -2061,6 +2380,11 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * You do not need to delete a Connect Webview once a user completes it. Instead, you can simply ignore completed Connect Webviews. + */ get '/connect_webviews/delete'(): ( parameters: ConnectWebviewsDeleteParameters, options?: ConnectWebviewsDeleteOptions, @@ -2074,6 +2398,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews). + * + * Unless you're using a `custom_redirect_url`, you should poll a newly-created `connect_webview` to find out if the user has signed in or to get details about what devices they've connected. + */ get '/connect_webviews/get'(): ( parameters: ConnectWebviewsGetParameters, options?: ConnectWebviewsGetOptions, @@ -2087,6 +2416,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). + */ get '/connect_webviews/list'(): ( parameters?: ConnectWebviewsListParameters, options?: ConnectWebviewsListOptions, @@ -2100,6 +2432,13 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). + * + * Deleting a connected account triggers a `connected_account.deleted` event and removes the connected account and all data associated with the connected account from Seam, including devices, events, access codes, and so on. For every deleted resource, Seam sends a corresponding deleted event, but the resource is not deleted from the provider. + * + * For example, if you delete a connected account with a device that has an access code, Seam sends a `connected_account.deleted` event, a `device.deleted` event, and an `access_code.deleted` event, but Seam does not remove the access code from the device. + */ get '/connected_accounts/delete'(): ( parameters: ConnectedAccountsDeleteParameters, options?: ConnectedAccountsDeleteOptions, @@ -2113,6 +2452,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [connected account](https://docs.seam.co/core-concepts/connected-accounts). + */ get '/connected_accounts/get'(): ( parameters?: ConnectedAccountsGetParameters, options?: ConnectedAccountsGetOptions, @@ -2126,6 +2468,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [connected accounts](https://docs.seam.co/core-concepts/connected-accounts). + */ get '/connected_accounts/list'(): ( parameters?: ConnectedAccountsListParameters, options?: ConnectedAccountsListOptions, @@ -2139,6 +2484,9 @@ export class SeamHttpEndpoints { } } + /** + * Request a [connected account](https://docs.seam.co/core-concepts/connected-accounts) sync attempt for the specified `connected_account_id`. + */ get '/connected_accounts/sync'(): ( parameters: ConnectedAccountsSyncParameters, options?: ConnectedAccountsSyncOptions, @@ -2152,6 +2500,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a [connected account](https://docs.seam.co/core-concepts/connected-accounts). + */ get '/connected_accounts/update'(): ( parameters: ConnectedAccountsUpdateParameters, options?: ConnectedAccountsUpdateOptions, @@ -2165,6 +2516,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates a connected account becoming disconnected from Seam. Only applicable for [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/connected_accounts/simulate/disconnect'(): ( parameters: ConnectedAccountsSimulateDisconnectParameters, options?: ConnectedAccountsSimulateDisconnectOptions, @@ -2181,6 +2535,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new customer portal magic link with configurable features. + */ get '/customers/create_portal'(): ( parameters?: CustomersCreatePortalParameters, options?: CustomersCreatePortalOptions, @@ -2194,6 +2551,10 @@ export class SeamHttpEndpoints { } } + /** + * Deletes customer data including resources like spaces, properties, rooms, users, etc. + * This will delete the partner resources and any related Seam resources (user identities, access grants, spaces). + */ get '/customers/delete_data'(): ( parameters?: CustomersDeleteDataParameters, options?: CustomersDeleteDataOptions, @@ -2207,6 +2568,9 @@ export class SeamHttpEndpoints { } } + /** + * Pushes customer data including resources like spaces, properties, rooms, users, etc. + */ get '/customers/push_data'(): ( parameters: CustomersPushDataParameters, options?: CustomersPushDataOptions, @@ -2220,6 +2584,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [device](https://docs.seam.co/core-concepts/devices). + * + * You must specify either `device_id` or `name`. + */ get '/devices/get'(): ( parameters?: DevicesGetParameters, options?: DevicesGetOptions, @@ -2233,6 +2602,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [devices](https://docs.seam.co/core-concepts/devices). + */ get '/devices/list'(): ( parameters?: DevicesListParameters, options?: DevicesListOptions, @@ -2246,6 +2618,13 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all device providers. + * + * The information that this endpoint returns for each provider includes a set of [capability flags](https://docs.seam.co/capability-guides/device-and-system-capabilities#capability-flags), such as `device_provider.can_remotely_unlock`. If at least one supported device from a provider has a specific capability, the corresponding capability flag is `true`. + * + * When you create a [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews), you can customize the providers—that is, the brands—that it displays. In the `/connect_webviews/create` request, include the desired set of device provider keys in the `accepted_providers` parameter. See also [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). + */ get '/devices/list_device_providers'(): ( parameters?: DevicesListDeviceProvidersParameters, options?: DevicesListDeviceProvidersOptions, @@ -2259,6 +2638,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates provider-specific metadata for devices. + */ get '/devices/report_provider_metadata'(): ( parameters: DevicesReportProviderMetadataParameters, options?: DevicesReportProviderMetadataOptions, @@ -2272,6 +2654,11 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [device](https://docs.seam.co/core-concepts/devices). + * + * You can add or change [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) for a device, change the device's name, or [convert a managed device to unmanaged](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + */ get '/devices/update'(): ( parameters: DevicesUpdateParameters, options?: DevicesUpdateOptions, @@ -2285,6 +2672,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates connecting a device to Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + */ get '/devices/simulate/connect'(): ( parameters: DevicesSimulateConnectParameters, options?: DevicesSimulateConnectOptions, @@ -2298,6 +2688,12 @@ export class SeamHttpEndpoints { } } + /** + * Simulates bringing the Wi‑Fi hub (bridge) back online for a device. + * Only applicable for sandbox workspaces and currently + * implemented for August and TTLock locks. + * This will clear the `hub_disconnected` error on the device. + */ get '/devices/simulate/connect_to_hub'(): ( parameters: DevicesSimulateConnectToHubParameters, options?: DevicesSimulateConnectToHubOptions, @@ -2311,6 +2707,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates disconnecting a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + */ get '/devices/simulate/disconnect'(): ( parameters: DevicesSimulateDisconnectParameters, options?: DevicesSimulateDisconnectOptions, @@ -2324,6 +2723,13 @@ export class SeamHttpEndpoints { } } + /** + * Simulates taking the Wi‑Fi hub (bridge) offline for a device. + * Only applicable for sandbox workspaces and currently + * implemented for August, TTLock, and IglooHome devices. + * This will set the `hub_disconnected` error on the device, or mark the + * IglooHome bridge offline in sandbox. + */ get '/devices/simulate/disconnect_from_hub'(): ( parameters: DevicesSimulateDisconnectFromHubParameters, options?: DevicesSimulateDisconnectFromHubOptions, @@ -2337,6 +2743,11 @@ export class SeamHttpEndpoints { } } + /** + * Toggle the simulated Nuki Smart Hosting subscription for a device (sandbox only). + * Send `is_expired: true` to simulate an expired subscription, or `false` to simulate an active subscription. + * The actual device error is created/cleared by the poller after this state change. + */ get '/devices/simulate/paid_subscription'(): ( parameters: DevicesSimulatePaidSubscriptionParameters, options?: DevicesSimulatePaidSubscriptionOptions, @@ -2350,6 +2761,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates removing a device from Seam. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your App Against Device Disconnection and Removal](https://docs.seam.co/core-concepts/devices/testing-your-app-against-device-disconnection-and-removal). + */ get '/devices/simulate/remove'(): ( parameters: DevicesSimulateRemoveParameters, options?: DevicesSimulateRemoveOptions, @@ -2363,6 +2777,13 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + * + * An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + * + * You must specify either `device_id` or `name`. + */ get '/devices/unmanaged/get'(): ( parameters?: DevicesUnmanagedGetParameters, options?: DevicesUnmanagedGetOptions, @@ -2376,6 +2797,11 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [unmanaged devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). + * + * An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + */ get '/devices/unmanaged/list'(): ( parameters?: DevicesUnmanagedListParameters, options?: DevicesUnmanagedListOptions, @@ -2389,6 +2815,11 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [unmanaged device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). To convert an unmanaged device to managed, set `is_managed` to `true`. + * + * An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://docs.seam.co/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed). + */ get '/devices/unmanaged/update'(): ( parameters: DevicesUnmanagedUpdateParameters, options?: DevicesUnmanagedUpdateOptions, @@ -2402,6 +2833,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place. + */ get '/events/get'(): ( parameters?: EventsGetParameters, options?: EventsGetOptions, @@ -2415,6 +2849,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place. + */ get '/events/list'(): ( parameters?: EventsListParameters, options?: EventsListOptions, @@ -2428,6 +2865,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [Instant Key](https://docs.seam.co/capability-guides/instant-keys). + */ get '/instant_keys/delete'(): ( parameters: InstantKeysDeleteParameters, options?: InstantKeysDeleteOptions, @@ -2441,6 +2881,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys). + */ get '/instant_keys/get'(): ( parameters?: InstantKeysGetParameters, options?: InstantKeysGetOptions, @@ -2454,6 +2897,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [instant keys](https://docs.seam.co/capability-guides/instant-keys). + */ get '/instant_keys/list'(): ( parameters?: InstantKeysListParameters, options?: InstantKeysListOptions, @@ -2467,6 +2913,9 @@ export class SeamHttpEndpoints { } } + /** + * Configures the auto-lock setting for a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). + */ get '/locks/configure_auto_lock'(): ( parameters: LocksConfigureAutoLockParameters, options?: LocksConfigureAutoLockOptions, @@ -2480,6 +2929,10 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [lock](https://docs.seam.co/low-level-apis/smart-locks). + * @deprecated Use `/devices/get` instead. + */ get '/locks/get'(): ( parameters?: LocksGetParameters, options?: LocksGetOptions, @@ -2493,6 +2946,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [locks](https://docs.seam.co/low-level-apis/smart-locks). + */ get '/locks/list'(): ( parameters?: LocksListParameters, options?: LocksListOptions, @@ -2506,6 +2962,9 @@ export class SeamHttpEndpoints { } } + /** + * Locks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). + */ get '/locks/lock_door'(): ( parameters: LocksLockDoorParameters, options?: LocksLockDoorOptions, @@ -2519,6 +2978,9 @@ export class SeamHttpEndpoints { } } + /** + * Unlocks a [lock](https://docs.seam.co/low-level-apis/smart-locks). See also [Locking and Unlocking Smart Locks](https://docs.seam.co/low-level-apis/smart-locks/lock-and-unlock). + */ get '/locks/unlock_door'(): ( parameters: LocksUnlockDoorParameters, options?: LocksUnlockDoorOptions, @@ -2532,6 +2994,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates the entry of a code on a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/locks/simulate/keypad_code_entry'(): ( parameters: LocksSimulateKeypadCodeEntryParameters, options?: LocksSimulateKeypadCodeEntryOptions, @@ -2545,6 +3010,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates a manual lock action using a keypad. You can only perform this action for [August](https://docs.seam.co/device-and-system-integration-guides/august-locks) devices within [sandbox workspaces](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/locks/simulate/manual_lock_via_keypad'(): ( parameters: LocksSimulateManualLockViaKeypadParameters, options?: LocksSimulateManualLockViaKeypadOptions, @@ -2558,6 +3026,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [noise sensors](https://docs.seam.co/capability-guides/noise-sensors). + */ get '/noise_sensors/list'(): ( parameters?: NoiseSensorsListParameters, options?: NoiseSensorsListOptions, @@ -2571,6 +3042,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). Thresholds represent the limits of noise tolerated at a property, which can be customized for each hour of the day. Each device has its own default thresholds, but you can use the Seam API to modify them. + */ get '/noise_sensors/noise_thresholds/create'(): ( parameters: NoiseSensorsNoiseThresholdsCreateParameters, options?: NoiseSensorsNoiseThresholdsCreateOptions, @@ -2587,6 +3061,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) from a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ get '/noise_sensors/noise_thresholds/delete'(): ( parameters: NoiseSensorsNoiseThresholdsDeleteParameters, options?: NoiseSensorsNoiseThresholdsDeleteOptions, @@ -2603,6 +3080,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ get '/noise_sensors/noise_thresholds/get'(): ( parameters: NoiseSensorsNoiseThresholdsGetParameters, options?: NoiseSensorsNoiseThresholdsGetOptions, @@ -2619,6 +3099,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [noise thresholds](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ get '/noise_sensors/noise_thresholds/list'(): ( parameters: NoiseSensorsNoiseThresholdsListParameters, options?: NoiseSensorsNoiseThresholdsListOptions, @@ -2635,6 +3118,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors). + */ get '/noise_sensors/noise_thresholds/update'(): ( parameters: NoiseSensorsNoiseThresholdsUpdateParameters, options?: NoiseSensorsNoiseThresholdsUpdateOptions, @@ -2651,6 +3137,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates the triggering of a [noise threshold](https://docs.seam.co/capability-guides/noise-sensors/configure-noise-threshold-settings) for a [noise sensor](https://docs.seam.co/capability-guides/noise-sensors) in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ get '/noise_sensors/simulate/trigger_noise_threshold'(): ( parameters: NoiseSensorsSimulateTriggerNoiseThresholdParameters, options?: NoiseSensorsSimulateTriggerNoiseThresholdOptions, @@ -2664,6 +3153,9 @@ export class SeamHttpEndpoints { } } + /** + * Deactivates a phone, which is useful, for example, if a user has lost their phone. For more information, see [App User Lost Phone Process](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity#app-user-lost-phone-process). + */ get '/phones/deactivate'(): ( parameters: PhonesDeactivateParameters, options?: PhonesDeactivateOptions, @@ -2677,6 +3169,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [phone](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). + */ get '/phones/get'(): ( parameters: PhonesGetParameters, options?: PhonesGetOptions, @@ -2690,6 +3185,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [phones](https://docs.seam.co/capability-guides/mobile-access/managing-phones-for-a-user-identity). To filter the list of returned phones by a specific owner user identity or credential, include the `owner_user_identity_id` or `acs_credential_id`, respectively, in the request body. + */ get '/phones/list'(): ( parameters?: PhonesListParameters, options?: PhonesListOptions, @@ -2703,6 +3201,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new simulated phone in a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Creating a Simulated Phone for a User Identity](https://docs.seam.co/capability-guides/mobile-access/developing-in-a-sandbox-workspace#creating-a-simulated-phone-for-a-user-identity). + */ get '/phones/simulate/create_sandbox_phone'(): ( parameters: PhonesSimulateCreateSandboxPhoneParameters, options?: PhonesSimulateCreateSandboxPhoneOptions, @@ -2716,6 +3217,9 @@ export class SeamHttpEndpoints { } } + /** + * Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. + */ get '/spaces/add_acs_entrances'(): ( parameters: SpacesAddAcsEntrancesParameters, options?: SpacesAddAcsEntrancesOptions, @@ -2729,6 +3233,9 @@ export class SeamHttpEndpoints { } } + /** + * Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space. + */ get '/spaces/add_connected_account'(): ( parameters: SpacesAddConnectedAccountParameters, options?: SpacesAddConnectedAccountOptions, @@ -2742,6 +3249,9 @@ export class SeamHttpEndpoints { } } + /** + * Adds devices to a specific space. + */ get '/spaces/add_devices'(): ( parameters: SpacesAddDevicesParameters, options?: SpacesAddDevicesOptions, @@ -2755,6 +3265,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new space. + */ get '/spaces/create'(): ( parameters: SpacesCreateParameters, options?: SpacesCreateOptions, @@ -2768,6 +3281,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a space. + */ get '/spaces/delete'(): ( parameters: SpacesDeleteParameters, options?: SpacesDeleteOptions, @@ -2781,6 +3297,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets a space. + */ get '/spaces/get'(): ( parameters?: SpacesGetParameters, options?: SpacesGetOptions, @@ -2794,6 +3313,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets all related resources for one or more Spaces. + */ get '/spaces/get_related'(): ( parameters?: SpacesGetRelatedParameters, options?: SpacesGetRelatedOptions, @@ -2807,6 +3329,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all spaces. + */ get '/spaces/list'(): ( parameters?: SpacesListParameters, options?: SpacesListOptions, @@ -2820,6 +3345,9 @@ export class SeamHttpEndpoints { } } + /** + * Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. + */ get '/spaces/remove_acs_entrances'(): ( parameters: SpacesRemoveAcsEntrancesParameters, options?: SpacesRemoveAcsEntrancesOptions, @@ -2833,6 +3361,9 @@ export class SeamHttpEndpoints { } } + /** + * Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space. + */ get '/spaces/remove_connected_account'(): ( parameters: SpacesRemoveConnectedAccountParameters, options?: SpacesRemoveConnectedAccountOptions, @@ -2846,6 +3377,9 @@ export class SeamHttpEndpoints { } } + /** + * Removes devices from a specific space. + */ get '/spaces/remove_devices'(): ( parameters: SpacesRemoveDevicesParameters, options?: SpacesRemoveDevicesOptions, @@ -2859,6 +3393,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates an existing space. + */ get '/spaces/update'(): ( parameters?: SpacesUpdateParameters, options?: SpacesUpdateOptions, @@ -2872,6 +3409,9 @@ export class SeamHttpEndpoints { } } + /** + * Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/activate_climate_preset'(): ( parameters: ThermostatsActivateClimatePresetParameters, options?: ThermostatsActivateClimatePresetOptions, @@ -2885,6 +3425,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ get '/thermostats/cool'(): ( parameters: ThermostatsCoolParameters, options?: ThermostatsCoolOptions, @@ -2898,6 +3441,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/create_climate_preset'(): ( parameters: ThermostatsCreateClimatePresetParameters, options?: ThermostatsCreateClimatePresetOptions, @@ -2911,6 +3457,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/delete_climate_preset'(): ( parameters: ThermostatsDeleteClimatePresetParameters, options?: ThermostatsDeleteClimatePresetOptions, @@ -2924,6 +3473,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ get '/thermostats/heat'(): ( parameters: ThermostatsHeatParameters, options?: ThermostatsHeatOptions, @@ -2937,6 +3489,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ get '/thermostats/heat_cool'(): ( parameters: ThermostatsHeatCoolParameters, options?: ThermostatsHeatCoolOptions, @@ -2950,6 +3505,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/list'(): ( parameters?: ThermostatsListParameters, options?: ThermostatsListOptions, @@ -2963,6 +3521,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ get '/thermostats/off'(): ( parameters: ThermostatsOffParameters, options?: ThermostatsOffOptions, @@ -2976,6 +3537,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/set_fallback_climate_preset'(): ( parameters: ThermostatsSetFallbackClimatePresetParameters, options?: ThermostatsSetFallbackClimatePresetOptions, @@ -2989,6 +3553,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/set_fan_mode'(): ( parameters: ThermostatsSetFanModeParameters, options?: ThermostatsSetFanModeOptions, @@ -3002,6 +3569,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/set_hvac_mode'(): ( parameters: ThermostatsSetHvacModeParameters, options?: ThermostatsSetHvacModeOptions, @@ -3015,6 +3585,9 @@ export class SeamHttpEndpoints { } } + /** + * Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. + */ get '/thermostats/set_temperature_threshold'(): ( parameters: ThermostatsSetTemperatureThresholdParameters, options?: ThermostatsSetTemperatureThresholdOptions, @@ -3028,6 +3601,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/update_climate_preset'(): ( parameters: ThermostatsUpdateClimatePresetParameters, options?: ThermostatsUpdateClimatePresetOptions, @@ -3041,6 +3617,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. + */ get '/thermostats/update_weekly_program'(): ( parameters: ThermostatsUpdateWeeklyProgramParameters, options?: ThermostatsUpdateWeeklyProgramOptions, @@ -3054,6 +3633,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + */ get '/thermostats/daily_programs/create'(): ( parameters: ThermostatsDailyProgramsCreateParameters, options?: ThermostatsDailyProgramsCreateOptions, @@ -3067,6 +3649,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a thermostat daily program. + */ get '/thermostats/daily_programs/delete'(): ( parameters: ThermostatsDailyProgramsDeleteParameters, options?: ThermostatsDailyProgramsDeleteOptions, @@ -3080,6 +3665,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + */ get '/thermostats/daily_programs/update'(): ( parameters: ThermostatsDailyProgramsUpdateParameters, options?: ThermostatsDailyProgramsUpdateOptions, @@ -3093,6 +3681,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/schedules/create'(): ( parameters: ThermostatsSchedulesCreateParameters, options?: ThermostatsSchedulesCreateOptions, @@ -3106,6 +3697,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/schedules/delete'(): ( parameters: ThermostatsSchedulesDeleteParameters, options?: ThermostatsSchedulesDeleteOptions, @@ -3119,6 +3713,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ get '/thermostats/schedules/get'(): ( parameters: ThermostatsSchedulesGetParameters, options?: ThermostatsSchedulesGetOptions, @@ -3132,6 +3729,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [thermostat schedules](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ get '/thermostats/schedules/list'(): ( parameters: ThermostatsSchedulesListParameters, options?: ThermostatsSchedulesListOptions, @@ -3145,6 +3745,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ get '/thermostats/schedules/update'(): ( parameters: ThermostatsSchedulesUpdateParameters, options?: ThermostatsSchedulesUpdateOptions, @@ -3158,6 +3761,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates having adjusted the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://docs.seam.co/capability-guides/thermostats). Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + */ get '/thermostats/simulate/hvac_mode_adjusted'(): ( parameters: ThermostatsSimulateHvacModeAdjustedParameters, options?: ThermostatsSimulateHvacModeAdjustedOptions, @@ -3171,6 +3777,9 @@ export class SeamHttpEndpoints { } } + /** + * Simulates a [thermostat](https://docs.seam.co/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + */ get '/thermostats/simulate/temperature_reached'(): ( parameters: ThermostatsSimulateTemperatureReachedParameters, options?: ThermostatsSimulateTemperatureReachedOptions, @@ -3184,6 +3793,13 @@ export class SeamHttpEndpoints { } } + /** + * Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + * + * You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. + * + * If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. + */ get '/user_identities/add_acs_user'(): ( parameters: UserIdentitiesAddAcsUserParameters, options?: UserIdentitiesAddAcsUserOptions, @@ -3197,6 +3813,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/create'(): ( parameters?: UserIdentitiesCreateParameters, options?: UserIdentitiesCreateOptions, @@ -3210,6 +3829,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions). + */ get '/user_identities/delete'(): ( parameters: UserIdentitiesDeleteParameters, options?: UserIdentitiesDeleteOptions, @@ -3223,6 +3845,9 @@ export class SeamHttpEndpoints { } } + /** + * Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/generate_instant_key'(): ( parameters: UserIdentitiesGenerateInstantKeyParameters, options?: UserIdentitiesGenerateInstantKeyOptions, @@ -3236,6 +3861,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/get'(): ( parameters?: UserIdentitiesGetParameters, options?: UserIdentitiesGetOptions, @@ -3249,6 +3877,9 @@ export class SeamHttpEndpoints { } } + /** + * Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/). + */ get '/user_identities/grant_access_to_device'(): ( parameters: UserIdentitiesGrantAccessToDeviceParameters, options?: UserIdentitiesGrantAccessToDeviceOptions, @@ -3262,6 +3893,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/list'(): ( parameters?: UserIdentitiesListParameters, options?: UserIdentitiesListOptions, @@ -3275,6 +3909,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. + */ get '/user_identities/list_accessible_devices'(): ( parameters: UserIdentitiesListAccessibleDevicesParameters, options?: UserIdentitiesListAccessibleDevicesOptions, @@ -3288,6 +3925,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. + */ get '/user_identities/list_accessible_entrances'(): ( parameters: UserIdentitiesListAccessibleEntrancesParameters, options?: UserIdentitiesListAccessibleEntrancesOptions, @@ -3301,6 +3941,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/list_acs_systems'(): ( parameters: UserIdentitiesListAcsSystemsParameters, options?: UserIdentitiesListAcsSystemsOptions, @@ -3314,6 +3957,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/list_acs_users'(): ( parameters: UserIdentitiesListAcsUsersParameters, options?: UserIdentitiesListAcsUsersOptions, @@ -3327,6 +3973,9 @@ export class SeamHttpEndpoints { } } + /** + * Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/remove_acs_user'(): ( parameters: UserIdentitiesRemoveAcsUserParameters, options?: UserIdentitiesRemoveAcsUserOptions, @@ -3340,6 +3989,9 @@ export class SeamHttpEndpoints { } } + /** + * Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/revoke_access_to_device'(): ( parameters: UserIdentitiesRevokeAccessToDeviceParameters, options?: UserIdentitiesRevokeAccessToDeviceOptions, @@ -3353,6 +4005,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get '/user_identities/update'(): ( parameters: UserIdentitiesUpdateParameters, options?: UserIdentitiesUpdateOptions, @@ -3366,6 +4021,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + */ get '/user_identities/unmanaged/get'(): ( parameters: UserIdentitiesUnmanagedGetParameters, options?: UserIdentitiesUnmanagedGetOptions, @@ -3379,6 +4037,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + */ get '/user_identities/unmanaged/list'(): ( parameters?: UserIdentitiesUnmanagedListParameters, options?: UserIdentitiesUnmanagedListOptions, @@ -3392,6 +4053,11 @@ export class SeamHttpEndpoints { } } + /** + * Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. + * + * This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. + */ get '/user_identities/unmanaged/update'(): ( parameters: UserIdentitiesUnmanagedUpdateParameters, options?: UserIdentitiesUnmanagedUpdateOptions, @@ -3405,6 +4071,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks). + */ get '/webhooks/create'(): ( parameters: WebhooksCreateParameters, options?: WebhooksCreateOptions, @@ -3418,6 +4087,9 @@ export class SeamHttpEndpoints { } } + /** + * Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks). + */ get '/webhooks/delete'(): ( parameters: WebhooksDeleteParameters, options?: WebhooksDeleteOptions, @@ -3431,6 +4103,9 @@ export class SeamHttpEndpoints { } } + /** + * Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks). + */ get '/webhooks/get'(): ( parameters: WebhooksGetParameters, options?: WebhooksGetOptions, @@ -3444,6 +4119,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks). + */ get '/webhooks/list'(): ( parameters?: WebhooksListParameters, options?: WebhooksListOptions, @@ -3457,6 +4135,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks). + */ get '/webhooks/update'(): ( parameters: WebhooksUpdateParameters, options?: WebhooksUpdateOptions, @@ -3470,6 +4151,9 @@ export class SeamHttpEndpoints { } } + /** + * Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). + */ get '/workspaces/create'(): ( parameters: WorkspacesCreateParameters, options?: WorkspacesCreateOptions, @@ -3483,6 +4167,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ get '/workspaces/get'(): ( parameters?: WorkspacesGetParameters, options?: WorkspacesGetOptions, @@ -3496,6 +4183,9 @@ export class SeamHttpEndpoints { } } + /** + * Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ get '/workspaces/list'(): ( parameters?: WorkspacesListParameters, options?: WorkspacesListOptions, @@ -3509,6 +4199,9 @@ export class SeamHttpEndpoints { } } + /** + * Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. + */ get '/workspaces/reset_sandbox'(): ( parameters?: WorkspacesResetSandboxParameters, options?: WorkspacesResetSandboxOptions, @@ -3522,6 +4215,9 @@ export class SeamHttpEndpoints { } } + /** + * Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ get '/workspaces/update'(): ( parameters?: WorkspacesUpdateParameters, options?: WorkspacesUpdateOptions, diff --git a/src/lib/seam/connect/routes/spaces/spaces.ts b/src/lib/seam/connect/routes/spaces/spaces.ts index a1a7d624..95d01db5 100644 --- a/src/lib/seam/connect/routes/spaces/spaces.ts +++ b/src/lib/seam/connect/routes/spaces/spaces.ts @@ -162,6 +162,9 @@ export class SeamHttpSpaces { await clientSessions.get() } + /** + * Adds [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) to a specific space. + */ addAcsEntrances( parameters: SpacesAddAcsEntrancesParameters, options: SpacesAddAcsEntrancesOptions = {}, @@ -175,6 +178,9 @@ export class SeamHttpSpaces { }) } + /** + * Adds a [connected account](https://docs.seam.co/core-concepts/connected-accounts) to a specific space. + */ addConnectedAccount( parameters: SpacesAddConnectedAccountParameters, options: SpacesAddConnectedAccountOptions = {}, @@ -188,6 +194,9 @@ export class SeamHttpSpaces { }) } + /** + * Adds devices to a specific space. + */ addDevices( parameters: SpacesAddDevicesParameters, options: SpacesAddDevicesOptions = {}, @@ -201,6 +210,9 @@ export class SeamHttpSpaces { }) } + /** + * Creates a new space. + */ create( parameters: SpacesCreateParameters, options: SpacesCreateOptions = {}, @@ -214,6 +226,9 @@ export class SeamHttpSpaces { }) } + /** + * Deletes a space. + */ delete( parameters: SpacesDeleteParameters, options: SpacesDeleteOptions = {}, @@ -227,6 +242,9 @@ export class SeamHttpSpaces { }) } + /** + * Gets a space. + */ get( parameters?: SpacesGetParameters, options: SpacesGetOptions = {}, @@ -240,6 +258,9 @@ export class SeamHttpSpaces { }) } + /** + * Gets all related resources for one or more Spaces. + */ getRelated( parameters?: SpacesGetRelatedParameters, options: SpacesGetRelatedOptions = {}, @@ -253,6 +274,9 @@ export class SeamHttpSpaces { }) } + /** + * Returns a list of all spaces. + */ list( parameters?: SpacesListParameters, options: SpacesListOptions = {}, @@ -266,6 +290,9 @@ export class SeamHttpSpaces { }) } + /** + * Removes [entrances](https://docs.seam.co/low-level-apis/access-systems/retrieving-entrance-details) from a specific space. + */ removeAcsEntrances( parameters: SpacesRemoveAcsEntrancesParameters, options: SpacesRemoveAcsEntrancesOptions = {}, @@ -279,6 +306,9 @@ export class SeamHttpSpaces { }) } + /** + * Removes a [connected account](https://docs.seam.co/core-concepts/connected-accounts) from a specific space. + */ removeConnectedAccount( parameters: SpacesRemoveConnectedAccountParameters, options: SpacesRemoveConnectedAccountOptions = {}, @@ -292,6 +322,9 @@ export class SeamHttpSpaces { }) } + /** + * Removes devices from a specific space. + */ removeDevices( parameters: SpacesRemoveDevicesParameters, options: SpacesRemoveDevicesOptions = {}, @@ -305,6 +338,9 @@ export class SeamHttpSpaces { }) } + /** + * Updates an existing space. + */ update( parameters?: SpacesUpdateParameters, options: SpacesUpdateOptions = {}, @@ -320,8 +356,14 @@ export class SeamHttpSpaces { } export type SpacesAddAcsEntrancesParameters = { + /** + * IDs of the entrances that you want to add to the space. + */ acs_entrance_ids: Array + /** + * ID of the space to which you want to add entrances. + */ space_id: string } @@ -335,8 +377,14 @@ export type SpacesAddAcsEntrancesRequest = SeamHttpRequest export interface SpacesAddAcsEntrancesOptions {} export type SpacesAddConnectedAccountParameters = { + /** + * ID of the connected account that you want to add to the space. + */ connected_account_id: string + /** + * ID of the space to which you want to add the connected account. + */ space_id: string } @@ -350,8 +398,14 @@ export type SpacesAddConnectedAccountRequest = SeamHttpRequest export interface SpacesAddConnectedAccountOptions {} export type SpacesAddDevicesParameters = { + /** + * IDs of the devices that you want to add to the space. + */ device_ids: Array + /** + * ID of the space to which you want to add devices. + */ space_id: string } @@ -365,20 +419,53 @@ export type SpacesAddDevicesRequest = SeamHttpRequest export interface SpacesAddDevicesOptions {} export type SpacesCreateParameters = { + /** + * IDs of the entrances that you want to add to the new space. + */ acs_entrance_ids?: Array | undefined + /** + * IDs of connected accounts to associate with the new space. Persisted on seam.location_third_party_account so the UI can show which provider account(s) a space came from. + */ connected_account_ids?: Array | undefined + /** + * Reservation/stay-related defaults for the space. + */ customer_data?: | { + /** + * Postal address for the space. + */ address?: string | undefined + /** + * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkin_time?: string | undefined + /** + * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkout_time?: string | undefined + /** + * IANA time zone for the space, e.g. America/Los_Angeles. + */ time_zone?: string | undefined } | undefined + /** + * Customer key for which you want to create the space. + */ customer_key?: string | undefined + /** + * IDs of the devices that you want to add to the new space. + */ device_ids?: Array | undefined + /** + * Name of the space that you want to create. + */ name: string + /** + * Unique key for the space within the workspace. + */ space_key?: string | undefined } @@ -392,6 +479,9 @@ export type SpacesCreateRequest = SeamHttpRequest export interface SpacesCreateOptions {} export type SpacesDeleteParameters = { + /** + * ID of the space that you want to delete. + */ space_id: string } @@ -405,7 +495,13 @@ export type SpacesDeleteRequest = SeamHttpRequest export interface SpacesDeleteOptions {} export type SpacesGetParameters = { + /** + * ID of the space that you want to get. + */ space_id?: string | undefined + /** + * Unique key of the space that you want to get. + */ space_key?: string | undefined } @@ -429,6 +525,7 @@ export type SpacesGetRelatedParameters = { | 'access_methods' > | undefined + include?: | Array< | 'spaces' @@ -439,7 +536,13 @@ export type SpacesGetRelatedParameters = { | 'access_methods' > | undefined + /** + * IDs of the spaces that you want to get along with their related resources. + */ space_ids?: Array | undefined + /** + * Keys of the spaces that you want to get along with their related resources. + */ space_keys?: Array | undefined } @@ -465,10 +568,25 @@ export type SpacesGetRelatedRequest = SeamHttpRequest< export interface SpacesGetRelatedOptions {} export type SpacesListParameters = { + /** + * Customer key for which you want to list spaces. + */ customer_key?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned spaces to include all records that satisfy a partial match using `name`, `space_key`, or `customer_key`. + */ search?: string | undefined + /** + * Filter spaces by space_key. + */ space_key?: string | undefined } @@ -482,8 +600,14 @@ export type SpacesListRequest = SeamHttpRequest export interface SpacesListOptions {} export type SpacesRemoveAcsEntrancesParameters = { + /** + * IDs of the entrances that you want to remove from the space. + */ acs_entrance_ids: Array + /** + * ID of the space from which you want to remove entrances. + */ space_id: string } @@ -497,8 +621,14 @@ export type SpacesRemoveAcsEntrancesRequest = SeamHttpRequest export interface SpacesRemoveAcsEntrancesOptions {} export type SpacesRemoveConnectedAccountParameters = { + /** + * ID of the connected account that you want to remove from the space. + */ connected_account_id: string + /** + * ID of the space from which you want to remove the connected account. + */ space_id: string } @@ -515,8 +645,14 @@ export type SpacesRemoveConnectedAccountRequest = SeamHttpRequest< export interface SpacesRemoveConnectedAccountOptions {} export type SpacesRemoveDevicesParameters = { + /** + * IDs of the devices that you want to remove from the space. + */ device_ids: Array + /** + * ID of the space from which you want to remove devices. + */ space_id: string } @@ -530,18 +666,48 @@ export type SpacesRemoveDevicesRequest = SeamHttpRequest export interface SpacesRemoveDevicesOptions {} export type SpacesUpdateParameters = { + /** + * IDs of the entrances that you want to set for the space. If specified, this will replace all existing entrances. + */ acs_entrance_ids?: Array | undefined + /** + * Reservation/stay-related defaults for the space. Only the keys you provide are updated; omit a key to leave it unchanged. Pass null on a key to clear it. + */ customer_data?: | { + /** + * Postal address for the space. + */ address?: string | undefined + /** + * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkin_time?: string | undefined + /** + * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss. + */ default_checkout_time?: string | undefined + /** + * IANA time zone for the space, e.g. America/Los_Angeles. + */ time_zone?: string | undefined } | undefined + /** + * IDs of the devices that you want to set for the space. If specified, this will replace all existing devices. + */ device_ids?: Array | undefined + /** + * Name of the space. + */ name?: string | undefined + /** + * ID of the space that you want to update. + */ space_id?: string | undefined + /** + * Unique key of the space that you want to update. + */ space_key?: string | undefined } 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 847adbe7..6e5f43ea 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 @@ -165,6 +165,9 @@ export class SeamHttpThermostatsDailyPrograms { await clientSessions.get() } + /** + * Creates a new thermostat daily program. A daily program consists of a set of periods, where each period includes a start time and the key of a configured climate preset. Once you have defined a daily program, you can assign it to one or more days within a weekly program. + */ create( parameters: ThermostatsDailyProgramsCreateParameters, options: ThermostatsDailyProgramsCreateOptions = {}, @@ -178,6 +181,9 @@ export class SeamHttpThermostatsDailyPrograms { }) } + /** + * Deletes a thermostat daily program. + */ delete( parameters: ThermostatsDailyProgramsDeleteParameters, options: ThermostatsDailyProgramsDeleteOptions = {}, @@ -191,6 +197,9 @@ export class SeamHttpThermostatsDailyPrograms { }) } + /** + * Updates a specified thermostat daily program. The periods that you specify overwrite any existing periods for the daily program. + */ update( parameters: ThermostatsDailyProgramsUpdateParameters, options: ThermostatsDailyProgramsUpdateOptions = {}, @@ -206,12 +215,27 @@ export class SeamHttpThermostatsDailyPrograms { } export type ThermostatsDailyProgramsCreateParameters = { + /** + * ID of the thermostat device for which you want to create a daily program. + */ device_id: string + /** + * Name of the thermostat daily program. + */ name: string + /** + * Array of thermostat daily program periods. + */ periods: Array<{ + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + */ climate_preset_key?: string | undefined + /** + * Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at_time?: string | undefined }> } @@ -231,6 +255,9 @@ export type ThermostatsDailyProgramsCreateRequest = SeamHttpRequest< export interface ThermostatsDailyProgramsCreateOptions {} export type ThermostatsDailyProgramsDeleteParameters = { + /** + * ID of the thermostat daily program that you want to delete. + */ thermostat_daily_program_id: string } @@ -247,13 +274,28 @@ export type ThermostatsDailyProgramsDeleteRequest = SeamHttpRequest< export interface ThermostatsDailyProgramsDeleteOptions {} export type ThermostatsDailyProgramsUpdateParameters = { + /** + * Name of the thermostat daily program that you want to update. + */ name: string + /** + * Array of thermostat daily program periods. The periods that you specify overwrite any existing periods for the daily program. + */ periods: Array<{ + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to activate at the `starts_at_time`. + */ climate_preset_key?: string | undefined + /** + * Time at which the thermostat daily program period starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at_time?: string | undefined }> + /** + * ID of the thermostat daily program that you want to update. + */ thermostat_daily_program_id: string } diff --git a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts index feda5b7d..d732cc1e 100644 --- a/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts +++ b/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts @@ -161,6 +161,9 @@ export class SeamHttpThermostatsSchedules { await clientSessions.get() } + /** + * Creates a new [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ create( parameters: ThermostatsSchedulesCreateParameters, options: ThermostatsSchedulesCreateOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpThermostatsSchedules { }) } + /** + * Deletes a [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ delete( parameters: ThermostatsSchedulesDeleteParameters, options: ThermostatsSchedulesDeleteOptions = {}, @@ -187,6 +193,9 @@ export class SeamHttpThermostatsSchedules { }) } + /** + * Returns a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ get( parameters: ThermostatsSchedulesGetParameters, options: ThermostatsSchedulesGetOptions = {}, @@ -200,6 +209,9 @@ export class SeamHttpThermostatsSchedules { }) } + /** + * Returns a list of all [thermostat schedules](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ list( parameters: ThermostatsSchedulesListParameters, options: ThermostatsSchedulesListOptions = {}, @@ -213,6 +225,9 @@ export class SeamHttpThermostatsSchedules { }) } + /** + * Updates a specified [thermostat schedule](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules). + */ update( parameters: ThermostatsSchedulesUpdateParameters, options: ThermostatsSchedulesUpdateOptions = {}, @@ -228,15 +243,36 @@ export class SeamHttpThermostatsSchedules { } export type ThermostatsSchedulesCreateParameters = { + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the new thermostat schedule. + */ climate_preset_key: string + /** + * ID of the thermostat device for which you want to create a schedule. + */ device_id: string + /** + * Date and time at which the new thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ ends_at: string + /** + * Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the new schedule is active. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ is_override_allowed?: boolean | undefined + /** + * Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ max_override_period_minutes?: number | undefined + /** + * Name of the thermostat schedule. + */ name?: string | undefined + /** + * Date and time at which the new thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at: string } @@ -255,6 +291,9 @@ export type ThermostatsSchedulesCreateRequest = SeamHttpRequest< export interface ThermostatsSchedulesCreateOptions {} export type ThermostatsSchedulesDeleteParameters = { + /** + * ID of the thermostat schedule that you want to delete. + */ thermostat_schedule_id: string } @@ -268,6 +307,9 @@ export type ThermostatsSchedulesDeleteRequest = SeamHttpRequest export interface ThermostatsSchedulesDeleteOptions {} export type ThermostatsSchedulesGetParameters = { + /** + * ID of the thermostat schedule that you want to get. + */ thermostat_schedule_id: string } @@ -286,8 +328,14 @@ export type ThermostatsSchedulesGetRequest = SeamHttpRequest< export interface ThermostatsSchedulesGetOptions {} export type ThermostatsSchedulesListParameters = { + /** + * ID of the thermostat device for which you want to list schedules. + */ device_id: string + /** + * User identifier key by which to filter the list of returned thermostat schedules. + */ user_identifier_key?: string | undefined } @@ -306,12 +354,33 @@ export type ThermostatsSchedulesListRequest = SeamHttpRequest< export interface ThermostatsSchedulesListOptions {} export type ThermostatsSchedulesUpdateParameters = { + /** + * Key of the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) to use for the thermostat schedule. + */ climate_preset_key?: string | undefined + /** + * Date and time at which the thermostat schedule ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ ends_at?: string | undefined + /** + * Indicates whether a person at the thermostat or using the API can change the thermostat's settings while the schedule is active. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ is_override_allowed?: boolean | undefined + /** + * Number of minutes for which a person at the thermostat or using the API can change the thermostat's settings after the activation of the scheduled climate preset. See also [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + */ max_override_period_minutes?: number | undefined + /** + * Name of the thermostat schedule. + */ name?: string | undefined + /** + * Date and time at which the thermostat schedule starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. + */ starts_at?: string | undefined + /** + * ID of the thermostat schedule that you want to update. + */ thermostat_schedule_id: string } diff --git a/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts b/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts index 48f6e491..e723928e 100644 --- a/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts +++ b/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts @@ -160,6 +160,9 @@ export class SeamHttpThermostatsSimulate { await clientSessions.get() } + /** + * Simulates having adjusted the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) for a [thermostat](https://docs.seam.co/capability-guides/thermostats). Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + */ hvacModeAdjusted( parameters: ThermostatsSimulateHvacModeAdjustedParameters, options: ThermostatsSimulateHvacModeAdjustedOptions = {}, @@ -173,6 +176,9 @@ export class SeamHttpThermostatsSimulate { }) } + /** + * Simulates a [thermostat](https://docs.seam.co/capability-guides/thermostats) reaching a specified temperature. Only applicable for [sandbox devices](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). See also [Testing Your Thermostat App with Simulate Endpoints](https://docs.seam.co/capability-guides/thermostats/testing-your-thermostat-app-with-simulate-endpoints). + */ temperatureReached( parameters: ThermostatsSimulateTemperatureReachedParameters, options: ThermostatsSimulateTemperatureReachedOptions = {}, @@ -188,13 +194,31 @@ export class SeamHttpThermostatsSimulate { } export type ThermostatsSimulateHvacModeAdjustedParameters = { + /** + * ID of the thermostat device for which you want to simulate having adjusted the HVAC mode. + */ device_id: string + /** + * HVAC mode that you want to simulate. + */ hvac_mode: 'off' | 'cool' | 'heat' | 'heat_cool' + /** + * Cooling [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `cooling_set_point_celsius` or `cooling_set_point_fahrenheit`. + */ cooling_set_point_celsius?: number | undefined + /** + * Cooling [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `cooling_set_point_fahrenheit` or `cooling_set_point_celsius`. + */ cooling_set_point_fahrenheit?: number | undefined + /** + * Heating [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to simulate. You must set `heating_set_point_celsius` or `heating_set_point_fahrenheit`. + */ heating_set_point_celsius?: number | undefined + /** + * Heating [set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to simulate. You must set `heating_set_point_fahrenheit` or `heating_set_point_celsius`. + */ heating_set_point_fahrenheit?: number | undefined } @@ -211,9 +235,18 @@ export type ThermostatsSimulateHvacModeAdjustedRequest = SeamHttpRequest< export interface ThermostatsSimulateHvacModeAdjustedOptions {} export type ThermostatsSimulateTemperatureReachedParameters = { + /** + * ID of the thermostat device that you want to simulate reaching a specified temperature. + */ device_id: string + /** + * Temperature in °C that you want simulate the thermostat reaching. You must set `temperature_celsius` or `temperature_fahrenheit`. + */ temperature_celsius?: number | undefined + /** + * Temperature in °F that you want simulate the thermostat reaching. You must set `temperature_fahrenheit` or `temperature_celsius`. + */ temperature_fahrenheit?: number | undefined } diff --git a/src/lib/seam/connect/routes/thermostats/thermostats.ts b/src/lib/seam/connect/routes/thermostats/thermostats.ts index 0124be30..34e91dd6 100644 --- a/src/lib/seam/connect/routes/thermostats/thermostats.ts +++ b/src/lib/seam/connect/routes/thermostats/thermostats.ts @@ -181,6 +181,9 @@ export class SeamHttpThermostats { return SeamHttpThermostatsSimulate.fromClient(this.client, this.defaults) } + /** + * Activates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ activateClimatePreset( parameters: ThermostatsActivateClimatePresetParameters, options: ThermostatsActivateClimatePresetOptions = {}, @@ -194,6 +197,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [cool mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ cool( parameters: ThermostatsCoolParameters, options: ThermostatsCoolOptions = {}, @@ -207,6 +213,9 @@ export class SeamHttpThermostats { }) } + /** + * Creates a [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ createClimatePreset( parameters: ThermostatsCreateClimatePresetParameters, options: ThermostatsCreateClimatePresetOptions = {}, @@ -220,6 +229,9 @@ export class SeamHttpThermostats { }) } + /** + * Deletes a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ deleteClimatePreset( parameters: ThermostatsDeleteClimatePresetParameters, options: ThermostatsDeleteClimatePresetOptions = {}, @@ -233,6 +245,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ heat( parameters: ThermostatsHeatParameters, options: ThermostatsHeatOptions = {}, @@ -246,6 +261,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to [heat-cool ("auto") mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ heatCool( parameters: ThermostatsHeatCoolParameters, options: ThermostatsHeatCoolOptions = {}, @@ -259,6 +277,9 @@ export class SeamHttpThermostats { }) } + /** + * Returns a list of all [thermostats](https://docs.seam.co/capability-guides/thermostats). + */ list( parameters?: ThermostatsListParameters, options: ThermostatsListOptions = {}, @@ -272,6 +293,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets a specified [thermostat](https://docs.seam.co/capability-guides/thermostats) to ["off" mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings). + */ off( parameters: ThermostatsOffParameters, options: ThermostatsOffOptions = {}, @@ -285,6 +309,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) as the ["fallback"](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets/setting-the-fallback-climate-preset) preset for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ setFallbackClimatePreset( parameters: ThermostatsSetFallbackClimatePresetParameters, options: ThermostatsSetFallbackClimatePresetOptions = {}, @@ -298,6 +325,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets the [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ setFanMode( parameters: ThermostatsSetFanModeParameters, options: ThermostatsSetFanModeOptions = {}, @@ -311,6 +341,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets the [HVAC mode](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ setHvacMode( parameters: ThermostatsSetHvacModeParameters, options: ThermostatsSetHvacModeOptions = {}, @@ -324,6 +357,9 @@ export class SeamHttpThermostats { }) } + /** + * Sets a [temperature threshold](https://docs.seam.co/capability-guides/thermostats/setting-and-monitoring-temperature-thresholds) for a specified thermostat. Seam emits a `thermostat.temperature_threshold_exceeded` event and adds a warning on a thermostat if it reports a temperature outside the threshold range. + */ setTemperatureThreshold( parameters: ThermostatsSetTemperatureThresholdParameters, options: ThermostatsSetTemperatureThresholdOptions = {}, @@ -337,6 +373,9 @@ export class SeamHttpThermostats { }) } + /** + * Updates a specified [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets) for a specified [thermostat](https://docs.seam.co/capability-guides/thermostats). + */ updateClimatePreset( parameters: ThermostatsUpdateClimatePresetParameters, options: ThermostatsUpdateClimatePresetOptions = {}, @@ -350,6 +389,9 @@ export class SeamHttpThermostats { }) } + /** + * Updates the thermostat weekly program for a thermostat device. To configure a weekly program, specify the ID of the daily program that you want to use for each day of the week. When you update a weekly program, the set of programs that you specify overwrites any previous weekly program for the thermostat. + */ updateWeeklyProgram( parameters: ThermostatsUpdateWeeklyProgramParameters, options: ThermostatsUpdateWeeklyProgramOptions = {}, @@ -365,8 +407,14 @@ export class SeamHttpThermostats { } export type ThermostatsActivateClimatePresetParameters = { + /** + * Climate preset key of the climate preset that you want to activate. + */ climate_preset_key: string + /** + * ID of the thermostat device for which you want to activate a climate preset. + */ device_id: string } @@ -388,8 +436,17 @@ export type ThermostatsActivateClimatePresetOptions = Pick< > export type ThermostatsCoolParameters = { + /** + * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + */ cooling_set_point_celsius?: number | undefined + /** + * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + */ cooling_set_point_fahrenheit?: number | undefined + /** + * ID of the thermostat device that you want to set to cool mode. + */ device_id: string } @@ -409,26 +466,72 @@ export type ThermostatsCoolOptions = Pick< > export type ThermostatsCreateClimatePresetParameters = { + /** + * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ climate_preset_key: string + /** + * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + */ climate_preset_mode?: 'home' | 'away' | 'wake' | 'sleep' | 'occupied' | 'unoccupied' | undefined + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_fahrenheit?: number | undefined + /** + * ID of the thermostat device for which you want create a climate preset. + */ device_id: string + /** + * Metadata specific to the Ecobee climate, if applicable. + */ ecobee_metadata?: | { + /** + * Reference to the Ecobee climate, if applicable. + */ climate_ref?: string | undefined + /** + * Indicates if the climate preset is optimized by Ecobee. + */ is_optimized?: boolean | undefined + /** + * Indicates whether the climate preset is owned by the user or the system. + */ owner?: 'user' | 'system' | undefined } | undefined + /** + * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_fahrenheit?: number | undefined + /** + * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + /** + * Indicates whether a person at the thermostat or using the API can change the thermostat's settings. + * @deprecated Use 'thermostat_schedule.is_override_allowed' + */ manual_override_allowed?: boolean | undefined + /** + * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ name?: string | undefined } @@ -445,8 +548,14 @@ export type ThermostatsCreateClimatePresetRequest = SeamHttpRequest< export interface ThermostatsCreateClimatePresetOptions {} export type ThermostatsDeleteClimatePresetParameters = { + /** + * Climate preset key of the climate preset that you want to delete. + */ climate_preset_key: string + /** + * ID of the thermostat device for which you want to delete a climate preset. + */ device_id: string } @@ -463,9 +572,18 @@ export type ThermostatsDeleteClimatePresetRequest = SeamHttpRequest< export interface ThermostatsDeleteClimatePresetOptions {} export type ThermostatsHeatParameters = { + /** + * ID of the thermostat device that you want to set to heat mode. + */ device_id: string + /** + * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + */ heating_set_point_celsius?: number | undefined + /** + * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + */ heating_set_point_fahrenheit?: number | undefined } @@ -485,11 +603,26 @@ export type ThermostatsHeatOptions = Pick< > export type ThermostatsHeatCoolParameters = { + /** + * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + */ cooling_set_point_celsius?: number | undefined + /** + * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + */ cooling_set_point_fahrenheit?: number | undefined + /** + * ID of the thermostat device that you want to set to heat-cool mode. + */ device_id: string + /** + * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + */ heating_set_point_celsius?: number | undefined + /** + * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + */ heating_set_point_fahrenheit?: number | undefined } @@ -509,13 +642,37 @@ export type ThermostatsHeatCoolOptions = Pick< > export type ThermostatsListParameters = { + /** + * ID of the Connect Webview for which you want to list devices. + */ connect_webview_id?: string | undefined + /** + * ID of the connected account for which you want to list devices. + */ connected_account_id?: string | undefined + /** + * Array of IDs of the connected accounts for which you want to list devices. + */ connected_account_ids?: Array | undefined + /** + * Timestamp by which to limit returned devices. Returns devices created before this timestamp. + */ created_before?: string | undefined + /** + * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices. + */ custom_metadata_has?: Record | undefined + /** + * Customer key for which you want to list devices. + */ customer_key?: string | undefined + /** + * Array of device IDs for which you want to list devices. + */ device_ids?: Array | undefined + /** + * Device type by which you want to filter thermostat devices. + */ device_type?: | 'ecobee_thermostat' | 'nest_thermostat' @@ -524,6 +681,9 @@ export type ThermostatsListParameters = { | 'sensi_thermostat' | 'smartthings_thermostat' | undefined + /** + * Array of device types by which you want to filter thermostat devices. + */ device_types?: | Array< | 'ecobee_thermostat' @@ -534,7 +694,13 @@ export type ThermostatsListParameters = { | 'smartthings_thermostat' > | undefined + /** + * Numerical limit on the number of devices to return. + */ limit?: number | undefined + /** + * Manufacturer by which you want to filter thermostat devices. + */ manufacturer?: | 'ecobee' | 'honeywell_resideo' @@ -543,10 +709,25 @@ export type ThermostatsListParameters = { | 'smartthings' | 'tado' | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`. + */ search?: string | undefined + /** + * ID of the space for which you want to list devices. + */ space_id?: string | undefined + /** + * @deprecated Use `space_id`. + */ unstable_location_id?: string | undefined + /** + * Your own internal user ID for the user for which you want to list devices. + */ user_identifier_key?: string | undefined } @@ -563,6 +744,9 @@ export type ThermostatsListRequest = SeamHttpRequest< export interface ThermostatsListOptions {} export type ThermostatsOffParameters = { + /** + * ID of the thermostat device that you want to set to off mode. + */ device_id: string } @@ -582,8 +766,14 @@ export type ThermostatsOffOptions = Pick< > export type ThermostatsSetFallbackClimatePresetParameters = { + /** + * Climate preset key of the climate preset that you want to set as the fallback climate preset. + */ climate_preset_key: string + /** + * ID of the thermostat device for which you want to set the fallback climate preset. + */ device_id: string } @@ -600,9 +790,19 @@ export type ThermostatsSetFallbackClimatePresetRequest = SeamHttpRequest< export interface ThermostatsSetFallbackClimatePresetOptions {} export type ThermostatsSetFanModeParameters = { + /** + * ID of the thermostat device for which you want to set the fan mode. + */ device_id: string + /** + * Fan mode setting for the thermostat, such as `auto`, `on`, or `circulate`. + * @deprecated Use `fan_mode_setting` instead. + */ fan_mode?: 'auto' | 'on' | 'circulate' | undefined + /** + * [Fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings) that you want to set for the thermostat. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined } @@ -622,13 +822,28 @@ export type ThermostatsSetFanModeOptions = Pick< > export type ThermostatsSetHvacModeParameters = { + /** + * ID of the thermostat device for which you want to set the HVAC mode. + */ device_id: string hvac_mode_setting: 'off' | 'cool' | 'heat' | 'heat_cool' | 'eco' + /** + * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + */ cooling_set_point_celsius?: number | undefined + /** + * [Cooling set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `cooling_set_point` parameters. + */ cooling_set_point_fahrenheit?: number | undefined + /** + * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °C that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + */ heating_set_point_celsius?: number | undefined + /** + * [Heating set point](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points) in °F that you want to set for the thermostat. You must set one of the `heating_set_point` parameters. + */ heating_set_point_fahrenheit?: number | undefined } @@ -648,11 +863,26 @@ export type ThermostatsSetHvacModeOptions = Pick< > export type ThermostatsSetTemperatureThresholdParameters = { + /** + * ID of the thermostat device for which you want to set a temperature threshold. + */ device_id: string + /** + * Lower temperature limit in in °C. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. + */ lower_limit_celsius?: number | undefined + /** + * Lower temperature limit in in °F. Seam alerts you if the reported temperature is lower than this value. You can specify either `lower_limit` but not both. + */ lower_limit_fahrenheit?: number | undefined + /** + * Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. + */ upper_limit_celsius?: number | undefined + /** + * Upper temperature limit in in °C. Seam alerts you if the reported temperature is higher than this value. You can specify either `upper_limit` but not both. + */ upper_limit_fahrenheit?: number | undefined } @@ -669,26 +899,72 @@ export type ThermostatsSetTemperatureThresholdRequest = SeamHttpRequest< export interface ThermostatsSetTemperatureThresholdOptions {} export type ThermostatsUpdateClimatePresetParameters = { + /** + * Unique key to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ climate_preset_key: string + /** + * The climate preset mode for the thermostat, based on the available climate preset modes reported by the device. + */ climate_preset_mode?: 'home' | 'away' | 'wake' | 'sleep' | 'occupied' | 'unoccupied' | undefined + /** + * Temperature to which the thermostat should cool (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should cool (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ cooling_set_point_fahrenheit?: number | undefined + /** + * ID of the thermostat device for which you want to update a climate preset. + */ device_id: string + /** + * Metadata specific to the Ecobee climate, if applicable. + */ ecobee_metadata?: | { + /** + * Reference to the Ecobee climate, if applicable. + */ climate_ref?: string | undefined + /** + * Indicates if the climate preset is optimized by Ecobee. + */ is_optimized?: boolean | undefined + /** + * Indicates whether the climate preset is owned by the user or the system. + */ owner?: 'user' | 'system' | undefined } | undefined + /** + * Desired [fan mode setting](https://docs.seam.co/capability-guides/thermostats/configure-current-climate-settings#fan-mode-settings), such as `on`, `auto`, or `circulate`. + */ fan_mode_setting?: 'auto' | 'on' | 'circulate' | undefined + /** + * Temperature to which the thermostat should heat (in °C). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_celsius?: number | undefined + /** + * Temperature to which the thermostat should heat (in °F). See also [Set Points](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/set-points). + */ heating_set_point_fahrenheit?: number | undefined + /** + * Desired [HVAC mode](https://docs.seam.co/capability-guides/thermostats/understanding-thermostat-concepts/hvac-mode) setting, such as `heat`, `cool`, `heat_cool`, or `off`. + */ hvac_mode_setting?: 'off' | 'heat' | 'cool' | 'heat_cool' | 'eco' | undefined + /** + * Indicates whether a person at the thermostat can change the thermostat's settings. See [Specifying Manual Override Permissions](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-thermostat-schedules#specifying-manual-override-permissions). + * @deprecated Use 'thermostat_schedule.is_override_allowed' + */ manual_override_allowed?: boolean | undefined + /** + * User-friendly name to identify the [climate preset](https://docs.seam.co/capability-guides/thermostats/creating-and-managing-climate-presets). + */ name?: string | undefined } @@ -705,14 +981,38 @@ export type ThermostatsUpdateClimatePresetRequest = SeamHttpRequest< export interface ThermostatsUpdateClimatePresetOptions {} export type ThermostatsUpdateWeeklyProgramParameters = { + /** + * ID of the thermostat device for which you want to update the weekly program. + */ device_id: string + /** + * ID of the thermostat daily program to run on Fridays. + */ friday_program_id?: string | undefined + /** + * ID of the thermostat daily program to run on Mondays. + */ monday_program_id?: string | undefined + /** + * ID of the thermostat daily program to run on Saturdays. + */ saturday_program_id?: string | undefined + /** + * ID of the thermostat daily program to run on Sundays. + */ sunday_program_id?: string | undefined + /** + * ID of the thermostat daily program to run on Thursdays. + */ thursday_program_id?: string | undefined + /** + * ID of the thermostat daily program to run on Tuesdays. + */ tuesday_program_id?: string | undefined + /** + * ID of the thermostat daily program to run on Wednesdays. + */ wednesday_program_id?: string | undefined } 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 052726ed..1ca566e0 100644 --- a/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +++ b/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts @@ -164,6 +164,9 @@ export class SeamHttpUserIdentitiesUnmanaged { await clientSessions.get() } + /** + * Returns a specified unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + */ get( parameters: UserIdentitiesUnmanagedGetParameters, options: UserIdentitiesUnmanagedGetOptions = {}, @@ -177,6 +180,9 @@ export class SeamHttpUserIdentitiesUnmanaged { }) } + /** + * Returns a list of all unmanaged [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) (where is_managed = false). + */ list( parameters?: UserIdentitiesUnmanagedListParameters, options: UserIdentitiesUnmanagedListOptions = {}, @@ -190,6 +196,11 @@ export class SeamHttpUserIdentitiesUnmanaged { }) } + /** + * Updates an unmanaged [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) to make it managed. + * + * This endpoint can only be used to convert unmanaged user identities to managed ones by setting `is_managed` to `true`. It cannot be used to convert managed user identities back to unmanaged. + */ update( parameters: UserIdentitiesUnmanagedUpdateParameters, options: UserIdentitiesUnmanagedUpdateOptions = {}, @@ -205,6 +216,9 @@ export class SeamHttpUserIdentitiesUnmanaged { } export type UserIdentitiesUnmanagedGetParameters = { + /** + * ID of the unmanaged user identity that you want to get. + */ user_identity_id: string } @@ -223,9 +237,21 @@ export type UserIdentitiesUnmanagedGetRequest = SeamHttpRequest< export interface UserIdentitiesUnmanagedGetOptions {} export type UserIdentitiesUnmanagedListParameters = { + /** + * Timestamp by which to limit returned unmanaged user identities. Returns user identities created before this timestamp. + */ created_before?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned unmanaged user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address`, `user_identity_id` or `acs_system_id`. + */ search?: string | undefined } @@ -244,10 +270,19 @@ export type UserIdentitiesUnmanagedListRequest = SeamHttpRequest< export interface UserIdentitiesUnmanagedListOptions {} export type UserIdentitiesUnmanagedUpdateParameters = { + /** + * Must be set to true to convert the unmanaged user identity to managed. + */ is_managed: boolean + /** + * ID of the unmanaged user identity that you want to update. + */ user_identity_id: string + /** + * Unique key for the user identity. If not provided, the existing key will be preserved. + */ user_identity_key?: string | undefined } 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 c243c03d..257064dd 100644 --- a/src/lib/seam/connect/routes/user-identities/user-identities.ts +++ b/src/lib/seam/connect/routes/user-identities/user-identities.ts @@ -175,6 +175,13 @@ export class SeamHttpUserIdentities { ) } + /** + * Adds a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + * + * You must specify either `user_identity_id` or `user_identity_key` to identify the user identity. + * + * If `user_identity_key` is provided, but the user identity doesn't exist, a new user identity will be created automatically using information from the ACS user. + */ addAcsUser( parameters: UserIdentitiesAddAcsUserParameters, options: UserIdentitiesAddAcsUserOptions = {}, @@ -188,6 +195,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Creates a new [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ create( parameters?: UserIdentitiesCreateParameters, options: UserIdentitiesCreateOptions = {}, @@ -201,6 +211,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Deletes a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This deletes the user identity and all associated resources, including any [credentials](https://docs.seam.co/api/acs/credentials), [acs users](https://docs.seam.co/api/acs/users) and [client sessions](https://docs.seam.co/api/client_sessions). + */ delete( parameters: UserIdentitiesDeleteParameters, options: UserIdentitiesDeleteOptions = {}, @@ -214,6 +227,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Generates a new [instant key](https://docs.seam.co/capability-guides/instant-keys) for a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ generateInstantKey( parameters: UserIdentitiesGenerateInstantKeyParameters, options: UserIdentitiesGenerateInstantKeyOptions = {}, @@ -227,6 +243,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Returns a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ get( parameters?: UserIdentitiesGetParameters, options: UserIdentitiesGetOptions = {}, @@ -240,6 +259,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Grants a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) access to a specified [device](https://docs.seam.co/core-concepts/devices/). + */ grantAccessToDevice( parameters: UserIdentitiesGrantAccessToDeviceParameters, options: UserIdentitiesGrantAccessToDeviceOptions = {}, @@ -253,6 +275,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Returns a list of all [user identities](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ list( parameters?: UserIdentitiesListParameters, options: UserIdentitiesListOptions = {}, @@ -266,6 +291,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Returns a list of all [devices](https://docs.seam.co/core-concepts/devices) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes devices derived from the access grants assigned to the user identity and devices directly linked to the user identity. + */ listAccessibleDevices( parameters: UserIdentitiesListAccessibleDevicesParameters, options: UserIdentitiesListAccessibleDevicesOptions = {}, @@ -279,6 +307,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Returns a list of all [ACS entrances](https://docs.seam.co/api/acs/entrances) accessible to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). This includes entrances derived from the access grants assigned to the user identity and entrances accessible through ACS users linked to the user identity. + */ listAccessibleEntrances( parameters: UserIdentitiesListAccessibleEntrancesParameters, options: UserIdentitiesListAccessibleEntrancesOptions = {}, @@ -292,6 +323,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Returns a list of all [access systems](https://docs.seam.co/low-level-apis/access-systems) associated with a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ listAcsSystems( parameters: UserIdentitiesListAcsSystemsParameters, options: UserIdentitiesListAcsSystemsOptions = {}, @@ -305,6 +339,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Returns a list of all [access system users](https://docs.seam.co/low-level-apis/access-systems/user-management) assigned to a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ listAcsUsers( parameters: UserIdentitiesListAcsUsersParameters, options: UserIdentitiesListAcsUsersOptions = {}, @@ -318,6 +355,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Removes a specified [access system user](https://docs.seam.co/low-level-apis/access-systems/user-management) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ removeAcsUser( parameters: UserIdentitiesRemoveAcsUserParameters, options: UserIdentitiesRemoveAcsUserOptions = {}, @@ -331,6 +371,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Revokes access to a specified [device](https://docs.seam.co/core-concepts/devices/) from a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ revokeAccessToDevice( parameters: UserIdentitiesRevokeAccessToDeviceParameters, options: UserIdentitiesRevokeAccessToDeviceOptions = {}, @@ -344,6 +387,9 @@ export class SeamHttpUserIdentities { }) } + /** + * Updates a specified [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity). + */ update( parameters: UserIdentitiesUpdateParameters, options: UserIdentitiesUpdateOptions = {}, @@ -359,9 +405,18 @@ export class SeamHttpUserIdentities { } export type UserIdentitiesAddAcsUserParameters = { + /** + * ID of the access system user that you want to add to the user identity. + */ acs_user_id: string + /** + * ID of the user identity to which you want to add an access system user. + */ user_identity_id?: string | undefined + /** + * Key of the user identity to which you want to add an access system user. + */ user_identity_key?: string | undefined } @@ -375,10 +430,25 @@ export type UserIdentitiesAddAcsUserRequest = SeamHttpRequest export interface UserIdentitiesAddAcsUserOptions {} export type UserIdentitiesCreateParameters = { + /** + * List of access system IDs to associate with the new user identity through access system users. If there's no user with the same email address or phone number in the specified access systems, a new access system user is created. If there is an existing user with the same email or phone number in the specified access systems, the user is linked to the user identity. + */ acs_system_ids?: Array | undefined + /** + * Unique email address for the new user identity. + */ email_address?: string | undefined + /** + * Full name of the user associated with the new user identity. + */ full_name?: string | undefined + /** + * Unique phone number for the new user identity in E.164 format (for example, +15555550100). + */ phone_number?: string | undefined + /** + * Unique key for the new user identity. + */ user_identity_key?: string | undefined } @@ -395,6 +465,9 @@ export type UserIdentitiesCreateRequest = SeamHttpRequest< export interface UserIdentitiesCreateOptions {} export type UserIdentitiesDeleteParameters = { + /** + * ID of the user identity that you want to delete. + */ user_identity_id: string } @@ -409,7 +482,13 @@ export interface UserIdentitiesDeleteOptions {} export type UserIdentitiesGenerateInstantKeyParameters = { customization_profile_id?: string | undefined + /** + * Maximum number of times the instant key can be used. Default: 1. + */ max_use_count?: number | undefined + /** + * ID of the user identity for which you want to generate an instant key. + */ user_identity_id: string } @@ -428,7 +507,11 @@ export type UserIdentitiesGenerateInstantKeyRequest = SeamHttpRequest< export interface UserIdentitiesGenerateInstantKeyOptions {} export type UserIdentitiesGetParameters = { + /** + * ID of the user identity that you want to get. + */ user_identity_id?: string | undefined + user_identity_key?: string | undefined } @@ -445,8 +528,14 @@ export type UserIdentitiesGetRequest = SeamHttpRequest< export interface UserIdentitiesGetOptions {} export type UserIdentitiesGrantAccessToDeviceParameters = { + /** + * ID of the managed device to which you want to grant access to the user identity. + */ device_id: string + /** + * ID of the user identity that you want to grant access to a device. + */ user_identity_id: string } @@ -463,11 +552,29 @@ export type UserIdentitiesGrantAccessToDeviceRequest = SeamHttpRequest< export interface UserIdentitiesGrantAccessToDeviceOptions {} export type UserIdentitiesListParameters = { + /** + * Timestamp by which to limit returned user identities. Returns user identities created before this timestamp. + */ created_before?: string | undefined + /** + * `acs_system_id` of the credential manager by which you want to filter the list of user identities. + */ credential_manager_acs_system_id?: string | undefined + /** + * Maximum number of records to return per page. + */ limit?: number | undefined + /** + * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`. + */ page_cursor?: string | undefined + /** + * String for which to search. Filters returned user identities to include all records that satisfy a partial match using `full_name`, `phone_number`, `email_address` or `user_identity_id`. + */ search?: string | undefined + /** + * Array of user identity IDs by which to filter the list of user identities. + */ user_identity_ids?: Array | undefined } @@ -486,6 +593,9 @@ export type UserIdentitiesListRequest = SeamHttpRequest< export interface UserIdentitiesListOptions {} export type UserIdentitiesListAccessibleDevicesParameters = { + /** + * ID of the user identity for which you want to retrieve all accessible devices. + */ user_identity_id: string } @@ -504,6 +614,9 @@ export type UserIdentitiesListAccessibleDevicesRequest = SeamHttpRequest< export interface UserIdentitiesListAccessibleDevicesOptions {} export type UserIdentitiesListAccessibleEntrancesParameters = { + /** + * ID of the user identity for which you want to retrieve all accessible entrances. + */ user_identity_id: string } @@ -522,6 +635,9 @@ export type UserIdentitiesListAccessibleEntrancesRequest = SeamHttpRequest< export interface UserIdentitiesListAccessibleEntrancesOptions {} export type UserIdentitiesListAcsSystemsParameters = { + /** + * ID of the user identity for which you want to retrieve all access systems. + */ user_identity_id: string } @@ -540,6 +656,9 @@ export type UserIdentitiesListAcsSystemsRequest = SeamHttpRequest< export interface UserIdentitiesListAcsSystemsOptions {} export type UserIdentitiesListAcsUsersParameters = { + /** + * ID of the user identity for which you want to retrieve all access system users. + */ user_identity_id: string } @@ -556,8 +675,14 @@ export type UserIdentitiesListAcsUsersRequest = SeamHttpRequest< export interface UserIdentitiesListAcsUsersOptions {} export type UserIdentitiesRemoveAcsUserParameters = { + /** + * ID of the access system user that you want to remove from the user identity.. + */ acs_user_id: string + /** + * ID of the user identity from which you want to remove an access system user. + */ user_identity_id: string } @@ -574,8 +699,14 @@ export type UserIdentitiesRemoveAcsUserRequest = SeamHttpRequest< export interface UserIdentitiesRemoveAcsUserOptions {} export type UserIdentitiesRevokeAccessToDeviceParameters = { + /** + * ID of the managed device to which you want to revoke access from the user identity. + */ device_id: string + /** + * ID of the user identity from which you want to revoke access to a device. + */ user_identity_id: string } @@ -592,11 +723,26 @@ export type UserIdentitiesRevokeAccessToDeviceRequest = SeamHttpRequest< export interface UserIdentitiesRevokeAccessToDeviceOptions {} export type UserIdentitiesUpdateParameters = { + /** + * Unique email address for the user identity. + */ email_address?: string | undefined + /** + * Full name of the user associated with the user identity. + */ full_name?: string | undefined + /** + * Unique phone number for the user identity. + */ phone_number?: string | undefined + /** + * ID of the user identity that you want to update. + */ user_identity_id: string + /** + * Unique key for the user identity. + */ user_identity_key?: string | undefined } diff --git a/src/lib/seam/connect/routes/webhooks/webhooks.ts b/src/lib/seam/connect/routes/webhooks/webhooks.ts index f3a63d09..7fb60177 100644 --- a/src/lib/seam/connect/routes/webhooks/webhooks.ts +++ b/src/lib/seam/connect/routes/webhooks/webhooks.ts @@ -161,6 +161,9 @@ export class SeamHttpWebhooks { await clientSessions.get() } + /** + * Creates a new [webhook](https://docs.seam.co/developer-tools/webhooks). + */ create( parameters: WebhooksCreateParameters, options: WebhooksCreateOptions = {}, @@ -174,6 +177,9 @@ export class SeamHttpWebhooks { }) } + /** + * Deletes a specified [webhook](https://docs.seam.co/developer-tools/webhooks). + */ delete( parameters: WebhooksDeleteParameters, options: WebhooksDeleteOptions = {}, @@ -187,6 +193,9 @@ export class SeamHttpWebhooks { }) } + /** + * Gets a specified [webhook](https://docs.seam.co/developer-tools/webhooks). + */ get( parameters: WebhooksGetParameters, options: WebhooksGetOptions = {}, @@ -200,6 +209,9 @@ export class SeamHttpWebhooks { }) } + /** + * Returns a list of all [webhooks](https://docs.seam.co/developer-tools/webhooks). + */ list( parameters?: WebhooksListParameters, options: WebhooksListOptions = {}, @@ -213,6 +225,9 @@ export class SeamHttpWebhooks { }) } + /** + * Updates a specified [webhook](https://docs.seam.co/developer-tools/webhooks). + */ update( parameters: WebhooksUpdateParameters, options: WebhooksUpdateOptions = {}, @@ -228,7 +243,13 @@ export class SeamHttpWebhooks { } export type WebhooksCreateParameters = { + /** + * Types of events that you want the new webhook to receive. + */ event_types?: Array | undefined + /** + * URL for the new webhook. + */ url: string } @@ -245,6 +266,9 @@ export type WebhooksCreateRequest = SeamHttpRequest< export interface WebhooksCreateOptions {} export type WebhooksDeleteParameters = { + /** + * ID of the webhook that you want to delete. + */ webhook_id: string } @@ -258,6 +282,9 @@ export type WebhooksDeleteRequest = SeamHttpRequest export interface WebhooksDeleteOptions {} export type WebhooksGetParameters = { + /** + * ID of the webhook that you want to get. + */ webhook_id: string } @@ -285,8 +312,14 @@ export type WebhooksListRequest = SeamHttpRequest< export interface WebhooksListOptions {} export type WebhooksUpdateParameters = { + /** + * Types of events that you want the webhook to receive. + */ event_types: Array + /** + * ID of the webhook that you want to update. + */ webhook_id: string } diff --git a/src/lib/seam/connect/routes/workspaces/workspaces.ts b/src/lib/seam/connect/routes/workspaces/workspaces.ts index a8145330..922bdcf6 100644 --- a/src/lib/seam/connect/routes/workspaces/workspaces.ts +++ b/src/lib/seam/connect/routes/workspaces/workspaces.ts @@ -162,6 +162,9 @@ export class SeamHttpWorkspaces { await clientSessions.get() } + /** + * Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces). + */ create( parameters: WorkspacesCreateParameters, options: WorkspacesCreateOptions = {}, @@ -175,6 +178,9 @@ export class SeamHttpWorkspaces { }) } + /** + * Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ get( parameters?: WorkspacesGetParameters, options: WorkspacesGetOptions = {}, @@ -188,6 +194,9 @@ export class SeamHttpWorkspaces { }) } + /** + * Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ list( parameters?: WorkspacesListParameters, options: WorkspacesListOptions = {}, @@ -201,6 +210,9 @@ export class SeamHttpWorkspaces { }) } + /** + * Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces. + */ resetSandbox( parameters?: WorkspacesResetSandboxParameters, options: WorkspacesResetSandboxOptions = {}, @@ -214,6 +226,9 @@ export class SeamHttpWorkspaces { }) } + /** + * Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value. + */ update( parameters?: WorkspacesUpdateParameters, options: WorkspacesUpdateOptions = {}, @@ -229,23 +244,66 @@ export class SeamHttpWorkspaces { } export type WorkspacesCreateParameters = { + /** + * Company name for the new workspace. + */ company_name?: string | undefined + /** + * Connect partner name for the new workspace. + * @deprecated Use `company_name` instead. + */ connect_partner_name?: string | undefined + /** + * [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ connect_webview_customization?: | { + /** + * Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ logo_shape?: 'circle' | 'square' | undefined + /** + * Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ primary_button_color?: string | undefined + /** + * Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ primary_button_text_color?: string | undefined + /** + * Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ success_message?: string | undefined } | undefined + /** + * Indicates whether the new workspace is a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces). + */ is_sandbox?: boolean | undefined + /** + * Name of the new workspace. + */ name: string + /** + * ID of the organization to associate with the new workspace. + */ organization_id?: string | undefined + /** + * @deprecated Use `connect_webview_customization.webview_logo_shape` instead. + */ webview_logo_shape?: 'circle' | 'square' | undefined + /** + * @deprecated Use `connect_webview_customization.webview_primary_button_color` instead. + */ webview_primary_button_color?: string | undefined + /** + * @deprecated Use `connect_webview_customization.webview_primary_button_text_color` instead. + */ webview_primary_button_text_color?: string | undefined + /** + * @deprecated Use `connect_webview_customization.webview_success_message` instead. + */ webview_success_message?: string | undefined } @@ -307,18 +365,48 @@ export type WorkspacesResetSandboxOptions = Pick< > export type WorkspacesUpdateParameters = { + /** + * Connect partner name for the workspace. + */ connect_partner_name?: string | undefined + /** + * [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ connect_webview_customization?: | { + /** + * Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ logo_shape?: 'circle' | 'square' | undefined + /** + * Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ primary_button_color?: string | undefined + /** + * Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ primary_button_text_color?: string | undefined + /** + * Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews). + */ success_message?: string | undefined } | undefined + /** + * Indicates whether publishable key authentication is enabled for this workspace. + */ is_publishable_key_auth_enabled?: boolean | undefined + /** + * Indicates whether the workspace is suspended. + */ is_suspended?: boolean | undefined + /** + * Name of the workspace. + */ name?: string | undefined + /** + * ID of the organization to assign the workspace to. The authenticated user must be the owner of the workspace and an admin of the target organization. + */ organization_id?: string | undefined }