@seamapi/types 1.43.0 → 1.44.1

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 (36) hide show
  1. package/dist/connect.cjs +189 -121
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +352 -214
  4. package/lib/seam/connect/openapi.d.ts +230 -152
  5. package/lib/seam/connect/openapi.js +168 -116
  6. package/lib/seam/connect/openapi.js.map +1 -1
  7. package/lib/seam/connect/route-types.d.ts +93 -59
  8. package/lib/seam/connect/stable/model-types.d.ts +1 -1
  9. package/lib/seam/connect/stable/models/connect-webview.d.ts +21 -0
  10. package/lib/seam/connect/stable/models/connect-webview.js +8 -0
  11. package/lib/seam/connect/stable/models/connect-webview.js.map +1 -1
  12. package/lib/seam/connect/stable/models/custom-metadata.d.ts +3 -0
  13. package/lib/seam/connect/stable/models/custom-metadata.js +7 -0
  14. package/lib/seam/connect/stable/models/custom-metadata.js.map +1 -0
  15. package/lib/seam/connect/stable/models/index.d.ts +1 -0
  16. package/lib/seam/connect/stable/models/index.js +1 -0
  17. package/lib/seam/connect/stable/models/index.js.map +1 -1
  18. package/lib/seam/connect/stable/schemas.d.ts +1 -1
  19. package/lib/seam/connect/stable/schemas.js +1 -1
  20. package/lib/seam/connect/stable/schemas.js.map +1 -1
  21. package/lib/seam/connect/unstable/models/acs/credential.d.ts +7 -7
  22. package/lib/seam/connect/unstable/models/acs/credential.js +5 -2
  23. package/lib/seam/connect/unstable/models/acs/credential.js.map +1 -1
  24. package/lib/seam/connect/unstable/models/acs/user.d.ts +4 -4
  25. package/lib/seam/connect/unstable/models/acs/user.js +1 -1
  26. package/lib/seam/connect/unstable/models/acs/user.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/lib/seam/connect/openapi.ts +168 -116
  29. package/src/lib/seam/connect/route-types.ts +93 -66
  30. package/src/lib/seam/connect/stable/model-types.ts +1 -1
  31. package/src/lib/seam/connect/stable/models/connect-webview.ts +9 -0
  32. package/src/lib/seam/connect/stable/models/custom-metadata.ts +12 -0
  33. package/src/lib/seam/connect/stable/models/index.ts +1 -0
  34. package/src/lib/seam/connect/stable/schemas.ts +1 -1
  35. package/src/lib/seam/connect/unstable/models/acs/credential.ts +5 -2
  36. package/src/lib/seam/connect/unstable/models/acs/user.ts +1 -1
@@ -504,51 +504,6 @@ export interface Routes {
504
504
  formData: {}
505
505
  jsonResponse: {}
506
506
  }
507
- '/acs/access_groups/create': {
508
- route: '/acs/access_groups/create'
509
- method: 'POST'
510
- queryParams: {}
511
- jsonBody: {}
512
- commonParams: {
513
- acs_system_id: string
514
- name?: string | undefined
515
- }
516
- formData: {}
517
- jsonResponse: {
518
- acs_access_group: {
519
- acs_access_group_id: string
520
- acs_system_id: string
521
- workspace_id: string
522
- name: string
523
- /** deprecated: use external_type */
524
- access_group_type:
525
- | 'pti_unit'
526
- | 'pti_access_level'
527
- | 'salto_access_group'
528
- | 'brivo_group'
529
- /** deprecated: use external_type_display_name */
530
- access_group_type_display_name: string
531
- external_type:
532
- | 'pti_unit'
533
- | 'pti_access_level'
534
- | 'salto_access_group'
535
- | 'brivo_group'
536
- external_type_display_name: string
537
- created_at: string
538
- }
539
- }
540
- }
541
- '/acs/access_groups/delete': {
542
- route: '/acs/access_groups/delete'
543
- method: 'DELETE' | 'POST'
544
- queryParams: {}
545
- jsonBody: {}
546
- commonParams: {
547
- acs_access_group_id: string
548
- }
549
- formData: {}
550
- jsonResponse: {}
551
- }
552
507
  '/acs/access_groups/get': {
553
508
  route: '/acs/access_groups/get'
554
509
  method: 'GET' | 'POST'
@@ -632,7 +587,7 @@ export interface Routes {
632
587
  workspace_id: string
633
588
  created_at: string
634
589
  display_name: string
635
- external_type: 'pti_user'
590
+ external_type: 'pti_user' | 'brivo_user'
636
591
  external_type_display_name: string
637
592
  is_suspended: boolean
638
593
  full_name?: string | undefined
@@ -655,15 +610,15 @@ export interface Routes {
655
610
  formData: {}
656
611
  jsonResponse: {}
657
612
  }
658
- '/acs/access_groups/update': {
659
- route: '/acs/access_groups/update'
613
+ '/acs/credentials/assign': {
614
+ route: '/acs/credentials/assign'
660
615
  method: 'PATCH' | 'POST'
661
616
  queryParams: {}
662
- jsonBody: {}
663
- commonParams: {
664
- acs_access_group_id: string
665
- name?: (string | null) | undefined
617
+ jsonBody: {
618
+ acs_user_id: string
619
+ acs_credential_id: string
666
620
  }
621
+ commonParams: {}
667
622
  formData: {}
668
623
  jsonResponse: {}
669
624
  }
@@ -680,10 +635,10 @@ export interface Routes {
680
635
  jsonResponse: {
681
636
  acs_credential: {
682
637
  acs_credential_id: string
683
- acs_user_id: string
638
+ acs_user_id?: string | undefined
684
639
  acs_system_id: string
685
640
  code: string | null
686
- external_type: 'pti_card'
641
+ external_type: 'pti_card' | 'brivo_credential'
687
642
  external_type_display_name: string
688
643
  created_at: string
689
644
  workspace_id: string
@@ -713,10 +668,10 @@ export interface Routes {
713
668
  jsonResponse: {
714
669
  acs_credential: {
715
670
  acs_credential_id: string
716
- acs_user_id: string
671
+ acs_user_id?: string | undefined
717
672
  acs_system_id: string
718
673
  code: string | null
719
- external_type: 'pti_card'
674
+ external_type: 'pti_card' | 'brivo_credential'
720
675
  external_type_display_name: string
721
676
  created_at: string
722
677
  workspace_id: string
@@ -743,16 +698,28 @@ export interface Routes {
743
698
  jsonResponse: {
744
699
  acs_credentials: Array<{
745
700
  acs_credential_id: string
746
- acs_user_id: string
701
+ acs_user_id?: string | undefined
747
702
  acs_system_id: string
748
703
  code: string | null
749
- external_type: 'pti_card'
704
+ external_type: 'pti_card' | 'brivo_credential'
750
705
  external_type_display_name: string
751
706
  created_at: string
752
707
  workspace_id: string
753
708
  }>
754
709
  }
755
710
  }
711
+ '/acs/credentials/unassign': {
712
+ route: '/acs/credentials/unassign'
713
+ method: 'PATCH' | 'POST'
714
+ queryParams: {}
715
+ jsonBody: {
716
+ acs_user_id: string
717
+ acs_credential_id: string
718
+ }
719
+ commonParams: {}
720
+ formData: {}
721
+ jsonResponse: {}
722
+ }
756
723
  '/acs/systems/get': {
757
724
  route: '/acs/systems/get'
758
725
  method: 'GET' | 'POST'
@@ -817,15 +784,16 @@ export interface Routes {
817
784
  route: '/acs/users/create'
818
785
  method: 'POST'
819
786
  queryParams: {}
820
- jsonBody: {}
821
- commonParams: {
787
+ jsonBody: {
822
788
  acs_system_id: string
823
789
  acs_access_group_ids?: string[]
824
790
  full_name?: string | undefined
825
791
  /** Deprecated: use email_address. */
826
792
  email?: string | undefined
827
793
  phone_number?: string | undefined
794
+ email_address?: string | undefined
828
795
  }
796
+ commonParams: {}
829
797
  formData: {}
830
798
  jsonResponse: {
831
799
  acs_user: {
@@ -834,7 +802,7 @@ export interface Routes {
834
802
  workspace_id: string
835
803
  created_at: string
836
804
  display_name: string
837
- external_type: 'pti_user'
805
+ external_type: 'pti_user' | 'brivo_user'
838
806
  external_type_display_name: string
839
807
  is_suspended: boolean
840
808
  full_name?: string | undefined
@@ -872,7 +840,7 @@ export interface Routes {
872
840
  workspace_id: string
873
841
  created_at: string
874
842
  display_name: string
875
- external_type: 'pti_user'
843
+ external_type: 'pti_user' | 'brivo_user'
876
844
  external_type_display_name: string
877
845
  is_suspended: boolean
878
846
  full_name?: string | undefined
@@ -899,7 +867,7 @@ export interface Routes {
899
867
  workspace_id: string
900
868
  created_at: string
901
869
  display_name: string
902
- external_type: 'pti_user'
870
+ external_type: 'pti_user' | 'brivo_user'
903
871
  external_type_display_name: string
904
872
  is_suspended: boolean
905
873
  full_name?: string | undefined
@@ -948,14 +916,15 @@ export interface Routes {
948
916
  route: '/acs/users/update'
949
917
  method: 'PATCH' | 'POST'
950
918
  queryParams: {}
951
- jsonBody: {}
952
- commonParams: {
919
+ jsonBody: {
953
920
  acs_user_id: string
954
921
  full_name?: string | undefined
955
922
  /** Deprecated: use email_address. */
956
923
  email?: string | undefined
957
924
  phone_number?: string | undefined
925
+ email_address?: string | undefined
958
926
  }
927
+ commonParams: {}
959
928
  formData: {}
960
929
  jsonResponse: {}
961
930
  }
@@ -1220,6 +1189,7 @@ export interface Routes {
1220
1189
  | 'wyze'
1221
1190
  | 'seam_passport'
1222
1191
  | 'yale_access'
1192
+ | 'hid_cm'
1223
1193
  >
1224
1194
  | undefined
1225
1195
  provider_category?:
@@ -1247,6 +1217,13 @@ export interface Routes {
1247
1217
  created_at: string
1248
1218
  login_successful: boolean
1249
1219
  status: 'pending' | 'failed' | 'authorized'
1220
+ custom_redirect_url: string | null
1221
+ custom_redirect_failure_url: string | null
1222
+ custom_metadata: Record<string, string | number | null | boolean>
1223
+ automatically_manage_new_devices: boolean
1224
+ wait_for_device_creation: boolean
1225
+ authorized_at: string | null
1226
+ selected_provider: string | null
1250
1227
  }
1251
1228
  }
1252
1229
  }
@@ -1284,6 +1261,13 @@ export interface Routes {
1284
1261
  created_at: string
1285
1262
  login_successful: boolean
1286
1263
  status: 'pending' | 'failed' | 'authorized'
1264
+ custom_redirect_url: string | null
1265
+ custom_redirect_failure_url: string | null
1266
+ custom_metadata: Record<string, string | number | null | boolean>
1267
+ automatically_manage_new_devices: boolean
1268
+ wait_for_device_creation: boolean
1269
+ authorized_at: string | null
1270
+ selected_provider: string | null
1287
1271
  }
1288
1272
  }
1289
1273
  }
@@ -1310,6 +1294,13 @@ export interface Routes {
1310
1294
  created_at: string
1311
1295
  login_successful: boolean
1312
1296
  status: 'pending' | 'failed' | 'authorized'
1297
+ custom_redirect_url: string | null
1298
+ custom_redirect_failure_url: string | null
1299
+ custom_metadata: Record<string, string | number | null | boolean>
1300
+ automatically_manage_new_devices: boolean
1301
+ wait_for_device_creation: boolean
1302
+ authorized_at: string | null
1303
+ selected_provider: string | null
1313
1304
  }>
1314
1305
  }
1315
1306
  }
@@ -3297,6 +3288,9 @@ export interface Routes {
3297
3288
  model: {
3298
3289
  display_name: string
3299
3290
  manufacturer_display_name: string
3291
+ offline_access_codes_supported?: boolean | undefined
3292
+ access_codes_supported?: boolean | undefined
3293
+ accessory_keypad_supported?: boolean | undefined
3300
3294
  }
3301
3295
  has_direct_power?: boolean | undefined
3302
3296
  battery_level?: number | undefined
@@ -3310,7 +3304,13 @@ export interface Routes {
3310
3304
  image_url?: string | undefined
3311
3305
  image_alt_text?: string | undefined
3312
3306
  serial_number?: string | undefined
3307
+ /** Currently possible to use online access codes */
3308
+ online_access_codes_enabled?: boolean | undefined
3309
+ /** Currently possible to use offline access codes */
3310
+ offline_access_codes_enabled?: boolean | undefined
3311
+ /** Deprecated: use model.offline_access_codes_enabled. */
3313
3312
  supports_accessory_keypad?: boolean | undefined
3313
+ /** Deprecated: use model.accessory_keypad_supported. */
3314
3314
  supports_offline_access_codes?: boolean | undefined
3315
3315
  } & {
3316
3316
  august_metadata?:
@@ -3874,6 +3874,9 @@ export interface Routes {
3874
3874
  model: {
3875
3875
  display_name: string
3876
3876
  manufacturer_display_name: string
3877
+ offline_access_codes_supported?: boolean | undefined
3878
+ access_codes_supported?: boolean | undefined
3879
+ accessory_keypad_supported?: boolean | undefined
3877
3880
  }
3878
3881
  has_direct_power?: boolean | undefined
3879
3882
  battery_level?: number | undefined
@@ -3887,7 +3890,13 @@ export interface Routes {
3887
3890
  image_url?: string | undefined
3888
3891
  image_alt_text?: string | undefined
3889
3892
  serial_number?: string | undefined
3893
+ /** Currently possible to use online access codes */
3894
+ online_access_codes_enabled?: boolean | undefined
3895
+ /** Currently possible to use offline access codes */
3896
+ offline_access_codes_enabled?: boolean | undefined
3897
+ /** Deprecated: use model.offline_access_codes_enabled. */
3890
3898
  supports_accessory_keypad?: boolean | undefined
3899
+ /** Deprecated: use model.accessory_keypad_supported. */
3891
3900
  supports_offline_access_codes?: boolean | undefined
3892
3901
  } & {
3893
3902
  august_metadata?:
@@ -4572,6 +4581,9 @@ export interface Routes {
4572
4581
  model: {
4573
4582
  display_name: string
4574
4583
  manufacturer_display_name: string
4584
+ offline_access_codes_supported?: boolean | undefined
4585
+ access_codes_supported?: boolean | undefined
4586
+ accessory_keypad_supported?: boolean | undefined
4575
4587
  }
4576
4588
  has_direct_power?: boolean | undefined
4577
4589
  battery_level?: number | undefined
@@ -4585,7 +4597,13 @@ export interface Routes {
4585
4597
  image_url?: string | undefined
4586
4598
  image_alt_text?: string | undefined
4587
4599
  serial_number?: string | undefined
4600
+ /** Currently possible to use online access codes */
4601
+ online_access_codes_enabled?: boolean | undefined
4602
+ /** Currently possible to use offline access codes */
4603
+ offline_access_codes_enabled?: boolean | undefined
4604
+ /** Deprecated: use model.offline_access_codes_enabled. */
4588
4605
  supports_accessory_keypad?: boolean | undefined
4606
+ /** Deprecated: use model.accessory_keypad_supported. */
4589
4607
  supports_offline_access_codes?: boolean | undefined
4590
4608
  } & {
4591
4609
  august_metadata?:
@@ -5149,6 +5167,9 @@ export interface Routes {
5149
5167
  model: {
5150
5168
  display_name: string
5151
5169
  manufacturer_display_name: string
5170
+ offline_access_codes_supported?: boolean | undefined
5171
+ access_codes_supported?: boolean | undefined
5172
+ accessory_keypad_supported?: boolean | undefined
5152
5173
  }
5153
5174
  has_direct_power?: boolean | undefined
5154
5175
  battery_level?: number | undefined
@@ -5162,7 +5183,13 @@ export interface Routes {
5162
5183
  image_url?: string | undefined
5163
5184
  image_alt_text?: string | undefined
5164
5185
  serial_number?: string | undefined
5186
+ /** Currently possible to use online access codes */
5187
+ online_access_codes_enabled?: boolean | undefined
5188
+ /** Currently possible to use offline access codes */
5189
+ offline_access_codes_enabled?: boolean | undefined
5190
+ /** Deprecated: use model.offline_access_codes_enabled. */
5165
5191
  supports_accessory_keypad?: boolean | undefined
5192
+ /** Deprecated: use model.accessory_keypad_supported. */
5166
5193
  supports_offline_access_codes?: boolean | undefined
5167
5194
  } & {
5168
5195
  august_metadata?:
@@ -8173,7 +8200,7 @@ export interface Routes {
8173
8200
  workspace_id: string
8174
8201
  created_at: string
8175
8202
  display_name: string
8176
- external_type: 'pti_user'
8203
+ external_type: 'pti_user' | 'brivo_user'
8177
8204
  external_type_display_name: string
8178
8205
  is_suspended: boolean
8179
8206
  full_name?: string | undefined
@@ -1 +1 @@
1
- export type { ConnectWebview } from './models/index.js'
1
+ export type { ConnectWebview, CustomMetadata } from './models/index.js'
@@ -1,5 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { custom_metadata } from './custom-metadata.js'
4
+
3
5
  export const connect_webview = z.object({
4
6
  connect_webview_id: z.string().uuid(),
5
7
  connected_account_id: z.string().uuid().optional(),
@@ -13,6 +15,13 @@ export const connect_webview = z.object({
13
15
  created_at: z.string().datetime(),
14
16
  login_successful: z.boolean(),
15
17
  status: z.enum(['pending', 'failed', 'authorized']),
18
+ custom_redirect_url: z.string().url().nullable(),
19
+ custom_redirect_failure_url: z.string().url().nullable(),
20
+ custom_metadata,
21
+ automatically_manage_new_devices: z.boolean(),
22
+ wait_for_device_creation: z.boolean(),
23
+ authorized_at: z.string().datetime().nullable(),
24
+ selected_provider: z.string().nullable(),
16
25
  })
17
26
 
18
27
  export type ConnectWebview = z.infer<typeof connect_webview>
@@ -0,0 +1,12 @@
1
+ import { z } from 'zod'
2
+
3
+ export const custom_metadata = z
4
+ .record(
5
+ z.string().max(40),
6
+ z.union([z.string().max(500), z.number(), z.null(), z.boolean()]),
7
+ )
8
+ .refine((val) => Object.keys(val).length <= 50, {
9
+ message: 'Custom metadata is limited to a maximum of 50 keys',
10
+ })
11
+
12
+ export type CustomMetadata = z.infer<typeof custom_metadata>
@@ -1 +1,2 @@
1
1
  export * from './connect-webview.js'
2
+ export * from './custom-metadata.js'
@@ -1 +1 @@
1
- export { connect_webview } from './models/index.js'
1
+ export { connect_webview, custom_metadata } from './models/index.js'
@@ -1,6 +1,9 @@
1
1
  import { z } from 'zod'
2
2
 
3
- export const acs_credential_external_type = z.enum(['pti_card'])
3
+ export const acs_credential_external_type = z.enum([
4
+ 'pti_card',
5
+ 'brivo_credential',
6
+ ])
4
7
 
5
8
  export type AcsCredentialExternalType = z.infer<
6
9
  typeof acs_credential_external_type
@@ -8,7 +11,7 @@ export type AcsCredentialExternalType = z.infer<
8
11
 
9
12
  export const acs_credential = z.object({
10
13
  acs_credential_id: z.string().uuid(),
11
- acs_user_id: z.string().uuid(),
14
+ acs_user_id: z.string().uuid().optional(),
12
15
  acs_system_id: z.string().uuid(),
13
16
  code: z.string().nullable(),
14
17
  external_type: acs_credential_external_type,
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
- export const acs_user_external_type = z.enum(['pti_user'])
3
+ export const acs_user_external_type = z.enum(['pti_user', 'brivo_user'])
4
4
 
5
5
  export type AcsUserExternalType = z.infer<typeof acs_user_external_type>
6
6