@seamapi/types 1.389.0 → 1.391.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.389.0",
3
+ "version": "1.391.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -372,6 +372,14 @@ const schlage_detected_duplicate = common_access_code_warning
372
372
  })
373
373
  .describe('Duplicate access code detected.')
374
374
 
375
+ const schlage_detected_duplicate_code_name = common_access_code_warning
376
+ .extend({
377
+ warning_code: z
378
+ .literal('schlage_detected_duplicate_code_name')
379
+ .describe(warning_code_description),
380
+ })
381
+ .describe('Duplicate access code name detected.')
382
+
375
383
  const schlage_creation_outage = common_access_code_warning
376
384
  .extend({
377
385
  warning_code: z
@@ -434,6 +442,7 @@ const access_code_warning = z
434
442
  .discriminatedUnion('warning_code', [
435
443
  smartthings_failed_to_set_access_code_warning,
436
444
  schlage_detected_duplicate,
445
+ schlage_detected_duplicate_code_name,
437
446
  schlage_creation_outage,
438
447
  code_modified_external_to_seam_warning,
439
448
  delay_in_setting_on_device,
@@ -455,6 +464,9 @@ const access_code_warning_map = z.object({
455
464
  smartthings_failed_to_set_access_code:
456
465
  smartthings_failed_to_set_access_code_warning.optional().nullable(),
457
466
  schlage_detected_duplicate: schlage_detected_duplicate.optional().nullable(),
467
+ schlage_duplicate_code_name: schlage_detected_duplicate_code_name
468
+ .optional()
469
+ .nullable(),
458
470
  schlage_creation_outage: schlage_creation_outage.optional().nullable(),
459
471
  code_modified_external_to_seam_warning: code_modified_external_to_seam_warning
460
472
  .optional()
@@ -5,6 +5,7 @@ import { deprecated_action_attempts } from './deprecated.js'
5
5
  import { encode_access_method_action_attempt } from './encode-access-method.js'
6
6
  import { encode_credential_action_attempt } from './encode-credential.js'
7
7
  import { lock_door_action_attempt } from './lock-door.js'
8
+ import { push_thermostat_programs_action_attempt } from './push-thermostat-programs.js'
8
9
  import { reset_sandbox_workspace_action_attempt } from './reset-sandbox-workspace.js'
9
10
  import { scan_credential_action_attempt } from './scan-credential.js'
10
11
  import { set_fan_mode_action_attempt } from './set-fan-mode.js'
@@ -25,6 +26,7 @@ export const action_attempt = z.union([
25
26
  ...activate_climate_preset_action_attempt.options,
26
27
  ...simulate_keypad_code_entry_action_attempt.options,
27
28
  ...simulate_manual_lock_via_keypad_action_attempt.options,
29
+ ...push_thermostat_programs_action_attempt.options,
28
30
  ...deprecated_action_attempts,
29
31
  ]).describe(`
30
32
  ---
@@ -0,0 +1,36 @@
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('PUSH_THERMOSTAT_PROGRAMS')
10
+
11
+ const error = z.object({
12
+ type: z.string(),
13
+ message: z.string(),
14
+ })
15
+
16
+ const result = z.object({})
17
+
18
+ export const push_thermostat_programs_action_attempt = z.discriminatedUnion(
19
+ 'status',
20
+ [
21
+ common_pending_action_attempt
22
+ .extend({
23
+ action_type,
24
+ })
25
+ .describe('Pushing thermostat weekly programs.'),
26
+ common_succeeded_action_attempt
27
+ .extend({
28
+ action_type,
29
+ result,
30
+ })
31
+ .describe('Pushing thermostat weekly programs succeeded.'),
32
+ common_failed_action_attempt
33
+ .extend({ action_type, error })
34
+ .describe('Pushing thermostat weekly programs failed.'),
35
+ ],
36
+ )
@@ -1236,6 +1236,30 @@ export default {
1236
1236
  required: ['message', 'warning_code'],
1237
1237
  type: 'object',
1238
1238
  },
1239
+ {
1240
+ description: 'Duplicate access code name detected.',
1241
+ properties: {
1242
+ created_at: {
1243
+ description:
1244
+ 'Date and time at which Seam created the warning.',
1245
+ format: 'date-time',
1246
+ type: 'string',
1247
+ },
1248
+ message: {
1249
+ description:
1250
+ 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
1251
+ type: 'string',
1252
+ },
1253
+ warning_code: {
1254
+ description:
1255
+ 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
1256
+ enum: ['schlage_detected_duplicate_code_name'],
1257
+ type: 'string',
1258
+ },
1259
+ },
1260
+ required: ['message', 'warning_code'],
1261
+ type: 'object',
1262
+ },
1239
1263
  {
1240
1264
  description:
1241
1265
  'Received an error when attempting to create this code.',
@@ -6353,6 +6377,104 @@ export default {
6353
6377
  ],
6354
6378
  type: 'object',
6355
6379
  },
6380
+ {
6381
+ description: 'Pushing thermostat weekly programs.',
6382
+ properties: {
6383
+ action_attempt_id: {
6384
+ description: 'ID of the action attempt.',
6385
+ format: 'uuid',
6386
+ type: 'string',
6387
+ },
6388
+ action_type: {
6389
+ enum: ['PUSH_THERMOSTAT_PROGRAMS'],
6390
+ type: 'string',
6391
+ },
6392
+ error: {
6393
+ description:
6394
+ 'Errors associated with the action attempt. Null for pending action attempts.',
6395
+ nullable: true,
6396
+ },
6397
+ result: {
6398
+ description:
6399
+ 'Result of the action attempt. Null for pending action attempts.',
6400
+ nullable: true,
6401
+ },
6402
+ status: { enum: ['pending'], type: 'string' },
6403
+ },
6404
+ required: [
6405
+ 'action_attempt_id',
6406
+ 'status',
6407
+ 'result',
6408
+ 'error',
6409
+ 'action_type',
6410
+ ],
6411
+ type: 'object',
6412
+ },
6413
+ {
6414
+ description: 'Pushing thermostat weekly programs succeeded.',
6415
+ properties: {
6416
+ action_attempt_id: {
6417
+ description: 'ID of the action attempt.',
6418
+ format: 'uuid',
6419
+ type: 'string',
6420
+ },
6421
+ action_type: {
6422
+ enum: ['PUSH_THERMOSTAT_PROGRAMS'],
6423
+ type: 'string',
6424
+ },
6425
+ error: {
6426
+ description:
6427
+ 'Errors associated with the action attempt. Null for successful action attempts.',
6428
+ nullable: true,
6429
+ },
6430
+ result: { properties: {}, type: 'object' },
6431
+ status: { enum: ['success'], type: 'string' },
6432
+ },
6433
+ required: [
6434
+ 'action_attempt_id',
6435
+ 'status',
6436
+ 'error',
6437
+ 'action_type',
6438
+ 'result',
6439
+ ],
6440
+ type: 'object',
6441
+ },
6442
+ {
6443
+ description: 'Pushing thermostat weekly programs failed.',
6444
+ properties: {
6445
+ action_attempt_id: {
6446
+ description: 'ID of the action attempt.',
6447
+ format: 'uuid',
6448
+ type: 'string',
6449
+ },
6450
+ action_type: {
6451
+ enum: ['PUSH_THERMOSTAT_PROGRAMS'],
6452
+ type: 'string',
6453
+ },
6454
+ error: {
6455
+ properties: {
6456
+ message: { type: 'string' },
6457
+ type: { type: 'string' },
6458
+ },
6459
+ required: ['type', 'message'],
6460
+ type: 'object',
6461
+ },
6462
+ result: {
6463
+ description:
6464
+ 'Result of the action attempt. Null for failed action attempts.',
6465
+ nullable: true,
6466
+ },
6467
+ status: { enum: ['error'], type: 'string' },
6468
+ },
6469
+ required: [
6470
+ 'action_attempt_id',
6471
+ 'status',
6472
+ 'result',
6473
+ 'action_type',
6474
+ 'error',
6475
+ ],
6476
+ type: 'object',
6477
+ },
6356
6478
  {
6357
6479
  properties: {
6358
6480
  action_attempt_id: {
@@ -16199,6 +16321,30 @@ export default {
16199
16321
  required: ['message', 'warning_code'],
16200
16322
  type: 'object',
16201
16323
  },
16324
+ {
16325
+ description: 'Duplicate access code name detected.',
16326
+ properties: {
16327
+ created_at: {
16328
+ description:
16329
+ 'Date and time at which Seam created the warning.',
16330
+ format: 'date-time',
16331
+ type: 'string',
16332
+ },
16333
+ message: {
16334
+ description:
16335
+ 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
16336
+ type: 'string',
16337
+ },
16338
+ warning_code: {
16339
+ description:
16340
+ 'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
16341
+ enum: ['schlage_detected_duplicate_code_name'],
16342
+ type: 'string',
16343
+ },
16344
+ },
16345
+ required: ['message', 'warning_code'],
16346
+ type: 'object',
16347
+ },
16202
16348
  {
16203
16349
  description:
16204
16350
  'Received an error when attempting to create this code.',
@@ -29864,86 +30010,12 @@ export default {
29864
30010
  'application/json': {
29865
30011
  schema: {
29866
30012
  properties: {
29867
- ok: { type: 'boolean' },
29868
- thermostat_weekly_program: {
29869
- properties: {
29870
- created_at: {
29871
- description:
29872
- 'Date and time at which the thermostat weekly program was created.',
29873
- format: 'date-time',
29874
- type: 'string',
29875
- },
29876
- device_id: {
29877
- description:
29878
- 'ID of the thermostat device the weekly program is for.',
29879
- format: 'uuid',
29880
- type: 'string',
29881
- },
29882
- friday_program_id: {
29883
- description:
29884
- 'ID of the thermostat daily program to run on Fridays.',
29885
- format: 'uuid',
29886
- nullable: true,
29887
- type: 'string',
29888
- },
29889
- monday_program_id: {
29890
- description:
29891
- 'ID of the thermostat daily program to run on Mondays.',
29892
- format: 'uuid',
29893
- nullable: true,
29894
- type: 'string',
29895
- },
29896
- saturday_program_id: {
29897
- description:
29898
- 'ID of the thermostat daily program to run on Saturdays.',
29899
- format: 'uuid',
29900
- nullable: true,
29901
- type: 'string',
29902
- },
29903
- sunday_program_id: {
29904
- description:
29905
- 'ID of the thermostat daily program to run on Sundays.',
29906
- format: 'uuid',
29907
- nullable: true,
29908
- type: 'string',
29909
- },
29910
- thursday_program_id: {
29911
- description:
29912
- 'ID of the thermostat daily program to run on Thursdays.',
29913
- format: 'uuid',
29914
- nullable: true,
29915
- type: 'string',
29916
- },
29917
- tuesday_program_id: {
29918
- description:
29919
- 'ID of the thermostat daily program to run on Tuesdays.',
29920
- format: 'uuid',
29921
- nullable: true,
29922
- type: 'string',
29923
- },
29924
- wednesday_program_id: {
29925
- description:
29926
- 'ID of the thermostat daily program to run on Wednesdays.',
29927
- format: 'uuid',
29928
- nullable: true,
29929
- type: 'string',
29930
- },
29931
- },
29932
- required: [
29933
- 'device_id',
29934
- 'monday_program_id',
29935
- 'tuesday_program_id',
29936
- 'wednesday_program_id',
29937
- 'thursday_program_id',
29938
- 'friday_program_id',
29939
- 'saturday_program_id',
29940
- 'sunday_program_id',
29941
- 'created_at',
29942
- ],
29943
- type: 'object',
30013
+ action_attempt: {
30014
+ $ref: '#/components/schemas/action_attempt',
29944
30015
  },
30016
+ ok: { type: 'boolean' },
29945
30017
  },
29946
- required: ['thermostat_weekly_program', 'ok'],
30018
+ required: ['action_attempt', 'ok'],
29947
30019
  type: 'object',
29948
30020
  },
29949
30021
  },
@@ -29961,10 +30033,11 @@ export default {
29961
30033
  ],
29962
30034
  summary: '/thermostats/activate_weekly_program',
29963
30035
  tags: ['/thermostats'],
30036
+ 'x-action-attempt-type': 'PUSH_THERMOSTAT_PROGRAMS',
29964
30037
  'x-fern-sdk-group-name': ['thermostats'],
29965
30038
  'x-fern-sdk-method-name': 'activate_weekly_program',
29966
- 'x-fern-sdk-return-value': 'thermostat_weekly_program',
29967
- 'x-response-key': 'thermostat_weekly_program',
30039
+ 'x-fern-sdk-return-value': 'action_attempt',
30040
+ 'x-response-key': 'action_attempt',
29968
30041
  'x-title': 'Activate a Thermostat Weekly Program',
29969
30042
  'x-undocumented': 'Unreleased.',
29970
30043
  },
@@ -29996,8 +30069,13 @@ export default {
29996
30069
  content: {
29997
30070
  'application/json': {
29998
30071
  schema: {
29999
- properties: { ok: { type: 'boolean' } },
30000
- required: ['ok'],
30072
+ properties: {
30073
+ action_attempt: {
30074
+ $ref: '#/components/schemas/action_attempt',
30075
+ },
30076
+ ok: { type: 'boolean' },
30077
+ },
30078
+ required: ['action_attempt', 'ok'],
30001
30079
  type: 'object',
30002
30080
  },
30003
30081
  },
@@ -30015,9 +30093,11 @@ export default {
30015
30093
  ],
30016
30094
  summary: '/thermostats/clear_weekly_program',
30017
30095
  tags: ['/thermostats'],
30096
+ 'x-action-attempt-type': 'PUSH_THERMOSTAT_PROGRAMS',
30018
30097
  'x-fern-sdk-group-name': ['thermostats'],
30019
30098
  'x-fern-sdk-method-name': 'clear_weekly_program',
30020
- 'x-response-key': null,
30099
+ 'x-fern-sdk-return-value': 'action_attempt',
30100
+ 'x-response-key': 'action_attempt',
30021
30101
  'x-title': 'Clear a Thermostat Weekly Program',
30022
30102
  'x-undocumented': 'Unreleased.',
30023
30103
  },
@@ -30447,8 +30527,13 @@ export default {
30447
30527
  content: {
30448
30528
  'application/json': {
30449
30529
  schema: {
30450
- properties: { ok: { type: 'boolean' } },
30451
- required: ['ok'],
30530
+ properties: {
30531
+ action_attempt: {
30532
+ $ref: '#/components/schemas/action_attempt',
30533
+ },
30534
+ ok: { type: 'boolean' },
30535
+ },
30536
+ required: ['action_attempt', 'ok'],
30452
30537
  type: 'object',
30453
30538
  },
30454
30539
  },
@@ -30466,8 +30551,9 @@ export default {
30466
30551
  ],
30467
30552
  summary: '/thermostats/daily_programs/update',
30468
30553
  tags: ['/thermostats'],
30554
+ 'x-action-attempt-type': 'PUSH_THERMOSTAT_PROGRAMS',
30469
30555
  'x-fern-ignore': true,
30470
- 'x-response-key': null,
30556
+ 'x-response-key': 'action_attempt',
30471
30557
  'x-title': 'Update a Thermostat Daily Program',
30472
30558
  'x-undocumented': 'Unreleased.',
30473
30559
  },
@@ -30522,8 +30608,13 @@ export default {
30522
30608
  content: {
30523
30609
  'application/json': {
30524
30610
  schema: {
30525
- properties: { ok: { type: 'boolean' } },
30526
- required: ['ok'],
30611
+ properties: {
30612
+ action_attempt: {
30613
+ $ref: '#/components/schemas/action_attempt',
30614
+ },
30615
+ ok: { type: 'boolean' },
30616
+ },
30617
+ required: ['action_attempt', 'ok'],
30527
30618
  type: 'object',
30528
30619
  },
30529
30620
  },
@@ -30541,9 +30632,11 @@ export default {
30541
30632
  ],
30542
30633
  summary: '/thermostats/daily_programs/update',
30543
30634
  tags: ['/thermostats'],
30635
+ 'x-action-attempt-type': 'PUSH_THERMOSTAT_PROGRAMS',
30544
30636
  'x-fern-sdk-group-name': ['thermostats', 'daily_programs'],
30545
30637
  'x-fern-sdk-method-name': 'update',
30546
- 'x-response-key': null,
30638
+ 'x-fern-sdk-return-value': 'action_attempt',
30639
+ 'x-response-key': 'action_attempt',
30547
30640
  'x-title': 'Update a Thermostat Daily Program',
30548
30641
  'x-undocumented': 'Unreleased.',
30549
30642
  },