@seamapi/http 2.26.0 → 2.28.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 (33) hide show
  1. package/README.md +25 -0
  2. package/lib/resources/access-code.d.ts +5 -0
  3. package/lib/resources/access-method.d.ts +30 -0
  4. package/lib/resources/action-attempt.d.ts +1 -1
  5. package/lib/resources/device-provider.d.ts +1 -1
  6. package/lib/resources/device.d.ts +27 -0
  7. package/lib/resources/event.d.ts +2 -2
  8. package/lib/resources/unmanaged-access-code.d.ts +5 -0
  9. package/lib/resources/unmanaged-access-method.d.ts +30 -0
  10. package/lib/routes/access-grants/access-grants.d.ts +4 -0
  11. package/lib/routes/connect-webviews/connect-webviews.d.ts +1 -1
  12. package/lib/routes/devices/devices.d.ts +1 -1
  13. package/lib/routes/devices/unmanaged/unmanaged.d.ts +1 -1
  14. package/lib/routes/locks/locks.d.ts +1 -1
  15. package/lib/routes/workspaces/workspaces.d.ts +1 -1
  16. package/lib/version.d.ts +1 -1
  17. package/lib/version.js +1 -1
  18. package/package.json +2 -2
  19. package/src/lib/resources/access-code.ts +6 -0
  20. package/src/lib/resources/access-method.ts +36 -0
  21. package/src/lib/resources/action-attempt.ts +2 -0
  22. package/src/lib/resources/device-provider.ts +1 -0
  23. package/src/lib/resources/device.ts +35 -0
  24. package/src/lib/resources/event.ts +16 -2
  25. package/src/lib/resources/unmanaged-access-code.ts +6 -0
  26. package/src/lib/resources/unmanaged-access-method.ts +36 -0
  27. package/src/lib/routes/access-grants/access-grants.ts +4 -0
  28. package/src/lib/routes/connect-webviews/connect-webviews.ts +1 -0
  29. package/src/lib/routes/devices/devices.ts +2 -1
  30. package/src/lib/routes/devices/unmanaged/unmanaged.ts +2 -1
  31. package/src/lib/routes/locks/locks.ts +2 -1
  32. package/src/lib/routes/workspaces/workspaces.ts +1 -1
  33. package/src/lib/version.ts +1 -1
package/README.md CHANGED
@@ -203,6 +203,31 @@ When the `waitForActionAttempt` option is enabled, the SDK:
203
203
  - Rejects with a `SeamActionAttemptTimeoutError` if the action attempt is still pending when the `timeout` is reached.
204
204
  - Both errors expose an `actionAttempt` property.
205
205
 
206
+ The `ActionAttempt` type is a union discriminated by `action_type` and `status`.
207
+ The `error` and `result` properties are typed as `null`
208
+ except for the status that populates them,
209
+ so narrow on the `status` before reading them:
210
+
211
+ ```ts
212
+ const actionAttempt = await seam.locks.unlockDoor(
213
+ { device_id },
214
+ { waitForActionAttempt: false },
215
+ )
216
+
217
+ if (actionAttempt.status === 'success') {
218
+ console.log(actionAttempt.result) // The result is non-null here.
219
+ }
220
+
221
+ if (actionAttempt.status === 'error') {
222
+ console.log(actionAttempt.error.message) // The error is non-null here.
223
+ }
224
+ ```
225
+
226
+ Waiting for an action attempt resolves with the successful action attempt,
227
+ so after checking `status === 'success'` the `result` is immediately usable.
228
+ Use the `SucceededActionAttempt` and `FailedActionAttempt` types
229
+ to extract the success and error members from any action attempt type.
230
+
206
231
  If you already have an action attempt ID
207
232
  and want to wait for it to resolve, simply use
208
233
 
@@ -30,6 +30,10 @@ export type AccessCode = {
30
30
  * Unique identifier for the device associated with the access code.
31
31
  */
32
32
  device_id: string;
33
+ /**
34
+ * Human-readable label for where this access code sits in its lifecycle, for example `Active`, `Issuing`, or `Expired`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`.
35
+ */
36
+ display_status: string;
33
37
  /**
34
38
  * Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.
35
39
  */
@@ -809,6 +813,7 @@ export type AccessCode = {
809
813
  starts_at?: string | null | undefined;
810
814
  /**
811
815
  * 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/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
816
+ * @deprecated Use `display_status` to show a person the code's state. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`.
812
817
  */
813
818
  status: 'setting' | 'set' | 'unset' | 'removing' | 'unknown';
814
819
  /**
@@ -265,6 +265,36 @@ export type AccessMethod = {
265
265
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
266
266
  */
267
267
  warning_code: 'delay_in_issuing';
268
+ } /**
269
+ * Indicates that the access system delivers this mobile key through an app invitation sent to the recipient's email address, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no email address, so the mobile key cannot be delivered. Set an email address on the user identity when you create the access grant.
270
+ */ | {
271
+ /**
272
+ * Date and time at which Seam created the warning.
273
+ */
274
+ created_at: string;
275
+ /**
276
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
277
+ */
278
+ message: string;
279
+ /**
280
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
281
+ */
282
+ warning_code: 'user_identity_missing_email_address';
283
+ } /**
284
+ * Indicates that the access system delivers this mobile key to the recipient's phone number, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no phone number, so the mobile key cannot be delivered. Set a phone number on the user identity when you create the access grant.
285
+ */ | {
286
+ /**
287
+ * Date and time at which Seam created the warning.
288
+ */
289
+ created_at: string;
290
+ /**
291
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
292
+ */
293
+ message: string;
294
+ /**
295
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
296
+ */
297
+ warning_code: 'user_identity_missing_phone_number';
268
298
  }>;
269
299
  /**
270
300
  * ID of the Seam workspace associated with the access method.
@@ -1162,7 +1162,7 @@ export type ActionAttempt = {
1162
1162
  /**
1163
1163
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
1164
1164
  */
1165
- warning_code: 'being_deleted' | 'updating_access_times' | 'pulled_backup_access_code' | 'delay_in_issuing';
1165
+ warning_code: 'being_deleted' | 'updating_access_times' | 'pulled_backup_access_code' | 'delay_in_issuing' | 'user_identity_missing_email_address' | 'user_identity_missing_phone_number';
1166
1166
  /**
1167
1167
  * ID of the original access method from which this backup access method was split, if applicable.
1168
1168
  */
@@ -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' | 'yacan' | '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' | 'dormakaba_oracode_iho' | '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
  */
@@ -797,6 +797,33 @@ export type Device = {
797
797
  */
798
798
  relay_name?: string | null | undefined;
799
799
  } | undefined;
800
+ /**
801
+ * Metadata for a dormakaba Oracode Homeowner's Portal device.
802
+ */
803
+ dormakaba_oracode_iho_metadata?: {
804
+ /**
805
+ * Door ID for a dormakaba Oracode Homeowner's Portal device.
806
+ */
807
+ door_id?: number | undefined;
808
+ /**
809
+ * Name of the door for a dormakaba Oracode Homeowner's Portal device.
810
+ */
811
+ door_name?: string | undefined;
812
+ /**
813
+ * IANA time zone for a dormakaba Oracode Homeowner's Portal device.
814
+ */
815
+ iana_timezone?: string | undefined;
816
+ /**
817
+ * User levels for a dormakaba Oracode Homeowner's Portal device.
818
+ */
819
+ user_levels?: Array<{
820
+ user_level?: number | undefined;
821
+ user_level_check_in_time?: string | undefined;
822
+ user_level_check_out_time?: string | undefined;
823
+ user_level_name?: string | undefined;
824
+ user_level_type?: string | undefined;
825
+ }> | undefined;
826
+ } | undefined;
800
827
  /**
801
828
  * Metadata for a dormakaba Oracode device.
802
829
  */
@@ -4729,7 +4729,7 @@ export type SeamEvent = {
4729
4729
  /**
4730
4730
  * Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined.
4731
4731
  */
4732
- method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card';
4732
+ method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card' | 'mobile_key';
4733
4733
  /**
4734
4734
  * Date and time at which the event occurred.
4735
4735
  */
@@ -4799,7 +4799,7 @@ export type SeamEvent = {
4799
4799
  /**
4800
4800
  * Method by which the lock was unlocked. `keycode`: an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined.
4801
4801
  */
4802
- method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card';
4802
+ method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card' | 'mobile_key';
4803
4803
  /**
4804
4804
  * Date and time at which the event occurred.
4805
4805
  */
@@ -36,6 +36,10 @@ export type UnmanagedAccessCode = {
36
36
  * Unique identifier for the device associated with the access code.
37
37
  */
38
38
  device_id: string;
39
+ /**
40
+ * Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it.
41
+ */
42
+ display_status: string;
39
43
  /**
40
44
  * Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.
41
45
  */
@@ -621,6 +625,7 @@ export type UnmanagedAccessCode = {
621
625
  starts_at?: string | null | undefined;
622
626
  /**
623
627
  * Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device.
628
+ * @deprecated Use `display_status` to show a person the code's state.
624
629
  */
625
630
  status: 'set' | 'unset';
626
631
  /**
@@ -253,6 +253,36 @@ export type UnmanagedAccessMethod = {
253
253
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
254
254
  */
255
255
  warning_code: 'delay_in_issuing';
256
+ } /**
257
+ * Indicates that the access system delivers this mobile key through an app invitation sent to the recipient's email address, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no email address, so the mobile key cannot be delivered. Set an email address on the user identity when you create the access grant.
258
+ */ | {
259
+ /**
260
+ * Date and time at which Seam created the warning.
261
+ */
262
+ created_at: string;
263
+ /**
264
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
265
+ */
266
+ message: string;
267
+ /**
268
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
269
+ */
270
+ warning_code: 'user_identity_missing_email_address';
271
+ } /**
272
+ * Indicates that the access system delivers this mobile key to the recipient's phone number, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no phone number, so the mobile key cannot be delivered. Set a phone number on the user identity when you create the access grant.
273
+ */ | {
274
+ /**
275
+ * Date and time at which Seam created the warning.
276
+ */
277
+ created_at: string;
278
+ /**
279
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
280
+ */
281
+ message: string;
282
+ /**
283
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
284
+ */
285
+ warning_code: 'user_identity_missing_phone_number';
256
286
  }>;
257
287
  /**
258
288
  * ID of the Seam workspace associated with the access method.
@@ -257,6 +257,10 @@ export type AccessGrantsListParameters = {
257
257
  * Filter Access Grants by reservation_key.
258
258
  */
259
259
  reservation_key?: string | undefined;
260
+ /**
261
+ * String for which to search. Filters returned Access Grants to include all records that satisfy a partial match using `name`, `access_grant_key`, `reservation_key`, `access_grant_id`, `user_identity_id`, `user_identity_full_name`, `user_identity_email_address` or `user_identity_phone_number`.
262
+ */
263
+ search?: string | undefined;
260
264
  /**
261
265
  * ID of the space by which you want to filter the list of Access Grants.
262
266
  */
@@ -50,7 +50,7 @@ export type ConnectWebviewsCreateParameters = {
50
50
  /**
51
51
  * Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://docs.seam.co/api/devices/list_device_providers) with no filters.
52
52
  */
53
- accepted_providers?: Array<'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' | 'yale_access' | 'hid_cm' | 'google_nest' | 'slack'> | undefined;
53
+ accepted_providers?: Array<'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' | 'dormakaba_oracode_iho' | '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' | 'yale_access' | 'hid_cm' | 'google_nest' | 'slack'> | undefined;
54
54
  /**
55
55
  * Indicates whether newly-added devices should appear as [managed devices](https://docs.seam.co/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews).
56
56
  */
@@ -113,7 +113,7 @@ export type DevicesListParameters = {
113
113
  /**
114
114
  * Manufacturer for which you want to list devices.
115
115
  */
116
- manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'dormakaba_oracode' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
116
+ manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
117
117
  /**
118
118
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
119
119
  */
@@ -96,7 +96,7 @@ export type DevicesUnmanagedListParameters = {
96
96
  /**
97
97
  * Manufacturer for which you want to list devices.
98
98
  */
99
- manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'dormakaba_oracode' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
99
+ manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
100
100
  /**
101
101
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
102
102
  */
@@ -106,7 +106,7 @@ export type LocksListParameters = {
106
106
  /**
107
107
  * Manufacturer of the locks that you want to list.
108
108
  */
109
- manufacturer?: 'akuvox' | 'august' | 'brivo' | 'butterflymx' | 'avigilon_alta' | 'doorking' | 'genie' | 'igloo' | 'linear' | 'kwikset' | 'nuki' | 'salto' | 'schlage' | 'seam' | 'wyze' | 'yale' | 'two_n' | 'controlbyweb' | 'ttlock' | 'igloohome' | 'four_suites' | 'dormakaba_oracode' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'korelock' | 'lockly' | 'smartthings' | 'ultraloq' | 'omnitec' | 'kisi' | 'yacan' | undefined;
109
+ manufacturer?: 'akuvox' | 'august' | 'brivo' | 'butterflymx' | 'avigilon_alta' | 'doorking' | 'genie' | 'igloo' | 'linear' | 'kwikset' | 'nuki' | 'salto' | 'schlage' | 'seam' | 'wyze' | 'yale' | 'two_n' | 'controlbyweb' | 'ttlock' | 'igloohome' | 'four_suites' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'korelock' | 'lockly' | 'smartthings' | 'ultraloq' | 'omnitec' | 'kisi' | 'yacan' | undefined;
110
110
  };
111
111
  /**
112
112
  * @deprecated Use LocksListRequest instead.
@@ -77,7 +77,7 @@ export type WorkspacesCreateParameters = {
77
77
  */
78
78
  name: string;
79
79
  /**
80
- * ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one.
80
+ * ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one. If you administer no organization, Seam creates one for you and associates the new workspace with it.
81
81
  */
82
82
  organization_id?: string | undefined;
83
83
  /**
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiJavascriptHttpVersion = "2.26.0";
1
+ declare const seamapiJavascriptHttpVersion = "2.28.0";
2
2
  export default seamapiJavascriptHttpVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.26.0';
1
+ const seamapiJavascriptHttpVersion = '2.28.0';
2
2
  export default seamapiJavascriptHttpVersion;
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/http",
3
- "version": "2.26.0",
3
+ "version": "2.28.0",
4
4
  "description": "JavaScript HTTP client for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -88,7 +88,7 @@
88
88
  "@seamapi/blueprint": "^1.10.0",
89
89
  "@seamapi/fake-seam-connect": "^2.0.4",
90
90
  "@seamapi/smith": "^1.1.0",
91
- "@seamapi/types": "1.1047.0",
91
+ "@seamapi/types": "1.1063.0",
92
92
  "@types/jsonwebtoken": "^9.0.6",
93
93
  "@types/node": "^24.10.9",
94
94
  "ava": "^8.0.1",
@@ -38,6 +38,11 @@ export type AccessCode = {
38
38
  */
39
39
  device_id: string
40
40
 
41
+ /**
42
+ * Human-readable label for where this access code sits in its lifecycle, for example `Active`, `Issuing`, or `Expired`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`.
43
+ */
44
+ display_status: string
45
+
41
46
  /**
42
47
  * Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.
43
48
  */
@@ -949,6 +954,7 @@ export type AccessCode = {
949
954
  starts_at?: string | null | undefined
950
955
  /**
951
956
  * 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/low-level-apis/smart-locks/access-codes/lifecycle-of-access-codes).
957
+ * @deprecated Use `display_status` to show a person the code's state. To make decisions, read `pending_mutations`, `errors`, `warnings`, `starts_at`, and `ends_at`.
952
958
  */
953
959
  status: 'setting' | 'set' | 'unset' | 'removing' | 'unknown'
954
960
 
@@ -307,6 +307,42 @@ export type AccessMethod = {
307
307
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
308
308
  */
309
309
  warning_code: 'delay_in_issuing'
310
+ } /**
311
+ * Indicates that the access system delivers this mobile key through an app invitation sent to the recipient's email address, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no email address, so the mobile key cannot be delivered. Set an email address on the user identity when you create the access grant.
312
+ */
313
+ | {
314
+ /**
315
+ * Date and time at which Seam created the warning.
316
+ */
317
+ created_at: string
318
+
319
+ /**
320
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
321
+ */
322
+ message: string
323
+
324
+ /**
325
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
326
+ */
327
+ warning_code: 'user_identity_missing_email_address'
328
+ } /**
329
+ * Indicates that the access system delivers this mobile key to the recipient's phone number, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no phone number, so the mobile key cannot be delivered. Set a phone number on the user identity when you create the access grant.
330
+ */
331
+ | {
332
+ /**
333
+ * Date and time at which Seam created the warning.
334
+ */
335
+ created_at: string
336
+
337
+ /**
338
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
339
+ */
340
+ message: string
341
+
342
+ /**
343
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
344
+ */
345
+ warning_code: 'user_identity_missing_phone_number'
310
346
  }
311
347
  >
312
348
 
@@ -1418,6 +1418,8 @@ export type ActionAttempt =
1418
1418
  | 'updating_access_times'
1419
1419
  | 'pulled_backup_access_code'
1420
1420
  | 'delay_in_issuing'
1421
+ | 'user_identity_missing_email_address'
1422
+ | 'user_identity_missing_phone_number'
1421
1423
 
1422
1424
  /**
1423
1425
  * ID of the original access method from which this backup access method was split, if applicable.
@@ -119,6 +119,7 @@ export type DeviceProvider = {
119
119
  | 'ecobee'
120
120
  | 'four_suites'
121
121
  | 'dormakaba_oracode'
122
+ | 'dormakaba_oracode_iho'
122
123
  | 'pti'
123
124
  | 'wyze'
124
125
  | 'seam_passport'
@@ -962,6 +962,41 @@ export type Device = {
962
962
  relay_name?: string | null | undefined
963
963
  }
964
964
  | undefined
965
+ /**
966
+ * Metadata for a dormakaba Oracode Homeowner's Portal device.
967
+ */
968
+ dormakaba_oracode_iho_metadata?:
969
+ | {
970
+ /**
971
+ * Door ID for a dormakaba Oracode Homeowner's Portal device.
972
+ */
973
+ door_id?: number | undefined
974
+ /**
975
+ * Name of the door for a dormakaba Oracode Homeowner's Portal device.
976
+ */
977
+ door_name?: string | undefined
978
+ /**
979
+ * IANA time zone for a dormakaba Oracode Homeowner's Portal device.
980
+ */
981
+ iana_timezone?: string | undefined
982
+ /**
983
+ * User levels for a dormakaba Oracode Homeowner's Portal device.
984
+ */
985
+ user_levels?:
986
+ | Array<{
987
+ user_level?: number | undefined
988
+
989
+ user_level_check_in_time?: string | undefined
990
+
991
+ user_level_check_out_time?: string | undefined
992
+
993
+ user_level_name?: string | undefined
994
+
995
+ user_level_type?: string | undefined
996
+ }>
997
+ | undefined
998
+ }
999
+ | undefined
965
1000
  /**
966
1001
  * Metadata for a dormakaba Oracode device.
967
1002
  */
@@ -5656,7 +5656,14 @@ export type SeamEvent =
5656
5656
  /**
5657
5657
  * Method by which the lock was locked. `keycode`: an access code was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or button press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by an auto-relock timer. `unknown`: could not be determined.
5658
5658
  */
5659
- method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card'
5659
+ method:
5660
+ | 'keycode'
5661
+ | 'manual'
5662
+ | 'automatic'
5663
+ | 'unknown'
5664
+ | 'remote'
5665
+ | 'card'
5666
+ | 'mobile_key'
5660
5667
 
5661
5668
  /**
5662
5669
  * Date and time at which the event occurred.
@@ -5734,7 +5741,14 @@ export type SeamEvent =
5734
5741
  /**
5735
5742
  * Method by which the lock was unlocked. `keycode`: an [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was used (see `access_code_id`). `manual`: a physical action such as a thumbturn or handle press. `remote`: a remote action via an app, Bluetooth, or the Seam API (see `action_attempt_id` if Seam-initiated; see `is_via_bluetooth` or `is_via_nfc` for the transport). `automatic`: triggered automatically, for example by a time-based schedule. `unknown`: could not be determined.
5736
5743
  */
5737
- method: 'keycode' | 'manual' | 'automatic' | 'unknown' | 'remote' | 'card'
5744
+ method:
5745
+ | 'keycode'
5746
+ | 'manual'
5747
+ | 'automatic'
5748
+ | 'unknown'
5749
+ | 'remote'
5750
+ | 'card'
5751
+ | 'mobile_key'
5738
5752
 
5739
5753
  /**
5740
5754
  * Date and time at which the event occurred.
@@ -44,6 +44,11 @@ export type UnmanagedAccessCode = {
44
44
  */
45
45
  device_id: string
46
46
 
47
+ /**
48
+ * Human-readable label for the code's state: `Active` or `Not active`, based on whether the code is set on the device. For display only. The wording is not stable and is not an enumeration — never compare against or branch on it.
49
+ */
50
+ display_status: string
51
+
47
52
  /**
48
53
  * Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.
49
54
  */
@@ -731,6 +736,7 @@ export type UnmanagedAccessCode = {
731
736
  starts_at?: string | null | undefined
732
737
  /**
733
738
  * Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational. `unset` indicates that the code exists on the provider but is not usable on the device.
739
+ * @deprecated Use `display_status` to show a person the code's state.
734
740
  */
735
741
  status: 'set' | 'unset'
736
742
 
@@ -295,6 +295,42 @@ export type UnmanagedAccessMethod = {
295
295
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
296
296
  */
297
297
  warning_code: 'delay_in_issuing'
298
+ } /**
299
+ * Indicates that the access system delivers this mobile key through an app invitation sent to the recipient's email address, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no email address, so the mobile key cannot be delivered. Set an email address on the user identity when you create the access grant.
300
+ */
301
+ | {
302
+ /**
303
+ * Date and time at which Seam created the warning.
304
+ */
305
+ created_at: string
306
+
307
+ /**
308
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
309
+ */
310
+ message: string
311
+
312
+ /**
313
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
314
+ */
315
+ warning_code: 'user_identity_missing_email_address'
316
+ } /**
317
+ * Indicates that the access system delivers this mobile key to the recipient's phone number, but the [user identity](https://docs.seam.co/capability-guides/mobile-access/managing-mobile-app-user-accounts-with-user-identities) for this [access grant](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) has no phone number, so the mobile key cannot be delivered. Set a phone number on the user identity when you create the access grant.
318
+ */
319
+ | {
320
+ /**
321
+ * Date and time at which Seam created the warning.
322
+ */
323
+ created_at: string
324
+
325
+ /**
326
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
327
+ */
328
+ message: string
329
+
330
+ /**
331
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
332
+ */
333
+ warning_code: 'user_identity_missing_phone_number'
298
334
  }
299
335
  >
300
336
 
@@ -593,6 +593,10 @@ export type AccessGrantsListParameters = {
593
593
  * Filter Access Grants by reservation_key.
594
594
  */
595
595
  reservation_key?: string | undefined
596
+ /**
597
+ * String for which to search. Filters returned Access Grants to include all records that satisfy a partial match using `name`, `access_grant_key`, `reservation_key`, `access_grant_id`, `user_identity_id`, `user_identity_full_name`, `user_identity_email_address` or `user_identity_phone_number`.
598
+ */
599
+ search?: string | undefined
596
600
  /**
597
601
  * ID of the space by which you want to filter the list of Access Grants.
598
602
  */
@@ -298,6 +298,7 @@ export type ConnectWebviewsCreateParameters = {
298
298
  | 'ecobee'
299
299
  | 'four_suites'
300
300
  | 'dormakaba_oracode'
301
+ | 'dormakaba_oracode_iho'
301
302
  | 'pti'
302
303
  | 'wyze'
303
304
  | 'seam_passport'
@@ -467,12 +467,13 @@ export type DevicesListParameters = {
467
467
  | 'ttlock'
468
468
  | 'igloohome'
469
469
  | 'controlbyweb'
470
- | 'dormakaba_oracode'
471
470
  | 'tedee'
472
471
  | 'keyincode'
473
472
  | 'akiles'
474
473
  | 'aqara'
475
474
  | 'ecobee'
475
+ | 'dormakaba_oracode'
476
+ | 'dormakaba_oracode_iho'
476
477
  | 'honeywell_resideo'
477
478
  | 'keynest'
478
479
  | 'korelock'
@@ -414,12 +414,13 @@ export type DevicesUnmanagedListParameters = {
414
414
  | 'ttlock'
415
415
  | 'igloohome'
416
416
  | 'controlbyweb'
417
- | 'dormakaba_oracode'
418
417
  | 'tedee'
419
418
  | 'keyincode'
420
419
  | 'akiles'
421
420
  | 'aqara'
422
421
  | 'ecobee'
422
+ | 'dormakaba_oracode'
423
+ | 'dormakaba_oracode_iho'
423
424
  | 'honeywell_resideo'
424
425
  | 'keynest'
425
426
  | 'korelock'
@@ -453,11 +453,12 @@ export type LocksListParameters = {
453
453
  | 'ttlock'
454
454
  | 'igloohome'
455
455
  | 'four_suites'
456
- | 'dormakaba_oracode'
457
456
  | 'tedee'
458
457
  | 'keyincode'
459
458
  | 'akiles'
460
459
  | 'aqara'
460
+ | 'dormakaba_oracode'
461
+ | 'dormakaba_oracode_iho'
461
462
  | 'korelock'
462
463
  | 'lockly'
463
464
  | 'smartthings'
@@ -312,7 +312,7 @@ export type WorkspacesCreateParameters = {
312
312
  name: string
313
313
 
314
314
  /**
315
- * ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one.
315
+ * ID of the organization to associate with the new workspace. If omitted, the new workspace is associated with the organization that you administer, if you administer exactly one. If you administer no organization, Seam creates one for you and associates the new workspace with it.
316
316
  */
317
317
  organization_id?: string | undefined
318
318
  /**
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.26.0'
1
+ const seamapiJavascriptHttpVersion = '2.28.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion