@seamapi/http 2.45.0 → 2.47.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 (53) hide show
  1. package/README.md +12 -0
  2. package/lib/resources/access-code.d.ts +19 -0
  3. package/lib/resources/acs-entrance.d.ts +1 -1
  4. package/lib/resources/device-provider.d.ts +2 -2
  5. package/lib/resources/device.d.ts +48 -4
  6. package/lib/resources/phone.d.ts +16 -1
  7. package/lib/resources/space.d.ts +19 -0
  8. package/lib/resources/unmanaged-access-code.d.ts +19 -0
  9. package/lib/resources/unmanaged-device.d.ts +19 -4
  10. package/lib/routes/access-codes/access-codes.d.ts +9 -9
  11. package/lib/routes/access-codes/access-codes.js +3 -12
  12. package/lib/routes/access-codes/access-codes.js.map +1 -1
  13. package/lib/routes/access-grants/unmanaged/unmanaged.d.ts +4 -0
  14. package/lib/routes/access-methods/access-methods.d.ts +5 -1
  15. package/lib/routes/access-methods/access-methods.js +1 -0
  16. package/lib/routes/access-methods/access-methods.js.map +1 -1
  17. package/lib/routes/client-sessions/client-sessions.d.ts +13 -1
  18. package/lib/routes/client-sessions/client-sessions.js +1 -0
  19. package/lib/routes/client-sessions/client-sessions.js.map +1 -1
  20. package/lib/routes/connect-webviews/connect-webviews.d.ts +1 -1
  21. package/lib/routes/customers/customers.d.ts +174 -0
  22. package/lib/routes/devices/devices.d.ts +3 -3
  23. package/lib/routes/devices/unmanaged/unmanaged.d.ts +3 -3
  24. package/lib/routes/events/events.d.ts +4 -4
  25. package/lib/routes/events/events.js +2 -2
  26. package/lib/routes/locks/locks.d.ts +2 -2
  27. package/lib/routes/seam-http-endpoints.d.ts +5 -5
  28. package/lib/routes/seam-http-endpoints.js +3 -3
  29. package/lib/routes/user-identities/user-identities.d.ts +4 -0
  30. package/lib/version.d.ts +1 -1
  31. package/lib/version.js +1 -1
  32. package/package.json +2 -2
  33. package/src/lib/resources/access-code.ts +22 -0
  34. package/src/lib/resources/acs-entrance.ts +1 -1
  35. package/src/lib/resources/device-provider.ts +2 -1
  36. package/src/lib/resources/device.ts +55 -3
  37. package/src/lib/resources/phone.ts +19 -1
  38. package/src/lib/resources/space.ts +37 -14
  39. package/src/lib/resources/unmanaged-access-code.ts +22 -0
  40. package/src/lib/resources/unmanaged-device.ts +24 -3
  41. package/src/lib/routes/access-codes/access-codes.ts +46 -65
  42. package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +4 -0
  43. package/src/lib/routes/access-methods/access-methods.ts +6 -0
  44. package/src/lib/routes/client-sessions/client-sessions.ts +14 -1
  45. package/src/lib/routes/connect-webviews/connect-webviews.ts +1 -0
  46. package/src/lib/routes/customers/customers.ts +179 -0
  47. package/src/lib/routes/devices/devices.ts +8 -0
  48. package/src/lib/routes/devices/unmanaged/unmanaged.ts +8 -0
  49. package/src/lib/routes/events/events.ts +4 -4
  50. package/src/lib/routes/locks/locks.ts +4 -0
  51. package/src/lib/routes/seam-http-endpoints.ts +5 -4
  52. package/src/lib/routes/user-identities/user-identities.ts +4 -0
  53. package/src/lib/version.ts +1 -1
@@ -583,6 +583,94 @@ export type CustomersCreatePortalParameters = {
583
583
  * Starting date and time for the access grant.
584
584
  */
585
585
  starts_at?: string | Date | Temporal.Instant | undefined
586
+ /**
587
+ * Parts of the reservation that each get their own access, for example one per room. Each sub-reservation inherits the reservation's name, times, preferred code, guest and custom metadata unless it sets its own, and must set its own location keys. A reservation with sub-reservations must not set location keys itself. Sending this list replaces the reservation's sub-reservations: any not included are removed, and an empty list removes all of them. Omitting it leaves existing sub-reservations unchanged.
588
+ */
589
+ sub_reservations?:
590
+ | Array<{
591
+ /**
592
+ * Building keys associated with the access grant.
593
+ */
594
+ building_keys?: Array<string> | undefined
595
+ /**
596
+ * Common area keys associated with the access grant.
597
+ */
598
+ common_area_keys?: Array<string> | undefined
599
+ /**
600
+ * Set key:value pairs for filtering sub-reservations by custom criteria. Merged over the reservation's custom metadata. Set a key to `null` or to an empty string to remove that key from the custom metadata.
601
+ */
602
+ custom_metadata?:
603
+ Record<string, string | boolean> | undefined
604
+ /**
605
+ * Ending date and time for the access grant.
606
+ */
607
+ ends_at?: string | Date | Temporal.Instant | undefined
608
+ /**
609
+ * Facility keys associated with the access grant.
610
+ */
611
+ facility_keys?: Array<string> | undefined
612
+ /**
613
+ * Guest key associated with the access grant.
614
+ */
615
+ guest_key?: string | undefined
616
+ /**
617
+ * Whether this is the reservation's primary sub-reservation, for example the room the guest stays in. Only the primary sub-reservation passes the guest's phone number to access systems that require a phone number to be unique per user. At most one sub-reservation of a reservation can be primary. If none is, the first sub-reservation in the list is primary.
618
+ */
619
+ is_primary?: boolean | undefined
620
+ /**
621
+ * Listing keys associated with the access grant.
622
+ */
623
+ listing_keys?: Array<string> | undefined
624
+ /**
625
+ * Your name for this access grant resource.
626
+ */
627
+ name?: string | undefined
628
+ /**
629
+ * Preferred PIN code to use when creating access for this reservation. Set to `null` to remove a previously set preferred code, so that access falls back to an automatically generated code. Omitting this field keeps any previously set preferred code.
630
+ */
631
+ preferred_code?: string | null | undefined
632
+ /**
633
+ * Property keys associated with the access grant.
634
+ */
635
+ property_keys?: Array<string> | undefined
636
+ /**
637
+ * Resident key associated with the access grant.
638
+ */
639
+ resident_key?: string | undefined
640
+ /**
641
+ * Room keys associated with the access grant.
642
+ */
643
+ room_keys?: Array<string> | undefined
644
+ /**
645
+ * Space keys associated with the access grant.
646
+ */
647
+ space_keys?: Array<string> | undefined
648
+ /**
649
+ * Starting date and time for the access grant.
650
+ */
651
+ starts_at?: string | Date | Temporal.Instant | undefined
652
+ /**
653
+ * Your identifier for the sub-reservation. Must be unique across all your reservations and sub-reservations, and stay with the same reservation.
654
+ */
655
+ sub_reservation_key?: string | undefined
656
+ /**
657
+ * Tenant key associated with the access grant.
658
+ */
659
+ tenant_key?: string | undefined
660
+ /**
661
+ * Unit keys associated with the access grant.
662
+ */
663
+ unit_keys?: Array<string> | undefined
664
+ /**
665
+ * User identity key associated with the access grant.
666
+ */
667
+ user_identity_key?: string | undefined
668
+ /**
669
+ * User key associated with the access grant.
670
+ */
671
+ user_key?: string | undefined
672
+ }>
673
+ | undefined
586
674
  /**
587
675
  * Tenant key associated with the access grant.
588
676
  */
@@ -938,6 +1026,10 @@ export type CustomersCreatePortalParameters = {
938
1026
  * Indicates whether the customer can customize their notification settings, such as the low-battery alert threshold.
939
1027
  */
940
1028
  allow_notification_customization?: boolean | undefined
1029
+ /**
1030
+ * Indicates whether the customer can customize the sensor automation rules for their properties.
1031
+ */
1032
+ allow_sensor_automation_rule_customization?: boolean | undefined
941
1033
  /**
942
1034
  * Indicates whether the customer can customize the sound automation rules for their properties.
943
1035
  */
@@ -1582,6 +1674,93 @@ export type CustomersPushDataParameters = {
1582
1674
  * Starting date and time for the access grant.
1583
1675
  */
1584
1676
  starts_at?: string | Date | Temporal.Instant | undefined
1677
+ /**
1678
+ * Parts of the reservation that each get their own access, for example one per room. Each sub-reservation inherits the reservation's name, times, preferred code, guest and custom metadata unless it sets its own, and must set its own location keys. A reservation with sub-reservations must not set location keys itself. Sending this list replaces the reservation's sub-reservations: any not included are removed, and an empty list removes all of them. Omitting it leaves existing sub-reservations unchanged.
1679
+ */
1680
+ sub_reservations?:
1681
+ | Array<{
1682
+ /**
1683
+ * Building keys associated with the access grant.
1684
+ */
1685
+ building_keys?: Array<string> | undefined
1686
+ /**
1687
+ * Common area keys associated with the access grant.
1688
+ */
1689
+ common_area_keys?: Array<string> | undefined
1690
+ /**
1691
+ * Set key:value pairs for filtering sub-reservations by custom criteria. Merged over the reservation's custom metadata. Set a key to `null` or to an empty string to remove that key from the custom metadata.
1692
+ */
1693
+ custom_metadata?: Record<string, string | boolean> | undefined
1694
+ /**
1695
+ * Ending date and time for the access grant.
1696
+ */
1697
+ ends_at?: string | Date | Temporal.Instant | undefined
1698
+ /**
1699
+ * Facility keys associated with the access grant.
1700
+ */
1701
+ facility_keys?: Array<string> | undefined
1702
+ /**
1703
+ * Guest key associated with the access grant.
1704
+ */
1705
+ guest_key?: string | undefined
1706
+ /**
1707
+ * Whether this is the reservation's primary sub-reservation, for example the room the guest stays in. Only the primary sub-reservation passes the guest's phone number to access systems that require a phone number to be unique per user. At most one sub-reservation of a reservation can be primary. If none is, the first sub-reservation in the list is primary.
1708
+ */
1709
+ is_primary?: boolean | undefined
1710
+ /**
1711
+ * Listing keys associated with the access grant.
1712
+ */
1713
+ listing_keys?: Array<string> | undefined
1714
+ /**
1715
+ * Your name for this access grant resource.
1716
+ */
1717
+ name?: string | undefined
1718
+ /**
1719
+ * Preferred PIN code to use when creating access for this reservation. Set to `null` to remove a previously set preferred code, so that access falls back to an automatically generated code. Omitting this field keeps any previously set preferred code.
1720
+ */
1721
+ preferred_code?: string | null | undefined
1722
+ /**
1723
+ * Property keys associated with the access grant.
1724
+ */
1725
+ property_keys?: Array<string> | undefined
1726
+ /**
1727
+ * Resident key associated with the access grant.
1728
+ */
1729
+ resident_key?: string | undefined
1730
+ /**
1731
+ * Room keys associated with the access grant.
1732
+ */
1733
+ room_keys?: Array<string> | undefined
1734
+ /**
1735
+ * Space keys associated with the access grant.
1736
+ */
1737
+ space_keys?: Array<string> | undefined
1738
+ /**
1739
+ * Starting date and time for the access grant.
1740
+ */
1741
+ starts_at?: string | Date | Temporal.Instant | undefined
1742
+ /**
1743
+ * Your identifier for the sub-reservation. Must be unique across all your reservations and sub-reservations, and stay with the same reservation.
1744
+ */
1745
+ sub_reservation_key?: string | undefined
1746
+ /**
1747
+ * Tenant key associated with the access grant.
1748
+ */
1749
+ tenant_key?: string | undefined
1750
+ /**
1751
+ * Unit keys associated with the access grant.
1752
+ */
1753
+ unit_keys?: Array<string> | undefined
1754
+ /**
1755
+ * User identity key associated with the access grant.
1756
+ */
1757
+ user_identity_key?: string | undefined
1758
+ /**
1759
+ * User key associated with the access grant.
1760
+ */
1761
+ user_key?: string | undefined
1762
+ }>
1763
+ | undefined
1585
1764
  /**
1586
1765
  * Tenant key associated with the access grant.
1587
1766
  */
@@ -357,6 +357,8 @@ export type DevicesListParameters = {
357
357
  | 'smartthings_lock'
358
358
  | 'wyze_lock'
359
359
  | 'yale_lock'
360
+ | 'yale_access_lock'
361
+ | 'yale_home_lock'
360
362
  | 'two_n_intercom'
361
363
  | 'controlbyweb_device'
362
364
  | 'ttlock_lock'
@@ -387,6 +389,7 @@ export type DevicesListParameters = {
387
389
  | 'tapo_camera'
388
390
  | 'arlo_camera'
389
391
  | 'reolink_camera'
392
+ | 'unifi_protect_camera'
390
393
  | 'sonos_speaker'
391
394
  | undefined
392
395
  /**
@@ -411,6 +414,8 @@ export type DevicesListParameters = {
411
414
  | 'smartthings_lock'
412
415
  | 'wyze_lock'
413
416
  | 'yale_lock'
417
+ | 'yale_access_lock'
418
+ | 'yale_home_lock'
414
419
  | 'two_n_intercom'
415
420
  | 'controlbyweb_device'
416
421
  | 'ttlock_lock'
@@ -441,6 +446,7 @@ export type DevicesListParameters = {
441
446
  | 'tapo_camera'
442
447
  | 'arlo_camera'
443
448
  | 'reolink_camera'
449
+ | 'unifi_protect_camera'
444
450
  | 'sonos_speaker'
445
451
  >
446
452
  | undefined
@@ -479,6 +485,7 @@ export type DevicesListParameters = {
479
485
  | 'controlbyweb'
480
486
  | 'tedee'
481
487
  | 'keyincode'
488
+ | 'ubiquiti'
482
489
  | 'akiles'
483
490
  | 'aqara'
484
491
  | 'ecobee'
@@ -500,6 +507,7 @@ export type DevicesListParameters = {
500
507
  | 'tapo'
501
508
  | 'arlo'
502
509
  | 'reolink'
510
+ | 'unifi_protect'
503
511
  | 'ical'
504
512
  | 'lodgify'
505
513
  | 'hostaway'
@@ -304,6 +304,8 @@ export type DevicesUnmanagedListParameters = {
304
304
  | 'smartthings_lock'
305
305
  | 'wyze_lock'
306
306
  | 'yale_lock'
307
+ | 'yale_access_lock'
308
+ | 'yale_home_lock'
307
309
  | 'two_n_intercom'
308
310
  | 'controlbyweb_device'
309
311
  | 'ttlock_lock'
@@ -334,6 +336,7 @@ export type DevicesUnmanagedListParameters = {
334
336
  | 'tapo_camera'
335
337
  | 'arlo_camera'
336
338
  | 'reolink_camera'
339
+ | 'unifi_protect_camera'
337
340
  | 'sonos_speaker'
338
341
  | undefined
339
342
  /**
@@ -358,6 +361,8 @@ export type DevicesUnmanagedListParameters = {
358
361
  | 'smartthings_lock'
359
362
  | 'wyze_lock'
360
363
  | 'yale_lock'
364
+ | 'yale_access_lock'
365
+ | 'yale_home_lock'
361
366
  | 'two_n_intercom'
362
367
  | 'controlbyweb_device'
363
368
  | 'ttlock_lock'
@@ -388,6 +393,7 @@ export type DevicesUnmanagedListParameters = {
388
393
  | 'tapo_camera'
389
394
  | 'arlo_camera'
390
395
  | 'reolink_camera'
396
+ | 'unifi_protect_camera'
391
397
  | 'sonos_speaker'
392
398
  >
393
399
  | undefined
@@ -426,6 +432,7 @@ export type DevicesUnmanagedListParameters = {
426
432
  | 'controlbyweb'
427
433
  | 'tedee'
428
434
  | 'keyincode'
435
+ | 'ubiquiti'
429
436
  | 'akiles'
430
437
  | 'aqara'
431
438
  | 'ecobee'
@@ -447,6 +454,7 @@ export type DevicesUnmanagedListParameters = {
447
454
  | 'tapo'
448
455
  | 'arlo'
449
456
  | 'reolink'
457
+ | 'unifi_protect'
450
458
  | 'ical'
451
459
  | 'lodgify'
452
460
  | 'hostaway'
@@ -163,7 +163,7 @@ export class SeamHttpEvents {
163
163
  }
164
164
 
165
165
  /**
166
- * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place.
166
+ * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. Events older than 90 days are not returned.
167
167
  */
168
168
  get(
169
169
  parameters: EventsGetParameters,
@@ -183,7 +183,7 @@ export class SeamHttpEvents {
183
183
  }
184
184
 
185
185
  /**
186
- * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place.
186
+ * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. Only events from the last 90 days are returned.
187
187
  */
188
188
  list(
189
189
  parameters: EventsListParameters,
@@ -313,7 +313,7 @@ export type EventsListParameters = RequireAtLeastOne<
313
313
  */
314
314
  acs_user_id?: string | undefined
315
315
  /**
316
- * Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
316
+ * Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`. Only events from the last 90 days are returned, so a lower timestamp older than 90 days is treated as 90 days ago.
317
317
  */
318
318
  between?: Array<string> | undefined
319
319
  /**
@@ -585,7 +585,7 @@ export type EventsListParameters = RequireAtLeastOne<
585
585
  */
586
586
  limit?: number | undefined
587
587
  /**
588
- * Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`.
588
+ * Timestamp to indicate the beginning generation time for the events that you want to list. You must include `since` or `between`. Only events from the last 90 days are returned, so a `since` older than 90 days is treated as 90 days ago.
589
589
  */
590
590
  since?: string | undefined
591
591
  /**
@@ -375,6 +375,8 @@ export type LocksListParameters = {
375
375
  | 'smartthings_lock'
376
376
  | 'wyze_lock'
377
377
  | 'yale_lock'
378
+ | 'yale_access_lock'
379
+ | 'yale_home_lock'
378
380
  | 'two_n_intercom'
379
381
  | 'controlbyweb_device'
380
382
  | 'ttlock_lock'
@@ -413,6 +415,8 @@ export type LocksListParameters = {
413
415
  | 'smartthings_lock'
414
416
  | 'wyze_lock'
415
417
  | 'yale_lock'
418
+ | 'yale_access_lock'
419
+ | 'yale_home_lock'
416
420
  | 'two_n_intercom'
417
421
  | 'controlbyweb_device'
418
422
  | 'ttlock_lock'
@@ -1002,10 +1002,10 @@ export class SeamHttpEndpoints {
1002
1002
  /**
1003
1003
  * Returns a list of all [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes).
1004
1004
  *
1005
- * Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
1005
+ * Without `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`, returns access codes across the workspace, or across the customer when `customer_key` is set. Use `limit` and `page_cursor` to page through them.
1006
1006
  */
1007
1007
  get '/access_codes/list'(): (
1008
- parameters: AccessCodesListParameters,
1008
+ parameters?: AccessCodesListParameters,
1009
1009
  options?: AccessCodesListOptions,
1010
1010
  ) => AccessCodesListRequest {
1011
1011
  const { client, defaults } = this
@@ -2910,7 +2910,7 @@ export class SeamHttpEndpoints {
2910
2910
  }
2911
2911
 
2912
2912
  /**
2913
- * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place.
2913
+ * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to retrieve an event that already took place. Events older than 90 days are not returned.
2914
2914
  */
2915
2915
  get '/events/get'(): (
2916
2916
  parameters: EventsGetParameters,
@@ -2926,7 +2926,7 @@ export class SeamHttpEndpoints {
2926
2926
  }
2927
2927
 
2928
2928
  /**
2929
- * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place.
2929
+ * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://www.seam.co/docs/developer-tools/webhooks), but it enables you to filter or see events that already took place. Only events from the last 90 days are returned.
2930
2930
  */
2931
2931
  get '/events/list'(): (
2932
2932
  parameters: EventsListParameters,
@@ -4451,6 +4451,7 @@ export type SeamHttpEndpointPaginatedQueryPaths =
4451
4451
  | '/acs/entrances/list'
4452
4452
  | '/acs/users/list'
4453
4453
  | '/action_attempts/list'
4454
+ | '/client_sessions/list'
4454
4455
  | '/connect_webviews/list'
4455
4456
  | '/connected_accounts/list'
4456
4457
  | '/devices/list'
@@ -656,6 +656,10 @@ export type UserIdentitiesListParameters = {
656
656
  * `acs_system_id` of the credential manager by which you want to filter the list of user identities.
657
657
  */
658
658
  credential_manager_acs_system_id?: string | undefined
659
+ /**
660
+ * Customer key for which you want to list user identities.
661
+ */
662
+ customer_key?: string | undefined
659
663
  /**
660
664
  * Maximum number of records to return per page.
661
665
  */
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.45.0'
1
+ const seamapiJavascriptHttpVersion = '2.47.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion