@seamapi/types 1.253.1 → 1.255.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 (27) hide show
  1. package/dist/connect.cjs +268 -69
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +1324 -2
  4. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +93 -0
  5. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  6. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  7. package/lib/seam/connect/models/action-attempts/encode-card.d.ts +96 -0
  8. package/lib/seam/connect/models/action-attempts/encode-card.js +36 -0
  9. package/lib/seam/connect/models/action-attempts/encode-card.js.map +1 -0
  10. package/lib/seam/connect/models/events/devices.d.ts +91 -1
  11. package/lib/seam/connect/models/events/devices.js +5 -2
  12. package/lib/seam/connect/models/events/devices.js.map +1 -1
  13. package/lib/seam/connect/models/events/seam-event.d.ts +86 -0
  14. package/lib/seam/connect/models/thermostats/climate-preset.d.ts +29 -0
  15. package/lib/seam/connect/models/thermostats/climate-preset.js +8 -0
  16. package/lib/seam/connect/models/thermostats/climate-preset.js.map +1 -1
  17. package/lib/seam/connect/openapi.d.ts +116 -0
  18. package/lib/seam/connect/openapi.js +167 -0
  19. package/lib/seam/connect/openapi.js.map +1 -1
  20. package/lib/seam/connect/route-types.d.ts +1056 -29
  21. package/package.json +1 -1
  22. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  23. package/src/lib/seam/connect/models/action-attempts/encode-card.ts +46 -0
  24. package/src/lib/seam/connect/models/events/devices.ts +5 -2
  25. package/src/lib/seam/connect/models/thermostats/climate-preset.ts +11 -0
  26. package/src/lib/seam/connect/openapi.ts +169 -0
  27. package/src/lib/seam/connect/route-types.ts +1157 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.253.1",
3
+ "version": "1.255.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -2,6 +2,7 @@ import { z } from 'zod'
2
2
 
3
3
  import { activate_climate_preset_action_attempt } from './activate-climate-preset.js'
4
4
  import { deprecated_action_attempts } from './deprecated.js'
5
+ import { encode_card_action_attempt } from './encode-card.js'
5
6
  import { lock_door_action_attempt } from './lock-door.js'
6
7
  import { read_card_action_attempt } from './read-card.js'
7
8
  import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
@@ -16,6 +17,7 @@ export const action_attempt = z.union([
16
17
  ...lock_door_action_attempt.options,
17
18
  ...unlock_door_action_attempt.options,
18
19
  ...read_card_action_attempt.options,
20
+ ...encode_card_action_attempt.options,
19
21
  ...reset_sandbox_workspace_action_attempt.options,
20
22
  ...set_cool_action_attempt.options,
21
23
  ...set_heat_action_attempt.options,
@@ -0,0 +1,46 @@
1
+ import { z } from 'zod'
2
+
3
+ import {
4
+ common_failed_action_attempt,
5
+ common_pending_action_attempt,
6
+ common_succeeded_action_attempt,
7
+ } from './common.js'
8
+
9
+ const action_type = z.literal('ENCODE_CARD')
10
+
11
+ const error = z.object({
12
+ type: z.string(), // TODO This should be typed properly with the possible errors
13
+ message: z.string(),
14
+ })
15
+
16
+ const result = z.object({
17
+ acs_credential_id: z
18
+ .string()
19
+ .uuid()
20
+ .nullable()
21
+ .describe('Matching acs_credential currently encoded on this card.'),
22
+ card_number: z
23
+ .string()
24
+ .nullable()
25
+ .describe('A number or sting that physically identifies this card.'),
26
+ // TODO visionline_metadata: visionline_credential_metadata,
27
+ })
28
+
29
+ export const encode_card_action_attempt = z.discriminatedUnion('status', [
30
+ common_pending_action_attempt
31
+ .extend({
32
+ action_type,
33
+ })
34
+ .describe('Encoding card data from physical encoder.'),
35
+ common_succeeded_action_attempt
36
+ .extend({
37
+ action_type,
38
+ result,
39
+ })
40
+ .describe('Encoding card data from physical encoder succeeded.'),
41
+ common_failed_action_attempt
42
+ .extend({ action_type, error })
43
+ .describe('Encoding card data from physical encoder failed.'),
44
+ ])
45
+
46
+ export type EncodeCardActionAttempt = z.infer<typeof encode_card_action_attempt>
@@ -356,6 +356,9 @@ export type ThermostatClimatePresetActivatedEvent = z.infer<
356
356
  >
357
357
 
358
358
  export const thermostat_manually_adjusted_event = device_event
359
+ .extend({
360
+ event_type: z.literal('thermostat.manually_adjusted'),
361
+ })
359
362
  .merge(
360
363
  climate_setting.pick({
361
364
  fan_mode_setting: true,
@@ -398,6 +401,6 @@ export const device_events = [
398
401
  lock_locked_event,
399
402
  lock_unlocked_event,
400
403
  lock_access_denied_event,
401
- // thermostat_climate_preset_activated_event,
402
- // thermostat_manually_adjusted_event,
404
+ thermostat_climate_preset_activated_event,
405
+ thermostat_manually_adjusted_event,
403
406
  ] as const
@@ -22,3 +22,14 @@ export type ClimatePreset = z.infer<typeof climate_preset>
22
22
  export const climate_setting = climate_preset.partial()
23
23
 
24
24
  export type ClimateSetting = z.infer<typeof climate_setting>
25
+
26
+ export const climate_setting_manual = climate_setting.pick({
27
+ fan_mode_setting: true,
28
+ hvac_mode_setting: true,
29
+ cooling_set_point_celsius: true,
30
+ heating_set_point_celsius: true,
31
+ cooling_set_point_fahrenheit: true,
32
+ heating_set_point_fahrenheit: true,
33
+ })
34
+
35
+ export type ClimateSettingManual = z.infer<typeof climate_setting_manual>
@@ -1268,6 +1268,100 @@ export default {
1268
1268
  ],
1269
1269
  type: 'object',
1270
1270
  },
1271
+ {
1272
+ description: 'Encoding card data from physical encoder.',
1273
+ properties: {
1274
+ action_attempt_id: {
1275
+ description: 'The ID of the action attempt.',
1276
+ format: 'uuid',
1277
+ type: 'string',
1278
+ 'x-title': 'Action Attempt ID',
1279
+ },
1280
+ action_type: { enum: ['ENCODE_CARD'], type: 'string' },
1281
+ error: { nullable: true },
1282
+ result: { nullable: true },
1283
+ status: { enum: ['pending'], type: 'string' },
1284
+ },
1285
+ required: [
1286
+ 'action_attempt_id',
1287
+ 'status',
1288
+ 'result',
1289
+ 'error',
1290
+ 'action_type',
1291
+ ],
1292
+ type: 'object',
1293
+ },
1294
+ {
1295
+ description: 'Encoding card data from physical encoder succeeded.',
1296
+ properties: {
1297
+ action_attempt_id: {
1298
+ description: 'The ID of the action attempt.',
1299
+ format: 'uuid',
1300
+ type: 'string',
1301
+ 'x-title': 'Action Attempt ID',
1302
+ },
1303
+ action_type: { enum: ['ENCODE_CARD'], type: 'string' },
1304
+ error: { nullable: true },
1305
+ result: {
1306
+ properties: {
1307
+ acs_credential_id: {
1308
+ description:
1309
+ 'Matching acs_credential currently encoded on this card.',
1310
+ format: 'uuid',
1311
+ nullable: true,
1312
+ type: 'string',
1313
+ },
1314
+ card_number: {
1315
+ description:
1316
+ 'A number or sting that physically identifies this card.',
1317
+ nullable: true,
1318
+ type: 'string',
1319
+ },
1320
+ },
1321
+ required: ['acs_credential_id', 'card_number'],
1322
+ type: 'object',
1323
+ },
1324
+ status: { enum: ['success'], type: 'string' },
1325
+ },
1326
+ required: [
1327
+ 'action_attempt_id',
1328
+ 'status',
1329
+ 'error',
1330
+ 'action_type',
1331
+ 'result',
1332
+ ],
1333
+ type: 'object',
1334
+ },
1335
+ {
1336
+ description: 'Encoding card data from physical encoder failed.',
1337
+ properties: {
1338
+ action_attempt_id: {
1339
+ description: 'The ID of the action attempt.',
1340
+ format: 'uuid',
1341
+ type: 'string',
1342
+ 'x-title': 'Action Attempt ID',
1343
+ },
1344
+ action_type: { enum: ['ENCODE_CARD'], type: 'string' },
1345
+ error: {
1346
+ properties: {
1347
+ message: { type: 'string' },
1348
+ type: { type: 'string' },
1349
+ },
1350
+ required: ['type', 'message'],
1351
+ type: 'object',
1352
+ },
1353
+ result: { nullable: true },
1354
+ status: { enum: ['error'], type: 'string' },
1355
+ },
1356
+ required: [
1357
+ 'action_attempt_id',
1358
+ 'status',
1359
+ 'result',
1360
+ 'action_type',
1361
+ 'error',
1362
+ ],
1363
+ type: 'object',
1364
+ },
1271
1365
  {
1272
1366
  description: 'Resetting sandbox workspace.',
1273
1367
  properties: {
@@ -3824,13 +3918,22 @@ export default {
3824
3918
  acs_user_id: { format: 'uuid', type: 'string' },
3825
3919
  action_attempt_id: { format: 'uuid', type: 'string' },
3826
3920
  client_session_id: { format: 'uuid', type: 'string' },
3921
+ climate_preset_key: { type: 'string' },
3922
+ cooling_set_point_celsius: { format: 'float', type: 'number' },
3923
+ cooling_set_point_fahrenheit: { format: 'float', type: 'number' },
3827
3924
  created_at: { format: 'date-time', type: 'string' },
3828
3925
  device_id: { format: 'uuid', type: 'string' },
3829
3926
  enrollment_automation_id: { format: 'uuid', type: 'string' },
3830
3927
  event_description: { type: 'string' },
3831
3928
  event_id: { format: 'uuid', type: 'string' },
3832
3929
  event_type: { type: 'string' },
3930
+ fan_mode_setting: { type: 'string' },
3931
+ heating_set_point_celsius: { format: 'float', type: 'number' },
3932
+ heating_set_point_fahrenheit: { format: 'float', type: 'number' },
3933
+ hvac_mode_setting: { type: 'string' },
3934
+ is_fallback_climate_preset: { type: 'boolean' },
3833
3935
  occurred_at: { format: 'date-time', type: 'string' },
3936
+ thermostat_schedule_id: { format: 'uuid', type: 'string' },
3834
3937
  workspace_id: { format: 'uuid', type: 'string' },
3835
3938
  },
3836
3939
  required: [
@@ -7352,6 +7455,68 @@ export default {
7352
7455
  'x-fern-sdk-method-name': 'update',
7353
7456
  },
7354
7457
  },
7458
+ '/acs/encoders/encode_card': {
7459
+ post: {
7460
+ operationId: 'acsEncodersEncodeCardPost',
7461
+ requestBody: {
7462
+ content: {
7463
+ 'application/json': {
7464
+ schema: {
7465
+ oneOf: [
7466
+ {
7467
+ properties: {
7468
+ acs_system_id: { format: 'uuid', type: 'string' },
7469
+ device_name: { type: 'string' },
7470
+ },
7471
+ required: ['acs_system_id', 'device_name'],
7472
+ type: 'object',
7473
+ },
7474
+ {
7475
+ properties: {
7476
+ device_id: { format: 'uuid', type: 'string' },
7477
+ },
7478
+ required: ['device_id'],
7479
+ type: 'object',
7480
+ },
7481
+ ],
7482
+ },
7483
+ },
7484
+ },
7485
+ },
7486
+ responses: {
7487
+ 200: {
7488
+ content: {
7489
+ 'application/json': {
7490
+ schema: {
7491
+ properties: {
7492
+ action_attempt: {
7493
+ $ref: '#/components/schemas/action_attempt',
7494
+ },
7495
+ ok: { type: 'boolean' },
7496
+ },
7497
+ required: ['action_attempt', 'ok'],
7498
+ type: 'object',
7499
+ },
7500
+ },
7501
+ },
7502
+ description: 'OK',
7503
+ },
7504
+ 400: { description: 'Bad Request' },
7505
+ 401: { description: 'Unauthorized' },
7506
+ },
7507
+ security: [
7508
+ { pat_with_workspace: [] },
7509
+ { console_session: [] },
7510
+ { api_key: [] },
7511
+ ],
7512
+ summary: '/acs/encoders/encode_card',
7513
+ tags: ['/acs'],
7514
+ 'x-fern-sdk-group-name': ['acs', 'encoders'],
7515
+ 'x-fern-sdk-method-name': 'encode_card',
7516
+ 'x-fern-sdk-return-value': 'action_attempt',
7517
+ 'x-undocumented': 'Encoding a card is currently unimplemented.',
7518
+ },
7519
+ },
7355
7520
  '/acs/encoders/read_card': {
7356
7521
  post: {
7357
7522
  operationId: 'acsEncodersReadCardPost',
@@ -11667,6 +11832,8 @@ export default {
11667
11832
  'action_attempt.lock_door.failed',
11668
11833
  'action_attempt.unlock_door.succeeded',
11669
11834
  'action_attempt.unlock_door.failed',
11835
+ 'thermostat.climate_preset_activated',
11836
+ 'thermostat.manually_adjusted',
11670
11837
  ],
11671
11838
  type: 'string',
11672
11839
  },
@@ -11735,6 +11902,8 @@ export default {
11735
11902
  'action_attempt.lock_door.failed',
11736
11903
  'action_attempt.unlock_door.succeeded',
11737
11904
  'action_attempt.unlock_door.failed',
11905
+ 'thermostat.climate_preset_activated',
11906
+ 'thermostat.manually_adjusted',
11738
11907
  ],
11739
11908
  type: 'string',
11740
11909
  },