@seamapi/types 1.344.0 → 1.344.2
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/dist/connect.cjs +1833 -2018
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +496 -633
- package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +7 -28
- package/lib/seam/connect/models/access-codes/managed-access-code.js +7 -3
- package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
- package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +5 -26
- package/lib/seam/connect/models/acs/acs-credential.d.ts +2 -2
- package/lib/seam/connect/models/acs/acs-credential.js +1 -1
- package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-system.d.ts +2 -2
- package/lib/seam/connect/models/acs/acs-system.js +2 -2
- package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-user.d.ts +5 -5
- package/lib/seam/connect/models/acs/acs-user.js +2 -2
- package/lib/seam/connect/models/acs/acs-user.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +4 -4
- package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +2 -2
- package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +2 -2
- package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +4 -4
- package/lib/seam/connect/models/connected-accounts/connected-account.js +6 -3
- package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +6 -40
- package/lib/seam/connect/models/devices/device.js +6 -11
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/phone.d.ts +4 -25
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +4 -25
- package/lib/seam/connect/openapi.d.ts +294 -223
- package/lib/seam/connect/openapi.js +1756 -1951
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +164 -275
- package/package.json +1 -1
- package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +9 -3
- package/src/lib/seam/connect/models/acs/acs-credential.ts +1 -1
- package/src/lib/seam/connect/models/acs/acs-system.ts +2 -2
- package/src/lib/seam/connect/models/acs/acs-user.ts +2 -2
- package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +6 -3
- package/src/lib/seam/connect/models/devices/device.ts +8 -12
- package/src/lib/seam/connect/openapi.ts +1649 -1840
- package/src/lib/seam/connect/route-types.ts +3235 -3494
package/package.json
CHANGED
|
@@ -169,7 +169,7 @@ const hubitat_no_free_positions_available = common_access_code_error
|
|
|
169
169
|
})
|
|
170
170
|
.describe('No free positions available on the device.')
|
|
171
171
|
|
|
172
|
-
const access_code_error = z.
|
|
172
|
+
const access_code_error = z.discriminatedUnion('error_code', [
|
|
173
173
|
smartthings_failed_to_set_access_code_error,
|
|
174
174
|
smartthings_failed_to_set_after_multiple_retries,
|
|
175
175
|
failed_to_set_on_device,
|
|
@@ -284,7 +284,7 @@ const management_transferred = common_access_code_warning
|
|
|
284
284
|
})
|
|
285
285
|
.describe('Management was transferred to another workspace.')
|
|
286
286
|
|
|
287
|
-
const access_code_warning = z.
|
|
287
|
+
const access_code_warning = z.discriminatedUnion('warning_code', [
|
|
288
288
|
smartthings_failed_to_set_access_code_warning,
|
|
289
289
|
schlage_detected_duplicate,
|
|
290
290
|
schlage_creation_outage,
|
|
@@ -350,7 +350,13 @@ export const access_code = z.object({
|
|
|
350
350
|
.datetime()
|
|
351
351
|
.describe('Date and time at which the access code was created.'),
|
|
352
352
|
errors: z
|
|
353
|
-
.array(
|
|
353
|
+
.array(
|
|
354
|
+
z.discriminatedUnion('error_code', [
|
|
355
|
+
...access_code_error.options,
|
|
356
|
+
...device_error.options,
|
|
357
|
+
...connected_account_error.options,
|
|
358
|
+
]),
|
|
359
|
+
)
|
|
354
360
|
.describe(
|
|
355
361
|
'Collection of errors associated with the access code, structured in a dictionary format. A unique "error_code" keys each error. Each error entry is an object containing two fields: "message" and "created_at." "message" is a string that describes the error. "created_at" is a date that indicates when the error was generated. This structure enables detailed tracking and timely response to critical issues.',
|
|
356
362
|
),
|
|
@@ -124,7 +124,7 @@ const salto_ks_certification_expired = common_acs_system_error.extend({
|
|
|
124
124
|
),
|
|
125
125
|
})
|
|
126
126
|
const acs_system_error = z
|
|
127
|
-
.
|
|
127
|
+
.discriminatedUnion('error_code', [
|
|
128
128
|
seam_bridge_disconnected,
|
|
129
129
|
visionline_instance_unreachable,
|
|
130
130
|
salto_ks_subscription_limit_exceeded,
|
|
@@ -182,7 +182,7 @@ const time_zone_does_not_match_location = common_acs_system_warning.extend({
|
|
|
182
182
|
})
|
|
183
183
|
|
|
184
184
|
const acs_system_warning = z
|
|
185
|
-
.
|
|
185
|
+
.discriminatedUnion('warning_code', [
|
|
186
186
|
salto_ks_subscription_limit_almost_reached,
|
|
187
187
|
time_zone_does_not_match_location,
|
|
188
188
|
])
|
|
@@ -68,7 +68,7 @@ const acs_users_failed_to_delete_on_acs_system = common_acs_user_error
|
|
|
68
68
|
)
|
|
69
69
|
|
|
70
70
|
const acs_user_errors = z
|
|
71
|
-
.
|
|
71
|
+
.discriminatedUnion('error_code', [
|
|
72
72
|
acs_users_deleted_externally,
|
|
73
73
|
acs_users_salto_ks_subscription_limit_exceeded,
|
|
74
74
|
acs_users_failed_to_create_on_acs_system,
|
|
@@ -135,7 +135,7 @@ export const acs_users_warning_map = z.object({
|
|
|
135
135
|
})
|
|
136
136
|
|
|
137
137
|
export const acs_users_warnings = z
|
|
138
|
-
.
|
|
138
|
+
.discriminatedUnion('warning_code', [
|
|
139
139
|
acs_users_being_deleted,
|
|
140
140
|
acs_users_salto_ks_user_not_subscribed,
|
|
141
141
|
unknown_issue_with_acs_user,
|
|
@@ -8,7 +8,7 @@ const common_connected_account_error = z.object({
|
|
|
8
8
|
})
|
|
9
9
|
|
|
10
10
|
const error_code_description =
|
|
11
|
-
'Unique identifier of the type of
|
|
11
|
+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.'
|
|
12
12
|
|
|
13
13
|
const warning_code_description =
|
|
14
14
|
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.'
|
|
@@ -33,7 +33,7 @@ export const invalid_credentials = common_connected_account_error
|
|
|
33
33
|
})
|
|
34
34
|
.describe('Credentials provided were invalid.')
|
|
35
35
|
|
|
36
|
-
export const connected_account_error = z.
|
|
36
|
+
export const connected_account_error = z.discriminatedUnion('error_code', [
|
|
37
37
|
account_disconnected,
|
|
38
38
|
invalid_credentials,
|
|
39
39
|
])
|
|
@@ -61,7 +61,10 @@ const scheduled_maintenance_window = common_connected_account_warning
|
|
|
61
61
|
.describe('Scheduled downtime for account planned.')
|
|
62
62
|
|
|
63
63
|
const connected_account_warning = z
|
|
64
|
-
.
|
|
64
|
+
.discriminatedUnion('warning_code', [
|
|
65
|
+
scheduled_maintenance_window,
|
|
66
|
+
unknown_issue_with_connected_account,
|
|
67
|
+
])
|
|
65
68
|
.describe('Warning associated with the `connected_account`.')
|
|
66
69
|
|
|
67
70
|
export type ConnectedAccountWarning = z.infer<typeof connected_account_warning>
|
|
@@ -41,14 +41,6 @@ const device_removed = common_device_error
|
|
|
41
41
|
})
|
|
42
42
|
.describe('Device has been removed')
|
|
43
43
|
|
|
44
|
-
const account_disconnected = common_device_error
|
|
45
|
-
.extend({
|
|
46
|
-
error_code: z
|
|
47
|
-
.literal('account_disconnected')
|
|
48
|
-
.describe(error_code_description),
|
|
49
|
-
})
|
|
50
|
-
.describe('Account is disconnected')
|
|
51
|
-
|
|
52
44
|
const hub_disconnected = common_device_error
|
|
53
45
|
.extend({
|
|
54
46
|
error_code: z.literal('hub_disconnected').describe(error_code_description),
|
|
@@ -128,10 +120,9 @@ const subscription_required = common_device_error
|
|
|
128
120
|
.describe('Subscription required to connect.')
|
|
129
121
|
|
|
130
122
|
export const device_error = z
|
|
131
|
-
.
|
|
123
|
+
.discriminatedUnion('error_code', [
|
|
132
124
|
device_offline,
|
|
133
125
|
device_removed,
|
|
134
|
-
account_disconnected,
|
|
135
126
|
hub_disconnected,
|
|
136
127
|
device_disconnected,
|
|
137
128
|
empty_backup_access_code_pool,
|
|
@@ -285,7 +276,7 @@ export const unknown_issue_with_phone = common_device_warning
|
|
|
285
276
|
'This issue may affect the proper functioning of this phone.',
|
|
286
277
|
)
|
|
287
278
|
|
|
288
|
-
const device_warning = z.
|
|
279
|
+
const device_warning = z.discriminatedUnion('warning_code', [
|
|
289
280
|
partial_backup_access_code_pool,
|
|
290
281
|
many_active_backup_codes,
|
|
291
282
|
salto_unknown_device_type,
|
|
@@ -501,7 +492,12 @@ export const device = z
|
|
|
501
492
|
'Unique identifier for the Seam workspace associated with the device.',
|
|
502
493
|
),
|
|
503
494
|
errors: z
|
|
504
|
-
.array(
|
|
495
|
+
.array(
|
|
496
|
+
z.discriminatedUnion('error_code', [
|
|
497
|
+
...device_error.options,
|
|
498
|
+
...connected_account_error.options,
|
|
499
|
+
]),
|
|
500
|
+
)
|
|
505
501
|
.describe(
|
|
506
502
|
'Array of errors associated with the device. Each error object within the array contains two fields: "error_code" and "message." "error_code" is a string that uniquely identifies the type of error, enabling quick recognition and categorization of the issue. "message" provides a more detailed description of the error, offering insights into the issue and potentially how to rectify it.',
|
|
507
503
|
),
|