nuki-api-js 0.2.1 → 1.1.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.
@@ -0,0 +1,2351 @@
1
+ function notEmpty(value) {
2
+ return value !== null && value !== undefined;
3
+ }
4
+ function compactObject(obj) {
5
+ return Object.fromEntries(Object.entries(obj).filter(([, value])=>notEmpty(value)));
6
+ }
7
+
8
+ const baseUrl = "https://api.nuki.io";
9
+ async function client({ url, method, body, headers, pathParams, queryParams, signal, token = null, fetchImpl = fetch }) {
10
+ try {
11
+ const requestHeaders = compactObject({
12
+ "Content-Type": "application/json",
13
+ Authorization: token ? `Bearer ${token}` : undefined,
14
+ ...headers
15
+ });
16
+ if (requestHeaders["Content-Type"]?.toLowerCase().includes("multipart/form-data")) {
17
+ delete requestHeaders["Content-Type"];
18
+ }
19
+ const payload = body instanceof FormData ? body : requestHeaders["Content-Type"] === "application/json" ? JSON.stringify(body) : body;
20
+ const fullUrl = `${baseUrl}${resolveUrl(url, queryParams, pathParams)}`;
21
+ const response = await fetchImpl(fullUrl, {
22
+ signal,
23
+ method: method.toUpperCase(),
24
+ body: payload,
25
+ headers: requestHeaders
26
+ });
27
+ if (!response.ok) {
28
+ let error;
29
+ try {
30
+ error = await response.json();
31
+ } catch (e) {
32
+ error = {
33
+ status: "unknown",
34
+ payload: e instanceof Error ? `Unexpected error (${e.message})` : "Unexpected error"
35
+ };
36
+ }
37
+ throw error;
38
+ }
39
+ if (response.headers?.get("content-type")?.includes("json")) {
40
+ return await response.json();
41
+ } else {
42
+ return await response.text();
43
+ }
44
+ } catch (e) {
45
+ const errorObject = {
46
+ name: "unknown",
47
+ message: e instanceof Error ? `Network error (${e.message})` : "Network error",
48
+ stack: e
49
+ };
50
+ throw errorObject;
51
+ }
52
+ }
53
+ const resolveUrl = (url, queryParams = {}, pathParams = {})=>{
54
+ let query = new URLSearchParams(queryParams).toString();
55
+ if (query) query = `?${query}`;
56
+ return url.replace(/\{\w*\}/g, (key)=>pathParams[key.slice(1, -1)] ?? "") + query;
57
+ };
58
+
59
+ /**
60
+ * @summary Get an account
61
+ * @link /account
62
+ */ async function getAccountsResource({ config } = {}) {
63
+ const { client: request = client, ...requestConfig } = config ?? {};
64
+ const data = await request({
65
+ method: "GET",
66
+ url: `/account`,
67
+ ...requestConfig,
68
+ headers: {
69
+ ...requestConfig.headers
70
+ }
71
+ });
72
+ return data;
73
+ }
74
+ /**
75
+ * @summary Update an account
76
+ * @link /account
77
+ */ async function postAccountsResource({ body, queryParams, config } = {}) {
78
+ const { client: request = client, ...requestConfig } = config ?? {};
79
+ const data = await request({
80
+ method: "POST",
81
+ url: `/account`,
82
+ queryParams,
83
+ body: body,
84
+ ...requestConfig,
85
+ headers: {
86
+ ...requestConfig.headers
87
+ }
88
+ });
89
+ return data;
90
+ }
91
+ /**
92
+ * @summary Delete an account
93
+ * @link /account
94
+ */ async function deleteAccountsResource({ config } = {}) {
95
+ const { client: request = client, ...requestConfig } = config ?? {};
96
+ const data = await request({
97
+ method: "DELETE",
98
+ url: `/account`,
99
+ ...requestConfig,
100
+ headers: {
101
+ ...requestConfig.headers
102
+ }
103
+ });
104
+ return data;
105
+ }
106
+ /**
107
+ * @summary Trigger the email change verification email
108
+ * @link /account/email/change
109
+ */ async function postAccountEmailChangeResource({ body, config } = {}) {
110
+ const { client: request = client, ...requestConfig } = config ?? {};
111
+ const data = await request({
112
+ method: "POST",
113
+ url: `/account/email/change`,
114
+ body: body,
115
+ ...requestConfig,
116
+ headers: {
117
+ ...requestConfig.headers
118
+ }
119
+ });
120
+ return data;
121
+ }
122
+ /**
123
+ * @summary Trigger the email change verification email
124
+ * @link /account/email/verify
125
+ */ async function postAccountEmailVerifyResource({ config } = {}) {
126
+ const { client: request = client, ...requestConfig } = config ?? {};
127
+ const data = await request({
128
+ method: "POST",
129
+ url: `/account/email/verify`,
130
+ ...requestConfig,
131
+ headers: {
132
+ ...requestConfig.headers
133
+ }
134
+ });
135
+ return data;
136
+ }
137
+ /**
138
+ * @summary Get all integrations for this account
139
+ * @link /account/integration
140
+ */ async function getAccountIntegrationsResource({ config } = {}) {
141
+ const { client: request = client, ...requestConfig } = config ?? {};
142
+ const data = await request({
143
+ method: "GET",
144
+ url: `/account/integration`,
145
+ ...requestConfig,
146
+ headers: {
147
+ ...requestConfig.headers
148
+ }
149
+ });
150
+ return data;
151
+ }
152
+ /**
153
+ * @summary Delete an integration
154
+ * @link /account/integration
155
+ */ async function deleteAccountIntegrationsResource({ queryParams, config } = {}) {
156
+ const { client: request = client, ...requestConfig } = config ?? {};
157
+ const data = await request({
158
+ method: "DELETE",
159
+ url: `/account/integration`,
160
+ queryParams,
161
+ ...requestConfig,
162
+ headers: {
163
+ ...requestConfig.headers
164
+ }
165
+ });
166
+ return data;
167
+ }
168
+ /**
169
+ * @summary Enable one-time password for an account
170
+ * @link /account/otp
171
+ */ async function postAccountOtpResource({ body, config } = {}) {
172
+ const { client: request = client, ...requestConfig } = config ?? {};
173
+ const data = await request({
174
+ method: "POST",
175
+ url: `/account/otp`,
176
+ body: body,
177
+ ...requestConfig,
178
+ headers: {
179
+ ...requestConfig.headers
180
+ }
181
+ });
182
+ return data;
183
+ }
184
+ /**
185
+ * @summary Create a one-time password secret
186
+ * @link /account/otp
187
+ */ async function putAccountOtpResource({ config } = {}) {
188
+ const { client: request = client, ...requestConfig } = config ?? {};
189
+ const data = await request({
190
+ method: "PUT",
191
+ url: `/account/otp`,
192
+ ...requestConfig,
193
+ headers: {
194
+ ...requestConfig.headers
195
+ }
196
+ });
197
+ return data;
198
+ }
199
+ /**
200
+ * @summary Disable one-time password for an account
201
+ * @link /account/otp
202
+ */ async function deleteAccountOtpResource({ config } = {}) {
203
+ const { client: request = client, ...requestConfig } = config ?? {};
204
+ const data = await request({
205
+ method: "DELETE",
206
+ url: `/account/otp`,
207
+ ...requestConfig,
208
+ headers: {
209
+ ...requestConfig.headers
210
+ }
211
+ });
212
+ return data;
213
+ }
214
+ /**
215
+ * @summary Reset account password
216
+ * @link /account/password/reset
217
+ */ async function postAccountPasswordResetResource({ body, config } = {}) {
218
+ const { client: request = client, ...requestConfig } = config ?? {};
219
+ const data = await request({
220
+ method: "POST",
221
+ url: `/account/password/reset`,
222
+ body: body,
223
+ ...requestConfig,
224
+ headers: {
225
+ ...requestConfig.headers
226
+ }
227
+ });
228
+ return data;
229
+ }
230
+ /**
231
+ * @summary Get account setting
232
+ * @link /account/setting
233
+ */ async function getAccountSettingResource({ config } = {}) {
234
+ const { client: request = client, ...requestConfig } = config ?? {};
235
+ const data = await request({
236
+ method: "GET",
237
+ url: `/account/setting`,
238
+ ...requestConfig,
239
+ headers: {
240
+ ...requestConfig.headers
241
+ }
242
+ });
243
+ return data;
244
+ }
245
+ /**
246
+ * @summary Create or update account setting
247
+ * @link /account/setting
248
+ */ async function putAccountSettingResource({ body, config } = {}) {
249
+ const { client: request = client, ...requestConfig } = config ?? {};
250
+ const data = await request({
251
+ method: "PUT",
252
+ url: `/account/setting`,
253
+ body: body,
254
+ ...requestConfig,
255
+ headers: {
256
+ ...requestConfig.headers
257
+ }
258
+ });
259
+ return data;
260
+ }
261
+ /**
262
+ * @summary Delete an account setting
263
+ * @link /account/setting
264
+ */ async function deleteAccountSettingResource({ config } = {}) {
265
+ const { client: request = client, ...requestConfig } = config ?? {};
266
+ const data = await request({
267
+ method: "DELETE",
268
+ url: `/account/setting`,
269
+ ...requestConfig,
270
+ headers: {
271
+ ...requestConfig.headers
272
+ }
273
+ });
274
+ return data;
275
+ }
276
+ /**
277
+ * @summary Get a list of sub accounts
278
+ * @link /account/sub
279
+ */ async function getAccountSubsResource({ queryParams, config } = {}) {
280
+ const { client: request = client, ...requestConfig } = config ?? {};
281
+ const data = await request({
282
+ method: "GET",
283
+ url: `/account/sub`,
284
+ queryParams,
285
+ ...requestConfig,
286
+ headers: {
287
+ ...requestConfig.headers
288
+ }
289
+ });
290
+ return data;
291
+ }
292
+ /**
293
+ * @summary Create a sub account
294
+ * @link /account/sub
295
+ */ async function putAccountSubsResource({ body, config } = {}) {
296
+ const { client: request = client, ...requestConfig } = config ?? {};
297
+ const data = await request({
298
+ method: "PUT",
299
+ url: `/account/sub`,
300
+ body: body,
301
+ ...requestConfig,
302
+ headers: {
303
+ ...requestConfig.headers
304
+ }
305
+ });
306
+ return data;
307
+ }
308
+ /**
309
+ * @summary Get a sub account
310
+ * @link /account/sub/{accountId}
311
+ */ async function getAccountSubResource({ pathParams, config } = {}) {
312
+ const { client: request = client, ...requestConfig } = config ?? {};
313
+ if (!pathParams.accountId) {
314
+ throw new Error(`Missing required path parameter: accountId`);
315
+ }
316
+ const data = await request({
317
+ method: "GET",
318
+ url: `/account/sub/${pathParams.accountId}`,
319
+ ...requestConfig,
320
+ headers: {
321
+ ...requestConfig.headers
322
+ }
323
+ });
324
+ return data;
325
+ }
326
+ /**
327
+ * @summary Update a sub account
328
+ * @link /account/sub/{accountId}
329
+ */ async function postAccountSubResource({ pathParams, body, config } = {}) {
330
+ const { client: request = client, ...requestConfig } = config ?? {};
331
+ if (!pathParams.accountId) {
332
+ throw new Error(`Missing required path parameter: accountId`);
333
+ }
334
+ const data = await request({
335
+ method: "POST",
336
+ url: `/account/sub/${pathParams.accountId}`,
337
+ body: body,
338
+ ...requestConfig,
339
+ headers: {
340
+ ...requestConfig.headers
341
+ }
342
+ });
343
+ return data;
344
+ }
345
+ /**
346
+ * @summary Delete a sub account
347
+ * @link /account/sub/{accountId}
348
+ */ async function deleteAccountSubResource({ pathParams, config } = {}) {
349
+ const { client: request = client, ...requestConfig } = config ?? {};
350
+ if (!pathParams.accountId) {
351
+ throw new Error(`Missing required path parameter: accountId`);
352
+ }
353
+ const data = await request({
354
+ method: "DELETE",
355
+ url: `/account/sub/${pathParams.accountId}`,
356
+ ...requestConfig,
357
+ headers: {
358
+ ...requestConfig.headers
359
+ }
360
+ });
361
+ return data;
362
+ }
363
+ /**
364
+ * @summary Get a list of account users
365
+ * @link /account/user
366
+ */ async function getAccountUsersResource({ queryParams, config } = {}) {
367
+ const { client: request = client, ...requestConfig } = config ?? {};
368
+ const data = await request({
369
+ method: "GET",
370
+ url: `/account/user`,
371
+ queryParams,
372
+ ...requestConfig,
373
+ headers: {
374
+ ...requestConfig.headers
375
+ }
376
+ });
377
+ return data;
378
+ }
379
+ /**
380
+ * @summary Create an account user
381
+ * @link /account/user
382
+ */ async function putAccountUsersResource({ body, config } = {}) {
383
+ const { client: request = client, ...requestConfig } = config ?? {};
384
+ const data = await request({
385
+ method: "PUT",
386
+ url: `/account/user`,
387
+ body: body,
388
+ ...requestConfig,
389
+ headers: {
390
+ ...requestConfig.headers
391
+ }
392
+ });
393
+ return data;
394
+ }
395
+ /**
396
+ * @summary Get an account user
397
+ * @link /account/user/{accountUserId}
398
+ */ async function getAccountUserResource({ pathParams, config } = {}) {
399
+ const { client: request = client, ...requestConfig } = config ?? {};
400
+ if (!pathParams.accountUserId) {
401
+ throw new Error(`Missing required path parameter: accountUserId`);
402
+ }
403
+ const data = await request({
404
+ method: "GET",
405
+ url: `/account/user/${pathParams.accountUserId}`,
406
+ ...requestConfig,
407
+ headers: {
408
+ ...requestConfig.headers
409
+ }
410
+ });
411
+ return data;
412
+ }
413
+ /**
414
+ * @summary Update an account user
415
+ * @link /account/user/{accountUserId}
416
+ */ async function postAccountUserResource({ pathParams, body, config } = {}) {
417
+ const { client: request = client, ...requestConfig } = config ?? {};
418
+ if (!pathParams.accountUserId) {
419
+ throw new Error(`Missing required path parameter: accountUserId`);
420
+ }
421
+ const data = await request({
422
+ method: "POST",
423
+ url: `/account/user/${pathParams.accountUserId}`,
424
+ body: body,
425
+ ...requestConfig,
426
+ headers: {
427
+ ...requestConfig.headers
428
+ }
429
+ });
430
+ return data;
431
+ }
432
+ /**
433
+ * @summary Delete an account user asynchronously
434
+ * @link /account/user/{accountUserId}
435
+ */ async function deleteAccountUserResource({ pathParams, config } = {}) {
436
+ const { client: request = client, ...requestConfig } = config ?? {};
437
+ if (!pathParams.accountUserId) {
438
+ throw new Error(`Missing required path parameter: accountUserId`);
439
+ }
440
+ const data = await request({
441
+ method: "DELETE",
442
+ url: `/account/user/${pathParams.accountUserId}`,
443
+ ...requestConfig,
444
+ headers: {
445
+ ...requestConfig.headers
446
+ }
447
+ });
448
+ return data;
449
+ }
450
+ /**
451
+ * @summary Get a list of addresses
452
+ * @link /address
453
+ */ async function getAddressesResource({ config } = {}) {
454
+ const { client: request = client, ...requestConfig } = config ?? {};
455
+ const data = await request({
456
+ method: "GET",
457
+ url: `/address`,
458
+ ...requestConfig,
459
+ headers: {
460
+ ...requestConfig.headers
461
+ }
462
+ });
463
+ return data;
464
+ }
465
+ /**
466
+ * @summary Create an address
467
+ * @link /address
468
+ */ async function putAddressesResource({ body, config } = {}) {
469
+ const { client: request = client, ...requestConfig } = config ?? {};
470
+ const data = await request({
471
+ method: "PUT",
472
+ url: `/address`,
473
+ body: body,
474
+ ...requestConfig,
475
+ headers: {
476
+ ...requestConfig.headers
477
+ }
478
+ });
479
+ return data;
480
+ }
481
+ /**
482
+ * @summary Get info about an address token
483
+ * @link /address/token/{id}
484
+ */ async function getAddressTokenResource({ pathParams, config } = {}) {
485
+ const { client: request = client, ...requestConfig } = config ?? {};
486
+ if (!pathParams.id) {
487
+ throw new Error(`Missing required path parameter: id`);
488
+ }
489
+ const data = await request({
490
+ method: "GET",
491
+ url: `/address/token/${pathParams.id}`,
492
+ ...requestConfig,
493
+ headers: {
494
+ ...requestConfig.headers
495
+ }
496
+ });
497
+ return data;
498
+ }
499
+ /**
500
+ * @summary Get a redeemed address token
501
+ * @link /address/token/{id}/redeem
502
+ */ async function getAddressTokenRedeemResource({ pathParams, config } = {}) {
503
+ const { client: request = client, ...requestConfig } = config ?? {};
504
+ if (!pathParams.id) {
505
+ throw new Error(`Missing required path parameter: id`);
506
+ }
507
+ const data = await request({
508
+ method: "GET",
509
+ url: `/address/token/${pathParams.id}/redeem`,
510
+ ...requestConfig,
511
+ headers: {
512
+ ...requestConfig.headers
513
+ }
514
+ });
515
+ return data;
516
+ }
517
+ /**
518
+ * @summary Redeem an address token
519
+ * @link /address/token/{id}/redeem
520
+ */ async function postAddressTokenRedeemResource({ pathParams, queryParams, config } = {}) {
521
+ const { client: request = client, ...requestConfig } = config ?? {};
522
+ if (!pathParams.id) {
523
+ throw new Error(`Missing required path parameter: id`);
524
+ }
525
+ const data = await request({
526
+ method: "POST",
527
+ url: `/address/token/${pathParams.id}/redeem`,
528
+ queryParams,
529
+ ...requestConfig,
530
+ headers: {
531
+ ...requestConfig.headers
532
+ }
533
+ });
534
+ return data;
535
+ }
536
+ /**
537
+ * @summary Update an address
538
+ * @link /address/{addressId}
539
+ */ async function postAddressResource({ pathParams, body, config } = {}) {
540
+ const { client: request = client, ...requestConfig } = config ?? {};
541
+ if (!pathParams.addressId) {
542
+ throw new Error(`Missing required path parameter: addressId`);
543
+ }
544
+ const data = await request({
545
+ method: "POST",
546
+ url: `/address/${pathParams.addressId}`,
547
+ body: body,
548
+ ...requestConfig,
549
+ headers: {
550
+ ...requestConfig.headers
551
+ }
552
+ });
553
+ return data;
554
+ }
555
+ /**
556
+ * @summary Delete an address
557
+ * @link /address/{addressId}
558
+ */ async function deleteAddressResource({ pathParams, config } = {}) {
559
+ const { client: request = client, ...requestConfig } = config ?? {};
560
+ if (!pathParams.addressId) {
561
+ throw new Error(`Missing required path parameter: addressId`);
562
+ }
563
+ const data = await request({
564
+ method: "DELETE",
565
+ url: `/address/${pathParams.addressId}`,
566
+ ...requestConfig,
567
+ headers: {
568
+ ...requestConfig.headers
569
+ }
570
+ });
571
+ return data;
572
+ }
573
+ /**
574
+ * @summary Get a list of address reservations
575
+ * @link /address/{addressId}/reservation
576
+ */ async function getAddressReservationsResource({ pathParams, config } = {}) {
577
+ const { client: request = client, ...requestConfig } = config ?? {};
578
+ if (!pathParams.addressId) {
579
+ throw new Error(`Missing required path parameter: addressId`);
580
+ }
581
+ const data = await request({
582
+ method: "GET",
583
+ url: `/address/${pathParams.addressId}/reservation`,
584
+ ...requestConfig,
585
+ headers: {
586
+ ...requestConfig.headers
587
+ }
588
+ });
589
+ return data;
590
+ }
591
+ /**
592
+ * @summary Issues authorizations for an address reservation
593
+ * @link /address/{addressId}/reservation/{id}/issue
594
+ */ async function postAddressReservationIssueResource({ pathParams, config } = {}) {
595
+ const { client: request = client, ...requestConfig } = config ?? {};
596
+ if (!pathParams.addressId) {
597
+ throw new Error(`Missing required path parameter: addressId`);
598
+ }
599
+ if (!pathParams.id) {
600
+ throw new Error(`Missing required path parameter: id`);
601
+ }
602
+ const data = await request({
603
+ method: "POST",
604
+ url: `/address/${pathParams.addressId}/reservation/${pathParams.id}/issue`,
605
+ ...requestConfig,
606
+ headers: {
607
+ ...requestConfig.headers
608
+ }
609
+ });
610
+ return data;
611
+ }
612
+ /**
613
+ * @summary Revoke authorizations for an address reservation
614
+ * @link /address/{addressId}/reservation/{id}/revoke
615
+ */ async function postAddressReservationRevokeResource({ pathParams, config } = {}) {
616
+ const { client: request = client, ...requestConfig } = config ?? {};
617
+ if (!pathParams.addressId) {
618
+ throw new Error(`Missing required path parameter: addressId`);
619
+ }
620
+ if (!pathParams.id) {
621
+ throw new Error(`Missing required path parameter: id`);
622
+ }
623
+ const data = await request({
624
+ method: "POST",
625
+ url: `/address/${pathParams.addressId}/reservation/${pathParams.id}/revoke`,
626
+ ...requestConfig,
627
+ headers: {
628
+ ...requestConfig.headers
629
+ }
630
+ });
631
+ return data;
632
+ }
633
+ /**
634
+ * @summary Update access times of a reservation
635
+ * @link /address/{addressId}/reservation/{id}/update/accesstimes
636
+ */ async function postReservationAccessTimesUpdateResource({ pathParams, body, config } = {}) {
637
+ const { client: request = client, ...requestConfig } = config ?? {};
638
+ if (!pathParams.addressId) {
639
+ throw new Error(`Missing required path parameter: addressId`);
640
+ }
641
+ if (!pathParams.id) {
642
+ throw new Error(`Missing required path parameter: id`);
643
+ }
644
+ const data = await request({
645
+ method: "POST",
646
+ url: `/address/${pathParams.addressId}/reservation/${pathParams.id}/update/accesstimes`,
647
+ body: body,
648
+ ...requestConfig,
649
+ headers: {
650
+ ...requestConfig.headers
651
+ }
652
+ });
653
+ return data;
654
+ }
655
+ /**
656
+ * @summary Get a list of address tokens
657
+ * @link /address/{addressId}/token
658
+ */ async function getAddressTokensResource({ pathParams, config } = {}) {
659
+ const { client: request = client, ...requestConfig } = config ?? {};
660
+ if (!pathParams.addressId) {
661
+ throw new Error(`Missing required path parameter: addressId`);
662
+ }
663
+ const data = await request({
664
+ method: "GET",
665
+ url: `/address/${pathParams.addressId}/token`,
666
+ ...requestConfig,
667
+ headers: {
668
+ ...requestConfig.headers
669
+ }
670
+ });
671
+ return data;
672
+ }
673
+ /**
674
+ * @summary Get a list of address units
675
+ * @link /address/{addressId}/unit
676
+ */ async function getAddressUnitsResource({ pathParams, config } = {}) {
677
+ const { client: request = client, ...requestConfig } = config ?? {};
678
+ if (!pathParams.addressId) {
679
+ throw new Error(`Missing required path parameter: addressId`);
680
+ }
681
+ const data = await request({
682
+ method: "GET",
683
+ url: `/address/${pathParams.addressId}/unit`,
684
+ ...requestConfig,
685
+ headers: {
686
+ ...requestConfig.headers
687
+ }
688
+ });
689
+ return data;
690
+ }
691
+ /**
692
+ * @summary Create an address unit
693
+ * @link /address/{addressId}/unit
694
+ */ async function putAddressUnitsResource({ pathParams, body, config } = {}) {
695
+ const { client: request = client, ...requestConfig } = config ?? {};
696
+ if (!pathParams.addressId) {
697
+ throw new Error(`Missing required path parameter: addressId`);
698
+ }
699
+ const data = await request({
700
+ method: "PUT",
701
+ url: `/address/${pathParams.addressId}/unit`,
702
+ body: body,
703
+ ...requestConfig,
704
+ headers: {
705
+ ...requestConfig.headers
706
+ }
707
+ });
708
+ return data;
709
+ }
710
+ /**
711
+ * @summary Delete address units asynchronously
712
+ * @link /address/{addressId}/unit
713
+ */ async function deleteAddressUnitsResource({ pathParams, body, config } = {}) {
714
+ const { client: request = client, ...requestConfig } = config ?? {};
715
+ if (!pathParams.addressId) {
716
+ throw new Error(`Missing required path parameter: addressId`);
717
+ }
718
+ const data = await request({
719
+ method: "DELETE",
720
+ url: `/address/${pathParams.addressId}/unit`,
721
+ body: body,
722
+ ...requestConfig,
723
+ headers: {
724
+ ...requestConfig.headers
725
+ }
726
+ });
727
+ return data;
728
+ }
729
+ /**
730
+ * @summary Delete an address unit
731
+ * @link /address/{addressId}/unit/{id}
732
+ */ async function deleteAddressUnitResource({ pathParams, config } = {}) {
733
+ const { client: request = client, ...requestConfig } = config ?? {};
734
+ if (!pathParams.addressId) {
735
+ throw new Error(`Missing required path parameter: addressId`);
736
+ }
737
+ if (!pathParams.id) {
738
+ throw new Error(`Missing required path parameter: id`);
739
+ }
740
+ const data = await request({
741
+ method: "DELETE",
742
+ url: `/address/${pathParams.addressId}/unit/${pathParams.id}`,
743
+ ...requestConfig,
744
+ headers: {
745
+ ...requestConfig.headers
746
+ }
747
+ });
748
+ return data;
749
+ }
750
+ /**
751
+ * @summary Get all registered decentral webhooks
752
+ * @link /api/decentralWebhook
753
+ */ async function getDecentralWebhooksResource({ config } = {}) {
754
+ const { client: request = client, ...requestConfig } = config ?? {};
755
+ const data = await request({
756
+ method: "GET",
757
+ url: `/api/decentralWebhook`,
758
+ ...requestConfig,
759
+ headers: {
760
+ ...requestConfig.headers
761
+ }
762
+ });
763
+ return data;
764
+ }
765
+ /**
766
+ * @summary Create decentral webhook
767
+ * @link /api/decentralWebhook
768
+ */ async function putDecentralWebhooksResource({ body, config } = {}) {
769
+ const { client: request = client, ...requestConfig } = config ?? {};
770
+ const data = await request({
771
+ method: "PUT",
772
+ url: `/api/decentralWebhook`,
773
+ body: body,
774
+ ...requestConfig,
775
+ headers: {
776
+ ...requestConfig.headers
777
+ }
778
+ });
779
+ return data;
780
+ }
781
+ /**
782
+ * @summary Unregister a decentral webhook
783
+ * @link /api/decentralWebhook/{id}
784
+ */ async function deleteDecentralWebhookResource({ pathParams, config } = {}) {
785
+ const { client: request = client, ...requestConfig } = config ?? {};
786
+ if (!pathParams.id) {
787
+ throw new Error(`Missing required path parameter: id`);
788
+ }
789
+ const data = await request({
790
+ method: "DELETE",
791
+ url: `/api/decentralWebhook/${pathParams.id}`,
792
+ ...requestConfig,
793
+ headers: {
794
+ ...requestConfig.headers
795
+ }
796
+ });
797
+ return data;
798
+ }
799
+ /**
800
+ * @summary Get a list of API keys
801
+ * @link /api/key
802
+ */ async function getApiKeysResource({ config } = {}) {
803
+ const { client: request = client, ...requestConfig } = config ?? {};
804
+ const data = await request({
805
+ method: "GET",
806
+ url: `/api/key`,
807
+ ...requestConfig,
808
+ headers: {
809
+ ...requestConfig.headers
810
+ }
811
+ });
812
+ return data;
813
+ }
814
+ /**
815
+ * @summary Create an API key
816
+ * @link /api/key
817
+ */ async function putApiKeysResource({ body, config } = {}) {
818
+ const { client: request = client, ...requestConfig } = config ?? {};
819
+ const data = await request({
820
+ method: "PUT",
821
+ url: `/api/key`,
822
+ body: body,
823
+ ...requestConfig,
824
+ headers: {
825
+ ...requestConfig.headers
826
+ }
827
+ });
828
+ return data;
829
+ }
830
+ /**
831
+ * @summary Update an API key
832
+ * @link /api/key/{apiKeyId}
833
+ */ async function postApiKeyResource({ pathParams, body, config } = {}) {
834
+ const { client: request = client, ...requestConfig } = config ?? {};
835
+ if (!pathParams.apiKeyId) {
836
+ throw new Error(`Missing required path parameter: apiKeyId`);
837
+ }
838
+ const data = await request({
839
+ method: "POST",
840
+ url: `/api/key/${pathParams.apiKeyId}`,
841
+ body: body,
842
+ ...requestConfig,
843
+ headers: {
844
+ ...requestConfig.headers
845
+ }
846
+ });
847
+ return data;
848
+ }
849
+ /**
850
+ * @summary Delete an API key
851
+ * @link /api/key/{apiKeyId}
852
+ */ async function deleteApiKeyResource({ pathParams, config } = {}) {
853
+ const { client: request = client, ...requestConfig } = config ?? {};
854
+ if (!pathParams.apiKeyId) {
855
+ throw new Error(`Missing required path parameter: apiKeyId`);
856
+ }
857
+ const data = await request({
858
+ method: "DELETE",
859
+ url: `/api/key/${pathParams.apiKeyId}`,
860
+ ...requestConfig,
861
+ headers: {
862
+ ...requestConfig.headers
863
+ }
864
+ });
865
+ return data;
866
+ }
867
+ /**
868
+ * @summary Get an advanced API key
869
+ * @link /api/key/{apiKeyId}/advanced
870
+ */ async function getApiKeyAdvancedResource({ pathParams, config } = {}) {
871
+ const { client: request = client, ...requestConfig } = config ?? {};
872
+ if (!pathParams.apiKeyId) {
873
+ throw new Error(`Missing required path parameter: apiKeyId`);
874
+ }
875
+ const data = await request({
876
+ method: "GET",
877
+ url: `/api/key/${pathParams.apiKeyId}/advanced`,
878
+ ...requestConfig,
879
+ headers: {
880
+ ...requestConfig.headers
881
+ }
882
+ });
883
+ return data;
884
+ }
885
+ /**
886
+ * @summary Update an advanced API key
887
+ * @link /api/key/{apiKeyId}/advanced
888
+ */ async function postApiKeyAdvancedResource({ pathParams, body, config } = {}) {
889
+ const { client: request = client, ...requestConfig } = config ?? {};
890
+ if (!pathParams.apiKeyId) {
891
+ throw new Error(`Missing required path parameter: apiKeyId`);
892
+ }
893
+ const data = await request({
894
+ method: "POST",
895
+ url: `/api/key/${pathParams.apiKeyId}/advanced`,
896
+ body: body,
897
+ ...requestConfig,
898
+ headers: {
899
+ ...requestConfig.headers
900
+ }
901
+ });
902
+ return data;
903
+ }
904
+ /**
905
+ * @summary Create an advanced API key
906
+ * @link /api/key/{apiKeyId}/advanced
907
+ */ async function putApiKeyAdvancedResource({ pathParams, body, config } = {}) {
908
+ const { client: request = client, ...requestConfig } = config ?? {};
909
+ if (!pathParams.apiKeyId) {
910
+ throw new Error(`Missing required path parameter: apiKeyId`);
911
+ }
912
+ const data = await request({
913
+ method: "PUT",
914
+ url: `/api/key/${pathParams.apiKeyId}/advanced`,
915
+ body: body,
916
+ ...requestConfig,
917
+ headers: {
918
+ ...requestConfig.headers
919
+ }
920
+ });
921
+ return data;
922
+ }
923
+ /**
924
+ * @summary Delete an advanced API key
925
+ * @link /api/key/{apiKeyId}/advanced
926
+ */ async function deleteApiKeyAdvancedResource({ pathParams, config } = {}) {
927
+ const { client: request = client, ...requestConfig } = config ?? {};
928
+ if (!pathParams.apiKeyId) {
929
+ throw new Error(`Missing required path parameter: apiKeyId`);
930
+ }
931
+ const data = await request({
932
+ method: "DELETE",
933
+ url: `/api/key/${pathParams.apiKeyId}/advanced`,
934
+ ...requestConfig,
935
+ headers: {
936
+ ...requestConfig.headers
937
+ }
938
+ });
939
+ return data;
940
+ }
941
+ /**
942
+ * @summary Reactivate a deactivated advanced webhook integration
943
+ * @link /api/key/{apiKeyId}/advanced/reactivate
944
+ */ async function postApiKeyAdvancedReactivateResource({ pathParams, config } = {}) {
945
+ const { client: request = client, ...requestConfig } = config ?? {};
946
+ if (!pathParams.apiKeyId) {
947
+ throw new Error(`Missing required path parameter: apiKeyId`);
948
+ }
949
+ const data = await request({
950
+ method: "POST",
951
+ url: `/api/key/${pathParams.apiKeyId}/advanced/reactivate`,
952
+ ...requestConfig,
953
+ headers: {
954
+ ...requestConfig.headers
955
+ }
956
+ });
957
+ return data;
958
+ }
959
+ /**
960
+ * @summary Get a list of API key tokens
961
+ * @link /api/key/{apiKeyId}/token
962
+ */ async function getApiKeyTokensResource({ pathParams, config } = {}) {
963
+ const { client: request = client, ...requestConfig } = config ?? {};
964
+ if (!pathParams.apiKeyId) {
965
+ throw new Error(`Missing required path parameter: apiKeyId`);
966
+ }
967
+ const data = await request({
968
+ method: "GET",
969
+ url: `/api/key/${pathParams.apiKeyId}/token`,
970
+ ...requestConfig,
971
+ headers: {
972
+ ...requestConfig.headers
973
+ }
974
+ });
975
+ return data;
976
+ }
977
+ /**
978
+ * @summary Create an API key token
979
+ * @link /api/key/{apiKeyId}/token
980
+ */ async function putApiKeyTokensResource({ pathParams, body, config } = {}) {
981
+ const { client: request = client, ...requestConfig } = config ?? {};
982
+ if (!pathParams.apiKeyId) {
983
+ throw new Error(`Missing required path parameter: apiKeyId`);
984
+ }
985
+ const data = await request({
986
+ method: "PUT",
987
+ url: `/api/key/${pathParams.apiKeyId}/token`,
988
+ body: body,
989
+ ...requestConfig,
990
+ headers: {
991
+ ...requestConfig.headers
992
+ }
993
+ });
994
+ return data;
995
+ }
996
+ /**
997
+ * @summary Update an API key token
998
+ * @link /api/key/{apiKeyId}/token/{id}
999
+ */ async function postApiKeyTokenResource({ pathParams, body, config } = {}) {
1000
+ const { client: request = client, ...requestConfig } = config ?? {};
1001
+ if (!pathParams.apiKeyId) {
1002
+ throw new Error(`Missing required path parameter: apiKeyId`);
1003
+ }
1004
+ if (!pathParams.id) {
1005
+ throw new Error(`Missing required path parameter: id`);
1006
+ }
1007
+ const data = await request({
1008
+ method: "POST",
1009
+ url: `/api/key/${pathParams.apiKeyId}/token/${pathParams.id}`,
1010
+ body: body,
1011
+ ...requestConfig,
1012
+ headers: {
1013
+ ...requestConfig.headers
1014
+ }
1015
+ });
1016
+ return data;
1017
+ }
1018
+ /**
1019
+ * @summary Delete an API key token
1020
+ * @link /api/key/{apiKeyId}/token/{id}
1021
+ */ async function deleteApiKeyTokenResource({ pathParams, config } = {}) {
1022
+ const { client: request = client, ...requestConfig } = config ?? {};
1023
+ if (!pathParams.apiKeyId) {
1024
+ throw new Error(`Missing required path parameter: apiKeyId`);
1025
+ }
1026
+ if (!pathParams.id) {
1027
+ throw new Error(`Missing required path parameter: id`);
1028
+ }
1029
+ const data = await request({
1030
+ method: "DELETE",
1031
+ url: `/api/key/${pathParams.apiKeyId}/token/${pathParams.id}`,
1032
+ ...requestConfig,
1033
+ headers: {
1034
+ ...requestConfig.headers
1035
+ }
1036
+ });
1037
+ return data;
1038
+ }
1039
+ /**
1040
+ * @summary Get a list of webhook logs (descending)
1041
+ * @link /api/key/{apiKeyId}/webhook/logs
1042
+ */ async function getWebhookLogsResource({ pathParams, queryParams, config } = {}) {
1043
+ const { client: request = client, ...requestConfig } = config ?? {};
1044
+ if (!pathParams.apiKeyId) {
1045
+ throw new Error(`Missing required path parameter: apiKeyId`);
1046
+ }
1047
+ const data = await request({
1048
+ method: "GET",
1049
+ url: `/api/key/${pathParams.apiKeyId}/webhook/logs`,
1050
+ queryParams,
1051
+ ...requestConfig,
1052
+ headers: {
1053
+ ...requestConfig.headers
1054
+ }
1055
+ });
1056
+ return data;
1057
+ }
1058
+ /**
1059
+ * @summary Update the web config for a group of smartlocks
1060
+ * @link /bulk-web-config
1061
+ */ async function postSmartlockBulkWebConfigResource({ body, config } = {}) {
1062
+ const { client: request = client, ...requestConfig } = config ?? {};
1063
+ const data = await request({
1064
+ method: "POST",
1065
+ url: `/bulk-web-config`,
1066
+ body: body,
1067
+ ...requestConfig,
1068
+ headers: {
1069
+ ...requestConfig.headers
1070
+ }
1071
+ });
1072
+ return data;
1073
+ }
1074
+ /**
1075
+ * @summary Get a list of companies
1076
+ * @link /company
1077
+ */ async function getCompaniesResource({ config } = {}) {
1078
+ const { client: request = client, ...requestConfig } = config ?? {};
1079
+ const data = await request({
1080
+ method: "GET",
1081
+ url: `/company`,
1082
+ ...requestConfig,
1083
+ headers: {
1084
+ ...requestConfig.headers
1085
+ }
1086
+ });
1087
+ return data;
1088
+ }
1089
+ /**
1090
+ * @summary Get all notifications attached to your account
1091
+ * @link /notification
1092
+ */ async function getNotificationsResource({ queryParams, config } = {}) {
1093
+ const { client: request = client, ...requestConfig } = config ?? {};
1094
+ const data = await request({
1095
+ method: "GET",
1096
+ url: `/notification`,
1097
+ queryParams,
1098
+ ...requestConfig,
1099
+ headers: {
1100
+ ...requestConfig.headers
1101
+ }
1102
+ });
1103
+ return data;
1104
+ }
1105
+ /**
1106
+ * @summary Create a notification configuration
1107
+ * @link /notification
1108
+ */ async function putNotificationsResource({ body, config } = {}) {
1109
+ const { client: request = client, ...requestConfig } = config ?? {};
1110
+ const data = await request({
1111
+ method: "PUT",
1112
+ url: `/notification`,
1113
+ body: body,
1114
+ ...requestConfig,
1115
+ headers: {
1116
+ ...requestConfig.headers
1117
+ }
1118
+ });
1119
+ return data;
1120
+ }
1121
+ /**
1122
+ * @summary Get a notification configuration
1123
+ * @link /notification/{notificationId}
1124
+ */ async function getNotificationResource({ pathParams, config } = {}) {
1125
+ const { client: request = client, ...requestConfig } = config ?? {};
1126
+ if (!pathParams.notificationId) {
1127
+ throw new Error(`Missing required path parameter: notificationId`);
1128
+ }
1129
+ const data = await request({
1130
+ method: "GET",
1131
+ url: `/notification/${pathParams.notificationId}`,
1132
+ ...requestConfig,
1133
+ headers: {
1134
+ ...requestConfig.headers
1135
+ }
1136
+ });
1137
+ return data;
1138
+ }
1139
+ /**
1140
+ * @summary Update a notification configuration
1141
+ * @link /notification/{notificationId}
1142
+ */ async function postNotificationResource({ pathParams, body, config } = {}) {
1143
+ const { client: request = client, ...requestConfig } = config ?? {};
1144
+ if (!pathParams.notificationId) {
1145
+ throw new Error(`Missing required path parameter: notificationId`);
1146
+ }
1147
+ const data = await request({
1148
+ method: "POST",
1149
+ url: `/notification/${pathParams.notificationId}`,
1150
+ body: body,
1151
+ ...requestConfig,
1152
+ headers: {
1153
+ ...requestConfig.headers
1154
+ }
1155
+ });
1156
+ return data;
1157
+ }
1158
+ /**
1159
+ * @summary Delete a notification configuration
1160
+ * @link /notification/{notificationId}
1161
+ */ async function deleteNotificationResource({ pathParams, config } = {}) {
1162
+ const { client: request = client, ...requestConfig } = config ?? {};
1163
+ if (!pathParams.notificationId) {
1164
+ throw new Error(`Missing required path parameter: notificationId`);
1165
+ }
1166
+ const data = await request({
1167
+ method: "DELETE",
1168
+ url: `/notification/${pathParams.notificationId}`,
1169
+ ...requestConfig,
1170
+ headers: {
1171
+ ...requestConfig.headers
1172
+ }
1173
+ });
1174
+ return data;
1175
+ }
1176
+ /**
1177
+ * @summary Get all intercom brands
1178
+ * @link /opener/brand
1179
+ */ async function getOpenerBrandsResource({ config } = {}) {
1180
+ const { client: request = client, ...requestConfig } = config ?? {};
1181
+ const data = await request({
1182
+ method: "GET",
1183
+ url: `/opener/brand`,
1184
+ ...requestConfig,
1185
+ headers: {
1186
+ ...requestConfig.headers
1187
+ }
1188
+ });
1189
+ return data;
1190
+ }
1191
+ /**
1192
+ * @summary Get an intercom brand
1193
+ * @link /opener/brand/{brandId}
1194
+ */ async function getOpenerBrandResource({ pathParams, config } = {}) {
1195
+ const { client: request = client, ...requestConfig } = config ?? {};
1196
+ if (!pathParams.brandId) {
1197
+ throw new Error(`Missing required path parameter: brandId`);
1198
+ }
1199
+ const data = await request({
1200
+ method: "GET",
1201
+ url: `/opener/brand/${pathParams.brandId}`,
1202
+ ...requestConfig,
1203
+ headers: {
1204
+ ...requestConfig.headers
1205
+ }
1206
+ });
1207
+ return data;
1208
+ }
1209
+ /**
1210
+ * @summary Get a list of intercom models
1211
+ * @link /opener/intercom
1212
+ */ async function getOpenerIntercomsResource({ queryParams, config } = {}) {
1213
+ const { client: request = client, ...requestConfig } = config ?? {};
1214
+ const data = await request({
1215
+ method: "GET",
1216
+ url: `/opener/intercom`,
1217
+ queryParams,
1218
+ ...requestConfig,
1219
+ headers: {
1220
+ ...requestConfig.headers
1221
+ }
1222
+ });
1223
+ return data;
1224
+ }
1225
+ /**
1226
+ * @summary Get an intercom model
1227
+ * @link /opener/intercom/{intercomId}
1228
+ */ async function getOpenerIntercomResource({ pathParams, config } = {}) {
1229
+ const { client: request = client, ...requestConfig } = config ?? {};
1230
+ if (!pathParams.intercomId) {
1231
+ throw new Error(`Missing required path parameter: intercomId`);
1232
+ }
1233
+ const data = await request({
1234
+ method: "GET",
1235
+ url: `/opener/intercom/${pathParams.intercomId}`,
1236
+ ...requestConfig,
1237
+ headers: {
1238
+ ...requestConfig.headers
1239
+ }
1240
+ });
1241
+ return data;
1242
+ }
1243
+ /**
1244
+ * @summary Get a list of services
1245
+ * @link /service
1246
+ */ async function getServicesResource({ queryParams, config } = {}) {
1247
+ const { client: request = client, ...requestConfig } = config ?? {};
1248
+ const data = await request({
1249
+ method: "GET",
1250
+ url: `/service`,
1251
+ queryParams,
1252
+ ...requestConfig,
1253
+ headers: {
1254
+ ...requestConfig.headers
1255
+ }
1256
+ });
1257
+ return data;
1258
+ }
1259
+ /**
1260
+ * @summary Get a service
1261
+ * @link /service/{serviceId}
1262
+ */ async function getServiceResource({ pathParams, config } = {}) {
1263
+ const { client: request = client, ...requestConfig } = config ?? {};
1264
+ if (!pathParams.serviceId) {
1265
+ throw new Error(`Missing required path parameter: serviceId`);
1266
+ }
1267
+ const data = await request({
1268
+ method: "GET",
1269
+ url: `/service/${pathParams.serviceId}`,
1270
+ ...requestConfig,
1271
+ headers: {
1272
+ ...requestConfig.headers
1273
+ }
1274
+ });
1275
+ return data;
1276
+ }
1277
+ /**
1278
+ * @summary Link a service
1279
+ * @link /service/{serviceId}/link
1280
+ */ async function postServiceLinkResource({ pathParams, config } = {}) {
1281
+ const { client: request = client, ...requestConfig } = config ?? {};
1282
+ if (!pathParams.serviceId) {
1283
+ throw new Error(`Missing required path parameter: serviceId`);
1284
+ }
1285
+ const data = await request({
1286
+ method: "POST",
1287
+ url: `/service/${pathParams.serviceId}/link`,
1288
+ ...requestConfig,
1289
+ headers: {
1290
+ ...requestConfig.headers
1291
+ }
1292
+ });
1293
+ return data;
1294
+ }
1295
+ /**
1296
+ * @summary Sync a service
1297
+ * @link /service/{serviceId}/sync
1298
+ */ async function postServiceSyncResource({ pathParams, config } = {}) {
1299
+ const { client: request = client, ...requestConfig } = config ?? {};
1300
+ if (!pathParams.serviceId) {
1301
+ throw new Error(`Missing required path parameter: serviceId`);
1302
+ }
1303
+ const data = await request({
1304
+ method: "POST",
1305
+ url: `/service/${pathParams.serviceId}/sync`,
1306
+ ...requestConfig,
1307
+ headers: {
1308
+ ...requestConfig.headers
1309
+ }
1310
+ });
1311
+ return data;
1312
+ }
1313
+ /**
1314
+ * @summary Unlink a service
1315
+ * @link /service/{serviceId}/unlink
1316
+ */ async function postServiceUnlinkResource({ pathParams, config } = {}) {
1317
+ const { client: request = client, ...requestConfig } = config ?? {};
1318
+ if (!pathParams.serviceId) {
1319
+ throw new Error(`Missing required path parameter: serviceId`);
1320
+ }
1321
+ const data = await request({
1322
+ method: "POST",
1323
+ url: `/service/${pathParams.serviceId}/unlink`,
1324
+ ...requestConfig,
1325
+ headers: {
1326
+ ...requestConfig.headers
1327
+ }
1328
+ });
1329
+ return data;
1330
+ }
1331
+ /**
1332
+ * @summary Get a list of smartlocks
1333
+ * @link /smartlock
1334
+ */ async function getSmartlocksResource({ queryParams, config } = {}) {
1335
+ const { client: request = client, ...requestConfig } = config ?? {};
1336
+ const data = await request({
1337
+ method: "GET",
1338
+ url: `/smartlock`,
1339
+ queryParams,
1340
+ ...requestConfig,
1341
+ headers: {
1342
+ ...requestConfig.headers
1343
+ }
1344
+ });
1345
+ return data;
1346
+ }
1347
+ /**
1348
+ * @summary Get a list of smartlock authorizations for your smartlocks
1349
+ * @link /smartlock/auth
1350
+ */ async function getSmartlocksAuthsResource({ queryParams, config } = {}) {
1351
+ const { client: request = client, ...requestConfig } = config ?? {};
1352
+ const data = await request({
1353
+ method: "GET",
1354
+ url: `/smartlock/auth`,
1355
+ queryParams,
1356
+ ...requestConfig,
1357
+ headers: {
1358
+ ...requestConfig.headers
1359
+ }
1360
+ });
1361
+ return data;
1362
+ }
1363
+ /**
1364
+ * @summary Update smartlock authorizations asynchronously
1365
+ * @link /smartlock/auth
1366
+ */ async function postSmartlocksAuthsResource({ body, config } = {}) {
1367
+ const { client: request = client, ...requestConfig } = config ?? {};
1368
+ const data = await request({
1369
+ method: "POST",
1370
+ url: `/smartlock/auth`,
1371
+ body: body,
1372
+ ...requestConfig,
1373
+ headers: {
1374
+ ...requestConfig.headers
1375
+ }
1376
+ });
1377
+ return data;
1378
+ }
1379
+ /**
1380
+ * @summary Create smartlock authorizations asynchronously
1381
+ * @link /smartlock/auth
1382
+ */ async function putSmartlocksAuthsResource({ body, config } = {}) {
1383
+ const { client: request = client, ...requestConfig } = config ?? {};
1384
+ const data = await request({
1385
+ method: "PUT",
1386
+ url: `/smartlock/auth`,
1387
+ body: body,
1388
+ ...requestConfig,
1389
+ headers: {
1390
+ ...requestConfig.headers
1391
+ }
1392
+ });
1393
+ return data;
1394
+ }
1395
+ /**
1396
+ * @summary Delete smartlock authorizations asynchronously
1397
+ * @link /smartlock/auth
1398
+ */ async function deleteSmartlocksAuthsResource({ body, config } = {}) {
1399
+ const { client: request = client, ...requestConfig } = config ?? {};
1400
+ const data = await request({
1401
+ method: "DELETE",
1402
+ url: `/smartlock/auth`,
1403
+ body: body,
1404
+ ...requestConfig,
1405
+ headers: {
1406
+ ...requestConfig.headers
1407
+ }
1408
+ });
1409
+ return data;
1410
+ }
1411
+ /**
1412
+ * @summary Create smartlock authorizations asynchronously
1413
+ * @link /smartlock/auth/advanced
1414
+ */ async function putSmartlockAuthsAdvancedResource({ body, config } = {}) {
1415
+ const { client: request = client, ...requestConfig } = config ?? {};
1416
+ const data = await request({
1417
+ method: "PUT",
1418
+ url: `/smartlock/auth/advanced`,
1419
+ body: body,
1420
+ ...requestConfig,
1421
+ headers: {
1422
+ ...requestConfig.headers
1423
+ }
1424
+ });
1425
+ return data;
1426
+ }
1427
+ /**
1428
+ * @summary Get a paginated list of smartlock authorizations for your smartlocks
1429
+ * @link /smartlock/auth/paged
1430
+ */ async function getSmartlocksAuthsPaginatedResource({ queryParams, config } = {}) {
1431
+ const { client: request = client, ...requestConfig } = config ?? {};
1432
+ const data = await request({
1433
+ method: "GET",
1434
+ url: `/smartlock/auth/paged`,
1435
+ queryParams,
1436
+ ...requestConfig,
1437
+ headers: {
1438
+ ...requestConfig.headers
1439
+ }
1440
+ });
1441
+ return data;
1442
+ }
1443
+ /**
1444
+ * @summary Get a list of smartlock logs for all of your smartlocks
1445
+ * @link /smartlock/log
1446
+ */ async function getSmartlocksLogsResource({ queryParams, config } = {}) {
1447
+ const { client: request = client, ...requestConfig } = config ?? {};
1448
+ const data = await request({
1449
+ method: "GET",
1450
+ url: `/smartlock/log`,
1451
+ queryParams,
1452
+ ...requestConfig,
1453
+ headers: {
1454
+ ...requestConfig.headers
1455
+ }
1456
+ });
1457
+ return data;
1458
+ }
1459
+ /**
1460
+ * @summary Get a smartlock
1461
+ * @link /smartlock/{smartlockId}
1462
+ */ async function getSmartlockResource({ pathParams, config } = {}) {
1463
+ const { client: request = client, ...requestConfig } = config ?? {};
1464
+ if (!pathParams.smartlockId) {
1465
+ throw new Error(`Missing required path parameter: smartlockId`);
1466
+ }
1467
+ const data = await request({
1468
+ method: "GET",
1469
+ url: `/smartlock/${pathParams.smartlockId}`,
1470
+ ...requestConfig,
1471
+ headers: {
1472
+ ...requestConfig.headers
1473
+ }
1474
+ });
1475
+ return data;
1476
+ }
1477
+ /**
1478
+ * @summary Update a smartlock
1479
+ * @link /smartlock/{smartlockId}
1480
+ */ async function postSmartlockResource({ pathParams, body, config } = {}) {
1481
+ const { client: request = client, ...requestConfig } = config ?? {};
1482
+ if (!pathParams.smartlockId) {
1483
+ throw new Error(`Missing required path parameter: smartlockId`);
1484
+ }
1485
+ const data = await request({
1486
+ method: "POST",
1487
+ url: `/smartlock/${pathParams.smartlockId}`,
1488
+ body: body,
1489
+ ...requestConfig,
1490
+ headers: {
1491
+ ...requestConfig.headers
1492
+ }
1493
+ });
1494
+ return data;
1495
+ }
1496
+ /**
1497
+ * @summary Delete a smartlock
1498
+ * @link /smartlock/{smartlockId}
1499
+ */ async function deleteSmartlockResource({ pathParams, config } = {}) {
1500
+ const { client: request = client, ...requestConfig } = config ?? {};
1501
+ if (!pathParams.smartlockId) {
1502
+ throw new Error(`Missing required path parameter: smartlockId`);
1503
+ }
1504
+ const data = await request({
1505
+ method: "DELETE",
1506
+ url: `/smartlock/${pathParams.smartlockId}`,
1507
+ ...requestConfig,
1508
+ headers: {
1509
+ ...requestConfig.headers
1510
+ }
1511
+ });
1512
+ return data;
1513
+ }
1514
+ /**
1515
+ * @summary Lock & unlock a smartlock with options
1516
+ * @link /smartlock/{smartlockId}/action
1517
+ */ async function postSmartlockActionResource({ pathParams, body, config } = {}) {
1518
+ const { client: request = client, ...requestConfig } = config ?? {};
1519
+ if (!pathParams.smartlockId) {
1520
+ throw new Error(`Missing required path parameter: smartlockId`);
1521
+ }
1522
+ const data = await request({
1523
+ method: "POST",
1524
+ url: `/smartlock/${pathParams.smartlockId}/action`,
1525
+ body: body,
1526
+ ...requestConfig,
1527
+ headers: {
1528
+ ...requestConfig.headers
1529
+ }
1530
+ });
1531
+ return data;
1532
+ }
1533
+ /**
1534
+ * @summary Lock & unlock a smartlock with callback
1535
+ * @link /smartlock/{smartlockId}/action/advanced
1536
+ */ async function postSmartlockActionAdvancedResource({ pathParams, body, config } = {}) {
1537
+ const { client: request = client, ...requestConfig } = config ?? {};
1538
+ if (!pathParams.smartlockId) {
1539
+ throw new Error(`Missing required path parameter: smartlockId`);
1540
+ }
1541
+ const data = await request({
1542
+ method: "POST",
1543
+ url: `/smartlock/${pathParams.smartlockId}/action/advanced`,
1544
+ body: body,
1545
+ ...requestConfig,
1546
+ headers: {
1547
+ ...requestConfig.headers
1548
+ }
1549
+ });
1550
+ return data;
1551
+ }
1552
+ /**
1553
+ * @summary Lock a smartlock
1554
+ * @link /smartlock/{smartlockId}/action/lock
1555
+ */ async function postSmartlockLockActionResource({ pathParams, config } = {}) {
1556
+ const { client: request = client, ...requestConfig } = config ?? {};
1557
+ if (!pathParams.smartlockId) {
1558
+ throw new Error(`Missing required path parameter: smartlockId`);
1559
+ }
1560
+ const data = await request({
1561
+ method: "POST",
1562
+ url: `/smartlock/${pathParams.smartlockId}/action/lock`,
1563
+ ...requestConfig,
1564
+ headers: {
1565
+ ...requestConfig.headers
1566
+ }
1567
+ });
1568
+ return data;
1569
+ }
1570
+ /**
1571
+ * @summary Lock a smartlock
1572
+ * @link /smartlock/{smartlockId}/action/lock/advanced
1573
+ */ async function postSmartlockLockActionAdvancedResource({ pathParams, config } = {}) {
1574
+ const { client: request = client, ...requestConfig } = config ?? {};
1575
+ if (!pathParams.smartlockId) {
1576
+ throw new Error(`Missing required path parameter: smartlockId`);
1577
+ }
1578
+ const data = await request({
1579
+ method: "POST",
1580
+ url: `/smartlock/${pathParams.smartlockId}/action/lock/advanced`,
1581
+ ...requestConfig,
1582
+ headers: {
1583
+ ...requestConfig.headers
1584
+ }
1585
+ });
1586
+ return data;
1587
+ }
1588
+ /**
1589
+ * @summary Unlock a smartlock
1590
+ * @link /smartlock/{smartlockId}/action/unlock
1591
+ */ async function postSmartlockUnlockActionResource({ pathParams, config } = {}) {
1592
+ const { client: request = client, ...requestConfig } = config ?? {};
1593
+ if (!pathParams.smartlockId) {
1594
+ throw new Error(`Missing required path parameter: smartlockId`);
1595
+ }
1596
+ const data = await request({
1597
+ method: "POST",
1598
+ url: `/smartlock/${pathParams.smartlockId}/action/unlock`,
1599
+ ...requestConfig,
1600
+ headers: {
1601
+ ...requestConfig.headers
1602
+ }
1603
+ });
1604
+ return data;
1605
+ }
1606
+ /**
1607
+ * @summary Unlock a smartlock
1608
+ * @link /smartlock/{smartlockId}/action/unlock/advanced
1609
+ */ async function postSmartlockUnlockActionAdvancedResource({ pathParams, config } = {}) {
1610
+ const { client: request = client, ...requestConfig } = config ?? {};
1611
+ if (!pathParams.smartlockId) {
1612
+ throw new Error(`Missing required path parameter: smartlockId`);
1613
+ }
1614
+ const data = await request({
1615
+ method: "POST",
1616
+ url: `/smartlock/${pathParams.smartlockId}/action/unlock/advanced`,
1617
+ ...requestConfig,
1618
+ headers: {
1619
+ ...requestConfig.headers
1620
+ }
1621
+ });
1622
+ return data;
1623
+ }
1624
+ /**
1625
+ * @summary Update a smartlock admin PIN
1626
+ * @link /smartlock/{smartlockId}/admin/pin
1627
+ */ async function postSmartlockAdminPinResource({ pathParams, body, config } = {}) {
1628
+ const { client: request = client, ...requestConfig } = config ?? {};
1629
+ if (!pathParams.smartlockId) {
1630
+ throw new Error(`Missing required path parameter: smartlockId`);
1631
+ }
1632
+ const data = await request({
1633
+ method: "POST",
1634
+ url: `/smartlock/${pathParams.smartlockId}/admin/pin`,
1635
+ body: body,
1636
+ ...requestConfig,
1637
+ headers: {
1638
+ ...requestConfig.headers
1639
+ }
1640
+ });
1641
+ return data;
1642
+ }
1643
+ /**
1644
+ * @summary Update a smartlock advanced config
1645
+ * @link /smartlock/{smartlockId}/advanced/config
1646
+ */ async function postSmartlockAdvancedConfigResource({ pathParams, body, config } = {}) {
1647
+ const { client: request = client, ...requestConfig } = config ?? {};
1648
+ if (!pathParams.smartlockId) {
1649
+ throw new Error(`Missing required path parameter: smartlockId`);
1650
+ }
1651
+ const data = await request({
1652
+ method: "POST",
1653
+ url: `/smartlock/${pathParams.smartlockId}/advanced/config`,
1654
+ body: body,
1655
+ ...requestConfig,
1656
+ headers: {
1657
+ ...requestConfig.headers
1658
+ }
1659
+ });
1660
+ return data;
1661
+ }
1662
+ /**
1663
+ * @summary Update an opener advanced config
1664
+ * @link /smartlock/{smartlockId}/advanced/openerconfig
1665
+ */ async function postSmartlockOpenerAdvancedConfigResource({ pathParams, body, config } = {}) {
1666
+ const { client: request = client, ...requestConfig } = config ?? {};
1667
+ if (!pathParams.smartlockId) {
1668
+ throw new Error(`Missing required path parameter: smartlockId`);
1669
+ }
1670
+ const data = await request({
1671
+ method: "POST",
1672
+ url: `/smartlock/${pathParams.smartlockId}/advanced/openerconfig`,
1673
+ body: body,
1674
+ ...requestConfig,
1675
+ headers: {
1676
+ ...requestConfig.headers
1677
+ }
1678
+ });
1679
+ return data;
1680
+ }
1681
+ /**
1682
+ * @summary Update a smartdoor advanced config
1683
+ * @link /smartlock/{smartlockId}/advanced/smartdoorconfig
1684
+ */ async function postSmartdoorAdvancedConfigResource({ pathParams, body, config } = {}) {
1685
+ const { client: request = client, ...requestConfig } = config ?? {};
1686
+ if (!pathParams.smartlockId) {
1687
+ throw new Error(`Missing required path parameter: smartlockId`);
1688
+ }
1689
+ const data = await request({
1690
+ method: "POST",
1691
+ url: `/smartlock/${pathParams.smartlockId}/advanced/smartdoorconfig`,
1692
+ body: body,
1693
+ ...requestConfig,
1694
+ headers: {
1695
+ ...requestConfig.headers
1696
+ }
1697
+ });
1698
+ return data;
1699
+ }
1700
+ /**
1701
+ * @summary Get a list of smartlock authorizations
1702
+ * @link /smartlock/{smartlockId}/auth
1703
+ */ async function getSmartlockAuthsResource({ pathParams, queryParams, config } = {}) {
1704
+ const { client: request = client, ...requestConfig } = config ?? {};
1705
+ if (!pathParams.smartlockId) {
1706
+ throw new Error(`Missing required path parameter: smartlockId`);
1707
+ }
1708
+ const data = await request({
1709
+ method: "GET",
1710
+ url: `/smartlock/${pathParams.smartlockId}/auth`,
1711
+ queryParams,
1712
+ ...requestConfig,
1713
+ headers: {
1714
+ ...requestConfig.headers
1715
+ }
1716
+ });
1717
+ return data;
1718
+ }
1719
+ /**
1720
+ * @summary Create a smartlock authorization asynchronously
1721
+ * @link /smartlock/{smartlockId}/auth
1722
+ */ async function putSmartlockAuthsResource({ pathParams, body, config } = {}) {
1723
+ const { client: request = client, ...requestConfig } = config ?? {};
1724
+ if (!pathParams.smartlockId) {
1725
+ throw new Error(`Missing required path parameter: smartlockId`);
1726
+ }
1727
+ const data = await request({
1728
+ method: "PUT",
1729
+ url: `/smartlock/${pathParams.smartlockId}/auth`,
1730
+ body: body,
1731
+ ...requestConfig,
1732
+ headers: {
1733
+ ...requestConfig.headers
1734
+ }
1735
+ });
1736
+ return data;
1737
+ }
1738
+ /**
1739
+ * @summary Generate a new smartlock auth with a shared key
1740
+ * @link /smartlock/{smartlockId}/auth/advanced/sharedkey
1741
+ */ async function postSmartlockAuthWithSharedKeyResource({ pathParams, body, config } = {}) {
1742
+ const { client: request = client, ...requestConfig } = config ?? {};
1743
+ if (!pathParams.smartlockId) {
1744
+ throw new Error(`Missing required path parameter: smartlockId`);
1745
+ }
1746
+ const data = await request({
1747
+ method: "POST",
1748
+ url: `/smartlock/${pathParams.smartlockId}/auth/advanced/sharedkey`,
1749
+ body: body,
1750
+ ...requestConfig,
1751
+ headers: {
1752
+ ...requestConfig.headers
1753
+ }
1754
+ });
1755
+ return data;
1756
+ }
1757
+ /**
1758
+ * @summary Get a smartlock authorization
1759
+ * @link /smartlock/{smartlockId}/auth/{id}
1760
+ */ async function getSmartlockAuthResource({ pathParams, config } = {}) {
1761
+ const { client: request = client, ...requestConfig } = config ?? {};
1762
+ if (!pathParams.smartlockId) {
1763
+ throw new Error(`Missing required path parameter: smartlockId`);
1764
+ }
1765
+ if (!pathParams.id) {
1766
+ throw new Error(`Missing required path parameter: id`);
1767
+ }
1768
+ const data = await request({
1769
+ method: "GET",
1770
+ url: `/smartlock/${pathParams.smartlockId}/auth/${pathParams.id}`,
1771
+ ...requestConfig,
1772
+ headers: {
1773
+ ...requestConfig.headers
1774
+ }
1775
+ });
1776
+ return data;
1777
+ }
1778
+ /**
1779
+ * @summary Update a smartlock authorization asynchronously
1780
+ * @link /smartlock/{smartlockId}/auth/{id}
1781
+ */ async function postSmartlockAuthResource({ pathParams, body, config } = {}) {
1782
+ const { client: request = client, ...requestConfig } = config ?? {};
1783
+ if (!pathParams.smartlockId) {
1784
+ throw new Error(`Missing required path parameter: smartlockId`);
1785
+ }
1786
+ if (!pathParams.id) {
1787
+ throw new Error(`Missing required path parameter: id`);
1788
+ }
1789
+ const data = await request({
1790
+ method: "POST",
1791
+ url: `/smartlock/${pathParams.smartlockId}/auth/${pathParams.id}`,
1792
+ body: body,
1793
+ ...requestConfig,
1794
+ headers: {
1795
+ ...requestConfig.headers
1796
+ }
1797
+ });
1798
+ return data;
1799
+ }
1800
+ /**
1801
+ * @summary Delete a smartlock authorization asynchronously
1802
+ * @link /smartlock/{smartlockId}/auth/{id}
1803
+ */ async function deleteSmartlockAuthResource({ pathParams, config } = {}) {
1804
+ const { client: request = client, ...requestConfig } = config ?? {};
1805
+ if (!pathParams.smartlockId) {
1806
+ throw new Error(`Missing required path parameter: smartlockId`);
1807
+ }
1808
+ if (!pathParams.id) {
1809
+ throw new Error(`Missing required path parameter: id`);
1810
+ }
1811
+ const data = await request({
1812
+ method: "DELETE",
1813
+ url: `/smartlock/${pathParams.smartlockId}/auth/${pathParams.id}`,
1814
+ ...requestConfig,
1815
+ headers: {
1816
+ ...requestConfig.headers
1817
+ }
1818
+ });
1819
+ return data;
1820
+ }
1821
+ /**
1822
+ * @summary Update a smartlock config
1823
+ * @link /smartlock/{smartlockId}/config
1824
+ */ async function postSmartlockConfigResource({ pathParams, body, config } = {}) {
1825
+ const { client: request = client, ...requestConfig } = config ?? {};
1826
+ if (!pathParams.smartlockId) {
1827
+ throw new Error(`Missing required path parameter: smartlockId`);
1828
+ }
1829
+ const data = await request({
1830
+ method: "POST",
1831
+ url: `/smartlock/${pathParams.smartlockId}/config`,
1832
+ body: body,
1833
+ ...requestConfig,
1834
+ headers: {
1835
+ ...requestConfig.headers
1836
+ }
1837
+ });
1838
+ return data;
1839
+ }
1840
+ /**
1841
+ * @summary Get a list of smartlock logs
1842
+ * @link /smartlock/{smartlockId}/log
1843
+ */ async function getSmartlockLogsResource({ pathParams, queryParams, config } = {}) {
1844
+ const { client: request = client, ...requestConfig } = config ?? {};
1845
+ if (!pathParams.smartlockId) {
1846
+ throw new Error(`Missing required path parameter: smartlockId`);
1847
+ }
1848
+ const data = await request({
1849
+ method: "GET",
1850
+ url: `/smartlock/${pathParams.smartlockId}/log`,
1851
+ queryParams,
1852
+ ...requestConfig,
1853
+ headers: {
1854
+ ...requestConfig.headers
1855
+ }
1856
+ });
1857
+ return data;
1858
+ }
1859
+ /**
1860
+ * @summary Sync a smartlock
1861
+ * @link /smartlock/{smartlockId}/sync
1862
+ */ async function postSmartlockSyncResource({ pathParams, config } = {}) {
1863
+ const { client: request = client, ...requestConfig } = config ?? {};
1864
+ if (!pathParams.smartlockId) {
1865
+ throw new Error(`Missing required path parameter: smartlockId`);
1866
+ }
1867
+ const data = await request({
1868
+ method: "POST",
1869
+ url: `/smartlock/${pathParams.smartlockId}/sync`,
1870
+ ...requestConfig,
1871
+ headers: {
1872
+ ...requestConfig.headers
1873
+ }
1874
+ });
1875
+ return data;
1876
+ }
1877
+ /**
1878
+ * @summary Update a smartlock web config
1879
+ * @link /smartlock/{smartlockId}/web/config
1880
+ */ async function postSmartlockWebConfigResource({ pathParams, body, config } = {}) {
1881
+ const { client: request = client, ...requestConfig } = config ?? {};
1882
+ if (!pathParams.smartlockId) {
1883
+ throw new Error(`Missing required path parameter: smartlockId`);
1884
+ }
1885
+ const data = await request({
1886
+ method: "POST",
1887
+ url: `/smartlock/${pathParams.smartlockId}/web/config`,
1888
+ body: body,
1889
+ ...requestConfig,
1890
+ headers: {
1891
+ ...requestConfig.headers
1892
+ }
1893
+ });
1894
+ return data;
1895
+ }
1896
+ const operationsByPath = {
1897
+ "GET /account": getAccountsResource,
1898
+ "POST /account": postAccountsResource,
1899
+ "DELETE /account": deleteAccountsResource,
1900
+ "POST /account/email/change": postAccountEmailChangeResource,
1901
+ "POST /account/email/verify": postAccountEmailVerifyResource,
1902
+ "GET /account/integration": getAccountIntegrationsResource,
1903
+ "DELETE /account/integration": deleteAccountIntegrationsResource,
1904
+ "POST /account/otp": postAccountOtpResource,
1905
+ "PUT /account/otp": putAccountOtpResource,
1906
+ "DELETE /account/otp": deleteAccountOtpResource,
1907
+ "POST /account/password/reset": postAccountPasswordResetResource,
1908
+ "GET /account/setting": getAccountSettingResource,
1909
+ "PUT /account/setting": putAccountSettingResource,
1910
+ "DELETE /account/setting": deleteAccountSettingResource,
1911
+ "GET /account/sub": getAccountSubsResource,
1912
+ "PUT /account/sub": putAccountSubsResource,
1913
+ "GET /account/sub/{accountId}": getAccountSubResource,
1914
+ "POST /account/sub/{accountId}": postAccountSubResource,
1915
+ "DELETE /account/sub/{accountId}": deleteAccountSubResource,
1916
+ "GET /account/user": getAccountUsersResource,
1917
+ "PUT /account/user": putAccountUsersResource,
1918
+ "GET /account/user/{accountUserId}": getAccountUserResource,
1919
+ "POST /account/user/{accountUserId}": postAccountUserResource,
1920
+ "DELETE /account/user/{accountUserId}": deleteAccountUserResource,
1921
+ "GET /address": getAddressesResource,
1922
+ "PUT /address": putAddressesResource,
1923
+ "GET /address/token/{id}": getAddressTokenResource,
1924
+ "GET /address/token/{id}/redeem": getAddressTokenRedeemResource,
1925
+ "POST /address/token/{id}/redeem": postAddressTokenRedeemResource,
1926
+ "POST /address/{addressId}": postAddressResource,
1927
+ "DELETE /address/{addressId}": deleteAddressResource,
1928
+ "GET /address/{addressId}/reservation": getAddressReservationsResource,
1929
+ "POST /address/{addressId}/reservation/{id}/issue": postAddressReservationIssueResource,
1930
+ "POST /address/{addressId}/reservation/{id}/revoke": postAddressReservationRevokeResource,
1931
+ "POST /address/{addressId}/reservation/{id}/update/accesstimes": postReservationAccessTimesUpdateResource,
1932
+ "GET /address/{addressId}/token": getAddressTokensResource,
1933
+ "GET /address/{addressId}/unit": getAddressUnitsResource,
1934
+ "PUT /address/{addressId}/unit": putAddressUnitsResource,
1935
+ "DELETE /address/{addressId}/unit": deleteAddressUnitsResource,
1936
+ "DELETE /address/{addressId}/unit/{id}": deleteAddressUnitResource,
1937
+ "GET /api/decentralWebhook": getDecentralWebhooksResource,
1938
+ "PUT /api/decentralWebhook": putDecentralWebhooksResource,
1939
+ "DELETE /api/decentralWebhook/{id}": deleteDecentralWebhookResource,
1940
+ "GET /api/key": getApiKeysResource,
1941
+ "PUT /api/key": putApiKeysResource,
1942
+ "POST /api/key/{apiKeyId}": postApiKeyResource,
1943
+ "DELETE /api/key/{apiKeyId}": deleteApiKeyResource,
1944
+ "GET /api/key/{apiKeyId}/advanced": getApiKeyAdvancedResource,
1945
+ "POST /api/key/{apiKeyId}/advanced": postApiKeyAdvancedResource,
1946
+ "PUT /api/key/{apiKeyId}/advanced": putApiKeyAdvancedResource,
1947
+ "DELETE /api/key/{apiKeyId}/advanced": deleteApiKeyAdvancedResource,
1948
+ "POST /api/key/{apiKeyId}/advanced/reactivate": postApiKeyAdvancedReactivateResource,
1949
+ "GET /api/key/{apiKeyId}/token": getApiKeyTokensResource,
1950
+ "PUT /api/key/{apiKeyId}/token": putApiKeyTokensResource,
1951
+ "POST /api/key/{apiKeyId}/token/{id}": postApiKeyTokenResource,
1952
+ "DELETE /api/key/{apiKeyId}/token/{id}": deleteApiKeyTokenResource,
1953
+ "GET /api/key/{apiKeyId}/webhook/logs": getWebhookLogsResource,
1954
+ "POST /bulk-web-config": postSmartlockBulkWebConfigResource,
1955
+ "GET /company": getCompaniesResource,
1956
+ "GET /notification": getNotificationsResource,
1957
+ "PUT /notification": putNotificationsResource,
1958
+ "GET /notification/{notificationId}": getNotificationResource,
1959
+ "POST /notification/{notificationId}": postNotificationResource,
1960
+ "DELETE /notification/{notificationId}": deleteNotificationResource,
1961
+ "GET /opener/brand": getOpenerBrandsResource,
1962
+ "GET /opener/brand/{brandId}": getOpenerBrandResource,
1963
+ "GET /opener/intercom": getOpenerIntercomsResource,
1964
+ "GET /opener/intercom/{intercomId}": getOpenerIntercomResource,
1965
+ "GET /service": getServicesResource,
1966
+ "GET /service/{serviceId}": getServiceResource,
1967
+ "POST /service/{serviceId}/link": postServiceLinkResource,
1968
+ "POST /service/{serviceId}/sync": postServiceSyncResource,
1969
+ "POST /service/{serviceId}/unlink": postServiceUnlinkResource,
1970
+ "GET /smartlock": getSmartlocksResource,
1971
+ "GET /smartlock/auth": getSmartlocksAuthsResource,
1972
+ "POST /smartlock/auth": postSmartlocksAuthsResource,
1973
+ "PUT /smartlock/auth": putSmartlocksAuthsResource,
1974
+ "DELETE /smartlock/auth": deleteSmartlocksAuthsResource,
1975
+ "PUT /smartlock/auth/advanced": putSmartlockAuthsAdvancedResource,
1976
+ "GET /smartlock/auth/paged": getSmartlocksAuthsPaginatedResource,
1977
+ "GET /smartlock/log": getSmartlocksLogsResource,
1978
+ "GET /smartlock/{smartlockId}": getSmartlockResource,
1979
+ "POST /smartlock/{smartlockId}": postSmartlockResource,
1980
+ "DELETE /smartlock/{smartlockId}": deleteSmartlockResource,
1981
+ "POST /smartlock/{smartlockId}/action": postSmartlockActionResource,
1982
+ "POST /smartlock/{smartlockId}/action/advanced": postSmartlockActionAdvancedResource,
1983
+ "POST /smartlock/{smartlockId}/action/lock": postSmartlockLockActionResource,
1984
+ "POST /smartlock/{smartlockId}/action/lock/advanced": postSmartlockLockActionAdvancedResource,
1985
+ "POST /smartlock/{smartlockId}/action/unlock": postSmartlockUnlockActionResource,
1986
+ "POST /smartlock/{smartlockId}/action/unlock/advanced": postSmartlockUnlockActionAdvancedResource,
1987
+ "POST /smartlock/{smartlockId}/admin/pin": postSmartlockAdminPinResource,
1988
+ "POST /smartlock/{smartlockId}/advanced/config": postSmartlockAdvancedConfigResource,
1989
+ "POST /smartlock/{smartlockId}/advanced/openerconfig": postSmartlockOpenerAdvancedConfigResource,
1990
+ "POST /smartlock/{smartlockId}/advanced/smartdoorconfig": postSmartdoorAdvancedConfigResource,
1991
+ "GET /smartlock/{smartlockId}/auth": getSmartlockAuthsResource,
1992
+ "PUT /smartlock/{smartlockId}/auth": putSmartlockAuthsResource,
1993
+ "POST /smartlock/{smartlockId}/auth/advanced/sharedkey": postSmartlockAuthWithSharedKeyResource,
1994
+ "GET /smartlock/{smartlockId}/auth/{id}": getSmartlockAuthResource,
1995
+ "POST /smartlock/{smartlockId}/auth/{id}": postSmartlockAuthResource,
1996
+ "DELETE /smartlock/{smartlockId}/auth/{id}": deleteSmartlockAuthResource,
1997
+ "POST /smartlock/{smartlockId}/config": postSmartlockConfigResource,
1998
+ "GET /smartlock/{smartlockId}/log": getSmartlockLogsResource,
1999
+ "POST /smartlock/{smartlockId}/sync": postSmartlockSyncResource,
2000
+ "POST /smartlock/{smartlockId}/web/config": postSmartlockWebConfigResource
2001
+ };
2002
+ const operationsByTag = {
2003
+ account: {
2004
+ getAccountsResource,
2005
+ postAccountsResource,
2006
+ deleteAccountsResource,
2007
+ postAccountEmailChangeResource,
2008
+ postAccountEmailVerifyResource,
2009
+ getAccountIntegrationsResource,
2010
+ deleteAccountIntegrationsResource,
2011
+ postAccountOtpResource,
2012
+ putAccountOtpResource,
2013
+ deleteAccountOtpResource,
2014
+ postAccountPasswordResetResource,
2015
+ getAccountSettingResource,
2016
+ putAccountSettingResource,
2017
+ deleteAccountSettingResource,
2018
+ getAccountSubsResource,
2019
+ putAccountSubsResource,
2020
+ getAccountSubResource,
2021
+ postAccountSubResource,
2022
+ deleteAccountSubResource
2023
+ },
2024
+ accountuser: {
2025
+ getAccountUsersResource,
2026
+ putAccountUsersResource,
2027
+ getAccountUserResource,
2028
+ postAccountUserResource,
2029
+ deleteAccountUserResource
2030
+ },
2031
+ address: {
2032
+ getAddressesResource,
2033
+ putAddressesResource,
2034
+ postAddressResource,
2035
+ deleteAddressResource,
2036
+ getAddressUnitsResource,
2037
+ putAddressUnitsResource,
2038
+ deleteAddressUnitsResource,
2039
+ deleteAddressUnitResource
2040
+ },
2041
+ addresstoken: {
2042
+ getAddressTokenResource,
2043
+ getAddressTokenRedeemResource,
2044
+ postAddressTokenRedeemResource,
2045
+ getAddressTokensResource
2046
+ },
2047
+ addressreservation: {
2048
+ getAddressReservationsResource,
2049
+ postAddressReservationIssueResource,
2050
+ postAddressReservationRevokeResource,
2051
+ postReservationAccessTimesUpdateResource
2052
+ },
2053
+ advancedapi: {
2054
+ getDecentralWebhooksResource,
2055
+ putDecentralWebhooksResource,
2056
+ deleteDecentralWebhookResource,
2057
+ getWebhookLogsResource,
2058
+ putSmartlockAuthsAdvancedResource,
2059
+ postSmartlockActionAdvancedResource,
2060
+ postSmartlockLockActionAdvancedResource,
2061
+ postSmartlockUnlockActionAdvancedResource
2062
+ },
2063
+ apikey: {
2064
+ getApiKeysResource,
2065
+ putApiKeysResource,
2066
+ postApiKeyResource,
2067
+ deleteApiKeyResource,
2068
+ getApiKeyAdvancedResource,
2069
+ postApiKeyAdvancedResource,
2070
+ putApiKeyAdvancedResource,
2071
+ deleteApiKeyAdvancedResource,
2072
+ postApiKeyAdvancedReactivateResource,
2073
+ getApiKeyTokensResource,
2074
+ putApiKeyTokensResource,
2075
+ postApiKeyTokenResource,
2076
+ deleteApiKeyTokenResource
2077
+ },
2078
+ smartlock: {
2079
+ postSmartlockBulkWebConfigResource,
2080
+ getSmartlocksResource,
2081
+ getSmartlockResource,
2082
+ postSmartlockResource,
2083
+ deleteSmartlockResource,
2084
+ postSmartlockActionResource,
2085
+ postSmartlockLockActionResource,
2086
+ postSmartlockUnlockActionResource,
2087
+ postSmartlockAdminPinResource,
2088
+ postSmartlockAdvancedConfigResource,
2089
+ postSmartlockOpenerAdvancedConfigResource,
2090
+ postSmartdoorAdvancedConfigResource,
2091
+ postSmartlockConfigResource,
2092
+ postSmartlockSyncResource,
2093
+ postSmartlockWebConfigResource
2094
+ },
2095
+ company: {
2096
+ getCompaniesResource
2097
+ },
2098
+ notification: {
2099
+ getNotificationsResource,
2100
+ putNotificationsResource,
2101
+ getNotificationResource,
2102
+ postNotificationResource,
2103
+ deleteNotificationResource
2104
+ },
2105
+ opener: {
2106
+ getOpenerBrandsResource,
2107
+ getOpenerBrandResource,
2108
+ getOpenerIntercomsResource,
2109
+ getOpenerIntercomResource
2110
+ },
2111
+ service: {
2112
+ getServicesResource,
2113
+ getServiceResource,
2114
+ postServiceLinkResource,
2115
+ postServiceSyncResource,
2116
+ postServiceUnlinkResource
2117
+ },
2118
+ smartlockauth: {
2119
+ getSmartlocksAuthsResource,
2120
+ postSmartlocksAuthsResource,
2121
+ putSmartlocksAuthsResource,
2122
+ deleteSmartlocksAuthsResource,
2123
+ getSmartlocksAuthsPaginatedResource,
2124
+ getSmartlockAuthsResource,
2125
+ putSmartlockAuthsResource,
2126
+ postSmartlockAuthWithSharedKeyResource,
2127
+ getSmartlockAuthResource,
2128
+ postSmartlockAuthResource,
2129
+ deleteSmartlockAuthResource
2130
+ },
2131
+ smartlocklog: {
2132
+ getSmartlocksLogsResource,
2133
+ getSmartlockLogsResource
2134
+ }
2135
+ };
2136
+ const tagDictionary = {
2137
+ account: {
2138
+ GET: [
2139
+ "getAccountsResource",
2140
+ "getAccountIntegrationsResource",
2141
+ "getAccountSettingResource",
2142
+ "getAccountSubsResource",
2143
+ "getAccountSubResource"
2144
+ ],
2145
+ POST: [
2146
+ "postAccountsResource",
2147
+ "postAccountEmailChangeResource",
2148
+ "postAccountEmailVerifyResource",
2149
+ "postAccountOtpResource",
2150
+ "postAccountPasswordResetResource",
2151
+ "postAccountSubResource"
2152
+ ],
2153
+ DELETE: [
2154
+ "deleteAccountsResource",
2155
+ "deleteAccountIntegrationsResource",
2156
+ "deleteAccountOtpResource",
2157
+ "deleteAccountSettingResource",
2158
+ "deleteAccountSubResource"
2159
+ ],
2160
+ PUT: [
2161
+ "putAccountOtpResource",
2162
+ "putAccountSettingResource",
2163
+ "putAccountSubsResource"
2164
+ ]
2165
+ },
2166
+ accountuser: {
2167
+ GET: [
2168
+ "getAccountUsersResource",
2169
+ "getAccountUserResource"
2170
+ ],
2171
+ PUT: [
2172
+ "putAccountUsersResource"
2173
+ ],
2174
+ POST: [
2175
+ "postAccountUserResource"
2176
+ ],
2177
+ DELETE: [
2178
+ "deleteAccountUserResource"
2179
+ ]
2180
+ },
2181
+ address: {
2182
+ GET: [
2183
+ "getAddressesResource",
2184
+ "getAddressUnitsResource"
2185
+ ],
2186
+ PUT: [
2187
+ "putAddressesResource",
2188
+ "putAddressUnitsResource"
2189
+ ],
2190
+ POST: [
2191
+ "postAddressResource"
2192
+ ],
2193
+ DELETE: [
2194
+ "deleteAddressResource",
2195
+ "deleteAddressUnitsResource",
2196
+ "deleteAddressUnitResource"
2197
+ ]
2198
+ },
2199
+ addresstoken: {
2200
+ GET: [
2201
+ "getAddressTokenResource",
2202
+ "getAddressTokenRedeemResource",
2203
+ "getAddressTokensResource"
2204
+ ],
2205
+ POST: [
2206
+ "postAddressTokenRedeemResource"
2207
+ ]
2208
+ },
2209
+ addressreservation: {
2210
+ GET: [
2211
+ "getAddressReservationsResource"
2212
+ ],
2213
+ POST: [
2214
+ "postAddressReservationIssueResource",
2215
+ "postAddressReservationRevokeResource",
2216
+ "postReservationAccessTimesUpdateResource"
2217
+ ]
2218
+ },
2219
+ advancedapi: {
2220
+ GET: [
2221
+ "getDecentralWebhooksResource",
2222
+ "getWebhookLogsResource"
2223
+ ],
2224
+ PUT: [
2225
+ "putDecentralWebhooksResource",
2226
+ "putSmartlockAuthsAdvancedResource"
2227
+ ],
2228
+ DELETE: [
2229
+ "deleteDecentralWebhookResource"
2230
+ ],
2231
+ POST: [
2232
+ "postSmartlockActionAdvancedResource",
2233
+ "postSmartlockLockActionAdvancedResource",
2234
+ "postSmartlockUnlockActionAdvancedResource"
2235
+ ]
2236
+ },
2237
+ apikey: {
2238
+ GET: [
2239
+ "getApiKeysResource",
2240
+ "getApiKeyAdvancedResource",
2241
+ "getApiKeyTokensResource"
2242
+ ],
2243
+ PUT: [
2244
+ "putApiKeysResource",
2245
+ "putApiKeyAdvancedResource",
2246
+ "putApiKeyTokensResource"
2247
+ ],
2248
+ POST: [
2249
+ "postApiKeyResource",
2250
+ "postApiKeyAdvancedResource",
2251
+ "postApiKeyAdvancedReactivateResource",
2252
+ "postApiKeyTokenResource"
2253
+ ],
2254
+ DELETE: [
2255
+ "deleteApiKeyResource",
2256
+ "deleteApiKeyAdvancedResource",
2257
+ "deleteApiKeyTokenResource"
2258
+ ]
2259
+ },
2260
+ smartlock: {
2261
+ POST: [
2262
+ "postSmartlockBulkWebConfigResource",
2263
+ "postSmartlockResource",
2264
+ "postSmartlockActionResource",
2265
+ "postSmartlockLockActionResource",
2266
+ "postSmartlockUnlockActionResource",
2267
+ "postSmartlockAdminPinResource",
2268
+ "postSmartlockAdvancedConfigResource",
2269
+ "postSmartlockOpenerAdvancedConfigResource",
2270
+ "postSmartdoorAdvancedConfigResource",
2271
+ "postSmartlockConfigResource",
2272
+ "postSmartlockSyncResource",
2273
+ "postSmartlockWebConfigResource"
2274
+ ],
2275
+ GET: [
2276
+ "getSmartlocksResource",
2277
+ "getSmartlockResource"
2278
+ ],
2279
+ DELETE: [
2280
+ "deleteSmartlockResource"
2281
+ ]
2282
+ },
2283
+ company: {
2284
+ GET: [
2285
+ "getCompaniesResource"
2286
+ ]
2287
+ },
2288
+ notification: {
2289
+ GET: [
2290
+ "getNotificationsResource",
2291
+ "getNotificationResource"
2292
+ ],
2293
+ PUT: [
2294
+ "putNotificationsResource"
2295
+ ],
2296
+ POST: [
2297
+ "postNotificationResource"
2298
+ ],
2299
+ DELETE: [
2300
+ "deleteNotificationResource"
2301
+ ]
2302
+ },
2303
+ opener: {
2304
+ GET: [
2305
+ "getOpenerBrandsResource",
2306
+ "getOpenerBrandResource",
2307
+ "getOpenerIntercomsResource",
2308
+ "getOpenerIntercomResource"
2309
+ ]
2310
+ },
2311
+ service: {
2312
+ GET: [
2313
+ "getServicesResource",
2314
+ "getServiceResource"
2315
+ ],
2316
+ POST: [
2317
+ "postServiceLinkResource",
2318
+ "postServiceSyncResource",
2319
+ "postServiceUnlinkResource"
2320
+ ]
2321
+ },
2322
+ smartlockauth: {
2323
+ GET: [
2324
+ "getSmartlocksAuthsResource",
2325
+ "getSmartlocksAuthsPaginatedResource",
2326
+ "getSmartlockAuthsResource",
2327
+ "getSmartlockAuthResource"
2328
+ ],
2329
+ POST: [
2330
+ "postSmartlocksAuthsResource",
2331
+ "postSmartlockAuthWithSharedKeyResource",
2332
+ "postSmartlockAuthResource"
2333
+ ],
2334
+ PUT: [
2335
+ "putSmartlocksAuthsResource",
2336
+ "putSmartlockAuthsResource"
2337
+ ],
2338
+ DELETE: [
2339
+ "deleteSmartlocksAuthsResource",
2340
+ "deleteSmartlockAuthResource"
2341
+ ]
2342
+ },
2343
+ smartlocklog: {
2344
+ GET: [
2345
+ "getSmartlocksLogsResource",
2346
+ "getSmartlockLogsResource"
2347
+ ]
2348
+ }
2349
+ };
2350
+
2351
+ export { getSmartlocksLogsResource as $, getAccountUsersResource as A, getAccountsResource as B, getAddressReservationsResource as C, getAddressTokenRedeemResource as D, getAddressTokenResource as E, getAddressTokensResource as F, getAddressUnitsResource as G, getAddressesResource as H, getApiKeyAdvancedResource as I, getApiKeyTokensResource as J, getApiKeysResource as K, getCompaniesResource as L, getDecentralWebhooksResource as M, getNotificationResource as N, getNotificationsResource as O, getOpenerBrandResource as P, getOpenerBrandsResource as Q, getOpenerIntercomResource as R, getOpenerIntercomsResource as S, getServiceResource as T, getServicesResource as U, getSmartlockAuthResource as V, getSmartlockAuthsResource as W, getSmartlockLogsResource as X, getSmartlockResource as Y, getSmartlocksAuthsPaginatedResource as Z, getSmartlocksAuthsResource as _, operationsByPath as a, getSmartlocksResource as a0, getWebhookLogsResource as a1, postAccountEmailChangeResource as a2, postAccountEmailVerifyResource as a3, postAccountOtpResource as a4, postAccountPasswordResetResource as a5, postAccountSubResource as a6, postAccountUserResource as a7, postAccountsResource as a8, postAddressReservationIssueResource as a9, postSmartlockUnlockActionAdvancedResource as aA, postSmartlockUnlockActionResource as aB, postSmartlockWebConfigResource as aC, postSmartlocksAuthsResource as aD, putAccountOtpResource as aE, putAccountSettingResource as aF, putAccountSubsResource as aG, putAccountUsersResource as aH, putAddressUnitsResource as aI, putAddressesResource as aJ, putApiKeyAdvancedResource as aK, putApiKeyTokensResource as aL, putApiKeysResource as aM, putDecentralWebhooksResource as aN, putNotificationsResource as aO, putSmartlockAuthsAdvancedResource as aP, putSmartlockAuthsResource as aQ, putSmartlocksAuthsResource as aR, postAddressReservationRevokeResource as aa, postAddressResource as ab, postAddressTokenRedeemResource as ac, postApiKeyAdvancedReactivateResource as ad, postApiKeyAdvancedResource as ae, postApiKeyResource as af, postApiKeyTokenResource as ag, postNotificationResource as ah, postReservationAccessTimesUpdateResource as ai, postServiceLinkResource as aj, postServiceSyncResource as ak, postServiceUnlinkResource as al, postSmartdoorAdvancedConfigResource as am, postSmartlockActionAdvancedResource as an, postSmartlockActionResource as ao, postSmartlockAdminPinResource as ap, postSmartlockAdvancedConfigResource as aq, postSmartlockAuthResource as ar, postSmartlockAuthWithSharedKeyResource as as, postSmartlockBulkWebConfigResource as at, postSmartlockConfigResource as au, postSmartlockLockActionAdvancedResource as av, postSmartlockLockActionResource as aw, postSmartlockOpenerAdvancedConfigResource as ax, postSmartlockResource as ay, postSmartlockSyncResource as az, deleteAccountOtpResource as b, client as c, deleteAccountIntegrationsResource as d, deleteAccountSettingResource as e, deleteAccountSubResource as f, deleteAccountUserResource as g, deleteAccountsResource as h, deleteAddressResource as i, deleteAddressUnitResource as j, deleteAddressUnitsResource as k, deleteApiKeyAdvancedResource as l, deleteApiKeyResource as m, deleteApiKeyTokenResource as n, operationsByTag as o, deleteDecentralWebhookResource as p, deleteNotificationResource as q, deleteSmartlockAuthResource as r, deleteSmartlockResource as s, tagDictionary as t, deleteSmartlocksAuthsResource as u, getAccountIntegrationsResource as v, getAccountSettingResource as w, getAccountSubResource as x, getAccountSubsResource as y, getAccountUserResource as z };