@scryme/sdk 0.1.0 → 9.65.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.
package/dist/server.js ADDED
@@ -0,0 +1,2800 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/server.ts
31
+ var server_exports = {};
32
+ __export(server_exports, {
33
+ ScrymeServerSDK: () => ScrymeServerSDK,
34
+ createServerSDK: () => createServerSDK
35
+ });
36
+ module.exports = __toCommonJS(server_exports);
37
+ var import_axios3 = __toESM(require("axios"));
38
+
39
+ // src/generated/scryme.ts
40
+ var import_axios = __toESM(require("axios"));
41
+ var getScrymeV3API = (axiosInstance = import_axios.default) => {
42
+ const inventoryVerifyIntegrity = (orgSlug, options) => {
43
+ return axiosInstance.get(
44
+ `/v3/${orgSlug}/inventory/integrity/verify`,
45
+ options
46
+ );
47
+ };
48
+ const inventoryFixIntegrity = (orgSlug, variantId, params, options) => {
49
+ return axiosInstance.post(
50
+ `/v3/${orgSlug}/inventory/integrity/fix/${variantId}`,
51
+ void 0,
52
+ {
53
+ ...options,
54
+ params: { ...params, ...options?.params }
55
+ }
56
+ );
57
+ };
58
+ const inventoryGetInventory = (orgSlug, params, options) => {
59
+ return axiosInstance.get(
60
+ `/v3/${orgSlug}/inventory`,
61
+ {
62
+ ...options,
63
+ params: { ...params, ...options?.params }
64
+ }
65
+ );
66
+ };
67
+ const inventoryTraceBatch = (orgSlug, identifier, options) => {
68
+ return axiosInstance.get(
69
+ `/v3/${orgSlug}/inventory/trace/${identifier}`,
70
+ options
71
+ );
72
+ };
73
+ const inventorySplitBatch = (orgSlug, id, options) => {
74
+ return axiosInstance.post(
75
+ `/v3/${orgSlug}/inventory/batches/${id}/split`,
76
+ void 0,
77
+ options
78
+ );
79
+ };
80
+ const inventoryMergeBatches = (orgSlug, options) => {
81
+ return axiosInstance.post(
82
+ `/v3/${orgSlug}/inventory/batches/merge`,
83
+ void 0,
84
+ options
85
+ );
86
+ };
87
+ const inventoryCreateAssembly = (orgSlug, options) => {
88
+ return axiosInstance.post(
89
+ `/v3/${orgSlug}/inventory/assemblies`,
90
+ void 0,
91
+ options
92
+ );
93
+ };
94
+ const inventoryCompleteAssembly = (orgSlug, id, options) => {
95
+ return axiosInstance.post(
96
+ `/v3/${orgSlug}/inventory/assemblies/${id}/complete`,
97
+ void 0,
98
+ options
99
+ );
100
+ };
101
+ const inventoryRequestAdjustment = (orgSlug, options) => {
102
+ return axiosInstance.post(
103
+ `/v3/${orgSlug}/inventory/adjustments/request`,
104
+ void 0,
105
+ options
106
+ );
107
+ };
108
+ const inventoryGetAdjustments = (orgSlug, params, options) => {
109
+ return axiosInstance.get(
110
+ `/v3/${orgSlug}/inventory/adjustments`,
111
+ {
112
+ ...options,
113
+ params: { ...params, ...options?.params }
114
+ }
115
+ );
116
+ };
117
+ const inventoryApproveAdjustment = (orgSlug, id, options) => {
118
+ return axiosInstance.patch(
119
+ `/v3/${orgSlug}/inventory/adjustments/${id}/approve`,
120
+ void 0,
121
+ options
122
+ );
123
+ };
124
+ const inventoryRejectAdjustment = (orgSlug, id, options) => {
125
+ return axiosInstance.patch(
126
+ `/v3/${orgSlug}/inventory/adjustments/${id}/reject`,
127
+ void 0,
128
+ options
129
+ );
130
+ };
131
+ const inventoryGetLeadTime = (orgSlug, params, options) => {
132
+ return axiosInstance.get(
133
+ `/v3/${orgSlug}/inventory/analytics/supplier-lead-time`,
134
+ {
135
+ ...options,
136
+ params: { ...params, ...options?.params }
137
+ }
138
+ );
139
+ };
140
+ const inventoryGetWasteAnalysis = (orgSlug, params, options) => {
141
+ return axiosInstance.get(
142
+ `/v3/${orgSlug}/inventory/analytics/waste`,
143
+ {
144
+ ...options,
145
+ params: { ...params, ...options?.params }
146
+ }
147
+ );
148
+ };
149
+ const inventoryCheckB2BAvailability = (orgSlug, checkB2BAvailabilityDto, options) => {
150
+ return axiosInstance.post(
151
+ `/v3/${orgSlug}/inventory/b2b/availability`,
152
+ checkB2BAvailabilityDto,
153
+ options
154
+ );
155
+ };
156
+ const inventoryUnpackBatch = (orgSlug, id, options) => {
157
+ return axiosInstance.post(
158
+ `/v3/${orgSlug}/inventory/batches/${id}/unpack`,
159
+ void 0,
160
+ options
161
+ );
162
+ };
163
+ const inventoryScanUnpackBatch = (orgSlug, options) => {
164
+ return axiosInstance.post(
165
+ `/v3/${orgSlug}/inventory/batches/scan-unpack`,
166
+ void 0,
167
+ options
168
+ );
169
+ };
170
+ const inventoryQuickStockInquiry = (orgSlug, options) => {
171
+ return axiosInstance.post(
172
+ `/v3/${orgSlug}/inventory/b2b/quick-inquiry`,
173
+ void 0,
174
+ options
175
+ );
176
+ };
177
+ const expenseControllerCreateExpense = (createExpenseDto, options) => {
178
+ return axiosInstance.post(
179
+ `/v3/finance/expenses`,
180
+ createExpenseDto,
181
+ options
182
+ );
183
+ };
184
+ const expenseControllerGetExpenses = (params, options) => {
185
+ return axiosInstance.get(
186
+ `/v3/finance/expenses`,
187
+ {
188
+ ...options,
189
+ params: { ...params, ...options?.params }
190
+ }
191
+ );
192
+ };
193
+ const expenseControllerGetExpenseCategories = (options) => {
194
+ return axiosInstance.get(
195
+ `/v3/finance/expenses/categories`,
196
+ options
197
+ );
198
+ };
199
+ const expenseControllerGetExpense = (id, options) => {
200
+ return axiosInstance.get(
201
+ `/v3/finance/expenses/${id}`,
202
+ options
203
+ );
204
+ };
205
+ const pettyCashControllerCreateFund = (createPettyCashFundDto, options) => {
206
+ return axiosInstance.post(
207
+ `/v3/finance/petty-cash`,
208
+ createPettyCashFundDto,
209
+ options
210
+ );
211
+ };
212
+ const pettyCashControllerGetFunds = (options) => {
213
+ return axiosInstance.get(
214
+ `/v3/finance/petty-cash`,
215
+ options
216
+ );
217
+ };
218
+ const pettyCashControllerGetFund = (id, options) => {
219
+ return axiosInstance.get(
220
+ `/v3/finance/petty-cash/${id}`,
221
+ options
222
+ );
223
+ };
224
+ const pettyCashControllerTopUpFund = (id, topUpPettyCashFundDto, options) => {
225
+ return axiosInstance.post(
226
+ `/v3/finance/petty-cash/${id}/top-up`,
227
+ topUpPettyCashFundDto,
228
+ options
229
+ );
230
+ };
231
+ const pettyCashControllerGetFundTransactions = (id, options) => {
232
+ return axiosInstance.get(
233
+ `/v3/finance/petty-cash/${id}/transactions`,
234
+ options
235
+ );
236
+ };
237
+ const utilityAccountControllerCreateAccount = (createUtilityAccountDto, options) => {
238
+ return axiosInstance.post(
239
+ `/v3/finance/utility-accounts`,
240
+ createUtilityAccountDto,
241
+ options
242
+ );
243
+ };
244
+ const utilityAccountControllerGetAccounts = (options) => {
245
+ return axiosInstance.get(
246
+ `/v3/finance/utility-accounts`,
247
+ options
248
+ );
249
+ };
250
+ const utilityAccountControllerGetAccount = (id, options) => {
251
+ return axiosInstance.get(
252
+ `/v3/finance/utility-accounts/${id}`,
253
+ options
254
+ );
255
+ };
256
+ const accountingInitialize = (orgSlug, options) => {
257
+ return axiosInstance.post(
258
+ `/v3/${orgSlug}/finance/accounting/initialize`,
259
+ void 0,
260
+ options
261
+ );
262
+ };
263
+ const accountingGetProfitLoss = (orgSlug, params, options) => {
264
+ return axiosInstance.get(
265
+ `/v3/${orgSlug}/finance/accounting/reports/profit-loss`,
266
+ {
267
+ ...options,
268
+ params: { ...params, ...options?.params }
269
+ }
270
+ );
271
+ };
272
+ const accountingGetBalanceSheet = (orgSlug, params, options) => {
273
+ return axiosInstance.get(
274
+ `/v3/${orgSlug}/finance/accounting/reports/balance-sheet`,
275
+ {
276
+ ...options,
277
+ params: { ...params, ...options?.params }
278
+ }
279
+ );
280
+ };
281
+ const accountingGetCashFlow = (orgSlug, params, options) => {
282
+ return axiosInstance.get(
283
+ `/v3/${orgSlug}/finance/accounting/reports/cash-flow`,
284
+ {
285
+ ...options,
286
+ params: { ...params, ...options?.params }
287
+ }
288
+ );
289
+ };
290
+ const accountingGetTaxSummary = (orgSlug, params, options) => {
291
+ return axiosInstance.get(
292
+ `/v3/${orgSlug}/finance/accounting/reports/tax-summary`,
293
+ {
294
+ ...options,
295
+ params: { ...params, ...options?.params }
296
+ }
297
+ );
298
+ };
299
+ const invoiceControllerCreateInvoice = (createInvoiceDto, options) => {
300
+ return axiosInstance.post(
301
+ `/v3/finance/invoices`,
302
+ createInvoiceDto,
303
+ options
304
+ );
305
+ };
306
+ const invoiceControllerGetInvoices = (options) => {
307
+ return axiosInstance.get(
308
+ `/v3/finance/invoices`,
309
+ options
310
+ );
311
+ };
312
+ const invoiceControllerGetInvoice = (id, options) => {
313
+ return axiosInstance.get(
314
+ `/v3/finance/invoices/${id}`,
315
+ options
316
+ );
317
+ };
318
+ const invoiceControllerUpdateInvoice = (id, updateInvoiceDto, options) => {
319
+ return axiosInstance.put(
320
+ `/v3/finance/invoices/${id}`,
321
+ updateInvoiceDto,
322
+ options
323
+ );
324
+ };
325
+ const invoiceControllerDeleteInvoice = (id, options) => {
326
+ return axiosInstance.delete(
327
+ `/v3/finance/invoices/${id}`,
328
+ options
329
+ );
330
+ };
331
+ const invoiceControllerFinalizeInvoice = (id, options) => {
332
+ return axiosInstance.post(
333
+ `/v3/finance/invoices/${id}/finalize`,
334
+ void 0,
335
+ options
336
+ );
337
+ };
338
+ const invoiceControllerGetTemplates = (options) => {
339
+ return axiosInstance.get(
340
+ `/v3/finance/invoices/templates`,
341
+ options
342
+ );
343
+ };
344
+ const invoiceControllerCreateTemplate = (createInvoiceTemplateDto, options) => {
345
+ return axiosInstance.post(
346
+ `/v3/finance/invoices/templates`,
347
+ createInvoiceTemplateDto,
348
+ options
349
+ );
350
+ };
351
+ const invoiceControllerGetConfig = (options) => {
352
+ return axiosInstance.get(
353
+ `/v3/finance/invoices/config`,
354
+ options
355
+ );
356
+ };
357
+ const invoiceControllerUpdateConfig = (invoiceConfigDto, options) => {
358
+ return axiosInstance.put(
359
+ `/v3/finance/invoices/config`,
360
+ invoiceConfigDto,
361
+ options
362
+ );
363
+ };
364
+ const publicInvoiceControllerDownloadInvoice = (id, params, options) => {
365
+ return axiosInstance.get(
366
+ `/v3/public-invoices/${id}/download`,
367
+ {
368
+ ...options,
369
+ params: { ...params, ...options?.params }
370
+ }
371
+ );
372
+ };
373
+ const publicInvoiceControllerDownloadInvoiceByTransaction = (transactionId, params, options) => {
374
+ return axiosInstance.get(
375
+ `/v3/public-invoices/transactions/${transactionId}/download`,
376
+ {
377
+ ...options,
378
+ params: { ...params, ...options?.params }
379
+ }
380
+ );
381
+ };
382
+ const publicInvoiceControllerDownloadReceipt = (transactionId, params, options) => {
383
+ return axiosInstance.get(
384
+ `/v3/public-invoices/receipts/${transactionId}/download`,
385
+ {
386
+ ...options,
387
+ params: { ...params, ...options?.params }
388
+ }
389
+ );
390
+ };
391
+ const publicInvoiceControllerGeneratePublicLink = (transactionId, params, options) => {
392
+ return axiosInstance.post(
393
+ `/v3/public-invoices/transactions/${transactionId}/generate-public-link`,
394
+ void 0,
395
+ {
396
+ ...options,
397
+ params: { ...params, ...options?.params }
398
+ }
399
+ );
400
+ };
401
+ const authExchangeToken = (tokenRequestDto, options) => {
402
+ return axiosInstance.post(
403
+ `/v3/auth/token`,
404
+ tokenRequestDto,
405
+ options
406
+ );
407
+ };
408
+ const authControllerHandleOAuth2 = (path, options) => {
409
+ return axiosInstance.get(
410
+ `/v3/auth/oauth2/${path}`,
411
+ options
412
+ );
413
+ };
414
+ const adminControllerGetStats = (options) => {
415
+ return axiosInstance.get(
416
+ `/v3/admin/stats`,
417
+ options
418
+ );
419
+ };
420
+ const adminControllerListOrganizations = (options) => {
421
+ return axiosInstance.get(
422
+ `/v3/admin/organizations`,
423
+ options
424
+ );
425
+ };
426
+ const adminControllerCreateOrganization = (createOrganizationDto, options) => {
427
+ return axiosInstance.post(
428
+ `/v3/admin/organizations`,
429
+ createOrganizationDto,
430
+ options
431
+ );
432
+ };
433
+ const adminControllerGetOrganizationDetails = (id, options) => {
434
+ return axiosInstance.get(
435
+ `/v3/admin/organizations/${id}`,
436
+ options
437
+ );
438
+ };
439
+ const adminControllerUpdateOrganization = (id, updateOrganizationDto, options) => {
440
+ return axiosInstance.patch(
441
+ `/v3/admin/organizations/${id}`,
442
+ updateOrganizationDto,
443
+ options
444
+ );
445
+ };
446
+ const adminControllerDeleteOrganization = (id, options) => {
447
+ return axiosInstance.delete(
448
+ `/v3/admin/organizations/${id}`,
449
+ options
450
+ );
451
+ };
452
+ const adminControllerListMembers = (params, options) => {
453
+ return axiosInstance.get(
454
+ `/v3/admin/members`,
455
+ {
456
+ ...options,
457
+ params: { ...params, ...options?.params }
458
+ }
459
+ );
460
+ };
461
+ const adminControllerListUsers = (options) => {
462
+ return axiosInstance.get(
463
+ `/v3/admin/users`,
464
+ options
465
+ );
466
+ };
467
+ const adminControllerBanUser = (id, banUserDto, options) => {
468
+ return axiosInstance.post(
469
+ `/v3/admin/users/${id}/ban`,
470
+ banUserDto,
471
+ options
472
+ );
473
+ };
474
+ const adminControllerUnbanUser = (id, options) => {
475
+ return axiosInstance.post(
476
+ `/v3/admin/users/${id}/unban`,
477
+ void 0,
478
+ options
479
+ );
480
+ };
481
+ const adminControllerListConnectedApps = (options) => {
482
+ return axiosInstance.get(
483
+ `/v3/admin/connected-apps`,
484
+ options
485
+ );
486
+ };
487
+ const adminControllerListSystemLogs = (options) => {
488
+ return axiosInstance.get(
489
+ `/v3/admin/system-logs`,
490
+ options
491
+ );
492
+ };
493
+ const adminControllerListGlobalSettings = (options) => {
494
+ return axiosInstance.get(
495
+ `/v3/admin/settings`,
496
+ options
497
+ );
498
+ };
499
+ const adminControllerSetGlobalSetting = (setGlobalSettingDto, options) => {
500
+ return axiosInstance.post(
501
+ `/v3/admin/settings`,
502
+ setGlobalSettingDto,
503
+ options
504
+ );
505
+ };
506
+ const adminControllerDeleteGlobalSetting = (key, options) => {
507
+ return axiosInstance.delete(
508
+ `/v3/admin/settings/${key}`,
509
+ options
510
+ );
511
+ };
512
+ const adminControllerListTiers = (options) => {
513
+ return axiosInstance.get(
514
+ `/v3/admin/tiers`,
515
+ options
516
+ );
517
+ };
518
+ const adminControllerDefineTier = (defineTierDto, options) => {
519
+ return axiosInstance.post(
520
+ `/v3/admin/tiers`,
521
+ defineTierDto,
522
+ options
523
+ );
524
+ };
525
+ const adminControllerDeleteTier = (slug, options) => {
526
+ return axiosInstance.delete(
527
+ `/v3/admin/tiers/${slug}`,
528
+ options
529
+ );
530
+ };
531
+ const adminControllerGetOrganizationSubscription = (id, options) => {
532
+ return axiosInstance.get(
533
+ `/v3/admin/organizations/${id}/subscription`,
534
+ options
535
+ );
536
+ };
537
+ const adminControllerUpdateOrganizationSubscription = (id, updateSubscriptionDto, options) => {
538
+ return axiosInstance.put(
539
+ `/v3/admin/organizations/${id}/subscription`,
540
+ updateSubscriptionDto,
541
+ options
542
+ );
543
+ };
544
+ const adminControllerListSystemPayments = (options) => {
545
+ return axiosInstance.get(
546
+ `/v3/admin/payments`,
547
+ options
548
+ );
549
+ };
550
+ const adminControllerRecordCustomPayment = (recordCustomPaymentDto, options) => {
551
+ return axiosInstance.post(
552
+ `/v3/admin/payments/record`,
553
+ recordCustomPaymentDto,
554
+ options
555
+ );
556
+ };
557
+ const adminControllerListIntegrationDefinitions = (options) => {
558
+ return axiosInstance.get(
559
+ `/v3/admin/integrations/definitions`,
560
+ options
561
+ );
562
+ };
563
+ const adminControllerCreateIntegrationDefinition = (createIntegrationDefinitionDto, options) => {
564
+ return axiosInstance.post(
565
+ `/v3/admin/integrations/definitions`,
566
+ createIntegrationDefinitionDto,
567
+ options
568
+ );
569
+ };
570
+ const adminControllerUpdateIntegrationDefinition = (id, updateIntegrationDefinitionDto, options) => {
571
+ return axiosInstance.patch(
572
+ `/v3/admin/integrations/definitions/${id}`,
573
+ updateIntegrationDefinitionDto,
574
+ options
575
+ );
576
+ };
577
+ const adminControllerDeleteIntegrationDefinition = (id, options) => {
578
+ return axiosInstance.delete(
579
+ `/v3/admin/integrations/definitions/${id}`,
580
+ options
581
+ );
582
+ };
583
+ const adminControllerListActiveOrganizationIntegrations = (options) => {
584
+ return axiosInstance.get(
585
+ `/v3/admin/integrations/active`,
586
+ options
587
+ );
588
+ };
589
+ const webhooksCreate = (orgSlug, createWebhookDto, options) => {
590
+ return axiosInstance.post(
591
+ `/v3/${orgSlug}/webhooks`,
592
+ createWebhookDto,
593
+ options
594
+ );
595
+ };
596
+ const webhooksList = (orgSlug, options) => {
597
+ return axiosInstance.get(
598
+ `/v3/${orgSlug}/webhooks`,
599
+ options
600
+ );
601
+ };
602
+ const webhooksDelete = (orgSlug, id, options) => {
603
+ return axiosInstance.delete(
604
+ `/v3/${orgSlug}/webhooks/${id}`,
605
+ options
606
+ );
607
+ };
608
+ const windmillCallbackControllerHandleCallback = (options) => {
609
+ return axiosInstance.post(
610
+ `/v3/webhooks/windmill`,
611
+ void 0,
612
+ options
613
+ );
614
+ };
615
+ const windmillCallbackControllerHandleApprovalCallback = (options) => {
616
+ return axiosInstance.post(
617
+ `/v3/webhooks/windmill/approval`,
618
+ void 0,
619
+ options
620
+ );
621
+ };
622
+ const windmillCallbackControllerHandleBakeryDisposalCallback = (options) => {
623
+ return axiosInstance.post(
624
+ `/v3/webhooks/windmill/bakery/disposal`,
625
+ void 0,
626
+ options
627
+ );
628
+ };
629
+ const windmillCallbackControllerHandleOutcomeCallback = (options) => {
630
+ return axiosInstance.post(
631
+ `/v3/webhooks/windmill/outcome`,
632
+ void 0,
633
+ options
634
+ );
635
+ };
636
+ const catalogGetProducts = (orgSlug, params, options) => {
637
+ return axiosInstance.get(
638
+ `/v3/${orgSlug}/catalog/products`,
639
+ {
640
+ ...options,
641
+ params: { ...params, ...options?.params }
642
+ }
643
+ );
644
+ };
645
+ const catalogCreateProduct = (orgSlug, createProductDto, options) => {
646
+ return axiosInstance.post(
647
+ `/v3/${orgSlug}/catalog/products`,
648
+ createProductDto,
649
+ options
650
+ );
651
+ };
652
+ const catalogGetServices = (orgSlug, params, options) => {
653
+ return axiosInstance.get(
654
+ `/v3/${orgSlug}/catalog/services`,
655
+ {
656
+ ...options,
657
+ params: { ...params, ...options?.params }
658
+ }
659
+ );
660
+ };
661
+ const catalogUpdateProduct = (orgSlug, id, updateProductDto, options) => {
662
+ return axiosInstance.patch(
663
+ `/v3/${orgSlug}/catalog/products/${id}`,
664
+ updateProductDto,
665
+ options
666
+ );
667
+ };
668
+ const catalogUpdateSupplierVariant = (orgSlug, supplierId, variantId, updateSupplierProductDto, options) => {
669
+ return axiosInstance.patch(
670
+ `/v3/${orgSlug}/catalog/suppliers/${supplierId}/variants/${variantId}`,
671
+ updateSupplierProductDto,
672
+ options
673
+ );
674
+ };
675
+ const catalogGetPriceChangeRequests = (orgSlug, params, options) => {
676
+ return axiosInstance.get(
677
+ `/v3/${orgSlug}/catalog/price-change-requests`,
678
+ {
679
+ ...options,
680
+ params: { ...params, ...options?.params }
681
+ }
682
+ );
683
+ };
684
+ const catalogReviewPriceChangeRequest = (orgSlug, id, reviewPriceChangeDto, options) => {
685
+ return axiosInstance.post(
686
+ `/v3/${orgSlug}/catalog/price-change-requests/${id}/review`,
687
+ reviewPriceChangeDto,
688
+ options
689
+ );
690
+ };
691
+ const servicesCreateCategory = (orgSlug, createServiceCategoryDto, options) => {
692
+ return axiosInstance.post(
693
+ `/v3/${orgSlug}/services/categories`,
694
+ createServiceCategoryDto,
695
+ options
696
+ );
697
+ };
698
+ const servicesGetCategories = (orgSlug, options) => {
699
+ return axiosInstance.get(
700
+ `/v3/${orgSlug}/services/categories`,
701
+ options
702
+ );
703
+ };
704
+ const servicesUpdateCategory = (orgSlug, id, updateServiceCategoryDto, options) => {
705
+ return axiosInstance.patch(
706
+ `/v3/${orgSlug}/services/categories/${id}`,
707
+ updateServiceCategoryDto,
708
+ options
709
+ );
710
+ };
711
+ const servicesDeleteCategory = (orgSlug, id, options) => {
712
+ return axiosInstance.post(
713
+ `/v3/${orgSlug}/services/categories/${id}/delete`,
714
+ void 0,
715
+ options
716
+ );
717
+ };
718
+ const servicesCreateService = (orgSlug, createServiceDto, options) => {
719
+ return axiosInstance.post(
720
+ `/v3/${orgSlug}/services`,
721
+ createServiceDto,
722
+ options
723
+ );
724
+ };
725
+ const servicesGetServices = (orgSlug, options) => {
726
+ return axiosInstance.get(
727
+ `/v3/${orgSlug}/services`,
728
+ options
729
+ );
730
+ };
731
+ const servicesGetCurrentMemberShifts = (orgSlug, options) => {
732
+ return axiosInstance.get(
733
+ `/v3/${orgSlug}/services/shifts/me`,
734
+ options
735
+ );
736
+ };
737
+ const servicesGetShifts = (orgSlug, params, options) => {
738
+ return axiosInstance.get(
739
+ `/v3/${orgSlug}/services/shifts`,
740
+ {
741
+ ...options,
742
+ params: { ...params, ...options?.params }
743
+ }
744
+ );
745
+ };
746
+ const servicesGetService = (orgSlug, id, options) => {
747
+ return axiosInstance.get(
748
+ `/v3/${orgSlug}/services/${id}`,
749
+ options
750
+ );
751
+ };
752
+ const servicesUpdateService = (orgSlug, id, updateServiceDto, options) => {
753
+ return axiosInstance.patch(
754
+ `/v3/${orgSlug}/services/${id}`,
755
+ updateServiceDto,
756
+ options
757
+ );
758
+ };
759
+ const servicesDeleteService = (orgSlug, id, options) => {
760
+ return axiosInstance.post(
761
+ `/v3/${orgSlug}/services/${id}/delete`,
762
+ void 0,
763
+ options
764
+ );
765
+ };
766
+ const servicesCreateResource = (orgSlug, createServiceResourceDto, options) => {
767
+ return axiosInstance.post(
768
+ `/v3/${orgSlug}/services/resources`,
769
+ createServiceResourceDto,
770
+ options
771
+ );
772
+ };
773
+ const servicesGetResources = (orgSlug, options) => {
774
+ return axiosInstance.get(
775
+ `/v3/${orgSlug}/services/resources`,
776
+ options
777
+ );
778
+ };
779
+ const servicesUpdateResource = (orgSlug, id, updateServiceResourceDto, options) => {
780
+ return axiosInstance.patch(
781
+ `/v3/${orgSlug}/services/resources/${id}`,
782
+ updateServiceResourceDto,
783
+ options
784
+ );
785
+ };
786
+ const servicesDeleteResource = (orgSlug, id, options) => {
787
+ return axiosInstance.post(
788
+ `/v3/${orgSlug}/services/resources/${id}/delete`,
789
+ void 0,
790
+ options
791
+ );
792
+ };
793
+ const servicesCreateBooking = (orgSlug, createBookingDto, options) => {
794
+ return axiosInstance.post(
795
+ `/v3/${orgSlug}/services/bookings`,
796
+ createBookingDto,
797
+ options
798
+ );
799
+ };
800
+ const servicesGetBookings = (orgSlug, options) => {
801
+ return axiosInstance.get(
802
+ `/v3/${orgSlug}/services/bookings`,
803
+ options
804
+ );
805
+ };
806
+ const servicesGetBooking = (orgSlug, id, options) => {
807
+ return axiosInstance.get(
808
+ `/v3/${orgSlug}/services/bookings/${id}`,
809
+ options
810
+ );
811
+ };
812
+ const servicesUpdateBookingStatus = (orgSlug, id, servicesUpdateBookingStatusBody, options) => {
813
+ return axiosInstance.patch(
814
+ `/v3/${orgSlug}/services/bookings/${id}/status`,
815
+ servicesUpdateBookingStatusBody,
816
+ options
817
+ );
818
+ };
819
+ const servicesCompleteBooking = (orgSlug, id, completeBookingDto, options) => {
820
+ return axiosInstance.patch(
821
+ `/v3/${orgSlug}/services/bookings/${id}/complete`,
822
+ completeBookingDto,
823
+ options
824
+ );
825
+ };
826
+ const servicesCreateShift = (orgSlug, memberId, servicesCreateShiftBody, options) => {
827
+ return axiosInstance.post(
828
+ `/v3/${orgSlug}/services/staff/${memberId}/shifts`,
829
+ servicesCreateShiftBody,
830
+ options
831
+ );
832
+ };
833
+ const servicesGetStaffShifts = (orgSlug, memberId, options) => {
834
+ return axiosInstance.get(
835
+ `/v3/${orgSlug}/services/staff/${memberId}/shifts`,
836
+ options
837
+ );
838
+ };
839
+ const servicesAddBreak = (orgSlug, shiftId, servicesAddBreakBody, options) => {
840
+ return axiosInstance.post(
841
+ `/v3/${orgSlug}/services/shifts/${shiftId}/breaks`,
842
+ servicesAddBreakBody,
843
+ options
844
+ );
845
+ };
846
+ const servicesRegisterCustomerApp = (orgSlug, servicesRegisterCustomerAppBody, options) => {
847
+ return axiosInstance.post(
848
+ `/v3/${orgSlug}/services/register-customer-app`,
849
+ servicesRegisterCustomerAppBody,
850
+ options
851
+ );
852
+ };
853
+ const servicesGetUtilization = (orgSlug, params, options) => {
854
+ return axiosInstance.get(
855
+ `/v3/${orgSlug}/services/analytics/utilization`,
856
+ {
857
+ ...options,
858
+ params: { ...params, ...options?.params }
859
+ }
860
+ );
861
+ };
862
+ const servicesGetPerformance = (orgSlug, params, options) => {
863
+ return axiosInstance.get(
864
+ `/v3/${orgSlug}/services/analytics/performance`,
865
+ {
866
+ ...options,
867
+ params: { ...params, ...options?.params }
868
+ }
869
+ );
870
+ };
871
+ const servicesGetFunnel = (orgSlug, params, options) => {
872
+ return axiosInstance.get(
873
+ `/v3/${orgSlug}/services/analytics/funnel`,
874
+ {
875
+ ...options,
876
+ params: { ...params, ...options?.params }
877
+ }
878
+ );
879
+ };
880
+ const publicServicesListServices = (orgSlug, options) => {
881
+ return axiosInstance.get(
882
+ `/v3/public/${orgSlug}/services`,
883
+ options
884
+ );
885
+ };
886
+ const publicServicesGetCategories = (orgSlug, options) => {
887
+ return axiosInstance.get(
888
+ `/v3/public/${orgSlug}/services/categories`,
889
+ options
890
+ );
891
+ };
892
+ const publicServicesGetService = (orgSlug, id, options) => {
893
+ return axiosInstance.get(
894
+ `/v3/public/${orgSlug}/services/${id}`,
895
+ options
896
+ );
897
+ };
898
+ const publicServicesGetAvailability = (orgSlug, id, params, options) => {
899
+ return axiosInstance.get(
900
+ `/v3/public/${orgSlug}/services/${id}/availability`,
901
+ {
902
+ ...options,
903
+ params: { ...params, ...options?.params }
904
+ }
905
+ );
906
+ };
907
+ const publicServicesRequestOtp = (orgSlug, requestOtpDto, options) => {
908
+ return axiosInstance.post(
909
+ `/v3/public/${orgSlug}/services/otp/request`,
910
+ requestOtpDto,
911
+ options
912
+ );
913
+ };
914
+ const publicServicesVerifyOtp = (orgSlug, verifyOtpDto, options) => {
915
+ return axiosInstance.post(
916
+ `/v3/public/${orgSlug}/services/otp/verify`,
917
+ verifyOtpDto,
918
+ options
919
+ );
920
+ };
921
+ const publicServicesCreatePublicBooking = (orgSlug, publicBookingDto, options) => {
922
+ return axiosInstance.post(
923
+ `/v3/public/${orgSlug}/services/bookings`,
924
+ publicBookingDto,
925
+ options
926
+ );
927
+ };
928
+ const customersProvisionZitadel = (orgSlug, provisionZitadelDto, options) => {
929
+ return axiosInstance.post(
930
+ `/v3/${orgSlug}/customers/zitadel/provision`,
931
+ provisionZitadelDto,
932
+ options
933
+ );
934
+ };
935
+ const customersGetCustomers = (orgSlug, params, options) => {
936
+ return axiosInstance.get(
937
+ `/v3/${orgSlug}/customers`,
938
+ {
939
+ ...options,
940
+ params: { ...params, ...options?.params }
941
+ }
942
+ );
943
+ };
944
+ const customersRegister = (orgSlug, registerCustomerDto, options) => {
945
+ return axiosInstance.post(
946
+ `/v3/${orgSlug}/customers/register`,
947
+ registerCustomerDto,
948
+ options
949
+ );
950
+ };
951
+ const customersLogin = (orgSlug, customerLoginDto, options) => {
952
+ return axiosInstance.post(
953
+ `/v3/${orgSlug}/customers/auth/login`,
954
+ customerLoginDto,
955
+ options
956
+ );
957
+ };
958
+ const customersGetCurrentSession = (orgSlug, options) => {
959
+ return axiosInstance.get(
960
+ `/v3/${orgSlug}/customers/auth/session`,
961
+ options
962
+ );
963
+ };
964
+ const customersGetSessions = (orgSlug, options) => {
965
+ return axiosInstance.get(
966
+ `/v3/${orgSlug}/customers/auth/sessions`,
967
+ options
968
+ );
969
+ };
970
+ const customersRevokeAllSessions = (orgSlug, params, options) => {
971
+ return axiosInstance.delete(
972
+ `/v3/${orgSlug}/customers/auth/sessions`,
973
+ {
974
+ ...options,
975
+ params: { ...params, ...options?.params }
976
+ }
977
+ );
978
+ };
979
+ const customersRevokeSession = (orgSlug, id, options) => {
980
+ return axiosInstance.delete(
981
+ `/v3/${orgSlug}/customers/auth/sessions/${id}`,
982
+ options
983
+ );
984
+ };
985
+ const customersUpdate = (orgSlug, id, updateCustomerDto, options) => {
986
+ return axiosInstance.patch(
987
+ `/v3/${orgSlug}/customers/${id}`,
988
+ updateCustomerDto,
989
+ options
990
+ );
991
+ };
992
+ const customersGetCustomerById = (orgSlug, id, options) => {
993
+ return axiosInstance.get(
994
+ `/v3/${orgSlug}/customers/${id}`,
995
+ options
996
+ );
997
+ };
998
+ const customersDelete = (orgSlug, id, options) => {
999
+ return axiosInstance.delete(
1000
+ `/v3/${orgSlug}/customers/${id}`,
1001
+ options
1002
+ );
1003
+ };
1004
+ const customersGetAddresses = (orgSlug, id, options) => {
1005
+ return axiosInstance.get(
1006
+ `/v3/${orgSlug}/customers/${id}/addresses`,
1007
+ options
1008
+ );
1009
+ };
1010
+ const customersAddAddress = (orgSlug, id, addressDto, options) => {
1011
+ return axiosInstance.post(
1012
+ `/v3/${orgSlug}/customers/${id}/addresses`,
1013
+ addressDto,
1014
+ options
1015
+ );
1016
+ };
1017
+ const businessAccountControllerCreate = (orgSlug, createBusinessAccountDto, options) => {
1018
+ return axiosInstance.post(
1019
+ `/v3/${orgSlug}/business-accounts`,
1020
+ createBusinessAccountDto,
1021
+ options
1022
+ );
1023
+ };
1024
+ const businessAccountControllerGetOne = (orgSlug, id, options) => {
1025
+ return axiosInstance.get(
1026
+ `/v3/${orgSlug}/business-accounts/${id}`,
1027
+ options
1028
+ );
1029
+ };
1030
+ const crmControllerCreateRecord = (orgSlug, createCrmRecordDto, options) => {
1031
+ return axiosInstance.post(
1032
+ `/v3/${orgSlug}/crm/records`,
1033
+ createCrmRecordDto,
1034
+ options
1035
+ );
1036
+ };
1037
+ const crmControllerGetRecord = (orgSlug, id, options) => {
1038
+ return axiosInstance.get(
1039
+ `/v3/${orgSlug}/crm/records/${id}`,
1040
+ options
1041
+ );
1042
+ };
1043
+ const crmControllerUpdateRecord = (orgSlug, id, updateCrmRecordDto, options) => {
1044
+ return axiosInstance.patch(
1045
+ `/v3/${orgSlug}/crm/records/${id}`,
1046
+ updateCrmRecordDto,
1047
+ options
1048
+ );
1049
+ };
1050
+ const crmControllerCreateNote = (orgSlug, createCrmNoteDto, options) => {
1051
+ return axiosInstance.post(
1052
+ `/v3/${orgSlug}/crm/notes`,
1053
+ createCrmNoteDto,
1054
+ options
1055
+ );
1056
+ };
1057
+ const crmControllerGetRecordNotes = (orgSlug, id, options) => {
1058
+ return axiosInstance.get(
1059
+ `/v3/${orgSlug}/crm/records/${id}/notes`,
1060
+ options
1061
+ );
1062
+ };
1063
+ const crmControllerCreateActivity = (orgSlug, createCrmActivityDto, options) => {
1064
+ return axiosInstance.post(
1065
+ `/v3/${orgSlug}/crm/activities`,
1066
+ createCrmActivityDto,
1067
+ options
1068
+ );
1069
+ };
1070
+ const crmControllerGetTimeline = (orgSlug, id, options) => {
1071
+ return axiosInstance.get(
1072
+ `/v3/${orgSlug}/crm/records/${id}/timeline`,
1073
+ options
1074
+ );
1075
+ };
1076
+ const crmControllerCreateObject = (orgSlug, createCrmObjectDto, options) => {
1077
+ return axiosInstance.post(
1078
+ `/v3/${orgSlug}/crm/objects`,
1079
+ createCrmObjectDto,
1080
+ options
1081
+ );
1082
+ };
1083
+ const crmControllerListObjects = (orgSlug, options) => {
1084
+ return axiosInstance.get(
1085
+ `/v3/${orgSlug}/crm/objects`,
1086
+ options
1087
+ );
1088
+ };
1089
+ const crmControllerCreateField = (orgSlug, objectId, createCrmFieldDto, options) => {
1090
+ return axiosInstance.post(
1091
+ `/v3/${orgSlug}/crm/objects/${objectId}/fields`,
1092
+ createCrmFieldDto,
1093
+ options
1094
+ );
1095
+ };
1096
+ const crmControllerListFields = (orgSlug, objectId, options) => {
1097
+ return axiosInstance.get(
1098
+ `/v3/${orgSlug}/crm/objects/${objectId}/fields`,
1099
+ options
1100
+ );
1101
+ };
1102
+ const crmControllerCreateRelationship = (orgSlug, createCrmRelationshipDto, options) => {
1103
+ return axiosInstance.post(
1104
+ `/v3/${orgSlug}/crm/relationships`,
1105
+ createCrmRelationshipDto,
1106
+ options
1107
+ );
1108
+ };
1109
+ const crmControllerListRelationships = (orgSlug, options) => {
1110
+ return axiosInstance.get(
1111
+ `/v3/${orgSlug}/crm/relationships`,
1112
+ options
1113
+ );
1114
+ };
1115
+ const crmControllerCreateAssociation = (orgSlug, createCrmAssociationDto, options) => {
1116
+ return axiosInstance.post(
1117
+ `/v3/${orgSlug}/crm/associations`,
1118
+ createCrmAssociationDto,
1119
+ options
1120
+ );
1121
+ };
1122
+ const crmControllerListRecordAssociations = (orgSlug, id, options) => {
1123
+ return axiosInstance.get(
1124
+ `/v3/${orgSlug}/crm/records/${id}/associations`,
1125
+ options
1126
+ );
1127
+ };
1128
+ const loyaltyRedeemReward = (orgSlug, redeemRewardDto, options) => {
1129
+ return axiosInstance.post(
1130
+ `/v3/${orgSlug}/loyalty/vouchers/redeem`,
1131
+ redeemRewardDto,
1132
+ options
1133
+ );
1134
+ };
1135
+ const loyaltyGetCustomerStatus = (orgSlug, id, options) => {
1136
+ return axiosInstance.get(
1137
+ `/v3/${orgSlug}/loyalty/customers/${id}/status`,
1138
+ options
1139
+ );
1140
+ };
1141
+ const loyaltyValidateVoucher = (orgSlug, validateVoucherDto, options) => {
1142
+ return axiosInstance.post(
1143
+ `/v3/${orgSlug}/loyalty/vouchers/validate`,
1144
+ validateVoucherDto,
1145
+ options
1146
+ );
1147
+ };
1148
+ const ordersCreateOrder = (orgSlug, createOrderDto, options) => {
1149
+ return axiosInstance.post(
1150
+ `/v3/${orgSlug}/orders`,
1151
+ createOrderDto,
1152
+ options
1153
+ );
1154
+ };
1155
+ const ordersGetOrders = (orgSlug, params, options) => {
1156
+ return axiosInstance.get(
1157
+ `/v3/${orgSlug}/orders`,
1158
+ {
1159
+ ...options,
1160
+ params: { ...params, ...options?.params }
1161
+ }
1162
+ );
1163
+ };
1164
+ const ordersUpdateStatus = (orgSlug, id, updateOrderStatusDto, options) => {
1165
+ return axiosInstance.post(
1166
+ `/v3/${orgSlug}/orders/${id}/status`,
1167
+ updateOrderStatusDto,
1168
+ options
1169
+ );
1170
+ };
1171
+ const ordersRequestB2BQuote = (orgSlug, requestB2BQuoteDto, options) => {
1172
+ return axiosInstance.post(
1173
+ `/v3/${orgSlug}/orders/b2b/quotes`,
1174
+ requestB2BQuoteDto,
1175
+ options
1176
+ );
1177
+ };
1178
+ const ordersConvertQuoteToOrder = (orgSlug, id, options) => {
1179
+ return axiosInstance.post(
1180
+ `/v3/${orgSlug}/orders/b2b/quotes/${id}/convert`,
1181
+ void 0,
1182
+ options
1183
+ );
1184
+ };
1185
+ const paymentsControllerHandleStkCallback = (orgSlug, paymentId, options) => {
1186
+ return axiosInstance.post(
1187
+ `/v3/${orgSlug}/payments/webhooks/mpesa/stkpush/${paymentId}`,
1188
+ void 0,
1189
+ options
1190
+ );
1191
+ };
1192
+ const pOSProvision = (orgSlug, provisionDeviceDto, options) => {
1193
+ return axiosInstance.post(
1194
+ `/v3/${orgSlug}/pos/provision`,
1195
+ provisionDeviceDto,
1196
+ options
1197
+ );
1198
+ };
1199
+ const pOSLogin = (orgSlug, posLoginDto, options) => {
1200
+ return axiosInstance.post(
1201
+ `/v3/${orgSlug}/pos/login`,
1202
+ posLoginDto,
1203
+ options
1204
+ );
1205
+ };
1206
+ const pOSGetMe = (orgSlug, options) => {
1207
+ return axiosInstance.get(
1208
+ `/v3/${orgSlug}/pos/me`,
1209
+ options
1210
+ );
1211
+ };
1212
+ const pOSProcessSale = (orgSlug, processSaleDto, options) => {
1213
+ return axiosInstance.post(
1214
+ `/v3/${orgSlug}/pos/sale`,
1215
+ processSaleDto,
1216
+ options
1217
+ );
1218
+ };
1219
+ const pOSSync = (orgSlug, options) => {
1220
+ return axiosInstance.get(
1221
+ `/v3/${orgSlug}/pos/sync`,
1222
+ options
1223
+ );
1224
+ };
1225
+ const pOSGetTransactions = (orgSlug, options) => {
1226
+ return axiosInstance.get(
1227
+ `/v3/${orgSlug}/pos/transactions`,
1228
+ options
1229
+ );
1230
+ };
1231
+ const pOSRegisterPettyCash = (orgSlug, registerPettyCashDto, options) => {
1232
+ return axiosInstance.post(
1233
+ `/v3/${orgSlug}/pos/petty-cash`,
1234
+ registerPettyCashDto,
1235
+ options
1236
+ );
1237
+ };
1238
+ const pOSGetPettyCashFunds = (orgSlug, options) => {
1239
+ return axiosInstance.get(
1240
+ `/v3/${orgSlug}/pos/petty-cash/funds`,
1241
+ options
1242
+ );
1243
+ };
1244
+ const pOSGetPettyCashTransactions = (orgSlug, params, options) => {
1245
+ return axiosInstance.get(
1246
+ `/v3/${orgSlug}/pos/petty-cash/transactions`,
1247
+ {
1248
+ ...options,
1249
+ params: { ...params, ...options?.params }
1250
+ }
1251
+ );
1252
+ };
1253
+ const membersControllerGetMembers = (orgSlug, params, options) => {
1254
+ return axiosInstance.get(
1255
+ `/v3/${orgSlug}/members`,
1256
+ {
1257
+ ...options,
1258
+ params: { ...params, ...options?.params }
1259
+ }
1260
+ );
1261
+ };
1262
+ const membersControllerCreateMember = (orgSlug, createMemberDto, options) => {
1263
+ return axiosInstance.post(
1264
+ `/v3/${orgSlug}/members`,
1265
+ createMemberDto,
1266
+ options
1267
+ );
1268
+ };
1269
+ const membersControllerGetMember = (orgSlug, id, options) => {
1270
+ return axiosInstance.get(
1271
+ `/v3/${orgSlug}/members/${id}`,
1272
+ options
1273
+ );
1274
+ };
1275
+ const membersControllerUpdateMember = (orgSlug, id, updateMemberDto, options) => {
1276
+ return axiosInstance.patch(
1277
+ `/v3/${orgSlug}/members/${id}`,
1278
+ updateMemberDto,
1279
+ options
1280
+ );
1281
+ };
1282
+ const membersControllerDeleteMember = (orgSlug, id, options) => {
1283
+ return axiosInstance.delete(
1284
+ `/v3/${orgSlug}/members/${id}`,
1285
+ options
1286
+ );
1287
+ };
1288
+ const membersControllerGetMemberActivity = (orgSlug, id, options) => {
1289
+ return axiosInstance.get(
1290
+ `/v3/${orgSlug}/members/${id}/activity`,
1291
+ options
1292
+ );
1293
+ };
1294
+ const membersControllerUpdateStatus = (orgSlug, id, options) => {
1295
+ return axiosInstance.patch(
1296
+ `/v3/${orgSlug}/members/${id}/status`,
1297
+ void 0,
1298
+ options
1299
+ );
1300
+ };
1301
+ const membersControllerAdminCheckOut = (orgSlug, memberId, checkOutDto, options) => {
1302
+ return axiosInstance.post(
1303
+ `/v3/${orgSlug}/members/${memberId}/attendance/check-out`,
1304
+ checkOutDto,
1305
+ options
1306
+ );
1307
+ };
1308
+ const terminalMembersControllerLogin = (terminalLoginDto, options) => {
1309
+ return axiosInstance.post(
1310
+ `/v3/members/login`,
1311
+ terminalLoginDto,
1312
+ options
1313
+ );
1314
+ };
1315
+ const invitationsList = (orgSlug, params, options) => {
1316
+ return axiosInstance.get(
1317
+ `/v3/${orgSlug}/members/invitations`,
1318
+ {
1319
+ ...options,
1320
+ params: { ...params, ...options?.params }
1321
+ }
1322
+ );
1323
+ };
1324
+ const invitationsCreate = (orgSlug, createInvitationDto, options) => {
1325
+ return axiosInstance.post(
1326
+ `/v3/${orgSlug}/members/invitations`,
1327
+ createInvitationDto,
1328
+ options
1329
+ );
1330
+ };
1331
+ const invitationsRevoke = (orgSlug, id, options) => {
1332
+ return axiosInstance.delete(
1333
+ `/v3/${orgSlug}/members/invitations/${id}`,
1334
+ options
1335
+ );
1336
+ };
1337
+ const invitationsAccept = (orgSlug, acceptInvitationDto, options) => {
1338
+ return axiosInstance.post(
1339
+ `/v3/${orgSlug}/members/invitations/accept`,
1340
+ acceptInvitationDto,
1341
+ options
1342
+ );
1343
+ };
1344
+ const roleManagementControllerGetCustomRoles = (orgSlug, params, options) => {
1345
+ return axiosInstance.get(
1346
+ `/v3/${orgSlug}/members/roles/custom`,
1347
+ {
1348
+ ...options,
1349
+ params: { ...params, ...options?.params }
1350
+ }
1351
+ );
1352
+ };
1353
+ const roleManagementControllerCreateCustomRole = (orgSlug, createCustomRoleDto, options) => {
1354
+ return axiosInstance.post(
1355
+ `/v3/${orgSlug}/members/roles/custom`,
1356
+ createCustomRoleDto,
1357
+ options
1358
+ );
1359
+ };
1360
+ const roleManagementControllerUpdateCustomRole = (orgSlug, id, updateCustomRoleDto, options) => {
1361
+ return axiosInstance.patch(
1362
+ `/v3/${orgSlug}/members/roles/custom/${id}`,
1363
+ updateCustomRoleDto,
1364
+ options
1365
+ );
1366
+ };
1367
+ const roleManagementControllerDeleteCustomRole = (orgSlug, id, options) => {
1368
+ return axiosInstance.delete(
1369
+ `/v3/${orgSlug}/members/roles/custom/${id}`,
1370
+ options
1371
+ );
1372
+ };
1373
+ const roleManagementControllerGetPermissionSets = (orgSlug, options) => {
1374
+ return axiosInstance.get(
1375
+ `/v3/${orgSlug}/members/roles/permission-sets`,
1376
+ options
1377
+ );
1378
+ };
1379
+ const roleManagementControllerCreatePermissionSet = (orgSlug, createPermissionSetDto, options) => {
1380
+ return axiosInstance.post(
1381
+ `/v3/${orgSlug}/members/roles/permission-sets`,
1382
+ createPermissionSetDto,
1383
+ options
1384
+ );
1385
+ };
1386
+ const roleManagementControllerGetRoleGroups = (orgSlug, options) => {
1387
+ return axiosInstance.get(
1388
+ `/v3/${orgSlug}/members/roles/groups`,
1389
+ options
1390
+ );
1391
+ };
1392
+ const roleManagementControllerCreateRoleGroup = (orgSlug, createRoleGroupDto, options) => {
1393
+ return axiosInstance.post(
1394
+ `/v3/${orgSlug}/members/roles/groups`,
1395
+ createRoleGroupDto,
1396
+ options
1397
+ );
1398
+ };
1399
+ const roleManagementControllerAssignRoles = (orgSlug, memberId, options) => {
1400
+ return axiosInstance.post(
1401
+ `/v3/${orgSlug}/members/roles/member/${memberId}/assign`,
1402
+ void 0,
1403
+ options
1404
+ );
1405
+ };
1406
+ const roleManagementControllerRemoveRoles = (orgSlug, memberId, options) => {
1407
+ return axiosInstance.post(
1408
+ `/v3/${orgSlug}/members/roles/member/${memberId}/remove`,
1409
+ void 0,
1410
+ options
1411
+ );
1412
+ };
1413
+ const departmentsList = (orgSlug, params, options) => {
1414
+ return axiosInstance.get(
1415
+ `/v3/${orgSlug}/members/departments`,
1416
+ {
1417
+ ...options,
1418
+ params: { ...params, ...options?.params }
1419
+ }
1420
+ );
1421
+ };
1422
+ const departmentsCreate = (orgSlug, createDepartmentDto, options) => {
1423
+ return axiosInstance.post(
1424
+ `/v3/${orgSlug}/members/departments`,
1425
+ createDepartmentDto,
1426
+ options
1427
+ );
1428
+ };
1429
+ const departmentsGet = (orgSlug, id, options) => {
1430
+ return axiosInstance.get(
1431
+ `/v3/${orgSlug}/members/departments/${id}`,
1432
+ options
1433
+ );
1434
+ };
1435
+ const departmentsUpdate = (orgSlug, id, updateDepartmentDto, options) => {
1436
+ return axiosInstance.patch(
1437
+ `/v3/${orgSlug}/members/departments/${id}`,
1438
+ updateDepartmentDto,
1439
+ options
1440
+ );
1441
+ };
1442
+ const departmentsDelete = (orgSlug, id, options) => {
1443
+ return axiosInstance.delete(
1444
+ `/v3/${orgSlug}/members/departments/${id}`,
1445
+ options
1446
+ );
1447
+ };
1448
+ const departmentsAddMember = (orgSlug, id, addDepartmentMemberDto, options) => {
1449
+ return axiosInstance.post(
1450
+ `/v3/${orgSlug}/members/departments/${id}/members`,
1451
+ addDepartmentMemberDto,
1452
+ options
1453
+ );
1454
+ };
1455
+ const departmentsRemoveMember = (orgSlug, id, memberId, options) => {
1456
+ return axiosInstance.delete(
1457
+ `/v3/${orgSlug}/members/departments/${id}/members/${memberId}`,
1458
+ options
1459
+ );
1460
+ };
1461
+ const attendanceControllerGetLogs = (orgSlug, params, options) => {
1462
+ return axiosInstance.get(
1463
+ `/v3/${orgSlug}/members/attendance/logs`,
1464
+ {
1465
+ ...options,
1466
+ params: { ...params, ...options?.params }
1467
+ }
1468
+ );
1469
+ };
1470
+ const attendanceControllerCheckIn = (orgSlug, checkInDto, options) => {
1471
+ return axiosInstance.post(
1472
+ `/v3/${orgSlug}/members/attendance/check-in`,
1473
+ checkInDto,
1474
+ options
1475
+ );
1476
+ };
1477
+ const attendanceControllerCheckOut = (orgSlug, checkOutDto, options) => {
1478
+ return axiosInstance.post(
1479
+ `/v3/${orgSlug}/members/attendance/check-out`,
1480
+ checkOutDto,
1481
+ options
1482
+ );
1483
+ };
1484
+ const attendanceControllerGetMyStatus = (orgSlug, options) => {
1485
+ return axiosInstance.get(
1486
+ `/v3/${orgSlug}/members/attendance/me/status`,
1487
+ options
1488
+ );
1489
+ };
1490
+ const attendanceControllerGetStatus = (orgSlug, memberId, options) => {
1491
+ return axiosInstance.get(
1492
+ `/v3/${orgSlug}/members/attendance/${memberId}/status`,
1493
+ options
1494
+ );
1495
+ };
1496
+ const announcementControllerBroadcastAnnouncement = (orgSlug, announcementDto, options) => {
1497
+ return axiosInstance.post(
1498
+ `/v3/${orgSlug}/announcements`,
1499
+ announcementDto,
1500
+ options
1501
+ );
1502
+ };
1503
+ const cartControllerGetCart = (orgSlug, params, options) => {
1504
+ return axiosInstance.get(
1505
+ `/v3/${orgSlug}/cart`,
1506
+ {
1507
+ ...options,
1508
+ params: { ...params, ...options?.params }
1509
+ }
1510
+ );
1511
+ };
1512
+ const cartControllerClearCart = (orgSlug, params, options) => {
1513
+ return axiosInstance.delete(
1514
+ `/v3/${orgSlug}/cart`,
1515
+ {
1516
+ ...options,
1517
+ params: { ...params, ...options?.params }
1518
+ }
1519
+ );
1520
+ };
1521
+ const cartControllerAddToCart = (orgSlug, addToCartDto, options) => {
1522
+ return axiosInstance.post(
1523
+ `/v3/${orgSlug}/cart/items`,
1524
+ addToCartDto,
1525
+ options
1526
+ );
1527
+ };
1528
+ const cartControllerRemoveFromCart = (orgSlug, removeFromCartDto, options) => {
1529
+ return axiosInstance.delete(
1530
+ `/v3/${orgSlug}/cart/items`,
1531
+ { data: removeFromCartDto, ...options }
1532
+ );
1533
+ };
1534
+ const favoritesControllerGetFavorites = (orgSlug, options) => {
1535
+ return axiosInstance.get(
1536
+ `/v3/${orgSlug}/favorites`,
1537
+ options
1538
+ );
1539
+ };
1540
+ const favoritesControllerAddFavorite = (orgSlug, favoriteDto, options) => {
1541
+ return axiosInstance.post(
1542
+ `/v3/${orgSlug}/favorites`,
1543
+ favoriteDto,
1544
+ options
1545
+ );
1546
+ };
1547
+ const favoritesControllerRemoveFavorite = (orgSlug, favoriteDto, options) => {
1548
+ return axiosInstance.delete(
1549
+ `/v3/${orgSlug}/favorites`,
1550
+ { data: favoriteDto, ...options }
1551
+ );
1552
+ };
1553
+ const stockingGetPurchases = (orgSlug, params, options) => {
1554
+ return axiosInstance.get(
1555
+ `/v3/${orgSlug}/stocking/purchases`,
1556
+ {
1557
+ ...options,
1558
+ params: { ...params, ...options?.params }
1559
+ }
1560
+ );
1561
+ };
1562
+ const stockingCreatePurchase = (orgSlug, createPurchaseDto, options) => {
1563
+ return axiosInstance.post(
1564
+ `/v3/${orgSlug}/stocking/purchases`,
1565
+ createPurchaseDto,
1566
+ options
1567
+ );
1568
+ };
1569
+ const stockingReceivePurchase = (orgSlug, id, receivePurchaseDto, options) => {
1570
+ return axiosInstance.post(
1571
+ `/v3/${orgSlug}/stocking/purchases/${id}/receive`,
1572
+ receivePurchaseDto,
1573
+ options
1574
+ );
1575
+ };
1576
+ const stockingGetTransfers = (orgSlug, params, options) => {
1577
+ return axiosInstance.get(
1578
+ `/v3/${orgSlug}/stocking/transfers`,
1579
+ {
1580
+ ...options,
1581
+ params: { ...params, ...options?.params }
1582
+ }
1583
+ );
1584
+ };
1585
+ const stockingCreateTransfer = (orgSlug, createTransferDto, options) => {
1586
+ return axiosInstance.post(
1587
+ `/v3/${orgSlug}/stocking/transfers`,
1588
+ createTransferDto,
1589
+ options
1590
+ );
1591
+ };
1592
+ const stockingShipTransfer = (orgSlug, id, shipTransferDto, options) => {
1593
+ return axiosInstance.post(
1594
+ `/v3/${orgSlug}/stocking/transfers/${id}/ship`,
1595
+ shipTransferDto,
1596
+ options
1597
+ );
1598
+ };
1599
+ const stockingReceiveTransfer = (orgSlug, id, receiveTransferDto, options) => {
1600
+ return axiosInstance.post(
1601
+ `/v3/${orgSlug}/stocking/transfers/${id}/receive`,
1602
+ receiveTransferDto,
1603
+ options
1604
+ );
1605
+ };
1606
+ const stockingGetRequests = (orgSlug, params, options) => {
1607
+ return axiosInstance.get(
1608
+ `/v3/${orgSlug}/stocking/requests`,
1609
+ {
1610
+ ...options,
1611
+ params: { ...params, ...options?.params }
1612
+ }
1613
+ );
1614
+ };
1615
+ const stockingGetPendingDispatch = (orgSlug, params, options) => {
1616
+ return axiosInstance.get(
1617
+ `/v3/${orgSlug}/stocking/reconciliation/pending-dispatch`,
1618
+ {
1619
+ ...options,
1620
+ params: { ...params, ...options?.params }
1621
+ }
1622
+ );
1623
+ };
1624
+ const stockingDispatchOrders = (orgSlug, dispatchOrderDto, options) => {
1625
+ return axiosInstance.post(
1626
+ `/v3/${orgSlug}/stocking/reconciliation/dispatch`,
1627
+ dispatchOrderDto,
1628
+ options
1629
+ );
1630
+ };
1631
+ const stockingGetActiveDeliveries = (orgSlug, params, options) => {
1632
+ return axiosInstance.get(
1633
+ `/v3/${orgSlug}/stocking/reconciliation/active-deliveries`,
1634
+ {
1635
+ ...options,
1636
+ params: { ...params, ...options?.params }
1637
+ }
1638
+ );
1639
+ };
1640
+ const stockingReconcilePod = (orgSlug, reconcilePodDto, options) => {
1641
+ return axiosInstance.post(
1642
+ `/v3/${orgSlug}/stocking/reconciliation/reconcile-pod`,
1643
+ reconcilePodDto,
1644
+ options
1645
+ );
1646
+ };
1647
+ const stockingGetPhysicalReconciliations = (orgSlug, params, options) => {
1648
+ return axiosInstance.get(
1649
+ `/v3/${orgSlug}/stocking/physical-reconciliations`,
1650
+ {
1651
+ ...options,
1652
+ params: { ...params, ...options?.params }
1653
+ }
1654
+ );
1655
+ };
1656
+ const stockingSubmitPhysicalReconciliation = (orgSlug, submitReconciliationDto, options) => {
1657
+ return axiosInstance.post(
1658
+ `/v3/${orgSlug}/stocking/physical-reconciliations`,
1659
+ submitReconciliationDto,
1660
+ options
1661
+ );
1662
+ };
1663
+ const stockingGetReconciliationReport = (orgSlug, id, options) => {
1664
+ return axiosInstance.get(
1665
+ `/v3/${orgSlug}/stocking/physical-reconciliations/${id}/report`,
1666
+ options
1667
+ );
1668
+ };
1669
+ const stockingGetPartners = (orgSlug, options) => {
1670
+ return axiosInstance.get(
1671
+ `/v3/${orgSlug}/stocking/partners`,
1672
+ options
1673
+ );
1674
+ };
1675
+ const stockingCreatePartner = (orgSlug, createPartnerDto, options) => {
1676
+ return axiosInstance.post(
1677
+ `/v3/${orgSlug}/stocking/partners`,
1678
+ createPartnerDto,
1679
+ options
1680
+ );
1681
+ };
1682
+ const stockingGetPartner = (orgSlug, id, options) => {
1683
+ return axiosInstance.get(
1684
+ `/v3/${orgSlug}/stocking/partners/${id}`,
1685
+ options
1686
+ );
1687
+ };
1688
+ const stockingUpdatePartner = (orgSlug, id, updatePartnerDto, options) => {
1689
+ return axiosInstance.patch(
1690
+ `/v3/${orgSlug}/stocking/partners/${id}`,
1691
+ updatePartnerDto,
1692
+ options
1693
+ );
1694
+ };
1695
+ const stockingAdjustPartnerWallet = (orgSlug, id, partnerWalletActionDto, options) => {
1696
+ return axiosInstance.post(
1697
+ `/v3/${orgSlug}/stocking/partners/${id}/wallet/adjust`,
1698
+ partnerWalletActionDto,
1699
+ options
1700
+ );
1701
+ };
1702
+ const standalonePosControllerCreateSetupKey = (createSetupKeyDto, options) => {
1703
+ return axiosInstance.post(
1704
+ `/v3/standalone-pos/setup-keys`,
1705
+ createSetupKeyDto,
1706
+ options
1707
+ );
1708
+ };
1709
+ const standalonePosControllerActivateDevice = (activateDeviceDto, options) => {
1710
+ return axiosInstance.post(
1711
+ `/v3/standalone-pos/activate`,
1712
+ activateDeviceDto,
1713
+ options
1714
+ );
1715
+ };
1716
+ const standalonePosControllerValidateKey = (options) => {
1717
+ return axiosInstance.get(
1718
+ `/v3/standalone-pos/validate`,
1719
+ options
1720
+ );
1721
+ };
1722
+ const standalonePosControllerLinkOrganization = (linkOrganizationDto, options) => {
1723
+ return axiosInstance.patch(
1724
+ `/v3/standalone-pos/link-org`,
1725
+ linkOrganizationDto,
1726
+ options
1727
+ );
1728
+ };
1729
+ const b2BGetCatalog = (orgSlug, params, options) => {
1730
+ return axiosInstance.get(
1731
+ `/v3/${orgSlug}/b2b/catalog`,
1732
+ {
1733
+ ...options,
1734
+ params: { ...params, ...options?.params }
1735
+ }
1736
+ );
1737
+ };
1738
+ const b2BGetInvoices = (orgSlug, options) => {
1739
+ return axiosInstance.get(
1740
+ `/v3/${orgSlug}/b2b/invoices`,
1741
+ options
1742
+ );
1743
+ };
1744
+ const b2BGetOrders = (orgSlug, options) => {
1745
+ return axiosInstance.get(
1746
+ `/v3/${orgSlug}/b2b/orders`,
1747
+ options
1748
+ );
1749
+ };
1750
+ const b2BCreateOrder = (orgSlug, createB2BOrderDto, options) => {
1751
+ return axiosInstance.post(
1752
+ `/v3/${orgSlug}/b2b/orders`,
1753
+ createB2BOrderDto,
1754
+ options
1755
+ );
1756
+ };
1757
+ const b2BCreateQuote = (orgSlug, createB2BOrderDto, options) => {
1758
+ return axiosInstance.post(
1759
+ `/v3/${orgSlug}/b2b/quotes`,
1760
+ createB2BOrderDto,
1761
+ options
1762
+ );
1763
+ };
1764
+ const crmIntegrationsGetAuthUrl = (orgSlug, provider, options) => {
1765
+ return axiosInstance.get(
1766
+ `/v3/${orgSlug}/crm-integrations/${provider}/auth`,
1767
+ options
1768
+ );
1769
+ };
1770
+ const crmIntegrationsHandleCallback = (orgSlug, provider, params, options) => {
1771
+ return axiosInstance.get(
1772
+ `/v3/${orgSlug}/crm-integrations/${provider}/callback`,
1773
+ {
1774
+ ...options,
1775
+ params: { ...params, ...options?.params }
1776
+ }
1777
+ );
1778
+ };
1779
+ const crmIntegrationsHandleWebhook = (orgSlug, provider, options) => {
1780
+ return axiosInstance.post(
1781
+ `/v3/${orgSlug}/crm-integrations/${provider}/webhook`,
1782
+ void 0,
1783
+ options
1784
+ );
1785
+ };
1786
+ const crmIntegrationsReplyToActivity = (orgSlug, id, options) => {
1787
+ return axiosInstance.post(
1788
+ `/v3/${orgSlug}/crm-integrations/activities/${id}/reply`,
1789
+ void 0,
1790
+ options
1791
+ );
1792
+ };
1793
+ const unitsGetUnits = (orgSlug, params, options) => {
1794
+ return axiosInstance.get(
1795
+ `/v3/${orgSlug}/units`,
1796
+ {
1797
+ ...options,
1798
+ params: { ...params, ...options?.params }
1799
+ }
1800
+ );
1801
+ };
1802
+ const strapiCreateConnection = (orgSlug, createStrapiConnectionDto, options) => {
1803
+ return axiosInstance.post(
1804
+ `/v3/${orgSlug}/strapi/connections`,
1805
+ createStrapiConnectionDto,
1806
+ options
1807
+ );
1808
+ };
1809
+ const strapiListConnections = (orgSlug, options) => {
1810
+ return axiosInstance.get(
1811
+ `/v3/${orgSlug}/strapi/connections`,
1812
+ options
1813
+ );
1814
+ };
1815
+ const strapiGetConnection = (orgSlug, connectionId, options) => {
1816
+ return axiosInstance.get(
1817
+ `/v3/${orgSlug}/strapi/connections/${connectionId}`,
1818
+ options
1819
+ );
1820
+ };
1821
+ const strapiUpdateConnection = (orgSlug, connectionId, updateStrapiConnectionDto, options) => {
1822
+ return axiosInstance.patch(
1823
+ `/v3/${orgSlug}/strapi/connections/${connectionId}`,
1824
+ updateStrapiConnectionDto,
1825
+ options
1826
+ );
1827
+ };
1828
+ const strapiDeleteConnection = (orgSlug, connectionId, options) => {
1829
+ return axiosInstance.delete(
1830
+ `/v3/${orgSlug}/strapi/connections/${connectionId}`,
1831
+ options
1832
+ );
1833
+ };
1834
+ const strapiTriggerSync = (orgSlug, connectionId, triggerSyncDto, options) => {
1835
+ return axiosInstance.post(
1836
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/sync`,
1837
+ triggerSyncDto,
1838
+ options
1839
+ );
1840
+ };
1841
+ const strapiEnqueueSync = (orgSlug, connectionId, triggerSyncDto, options) => {
1842
+ return axiosInstance.post(
1843
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/sync/queue`,
1844
+ triggerSyncDto,
1845
+ options
1846
+ );
1847
+ };
1848
+ const strapiGetWebhookLogs = (orgSlug, connectionId, options) => {
1849
+ return axiosInstance.get(
1850
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/webhook-logs`,
1851
+ options
1852
+ );
1853
+ };
1854
+ const strapiGetSyncLogs = (orgSlug, connectionId, options) => {
1855
+ return axiosInstance.get(
1856
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/sync-logs`,
1857
+ options
1858
+ );
1859
+ };
1860
+ const strapiExchangeCustomerToken = (orgSlug, connectionId, options) => {
1861
+ return axiosInstance.post(
1862
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/customers/exchange-token`,
1863
+ void 0,
1864
+ options
1865
+ );
1866
+ };
1867
+ const strapiRegisterCustomer = (orgSlug, connectionId, options) => {
1868
+ return axiosInstance.post(
1869
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/customers/register`,
1870
+ void 0,
1871
+ options
1872
+ );
1873
+ };
1874
+ const strapiReceiveWebhook = (connectionId, options) => {
1875
+ return axiosInstance.post(
1876
+ `/v3/webhooks/strapi/${connectionId}`,
1877
+ void 0,
1878
+ options
1879
+ );
1880
+ };
1881
+ const analyticsControllerGetDashboardAnalytics = (orgSlug, options) => {
1882
+ return axiosInstance.get(
1883
+ `/v3/${orgSlug}/analytics/dashboard`,
1884
+ options
1885
+ );
1886
+ };
1887
+ const analyticsControllerGetResourceUtilization = (orgSlug, params, options) => {
1888
+ return axiosInstance.get(
1889
+ `/v3/${orgSlug}/analytics/utilization`,
1890
+ {
1891
+ ...options,
1892
+ params: { ...params, ...options?.params }
1893
+ }
1894
+ );
1895
+ };
1896
+ return { inventoryVerifyIntegrity, inventoryFixIntegrity, inventoryGetInventory, inventoryTraceBatch, inventorySplitBatch, inventoryMergeBatches, inventoryCreateAssembly, inventoryCompleteAssembly, inventoryRequestAdjustment, inventoryGetAdjustments, inventoryApproveAdjustment, inventoryRejectAdjustment, inventoryGetLeadTime, inventoryGetWasteAnalysis, inventoryCheckB2BAvailability, inventoryUnpackBatch, inventoryScanUnpackBatch, inventoryQuickStockInquiry, expenseControllerCreateExpense, expenseControllerGetExpenses, expenseControllerGetExpenseCategories, expenseControllerGetExpense, pettyCashControllerCreateFund, pettyCashControllerGetFunds, pettyCashControllerGetFund, pettyCashControllerTopUpFund, pettyCashControllerGetFundTransactions, utilityAccountControllerCreateAccount, utilityAccountControllerGetAccounts, utilityAccountControllerGetAccount, accountingInitialize, accountingGetProfitLoss, accountingGetBalanceSheet, accountingGetCashFlow, accountingGetTaxSummary, invoiceControllerCreateInvoice, invoiceControllerGetInvoices, invoiceControllerGetInvoice, invoiceControllerUpdateInvoice, invoiceControllerDeleteInvoice, invoiceControllerFinalizeInvoice, invoiceControllerGetTemplates, invoiceControllerCreateTemplate, invoiceControllerGetConfig, invoiceControllerUpdateConfig, publicInvoiceControllerDownloadInvoice, publicInvoiceControllerDownloadInvoiceByTransaction, publicInvoiceControllerDownloadReceipt, publicInvoiceControllerGeneratePublicLink, authExchangeToken, authControllerHandleOAuth2, adminControllerGetStats, adminControllerListOrganizations, adminControllerCreateOrganization, adminControllerGetOrganizationDetails, adminControllerUpdateOrganization, adminControllerDeleteOrganization, adminControllerListMembers, adminControllerListUsers, adminControllerBanUser, adminControllerUnbanUser, adminControllerListConnectedApps, adminControllerListSystemLogs, adminControllerListGlobalSettings, adminControllerSetGlobalSetting, adminControllerDeleteGlobalSetting, adminControllerListTiers, adminControllerDefineTier, adminControllerDeleteTier, adminControllerGetOrganizationSubscription, adminControllerUpdateOrganizationSubscription, adminControllerListSystemPayments, adminControllerRecordCustomPayment, adminControllerListIntegrationDefinitions, adminControllerCreateIntegrationDefinition, adminControllerUpdateIntegrationDefinition, adminControllerDeleteIntegrationDefinition, adminControllerListActiveOrganizationIntegrations, webhooksCreate, webhooksList, webhooksDelete, windmillCallbackControllerHandleCallback, windmillCallbackControllerHandleApprovalCallback, windmillCallbackControllerHandleBakeryDisposalCallback, windmillCallbackControllerHandleOutcomeCallback, catalogGetProducts, catalogCreateProduct, catalogGetServices, catalogUpdateProduct, catalogUpdateSupplierVariant, catalogGetPriceChangeRequests, catalogReviewPriceChangeRequest, servicesCreateCategory, servicesGetCategories, servicesUpdateCategory, servicesDeleteCategory, servicesCreateService, servicesGetServices, servicesGetCurrentMemberShifts, servicesGetShifts, servicesGetService, servicesUpdateService, servicesDeleteService, servicesCreateResource, servicesGetResources, servicesUpdateResource, servicesDeleteResource, servicesCreateBooking, servicesGetBookings, servicesGetBooking, servicesUpdateBookingStatus, servicesCompleteBooking, servicesCreateShift, servicesGetStaffShifts, servicesAddBreak, servicesRegisterCustomerApp, servicesGetUtilization, servicesGetPerformance, servicesGetFunnel, publicServicesListServices, publicServicesGetCategories, publicServicesGetService, publicServicesGetAvailability, publicServicesRequestOtp, publicServicesVerifyOtp, publicServicesCreatePublicBooking, customersProvisionZitadel, customersGetCustomers, customersRegister, customersLogin, customersGetCurrentSession, customersGetSessions, customersRevokeAllSessions, customersRevokeSession, customersUpdate, customersGetCustomerById, customersDelete, customersGetAddresses, customersAddAddress, businessAccountControllerCreate, businessAccountControllerGetOne, crmControllerCreateRecord, crmControllerGetRecord, crmControllerUpdateRecord, crmControllerCreateNote, crmControllerGetRecordNotes, crmControllerCreateActivity, crmControllerGetTimeline, crmControllerCreateObject, crmControllerListObjects, crmControllerCreateField, crmControllerListFields, crmControllerCreateRelationship, crmControllerListRelationships, crmControllerCreateAssociation, crmControllerListRecordAssociations, loyaltyRedeemReward, loyaltyGetCustomerStatus, loyaltyValidateVoucher, ordersCreateOrder, ordersGetOrders, ordersUpdateStatus, ordersRequestB2BQuote, ordersConvertQuoteToOrder, paymentsControllerHandleStkCallback, pOSProvision, pOSLogin, pOSGetMe, pOSProcessSale, pOSSync, pOSGetTransactions, pOSRegisterPettyCash, pOSGetPettyCashFunds, pOSGetPettyCashTransactions, membersControllerGetMembers, membersControllerCreateMember, membersControllerGetMember, membersControllerUpdateMember, membersControllerDeleteMember, membersControllerGetMemberActivity, membersControllerUpdateStatus, membersControllerAdminCheckOut, terminalMembersControllerLogin, invitationsList, invitationsCreate, invitationsRevoke, invitationsAccept, roleManagementControllerGetCustomRoles, roleManagementControllerCreateCustomRole, roleManagementControllerUpdateCustomRole, roleManagementControllerDeleteCustomRole, roleManagementControllerGetPermissionSets, roleManagementControllerCreatePermissionSet, roleManagementControllerGetRoleGroups, roleManagementControllerCreateRoleGroup, roleManagementControllerAssignRoles, roleManagementControllerRemoveRoles, departmentsList, departmentsCreate, departmentsGet, departmentsUpdate, departmentsDelete, departmentsAddMember, departmentsRemoveMember, attendanceControllerGetLogs, attendanceControllerCheckIn, attendanceControllerCheckOut, attendanceControllerGetMyStatus, attendanceControllerGetStatus, announcementControllerBroadcastAnnouncement, cartControllerGetCart, cartControllerClearCart, cartControllerAddToCart, cartControllerRemoveFromCart, favoritesControllerGetFavorites, favoritesControllerAddFavorite, favoritesControllerRemoveFavorite, stockingGetPurchases, stockingCreatePurchase, stockingReceivePurchase, stockingGetTransfers, stockingCreateTransfer, stockingShipTransfer, stockingReceiveTransfer, stockingGetRequests, stockingGetPendingDispatch, stockingDispatchOrders, stockingGetActiveDeliveries, stockingReconcilePod, stockingGetPhysicalReconciliations, stockingSubmitPhysicalReconciliation, stockingGetReconciliationReport, stockingGetPartners, stockingCreatePartner, stockingGetPartner, stockingUpdatePartner, stockingAdjustPartnerWallet, standalonePosControllerCreateSetupKey, standalonePosControllerActivateDevice, standalonePosControllerValidateKey, standalonePosControllerLinkOrganization, b2BGetCatalog, b2BGetInvoices, b2BGetOrders, b2BCreateOrder, b2BCreateQuote, crmIntegrationsGetAuthUrl, crmIntegrationsHandleCallback, crmIntegrationsHandleWebhook, crmIntegrationsReplyToActivity, unitsGetUnits, strapiCreateConnection, strapiListConnections, strapiGetConnection, strapiUpdateConnection, strapiDeleteConnection, strapiTriggerSync, strapiEnqueueSync, strapiGetWebhookLogs, strapiGetSyncLogs, strapiExchangeCustomerToken, strapiRegisterCustomer, strapiReceiveWebhook, analyticsControllerGetDashboardAnalytics, analyticsControllerGetResourceUtilization };
1897
+ };
1898
+
1899
+ // src/base.ts
1900
+ var methodsWithOrgSlugSet = /* @__PURE__ */ new Set([
1901
+ "publicServicesListServices",
1902
+ "publicServicesGetCategories",
1903
+ "publicServicesGetService",
1904
+ "publicServicesGetAvailability",
1905
+ "publicServicesRequestOtp",
1906
+ "publicServicesVerifyOtp",
1907
+ "publicServicesCreatePublicBooking",
1908
+ "inventoryVerifyIntegrity",
1909
+ "inventoryFixIntegrity",
1910
+ "inventoryGetInventory",
1911
+ "inventoryTraceBatch",
1912
+ "inventorySplitBatch",
1913
+ "inventoryMergeBatches",
1914
+ "inventoryCreateAssembly",
1915
+ "inventoryCompleteAssembly",
1916
+ "inventoryRequestAdjustment",
1917
+ "inventoryGetAdjustments",
1918
+ "inventoryApproveAdjustment",
1919
+ "inventoryRejectAdjustment",
1920
+ "inventoryGetLeadTime",
1921
+ "inventoryGetWasteAnalysis",
1922
+ "inventoryCheckB2BAvailability",
1923
+ "inventoryUnpackBatch",
1924
+ "inventoryScanUnpackBatch",
1925
+ "inventoryQuickStockInquiry",
1926
+ "accountingInitialize",
1927
+ "accountingGetProfitLoss",
1928
+ "accountingGetBalanceSheet",
1929
+ "accountingGetCashFlow",
1930
+ "accountingGetTaxSummary",
1931
+ "webhooksCreate",
1932
+ "webhooksList",
1933
+ "webhooksDelete",
1934
+ "catalogGetProducts",
1935
+ "catalogCreateProduct",
1936
+ "catalogGetServices",
1937
+ "catalogUpdateProduct",
1938
+ "catalogUpdateSupplierVariant",
1939
+ "catalogGetPriceChangeRequests",
1940
+ "catalogReviewPriceChangeRequest",
1941
+ "servicesCreateCategory",
1942
+ "servicesGetCategories",
1943
+ "servicesUpdateCategory",
1944
+ "servicesDeleteCategory",
1945
+ "servicesCreateService",
1946
+ "servicesGetServices",
1947
+ "servicesGetCurrentMemberShifts",
1948
+ "servicesGetShifts",
1949
+ "servicesGetService",
1950
+ "servicesUpdateService",
1951
+ "servicesDeleteService",
1952
+ "servicesCreateResource",
1953
+ "servicesGetResources",
1954
+ "servicesUpdateResource",
1955
+ "servicesDeleteResource",
1956
+ "servicesCreateBooking",
1957
+ "servicesGetBookings",
1958
+ "servicesGetBooking",
1959
+ "servicesUpdateBookingStatus",
1960
+ "servicesCompleteBooking",
1961
+ "servicesCreateShift",
1962
+ "servicesGetStaffShifts",
1963
+ "servicesAddBreak",
1964
+ "servicesRegisterCustomerApp",
1965
+ "servicesGetUtilization",
1966
+ "servicesGetPerformance",
1967
+ "servicesGetFunnel",
1968
+ "customersProvisionZitadel",
1969
+ "customersGetCustomers",
1970
+ "customersRegister",
1971
+ "customersUpdate",
1972
+ "customersGetCustomerById",
1973
+ "customersDelete",
1974
+ "customersGetAddresses",
1975
+ "customersAddAddress",
1976
+ "customersGetCurrentSession",
1977
+ "businessAccountControllerCreate",
1978
+ "businessAccountControllerGetOne",
1979
+ "crmControllerCreateRecord",
1980
+ "crmControllerGetRecord",
1981
+ "crmControllerUpdateRecord",
1982
+ "crmControllerCreateNote",
1983
+ "crmControllerGetRecordNotes",
1984
+ "crmControllerCreateActivity",
1985
+ "crmControllerGetTimeline",
1986
+ "crmControllerCreateObject",
1987
+ "crmControllerListObjects",
1988
+ "crmControllerCreateField",
1989
+ "crmControllerListFields",
1990
+ "crmControllerCreateRelationship",
1991
+ "crmControllerListRelationships",
1992
+ "crmControllerCreateAssociation",
1993
+ "crmControllerListRecordAssociations",
1994
+ "loyaltyRedeemReward",
1995
+ "loyaltyGetCustomerStatus",
1996
+ "loyaltyValidateVoucher",
1997
+ "ordersCreateOrder",
1998
+ "ordersGetOrders",
1999
+ "ordersUpdateStatus",
2000
+ "ordersRequestB2BQuote",
2001
+ "ordersConvertQuoteToOrder",
2002
+ "paymentsControllerHandleStkCallback",
2003
+ "pOSProvision",
2004
+ "pOSLogin",
2005
+ "pOSGetMe",
2006
+ "pOSProcessSale",
2007
+ "pOSSync",
2008
+ "pOSGetTransactions",
2009
+ "pOSRegisterPettyCash",
2010
+ "pOSGetPettyCashFunds",
2011
+ "pOSGetPettyCashTransactions",
2012
+ "membersControllerGetMembers",
2013
+ "membersControllerCreateMember",
2014
+ "membersControllerGetMember",
2015
+ "membersControllerUpdateMember",
2016
+ "membersControllerDeleteMember",
2017
+ "membersControllerGetMemberActivity",
2018
+ "membersControllerUpdateStatus",
2019
+ "membersControllerAdminCheckOut",
2020
+ "invitationsList",
2021
+ "invitationsCreate",
2022
+ "invitationsRevoke",
2023
+ "invitationsAccept",
2024
+ "roleManagementControllerGetCustomRoles",
2025
+ "roleManagementControllerCreateCustomRole",
2026
+ "roleManagementControllerUpdateCustomRole",
2027
+ "roleManagementControllerDeleteCustomRole",
2028
+ "roleManagementControllerGetPermissionSets",
2029
+ "roleManagementControllerCreatePermissionSet",
2030
+ "roleManagementControllerGetRoleGroups",
2031
+ "roleManagementControllerCreateRoleGroup",
2032
+ "roleManagementControllerAssignRoles",
2033
+ "roleManagementControllerRemoveRoles",
2034
+ "departmentsList",
2035
+ "cartControllerGetCart",
2036
+ "cartControllerClearCart",
2037
+ "cartControllerAddToCart",
2038
+ "cartControllerRemoveFromCart",
2039
+ "favoritesControllerGetFavorites",
2040
+ "favoritesControllerAddFavorite",
2041
+ "favoritesControllerRemoveFavorite"
2042
+ ]);
2043
+ var catalogMapping = {
2044
+ getProducts: "catalogGetProducts",
2045
+ createProduct: "catalogCreateProduct",
2046
+ getServices: "catalogGetServices",
2047
+ updateProduct: "catalogUpdateProduct",
2048
+ updateSupplierVariant: "catalogUpdateSupplierVariant",
2049
+ getPriceChangeRequests: "catalogGetPriceChangeRequests",
2050
+ reviewPriceChangeRequest: "catalogReviewPriceChangeRequest",
2051
+ createServiceCategory: "servicesCreateCategory",
2052
+ getServiceCategories: "servicesGetCategories",
2053
+ updateServiceCategory: "servicesUpdateCategory",
2054
+ deleteServiceCategory: "servicesDeleteCategory",
2055
+ createService: "servicesCreateService",
2056
+ getServicesList: "servicesGetServices",
2057
+ getCurrentMemberShifts: "servicesGetCurrentMemberShifts",
2058
+ getShifts: "servicesGetShifts",
2059
+ getService: "servicesGetService",
2060
+ updateService: "servicesUpdateService",
2061
+ deleteService: "servicesDeleteService",
2062
+ createResource: "servicesCreateResource",
2063
+ getResources: "servicesGetResources",
2064
+ updateResource: "servicesUpdateResource",
2065
+ deleteResource: "servicesDeleteResource",
2066
+ createBooking: "servicesCreateBooking",
2067
+ getBookings: "servicesGetBookings",
2068
+ getBooking: "servicesGetBooking",
2069
+ updateBookingStatus: "servicesUpdateBookingStatus",
2070
+ completeBooking: "servicesCompleteBooking",
2071
+ createShift: "servicesCreateShift",
2072
+ getStaffShifts: "servicesGetStaffShifts",
2073
+ addBreak: "servicesAddBreak",
2074
+ registerCustomerApp: "servicesRegisterCustomerApp",
2075
+ getServiceUtilization: "servicesGetUtilization",
2076
+ getServicePerformance: "servicesGetPerformance",
2077
+ getServiceFunnel: "servicesGetFunnel"
2078
+ };
2079
+ var authMapping = {
2080
+ exchangeToken: "authExchangeToken",
2081
+ handleOAuth2: "authControllerHandleOAuth2"
2082
+ };
2083
+ var inventoryMapping = {
2084
+ verifyIntegrity: "inventoryVerifyIntegrity",
2085
+ fixIntegrity: "inventoryFixIntegrity",
2086
+ getInventory: "inventoryGetInventory",
2087
+ traceBatch: "inventoryTraceBatch",
2088
+ splitBatch: "inventorySplitBatch",
2089
+ mergeBatches: "inventoryMergeBatches",
2090
+ createAssembly: "inventoryCreateAssembly",
2091
+ completeAssembly: "inventoryCompleteAssembly",
2092
+ requestAdjustment: "inventoryRequestAdjustment",
2093
+ getAdjustments: "inventoryGetAdjustments",
2094
+ approveAdjustment: "inventoryApproveAdjustment",
2095
+ rejectAdjustment: "inventoryRejectAdjustment",
2096
+ getLeadTime: "inventoryGetLeadTime",
2097
+ getWasteAnalysis: "inventoryGetWasteAnalysis",
2098
+ checkB2BAvailability: "inventoryCheckB2BAvailability",
2099
+ unpackBatch: "inventoryUnpackBatch",
2100
+ scanUnpackBatch: "inventoryScanUnpackBatch",
2101
+ quickStockInquiry: "inventoryQuickStockInquiry",
2102
+ getPurchases: "stockingGetPurchases",
2103
+ createPurchase: "stockingCreatePurchase",
2104
+ receivePurchase: "stockingReceivePurchase",
2105
+ getTransfers: "stockingGetTransfers",
2106
+ createTransfer: "stockingCreateTransfer",
2107
+ shipTransfer: "stockingShipTransfer",
2108
+ receiveTransfer: "stockingReceiveTransfer",
2109
+ getRequests: "stockingGetRequests",
2110
+ getPendingDispatch: "stockingGetPendingDispatch",
2111
+ dispatchOrders: "stockingDispatchOrders",
2112
+ getActiveDeliveries: "stockingGetActiveDeliveries",
2113
+ reconcilePod: "stockingReconcilePod",
2114
+ getPhysicalReconciliations: "stockingGetPhysicalReconciliations",
2115
+ submitPhysicalReconciliation: "stockingSubmitPhysicalReconciliation",
2116
+ getReconciliationReport: "stockingGetReconciliationReport",
2117
+ getPartners: "stockingGetPartners",
2118
+ createPartner: "stockingCreatePartner",
2119
+ getPartner: "stockingGetPartner",
2120
+ updatePartner: "stockingUpdatePartner",
2121
+ adjustPartnerWallet: "stockingAdjustPartnerWallet",
2122
+ getUnits: "unitsGetUnits"
2123
+ };
2124
+ var ordersMapping = {
2125
+ createOrder: "ordersCreateOrder",
2126
+ getOrders: "ordersGetOrders",
2127
+ updateStatus: "ordersUpdateStatus",
2128
+ requestB2BQuote: "ordersRequestB2BQuote",
2129
+ convertQuoteToOrder: "ordersConvertQuoteToOrder",
2130
+ getB2BCatalog: "b2BGetCatalog",
2131
+ getB2BInvoices: "b2BGetInvoices",
2132
+ getB2BOrders: "b2BGetOrders",
2133
+ createB2BOrder: "b2BCreateOrder",
2134
+ createB2BQuote: "b2BCreateQuote",
2135
+ getCart: "cartControllerGetCart",
2136
+ clearCart: "cartControllerClearCart",
2137
+ addToCart: "cartControllerAddToCart",
2138
+ removeFromCart: "cartControllerRemoveFromCart",
2139
+ handleStkCallback: "paymentsControllerHandleStkCallback"
2140
+ };
2141
+ var crmMapping = {
2142
+ createRecord: "crmControllerCreateRecord",
2143
+ getRecord: "crmControllerGetRecord",
2144
+ updateRecord: "crmControllerUpdateRecord",
2145
+ createNote: "crmControllerCreateNote",
2146
+ getRecordNotes: "crmControllerGetRecordNotes",
2147
+ createActivity: "crmControllerCreateActivity",
2148
+ getTimeline: "crmControllerGetTimeline",
2149
+ createObject: "crmControllerCreateObject",
2150
+ listObjects: "crmControllerListObjects",
2151
+ createField: "crmControllerCreateField",
2152
+ listFields: "crmControllerListFields",
2153
+ createRelationship: "crmControllerCreateRelationship",
2154
+ listRelationships: "crmControllerListRelationships",
2155
+ createAssociation: "crmControllerCreateAssociation",
2156
+ listRecordAssociations: "crmControllerListRecordAssociations",
2157
+ getIntegrationsAuthUrl: "crmIntegrationsGetAuthUrl",
2158
+ handleIntegrationsCallback: "crmIntegrationsHandleCallback",
2159
+ handleIntegrationsWebhook: "crmIntegrationsHandleWebhook",
2160
+ replyToIntegrationsActivity: "crmIntegrationsReplyToActivity",
2161
+ createStrapiConnection: "strapiCreateConnection",
2162
+ listStrapiConnections: "strapiListConnections",
2163
+ getStrapiConnection: "strapiGetConnection",
2164
+ updateStrapiConnection: "strapiUpdateConnection",
2165
+ deleteStrapiConnection: "strapiDeleteConnection",
2166
+ triggerStrapiSync: "strapiTriggerSync",
2167
+ enqueueStrapiSync: "strapiEnqueueSync",
2168
+ getStrapiWebhookLogs: "strapiGetWebhookLogs",
2169
+ getStrapiSyncLogs: "strapiGetSyncLogs",
2170
+ exchangeStrapiCustomerToken: "strapiExchangeCustomerToken",
2171
+ registerStrapiCustomer: "strapiRegisterCustomer",
2172
+ receiveStrapiWebhook: "strapiReceiveWebhook"
2173
+ };
2174
+ var posMapping = {
2175
+ provision: "pOSProvision",
2176
+ login: "pOSLogin",
2177
+ getMe: "pOSGetMe",
2178
+ processSale: "pOSProcessSale",
2179
+ sync: "pOSSync",
2180
+ getTransactions: "pOSGetTransactions",
2181
+ registerPettyCash: "pOSRegisterPettyCash",
2182
+ getPettyCashFunds: "pOSGetPettyCashFunds",
2183
+ getPettyCashTransactions: "pOSGetPettyCashTransactions",
2184
+ createSetupKey: "standalonePosControllerCreateSetupKey",
2185
+ activateDevice: "standalonePosControllerActivateDevice",
2186
+ validateKey: "standalonePosControllerValidateKey",
2187
+ linkOrganization: "standalonePosControllerLinkOrganization"
2188
+ };
2189
+ var accountingMapping = {
2190
+ createExpense: "expenseControllerCreateExpense",
2191
+ getExpenses: "expenseControllerGetExpenses",
2192
+ getExpenseCategories: "expenseControllerGetExpenseCategories",
2193
+ getExpense: "expenseControllerGetExpense",
2194
+ createPettyCashFund: "pettyCashControllerCreateFund",
2195
+ getPettyCashFunds: "pettyCashControllerGetFunds",
2196
+ getPettyCashFund: "pettyCashControllerGetFund",
2197
+ topUpPettyCashFund: "pettyCashControllerTopUpFund",
2198
+ getPettyCashFundTransactions: "pettyCashControllerGetFundTransactions",
2199
+ createUtilityAccount: "utilityAccountControllerCreateAccount",
2200
+ getUtilityAccounts: "utilityAccountControllerGetAccounts",
2201
+ getUtilityAccount: "utilityAccountControllerGetAccount",
2202
+ initialize: "accountingInitialize",
2203
+ getProfitLoss: "accountingGetProfitLoss",
2204
+ getBalanceSheet: "accountingGetBalanceSheet",
2205
+ getCashFlow: "accountingGetCashFlow",
2206
+ getTaxSummary: "accountingGetTaxSummary",
2207
+ createInvoice: "invoiceControllerCreateInvoice",
2208
+ getInvoices: "invoiceControllerGetInvoices",
2209
+ getInvoice: "invoiceControllerGetInvoice",
2210
+ updateInvoice: "invoiceControllerUpdateInvoice",
2211
+ deleteInvoice: "invoiceControllerDeleteInvoice",
2212
+ finalizeInvoice: "invoiceControllerFinalizeInvoice",
2213
+ getTemplates: "invoiceControllerGetTemplates",
2214
+ createTemplate: "invoiceControllerCreateTemplate",
2215
+ getInvoiceConfig: "invoiceControllerGetConfig",
2216
+ updateInvoiceConfig: "invoiceControllerUpdateConfig",
2217
+ downloadInvoice: "publicInvoiceControllerDownloadInvoice",
2218
+ downloadInvoiceByTransaction: "publicInvoiceControllerDownloadInvoiceByTransaction",
2219
+ downloadReceipt: "publicInvoiceControllerDownloadReceipt",
2220
+ generatePublicLink: "publicInvoiceControllerGeneratePublicLink"
2221
+ };
2222
+ var loyaltyMapping = {
2223
+ redeemReward: "loyaltyRedeemReward",
2224
+ getCustomerStatus: "loyaltyGetCustomerStatus",
2225
+ validateVoucher: "loyaltyValidateVoucher",
2226
+ getFavorites: "favoritesControllerGetFavorites",
2227
+ addFavorite: "favoritesControllerAddFavorite",
2228
+ removeFavorite: "favoritesControllerRemoveFavorite"
2229
+ };
2230
+ var membersMapping = {
2231
+ getMembers: "membersControllerGetMembers",
2232
+ createMember: "membersControllerCreateMember",
2233
+ getMember: "membersControllerGetMember",
2234
+ updateMember: "membersControllerUpdateMember",
2235
+ deleteMember: "membersControllerDeleteMember",
2236
+ getMemberActivity: "membersControllerGetMemberActivity",
2237
+ updateStatus: "membersControllerUpdateStatus",
2238
+ adminCheckOut: "membersControllerAdminCheckOut",
2239
+ terminalLogin: "terminalMembersControllerLogin",
2240
+ listInvitations: "invitationsList",
2241
+ createInvitation: "invitationsCreate",
2242
+ revokeInvitation: "invitationsRevoke",
2243
+ acceptInvitation: "invitationsAccept",
2244
+ getCustomRoles: "roleManagementControllerGetCustomRoles",
2245
+ createCustomRole: "roleManagementControllerCreateCustomRole",
2246
+ updateCustomRole: "roleManagementControllerUpdateCustomRole",
2247
+ deleteCustomRole: "roleManagementControllerDeleteCustomRole",
2248
+ getPermissionSets: "roleManagementControllerGetPermissionSets",
2249
+ createPermissionSet: "roleManagementControllerCreatePermissionSet",
2250
+ getRoleGroups: "roleManagementControllerGetRoleGroups",
2251
+ createRoleGroup: "roleManagementControllerCreateRoleGroup",
2252
+ assignRoles: "roleManagementControllerAssignRoles",
2253
+ removeRoles: "roleManagementControllerRemoveRoles",
2254
+ listDepartments: "departmentsList",
2255
+ createDepartment: "departmentsCreate",
2256
+ getDepartment: "departmentsGet",
2257
+ updateDepartment: "departmentsUpdate",
2258
+ deleteDepartment: "departmentsDelete",
2259
+ addDepartmentMember: "departmentsAddMember",
2260
+ removeDepartmentMember: "departmentsRemoveMember",
2261
+ getAttendanceLogs: "attendanceControllerGetLogs",
2262
+ checkIn: "attendanceControllerCheckIn",
2263
+ checkOut: "attendanceControllerCheckOut",
2264
+ getMyAttendanceStatus: "attendanceControllerGetMyStatus",
2265
+ getAttendanceStatus: "attendanceControllerGetStatus",
2266
+ broadcastAnnouncement: "announcementControllerBroadcastAnnouncement"
2267
+ };
2268
+ var publicServicesMapping = {
2269
+ listServices: "publicServicesListServices",
2270
+ getCategories: "publicServicesGetCategories",
2271
+ getService: "publicServicesGetService",
2272
+ getAvailability: "publicServicesGetAvailability",
2273
+ requestOtp: "publicServicesRequestOtp",
2274
+ verifyOtp: "publicServicesVerifyOtp",
2275
+ createBooking: "publicServicesCreatePublicBooking"
2276
+ };
2277
+ var servicesMapping = {
2278
+ ...publicServicesMapping,
2279
+ // Admin / Staff scheduling endpoints
2280
+ createCategory: "servicesCreateCategory",
2281
+ getCategoriesAdmin: "servicesGetCategories",
2282
+ updateCategory: "servicesUpdateCategory",
2283
+ deleteCategory: "servicesDeleteCategory",
2284
+ createService: "servicesCreateService",
2285
+ getServicesAdmin: "servicesGetServices",
2286
+ getCurrentMemberShifts: "servicesGetCurrentMemberShifts",
2287
+ getShifts: "servicesGetShifts",
2288
+ getServiceAdmin: "servicesGetService",
2289
+ updateService: "servicesUpdateService",
2290
+ deleteService: "servicesDeleteService",
2291
+ createResource: "servicesCreateResource",
2292
+ getResources: "servicesGetResources",
2293
+ updateResource: "servicesUpdateResource",
2294
+ deleteResource: "servicesDeleteResource",
2295
+ createBookingAdmin: "servicesCreateBooking",
2296
+ getBookings: "servicesGetBookings",
2297
+ getBookingAdmin: "servicesGetBooking",
2298
+ updateBookingStatus: "servicesUpdateBookingStatus",
2299
+ completeBooking: "servicesCompleteBooking",
2300
+ createShift: "servicesCreateShift",
2301
+ getStaffShifts: "servicesGetStaffShifts",
2302
+ addBreak: "servicesAddBreak",
2303
+ registerCustomerApp: "servicesRegisterCustomerApp",
2304
+ getServiceUtilization: "servicesGetUtilization",
2305
+ getServicePerformance: "servicesGetPerformance",
2306
+ getServiceFunnel: "servicesGetFunnel"
2307
+ };
2308
+ var adminMapping = {
2309
+ getStats: "adminControllerGetStats",
2310
+ listOrganizations: "adminControllerListOrganizations",
2311
+ createOrganization: "adminControllerCreateOrganization",
2312
+ getOrganizationDetails: "adminControllerGetOrganizationDetails",
2313
+ updateOrganization: "adminControllerUpdateOrganization",
2314
+ deleteOrganization: "adminControllerDeleteOrganization",
2315
+ listMembers: "adminControllerListMembers",
2316
+ listUsers: "adminControllerListUsers",
2317
+ banUser: "adminControllerBanUser",
2318
+ unbanUser: "adminControllerUnbanUser",
2319
+ listConnectedApps: "adminControllerListConnectedApps",
2320
+ listSystemLogs: "adminControllerListSystemLogs",
2321
+ listGlobalSettings: "adminControllerListGlobalSettings",
2322
+ setGlobalSetting: "adminControllerSetGlobalSetting",
2323
+ deleteGlobalSetting: "adminControllerDeleteGlobalSetting",
2324
+ listTiers: "adminControllerListTiers",
2325
+ defineTier: "adminControllerDefineTier",
2326
+ deleteTier: "adminControllerDeleteTier",
2327
+ getOrganizationSubscription: "adminControllerGetOrganizationSubscription",
2328
+ updateOrganizationSubscription: "adminControllerUpdateOrganizationSubscription",
2329
+ listSystemPayments: "adminControllerListSystemPayments",
2330
+ recordCustomPayment: "adminControllerRecordCustomPayment",
2331
+ listIntegrationDefinitions: "adminControllerListIntegrationDefinitions",
2332
+ createIntegrationDefinition: "adminControllerCreateIntegrationDefinition",
2333
+ updateIntegrationDefinition: "adminControllerUpdateIntegrationDefinition",
2334
+ deleteIntegrationDefinition: "adminControllerDeleteIntegrationDefinition",
2335
+ listActiveOrganizationIntegrations: "adminControllerListActiveOrganizationIntegrations",
2336
+ createWebhook: "webhooksCreate",
2337
+ listWebhooks: "webhooksList",
2338
+ deleteWebhook: "webhooksDelete",
2339
+ handleWindmillCallback: "windmillCallbackControllerHandleCallback",
2340
+ handleWindmillApprovalCallback: "windmillCallbackControllerHandleApprovalCallback",
2341
+ handleWindmillBakeryDisposalCallback: "windmillCallbackControllerHandleBakeryDisposalCallback",
2342
+ handleWindmillOutcomeCallback: "windmillCallbackControllerHandleOutcomeCallback",
2343
+ provisionZitadel: "customersProvisionZitadel",
2344
+ getCustomers: "customersGetCustomers",
2345
+ registerCustomer: "customersRegister",
2346
+ updateCustomer: "customersUpdate",
2347
+ getCustomerById: "customersGetCustomerById",
2348
+ deleteCustomer: "customersDelete",
2349
+ getCustomerAddresses: "customersGetAddresses",
2350
+ addCustomerAddress: "customersAddAddress",
2351
+ createBusinessAccount: "businessAccountControllerCreate",
2352
+ getBusinessAccount: "businessAccountControllerGetOne",
2353
+ getDashboardAnalytics: "analyticsControllerGetDashboardAnalytics",
2354
+ getResourceUtilization: "analyticsControllerGetResourceUtilization"
2355
+ };
2356
+ function buildModule(api, orgSlug, mapping) {
2357
+ const result = {};
2358
+ for (const [key, rawMethodName] of Object.entries(mapping)) {
2359
+ const rawFn = api[rawMethodName];
2360
+ if (typeof rawFn === "function") {
2361
+ if (methodsWithOrgSlugSet.has(rawMethodName)) {
2362
+ result[key] = function(...args) {
2363
+ return rawFn.apply(this, [orgSlug, ...args]);
2364
+ };
2365
+ } else {
2366
+ result[key] = function(...args) {
2367
+ return rawFn.apply(this, args);
2368
+ };
2369
+ }
2370
+ }
2371
+ }
2372
+ return result;
2373
+ }
2374
+ function getJwtExpiry(token) {
2375
+ try {
2376
+ const parts = token.split(".");
2377
+ if (parts.length !== 3) return null;
2378
+ let payloadStr = "";
2379
+ if (typeof Buffer !== "undefined") {
2380
+ payloadStr = Buffer.from(parts[1], "base64").toString("utf-8");
2381
+ } else if (typeof window !== "undefined" && typeof window.atob === "function") {
2382
+ payloadStr = window.atob(parts[1]);
2383
+ } else {
2384
+ payloadStr = atob(parts[1]);
2385
+ }
2386
+ const payload = JSON.parse(payloadStr);
2387
+ if (payload && typeof payload.exp === "number") {
2388
+ return payload.exp * 1e3;
2389
+ }
2390
+ } catch (e) {
2391
+ }
2392
+ return null;
2393
+ }
2394
+
2395
+ // src/client.tsx
2396
+ var import_react = require("react");
2397
+ var import_axios2 = __toESM(require("axios"));
2398
+ var import_jsx_runtime = require("react/jsx-runtime");
2399
+ var AuthContext = (0, import_react.createContext)(void 0);
2400
+
2401
+ // src/index.ts
2402
+ function getEnvOrgSlug() {
2403
+ if (typeof process !== "undefined" && process.env) {
2404
+ const slug = process.env.SCRYME_ORG_SLUG || process.env.NEXT_PUBLIC_SCRYME_ORG_SLUG;
2405
+ if (slug) return slug;
2406
+ }
2407
+ try {
2408
+ const getMeta = new Function("return typeof import.meta !== 'undefined' ? import.meta : undefined");
2409
+ const meta = getMeta();
2410
+ if (meta && meta.env) {
2411
+ const slug = meta.env.VITE_SCRYME_ORG_SLUG || meta.env.SCRYME_ORG_SLUG;
2412
+ if (slug) return slug;
2413
+ }
2414
+ } catch (e) {
2415
+ }
2416
+ return void 0;
2417
+ }
2418
+ function expectsOrgSlug(fn) {
2419
+ const fnStr = fn.toString();
2420
+ const match = fnStr.match(/^\s*(?:async\s+)?\(([^)]+)\)/);
2421
+ if (!match) {
2422
+ const singleMatch = fnStr.match(/^\s*(\w+)\s*=>/);
2423
+ return singleMatch ? singleMatch[1] === "orgSlug" : false;
2424
+ }
2425
+ const firstParam = match[1].split(",")[0].split(":")[0].trim();
2426
+ return firstParam === "orgSlug";
2427
+ }
2428
+ function getStringParamCount(fn) {
2429
+ const fnStr = fn.toString();
2430
+ const match = fnStr.match(/^\s*(?:async\s+)?\(([^)]+)\)/);
2431
+ if (!match) return 0;
2432
+ const params = match[1].split(",").map((p) => p.trim());
2433
+ let count = 0;
2434
+ for (const param of params) {
2435
+ const cleanParam = param.split(":")[0].split("=")[0].trim();
2436
+ const lower = cleanParam.toLowerCase();
2437
+ if (lower === "params" || lower === "options" || lower.endsWith("dto") || lower.endsWith("body") || lower.endsWith("payload")) {
2438
+ break;
2439
+ }
2440
+ count++;
2441
+ }
2442
+ return count;
2443
+ }
2444
+ var getScrymeV3API2 = (axiosInstance, defaultOrgSlug) => {
2445
+ const api = getScrymeV3API(axiosInstance);
2446
+ return new Proxy(api, {
2447
+ get(target, prop, receiver) {
2448
+ const originalValue = Reflect.get(target, prop, receiver);
2449
+ if (typeof originalValue === "function") {
2450
+ if (expectsOrgSlug(originalValue)) {
2451
+ return function(...args) {
2452
+ const stringParamsExpected = getStringParamCount(originalValue);
2453
+ const stringArgsPassed = args.filter((arg) => typeof arg === "string").length;
2454
+ if (stringArgsPassed < stringParamsExpected) {
2455
+ const envSlug = defaultOrgSlug || getEnvOrgSlug() || "default-org";
2456
+ return originalValue.apply(this, [envSlug, ...args]);
2457
+ }
2458
+ return originalValue.apply(this, args);
2459
+ };
2460
+ }
2461
+ }
2462
+ return originalValue;
2463
+ }
2464
+ });
2465
+ };
2466
+
2467
+ // src/server.ts
2468
+ var ScrymeServerSDK = class {
2469
+ constructor(config) {
2470
+ this.token = null;
2471
+ this.expiresAt = null;
2472
+ this.activeAuthPromise = null;
2473
+ if (!config || !config.clientId || !config.clientSecret || !config.orgSlug) {
2474
+ throw new Error(
2475
+ "clientId, clientSecret, and orgSlug are required to initialize the SDK."
2476
+ );
2477
+ }
2478
+ let finalBaseURL = config.baseURL || "https://api.scryme.tech";
2479
+ if (finalBaseURL && !finalBaseURL.includes("/api") && !finalBaseURL.endsWith("/api")) {
2480
+ finalBaseURL = finalBaseURL.replace(/\/$/, "") + "/api";
2481
+ }
2482
+ this.axiosInstance = import_axios3.default.create({
2483
+ baseURL: finalBaseURL
2484
+ });
2485
+ if (config.token) {
2486
+ this.token = config.token;
2487
+ this.expiresAt = getJwtExpiry(config.token);
2488
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${config.token}`;
2489
+ }
2490
+ if (config.apiKey) {
2491
+ this.axiosInstance.defaults.headers.common["x-api-key"] = config.apiKey;
2492
+ }
2493
+ const performExchange = async () => {
2494
+ if (this.activeAuthPromise) {
2495
+ return this.activeAuthPromise;
2496
+ }
2497
+ this.activeAuthPromise = (async () => {
2498
+ try {
2499
+ const response = await this.api.authExchangeToken({
2500
+ clientId: config.clientId,
2501
+ clientSecret: config.clientSecret
2502
+ });
2503
+ const tokenData = response.data?.data;
2504
+ const accessToken = tokenData?.access_token;
2505
+ const expiresIn = tokenData?.expires_in;
2506
+ if (accessToken) {
2507
+ this.token = accessToken;
2508
+ if (expiresIn) {
2509
+ this.expiresAt = Date.now() + expiresIn * 1e3;
2510
+ } else {
2511
+ this.expiresAt = getJwtExpiry(accessToken);
2512
+ }
2513
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${accessToken}`;
2514
+ }
2515
+ return response.data;
2516
+ } finally {
2517
+ this.activeAuthPromise = null;
2518
+ }
2519
+ })();
2520
+ return this.activeAuthPromise;
2521
+ };
2522
+ this.axiosInstance.interceptors.request.use(async (req) => {
2523
+ const isAuthTokenRequest = req.url && (req.url.endsWith("/auth/token") || req.url.includes("/auth/token") || req.url.includes("/customers/auth/refresh") || req.url.includes("/customers/auth/swap-zitadel"));
2524
+ if (!isAuthTokenRequest && !config.apiKey) {
2525
+ const isExpired = !this.token || this.expiresAt && Date.now() >= this.expiresAt - 3e4;
2526
+ if (isExpired) {
2527
+ const isCustomerToken = this.token && getJwtExpiry(this.token) && !config.clientSecret;
2528
+ if (isCustomerToken || this.token && !config.clientSecret) {
2529
+ try {
2530
+ await this.auth.refreshSession();
2531
+ } catch (e) {
2532
+ console.error(
2533
+ "Proactive customer session refresh failed in request interceptor:",
2534
+ e
2535
+ );
2536
+ }
2537
+ } else if (config.clientId && config.clientSecret) {
2538
+ try {
2539
+ await performExchange();
2540
+ } catch (e) {
2541
+ console.error(
2542
+ "Auto-authentication failed in request interceptor:",
2543
+ e
2544
+ );
2545
+ }
2546
+ }
2547
+ }
2548
+ }
2549
+ if (this.token) {
2550
+ req.headers["Authorization"] = `Bearer ${this.token}`;
2551
+ }
2552
+ return req;
2553
+ });
2554
+ this.axiosInstance.interceptors.response.use(
2555
+ (response) => response,
2556
+ async (error) => {
2557
+ const originalRequest = error.config;
2558
+ const isAuthTokenRequest = originalRequest && originalRequest.url && (originalRequest.url.endsWith("/auth/token") || originalRequest.url.includes("/auth/token") || originalRequest.url.includes("/customers/auth/refresh") || originalRequest.url.includes("/customers/auth/swap-zitadel"));
2559
+ if (error.response && error.response.status === 401 && originalRequest && !originalRequest._retry && !isAuthTokenRequest && !config.apiKey) {
2560
+ originalRequest._retry = true;
2561
+ try {
2562
+ const isCustomerToken = this.token && getJwtExpiry(this.token) && !config.clientSecret;
2563
+ if (isCustomerToken || this.token && !config.clientSecret) {
2564
+ await this.auth.refreshSession();
2565
+ if (this.token) {
2566
+ originalRequest.headers["Authorization"] = `Bearer ${this.token}`;
2567
+ }
2568
+ return this.axiosInstance(originalRequest);
2569
+ } else if (config.clientId && config.clientSecret) {
2570
+ await performExchange();
2571
+ if (this.token) {
2572
+ originalRequest.headers["Authorization"] = `Bearer ${this.token}`;
2573
+ }
2574
+ return this.axiosInstance(originalRequest);
2575
+ }
2576
+ } catch (e) {
2577
+ return Promise.reject(error);
2578
+ }
2579
+ }
2580
+ return Promise.reject(error);
2581
+ }
2582
+ );
2583
+ this.api = getScrymeV3API2(this.axiosInstance, config.orgSlug);
2584
+ this.catalog = buildModule(this.api, config.orgSlug, catalogMapping);
2585
+ this.inventory = buildModule(this.api, config.orgSlug, inventoryMapping);
2586
+ this.orders = buildModule(this.api, config.orgSlug, ordersMapping);
2587
+ this.crm = buildModule(this.api, config.orgSlug, crmMapping);
2588
+ this.pos = buildModule(this.api, config.orgSlug, posMapping);
2589
+ this.accounting = buildModule(this.api, config.orgSlug, accountingMapping);
2590
+ this.loyalty = buildModule(this.api, config.orgSlug, loyaltyMapping);
2591
+ this.members = buildModule(this.api, config.orgSlug, membersMapping);
2592
+ this.admin = buildModule(this.api, config.orgSlug, adminMapping);
2593
+ this.services = buildModule(this.api, config.orgSlug, servicesMapping);
2594
+ this.cart = {
2595
+ get: async (params) => {
2596
+ return this.orders.getCart(params || {});
2597
+ },
2598
+ add: async (dto) => {
2599
+ return this.orders.addToCart(dto);
2600
+ },
2601
+ remove: async (dto) => {
2602
+ return this.orders.removeFromCart(dto);
2603
+ },
2604
+ clear: async (params) => {
2605
+ return this.orders.clearCart(params || {});
2606
+ },
2607
+ update: async (dto) => {
2608
+ const response = await this.orders.getCart({
2609
+ sessionId: dto.sessionId
2610
+ });
2611
+ const data = response.data;
2612
+ const items = data?.data?.items || data?.items || [];
2613
+ let existingItem = null;
2614
+ if (dto.productId) {
2615
+ existingItem = items.find(
2616
+ (item) => item.productId === dto.productId && (item.variantId || null) === (dto.variantId || null)
2617
+ );
2618
+ } else if (dto.serviceId) {
2619
+ existingItem = items.find(
2620
+ (item) => item.serviceId === dto.serviceId
2621
+ );
2622
+ }
2623
+ if (existingItem) {
2624
+ const currentQty = existingItem.quantity || 0;
2625
+ if (dto.quantity <= 0) {
2626
+ return this.orders.removeFromCart({
2627
+ productId: dto.productId,
2628
+ variantId: dto.variantId,
2629
+ serviceId: dto.serviceId,
2630
+ sessionId: dto.sessionId,
2631
+ customerId: dto.customerId
2632
+ });
2633
+ } else {
2634
+ const diff = dto.quantity - currentQty;
2635
+ if (diff !== 0) {
2636
+ return this.orders.addToCart({
2637
+ ...dto,
2638
+ quantity: diff
2639
+ });
2640
+ }
2641
+ return response;
2642
+ }
2643
+ } else {
2644
+ if (dto.quantity > 0) {
2645
+ return this.orders.addToCart(dto);
2646
+ }
2647
+ }
2648
+ },
2649
+ getItems: async (params) => {
2650
+ const res = await this.orders.getCart(params || {});
2651
+ const data = res?.data || res;
2652
+ return data?.items || data?.data?.items || [];
2653
+ },
2654
+ getTotals: async (params) => {
2655
+ const res = await this.orders.getCart(params || {});
2656
+ const data = res?.data || res;
2657
+ const items = data?.items || data?.data?.items || [];
2658
+ const itemsCount = items.reduce(
2659
+ (sum, item) => sum + (item.quantity || 0),
2660
+ 0
2661
+ );
2662
+ return {
2663
+ itemsCount,
2664
+ items,
2665
+ raw: data
2666
+ };
2667
+ },
2668
+ checkout: async (params) => {
2669
+ if (!params.customerId)
2670
+ throw new Error("customerId is required for server checkout.");
2671
+ const items = await this.cart.getItems({
2672
+ sessionId: params.sessionId,
2673
+ customerId: params.customerId
2674
+ });
2675
+ if (!items || items.length === 0) {
2676
+ throw new Error("Cannot checkout an empty cart.");
2677
+ }
2678
+ const orderItems = items.map((item) => ({
2679
+ variantId: item.variantId || "",
2680
+ quantity: item.quantity,
2681
+ unitPrice: item.unitPrice
2682
+ }));
2683
+ const orderResponse = await this.orders.createOrder({
2684
+ customerId: params.customerId,
2685
+ locationId: params.locationId,
2686
+ items: orderItems,
2687
+ notes: params.notes,
2688
+ channel: params.channel
2689
+ });
2690
+ await this.cart.clear({
2691
+ sessionId: params.sessionId || "",
2692
+ customerId: params.customerId
2693
+ });
2694
+ return orderResponse?.data || orderResponse;
2695
+ }
2696
+ };
2697
+ this.customer = {
2698
+ getProfile: async (customerId) => {
2699
+ return this.admin.getCustomerById(customerId);
2700
+ },
2701
+ updateProfile: async (customerId, dto) => {
2702
+ return this.admin.updateCustomer(customerId, dto);
2703
+ },
2704
+ getAddresses: async (customerId) => {
2705
+ return this.admin.getCustomerAddresses(customerId);
2706
+ },
2707
+ addAddress: async (customerId, dto) => {
2708
+ return this.admin.addCustomerAddress(customerId, dto);
2709
+ }
2710
+ };
2711
+ this.bookings = {
2712
+ create: async (dto) => {
2713
+ return this.catalog.createBooking(dto);
2714
+ },
2715
+ get: async (id) => {
2716
+ return this.catalog.getBooking(id);
2717
+ },
2718
+ list: async () => {
2719
+ return this.catalog.getBookings();
2720
+ },
2721
+ cancel: async (id) => {
2722
+ return this.catalog.updateBookingStatus(id, "CANCELLED");
2723
+ },
2724
+ complete: async (id, dto) => {
2725
+ return this.catalog.completeBooking(id, dto);
2726
+ }
2727
+ };
2728
+ const baseAuth = buildModule(this.api, config.orgSlug, authMapping);
2729
+ this.auth = {
2730
+ ...baseAuth,
2731
+ signUp: async (dto) => {
2732
+ return this.api.customersRegister(config.orgSlug, dto);
2733
+ },
2734
+ authenticate: async () => {
2735
+ return performExchange();
2736
+ },
2737
+ signIn: async (credentials) => {
2738
+ const response = await this.axiosInstance.post(
2739
+ "/auth/sign-in/email",
2740
+ credentials
2741
+ );
2742
+ const data = response.data;
2743
+ const token = data?.session?.token || data?.token || null;
2744
+ if (token) {
2745
+ this.token = token;
2746
+ this.expiresAt = getJwtExpiry(token);
2747
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
2748
+ }
2749
+ return data;
2750
+ },
2751
+ getCurrentSession: async () => {
2752
+ const response = await this.axiosInstance.get(
2753
+ `/${config.orgSlug}/customers/auth/session`
2754
+ );
2755
+ return response.data?.data || response.data;
2756
+ },
2757
+ refreshSession: async () => {
2758
+ const response = await this.axiosInstance.post(
2759
+ `/${config.orgSlug}/customers/auth/refresh`
2760
+ );
2761
+ const data = response.data?.data || response.data;
2762
+ const token = data?.token || null;
2763
+ if (token) {
2764
+ this.token = token;
2765
+ this.expiresAt = getJwtExpiry(token);
2766
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
2767
+ }
2768
+ return data;
2769
+ },
2770
+ swapZitadel: async (zitadelToken) => {
2771
+ const response = await this.axiosInstance.post(
2772
+ `/${config.orgSlug}/customers/auth/swap-zitadel`,
2773
+ { zitadelToken }
2774
+ );
2775
+ const data = response.data?.data || response.data;
2776
+ const token = data?.token || null;
2777
+ if (token) {
2778
+ this.token = token;
2779
+ this.expiresAt = getJwtExpiry(token);
2780
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
2781
+ }
2782
+ return data;
2783
+ }
2784
+ };
2785
+ }
2786
+ };
2787
+ function createServerSDK(config = {}) {
2788
+ const finalConfig = {
2789
+ clientId: config.clientId || "mock-client-id",
2790
+ clientSecret: config.clientSecret || "mock-client-secret",
2791
+ orgSlug: config.orgSlug || "mock-org-slug",
2792
+ ...config
2793
+ };
2794
+ return new ScrymeServerSDK(finalConfig);
2795
+ }
2796
+ // Annotate the CommonJS export names for ESM import in node:
2797
+ 0 && (module.exports = {
2798
+ ScrymeServerSDK,
2799
+ createServerSDK
2800
+ });