@seamapi/http 1.109.0 → 1.110.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 (36) hide show
  1. package/dist/connect.cjs +101 -0
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +15 -2
  4. package/dist/index.cjs +101 -0
  5. package/dist/index.cjs.map +1 -1
  6. package/dist/index.d.cts +1 -1
  7. package/lib/seam/connect/routes/access-codes/access-codes.js +3 -0
  8. package/lib/seam/connect/routes/access-codes/access-codes.js.map +1 -1
  9. package/lib/seam/connect/routes/customers/reservations/reservations.js +6 -0
  10. package/lib/seam/connect/routes/customers/reservations/reservations.js.map +1 -1
  11. package/lib/seam/connect/routes/locks/locks.d.ts +12 -0
  12. package/lib/seam/connect/routes/locks/locks.js +9 -0
  13. package/lib/seam/connect/routes/locks/locks.js.map +1 -1
  14. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.js +9 -0
  15. package/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.js.map +1 -1
  16. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js +6 -0
  17. package/lib/seam/connect/routes/seam/customer/v1/customers/customers.js.map +1 -1
  18. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.js +6 -0
  19. package/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.js.map +1 -1
  20. package/lib/seam/connect/routes/seam/customer/v1/v1.js +3 -0
  21. package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
  22. package/lib/seam/connect/routes/seam-http-endpoints.d.ts +3 -2
  23. package/lib/seam/connect/routes/seam-http-endpoints.js +25 -0
  24. package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
  25. package/lib/version.d.ts +1 -1
  26. package/lib/version.js +1 -1
  27. package/package.json +3 -3
  28. package/src/lib/seam/connect/routes/access-codes/access-codes.ts +5 -0
  29. package/src/lib/seam/connect/routes/customers/reservations/reservations.ts +10 -0
  30. package/src/lib/seam/connect/routes/locks/locks.ts +38 -0
  31. package/src/lib/seam/connect/routes/seam/customer/v1/customers/automations/automations.ts +15 -0
  32. package/src/lib/seam/connect/routes/seam/customer/v1/customers/customers.ts +10 -0
  33. package/src/lib/seam/connect/routes/seam/customer/v1/spaces/spaces.ts +10 -0
  34. package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +5 -0
  35. package/src/lib/seam/connect/routes/seam-http-endpoints.ts +47 -0
  36. package/src/lib/version.ts +1 -1
@@ -169,6 +169,19 @@ export class SeamHttpLocks {
169
169
  return SeamHttpLocksSimulate.fromClient(this.client, this.defaults)
170
170
  }
171
171
 
172
+ configureAutoLock(
173
+ parameters?: LocksConfigureAutoLockParameters,
174
+ options: LocksConfigureAutoLockOptions = {},
175
+ ): LocksConfigureAutoLockRequest {
176
+ return new SeamHttpRequest(this, {
177
+ pathname: '/locks/configure_auto_lock',
178
+ method: 'POST',
179
+ body: parameters,
180
+ responseKey: 'action_attempt',
181
+ options,
182
+ })
183
+ }
184
+
172
185
  get(
173
186
  parameters?: LocksGetParameters,
174
187
  options: LocksGetOptions = {},
@@ -222,6 +235,31 @@ export class SeamHttpLocks {
222
235
  }
223
236
  }
224
237
 
238
+ export type LocksConfigureAutoLockParameters =
239
+ RouteRequestBody<'/locks/configure_auto_lock'>
240
+
241
+ /**
242
+ * @deprecated Use LocksConfigureAutoLockParameters instead.
243
+ */
244
+ export type LocksConfigureAutoLockBody = LocksConfigureAutoLockParameters
245
+
246
+ /**
247
+ * @deprecated Use LocksConfigureAutoLockRequest instead.
248
+ */
249
+ export type LocksConfigureAutoLockResponse = SetNonNullable<
250
+ Required<RouteResponse<'/locks/configure_auto_lock'>>
251
+ >
252
+
253
+ export type LocksConfigureAutoLockRequest = SeamHttpRequest<
254
+ LocksConfigureAutoLockResponse,
255
+ 'action_attempt'
256
+ >
257
+
258
+ export type LocksConfigureAutoLockOptions = Pick<
259
+ SeamHttpRequestOptions,
260
+ 'waitForActionAttempt'
261
+ >
262
+
225
263
  export type LocksGetParameters = RouteRequestBody<'/locks/get'>
226
264
 
227
265
  /**
@@ -48,6 +48,11 @@ export class SeamHttpSeamCustomerV1CustomersAutomations {
48
48
 
49
49
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
50
50
  const options = parseOptions(apiKeyOrOptions)
51
+ if (!options.isUndocumentedApiEnabled) {
52
+ throw new Error(
53
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
54
+ )
55
+ }
51
56
  this.client = 'client' in options ? options.client : createClient(options)
52
57
  this.defaults = limitToSeamHttpRequestOptions(options)
53
58
  }
@@ -174,6 +179,11 @@ export class SeamHttpSeamCustomerV1CustomersAutomations {
174
179
  parameters?: SeamCustomerV1CustomersAutomationsGetParameters,
175
180
  options: SeamCustomerV1CustomersAutomationsGetOptions = {},
176
181
  ): SeamCustomerV1CustomersAutomationsGetRequest {
182
+ if (!this.defaults.isUndocumentedApiEnabled) {
183
+ throw new Error(
184
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
185
+ )
186
+ }
177
187
  return new SeamHttpRequest(this, {
178
188
  pathname: '/seam/customer/v1/customers/automations/get',
179
189
  method: 'GET',
@@ -187,6 +197,11 @@ export class SeamHttpSeamCustomerV1CustomersAutomations {
187
197
  parameters?: SeamCustomerV1CustomersAutomationsUpdateParameters,
188
198
  options: SeamCustomerV1CustomersAutomationsUpdateOptions = {},
189
199
  ): SeamCustomerV1CustomersAutomationsUpdateRequest {
200
+ if (!this.defaults.isUndocumentedApiEnabled) {
201
+ throw new Error(
202
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
203
+ )
204
+ }
190
205
  return new SeamHttpRequest(this, {
191
206
  pathname: '/seam/customer/v1/customers/automations/update',
192
207
  method: 'PATCH',
@@ -50,6 +50,11 @@ export class SeamHttpSeamCustomerV1Customers {
50
50
 
51
51
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
52
52
  const options = parseOptions(apiKeyOrOptions)
53
+ if (!options.isUndocumentedApiEnabled) {
54
+ throw new Error(
55
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
56
+ )
57
+ }
53
58
  this.client = 'client' in options ? options.client : createClient(options)
54
59
  this.defaults = limitToSeamHttpRequestOptions(options)
55
60
  }
@@ -201,6 +206,11 @@ export class SeamHttpSeamCustomerV1Customers {
201
206
  parameters?: SeamCustomerV1CustomersMeParameters,
202
207
  options: SeamCustomerV1CustomersMeOptions = {},
203
208
  ): SeamCustomerV1CustomersMeRequest {
209
+ if (!this.defaults.isUndocumentedApiEnabled) {
210
+ throw new Error(
211
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
212
+ )
213
+ }
204
214
  return new SeamHttpRequest(this, {
205
215
  pathname: '/seam/customer/v1/customers/me',
206
216
  method: 'GET',
@@ -44,6 +44,11 @@ export class SeamHttpSeamCustomerV1Spaces {
44
44
 
45
45
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
46
46
  const options = parseOptions(apiKeyOrOptions)
47
+ if (!options.isUndocumentedApiEnabled) {
48
+ throw new Error(
49
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
+ )
51
+ }
47
52
  this.client = 'client' in options ? options.client : createClient(options)
48
53
  this.defaults = limitToSeamHttpRequestOptions(options)
49
54
  }
@@ -221,6 +226,11 @@ export class SeamHttpSeamCustomerV1Spaces {
221
226
  parameters?: SeamCustomerV1SpacesPushCommonAreasParameters,
222
227
  options: SeamCustomerV1SpacesPushCommonAreasOptions = {},
223
228
  ): SeamCustomerV1SpacesPushCommonAreasRequest {
229
+ if (!this.defaults.isUndocumentedApiEnabled) {
230
+ throw new Error(
231
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
232
+ )
233
+ }
224
234
  return new SeamHttpRequest(this, {
225
235
  pathname: '/seam/customer/v1/spaces/push_common_areas',
226
236
  method: 'POST',
@@ -56,6 +56,11 @@ export class SeamHttpSeamCustomerV1 {
56
56
 
57
57
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
58
58
  const options = parseOptions(apiKeyOrOptions)
59
+ if (!options.isUndocumentedApiEnabled) {
60
+ throw new Error(
61
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
62
+ )
63
+ }
59
64
  this.client = 'client' in options ? options.client : createClient(options)
60
65
  this.defaults = limitToSeamHttpRequestOptions(options)
61
66
  }
@@ -522,6 +522,9 @@ import {
522
522
  SeamHttpInstantKeys,
523
523
  } from './instant-keys/index.js'
524
524
  import {
525
+ type LocksConfigureAutoLockOptions,
526
+ type LocksConfigureAutoLockParameters,
527
+ type LocksConfigureAutoLockRequest,
525
528
  type LocksGetOptions,
526
529
  type LocksGetParameters,
527
530
  type LocksGetRequest,
@@ -1223,6 +1226,11 @@ export class SeamHttpEndpoints {
1223
1226
  options?: AccessCodesGetTimelineOptions,
1224
1227
  ) => AccessCodesGetTimelineRequest {
1225
1228
  const { client, defaults } = this
1229
+ if (!this.defaults.isUndocumentedApiEnabled) {
1230
+ throw new Error(
1231
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
1232
+ )
1233
+ }
1226
1234
  return function accessCodesGetTimeline(
1227
1235
  ...args: Parameters<SeamHttpAccessCodes['getTimeline']>
1228
1236
  ): ReturnType<SeamHttpAccessCodes['getTimeline']> {
@@ -2669,6 +2677,11 @@ export class SeamHttpEndpoints {
2669
2677
  options?: CustomersReservationsCreateDeepLinkOptions,
2670
2678
  ) => CustomersReservationsCreateDeepLinkRequest {
2671
2679
  const { client, defaults } = this
2680
+ if (!this.defaults.isUndocumentedApiEnabled) {
2681
+ throw new Error(
2682
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
2683
+ )
2684
+ }
2672
2685
  return function customersReservationsCreateDeepLink(
2673
2686
  ...args: Parameters<SeamHttpCustomersReservations['createDeepLink']>
2674
2687
  ): ReturnType<SeamHttpCustomersReservations['createDeepLink']> {
@@ -2942,6 +2955,19 @@ export class SeamHttpEndpoints {
2942
2955
  }
2943
2956
  }
2944
2957
 
2958
+ get '/locks/configure_auto_lock'(): (
2959
+ parameters?: LocksConfigureAutoLockParameters,
2960
+ options?: LocksConfigureAutoLockOptions,
2961
+ ) => LocksConfigureAutoLockRequest {
2962
+ const { client, defaults } = this
2963
+ return function locksConfigureAutoLock(
2964
+ ...args: Parameters<SeamHttpLocks['configureAutoLock']>
2965
+ ): ReturnType<SeamHttpLocks['configureAutoLock']> {
2966
+ const seam = SeamHttpLocks.fromClient(client, defaults)
2967
+ return seam.configureAutoLock(...args)
2968
+ }
2969
+ }
2970
+
2945
2971
  get '/locks/get'(): (
2946
2972
  parameters?: LocksGetParameters,
2947
2973
  options?: LocksGetOptions,
@@ -3513,6 +3539,11 @@ export class SeamHttpEndpoints {
3513
3539
  options?: SeamCustomerV1CustomersAutomationsGetOptions,
3514
3540
  ) => SeamCustomerV1CustomersAutomationsGetRequest {
3515
3541
  const { client, defaults } = this
3542
+ if (!this.defaults.isUndocumentedApiEnabled) {
3543
+ throw new Error(
3544
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3545
+ )
3546
+ }
3516
3547
  return function seamCustomerV1CustomersAutomationsGet(
3517
3548
  ...args: Parameters<SeamHttpSeamCustomerV1CustomersAutomations['get']>
3518
3549
  ): ReturnType<SeamHttpSeamCustomerV1CustomersAutomations['get']> {
@@ -3529,6 +3560,11 @@ export class SeamHttpEndpoints {
3529
3560
  options?: SeamCustomerV1CustomersAutomationsUpdateOptions,
3530
3561
  ) => SeamCustomerV1CustomersAutomationsUpdateRequest {
3531
3562
  const { client, defaults } = this
3563
+ if (!this.defaults.isUndocumentedApiEnabled) {
3564
+ throw new Error(
3565
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3566
+ )
3567
+ }
3532
3568
  return function seamCustomerV1CustomersAutomationsUpdate(
3533
3569
  ...args: Parameters<SeamHttpSeamCustomerV1CustomersAutomations['update']>
3534
3570
  ): ReturnType<SeamHttpSeamCustomerV1CustomersAutomations['update']> {
@@ -3563,6 +3599,11 @@ export class SeamHttpEndpoints {
3563
3599
  options?: SeamCustomerV1CustomersMeOptions,
3564
3600
  ) => SeamCustomerV1CustomersMeRequest {
3565
3601
  const { client, defaults } = this
3602
+ if (!this.defaults.isUndocumentedApiEnabled) {
3603
+ throw new Error(
3604
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3605
+ )
3606
+ }
3566
3607
  return function seamCustomerV1CustomersMe(
3567
3608
  ...args: Parameters<SeamHttpSeamCustomerV1Customers['me']>
3568
3609
  ): ReturnType<SeamHttpSeamCustomerV1Customers['me']> {
@@ -3829,6 +3870,11 @@ export class SeamHttpEndpoints {
3829
3870
  options?: SeamCustomerV1SpacesPushCommonAreasOptions,
3830
3871
  ) => SeamCustomerV1SpacesPushCommonAreasRequest {
3831
3872
  const { client, defaults } = this
3873
+ if (!this.defaults.isUndocumentedApiEnabled) {
3874
+ throw new Error(
3875
+ 'Cannot use undocumented API without isUndocumentedApiEnabled',
3876
+ )
3877
+ }
3832
3878
  return function seamCustomerV1SpacesPushCommonAreas(
3833
3879
  ...args: Parameters<SeamHttpSeamCustomerV1Spaces['pushCommonAreas']>
3834
3880
  ): ReturnType<SeamHttpSeamCustomerV1Spaces['pushCommonAreas']> {
@@ -5211,6 +5257,7 @@ export type SeamHttpEndpointMutationPaths =
5211
5257
  | '/devices/simulate/remove'
5212
5258
  | '/devices/unmanaged/update'
5213
5259
  | '/instant_keys/delete'
5260
+ | '/locks/configure_auto_lock'
5214
5261
  | '/locks/lock_door'
5215
5262
  | '/locks/unlock_door'
5216
5263
  | '/locks/simulate/keypad_code_entry'
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '1.109.0'
1
+ const seamapiJavascriptHttpVersion = '1.110.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion