@seamapi/http 2.1.0 → 2.2.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 (240) hide show
  1. package/lib/seam/connect/resources/access-code.d.ts +743 -56
  2. package/lib/seam/connect/resources/access-grant.d.ts +279 -10
  3. package/lib/seam/connect/resources/access-method.d.ts +204 -8
  4. package/lib/seam/connect/resources/acs-access-group.d.ts +242 -9
  5. package/lib/seam/connect/resources/acs-credential.d.ts +212 -6
  6. package/lib/seam/connect/resources/acs-encoder.d.ts +46 -0
  7. package/lib/seam/connect/resources/acs-entrance.d.ts +298 -5
  8. package/lib/seam/connect/resources/acs-system.d.ts +227 -11
  9. package/lib/seam/connect/resources/acs-user.d.ts +388 -19
  10. package/lib/seam/connect/resources/action-attempt.d.ts +954 -0
  11. package/lib/seam/connect/resources/batch.d.ts +3 -0
  12. package/lib/seam/connect/resources/client-session.d.ts +48 -0
  13. package/lib/seam/connect/resources/connect-webview.d.ts +70 -0
  14. package/lib/seam/connect/resources/connected-account.d.ts +281 -12
  15. package/lib/seam/connect/resources/customer-portal.d.ts +22 -0
  16. package/lib/seam/connect/resources/device-provider.d.ts +72 -0
  17. package/lib/seam/connect/resources/device.d.ts +2063 -41
  18. package/lib/seam/connect/resources/event.d.ts +4014 -0
  19. package/lib/seam/connect/resources/instant-key.d.ts +41 -0
  20. package/lib/seam/connect/resources/noise-threshold.d.ts +24 -0
  21. package/lib/seam/connect/resources/phone.d.ts +72 -0
  22. package/lib/seam/connect/resources/space.d.ts +54 -0
  23. package/lib/seam/connect/resources/thermostat-daily-program.d.ts +27 -0
  24. package/lib/seam/connect/resources/thermostat-schedule.d.ts +45 -0
  25. package/lib/seam/connect/resources/unmanaged-access-code.d.ts +602 -50
  26. package/lib/seam/connect/resources/unmanaged-access-grant.d.ts +267 -10
  27. package/lib/seam/connect/resources/unmanaged-access-method.d.ts +195 -8
  28. package/lib/seam/connect/resources/unmanaged-device.d.ts +810 -120
  29. package/lib/seam/connect/resources/unmanaged-user-identity.d.ts +79 -3
  30. package/lib/seam/connect/resources/user-identity.d.ts +82 -3
  31. package/lib/seam/connect/resources/webhook.d.ts +15 -0
  32. package/lib/seam/connect/resources/workspace.d.ts +45 -0
  33. package/lib/seam/connect/routes/access-codes/access-codes.d.ts +288 -0
  34. package/lib/seam/connect/routes/access-codes/access-codes.js +60 -0
  35. package/lib/seam/connect/routes/access-codes/access-codes.js.map +1 -1
  36. package/lib/seam/connect/routes/access-codes/simulate/simulate.d.ts +12 -0
  37. package/lib/seam/connect/routes/access-codes/simulate/simulate.js +3 -0
  38. package/lib/seam/connect/routes/access-codes/simulate/simulate.js.map +1 -1
  39. package/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.d.ts +72 -0
  40. package/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.js +21 -0
  41. package/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
  42. package/lib/seam/connect/routes/access-grants/access-grants.d.ts +177 -0
  43. package/lib/seam/connect/routes/access-grants/access-grants.js +21 -0
  44. package/lib/seam/connect/routes/access-grants/access-grants.js.map +1 -1
  45. package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.d.ts +43 -0
  46. package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.js +13 -0
  47. package/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
  48. package/lib/seam/connect/routes/access-methods/access-methods.d.ts +78 -0
  49. package/lib/seam/connect/routes/access-methods/access-methods.js +21 -0
  50. package/lib/seam/connect/routes/access-methods/access-methods.js.map +1 -1
  51. package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.d.ts +21 -0
  52. package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.js +6 -0
  53. package/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
  54. package/lib/seam/connect/routes/acs/access-groups/access-groups.d.ts +63 -0
  55. package/lib/seam/connect/routes/acs/access-groups/access-groups.js +21 -0
  56. package/lib/seam/connect/routes/acs/access-groups/access-groups.js.map +1 -1
  57. package/lib/seam/connect/routes/acs/credentials/credentials.d.ts +126 -0
  58. package/lib/seam/connect/routes/acs/credentials/credentials.js +24 -0
  59. package/lib/seam/connect/routes/acs/credentials/credentials.js.map +1 -1
  60. package/lib/seam/connect/routes/acs/encoders/encoders.d.ts +66 -0
  61. package/lib/seam/connect/routes/acs/encoders/encoders.js +15 -0
  62. package/lib/seam/connect/routes/acs/encoders/encoders.js.map +1 -1
  63. package/lib/seam/connect/routes/acs/encoders/simulate/simulate.d.ts +39 -0
  64. package/lib/seam/connect/routes/acs/encoders/simulate/simulate.js +12 -0
  65. package/lib/seam/connect/routes/acs/encoders/simulate/simulate.js.map +1 -1
  66. package/lib/seam/connect/routes/acs/entrances/entrances.d.ts +72 -0
  67. package/lib/seam/connect/routes/acs/entrances/entrances.js +15 -0
  68. package/lib/seam/connect/routes/acs/entrances/entrances.js.map +1 -1
  69. package/lib/seam/connect/routes/acs/systems/systems.d.ts +64 -0
  70. package/lib/seam/connect/routes/acs/systems/systems.js +16 -0
  71. package/lib/seam/connect/routes/acs/systems/systems.js.map +1 -1
  72. package/lib/seam/connect/routes/acs/users/users.d.ts +189 -0
  73. package/lib/seam/connect/routes/acs/users/users.js +33 -0
  74. package/lib/seam/connect/routes/acs/users/users.js.map +1 -1
  75. package/lib/seam/connect/routes/action-attempts/action-attempts.d.ts +21 -0
  76. package/lib/seam/connect/routes/action-attempts/action-attempts.js +6 -0
  77. package/lib/seam/connect/routes/action-attempts/action-attempts.js.map +1 -1
  78. package/lib/seam/connect/routes/client-sessions/client-sessions.d.ts +113 -0
  79. package/lib/seam/connect/routes/client-sessions/client-sessions.js +23 -0
  80. package/lib/seam/connect/routes/client-sessions/client-sessions.js.map +1 -1
  81. package/lib/seam/connect/routes/connect-webviews/connect-webviews.d.ts +76 -0
  82. package/lib/seam/connect/routes/connect-webviews/connect-webviews.js +22 -0
  83. package/lib/seam/connect/routes/connect-webviews/connect-webviews.js.map +1 -1
  84. package/lib/seam/connect/routes/connected-accounts/connected-accounts.d.ts +70 -0
  85. package/lib/seam/connect/routes/connected-accounts/connected-accounts.js +19 -0
  86. package/lib/seam/connect/routes/connected-accounts/connected-accounts.js.map +1 -1
  87. package/lib/seam/connect/routes/connected-accounts/simulate/simulate.d.ts +6 -0
  88. package/lib/seam/connect/routes/connected-accounts/simulate/simulate.js +3 -0
  89. package/lib/seam/connect/routes/connected-accounts/simulate/simulate.js.map +1 -1
  90. package/lib/seam/connect/routes/customers/customers.d.ts +1042 -0
  91. package/lib/seam/connect/routes/customers/customers.js +10 -0
  92. package/lib/seam/connect/routes/customers/customers.js.map +1 -1
  93. package/lib/seam/connect/routes/devices/devices.d.ts +122 -0
  94. package/lib/seam/connect/routes/devices/devices.js +23 -0
  95. package/lib/seam/connect/routes/devices/devices.js.map +1 -1
  96. package/lib/seam/connect/routes/devices/simulate/simulate.d.ts +42 -0
  97. package/lib/seam/connect/routes/devices/simulate/simulate.js +27 -0
  98. package/lib/seam/connect/routes/devices/simulate/simulate.js.map +1 -1
  99. package/lib/seam/connect/routes/devices/unmanaged/unmanaged.d.ts +80 -0
  100. package/lib/seam/connect/routes/devices/unmanaged/unmanaged.js +17 -0
  101. package/lib/seam/connect/routes/devices/unmanaged/unmanaged.js.map +1 -1
  102. package/lib/seam/connect/routes/events/events.d.ts +99 -0
  103. package/lib/seam/connect/routes/events/events.js +6 -0
  104. package/lib/seam/connect/routes/events/events.js.map +1 -1
  105. package/lib/seam/connect/routes/instant-keys/instant-keys.d.ts +21 -0
  106. package/lib/seam/connect/routes/instant-keys/instant-keys.js +9 -0
  107. package/lib/seam/connect/routes/instant-keys/instant-keys.js.map +1 -1
  108. package/lib/seam/connect/routes/locks/locks.d.ts +85 -0
  109. package/lib/seam/connect/routes/locks/locks.js +16 -0
  110. package/lib/seam/connect/routes/locks/locks.js.map +1 -1
  111. package/lib/seam/connect/routes/locks/simulate/simulate.d.ts +15 -0
  112. package/lib/seam/connect/routes/locks/simulate/simulate.js +6 -0
  113. package/lib/seam/connect/routes/locks/simulate/simulate.js.map +1 -1
  114. package/lib/seam/connect/routes/noise-sensors/noise-sensors.d.ts +51 -0
  115. package/lib/seam/connect/routes/noise-sensors/noise-sensors.js +3 -0
  116. package/lib/seam/connect/routes/noise-sensors/noise-sensors.js.map +1 -1
  117. package/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.d.ts +66 -0
  118. package/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.js +15 -0
  119. package/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
  120. package/lib/seam/connect/routes/noise-sensors/simulate/simulate.d.ts +6 -0
  121. package/lib/seam/connect/routes/noise-sensors/simulate/simulate.js +3 -0
  122. package/lib/seam/connect/routes/noise-sensors/simulate/simulate.js.map +1 -1
  123. package/lib/seam/connect/routes/phones/phones.d.ts +21 -0
  124. package/lib/seam/connect/routes/phones/phones.js +9 -0
  125. package/lib/seam/connect/routes/phones/phones.js.map +1 -1
  126. package/lib/seam/connect/routes/phones/simulate/simulate.d.ts +45 -0
  127. package/lib/seam/connect/routes/phones/simulate/simulate.js +3 -0
  128. package/lib/seam/connect/routes/phones/simulate/simulate.js.map +1 -1
  129. package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.d.ts +6 -0
  130. package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.js +6 -0
  131. package/lib/seam/connect/routes/seam-http-endpoints-without-workspace.js.map +1 -1
  132. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +696 -0
  133. package/lib/seam/connect/routes/seam-http-endpoints.js +696 -0
  134. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  135. package/lib/seam/connect/routes/spaces/spaces.d.ts +165 -0
  136. package/lib/seam/connect/routes/spaces/spaces.js +36 -0
  137. package/lib/seam/connect/routes/spaces/spaces.js.map +1 -1
  138. package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.d.ts +42 -0
  139. package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js +9 -0
  140. package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  141. package/lib/seam/connect/routes/thermostats/schedules/schedules.d.ts +69 -0
  142. package/lib/seam/connect/routes/thermostats/schedules/schedules.js +15 -0
  143. package/lib/seam/connect/routes/thermostats/schedules/schedules.js.map +1 -1
  144. package/lib/seam/connect/routes/thermostats/simulate/simulate.d.ts +33 -0
  145. package/lib/seam/connect/routes/thermostats/simulate/simulate.js +6 -0
  146. package/lib/seam/connect/routes/thermostats/simulate/simulate.js.map +1 -1
  147. package/lib/seam/connect/routes/thermostats/thermostats.d.ts +300 -0
  148. package/lib/seam/connect/routes/thermostats/thermostats.js +42 -0
  149. package/lib/seam/connect/routes/thermostats/thermostats.js.map +1 -1
  150. package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.d.ts +35 -0
  151. package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.js +11 -0
  152. package/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
  153. package/lib/seam/connect/routes/user-identities/user-identities.d.ts +145 -0
  154. package/lib/seam/connect/routes/user-identities/user-identities.js +46 -0
  155. package/lib/seam/connect/routes/user-identities/user-identities.js.map +1 -1
  156. package/lib/seam/connect/routes/webhooks/webhooks.d.ts +33 -0
  157. package/lib/seam/connect/routes/webhooks/webhooks.js +15 -0
  158. package/lib/seam/connect/routes/webhooks/webhooks.js.map +1 -1
  159. package/lib/seam/connect/routes/workspaces/workspaces.d.ts +88 -0
  160. package/lib/seam/connect/routes/workspaces/workspaces.js +15 -0
  161. package/lib/seam/connect/routes/workspaces/workspaces.js.map +1 -1
  162. package/lib/version.d.ts +1 -1
  163. package/lib/version.js +1 -1
  164. package/package.json +1 -1
  165. package/src/lib/seam/connect/resources/access-code.ts +719 -35
  166. package/src/lib/seam/connect/resources/access-grant.ts +284 -16
  167. package/src/lib/seam/connect/resources/access-method.ts +205 -10
  168. package/src/lib/seam/connect/resources/acs-access-group.ts +247 -14
  169. package/src/lib/seam/connect/resources/acs-credential.ts +210 -5
  170. package/src/lib/seam/connect/resources/acs-encoder.ts +46 -0
  171. package/src/lib/seam/connect/resources/acs-entrance.ts +296 -4
  172. package/src/lib/seam/connect/resources/acs-system.ts +223 -9
  173. package/src/lib/seam/connect/resources/acs-user.ts +382 -16
  174. package/src/lib/seam/connect/resources/action-attempt.ts +956 -0
  175. package/src/lib/seam/connect/resources/batch.ts +3 -0
  176. package/src/lib/seam/connect/resources/client-session.ts +48 -0
  177. package/src/lib/seam/connect/resources/connect-webview.ts +70 -0
  178. package/src/lib/seam/connect/resources/connected-account.ts +277 -10
  179. package/src/lib/seam/connect/resources/customer-portal.ts +22 -0
  180. package/src/lib/seam/connect/resources/device-provider.ts +72 -0
  181. package/src/lib/seam/connect/resources/device.ts +2059 -39
  182. package/src/lib/seam/connect/resources/event.ts +4015 -0
  183. package/src/lib/seam/connect/resources/instant-key.ts +41 -0
  184. package/src/lib/seam/connect/resources/noise-threshold.ts +24 -0
  185. package/src/lib/seam/connect/resources/phone.ts +72 -0
  186. package/src/lib/seam/connect/resources/space.ts +54 -0
  187. package/src/lib/seam/connect/resources/thermostat-daily-program.ts +27 -0
  188. package/src/lib/seam/connect/resources/thermostat-schedule.ts +45 -0
  189. package/src/lib/seam/connect/resources/unmanaged-access-code.ts +580 -30
  190. package/src/lib/seam/connect/resources/unmanaged-access-grant.ts +272 -16
  191. package/src/lib/seam/connect/resources/unmanaged-access-method.ts +196 -10
  192. package/src/lib/seam/connect/resources/unmanaged-device.ts +727 -39
  193. package/src/lib/seam/connect/resources/unmanaged-user-identity.ts +84 -8
  194. package/src/lib/seam/connect/resources/user-identity.ts +87 -8
  195. package/src/lib/seam/connect/resources/webhook.ts +15 -0
  196. package/src/lib/seam/connect/resources/workspace.ts +46 -0
  197. package/src/lib/seam/connect/routes/access-codes/access-codes.ts +291 -0
  198. package/src/lib/seam/connect/routes/access-codes/simulate/simulate.ts +12 -0
  199. package/src/lib/seam/connect/routes/access-codes/unmanaged/unmanaged.ts +73 -0
  200. package/src/lib/seam/connect/routes/access-grants/access-grants.ts +180 -0
  201. package/src/lib/seam/connect/routes/access-grants/unmanaged/unmanaged.ts +43 -0
  202. package/src/lib/seam/connect/routes/access-methods/access-methods.ts +79 -0
  203. package/src/lib/seam/connect/routes/access-methods/unmanaged/unmanaged.ts +21 -0
  204. package/src/lib/seam/connect/routes/acs/access-groups/access-groups.ts +63 -0
  205. package/src/lib/seam/connect/routes/acs/credentials/credentials.ts +133 -0
  206. package/src/lib/seam/connect/routes/acs/encoders/encoders.ts +66 -0
  207. package/src/lib/seam/connect/routes/acs/encoders/simulate/simulate.ts +40 -0
  208. package/src/lib/seam/connect/routes/acs/entrances/entrances.ts +72 -0
  209. package/src/lib/seam/connect/routes/acs/systems/systems.ts +64 -0
  210. package/src/lib/seam/connect/routes/acs/users/users.ts +189 -0
  211. package/src/lib/seam/connect/routes/action-attempts/action-attempts.ts +21 -0
  212. package/src/lib/seam/connect/routes/client-sessions/client-sessions.ts +113 -0
  213. package/src/lib/seam/connect/routes/connect-webviews/connect-webviews.ts +76 -0
  214. package/src/lib/seam/connect/routes/connected-accounts/connected-accounts.ts +70 -0
  215. package/src/lib/seam/connect/routes/connected-accounts/simulate/simulate.ts +6 -0
  216. package/src/lib/seam/connect/routes/customers/customers.ts +1058 -0
  217. package/src/lib/seam/connect/routes/devices/devices.ts +123 -0
  218. package/src/lib/seam/connect/routes/devices/simulate/simulate.ts +42 -0
  219. package/src/lib/seam/connect/routes/devices/unmanaged/unmanaged.ts +80 -0
  220. package/src/lib/seam/connect/routes/events/events.ts +99 -0
  221. package/src/lib/seam/connect/routes/instant-keys/instant-keys.ts +21 -0
  222. package/src/lib/seam/connect/routes/locks/locks.ts +85 -0
  223. package/src/lib/seam/connect/routes/locks/simulate/simulate.ts +15 -0
  224. package/src/lib/seam/connect/routes/noise-sensors/noise-sensors.ts +51 -0
  225. package/src/lib/seam/connect/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +66 -0
  226. package/src/lib/seam/connect/routes/noise-sensors/simulate/simulate.ts +6 -0
  227. package/src/lib/seam/connect/routes/phones/phones.ts +21 -0
  228. package/src/lib/seam/connect/routes/phones/simulate/simulate.ts +45 -0
  229. package/src/lib/seam/connect/routes/seam-http-endpoints-without-workspace.ts +6 -0
  230. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +696 -0
  231. package/src/lib/seam/connect/routes/spaces/spaces.ts +166 -0
  232. package/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +42 -0
  233. package/src/lib/seam/connect/routes/thermostats/schedules/schedules.ts +69 -0
  234. package/src/lib/seam/connect/routes/thermostats/simulate/simulate.ts +33 -0
  235. package/src/lib/seam/connect/routes/thermostats/thermostats.ts +300 -0
  236. package/src/lib/seam/connect/routes/user-identities/unmanaged/unmanaged.ts +35 -0
  237. package/src/lib/seam/connect/routes/user-identities/user-identities.ts +146 -0
  238. package/src/lib/seam/connect/routes/webhooks/webhooks.ts +33 -0
  239. package/src/lib/seam/connect/routes/workspaces/workspaces.ts +88 -0
  240. package/src/lib/version.ts +1 -1
@@ -1,98 +1,367 @@
1
+ /**
2
+ * Represents an Access Grant. Access Grants enable you to grant a user identity access to spaces, entrances, and devices through one or more access methods, such as mobile keys, plastic cards, and PIN codes. You can create an Access Grant for an existing user identity, or you can create a new user identity *while* creating the new Access Grant.
3
+ */
1
4
  export type AccessGrant = {
5
+ /**
6
+ * ID of the Access Grant.
7
+ */
2
8
  access_grant_id: string;
9
+ /**
10
+ * Unique key for the access grant within the workspace.
11
+ */
3
12
  access_grant_key?: string | undefined;
13
+ /**
14
+ * IDs of the access methods created for the Access Grant.
15
+ */
4
16
  access_method_ids: Array<string>;
17
+ /**
18
+ * Client Session Token. Only returned if the Access Grant has a mobile_key access method.
19
+ */
5
20
  client_session_token?: string | undefined;
21
+ /**
22
+ * Date and time at which the Access Grant was created.
23
+ */
6
24
  created_at: string;
25
+ /**
26
+ * ID of the customization profile associated with the Access Grant.
27
+ */
7
28
  customization_profile_id?: string | undefined;
29
+ /**
30
+ * Display name of the Access Grant.
31
+ */
8
32
  display_name: string;
33
+ /**
34
+ * Date and time at which the Access Grant ends.
35
+ */
9
36
  ends_at: string | null;
10
- errors: Array<{
37
+ /**
38
+ * Errors associated with the [access grant](https://docs.seam.co/use-cases/granting-access).
39
+ */
40
+ errors: Array<
41
+ /**
42
+ * Indicates that Seam could not create one or more of the requested access methods for the access grant.
43
+ */
44
+ {
45
+ /**
46
+ * Date and time at which Seam created the error.
47
+ */
11
48
  created_at: string;
49
+ /**
50
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
51
+ */
12
52
  error_code: 'cannot_create_requested_access_methods';
53
+ /**
54
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
55
+ */
13
56
  message: string;
57
+ /**
58
+ * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
59
+ */
14
60
  missing_device_ids?: Array<string> | undefined;
15
61
  }>;
62
+ /**
63
+ * Instant Key URL. Only returned if the Access Grant has a single mobile_key access_method.
64
+ */
16
65
  instant_key_url?: string | undefined;
66
+ /**
67
+ * @deprecated Use `space_ids`.
68
+ */
17
69
  location_ids: Array<string>;
70
+ /**
71
+ * Name of the Access Grant. If not provided, the display name will be computed.
72
+ */
18
73
  name: string | null;
19
- pending_mutations: Array<{
74
+ /**
75
+ * List of pending mutations for the access grant. This shows updates that are in progress.
76
+ */
77
+ pending_mutations: Array<
78
+ /**
79
+ * Seam is in the process of updating the devices/spaces associated with this access grant.
80
+ */
81
+ {
82
+ /**
83
+ * Date and time at which the mutation was created.
84
+ */
20
85
  created_at: string;
86
+ /**
87
+ * Previous location configuration.
88
+ */
21
89
  from: {
90
+ /**
91
+ * Previous device IDs where access codes existed.
92
+ */
22
93
  device_ids: Array<string>;
23
94
  };
95
+ /**
96
+ * Detailed description of the mutation.
97
+ */
24
98
  message: string;
99
+ /**
100
+ * Mutation code to indicate that Seam is in the process of updating the spaces (devices) associated with this access grant.
101
+ */
25
102
  mutation_code: 'updating_spaces';
103
+ /**
104
+ * New location configuration.
105
+ */
26
106
  to: {
107
+ /**
108
+ * Common code key to ensure PIN code reuse across devices.
109
+ */
27
110
  common_code_key?: string | null | undefined;
111
+ /**
112
+ * New device IDs where access codes should be created.
113
+ */
28
114
  device_ids: Array<string>;
29
115
  };
30
- } | {
116
+ } /**
117
+ * Seam is in the process of updating the access times for this access grant.
118
+ */ | {
119
+ /**
120
+ * IDs of the access methods being updated.
121
+ */
31
122
  access_method_ids: Array<string>;
123
+ /**
124
+ * Date and time at which the mutation was created.
125
+ */
32
126
  created_at: string;
127
+ /**
128
+ * Previous access time configuration.
129
+ */
33
130
  from: {
131
+ /**
132
+ * Previous end time for access.
133
+ */
34
134
  ends_at: string | null;
135
+ /**
136
+ * Previous start time for access.
137
+ */
35
138
  starts_at: string | null;
36
139
  };
140
+ /**
141
+ * Detailed description of the mutation.
142
+ */
37
143
  message: string;
144
+ /**
145
+ * Mutation code to indicate that Seam is in the process of updating the access times for this access grant.
146
+ */
38
147
  mutation_code: 'updating_access_times';
148
+ /**
149
+ * New access time configuration.
150
+ */
39
151
  to: {
152
+ /**
153
+ * New end time for access.
154
+ */
40
155
  ends_at: string | null;
156
+ /**
157
+ * New start time for access.
158
+ */
41
159
  starts_at: string | null;
42
160
  };
43
161
  }>;
162
+ /**
163
+ * Access methods that the user requested for the Access Grant.
164
+ */
44
165
  requested_access_methods: Array<{
166
+ /**
167
+ * Specific PIN code to use for this access method. Only applicable when mode is 'code'.
168
+ */
45
169
  code?: string | undefined;
170
+ /**
171
+ * IDs of the access methods created for the requested access method.
172
+ */
46
173
  created_access_method_ids: Array<string>;
174
+ /**
175
+ * Date and time at which the requested access method was added to the Access Grant.
176
+ */
47
177
  created_at: string;
178
+ /**
179
+ * Display name of the access method.
180
+ */
48
181
  display_name: string;
182
+ /**
183
+ * Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified.
184
+ */
49
185
  instant_key_max_use_count?: number | undefined;
186
+ /**
187
+ * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
188
+ */
50
189
  mode: 'code' | 'card' | 'mobile_key' | 'cloud_key';
51
190
  }>;
191
+ /**
192
+ * Reservation key for the access grant.
193
+ */
52
194
  reservation_key?: string | undefined;
195
+ /**
196
+ * IDs of the spaces to which the Access Grant gives access.
197
+ */
53
198
  space_ids: Array<string>;
199
+ /**
200
+ * Date and time at which the Access Grant starts.
201
+ */
54
202
  starts_at: string;
203
+ /**
204
+ * ID of user identity to which the Access Grant gives access.
205
+ */
55
206
  user_identity_id: string;
56
- warnings: Array<{
207
+ /**
208
+ * Warnings associated with the [access grant](https://docs.seam.co/use-cases/granting-access).
209
+ */
210
+ warnings: Array<
211
+ /**
212
+ * Indicates that the [access grant](https://docs.seam.co/use-cases/granting-access) is being deleted.
213
+ */
214
+ {
215
+ /**
216
+ * Date and time at which Seam created the warning.
217
+ */
57
218
  created_at: string;
219
+ /**
220
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
221
+ */
58
222
  message: string;
223
+ /**
224
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
225
+ */
59
226
  warning_code: 'being_deleted';
60
- } | {
227
+ } /**
228
+ * Indicates that the access grant should have access to more locations than it currently does. Access methods are being created for the missing locations.
229
+ */ | {
230
+ /**
231
+ * Date and time at which Seam created the warning.
232
+ */
61
233
  created_at: string;
234
+ /**
235
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
236
+ */
62
237
  message: string;
238
+ /**
239
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
240
+ */
63
241
  warning_code: 'underprovisioned_access';
64
- } | {
242
+ } /**
243
+ * Indicates that the access grant has access to locations it should not have. Access methods are being removed from the extra locations.
244
+ */ | {
245
+ /**
246
+ * Date and time at which Seam created the warning.
247
+ */
65
248
  created_at: string;
249
+ /**
250
+ * Devices whose access codes could not be revoked during reconciliation. Present when the provider does not support revoking an offline access code (e.g. Dormakaba oracode with exhausted override budget).
251
+ */
66
252
  failed_devices?: Array<{
253
+ /**
254
+ * Device whose access code could not be revoked.
255
+ */
67
256
  device_id: string;
257
+ /**
258
+ * Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`).
259
+ */
68
260
  error_code: string;
261
+ /**
262
+ * Human-readable description of why revocation failed.
263
+ */
69
264
  message: string;
70
265
  }> | undefined;
266
+ /**
267
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
268
+ */
71
269
  message: string;
270
+ /**
271
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
272
+ */
72
273
  warning_code: 'overprovisioned_access';
73
- } | {
274
+ } /**
275
+ * Indicates that the access times for this [access grant](https://docs.seam.co/use-cases/granting-access) are being updated.
276
+ */ | {
277
+ /**
278
+ * IDs of the access methods being updated.
279
+ */
74
280
  access_method_ids: Array<string>;
281
+ /**
282
+ * Date and time at which Seam created the warning.
283
+ */
75
284
  created_at: string;
285
+ /**
286
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
287
+ */
76
288
  message: string;
289
+ /**
290
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
291
+ */
77
292
  warning_code: 'updating_access_times';
78
- } | {
293
+ } /**
294
+ * Indicates that the requested PIN code was already in use on a device, so a different code was assigned.
295
+ */ | {
296
+ /**
297
+ * Date and time at which Seam created the warning.
298
+ */
79
299
  created_at: string;
300
+ /**
301
+ * ID of the device where the requested code was unavailable.
302
+ */
80
303
  device_id: string;
304
+ /**
305
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
306
+ */
81
307
  message: string;
308
+ /**
309
+ * The new PIN code that was assigned instead.
310
+ */
82
311
  new_code: string;
312
+ /**
313
+ * The originally requested PIN code that was unavailable.
314
+ */
83
315
  original_code: string;
316
+ /**
317
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
318
+ */
84
319
  warning_code: 'requested_code_unavailable';
85
- } | {
320
+ } /**
321
+ * Indicates that a device in the access grant does not support access codes and was excluded from code materialization.
322
+ */ | {
323
+ /**
324
+ * Date and time at which Seam created the warning.
325
+ */
86
326
  created_at: string;
327
+ /**
328
+ * ID of the device that does not support access codes.
329
+ */
87
330
  device_id: string;
331
+ /**
332
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
333
+ */
88
334
  message: string;
335
+ /**
336
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
337
+ */
89
338
  warning_code: 'device_does_not_support_access_codes';
90
- } | {
339
+ } /**
340
+ * Indicates that a device in the access grant cannot program an access code for the grant's time range because of device-specific time constraints.
341
+ */ | {
342
+ /**
343
+ * Date and time at which Seam created the warning.
344
+ */
91
345
  created_at: string;
346
+ /**
347
+ * ID of the device whose time constraints the access grant violates.
348
+ */
92
349
  device_id: string;
350
+ /**
351
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
352
+ */
93
353
  message: string;
354
+ /**
355
+ * Specific reason why the grant's times are not programmable on the device.
356
+ */
94
357
  reason: 'duration_exceeds_max' | 'times_do_not_match_slots' | 'ongoing_not_supported';
358
+ /**
359
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
360
+ */
95
361
  warning_code: 'device_time_constraints_violated';
96
362
  }>;
363
+ /**
364
+ * ID of the Seam workspace associated with the Access Grant.
365
+ */
97
366
  workspace_id: string;
98
367
  };
@@ -1,73 +1,269 @@
1
+ /**
2
+ * Represents an access method for an Access Grant. Access methods describe the modes of access, such as PIN codes, plastic cards, and mobile keys. For a mobile key, the access method also stores the URL for the associated Instant Key.
3
+ */
1
4
  export type AccessMethod = {
5
+ /**
6
+ * ID of the access method.
7
+ */
2
8
  access_method_id: string;
9
+ /**
10
+ * Token of the client session associated with the access method.
11
+ */
3
12
  client_session_token?: string | undefined;
13
+ /**
14
+ * The actual PIN code for code access methods.
15
+ */
4
16
  code?: string | null | undefined;
17
+ /**
18
+ * Date and time at which the access method was created.
19
+ */
5
20
  created_at: string;
21
+ /**
22
+ * ID of the customization profile associated with the access method.
23
+ */
6
24
  customization_profile_id?: string | undefined;
25
+ /**
26
+ * Display name of the access method.
27
+ */
7
28
  display_name: string;
8
- errors: Array<{
29
+ /**
30
+ * Errors associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).
31
+ */
32
+ errors: Array<
33
+ /**
34
+ * Indicates that Seam was unable to issue this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access method is eventually issued.
35
+ */
36
+ {
37
+ /**
38
+ * Date and time at which Seam created the error.
39
+ */
9
40
  created_at: string;
41
+ /**
42
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
43
+ */
10
44
  error_code: 'failed_to_issue';
45
+ /**
46
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
47
+ */
11
48
  message: string;
12
49
  }>;
50
+ /**
51
+ * URL of the Instant Key for mobile key access methods.
52
+ */
13
53
  instant_key_url?: string | undefined;
54
+ /**
55
+ * Indicates whether an existing card credential must be assigned to this access method before it can be issued. Only applies to card-mode access methods on systems that support credential assignment.
56
+ */
14
57
  is_assignment_required?: boolean | undefined;
58
+ /**
59
+ * Indicates whether encoding with an card encoder is required to issue or reissue the plastic card associated with the access method.
60
+ */
15
61
  is_encoding_required?: boolean | undefined;
62
+ /**
63
+ * Indicates whether the access method has been issued.
64
+ */
16
65
  is_issued: boolean;
66
+ /**
67
+ * Indicates whether the access method is ready for card assignment. This is true when the access method is in card mode, has not yet been issued, and the system supports credential assignment.
68
+ */
17
69
  is_ready_for_assignment?: boolean | undefined;
70
+ /**
71
+ * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.
72
+ */
18
73
  is_ready_for_encoding?: boolean | undefined;
74
+ /**
75
+ * Date and time at which the access method was issued.
76
+ */
19
77
  issued_at: string | null;
78
+ /**
79
+ * Access method mode. Supported values: `code`, `card`, `mobile_key`, `cloud_key`.
80
+ */
20
81
  mode: 'code' | 'card' | 'mobile_key' | 'cloud_key';
21
- pending_mutations: Array<{
82
+ /**
83
+ * Pending mutations for the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant). Indicates operations that are in progress.
84
+ */
85
+ pending_mutations: Array<
86
+ /**
87
+ * Seam is in the process of provisioning access for this access method on new devices.
88
+ */
89
+ {
90
+ /**
91
+ * Date and time at which the mutation was created.
92
+ */
22
93
  created_at: string;
94
+ /**
95
+ * Previous device configuration.
96
+ */
23
97
  from: {
98
+ /**
99
+ * Previous device IDs where access was provisioned.
100
+ */
24
101
  device_ids: Array<string>;
25
102
  };
103
+ /**
104
+ * Detailed description of the mutation.
105
+ */
26
106
  message: string;
107
+ /**
108
+ * Mutation code to indicate that Seam is in the process of provisioning access for this access method on new devices.
109
+ */
27
110
  mutation_code: 'provisioning_access';
111
+ /**
112
+ * New device configuration.
113
+ */
28
114
  to: {
115
+ /**
116
+ * New device IDs where access is being provisioned.
117
+ */
29
118
  device_ids: Array<string>;
30
119
  };
31
- } | {
120
+ } /**
121
+ * Seam is in the process of revoking access for this access method from devices.
122
+ */ | {
123
+ /**
124
+ * Date and time at which the mutation was created.
125
+ */
32
126
  created_at: string;
127
+ /**
128
+ * Previous device configuration.
129
+ */
33
130
  from: {
131
+ /**
132
+ * Previous device IDs where access existed.
133
+ */
34
134
  device_ids: Array<string>;
35
135
  };
136
+ /**
137
+ * Detailed description of the mutation.
138
+ */
36
139
  message: string;
140
+ /**
141
+ * Mutation code to indicate that Seam is in the process of revoking access for this access method from devices.
142
+ */
37
143
  mutation_code: 'revoking_access';
144
+ /**
145
+ * New device configuration.
146
+ */
38
147
  to: {
148
+ /**
149
+ * New device IDs where access should remain.
150
+ */
39
151
  device_ids: Array<string>;
40
152
  };
41
- } | {
153
+ } /**
154
+ * Seam is in the process of updating the access times for this access method.
155
+ */ | {
156
+ /**
157
+ * Date and time at which the mutation was created.
158
+ */
42
159
  created_at: string;
160
+ /**
161
+ * Previous access time configuration.
162
+ */
43
163
  from: {
164
+ /**
165
+ * Previous end time for access.
166
+ */
44
167
  ends_at: string | null;
168
+ /**
169
+ * Previous start time for access.
170
+ */
45
171
  starts_at: string | null;
46
172
  };
173
+ /**
174
+ * Detailed description of the mutation.
175
+ */
47
176
  message: string;
177
+ /**
178
+ * Mutation code to indicate that Seam is in the process of updating the access times for this access method.
179
+ */
48
180
  mutation_code: 'updating_access_times';
181
+ /**
182
+ * New access time configuration.
183
+ */
49
184
  to: {
185
+ /**
186
+ * New end time for access.
187
+ */
50
188
  ends_at: string | null;
189
+ /**
190
+ * New start time for access.
191
+ */
51
192
  starts_at: string | null;
52
193
  };
53
194
  }>;
54
- warnings: Array<{
195
+ /**
196
+ * Warnings associated with the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant).
197
+ */
198
+ warnings: Array<
199
+ /**
200
+ * Indicates that the [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) is being deleted.
201
+ */
202
+ {
203
+ /**
204
+ * Date and time at which Seam created the warning.
205
+ */
55
206
  created_at: string;
207
+ /**
208
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
209
+ */
56
210
  message: string;
211
+ /**
212
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
213
+ */
57
214
  warning_code: 'being_deleted';
58
- } | {
215
+ } /**
216
+ * Indicates that the access times for this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant) are being updated.
217
+ */ | {
218
+ /**
219
+ * Date and time at which Seam created the warning.
220
+ */
59
221
  created_at: string;
222
+ /**
223
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
224
+ */
60
225
  message: string;
226
+ /**
227
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
228
+ */
61
229
  warning_code: 'updating_access_times';
62
- } | {
230
+ } /**
231
+ * Indicates that all attempts to create an access code on this device before the start time failed and a backup access code was used to ensure access was provided in time.
232
+ */ | {
233
+ /**
234
+ * Date and time at which Seam created the warning.
235
+ */
63
236
  created_at: string;
237
+ /**
238
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
239
+ */
64
240
  message: string;
241
+ /**
242
+ * ID of the original access method from which this backup access method was split, if applicable.
243
+ */
65
244
  original_access_method_id?: string | undefined;
245
+ /**
246
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
247
+ */
66
248
  warning_code: 'pulled_backup_access_code';
67
- } | {
249
+ } /**
250
+ * Indicates that Seam has not yet issued this [access method](https://docs.seam.co/use-cases/granting-access/creating-an-access-grant), even though its access grant is about to begin, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds.
251
+ */ | {
252
+ /**
253
+ * Date and time at which Seam created the warning.
254
+ */
68
255
  created_at: string;
256
+ /**
257
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
258
+ */
69
259
  message: string;
260
+ /**
261
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
262
+ */
70
263
  warning_code: 'delay_in_issuing';
71
264
  }>;
265
+ /**
266
+ * ID of the Seam workspace associated with the access method.
267
+ */
72
268
  workspace_id: string;
73
269
  };