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 { AccessGrant } from '../../../../seam/connect/resources/access-grant.js'; import type { Batch } from '../../../../seam/connect/resources/batch.js'; import { SeamHttpRequest } from '../../../../seam/connect/seam-http-request.js'; import { SeamPaginator } from '../../../../seam/connect/seam-paginator.js'; import { SeamHttpAccessGrantsUnmanaged } from './unmanaged/index.js'; export declare class SeamHttpAccessGrants { client: Client; readonly defaults: Required; readonly ltsVersion = "1.0.0"; static ltsVersion: string; constructor(apiKeyOrOptions?: string | SeamHttpOptions); static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit): SeamHttpAccessGrants; static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit): SeamHttpAccessGrants; static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit): SeamHttpAccessGrants; static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise; static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit): SeamHttpAccessGrants; static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit): SeamHttpAccessGrants; createPaginator(request: SeamHttpRequest): SeamPaginator; updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise; get unmanaged(): SeamHttpAccessGrantsUnmanaged; /** * 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): AccessGrantsCreateRequest; /** * Delete an Access Grant. */ delete(parameters: AccessGrantsDeleteParameters, options?: AccessGrantsDeleteOptions): AccessGrantsDeleteRequest; /** * Get an Access Grant. */ get(parameters?: AccessGrantsGetParameters, options?: AccessGrantsGetOptions): AccessGrantsGetRequest; /** * Gets all related resources for one or more Access Grants. */ getRelated(parameters?: AccessGrantsGetRelatedParameters, options?: AccessGrantsGetRelatedOptions): AccessGrantsGetRelatedRequest; /** * Gets an Access Grant. */ list(parameters?: AccessGrantsListParameters, options?: AccessGrantsListOptions): AccessGrantsListRequest; /** * Adds additional requested access methods to an existing Access Grant. */ requestAccessMethods(parameters: AccessGrantsRequestAccessMethodsParameters, options?: AccessGrantsRequestAccessMethodsOptions): AccessGrantsRequestAccessMethodsRequest; /** * Updates an existing Access Grant's time window. */ update(parameters?: AccessGrantsUpdateParameters, options?: AccessGrantsUpdateOptions): AccessGrantsUpdateRequest; } 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; }; /** * @deprecated Use AccessGrantsCreateRequest instead. */ export type AccessGrantsCreateResponse = { access_grant: AccessGrant; }; export type AccessGrantsCreateRequest = SeamHttpRequest; export interface AccessGrantsCreateOptions { } export type AccessGrantsDeleteParameters = { /** * ID of Access Grant to delete. */ access_grant_id: string; }; /** * @deprecated Use AccessGrantsDeleteRequest instead. */ export type AccessGrantsDeleteResponse = void; 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; }; /** * @deprecated Use AccessGrantsGetRequest instead. */ export type AccessGrantsGetResponse = { access_grant: AccessGrant; }; 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' | 'devices' | 'acs_entrances' | 'connected_accounts' | 'acs_systems' | 'user_identities' | 'acs_access_groups' | 'access_methods'> | undefined; include?: Array<'spaces' | 'devices' | 'acs_entrances' | 'connected_accounts' | 'acs_systems' | 'user_identities' | 'acs_access_groups' | 'access_methods'> | undefined; }; /** * @deprecated Use AccessGrantsGetRelatedRequest instead. */ export type AccessGrantsGetRelatedResponse = { batch: Batch<'spaces' | 'devices' | 'acs_entrances' | 'connected_accounts' | 'acs_systems' | 'user_identities' | 'acs_access_groups' | 'access_methods'>; }; 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; }; /** * @deprecated Use AccessGrantsListRequest instead. */ export type AccessGrantsListResponse = { access_grants: Array; }; 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; }>; }; /** * @deprecated Use AccessGrantsRequestAccessMethodsRequest instead. */ export type AccessGrantsRequestAccessMethodsResponse = { access_grant: AccessGrant; }; 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; }; /** * @deprecated Use AccessGrantsUpdateRequest instead. */ export type AccessGrantsUpdateResponse = void; export type AccessGrantsUpdateRequest = SeamHttpRequest; export interface AccessGrantsUpdateOptions { }