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