@seamapi/types 1.404.1 → 1.404.3

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.404.1",
3
+ "version": "1.404.3",
4
4
  "description": "TypeScript types for the Seam API.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -532,13 +532,7 @@ export const access_code = z.object({
532
532
  .string()
533
533
  .nullable()
534
534
  .describe(
535
- `Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes.
536
-
537
- Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as \`first_name\` and \`last_name\`.
538
-
539
- To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints.
540
-
541
- To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called \`appearance\`. This is an object with a \`name\` property and, optionally, \`first_name\` and \`last_name\` properties (for providers that break down a name into components).`,
535
+ "Name of the access code. Enables administrators and users to identify the access code easily, especially when there are numerous access codes. Note that the name provided on Seam is used to identify the code on Seam and is not necessarily the name that will appear in the lock provider's app or on the device. This is because lock providers may have constraints on names, such as length, uniqueness, or characters that can be used. In addition, some lock providers may break down names into components such as `first_name` and `last_name`. To provide a consistent experience, Seam identifies the code on Seam by its name but may modify the name that appears on the lock provider's app or on the device. For example, Seam may add additional characters or truncate the name to meet provider constraints. To help your users identify codes set by Seam, Seam provides the name exactly as it appears on the lock provider's app or on the device as a separate property called `appearance`. This is an object with a `name` property and, optionally, `first_name` and `last_name` properties (for providers that break down a name into components).",
542
536
  ),
543
537
  code: z
544
538
  .string()
@@ -587,7 +581,7 @@ export const access_code = z.object({
587
581
  status: z
588
582
  .enum(['setting', 'set', 'unset', 'removing', 'unknown'])
589
583
  .describe(
590
- 'Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting.',
584
+ 'Current status of the access code within the operational lifecycle. Values are `setting`, a transitional phase that indicates that the code is being configured or activated; `set`, which indicates that the code is active and operational; `unset`, which indicates a deactivated or unused state, either before activation or after deliberate deactivation; `removing`, which indicates a transitional period in which the code is being deleted or made inactive; and `unknown`, which indicates an indeterminate state, due to reasons such as system errors or incomplete data, that highlights a potential need for system review or troubleshooting. See also [Lifecycle of Access Codes](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes/lifecycle-of-access-codes).',
591
585
  ),
592
586
  is_backup_access_code_available: z
593
587
  .boolean()
@@ -7,9 +7,21 @@ const common_connected_account_error = z.object({
7
7
  .string()
8
8
  .datetime()
9
9
  .describe('Date and time at which Seam created the error.'),
10
- message: z.string(),
11
- is_connected_account_error: z.boolean().optional(),
12
- is_bridge_error: z.boolean().optional(),
10
+ message: z
11
+ .string()
12
+ .describe(
13
+ 'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
14
+ ),
15
+ is_connected_account_error: z
16
+ .boolean()
17
+ .optional()
18
+ .describe(
19
+ 'Indicates whether the error is related specifically to the connected account.',
20
+ ),
21
+ is_bridge_error: z
22
+ .boolean()
23
+ .optional()
24
+ .describe('Indicates whether the error is related to Seam Bridge.'),
13
25
  })
14
26
 
15
27
  const error_code_description =
@@ -23,7 +35,11 @@ const common_connected_account_warning = z.object({
23
35
  .string()
24
36
  .datetime()
25
37
  .describe('Date and time at which Seam created the warning.'),
26
- message: z.string(),
38
+ message: z
39
+ .string()
40
+ .describe(
41
+ 'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
42
+ ),
27
43
  })
28
44
 
29
45
  export const account_disconnected = common_connected_account_error
@@ -42,11 +58,15 @@ export const invalid_credentials = common_connected_account_error
42
58
  })
43
59
  .describe('Credentials provided were invalid.')
44
60
 
45
- export const bridge_disconnected = common_connected_account_error.extend({
46
- error_code: z.literal('bridge_disconnected').describe(error_code_description),
47
- })
48
- .describe(`Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/latest/capability-guides/seam-bridge), for example, if Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline.
49
- See also [Troubleshooting Your Access Control System](https://docs.seam.co/latest/capability-guides/access-systems/troubleshooting-your-access-control-system#acs_system.errors.seam_bridge_disconnected).`)
61
+ export const bridge_disconnected = common_connected_account_error
62
+ .extend({
63
+ error_code: z
64
+ .literal('bridge_disconnected')
65
+ .describe(error_code_description),
66
+ })
67
+ .describe(
68
+ 'Indicates that the Seam API cannot communicate with [Seam Bridge](https://docs.seam.co/latest/capability-guides/seam-bridge), for example, if Seam Bridge executable has stopped or if the computer running the Seam Bridge executable is offline. See also [Troubleshooting Your Access Control System](https://docs.seam.co/latest/capability-guides/access-systems/troubleshooting-your-access-control-system#acs_system.errors.seam_bridge_disconnected).',
69
+ )
50
70
 
51
71
  export const salto_ks_subscription_limit_exceeded =
52
72
  common_connected_account_error
@@ -54,16 +74,48 @@ export const salto_ks_subscription_limit_exceeded =
54
74
  error_code: z
55
75
  .literal('salto_ks_subscription_limit_exceeded')
56
76
  .describe(error_code_description),
57
- salto_ks_metadata: z.object({
58
- sites: z.array(
59
- z.object({
60
- site_id: z.string(),
61
- site_name: z.string(),
62
- subscribed_site_user_count: z.number().int().min(0),
63
- site_user_subscription_limit: z.number().int().min(0),
64
- }),
77
+ salto_ks_metadata: z
78
+ .object({
79
+ sites: z
80
+ .array(
81
+ z
82
+ .object({
83
+ site_id: z
84
+ .string()
85
+ .describe(
86
+ 'ID of a Salto site associated with the connected account that has an error.',
87
+ ),
88
+ site_name: z
89
+ .string()
90
+ .describe(
91
+ 'Name of a Salto site associated with the connected account that has an error.',
92
+ ),
93
+ subscribed_site_user_count: z
94
+ .number()
95
+ .int()
96
+ .min(0)
97
+ .describe(
98
+ 'Count of subscribed site users for a Salto site associated with the connected account that has an error.',
99
+ ),
100
+ site_user_subscription_limit: z
101
+ .number()
102
+ .int()
103
+ .min(0)
104
+ .describe(
105
+ 'Subscription limit of site users for a Salto site associated with the connected account that has an error.',
106
+ ),
107
+ })
108
+ .describe(
109
+ 'Salto site associated with the connected account that has an error.',
110
+ ),
111
+ )
112
+ .describe(
113
+ 'Salto sites associated with the connected account that has an error.',
114
+ ),
115
+ })
116
+ .describe(
117
+ 'Salto KS metadata associated with the connected account that has an error.',
65
118
  ),
66
- }),
67
119
  })
68
120
  .describe(
69
121
  'Indicates that the maximum number of users allowed for the site has been reached. This means that new access codes cannot be created. Contact Salto support to increase the user limit.',
@@ -101,7 +153,7 @@ export const unknown_issue_with_connected_account =
101
153
  .describe(warning_code_description),
102
154
  })
103
155
  .describe(
104
- 'An unknown issue occurred while syncing the state of this connected account with the provider. This issue may affect the proper functioning of one or more resources in this account.',
156
+ 'An unknown issue occurred while syncing the state of the connected account with the provider. This issue may affect the proper functioning of one or more resources in the account.',
105
157
  )
106
158
 
107
159
  const scheduled_maintenance_window = common_connected_account_warning
@@ -110,7 +162,7 @@ const scheduled_maintenance_window = common_connected_account_warning
110
162
  .literal('scheduled_maintenance_window')
111
163
  .describe(warning_code_description),
112
164
  })
113
- .describe('Scheduled downtime for account planned.')
165
+ .describe('Scheduled downtime planned for the connected account.')
114
166
 
115
167
  const salto_ks_subscription_limit_almost_reached =
116
168
  common_connected_account_warning
@@ -118,19 +170,51 @@ const salto_ks_subscription_limit_almost_reached =
118
170
  warning_code: z
119
171
  .literal('salto_ks_subscription_limit_almost_reached')
120
172
  .describe(warning_code_description),
121
- salto_ks_metadata: z.object({
122
- sites: z.array(
123
- z.object({
124
- site_id: z.string(),
125
- site_name: z.string(),
126
- site_user_subscription_limit: z.number().int().min(0),
127
- subscribed_site_user_count: z.number().int().min(0),
128
- }),
173
+ salto_ks_metadata: z
174
+ .object({
175
+ sites: z
176
+ .array(
177
+ z
178
+ .object({
179
+ site_id: z
180
+ .string()
181
+ .describe(
182
+ 'ID of a Salto site associated with the connected account that has a warning.',
183
+ ),
184
+ site_name: z
185
+ .string()
186
+ .describe(
187
+ 'Name of a Salto site associated with the connected account that has a warning.',
188
+ ),
189
+ site_user_subscription_limit: z
190
+ .number()
191
+ .int()
192
+ .min(0)
193
+ .describe(
194
+ 'Subscription limit of site users for a Salto site associated with the connected account that has a warning.',
195
+ ),
196
+ subscribed_site_user_count: z
197
+ .number()
198
+ .int()
199
+ .min(0)
200
+ .describe(
201
+ 'Count of subscribed site users for a Salto site associated with the connected account that has a warning.',
202
+ ),
203
+ })
204
+ .describe(
205
+ 'Salto site associated with the connected account that has a warning.',
206
+ ),
207
+ )
208
+ .describe(
209
+ 'Salto sites associated with the connected account that has a warning.',
210
+ ),
211
+ })
212
+ .describe(
213
+ 'Salto KS metadata associated with the connected account that has a warning.',
129
214
  ),
130
- }),
131
215
  })
132
216
  .describe(
133
- 'Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Please increase your subscription limit, or delete some users from your site to rectify this.',
217
+ 'Indicates that the Salto KS site has exceeded 80% of the maximum number of allowed users. Increase your subscription limit or delete some users from your site.',
134
218
  )
135
219
 
136
220
  const connected_account_warning = z
@@ -139,7 +223,7 @@ const connected_account_warning = z
139
223
  unknown_issue_with_connected_account,
140
224
  salto_ks_subscription_limit_almost_reached,
141
225
  ])
142
- .describe('Warning associated with the `connected_account`.')
226
+ .describe('Warning associated with the connected account.')
143
227
 
144
228
  const connected_account_warning_map = z.object({
145
229
  scheduled_maintenance_window: scheduled_maintenance_window
@@ -157,23 +241,67 @@ export type ConnectedAccountWarningMap = z.infer<
157
241
  >
158
242
 
159
243
  export const connected_account = z.object({
160
- connected_account_id: z.string().uuid().optional(),
161
- created_at: z.string().datetime().optional(),
244
+ connected_account_id: z
245
+ .string()
246
+ .uuid()
247
+ .optional()
248
+ .describe('Unique identifier for the connected account.'),
249
+ created_at: z
250
+ .string()
251
+ .datetime()
252
+ .optional()
253
+ .describe('Date and time at which the connected account was created.'),
162
254
  user_identifier: z
163
255
  .object({
164
- username: z.string().optional(),
165
- api_url: z.string().optional(),
166
- email: z.string().optional(),
167
- phone: z.string().optional(),
168
- exclusive: z.boolean().optional(),
256
+ username: z
257
+ .string()
258
+ .optional()
259
+ .describe(
260
+ 'Username of the user identifier associated with the connected account.',
261
+ ),
262
+ api_url: z
263
+ .string()
264
+ .optional()
265
+ .describe(
266
+ 'API URL for the user identifier associated with the connected account.',
267
+ ),
268
+ email: z
269
+ .string()
270
+ .optional()
271
+ .describe(
272
+ 'Email address of the user identifier associated with the connected account.',
273
+ ),
274
+ phone: z
275
+ .string()
276
+ .optional()
277
+ .describe(
278
+ 'Phone number of the user identifier associated with the connected account.',
279
+ ),
280
+ exclusive: z
281
+ .boolean()
282
+ .optional()
283
+ .describe(
284
+ 'Indicates whether the user identifier associated with the connected account is exclusive.',
285
+ ),
169
286
  })
170
- .optional(),
171
- account_type: z.string().optional(),
172
- account_type_display_name: z.string(),
173
- errors: z.array(connected_account_error),
174
- warnings: z.array(connected_account_warning),
287
+ .optional()
288
+ .describe('User identifier associated with the connected account.'),
289
+ account_type: z.string().optional().describe('Type of connected account.'),
290
+ account_type_display_name: z
291
+ .string()
292
+ .describe('Display name for the connected account type.'),
293
+ errors: z
294
+ .array(connected_account_error)
295
+ .describe('Errors associated with the connected account.'),
296
+ warnings: z
297
+ .array(connected_account_warning)
298
+ .describe('Warnings associated with the connected account.'),
175
299
  custom_metadata,
176
- automatically_manage_new_devices: z.boolean(),
300
+ automatically_manage_new_devices: z
301
+ .boolean()
302
+ .describe(
303
+ 'Indicates whether Seam should [import all new devices](https://docs.seam.co/latest/core-concepts/connect-webviews/customizing-connect-webviews#automatically_manage_new_devices) for the connected account to make these devices available for use and management by the Seam API.',
304
+ ),
177
305
  }).describe(`
178
306
  ---
179
307
  route_path: /connected_accounts
@@ -114,7 +114,6 @@ export const PROVIDER_CATEGORY_MAP = {
114
114
  thermostats: ['ecobee', 'nest', 'sensi', 'honeywell_resideo'],
115
115
  noise_sensors: ['minut', 'noiseaware'],
116
116
  access_control_systems: [
117
- 'pti',
118
117
  'visionline',
119
118
  'assa_abloy_credential_service',
120
119
  'latch',