@seamapi/http 2.4.0 → 2.4.2

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 (181) hide show
  1. package/lib/error-interceptor.js +1 -1
  2. package/lib/request-parameters.d.ts +2 -0
  3. package/lib/request-parameters.js +17 -0
  4. package/lib/request-parameters.js.map +1 -0
  5. package/lib/resources/access-code.d.ts +13 -9
  6. package/lib/resources/acs-credential.d.ts +33 -1
  7. package/lib/resources/acs-entrance.d.ts +1 -1
  8. package/lib/resources/acs-system.d.ts +30 -0
  9. package/lib/resources/action-attempt.d.ts +82 -11
  10. package/lib/resources/device-provider.d.ts +1 -1
  11. package/lib/resources/device.d.ts +63 -18
  12. package/lib/resources/event.d.ts +0 -76
  13. package/lib/resources/unmanaged-access-code.d.ts +13 -9
  14. package/lib/resources/unmanaged-device.d.ts +28 -16
  15. package/lib/routes/access-codes/access-codes.d.ts +8 -35
  16. package/lib/routes/access-codes/access-codes.js +17 -6
  17. package/lib/routes/access-codes/access-codes.js.map +1 -1
  18. package/lib/routes/access-codes/simulate/simulate.js +2 -0
  19. package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
  20. package/lib/routes/access-codes/unmanaged/unmanaged.d.ts +5 -4
  21. package/lib/routes/access-codes/unmanaged/unmanaged.js +12 -6
  22. package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
  23. package/lib/routes/access-grants/access-grants.d.ts +20 -19
  24. package/lib/routes/access-grants/access-grants.js +10 -2
  25. package/lib/routes/access-grants/access-grants.js.map +1 -1
  26. package/lib/routes/access-grants/unmanaged/unmanaged.d.ts +1 -1
  27. package/lib/routes/access-grants/unmanaged/unmanaged.js +8 -4
  28. package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
  29. package/lib/routes/access-methods/access-methods.d.ts +8 -7
  30. package/lib/routes/access-methods/access-methods.js +12 -4
  31. package/lib/routes/access-methods/access-methods.js.map +1 -1
  32. package/lib/routes/access-methods/unmanaged/unmanaged.js +7 -4
  33. package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
  34. package/lib/routes/acs/access-groups/access-groups.js +20 -12
  35. package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
  36. package/lib/routes/acs/credentials/credentials.d.ts +1 -1
  37. package/lib/routes/acs/credentials/credentials.js +15 -6
  38. package/lib/routes/acs/credentials/credentials.js.map +1 -1
  39. package/lib/routes/acs/encoders/encoders.d.ts +1 -1
  40. package/lib/routes/acs/encoders/encoders.js +10 -4
  41. package/lib/routes/acs/encoders/encoders.js.map +1 -1
  42. package/lib/routes/acs/encoders/simulate/simulate.js +5 -0
  43. package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
  44. package/lib/routes/acs/entrances/entrances.d.ts +2 -2
  45. package/lib/routes/acs/entrances/entrances.js +8 -2
  46. package/lib/routes/acs/entrances/entrances.js.map +1 -1
  47. package/lib/routes/acs/systems/systems.js +11 -6
  48. package/lib/routes/acs/systems/systems.js.map +1 -1
  49. package/lib/routes/acs/users/users.d.ts +25 -24
  50. package/lib/routes/acs/users/users.js +22 -10
  51. package/lib/routes/acs/users/users.js.map +1 -1
  52. package/lib/routes/action-attempts/action-attempts.d.ts +1 -1
  53. package/lib/routes/action-attempts/action-attempts.js +5 -2
  54. package/lib/routes/action-attempts/action-attempts.js.map +1 -1
  55. package/lib/routes/client-sessions/client-sessions.d.ts +4 -3
  56. package/lib/routes/client-sessions/client-sessions.js +14 -6
  57. package/lib/routes/client-sessions/client-sessions.js.map +1 -1
  58. package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
  59. package/lib/routes/connect-webviews/connect-webviews.js +9 -4
  60. package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
  61. package/lib/routes/connected-accounts/connected-accounts.d.ts +5 -4
  62. package/lib/routes/connected-accounts/connected-accounts.js +8 -2
  63. package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
  64. package/lib/routes/connected-accounts/simulate/simulate.js +2 -0
  65. package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
  66. package/lib/routes/customers/customers.d.ts +9 -9
  67. package/lib/routes/customers/customers.js +4 -0
  68. package/lib/routes/customers/customers.js.map +1 -1
  69. package/lib/routes/devices/devices.d.ts +11 -10
  70. package/lib/routes/devices/devices.js +10 -4
  71. package/lib/routes/devices/devices.js.map +1 -1
  72. package/lib/routes/devices/simulate/simulate.js +7 -0
  73. package/lib/routes/devices/simulate/simulate.js.map +1 -1
  74. package/lib/routes/devices/unmanaged/unmanaged.d.ts +8 -23
  75. package/lib/routes/devices/unmanaged/unmanaged.js +6 -2
  76. package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
  77. package/lib/routes/events/events.d.ts +8 -7
  78. package/lib/routes/events/events.js +5 -2
  79. package/lib/routes/events/events.js.map +1 -1
  80. package/lib/routes/instant-keys/instant-keys.d.ts +4 -3
  81. package/lib/routes/instant-keys/instant-keys.js +10 -6
  82. package/lib/routes/instant-keys/instant-keys.js.map +1 -1
  83. package/lib/routes/locks/locks.d.ts +7 -46
  84. package/lib/routes/locks/locks.js +8 -2
  85. package/lib/routes/locks/locks.js.map +1 -1
  86. package/lib/routes/locks/simulate/simulate.js +3 -0
  87. package/lib/routes/locks/simulate/simulate.js.map +1 -1
  88. package/lib/routes/noise-sensors/noise-sensors.d.ts +0 -40
  89. package/lib/routes/noise-sensors/noise-sensors.js +2 -0
  90. package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
  91. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +12 -6
  92. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
  93. package/lib/routes/noise-sensors/simulate/simulate.js +2 -0
  94. package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
  95. package/lib/routes/phones/phones.js +10 -6
  96. package/lib/routes/phones/phones.js.map +1 -1
  97. package/lib/routes/phones/simulate/simulate.js +2 -0
  98. package/lib/routes/phones/simulate/simulate.js.map +1 -1
  99. package/lib/routes/seam-http-endpoints.d.ts +26 -26
  100. package/lib/routes/spaces/spaces.d.ts +16 -15
  101. package/lib/routes/spaces/spaces.js +19 -6
  102. package/lib/routes/spaces/spaces.js.map +1 -1
  103. package/lib/routes/thermostats/daily-programs/daily-programs.js +6 -2
  104. package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  105. package/lib/routes/thermostats/schedules/schedules.d.ts +2 -2
  106. package/lib/routes/thermostats/schedules/schedules.js +12 -6
  107. package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
  108. package/lib/routes/thermostats/simulate/simulate.js +3 -0
  109. package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
  110. package/lib/routes/thermostats/thermostats.d.ts +13 -53
  111. package/lib/routes/thermostats/thermostats.js +17 -2
  112. package/lib/routes/thermostats/thermostats.js.map +1 -1
  113. package/lib/routes/user-identities/unmanaged/unmanaged.d.ts +1 -1
  114. package/lib/routes/user-identities/unmanaged/unmanaged.js +8 -4
  115. package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
  116. package/lib/routes/user-identities/user-identities.d.ts +13 -12
  117. package/lib/routes/user-identities/user-identities.js +29 -14
  118. package/lib/routes/user-identities/user-identities.js.map +1 -1
  119. package/lib/routes/webhooks/webhooks.js +10 -4
  120. package/lib/routes/webhooks/webhooks.js.map +1 -1
  121. package/lib/routes/workspaces/workspaces.d.ts +9 -9
  122. package/lib/routes/workspaces/workspaces.js +6 -0
  123. package/lib/routes/workspaces/workspaces.js.map +1 -1
  124. package/lib/version.d.ts +1 -1
  125. package/lib/version.js +1 -1
  126. package/package.json +3 -3
  127. package/src/lib/error-interceptor.ts +1 -1
  128. package/src/lib/request-parameters.ts +33 -0
  129. package/src/lib/resources/access-code.ts +15 -9
  130. package/src/lib/resources/acs-credential.ts +40 -0
  131. package/src/lib/resources/acs-entrance.ts +1 -1
  132. package/src/lib/resources/acs-system.ts +36 -0
  133. package/src/lib/resources/action-attempt.ts +91 -6
  134. package/src/lib/resources/device-provider.ts +1 -0
  135. package/src/lib/resources/device.ts +70 -20
  136. package/src/lib/resources/event.ts +0 -76
  137. package/src/lib/resources/unmanaged-access-code.ts +15 -9
  138. package/src/lib/resources/unmanaged-device.ts +33 -18
  139. package/src/lib/routes/access-codes/access-codes.ts +57 -41
  140. package/src/lib/routes/access-codes/simulate/simulate.ts +7 -0
  141. package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +44 -10
  142. package/src/lib/routes/access-grants/access-grants.ts +43 -21
  143. package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +24 -5
  144. package/src/lib/routes/access-methods/access-methods.ts +41 -11
  145. package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +17 -4
  146. package/src/lib/routes/acs/access-groups/access-groups.ts +43 -12
  147. package/src/lib/routes/acs/credentials/credentials.ts +28 -7
  148. package/src/lib/routes/acs/encoders/encoders.ts +28 -5
  149. package/src/lib/routes/acs/encoders/simulate/simulate.ts +25 -0
  150. package/src/lib/routes/acs/entrances/entrances.ts +23 -4
  151. package/src/lib/routes/acs/systems/systems.ts +23 -6
  152. package/src/lib/routes/acs/users/users.ts +76 -33
  153. package/src/lib/routes/action-attempts/action-attempts.ts +8 -3
  154. package/src/lib/routes/client-sessions/client-sessions.ts +35 -9
  155. package/src/lib/routes/connect-webviews/connect-webviews.ts +15 -5
  156. package/src/lib/routes/connected-accounts/connected-accounts.ts +20 -6
  157. package/src/lib/routes/connected-accounts/simulate/simulate.ts +7 -0
  158. package/src/lib/routes/customers/customers.ts +16 -9
  159. package/src/lib/routes/devices/devices.ts +36 -11
  160. package/src/lib/routes/devices/simulate/simulate.ts +29 -0
  161. package/src/lib/routes/devices/unmanaged/unmanaged.ts +19 -22
  162. package/src/lib/routes/events/events.ts +17 -9
  163. package/src/lib/routes/instant-keys/instant-keys.ts +19 -9
  164. package/src/lib/routes/locks/locks.ts +22 -45
  165. package/src/lib/routes/locks/simulate/simulate.ts +13 -0
  166. package/src/lib/routes/noise-sensors/noise-sensors.ts +3 -40
  167. package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +37 -6
  168. package/src/lib/routes/noise-sensors/simulate/simulate.ts +7 -0
  169. package/src/lib/routes/phones/phones.ts +13 -6
  170. package/src/lib/routes/phones/simulate/simulate.ts +7 -0
  171. package/src/lib/routes/seam-http-endpoints.ts +26 -26
  172. package/src/lib/routes/spaces/spaces.ts +61 -21
  173. package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +21 -2
  174. package/src/lib/routes/thermostats/schedules/schedules.ts +35 -8
  175. package/src/lib/routes/thermostats/simulate/simulate.ts +13 -0
  176. package/src/lib/routes/thermostats/thermostats.ts +72 -55
  177. package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +24 -5
  178. package/src/lib/routes/user-identities/user-identities.ts +94 -26
  179. package/src/lib/routes/webhooks/webhooks.ts +15 -4
  180. package/src/lib/routes/workspaces/workspaces.ts +20 -9
  181. package/src/lib/version.ts +1 -1
@@ -46,7 +46,7 @@ export type WorkspacesCreateParameters = {
46
46
  * Connect partner name for the new workspace.
47
47
  * @deprecated Use `company_name` instead.
48
48
  */
49
- connect_partner_name?: string | undefined;
49
+ connect_partner_name?: string | null | undefined;
50
50
  /**
51
51
  * [Connect Webview](https://docs.seam.co/core-concepts/connect-webviews) customizations for the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
52
52
  */
@@ -54,19 +54,19 @@ export type WorkspacesCreateParameters = {
54
54
  /**
55
55
  * Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
56
56
  */
57
- logo_shape?: 'circle' | 'square' | undefined;
57
+ logo_shape?: 'circle' | 'square' | null | undefined;
58
58
  /**
59
59
  * Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
60
60
  */
61
- primary_button_color?: string | undefined;
61
+ primary_button_color?: string | null | undefined;
62
62
  /**
63
63
  * Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
64
64
  */
65
- primary_button_text_color?: string | undefined;
65
+ primary_button_text_color?: string | null | undefined;
66
66
  /**
67
67
  * Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the new workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
68
68
  */
69
- success_message?: string | undefined;
69
+ success_message?: string | null | undefined;
70
70
  } | undefined;
71
71
  /**
72
72
  * Indicates whether the new workspace is a [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces).
@@ -147,19 +147,19 @@ export type WorkspacesUpdateParameters = {
147
147
  /**
148
148
  * Logo shape for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
149
149
  */
150
- logo_shape?: 'circle' | 'square' | undefined;
150
+ logo_shape?: 'circle' | 'square' | null | undefined;
151
151
  /**
152
152
  * Primary button color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
153
153
  */
154
- primary_button_color?: string | undefined;
154
+ primary_button_color?: string | null | undefined;
155
155
  /**
156
156
  * Primary button text color for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
157
157
  */
158
- primary_button_text_color?: string | undefined;
158
+ primary_button_text_color?: string | null | undefined;
159
159
  /**
160
160
  * Success message for [Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews) in the workspace. See also [Customize the Look and Feel of Your Connect Webviews](https://docs.seam.co/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-look-and-feel-of-your-connect-webviews).
161
161
  */
162
- success_message?: string | undefined;
162
+ success_message?: string | null | undefined;
163
163
  } | undefined;
164
164
  /**
165
165
  * Indicates whether publishable key authentication is enabled for this workspace.
@@ -6,6 +6,7 @@ import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, }
6
6
  import { createClient } from '../../client.js';
7
7
  import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../options.js';
8
8
  import { limitToSeamHttpRequestOptions, parseOptions, } from '../../parse-options.js';
9
+ import { assertValidRequestParameters } from '../../request-parameters.js';
9
10
  import { SeamHttpActionAttempts } from '../../routes/action-attempts/index.js';
10
11
  import { SeamHttpClientSessions } from '../../routes/client-sessions/index.js';
11
12
  import { SeamHttpRequest } from '../../seam-http-request.js';
@@ -87,6 +88,7 @@ export class SeamHttpWorkspaces {
87
88
  * Creates a new [workspace](https://docs.seam.co/core-concepts/workspaces).
88
89
  */
89
90
  create(parameters, options = {}) {
91
+ assertValidRequestParameters(parameters, '/workspaces/create', true);
90
92
  return new SeamHttpRequest(this, {
91
93
  pathname: '/workspaces/create',
92
94
  method: 'POST',
@@ -99,6 +101,7 @@ export class SeamHttpWorkspaces {
99
101
  * Returns the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value.
100
102
  */
101
103
  get(parameters, options = {}) {
104
+ assertValidRequestParameters(parameters, '/workspaces/get', false);
102
105
  return new SeamHttpRequest(this, {
103
106
  pathname: '/workspaces/get',
104
107
  method: 'GET',
@@ -111,6 +114,7 @@ export class SeamHttpWorkspaces {
111
114
  * Returns a list of [workspaces](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value.
112
115
  */
113
116
  list(parameters, options = {}) {
117
+ assertValidRequestParameters(parameters, '/workspaces/list', false);
114
118
  return new SeamHttpRequest(this, {
115
119
  pathname: '/workspaces/list',
116
120
  method: 'GET',
@@ -123,6 +127,7 @@ export class SeamHttpWorkspaces {
123
127
  * Resets the [sandbox workspace](https://docs.seam.co/core-concepts/workspaces#sandbox-workspaces) associated with the authentication value. Note that this endpoint is only available for sandbox workspaces.
124
128
  */
125
129
  resetSandbox(parameters, options = {}) {
130
+ assertValidRequestParameters(parameters, '/workspaces/reset_sandbox', false);
126
131
  return new SeamHttpRequest(this, {
127
132
  pathname: '/workspaces/reset_sandbox',
128
133
  method: 'POST',
@@ -139,6 +144,7 @@ export class SeamHttpWorkspaces {
139
144
  * Updates the [workspace](https://docs.seam.co/core-concepts/workspaces) associated with the authentication value.
140
145
  */
141
146
  update(parameters, options = {}) {
147
+ assertValidRequestParameters(parameters, '/workspaces/update', false);
142
148
  return new SeamHttpRequest(this, {
143
149
  pathname: '/workspaces/update',
144
150
  method: 'PATCH',
@@ -1 +1 @@
1
- {"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../../src/lib/routes/workspaces/workspaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EAAe,YAAY,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC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AI,EAAE;YAC/B,QAAQ,EAAE,kBAAkB;YAC5B,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,UAAU;YAClB,WAAW,EAAE,YAAY;YACzB,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED;;OAEG;IACH,YAAY,CACV,UAA6C,EAC7C,UAAyC,EAAE;QAE3C,4BAA4B,CAAC,UAAU,EAAE,2BAA2B,EAAE,KAAK,CAAC,CAAA;QAE5E,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,QAAQ,EAAE,2BAA2B;YACrC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,gBAAgB;YAC7B,OAAO;YACP,cAAc,EAAE,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE;gBAC7D,GAAG,IAAI,CAAC,QAAQ;gBAChB,oBAAoB,EAAE,KAAK;aAC5B,CAAC;SACH,CAAC,CAAA;IACJ,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,UAAuC,EACvC,UAAmC,EAAE;QAErC,4BAA4B,CAAC,UAAU,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAA;QAErE,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,QAAQ,EAAE,oBAAoB;YAC9B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,UAAU;YAChB,WAAW,EAAE,SAAS;YACtB,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;CACF"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiJavascriptHttpVersion = "2.4.0";
1
+ declare const seamapiJavascriptHttpVersion = "2.4.2";
2
2
  export default seamapiJavascriptHttpVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.4.0';
1
+ const seamapiJavascriptHttpVersion = '2.4.2';
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.4.0",
3
+ "version": "2.4.2",
4
4
  "description": "JavaScript HTTP client for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -84,10 +84,10 @@
84
84
  "axios-retry": "^4.4.2"
85
85
  },
86
86
  "devDependencies": {
87
- "@seamapi/blueprint": "^1.1.0",
87
+ "@seamapi/blueprint": "^1.5.1",
88
88
  "@seamapi/fake-seam-connect": "^1.77.0",
89
89
  "@seamapi/smith": "^1.1.0",
90
- "@seamapi/types": "1.983.0",
90
+ "@seamapi/types": "1.1001.0",
91
91
  "@types/jsonwebtoken": "^9.0.6",
92
92
  "@types/node": "^24.10.9",
93
93
  "ava": "^8.0.1",
@@ -39,7 +39,7 @@ const isApiErrorResponse = (
39
39
 
40
40
  if (headers == null) return false
41
41
 
42
- const contentType = headers['Content-Type']
42
+ const contentType = headers['content-type']
43
43
  if (
44
44
  typeof contentType === 'string' &&
45
45
  !contentType.startsWith('application/json')
@@ -0,0 +1,33 @@
1
+ export type RequireAtLeastOne<
2
+ T,
3
+ Keys extends keyof T = keyof T,
4
+ > = Keys extends keyof T
5
+ ? Required<Pick<T, Keys>> & Partial<Omit<T, Keys>>
6
+ : never
7
+
8
+ export const assertValidRequestParameters = (
9
+ parameters: unknown,
10
+ path: string,
11
+ hasRequiredParameters: boolean,
12
+ ): void => {
13
+ if (parameters === undefined) {
14
+ if (hasRequiredParameters) {
15
+ throw new TypeError(`Parameters are required for ${path}`)
16
+ }
17
+ return
18
+ }
19
+
20
+ if (
21
+ parameters === null ||
22
+ typeof parameters !== 'object' ||
23
+ Array.isArray(parameters)
24
+ ) {
25
+ throw new TypeError(`Parameters for ${path} must be an object`)
26
+ }
27
+
28
+ if (hasRequiredParameters && Object.keys(parameters).length === 0) {
29
+ throw new TypeError(
30
+ `Parameters for ${path} must contain at least one property`,
31
+ )
32
+ }
33
+ }
@@ -275,29 +275,35 @@ export type AccessCode = {
275
275
  */
276
276
  message: string
277
277
  } /**
278
- * Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN.
278
+ * Indicates that the account is disconnected.
279
279
  */
280
280
  | {
281
281
  /**
282
282
  * Date and time at which Seam created the error.
283
283
  */
284
- created_at?: string | undefined
284
+ created_at: string
285
+
285
286
  /**
286
287
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
287
288
  */
288
- error_code: 'insufficient_permissions'
289
+ error_code: 'account_disconnected'
289
290
 
290
291
  /**
291
- * Indicates that this is an access code error.
292
+ * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
292
293
  */
293
- is_access_code_error: boolean
294
+ is_connected_account_error: boolean
295
+
296
+ /**
297
+ * Indicates that the error is not a device error.
298
+ */
299
+ is_device_error: boolean
294
300
 
295
301
  /**
296
302
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
297
303
  */
298
304
  message: string
299
305
  } /**
300
- * Indicates that the account is disconnected.
306
+ * Indicates that the Salto site user limit has been reached.
301
307
  */
302
308
  | {
303
309
  /**
@@ -308,7 +314,7 @@ export type AccessCode = {
308
314
  /**
309
315
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
310
316
  */
311
- error_code: 'account_disconnected'
317
+ error_code: 'salto_ks_subscription_limit_exceeded'
312
318
 
313
319
  /**
314
320
  * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
@@ -325,7 +331,7 @@ export type AccessCode = {
325
331
  */
326
332
  message: string
327
333
  } /**
328
- * Indicates that the Salto site user limit has been reached.
334
+ * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
329
335
  */
330
336
  | {
331
337
  /**
@@ -336,7 +342,7 @@ export type AccessCode = {
336
342
  /**
337
343
  * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
338
344
  */
339
- error_code: 'salto_ks_subscription_limit_exceeded'
345
+ error_code: 'insufficient_permissions'
340
346
 
341
347
  /**
342
348
  * Indicates that the error is a [connected account](https://docs.seam.co/api/connected_accounts) error.
@@ -36,6 +36,17 @@ export type AcsCredential = {
36
36
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
37
37
  */
38
38
  acs_user_id?: string | undefined
39
+ /**
40
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
41
+ */
42
+ akiles_metadata?:
43
+ | {
44
+ /**
45
+ * ID of the Akiles member PIN.
46
+ */
47
+ member_pin_id?: string | undefined
48
+ }
49
+ | undefined
39
50
  /**
40
51
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
41
52
  */
@@ -125,6 +136,7 @@ export type AcsCredential = {
125
136
  | 'salto_ks_tag'
126
137
  | 'avigilon_alta_credential'
127
138
  | 'kisi_credential'
139
+ | 'akiles_credential'
128
140
  | undefined
129
141
  /**
130
142
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
@@ -322,6 +334,34 @@ export type AcsCredential = {
322
334
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
323
335
  */
324
336
  warning_code: 'needs_to_be_reissued'
337
+ } /**
338
+ * Indicates that the requested PIN code could not be used, so the access system assigned a different code. Give the guest the assigned code.
339
+ */
340
+ | {
341
+ /**
342
+ * Date and time at which Seam created the warning.
343
+ */
344
+ created_at: string
345
+
346
+ /**
347
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
348
+ */
349
+ message: string
350
+
351
+ /**
352
+ * The PIN code that was assigned instead.
353
+ */
354
+ new_code: string
355
+
356
+ /**
357
+ * The originally requested PIN code that could not be used.
358
+ */
359
+ original_code: string
360
+
361
+ /**
362
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
363
+ */
364
+ warning_code: 'requested_code_unavailable'
325
365
  }
326
366
  >
327
367
 
@@ -429,7 +429,7 @@ export type AcsEntrance = {
429
429
  */
430
430
  warning_code: 'entrance_setup_required'
431
431
  } /**
432
- * deprecated: Use `privacy_mode` instead. Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.
432
+ * Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.
433
433
  */
434
434
  | {
435
435
  /**
@@ -125,6 +125,24 @@ export type AcsSystem = {
125
125
  */
126
126
  error_code: 'salto_ks_subscription_limit_exceeded'
127
127
 
128
+ /**
129
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
130
+ */
131
+ message: string
132
+ } /**
133
+ * Indicates that Seam's integration user does not have sufficient permissions on the provider's system backing this [access control system](https://docs.seam.co/low-level-apis/access-systems). Access cannot be managed until permissions are restored. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
134
+ */
135
+ | {
136
+ /**
137
+ * Date and time at which Seam created the error.
138
+ */
139
+ created_at: string
140
+
141
+ /**
142
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
143
+ */
144
+ error_code: 'insufficient_permissions'
145
+
128
146
  /**
129
147
  * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
130
148
  */
@@ -367,6 +385,24 @@ export type AcsSystem = {
367
385
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
368
386
  */
369
387
  warning_code: 'setup_required'
388
+ } /**
389
+ * Indicates that Seam encountered an unexpected error while syncing this [access control system](https://docs.seam.co/low-level-apis/access-systems), so its users, credentials, and access groups may be out of date. Seam retries on every sync cycle and clears this warning once a sync succeeds; if it persists, contact [support](mailto:support@seam.co).
390
+ */
391
+ | {
392
+ /**
393
+ * Date and time at which Seam created the warning.
394
+ */
395
+ created_at: string
396
+
397
+ /**
398
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
399
+ */
400
+ message: string
401
+
402
+ /**
403
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
404
+ */
405
+ warning_code: 'unknown_issue_with_acs_system'
370
406
  }
371
407
  >
372
408
 
@@ -223,6 +223,17 @@ export type ActionAttempt =
223
223
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
224
224
  */
225
225
  acs_user_id?: string | undefined
226
+ /**
227
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
228
+ */
229
+ akiles_metadata?:
230
+ | {
231
+ /**
232
+ * ID of the Akiles member PIN.
233
+ */
234
+ member_pin_id?: string | undefined
235
+ }
236
+ | undefined
226
237
  /**
227
238
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
228
239
  */
@@ -312,6 +323,7 @@ export type ActionAttempt =
312
323
  | 'salto_ks_tag'
313
324
  | 'avigilon_alta_credential'
314
325
  | 'kisi_credential'
326
+ | 'akiles_credential'
315
327
  | undefined
316
328
  /**
317
329
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
@@ -421,14 +433,23 @@ export type ActionAttempt =
421
433
  | 'being_deleted'
422
434
  | 'unknown_issue_with_acs_credential'
423
435
  | 'needs_to_be_reissued'
436
+ | 'requested_code_unavailable'
437
+
438
+ /**
439
+ * The PIN code that was assigned instead.
440
+ */
441
+ new_code?: string | undefined
442
+ /**
443
+ * The originally requested PIN code that could not be used.
444
+ */
445
+ original_code?: string | undefined
424
446
  }>
425
447
 
426
448
  /**
427
449
  * ID of the workspace that contains the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
428
450
  */
429
451
  workspace_id: string
430
- }
431
-
452
+ } | null
432
453
  /**
433
454
  * Warnings related to scanning the credential, such as mismatches between the credential data currently encoded on the card and the corresponding data stored on Seam and the access system.
434
455
  */
@@ -509,6 +530,17 @@ export type ActionAttempt =
509
530
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
510
531
  */
511
532
  acs_user_id?: string | undefined
533
+ /**
534
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
535
+ */
536
+ akiles_metadata?:
537
+ | {
538
+ /**
539
+ * ID of the Akiles member PIN.
540
+ */
541
+ member_pin_id?: string | undefined
542
+ }
543
+ | undefined
512
544
  /**
513
545
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
514
546
  */
@@ -598,6 +630,7 @@ export type ActionAttempt =
598
630
  | 'salto_ks_tag'
599
631
  | 'avigilon_alta_credential'
600
632
  | 'kisi_credential'
633
+ | 'akiles_credential'
601
634
  | undefined
602
635
  /**
603
636
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
@@ -706,6 +739,16 @@ export type ActionAttempt =
706
739
  | 'being_deleted'
707
740
  | 'unknown_issue_with_acs_credential'
708
741
  | 'needs_to_be_reissued'
742
+ | 'requested_code_unavailable'
743
+
744
+ /**
745
+ * The PIN code that was assigned instead.
746
+ */
747
+ new_code?: string | undefined
748
+ /**
749
+ * The originally requested PIN code that could not be used.
750
+ */
751
+ original_code?: string | undefined
709
752
  }>
710
753
 
711
754
  /**
@@ -769,6 +812,17 @@ export type ActionAttempt =
769
812
  * ID of the [ACS user](https://docs.seam.co/low-level-apis/access-systems/user-management) to whom the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) belongs.
770
813
  */
771
814
  acs_user_id?: string | undefined
815
+ /**
816
+ * Akiles-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
817
+ */
818
+ akiles_metadata?:
819
+ | {
820
+ /**
821
+ * ID of the Akiles member PIN.
822
+ */
823
+ member_pin_id?: string | undefined
824
+ }
825
+ | undefined
772
826
  /**
773
827
  * Vostio-specific metadata for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials).
774
828
  */
@@ -858,6 +912,7 @@ export type ActionAttempt =
858
912
  | 'salto_ks_tag'
859
913
  | 'avigilon_alta_credential'
860
914
  | 'kisi_credential'
915
+ | 'akiles_credential'
861
916
  | undefined
862
917
  /**
863
918
  * Display name that corresponds to the brand-specific terminology for the [credential](https://docs.seam.co/low-level-apis/access-systems/managing-credentials) type.
@@ -968,6 +1023,16 @@ export type ActionAttempt =
968
1023
  | 'being_deleted'
969
1024
  | 'unknown_issue_with_acs_credential'
970
1025
  | 'needs_to_be_reissued'
1026
+ | 'requested_code_unavailable'
1027
+
1028
+ /**
1029
+ * The PIN code that was assigned instead.
1030
+ */
1031
+ new_code?: string | undefined
1032
+ /**
1033
+ * The originally requested PIN code that could not be used.
1034
+ */
1035
+ original_code?: string | undefined
971
1036
  }>
972
1037
 
973
1038
  /**
@@ -1501,7 +1566,12 @@ export type ActionAttempt =
1501
1566
  /**
1502
1567
  * Result of the action.
1503
1568
  */
1504
- result: {}
1569
+ result: {
1570
+ /**
1571
+ * Created access code.
1572
+ */
1573
+ access_code: Record<string, unknown>
1574
+ }
1505
1575
 
1506
1576
  status: 'success' | 'pending' | 'error'
1507
1577
  }
@@ -1567,7 +1637,12 @@ export type ActionAttempt =
1567
1637
  /**
1568
1638
  * Result of the action.
1569
1639
  */
1570
- result: {}
1640
+ result: {
1641
+ /**
1642
+ * Updated access code.
1643
+ */
1644
+ access_code?: Record<string, unknown> | undefined
1645
+ }
1571
1646
 
1572
1647
  status: 'success' | 'pending' | 'error'
1573
1648
  }
@@ -1600,7 +1675,12 @@ export type ActionAttempt =
1600
1675
  /**
1601
1676
  * Result of the action.
1602
1677
  */
1603
- result: {}
1678
+ result: {
1679
+ /**
1680
+ * Created noise threshold.
1681
+ */
1682
+ noise_threshold: Record<string, unknown>
1683
+ }
1604
1684
 
1605
1685
  status: 'success' | 'pending' | 'error'
1606
1686
  }
@@ -1666,7 +1746,12 @@ export type ActionAttempt =
1666
1746
  /**
1667
1747
  * Result of the action.
1668
1748
  */
1669
- result: {}
1749
+ result: {
1750
+ /**
1751
+ * Updated noise threshold.
1752
+ */
1753
+ noise_threshold: Record<string, unknown>
1754
+ }
1670
1755
 
1671
1756
  status: 'success' | 'pending' | 'error'
1672
1757
  }
@@ -139,6 +139,7 @@ export type DeviceProvider = {
139
139
  | 'keyincode'
140
140
  | 'dormakaba_ambiance'
141
141
  | 'ultraloq'
142
+ | 'yacan'
142
143
  | 'dusaw'
143
144
  | 'sifely'
144
145
  | 'thirty_three_lock'