@scryme/sdk 0.1.0 → 9.64.2

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