@seamapi/types 1.1081.0 → 1.1082.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/lib/seam/connect/models/action-attempts/action-attempt.d.ts +75 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js +2 -0
- package/lib/seam/connect/models/action-attempts/action-attempt.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/activate-weekly-program.d.ts +77 -0
- package/lib/seam/connect/models/action-attempts/activate-weekly-program.js +31 -0
- package/lib/seam/connect/models/action-attempts/activate-weekly-program.js.map +1 -0
- package/lib/seam/connect/models/devices/device-provider.d.ts +3 -0
- package/lib/seam/connect/models/devices/device.d.ts +6 -0
- package/lib/seam/connect/models/devices/device.js +3 -0
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +4 -0
- package/lib/seam/connect/openapi.js +184 -0
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +3258 -214
- package/package.json +1 -1
- package/src/lib/seam/connect/models/action-attempts/action-attempt.ts +2 -0
- package/src/lib/seam/connect/models/action-attempts/activate-weekly-program.ts +46 -0
- package/src/lib/seam/connect/models/devices/device.ts +5 -0
- package/src/lib/seam/connect/openapi.ts +197 -0
- package/src/lib/seam/connect/route-types.ts +3674 -218
package/package.json
CHANGED
|
@@ -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(
|
|
@@ -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.',
|
|
@@ -36121,6 +36244,11 @@ const openapi: OpenAPISpec = {
|
|
|
36121
36244
|
description:
|
|
36122
36245
|
'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
36246
|
properties: {
|
|
36247
|
+
can_activate_weekly_program: {
|
|
36248
|
+
description:
|
|
36249
|
+
'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.',
|
|
36250
|
+
type: 'boolean',
|
|
36251
|
+
},
|
|
36124
36252
|
can_configure_auto_lock: {
|
|
36125
36253
|
description:
|
|
36126
36254
|
'Indicates whether the lock supports configuring automatic locking.',
|
|
@@ -51066,6 +51194,7 @@ const openapi: OpenAPISpec = {
|
|
|
51066
51194
|
'can_hvac_cool',
|
|
51067
51195
|
'can_hvac_heat_cool',
|
|
51068
51196
|
'can_turn_off_hvac',
|
|
51197
|
+
'can_activate_weekly_program',
|
|
51069
51198
|
'can_simulate_removal',
|
|
51070
51199
|
'can_simulate_connection',
|
|
51071
51200
|
'can_simulate_disconnection',
|
|
@@ -51099,6 +51228,7 @@ const openapi: OpenAPISpec = {
|
|
|
51099
51228
|
'can_hvac_cool',
|
|
51100
51229
|
'can_hvac_heat_cool',
|
|
51101
51230
|
'can_turn_off_hvac',
|
|
51231
|
+
'can_activate_weekly_program',
|
|
51102
51232
|
'can_simulate_removal',
|
|
51103
51233
|
'can_simulate_connection',
|
|
51104
51234
|
'can_simulate_disconnection',
|
|
@@ -53335,6 +53465,7 @@ const openapi: OpenAPISpec = {
|
|
|
53335
53465
|
'can_hvac_cool',
|
|
53336
53466
|
'can_hvac_heat_cool',
|
|
53337
53467
|
'can_turn_off_hvac',
|
|
53468
|
+
'can_activate_weekly_program',
|
|
53338
53469
|
'can_simulate_removal',
|
|
53339
53470
|
'can_simulate_connection',
|
|
53340
53471
|
'can_simulate_disconnection',
|
|
@@ -53368,6 +53499,7 @@ const openapi: OpenAPISpec = {
|
|
|
53368
53499
|
'can_hvac_cool',
|
|
53369
53500
|
'can_hvac_heat_cool',
|
|
53370
53501
|
'can_turn_off_hvac',
|
|
53502
|
+
'can_activate_weekly_program',
|
|
53371
53503
|
'can_simulate_removal',
|
|
53372
53504
|
'can_simulate_connection',
|
|
53373
53505
|
'can_simulate_disconnection',
|
|
@@ -66805,6 +66937,71 @@ const openapi: OpenAPISpec = {
|
|
|
66805
66937
|
'x-title': 'Activate a Climate Preset',
|
|
66806
66938
|
},
|
|
66807
66939
|
},
|
|
66940
|
+
'/thermostats/activate_weekly_program': {
|
|
66941
|
+
post: {
|
|
66942
|
+
description:
|
|
66943
|
+
"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.",
|
|
66944
|
+
operationId: 'thermostatsActivateWeeklyProgramPost',
|
|
66945
|
+
requestBody: {
|
|
66946
|
+
content: {
|
|
66947
|
+
'application/json': {
|
|
66948
|
+
schema: {
|
|
66949
|
+
properties: {
|
|
66950
|
+
device_id: {
|
|
66951
|
+
description:
|
|
66952
|
+
'ID of the thermostat device that you want to return to its weekly program.',
|
|
66953
|
+
format: 'uuid',
|
|
66954
|
+
type: 'string',
|
|
66955
|
+
},
|
|
66956
|
+
sync: {
|
|
66957
|
+
default: false,
|
|
66958
|
+
type: 'boolean',
|
|
66959
|
+
'x-undocumented': 'Only used internally.',
|
|
66960
|
+
},
|
|
66961
|
+
},
|
|
66962
|
+
required: ['device_id'],
|
|
66963
|
+
type: 'object',
|
|
66964
|
+
},
|
|
66965
|
+
},
|
|
66966
|
+
},
|
|
66967
|
+
},
|
|
66968
|
+
responses: {
|
|
66969
|
+
'200': {
|
|
66970
|
+
content: {
|
|
66971
|
+
'application/json': {
|
|
66972
|
+
schema: {
|
|
66973
|
+
properties: {
|
|
66974
|
+
action_attempt: {
|
|
66975
|
+
$ref: '#/components/schemas/action_attempt',
|
|
66976
|
+
},
|
|
66977
|
+
ok: { type: 'boolean' },
|
|
66978
|
+
},
|
|
66979
|
+
required: ['action_attempt', 'ok'],
|
|
66980
|
+
type: 'object',
|
|
66981
|
+
},
|
|
66982
|
+
},
|
|
66983
|
+
},
|
|
66984
|
+
description: 'OK',
|
|
66985
|
+
},
|
|
66986
|
+
'400': { description: 'Bad Request' },
|
|
66987
|
+
'401': { description: 'Unauthorized' },
|
|
66988
|
+
},
|
|
66989
|
+
security: [
|
|
66990
|
+
{ client_session: [] },
|
|
66991
|
+
{ pat_with_workspace: [] },
|
|
66992
|
+
{ console_session_with_workspace: [] },
|
|
66993
|
+
{ api_key: [] },
|
|
66994
|
+
],
|
|
66995
|
+
summary: '/thermostats/activate_weekly_program',
|
|
66996
|
+
tags: ['/thermostats'],
|
|
66997
|
+
'x-action-attempt-type': 'ACTIVATE_WEEKLY_PROGRAM',
|
|
66998
|
+
'x-fern-sdk-group-name': ['thermostats'],
|
|
66999
|
+
'x-fern-sdk-method-name': 'activate_weekly_program',
|
|
67000
|
+
'x-fern-sdk-return-value': 'action_attempt',
|
|
67001
|
+
'x-response-key': 'action_attempt',
|
|
67002
|
+
'x-title': 'Activate the Weekly Program',
|
|
67003
|
+
},
|
|
67004
|
+
},
|
|
66808
67005
|
'/thermostats/cool': {
|
|
66809
67006
|
post: {
|
|
66810
67007
|
description:
|