@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.
@@ -0,0 +1,3974 @@
1
+ // src/server.ts
2
+ import axios3 from "axios";
3
+
4
+ // src/generated/scryme.ts
5
+ import axios from "axios";
6
+ var getScrymeV3API = (axiosInstance = axios) => {
7
+ const inventoryVerifyIntegrity = (orgSlug, options) => {
8
+ return axiosInstance.get(
9
+ `/v3/${orgSlug}/inventory/integrity/verify`,
10
+ options
11
+ );
12
+ };
13
+ const inventoryFixIntegrity = (orgSlug, variantId, params, options) => {
14
+ return axiosInstance.post(
15
+ `/v3/${orgSlug}/inventory/integrity/fix/${variantId}`,
16
+ void 0,
17
+ {
18
+ ...options,
19
+ params: { ...params, ...options?.params }
20
+ }
21
+ );
22
+ };
23
+ const inventoryGetInventory = (orgSlug, params, options) => {
24
+ return axiosInstance.get(
25
+ `/v3/${orgSlug}/inventory`,
26
+ {
27
+ ...options,
28
+ params: { ...params, ...options?.params }
29
+ }
30
+ );
31
+ };
32
+ const inventoryTraceBatch = (orgSlug, identifier, options) => {
33
+ return axiosInstance.get(
34
+ `/v3/${orgSlug}/inventory/trace/${identifier}`,
35
+ options
36
+ );
37
+ };
38
+ const inventorySplitBatch = (orgSlug, id, options) => {
39
+ return axiosInstance.post(
40
+ `/v3/${orgSlug}/inventory/batches/${id}/split`,
41
+ void 0,
42
+ options
43
+ );
44
+ };
45
+ const inventoryMergeBatches = (orgSlug, options) => {
46
+ return axiosInstance.post(
47
+ `/v3/${orgSlug}/inventory/batches/merge`,
48
+ void 0,
49
+ options
50
+ );
51
+ };
52
+ const inventoryCreateAssembly = (orgSlug, options) => {
53
+ return axiosInstance.post(
54
+ `/v3/${orgSlug}/inventory/assemblies`,
55
+ void 0,
56
+ options
57
+ );
58
+ };
59
+ const inventoryCompleteAssembly = (orgSlug, id, options) => {
60
+ return axiosInstance.post(
61
+ `/v3/${orgSlug}/inventory/assemblies/${id}/complete`,
62
+ void 0,
63
+ options
64
+ );
65
+ };
66
+ const inventoryRequestAdjustment = (orgSlug, options) => {
67
+ return axiosInstance.post(
68
+ `/v3/${orgSlug}/inventory/adjustments/request`,
69
+ void 0,
70
+ options
71
+ );
72
+ };
73
+ const inventoryGetAdjustments = (orgSlug, params, options) => {
74
+ return axiosInstance.get(
75
+ `/v3/${orgSlug}/inventory/adjustments`,
76
+ {
77
+ ...options,
78
+ params: { ...params, ...options?.params }
79
+ }
80
+ );
81
+ };
82
+ const inventoryApproveAdjustment = (orgSlug, id, options) => {
83
+ return axiosInstance.patch(
84
+ `/v3/${orgSlug}/inventory/adjustments/${id}/approve`,
85
+ void 0,
86
+ options
87
+ );
88
+ };
89
+ const inventoryRejectAdjustment = (orgSlug, id, options) => {
90
+ return axiosInstance.patch(
91
+ `/v3/${orgSlug}/inventory/adjustments/${id}/reject`,
92
+ void 0,
93
+ options
94
+ );
95
+ };
96
+ const inventoryGetLeadTime = (orgSlug, params, options) => {
97
+ return axiosInstance.get(
98
+ `/v3/${orgSlug}/inventory/analytics/supplier-lead-time`,
99
+ {
100
+ ...options,
101
+ params: { ...params, ...options?.params }
102
+ }
103
+ );
104
+ };
105
+ const inventoryGetWasteAnalysis = (orgSlug, params, options) => {
106
+ return axiosInstance.get(
107
+ `/v3/${orgSlug}/inventory/analytics/waste`,
108
+ {
109
+ ...options,
110
+ params: { ...params, ...options?.params }
111
+ }
112
+ );
113
+ };
114
+ const inventoryCheckB2BAvailability = (orgSlug, checkB2BAvailabilityDto, options) => {
115
+ return axiosInstance.post(
116
+ `/v3/${orgSlug}/inventory/b2b/availability`,
117
+ checkB2BAvailabilityDto,
118
+ options
119
+ );
120
+ };
121
+ const inventoryUnpackBatch = (orgSlug, id, options) => {
122
+ return axiosInstance.post(
123
+ `/v3/${orgSlug}/inventory/batches/${id}/unpack`,
124
+ void 0,
125
+ options
126
+ );
127
+ };
128
+ const inventoryScanUnpackBatch = (orgSlug, options) => {
129
+ return axiosInstance.post(
130
+ `/v3/${orgSlug}/inventory/batches/scan-unpack`,
131
+ void 0,
132
+ options
133
+ );
134
+ };
135
+ const inventoryQuickStockInquiry = (orgSlug, options) => {
136
+ return axiosInstance.post(
137
+ `/v3/${orgSlug}/inventory/b2b/quick-inquiry`,
138
+ void 0,
139
+ options
140
+ );
141
+ };
142
+ const expenseControllerCreateExpense = (createExpenseDto, options) => {
143
+ return axiosInstance.post(
144
+ `/v3/finance/expenses`,
145
+ createExpenseDto,
146
+ options
147
+ );
148
+ };
149
+ const expenseControllerGetExpenses = (params, options) => {
150
+ return axiosInstance.get(
151
+ `/v3/finance/expenses`,
152
+ {
153
+ ...options,
154
+ params: { ...params, ...options?.params }
155
+ }
156
+ );
157
+ };
158
+ const expenseControllerGetExpenseCategories = (options) => {
159
+ return axiosInstance.get(
160
+ `/v3/finance/expenses/categories`,
161
+ options
162
+ );
163
+ };
164
+ const expenseControllerGetExpense = (id, options) => {
165
+ return axiosInstance.get(
166
+ `/v3/finance/expenses/${id}`,
167
+ options
168
+ );
169
+ };
170
+ const pettyCashControllerCreateFund = (createPettyCashFundDto, options) => {
171
+ return axiosInstance.post(
172
+ `/v3/finance/petty-cash`,
173
+ createPettyCashFundDto,
174
+ options
175
+ );
176
+ };
177
+ const pettyCashControllerGetFunds = (options) => {
178
+ return axiosInstance.get(
179
+ `/v3/finance/petty-cash`,
180
+ options
181
+ );
182
+ };
183
+ const pettyCashControllerGetFund = (id, options) => {
184
+ return axiosInstance.get(
185
+ `/v3/finance/petty-cash/${id}`,
186
+ options
187
+ );
188
+ };
189
+ const pettyCashControllerTopUpFund = (id, topUpPettyCashFundDto, options) => {
190
+ return axiosInstance.post(
191
+ `/v3/finance/petty-cash/${id}/top-up`,
192
+ topUpPettyCashFundDto,
193
+ options
194
+ );
195
+ };
196
+ const pettyCashControllerGetFundTransactions = (id, options) => {
197
+ return axiosInstance.get(
198
+ `/v3/finance/petty-cash/${id}/transactions`,
199
+ options
200
+ );
201
+ };
202
+ const utilityAccountControllerCreateAccount = (createUtilityAccountDto, options) => {
203
+ return axiosInstance.post(
204
+ `/v3/finance/utility-accounts`,
205
+ createUtilityAccountDto,
206
+ options
207
+ );
208
+ };
209
+ const utilityAccountControllerGetAccounts = (options) => {
210
+ return axiosInstance.get(
211
+ `/v3/finance/utility-accounts`,
212
+ options
213
+ );
214
+ };
215
+ const utilityAccountControllerGetAccount = (id, options) => {
216
+ return axiosInstance.get(
217
+ `/v3/finance/utility-accounts/${id}`,
218
+ options
219
+ );
220
+ };
221
+ const accountingInitialize = (orgSlug, options) => {
222
+ return axiosInstance.post(
223
+ `/v3/${orgSlug}/finance/accounting/initialize`,
224
+ void 0,
225
+ options
226
+ );
227
+ };
228
+ const accountingGetProfitLoss = (orgSlug, params, options) => {
229
+ return axiosInstance.get(
230
+ `/v3/${orgSlug}/finance/accounting/reports/profit-loss`,
231
+ {
232
+ ...options,
233
+ params: { ...params, ...options?.params }
234
+ }
235
+ );
236
+ };
237
+ const accountingGetBalanceSheet = (orgSlug, params, options) => {
238
+ return axiosInstance.get(
239
+ `/v3/${orgSlug}/finance/accounting/reports/balance-sheet`,
240
+ {
241
+ ...options,
242
+ params: { ...params, ...options?.params }
243
+ }
244
+ );
245
+ };
246
+ const accountingGetCashFlow = (orgSlug, params, options) => {
247
+ return axiosInstance.get(
248
+ `/v3/${orgSlug}/finance/accounting/reports/cash-flow`,
249
+ {
250
+ ...options,
251
+ params: { ...params, ...options?.params }
252
+ }
253
+ );
254
+ };
255
+ const accountingGetTaxSummary = (orgSlug, params, options) => {
256
+ return axiosInstance.get(
257
+ `/v3/${orgSlug}/finance/accounting/reports/tax-summary`,
258
+ {
259
+ ...options,
260
+ params: { ...params, ...options?.params }
261
+ }
262
+ );
263
+ };
264
+ const invoiceControllerCreateInvoice = (createInvoiceDto, options) => {
265
+ return axiosInstance.post(
266
+ `/v3/finance/invoices`,
267
+ createInvoiceDto,
268
+ options
269
+ );
270
+ };
271
+ const invoiceControllerGetInvoices = (options) => {
272
+ return axiosInstance.get(
273
+ `/v3/finance/invoices`,
274
+ options
275
+ );
276
+ };
277
+ const invoiceControllerGetInvoice = (id, options) => {
278
+ return axiosInstance.get(
279
+ `/v3/finance/invoices/${id}`,
280
+ options
281
+ );
282
+ };
283
+ const invoiceControllerUpdateInvoice = (id, updateInvoiceDto, options) => {
284
+ return axiosInstance.put(
285
+ `/v3/finance/invoices/${id}`,
286
+ updateInvoiceDto,
287
+ options
288
+ );
289
+ };
290
+ const invoiceControllerDeleteInvoice = (id, options) => {
291
+ return axiosInstance.delete(
292
+ `/v3/finance/invoices/${id}`,
293
+ options
294
+ );
295
+ };
296
+ const invoiceControllerFinalizeInvoice = (id, options) => {
297
+ return axiosInstance.post(
298
+ `/v3/finance/invoices/${id}/finalize`,
299
+ void 0,
300
+ options
301
+ );
302
+ };
303
+ const invoiceControllerGetTemplates = (options) => {
304
+ return axiosInstance.get(
305
+ `/v3/finance/invoices/templates`,
306
+ options
307
+ );
308
+ };
309
+ const invoiceControllerCreateTemplate = (createInvoiceTemplateDto, options) => {
310
+ return axiosInstance.post(
311
+ `/v3/finance/invoices/templates`,
312
+ createInvoiceTemplateDto,
313
+ options
314
+ );
315
+ };
316
+ const invoiceControllerGetConfig = (options) => {
317
+ return axiosInstance.get(
318
+ `/v3/finance/invoices/config`,
319
+ options
320
+ );
321
+ };
322
+ const invoiceControllerUpdateConfig = (invoiceConfigDto, options) => {
323
+ return axiosInstance.put(
324
+ `/v3/finance/invoices/config`,
325
+ invoiceConfigDto,
326
+ options
327
+ );
328
+ };
329
+ const publicInvoiceControllerDownloadInvoice = (id, params, options) => {
330
+ return axiosInstance.get(
331
+ `/v3/public-invoices/${id}/download`,
332
+ {
333
+ ...options,
334
+ params: { ...params, ...options?.params }
335
+ }
336
+ );
337
+ };
338
+ const publicInvoiceControllerDownloadInvoiceByTransaction = (transactionId, params, options) => {
339
+ return axiosInstance.get(
340
+ `/v3/public-invoices/transactions/${transactionId}/download`,
341
+ {
342
+ ...options,
343
+ params: { ...params, ...options?.params }
344
+ }
345
+ );
346
+ };
347
+ const publicInvoiceControllerDownloadReceipt = (transactionId, params, options) => {
348
+ return axiosInstance.get(
349
+ `/v3/public-invoices/receipts/${transactionId}/download`,
350
+ {
351
+ ...options,
352
+ params: { ...params, ...options?.params }
353
+ }
354
+ );
355
+ };
356
+ const publicInvoiceControllerGeneratePublicLink = (transactionId, params, options) => {
357
+ return axiosInstance.post(
358
+ `/v3/public-invoices/transactions/${transactionId}/generate-public-link`,
359
+ void 0,
360
+ {
361
+ ...options,
362
+ params: { ...params, ...options?.params }
363
+ }
364
+ );
365
+ };
366
+ const authExchangeToken = (tokenRequestDto, options) => {
367
+ return axiosInstance.post(
368
+ `/v3/auth/token`,
369
+ tokenRequestDto,
370
+ options
371
+ );
372
+ };
373
+ const authControllerHandleOAuth2 = (path, options) => {
374
+ return axiosInstance.get(
375
+ `/v3/auth/oauth2/${path}`,
376
+ options
377
+ );
378
+ };
379
+ const adminControllerGetStats = (options) => {
380
+ return axiosInstance.get(
381
+ `/v3/admin/stats`,
382
+ options
383
+ );
384
+ };
385
+ const adminControllerListOrganizations = (options) => {
386
+ return axiosInstance.get(
387
+ `/v3/admin/organizations`,
388
+ options
389
+ );
390
+ };
391
+ const adminControllerCreateOrganization = (createOrganizationDto, options) => {
392
+ return axiosInstance.post(
393
+ `/v3/admin/organizations`,
394
+ createOrganizationDto,
395
+ options
396
+ );
397
+ };
398
+ const adminControllerGetOrganizationDetails = (id, options) => {
399
+ return axiosInstance.get(
400
+ `/v3/admin/organizations/${id}`,
401
+ options
402
+ );
403
+ };
404
+ const adminControllerUpdateOrganization = (id, updateOrganizationDto, options) => {
405
+ return axiosInstance.patch(
406
+ `/v3/admin/organizations/${id}`,
407
+ updateOrganizationDto,
408
+ options
409
+ );
410
+ };
411
+ const adminControllerDeleteOrganization = (id, options) => {
412
+ return axiosInstance.delete(
413
+ `/v3/admin/organizations/${id}`,
414
+ options
415
+ );
416
+ };
417
+ const adminControllerListMembers = (params, options) => {
418
+ return axiosInstance.get(
419
+ `/v3/admin/members`,
420
+ {
421
+ ...options,
422
+ params: { ...params, ...options?.params }
423
+ }
424
+ );
425
+ };
426
+ const adminControllerListUsers = (options) => {
427
+ return axiosInstance.get(
428
+ `/v3/admin/users`,
429
+ options
430
+ );
431
+ };
432
+ const adminControllerBanUser = (id, banUserDto, options) => {
433
+ return axiosInstance.post(
434
+ `/v3/admin/users/${id}/ban`,
435
+ banUserDto,
436
+ options
437
+ );
438
+ };
439
+ const adminControllerUnbanUser = (id, options) => {
440
+ return axiosInstance.post(
441
+ `/v3/admin/users/${id}/unban`,
442
+ void 0,
443
+ options
444
+ );
445
+ };
446
+ const adminControllerListConnectedApps = (options) => {
447
+ return axiosInstance.get(
448
+ `/v3/admin/connected-apps`,
449
+ options
450
+ );
451
+ };
452
+ const adminControllerListSystemLogs = (options) => {
453
+ return axiosInstance.get(
454
+ `/v3/admin/system-logs`,
455
+ options
456
+ );
457
+ };
458
+ const adminControllerListGlobalSettings = (options) => {
459
+ return axiosInstance.get(
460
+ `/v3/admin/settings`,
461
+ options
462
+ );
463
+ };
464
+ const adminControllerSetGlobalSetting = (setGlobalSettingDto, options) => {
465
+ return axiosInstance.post(
466
+ `/v3/admin/settings`,
467
+ setGlobalSettingDto,
468
+ options
469
+ );
470
+ };
471
+ const adminControllerDeleteGlobalSetting = (key, options) => {
472
+ return axiosInstance.delete(
473
+ `/v3/admin/settings/${key}`,
474
+ options
475
+ );
476
+ };
477
+ const adminControllerListTiers = (options) => {
478
+ return axiosInstance.get(
479
+ `/v3/admin/tiers`,
480
+ options
481
+ );
482
+ };
483
+ const adminControllerDefineTier = (defineTierDto, options) => {
484
+ return axiosInstance.post(
485
+ `/v3/admin/tiers`,
486
+ defineTierDto,
487
+ options
488
+ );
489
+ };
490
+ const adminControllerDeleteTier = (slug, options) => {
491
+ return axiosInstance.delete(
492
+ `/v3/admin/tiers/${slug}`,
493
+ options
494
+ );
495
+ };
496
+ const adminControllerGetOrganizationSubscription = (id, options) => {
497
+ return axiosInstance.get(
498
+ `/v3/admin/organizations/${id}/subscription`,
499
+ options
500
+ );
501
+ };
502
+ const adminControllerUpdateOrganizationSubscription = (id, updateSubscriptionDto, options) => {
503
+ return axiosInstance.put(
504
+ `/v3/admin/organizations/${id}/subscription`,
505
+ updateSubscriptionDto,
506
+ options
507
+ );
508
+ };
509
+ const adminControllerListSystemPayments = (options) => {
510
+ return axiosInstance.get(
511
+ `/v3/admin/payments`,
512
+ options
513
+ );
514
+ };
515
+ const adminControllerRecordCustomPayment = (recordCustomPaymentDto, options) => {
516
+ return axiosInstance.post(
517
+ `/v3/admin/payments/record`,
518
+ recordCustomPaymentDto,
519
+ options
520
+ );
521
+ };
522
+ const adminControllerListIntegrationDefinitions = (options) => {
523
+ return axiosInstance.get(
524
+ `/v3/admin/integrations/definitions`,
525
+ options
526
+ );
527
+ };
528
+ const adminControllerCreateIntegrationDefinition = (createIntegrationDefinitionDto, options) => {
529
+ return axiosInstance.post(
530
+ `/v3/admin/integrations/definitions`,
531
+ createIntegrationDefinitionDto,
532
+ options
533
+ );
534
+ };
535
+ const adminControllerUpdateIntegrationDefinition = (id, updateIntegrationDefinitionDto, options) => {
536
+ return axiosInstance.patch(
537
+ `/v3/admin/integrations/definitions/${id}`,
538
+ updateIntegrationDefinitionDto,
539
+ options
540
+ );
541
+ };
542
+ const adminControllerDeleteIntegrationDefinition = (id, options) => {
543
+ return axiosInstance.delete(
544
+ `/v3/admin/integrations/definitions/${id}`,
545
+ options
546
+ );
547
+ };
548
+ const adminControllerListActiveOrganizationIntegrations = (options) => {
549
+ return axiosInstance.get(
550
+ `/v3/admin/integrations/active`,
551
+ options
552
+ );
553
+ };
554
+ const webhooksCreate = (orgSlug, createWebhookDto, options) => {
555
+ return axiosInstance.post(
556
+ `/v3/${orgSlug}/webhooks`,
557
+ createWebhookDto,
558
+ options
559
+ );
560
+ };
561
+ const webhooksList = (orgSlug, options) => {
562
+ return axiosInstance.get(
563
+ `/v3/${orgSlug}/webhooks`,
564
+ options
565
+ );
566
+ };
567
+ const webhooksDelete = (orgSlug, id, options) => {
568
+ return axiosInstance.delete(
569
+ `/v3/${orgSlug}/webhooks/${id}`,
570
+ options
571
+ );
572
+ };
573
+ const windmillCallbackControllerHandleCallback = (options) => {
574
+ return axiosInstance.post(
575
+ `/v3/webhooks/windmill`,
576
+ void 0,
577
+ options
578
+ );
579
+ };
580
+ const windmillCallbackControllerHandleApprovalCallback = (options) => {
581
+ return axiosInstance.post(
582
+ `/v3/webhooks/windmill/approval`,
583
+ void 0,
584
+ options
585
+ );
586
+ };
587
+ const windmillCallbackControllerHandleBakeryDisposalCallback = (options) => {
588
+ return axiosInstance.post(
589
+ `/v3/webhooks/windmill/bakery/disposal`,
590
+ void 0,
591
+ options
592
+ );
593
+ };
594
+ const windmillCallbackControllerHandleOutcomeCallback = (options) => {
595
+ return axiosInstance.post(
596
+ `/v3/webhooks/windmill/outcome`,
597
+ void 0,
598
+ options
599
+ );
600
+ };
601
+ const catalogGetProducts = (orgSlug, params, options) => {
602
+ return axiosInstance.get(
603
+ `/v3/${orgSlug}/catalog/products`,
604
+ {
605
+ ...options,
606
+ params: { ...params, ...options?.params }
607
+ }
608
+ );
609
+ };
610
+ const catalogCreateProduct = (orgSlug, createProductDto, options) => {
611
+ return axiosInstance.post(
612
+ `/v3/${orgSlug}/catalog/products`,
613
+ createProductDto,
614
+ options
615
+ );
616
+ };
617
+ const catalogGetServices = (orgSlug, params, options) => {
618
+ return axiosInstance.get(
619
+ `/v3/${orgSlug}/catalog/services`,
620
+ {
621
+ ...options,
622
+ params: { ...params, ...options?.params }
623
+ }
624
+ );
625
+ };
626
+ const catalogUpdateProduct = (orgSlug, id, updateProductDto, options) => {
627
+ return axiosInstance.patch(
628
+ `/v3/${orgSlug}/catalog/products/${id}`,
629
+ updateProductDto,
630
+ options
631
+ );
632
+ };
633
+ const catalogUpdateSupplierVariant = (orgSlug, supplierId, variantId, updateSupplierProductDto, options) => {
634
+ return axiosInstance.patch(
635
+ `/v3/${orgSlug}/catalog/suppliers/${supplierId}/variants/${variantId}`,
636
+ updateSupplierProductDto,
637
+ options
638
+ );
639
+ };
640
+ const catalogGetPriceChangeRequests = (orgSlug, params, options) => {
641
+ return axiosInstance.get(
642
+ `/v3/${orgSlug}/catalog/price-change-requests`,
643
+ {
644
+ ...options,
645
+ params: { ...params, ...options?.params }
646
+ }
647
+ );
648
+ };
649
+ const catalogReviewPriceChangeRequest = (orgSlug, id, reviewPriceChangeDto, options) => {
650
+ return axiosInstance.post(
651
+ `/v3/${orgSlug}/catalog/price-change-requests/${id}/review`,
652
+ reviewPriceChangeDto,
653
+ options
654
+ );
655
+ };
656
+ const servicesCreateCategory = (orgSlug, createServiceCategoryDto, options) => {
657
+ return axiosInstance.post(
658
+ `/v3/${orgSlug}/services/categories`,
659
+ createServiceCategoryDto,
660
+ options
661
+ );
662
+ };
663
+ const servicesGetCategories = (orgSlug, options) => {
664
+ return axiosInstance.get(
665
+ `/v3/${orgSlug}/services/categories`,
666
+ options
667
+ );
668
+ };
669
+ const servicesUpdateCategory = (orgSlug, id, updateServiceCategoryDto, options) => {
670
+ return axiosInstance.patch(
671
+ `/v3/${orgSlug}/services/categories/${id}`,
672
+ updateServiceCategoryDto,
673
+ options
674
+ );
675
+ };
676
+ const servicesDeleteCategory = (orgSlug, id, options) => {
677
+ return axiosInstance.post(
678
+ `/v3/${orgSlug}/services/categories/${id}/delete`,
679
+ void 0,
680
+ options
681
+ );
682
+ };
683
+ const servicesCreateService = (orgSlug, createServiceDto, options) => {
684
+ return axiosInstance.post(
685
+ `/v3/${orgSlug}/services`,
686
+ createServiceDto,
687
+ options
688
+ );
689
+ };
690
+ const servicesGetServices = (orgSlug, options) => {
691
+ return axiosInstance.get(
692
+ `/v3/${orgSlug}/services`,
693
+ options
694
+ );
695
+ };
696
+ const servicesGetCurrentMemberShifts = (orgSlug, options) => {
697
+ return axiosInstance.get(
698
+ `/v3/${orgSlug}/services/shifts/me`,
699
+ options
700
+ );
701
+ };
702
+ const servicesGetShifts = (orgSlug, params, options) => {
703
+ return axiosInstance.get(
704
+ `/v3/${orgSlug}/services/shifts`,
705
+ {
706
+ ...options,
707
+ params: { ...params, ...options?.params }
708
+ }
709
+ );
710
+ };
711
+ const servicesGetService = (orgSlug, id, options) => {
712
+ return axiosInstance.get(
713
+ `/v3/${orgSlug}/services/${id}`,
714
+ options
715
+ );
716
+ };
717
+ const servicesUpdateService = (orgSlug, id, updateServiceDto, options) => {
718
+ return axiosInstance.patch(
719
+ `/v3/${orgSlug}/services/${id}`,
720
+ updateServiceDto,
721
+ options
722
+ );
723
+ };
724
+ const servicesDeleteService = (orgSlug, id, options) => {
725
+ return axiosInstance.post(
726
+ `/v3/${orgSlug}/services/${id}/delete`,
727
+ void 0,
728
+ options
729
+ );
730
+ };
731
+ const servicesCreateResource = (orgSlug, createServiceResourceDto, options) => {
732
+ return axiosInstance.post(
733
+ `/v3/${orgSlug}/services/resources`,
734
+ createServiceResourceDto,
735
+ options
736
+ );
737
+ };
738
+ const servicesGetResources = (orgSlug, options) => {
739
+ return axiosInstance.get(
740
+ `/v3/${orgSlug}/services/resources`,
741
+ options
742
+ );
743
+ };
744
+ const servicesUpdateResource = (orgSlug, id, updateServiceResourceDto, options) => {
745
+ return axiosInstance.patch(
746
+ `/v3/${orgSlug}/services/resources/${id}`,
747
+ updateServiceResourceDto,
748
+ options
749
+ );
750
+ };
751
+ const servicesDeleteResource = (orgSlug, id, options) => {
752
+ return axiosInstance.post(
753
+ `/v3/${orgSlug}/services/resources/${id}/delete`,
754
+ void 0,
755
+ options
756
+ );
757
+ };
758
+ const servicesCreateBooking = (orgSlug, createBookingDto, options) => {
759
+ return axiosInstance.post(
760
+ `/v3/${orgSlug}/services/bookings`,
761
+ createBookingDto,
762
+ options
763
+ );
764
+ };
765
+ const servicesGetBookings = (orgSlug, options) => {
766
+ return axiosInstance.get(
767
+ `/v3/${orgSlug}/services/bookings`,
768
+ options
769
+ );
770
+ };
771
+ const servicesGetBooking = (orgSlug, id, options) => {
772
+ return axiosInstance.get(
773
+ `/v3/${orgSlug}/services/bookings/${id}`,
774
+ options
775
+ );
776
+ };
777
+ const servicesUpdateBookingStatus = (orgSlug, id, servicesUpdateBookingStatusBody, options) => {
778
+ return axiosInstance.patch(
779
+ `/v3/${orgSlug}/services/bookings/${id}/status`,
780
+ servicesUpdateBookingStatusBody,
781
+ options
782
+ );
783
+ };
784
+ const servicesCompleteBooking = (orgSlug, id, completeBookingDto, options) => {
785
+ return axiosInstance.patch(
786
+ `/v3/${orgSlug}/services/bookings/${id}/complete`,
787
+ completeBookingDto,
788
+ options
789
+ );
790
+ };
791
+ const servicesCreateShift = (orgSlug, memberId, servicesCreateShiftBody, options) => {
792
+ return axiosInstance.post(
793
+ `/v3/${orgSlug}/services/staff/${memberId}/shifts`,
794
+ servicesCreateShiftBody,
795
+ options
796
+ );
797
+ };
798
+ const servicesGetStaffShifts = (orgSlug, memberId, options) => {
799
+ return axiosInstance.get(
800
+ `/v3/${orgSlug}/services/staff/${memberId}/shifts`,
801
+ options
802
+ );
803
+ };
804
+ const servicesAddBreak = (orgSlug, shiftId, servicesAddBreakBody, options) => {
805
+ return axiosInstance.post(
806
+ `/v3/${orgSlug}/services/shifts/${shiftId}/breaks`,
807
+ servicesAddBreakBody,
808
+ options
809
+ );
810
+ };
811
+ const servicesRegisterCustomerApp = (orgSlug, servicesRegisterCustomerAppBody, options) => {
812
+ return axiosInstance.post(
813
+ `/v3/${orgSlug}/services/register-customer-app`,
814
+ servicesRegisterCustomerAppBody,
815
+ options
816
+ );
817
+ };
818
+ const servicesGetUtilization = (orgSlug, params, options) => {
819
+ return axiosInstance.get(
820
+ `/v3/${orgSlug}/services/analytics/utilization`,
821
+ {
822
+ ...options,
823
+ params: { ...params, ...options?.params }
824
+ }
825
+ );
826
+ };
827
+ const servicesGetPerformance = (orgSlug, params, options) => {
828
+ return axiosInstance.get(
829
+ `/v3/${orgSlug}/services/analytics/performance`,
830
+ {
831
+ ...options,
832
+ params: { ...params, ...options?.params }
833
+ }
834
+ );
835
+ };
836
+ const servicesGetFunnel = (orgSlug, params, options) => {
837
+ return axiosInstance.get(
838
+ `/v3/${orgSlug}/services/analytics/funnel`,
839
+ {
840
+ ...options,
841
+ params: { ...params, ...options?.params }
842
+ }
843
+ );
844
+ };
845
+ const publicServicesListServices = (orgSlug, options) => {
846
+ return axiosInstance.get(
847
+ `/v3/public/${orgSlug}/services`,
848
+ options
849
+ );
850
+ };
851
+ const publicServicesGetCategories = (orgSlug, options) => {
852
+ return axiosInstance.get(
853
+ `/v3/public/${orgSlug}/services/categories`,
854
+ options
855
+ );
856
+ };
857
+ const publicServicesGetService = (orgSlug, id, options) => {
858
+ return axiosInstance.get(
859
+ `/v3/public/${orgSlug}/services/${id}`,
860
+ options
861
+ );
862
+ };
863
+ const publicServicesGetAvailability = (orgSlug, id, params, options) => {
864
+ return axiosInstance.get(
865
+ `/v3/public/${orgSlug}/services/${id}/availability`,
866
+ {
867
+ ...options,
868
+ params: { ...params, ...options?.params }
869
+ }
870
+ );
871
+ };
872
+ const publicServicesRequestOtp = (orgSlug, requestOtpDto, options) => {
873
+ return axiosInstance.post(
874
+ `/v3/public/${orgSlug}/services/otp/request`,
875
+ requestOtpDto,
876
+ options
877
+ );
878
+ };
879
+ const publicServicesVerifyOtp = (orgSlug, verifyOtpDto, options) => {
880
+ return axiosInstance.post(
881
+ `/v3/public/${orgSlug}/services/otp/verify`,
882
+ verifyOtpDto,
883
+ options
884
+ );
885
+ };
886
+ const publicServicesCreatePublicBooking = (orgSlug, publicBookingDto, options) => {
887
+ return axiosInstance.post(
888
+ `/v3/public/${orgSlug}/services/bookings`,
889
+ publicBookingDto,
890
+ options
891
+ );
892
+ };
893
+ const customersProvisionZitadel = (orgSlug, provisionZitadelDto, options) => {
894
+ return axiosInstance.post(
895
+ `/v3/${orgSlug}/customers/zitadel/provision`,
896
+ provisionZitadelDto,
897
+ options
898
+ );
899
+ };
900
+ const customersGetCustomers = (orgSlug, params, options) => {
901
+ return axiosInstance.get(
902
+ `/v3/${orgSlug}/customers`,
903
+ {
904
+ ...options,
905
+ params: { ...params, ...options?.params }
906
+ }
907
+ );
908
+ };
909
+ const customersRegister = (orgSlug, registerCustomerDto, options) => {
910
+ return axiosInstance.post(
911
+ `/v3/${orgSlug}/customers/register`,
912
+ registerCustomerDto,
913
+ options
914
+ );
915
+ };
916
+ const customersLogin = (orgSlug, customerLoginDto, options) => {
917
+ return axiosInstance.post(
918
+ `/v3/${orgSlug}/customers/auth/login`,
919
+ customerLoginDto,
920
+ options
921
+ );
922
+ };
923
+ const customersGetCurrentSession = (orgSlug, options) => {
924
+ return axiosInstance.get(
925
+ `/v3/${orgSlug}/customers/auth/session`,
926
+ options
927
+ );
928
+ };
929
+ const customersGetSessions = (orgSlug, options) => {
930
+ return axiosInstance.get(
931
+ `/v3/${orgSlug}/customers/auth/sessions`,
932
+ options
933
+ );
934
+ };
935
+ const customersRevokeAllSessions = (orgSlug, params, options) => {
936
+ return axiosInstance.delete(
937
+ `/v3/${orgSlug}/customers/auth/sessions`,
938
+ {
939
+ ...options,
940
+ params: { ...params, ...options?.params }
941
+ }
942
+ );
943
+ };
944
+ const customersRevokeSession = (orgSlug, id, options) => {
945
+ return axiosInstance.delete(
946
+ `/v3/${orgSlug}/customers/auth/sessions/${id}`,
947
+ options
948
+ );
949
+ };
950
+ const customersUpdate = (orgSlug, id, updateCustomerDto, options) => {
951
+ return axiosInstance.patch(
952
+ `/v3/${orgSlug}/customers/${id}`,
953
+ updateCustomerDto,
954
+ options
955
+ );
956
+ };
957
+ const customersGetCustomerById = (orgSlug, id, options) => {
958
+ return axiosInstance.get(
959
+ `/v3/${orgSlug}/customers/${id}`,
960
+ options
961
+ );
962
+ };
963
+ const customersDelete = (orgSlug, id, options) => {
964
+ return axiosInstance.delete(
965
+ `/v3/${orgSlug}/customers/${id}`,
966
+ options
967
+ );
968
+ };
969
+ const customersGetAddresses = (orgSlug, id, options) => {
970
+ return axiosInstance.get(
971
+ `/v3/${orgSlug}/customers/${id}/addresses`,
972
+ options
973
+ );
974
+ };
975
+ const customersAddAddress = (orgSlug, id, addressDto, options) => {
976
+ return axiosInstance.post(
977
+ `/v3/${orgSlug}/customers/${id}/addresses`,
978
+ addressDto,
979
+ options
980
+ );
981
+ };
982
+ const businessAccountControllerCreate = (orgSlug, createBusinessAccountDto, options) => {
983
+ return axiosInstance.post(
984
+ `/v3/${orgSlug}/business-accounts`,
985
+ createBusinessAccountDto,
986
+ options
987
+ );
988
+ };
989
+ const businessAccountControllerGetOne = (orgSlug, id, options) => {
990
+ return axiosInstance.get(
991
+ `/v3/${orgSlug}/business-accounts/${id}`,
992
+ options
993
+ );
994
+ };
995
+ const crmControllerCreateRecord = (orgSlug, createCrmRecordDto, options) => {
996
+ return axiosInstance.post(
997
+ `/v3/${orgSlug}/crm/records`,
998
+ createCrmRecordDto,
999
+ options
1000
+ );
1001
+ };
1002
+ const crmControllerGetRecord = (orgSlug, id, options) => {
1003
+ return axiosInstance.get(
1004
+ `/v3/${orgSlug}/crm/records/${id}`,
1005
+ options
1006
+ );
1007
+ };
1008
+ const crmControllerUpdateRecord = (orgSlug, id, updateCrmRecordDto, options) => {
1009
+ return axiosInstance.patch(
1010
+ `/v3/${orgSlug}/crm/records/${id}`,
1011
+ updateCrmRecordDto,
1012
+ options
1013
+ );
1014
+ };
1015
+ const crmControllerCreateNote = (orgSlug, createCrmNoteDto, options) => {
1016
+ return axiosInstance.post(
1017
+ `/v3/${orgSlug}/crm/notes`,
1018
+ createCrmNoteDto,
1019
+ options
1020
+ );
1021
+ };
1022
+ const crmControllerGetRecordNotes = (orgSlug, id, options) => {
1023
+ return axiosInstance.get(
1024
+ `/v3/${orgSlug}/crm/records/${id}/notes`,
1025
+ options
1026
+ );
1027
+ };
1028
+ const crmControllerCreateActivity = (orgSlug, createCrmActivityDto, options) => {
1029
+ return axiosInstance.post(
1030
+ `/v3/${orgSlug}/crm/activities`,
1031
+ createCrmActivityDto,
1032
+ options
1033
+ );
1034
+ };
1035
+ const crmControllerGetTimeline = (orgSlug, id, options) => {
1036
+ return axiosInstance.get(
1037
+ `/v3/${orgSlug}/crm/records/${id}/timeline`,
1038
+ options
1039
+ );
1040
+ };
1041
+ const crmControllerCreateObject = (orgSlug, createCrmObjectDto, options) => {
1042
+ return axiosInstance.post(
1043
+ `/v3/${orgSlug}/crm/objects`,
1044
+ createCrmObjectDto,
1045
+ options
1046
+ );
1047
+ };
1048
+ const crmControllerListObjects = (orgSlug, options) => {
1049
+ return axiosInstance.get(
1050
+ `/v3/${orgSlug}/crm/objects`,
1051
+ options
1052
+ );
1053
+ };
1054
+ const crmControllerCreateField = (orgSlug, objectId, createCrmFieldDto, options) => {
1055
+ return axiosInstance.post(
1056
+ `/v3/${orgSlug}/crm/objects/${objectId}/fields`,
1057
+ createCrmFieldDto,
1058
+ options
1059
+ );
1060
+ };
1061
+ const crmControllerListFields = (orgSlug, objectId, options) => {
1062
+ return axiosInstance.get(
1063
+ `/v3/${orgSlug}/crm/objects/${objectId}/fields`,
1064
+ options
1065
+ );
1066
+ };
1067
+ const crmControllerCreateRelationship = (orgSlug, createCrmRelationshipDto, options) => {
1068
+ return axiosInstance.post(
1069
+ `/v3/${orgSlug}/crm/relationships`,
1070
+ createCrmRelationshipDto,
1071
+ options
1072
+ );
1073
+ };
1074
+ const crmControllerListRelationships = (orgSlug, options) => {
1075
+ return axiosInstance.get(
1076
+ `/v3/${orgSlug}/crm/relationships`,
1077
+ options
1078
+ );
1079
+ };
1080
+ const crmControllerCreateAssociation = (orgSlug, createCrmAssociationDto, options) => {
1081
+ return axiosInstance.post(
1082
+ `/v3/${orgSlug}/crm/associations`,
1083
+ createCrmAssociationDto,
1084
+ options
1085
+ );
1086
+ };
1087
+ const crmControllerListRecordAssociations = (orgSlug, id, options) => {
1088
+ return axiosInstance.get(
1089
+ `/v3/${orgSlug}/crm/records/${id}/associations`,
1090
+ options
1091
+ );
1092
+ };
1093
+ const loyaltyRedeemReward = (orgSlug, redeemRewardDto, options) => {
1094
+ return axiosInstance.post(
1095
+ `/v3/${orgSlug}/loyalty/vouchers/redeem`,
1096
+ redeemRewardDto,
1097
+ options
1098
+ );
1099
+ };
1100
+ const loyaltyGetCustomerStatus = (orgSlug, id, options) => {
1101
+ return axiosInstance.get(
1102
+ `/v3/${orgSlug}/loyalty/customers/${id}/status`,
1103
+ options
1104
+ );
1105
+ };
1106
+ const loyaltyValidateVoucher = (orgSlug, validateVoucherDto, options) => {
1107
+ return axiosInstance.post(
1108
+ `/v3/${orgSlug}/loyalty/vouchers/validate`,
1109
+ validateVoucherDto,
1110
+ options
1111
+ );
1112
+ };
1113
+ const ordersCreateOrder = (orgSlug, createOrderDto, options) => {
1114
+ return axiosInstance.post(
1115
+ `/v3/${orgSlug}/orders`,
1116
+ createOrderDto,
1117
+ options
1118
+ );
1119
+ };
1120
+ const ordersGetOrders = (orgSlug, params, options) => {
1121
+ return axiosInstance.get(
1122
+ `/v3/${orgSlug}/orders`,
1123
+ {
1124
+ ...options,
1125
+ params: { ...params, ...options?.params }
1126
+ }
1127
+ );
1128
+ };
1129
+ const ordersUpdateStatus = (orgSlug, id, updateOrderStatusDto, options) => {
1130
+ return axiosInstance.post(
1131
+ `/v3/${orgSlug}/orders/${id}/status`,
1132
+ updateOrderStatusDto,
1133
+ options
1134
+ );
1135
+ };
1136
+ const ordersRequestB2BQuote = (orgSlug, requestB2BQuoteDto, options) => {
1137
+ return axiosInstance.post(
1138
+ `/v3/${orgSlug}/orders/b2b/quotes`,
1139
+ requestB2BQuoteDto,
1140
+ options
1141
+ );
1142
+ };
1143
+ const ordersConvertQuoteToOrder = (orgSlug, id, options) => {
1144
+ return axiosInstance.post(
1145
+ `/v3/${orgSlug}/orders/b2b/quotes/${id}/convert`,
1146
+ void 0,
1147
+ options
1148
+ );
1149
+ };
1150
+ const paymentsControllerHandleStkCallback = (orgSlug, paymentId, options) => {
1151
+ return axiosInstance.post(
1152
+ `/v3/${orgSlug}/payments/webhooks/mpesa/stkpush/${paymentId}`,
1153
+ void 0,
1154
+ options
1155
+ );
1156
+ };
1157
+ const pOSProvision = (orgSlug, provisionDeviceDto, options) => {
1158
+ return axiosInstance.post(
1159
+ `/v3/${orgSlug}/pos/provision`,
1160
+ provisionDeviceDto,
1161
+ options
1162
+ );
1163
+ };
1164
+ const pOSLogin = (orgSlug, posLoginDto, options) => {
1165
+ return axiosInstance.post(
1166
+ `/v3/${orgSlug}/pos/login`,
1167
+ posLoginDto,
1168
+ options
1169
+ );
1170
+ };
1171
+ const pOSGetMe = (orgSlug, options) => {
1172
+ return axiosInstance.get(
1173
+ `/v3/${orgSlug}/pos/me`,
1174
+ options
1175
+ );
1176
+ };
1177
+ const pOSProcessSale = (orgSlug, processSaleDto, options) => {
1178
+ return axiosInstance.post(
1179
+ `/v3/${orgSlug}/pos/sale`,
1180
+ processSaleDto,
1181
+ options
1182
+ );
1183
+ };
1184
+ const pOSSync = (orgSlug, options) => {
1185
+ return axiosInstance.get(
1186
+ `/v3/${orgSlug}/pos/sync`,
1187
+ options
1188
+ );
1189
+ };
1190
+ const pOSGetTransactions = (orgSlug, options) => {
1191
+ return axiosInstance.get(
1192
+ `/v3/${orgSlug}/pos/transactions`,
1193
+ options
1194
+ );
1195
+ };
1196
+ const pOSRegisterPettyCash = (orgSlug, registerPettyCashDto, options) => {
1197
+ return axiosInstance.post(
1198
+ `/v3/${orgSlug}/pos/petty-cash`,
1199
+ registerPettyCashDto,
1200
+ options
1201
+ );
1202
+ };
1203
+ const pOSGetPettyCashFunds = (orgSlug, options) => {
1204
+ return axiosInstance.get(
1205
+ `/v3/${orgSlug}/pos/petty-cash/funds`,
1206
+ options
1207
+ );
1208
+ };
1209
+ const pOSGetPettyCashTransactions = (orgSlug, params, options) => {
1210
+ return axiosInstance.get(
1211
+ `/v3/${orgSlug}/pos/petty-cash/transactions`,
1212
+ {
1213
+ ...options,
1214
+ params: { ...params, ...options?.params }
1215
+ }
1216
+ );
1217
+ };
1218
+ const membersControllerGetMembers = (orgSlug, params, options) => {
1219
+ return axiosInstance.get(
1220
+ `/v3/${orgSlug}/members`,
1221
+ {
1222
+ ...options,
1223
+ params: { ...params, ...options?.params }
1224
+ }
1225
+ );
1226
+ };
1227
+ const membersControllerCreateMember = (orgSlug, createMemberDto, options) => {
1228
+ return axiosInstance.post(
1229
+ `/v3/${orgSlug}/members`,
1230
+ createMemberDto,
1231
+ options
1232
+ );
1233
+ };
1234
+ const membersControllerGetMember = (orgSlug, id, options) => {
1235
+ return axiosInstance.get(
1236
+ `/v3/${orgSlug}/members/${id}`,
1237
+ options
1238
+ );
1239
+ };
1240
+ const membersControllerUpdateMember = (orgSlug, id, updateMemberDto, options) => {
1241
+ return axiosInstance.patch(
1242
+ `/v3/${orgSlug}/members/${id}`,
1243
+ updateMemberDto,
1244
+ options
1245
+ );
1246
+ };
1247
+ const membersControllerDeleteMember = (orgSlug, id, options) => {
1248
+ return axiosInstance.delete(
1249
+ `/v3/${orgSlug}/members/${id}`,
1250
+ options
1251
+ );
1252
+ };
1253
+ const membersControllerGetMemberActivity = (orgSlug, id, options) => {
1254
+ return axiosInstance.get(
1255
+ `/v3/${orgSlug}/members/${id}/activity`,
1256
+ options
1257
+ );
1258
+ };
1259
+ const membersControllerUpdateStatus = (orgSlug, id, options) => {
1260
+ return axiosInstance.patch(
1261
+ `/v3/${orgSlug}/members/${id}/status`,
1262
+ void 0,
1263
+ options
1264
+ );
1265
+ };
1266
+ const membersControllerAdminCheckOut = (orgSlug, memberId, checkOutDto, options) => {
1267
+ return axiosInstance.post(
1268
+ `/v3/${orgSlug}/members/${memberId}/attendance/check-out`,
1269
+ checkOutDto,
1270
+ options
1271
+ );
1272
+ };
1273
+ const terminalMembersControllerLogin = (terminalLoginDto, options) => {
1274
+ return axiosInstance.post(
1275
+ `/v3/members/login`,
1276
+ terminalLoginDto,
1277
+ options
1278
+ );
1279
+ };
1280
+ const invitationsList = (orgSlug, params, options) => {
1281
+ return axiosInstance.get(
1282
+ `/v3/${orgSlug}/members/invitations`,
1283
+ {
1284
+ ...options,
1285
+ params: { ...params, ...options?.params }
1286
+ }
1287
+ );
1288
+ };
1289
+ const invitationsCreate = (orgSlug, createInvitationDto, options) => {
1290
+ return axiosInstance.post(
1291
+ `/v3/${orgSlug}/members/invitations`,
1292
+ createInvitationDto,
1293
+ options
1294
+ );
1295
+ };
1296
+ const invitationsRevoke = (orgSlug, id, options) => {
1297
+ return axiosInstance.delete(
1298
+ `/v3/${orgSlug}/members/invitations/${id}`,
1299
+ options
1300
+ );
1301
+ };
1302
+ const invitationsAccept = (orgSlug, acceptInvitationDto, options) => {
1303
+ return axiosInstance.post(
1304
+ `/v3/${orgSlug}/members/invitations/accept`,
1305
+ acceptInvitationDto,
1306
+ options
1307
+ );
1308
+ };
1309
+ const roleManagementControllerGetCustomRoles = (orgSlug, params, options) => {
1310
+ return axiosInstance.get(
1311
+ `/v3/${orgSlug}/members/roles/custom`,
1312
+ {
1313
+ ...options,
1314
+ params: { ...params, ...options?.params }
1315
+ }
1316
+ );
1317
+ };
1318
+ const roleManagementControllerCreateCustomRole = (orgSlug, createCustomRoleDto, options) => {
1319
+ return axiosInstance.post(
1320
+ `/v3/${orgSlug}/members/roles/custom`,
1321
+ createCustomRoleDto,
1322
+ options
1323
+ );
1324
+ };
1325
+ const roleManagementControllerUpdateCustomRole = (orgSlug, id, updateCustomRoleDto, options) => {
1326
+ return axiosInstance.patch(
1327
+ `/v3/${orgSlug}/members/roles/custom/${id}`,
1328
+ updateCustomRoleDto,
1329
+ options
1330
+ );
1331
+ };
1332
+ const roleManagementControllerDeleteCustomRole = (orgSlug, id, options) => {
1333
+ return axiosInstance.delete(
1334
+ `/v3/${orgSlug}/members/roles/custom/${id}`,
1335
+ options
1336
+ );
1337
+ };
1338
+ const roleManagementControllerGetPermissionSets = (orgSlug, options) => {
1339
+ return axiosInstance.get(
1340
+ `/v3/${orgSlug}/members/roles/permission-sets`,
1341
+ options
1342
+ );
1343
+ };
1344
+ const roleManagementControllerCreatePermissionSet = (orgSlug, createPermissionSetDto, options) => {
1345
+ return axiosInstance.post(
1346
+ `/v3/${orgSlug}/members/roles/permission-sets`,
1347
+ createPermissionSetDto,
1348
+ options
1349
+ );
1350
+ };
1351
+ const roleManagementControllerGetRoleGroups = (orgSlug, options) => {
1352
+ return axiosInstance.get(
1353
+ `/v3/${orgSlug}/members/roles/groups`,
1354
+ options
1355
+ );
1356
+ };
1357
+ const roleManagementControllerCreateRoleGroup = (orgSlug, createRoleGroupDto, options) => {
1358
+ return axiosInstance.post(
1359
+ `/v3/${orgSlug}/members/roles/groups`,
1360
+ createRoleGroupDto,
1361
+ options
1362
+ );
1363
+ };
1364
+ const roleManagementControllerAssignRoles = (orgSlug, memberId, options) => {
1365
+ return axiosInstance.post(
1366
+ `/v3/${orgSlug}/members/roles/member/${memberId}/assign`,
1367
+ void 0,
1368
+ options
1369
+ );
1370
+ };
1371
+ const roleManagementControllerRemoveRoles = (orgSlug, memberId, options) => {
1372
+ return axiosInstance.post(
1373
+ `/v3/${orgSlug}/members/roles/member/${memberId}/remove`,
1374
+ void 0,
1375
+ options
1376
+ );
1377
+ };
1378
+ const departmentsList = (orgSlug, params, options) => {
1379
+ return axiosInstance.get(
1380
+ `/v3/${orgSlug}/members/departments`,
1381
+ {
1382
+ ...options,
1383
+ params: { ...params, ...options?.params }
1384
+ }
1385
+ );
1386
+ };
1387
+ const departmentsCreate = (orgSlug, createDepartmentDto, options) => {
1388
+ return axiosInstance.post(
1389
+ `/v3/${orgSlug}/members/departments`,
1390
+ createDepartmentDto,
1391
+ options
1392
+ );
1393
+ };
1394
+ const departmentsGet = (orgSlug, id, options) => {
1395
+ return axiosInstance.get(
1396
+ `/v3/${orgSlug}/members/departments/${id}`,
1397
+ options
1398
+ );
1399
+ };
1400
+ const departmentsUpdate = (orgSlug, id, updateDepartmentDto, options) => {
1401
+ return axiosInstance.patch(
1402
+ `/v3/${orgSlug}/members/departments/${id}`,
1403
+ updateDepartmentDto,
1404
+ options
1405
+ );
1406
+ };
1407
+ const departmentsDelete = (orgSlug, id, options) => {
1408
+ return axiosInstance.delete(
1409
+ `/v3/${orgSlug}/members/departments/${id}`,
1410
+ options
1411
+ );
1412
+ };
1413
+ const departmentsAddMember = (orgSlug, id, addDepartmentMemberDto, options) => {
1414
+ return axiosInstance.post(
1415
+ `/v3/${orgSlug}/members/departments/${id}/members`,
1416
+ addDepartmentMemberDto,
1417
+ options
1418
+ );
1419
+ };
1420
+ const departmentsRemoveMember = (orgSlug, id, memberId, options) => {
1421
+ return axiosInstance.delete(
1422
+ `/v3/${orgSlug}/members/departments/${id}/members/${memberId}`,
1423
+ options
1424
+ );
1425
+ };
1426
+ const attendanceControllerGetLogs = (orgSlug, params, options) => {
1427
+ return axiosInstance.get(
1428
+ `/v3/${orgSlug}/members/attendance/logs`,
1429
+ {
1430
+ ...options,
1431
+ params: { ...params, ...options?.params }
1432
+ }
1433
+ );
1434
+ };
1435
+ const attendanceControllerCheckIn = (orgSlug, checkInDto, options) => {
1436
+ return axiosInstance.post(
1437
+ `/v3/${orgSlug}/members/attendance/check-in`,
1438
+ checkInDto,
1439
+ options
1440
+ );
1441
+ };
1442
+ const attendanceControllerCheckOut = (orgSlug, checkOutDto, options) => {
1443
+ return axiosInstance.post(
1444
+ `/v3/${orgSlug}/members/attendance/check-out`,
1445
+ checkOutDto,
1446
+ options
1447
+ );
1448
+ };
1449
+ const attendanceControllerGetMyStatus = (orgSlug, options) => {
1450
+ return axiosInstance.get(
1451
+ `/v3/${orgSlug}/members/attendance/me/status`,
1452
+ options
1453
+ );
1454
+ };
1455
+ const attendanceControllerGetStatus = (orgSlug, memberId, options) => {
1456
+ return axiosInstance.get(
1457
+ `/v3/${orgSlug}/members/attendance/${memberId}/status`,
1458
+ options
1459
+ );
1460
+ };
1461
+ const announcementControllerBroadcastAnnouncement = (orgSlug, announcementDto, options) => {
1462
+ return axiosInstance.post(
1463
+ `/v3/${orgSlug}/announcements`,
1464
+ announcementDto,
1465
+ options
1466
+ );
1467
+ };
1468
+ const cartControllerGetCart = (orgSlug, params, options) => {
1469
+ return axiosInstance.get(
1470
+ `/v3/${orgSlug}/cart`,
1471
+ {
1472
+ ...options,
1473
+ params: { ...params, ...options?.params }
1474
+ }
1475
+ );
1476
+ };
1477
+ const cartControllerClearCart = (orgSlug, params, options) => {
1478
+ return axiosInstance.delete(
1479
+ `/v3/${orgSlug}/cart`,
1480
+ {
1481
+ ...options,
1482
+ params: { ...params, ...options?.params }
1483
+ }
1484
+ );
1485
+ };
1486
+ const cartControllerAddToCart = (orgSlug, addToCartDto, options) => {
1487
+ return axiosInstance.post(
1488
+ `/v3/${orgSlug}/cart/items`,
1489
+ addToCartDto,
1490
+ options
1491
+ );
1492
+ };
1493
+ const cartControllerRemoveFromCart = (orgSlug, removeFromCartDto, options) => {
1494
+ return axiosInstance.delete(
1495
+ `/v3/${orgSlug}/cart/items`,
1496
+ { data: removeFromCartDto, ...options }
1497
+ );
1498
+ };
1499
+ const favoritesControllerGetFavorites = (orgSlug, options) => {
1500
+ return axiosInstance.get(
1501
+ `/v3/${orgSlug}/favorites`,
1502
+ options
1503
+ );
1504
+ };
1505
+ const favoritesControllerAddFavorite = (orgSlug, favoriteDto, options) => {
1506
+ return axiosInstance.post(
1507
+ `/v3/${orgSlug}/favorites`,
1508
+ favoriteDto,
1509
+ options
1510
+ );
1511
+ };
1512
+ const favoritesControllerRemoveFavorite = (orgSlug, favoriteDto, options) => {
1513
+ return axiosInstance.delete(
1514
+ `/v3/${orgSlug}/favorites`,
1515
+ { data: favoriteDto, ...options }
1516
+ );
1517
+ };
1518
+ const stockingGetPurchases = (orgSlug, params, options) => {
1519
+ return axiosInstance.get(
1520
+ `/v3/${orgSlug}/stocking/purchases`,
1521
+ {
1522
+ ...options,
1523
+ params: { ...params, ...options?.params }
1524
+ }
1525
+ );
1526
+ };
1527
+ const stockingCreatePurchase = (orgSlug, createPurchaseDto, options) => {
1528
+ return axiosInstance.post(
1529
+ `/v3/${orgSlug}/stocking/purchases`,
1530
+ createPurchaseDto,
1531
+ options
1532
+ );
1533
+ };
1534
+ const stockingReceivePurchase = (orgSlug, id, receivePurchaseDto, options) => {
1535
+ return axiosInstance.post(
1536
+ `/v3/${orgSlug}/stocking/purchases/${id}/receive`,
1537
+ receivePurchaseDto,
1538
+ options
1539
+ );
1540
+ };
1541
+ const stockingGetTransfers = (orgSlug, params, options) => {
1542
+ return axiosInstance.get(
1543
+ `/v3/${orgSlug}/stocking/transfers`,
1544
+ {
1545
+ ...options,
1546
+ params: { ...params, ...options?.params }
1547
+ }
1548
+ );
1549
+ };
1550
+ const stockingCreateTransfer = (orgSlug, createTransferDto, options) => {
1551
+ return axiosInstance.post(
1552
+ `/v3/${orgSlug}/stocking/transfers`,
1553
+ createTransferDto,
1554
+ options
1555
+ );
1556
+ };
1557
+ const stockingShipTransfer = (orgSlug, id, shipTransferDto, options) => {
1558
+ return axiosInstance.post(
1559
+ `/v3/${orgSlug}/stocking/transfers/${id}/ship`,
1560
+ shipTransferDto,
1561
+ options
1562
+ );
1563
+ };
1564
+ const stockingReceiveTransfer = (orgSlug, id, receiveTransferDto, options) => {
1565
+ return axiosInstance.post(
1566
+ `/v3/${orgSlug}/stocking/transfers/${id}/receive`,
1567
+ receiveTransferDto,
1568
+ options
1569
+ );
1570
+ };
1571
+ const stockingGetRequests = (orgSlug, params, options) => {
1572
+ return axiosInstance.get(
1573
+ `/v3/${orgSlug}/stocking/requests`,
1574
+ {
1575
+ ...options,
1576
+ params: { ...params, ...options?.params }
1577
+ }
1578
+ );
1579
+ };
1580
+ const stockingGetPendingDispatch = (orgSlug, params, options) => {
1581
+ return axiosInstance.get(
1582
+ `/v3/${orgSlug}/stocking/reconciliation/pending-dispatch`,
1583
+ {
1584
+ ...options,
1585
+ params: { ...params, ...options?.params }
1586
+ }
1587
+ );
1588
+ };
1589
+ const stockingDispatchOrders = (orgSlug, dispatchOrderDto, options) => {
1590
+ return axiosInstance.post(
1591
+ `/v3/${orgSlug}/stocking/reconciliation/dispatch`,
1592
+ dispatchOrderDto,
1593
+ options
1594
+ );
1595
+ };
1596
+ const stockingGetActiveDeliveries = (orgSlug, params, options) => {
1597
+ return axiosInstance.get(
1598
+ `/v3/${orgSlug}/stocking/reconciliation/active-deliveries`,
1599
+ {
1600
+ ...options,
1601
+ params: { ...params, ...options?.params }
1602
+ }
1603
+ );
1604
+ };
1605
+ const stockingReconcilePod = (orgSlug, reconcilePodDto, options) => {
1606
+ return axiosInstance.post(
1607
+ `/v3/${orgSlug}/stocking/reconciliation/reconcile-pod`,
1608
+ reconcilePodDto,
1609
+ options
1610
+ );
1611
+ };
1612
+ const stockingGetPhysicalReconciliations = (orgSlug, params, options) => {
1613
+ return axiosInstance.get(
1614
+ `/v3/${orgSlug}/stocking/physical-reconciliations`,
1615
+ {
1616
+ ...options,
1617
+ params: { ...params, ...options?.params }
1618
+ }
1619
+ );
1620
+ };
1621
+ const stockingSubmitPhysicalReconciliation = (orgSlug, submitReconciliationDto, options) => {
1622
+ return axiosInstance.post(
1623
+ `/v3/${orgSlug}/stocking/physical-reconciliations`,
1624
+ submitReconciliationDto,
1625
+ options
1626
+ );
1627
+ };
1628
+ const stockingGetReconciliationReport = (orgSlug, id, options) => {
1629
+ return axiosInstance.get(
1630
+ `/v3/${orgSlug}/stocking/physical-reconciliations/${id}/report`,
1631
+ options
1632
+ );
1633
+ };
1634
+ const stockingGetPartners = (orgSlug, options) => {
1635
+ return axiosInstance.get(
1636
+ `/v3/${orgSlug}/stocking/partners`,
1637
+ options
1638
+ );
1639
+ };
1640
+ const stockingCreatePartner = (orgSlug, createPartnerDto, options) => {
1641
+ return axiosInstance.post(
1642
+ `/v3/${orgSlug}/stocking/partners`,
1643
+ createPartnerDto,
1644
+ options
1645
+ );
1646
+ };
1647
+ const stockingGetPartner = (orgSlug, id, options) => {
1648
+ return axiosInstance.get(
1649
+ `/v3/${orgSlug}/stocking/partners/${id}`,
1650
+ options
1651
+ );
1652
+ };
1653
+ const stockingUpdatePartner = (orgSlug, id, updatePartnerDto, options) => {
1654
+ return axiosInstance.patch(
1655
+ `/v3/${orgSlug}/stocking/partners/${id}`,
1656
+ updatePartnerDto,
1657
+ options
1658
+ );
1659
+ };
1660
+ const stockingAdjustPartnerWallet = (orgSlug, id, partnerWalletActionDto, options) => {
1661
+ return axiosInstance.post(
1662
+ `/v3/${orgSlug}/stocking/partners/${id}/wallet/adjust`,
1663
+ partnerWalletActionDto,
1664
+ options
1665
+ );
1666
+ };
1667
+ const standalonePosControllerCreateSetupKey = (createSetupKeyDto, options) => {
1668
+ return axiosInstance.post(
1669
+ `/v3/standalone-pos/setup-keys`,
1670
+ createSetupKeyDto,
1671
+ options
1672
+ );
1673
+ };
1674
+ const standalonePosControllerActivateDevice = (activateDeviceDto, options) => {
1675
+ return axiosInstance.post(
1676
+ `/v3/standalone-pos/activate`,
1677
+ activateDeviceDto,
1678
+ options
1679
+ );
1680
+ };
1681
+ const standalonePosControllerValidateKey = (options) => {
1682
+ return axiosInstance.get(
1683
+ `/v3/standalone-pos/validate`,
1684
+ options
1685
+ );
1686
+ };
1687
+ const standalonePosControllerLinkOrganization = (linkOrganizationDto, options) => {
1688
+ return axiosInstance.patch(
1689
+ `/v3/standalone-pos/link-org`,
1690
+ linkOrganizationDto,
1691
+ options
1692
+ );
1693
+ };
1694
+ const b2BGetCatalog = (orgSlug, params, options) => {
1695
+ return axiosInstance.get(
1696
+ `/v3/${orgSlug}/b2b/catalog`,
1697
+ {
1698
+ ...options,
1699
+ params: { ...params, ...options?.params }
1700
+ }
1701
+ );
1702
+ };
1703
+ const b2BGetInvoices = (orgSlug, options) => {
1704
+ return axiosInstance.get(
1705
+ `/v3/${orgSlug}/b2b/invoices`,
1706
+ options
1707
+ );
1708
+ };
1709
+ const b2BGetOrders = (orgSlug, options) => {
1710
+ return axiosInstance.get(
1711
+ `/v3/${orgSlug}/b2b/orders`,
1712
+ options
1713
+ );
1714
+ };
1715
+ const b2BCreateOrder = (orgSlug, createB2BOrderDto, options) => {
1716
+ return axiosInstance.post(
1717
+ `/v3/${orgSlug}/b2b/orders`,
1718
+ createB2BOrderDto,
1719
+ options
1720
+ );
1721
+ };
1722
+ const b2BCreateQuote = (orgSlug, createB2BOrderDto, options) => {
1723
+ return axiosInstance.post(
1724
+ `/v3/${orgSlug}/b2b/quotes`,
1725
+ createB2BOrderDto,
1726
+ options
1727
+ );
1728
+ };
1729
+ const crmIntegrationsGetAuthUrl = (orgSlug, provider, options) => {
1730
+ return axiosInstance.get(
1731
+ `/v3/${orgSlug}/crm-integrations/${provider}/auth`,
1732
+ options
1733
+ );
1734
+ };
1735
+ const crmIntegrationsHandleCallback = (orgSlug, provider, params, options) => {
1736
+ return axiosInstance.get(
1737
+ `/v3/${orgSlug}/crm-integrations/${provider}/callback`,
1738
+ {
1739
+ ...options,
1740
+ params: { ...params, ...options?.params }
1741
+ }
1742
+ );
1743
+ };
1744
+ const crmIntegrationsHandleWebhook = (orgSlug, provider, options) => {
1745
+ return axiosInstance.post(
1746
+ `/v3/${orgSlug}/crm-integrations/${provider}/webhook`,
1747
+ void 0,
1748
+ options
1749
+ );
1750
+ };
1751
+ const crmIntegrationsReplyToActivity = (orgSlug, id, options) => {
1752
+ return axiosInstance.post(
1753
+ `/v3/${orgSlug}/crm-integrations/activities/${id}/reply`,
1754
+ void 0,
1755
+ options
1756
+ );
1757
+ };
1758
+ const unitsGetUnits = (orgSlug, params, options) => {
1759
+ return axiosInstance.get(
1760
+ `/v3/${orgSlug}/units`,
1761
+ {
1762
+ ...options,
1763
+ params: { ...params, ...options?.params }
1764
+ }
1765
+ );
1766
+ };
1767
+ const strapiCreateConnection = (orgSlug, createStrapiConnectionDto, options) => {
1768
+ return axiosInstance.post(
1769
+ `/v3/${orgSlug}/strapi/connections`,
1770
+ createStrapiConnectionDto,
1771
+ options
1772
+ );
1773
+ };
1774
+ const strapiListConnections = (orgSlug, options) => {
1775
+ return axiosInstance.get(
1776
+ `/v3/${orgSlug}/strapi/connections`,
1777
+ options
1778
+ );
1779
+ };
1780
+ const strapiGetConnection = (orgSlug, connectionId, options) => {
1781
+ return axiosInstance.get(
1782
+ `/v3/${orgSlug}/strapi/connections/${connectionId}`,
1783
+ options
1784
+ );
1785
+ };
1786
+ const strapiUpdateConnection = (orgSlug, connectionId, updateStrapiConnectionDto, options) => {
1787
+ return axiosInstance.patch(
1788
+ `/v3/${orgSlug}/strapi/connections/${connectionId}`,
1789
+ updateStrapiConnectionDto,
1790
+ options
1791
+ );
1792
+ };
1793
+ const strapiDeleteConnection = (orgSlug, connectionId, options) => {
1794
+ return axiosInstance.delete(
1795
+ `/v3/${orgSlug}/strapi/connections/${connectionId}`,
1796
+ options
1797
+ );
1798
+ };
1799
+ const strapiTriggerSync = (orgSlug, connectionId, triggerSyncDto, options) => {
1800
+ return axiosInstance.post(
1801
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/sync`,
1802
+ triggerSyncDto,
1803
+ options
1804
+ );
1805
+ };
1806
+ const strapiEnqueueSync = (orgSlug, connectionId, triggerSyncDto, options) => {
1807
+ return axiosInstance.post(
1808
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/sync/queue`,
1809
+ triggerSyncDto,
1810
+ options
1811
+ );
1812
+ };
1813
+ const strapiGetWebhookLogs = (orgSlug, connectionId, options) => {
1814
+ return axiosInstance.get(
1815
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/webhook-logs`,
1816
+ options
1817
+ );
1818
+ };
1819
+ const strapiGetSyncLogs = (orgSlug, connectionId, options) => {
1820
+ return axiosInstance.get(
1821
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/sync-logs`,
1822
+ options
1823
+ );
1824
+ };
1825
+ const strapiExchangeCustomerToken = (orgSlug, connectionId, options) => {
1826
+ return axiosInstance.post(
1827
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/customers/exchange-token`,
1828
+ void 0,
1829
+ options
1830
+ );
1831
+ };
1832
+ const strapiRegisterCustomer = (orgSlug, connectionId, options) => {
1833
+ return axiosInstance.post(
1834
+ `/v3/${orgSlug}/strapi/connections/${connectionId}/customers/register`,
1835
+ void 0,
1836
+ options
1837
+ );
1838
+ };
1839
+ const strapiReceiveWebhook = (connectionId, options) => {
1840
+ return axiosInstance.post(
1841
+ `/v3/webhooks/strapi/${connectionId}`,
1842
+ void 0,
1843
+ options
1844
+ );
1845
+ };
1846
+ const analyticsControllerGetDashboardAnalytics = (orgSlug, options) => {
1847
+ return axiosInstance.get(
1848
+ `/v3/${orgSlug}/analytics/dashboard`,
1849
+ options
1850
+ );
1851
+ };
1852
+ const analyticsControllerGetResourceUtilization = (orgSlug, params, options) => {
1853
+ return axiosInstance.get(
1854
+ `/v3/${orgSlug}/analytics/utilization`,
1855
+ {
1856
+ ...options,
1857
+ params: { ...params, ...options?.params }
1858
+ }
1859
+ );
1860
+ };
1861
+ 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 };
1862
+ };
1863
+
1864
+ // src/generated/model/addDepartmentMemberDtoRole.ts
1865
+ var AddDepartmentMemberDtoRole = {
1866
+ HEAD: "HEAD",
1867
+ MANAGER: "MANAGER",
1868
+ MEMBER: "MEMBER",
1869
+ VIEWER: "VIEWER"
1870
+ };
1871
+
1872
+ // src/generated/model/attendanceControllerGetLogsSortOrder.ts
1873
+ var AttendanceControllerGetLogsSortOrder = {
1874
+ asc: "asc",
1875
+ desc: "desc"
1876
+ };
1877
+
1878
+ // src/generated/model/cmsCustomFieldsDtoPublishStatus.ts
1879
+ var CmsCustomFieldsDtoPublishStatus = {
1880
+ Draft: "Draft",
1881
+ Published: "Published",
1882
+ Scheduled: "Scheduled",
1883
+ Archived: "Archived"
1884
+ };
1885
+
1886
+ // src/generated/model/createCrmFieldDtoType.ts
1887
+ var CreateCrmFieldDtoType = {
1888
+ TEXT: "TEXT",
1889
+ NUMBER: "NUMBER",
1890
+ BOOLEAN: "BOOLEAN",
1891
+ DATE: "DATE",
1892
+ SELECT: "SELECT",
1893
+ MULTI_SELECT: "MULTI_SELECT",
1894
+ EMAIL: "EMAIL",
1895
+ PHONE: "PHONE",
1896
+ URL: "URL",
1897
+ JSON: "JSON"
1898
+ };
1899
+
1900
+ // src/generated/model/createCrmRelationshipDtoType.ts
1901
+ var CreateCrmRelationshipDtoType = {
1902
+ ONE_TO_ONE: "ONE_TO_ONE",
1903
+ ONE_TO_MANY: "ONE_TO_MANY",
1904
+ MANY_TO_MANY: "MANY_TO_MANY"
1905
+ };
1906
+
1907
+ // src/generated/model/createExpenseDtoPaymentMethod.ts
1908
+ var CreateExpenseDtoPaymentMethod = {
1909
+ CASH: "CASH",
1910
+ CREDIT: "CREDIT",
1911
+ CARD: "CARD",
1912
+ MOBILE_PAYMENT: "MOBILE_PAYMENT",
1913
+ MPESA_C2B: "MPESA_C2B",
1914
+ BANK_TRANSFER: "BANK_TRANSFER",
1915
+ CHEQUE: "CHEQUE",
1916
+ STORE_CREDIT: "STORE_CREDIT",
1917
+ GIFT_CARD: "GIFT_CARD",
1918
+ LOYALTY_POINTS: "LOYALTY_POINTS",
1919
+ ON_ACCOUNT: "ON_ACCOUNT",
1920
+ MPESA: "MPESA",
1921
+ OTHER: "OTHER"
1922
+ };
1923
+
1924
+ // src/generated/model/createIntegrationDefinitionDtoAuthType.ts
1925
+ var CreateIntegrationDefinitionDtoAuthType = {
1926
+ API_KEY: "API_KEY",
1927
+ OAUTH2: "OAUTH2",
1928
+ OTHER: "OTHER"
1929
+ };
1930
+
1931
+ // src/generated/model/createIntegrationDefinitionDtoCategory.ts
1932
+ var CreateIntegrationDefinitionDtoCategory = {
1933
+ E_COMMERCE: "E_COMMERCE",
1934
+ ACCOUNTING: "ACCOUNTING",
1935
+ MARKETING: "MARKETING",
1936
+ PAYMENT_GATEWAY: "PAYMENT_GATEWAY",
1937
+ CRM: "CRM",
1938
+ COMMUNICATION: "COMMUNICATION",
1939
+ OTHER: "OTHER"
1940
+ };
1941
+
1942
+ // src/generated/model/createInvitationDtoRole.ts
1943
+ var CreateInvitationDtoRole = {
1944
+ OWNER: "OWNER",
1945
+ ADMIN: "ADMIN",
1946
+ MANAGER: "MANAGER",
1947
+ EMPLOYEE: "EMPLOYEE",
1948
+ CASHIER: "CASHIER",
1949
+ REPORTER: "REPORTER",
1950
+ GUEST: "GUEST"
1951
+ };
1952
+
1953
+ // src/generated/model/createMemberDtoRole.ts
1954
+ var CreateMemberDtoRole = {
1955
+ OWNER: "OWNER",
1956
+ ADMIN: "ADMIN",
1957
+ MANAGER: "MANAGER",
1958
+ EMPLOYEE: "EMPLOYEE",
1959
+ CASHIER: "CASHIER",
1960
+ REPORTER: "REPORTER",
1961
+ GUEST: "GUEST"
1962
+ };
1963
+
1964
+ // src/generated/model/createOrderDtoChannel.ts
1965
+ var CreateOrderDtoChannel = {
1966
+ ECOMMERCE_STORE: "ECOMMERCE_STORE",
1967
+ MOBILE_APP: "MOBILE_APP"
1968
+ };
1969
+
1970
+ // src/generated/model/createPartnerDtoBenefitType.ts
1971
+ var CreatePartnerDtoBenefitType = {
1972
+ COMMISSION: "COMMISSION",
1973
+ FIXED_FEE: "FIXED_FEE",
1974
+ PROFIT_MARGIN: "PROFIT_MARGIN",
1975
+ NONE: "NONE"
1976
+ };
1977
+
1978
+ // src/generated/model/createPartnerDtoReconciliationPolicy.ts
1979
+ var CreatePartnerDtoReconciliationPolicy = {
1980
+ RETURN_TO_STOCK: "RETURN_TO_STOCK",
1981
+ MARK_AS_WASTE: "MARK_AS_WASTE",
1982
+ PARTNER_CHARGED: "PARTNER_CHARGED"
1983
+ };
1984
+
1985
+ // src/generated/model/createServiceDtoPricingModel.ts
1986
+ var CreateServiceDtoPricingModel = {
1987
+ FIXED: "FIXED",
1988
+ HOURLY: "HOURLY",
1989
+ VARIABLE: "VARIABLE"
1990
+ };
1991
+
1992
+ // src/generated/model/createStrapiConnectionDtoEnabledSyncTypesItem.ts
1993
+ var CreateStrapiConnectionDtoEnabledSyncTypesItem = {
1994
+ PRODUCTS: "PRODUCTS",
1995
+ INVENTORY: "INVENTORY",
1996
+ ORDERS: "ORDERS",
1997
+ CUSTOMERS: "CUSTOMERS",
1998
+ CATEGORIES: "CATEGORIES",
1999
+ PRICES: "PRICES"
2000
+ };
2001
+
2002
+ // src/generated/model/createStrapiConnectionDtoSyncDirection.ts
2003
+ var CreateStrapiConnectionDtoSyncDirection = {
2004
+ INBOUND: "INBOUND",
2005
+ OUTBOUND: "OUTBOUND",
2006
+ BIDIRECTIONAL: "BIDIRECTIONAL"
2007
+ };
2008
+
2009
+ // src/generated/model/createTransferDtoPriority.ts
2010
+ var CreateTransferDtoPriority = {
2011
+ LOW: "LOW",
2012
+ MEDIUM: "MEDIUM",
2013
+ HIGH: "HIGH",
2014
+ URGENT: "URGENT"
2015
+ };
2016
+
2017
+ // src/generated/model/createUtilityAccountDtoType.ts
2018
+ var CreateUtilityAccountDtoType = {
2019
+ ELECTRICITY: "ELECTRICITY",
2020
+ WATER: "WATER",
2021
+ INTERNET: "INTERNET",
2022
+ GAS: "GAS",
2023
+ WASTE_MANAGEMENT: "WASTE_MANAGEMENT",
2024
+ OTHER: "OTHER"
2025
+ };
2026
+
2027
+ // src/generated/model/departmentsListSortOrder.ts
2028
+ var DepartmentsListSortOrder = {
2029
+ asc: "asc",
2030
+ desc: "desc"
2031
+ };
2032
+
2033
+ // src/generated/model/expenseControllerGetExpensesStatus.ts
2034
+ var ExpenseControllerGetExpensesStatus = {
2035
+ PENDING: "PENDING",
2036
+ PENDING_APPROVAL: "PENDING_APPROVAL",
2037
+ APPROVED: "APPROVED",
2038
+ REJECTED: "REJECTED",
2039
+ PAID: "PAID",
2040
+ REIMBURSED: "REIMBURSED",
2041
+ VOIDED: "VOIDED"
2042
+ };
2043
+
2044
+ // src/generated/model/invitationResponseDtoRole.ts
2045
+ var InvitationResponseDtoRole = {
2046
+ OWNER: "OWNER",
2047
+ ADMIN: "ADMIN",
2048
+ MANAGER: "MANAGER",
2049
+ EMPLOYEE: "EMPLOYEE",
2050
+ CASHIER: "CASHIER",
2051
+ REPORTER: "REPORTER",
2052
+ GUEST: "GUEST"
2053
+ };
2054
+
2055
+ // src/generated/model/invitationResponseDtoStatus.ts
2056
+ var InvitationResponseDtoStatus = {
2057
+ PENDING: "PENDING",
2058
+ ACCEPTED: "ACCEPTED",
2059
+ DECLINED: "DECLINED",
2060
+ EXPIRED: "EXPIRED"
2061
+ };
2062
+
2063
+ // src/generated/model/invitationsListSortOrder.ts
2064
+ var InvitationsListSortOrder = {
2065
+ asc: "asc",
2066
+ desc: "desc"
2067
+ };
2068
+
2069
+ // src/generated/model/invitationsListStatus.ts
2070
+ var InvitationsListStatus = {
2071
+ PENDING: "PENDING",
2072
+ ACCEPTED: "ACCEPTED",
2073
+ DECLINED: "DECLINED",
2074
+ EXPIRED: "EXPIRED"
2075
+ };
2076
+
2077
+ // src/generated/model/memberResponseDtoMembershipStatus.ts
2078
+ var MemberResponseDtoMembershipStatus = {
2079
+ ACTIVE: "ACTIVE",
2080
+ PENDING_APPROVAL: "PENDING_APPROVAL",
2081
+ SUSPENDED: "SUSPENDED",
2082
+ REJECTED: "REJECTED"
2083
+ };
2084
+
2085
+ // src/generated/model/memberResponseDtoRole.ts
2086
+ var MemberResponseDtoRole = {
2087
+ OWNER: "OWNER",
2088
+ ADMIN: "ADMIN",
2089
+ MANAGER: "MANAGER",
2090
+ EMPLOYEE: "EMPLOYEE",
2091
+ CASHIER: "CASHIER",
2092
+ REPORTER: "REPORTER",
2093
+ GUEST: "GUEST"
2094
+ };
2095
+
2096
+ // src/generated/model/memberResponseDtoStatus.ts
2097
+ var MemberResponseDtoStatus = {
2098
+ ONLINE: "ONLINE",
2099
+ OFFLINE: "OFFLINE"
2100
+ };
2101
+
2102
+ // src/generated/model/membersControllerGetMembersMembershipStatus.ts
2103
+ var MembersControllerGetMembersMembershipStatus = {
2104
+ ACTIVE: "ACTIVE",
2105
+ PENDING_APPROVAL: "PENDING_APPROVAL",
2106
+ SUSPENDED: "SUSPENDED",
2107
+ REJECTED: "REJECTED"
2108
+ };
2109
+
2110
+ // src/generated/model/membersControllerGetMembersRole.ts
2111
+ var MembersControllerGetMembersRole = {
2112
+ OWNER: "OWNER",
2113
+ ADMIN: "ADMIN",
2114
+ MANAGER: "MANAGER",
2115
+ EMPLOYEE: "EMPLOYEE",
2116
+ CASHIER: "CASHIER",
2117
+ REPORTER: "REPORTER",
2118
+ GUEST: "GUEST"
2119
+ };
2120
+
2121
+ // src/generated/model/membersControllerGetMembersSortOrder.ts
2122
+ var MembersControllerGetMembersSortOrder = {
2123
+ asc: "asc",
2124
+ desc: "desc"
2125
+ };
2126
+
2127
+ // src/generated/model/reconcilePodDtoOutcome.ts
2128
+ var ReconcilePodDtoOutcome = {
2129
+ DELIVERED: "DELIVERED",
2130
+ FAILED: "FAILED",
2131
+ PARTIAL: "PARTIAL"
2132
+ };
2133
+
2134
+ // src/generated/model/registerPettyCashDtoPaymentMethod.ts
2135
+ var RegisterPettyCashDtoPaymentMethod = {
2136
+ CASH: "CASH",
2137
+ CREDIT: "CREDIT",
2138
+ CARD: "CARD",
2139
+ MOBILE_PAYMENT: "MOBILE_PAYMENT",
2140
+ MPESA_C2B: "MPESA_C2B",
2141
+ BANK_TRANSFER: "BANK_TRANSFER",
2142
+ CHEQUE: "CHEQUE",
2143
+ STORE_CREDIT: "STORE_CREDIT",
2144
+ GIFT_CARD: "GIFT_CARD",
2145
+ LOYALTY_POINTS: "LOYALTY_POINTS",
2146
+ ON_ACCOUNT: "ON_ACCOUNT",
2147
+ MPESA: "MPESA",
2148
+ OTHER: "OTHER"
2149
+ };
2150
+
2151
+ // src/generated/model/reviewPriceChangeDtoStatus.ts
2152
+ var ReviewPriceChangeDtoStatus = {
2153
+ PENDING: "PENDING",
2154
+ APPROVED: "APPROVED",
2155
+ REJECTED: "REJECTED",
2156
+ EXPIRED: "EXPIRED",
2157
+ CANCELLED: "CANCELLED"
2158
+ };
2159
+
2160
+ // src/generated/model/roleManagementControllerGetCustomRolesSortOrder.ts
2161
+ var RoleManagementControllerGetCustomRolesSortOrder = {
2162
+ asc: "asc",
2163
+ desc: "desc"
2164
+ };
2165
+
2166
+ // src/generated/model/servicesUpdateBookingStatusBodyStatus.ts
2167
+ var ServicesUpdateBookingStatusBodyStatus = {
2168
+ REQUESTED: "REQUESTED",
2169
+ SCHEDULED: "SCHEDULED",
2170
+ IN_PROGRESS: "IN_PROGRESS",
2171
+ COMPLETED: "COMPLETED",
2172
+ CANCELLED: "CANCELLED",
2173
+ NOSHOW: "NOSHOW"
2174
+ };
2175
+
2176
+ // src/generated/model/triggerSyncDtoDirection.ts
2177
+ var TriggerSyncDtoDirection = {
2178
+ INBOUND: "INBOUND",
2179
+ OUTBOUND: "OUTBOUND",
2180
+ BIDIRECTIONAL: "BIDIRECTIONAL"
2181
+ };
2182
+
2183
+ // src/generated/model/triggerSyncDtoSyncTypesItem.ts
2184
+ var TriggerSyncDtoSyncTypesItem = {
2185
+ PRODUCTS: "PRODUCTS",
2186
+ INVENTORY: "INVENTORY",
2187
+ ORDERS: "ORDERS",
2188
+ CUSTOMERS: "CUSTOMERS",
2189
+ CATEGORIES: "CATEGORIES",
2190
+ PRICES: "PRICES"
2191
+ };
2192
+
2193
+ // src/generated/model/updateIntegrationDefinitionDtoAuthType.ts
2194
+ var UpdateIntegrationDefinitionDtoAuthType = {
2195
+ API_KEY: "API_KEY",
2196
+ OAUTH2: "OAUTH2",
2197
+ OTHER: "OTHER"
2198
+ };
2199
+
2200
+ // src/generated/model/updateIntegrationDefinitionDtoCategory.ts
2201
+ var UpdateIntegrationDefinitionDtoCategory = {
2202
+ E_COMMERCE: "E_COMMERCE",
2203
+ ACCOUNTING: "ACCOUNTING",
2204
+ MARKETING: "MARKETING",
2205
+ PAYMENT_GATEWAY: "PAYMENT_GATEWAY",
2206
+ CRM: "CRM",
2207
+ COMMUNICATION: "COMMUNICATION",
2208
+ OTHER: "OTHER"
2209
+ };
2210
+
2211
+ // src/generated/model/updateMemberDtoMembershipStatus.ts
2212
+ var UpdateMemberDtoMembershipStatus = {
2213
+ ACTIVE: "ACTIVE",
2214
+ PENDING_APPROVAL: "PENDING_APPROVAL",
2215
+ SUSPENDED: "SUSPENDED",
2216
+ REJECTED: "REJECTED"
2217
+ };
2218
+
2219
+ // src/generated/model/updateMemberDtoRole.ts
2220
+ var UpdateMemberDtoRole = {
2221
+ OWNER: "OWNER",
2222
+ ADMIN: "ADMIN",
2223
+ MANAGER: "MANAGER",
2224
+ EMPLOYEE: "EMPLOYEE",
2225
+ CASHIER: "CASHIER",
2226
+ REPORTER: "REPORTER",
2227
+ GUEST: "GUEST"
2228
+ };
2229
+
2230
+ // src/generated/model/updateMemberDtoStatus.ts
2231
+ var UpdateMemberDtoStatus = {
2232
+ ONLINE: "ONLINE",
2233
+ OFFLINE: "OFFLINE"
2234
+ };
2235
+
2236
+ // src/generated/model/updatePartnerDtoBenefitType.ts
2237
+ var UpdatePartnerDtoBenefitType = {
2238
+ COMMISSION: "COMMISSION",
2239
+ FIXED_FEE: "FIXED_FEE",
2240
+ PROFIT_MARGIN: "PROFIT_MARGIN",
2241
+ NONE: "NONE"
2242
+ };
2243
+
2244
+ // src/generated/model/updatePartnerDtoReconciliationPolicy.ts
2245
+ var UpdatePartnerDtoReconciliationPolicy = {
2246
+ RETURN_TO_STOCK: "RETURN_TO_STOCK",
2247
+ MARK_AS_WASTE: "MARK_AS_WASTE",
2248
+ PARTNER_CHARGED: "PARTNER_CHARGED"
2249
+ };
2250
+
2251
+ // src/generated/model/updateServiceDtoPricingModel.ts
2252
+ var UpdateServiceDtoPricingModel = {
2253
+ FIXED: "FIXED",
2254
+ HOURLY: "HOURLY",
2255
+ VARIABLE: "VARIABLE"
2256
+ };
2257
+
2258
+ // src/generated/model/updateStrapiConnectionDtoEnabledSyncTypesItem.ts
2259
+ var UpdateStrapiConnectionDtoEnabledSyncTypesItem = {
2260
+ PRODUCTS: "PRODUCTS",
2261
+ INVENTORY: "INVENTORY",
2262
+ ORDERS: "ORDERS",
2263
+ CUSTOMERS: "CUSTOMERS",
2264
+ CATEGORIES: "CATEGORIES",
2265
+ PRICES: "PRICES"
2266
+ };
2267
+
2268
+ // src/generated/model/updateStrapiConnectionDtoSyncDirection.ts
2269
+ var UpdateStrapiConnectionDtoSyncDirection = {
2270
+ INBOUND: "INBOUND",
2271
+ OUTBOUND: "OUTBOUND",
2272
+ BIDIRECTIONAL: "BIDIRECTIONAL"
2273
+ };
2274
+
2275
+ // src/base.ts
2276
+ var methodsWithOrgSlugSet = /* @__PURE__ */ new Set([
2277
+ "publicServicesListServices",
2278
+ "publicServicesGetCategories",
2279
+ "publicServicesGetService",
2280
+ "publicServicesGetAvailability",
2281
+ "publicServicesRequestOtp",
2282
+ "publicServicesVerifyOtp",
2283
+ "publicServicesCreatePublicBooking",
2284
+ "inventoryVerifyIntegrity",
2285
+ "inventoryFixIntegrity",
2286
+ "inventoryGetInventory",
2287
+ "inventoryTraceBatch",
2288
+ "inventorySplitBatch",
2289
+ "inventoryMergeBatches",
2290
+ "inventoryCreateAssembly",
2291
+ "inventoryCompleteAssembly",
2292
+ "inventoryRequestAdjustment",
2293
+ "inventoryGetAdjustments",
2294
+ "inventoryApproveAdjustment",
2295
+ "inventoryRejectAdjustment",
2296
+ "inventoryGetLeadTime",
2297
+ "inventoryGetWasteAnalysis",
2298
+ "inventoryCheckB2BAvailability",
2299
+ "inventoryUnpackBatch",
2300
+ "inventoryScanUnpackBatch",
2301
+ "inventoryQuickStockInquiry",
2302
+ "accountingInitialize",
2303
+ "accountingGetProfitLoss",
2304
+ "accountingGetBalanceSheet",
2305
+ "accountingGetCashFlow",
2306
+ "accountingGetTaxSummary",
2307
+ "webhooksCreate",
2308
+ "webhooksList",
2309
+ "webhooksDelete",
2310
+ "catalogGetProducts",
2311
+ "catalogCreateProduct",
2312
+ "catalogGetServices",
2313
+ "catalogUpdateProduct",
2314
+ "catalogUpdateSupplierVariant",
2315
+ "catalogGetPriceChangeRequests",
2316
+ "catalogReviewPriceChangeRequest",
2317
+ "servicesCreateCategory",
2318
+ "servicesGetCategories",
2319
+ "servicesUpdateCategory",
2320
+ "servicesDeleteCategory",
2321
+ "servicesCreateService",
2322
+ "servicesGetServices",
2323
+ "servicesGetCurrentMemberShifts",
2324
+ "servicesGetShifts",
2325
+ "servicesGetService",
2326
+ "servicesUpdateService",
2327
+ "servicesDeleteService",
2328
+ "servicesCreateResource",
2329
+ "servicesGetResources",
2330
+ "servicesUpdateResource",
2331
+ "servicesDeleteResource",
2332
+ "servicesCreateBooking",
2333
+ "servicesGetBookings",
2334
+ "servicesGetBooking",
2335
+ "servicesUpdateBookingStatus",
2336
+ "servicesCompleteBooking",
2337
+ "servicesCreateShift",
2338
+ "servicesGetStaffShifts",
2339
+ "servicesAddBreak",
2340
+ "servicesRegisterCustomerApp",
2341
+ "servicesGetUtilization",
2342
+ "servicesGetPerformance",
2343
+ "servicesGetFunnel",
2344
+ "customersProvisionZitadel",
2345
+ "customersGetCustomers",
2346
+ "customersRegister",
2347
+ "customersUpdate",
2348
+ "customersGetCustomerById",
2349
+ "customersDelete",
2350
+ "customersGetAddresses",
2351
+ "customersAddAddress",
2352
+ "customersGetCurrentSession",
2353
+ "businessAccountControllerCreate",
2354
+ "businessAccountControllerGetOne",
2355
+ "crmControllerCreateRecord",
2356
+ "crmControllerGetRecord",
2357
+ "crmControllerUpdateRecord",
2358
+ "crmControllerCreateNote",
2359
+ "crmControllerGetRecordNotes",
2360
+ "crmControllerCreateActivity",
2361
+ "crmControllerGetTimeline",
2362
+ "crmControllerCreateObject",
2363
+ "crmControllerListObjects",
2364
+ "crmControllerCreateField",
2365
+ "crmControllerListFields",
2366
+ "crmControllerCreateRelationship",
2367
+ "crmControllerListRelationships",
2368
+ "crmControllerCreateAssociation",
2369
+ "crmControllerListRecordAssociations",
2370
+ "loyaltyRedeemReward",
2371
+ "loyaltyGetCustomerStatus",
2372
+ "loyaltyValidateVoucher",
2373
+ "ordersCreateOrder",
2374
+ "ordersGetOrders",
2375
+ "ordersUpdateStatus",
2376
+ "ordersRequestB2BQuote",
2377
+ "ordersConvertQuoteToOrder",
2378
+ "paymentsControllerHandleStkCallback",
2379
+ "pOSProvision",
2380
+ "pOSLogin",
2381
+ "pOSGetMe",
2382
+ "pOSProcessSale",
2383
+ "pOSSync",
2384
+ "pOSGetTransactions",
2385
+ "pOSRegisterPettyCash",
2386
+ "pOSGetPettyCashFunds",
2387
+ "pOSGetPettyCashTransactions",
2388
+ "membersControllerGetMembers",
2389
+ "membersControllerCreateMember",
2390
+ "membersControllerGetMember",
2391
+ "membersControllerUpdateMember",
2392
+ "membersControllerDeleteMember",
2393
+ "membersControllerGetMemberActivity",
2394
+ "membersControllerUpdateStatus",
2395
+ "membersControllerAdminCheckOut",
2396
+ "invitationsList",
2397
+ "invitationsCreate",
2398
+ "invitationsRevoke",
2399
+ "invitationsAccept",
2400
+ "roleManagementControllerGetCustomRoles",
2401
+ "roleManagementControllerCreateCustomRole",
2402
+ "roleManagementControllerUpdateCustomRole",
2403
+ "roleManagementControllerDeleteCustomRole",
2404
+ "roleManagementControllerGetPermissionSets",
2405
+ "roleManagementControllerCreatePermissionSet",
2406
+ "roleManagementControllerGetRoleGroups",
2407
+ "roleManagementControllerCreateRoleGroup",
2408
+ "roleManagementControllerAssignRoles",
2409
+ "roleManagementControllerRemoveRoles",
2410
+ "departmentsList",
2411
+ "cartControllerGetCart",
2412
+ "cartControllerClearCart",
2413
+ "cartControllerAddToCart",
2414
+ "cartControllerRemoveFromCart",
2415
+ "favoritesControllerGetFavorites",
2416
+ "favoritesControllerAddFavorite",
2417
+ "favoritesControllerRemoveFavorite"
2418
+ ]);
2419
+ var catalogMapping = {
2420
+ getProducts: "catalogGetProducts",
2421
+ createProduct: "catalogCreateProduct",
2422
+ getServices: "catalogGetServices",
2423
+ updateProduct: "catalogUpdateProduct",
2424
+ updateSupplierVariant: "catalogUpdateSupplierVariant",
2425
+ getPriceChangeRequests: "catalogGetPriceChangeRequests",
2426
+ reviewPriceChangeRequest: "catalogReviewPriceChangeRequest",
2427
+ createServiceCategory: "servicesCreateCategory",
2428
+ getServiceCategories: "servicesGetCategories",
2429
+ updateServiceCategory: "servicesUpdateCategory",
2430
+ deleteServiceCategory: "servicesDeleteCategory",
2431
+ createService: "servicesCreateService",
2432
+ getServicesList: "servicesGetServices",
2433
+ getCurrentMemberShifts: "servicesGetCurrentMemberShifts",
2434
+ getShifts: "servicesGetShifts",
2435
+ getService: "servicesGetService",
2436
+ updateService: "servicesUpdateService",
2437
+ deleteService: "servicesDeleteService",
2438
+ createResource: "servicesCreateResource",
2439
+ getResources: "servicesGetResources",
2440
+ updateResource: "servicesUpdateResource",
2441
+ deleteResource: "servicesDeleteResource",
2442
+ createBooking: "servicesCreateBooking",
2443
+ getBookings: "servicesGetBookings",
2444
+ getBooking: "servicesGetBooking",
2445
+ updateBookingStatus: "servicesUpdateBookingStatus",
2446
+ completeBooking: "servicesCompleteBooking",
2447
+ createShift: "servicesCreateShift",
2448
+ getStaffShifts: "servicesGetStaffShifts",
2449
+ addBreak: "servicesAddBreak",
2450
+ registerCustomerApp: "servicesRegisterCustomerApp",
2451
+ getServiceUtilization: "servicesGetUtilization",
2452
+ getServicePerformance: "servicesGetPerformance",
2453
+ getServiceFunnel: "servicesGetFunnel"
2454
+ };
2455
+ var authMapping = {
2456
+ exchangeToken: "authExchangeToken",
2457
+ handleOAuth2: "authControllerHandleOAuth2"
2458
+ };
2459
+ var inventoryMapping = {
2460
+ verifyIntegrity: "inventoryVerifyIntegrity",
2461
+ fixIntegrity: "inventoryFixIntegrity",
2462
+ getInventory: "inventoryGetInventory",
2463
+ traceBatch: "inventoryTraceBatch",
2464
+ splitBatch: "inventorySplitBatch",
2465
+ mergeBatches: "inventoryMergeBatches",
2466
+ createAssembly: "inventoryCreateAssembly",
2467
+ completeAssembly: "inventoryCompleteAssembly",
2468
+ requestAdjustment: "inventoryRequestAdjustment",
2469
+ getAdjustments: "inventoryGetAdjustments",
2470
+ approveAdjustment: "inventoryApproveAdjustment",
2471
+ rejectAdjustment: "inventoryRejectAdjustment",
2472
+ getLeadTime: "inventoryGetLeadTime",
2473
+ getWasteAnalysis: "inventoryGetWasteAnalysis",
2474
+ checkB2BAvailability: "inventoryCheckB2BAvailability",
2475
+ unpackBatch: "inventoryUnpackBatch",
2476
+ scanUnpackBatch: "inventoryScanUnpackBatch",
2477
+ quickStockInquiry: "inventoryQuickStockInquiry",
2478
+ getPurchases: "stockingGetPurchases",
2479
+ createPurchase: "stockingCreatePurchase",
2480
+ receivePurchase: "stockingReceivePurchase",
2481
+ getTransfers: "stockingGetTransfers",
2482
+ createTransfer: "stockingCreateTransfer",
2483
+ shipTransfer: "stockingShipTransfer",
2484
+ receiveTransfer: "stockingReceiveTransfer",
2485
+ getRequests: "stockingGetRequests",
2486
+ getPendingDispatch: "stockingGetPendingDispatch",
2487
+ dispatchOrders: "stockingDispatchOrders",
2488
+ getActiveDeliveries: "stockingGetActiveDeliveries",
2489
+ reconcilePod: "stockingReconcilePod",
2490
+ getPhysicalReconciliations: "stockingGetPhysicalReconciliations",
2491
+ submitPhysicalReconciliation: "stockingSubmitPhysicalReconciliation",
2492
+ getReconciliationReport: "stockingGetReconciliationReport",
2493
+ getPartners: "stockingGetPartners",
2494
+ createPartner: "stockingCreatePartner",
2495
+ getPartner: "stockingGetPartner",
2496
+ updatePartner: "stockingUpdatePartner",
2497
+ adjustPartnerWallet: "stockingAdjustPartnerWallet",
2498
+ getUnits: "unitsGetUnits"
2499
+ };
2500
+ var ordersMapping = {
2501
+ createOrder: "ordersCreateOrder",
2502
+ getOrders: "ordersGetOrders",
2503
+ updateStatus: "ordersUpdateStatus",
2504
+ requestB2BQuote: "ordersRequestB2BQuote",
2505
+ convertQuoteToOrder: "ordersConvertQuoteToOrder",
2506
+ getB2BCatalog: "b2BGetCatalog",
2507
+ getB2BInvoices: "b2BGetInvoices",
2508
+ getB2BOrders: "b2BGetOrders",
2509
+ createB2BOrder: "b2BCreateOrder",
2510
+ createB2BQuote: "b2BCreateQuote",
2511
+ getCart: "cartControllerGetCart",
2512
+ clearCart: "cartControllerClearCart",
2513
+ addToCart: "cartControllerAddToCart",
2514
+ removeFromCart: "cartControllerRemoveFromCart",
2515
+ handleStkCallback: "paymentsControllerHandleStkCallback"
2516
+ };
2517
+ var crmMapping = {
2518
+ createRecord: "crmControllerCreateRecord",
2519
+ getRecord: "crmControllerGetRecord",
2520
+ updateRecord: "crmControllerUpdateRecord",
2521
+ createNote: "crmControllerCreateNote",
2522
+ getRecordNotes: "crmControllerGetRecordNotes",
2523
+ createActivity: "crmControllerCreateActivity",
2524
+ getTimeline: "crmControllerGetTimeline",
2525
+ createObject: "crmControllerCreateObject",
2526
+ listObjects: "crmControllerListObjects",
2527
+ createField: "crmControllerCreateField",
2528
+ listFields: "crmControllerListFields",
2529
+ createRelationship: "crmControllerCreateRelationship",
2530
+ listRelationships: "crmControllerListRelationships",
2531
+ createAssociation: "crmControllerCreateAssociation",
2532
+ listRecordAssociations: "crmControllerListRecordAssociations",
2533
+ getIntegrationsAuthUrl: "crmIntegrationsGetAuthUrl",
2534
+ handleIntegrationsCallback: "crmIntegrationsHandleCallback",
2535
+ handleIntegrationsWebhook: "crmIntegrationsHandleWebhook",
2536
+ replyToIntegrationsActivity: "crmIntegrationsReplyToActivity",
2537
+ createStrapiConnection: "strapiCreateConnection",
2538
+ listStrapiConnections: "strapiListConnections",
2539
+ getStrapiConnection: "strapiGetConnection",
2540
+ updateStrapiConnection: "strapiUpdateConnection",
2541
+ deleteStrapiConnection: "strapiDeleteConnection",
2542
+ triggerStrapiSync: "strapiTriggerSync",
2543
+ enqueueStrapiSync: "strapiEnqueueSync",
2544
+ getStrapiWebhookLogs: "strapiGetWebhookLogs",
2545
+ getStrapiSyncLogs: "strapiGetSyncLogs",
2546
+ exchangeStrapiCustomerToken: "strapiExchangeCustomerToken",
2547
+ registerStrapiCustomer: "strapiRegisterCustomer",
2548
+ receiveStrapiWebhook: "strapiReceiveWebhook"
2549
+ };
2550
+ var posMapping = {
2551
+ provision: "pOSProvision",
2552
+ login: "pOSLogin",
2553
+ getMe: "pOSGetMe",
2554
+ processSale: "pOSProcessSale",
2555
+ sync: "pOSSync",
2556
+ getTransactions: "pOSGetTransactions",
2557
+ registerPettyCash: "pOSRegisterPettyCash",
2558
+ getPettyCashFunds: "pOSGetPettyCashFunds",
2559
+ getPettyCashTransactions: "pOSGetPettyCashTransactions",
2560
+ createSetupKey: "standalonePosControllerCreateSetupKey",
2561
+ activateDevice: "standalonePosControllerActivateDevice",
2562
+ validateKey: "standalonePosControllerValidateKey",
2563
+ linkOrganization: "standalonePosControllerLinkOrganization"
2564
+ };
2565
+ var accountingMapping = {
2566
+ createExpense: "expenseControllerCreateExpense",
2567
+ getExpenses: "expenseControllerGetExpenses",
2568
+ getExpenseCategories: "expenseControllerGetExpenseCategories",
2569
+ getExpense: "expenseControllerGetExpense",
2570
+ createPettyCashFund: "pettyCashControllerCreateFund",
2571
+ getPettyCashFunds: "pettyCashControllerGetFunds",
2572
+ getPettyCashFund: "pettyCashControllerGetFund",
2573
+ topUpPettyCashFund: "pettyCashControllerTopUpFund",
2574
+ getPettyCashFundTransactions: "pettyCashControllerGetFundTransactions",
2575
+ createUtilityAccount: "utilityAccountControllerCreateAccount",
2576
+ getUtilityAccounts: "utilityAccountControllerGetAccounts",
2577
+ getUtilityAccount: "utilityAccountControllerGetAccount",
2578
+ initialize: "accountingInitialize",
2579
+ getProfitLoss: "accountingGetProfitLoss",
2580
+ getBalanceSheet: "accountingGetBalanceSheet",
2581
+ getCashFlow: "accountingGetCashFlow",
2582
+ getTaxSummary: "accountingGetTaxSummary",
2583
+ createInvoice: "invoiceControllerCreateInvoice",
2584
+ getInvoices: "invoiceControllerGetInvoices",
2585
+ getInvoice: "invoiceControllerGetInvoice",
2586
+ updateInvoice: "invoiceControllerUpdateInvoice",
2587
+ deleteInvoice: "invoiceControllerDeleteInvoice",
2588
+ finalizeInvoice: "invoiceControllerFinalizeInvoice",
2589
+ getTemplates: "invoiceControllerGetTemplates",
2590
+ createTemplate: "invoiceControllerCreateTemplate",
2591
+ getInvoiceConfig: "invoiceControllerGetConfig",
2592
+ updateInvoiceConfig: "invoiceControllerUpdateConfig",
2593
+ downloadInvoice: "publicInvoiceControllerDownloadInvoice",
2594
+ downloadInvoiceByTransaction: "publicInvoiceControllerDownloadInvoiceByTransaction",
2595
+ downloadReceipt: "publicInvoiceControllerDownloadReceipt",
2596
+ generatePublicLink: "publicInvoiceControllerGeneratePublicLink"
2597
+ };
2598
+ var loyaltyMapping = {
2599
+ redeemReward: "loyaltyRedeemReward",
2600
+ getCustomerStatus: "loyaltyGetCustomerStatus",
2601
+ validateVoucher: "loyaltyValidateVoucher",
2602
+ getFavorites: "favoritesControllerGetFavorites",
2603
+ addFavorite: "favoritesControllerAddFavorite",
2604
+ removeFavorite: "favoritesControllerRemoveFavorite"
2605
+ };
2606
+ var membersMapping = {
2607
+ getMembers: "membersControllerGetMembers",
2608
+ createMember: "membersControllerCreateMember",
2609
+ getMember: "membersControllerGetMember",
2610
+ updateMember: "membersControllerUpdateMember",
2611
+ deleteMember: "membersControllerDeleteMember",
2612
+ getMemberActivity: "membersControllerGetMemberActivity",
2613
+ updateStatus: "membersControllerUpdateStatus",
2614
+ adminCheckOut: "membersControllerAdminCheckOut",
2615
+ terminalLogin: "terminalMembersControllerLogin",
2616
+ listInvitations: "invitationsList",
2617
+ createInvitation: "invitationsCreate",
2618
+ revokeInvitation: "invitationsRevoke",
2619
+ acceptInvitation: "invitationsAccept",
2620
+ getCustomRoles: "roleManagementControllerGetCustomRoles",
2621
+ createCustomRole: "roleManagementControllerCreateCustomRole",
2622
+ updateCustomRole: "roleManagementControllerUpdateCustomRole",
2623
+ deleteCustomRole: "roleManagementControllerDeleteCustomRole",
2624
+ getPermissionSets: "roleManagementControllerGetPermissionSets",
2625
+ createPermissionSet: "roleManagementControllerCreatePermissionSet",
2626
+ getRoleGroups: "roleManagementControllerGetRoleGroups",
2627
+ createRoleGroup: "roleManagementControllerCreateRoleGroup",
2628
+ assignRoles: "roleManagementControllerAssignRoles",
2629
+ removeRoles: "roleManagementControllerRemoveRoles",
2630
+ listDepartments: "departmentsList",
2631
+ createDepartment: "departmentsCreate",
2632
+ getDepartment: "departmentsGet",
2633
+ updateDepartment: "departmentsUpdate",
2634
+ deleteDepartment: "departmentsDelete",
2635
+ addDepartmentMember: "departmentsAddMember",
2636
+ removeDepartmentMember: "departmentsRemoveMember",
2637
+ getAttendanceLogs: "attendanceControllerGetLogs",
2638
+ checkIn: "attendanceControllerCheckIn",
2639
+ checkOut: "attendanceControllerCheckOut",
2640
+ getMyAttendanceStatus: "attendanceControllerGetMyStatus",
2641
+ getAttendanceStatus: "attendanceControllerGetStatus",
2642
+ broadcastAnnouncement: "announcementControllerBroadcastAnnouncement"
2643
+ };
2644
+ var publicServicesMapping = {
2645
+ listServices: "publicServicesListServices",
2646
+ getCategories: "publicServicesGetCategories",
2647
+ getService: "publicServicesGetService",
2648
+ getAvailability: "publicServicesGetAvailability",
2649
+ requestOtp: "publicServicesRequestOtp",
2650
+ verifyOtp: "publicServicesVerifyOtp",
2651
+ createBooking: "publicServicesCreatePublicBooking"
2652
+ };
2653
+ var servicesMapping = {
2654
+ ...publicServicesMapping,
2655
+ // Admin / Staff scheduling endpoints
2656
+ createCategory: "servicesCreateCategory",
2657
+ getCategoriesAdmin: "servicesGetCategories",
2658
+ updateCategory: "servicesUpdateCategory",
2659
+ deleteCategory: "servicesDeleteCategory",
2660
+ createService: "servicesCreateService",
2661
+ getServicesAdmin: "servicesGetServices",
2662
+ getCurrentMemberShifts: "servicesGetCurrentMemberShifts",
2663
+ getShifts: "servicesGetShifts",
2664
+ getServiceAdmin: "servicesGetService",
2665
+ updateService: "servicesUpdateService",
2666
+ deleteService: "servicesDeleteService",
2667
+ createResource: "servicesCreateResource",
2668
+ getResources: "servicesGetResources",
2669
+ updateResource: "servicesUpdateResource",
2670
+ deleteResource: "servicesDeleteResource",
2671
+ createBookingAdmin: "servicesCreateBooking",
2672
+ getBookings: "servicesGetBookings",
2673
+ getBookingAdmin: "servicesGetBooking",
2674
+ updateBookingStatus: "servicesUpdateBookingStatus",
2675
+ completeBooking: "servicesCompleteBooking",
2676
+ createShift: "servicesCreateShift",
2677
+ getStaffShifts: "servicesGetStaffShifts",
2678
+ addBreak: "servicesAddBreak",
2679
+ registerCustomerApp: "servicesRegisterCustomerApp",
2680
+ getServiceUtilization: "servicesGetUtilization",
2681
+ getServicePerformance: "servicesGetPerformance",
2682
+ getServiceFunnel: "servicesGetFunnel"
2683
+ };
2684
+ var adminMapping = {
2685
+ getStats: "adminControllerGetStats",
2686
+ listOrganizations: "adminControllerListOrganizations",
2687
+ createOrganization: "adminControllerCreateOrganization",
2688
+ getOrganizationDetails: "adminControllerGetOrganizationDetails",
2689
+ updateOrganization: "adminControllerUpdateOrganization",
2690
+ deleteOrganization: "adminControllerDeleteOrganization",
2691
+ listMembers: "adminControllerListMembers",
2692
+ listUsers: "adminControllerListUsers",
2693
+ banUser: "adminControllerBanUser",
2694
+ unbanUser: "adminControllerUnbanUser",
2695
+ listConnectedApps: "adminControllerListConnectedApps",
2696
+ listSystemLogs: "adminControllerListSystemLogs",
2697
+ listGlobalSettings: "adminControllerListGlobalSettings",
2698
+ setGlobalSetting: "adminControllerSetGlobalSetting",
2699
+ deleteGlobalSetting: "adminControllerDeleteGlobalSetting",
2700
+ listTiers: "adminControllerListTiers",
2701
+ defineTier: "adminControllerDefineTier",
2702
+ deleteTier: "adminControllerDeleteTier",
2703
+ getOrganizationSubscription: "adminControllerGetOrganizationSubscription",
2704
+ updateOrganizationSubscription: "adminControllerUpdateOrganizationSubscription",
2705
+ listSystemPayments: "adminControllerListSystemPayments",
2706
+ recordCustomPayment: "adminControllerRecordCustomPayment",
2707
+ listIntegrationDefinitions: "adminControllerListIntegrationDefinitions",
2708
+ createIntegrationDefinition: "adminControllerCreateIntegrationDefinition",
2709
+ updateIntegrationDefinition: "adminControllerUpdateIntegrationDefinition",
2710
+ deleteIntegrationDefinition: "adminControllerDeleteIntegrationDefinition",
2711
+ listActiveOrganizationIntegrations: "adminControllerListActiveOrganizationIntegrations",
2712
+ createWebhook: "webhooksCreate",
2713
+ listWebhooks: "webhooksList",
2714
+ deleteWebhook: "webhooksDelete",
2715
+ handleWindmillCallback: "windmillCallbackControllerHandleCallback",
2716
+ handleWindmillApprovalCallback: "windmillCallbackControllerHandleApprovalCallback",
2717
+ handleWindmillBakeryDisposalCallback: "windmillCallbackControllerHandleBakeryDisposalCallback",
2718
+ handleWindmillOutcomeCallback: "windmillCallbackControllerHandleOutcomeCallback",
2719
+ provisionZitadel: "customersProvisionZitadel",
2720
+ getCustomers: "customersGetCustomers",
2721
+ registerCustomer: "customersRegister",
2722
+ updateCustomer: "customersUpdate",
2723
+ getCustomerById: "customersGetCustomerById",
2724
+ deleteCustomer: "customersDelete",
2725
+ getCustomerAddresses: "customersGetAddresses",
2726
+ addCustomerAddress: "customersAddAddress",
2727
+ createBusinessAccount: "businessAccountControllerCreate",
2728
+ getBusinessAccount: "businessAccountControllerGetOne",
2729
+ getDashboardAnalytics: "analyticsControllerGetDashboardAnalytics",
2730
+ getResourceUtilization: "analyticsControllerGetResourceUtilization"
2731
+ };
2732
+ function buildModule(api, orgSlug, mapping) {
2733
+ const result = {};
2734
+ for (const [key, rawMethodName] of Object.entries(mapping)) {
2735
+ const rawFn = api[rawMethodName];
2736
+ if (typeof rawFn === "function") {
2737
+ if (methodsWithOrgSlugSet.has(rawMethodName)) {
2738
+ result[key] = function(...args) {
2739
+ return rawFn.apply(this, [orgSlug, ...args]);
2740
+ };
2741
+ } else {
2742
+ result[key] = function(...args) {
2743
+ return rawFn.apply(this, args);
2744
+ };
2745
+ }
2746
+ }
2747
+ }
2748
+ return result;
2749
+ }
2750
+ function getJwtExpiry(token) {
2751
+ try {
2752
+ const parts = token.split(".");
2753
+ if (parts.length !== 3) return null;
2754
+ let payloadStr = "";
2755
+ if (typeof Buffer !== "undefined") {
2756
+ payloadStr = Buffer.from(parts[1], "base64").toString("utf-8");
2757
+ } else if (typeof window !== "undefined" && typeof window.atob === "function") {
2758
+ payloadStr = window.atob(parts[1]);
2759
+ } else {
2760
+ payloadStr = atob(parts[1]);
2761
+ }
2762
+ const payload = JSON.parse(payloadStr);
2763
+ if (payload && typeof payload.exp === "number") {
2764
+ return payload.exp * 1e3;
2765
+ }
2766
+ } catch (e) {
2767
+ }
2768
+ return null;
2769
+ }
2770
+
2771
+ // src/client.tsx
2772
+ import { createContext, useContext, useEffect, useState } from "react";
2773
+ import axios2 from "axios";
2774
+ import { jsx } from "react/jsx-runtime";
2775
+ var InMemoryStorage = class {
2776
+ constructor() {
2777
+ this.cache = /* @__PURE__ */ new Map();
2778
+ }
2779
+ getItem(key) {
2780
+ return this.cache.get(key) || null;
2781
+ }
2782
+ setItem(key, value) {
2783
+ this.cache.set(key, value);
2784
+ }
2785
+ removeItem(key) {
2786
+ this.cache.delete(key);
2787
+ }
2788
+ };
2789
+ var SCRYME_SESSION_TOKEN_KEY = "scryme_session_token";
2790
+ var SCRYME_USER_KEY = "scryme_user";
2791
+ var SCRYME_EXPIRES_AT_KEY = "scryme_expires_at";
2792
+ var ScrymeClientSDK = class {
2793
+ constructor(config) {
2794
+ if (!config || !config.clientId || !config.orgSlug) {
2795
+ throw new Error(
2796
+ "clientId and orgSlug are required to initialize the SDK."
2797
+ );
2798
+ }
2799
+ let finalBaseURL = config.baseURL || "https://api.scryme.tech";
2800
+ if (finalBaseURL && !finalBaseURL.includes("/api") && !finalBaseURL.endsWith("/api")) {
2801
+ finalBaseURL = finalBaseURL.replace(/\/$/, "") + "/api";
2802
+ }
2803
+ this.axiosInstance = axios2.create({
2804
+ baseURL: finalBaseURL
2805
+ });
2806
+ let storage;
2807
+ if (config.storage) {
2808
+ storage = config.storage;
2809
+ } else if (typeof window !== "undefined" && window.localStorage) {
2810
+ storage = {
2811
+ getItem: (key) => window.localStorage.getItem(key),
2812
+ setItem: (key, value) => window.localStorage.setItem(key, value),
2813
+ removeItem: (key) => window.localStorage.removeItem(key)
2814
+ };
2815
+ } else {
2816
+ storage = new InMemoryStorage();
2817
+ }
2818
+ const state = {
2819
+ token: null,
2820
+ user: null
2821
+ };
2822
+ const listeners = /* @__PURE__ */ new Set();
2823
+ const notify = (event) => {
2824
+ const currentState = { ...state };
2825
+ listeners.forEach((listener) => {
2826
+ try {
2827
+ listener(event, currentState);
2828
+ } catch (e) {
2829
+ console.error("Error in auth state listener:", e);
2830
+ }
2831
+ });
2832
+ };
2833
+ const initPromise = (async () => {
2834
+ try {
2835
+ const storedToken = await storage.getItem(SCRYME_SESSION_TOKEN_KEY);
2836
+ const storedUser = await storage.getItem(SCRYME_USER_KEY);
2837
+ const storedExpiresAt = await storage.getItem(SCRYME_EXPIRES_AT_KEY);
2838
+ if (storedToken) {
2839
+ state.token = storedToken;
2840
+ if (storedExpiresAt) {
2841
+ state.expiresAt = Number(storedExpiresAt);
2842
+ } else {
2843
+ const jwtExp = getJwtExpiry(storedToken);
2844
+ if (jwtExp) {
2845
+ state.expiresAt = jwtExp;
2846
+ } else {
2847
+ delete state.expiresAt;
2848
+ }
2849
+ }
2850
+ if (storedUser) {
2851
+ try {
2852
+ state.user = JSON.parse(storedUser);
2853
+ } catch {
2854
+ state.user = null;
2855
+ }
2856
+ }
2857
+ notify("INITIAL_SESSION");
2858
+ }
2859
+ } catch (e) {
2860
+ console.error("Failed to initialize Scryme Client SDK session:", e);
2861
+ }
2862
+ })();
2863
+ let activeAuthPromise = null;
2864
+ const performExchange = async () => {
2865
+ if (activeAuthPromise) {
2866
+ return activeAuthPromise;
2867
+ }
2868
+ activeAuthPromise = (async () => {
2869
+ try {
2870
+ const response = await this.api.authExchangeToken({
2871
+ clientId: config.clientId,
2872
+ clientSecret: config.clientSecret || ""
2873
+ });
2874
+ const tokenData = response.data?.data;
2875
+ const accessToken = tokenData?.access_token;
2876
+ const expiresIn = tokenData?.expires_in;
2877
+ if (accessToken) {
2878
+ state.token = accessToken;
2879
+ if (expiresIn) {
2880
+ state.expiresAt = Date.now() + expiresIn * 1e3;
2881
+ await storage.setItem(
2882
+ SCRYME_EXPIRES_AT_KEY,
2883
+ String(state.expiresAt)
2884
+ );
2885
+ } else {
2886
+ const jwtExp = getJwtExpiry(accessToken);
2887
+ if (jwtExp) {
2888
+ state.expiresAt = jwtExp;
2889
+ await storage.setItem(SCRYME_EXPIRES_AT_KEY, String(jwtExp));
2890
+ } else {
2891
+ delete state.expiresAt;
2892
+ }
2893
+ }
2894
+ await storage.setItem(SCRYME_SESSION_TOKEN_KEY, accessToken);
2895
+ notify("SIGNED_IN");
2896
+ }
2897
+ return response.data;
2898
+ } finally {
2899
+ activeAuthPromise = null;
2900
+ }
2901
+ })();
2902
+ return activeAuthPromise;
2903
+ };
2904
+ this.axiosInstance.interceptors.request.use(async (req) => {
2905
+ await initPromise;
2906
+ 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"));
2907
+ if (!isAuthTokenRequest) {
2908
+ const isExpired = !state.token || state.expiresAt && Date.now() >= (state.expiresAt || 0) - 3e4;
2909
+ if (isExpired) {
2910
+ if (state.token) {
2911
+ try {
2912
+ await this.auth.refreshSession();
2913
+ } catch (e) {
2914
+ console.error(
2915
+ "Proactive customer session refresh failed in request interceptor:",
2916
+ e
2917
+ );
2918
+ }
2919
+ } else if (config.clientId && config.clientSecret) {
2920
+ try {
2921
+ await performExchange();
2922
+ } catch (e) {
2923
+ console.error(
2924
+ "Auto-authentication failed in request interceptor:",
2925
+ e
2926
+ );
2927
+ }
2928
+ }
2929
+ }
2930
+ }
2931
+ if (state.token) {
2932
+ req.headers["Authorization"] = `Bearer ${state.token}`;
2933
+ }
2934
+ return req;
2935
+ });
2936
+ this.axiosInstance.interceptors.response.use(
2937
+ (response) => response,
2938
+ async (error) => {
2939
+ const originalRequest = error.config;
2940
+ 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"));
2941
+ if (error.response && error.response.status === 401 && originalRequest && !originalRequest._retry && !isAuthTokenRequest) {
2942
+ originalRequest._retry = true;
2943
+ try {
2944
+ if (state.token) {
2945
+ await this.auth.refreshSession();
2946
+ if (state.token) {
2947
+ originalRequest.headers["Authorization"] = `Bearer ${state.token}`;
2948
+ }
2949
+ return this.axiosInstance(originalRequest);
2950
+ } else if (config.clientId && config.clientSecret) {
2951
+ await performExchange();
2952
+ if (state.token) {
2953
+ originalRequest.headers["Authorization"] = `Bearer ${state.token}`;
2954
+ }
2955
+ return this.axiosInstance(originalRequest);
2956
+ }
2957
+ } catch (e) {
2958
+ return Promise.reject(error);
2959
+ }
2960
+ }
2961
+ return Promise.reject(error);
2962
+ }
2963
+ );
2964
+ this.api = getScrymeV3API2(this.axiosInstance, config.orgSlug);
2965
+ this.catalog = buildModule(this.api, config.orgSlug, catalogMapping);
2966
+ this.inventory = buildModule(this.api, config.orgSlug, inventoryMapping);
2967
+ this.orders = buildModule(this.api, config.orgSlug, ordersMapping);
2968
+ this.crm = buildModule(this.api, config.orgSlug, crmMapping);
2969
+ this.pos = buildModule(this.api, config.orgSlug, posMapping);
2970
+ this.accounting = buildModule(this.api, config.orgSlug, accountingMapping);
2971
+ this.loyalty = buildModule(this.api, config.orgSlug, loyaltyMapping);
2972
+ this.members = buildModule(this.api, config.orgSlug, membersMapping);
2973
+ this.admin = buildModule(this.api, config.orgSlug, adminMapping);
2974
+ this.cart = {
2975
+ get: async (params) => {
2976
+ return this.orders.getCart(params || {});
2977
+ },
2978
+ add: async (dto) => {
2979
+ return this.orders.addToCart(dto);
2980
+ },
2981
+ remove: async (dto) => {
2982
+ return this.orders.removeFromCart(dto);
2983
+ },
2984
+ clear: async (params) => {
2985
+ return this.orders.clearCart(params || {});
2986
+ },
2987
+ update: async (dto) => {
2988
+ const response = await this.orders.getCart({
2989
+ sessionId: dto.sessionId
2990
+ });
2991
+ const data = response.data;
2992
+ const items = data?.data?.items || data?.items || [];
2993
+ let existingItem = null;
2994
+ if (dto.productId) {
2995
+ existingItem = items.find(
2996
+ (item) => item.productId === dto.productId && (item.variantId || null) === (dto.variantId || null)
2997
+ );
2998
+ } else if (dto.serviceId) {
2999
+ existingItem = items.find(
3000
+ (item) => item.serviceId === dto.serviceId
3001
+ );
3002
+ }
3003
+ if (existingItem) {
3004
+ const currentQty = existingItem.quantity || 0;
3005
+ if (dto.quantity <= 0) {
3006
+ return this.orders.removeFromCart({
3007
+ productId: dto.productId,
3008
+ variantId: dto.variantId,
3009
+ serviceId: dto.serviceId,
3010
+ sessionId: dto.sessionId,
3011
+ customerId: dto.customerId
3012
+ });
3013
+ } else {
3014
+ const diff = dto.quantity - currentQty;
3015
+ if (diff !== 0) {
3016
+ return this.orders.addToCart({
3017
+ ...dto,
3018
+ quantity: diff
3019
+ });
3020
+ }
3021
+ return response;
3022
+ }
3023
+ } else {
3024
+ if (dto.quantity > 0) {
3025
+ return this.orders.addToCart(dto);
3026
+ }
3027
+ }
3028
+ },
3029
+ getItems: async (params) => {
3030
+ const res = await this.orders.getCart(params || {});
3031
+ const data = res?.data || res;
3032
+ return data?.items || data?.data?.items || [];
3033
+ },
3034
+ getTotals: async (params) => {
3035
+ const res = await this.orders.getCart(params || {});
3036
+ const data = res?.data || res;
3037
+ const items = data?.items || data?.data?.items || [];
3038
+ const itemsCount = items.reduce(
3039
+ (sum, item) => sum + (item.quantity || 0),
3040
+ 0
3041
+ );
3042
+ return {
3043
+ itemsCount,
3044
+ items,
3045
+ raw: data
3046
+ };
3047
+ },
3048
+ mergeGuestCart: async (guestSessionId, customerId) => {
3049
+ return this.orders.getCart({ sessionId: guestSessionId });
3050
+ },
3051
+ checkout: async (params) => {
3052
+ const session = await this.auth.getSession();
3053
+ const user = session.user;
3054
+ const customerId = user?.customerId || user?.id || user?.customer?.id;
3055
+ if (!customerId)
3056
+ throw new Error("No authenticated customer found for checkout.");
3057
+ const items = await this.cart.getItems();
3058
+ if (!items || items.length === 0) {
3059
+ throw new Error("Cannot checkout an empty cart.");
3060
+ }
3061
+ const orderItems = items.map((item) => ({
3062
+ variantId: item.variantId || "",
3063
+ quantity: item.quantity,
3064
+ unitPrice: item.unitPrice
3065
+ }));
3066
+ const orderResponse = await this.orders.createOrder({
3067
+ customerId,
3068
+ locationId: params.locationId,
3069
+ items: orderItems,
3070
+ notes: params.notes,
3071
+ channel: params.channel
3072
+ });
3073
+ await this.cart.clear();
3074
+ return orderResponse?.data || orderResponse;
3075
+ }
3076
+ };
3077
+ this.customer = {
3078
+ getProfile: async () => {
3079
+ return this.auth.getCurrentSession();
3080
+ },
3081
+ updateProfile: async (dto) => {
3082
+ const session = await this.auth.getSession();
3083
+ const user = session.user;
3084
+ const customerId = user?.customerId || user?.id || user?.customer?.id;
3085
+ if (!customerId) throw new Error("No authenticated customer found.");
3086
+ return this.admin.updateCustomer(customerId, dto);
3087
+ },
3088
+ getAddresses: async () => {
3089
+ const session = await this.auth.getSession();
3090
+ const user = session.user;
3091
+ const customerId = user?.customerId || user?.id || user?.customer?.id;
3092
+ if (!customerId) throw new Error("No authenticated customer found.");
3093
+ return this.admin.getCustomerAddresses(customerId);
3094
+ },
3095
+ addAddress: async (dto) => {
3096
+ const session = await this.auth.getSession();
3097
+ const user = session.user;
3098
+ const customerId = user?.customerId || user?.id || user?.customer?.id;
3099
+ if (!customerId) throw new Error("No authenticated customer found.");
3100
+ return this.admin.addCustomerAddress(customerId, dto);
3101
+ }
3102
+ };
3103
+ this.bookings = {
3104
+ create: async (dto) => {
3105
+ return this.catalog.createBooking(dto);
3106
+ },
3107
+ get: async (id) => {
3108
+ return this.catalog.getBooking(id);
3109
+ },
3110
+ list: async () => {
3111
+ return this.catalog.getBookings();
3112
+ },
3113
+ cancel: async (id) => {
3114
+ return this.catalog.updateBookingStatus(id, "CANCELLED");
3115
+ }
3116
+ };
3117
+ const baseAuth = buildModule(this.api, config.orgSlug, authMapping);
3118
+ this.auth = {
3119
+ ...baseAuth,
3120
+ signUp: async (dto) => {
3121
+ return this.api.customersRegister(config.orgSlug, dto);
3122
+ },
3123
+ authenticate: async () => {
3124
+ return performExchange();
3125
+ },
3126
+ signIn: async (credentials) => {
3127
+ try {
3128
+ const authServiceUrl = process.env.CUSTOMER_AUTH_URL || `${this.axiosInstance.defaults.baseURL || "http://localhost:3002"}/api/customer-auth`;
3129
+ const postUrl = authServiceUrl.endsWith("/api/auth") ? `${authServiceUrl}/sign-in/email` : authServiceUrl.endsWith("/api/customer-auth") ? `${authServiceUrl}/sign-in/email` : `${authServiceUrl}/api/auth/sign-in/email`;
3130
+ const response2 = await axios2.post(postUrl, credentials);
3131
+ const data2 = response2.data;
3132
+ const token2 = data2?.session?.token || data2?.token || null;
3133
+ const user2 = data2?.user || null;
3134
+ if (token2) {
3135
+ state.token = token2;
3136
+ state.user = user2;
3137
+ const jwtExp = getJwtExpiry(token2);
3138
+ await storage.setItem(SCRYME_SESSION_TOKEN_KEY, token2);
3139
+ if (jwtExp) {
3140
+ state.expiresAt = jwtExp;
3141
+ await storage.setItem(
3142
+ SCRYME_EXPIRES_AT_KEY,
3143
+ String(state.expiresAt)
3144
+ );
3145
+ } else {
3146
+ delete state.expiresAt;
3147
+ await storage.removeItem(SCRYME_EXPIRES_AT_KEY);
3148
+ }
3149
+ if (user2) {
3150
+ await storage.setItem(SCRYME_USER_KEY, JSON.stringify(user2));
3151
+ }
3152
+ notify("SIGNED_IN");
3153
+ return data2;
3154
+ } else {
3155
+ throw new Error("No token returned");
3156
+ }
3157
+ } catch (e) {
3158
+ }
3159
+ const response = await this.axiosInstance.post(
3160
+ `/${config.orgSlug}/customers/auth/login`,
3161
+ credentials
3162
+ );
3163
+ const data = response.data?.data || response.data;
3164
+ const token = data?.token || null;
3165
+ const user = data?.session || null;
3166
+ if (token) {
3167
+ state.token = token;
3168
+ state.user = user;
3169
+ const jwtExp = getJwtExpiry(token);
3170
+ await storage.setItem(SCRYME_SESSION_TOKEN_KEY, token);
3171
+ if (jwtExp) {
3172
+ state.expiresAt = jwtExp;
3173
+ await storage.setItem(
3174
+ SCRYME_EXPIRES_AT_KEY,
3175
+ String(state.expiresAt)
3176
+ );
3177
+ } else {
3178
+ delete state.expiresAt;
3179
+ await storage.removeItem(SCRYME_EXPIRES_AT_KEY);
3180
+ }
3181
+ if (user) {
3182
+ await storage.setItem(SCRYME_USER_KEY, JSON.stringify(user));
3183
+ }
3184
+ notify("SIGNED_IN");
3185
+ }
3186
+ return data;
3187
+ },
3188
+ signOut: async () => {
3189
+ try {
3190
+ await this.axiosInstance.post("/auth/sign-out");
3191
+ } catch {
3192
+ }
3193
+ state.token = null;
3194
+ state.user = null;
3195
+ delete state.expiresAt;
3196
+ await storage.removeItem(SCRYME_SESSION_TOKEN_KEY);
3197
+ await storage.removeItem(SCRYME_USER_KEY);
3198
+ await storage.removeItem(SCRYME_EXPIRES_AT_KEY);
3199
+ notify("SIGNED_OUT");
3200
+ },
3201
+ getSession: async () => {
3202
+ await initPromise;
3203
+ return { ...state };
3204
+ },
3205
+ onAuthStateChange: (callback) => {
3206
+ listeners.add(callback);
3207
+ initPromise.then(() => {
3208
+ try {
3209
+ callback("INITIAL_SESSION", { ...state });
3210
+ } catch (e) {
3211
+ console.error("Error in immediate auth state listener call:", e);
3212
+ }
3213
+ });
3214
+ return {
3215
+ unsubscribe: () => {
3216
+ listeners.delete(callback);
3217
+ }
3218
+ };
3219
+ },
3220
+ getSessions: async () => {
3221
+ const res = await this.axiosInstance.get(
3222
+ `/${config.orgSlug}/customers/auth/sessions`
3223
+ );
3224
+ return res.data?.data || res.data;
3225
+ },
3226
+ revokeSession: async (id) => {
3227
+ const res = await this.axiosInstance.delete(
3228
+ `/${config.orgSlug}/customers/auth/sessions/${id}`
3229
+ );
3230
+ return res.data?.data || res.data;
3231
+ },
3232
+ revokeAllSessions: async (mode) => {
3233
+ const url = mode ? `/${config.orgSlug}/customers/auth/sessions?mode=${mode}` : `/${config.orgSlug}/customers/auth/sessions`;
3234
+ const res = await this.axiosInstance.delete(url);
3235
+ return res.data?.data || res.data;
3236
+ },
3237
+ getCurrentSession: async () => {
3238
+ const res = await this.axiosInstance.get(
3239
+ `/${config.orgSlug}/customers/auth/session`
3240
+ );
3241
+ return res.data?.data || res.data;
3242
+ },
3243
+ refreshSession: async () => {
3244
+ const response = await this.axiosInstance.post(
3245
+ `/${config.orgSlug}/customers/auth/refresh`
3246
+ );
3247
+ const data = response.data?.data || response.data;
3248
+ const token = data?.token || null;
3249
+ const user = data?.session || null;
3250
+ if (token) {
3251
+ state.token = token;
3252
+ state.user = user;
3253
+ const jwtExp = getJwtExpiry(token);
3254
+ await storage.setItem(SCRYME_SESSION_TOKEN_KEY, token);
3255
+ if (jwtExp) {
3256
+ state.expiresAt = jwtExp;
3257
+ await storage.setItem(
3258
+ SCRYME_EXPIRES_AT_KEY,
3259
+ String(state.expiresAt)
3260
+ );
3261
+ } else {
3262
+ delete state.expiresAt;
3263
+ await storage.removeItem(SCRYME_EXPIRES_AT_KEY);
3264
+ }
3265
+ if (user) {
3266
+ await storage.setItem(SCRYME_USER_KEY, JSON.stringify(user));
3267
+ }
3268
+ notify("SIGNED_IN");
3269
+ }
3270
+ return data;
3271
+ },
3272
+ swapZitadel: async (zitadelToken) => {
3273
+ const response = await this.axiosInstance.post(
3274
+ `/${config.orgSlug}/customers/auth/swap-zitadel`,
3275
+ { zitadelToken }
3276
+ );
3277
+ const data = response.data?.data || response.data;
3278
+ const token = data?.token || null;
3279
+ const user = data?.session || null;
3280
+ if (token) {
3281
+ state.token = token;
3282
+ state.user = user;
3283
+ const jwtExp = getJwtExpiry(token);
3284
+ await storage.setItem(SCRYME_SESSION_TOKEN_KEY, token);
3285
+ if (jwtExp) {
3286
+ state.expiresAt = jwtExp;
3287
+ await storage.setItem(
3288
+ SCRYME_EXPIRES_AT_KEY,
3289
+ String(state.expiresAt)
3290
+ );
3291
+ } else {
3292
+ delete state.expiresAt;
3293
+ await storage.removeItem(SCRYME_EXPIRES_AT_KEY);
3294
+ }
3295
+ if (user) {
3296
+ await storage.setItem(SCRYME_USER_KEY, JSON.stringify(user));
3297
+ }
3298
+ notify("SIGNED_IN");
3299
+ }
3300
+ return data;
3301
+ }
3302
+ };
3303
+ }
3304
+ };
3305
+ function createClientSDK(config = {}) {
3306
+ const finalConfig = {
3307
+ clientId: config.clientId || "mock-client-id",
3308
+ clientSecret: config.clientSecret || "mock-client-secret",
3309
+ orgSlug: config.orgSlug || "mock-org-slug",
3310
+ ...config
3311
+ };
3312
+ return new ScrymeClientSDK(finalConfig);
3313
+ }
3314
+ var AuthContext = createContext(void 0);
3315
+ var ScrymeAuthProvider = ({
3316
+ sdk,
3317
+ children
3318
+ }) => {
3319
+ const [session, setSession] = useState({
3320
+ token: null,
3321
+ user: null
3322
+ });
3323
+ const [isLoading, setIsLoading] = useState(true);
3324
+ const [cart, setCart] = useState(null);
3325
+ const [cartLoading, setCartLoading] = useState(false);
3326
+ const [customerProfile, setCustomerProfile] = useState(null);
3327
+ const [customerAddresses, setCustomerAddresses] = useState([]);
3328
+ const [bookingsList, setBookingsList] = useState([]);
3329
+ const [bookingsLoading, setBookingsLoading] = useState(false);
3330
+ useEffect(() => {
3331
+ const { unsubscribe } = sdk.auth.onAuthStateChange((event, newSession) => {
3332
+ setSession(newSession);
3333
+ setIsLoading(false);
3334
+ });
3335
+ return () => unsubscribe();
3336
+ }, [sdk]);
3337
+ const refreshCart = async () => {
3338
+ if (!session.token) {
3339
+ setCart(null);
3340
+ return;
3341
+ }
3342
+ setCartLoading(true);
3343
+ try {
3344
+ const res = await sdk.cart.get();
3345
+ setCart(res.data?.data || res.data || null);
3346
+ } catch (err) {
3347
+ console.error("Failed to fetch cart:", err);
3348
+ } finally {
3349
+ setCartLoading(false);
3350
+ }
3351
+ };
3352
+ const refreshProfile = async () => {
3353
+ if (!session.token) {
3354
+ setCustomerProfile(null);
3355
+ setCustomerAddresses([]);
3356
+ return;
3357
+ }
3358
+ try {
3359
+ const profile = await sdk.customer.getProfile();
3360
+ setCustomerProfile(profile || null);
3361
+ const addresses = await sdk.customer.getAddresses();
3362
+ setCustomerAddresses(addresses?.data || addresses || []);
3363
+ } catch (err) {
3364
+ console.error("Failed to fetch customer profile or addresses:", err);
3365
+ }
3366
+ };
3367
+ const refreshBookings = async () => {
3368
+ if (!session.token) {
3369
+ setBookingsList([]);
3370
+ return;
3371
+ }
3372
+ setBookingsLoading(true);
3373
+ try {
3374
+ const res = await sdk.bookings.list();
3375
+ setBookingsList(res?.data || res || []);
3376
+ } catch (err) {
3377
+ console.error("Failed to fetch bookings:", err);
3378
+ } finally {
3379
+ setBookingsLoading(false);
3380
+ }
3381
+ };
3382
+ useEffect(() => {
3383
+ if (session.token) {
3384
+ refreshCart();
3385
+ refreshProfile();
3386
+ refreshBookings();
3387
+ } else {
3388
+ setCart(null);
3389
+ setCustomerProfile(null);
3390
+ setCustomerAddresses([]);
3391
+ setBookingsList([]);
3392
+ }
3393
+ }, [session.token]);
3394
+ const signIn = async (credentials) => {
3395
+ const res = await sdk.auth.signIn(credentials);
3396
+ return res;
3397
+ };
3398
+ const signUp = async (dto) => {
3399
+ const res = await sdk.auth.signUp(dto);
3400
+ return res;
3401
+ };
3402
+ const signOut = async () => {
3403
+ await sdk.auth.signOut();
3404
+ };
3405
+ const addToCart = async (dto) => {
3406
+ if (!session.token)
3407
+ throw new Error("Customer must be logged in to manage cart");
3408
+ await sdk.cart.add(dto);
3409
+ await refreshCart();
3410
+ };
3411
+ const removeFromCart = async (dto) => {
3412
+ if (!session.token)
3413
+ throw new Error("Customer must be logged in to manage cart");
3414
+ await sdk.cart.remove(dto);
3415
+ await refreshCart();
3416
+ };
3417
+ const updateCartItem = async (dto) => {
3418
+ if (!session.token)
3419
+ throw new Error("Customer must be logged in to manage cart");
3420
+ await sdk.cart.update(dto);
3421
+ await refreshCart();
3422
+ };
3423
+ const clearCart = async (params) => {
3424
+ if (!session.token)
3425
+ throw new Error("Customer must be logged in to manage cart");
3426
+ await sdk.cart.clear(params);
3427
+ await refreshCart();
3428
+ };
3429
+ const addAddress = async (dto) => {
3430
+ if (!session.token)
3431
+ throw new Error("Customer must be logged in to manage addresses");
3432
+ const res = await sdk.customer.addAddress(dto);
3433
+ await refreshProfile();
3434
+ return res;
3435
+ };
3436
+ const updateProfile = async (dto) => {
3437
+ if (!session.token)
3438
+ throw new Error("Customer must be logged in to update profile");
3439
+ const res = await sdk.customer.updateProfile(dto);
3440
+ await refreshProfile();
3441
+ return res;
3442
+ };
3443
+ const createBooking = async (dto) => {
3444
+ if (!session.token)
3445
+ throw new Error("Customer must be logged in to create bookings");
3446
+ const res = await sdk.bookings.create(dto);
3447
+ await refreshBookings();
3448
+ return res;
3449
+ };
3450
+ const cancelBooking = async (id) => {
3451
+ if (!session.token)
3452
+ throw new Error("Customer must be logged in to cancel bookings");
3453
+ const res = await sdk.bookings.cancel(id);
3454
+ await refreshBookings();
3455
+ return res;
3456
+ };
3457
+ const checkoutCart = async (params) => {
3458
+ if (!session.token)
3459
+ throw new Error("Customer must be logged in to checkout");
3460
+ const res = await sdk.cart.checkout(params);
3461
+ await refreshCart();
3462
+ await refreshBookings();
3463
+ return res;
3464
+ };
3465
+ return /* @__PURE__ */ jsx(
3466
+ AuthContext.Provider,
3467
+ {
3468
+ value: {
3469
+ sdk,
3470
+ session,
3471
+ user: session.user,
3472
+ token: session.token,
3473
+ isLoading,
3474
+ signIn,
3475
+ signUp,
3476
+ signOut,
3477
+ cart,
3478
+ cartLoading,
3479
+ addToCart,
3480
+ removeFromCart,
3481
+ updateCartItem,
3482
+ clearCart,
3483
+ refreshCart,
3484
+ customerProfile,
3485
+ customerAddresses,
3486
+ bookings: bookingsList,
3487
+ bookingsLoading,
3488
+ addAddress,
3489
+ updateProfile,
3490
+ createBooking,
3491
+ cancelBooking,
3492
+ checkoutCart,
3493
+ refreshProfile,
3494
+ refreshBookings
3495
+ },
3496
+ children
3497
+ }
3498
+ );
3499
+ };
3500
+ var useScrymeAuth = () => {
3501
+ const context = useContext(AuthContext);
3502
+ if (context === void 0) {
3503
+ throw new Error("useScrymeAuth must be used within a ScrymeAuthProvider");
3504
+ }
3505
+ return context;
3506
+ };
3507
+
3508
+ // src/index.ts
3509
+ function getEnvOrgSlug() {
3510
+ if (typeof process !== "undefined" && process.env) {
3511
+ const slug = process.env.SCRYME_ORG_SLUG || process.env.NEXT_PUBLIC_SCRYME_ORG_SLUG;
3512
+ if (slug) return slug;
3513
+ }
3514
+ try {
3515
+ const getMeta = new Function("return typeof import.meta !== 'undefined' ? import.meta : undefined");
3516
+ const meta = getMeta();
3517
+ if (meta && meta.env) {
3518
+ const slug = meta.env.VITE_SCRYME_ORG_SLUG || meta.env.SCRYME_ORG_SLUG;
3519
+ if (slug) return slug;
3520
+ }
3521
+ } catch (e) {
3522
+ }
3523
+ return void 0;
3524
+ }
3525
+ function expectsOrgSlug(fn) {
3526
+ const fnStr = fn.toString();
3527
+ const match = fnStr.match(/^\s*(?:async\s+)?\(([^)]+)\)/);
3528
+ if (!match) {
3529
+ const singleMatch = fnStr.match(/^\s*(\w+)\s*=>/);
3530
+ return singleMatch ? singleMatch[1] === "orgSlug" : false;
3531
+ }
3532
+ const firstParam = match[1].split(",")[0].split(":")[0].trim();
3533
+ return firstParam === "orgSlug";
3534
+ }
3535
+ function getStringParamCount(fn) {
3536
+ const fnStr = fn.toString();
3537
+ const match = fnStr.match(/^\s*(?:async\s+)?\(([^)]+)\)/);
3538
+ if (!match) return 0;
3539
+ const params = match[1].split(",").map((p) => p.trim());
3540
+ let count = 0;
3541
+ for (const param of params) {
3542
+ const cleanParam = param.split(":")[0].split("=")[0].trim();
3543
+ const lower = cleanParam.toLowerCase();
3544
+ if (lower === "params" || lower === "options" || lower.endsWith("dto") || lower.endsWith("body") || lower.endsWith("payload")) {
3545
+ break;
3546
+ }
3547
+ count++;
3548
+ }
3549
+ return count;
3550
+ }
3551
+ var getScrymeV3API2 = (axiosInstance, defaultOrgSlug) => {
3552
+ const api = getScrymeV3API(axiosInstance);
3553
+ return new Proxy(api, {
3554
+ get(target, prop, receiver) {
3555
+ const originalValue = Reflect.get(target, prop, receiver);
3556
+ if (typeof originalValue === "function") {
3557
+ if (expectsOrgSlug(originalValue)) {
3558
+ return function(...args) {
3559
+ const stringParamsExpected = getStringParamCount(originalValue);
3560
+ const stringArgsPassed = args.filter((arg) => typeof arg === "string").length;
3561
+ if (stringArgsPassed < stringParamsExpected) {
3562
+ const envSlug = defaultOrgSlug || getEnvOrgSlug() || "default-org";
3563
+ return originalValue.apply(this, [envSlug, ...args]);
3564
+ }
3565
+ return originalValue.apply(this, args);
3566
+ };
3567
+ }
3568
+ }
3569
+ return originalValue;
3570
+ }
3571
+ });
3572
+ };
3573
+
3574
+ // src/server.ts
3575
+ var ScrymeServerSDK = class {
3576
+ constructor(config) {
3577
+ this.token = null;
3578
+ this.expiresAt = null;
3579
+ this.activeAuthPromise = null;
3580
+ if (!config || !config.clientId || !config.clientSecret || !config.orgSlug) {
3581
+ throw new Error(
3582
+ "clientId, clientSecret, and orgSlug are required to initialize the SDK."
3583
+ );
3584
+ }
3585
+ let finalBaseURL = config.baseURL || "https://api.scryme.tech";
3586
+ if (finalBaseURL && !finalBaseURL.includes("/api") && !finalBaseURL.endsWith("/api")) {
3587
+ finalBaseURL = finalBaseURL.replace(/\/$/, "") + "/api";
3588
+ }
3589
+ this.axiosInstance = axios3.create({
3590
+ baseURL: finalBaseURL
3591
+ });
3592
+ if (config.token) {
3593
+ this.token = config.token;
3594
+ this.expiresAt = getJwtExpiry(config.token);
3595
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${config.token}`;
3596
+ }
3597
+ if (config.apiKey) {
3598
+ this.axiosInstance.defaults.headers.common["x-api-key"] = config.apiKey;
3599
+ }
3600
+ const performExchange = async () => {
3601
+ if (this.activeAuthPromise) {
3602
+ return this.activeAuthPromise;
3603
+ }
3604
+ this.activeAuthPromise = (async () => {
3605
+ try {
3606
+ const response = await this.api.authExchangeToken({
3607
+ clientId: config.clientId,
3608
+ clientSecret: config.clientSecret
3609
+ });
3610
+ const tokenData = response.data?.data;
3611
+ const accessToken = tokenData?.access_token;
3612
+ const expiresIn = tokenData?.expires_in;
3613
+ if (accessToken) {
3614
+ this.token = accessToken;
3615
+ if (expiresIn) {
3616
+ this.expiresAt = Date.now() + expiresIn * 1e3;
3617
+ } else {
3618
+ this.expiresAt = getJwtExpiry(accessToken);
3619
+ }
3620
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${accessToken}`;
3621
+ }
3622
+ return response.data;
3623
+ } finally {
3624
+ this.activeAuthPromise = null;
3625
+ }
3626
+ })();
3627
+ return this.activeAuthPromise;
3628
+ };
3629
+ this.axiosInstance.interceptors.request.use(async (req) => {
3630
+ 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"));
3631
+ if (!isAuthTokenRequest && !config.apiKey) {
3632
+ const isExpired = !this.token || this.expiresAt && Date.now() >= this.expiresAt - 3e4;
3633
+ if (isExpired) {
3634
+ const isCustomerToken = this.token && getJwtExpiry(this.token) && !config.clientSecret;
3635
+ if (isCustomerToken || this.token && !config.clientSecret) {
3636
+ try {
3637
+ await this.auth.refreshSession();
3638
+ } catch (e) {
3639
+ console.error(
3640
+ "Proactive customer session refresh failed in request interceptor:",
3641
+ e
3642
+ );
3643
+ }
3644
+ } else if (config.clientId && config.clientSecret) {
3645
+ try {
3646
+ await performExchange();
3647
+ } catch (e) {
3648
+ console.error(
3649
+ "Auto-authentication failed in request interceptor:",
3650
+ e
3651
+ );
3652
+ }
3653
+ }
3654
+ }
3655
+ }
3656
+ if (this.token) {
3657
+ req.headers["Authorization"] = `Bearer ${this.token}`;
3658
+ }
3659
+ return req;
3660
+ });
3661
+ this.axiosInstance.interceptors.response.use(
3662
+ (response) => response,
3663
+ async (error) => {
3664
+ const originalRequest = error.config;
3665
+ 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"));
3666
+ if (error.response && error.response.status === 401 && originalRequest && !originalRequest._retry && !isAuthTokenRequest && !config.apiKey) {
3667
+ originalRequest._retry = true;
3668
+ try {
3669
+ const isCustomerToken = this.token && getJwtExpiry(this.token) && !config.clientSecret;
3670
+ if (isCustomerToken || this.token && !config.clientSecret) {
3671
+ await this.auth.refreshSession();
3672
+ if (this.token) {
3673
+ originalRequest.headers["Authorization"] = `Bearer ${this.token}`;
3674
+ }
3675
+ return this.axiosInstance(originalRequest);
3676
+ } else if (config.clientId && config.clientSecret) {
3677
+ await performExchange();
3678
+ if (this.token) {
3679
+ originalRequest.headers["Authorization"] = `Bearer ${this.token}`;
3680
+ }
3681
+ return this.axiosInstance(originalRequest);
3682
+ }
3683
+ } catch (e) {
3684
+ return Promise.reject(error);
3685
+ }
3686
+ }
3687
+ return Promise.reject(error);
3688
+ }
3689
+ );
3690
+ this.api = getScrymeV3API2(this.axiosInstance, config.orgSlug);
3691
+ this.catalog = buildModule(this.api, config.orgSlug, catalogMapping);
3692
+ this.inventory = buildModule(this.api, config.orgSlug, inventoryMapping);
3693
+ this.orders = buildModule(this.api, config.orgSlug, ordersMapping);
3694
+ this.crm = buildModule(this.api, config.orgSlug, crmMapping);
3695
+ this.pos = buildModule(this.api, config.orgSlug, posMapping);
3696
+ this.accounting = buildModule(this.api, config.orgSlug, accountingMapping);
3697
+ this.loyalty = buildModule(this.api, config.orgSlug, loyaltyMapping);
3698
+ this.members = buildModule(this.api, config.orgSlug, membersMapping);
3699
+ this.admin = buildModule(this.api, config.orgSlug, adminMapping);
3700
+ this.services = buildModule(this.api, config.orgSlug, servicesMapping);
3701
+ this.cart = {
3702
+ get: async (params) => {
3703
+ return this.orders.getCart(params || {});
3704
+ },
3705
+ add: async (dto) => {
3706
+ return this.orders.addToCart(dto);
3707
+ },
3708
+ remove: async (dto) => {
3709
+ return this.orders.removeFromCart(dto);
3710
+ },
3711
+ clear: async (params) => {
3712
+ return this.orders.clearCart(params || {});
3713
+ },
3714
+ update: async (dto) => {
3715
+ const response = await this.orders.getCart({
3716
+ sessionId: dto.sessionId
3717
+ });
3718
+ const data = response.data;
3719
+ const items = data?.data?.items || data?.items || [];
3720
+ let existingItem = null;
3721
+ if (dto.productId) {
3722
+ existingItem = items.find(
3723
+ (item) => item.productId === dto.productId && (item.variantId || null) === (dto.variantId || null)
3724
+ );
3725
+ } else if (dto.serviceId) {
3726
+ existingItem = items.find(
3727
+ (item) => item.serviceId === dto.serviceId
3728
+ );
3729
+ }
3730
+ if (existingItem) {
3731
+ const currentQty = existingItem.quantity || 0;
3732
+ if (dto.quantity <= 0) {
3733
+ return this.orders.removeFromCart({
3734
+ productId: dto.productId,
3735
+ variantId: dto.variantId,
3736
+ serviceId: dto.serviceId,
3737
+ sessionId: dto.sessionId,
3738
+ customerId: dto.customerId
3739
+ });
3740
+ } else {
3741
+ const diff = dto.quantity - currentQty;
3742
+ if (diff !== 0) {
3743
+ return this.orders.addToCart({
3744
+ ...dto,
3745
+ quantity: diff
3746
+ });
3747
+ }
3748
+ return response;
3749
+ }
3750
+ } else {
3751
+ if (dto.quantity > 0) {
3752
+ return this.orders.addToCart(dto);
3753
+ }
3754
+ }
3755
+ },
3756
+ getItems: async (params) => {
3757
+ const res = await this.orders.getCart(params || {});
3758
+ const data = res?.data || res;
3759
+ return data?.items || data?.data?.items || [];
3760
+ },
3761
+ getTotals: async (params) => {
3762
+ const res = await this.orders.getCart(params || {});
3763
+ const data = res?.data || res;
3764
+ const items = data?.items || data?.data?.items || [];
3765
+ const itemsCount = items.reduce(
3766
+ (sum, item) => sum + (item.quantity || 0),
3767
+ 0
3768
+ );
3769
+ return {
3770
+ itemsCount,
3771
+ items,
3772
+ raw: data
3773
+ };
3774
+ },
3775
+ checkout: async (params) => {
3776
+ if (!params.customerId)
3777
+ throw new Error("customerId is required for server checkout.");
3778
+ const items = await this.cart.getItems({
3779
+ sessionId: params.sessionId,
3780
+ customerId: params.customerId
3781
+ });
3782
+ if (!items || items.length === 0) {
3783
+ throw new Error("Cannot checkout an empty cart.");
3784
+ }
3785
+ const orderItems = items.map((item) => ({
3786
+ variantId: item.variantId || "",
3787
+ quantity: item.quantity,
3788
+ unitPrice: item.unitPrice
3789
+ }));
3790
+ const orderResponse = await this.orders.createOrder({
3791
+ customerId: params.customerId,
3792
+ locationId: params.locationId,
3793
+ items: orderItems,
3794
+ notes: params.notes,
3795
+ channel: params.channel
3796
+ });
3797
+ await this.cart.clear({
3798
+ sessionId: params.sessionId || "",
3799
+ customerId: params.customerId
3800
+ });
3801
+ return orderResponse?.data || orderResponse;
3802
+ }
3803
+ };
3804
+ this.customer = {
3805
+ getProfile: async (customerId) => {
3806
+ return this.admin.getCustomerById(customerId);
3807
+ },
3808
+ updateProfile: async (customerId, dto) => {
3809
+ return this.admin.updateCustomer(customerId, dto);
3810
+ },
3811
+ getAddresses: async (customerId) => {
3812
+ return this.admin.getCustomerAddresses(customerId);
3813
+ },
3814
+ addAddress: async (customerId, dto) => {
3815
+ return this.admin.addCustomerAddress(customerId, dto);
3816
+ }
3817
+ };
3818
+ this.bookings = {
3819
+ create: async (dto) => {
3820
+ return this.catalog.createBooking(dto);
3821
+ },
3822
+ get: async (id) => {
3823
+ return this.catalog.getBooking(id);
3824
+ },
3825
+ list: async () => {
3826
+ return this.catalog.getBookings();
3827
+ },
3828
+ cancel: async (id) => {
3829
+ return this.catalog.updateBookingStatus(id, "CANCELLED");
3830
+ },
3831
+ complete: async (id, dto) => {
3832
+ return this.catalog.completeBooking(id, dto);
3833
+ }
3834
+ };
3835
+ const baseAuth = buildModule(this.api, config.orgSlug, authMapping);
3836
+ this.auth = {
3837
+ ...baseAuth,
3838
+ signUp: async (dto) => {
3839
+ return this.api.customersRegister(config.orgSlug, dto);
3840
+ },
3841
+ authenticate: async () => {
3842
+ return performExchange();
3843
+ },
3844
+ signIn: async (credentials) => {
3845
+ const response = await this.axiosInstance.post(
3846
+ "/auth/sign-in/email",
3847
+ credentials
3848
+ );
3849
+ const data = response.data;
3850
+ const token = data?.session?.token || data?.token || null;
3851
+ if (token) {
3852
+ this.token = token;
3853
+ this.expiresAt = getJwtExpiry(token);
3854
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
3855
+ }
3856
+ return data;
3857
+ },
3858
+ getCurrentSession: async () => {
3859
+ const response = await this.axiosInstance.get(
3860
+ `/${config.orgSlug}/customers/auth/session`
3861
+ );
3862
+ return response.data?.data || response.data;
3863
+ },
3864
+ refreshSession: async () => {
3865
+ const response = await this.axiosInstance.post(
3866
+ `/${config.orgSlug}/customers/auth/refresh`
3867
+ );
3868
+ const data = response.data?.data || response.data;
3869
+ const token = data?.token || null;
3870
+ if (token) {
3871
+ this.token = token;
3872
+ this.expiresAt = getJwtExpiry(token);
3873
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
3874
+ }
3875
+ return data;
3876
+ },
3877
+ swapZitadel: async (zitadelToken) => {
3878
+ const response = await this.axiosInstance.post(
3879
+ `/${config.orgSlug}/customers/auth/swap-zitadel`,
3880
+ { zitadelToken }
3881
+ );
3882
+ const data = response.data?.data || response.data;
3883
+ const token = data?.token || null;
3884
+ if (token) {
3885
+ this.token = token;
3886
+ this.expiresAt = getJwtExpiry(token);
3887
+ this.axiosInstance.defaults.headers.common["Authorization"] = `Bearer ${token}`;
3888
+ }
3889
+ return data;
3890
+ }
3891
+ };
3892
+ }
3893
+ };
3894
+ function createServerSDK(config = {}) {
3895
+ const finalConfig = {
3896
+ clientId: config.clientId || "mock-client-id",
3897
+ clientSecret: config.clientSecret || "mock-client-secret",
3898
+ orgSlug: config.orgSlug || "mock-org-slug",
3899
+ ...config
3900
+ };
3901
+ return new ScrymeServerSDK(finalConfig);
3902
+ }
3903
+
3904
+ export {
3905
+ AddDepartmentMemberDtoRole,
3906
+ AttendanceControllerGetLogsSortOrder,
3907
+ CmsCustomFieldsDtoPublishStatus,
3908
+ CreateCrmFieldDtoType,
3909
+ CreateCrmRelationshipDtoType,
3910
+ CreateExpenseDtoPaymentMethod,
3911
+ CreateIntegrationDefinitionDtoAuthType,
3912
+ CreateIntegrationDefinitionDtoCategory,
3913
+ CreateInvitationDtoRole,
3914
+ CreateMemberDtoRole,
3915
+ CreateOrderDtoChannel,
3916
+ CreatePartnerDtoBenefitType,
3917
+ CreatePartnerDtoReconciliationPolicy,
3918
+ CreateServiceDtoPricingModel,
3919
+ CreateStrapiConnectionDtoEnabledSyncTypesItem,
3920
+ CreateStrapiConnectionDtoSyncDirection,
3921
+ CreateTransferDtoPriority,
3922
+ CreateUtilityAccountDtoType,
3923
+ DepartmentsListSortOrder,
3924
+ ExpenseControllerGetExpensesStatus,
3925
+ InvitationResponseDtoRole,
3926
+ InvitationResponseDtoStatus,
3927
+ InvitationsListSortOrder,
3928
+ InvitationsListStatus,
3929
+ MemberResponseDtoMembershipStatus,
3930
+ MemberResponseDtoRole,
3931
+ MemberResponseDtoStatus,
3932
+ MembersControllerGetMembersMembershipStatus,
3933
+ MembersControllerGetMembersRole,
3934
+ MembersControllerGetMembersSortOrder,
3935
+ ReconcilePodDtoOutcome,
3936
+ RegisterPettyCashDtoPaymentMethod,
3937
+ ReviewPriceChangeDtoStatus,
3938
+ RoleManagementControllerGetCustomRolesSortOrder,
3939
+ ServicesUpdateBookingStatusBodyStatus,
3940
+ TriggerSyncDtoDirection,
3941
+ TriggerSyncDtoSyncTypesItem,
3942
+ UpdateIntegrationDefinitionDtoAuthType,
3943
+ UpdateIntegrationDefinitionDtoCategory,
3944
+ UpdateMemberDtoMembershipStatus,
3945
+ UpdateMemberDtoRole,
3946
+ UpdateMemberDtoStatus,
3947
+ UpdatePartnerDtoBenefitType,
3948
+ UpdatePartnerDtoReconciliationPolicy,
3949
+ UpdateServiceDtoPricingModel,
3950
+ UpdateStrapiConnectionDtoEnabledSyncTypesItem,
3951
+ UpdateStrapiConnectionDtoSyncDirection,
3952
+ methodsWithOrgSlugSet,
3953
+ catalogMapping,
3954
+ authMapping,
3955
+ inventoryMapping,
3956
+ ordersMapping,
3957
+ crmMapping,
3958
+ posMapping,
3959
+ accountingMapping,
3960
+ loyaltyMapping,
3961
+ membersMapping,
3962
+ publicServicesMapping,
3963
+ servicesMapping,
3964
+ adminMapping,
3965
+ buildModule,
3966
+ getJwtExpiry,
3967
+ ScrymeServerSDK,
3968
+ createServerSDK,
3969
+ getScrymeV3API2 as getScrymeV3API,
3970
+ ScrymeClientSDK,
3971
+ createClientSDK,
3972
+ ScrymeAuthProvider,
3973
+ useScrymeAuth
3974
+ };