@seamapi/types 1.236.0 → 1.238.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.
@@ -2245,7 +2245,16 @@ export interface Routes {
2245
2245
  created_at: string;
2246
2246
  message: string;
2247
2247
  warning_code: 'being_deleted';
2248
+ } | {
2249
+ created_at: string;
2250
+ message: string;
2251
+ warning_code: 'salto_ks_user_not_subscribed';
2252
+ } | {
2253
+ created_at: string;
2254
+ message: string;
2255
+ warning_code: 'salto_site_user_suspended';
2248
2256
  }>;
2257
+ errors?: any;
2249
2258
  full_name?: string | undefined;
2250
2259
  /**
2251
2260
  * @deprecated use email_address. */
@@ -3295,7 +3304,16 @@ export interface Routes {
3295
3304
  created_at: string;
3296
3305
  message: string;
3297
3306
  warning_code: 'being_deleted';
3307
+ } | {
3308
+ created_at: string;
3309
+ message: string;
3310
+ warning_code: 'salto_ks_user_not_subscribed';
3311
+ } | {
3312
+ created_at: string;
3313
+ message: string;
3314
+ warning_code: 'salto_site_user_suspended';
3298
3315
  }>;
3316
+ errors?: any;
3299
3317
  full_name?: string | undefined;
3300
3318
  /**
3301
3319
  * @deprecated use email_address. */
@@ -3351,7 +3369,16 @@ export interface Routes {
3351
3369
  created_at: string;
3352
3370
  message: string;
3353
3371
  warning_code: 'being_deleted';
3372
+ } | {
3373
+ created_at: string;
3374
+ message: string;
3375
+ warning_code: 'salto_ks_user_not_subscribed';
3376
+ } | {
3377
+ created_at: string;
3378
+ message: string;
3379
+ warning_code: 'salto_site_user_suspended';
3354
3380
  }>;
3381
+ errors?: any;
3355
3382
  full_name?: string | undefined;
3356
3383
  /**
3357
3384
  * @deprecated use email_address. */
@@ -3401,7 +3428,16 @@ export interface Routes {
3401
3428
  created_at: string;
3402
3429
  message: string;
3403
3430
  warning_code: 'being_deleted';
3431
+ } | {
3432
+ created_at: string;
3433
+ message: string;
3434
+ warning_code: 'salto_ks_user_not_subscribed';
3435
+ } | {
3436
+ created_at: string;
3437
+ message: string;
3438
+ warning_code: 'salto_site_user_suspended';
3404
3439
  }>;
3440
+ errors?: any;
3405
3441
  full_name?: string | undefined;
3406
3442
  /**
3407
3443
  * @deprecated use email_address. */
@@ -3516,7 +3552,16 @@ export interface Routes {
3516
3552
  created_at: string;
3517
3553
  message: string;
3518
3554
  warning_code: 'being_deleted';
3555
+ } | {
3556
+ created_at: string;
3557
+ message: string;
3558
+ warning_code: 'salto_ks_user_not_subscribed';
3559
+ } | {
3560
+ created_at: string;
3561
+ message: string;
3562
+ warning_code: 'salto_site_user_suspended';
3519
3563
  }>;
3564
+ errors?: any;
3520
3565
  full_name?: string | undefined;
3521
3566
  /**
3522
3567
  * @deprecated use email_address. */
@@ -3565,7 +3610,16 @@ export interface Routes {
3565
3610
  created_at: string;
3566
3611
  message: string;
3567
3612
  warning_code: 'being_deleted';
3613
+ } | {
3614
+ created_at: string;
3615
+ message: string;
3616
+ warning_code: 'salto_ks_user_not_subscribed';
3617
+ } | {
3618
+ created_at: string;
3619
+ message: string;
3620
+ warning_code: 'salto_site_user_suspended';
3568
3621
  }>;
3622
+ errors?: any;
3569
3623
  full_name?: string | undefined;
3570
3624
  /**
3571
3625
  * @deprecated use email_address. */
@@ -4517,7 +4571,7 @@ export interface Routes {
4517
4571
  device_selection_mode?: ('none' | 'single' | 'multiple') | undefined;
4518
4572
  custom_redirect_url?: string | undefined;
4519
4573
  custom_redirect_failure_url?: string | undefined;
4520
- accepted_providers?: Array<'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'seam_relay_admin' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'tedee' | 'honeywell_resideo' | 'latch' | 'yale_access' | 'hid_cm' | 'google_nest'> | undefined;
4574
+ accepted_providers?: Array<'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'seam_relay_admin' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'tedee' | 'honeywell_resideo' | 'latch' | 'akiles' | 'yale_access' | 'hid_cm' | 'google_nest'> | undefined;
4521
4575
  provider_category?: ('stable' | 'consumer_smartlocks' | 'thermostats' | 'noise_sensors' | 'access_control_systems' | 'internal_beta') | undefined;
4522
4576
  custom_metadata?: Record<string, string | boolean | null> | undefined;
4523
4577
  automatically_manage_new_devices?: boolean;
@@ -5617,7 +5671,7 @@ export interface Routes {
5617
5671
  formData: {};
5618
5672
  jsonResponse: {
5619
5673
  device_providers: Array<{
5620
- device_provider_name: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'seam_relay_admin' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'tedee' | 'honeywell_resideo' | 'latch';
5674
+ device_provider_name: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'seam_relay_admin' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'hubitat' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'seam_bridge' | 'tedee' | 'honeywell_resideo' | 'latch' | 'akiles';
5621
5675
  display_name: string;
5622
5676
  image_url: string;
5623
5677
  provider_categories: Array<'stable' | 'consumer_smartlocks' | 'thermostats' | 'noise_sensors' | 'access_control_systems'>;
@@ -14547,7 +14601,16 @@ export interface Routes {
14547
14601
  created_at: string;
14548
14602
  message: string;
14549
14603
  warning_code: 'being_deleted';
14604
+ } | {
14605
+ created_at: string;
14606
+ message: string;
14607
+ warning_code: 'salto_ks_user_not_subscribed';
14608
+ } | {
14609
+ created_at: string;
14610
+ message: string;
14611
+ warning_code: 'salto_site_user_suspended';
14550
14612
  }>;
14613
+ errors?: any;
14551
14614
  full_name?: string | undefined;
14552
14615
  /**
14553
14616
  * @deprecated use email_address. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.236.0",
3
+ "version": "1.238.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -92,7 +92,7 @@
92
92
  "zod": "^3.21.4"
93
93
  },
94
94
  "devDependencies": {
95
- "@seamapi/blueprint": "^0.14.0",
95
+ "@seamapi/blueprint": "^0.16.0",
96
96
  "@types/node": "^20.8.10",
97
97
  "concurrently": "^8.2.0",
98
98
  "del-cli": "^5.0.0",
@@ -22,15 +22,30 @@ const acs_users_being_deleted = common_acs_users_warning.extend({
22
22
  warning_code: z.literal('being_deleted'),
23
23
  })
24
24
 
25
+ const acs_users_salto_ks_user_not_subscribed = common_acs_users_warning.extend({
26
+ warning_code: z.literal('salto_ks_user_not_subscribed'),
27
+ })
28
+
29
+ // TODO: Some acs_users already have this warning, so we need to keep it here until we migrate
30
+ const acs_users_salto_site_user_suspended = common_acs_users_warning.extend({
31
+ warning_code: z.literal('salto_site_user_suspended'),
32
+ })
33
+
25
34
  export const acs_users_warning_map = z.object({
26
35
  being_deleted: acs_users_being_deleted.optional().nullable(),
36
+ salto_ks_user_not_subscribed: acs_users_salto_ks_user_not_subscribed
37
+ .optional()
38
+ .nullable(),
39
+ salto_site_user_suspended: acs_users_salto_site_user_suspended
40
+ .optional()
41
+ .nullable(),
27
42
  })
28
43
 
29
- export const acs_users_warning =
30
- // TODO: once we have more than one warning we should use z.union
31
- // z.union([
32
- acs_users_being_deleted
33
- // ])
44
+ export const acs_users_warning = z.union([
45
+ acs_users_being_deleted,
46
+ acs_users_salto_ks_user_not_subscribed,
47
+ acs_users_salto_site_user_suspended,
48
+ ])
34
49
 
35
50
  export type AcsUsersWarningMap = z.infer<typeof acs_users_warning_map>
36
51
 
@@ -67,6 +82,7 @@ const common_acs_user = z
67
82
  .optional(),
68
83
  is_latest_desired_state_synced_with_provider: z.boolean().optional(),
69
84
  warnings: z.array(acs_users_warning),
85
+ errors: z.any(),
70
86
  })
71
87
  .merge(user_fields)
72
88
 
@@ -40,6 +40,7 @@ export const DEVICE_PROVIDERS = {
40
40
  TEDEE: 'tedee',
41
41
  HONEYWELL_RESIDEO: 'honeywell_resideo',
42
42
  LATCH: 'latch',
43
+ AKILES: 'akiles',
43
44
  } as const
44
45
 
45
46
  export type DeviceProviderName =
@@ -695,6 +695,7 @@ export default {
695
695
  'x-deprecated': 'use email_address.',
696
696
  },
697
697
  email_address: { format: 'email', type: 'string' },
698
+ errors: {},
698
699
  external_type: {
699
700
  enum: [
700
701
  'pti_user',
@@ -722,13 +723,41 @@ export default {
722
723
  user_identity_phone_number: { nullable: true, type: 'string' },
723
724
  warnings: {
724
725
  items: {
725
- properties: {
726
- created_at: { format: 'date-time', type: 'string' },
727
- message: { type: 'string' },
728
- warning_code: { enum: ['being_deleted'], type: 'string' },
729
- },
730
- required: ['created_at', 'message', 'warning_code'],
731
- type: 'object',
726
+ oneOf: [
727
+ {
728
+ properties: {
729
+ created_at: { format: 'date-time', type: 'string' },
730
+ message: { type: 'string' },
731
+ warning_code: { enum: ['being_deleted'], type: 'string' },
732
+ },
733
+ required: ['created_at', 'message', 'warning_code'],
734
+ type: 'object',
735
+ },
736
+ {
737
+ properties: {
738
+ created_at: { format: 'date-time', type: 'string' },
739
+ message: { type: 'string' },
740
+ warning_code: {
741
+ enum: ['salto_ks_user_not_subscribed'],
742
+ type: 'string',
743
+ },
744
+ },
745
+ required: ['created_at', 'message', 'warning_code'],
746
+ type: 'object',
747
+ },
748
+ {
749
+ properties: {
750
+ created_at: { format: 'date-time', type: 'string' },
751
+ message: { type: 'string' },
752
+ warning_code: {
753
+ enum: ['salto_site_user_suspended'],
754
+ type: 'string',
755
+ },
756
+ },
757
+ required: ['created_at', 'message', 'warning_code'],
758
+ type: 'object',
759
+ },
760
+ ],
732
761
  },
733
762
  type: 'array',
734
763
  },
@@ -3208,6 +3237,7 @@ export default {
3208
3237
  'tedee',
3209
3238
  'honeywell_resideo',
3210
3239
  'latch',
3240
+ 'akiles',
3211
3241
  ],
3212
3242
  type: 'string',
3213
3243
  },
@@ -7630,6 +7660,7 @@ export default {
7630
7660
  'x-deprecated': 'use email_address.',
7631
7661
  },
7632
7662
  email_address: { format: 'email', type: 'string' },
7663
+ errors: { $ref: '#/components/schemas/access_code' },
7633
7664
  external_type: {
7634
7665
  enum: [
7635
7666
  'pti_user',
@@ -7668,19 +7699,65 @@ export default {
7668
7699
  },
7669
7700
  warnings: {
7670
7701
  items: {
7671
- properties: {
7672
- created_at: {
7673
- format: 'date-time',
7674
- type: 'string',
7702
+ oneOf: [
7703
+ {
7704
+ properties: {
7705
+ created_at: {
7706
+ format: 'date-time',
7707
+ type: 'string',
7708
+ },
7709
+ message: { type: 'string' },
7710
+ warning_code: {
7711
+ enum: ['being_deleted'],
7712
+ type: 'string',
7713
+ },
7714
+ },
7715
+ required: [
7716
+ 'created_at',
7717
+ 'message',
7718
+ 'warning_code',
7719
+ ],
7720
+ type: 'object',
7675
7721
  },
7676
- message: { type: 'string' },
7677
- warning_code: {
7678
- enum: ['being_deleted'],
7679
- type: 'string',
7722
+ {
7723
+ properties: {
7724
+ created_at: {
7725
+ format: 'date-time',
7726
+ type: 'string',
7727
+ },
7728
+ message: { type: 'string' },
7729
+ warning_code: {
7730
+ enum: ['salto_ks_user_not_subscribed'],
7731
+ type: 'string',
7732
+ },
7733
+ },
7734
+ required: [
7735
+ 'created_at',
7736
+ 'message',
7737
+ 'warning_code',
7738
+ ],
7739
+ type: 'object',
7680
7740
  },
7681
- },
7682
- required: ['created_at', 'message', 'warning_code'],
7683
- type: 'object',
7741
+ {
7742
+ properties: {
7743
+ created_at: {
7744
+ format: 'date-time',
7745
+ type: 'string',
7746
+ },
7747
+ message: { type: 'string' },
7748
+ warning_code: {
7749
+ enum: ['salto_site_user_suspended'],
7750
+ type: 'string',
7751
+ },
7752
+ },
7753
+ required: [
7754
+ 'created_at',
7755
+ 'message',
7756
+ 'warning_code',
7757
+ ],
7758
+ type: 'object',
7759
+ },
7760
+ ],
7684
7761
  },
7685
7762
  type: 'array',
7686
7763
  },
@@ -7772,6 +7849,7 @@ export default {
7772
7849
  'x-deprecated': 'use email_address.',
7773
7850
  },
7774
7851
  email_address: { format: 'email', type: 'string' },
7852
+ errors: { $ref: '#/components/schemas/access_code' },
7775
7853
  external_type: {
7776
7854
  enum: [
7777
7855
  'pti_user',
@@ -7810,23 +7888,65 @@ export default {
7810
7888
  },
7811
7889
  warnings: {
7812
7890
  items: {
7813
- properties: {
7814
- created_at: {
7815
- format: 'date-time',
7816
- type: 'string',
7891
+ oneOf: [
7892
+ {
7893
+ properties: {
7894
+ created_at: {
7895
+ format: 'date-time',
7896
+ type: 'string',
7897
+ },
7898
+ message: { type: 'string' },
7899
+ warning_code: {
7900
+ enum: ['being_deleted'],
7901
+ type: 'string',
7902
+ },
7903
+ },
7904
+ required: [
7905
+ 'created_at',
7906
+ 'message',
7907
+ 'warning_code',
7908
+ ],
7909
+ type: 'object',
7817
7910
  },
7818
- message: { type: 'string' },
7819
- warning_code: {
7820
- enum: ['being_deleted'],
7821
- type: 'string',
7911
+ {
7912
+ properties: {
7913
+ created_at: {
7914
+ format: 'date-time',
7915
+ type: 'string',
7916
+ },
7917
+ message: { type: 'string' },
7918
+ warning_code: {
7919
+ enum: ['salto_ks_user_not_subscribed'],
7920
+ type: 'string',
7921
+ },
7922
+ },
7923
+ required: [
7924
+ 'created_at',
7925
+ 'message',
7926
+ 'warning_code',
7927
+ ],
7928
+ type: 'object',
7929
+ },
7930
+ {
7931
+ properties: {
7932
+ created_at: {
7933
+ format: 'date-time',
7934
+ type: 'string',
7935
+ },
7936
+ message: { type: 'string' },
7937
+ warning_code: {
7938
+ enum: ['salto_site_user_suspended'],
7939
+ type: 'string',
7940
+ },
7941
+ },
7942
+ required: [
7943
+ 'created_at',
7944
+ 'message',
7945
+ 'warning_code',
7946
+ ],
7947
+ type: 'object',
7822
7948
  },
7823
- },
7824
- required: [
7825
- 'created_at',
7826
- 'message',
7827
- 'warning_code',
7828
7949
  ],
7829
- type: 'object',
7830
7950
  },
7831
7951
  type: 'array',
7832
7952
  },
@@ -8705,6 +8825,7 @@ export default {
8705
8825
  'tedee',
8706
8826
  'honeywell_resideo',
8707
8827
  'latch',
8828
+ 'akiles',
8708
8829
  'yale_access',
8709
8830
  'hid_cm',
8710
8831
  'google_nest',