@seamapi/types 1.976.0 → 1.978.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 (29) hide show
  1. package/dist/connect.cjs +270 -59
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +504 -46
  4. package/dist/index.cjs +270 -59
  5. package/dist/index.cjs.map +1 -1
  6. package/lib/seam/connect/models/customer/customer-portal.d.ts +74 -14
  7. package/lib/seam/connect/models/customer/customer-portal.js +18 -4
  8. package/lib/seam/connect/models/customer/customer-portal.js.map +1 -1
  9. package/lib/seam/connect/models/devices/device-metadata.d.ts +48 -0
  10. package/lib/seam/connect/models/devices/device-metadata.js +40 -0
  11. package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
  12. package/lib/seam/connect/models/devices/device-provider.d.ts +2 -1
  13. package/lib/seam/connect/models/devices/device-provider.js +2 -1
  14. package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
  15. package/lib/seam/connect/models/devices/device-type.d.ts +1 -0
  16. package/lib/seam/connect/models/devices/device-type.js +1 -0
  17. package/lib/seam/connect/models/devices/device-type.js.map +1 -1
  18. package/lib/seam/connect/models/devices/device.d.ts +71 -3
  19. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +51 -3
  20. package/lib/seam/connect/openapi.js +239 -40
  21. package/lib/seam/connect/openapi.js.map +1 -1
  22. package/lib/seam/connect/route-types.d.ts +381 -40
  23. package/package.json +2 -2
  24. package/src/lib/seam/connect/models/customer/customer-portal.ts +18 -4
  25. package/src/lib/seam/connect/models/devices/device-metadata.ts +41 -0
  26. package/src/lib/seam/connect/models/devices/device-provider.ts +2 -1
  27. package/src/lib/seam/connect/models/devices/device-type.ts +1 -0
  28. package/src/lib/seam/connect/openapi.ts +244 -40
  29. package/src/lib/seam/connect/route-types.ts +438 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.976.0",
3
+ "version": "1.978.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.24.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@seamapi/blueprint": "^0.61.0",
95
+ "@seamapi/blueprint": "^1.0.0",
96
96
  "@swc/core": "^1.11.29",
97
97
  "@types/node": "^24.10.9",
98
98
  "concurrently": "^9.2.0",
@@ -209,10 +209,24 @@ export const portal_configuration_base = z.object({
209
209
  "Navigation mode for the portal. 'restricted' tells frontend to hide navigation UI, typically used for embedded deep links.",
210
210
  ),
211
211
  deep_link: z
212
- .object({
213
- resource_type: z.enum(['reservation', 'space']),
214
- resource_key: z.string(),
215
- })
212
+ .discriminatedUnion('resource_type', [
213
+ // Customer-keyed resources: resolved to an internal id via a lookup.
214
+ z.object({
215
+ resource_type: z.literal('reservation'),
216
+ resource_key: z.string(),
217
+ }),
218
+ z.object({
219
+ resource_type: z.literal('space'),
220
+ resource_key: z.string(),
221
+ }),
222
+ // Seam-id resource: a device is addressed by its Seam device_id directly
223
+ // (there is no customer-facing device_key), so it carries resource_id
224
+ // rather than resource_key.
225
+ z.object({
226
+ resource_type: z.literal('device'),
227
+ resource_id: z.string(),
228
+ }),
229
+ ])
216
230
  .optional().describe(`
217
231
  ---
218
232
  undocumented: Internal endpoint for customer portals.
@@ -1162,6 +1162,47 @@ export const device_metadata = z
1162
1162
  })
1163
1163
  .partial()
1164
1164
  .describe(`Metadata for a Kisi device.`),
1165
+
1166
+ aqara_metadata: z
1167
+ .object({
1168
+ did: z
1169
+ .string()
1170
+ .optional()
1171
+ .describe(`Device ID (did) for an Aqara device.`),
1172
+ parent_did: z
1173
+ .string()
1174
+ .optional()
1175
+ .describe(`Parent gateway device ID for an Aqara device.`),
1176
+ device_name: z
1177
+ .string()
1178
+ .optional()
1179
+ .describe(`Device name for an Aqara device.`),
1180
+ model: z
1181
+ .string()
1182
+ .optional()
1183
+ .describe(`Model identifier for an Aqara device.`),
1184
+ model_type: z
1185
+ .number()
1186
+ .optional()
1187
+ .describe(`Model type for an Aqara device.`),
1188
+ time_zone: z
1189
+ .string()
1190
+ .nullable()
1191
+ .optional()
1192
+ .describe(`Time zone reported for an Aqara device (e.g. GMT-07:00).`),
1193
+ position_id: z
1194
+ .string()
1195
+ .nullable()
1196
+ .optional()
1197
+ .describe(`Position (room) ID for an Aqara device.`),
1198
+ firmware_version: z
1199
+ .string()
1200
+ .nullable()
1201
+ .optional()
1202
+ .describe(`Firmware version for an Aqara device.`),
1203
+ })
1204
+ .partial()
1205
+ .describe(`Metadata for an Aqara device.`),
1165
1206
  })
1166
1207
  .partial().describe(`
1167
1208
  ---
@@ -66,6 +66,7 @@ export const DEVICE_PROVIDERS = {
66
66
  ACUITY_SCHEDULING: 'acuity_scheduling',
67
67
  OMNITEC: 'omnitec',
68
68
  KISI: 'kisi',
69
+ AQARA: 'aqara',
69
70
  } as const
70
71
 
71
72
  export type DeviceProviderName =
@@ -145,7 +146,7 @@ export const PROVIDER_CATEGORY_MAP = {
145
146
  'thirty_three_lock',
146
147
  ],
147
148
 
148
- beta: ['salto_ks_accept'],
149
+ beta: ['salto_ks_accept', 'aqara'],
149
150
 
150
151
  thermostats: ['ecobee', 'nest', 'sensi', 'honeywell_resideo', 'first_alert'],
151
152
  noise_sensors: ['minut', 'noiseaware'],
@@ -31,6 +31,7 @@ export const LOCK_DEVICE_TYPE = {
31
31
  KEYINCODE_LOCK: 'keyincode_lock',
32
32
  OMNITEC_LOCK: 'omnitec_lock',
33
33
  KISI_LOCK: 'kisi_lock',
34
+ AQARA_LOCK: 'aqara_lock',
34
35
  } as const
35
36
 
36
37
  type LockDeviceTypeFromMapping =
@@ -13000,6 +13000,7 @@ const openapi: OpenAPISpec = {
13000
13000
  'keyincode_lock',
13001
13001
  'omnitec_lock',
13002
13002
  'kisi_lock',
13003
+ 'aqara_lock',
13003
13004
  ],
13004
13005
  type: 'string',
13005
13006
  },
@@ -13891,6 +13892,53 @@ const openapi: OpenAPISpec = {
13891
13892
  },
13892
13893
  type: 'object',
13893
13894
  },
13895
+ aqara_metadata: {
13896
+ description: 'Metadata for an Aqara device.',
13897
+ properties: {
13898
+ device_name: {
13899
+ description: 'Device name for an Aqara device.',
13900
+ type: 'string',
13901
+ },
13902
+ did: {
13903
+ description: 'Device ID (did) for an Aqara device.',
13904
+ type: 'string',
13905
+ },
13906
+ firmware_version: {
13907
+ description:
13908
+ 'Firmware version for an Aqara device.',
13909
+ nullable: true,
13910
+ type: 'string',
13911
+ },
13912
+ model: {
13913
+ description:
13914
+ 'Model identifier for an Aqara device.',
13915
+ type: 'string',
13916
+ },
13917
+ model_type: {
13918
+ description: 'Model type for an Aqara device.',
13919
+ format: 'float',
13920
+ type: 'number',
13921
+ },
13922
+ parent_did: {
13923
+ description:
13924
+ 'Parent gateway device ID for an Aqara device.',
13925
+ type: 'string',
13926
+ },
13927
+ position_id: {
13928
+ description:
13929
+ 'Position (room) ID for an Aqara device.',
13930
+ nullable: true,
13931
+ type: 'string',
13932
+ },
13933
+ time_zone: {
13934
+ description:
13935
+ 'Time zone reported for an Aqara device (e.g. GMT-07:00).',
13936
+ nullable: true,
13937
+ type: 'string',
13938
+ },
13939
+ },
13940
+ type: 'object',
13941
+ },
13894
13942
  assa_abloy_vostio_metadata: {
13895
13943
  description:
13896
13944
  'Metadata for an ASSA ABLOY Vostio system.',
@@ -17305,6 +17353,7 @@ const openapi: OpenAPISpec = {
17305
17353
  'acuity_scheduling',
17306
17354
  'omnitec',
17307
17355
  'kisi',
17356
+ 'aqara',
17308
17357
  ],
17309
17358
  type: 'string',
17310
17359
  },
@@ -32778,6 +32827,7 @@ const openapi: OpenAPISpec = {
32778
32827
  'keyincode_lock',
32779
32828
  'omnitec_lock',
32780
32829
  'kisi_lock',
32830
+ 'aqara_lock',
32781
32831
  ],
32782
32832
  type: 'string',
32783
32833
  },
@@ -53205,6 +53255,7 @@ const openapi: OpenAPISpec = {
53205
53255
  'acuity_scheduling',
53206
53256
  'omnitec',
53207
53257
  'kisi',
53258
+ 'aqara',
53208
53259
  'yale_access',
53209
53260
  'hid_cm',
53210
53261
  'google_nest',
@@ -54580,15 +54631,42 @@ const openapi: OpenAPISpec = {
54580
54631
  deep_link: {
54581
54632
  description:
54582
54633
  'Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.',
54583
- properties: {
54584
- resource_key: { type: 'string' },
54585
- resource_type: {
54586
- enum: ['reservation', 'space'],
54587
- type: 'string',
54634
+ discriminator: { propertyName: 'resource_type' },
54635
+ oneOf: [
54636
+ {
54637
+ properties: {
54638
+ resource_key: { type: 'string' },
54639
+ resource_type: {
54640
+ enum: ['reservation'],
54641
+ type: 'string',
54642
+ },
54643
+ },
54644
+ required: ['resource_type', 'resource_key'],
54645
+ type: 'object',
54588
54646
  },
54589
- },
54590
- required: ['resource_type', 'resource_key'],
54591
- type: 'object',
54647
+ {
54648
+ properties: {
54649
+ resource_key: { type: 'string' },
54650
+ resource_type: {
54651
+ enum: ['space'],
54652
+ type: 'string',
54653
+ },
54654
+ },
54655
+ required: ['resource_type', 'resource_key'],
54656
+ type: 'object',
54657
+ },
54658
+ {
54659
+ properties: {
54660
+ resource_id: { type: 'string' },
54661
+ resource_type: {
54662
+ enum: ['device'],
54663
+ type: 'string',
54664
+ },
54665
+ },
54666
+ required: ['resource_type', 'resource_id'],
54667
+ type: 'object',
54668
+ },
54669
+ ],
54592
54670
  'x-undocumented':
54593
54671
  'Internal endpoint for customer portals.',
54594
54672
  },
@@ -57554,6 +57632,7 @@ const openapi: OpenAPISpec = {
57554
57632
  'keyincode_lock',
57555
57633
  'omnitec_lock',
57556
57634
  'kisi_lock',
57635
+ 'aqara_lock',
57557
57636
  ],
57558
57637
  type: 'string',
57559
57638
  },
@@ -57632,6 +57711,7 @@ const openapi: OpenAPISpec = {
57632
57711
  'keyincode_lock',
57633
57712
  'omnitec_lock',
57634
57713
  'kisi_lock',
57714
+ 'aqara_lock',
57635
57715
  ],
57636
57716
  type: 'string',
57637
57717
  },
@@ -57708,6 +57788,7 @@ const openapi: OpenAPISpec = {
57708
57788
  'tedee',
57709
57789
  'keyincode',
57710
57790
  'akiles',
57791
+ 'aqara',
57711
57792
  'ecobee',
57712
57793
  'honeywell_resideo',
57713
57794
  'keynest',
@@ -58020,6 +58101,7 @@ const openapi: OpenAPISpec = {
58020
58101
  'keyincode_lock',
58021
58102
  'omnitec_lock',
58022
58103
  'kisi_lock',
58104
+ 'aqara_lock',
58023
58105
  ],
58024
58106
  type: 'string',
58025
58107
  },
@@ -58096,6 +58178,7 @@ const openapi: OpenAPISpec = {
58096
58178
  'keyincode_lock',
58097
58179
  'omnitec_lock',
58098
58180
  'kisi_lock',
58181
+ 'aqara_lock',
58099
58182
  ],
58100
58183
  type: 'string',
58101
58184
  },
@@ -58236,6 +58319,7 @@ const openapi: OpenAPISpec = {
58236
58319
  'tedee',
58237
58320
  'keyincode',
58238
58321
  'akiles',
58322
+ 'aqara',
58239
58323
  'ecobee',
58240
58324
  'honeywell_resideo',
58241
58325
  'keynest',
@@ -60372,6 +60456,7 @@ const openapi: OpenAPISpec = {
60372
60456
  'keyincode_lock',
60373
60457
  'omnitec_lock',
60374
60458
  'kisi_lock',
60459
+ 'aqara_lock',
60375
60460
  ],
60376
60461
  type: 'string',
60377
60462
  },
@@ -60450,6 +60535,7 @@ const openapi: OpenAPISpec = {
60450
60535
  'keyincode_lock',
60451
60536
  'omnitec_lock',
60452
60537
  'kisi_lock',
60538
+ 'aqara_lock',
60453
60539
  ],
60454
60540
  type: 'string',
60455
60541
  },
@@ -60526,6 +60612,7 @@ const openapi: OpenAPISpec = {
60526
60612
  'tedee',
60527
60613
  'keyincode',
60528
60614
  'akiles',
60615
+ 'aqara',
60529
60616
  'ecobee',
60530
60617
  'honeywell_resideo',
60531
60618
  'keynest',
@@ -60837,6 +60924,7 @@ const openapi: OpenAPISpec = {
60837
60924
  'keyincode_lock',
60838
60925
  'omnitec_lock',
60839
60926
  'kisi_lock',
60927
+ 'aqara_lock',
60840
60928
  ],
60841
60929
  type: 'string',
60842
60930
  },
@@ -60913,6 +61001,7 @@ const openapi: OpenAPISpec = {
60913
61001
  'keyincode_lock',
60914
61002
  'omnitec_lock',
60915
61003
  'kisi_lock',
61004
+ 'aqara_lock',
60916
61005
  ],
60917
61006
  type: 'string',
60918
61007
  },
@@ -61053,6 +61142,7 @@ const openapi: OpenAPISpec = {
61053
61142
  'tedee',
61054
61143
  'keyincode',
61055
61144
  'akiles',
61145
+ 'aqara',
61056
61146
  'ecobee',
61057
61147
  'honeywell_resideo',
61058
61148
  'keynest',
@@ -63209,6 +63299,7 @@ const openapi: OpenAPISpec = {
63209
63299
  'keyincode_lock',
63210
63300
  'omnitec_lock',
63211
63301
  'kisi_lock',
63302
+ 'aqara_lock',
63212
63303
  ],
63213
63304
  type: 'string',
63214
63305
  },
@@ -63250,6 +63341,7 @@ const openapi: OpenAPISpec = {
63250
63341
  'keyincode_lock',
63251
63342
  'omnitec_lock',
63252
63343
  'kisi_lock',
63344
+ 'aqara_lock',
63253
63345
  ],
63254
63346
  type: 'string',
63255
63347
  },
@@ -63288,6 +63380,7 @@ const openapi: OpenAPISpec = {
63288
63380
  'tedee',
63289
63381
  'keyincode',
63290
63382
  'akiles',
63383
+ 'aqara',
63291
63384
  'korelock',
63292
63385
  'smartthings',
63293
63386
  'ultraloq',
@@ -63583,6 +63676,7 @@ const openapi: OpenAPISpec = {
63583
63676
  'keyincode_lock',
63584
63677
  'omnitec_lock',
63585
63678
  'kisi_lock',
63679
+ 'aqara_lock',
63586
63680
  ],
63587
63681
  type: 'string',
63588
63682
  },
@@ -63621,6 +63715,7 @@ const openapi: OpenAPISpec = {
63621
63715
  'keyincode_lock',
63622
63716
  'omnitec_lock',
63623
63717
  'kisi_lock',
63718
+ 'aqara_lock',
63624
63719
  ],
63625
63720
  type: 'string',
63626
63721
  },
@@ -63721,6 +63816,7 @@ const openapi: OpenAPISpec = {
63721
63816
  'tedee',
63722
63817
  'keyincode',
63723
63818
  'akiles',
63819
+ 'aqara',
63724
63820
  'korelock',
63725
63821
  'smartthings',
63726
63822
  'ultraloq',
@@ -75939,15 +76035,42 @@ const openapi: OpenAPISpec = {
75939
76035
  deep_link: {
75940
76036
  description:
75941
76037
  'Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.',
75942
- properties: {
75943
- resource_key: { type: 'string' },
75944
- resource_type: {
75945
- enum: ['reservation', 'space'],
75946
- type: 'string',
76038
+ discriminator: { propertyName: 'resource_type' },
76039
+ oneOf: [
76040
+ {
76041
+ properties: {
76042
+ resource_key: { type: 'string' },
76043
+ resource_type: {
76044
+ enum: ['reservation'],
76045
+ type: 'string',
76046
+ },
76047
+ },
76048
+ required: ['resource_type', 'resource_key'],
76049
+ type: 'object',
75947
76050
  },
75948
- },
75949
- required: ['resource_type', 'resource_key'],
75950
- type: 'object',
76051
+ {
76052
+ properties: {
76053
+ resource_key: { type: 'string' },
76054
+ resource_type: {
76055
+ enum: ['space'],
76056
+ type: 'string',
76057
+ },
76058
+ },
76059
+ required: ['resource_type', 'resource_key'],
76060
+ type: 'object',
76061
+ },
76062
+ {
76063
+ properties: {
76064
+ resource_id: { type: 'string' },
76065
+ resource_type: {
76066
+ enum: ['device'],
76067
+ type: 'string',
76068
+ },
76069
+ },
76070
+ required: ['resource_type', 'resource_id'],
76071
+ type: 'object',
76072
+ },
76073
+ ],
75951
76074
  'x-undocumented':
75952
76075
  'Internal endpoint for customer portals.',
75953
76076
  },
@@ -76405,15 +76528,42 @@ const openapi: OpenAPISpec = {
76405
76528
  deep_link: {
76406
76529
  description:
76407
76530
  'Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.',
76408
- properties: {
76409
- resource_key: { type: 'string' },
76410
- resource_type: {
76411
- enum: ['reservation', 'space'],
76412
- type: 'string',
76531
+ discriminator: { propertyName: 'resource_type' },
76532
+ oneOf: [
76533
+ {
76534
+ properties: {
76535
+ resource_key: { type: 'string' },
76536
+ resource_type: {
76537
+ enum: ['reservation'],
76538
+ type: 'string',
76539
+ },
76540
+ },
76541
+ required: ['resource_type', 'resource_key'],
76542
+ type: 'object',
76413
76543
  },
76414
- },
76415
- required: ['resource_type', 'resource_key'],
76416
- type: 'object',
76544
+ {
76545
+ properties: {
76546
+ resource_key: { type: 'string' },
76547
+ resource_type: {
76548
+ enum: ['space'],
76549
+ type: 'string',
76550
+ },
76551
+ },
76552
+ required: ['resource_type', 'resource_key'],
76553
+ type: 'object',
76554
+ },
76555
+ {
76556
+ properties: {
76557
+ resource_id: { type: 'string' },
76558
+ resource_type: {
76559
+ enum: ['device'],
76560
+ type: 'string',
76561
+ },
76562
+ },
76563
+ required: ['resource_type', 'resource_id'],
76564
+ type: 'object',
76565
+ },
76566
+ ],
76417
76567
  'x-undocumented':
76418
76568
  'Internal endpoint for customer portals.',
76419
76569
  },
@@ -76845,15 +76995,42 @@ const openapi: OpenAPISpec = {
76845
76995
  deep_link: {
76846
76996
  description:
76847
76997
  'Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.',
76848
- properties: {
76849
- resource_key: { type: 'string' },
76850
- resource_type: {
76851
- enum: ['reservation', 'space'],
76852
- type: 'string',
76998
+ discriminator: { propertyName: 'resource_type' },
76999
+ oneOf: [
77000
+ {
77001
+ properties: {
77002
+ resource_key: { type: 'string' },
77003
+ resource_type: {
77004
+ enum: ['reservation'],
77005
+ type: 'string',
77006
+ },
77007
+ },
77008
+ required: ['resource_type', 'resource_key'],
77009
+ type: 'object',
76853
77010
  },
76854
- },
76855
- required: ['resource_type', 'resource_key'],
76856
- type: 'object',
77011
+ {
77012
+ properties: {
77013
+ resource_key: { type: 'string' },
77014
+ resource_type: {
77015
+ enum: ['space'],
77016
+ type: 'string',
77017
+ },
77018
+ },
77019
+ required: ['resource_type', 'resource_key'],
77020
+ type: 'object',
77021
+ },
77022
+ {
77023
+ properties: {
77024
+ resource_id: { type: 'string' },
77025
+ resource_type: {
77026
+ enum: ['device'],
77027
+ type: 'string',
77028
+ },
77029
+ },
77030
+ required: ['resource_type', 'resource_id'],
77031
+ type: 'object',
77032
+ },
77033
+ ],
76857
77034
  'x-undocumented':
76858
77035
  'Internal endpoint for customer portals.',
76859
77036
  },
@@ -77266,15 +77443,42 @@ const openapi: OpenAPISpec = {
77266
77443
  deep_link: {
77267
77444
  description:
77268
77445
  'Deep link target resource for initial redirect. When set, the portal will navigate directly to the specified resource.',
77269
- properties: {
77270
- resource_key: { type: 'string' },
77271
- resource_type: {
77272
- enum: ['reservation', 'space'],
77273
- type: 'string',
77446
+ discriminator: { propertyName: 'resource_type' },
77447
+ oneOf: [
77448
+ {
77449
+ properties: {
77450
+ resource_key: { type: 'string' },
77451
+ resource_type: {
77452
+ enum: ['reservation'],
77453
+ type: 'string',
77454
+ },
77455
+ },
77456
+ required: ['resource_type', 'resource_key'],
77457
+ type: 'object',
77274
77458
  },
77275
- },
77276
- required: ['resource_type', 'resource_key'],
77277
- type: 'object',
77459
+ {
77460
+ properties: {
77461
+ resource_key: { type: 'string' },
77462
+ resource_type: {
77463
+ enum: ['space'],
77464
+ type: 'string',
77465
+ },
77466
+ },
77467
+ required: ['resource_type', 'resource_key'],
77468
+ type: 'object',
77469
+ },
77470
+ {
77471
+ properties: {
77472
+ resource_id: { type: 'string' },
77473
+ resource_type: {
77474
+ enum: ['device'],
77475
+ type: 'string',
77476
+ },
77477
+ },
77478
+ required: ['resource_type', 'resource_id'],
77479
+ type: 'object',
77480
+ },
77481
+ ],
77278
77482
  'x-undocumented':
77279
77483
  'Internal endpoint for customer portals.',
77280
77484
  },