@seamapi/types 1.400.0 → 1.402.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/connect.cjs +652 -8
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +848 -73
  4. package/lib/seam/connect/internal/schemas.d.ts +1 -1
  5. package/lib/seam/connect/internal/schemas.js +1 -1
  6. package/lib/seam/connect/internal/schemas.js.map +1 -1
  7. package/lib/seam/connect/models/index.d.ts +1 -0
  8. package/lib/seam/connect/models/index.js +1 -0
  9. package/lib/seam/connect/models/index.js.map +1 -1
  10. package/lib/seam/connect/models/phones/index.d.ts +2 -0
  11. package/lib/seam/connect/models/phones/index.js +3 -0
  12. package/lib/seam/connect/models/phones/index.js.map +1 -0
  13. package/lib/seam/connect/models/phones/phone-registration.d.ts +18 -0
  14. package/lib/seam/connect/models/phones/phone-registration.js +13 -0
  15. package/lib/seam/connect/models/phones/phone-registration.js.map +1 -0
  16. package/lib/seam/connect/models/phones/phone-session.d.ts +2060 -0
  17. package/lib/seam/connect/models/phones/phone-session.js +21 -0
  18. package/lib/seam/connect/models/phones/phone-session.js.map +1 -0
  19. package/lib/seam/connect/openapi.d.ts +566 -0
  20. package/lib/seam/connect/openapi.js +652 -8
  21. package/lib/seam/connect/openapi.js.map +1 -1
  22. package/lib/seam/connect/route-types.d.ts +213 -4
  23. package/package.json +1 -1
  24. package/src/lib/seam/connect/internal/schemas.ts +2 -0
  25. package/src/lib/seam/connect/models/index.ts +1 -0
  26. package/src/lib/seam/connect/models/phones/index.ts +2 -0
  27. package/src/lib/seam/connect/models/phones/phone-registration.ts +15 -0
  28. package/src/lib/seam/connect/models/phones/phone-session.ts +27 -0
  29. package/src/lib/seam/connect/openapi.ts +720 -8
  30. package/src/lib/seam/connect/route-types.ts +267 -4
@@ -9444,8 +9444,10 @@ export interface Routes {
9444
9444
  method: 'PATCH' | 'POST';
9445
9445
  queryParams: {};
9446
9446
  jsonBody: {
9447
- /** ID of the access system user to whom you want to assign a credential. */
9448
- acs_user_id: string;
9447
+ /** 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. */
9448
+ acs_user_id?: string | undefined;
9449
+ /** 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. */
9450
+ user_identity_id?: string | undefined;
9449
9451
  /** ID of the credential that you want to assign to an access system user. */
9450
9452
  acs_credential_id: string;
9451
9453
  };
@@ -10255,8 +10257,10 @@ export interface Routes {
10255
10257
  method: 'PATCH' | 'POST';
10256
10258
  queryParams: {};
10257
10259
  jsonBody: {
10258
- /** ID of the access system user from which you want to unassign a credential. */
10259
- acs_user_id: string;
10260
+ /** 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. */
10261
+ acs_user_id?: string | undefined;
10262
+ /** 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. */
10263
+ user_identity_id?: string | undefined;
10260
10264
  /** ID of the credential that you want to unassign from an access system user. */
10261
10265
  acs_credential_id: string;
10262
10266
  };
@@ -37430,6 +37434,211 @@ export interface Routes {
37430
37434
  }>;
37431
37435
  };
37432
37436
  };
37437
+ '/seam/mobile_sdk/v1/phone_sessions/get_or_create': {
37438
+ route: '/seam/mobile_sdk/v1/phone_sessions/get_or_create';
37439
+ method: 'POST';
37440
+ queryParams: {};
37441
+ jsonBody: {
37442
+ custom_sdk_installation_id: string;
37443
+ phone_os: 'ios' | 'android';
37444
+ phone_device_metadata?: {
37445
+ os_version?: string | undefined;
37446
+ manufacturer?: string | undefined;
37447
+ model?: string | undefined;
37448
+ } | undefined;
37449
+ };
37450
+ commonParams: {};
37451
+ formData: {};
37452
+ jsonResponse: {
37453
+ /** */
37454
+ phone_session: {
37455
+ provider_sessions: Array<{
37456
+ /** */
37457
+ phone_registration: {
37458
+ phone_registration_id: string;
37459
+ provider_state?: any;
37460
+ provider_name: string | null;
37461
+ is_being_activated: boolean;
37462
+ };
37463
+ acs_credentials: Array<{
37464
+ /** ID of the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37465
+ acs_credential_id: string;
37466
+ /** ID of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) to whom the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) belongs. */
37467
+ acs_user_id?: string | undefined;
37468
+ acs_credential_pool_id?: string | undefined;
37469
+ /** ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37470
+ acs_system_id: string;
37471
+ /** ID of the parent [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37472
+ parent_acs_credential_id?: string | undefined;
37473
+ /** Display name that corresponds to the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) type. */
37474
+ display_name: string;
37475
+ /** Access (PIN) code for the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37476
+ code?: (string | undefined) | null;
37477
+ /** Indicates whether the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) can only be used once. If `true`, the code becomes invalid after the first use. */
37478
+ is_one_time_use?: boolean | undefined;
37479
+ /** Number of the card associated with the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37480
+ card_number?: (string | undefined) | null;
37481
+ /** Indicates whether the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) has been encoded onto a card. */
37482
+ is_issued?: boolean | undefined;
37483
+ /** Date and time at which the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was encoded onto a card. */
37484
+ issued_at?: (string | undefined) | null;
37485
+ /** Access method for the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). Supported values: `code`, `card`, `mobile_key`. */
37486
+ access_method: 'code' | 'card' | 'mobile_key';
37487
+ /** Brand-specific terminology for the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`. */
37488
+ external_type?: ('pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access') | undefined;
37489
+ /** Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) type. */
37490
+ external_type_display_name?: string | undefined;
37491
+ /** Date and time at which the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was created. */
37492
+ created_at: string;
37493
+ /** ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37494
+ workspace_id: string;
37495
+ /** Date and time at which the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. */
37496
+ starts_at?: string | undefined;
37497
+ /** Date and time at which the [credential](https://docs.seam.co/latest/capability-guides/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`. */
37498
+ ends_at?: string | undefined;
37499
+ /** Errors associated with the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37500
+ errors: Array<{
37501
+ error_code: string;
37502
+ message: string;
37503
+ }>;
37504
+ /** Warnings associated with the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37505
+ warnings: Array<{
37506
+ /** Date and time at which Seam created the warning. */
37507
+ created_at: string;
37508
+ /** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
37509
+ message: string;
37510
+ /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
37511
+ warning_code: 'waiting_to_be_issued';
37512
+ } | {
37513
+ /** Date and time at which Seam created the warning. */
37514
+ created_at: string;
37515
+ /** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
37516
+ message: string;
37517
+ /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
37518
+ warning_code: 'schedule_externally_modified';
37519
+ } | {
37520
+ /** Date and time at which Seam created the warning. */
37521
+ created_at: string;
37522
+ /** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
37523
+ message: string;
37524
+ /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
37525
+ warning_code: 'schedule_modified';
37526
+ } | {
37527
+ /** Date and time at which Seam created the warning. */
37528
+ created_at: string;
37529
+ /** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
37530
+ message: string;
37531
+ /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
37532
+ warning_code: 'being_deleted';
37533
+ } | {
37534
+ /** Date and time at which Seam created the warning. */
37535
+ created_at: string;
37536
+ /** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
37537
+ message: string;
37538
+ /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
37539
+ warning_code: 'unknown_issue_with_acs_credential';
37540
+ } | {
37541
+ /** Date and time at which Seam created the warning. */
37542
+ created_at: string;
37543
+ /** Detailed description of the warning. Provides insights into the issue and potentially how to rectify it. */
37544
+ message: string;
37545
+ /** Unique identifier of the type of warning. Enables quick recognition and categorization of the issue. */
37546
+ warning_code: 'needs_to_be_reissued';
37547
+ }>;
37548
+ /** Indicates whether the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) is a [multi-phone sync credential](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials). */
37549
+ is_multi_phone_sync_credential?: boolean | undefined;
37550
+ /** Indicates whether the latest state of the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) has been synced from Seam to the provider. */
37551
+ is_latest_desired_state_synced_with_provider?: (boolean | null) | undefined;
37552
+ /** Date and time at which the state of the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) was most recently synced from Seam to the provider. */
37553
+ latest_desired_state_synced_with_provider_at?: (string | null) | undefined;
37554
+ /** Visionline-specific metadata for the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37555
+ visionline_metadata?: {
37556
+ card_function_type: 'guest' | 'staff';
37557
+ joiner_acs_credential_ids?: string[] | undefined;
37558
+ guest_acs_entrance_ids?: string[] | undefined;
37559
+ common_acs_entrance_ids?: string[] | undefined;
37560
+ is_valid?: boolean | undefined;
37561
+ auto_join?: boolean | undefined;
37562
+ card_id?: string | undefined;
37563
+ credential_id?: string | undefined;
37564
+ } | undefined;
37565
+ /** Vostio-specific metadata for the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials). */
37566
+ assa_abloy_vostio_metadata?: {
37567
+ auto_join?: boolean | undefined;
37568
+ override_guest_acs_entrance_ids?: string[] | undefined;
37569
+ key_id?: string | undefined;
37570
+ key_issuing_request_id?: string | undefined;
37571
+ door_names?: string[] | undefined;
37572
+ endpoint_id?: string | undefined;
37573
+ } | undefined;
37574
+ is_managed: true;
37575
+ acs_entrances: Array<{
37576
+ /** ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37577
+ acs_system_id: string;
37578
+ /** ID of the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37579
+ acs_entrance_id: string;
37580
+ /** Date and time at which the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) was created. */
37581
+ created_at: string;
37582
+ /** Display name for the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37583
+ display_name: string;
37584
+ /** Errors associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37585
+ errors: Array<{
37586
+ /** Unique identifier of the type of error. Enables quick recognition and categorization of the issue. */
37587
+ error_code: string;
37588
+ /** Detailed description of the error. Provides insights into the issue and potentially how to rectify it. */
37589
+ message: string;
37590
+ }>;
37591
+ /** Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37592
+ latch_metadata?: {
37593
+ accessibility_type: string;
37594
+ door_name: string;
37595
+ door_type: string;
37596
+ is_connected: boolean;
37597
+ } | undefined;
37598
+ /** Visionline-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37599
+ visionline_metadata?: {
37600
+ door_name: string;
37601
+ door_category: 'entrance' | 'guest' | 'elevator reader' | 'common' | 'common (PMS)';
37602
+ profiles?: Array<{
37603
+ visionline_door_profile_id: string;
37604
+ visionline_door_profile_type: 'BLE' | 'commonDoor' | 'touch';
37605
+ }> | undefined;
37606
+ } | undefined;
37607
+ /** Salto KS-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37608
+ salto_ks_metadata?: {
37609
+ door_name: string;
37610
+ locked_state: string;
37611
+ lock_type: string;
37612
+ online?: boolean | undefined;
37613
+ battery_level: string;
37614
+ left_open_alarm?: boolean | undefined;
37615
+ intrusion_alarm?: boolean | undefined;
37616
+ privacy_mode?: boolean | undefined;
37617
+ } | undefined;
37618
+ /** dormakaba Community-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37619
+ dormakaba_community_metadata?: {
37620
+ access_point_name: string;
37621
+ } | undefined;
37622
+ /** ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37623
+ assa_abloy_vostio_metadata?: {
37624
+ door_type: 'CommonDoor' | 'EntranceDoor' | 'GuestDoor' | 'Elevator';
37625
+ door_name: string;
37626
+ door_number?: number | undefined;
37627
+ stand_open?: boolean | undefined;
37628
+ pms_id?: string | undefined;
37629
+ } | undefined;
37630
+ /** Salto Space-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details). */
37631
+ salto_space_metadata?: {
37632
+ door_name: string;
37633
+ ext_door_id: string;
37634
+ door_description?: string | undefined;
37635
+ } | undefined;
37636
+ }>;
37637
+ }>;
37638
+ }>;
37639
+ };
37640
+ };
37641
+ };
37433
37642
  '/thermostats/activate_climate_preset': {
37434
37643
  route: '/thermostats/activate_climate_preset';
37435
37644
  method: 'POST';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.400.0",
3
+ "version": "1.402.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -48,6 +48,8 @@ export {
48
48
  pagination,
49
49
  phone,
50
50
  phone_number,
51
+ phone_registration,
52
+ phone_session,
51
53
  thermostat_capability_properties,
52
54
  thermostat_device_type,
53
55
  thermostat_schedule,
@@ -15,6 +15,7 @@ export * from './locations/index.js'
15
15
  export * from './noise-sensors/index.js'
16
16
  export * from './pagination.js'
17
17
  export * from './phone-number.js'
18
+ export * from './phones/index.js'
18
19
  export * from './thermostats/index.js'
19
20
  export * from './user-identities/index.js'
20
21
  export * from './webhooks/index.js'
@@ -0,0 +1,2 @@
1
+ export * from './phone-registration.js'
2
+ export * from './phone-session.js'
@@ -0,0 +1,15 @@
1
+ import { z } from 'zod'
2
+
3
+ export const phone_registration = z.object({
4
+ phone_registration_id: z.string(),
5
+ provider_state: z.any(),
6
+ provider_name: z.string().nullable(),
7
+ is_being_activated: z.boolean(),
8
+ }).describe(`
9
+ ---
10
+ route_path: /seam/mobile_sdk/v1/phone_sessions
11
+ undocumented: Seam Mobile SDK only.
12
+ ---
13
+ `)
14
+
15
+ export type PhoneRegistration = z.infer<typeof phone_registration>
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod'
2
+
3
+ import { acs_credential } from '../acs/acs-credential.js'
4
+ import { acs_entrance } from '../acs/acs-entrance.js'
5
+ import { phone_registration } from './phone-registration.js'
6
+
7
+ const phone_provider_session = z.object({
8
+ phone_registration,
9
+ acs_credentials: acs_credential
10
+ .extend({
11
+ acs_entrances: acs_entrance.array(),
12
+ })
13
+ .array(),
14
+ })
15
+
16
+ export const phone_session = z.object({
17
+ provider_sessions: phone_provider_session.array(),
18
+ }).describe(`
19
+ ---
20
+ route_path: /seam/mobile_sdk/v1/phone_sessions
21
+ undocumented: Seam Mobile SDK only.
22
+ ---
23
+ `)
24
+
25
+ export type PhoneProviderSession = z.infer<typeof phone_provider_session>
26
+
27
+ export type PhoneSession = z.infer<typeof phone_session>