import { type Client } from '../../../../seam/connect/client.js'; import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../../../seam/connect/options.js'; import type { ConnectWebview } from '../../../../seam/connect/resources/connect-webview.js'; import { SeamHttpRequest } from '../../../../seam/connect/seam-http-request.js'; import { SeamPaginator } from '../../../../seam/connect/seam-paginator.js'; export declare class SeamHttpConnectWebviews { client: Client; readonly defaults: Required; readonly ltsVersion = "1.0.0"; static ltsVersion: string; constructor(apiKeyOrOptions?: string | SeamHttpOptions); static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit): SeamHttpConnectWebviews; static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit): SeamHttpConnectWebviews; static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit): SeamHttpConnectWebviews; static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise; static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit): SeamHttpConnectWebviews; static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit): SeamHttpConnectWebviews; createPaginator(request: SeamHttpRequest): SeamPaginator; updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise; /** * 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): ConnectWebviewsCreateRequest; /** * 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): ConnectWebviewsDeleteRequest; /** * 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): ConnectWebviewsGetRequest; /** * Returns a list of all [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews). */ list(parameters?: ConnectWebviewsListParameters, options?: ConnectWebviewsListOptions): ConnectWebviewsListRequest; } 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' | 'dormakaba_community' | 'legic_connect' | 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'salto_ks' | 'salto_ks_accept' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'tedee' | 'honeywell_resideo' | 'first_alert' | 'latch' | 'akiles' | 'assa_abloy_vostio' | 'assa_abloy_vostio_credential_service' | 'tado' | 'salto_space' | 'sensi' | 'keynest' | 'korelock' | 'keyincode' | 'dormakaba_ambiance' | 'ultraloq' | 'dusaw' | 'sifely' | 'thirty_three_lock' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'aqara' | 'yale_access' | 'hid_cm' | 'google_nest' | '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' | 'beta' | 'thermostats' | 'noise_sensors' | 'access_control_systems' | 'cameras' | '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; }; /** * @deprecated Use ConnectWebviewsCreateRequest instead. */ export type ConnectWebviewsCreateResponse = { connect_webview: ConnectWebview; }; export type ConnectWebviewsCreateRequest = SeamHttpRequest; export interface ConnectWebviewsCreateOptions { } export type ConnectWebviewsDeleteParameters = { /** * ID of the Connect Webview that you want to delete. */ connect_webview_id: string; }; /** * @deprecated Use ConnectWebviewsDeleteRequest instead. */ export type ConnectWebviewsDeleteResponse = void; export type ConnectWebviewsDeleteRequest = SeamHttpRequest; export interface ConnectWebviewsDeleteOptions { } export type ConnectWebviewsGetParameters = { /** * ID of the Connect Webview that you want to get. */ connect_webview_id: string; }; /** * @deprecated Use ConnectWebviewsGetRequest instead. */ export type ConnectWebviewsGetResponse = { connect_webview: ConnectWebview; }; 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; }; /** * @deprecated Use ConnectWebviewsListRequest instead. */ export type ConnectWebviewsListResponse = { connect_webviews: Array; }; export type ConnectWebviewsListRequest = SeamHttpRequest; export interface ConnectWebviewsListOptions { }