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