@seamapi/types 1.81.0 → 1.83.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 (35) hide show
  1. package/dist/connect.cjs +84 -23
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +183 -37
  4. package/lib/seam/connect/openapi.d.ts +133 -26
  5. package/lib/seam/connect/openapi.js +82 -18
  6. package/lib/seam/connect/openapi.js.map +1 -1
  7. package/lib/seam/connect/route-types.d.ts +46 -7
  8. package/lib/seam/connect/stable/models/connect-webview.d.ts +3 -3
  9. package/lib/seam/connect/stable/models/custom-metadata.d.ts +1 -1
  10. package/lib/seam/connect/stable/models/custom-metadata.js +1 -1
  11. package/lib/seam/connect/stable/models/custom-metadata.js.map +1 -1
  12. package/lib/seam/connect/unstable/models/acs/user.d.ts +9 -0
  13. package/lib/seam/connect/unstable/models/acs/user.js +4 -9
  14. package/lib/seam/connect/unstable/models/acs/user.js.map +1 -1
  15. package/lib/seam/connect/unstable/models/index.d.ts +1 -0
  16. package/lib/seam/connect/unstable/models/index.js +1 -0
  17. package/lib/seam/connect/unstable/models/index.js.map +1 -1
  18. package/lib/seam/connect/unstable/models/phone-number.d.ts +2 -0
  19. package/lib/seam/connect/unstable/models/phone-number.js +11 -0
  20. package/lib/seam/connect/unstable/models/phone-number.js.map +1 -0
  21. package/lib/seam/connect/unstable/models/user-identity.d.ts +3 -0
  22. package/lib/seam/connect/unstable/models/user-identity.js +2 -0
  23. package/lib/seam/connect/unstable/models/user-identity.js.map +1 -1
  24. package/lib/seam/connect/unstable/schemas.d.ts +1 -1
  25. package/lib/seam/connect/unstable/schemas.js +1 -1
  26. package/lib/seam/connect/unstable/schemas.js.map +1 -1
  27. package/package.json +1 -1
  28. package/src/lib/seam/connect/openapi.ts +82 -18
  29. package/src/lib/seam/connect/route-types.ts +46 -15
  30. package/src/lib/seam/connect/stable/models/custom-metadata.ts +1 -4
  31. package/src/lib/seam/connect/unstable/models/acs/user.ts +4 -13
  32. package/src/lib/seam/connect/unstable/models/index.ts +1 -0
  33. package/src/lib/seam/connect/unstable/models/phone-number.ts +14 -0
  34. package/src/lib/seam/connect/unstable/models/user-identity.ts +3 -0
  35. package/src/lib/seam/connect/unstable/schemas.ts +1 -0
@@ -749,6 +749,9 @@ export interface Routes {
749
749
  ends_at: string
750
750
  }
751
751
  | undefined
752
+ user_identity_id?: string | undefined
753
+ user_identity_email_address?: string | undefined
754
+ user_identity_phone_number?: string | undefined
752
755
  full_name?: string | undefined
753
756
  /** Deprecated: use email_address. */
754
757
  email?: string | undefined
@@ -1243,6 +1246,9 @@ export interface Routes {
1243
1246
  ends_at: string
1244
1247
  }
1245
1248
  | undefined
1249
+ user_identity_id?: string | undefined
1250
+ user_identity_email_address?: string | undefined
1251
+ user_identity_phone_number?: string | undefined
1246
1252
  full_name?: string | undefined
1247
1253
  /** Deprecated: use email_address. */
1248
1254
  email?: string | undefined
@@ -1295,6 +1301,9 @@ export interface Routes {
1295
1301
  ends_at: string
1296
1302
  }
1297
1303
  | undefined
1304
+ user_identity_id?: string | undefined
1305
+ user_identity_email_address?: string | undefined
1306
+ user_identity_phone_number?: string | undefined
1298
1307
  full_name?: string | undefined
1299
1308
  /** Deprecated: use email_address. */
1300
1309
  email?: string | undefined
@@ -1310,6 +1319,8 @@ export interface Routes {
1310
1319
  jsonBody: {}
1311
1320
  commonParams: {
1312
1321
  user_identity_id?: string | undefined
1322
+ user_identity_phone_number?: string | undefined
1323
+ user_identity_email_address?: string | undefined
1313
1324
  acs_system_id?: string | undefined
1314
1325
  }
1315
1326
  formData: {}
@@ -1337,6 +1348,9 @@ export interface Routes {
1337
1348
  ends_at: string
1338
1349
  }
1339
1350
  | undefined
1351
+ user_identity_id?: string | undefined
1352
+ user_identity_email_address?: string | undefined
1353
+ user_identity_phone_number?: string | undefined
1340
1354
  full_name?: string | undefined
1341
1355
  /** Deprecated: use email_address. */
1342
1356
  email?: string | undefined
@@ -1345,6 +1359,24 @@ export interface Routes {
1345
1359
  }>
1346
1360
  }
1347
1361
  }
1362
+ '/acs/users/list_accessible_entrances': {
1363
+ route: '/acs/users/list_accessible_entrances'
1364
+ method: 'GET' | 'POST'
1365
+ queryParams: {}
1366
+ jsonBody: {}
1367
+ commonParams: {
1368
+ acs_user_id: string
1369
+ }
1370
+ formData: {}
1371
+ jsonResponse: {
1372
+ acs_entrances: Array<{
1373
+ acs_entrance_id: string
1374
+ display_name: string
1375
+ acs_system_id: string
1376
+ created_at: string
1377
+ }>
1378
+ }
1379
+ }
1348
1380
  '/acs/users/remove_from_access_group': {
1349
1381
  route: '/acs/users/remove_from_access_group'
1350
1382
  method: 'DELETE' | 'POST'
@@ -1672,9 +1704,7 @@ export interface Routes {
1672
1704
  provider_category?:
1673
1705
  | ('stable' | 'consumer_smartlocks' | 'internal_beta')
1674
1706
  | undefined
1675
- custom_metadata?:
1676
- | Record<string, string | number | null | boolean>
1677
- | undefined
1707
+ custom_metadata?: Record<string, string | boolean> | undefined
1678
1708
  automatically_manage_new_devices?: boolean | undefined
1679
1709
  wait_for_device_creation?: boolean | undefined
1680
1710
  }
@@ -1696,7 +1726,7 @@ export interface Routes {
1696
1726
  status: 'pending' | 'failed' | 'authorized'
1697
1727
  custom_redirect_url: string | null
1698
1728
  custom_redirect_failure_url: string | null
1699
- custom_metadata: Record<string, string | number | null | boolean>
1729
+ custom_metadata: Record<string, string | boolean>
1700
1730
  automatically_manage_new_devices: boolean
1701
1731
  wait_for_device_creation: boolean
1702
1732
  authorized_at: string | null
@@ -1740,7 +1770,7 @@ export interface Routes {
1740
1770
  status: 'pending' | 'failed' | 'authorized'
1741
1771
  custom_redirect_url: string | null
1742
1772
  custom_redirect_failure_url: string | null
1743
- custom_metadata: Record<string, string | number | null | boolean>
1773
+ custom_metadata: Record<string, string | boolean>
1744
1774
  automatically_manage_new_devices: boolean
1745
1775
  wait_for_device_creation: boolean
1746
1776
  authorized_at: string | null
@@ -1773,7 +1803,7 @@ export interface Routes {
1773
1803
  status: 'pending' | 'failed' | 'authorized'
1774
1804
  custom_redirect_url: string | null
1775
1805
  custom_redirect_failure_url: string | null
1776
- custom_metadata: Record<string, string | number | null | boolean>
1806
+ custom_metadata: Record<string, string | boolean>
1777
1807
  automatically_manage_new_devices: boolean
1778
1808
  wait_for_device_creation: boolean
1779
1809
  authorized_at: string | null
@@ -1835,9 +1865,7 @@ export interface Routes {
1835
1865
  account_type_display_name: string
1836
1866
  errors?: any
1837
1867
  warnings?: any
1838
- custom_metadata?:
1839
- | Record<string, string | number | boolean | null>
1840
- | undefined
1868
+ custom_metadata?: Record<string, string | boolean> | undefined
1841
1869
  automatically_manage_new_devices: boolean
1842
1870
  }
1843
1871
  }
@@ -1866,9 +1894,7 @@ export interface Routes {
1866
1894
  account_type_display_name: string
1867
1895
  errors?: any
1868
1896
  warnings?: any
1869
- custom_metadata?:
1870
- | Record<string, string | number | boolean | null>
1871
- | undefined
1897
+ custom_metadata?: Record<string, string | boolean> | undefined
1872
1898
  automatically_manage_new_devices: boolean
1873
1899
  }>
1874
1900
  }
@@ -1900,9 +1926,7 @@ export interface Routes {
1900
1926
  account_type_display_name: string
1901
1927
  errors?: any
1902
1928
  warnings?: any
1903
- custom_metadata?:
1904
- | Record<string, string | number | boolean | null>
1905
- | undefined
1929
+ custom_metadata?: Record<string, string | boolean> | undefined
1906
1930
  automatically_manage_new_devices: boolean
1907
1931
  }
1908
1932
  }
@@ -10025,6 +10049,7 @@ export interface Routes {
10025
10049
  commonParams: {
10026
10050
  user_identity_key?: (string | null) | undefined
10027
10051
  email_address?: (string | null) | undefined
10052
+ phone_number?: (string | null) | undefined
10028
10053
  full_name?: (string | null) | undefined
10029
10054
  }
10030
10055
  formData: {}
@@ -10033,6 +10058,7 @@ export interface Routes {
10033
10058
  user_identity_id: string
10034
10059
  user_identity_key: string | null
10035
10060
  email_address: string | null
10061
+ phone_number: string | null
10036
10062
  display_name: string
10037
10063
  full_name: string | null
10038
10064
  created_at: string
@@ -10120,6 +10146,7 @@ export interface Routes {
10120
10146
  user_identity_id: string
10121
10147
  user_identity_key: string | null
10122
10148
  email_address: string | null
10149
+ phone_number: string | null
10123
10150
  display_name: string
10124
10151
  full_name: string | null
10125
10152
  created_at: string
@@ -10151,6 +10178,7 @@ export interface Routes {
10151
10178
  user_identity_id: string
10152
10179
  user_identity_key: string | null
10153
10180
  email_address: string | null
10181
+ phone_number: string | null
10154
10182
  display_name: string
10155
10183
  full_name: string | null
10156
10184
  created_at: string
@@ -10895,6 +10923,9 @@ export interface Routes {
10895
10923
  ends_at: string
10896
10924
  }
10897
10925
  | undefined
10926
+ user_identity_id?: string | undefined
10927
+ user_identity_email_address?: string | undefined
10928
+ user_identity_phone_number?: string | undefined
10898
10929
  full_name?: string | undefined
10899
10930
  /** Deprecated: use email_address. */
10900
10931
  email?: string | undefined
@@ -1,10 +1,7 @@
1
1
  import { z } from 'zod'
2
2
 
3
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
- )
4
+ .record(z.string().max(40), z.union([z.string().max(500), z.boolean()]))
8
5
  .refine((val) => Object.keys(val).length <= 50, {
9
6
  message: 'Custom metadata is limited to a maximum of 50 keys',
10
7
  })
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { phone_number } from '../phone-number.js'
3
4
  import { schedule } from '../schedule.js'
4
5
 
5
6
  export const acs_user_external_type = z.enum([
@@ -11,19 +12,6 @@ export const acs_user_external_type = z.enum([
11
12
 
12
13
  export type AcsUserExternalType = z.infer<typeof acs_user_external_type>
13
14
 
14
- const phone_number = z.coerce
15
- .string()
16
- .trim()
17
- .refine(
18
- (val) => {
19
- // https://www.twilio.com/docs/glossary/what-e164
20
- return /^\+[1-9]\d{1,14}$/.test(val)
21
- },
22
- {
23
- message: 'Phone number must be in E.164 format: +14155552671',
24
- },
25
- )
26
-
27
15
  const user_fields = z.object({
28
16
  full_name: z.string().optional(),
29
17
  email: z
@@ -47,6 +35,9 @@ export const acs_user = z
47
35
  external_type_display_name: z.string().optional(),
48
36
  is_suspended: z.boolean(),
49
37
  access_schedule: schedule.optional(),
38
+ user_identity_id: z.string().optional(),
39
+ user_identity_email_address: z.string().optional(),
40
+ user_identity_phone_number: z.string().optional(),
50
41
  })
51
42
  .merge(user_fields)
52
43
 
@@ -3,4 +3,5 @@ export * from './acs/index.js'
3
3
  export * from './capability-properties/index.js'
4
4
  export * from './devices/index.js'
5
5
  export * from './network.js'
6
+ export * from './phone-number.js'
6
7
  export * from './user-identity.js'
@@ -0,0 +1,14 @@
1
+ import { z } from 'zod'
2
+
3
+ export const phone_number = z.coerce
4
+ .string()
5
+ .trim()
6
+ .refine(
7
+ (val) => {
8
+ // https://www.twilio.com/docs/glossary/what-e164
9
+ return /^\+[1-9]\d{1,14}$/.test(val)
10
+ },
11
+ {
12
+ message: 'Phone number must be in E.164 format: +14155552671',
13
+ },
14
+ )
@@ -1,9 +1,12 @@
1
1
  import { z } from 'zod'
2
2
 
3
+ import { phone_number } from './phone-number.js'
4
+
3
5
  export const user_identity = z.object({
4
6
  user_identity_id: z.string().uuid(),
5
7
  user_identity_key: z.string().nonempty().nullable(),
6
8
  email_address: z.string().email().nullable(),
9
+ phone_number: phone_number.nullable(),
7
10
  display_name: z.string().nonempty(),
8
11
  full_name: z.string().nonempty().nullable(),
9
12
  created_at: z.string().datetime(),
@@ -26,6 +26,7 @@ export {
26
26
  network,
27
27
  noise_sensor_device_type,
28
28
  phone,
29
+ phone_number,
29
30
  thermostat_capability_properties,
30
31
  thermostat_device_type,
31
32
  unmanaged_access_code,