@seamapi/types 1.1081.0 → 1.1083.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 (26) hide show
  1. package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +75 -0
  2. package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
  3. package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
  4. package/lib/seam/connect/models/action-attempts/activate-weekly-program.d.ts +77 -0
  5. package/lib/seam/connect/models/action-attempts/activate-weekly-program.js +31 -0
  6. package/lib/seam/connect/models/action-attempts/activate-weekly-program.js.map +1 -0
  7. package/lib/seam/connect/models/devices/device-provider.d.ts +3 -0
  8. package/lib/seam/connect/models/devices/device.d.ts +6 -0
  9. package/lib/seam/connect/models/devices/device.js +3 -0
  10. package/lib/seam/connect/models/devices/device.js.map +1 -1
  11. package/lib/seam/connect/models/devices/unmanaged-device.d.ts +4 -0
  12. package/lib/seam/connect/models/events/devices.d.ts +6 -0
  13. package/lib/seam/connect/models/events/devices.js +4 -0
  14. package/lib/seam/connect/models/events/devices.js.map +1 -1
  15. package/lib/seam/connect/models/events/seam-event.d.ts +3 -0
  16. package/lib/seam/connect/models/instant-keys/instant-key-preview.d.ts +6 -6
  17. package/lib/seam/connect/openapi.js +189 -0
  18. package/lib/seam/connect/openapi.js.map +1 -1
  19. package/lib/seam/connect/route-types.d.ts +3268 -214
  20. package/package.json +1 -1
  21. package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
  22. package/src/lib/seam/connect/models/action-attempts/activate-weekly-program.ts +46 -0
  23. package/src/lib/seam/connect/models/devices/device.ts +5 -0
  24. package/src/lib/seam/connect/models/events/devices.ts +6 -0
  25. package/src/lib/seam/connect/openapi.ts +203 -0
  26. package/src/lib/seam/connect/route-types.ts +3691 -218
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/types",
3
- "version": "1.1081.0",
3
+ "version": "1.1083.0",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,6 +1,7 @@
1
1
  import * as z from 'zod/v3'
2
2
 
3
3
  import { activate_climate_preset_action_attempt } from './activate-climate-preset.js'
4
+ import { activate_weekly_program_action_attempt } from './activate-weekly-program.js'
4
5
  import { assign_credential_action_attempt } from './assign-credential.js'
5
6
  import { configure_auto_lock_action_attempt } from './configure-auto-lock.js'
6
7
  import { deprecated_action_attempts } from './deprecated.js'
@@ -27,6 +28,7 @@ export const action_attempt = z.union([
27
28
  ...set_fan_mode_action_attempt.options,
28
29
  ...set_hvac_mode_action_attempt.options,
29
30
  ...activate_climate_preset_action_attempt.options,
31
+ ...activate_weekly_program_action_attempt.options,
30
32
  ...simulate_keypad_code_entry_action_attempt.options,
31
33
  ...simulate_manual_lock_via_keypad_action_attempt.options,
32
34
  ...push_thermostat_programs_action_attempt.options,
@@ -0,0 +1,46 @@
1
+ import * as z from 'zod/v3'
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
10
+ .literal('ACTIVATE_WEEKLY_PROGRAM')
11
+ .describe(
12
+ 'Action attempt to track the status of returning a thermostat to its weekly program.',
13
+ )
14
+
15
+ const error = z
16
+ .object({
17
+ type: z.string().describe('Type of the error.'),
18
+ message: z
19
+ .string()
20
+ .describe(
21
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
22
+ ),
23
+ })
24
+ .describe('Error associated with the action.')
25
+
26
+ const result = z.object({}).describe('Result of the action.')
27
+
28
+ export const activate_weekly_program_action_attempt = z.discriminatedUnion(
29
+ 'status',
30
+ [
31
+ common_pending_action_attempt
32
+ .extend({
33
+ action_type,
34
+ })
35
+ .describe('Activating the weekly program is pending.'),
36
+ common_succeeded_action_attempt
37
+ .extend({
38
+ action_type,
39
+ result,
40
+ })
41
+ .describe('Activating the weekly program succeeded.'),
42
+ common_failed_action_attempt
43
+ .extend({ action_type, error })
44
+ .describe('Activating the weekly program failed.'),
45
+ ],
46
+ )
@@ -41,6 +41,11 @@ export const device_capability_flags = z
41
41
  can_turn_off_hvac: z
42
42
  .boolean()
43
43
  .describe('Indicates whether the thermostat can be turned off.'),
44
+ can_activate_weekly_program: z
45
+ .boolean()
46
+ .describe(
47
+ 'Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.',
48
+ ),
44
49
  can_simulate_removal: z
45
50
  .boolean()
46
51
  .describe(
@@ -852,6 +852,12 @@ export const camera_activated_event = device_event.extend({
852
852
  .url()
853
853
  .optional()
854
854
  .describe('URL to a short video clip captured at the time of activation.'),
855
+ media_status: z
856
+ .enum(['pending', 'available', 'unavailable', 'failed'])
857
+ .optional()
858
+ .describe(
859
+ 'Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed.',
860
+ ),
855
861
  }).describe(`
856
862
  ---
857
863
  route_path: /devices
@@ -10920,6 +10920,119 @@ const openapi: OpenAPISpec = {
10920
10920
  ],
10921
10921
  type: 'object',
10922
10922
  },
10923
+ {
10924
+ description: 'Activating the weekly program is pending.',
10925
+ properties: {
10926
+ action_attempt_id: {
10927
+ description: 'ID of the action attempt.',
10928
+ format: 'uuid',
10929
+ type: 'string',
10930
+ },
10931
+ action_type: {
10932
+ description:
10933
+ 'Action attempt to track the status of returning a thermostat to its weekly program.',
10934
+ enum: ['ACTIVATE_WEEKLY_PROGRAM'],
10935
+ type: 'string',
10936
+ },
10937
+ error: {
10938
+ description:
10939
+ 'Errors associated with the action attempt. Null for pending action attempts.',
10940
+ nullable: true,
10941
+ },
10942
+ result: {
10943
+ description:
10944
+ 'Result of the action attempt. Null for pending action attempts.',
10945
+ nullable: true,
10946
+ },
10947
+ status: { enum: ['pending'], type: 'string' },
10948
+ },
10949
+ required: [
10950
+ 'action_attempt_id',
10951
+ 'status',
10952
+ 'result',
10953
+ 'error',
10954
+ 'action_type',
10955
+ ],
10956
+ type: 'object',
10957
+ },
10958
+ {
10959
+ description: 'Activating the weekly program succeeded.',
10960
+ properties: {
10961
+ action_attempt_id: {
10962
+ description: 'ID of the action attempt.',
10963
+ format: 'uuid',
10964
+ type: 'string',
10965
+ },
10966
+ action_type: {
10967
+ description:
10968
+ 'Action attempt to track the status of returning a thermostat to its weekly program.',
10969
+ enum: ['ACTIVATE_WEEKLY_PROGRAM'],
10970
+ type: 'string',
10971
+ },
10972
+ error: {
10973
+ description:
10974
+ 'Errors associated with the action attempt. Null for successful action attempts.',
10975
+ nullable: true,
10976
+ },
10977
+ result: {
10978
+ description: 'Result of the action.',
10979
+ properties: {},
10980
+ type: 'object',
10981
+ },
10982
+ status: { enum: ['success'], type: 'string' },
10983
+ },
10984
+ required: [
10985
+ 'action_attempt_id',
10986
+ 'status',
10987
+ 'error',
10988
+ 'action_type',
10989
+ 'result',
10990
+ ],
10991
+ type: 'object',
10992
+ },
10993
+ {
10994
+ description: 'Activating the weekly program failed.',
10995
+ properties: {
10996
+ action_attempt_id: {
10997
+ description: 'ID of the action attempt.',
10998
+ format: 'uuid',
10999
+ type: 'string',
11000
+ },
11001
+ action_type: {
11002
+ description:
11003
+ 'Action attempt to track the status of returning a thermostat to its weekly program.',
11004
+ enum: ['ACTIVATE_WEEKLY_PROGRAM'],
11005
+ type: 'string',
11006
+ },
11007
+ error: {
11008
+ description: 'Error associated with the action.',
11009
+ properties: {
11010
+ message: {
11011
+ description:
11012
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
11013
+ type: 'string',
11014
+ },
11015
+ type: { description: 'Type of the error.', type: 'string' },
11016
+ },
11017
+ required: ['type', 'message'],
11018
+ type: 'object',
11019
+ },
11020
+ result: {
11021
+ description:
11022
+ 'Result of the action attempt. Null for failed action attempts.',
11023
+ nullable: true,
11024
+ },
11025
+ status: { enum: ['error'], type: 'string' },
11026
+ },
11027
+ required: [
11028
+ 'action_attempt_id',
11029
+ 'status',
11030
+ 'result',
11031
+ 'action_type',
11032
+ 'error',
11033
+ ],
11034
+ type: 'object',
11035
+ },
10923
11036
  {
10924
11037
  description: 'Simulating a keypad code entry is pending.',
10925
11038
  properties: {
@@ -13493,6 +13606,11 @@ const openapi: OpenAPISpec = {
13493
13606
  description:
13494
13607
  'Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam.',
13495
13608
  properties: {
13609
+ can_activate_weekly_program: {
13610
+ description:
13611
+ 'Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.',
13612
+ type: 'boolean',
13613
+ },
13496
13614
  can_configure_auto_lock: {
13497
13615
  description:
13498
13616
  'Indicates whether the lock supports configuring automatic locking.',
@@ -18067,6 +18185,11 @@ const openapi: OpenAPISpec = {
18067
18185
  },
18068
18186
  device_provider: {
18069
18187
  properties: {
18188
+ can_activate_weekly_program: {
18189
+ description:
18190
+ 'Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.',
18191
+ type: 'boolean',
18192
+ },
18070
18193
  can_configure_auto_lock: {
18071
18194
  description:
18072
18195
  'Indicates whether the lock supports configuring automatic locking.',
@@ -28988,6 +29111,12 @@ const openapi: OpenAPISpec = {
28988
29111
  format: 'uri',
28989
29112
  type: 'string',
28990
29113
  },
29114
+ media_status: {
29115
+ description:
29116
+ 'Status of the recorded clip and thumbnail for this activation, when the camera supports event recordings. `pending` while Seam retrieves the recording, `available` once it is stored, `unavailable` if no recording covers the activation, and `failed` if retrieval failed.',
29117
+ enum: ['pending', 'available', 'unavailable', 'failed'],
29118
+ type: 'string',
29119
+ },
28991
29120
  motion_sub_type: {
28992
29121
  description: 'Sub-type of motion detected, if available.',
28993
29122
  enum: ['human', 'vehicle', 'package', 'other'],
@@ -36121,6 +36250,11 @@ const openapi: OpenAPISpec = {
36121
36250
  description:
36122
36251
  'Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).',
36123
36252
  properties: {
36253
+ can_activate_weekly_program: {
36254
+ description:
36255
+ 'Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.',
36256
+ type: 'boolean',
36257
+ },
36124
36258
  can_configure_auto_lock: {
36125
36259
  description:
36126
36260
  'Indicates whether the lock supports configuring automatic locking.',
@@ -51066,6 +51200,7 @@ const openapi: OpenAPISpec = {
51066
51200
  'can_hvac_cool',
51067
51201
  'can_hvac_heat_cool',
51068
51202
  'can_turn_off_hvac',
51203
+ 'can_activate_weekly_program',
51069
51204
  'can_simulate_removal',
51070
51205
  'can_simulate_connection',
51071
51206
  'can_simulate_disconnection',
@@ -51099,6 +51234,7 @@ const openapi: OpenAPISpec = {
51099
51234
  'can_hvac_cool',
51100
51235
  'can_hvac_heat_cool',
51101
51236
  'can_turn_off_hvac',
51237
+ 'can_activate_weekly_program',
51102
51238
  'can_simulate_removal',
51103
51239
  'can_simulate_connection',
51104
51240
  'can_simulate_disconnection',
@@ -53335,6 +53471,7 @@ const openapi: OpenAPISpec = {
53335
53471
  'can_hvac_cool',
53336
53472
  'can_hvac_heat_cool',
53337
53473
  'can_turn_off_hvac',
53474
+ 'can_activate_weekly_program',
53338
53475
  'can_simulate_removal',
53339
53476
  'can_simulate_connection',
53340
53477
  'can_simulate_disconnection',
@@ -53368,6 +53505,7 @@ const openapi: OpenAPISpec = {
53368
53505
  'can_hvac_cool',
53369
53506
  'can_hvac_heat_cool',
53370
53507
  'can_turn_off_hvac',
53508
+ 'can_activate_weekly_program',
53371
53509
  'can_simulate_removal',
53372
53510
  'can_simulate_connection',
53373
53511
  'can_simulate_disconnection',
@@ -66805,6 +66943,71 @@ const openapi: OpenAPISpec = {
66805
66943
  'x-title': 'Activate a Climate Preset',
66806
66944
  },
66807
66945
  },
66946
+ '/thermostats/activate_weekly_program': {
66947
+ post: {
66948
+ description:
66949
+ "Returns a specified [thermostat](https://www.seam.co/docs/capability-guides/thermostats) to its [weekly program](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-programs), the schedule that is configured on the device itself, releasing any hold that Seam has set. Seam stops managing the thermostat's climate until you [activate a climate preset](https://www.seam.co/docs/capability-guides/thermostats/configure-current-climate-settings), make a direct climate setting change, or one of the thermostat's [scheduled](https://www.seam.co/docs/capability-guides/thermostats/creating-and-managing-thermostat-schedules) presets reaches its activation time.",
66950
+ operationId: 'thermostatsActivateWeeklyProgramPost',
66951
+ requestBody: {
66952
+ content: {
66953
+ 'application/json': {
66954
+ schema: {
66955
+ properties: {
66956
+ device_id: {
66957
+ description:
66958
+ 'ID of the thermostat device that you want to return to its weekly program.',
66959
+ format: 'uuid',
66960
+ type: 'string',
66961
+ },
66962
+ sync: {
66963
+ default: false,
66964
+ type: 'boolean',
66965
+ 'x-undocumented': 'Only used internally.',
66966
+ },
66967
+ },
66968
+ required: ['device_id'],
66969
+ type: 'object',
66970
+ },
66971
+ },
66972
+ },
66973
+ },
66974
+ responses: {
66975
+ '200': {
66976
+ content: {
66977
+ 'application/json': {
66978
+ schema: {
66979
+ properties: {
66980
+ action_attempt: {
66981
+ $ref: '#/components/schemas/action_attempt',
66982
+ },
66983
+ ok: { type: 'boolean' },
66984
+ },
66985
+ required: ['action_attempt', 'ok'],
66986
+ type: 'object',
66987
+ },
66988
+ },
66989
+ },
66990
+ description: 'OK',
66991
+ },
66992
+ '400': { description: 'Bad Request' },
66993
+ '401': { description: 'Unauthorized' },
66994
+ },
66995
+ security: [
66996
+ { client_session: [] },
66997
+ { pat_with_workspace: [] },
66998
+ { console_session_with_workspace: [] },
66999
+ { api_key: [] },
67000
+ ],
67001
+ summary: '/thermostats/activate_weekly_program',
67002
+ tags: ['/thermostats'],
67003
+ 'x-action-attempt-type': 'ACTIVATE_WEEKLY_PROGRAM',
67004
+ 'x-fern-sdk-group-name': ['thermostats'],
67005
+ 'x-fern-sdk-method-name': 'activate_weekly_program',
67006
+ 'x-fern-sdk-return-value': 'action_attempt',
67007
+ 'x-response-key': 'action_attempt',
67008
+ 'x-title': 'Activate the Weekly Program',
67009
+ },
67010
+ },
66808
67011
  '/thermostats/cool': {
66809
67012
  post: {
66810
67013
  description: