@seamapi/http 2.4.1 → 2.4.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.
Files changed (179) hide show
  1. package/lib/request-parameters.d.ts +4 -0
  2. package/lib/request-parameters.js +18 -0
  3. package/lib/request-parameters.js.map +1 -0
  4. package/lib/resources/access-code.d.ts +13 -9
  5. package/lib/resources/acs-credential.d.ts +33 -1
  6. package/lib/resources/acs-entrance.d.ts +1 -1
  7. package/lib/resources/acs-system.d.ts +30 -0
  8. package/lib/resources/action-attempt.d.ts +82 -11
  9. package/lib/resources/device-provider.d.ts +1 -1
  10. package/lib/resources/device.d.ts +63 -18
  11. package/lib/resources/event.d.ts +0 -76
  12. package/lib/resources/unmanaged-access-code.d.ts +13 -9
  13. package/lib/resources/unmanaged-device.d.ts +28 -16
  14. package/lib/routes/access-codes/access-codes.d.ts +8 -35
  15. package/lib/routes/access-codes/access-codes.js +17 -6
  16. package/lib/routes/access-codes/access-codes.js.map +1 -1
  17. package/lib/routes/access-codes/simulate/simulate.js +2 -0
  18. package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
  19. package/lib/routes/access-codes/unmanaged/unmanaged.d.ts +5 -4
  20. package/lib/routes/access-codes/unmanaged/unmanaged.js +12 -6
  21. package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
  22. package/lib/routes/access-grants/access-grants.d.ts +20 -19
  23. package/lib/routes/access-grants/access-grants.js +10 -2
  24. package/lib/routes/access-grants/access-grants.js.map +1 -1
  25. package/lib/routes/access-grants/unmanaged/unmanaged.d.ts +1 -1
  26. package/lib/routes/access-grants/unmanaged/unmanaged.js +8 -4
  27. package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
  28. package/lib/routes/access-methods/access-methods.d.ts +8 -7
  29. package/lib/routes/access-methods/access-methods.js +12 -4
  30. package/lib/routes/access-methods/access-methods.js.map +1 -1
  31. package/lib/routes/access-methods/unmanaged/unmanaged.js +7 -4
  32. package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
  33. package/lib/routes/acs/access-groups/access-groups.js +20 -12
  34. package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
  35. package/lib/routes/acs/credentials/credentials.d.ts +1 -1
  36. package/lib/routes/acs/credentials/credentials.js +15 -6
  37. package/lib/routes/acs/credentials/credentials.js.map +1 -1
  38. package/lib/routes/acs/encoders/encoders.d.ts +1 -1
  39. package/lib/routes/acs/encoders/encoders.js +10 -4
  40. package/lib/routes/acs/encoders/encoders.js.map +1 -1
  41. package/lib/routes/acs/encoders/simulate/simulate.js +5 -0
  42. package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
  43. package/lib/routes/acs/entrances/entrances.d.ts +2 -2
  44. package/lib/routes/acs/entrances/entrances.js +8 -2
  45. package/lib/routes/acs/entrances/entrances.js.map +1 -1
  46. package/lib/routes/acs/systems/systems.js +11 -6
  47. package/lib/routes/acs/systems/systems.js.map +1 -1
  48. package/lib/routes/acs/users/users.d.ts +25 -24
  49. package/lib/routes/acs/users/users.js +22 -10
  50. package/lib/routes/acs/users/users.js.map +1 -1
  51. package/lib/routes/action-attempts/action-attempts.d.ts +1 -1
  52. package/lib/routes/action-attempts/action-attempts.js +5 -2
  53. package/lib/routes/action-attempts/action-attempts.js.map +1 -1
  54. package/lib/routes/client-sessions/client-sessions.d.ts +4 -3
  55. package/lib/routes/client-sessions/client-sessions.js +14 -6
  56. package/lib/routes/client-sessions/client-sessions.js.map +1 -1
  57. package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
  58. package/lib/routes/connect-webviews/connect-webviews.js +9 -4
  59. package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
  60. package/lib/routes/connected-accounts/connected-accounts.d.ts +5 -4
  61. package/lib/routes/connected-accounts/connected-accounts.js +8 -2
  62. package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
  63. package/lib/routes/connected-accounts/simulate/simulate.js +2 -0
  64. package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
  65. package/lib/routes/customers/customers.d.ts +9 -9
  66. package/lib/routes/customers/customers.js +4 -0
  67. package/lib/routes/customers/customers.js.map +1 -1
  68. package/lib/routes/devices/devices.d.ts +11 -10
  69. package/lib/routes/devices/devices.js +10 -4
  70. package/lib/routes/devices/devices.js.map +1 -1
  71. package/lib/routes/devices/simulate/simulate.js +7 -0
  72. package/lib/routes/devices/simulate/simulate.js.map +1 -1
  73. package/lib/routes/devices/unmanaged/unmanaged.d.ts +8 -23
  74. package/lib/routes/devices/unmanaged/unmanaged.js +6 -2
  75. package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
  76. package/lib/routes/events/events.d.ts +8 -7
  77. package/lib/routes/events/events.js +5 -2
  78. package/lib/routes/events/events.js.map +1 -1
  79. package/lib/routes/instant-keys/instant-keys.d.ts +4 -3
  80. package/lib/routes/instant-keys/instant-keys.js +10 -6
  81. package/lib/routes/instant-keys/instant-keys.js.map +1 -1
  82. package/lib/routes/locks/locks.d.ts +7 -46
  83. package/lib/routes/locks/locks.js +8 -2
  84. package/lib/routes/locks/locks.js.map +1 -1
  85. package/lib/routes/locks/simulate/simulate.js +3 -0
  86. package/lib/routes/locks/simulate/simulate.js.map +1 -1
  87. package/lib/routes/noise-sensors/noise-sensors.d.ts +0 -40
  88. package/lib/routes/noise-sensors/noise-sensors.js +2 -0
  89. package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
  90. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +12 -6
  91. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
  92. package/lib/routes/noise-sensors/simulate/simulate.js +2 -0
  93. package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
  94. package/lib/routes/phones/phones.js +10 -6
  95. package/lib/routes/phones/phones.js.map +1 -1
  96. package/lib/routes/phones/simulate/simulate.js +2 -0
  97. package/lib/routes/phones/simulate/simulate.js.map +1 -1
  98. package/lib/routes/seam-http-endpoints.d.ts +26 -26
  99. package/lib/routes/spaces/spaces.d.ts +16 -15
  100. package/lib/routes/spaces/spaces.js +19 -6
  101. package/lib/routes/spaces/spaces.js.map +1 -1
  102. package/lib/routes/thermostats/daily-programs/daily-programs.js +6 -2
  103. package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  104. package/lib/routes/thermostats/schedules/schedules.d.ts +2 -2
  105. package/lib/routes/thermostats/schedules/schedules.js +12 -6
  106. package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
  107. package/lib/routes/thermostats/simulate/simulate.js +3 -0
  108. package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
  109. package/lib/routes/thermostats/thermostats.d.ts +13 -53
  110. package/lib/routes/thermostats/thermostats.js +17 -2
  111. package/lib/routes/thermostats/thermostats.js.map +1 -1
  112. package/lib/routes/user-identities/unmanaged/unmanaged.d.ts +1 -1
  113. package/lib/routes/user-identities/unmanaged/unmanaged.js +8 -4
  114. package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
  115. package/lib/routes/user-identities/user-identities.d.ts +13 -12
  116. package/lib/routes/user-identities/user-identities.js +29 -14
  117. package/lib/routes/user-identities/user-identities.js.map +1 -1
  118. package/lib/routes/webhooks/webhooks.js +10 -4
  119. package/lib/routes/webhooks/webhooks.js.map +1 -1
  120. package/lib/routes/workspaces/workspaces.d.ts +9 -9
  121. package/lib/routes/workspaces/workspaces.js +6 -0
  122. package/lib/routes/workspaces/workspaces.js.map +1 -1
  123. package/lib/version.d.ts +1 -1
  124. package/lib/version.js +1 -1
  125. package/package.json +3 -3
  126. package/src/lib/request-parameters.ts +34 -0
  127. package/src/lib/resources/access-code.ts +15 -9
  128. package/src/lib/resources/acs-credential.ts +40 -0
  129. package/src/lib/resources/acs-entrance.ts +1 -1
  130. package/src/lib/resources/acs-system.ts +36 -0
  131. package/src/lib/resources/action-attempt.ts +91 -6
  132. package/src/lib/resources/device-provider.ts +1 -0
  133. package/src/lib/resources/device.ts +70 -20
  134. package/src/lib/resources/event.ts +0 -76
  135. package/src/lib/resources/unmanaged-access-code.ts +15 -9
  136. package/src/lib/resources/unmanaged-device.ts +33 -18
  137. package/src/lib/routes/access-codes/access-codes.ts +57 -41
  138. package/src/lib/routes/access-codes/simulate/simulate.ts +7 -0
  139. package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +44 -10
  140. package/src/lib/routes/access-grants/access-grants.ts +43 -21
  141. package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +24 -5
  142. package/src/lib/routes/access-methods/access-methods.ts +41 -11
  143. package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +17 -4
  144. package/src/lib/routes/acs/access-groups/access-groups.ts +43 -12
  145. package/src/lib/routes/acs/credentials/credentials.ts +28 -7
  146. package/src/lib/routes/acs/encoders/encoders.ts +28 -5
  147. package/src/lib/routes/acs/encoders/simulate/simulate.ts +25 -0
  148. package/src/lib/routes/acs/entrances/entrances.ts +23 -4
  149. package/src/lib/routes/acs/systems/systems.ts +23 -6
  150. package/src/lib/routes/acs/users/users.ts +76 -33
  151. package/src/lib/routes/action-attempts/action-attempts.ts +8 -3
  152. package/src/lib/routes/client-sessions/client-sessions.ts +35 -9
  153. package/src/lib/routes/connect-webviews/connect-webviews.ts +15 -5
  154. package/src/lib/routes/connected-accounts/connected-accounts.ts +20 -6
  155. package/src/lib/routes/connected-accounts/simulate/simulate.ts +7 -0
  156. package/src/lib/routes/customers/customers.ts +16 -9
  157. package/src/lib/routes/devices/devices.ts +36 -11
  158. package/src/lib/routes/devices/simulate/simulate.ts +29 -0
  159. package/src/lib/routes/devices/unmanaged/unmanaged.ts +19 -22
  160. package/src/lib/routes/events/events.ts +17 -9
  161. package/src/lib/routes/instant-keys/instant-keys.ts +19 -9
  162. package/src/lib/routes/locks/locks.ts +22 -45
  163. package/src/lib/routes/locks/simulate/simulate.ts +13 -0
  164. package/src/lib/routes/noise-sensors/noise-sensors.ts +3 -40
  165. package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +37 -6
  166. package/src/lib/routes/noise-sensors/simulate/simulate.ts +7 -0
  167. package/src/lib/routes/phones/phones.ts +13 -6
  168. package/src/lib/routes/phones/simulate/simulate.ts +7 -0
  169. package/src/lib/routes/seam-http-endpoints.ts +26 -26
  170. package/src/lib/routes/spaces/spaces.ts +61 -21
  171. package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +21 -2
  172. package/src/lib/routes/thermostats/schedules/schedules.ts +35 -8
  173. package/src/lib/routes/thermostats/simulate/simulate.ts +13 -0
  174. package/src/lib/routes/thermostats/thermostats.ts +72 -55
  175. package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +24 -5
  176. package/src/lib/routes/user-identities/user-identities.ts +94 -26
  177. package/src/lib/routes/webhooks/webhooks.ts +15 -4
  178. package/src/lib/routes/workspaces/workspaces.ts +20 -9
  179. package/src/lib/version.ts +1 -1
@@ -0,0 +1,4 @@
1
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Keys extends keyof T ? {
2
+ [Key in Keys]-?: Exclude<T[Key], undefined>;
3
+ } & Partial<Omit<T, Keys>> : never;
4
+ export declare const assertValidRequestParameters: (parameters: unknown, path: string, hasRequiredParameters: boolean) => void;
@@ -0,0 +1,18 @@
1
+ export const assertValidRequestParameters = (parameters, path, hasRequiredParameters) => {
2
+ if (parameters === undefined) {
3
+ if (hasRequiredParameters) {
4
+ throw new TypeError(`Parameters are required for ${path}`);
5
+ }
6
+ return;
7
+ }
8
+ if (parameters === null ||
9
+ typeof parameters !== 'object' ||
10
+ Array.isArray(parameters)) {
11
+ throw new TypeError(`Parameters for ${path} must be an object`);
12
+ }
13
+ if (hasRequiredParameters &&
14
+ Object.values(parameters).every((value) => value === undefined)) {
15
+ throw new TypeError(`At least one parameter is required for ${path}`);
16
+ }
17
+ };
18
+ //# sourceMappingURL=request-parameters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request-parameters.js","sourceRoot":"","sources":["../src/lib/request-parameters.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,UAAmB,EACnB,IAAY,EACZ,qBAA8B,EACxB,EAAE;IACR,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,qBAAqB,EAAE,CAAC;YAC1B,MAAM,IAAI,SAAS,CAAC,+BAA+B,IAAI,EAAE,CAAC,CAAA;QAC5D,CAAC;QACD,OAAM;IACR,CAAC;IAED,IACE,UAAU,KAAK,IAAI;QACnB,OAAO,UAAU,KAAK,QAAQ;QAC9B,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,EACzB,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,kBAAkB,IAAI,oBAAoB,CAAC,CAAA;IACjE,CAAC;IAED,IACE,qBAAqB;QACrB,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,EAC/D,CAAC;QACD,MAAM,IAAI,SAAS,CAAC,0CAA0C,IAAI,EAAE,CAAC,CAAA;IACvE,CAAC;AACH,CAAC,CAAA"}
@@ -239,26 +239,30 @@ export type AccessCode = {
239
239
  */
240
240
  message: string;
241
241
  } /**
242
- * Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN.
242
+ * Indicates that the account is disconnected.
243
243
  */ | {
244
244
  /**
245
245
  * Date and time at which Seam created the error.
246
246
  */
247
- created_at?: string | undefined;
247
+ created_at: string;
248
248
  /**
249
249
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
250
250
  */
251
- error_code: 'insufficient_permissions';
251
+ error_code: 'account_disconnected';
252
252
  /**
253
- * Indicates that this is an access code error.
253
+ * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
254
254
  */
255
- is_access_code_error: boolean;
255
+ is_connected_account_error: boolean;
256
+ /**
257
+ * Indicates that the error is not a device error.
258
+ */
259
+ is_device_error: boolean;
256
260
  /**
257
261
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
258
262
  */
259
263
  message: string;
260
264
  } /**
261
- * Indicates that the account is disconnected.
265
+ * Indicates that the Salto site user limit has been reached.
262
266
  */ | {
263
267
  /**
264
268
  * Date and time at which Seam created the error.
@@ -267,7 +271,7 @@ export type AccessCode = {
267
271
  /**
268
272
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
269
273
  */
270
- error_code: 'account_disconnected';
274
+ error_code: 'salto_ks_subscription_limit_exceeded';
271
275
  /**
272
276
  * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
273
277
  */
@@ -281,7 +285,7 @@ export type AccessCode = {
281
285
  */
282
286
  message: string;
283
287
  } /**
284
- * Indicates that the Salto site user limit has been reached.
288
+ * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
285
289
  */ | {
286
290
  /**
287
291
  * Date and time at which Seam created the error.
@@ -290,7 +294,7 @@ export type AccessCode = {
290
294
  /**
291
295
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
292
296
  */
293
- error_code: 'salto_ks_subscription_limit_exceeded';
297
+ error_code: 'insufficient_permissions';
294
298
  /**
295
299
  * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
296
300
  */
@@ -28,6 +28,15 @@ export type AcsCredential = {
28
28
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
29
29
  */
30
30
  acs_user_id?: string | undefined;
31
+ /**
32
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
33
+ */
34
+ akiles_metadata?: {
35
+ /**
36
+ * ID of the Akiles member PIN.
37
+ */
38
+ member_pin_id?: string | undefined;
39
+ } | undefined;
31
40
  /**
32
41
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
33
42
  */
@@ -95,7 +104,7 @@ export type AcsCredential = {
95
104
  /**
96
105
  * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`.
97
106
  */
98
- external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | undefined;
107
+ external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | 'akiles_credential' | undefined;
99
108
  /**
100
109
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
101
110
  */
@@ -272,6 +281,29 @@ export type AcsCredential = {
272
281
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
273
282
  */
274
283
  warning_code: 'needs_to_be_reissued';
284
+ } /**
285
+ * Indicates that the requested PIN code could not be used, so the access system assigned a different code. Give the guest the assigned code.
286
+ */ | {
287
+ /**
288
+ * Date and time at which Seam created the warning.
289
+ */
290
+ created_at: string;
291
+ /**
292
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
293
+ */
294
+ message: string;
295
+ /**
296
+ * The PIN code that was assigned instead.
297
+ */
298
+ new_code: string;
299
+ /**
300
+ * The originally requested PIN code that could not be used.
301
+ */
302
+ original_code: string;
303
+ /**
304
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
305
+ */
306
+ warning_code: 'requested_code_unavailable';
275
307
  }>;
276
308
  /**
277
309
  * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
@@ -373,7 +373,7 @@ export type AcsEntrance = {
373
373
  */
374
374
  warning_code: 'entrance_setup_required';
375
375
  } /**
376
- * deprecated: Use `privacy_mode` instead. Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.
376
+ * Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.
377
377
  */ | {
378
378
  /**
379
379
  * Date and time at which Seam created the warning.
@@ -110,6 +110,21 @@ export type AcsSystem = {
110
110
  */
111
111
  message: string;
112
112
  } /**
113
+ * Indicates that Seam's integration user does not have sufficient permissions on the provider's system backing this [access control system](https://docs.seam.co/low-level-apis/access-systems). Access cannot be managed until permissions are restored. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
114
+ */ | {
115
+ /**
116
+ * Date and time at which Seam created the error.
117
+ */
118
+ created_at: string;
119
+ /**
120
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
121
+ */
122
+ error_code: 'insufficient_permissions';
123
+ /**
124
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
125
+ */
126
+ message: string;
127
+ } /**
113
128
  * Indicates that the [access control system](https://docs.seam.co/low-level-apis/access-systems) has been disconnected. See [Troubleshooting Your Access Control System](https://docs.seam.co/low-level-apis/access-systems/troubleshooting-your-access-control-system) to resolve the issue.
114
129
  */ | {
115
130
  /**
@@ -282,6 +297,21 @@ export type AcsSystem = {
282
297
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
283
298
  */
284
299
  warning_code: 'setup_required';
300
+ } /**
301
+ * Indicates that Seam encountered an unexpected error while syncing this [access control system](https://docs.seam.co/low-level-apis/access-systems), so its users, credentials, and access groups may be out of date. Seam retries on every sync cycle and clears this warning once a sync succeeds; if it persists, contact [support](mailto:support@seam.co).
302
+ */ | {
303
+ /**
304
+ * Date and time at which Seam created the warning.
305
+ */
306
+ created_at: string;
307
+ /**
308
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
309
+ */
310
+ message: string;
311
+ /**
312
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
313
+ */
314
+ warning_code: 'unknown_issue_with_acs_system';
285
315
  }>;
286
316
  /**
287
317
  * ID of the workspace that contains the [access control system](https://docs.seam.co/low-level-apis/access-systems).
@@ -190,6 +190,15 @@ export type ActionAttempt = {
190
190
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
191
191
  */
192
192
  acs_user_id?: string | undefined;
193
+ /**
194
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
195
+ */
196
+ akiles_metadata?: {
197
+ /**
198
+ * ID of the Akiles member PIN.
199
+ */
200
+ member_pin_id?: string | undefined;
201
+ } | undefined;
193
202
  /**
194
203
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
195
204
  */
@@ -257,7 +266,7 @@ export type ActionAttempt = {
257
266
  /**
258
267
  * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`.
259
268
  */
260
- external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | undefined;
269
+ external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | 'akiles_credential' | undefined;
261
270
  /**
262
271
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
263
272
  */
@@ -351,13 +360,21 @@ export type ActionAttempt = {
351
360
  /**
352
361
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
353
362
  */
354
- warning_code: 'waiting_to_be_issued' | 'schedule_externally_modified' | 'schedule_modified' | 'being_deleted' | 'unknown_issue_with_acs_credential' | 'needs_to_be_reissued';
363
+ warning_code: 'waiting_to_be_issued' | 'schedule_externally_modified' | 'schedule_modified' | 'being_deleted' | 'unknown_issue_with_acs_credential' | 'needs_to_be_reissued' | 'requested_code_unavailable';
364
+ /**
365
+ * The PIN code that was assigned instead.
366
+ */
367
+ new_code?: string | undefined;
368
+ /**
369
+ * The originally requested PIN code that could not be used.
370
+ */
371
+ original_code?: string | undefined;
355
372
  }>;
356
373
  /**
357
374
  * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
358
375
  */
359
376
  workspace_id: string;
360
- };
377
+ } | null;
361
378
  /**
362
379
  * Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system.
363
380
  */
@@ -416,6 +433,15 @@ export type ActionAttempt = {
416
433
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
417
434
  */
418
435
  acs_user_id?: string | undefined;
436
+ /**
437
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
438
+ */
439
+ akiles_metadata?: {
440
+ /**
441
+ * ID of the Akiles member PIN.
442
+ */
443
+ member_pin_id?: string | undefined;
444
+ } | undefined;
419
445
  /**
420
446
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
421
447
  */
@@ -483,7 +509,7 @@ export type ActionAttempt = {
483
509
  /**
484
510
  * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`.
485
511
  */
486
- external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | undefined;
512
+ external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | 'akiles_credential' | undefined;
487
513
  /**
488
514
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
489
515
  */
@@ -577,7 +603,15 @@ export type ActionAttempt = {
577
603
  /**
578
604
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
579
605
  */
580
- warning_code: 'waiting_to_be_issued' | 'schedule_externally_modified' | 'schedule_modified' | 'being_deleted' | 'unknown_issue_with_acs_credential' | 'needs_to_be_reissued';
606
+ warning_code: 'waiting_to_be_issued' | 'schedule_externally_modified' | 'schedule_modified' | 'being_deleted' | 'unknown_issue_with_acs_credential' | 'needs_to_be_reissued' | 'requested_code_unavailable';
607
+ /**
608
+ * The PIN code that was assigned instead.
609
+ */
610
+ new_code?: string | undefined;
611
+ /**
612
+ * The originally requested PIN code that could not be used.
613
+ */
614
+ original_code?: string | undefined;
581
615
  }>;
582
616
  /**
583
617
  * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
@@ -628,6 +662,15 @@ export type ActionAttempt = {
628
662
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
629
663
  */
630
664
  acs_user_id?: string | undefined;
665
+ /**
666
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
667
+ */
668
+ akiles_metadata?: {
669
+ /**
670
+ * ID of the Akiles member PIN.
671
+ */
672
+ member_pin_id?: string | undefined;
673
+ } | undefined;
631
674
  /**
632
675
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
633
676
  */
@@ -695,7 +738,7 @@ export type ActionAttempt = {
695
738
  /**
696
739
  * Brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`.
697
740
  */
698
- external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | undefined;
741
+ external_type?: 'pti_card' | 'brivo_credential' | 'hid_credential' | 'visionline_card' | 'salto_ks_credential' | 'assa_abloy_vostio_key' | 'salto_space_key' | 'latch_access' | 'dormakaba_ambiance_credential' | 'hotek_card' | 'salto_ks_tag' | 'avigilon_alta_credential' | 'kisi_credential' | 'akiles_credential' | undefined;
699
742
  /**
700
743
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
701
744
  */
@@ -792,7 +835,15 @@ export type ActionAttempt = {
792
835
  /**
793
836
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
794
837
  */
795
- warning_code: 'waiting_to_be_issued' | 'schedule_externally_modified' | 'schedule_modified' | 'being_deleted' | 'unknown_issue_with_acs_credential' | 'needs_to_be_reissued';
838
+ warning_code: 'waiting_to_be_issued' | 'schedule_externally_modified' | 'schedule_modified' | 'being_deleted' | 'unknown_issue_with_acs_credential' | 'needs_to_be_reissued' | 'requested_code_unavailable';
839
+ /**
840
+ * The PIN code that was assigned instead.
841
+ */
842
+ new_code?: string | undefined;
843
+ /**
844
+ * The originally requested PIN code that could not be used.
845
+ */
846
+ original_code?: string | undefined;
796
847
  }>;
797
848
  /**
798
849
  * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
@@ -1234,7 +1285,12 @@ export type ActionAttempt = {
1234
1285
  /**
1235
1286
  * Result of the action.
1236
1287
  */
1237
- result: {};
1288
+ result: {
1289
+ /**
1290
+ * Created access code.
1291
+ */
1292
+ access_code: Record<string, unknown>;
1293
+ };
1238
1294
  status: 'success' | 'pending' | 'error';
1239
1295
  } | {
1240
1296
  /**
@@ -1288,7 +1344,12 @@ export type ActionAttempt = {
1288
1344
  /**
1289
1345
  * Result of the action.
1290
1346
  */
1291
- result: {};
1347
+ result: {
1348
+ /**
1349
+ * Updated access code.
1350
+ */
1351
+ access_code?: Record<string, unknown> | undefined;
1352
+ };
1292
1353
  status: 'success' | 'pending' | 'error';
1293
1354
  } | {
1294
1355
  /**
@@ -1315,7 +1376,12 @@ export type ActionAttempt = {
1315
1376
  /**
1316
1377
  * Result of the action.
1317
1378
  */
1318
- result: {};
1379
+ result: {
1380
+ /**
1381
+ * Created noise threshold.
1382
+ */
1383
+ noise_threshold: Record<string, unknown>;
1384
+ };
1319
1385
  status: 'success' | 'pending' | 'error';
1320
1386
  } | {
1321
1387
  /**
@@ -1369,6 +1435,11 @@ export type ActionAttempt = {
1369
1435
  /**
1370
1436
  * Result of the action.
1371
1437
  */
1372
- result: {};
1438
+ result: {
1439
+ /**
1440
+ * Updated noise threshold.
1441
+ */
1442
+ noise_threshold: Record<string, unknown>;
1443
+ };
1373
1444
  status: 'success' | 'pending' | 'error';
1374
1445
  };
@@ -82,7 +82,7 @@ export type DeviceProvider = {
82
82
  /**
83
83
  * Name of the device provider.
84
84
  */
85
- device_provider_name: 'hotek' | 'dormakaba_community' | 'legic_connect' | 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'salto_ks' | 'salto_ks_accept' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'tedee' | 'honeywell_resideo' | 'first_alert' | 'latch' | 'akiles' | 'assa_abloy_vostio' | 'assa_abloy_vostio_credential_service' | 'tado' | 'salto_space' | 'sensi' | 'keynest' | 'korelock' | 'keyincode' | 'dormakaba_ambiance' | 'ultraloq' | 'dusaw' | 'sifely' | 'thirty_three_lock' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'aqara';
85
+ device_provider_name: 'hotek' | 'dormakaba_community' | 'legic_connect' | 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'salto_ks' | 'salto_ks_accept' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'four_suites' | 'dormakaba_oracode' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'tedee' | 'honeywell_resideo' | 'first_alert' | 'latch' | 'akiles' | 'assa_abloy_vostio' | 'assa_abloy_vostio_credential_service' | 'tado' | 'salto_space' | 'sensi' | 'keynest' | 'korelock' | 'keyincode' | 'dormakaba_ambiance' | 'ultraloq' | 'yacan' | 'dusaw' | 'sifely' | 'thirty_three_lock' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'aqara';
86
86
  /**
87
87
  * Display name for the device provider.
88
88
  */
@@ -143,7 +143,7 @@ export type Device = {
143
143
  /**
144
144
  * Type of the device.
145
145
  */
146
- device_type: 'akuvox_lock' | 'august_lock' | 'brivo_access_point' | 'butterflymx_panel' | 'avigilon_alta_entry' | 'doorking_lock' | 'genie_door' | 'igloo_lock' | 'linear_lock' | 'lockly_lock' | 'kwikset_lock' | 'nuki_lock' | 'salto_lock' | 'schlage_lock' | 'smartthings_lock' | 'wyze_lock' | 'yale_lock' | 'two_n_intercom' | 'controlbyweb_device' | 'ttlock_lock' | 'igloohome_lock' | 'four_suites_door' | 'dormakaba_oracode_door' | 'tedee_lock' | 'akiles_lock' | 'ultraloq_lock' | 'keyincode_lock' | 'omnitec_lock' | 'kisi_lock' | 'aqara_lock' | 'keynest_key' | 'noiseaware_activity_zone' | 'minut_sensor' | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | 'ios_phone' | 'android_phone' | 'ring_camera';
146
+ device_type: 'akuvox_lock' | 'august_lock' | 'brivo_access_point' | 'butterflymx_panel' | 'avigilon_alta_entry' | 'doorking_lock' | 'genie_door' | 'igloo_lock' | 'linear_lock' | 'lockly_lock' | 'kwikset_lock' | 'nuki_lock' | 'salto_lock' | 'schlage_lock' | 'smartthings_lock' | 'wyze_lock' | 'yale_lock' | 'two_n_intercom' | 'controlbyweb_device' | 'ttlock_lock' | 'igloohome_lock' | 'four_suites_door' | 'dormakaba_oracode_door' | 'tedee_lock' | 'akiles_lock' | 'ultraloq_lock' | 'yacan_lock' | 'keyincode_lock' | 'omnitec_lock' | 'kisi_lock' | 'aqara_lock' | 'keynest_key' | 'noiseaware_activity_zone' | 'minut_sensor' | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | 'ios_phone' | 'android_phone' | 'ring_camera';
147
147
  /**
148
148
  * Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.
149
149
  */
@@ -200,6 +200,29 @@ export type Device = {
200
200
  */
201
201
  message: string;
202
202
  } /**
203
+ * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
204
+ */ | {
205
+ /**
206
+ * Date and time at which Seam created the error.
207
+ */
208
+ created_at: string;
209
+ /**
210
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
211
+ */
212
+ error_code: 'insufficient_permissions';
213
+ /**
214
+ * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
215
+ */
216
+ is_connected_account_error: boolean;
217
+ /**
218
+ * Indicates that the error is not a device error.
219
+ */
220
+ is_device_error: boolean;
221
+ /**
222
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
223
+ */
224
+ message: string;
225
+ } /**
203
226
  * Indicates that one or more dormakaba sites associated with the connected account could not be connected. Contact dormakaba support.
204
227
  */ | {
205
228
  /**
@@ -429,6 +452,10 @@ export type Device = {
429
452
  * Name of the device location.
430
453
  */
431
454
  location_name?: string | undefined;
455
+ /**
456
+ * Name of the room within the device location, when the provider reports one.
457
+ */
458
+ room_name?: string | undefined;
432
459
  /**
433
460
  * Time zone of the device location.
434
461
  */
@@ -777,7 +804,7 @@ export type Device = {
777
804
  /**
778
805
  * Device ID for a dormakaba Oracode device.
779
806
  */
780
- device_id?: {} | undefined;
807
+ device_id?: string | undefined;
781
808
  /**
782
809
  * Door ID for a dormakaba Oracode device.
783
810
  */
@@ -1231,6 +1258,14 @@ export type Device = {
1231
1258
  * Device ID for a Google Nest device.
1232
1259
  */
1233
1260
  nest_device_id?: string | undefined;
1261
+ /**
1262
+ * ID of the Google Nest structure containing the device.
1263
+ */
1264
+ nest_structure_id?: string | undefined;
1265
+ /**
1266
+ * Name of the Google Nest structure containing the device. The device owner sets this value.
1267
+ */
1268
+ structure_name?: string | undefined;
1234
1269
  } | undefined;
1235
1270
  /**
1236
1271
  * Metadata for a NoiseAware device.
@@ -1371,7 +1406,7 @@ export type Device = {
1371
1406
  } | undefined;
1372
1407
  /**
1373
1408
  * Metada for a Salto device.
1374
- * @deprecated Use `salto_ks_metadata ` instead.
1409
+ * @deprecated Use `salto_ks_metadata` instead.
1375
1410
  */
1376
1411
  salto_metadata?: {
1377
1412
  /**
@@ -1457,6 +1492,10 @@ export type Device = {
1457
1492
  * Set to true when the device does not support the /dual-setpoints API endpoint.
1458
1493
  */
1459
1494
  dual_setpoints_not_supported?: boolean | undefined;
1495
+ /**
1496
+ * Enforced setpoint range in Celsius for a Sensi device, derived from an OutOfRange API error.
1497
+ */
1498
+ enforced_setpoint_range_celsius?: Array<number> | undefined;
1460
1499
  /**
1461
1500
  * Product type for a Sensi device.
1462
1501
  */
@@ -1680,6 +1719,27 @@ export type Device = {
1680
1719
  */
1681
1720
  product_type?: string | undefined;
1682
1721
  } | undefined;
1722
+ /**
1723
+ * Metadata for a Yacan device.
1724
+ */
1725
+ yacan_metadata?: {
1726
+ /**
1727
+ * Device ID for a Yacan device.
1728
+ */
1729
+ device_id?: string | undefined;
1730
+ /**
1731
+ * Device name for a Yacan device.
1732
+ */
1733
+ device_name?: string | undefined;
1734
+ /**
1735
+ * Device type for a Yacan device.
1736
+ */
1737
+ device_type?: string | undefined;
1738
+ /**
1739
+ * Serial number for a Yacan device.
1740
+ */
1741
+ serial_number?: string | undefined;
1742
+ } | undefined;
1683
1743
  /**
1684
1744
  * The delay in seconds before the lock automatically locks after being unlocked.
1685
1745
  */
@@ -2762,21 +2822,6 @@ export type Device = {
2762
2822
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
2763
2823
  */
2764
2824
  warning_code: 'max_access_codes_reached';
2765
- } /**
2766
- * Indicates that the connected Kwikset account has member-level access to this lock's home. Admin or owner access is required to manage access codes and control the lock remotely.
2767
- */ | {
2768
- /**
2769
- * Date and time at which Seam created the warning.
2770
- */
2771
- created_at: string;
2772
- /**
2773
- * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
2774
- */
2775
- message: string;
2776
- /**
2777
- * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
2778
- */
2779
- warning_code: 'insufficient_permissions';
2780
2825
  }>;
2781
2826
  /**
2782
2827
  * Unique identifier for the Seam workspace associated with the device.