erp-pos-ecommerce-shared 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2104 @@
1
+ import { AxiosInstance } from 'axios';
2
+
3
+ interface ICategoryResponse {
4
+ total: number;
5
+ data: ICategory[];
6
+ skip: number;
7
+ limit: number;
8
+ }
9
+ interface ICategory {
10
+ categoryID: number;
11
+ category: string;
12
+ description: string;
13
+ syncStatusID: number;
14
+ masterCodeID: null;
15
+ savedBy: null;
16
+ savedDate: null;
17
+ deletedBy: null;
18
+ deletedDate: null;
19
+ tblAttributes?: IAttribute[];
20
+ }
21
+
22
+ interface IAttributeResponse {
23
+ data: ICategory[];
24
+ total: number;
25
+ skip: number;
26
+ limit: number;
27
+ }
28
+ interface IAttribute {
29
+ attributeID: number;
30
+ name: string;
31
+ pricePerGram?: number | null;
32
+ syncStatusID: number;
33
+ masterCodeID: null;
34
+ savedBy: number;
35
+ savedDate: Date;
36
+ deletedBy: null;
37
+ deletedDate: null;
38
+ categoryID: number | null;
39
+ productID: number | null;
40
+ materialID: number | null;
41
+ tblAttributeValues: IAttributeValue[];
42
+ tblCategories: ICategory;
43
+ }
44
+ interface IAttributeValue {
45
+ valueID: number;
46
+ attributeID: number;
47
+ value: string;
48
+ syncStatusID: number;
49
+ masterCodeID: null;
50
+ savedBy: number;
51
+ savedDate: Date;
52
+ deletedBy: null;
53
+ deletedDate: null;
54
+ tblAttributes?: IAttribute;
55
+ }
56
+
57
+ interface IBankTerminal {
58
+ terminalID: number;
59
+ name: string;
60
+ description: string;
61
+ syncStatusID: number;
62
+ masterCodeID?: number | null;
63
+ savedBy?: number | null;
64
+ savedDate?: string | null;
65
+ deletedBy?: number | null;
66
+ deletedDate?: string | null;
67
+ userName?: string;
68
+ }
69
+ interface IBankTerminalResponse {
70
+ total: number;
71
+ data: IBankTerminal[];
72
+ skip: number;
73
+ limit: number;
74
+ }
75
+ interface IBankTerminalOption {
76
+ terminalID: number;
77
+ name: string;
78
+ description: string;
79
+ }
80
+ interface IBankTerminalForm {
81
+ terminalName: string;
82
+ terminalDescription: string;
83
+ }
84
+ interface BankTerminalQuery {
85
+ skip?: number;
86
+ limit?: number;
87
+ query?: string;
88
+ }
89
+ interface BankTerminalResponse {
90
+ terminalID: number;
91
+ name: string;
92
+ description: string;
93
+ syncStatusID: number;
94
+ masterCodeID?: number | null;
95
+ savedBy?: number | null;
96
+ savedDate?: string | null;
97
+ deletedBy?: number | null;
98
+ deletedDate?: string | null;
99
+ }
100
+
101
+ interface IProductResponse {
102
+ total: number;
103
+ data: IProduct[];
104
+ skip: number;
105
+ limit: number;
106
+ }
107
+ interface IProductDetailsResponse {
108
+ total: number;
109
+ data: IProductDetails[];
110
+ skip: number;
111
+ limit: number;
112
+ }
113
+ interface ProdStock {
114
+ stockID: number;
115
+ productID: number;
116
+ productName: string;
117
+ wareHouseID: number;
118
+ isShowroom: number;
119
+ quantity: number;
120
+ batchID: number;
121
+ batchCode: string;
122
+ unitSellingPrice: number;
123
+ variantID: number | null;
124
+ variantName: string | null;
125
+ }
126
+ interface ProdStats {
127
+ highestPrice: number;
128
+ lowestPrice: number;
129
+ showRoomStock: number;
130
+ totalStock: number;
131
+ }
132
+ interface BatchData {
133
+ stockID: number;
134
+ productID: number;
135
+ productName: string;
136
+ mainImageURL: string;
137
+ wareHouseID: number;
138
+ isShowroom: number;
139
+ quantity: number;
140
+ batchID: number;
141
+ batchCode: string;
142
+ unitSellingPrice: number;
143
+ variantID: number | null;
144
+ variantName: string | null;
145
+ weight?: number | null;
146
+ pricePerGram?: number | null;
147
+ isWeightBased?: boolean;
148
+ }
149
+ interface ProductOptions {
150
+ size?: number | null;
151
+ caliber?: number | null;
152
+ weight?: number | null;
153
+ purity?: number | null;
154
+ }
155
+ interface IProduct {
156
+ productID: number;
157
+ productName: string;
158
+ productDescription: string;
159
+ categoryID: number;
160
+ materialID: number;
161
+ genderID: number;
162
+ pricePerGram?: number | null;
163
+ syncStatusID: number;
164
+ mainImageURL: string;
165
+ masterCodeID: null;
166
+ savedBy: null;
167
+ savedDate: null;
168
+ deletedBy: null;
169
+ deletedDate: null;
170
+ tblCategories: TblCategories;
171
+ tblMaterials?: TblMaterials;
172
+ tblProductsImages: TblProductsImage[];
173
+ batches: BatchData[];
174
+ prodStats: ProdStats;
175
+ stockData: ProdStock[];
176
+ tblProducts_Tags: TblProductsTag[];
177
+ tblProductDetails: IProductDetails[];
178
+ tblAttributes: IAttribute[];
179
+ }
180
+ interface TblCategories {
181
+ category: string;
182
+ }
183
+ interface TblMaterials {
184
+ material: string;
185
+ }
186
+ interface TblProductsImage {
187
+ imageUrl: string;
188
+ productImageID: number;
189
+ }
190
+ interface TblProductsTag {
191
+ tblTags: TblTags;
192
+ }
193
+ interface TblTags {
194
+ tag: string;
195
+ }
196
+ interface IProductDetails {
197
+ productDetailID: number;
198
+ productID: number;
199
+ name: string;
200
+ SKU: string;
201
+ weight?: number | null;
202
+ pricePerGram?: number | null;
203
+ isWeightBased?: boolean;
204
+ attributes: IAttribute[];
205
+ syncStatusID: number;
206
+ savedBy: number | null;
207
+ savedDate: string | null;
208
+ deletedBy: number | null;
209
+ deletedDate: string | null;
210
+ tblProductDetails_Attributes: TblProductDetails_Attributes[];
211
+ tblBatches: IBatch[];
212
+ tblProducts: IProduct;
213
+ mainImageURL: null | string;
214
+ stockData: ProdStock[];
215
+ prodStats: ProdStats;
216
+ tblProductsImages: TblProductsImage[];
217
+ }
218
+ interface TblProductDetails_Attributes {
219
+ attributeValueID: number;
220
+ productDetailID: number;
221
+ productDetailAttributeID: number;
222
+ savedBy: number | null;
223
+ savedDate: string | null;
224
+ deletedBy: number | null;
225
+ deletedDate: string | null;
226
+ syncStatusID: number;
227
+ tblAttributeValues: IAttributeValue;
228
+ }
229
+ interface IProductVariantRequest {
230
+ variant: {
231
+ productDetailID?: number;
232
+ productID: number;
233
+ name: string;
234
+ SKU: string;
235
+ weight?: number | null;
236
+ pricePerGram?: number | null;
237
+ images: File[];
238
+ attributes: {
239
+ attributeID: number;
240
+ valueID: number;
241
+ }[];
242
+ };
243
+ }
244
+
245
+ interface IBatchResponse {
246
+ total: number;
247
+ data: IBatch[];
248
+ skip: number;
249
+ limit: number;
250
+ }
251
+ interface IStock {
252
+ stockID: number;
253
+ productID: number;
254
+ wareHouseID: number;
255
+ batchID: number;
256
+ quantity: number;
257
+ syncStatusID: number;
258
+ masterCodeID: null;
259
+ savedBy: null;
260
+ savedDate: null;
261
+ }
262
+ interface IBatch {
263
+ batchID: number;
264
+ batchCode: string;
265
+ entryDate: string;
266
+ expirationDate: string | null;
267
+ providerID: number;
268
+ unitCost: number;
269
+ unitSellingPrice: number;
270
+ taxID: number;
271
+ productDetailID: number;
272
+ syncStatusID: number;
273
+ masterCodeID: null;
274
+ savedBy: null;
275
+ savedDate: null;
276
+ deletedBy: null;
277
+ deletedDate: null;
278
+ tblStocks: IStock[];
279
+ tblProductDetails?: IProductDetails;
280
+ }
281
+
282
+ interface IClientResponse {
283
+ total: number;
284
+ data: IClient[];
285
+ skip: number;
286
+ limit: number;
287
+ }
288
+ interface IClientResponseById {
289
+ data: IClient;
290
+ message: string;
291
+ }
292
+ interface IClientDataForTable {
293
+ clientID: number;
294
+ email: string;
295
+ mainPhone: string;
296
+ clientFullName: string;
297
+ priceType: string;
298
+ deletedBy: null;
299
+ deletedDate: null;
300
+ }
301
+ interface IClient {
302
+ clientID: number;
303
+ firstName: string;
304
+ lastName: string;
305
+ email: string;
306
+ priceTypeID: number;
307
+ mainPhone: string;
308
+ secondaryPhone: null;
309
+ clientPicture: null;
310
+ syncStatusID: number;
311
+ masterCodeID: null;
312
+ savedBy: number;
313
+ savedDate: Date;
314
+ deletedBy: null;
315
+ deletedDate: null;
316
+ tblPriceTypes: TblPriceTypes;
317
+ }
318
+ interface TblPriceTypes {
319
+ priceTypeID: number;
320
+ priceName: string;
321
+ price: number;
322
+ syncStatusID: number;
323
+ masterCodeID: null;
324
+ savedBy: null;
325
+ savedDate: null;
326
+ deletedBy: null;
327
+ deletedDate: null;
328
+ }
329
+ interface IClientRequest {
330
+ firstName: string;
331
+ lastName: string;
332
+ email: string;
333
+ mainPhone: string;
334
+ priceTypeID: number;
335
+ }
336
+
337
+ interface FilterType {
338
+ query: string | null;
339
+ categoryId: number | null;
340
+ batchId: string | null;
341
+ supplierId: number | null;
342
+ warehouseId: number | null;
343
+ priceRangeMin: number | null;
344
+ priceRangeMax: number | null;
345
+ }
346
+
347
+ type IField = ITextField | IPasswordField | INumberField | ISelectField | IMultiSelectField | IDateField | IEmailField | IHiddenField | ISwitchField | IFileField | ITagField;
348
+ interface IHiddenField extends IBaseField {
349
+ type: typeof FieldTypes.HIDDEN;
350
+ }
351
+ interface ITextField extends IBaseField {
352
+ type: typeof FieldTypes.TEXT;
353
+ }
354
+ interface IEmailField extends IBaseField {
355
+ type: typeof FieldTypes.EMAIL;
356
+ }
357
+ interface IPasswordField extends IBaseField {
358
+ type: typeof FieldTypes.PASSWORD;
359
+ }
360
+ interface ITagField extends IBaseField, Omit<ISelect, 'options'> {
361
+ type: typeof FieldTypes.TAG;
362
+ options: TagData[];
363
+ }
364
+ interface ISwitchField extends IBaseField {
365
+ type: typeof FieldTypes.SWITCH;
366
+ defaultChecked?: boolean;
367
+ labelPosition?: 'left' | 'right';
368
+ onLabel?: string;
369
+ offLabel?: string;
370
+ }
371
+ type FileType = 'image' | 'video' | 'audio' | 'pdf' | 'document';
372
+ interface IFileField extends IBaseField {
373
+ type: typeof FieldTypes.FILE;
374
+ multiple?: boolean;
375
+ accept?: string[] | readonly string[];
376
+ maxSize?: number;
377
+ maxFiles?: number;
378
+ maxSizeMessage?: string;
379
+ maxFilesMessage?: string;
380
+ fileType: FileType;
381
+ defaultImages?: TblProductsImage[];
382
+ }
383
+ interface INumberField extends IBaseField {
384
+ type: typeof FieldTypes.NUMBER;
385
+ min?: number;
386
+ max?: number;
387
+ preffix?: string;
388
+ suffix?: string;
389
+ allowNegative?: boolean;
390
+ allowDecimal?: boolean;
391
+ decimalScale?: number;
392
+ fixedDecimalScale?: boolean;
393
+ decimalSeparator?: string;
394
+ hideControls?: boolean;
395
+ step?: number;
396
+ }
397
+ interface ISelectField extends IBaseField, ISelect {
398
+ type: typeof FieldTypes.SELECT;
399
+ }
400
+ interface IMultiSelectField extends IBaseField, ISelect {
401
+ type: typeof FieldTypes.MULTISELECT;
402
+ }
403
+ interface IDateField extends IBaseField {
404
+ type: typeof FieldTypes.DATE;
405
+ }
406
+ interface ISelect extends IBaseField {
407
+ options: IOptions[];
408
+ allowDeselect?: boolean;
409
+ clearable?: boolean;
410
+ searchable?: boolean;
411
+ nothingFoundMessage?: string;
412
+ checkIconPosition?: 'right' | 'left';
413
+ withCheckIcon?: boolean;
414
+ limit?: number;
415
+ renderOption?: (option: IOptions) => React.ReactNode;
416
+ }
417
+ type ColumnWidth = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
418
+ interface IBaseField {
419
+ name: string;
420
+ label?: string;
421
+ description?: string;
422
+ placeholder?: string;
423
+ required?: boolean;
424
+ error?: string;
425
+ disabled?: boolean;
426
+ defaultValue?: string | number | boolean | string[] | Date;
427
+ requiredMessage?: string;
428
+ columnWidth?: ColumnWidth;
429
+ onChange?: (value: string) => void;
430
+ section?: number;
431
+ page?: number;
432
+ }
433
+ interface IButton {
434
+ hidden?: boolean;
435
+ type: ButtonTypes;
436
+ label: string;
437
+ fullWidth?: boolean;
438
+ className?: string;
439
+ style?: React.CSSProperties;
440
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
441
+ disabled?: boolean;
442
+ loading?: boolean;
443
+ Icon?: React.ReactNode;
444
+ iconPosition?: 'left' | 'right';
445
+ color?: string;
446
+ variant?: "gradient" | "subtle" | "filled" | "light" | "outline" | "transparent" | "white" | "default";
447
+ }
448
+ interface IOptions {
449
+ value: string;
450
+ label: string;
451
+ }
452
+ interface TagData {
453
+ value: string;
454
+ }
455
+ declare const FieldTypes: {
456
+ readonly TEXT: "text";
457
+ readonly EMAIL: "email";
458
+ readonly NUMBER: "number";
459
+ readonly PASSWORD: "password";
460
+ readonly SELECT: "select";
461
+ readonly MULTISELECT: "multiselect";
462
+ readonly DATE: "date";
463
+ readonly HIDDEN: "hidden";
464
+ readonly SWITCH: "switch";
465
+ readonly FILE: "file";
466
+ readonly TAG: "tag";
467
+ };
468
+ type FieldTypes = (typeof FieldTypes)[keyof typeof FieldTypes];
469
+ type ButtonTypes = (typeof ButtonTypes)[keyof typeof ButtonTypes];
470
+ declare const ButtonTypes: {
471
+ readonly SUBMIT: "submit";
472
+ readonly BUTTON: "button";
473
+ readonly RESET: "reset";
474
+ };
475
+
476
+ interface IGender {
477
+ genderID: number;
478
+ gender: string;
479
+ syncStatusID: number;
480
+ masterCodeID: null;
481
+ savedBy: null;
482
+ savedDate: null;
483
+ deletedBy: null;
484
+ deletedDate: null;
485
+ }
486
+
487
+ interface IMeta {
488
+ createdAt: Date;
489
+ updatedAt: Date;
490
+ }
491
+ interface IReview {
492
+ rating: number;
493
+ comment: string;
494
+ date: Date;
495
+ reviewerName: string;
496
+ reviewerEmail: string;
497
+ }
498
+ interface ILocationResponse {
499
+ total: number;
500
+ data: ILocation[];
501
+ skip: number;
502
+ limit: number;
503
+ }
504
+ interface ILocationResponse {
505
+ total: number;
506
+ data: ILocation[];
507
+ skip: number;
508
+ limit: number;
509
+ }
510
+ interface ILocation {
511
+ id: number;
512
+ title: string;
513
+ description: string;
514
+ }
515
+ interface ILocation {
516
+ physicalLocationID: number;
517
+ name: string;
518
+ stateName: string;
519
+ addressID: number;
520
+ isOpen: boolean;
521
+ stateID: number;
522
+ street: string;
523
+ streetNumber: string;
524
+ unitNumber: string;
525
+ district: string;
526
+ zipCode: number;
527
+ city: string;
528
+ userName: string;
529
+ syncStatusID: number;
530
+ masterCodeID: null;
531
+ savedBy: null;
532
+ savedDate: null;
533
+ deletedBy: null;
534
+ deletedDate: null;
535
+ }
536
+
537
+ interface IMaterial {
538
+ materialID: number;
539
+ material: string;
540
+ pricePerGram?: number | null;
541
+ syncStatusID: number;
542
+ masterCodeID: null;
543
+ savedBy: null;
544
+ savedDate: null;
545
+ deletedBy: null;
546
+ deletedDate: null;
547
+ }
548
+
549
+ interface IModule {
550
+ moduleID: number;
551
+ moduleName: string;
552
+ moduleDescription: string;
553
+ syncStatusID: number;
554
+ masterCodeID: null;
555
+ savedBy: null;
556
+ savedDate: null;
557
+ deletedBy: null;
558
+ deletedDate: null;
559
+ }
560
+
561
+ interface NavLinks {
562
+ icon: React.ReactNode;
563
+ title: string;
564
+ description: string;
565
+ link?: string;
566
+ canSee: boolean;
567
+ onClick?: () => void;
568
+ }
569
+
570
+ interface IOrderResponse {
571
+ data: IOrder[];
572
+ total: number;
573
+ skip: number;
574
+ limit: number;
575
+ }
576
+ interface IOrder {
577
+ orderID: number;
578
+ clientID: number;
579
+ orderStatus: number;
580
+ commissionedBy: number;
581
+ priceTypeID: number;
582
+ syncStatusID: number;
583
+ masterCodeID: null;
584
+ savedBy: number;
585
+ savedDate: Date;
586
+ deletedBy: null;
587
+ deletedDate: null;
588
+ orderDate: Date;
589
+ tblClients: IClient;
590
+ tblOrderStatus: TblOrderStatus;
591
+ tblOrderDetails: TblOrderDetail[];
592
+ tblUsers_tblOrders_commissionedByTotblUsers: TblUsersTblTotblUsers;
593
+ tblReturns?: TblReturn[];
594
+ }
595
+ interface TblUsersTblTotblUsers {
596
+ userID: number;
597
+ firstName: string;
598
+ lastName: string;
599
+ email: string;
600
+ emailVerifiedAt: null;
601
+ roleID: number;
602
+ rememberToken: string;
603
+ addressID: null;
604
+ syncStatusID: number;
605
+ masterCodeID: null;
606
+ savedBy: number | null;
607
+ savedDate: Date | null;
608
+ deletedBy: null;
609
+ deletedDate: null;
610
+ }
611
+ interface TblOrderDetail {
612
+ orderDetailsID: number;
613
+ batchID: number;
614
+ quantity: number;
615
+ weight?: number | null;
616
+ pricePerGram?: number | null;
617
+ isWeightBased: boolean;
618
+ amount: number;
619
+ orderID: number;
620
+ productID: number;
621
+ closureID: null;
622
+ syncStatusID: number;
623
+ masterCodeID: null;
624
+ savedBy: number;
625
+ savedDate: Date;
626
+ deletedBy: null;
627
+ deletedDate: null;
628
+ tblProductDetails: IProductDetails;
629
+ tblOrderDetails_MoneyTransactions: TblOrderDetailsMoneyTransactions[];
630
+ tblReturnDetails?: TblReturnDetail[];
631
+ }
632
+ interface TblProducts {
633
+ productID: number;
634
+ productName: string;
635
+ productDescription: string;
636
+ categoryID: number;
637
+ materialID: number;
638
+ genderID: number;
639
+ syncStatusID: number;
640
+ masterCodeID: null;
641
+ savedBy: number | null;
642
+ savedDate: Date | null;
643
+ deletedBy: null;
644
+ deletedDate: null;
645
+ }
646
+ interface TblOrderStatus {
647
+ statusID: number;
648
+ status: string;
649
+ syncStatusID: number;
650
+ masterCodeID: null;
651
+ savedBy: null;
652
+ savedDate: null;
653
+ deletedBy: null;
654
+ deletedDate: null;
655
+ }
656
+ interface TblOrderDetailsMoneyTransactions {
657
+ orderDetailMoneytransactionID: number;
658
+ orderDetailID: number;
659
+ transactionID: number;
660
+ coveredAmount: string;
661
+ syncStatusID: number;
662
+ masterCodeID: null;
663
+ savedBy: number;
664
+ savedDate: Date;
665
+ deletedBy: null;
666
+ deletedDate: null;
667
+ cardNumber: null;
668
+ voucherNumber: null;
669
+ tblMoneyTransactions: TblMoneyTransactions;
670
+ }
671
+ interface TblMoneyTransactions {
672
+ transactionID: number;
673
+ amount: number;
674
+ referenceCode: null;
675
+ transactionTypeID: number;
676
+ syncStatusID: number;
677
+ masterCodeID: null;
678
+ savedBy: number;
679
+ savedDate: Date;
680
+ deletedBy: null;
681
+ deletedDate: null;
682
+ cardNumber: string;
683
+ voucherNumber: string;
684
+ tblMoneyTransactionTypes: TblMoneyTransactionTypes;
685
+ }
686
+ interface TblMoneyTransactionTypes {
687
+ transactionTypeID: number;
688
+ transactionName: string;
689
+ syncStatusID: number;
690
+ masterCodeID: null;
691
+ savedBy: number;
692
+ savedDate: Date;
693
+ deletedBy: null;
694
+ deletedDate: null;
695
+ }
696
+ interface TblReturn {
697
+ returnID: number;
698
+ orderID: number;
699
+ returnDate: string;
700
+ returnReason: string | null;
701
+ returnStatus: string;
702
+ syncStatusID: number;
703
+ masterCodeID: number | null;
704
+ savedBy: number | null;
705
+ savedDate: string | null;
706
+ deletedBy: number | null;
707
+ deletedDate: string | null;
708
+ tblReturnDetails: TblReturnDetail[];
709
+ }
710
+ interface TblReturnDetail {
711
+ returnDetailID: number;
712
+ returnID: number;
713
+ orderDetailID: number;
714
+ quantity: number;
715
+ weight?: number | null;
716
+ pricePerGram?: number | null;
717
+ isWeightBased: boolean;
718
+ amount: number;
719
+ batchID: number;
720
+ productDetailID: number;
721
+ reason: string | null;
722
+ syncStatusID: number;
723
+ masterCodeID: number | null;
724
+ savedBy: number | null;
725
+ savedDate: string | null;
726
+ deletedBy: number | null;
727
+ deletedDate: string | null;
728
+ tblProductDetails?: IProductDetails;
729
+ }
730
+
731
+ interface PaymentOptions {
732
+ paymentTypeID: string;
733
+ paymentLabel: string;
734
+ amount: number | null;
735
+ voucherNumber: string | null;
736
+ cardNumber: string | null;
737
+ bankTerminalID?: number | null;
738
+ }
739
+ interface IPayment {
740
+ clientID: number;
741
+ discountCode: string;
742
+ payments: PaymentOptions[];
743
+ products: BatchData[] | IProductDetails[];
744
+ isDownPayment: boolean;
745
+ commissionedBy: number | null;
746
+ }
747
+ interface IPaymentMethod {
748
+ id: number;
749
+ paymentMethod: string;
750
+ amount: number;
751
+ }
752
+ interface IPaymentMethodAmountExpected {
753
+ id: number;
754
+ paymentMethod: string;
755
+ amountExpected: number | null;
756
+ amount: number;
757
+ }
758
+
759
+ interface IPermissionRole {
760
+ permissionRole: PermissionRole[];
761
+ moduleNames: string[];
762
+ permissionNames: string[];
763
+ roleNames: string[];
764
+ }
765
+ interface PermissionRole {
766
+ role_PermissionID: number;
767
+ roleID: number;
768
+ permissionID: number;
769
+ moduleID: number;
770
+ hasPermission: boolean;
771
+ syncStatusID: number;
772
+ masterCodeID: null;
773
+ savedBy: number;
774
+ savedDate: Date;
775
+ deletedBy: null;
776
+ deletedDate: null;
777
+ tblModules: TblModules;
778
+ tblPermissions: TblPermissions;
779
+ tblRoles: TblRoles;
780
+ }
781
+ interface TblModules {
782
+ moduleName: string;
783
+ }
784
+ interface TblPermissions {
785
+ permission: Permission;
786
+ }
787
+ declare enum Permission {
788
+ Crear = "Crear",
789
+ Editar = "Editar",
790
+ Eliminar = "Eliminar",
791
+ Ver = "Ver"
792
+ }
793
+ interface TblRoles {
794
+ role: string;
795
+ }
796
+
797
+ interface IPricePerGramHistory {
798
+ historyID: number;
799
+ entityType: 'material' | 'product' | 'productDetail';
800
+ entityID: number;
801
+ pricePerGram: number;
802
+ effectiveDate: string;
803
+ expirationDate?: string | null;
804
+ isActive: boolean;
805
+ syncStatusID: number;
806
+ masterCodeID?: number | null;
807
+ savedBy?: number | null;
808
+ savedDate?: string | null;
809
+ deletedBy?: number | null;
810
+ deletedDate?: string | null;
811
+ }
812
+ interface PricePerGramResponse {
813
+ pricePerGram: number | null;
814
+ source: 'productDetail' | 'product' | 'material';
815
+ sourceId: number;
816
+ isHistoric: boolean;
817
+ effectiveDate?: string;
818
+ }
819
+ interface PriceCalculationResponse {
820
+ productDetailID: number;
821
+ productName: string;
822
+ weight: number;
823
+ pricePerGram: number;
824
+ totalPrice: number;
825
+ priceSource: string;
826
+ sourceId: number;
827
+ isHistoric: boolean;
828
+ effectiveDate?: string;
829
+ }
830
+ interface UpdatePriceRequest {
831
+ entityType: 'material' | 'product' | 'productDetail';
832
+ entityID: number;
833
+ newPrice: number;
834
+ effectiveDate?: string;
835
+ }
836
+ interface SchedulePriceRequest {
837
+ entityType: 'material' | 'product' | 'productDetail';
838
+ entityID: number;
839
+ pricePerGram: number;
840
+ effectiveDate: string;
841
+ expirationDate?: string;
842
+ }
843
+ interface CalculatePriceRequest {
844
+ productDetailID: number;
845
+ weight: number;
846
+ }
847
+ interface WeightBasedSale {
848
+ productDetailID: number;
849
+ productName: string;
850
+ weight: number;
851
+ pricePerGram: number;
852
+ totalPrice: number;
853
+ priceSource: string;
854
+ sourceId: number;
855
+ isHistoric: boolean;
856
+ effectiveDate?: string;
857
+ }
858
+ interface PricePerGramForm {
859
+ entityType: 'material' | 'product' | 'productDetail';
860
+ entityID: number;
861
+ newPrice: number;
862
+ effectiveDate?: string;
863
+ }
864
+
865
+ interface IPriceTypeResponse {
866
+ total: number;
867
+ data: IPriceType[];
868
+ skip: number;
869
+ limit: number;
870
+ }
871
+ interface IPriceType {
872
+ priceTypeID: number;
873
+ priceName: string;
874
+ price: number;
875
+ syncStatusID: number;
876
+ masterCodeID: number;
877
+ savedBy: number;
878
+ savedDate: Date;
879
+ deletedBy: number;
880
+ deletedDate: Date;
881
+ }
882
+
883
+ interface IPromotionResponse {
884
+ total: number;
885
+ data: IPromotion[];
886
+ skip: number;
887
+ limit: number;
888
+ }
889
+ interface IPromotion {
890
+ promotionID: number;
891
+ promotionName: string;
892
+ startDate: Date;
893
+ endDate: Date;
894
+ isActive: number;
895
+ description: string;
896
+ promotionTypeID: number;
897
+ productID: null;
898
+ batchID: null;
899
+ providerID: null;
900
+ n: null;
901
+ m: null;
902
+ discountPercentage: null;
903
+ priceTypeID: null;
904
+ targetProductID: null;
905
+ discountAmount: number;
906
+ syncStatusID: number;
907
+ masterCodeID: number;
908
+ savedBy: number;
909
+ savedDate: Date;
910
+ deletedBy: null;
911
+ deletedDate: null;
912
+ tblPromotions_targetProductIDTotblProducts: TblPromotionsTargetProductIDTotblProduct[];
913
+ tblPromotionTypes: TblPromotionTypes;
914
+ }
915
+ interface TblPromotionTypes {
916
+ promotionTypeID: number;
917
+ promotionType: string;
918
+ description: string;
919
+ syncStatusID: number;
920
+ masterCodeID: number;
921
+ savedBy: number;
922
+ savedDate: Date;
923
+ deletedBy: null;
924
+ deletedDate: null;
925
+ }
926
+ interface TblPromotionsTargetProductIDTotblProduct {
927
+ promotionID: number;
928
+ productID: number;
929
+ syncStatusID: number;
930
+ masterCodeID: number;
931
+ savedBy: number;
932
+ savedDate: Date;
933
+ deletedBy: null;
934
+ deletedDate: null;
935
+ tblProducts: IProduct;
936
+ }
937
+ interface IPromotionType {
938
+ promotionTypeID: number;
939
+ promotionType: string;
940
+ description: string;
941
+ syncStatusID: number;
942
+ masterCodeID: number;
943
+ savedBy: number;
944
+ savedDate: Date;
945
+ deletedBy: null;
946
+ deletedDate: null;
947
+ }
948
+ declare enum PromotionTypeEnum {
949
+ NXM = "NXM",
950
+ PRODUCTO = "PRODUCTO",
951
+ TEMPORADA = "TEMPORADA",
952
+ PROVEEDOR = "PROVEEDOR",
953
+ LOTE = "LOTE"
954
+ }
955
+
956
+ interface IMovementResponse {
957
+ total: number;
958
+ data: IMovement[];
959
+ skip: number;
960
+ limit: number;
961
+ }
962
+ interface IMovementResponse {
963
+ total: number;
964
+ data: IMovement[];
965
+ skip: number;
966
+ limit: number;
967
+ }
968
+ interface IMovement {
969
+ id: number;
970
+ title: string;
971
+ description: string;
972
+ }
973
+ interface IMovement {
974
+ stockMovementID: number;
975
+ comment: string;
976
+ quantity: number;
977
+ productName: string;
978
+ movementDate: string;
979
+ originWareHouse: string;
980
+ destinationWareHouse: string;
981
+ userName: string;
982
+ syncStatusID: number;
983
+ masterCodeID: null;
984
+ savedBy: null;
985
+ savedDate: null;
986
+ deletedBy: null;
987
+ deletedDate: null;
988
+ }
989
+ interface IProviderResponse {
990
+ data: IProvider[];
991
+ skip: number;
992
+ limit: number;
993
+ total: number;
994
+ }
995
+ interface IProvider {
996
+ providerID: number;
997
+ firstName: string;
998
+ lastName: string;
999
+ email: string;
1000
+ mainPhone: string;
1001
+ secondaryPhone: null;
1002
+ businessName: string;
1003
+ RFC: null;
1004
+ webSite: null;
1005
+ addressID: null;
1006
+ providerImage: null;
1007
+ syncStatusID: number;
1008
+ masterCodeID: null;
1009
+ savedBy: number;
1010
+ savedDate: Date;
1011
+ deletedBy: null;
1012
+ deletedDate: null;
1013
+ }
1014
+ interface IProviderForSelect {
1015
+ providerID: number;
1016
+ userID: number;
1017
+ mainPhone: string;
1018
+ secondaryPhone: null;
1019
+ businessName: string;
1020
+ RFC: null;
1021
+ webSite: null;
1022
+ addressID: number;
1023
+ providerImage: null;
1024
+ syncStatusID: number;
1025
+ masterCodeID: null;
1026
+ savedBy: null;
1027
+ savedDate: null;
1028
+ deletedBy: null;
1029
+ deletedDate: null;
1030
+ tblUsers_tblProviders_userIDTotblUsers: TblUsersTblProvidersUserIDTotblUsers;
1031
+ providerWithPhone: string;
1032
+ providerName: string;
1033
+ }
1034
+ interface TblUsersTblProvidersUserIDTotblUsers {
1035
+ firstName: string;
1036
+ lastName: string;
1037
+ }
1038
+ interface TblProvidersTblProvidersUserIDTotblUser {
1039
+ providerID: number;
1040
+ userID: number;
1041
+ mainPhone: string;
1042
+ secondaryPhone: null;
1043
+ businessName: string;
1044
+ RFC: null;
1045
+ webSite: null;
1046
+ addressID: null;
1047
+ providerImage: null;
1048
+ syncStatusID: number;
1049
+ masterCodeID: null;
1050
+ savedBy: null;
1051
+ savedDate: null;
1052
+ deletedBy: null;
1053
+ deletedDate: null;
1054
+ }
1055
+ interface IProviderRequest {
1056
+ name: string;
1057
+ email: string;
1058
+ phone: string;
1059
+ businessName: string;
1060
+ }
1061
+
1062
+ interface IStockByWarehouseReport {
1063
+ warehouse: string;
1064
+ product: string;
1065
+ batch: string;
1066
+ stock: number;
1067
+ }
1068
+ declare enum ComparisonBy {
1069
+ YEAR = "year",
1070
+ MONTH = "month",
1071
+ WEEK = "week",
1072
+ CUSTOM = "custom"
1073
+ }
1074
+ declare enum ChartType {
1075
+ BAR = "bar",
1076
+ LINE = "line",
1077
+ PIE = "pie"
1078
+ }
1079
+ interface IReportX {
1080
+ reportDataString: string;
1081
+ paymentMethods?: Array<{
1082
+ paymentMethod: string;
1083
+ amount: number;
1084
+ }>;
1085
+ }
1086
+ interface IReportZ {
1087
+ reportDataString: string;
1088
+ headerData: {
1089
+ cutDate: string;
1090
+ cutTime: string;
1091
+ terminalNumber: string;
1092
+ cashierID: number;
1093
+ cashierName: string;
1094
+ zCutFolio: string;
1095
+ previousZCutFolio: string;
1096
+ };
1097
+ salesSummary: {
1098
+ grossSales: number;
1099
+ totalReturns: number;
1100
+ totalDiscounts: number;
1101
+ netSubtotal: number;
1102
+ dayTotal: number;
1103
+ };
1104
+ paymentMethods: Array<{
1105
+ paymentMethod: string;
1106
+ amount: number;
1107
+ }>;
1108
+ cashMovements: {
1109
+ initialFund: number;
1110
+ cashDeposits: number;
1111
+ cashWithdrawals: number;
1112
+ totalCashAtClosing: number;
1113
+ };
1114
+ folioControl: {
1115
+ firstFolio: string;
1116
+ lastFolio: string;
1117
+ };
1118
+ }
1119
+ interface IReportComparisonByTimeFrame {
1120
+ currentPeriod: Period;
1121
+ previousPeriod: Period;
1122
+ }
1123
+ interface Period {
1124
+ title: string;
1125
+ dateRange: DateRange;
1126
+ data: ReportData[];
1127
+ totalByPeriod: number;
1128
+ materialsSummary?: MaterialSummary[];
1129
+ }
1130
+ interface MaterialSummary {
1131
+ materialName: string;
1132
+ totalGrams: number;
1133
+ totalRevenue: number;
1134
+ productCount: number;
1135
+ averagePricePerGram: number;
1136
+ }
1137
+ interface ReportData {
1138
+ period: string;
1139
+ products: ReportDataProduct[];
1140
+ }
1141
+ interface ReportDataProduct {
1142
+ productName: string;
1143
+ salesInNumberByPeriod: number;
1144
+ salesInPriceByPeriod: number;
1145
+ materialName?: string;
1146
+ totalWeight?: number;
1147
+ averageWeight?: number;
1148
+ categoryName?: string;
1149
+ }
1150
+ interface ProductInfo {
1151
+ productName: string;
1152
+ category: string;
1153
+ quantitySold: number;
1154
+ totalRevenue: number;
1155
+ }
1156
+ interface DateRange {
1157
+ start: Date;
1158
+ end: Date;
1159
+ }
1160
+ interface IReportInventory {
1161
+ productName: string;
1162
+ productVariant: string;
1163
+ price: number;
1164
+ category: string;
1165
+ material: string;
1166
+ stock: number;
1167
+ stockID: number;
1168
+ warehouse: string;
1169
+ provider: string;
1170
+ lote: string;
1171
+ size: string;
1172
+ caliber: string;
1173
+ purity: string;
1174
+ weight: number;
1175
+ batchID: number;
1176
+ productID: number;
1177
+ productDetailID: number;
1178
+ batchComment?: string;
1179
+ unitCost?: number;
1180
+ profitPercentage?: number;
1181
+ }
1182
+
1183
+ interface IRole {
1184
+ roleID: number;
1185
+ role: string;
1186
+ description: string;
1187
+ syncStatusID: number;
1188
+ masterCodeID: null;
1189
+ savedBy: null;
1190
+ savedDate: null;
1191
+ deletedBy: null;
1192
+ deletedDate: null;
1193
+ }
1194
+
1195
+ interface IStockMovementResponse {
1196
+ total: number;
1197
+ data: IStockMovement[];
1198
+ skip: number;
1199
+ limit: number;
1200
+ }
1201
+ interface IStockMovementResponse {
1202
+ total: number;
1203
+ data: IStockMovement[];
1204
+ skip: number;
1205
+ limit: number;
1206
+ }
1207
+ interface IStockMovement {
1208
+ stockMovementID: number;
1209
+ comment: string;
1210
+ quantity: number;
1211
+ productName: string;
1212
+ movementDate: string;
1213
+ originWareHouse: string;
1214
+ destinationWareHouse: string;
1215
+ userName: string;
1216
+ syncStatusID: number;
1217
+ masterCodeID: null;
1218
+ savedBy: null;
1219
+ savedDate: null;
1220
+ deletedBy: null;
1221
+ deletedDate: null;
1222
+ }
1223
+
1224
+ interface ITag {
1225
+ tagID: number;
1226
+ tag: string;
1227
+ syncStatusID: number;
1228
+ masterCodeID: number | null;
1229
+ savedBy: number | null;
1230
+ savedDate: string | null;
1231
+ deletedBy: number | null;
1232
+ deletedDate: string | null;
1233
+ }
1234
+
1235
+ interface ITaxResponse {
1236
+ total: number;
1237
+ data: ITax[];
1238
+ skip: number;
1239
+ limit: number;
1240
+ }
1241
+ interface ITax {
1242
+ taxID: number;
1243
+ tax: string;
1244
+ taxFullName: string;
1245
+ syncStatusID: number;
1246
+ masterCodeID: null;
1247
+ savedBy: null;
1248
+ savedDate: null;
1249
+ deletedBy: null;
1250
+ deletedDate: null;
1251
+ }
1252
+
1253
+ /**
1254
+ * Position options for tooltip placement relative to the selector
1255
+ */
1256
+ type TourStepSide = 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
1257
+ /**
1258
+ * Interface for a single step in a tour - compatible with nextstepjs
1259
+ */
1260
+ interface TourStep {
1261
+ /** An icon or element to display alongside the step title - REQUIRED for nextstepjs compatibility */
1262
+ icon: React.ReactNode | string | null;
1263
+ /** The title of your step */
1264
+ title: string;
1265
+ /** The main content or body of the step */
1266
+ content: React.ReactNode;
1267
+ /** Optional. A string used to target an id that this step refers to. If not provided, card will be displayed in the center top of the document body */
1268
+ selector?: string;
1269
+ /** Optional. Determines where the tooltip should appear relative to the selector */
1270
+ side?: TourStepSide;
1271
+ /** Optional. Determines whether control buttons (next, prev) should be shown if using the default card */
1272
+ showControls?: boolean;
1273
+ /** Optional. Determines whether skip button should be shown if using the default card */
1274
+ showSkip?: boolean;
1275
+ /** Optional. Determines whether keyboard control should be blocked */
1276
+ blockKeyboardControl?: boolean;
1277
+ /** Optional. The padding around the pointer (keyhole) highlighting the target element */
1278
+ pointerPadding?: number;
1279
+ /** Optional. The border-radius of the pointer (keyhole) highlighting the target element */
1280
+ pointerRadius?: number;
1281
+ /** Optional. The route to navigate to when moving to the next step */
1282
+ nextRoute?: string;
1283
+ /** Optional. The route to navigate to when moving to the previous step */
1284
+ prevRoute?: string;
1285
+ /** Optional. The id of the viewport element to use for positioning. If not provided, the document body will be used */
1286
+ viewportID?: string;
1287
+ }
1288
+ /**
1289
+ * Interface for a complete tour configuration
1290
+ */
1291
+ interface TourConfig {
1292
+ /** The name/identifier of the tour */
1293
+ tour: string;
1294
+ /** Array of steps that make up the tour */
1295
+ steps: TourStep[];
1296
+ }
1297
+ /**
1298
+ * Interface for tour state management
1299
+ */
1300
+ interface TourState {
1301
+ /** Whether the tour is currently active */
1302
+ isActive: boolean;
1303
+ /** Current step index */
1304
+ currentStep: number;
1305
+ /** Whether the tour is paused */
1306
+ isPaused: boolean;
1307
+ /** Whether the tour has been completed */
1308
+ isCompleted: boolean;
1309
+ }
1310
+ /**
1311
+ * Interface for tour actions
1312
+ */
1313
+ interface TourActions {
1314
+ /** Start the tour */
1315
+ startTour: () => void;
1316
+ /** Stop the tour */
1317
+ stopTour: () => void;
1318
+ /** Go to next step */
1319
+ nextStep: () => void;
1320
+ /** Go to previous step */
1321
+ prevStep: () => void;
1322
+ /** Skip the current tour */
1323
+ skipTour: () => void;
1324
+ /** Pause the tour */
1325
+ pauseTour: () => void;
1326
+ /** Resume the tour */
1327
+ resumeTour: () => void;
1328
+ /** Go to specific step */
1329
+ goToStep: (stepIndex: number) => void;
1330
+ }
1331
+
1332
+ interface IUser {
1333
+ userID: number;
1334
+ firstName: string;
1335
+ lastName: string;
1336
+ email: string;
1337
+ emailVerifiedAt: null;
1338
+ password: string;
1339
+ roleID: number;
1340
+ rememberToken: string;
1341
+ addressID: null;
1342
+ syncStatusID: number;
1343
+ masterCodeID: null;
1344
+ savedBy: null;
1345
+ savedDate: null;
1346
+ deletedBy: null;
1347
+ deletedDate: null;
1348
+ tblRoles_tblUsers_roleIDTotblRoles: TblRolesTblUsersRoleIDTotblRoles;
1349
+ hasActiveShift?: boolean;
1350
+ }
1351
+ interface UserResponse {
1352
+ total: number;
1353
+ data: IUser[];
1354
+ skip: number;
1355
+ limit: number;
1356
+ }
1357
+ interface IAgent {
1358
+ userID: number;
1359
+ agentFullName: string;
1360
+ }
1361
+ interface AgentResponse {
1362
+ total: number;
1363
+ data: IAgent[];
1364
+ skip: number;
1365
+ limit: number;
1366
+ }
1367
+ interface TblRolesTblUsersRoleIDTotblRoles {
1368
+ role: string;
1369
+ }
1370
+ interface IUserForm {
1371
+ firstName: string;
1372
+ lastName: string;
1373
+ email: string;
1374
+ password?: string;
1375
+ roleID: number;
1376
+ }
1377
+
1378
+ interface IRequest {
1379
+ skip: number;
1380
+ limit: number;
1381
+ query?: string;
1382
+ }
1383
+
1384
+ interface IWareHouseResponse {
1385
+ total: number;
1386
+ data: IWareHouse[];
1387
+ skip: number;
1388
+ limit: number;
1389
+ }
1390
+ interface IWareHouseResponse {
1391
+ total: number;
1392
+ data: IWareHouse[];
1393
+ skip: number;
1394
+ limit: number;
1395
+ }
1396
+ interface IWareHouseSelect {
1397
+ wareHouseID: number;
1398
+ wareHouseWithLocation: string;
1399
+ stockAvailable: number;
1400
+ }
1401
+ interface IWareHouse {
1402
+ id: number;
1403
+ title: string;
1404
+ description: string;
1405
+ }
1406
+ interface IWareHouse {
1407
+ wareHouseID: number;
1408
+ wareHouse: string;
1409
+ isShowroom: boolean;
1410
+ physicalLocation: string;
1411
+ physicalLocationID: number;
1412
+ userName: string;
1413
+ syncStatusID: number;
1414
+ masterCodeID: null;
1415
+ savedBy: null;
1416
+ savedDate: null;
1417
+ deletedBy: null;
1418
+ deletedDate: null;
1419
+ }
1420
+
1421
+ /**
1422
+ * Configuration for the shared API client.
1423
+ * Each consuming app must call configureApi() with its own baseURL and auth.
1424
+ */
1425
+ interface IApiConfig {
1426
+ /** Backend base URL (e.g. "http://localhost:4000/" or "https://api.myapp.com/") */
1427
+ baseURL: string;
1428
+ /** Returns the current auth token for request headers */
1429
+ getToken: () => string | undefined;
1430
+ /** Called when a new token is received after refresh (e.g. update your store) */
1431
+ onTokenRefresh?: (newToken: string) => void;
1432
+ /** Called when refresh fails (e.g. clear session, redirect to login) */
1433
+ onUnauthorized?: () => void;
1434
+ }
1435
+ declare let api: AxiosInstance;
1436
+ /**
1437
+ * Configure the shared API client. Must be called by the consuming app before using any service.
1438
+ * @example
1439
+ * // In your app (e.g. main.tsx or before first API call):
1440
+ * import { configureApi } from 'erp-pos-ecommerce-shared'
1441
+ * import { useAuthStore } from './store/authStore'
1442
+ *
1443
+ * configureApi({
1444
+ * baseURL: import.meta.env.VITE_API_URL ?? 'http://localhost:4000/',
1445
+ * getToken: () => useAuthStore.getState().token,
1446
+ * onTokenRefresh: (newToken) => useAuthStore.setState({ token: newToken }),
1447
+ * onUnauthorized: () => { useAuthStore.setState({ token: undefined }); redirectToLogin() }
1448
+ * })
1449
+ */
1450
+ declare function configureApi(config: IApiConfig): AxiosInstance;
1451
+
1452
+ declare const getAttributes: ({ skip, limit, query }: {
1453
+ skip: number;
1454
+ limit: number;
1455
+ query: string;
1456
+ }) => Promise<IAttributeResponse>;
1457
+ declare const getAttributesForSelect: () => Promise<IAttribute[]>;
1458
+ declare const getAttributeById: (id: string) => Promise<IAttribute>;
1459
+ declare const getAttributesByProductID: ({ productID }: {
1460
+ productID: string;
1461
+ }) => Promise<IAttribute[]>;
1462
+ declare const getAttributesByCategoryID: ({ categoryID }: {
1463
+ categoryID: string;
1464
+ }) => Promise<IAttribute[]>;
1465
+ declare const getAttributeValues: ({ attributeID }: {
1466
+ attributeID: string;
1467
+ }) => Promise<IAttributeValue[]>;
1468
+ declare const createAttribute: ({ attribute }: {
1469
+ attribute: {
1470
+ name: string;
1471
+ values: string[];
1472
+ productID: number;
1473
+ };
1474
+ }) => Promise<IAttribute>;
1475
+ declare const createAttributesForCategory: ({ attributes }: {
1476
+ attributes: {
1477
+ categoryID: string;
1478
+ attributes: {
1479
+ name: string;
1480
+ values: string[];
1481
+ pricePerGram?: number | null;
1482
+ }[];
1483
+ };
1484
+ }) => Promise<IAttribute>;
1485
+ declare const updateAttribute: ({ id, attribute }: {
1486
+ id: string;
1487
+ attribute: IAttribute;
1488
+ }) => Promise<IAttribute>;
1489
+ declare const updateAttributesForCategory: ({ id, attributes }: {
1490
+ id: string;
1491
+ attributes: {
1492
+ attributes: string[];
1493
+ };
1494
+ }) => Promise<IAttribute>;
1495
+ declare const deleteAttribute: ({ id }: {
1496
+ id: string;
1497
+ }) => Promise<IAttribute>;
1498
+ declare const undeleteAttribute: ({ id }: {
1499
+ id: string;
1500
+ }) => Promise<IAttribute>;
1501
+ declare const createAttributeValue: ({ attributeID, value }: {
1502
+ attributeID: number;
1503
+ value: string;
1504
+ }) => Promise<IAttributeValue>;
1505
+
1506
+ interface LoginResponse {
1507
+ user: IUser;
1508
+ token: string;
1509
+ }
1510
+ declare const login: ({ email, password }: {
1511
+ email: string;
1512
+ password: string;
1513
+ }) => Promise<LoginResponse>;
1514
+
1515
+ declare const getBankTerminalsForSelect: () => Promise<BankTerminalResponse[]>;
1516
+ declare const getAllBankTerminals: () => Promise<BankTerminalResponse[]>;
1517
+ declare const getBankTerminals: ({ skip, limit, query }: BankTerminalQuery) => Promise<IBankTerminalResponse>;
1518
+ declare const getBankTerminalById: (id: number) => Promise<IBankTerminal>;
1519
+ declare const updateBankTerminal: ({ id, terminal }: {
1520
+ id: number;
1521
+ terminal: IBankTerminalForm;
1522
+ }) => Promise<IBankTerminal>;
1523
+ declare const createBankTerminal: ({ terminal }: {
1524
+ terminal: IBankTerminalForm;
1525
+ }) => Promise<IBankTerminal>;
1526
+ declare const deleteBankTerminal: ({ terminalID }: {
1527
+ terminalID: number;
1528
+ }) => Promise<void>;
1529
+ declare const restoreBankTerminal: ({ terminalID }: {
1530
+ terminalID: number;
1531
+ }) => Promise<void>;
1532
+
1533
+ interface BatchQuery {
1534
+ skip?: number;
1535
+ limit?: number;
1536
+ query?: string;
1537
+ productID?: number;
1538
+ }
1539
+ declare const getBatchesForSelect: () => Promise<IBatch[]>;
1540
+ declare const getBatches: ({ skip, limit, query, productID }: BatchQuery) => Promise<IBatchResponse>;
1541
+ declare const createBatch: (batch: FormData) => Promise<IBatch>;
1542
+ declare const createBatchAndUpdateOtherBatches: (batch: FormData) => Promise<IBatch>;
1543
+ declare const getMatchedBatches: ({ productDetailID }: {
1544
+ productDetailID: number;
1545
+ }) => Promise<IBatch[]>;
1546
+ interface UpdateBatchData {
1547
+ unitCost?: number;
1548
+ unitSellingPrice?: number;
1549
+ profitPercentage?: number;
1550
+ }
1551
+ declare const updateBatch: ({ batchID, batchData }: {
1552
+ batchID: number;
1553
+ batchData: UpdateBatchData;
1554
+ }) => Promise<IBatch>;
1555
+
1556
+ interface CategoryQuery$1 {
1557
+ skip?: number;
1558
+ limit?: number;
1559
+ query?: string;
1560
+ }
1561
+ declare const getCategoriesForSelect: () => Promise<ICategory[]>;
1562
+ declare const getAllCategories: () => Promise<ICategory[]>;
1563
+ declare const getCategories: ({ skip, limit, query }: CategoryQuery$1) => Promise<ICategoryResponse>;
1564
+ declare const getCategoryById: (id: number) => Promise<ICategory>;
1565
+ declare const updateCategory: ({ id, category }: {
1566
+ id: number;
1567
+ category: ICategory;
1568
+ }) => Promise<ICategory>;
1569
+ declare const createCategory: ({ category }: {
1570
+ category: ICategory;
1571
+ }) => Promise<ICategory>;
1572
+ declare const deleteCategory: ({ categoryID }: {
1573
+ categoryID: number;
1574
+ }) => Promise<void>;
1575
+ declare const restoreCategory: ({ categoryID }: {
1576
+ categoryID: number;
1577
+ }) => Promise<void>;
1578
+
1579
+ declare const getAllClients: ({ skip, limit, query }: {
1580
+ skip: number;
1581
+ limit: number;
1582
+ query?: string;
1583
+ }) => Promise<IClientResponse>;
1584
+ declare const getClientsForSelect: () => Promise<IClient[]>;
1585
+ declare const getClientById: (clientID: number) => Promise<IClientResponseById>;
1586
+ declare const createClient: (client: IClientRequest) => Promise<IClientResponse>;
1587
+ declare const updateClient: ({ client, id }: {
1588
+ id: string;
1589
+ client: IClient;
1590
+ }) => Promise<IClientResponse>;
1591
+ declare const deleteClient: ({ clientID }: {
1592
+ clientID: number;
1593
+ }) => Promise<IClientResponse>;
1594
+ declare const restoreClient: ({ clientID }: {
1595
+ clientID: number;
1596
+ }) => Promise<IClientResponse>;
1597
+
1598
+ interface ExchangeQuery {
1599
+ skip?: number;
1600
+ limit?: number;
1601
+ query?: string;
1602
+ }
1603
+ interface IExchange {
1604
+ exchangeRateID: number;
1605
+ valorEnPesos: number;
1606
+ fromDate: string;
1607
+ toDate: string;
1608
+ syncStatusID: number;
1609
+ masterCodeID: null;
1610
+ savedBy: null;
1611
+ savedDate: null;
1612
+ deletedBy: null;
1613
+ deletedDate: null;
1614
+ }
1615
+ interface PaymentType {
1616
+ value: number;
1617
+ label: string;
1618
+ }
1619
+ interface IExchangeResponse {
1620
+ total: number;
1621
+ data: IExchange[];
1622
+ skip: number;
1623
+ limit: number;
1624
+ }
1625
+ declare const getPaymentTypes: () => Promise<PaymentType[]>;
1626
+ declare const getExchangeRates: ({ skip, limit, query }: ExchangeQuery) => Promise<IExchangeResponse>;
1627
+ declare const getExchangeRate: () => Promise<IExchange>;
1628
+ declare const createExchangeRate: ({ exchangeRate }: {
1629
+ exchangeRate: IExchange;
1630
+ }) => Promise<IExchange>;
1631
+
1632
+ interface GenderResponse {
1633
+ data: IGender[];
1634
+ }
1635
+ declare const getAllGenders: () => Promise<GenderResponse>;
1636
+
1637
+ interface HealthCheckResponse {
1638
+ status: string;
1639
+ timestamp: string;
1640
+ services: {
1641
+ backend: {
1642
+ status: string;
1643
+ message?: string;
1644
+ };
1645
+ database: {
1646
+ status: string;
1647
+ message?: string;
1648
+ };
1649
+ };
1650
+ }
1651
+ declare const healthService: {
1652
+ check(): Promise<HealthCheckResponse>;
1653
+ };
1654
+
1655
+ interface LocationQuery {
1656
+ skip?: number;
1657
+ limit?: number;
1658
+ query?: string;
1659
+ }
1660
+ interface LocationResponse {
1661
+ physicalLocationID: number;
1662
+ name: string;
1663
+ addressID: number;
1664
+ isOpen: boolean;
1665
+ syncStatusID: number;
1666
+ masterCodeID: null;
1667
+ savedBy: null;
1668
+ savedDate: null;
1669
+ deletedBy: null;
1670
+ deletedDate: null;
1671
+ }
1672
+ declare const getAllLocations: () => Promise<LocationResponse[]>;
1673
+ declare const getLocationsForSelect: () => Promise<LocationResponse[]>;
1674
+ declare const getLocations: ({ skip, limit, query }: LocationQuery) => Promise<ILocationResponse>;
1675
+ declare const getLocationById: (id: number) => Promise<ILocation>;
1676
+ declare const updateLocation: ({ id, location }: {
1677
+ id: number;
1678
+ location: FormData;
1679
+ }) => Promise<ILocation>;
1680
+ declare const createLocation: (location: FormData) => Promise<ILocation>;
1681
+ declare const deleteLocation: ({ physicalLocationID }: {
1682
+ physicalLocationID: number;
1683
+ }) => Promise<void>;
1684
+ declare const restoreLocation: ({ physicalLocationID }: {
1685
+ physicalLocationID: number;
1686
+ }) => Promise<void>;
1687
+
1688
+ interface MaterialResponse {
1689
+ data: IMaterial[];
1690
+ total: number;
1691
+ skip: number;
1692
+ limit: number;
1693
+ }
1694
+ interface MaterialQuery {
1695
+ skip?: number;
1696
+ limit?: number;
1697
+ query?: string;
1698
+ }
1699
+ declare const getAllMaterials: () => Promise<IMaterial[]>;
1700
+ declare const getMaterials: ({ skip, limit, query }: MaterialQuery) => Promise<MaterialResponse>;
1701
+ declare const getMaterialById: (materialID: number) => Promise<IMaterial>;
1702
+ declare const getMaterialsForSelect: () => Promise<IMaterial[]>;
1703
+ declare const createMaterial: ({ material }: {
1704
+ material: IMaterial;
1705
+ }) => Promise<IMaterial>;
1706
+ declare const updateMaterial: ({ materialID, material }: {
1707
+ materialID: number;
1708
+ material: IMaterial;
1709
+ }) => Promise<IMaterial>;
1710
+ declare const deleteMaterial: ({ materialID }: {
1711
+ materialID: number;
1712
+ }) => Promise<void>;
1713
+ declare const undeleteMaterial: ({ materialID }: {
1714
+ materialID: number;
1715
+ }) => Promise<void>;
1716
+
1717
+ declare const getAllModules: () => Promise<IModule[]>;
1718
+
1719
+ declare const getOrders: ({ skip, limit, query, commissionedBy, orderStatus, startDate, endDate, showOnlyReturns }: {
1720
+ skip?: number;
1721
+ limit?: number;
1722
+ query?: string;
1723
+ commissionedBy?: string;
1724
+ orderStatus?: string[];
1725
+ startDate?: string | null;
1726
+ endDate?: string | null;
1727
+ showOnlyReturns?: boolean;
1728
+ }) => Promise<IOrderResponse>;
1729
+ declare const getOrderById: ({ orderID }: {
1730
+ orderID: number;
1731
+ }) => Promise<IOrder>;
1732
+ declare const getOrdersStatusForSelect: () => Promise<TblOrderStatus[]>;
1733
+ interface ChangeProductRequest {
1734
+ orderID: number;
1735
+ oldOrderDetailID: number;
1736
+ newProductDetailID: number;
1737
+ quantity: number;
1738
+ reason?: string;
1739
+ }
1740
+ interface ChangeProductResponse {
1741
+ success: boolean;
1742
+ message: string;
1743
+ priceDifference: number;
1744
+ requiresAdditionalPayment: boolean;
1745
+ requiresRefund: boolean;
1746
+ order: IOrder;
1747
+ }
1748
+ declare const changeOrderProduct: (changeData: ChangeProductRequest) => Promise<ChangeProductResponse>;
1749
+
1750
+ declare const sendPaymentData: ({ payment }: {
1751
+ payment: IPayment;
1752
+ }) => Promise<IPayment>;
1753
+ declare const getPaymentMethods: () => Promise<IPaymentMethod[]>;
1754
+ declare const getPaymentMethodsWithAmountExpected: () => Promise<IPaymentMethodAmountExpected[]>;
1755
+ declare const sendCreditPaymentData: ({ payment, orderID }: {
1756
+ payment: IPayment;
1757
+ orderID: number;
1758
+ }) => Promise<IPayment>;
1759
+
1760
+ interface IUpdatePermission {
1761
+ id: number;
1762
+ hasPermission: boolean;
1763
+ }
1764
+ declare const getAllPermissions: () => Promise<IPermissionRole>;
1765
+ declare const updatePermission: (permission: IUpdatePermission) => Promise<IUpdatePermission>;
1766
+ declare const getPermissionRoleByRoleID: (roleID: number) => Promise<PermissionRole[]>;
1767
+
1768
+ declare const pricePerGramService: {
1769
+ getPrice(params: {
1770
+ productDetailID?: number;
1771
+ productID?: number;
1772
+ materialID?: number;
1773
+ }): Promise<PricePerGramResponse>;
1774
+ updatePrice(request: UpdatePriceRequest): Promise<void>;
1775
+ getHistory(entityType: "material" | "product" | "productDetail", entityID: number, limit?: number): Promise<IPricePerGramHistory[]>;
1776
+ schedulePrice(request: SchedulePriceRequest): Promise<void>;
1777
+ calculatePrice(request: CalculatePriceRequest): Promise<PriceCalculationResponse>;
1778
+ deleteFuturePrice(historyID: number): Promise<void>;
1779
+ updateFuturePrice(historyID: number, request: SchedulePriceRequest): Promise<void>;
1780
+ isWeightBased(productDetailID: number): Promise<boolean>;
1781
+ };
1782
+
1783
+ declare const getPriceTypesForSelect: () => Promise<IPriceType[]>;
1784
+ declare const getAllPriceTypes: ({ skip, limit, query }: IRequest) => Promise<IPriceTypeResponse>;
1785
+ declare const createPriceType: ({ priceType }: {
1786
+ priceType: IPriceType;
1787
+ }) => Promise<IPriceType>;
1788
+ declare const getPriceTypeById: ({ priceTypeID }: {
1789
+ priceTypeID: number;
1790
+ }) => Promise<IPriceType>;
1791
+ declare const updatePriceType: ({ priceTypeID, priceType }: {
1792
+ priceTypeID: number;
1793
+ priceType: IPriceType;
1794
+ }) => Promise<IPriceType>;
1795
+ declare const deletePriceType: ({ priceTypeID }: {
1796
+ priceTypeID: number;
1797
+ }) => Promise<void>;
1798
+ declare const undeletePriceType: ({ priceTypeID }: {
1799
+ priceTypeID: number;
1800
+ }) => Promise<void>;
1801
+
1802
+ interface ProductQuery {
1803
+ skip?: number;
1804
+ limit?: number;
1805
+ filters?: FilterType;
1806
+ }
1807
+ interface CategoryQuery {
1808
+ category: number;
1809
+ skip?: number;
1810
+ limit?: number;
1811
+ filters?: FilterType;
1812
+ }
1813
+ declare const getProductsForSelect: () => Promise<IProduct[]>;
1814
+ declare const getProducts: ({ skip, limit, filters }: ProductQuery) => Promise<IProductDetailsResponse>;
1815
+ declare const getProductsTable: ({ skip, limit, filters }: ProductQuery) => Promise<IProductResponse>;
1816
+ declare const getProductById: (id: number) => Promise<IProduct>;
1817
+ declare const getProductVariants: ({ productID, skip, limit, query }: {
1818
+ productID: number;
1819
+ skip?: number;
1820
+ limit?: number;
1821
+ query?: string;
1822
+ }) => Promise<IProductDetailsResponse>;
1823
+ declare const getProductVariantsForSelect: ({ productID }: {
1824
+ productID: number;
1825
+ }) => Promise<IProductDetails[]>;
1826
+ declare const getProductVariantById: ({ id }: {
1827
+ id: number;
1828
+ }) => Promise<IProductDetails>;
1829
+ declare const createProductVariant: (variant: FormData) => Promise<IProductDetails>;
1830
+ declare const updateProductVariant: (data: FormData) => Promise<IProductDetails>;
1831
+ declare const deleteProductVariant: ({ productDetailID }: {
1832
+ productDetailID: number;
1833
+ }) => Promise<void>;
1834
+ declare const restoreProductVariant: ({ productDetailID }: {
1835
+ productDetailID: number;
1836
+ }) => Promise<void>;
1837
+ declare const createProduct: (product: FormData) => Promise<IProduct>;
1838
+ declare const updateProduct: ({ id, product }: {
1839
+ id: number;
1840
+ product: FormData;
1841
+ }) => Promise<IProduct>;
1842
+ declare const deleteImageFromProduct: (imageId: number) => Promise<void>;
1843
+ declare const deleteProduct: ({ productID }: {
1844
+ productID: number;
1845
+ }) => Promise<void>;
1846
+ declare const restoreProduct: ({ productID }: {
1847
+ productID: number;
1848
+ }) => Promise<void>;
1849
+ declare const getProductsByCategory: ({ category, skip, limit, filters }: CategoryQuery) => Promise<IProductResponse>;
1850
+ interface PrintProductTagResponse {
1851
+ message?: string;
1852
+ [key: string]: unknown;
1853
+ }
1854
+ declare const printProductTag: ({ stockID, productID, isSmall }: {
1855
+ stockID: number;
1856
+ productID: number;
1857
+ isSmall: boolean;
1858
+ }) => Promise<PrintProductTagResponse>;
1859
+
1860
+ declare const isAValidDiscountCode: (discountCode: string) => Promise<boolean>;
1861
+ interface PromotionQuery {
1862
+ skip?: number;
1863
+ limit?: number;
1864
+ query?: string;
1865
+ }
1866
+ declare const getPromotions: ({ skip, limit, query }: PromotionQuery) => Promise<IPromotionResponse>;
1867
+ declare const getPromotionsTypeForSelect: () => Promise<IPromotionType[]>;
1868
+ declare const createPromotion: (promotion: IPromotion) => Promise<IPromotion>;
1869
+ declare const getPromotionById: ({ id }: {
1870
+ id: string;
1871
+ }) => Promise<IPromotion>;
1872
+ declare const updatePromotion: ({ id, promotion }: {
1873
+ id: string;
1874
+ promotion: IPromotion;
1875
+ }) => Promise<IPromotion>;
1876
+
1877
+ declare const getAllProviders: ({ skip, limit, query }: {
1878
+ skip: number;
1879
+ limit: number;
1880
+ query?: string;
1881
+ }) => Promise<IProviderResponse>;
1882
+ declare const getProviderById: ({ providerID }: {
1883
+ providerID: number;
1884
+ }) => Promise<IProvider>;
1885
+ declare const getProvidersForSelect: () => Promise<IProviderForSelect[]>;
1886
+ declare const createProvider: (provider: IProviderRequest) => Promise<IProviderResponse>;
1887
+ declare const updateProvider: ({ providerID, provider }: {
1888
+ providerID: string;
1889
+ provider: IProvider;
1890
+ }) => Promise<IProviderResponse>;
1891
+ declare const deleteProvider: ({ providerID }: {
1892
+ providerID: number;
1893
+ }) => Promise<IProviderResponse>;
1894
+ declare const restoreProvider: ({ providerID }: {
1895
+ providerID: number;
1896
+ }) => Promise<IProviderResponse>;
1897
+
1898
+ interface QRBaseUrlResponse {
1899
+ success: boolean;
1900
+ baseUrl: string;
1901
+ }
1902
+ interface PrintQRResponse {
1903
+ success?: boolean;
1904
+ message?: string;
1905
+ data?: {
1906
+ url?: string;
1907
+ productDetailID?: number;
1908
+ printerResult?: boolean;
1909
+ };
1910
+ [key: string]: unknown;
1911
+ }
1912
+ /**
1913
+ * Obtiene la URL base configurada para los códigos QR (QR_BASE_URL del backend).
1914
+ */
1915
+ declare const getQRBaseUrl: () => Promise<string>;
1916
+ /**
1917
+ * Imprime un código QR en la impresora térmica.
1918
+ * El backend construye la URL: {QR_BASE_URL}/producto/{productDetailID}
1919
+ */
1920
+ declare const printQR: ({ productDetailID, printerName }: {
1921
+ productDetailID: number;
1922
+ printerName?: string;
1923
+ }) => Promise<PrintQRResponse>;
1924
+
1925
+ declare const getStockByWarehouseReport: ({ limit, allWarehouses }: {
1926
+ limit: number;
1927
+ allWarehouses: boolean;
1928
+ }) => Promise<IStockByWarehouseReport[]>;
1929
+ declare const getReportX: ({ startDate, sellerID, isShiftChange }: {
1930
+ startDate: string;
1931
+ sellerID: number;
1932
+ isShiftChange: boolean;
1933
+ }) => Promise<IReportX>;
1934
+ declare const printReportX: ({ startDate, sellerID }: {
1935
+ startDate: string;
1936
+ sellerID: number;
1937
+ }) => Promise<boolean>;
1938
+ declare const getReportComparisonByTimeFrame: ({ startDate, endDate, comparisonBy, productIds }: {
1939
+ startDate: Date;
1940
+ endDate: Date;
1941
+ comparisonBy: ComparisonBy;
1942
+ productIds: string[];
1943
+ }) => Promise<IReportComparisonByTimeFrame>;
1944
+ declare const getReportByInventory: ({ productIDs, categoryIDs, warehouseIDs, providerIDs }: {
1945
+ productIDs: number[] | null;
1946
+ categoryIDs: number[] | null;
1947
+ warehouseIDs: number[] | null;
1948
+ providerIDs: number[] | null;
1949
+ }) => Promise<IReportInventory[]>;
1950
+ declare const getReportZ: ({ startDate, sellerID, isShiftChange }: {
1951
+ startDate: string;
1952
+ sellerID: number;
1953
+ isShiftChange: boolean;
1954
+ }) => Promise<IReportZ>;
1955
+ declare const printReportZ: ({ startDate, sellerID }: {
1956
+ startDate: string;
1957
+ sellerID: number;
1958
+ }) => Promise<boolean>;
1959
+ declare const checkPendingReportZ: () => Promise<Date[]>;
1960
+
1961
+ declare const createReturn: ({ orderId, returnReason, orderDetails, warehouseDestinationID }: {
1962
+ orderId: number;
1963
+ returnReason: string;
1964
+ orderDetails: TblOrderDetail[];
1965
+ warehouseDestinationID: number;
1966
+ }) => Promise<void>;
1967
+ interface GetReturnsByOrderIdResponse {
1968
+ message: string;
1969
+ data: TblReturn[];
1970
+ }
1971
+ declare const getReturnsByOrderId: (orderId: number) => Promise<GetReturnsByOrderIdResponse>;
1972
+
1973
+ declare const getRoles: () => Promise<IRole[]>;
1974
+ declare const getRoleByID: (id: number) => Promise<IRole>;
1975
+ declare const createRole: (role: IRole) => Promise<IRole>;
1976
+ declare const updateRole: (id: number, role: IRole) => Promise<IRole>;
1977
+ declare const deleteRole: (id: number) => Promise<void>;
1978
+
1979
+ interface MovementQuery {
1980
+ skip?: number;
1981
+ limit?: number;
1982
+ query?: string;
1983
+ movementType?: number;
1984
+ }
1985
+ interface MovementResponse {
1986
+ stockMovementID: number;
1987
+ quantity: number;
1988
+ addressID: number;
1989
+ isOpen: boolean;
1990
+ syncStatusID: number;
1991
+ masterCodeID: null;
1992
+ savedBy: null;
1993
+ savedDate: null;
1994
+ deletedBy: null;
1995
+ deletedDate: null;
1996
+ }
1997
+ declare const createMovement: (movement: FormData) => Promise<IStockMovement>;
1998
+ declare const getMovements: ({ skip, limit, query, movementType }: MovementQuery) => Promise<IStockMovementResponse>;
1999
+
2000
+ interface Response {
2001
+ status: boolean;
2002
+ httpStatus: number;
2003
+ message: string;
2004
+ data: unknown;
2005
+ }
2006
+ interface CloseShiftData {
2007
+ sellerID: number;
2008
+ date: string;
2009
+ paymentMethods: {
2010
+ paymentMethodId: number;
2011
+ amount: number;
2012
+ }[];
2013
+ cashBreakdown?: {
2014
+ coinsTotal: number;
2015
+ bills: {
2016
+ denomination: number;
2017
+ quantity: number;
2018
+ }[];
2019
+ };
2020
+ }
2021
+ declare const closeShift: (data: CloseShiftData) => Promise<Response>;
2022
+ declare const makeNewCashMovement: ({ userID, amount, comment, isWithdrawal }: {
2023
+ userID: number | undefined;
2024
+ amount: number;
2025
+ comment?: string;
2026
+ isWithdrawal: boolean;
2027
+ }) => Promise<Response>;
2028
+ declare const setNewShift: ({ userID, initialCash }: {
2029
+ userID: number | undefined;
2030
+ initialCash: number;
2031
+ }) => Promise<Response>;
2032
+
2033
+ interface StateResponse {
2034
+ stateID: number;
2035
+ state: string;
2036
+ syncStatusID: number;
2037
+ masterCodeID: null;
2038
+ savedBy: null;
2039
+ savedDate: null;
2040
+ deletedBy: null;
2041
+ deletedDate: null;
2042
+ }
2043
+ declare const getAllStates: () => Promise<StateResponse[]>;
2044
+
2045
+ declare const getTaxesForSelect: () => Promise<ITax[]>;
2046
+
2047
+ interface UserQuery {
2048
+ skip?: number;
2049
+ limit?: number;
2050
+ query?: string;
2051
+ }
2052
+ declare const getSellersWithShift: () => Promise<AgentResponse>;
2053
+ declare const getSellersOfDayForSelect: ({ date }: {
2054
+ date: string;
2055
+ }) => Promise<AgentResponse>;
2056
+ declare const getAllAgents: () => Promise<AgentResponse>;
2057
+ declare const getUsers: ({ skip, limit, query }: UserQuery) => Promise<UserResponse>;
2058
+ declare const getUserById: ({ userId }: {
2059
+ userId: number;
2060
+ }) => Promise<IUser>;
2061
+ declare const createUser: ({ user }: {
2062
+ user: IUserForm;
2063
+ }) => Promise<void>;
2064
+ declare const updateUser: ({ userId, user }: {
2065
+ userId: number;
2066
+ user: IUserForm;
2067
+ }) => Promise<void>;
2068
+ declare const deleteUser: ({ userId }: {
2069
+ userId: number;
2070
+ }) => Promise<void>;
2071
+ declare const restoreUser: ({ userId }: {
2072
+ userId: number;
2073
+ }) => Promise<void>;
2074
+
2075
+ interface WareHouseQuery {
2076
+ skip?: number;
2077
+ limit?: number;
2078
+ query?: string;
2079
+ }
2080
+ interface WarehouseResponse {
2081
+ wareHouseID: number;
2082
+ wareHouse: string;
2083
+ wareHouseWithLocation: string;
2084
+ physicialLocationID: number;
2085
+ isShowroom: boolean;
2086
+ syncStatusID: number;
2087
+ masterCodeID: null;
2088
+ savedBy: null;
2089
+ savedDate: null;
2090
+ deletedBy: null;
2091
+ deletedDate: null;
2092
+ }
2093
+ declare const getWarehousesForSelect: () => Promise<WarehouseResponse[]>;
2094
+ declare const getWarehouses: ({ skip, limit, query }: WareHouseQuery) => Promise<IWareHouseResponse>;
2095
+ declare const getWarehouseById: (id: number) => Promise<IWareHouse>;
2096
+ declare const updateWarehouse: ({ id, warehouse }: {
2097
+ id: number;
2098
+ warehouse: FormData;
2099
+ }) => Promise<IWareHouse>;
2100
+ declare const createWareHouse: (warehouse: FormData) => Promise<IWareHouse>;
2101
+ declare const deleteWarehouse: (warehouseID: number) => Promise<void>;
2102
+ declare const restoreWarehouse: (warehouseID: number) => Promise<void>;
2103
+
2104
+ export { type AgentResponse, type BankTerminalQuery, type BankTerminalResponse, type BatchData, ButtonTypes, type CalculatePriceRequest, type ChangeProductRequest, type ChangeProductResponse, ChartType, ComparisonBy, type DateRange, type IApiConfig as ErpApiConfig, FieldTypes, type FileType, type FilterType, type GetReturnsByOrderIdResponse, type IAgent, type IAttribute, type IAttributeResponse, type IAttributeValue, type IBankTerminal, type IBankTerminalForm, type IBankTerminalOption, type IBankTerminalResponse, type IBaseField, type IBatch, type IBatchResponse, type IButton, type ICategory, type ICategoryResponse, type IClient, type IClientDataForTable, type IClientRequest, type IClientResponse, type IClientResponseById, type IDateField, type IEmailField, type IExchange, type IExchangeResponse, type IField, type IFileField, type IGender, type IHiddenField, type ILocation, type ILocationResponse, type IMaterial, type IMeta, type IModule, type IMovement, type IMovementResponse, type IMultiSelectField, type INumberField, type IOptions, type IOrder, type IOrderResponse, type IPasswordField, type IPayment, type IPaymentMethod, type IPaymentMethodAmountExpected, type IPermissionRole, type IPricePerGramHistory, type IPriceType, type IPriceTypeResponse, type IProduct, type IProductDetails, type IProductDetailsResponse, type IProductResponse, type IProductVariantRequest, type IPromotion, type IPromotionResponse, type IPromotionType, type IProvider, type IProviderForSelect, type IProviderRequest, type IProviderResponse, type IReportComparisonByTimeFrame, type IReportInventory, type IReportX, type IReportZ, type IRequest, type IReview, type IRole, type ISelect, type ISelectField, type IStock, type IStockByWarehouseReport, type IStockMovement, type IStockMovementResponse, type ISwitchField, type ITag, type ITagField, type ITax, type ITaxResponse, type ITextField, type IUpdatePermission, type IUser, type IUserForm, type IWareHouse, type IWareHouseResponse, type IWareHouseSelect, type LocationResponse, type LoginResponse, type MaterialResponse, type MaterialSummary, type MovementResponse, type NavLinks, type PaymentOptions, type PaymentType, type Period, Permission, type PermissionRole, type PriceCalculationResponse, type PricePerGramForm, type PricePerGramResponse, type PrintProductTagResponse, type PrintQRResponse, type ProdStats, type ProdStock, type ProductInfo, type ProductOptions, PromotionTypeEnum, type QRBaseUrlResponse, type ReportData, type ReportDataProduct, type Response, type SchedulePriceRequest, type StateResponse, type TagData, type TblCategories, type TblMaterials, type TblModules, type TblMoneyTransactionTypes, type TblMoneyTransactions, type TblOrderDetail, type TblOrderDetailsMoneyTransactions, type TblOrderStatus, type TblPermissions, type TblPriceTypes, type TblProducts, type TblProductsImage, type TblProductsTag, type TblPromotionTypes, type TblPromotionsTargetProductIDTotblProduct, type TblProvidersTblProvidersUserIDTotblUser, type TblReturn, type TblReturnDetail, type TblRoles, type TblRolesTblUsersRoleIDTotblRoles, type TblTags, type TblUsersTblProvidersUserIDTotblUsers, type TblUsersTblTotblUsers, type TourActions, type TourConfig, type TourState, type TourStep, type TourStepSide, type UpdateBatchData, type UpdatePriceRequest, type UserResponse, type WarehouseResponse, type WeightBasedSale, api, changeOrderProduct, checkPendingReportZ, closeShift, configureApi, createAttribute, createAttributeValue, createAttributesForCategory, createBankTerminal, createBatch, createBatchAndUpdateOtherBatches, createCategory, createClient, createExchangeRate, createLocation, createMaterial, createMovement, createPriceType, createProduct, createProductVariant, createPromotion, createProvider, createReturn, createRole, createUser, createWareHouse, deleteAttribute, deleteBankTerminal, deleteCategory, deleteClient, deleteImageFromProduct, deleteLocation, deleteMaterial, deletePriceType, deleteProduct, deleteProductVariant, deleteProvider, deleteRole, deleteUser, deleteWarehouse, getAllAgents, getAllBankTerminals, getAllCategories, getAllClients, getAllGenders, getAllLocations, getAllMaterials, getAllModules, getAllPermissions, getAllPriceTypes, getAllProviders, getAllStates, getAttributeById, getAttributeValues, getAttributes, getAttributesByCategoryID, getAttributesByProductID, getAttributesForSelect, getBankTerminalById, getBankTerminals, getBankTerminalsForSelect, getBatches, getBatchesForSelect, getCategories, getCategoriesForSelect, getCategoryById, getClientById, getClientsForSelect, getExchangeRate, getExchangeRates, getLocationById, getLocations, getLocationsForSelect, getMatchedBatches, getMaterialById, getMaterials, getMaterialsForSelect, getMovements, getOrderById, getOrders, getOrdersStatusForSelect, getPaymentMethods, getPaymentMethodsWithAmountExpected, getPaymentTypes, getPermissionRoleByRoleID, getPriceTypeById, getPriceTypesForSelect, getProductById, getProductVariantById, getProductVariants, getProductVariantsForSelect, getProducts, getProductsByCategory, getProductsForSelect, getProductsTable, getPromotionById, getPromotions, getPromotionsTypeForSelect, getProviderById, getProvidersForSelect, getQRBaseUrl, getReportByInventory, getReportComparisonByTimeFrame, getReportX, getReportZ, getReturnsByOrderId, getRoleByID, getRoles, getSellersOfDayForSelect, getSellersWithShift, getStockByWarehouseReport, getTaxesForSelect, getUserById, getUsers, getWarehouseById, getWarehouses, getWarehousesForSelect, healthService, isAValidDiscountCode, login, makeNewCashMovement, pricePerGramService, printProductTag, printQR, printReportX, printReportZ, restoreBankTerminal, restoreCategory, restoreClient, restoreLocation, restoreProduct, restoreProductVariant, restoreProvider, restoreUser, restoreWarehouse, sendCreditPaymentData, sendPaymentData, setNewShift, undeleteAttribute, undeleteMaterial, undeletePriceType, updateAttribute, updateAttributesForCategory, updateBankTerminal, updateBatch, updateCategory, updateClient, updateLocation, updateMaterial, updatePermission, updatePriceType, updateProduct, updateProductVariant, updatePromotion, updateProvider, updateRole, updateUser, updateWarehouse };