repzo 1.0.4 → 1.0.5

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,3662 @@
1
+ export interface Params {
2
+ [key: string]: any;
3
+ }
4
+ export interface Data {
5
+ [key: string]: any;
6
+ }
7
+ export interface Options {
8
+ env?: "staging" | "local" | "production";
9
+ headers?: {
10
+ [key: string]: string;
11
+ };
12
+ }
13
+ export interface Headers {
14
+ "api-key": string;
15
+ "Content-Type": string;
16
+ Accept: string;
17
+ [key: string]: string;
18
+ }
19
+ interface AdminCreator {
20
+ _id: string;
21
+ type: "admin";
22
+ name?: string;
23
+ admin?: string;
24
+ }
25
+ interface RepCreator {
26
+ _id: string;
27
+ type: "rep";
28
+ name?: string;
29
+ rep?: string;
30
+ }
31
+ interface ClientCreator {
32
+ _id: string;
33
+ type: "client";
34
+ name?: string;
35
+ client?: string;
36
+ }
37
+ interface SerialNumber {
38
+ identifier: string;
39
+ formatted: string;
40
+ count: number;
41
+ }
42
+ interface PaymentData {
43
+ payment_serial_number?: SerialNumber;
44
+ payment_id?: string;
45
+ invoice_serial_number?: SerialNumber;
46
+ return_serial_number?: SerialNumber;
47
+ fullinvoice_id?: string;
48
+ refund_serial_number?: SerialNumber;
49
+ refund_id?: string;
50
+ adjustment_serial_number?: SerialNumber;
51
+ adjustment_id?: string;
52
+ adjustment_account_id?: string;
53
+ view_serial_number?: SerialNumber;
54
+ type?: "invoice" | "payment" | "return_invoice" | "refund" | "adjustment";
55
+ amount: number;
56
+ is_linked_txn?: boolean;
57
+ }
58
+ interface Check {
59
+ _id: string;
60
+ drawer_name: string;
61
+ bank: string;
62
+ bank_branch: string;
63
+ check_number: number;
64
+ check_date: string;
65
+ photo?: string;
66
+ caption?: string;
67
+ photo_meta?: {
68
+ device_orientation?: number;
69
+ height?: number;
70
+ width?: number;
71
+ };
72
+ disabled?: boolean;
73
+ }
74
+ export interface DefaultPaginationQueryParams {
75
+ per_page?: number;
76
+ page?: number;
77
+ sort?: string;
78
+ sortPageOrder?: "asc" | "dsc";
79
+ }
80
+ export interface DefaultPaginationResult {
81
+ total_result: number;
82
+ current_count: number;
83
+ total_pages: number;
84
+ current_page: number;
85
+ per_page: number;
86
+ first_page_url: string;
87
+ last_page_url: string;
88
+ next_page_url: string | null;
89
+ prev_page_url: string | null;
90
+ path: string;
91
+ data: any[];
92
+ }
93
+ export declare namespace Service {
94
+ namespace Client {
95
+ interface Financials {
96
+ credit_limit?: number;
97
+ }
98
+ type JobType = 0 | 1 | 2 | 3 | 4 | 5 | 6;
99
+ interface JobObject {
100
+ type: JobType[];
101
+ description: string;
102
+ tag: string;
103
+ product_id?: string;
104
+ form_id?: string;
105
+ is_required?: boolean;
106
+ category_id?: string;
107
+ order?: number;
108
+ company_namespace: string[];
109
+ }
110
+ interface ShelfShareTarget {
111
+ msl: string;
112
+ contracted_checkout: number;
113
+ contracted_shelf_length: number;
114
+ total_category_length: number;
115
+ }
116
+ interface RepTarget {
117
+ rep: string;
118
+ target: number;
119
+ classification: string;
120
+ }
121
+ export interface ClientSchema {
122
+ _id: string;
123
+ local_name?: string;
124
+ tags?: string[];
125
+ cell_phone?: string;
126
+ city?: string;
127
+ client_code?: string;
128
+ contact_name?: string;
129
+ contact_title?: string;
130
+ country?: string;
131
+ disabled?: boolean;
132
+ formatted_address?: string;
133
+ lat?: number;
134
+ lng?: number;
135
+ location_verified?: boolean;
136
+ name: string;
137
+ phone?: string;
138
+ state?: string;
139
+ zip?: string;
140
+ assigned_to?: string[];
141
+ last_location_update?: number;
142
+ credit_limit?: number;
143
+ tax_number?: string;
144
+ sync_id?: string;
145
+ rep_targets?: RepTarget[];
146
+ shelf_share_targets?: ShelfShareTarget[];
147
+ profile_pic?: string;
148
+ logo?: string;
149
+ website?: string;
150
+ email?: string;
151
+ comment?: string;
152
+ parent_client_id?: string;
153
+ target_visit?: number;
154
+ geofencing_radius?: number;
155
+ price_tag?: string;
156
+ jobs?: JobObject[];
157
+ status?: string;
158
+ job_category?: string[];
159
+ availability_msl?: string[];
160
+ territory?: string;
161
+ sv_priceList?: string;
162
+ assigned_media?: string[];
163
+ assigned_products?: string[];
164
+ assigned_product_groups?: string;
165
+ verifiedUntil?: number;
166
+ financials?: Financials;
167
+ customFields?: {
168
+ [key: string]: any;
169
+ };
170
+ paymentTerm?: string;
171
+ speciality?: string[];
172
+ company_namespace: string[];
173
+ channel?: string;
174
+ isChain?: boolean;
175
+ chain?: string;
176
+ teams?: string[];
177
+ payment_type: "cash" | "credit";
178
+ integration_meta?: {
179
+ [key: string]: any;
180
+ };
181
+ integrated_client_balance?: number;
182
+ createdAt: string;
183
+ updatedAt: string;
184
+ __v: number;
185
+ }
186
+ interface ClientBody {
187
+ name?: string;
188
+ local_name?: string;
189
+ tags?: string[];
190
+ cell_phone?: string;
191
+ city?: string;
192
+ client_code?: string;
193
+ contact_name?: string;
194
+ contact_title?: string;
195
+ country?: string;
196
+ disabled?: boolean;
197
+ formatted_address?: string;
198
+ lat?: number;
199
+ lng?: number;
200
+ location_verified?: boolean;
201
+ phone?: string;
202
+ state?: string;
203
+ zip?: string;
204
+ assigned_to?: string[];
205
+ last_location_update?: number;
206
+ credit_limit?: number;
207
+ tax_number?: string;
208
+ sync_id?: string;
209
+ rep_targets?: RepTarget[];
210
+ shelf_share_targets?: ShelfShareTarget[];
211
+ profile_pic?: string;
212
+ logo?: string;
213
+ website?: string;
214
+ email?: string;
215
+ comment?: string;
216
+ parent_client_id?: string;
217
+ target_visit?: number;
218
+ geofencing_radius?: number;
219
+ price_tag?: string;
220
+ jobs?: JobObject[];
221
+ status?: string;
222
+ job_category?: string[];
223
+ availability_msl?: string[];
224
+ territory?: string;
225
+ sv_priceList?: string;
226
+ assigned_media?: string[];
227
+ assigned_products?: string[];
228
+ assigned_product_groups?: string;
229
+ verifiedUntil?: number;
230
+ financials?: Financials;
231
+ customFields?: {
232
+ [key: string]: any;
233
+ };
234
+ paymentTerm?: string;
235
+ speciality?: string[];
236
+ company_namespace?: string[];
237
+ channel?: string;
238
+ isChain?: boolean;
239
+ chain?: string;
240
+ teams?: string[];
241
+ payment_type?: "cash" | "credit";
242
+ integration_meta?: {
243
+ [key: string]: any;
244
+ };
245
+ integrated_client_balance?: number;
246
+ }
247
+ type PopulatedKeys = "tags" | "reps" | "assigned_to" | "sv_priceList" | "paymentTerm" | "job_category" | "msl" | "chain" | "channel" | "product" | "assigned_products" | "assigned_product_groups" | "speciality" | "teams";
248
+ type ClientSchemaWithPopulatedKeys = ClientSchema & {
249
+ assigned_products?: string[] | Pick<Product.ProductSchema, "_id" | "name">[];
250
+ assigned_product_groups?: string | Pick<ProductGroup.ProductGroupSchema, "_id" | "name">[];
251
+ teams?: string[] | Pick<Team.TeamSchema, "_id" | "name">[];
252
+ assigned_to?: string[] | Pick<Rep.RepSchema, "_id" | "name">[];
253
+ tags?: string[] | Tag.TagSchema[];
254
+ price_tag?: string | Tag.TagSchema;
255
+ job_category?: string[] | JobCategory.JobCategorySchema[];
256
+ sv_priceList?: string | Pick<PriceList.PriceListSchema, "_id" | "name">[];
257
+ chain?: string | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
258
+ channel?: string | Channel.ChannelSchema;
259
+ };
260
+ export namespace Find {
261
+ type Params = DefaultPaginationQueryParams & {
262
+ from_updatedAt?: number;
263
+ to_updatedAt?: number;
264
+ from_createdAt?: number;
265
+ to_createdAt?: number;
266
+ createdAt?: number;
267
+ updatedAt?: number;
268
+ name?: string[] | string;
269
+ search?: string;
270
+ disabled?: boolean;
271
+ active?: boolean;
272
+ tags?: string[] | string;
273
+ _id?: string[] | string;
274
+ assigned_to?: string[] | string;
275
+ availability_msl?: string[] | string;
276
+ status?: string[] | string;
277
+ CLIENT_TAGS?: string[] | string;
278
+ AREA_TAGS?: string[] | string;
279
+ isChain?: boolean;
280
+ chain?: string[] | string;
281
+ channel?: string[] | string;
282
+ city?: string[] | string;
283
+ client_code?: string[] | string;
284
+ country?: string[] | string;
285
+ location_verified?: boolean;
286
+ state?: string[] | string;
287
+ sv_priceList?: string[] | string;
288
+ assigned_media?: string[] | string;
289
+ assigned_products?: string[] | string;
290
+ teams?: string[] | string;
291
+ integrated_client_balance?: number[] | number;
292
+ tax_number?: string[] | string;
293
+ speciality?: string[] | string;
294
+ assigned_product_groups?: string[] | string;
295
+ populatedKeys?: PopulatedKeys[];
296
+ [key: string]: any;
297
+ };
298
+ interface Result extends DefaultPaginationResult {
299
+ data: ClientSchemaWithPopulatedKeys[];
300
+ }
301
+ }
302
+ export namespace Get {
303
+ type ID = string;
304
+ interface Params {
305
+ populatedKeys?: PopulatedKeys[];
306
+ }
307
+ type Result = ClientSchemaWithPopulatedKeys;
308
+ }
309
+ export namespace Create {
310
+ interface Body extends ClientBody {
311
+ name: string;
312
+ }
313
+ type Result = ClientSchema;
314
+ }
315
+ export namespace Update {
316
+ type ID = string;
317
+ interface Body extends ClientBody {
318
+ _id?: string;
319
+ createdAt?: string;
320
+ updatedAt?: string;
321
+ __v?: number;
322
+ }
323
+ type Result = ClientSchema;
324
+ }
325
+ export namespace Remove {
326
+ type ID = string;
327
+ type Result = ClientSchema;
328
+ }
329
+ export {};
330
+ }
331
+ namespace Product {
332
+ export interface ProductSchema {
333
+ _id: string;
334
+ name: string;
335
+ category: string;
336
+ active: boolean;
337
+ company_namespace: string[];
338
+ local_name?: string;
339
+ sku?: string;
340
+ sub_category?: string[];
341
+ assigned_to?: string[];
342
+ auditable?: boolean;
343
+ barcode?: string;
344
+ sv_tax?: string;
345
+ sv_measureUnit?: string;
346
+ description?: string;
347
+ local_description?: string;
348
+ product_img?: string;
349
+ base_price?: string;
350
+ assigned_media?: string[];
351
+ html_description?: string;
352
+ modifiers_group?: string[];
353
+ featured?: boolean;
354
+ brand?: string;
355
+ rsp?: number;
356
+ measureunit_family?: string;
357
+ integration_meta?: {
358
+ [key: string]: any;
359
+ };
360
+ teams?: string[];
361
+ position?: number;
362
+ product_groups?: string[];
363
+ frozen_pre_sales?: boolean;
364
+ frozen_sales?: boolean;
365
+ createdAt: string;
366
+ updatedAt: string;
367
+ __v: number;
368
+ }
369
+ interface ProductBody {
370
+ name?: string;
371
+ category?: string;
372
+ active?: boolean;
373
+ company_namespace?: string[];
374
+ local_name?: string;
375
+ sku?: string;
376
+ sub_category?: string[];
377
+ assigned_to?: string[];
378
+ auditable?: boolean;
379
+ barcode?: string;
380
+ sv_tax?: string;
381
+ sv_measureUnit?: string;
382
+ description?: string;
383
+ local_description?: string;
384
+ product_img?: string;
385
+ base_price?: string;
386
+ assigned_media?: string[];
387
+ html_description?: string;
388
+ modifiers_group?: string[];
389
+ featured?: boolean;
390
+ brand?: string;
391
+ rsp?: number;
392
+ measureunit_family?: string;
393
+ integration_meta?: {
394
+ [key: string]: any;
395
+ };
396
+ teams?: string[];
397
+ position?: number;
398
+ product_groups?: string[];
399
+ frozen_pre_sales?: boolean;
400
+ frozen_sales?: boolean;
401
+ variants?: (Variant.VariantBody & {
402
+ name: string;
403
+ product?: string;
404
+ price: number;
405
+ _id?: string;
406
+ createdAt?: string;
407
+ updatedAt?: string;
408
+ __v?: number;
409
+ })[];
410
+ }
411
+ type ProductWithPopulatedKeys = ProductSchema & {
412
+ category: string | Category.CategorySchema;
413
+ sub_category?: string[] | SubCategory.SubCategorySchema[];
414
+ sv_tax?: string | Tax.TaxSchema | Pick<Tax.TaxSchema, "_id" | "name">;
415
+ sv_measureUnit?: string | MeasureUnit.MeasureUnitSchema | Pick<MeasureUnit.MeasureUnitSchema, "_id" | "name">;
416
+ brand?: string | Brand.BrandSchema;
417
+ measureunit_family?: string | MeasureUnitFamily.MeasureUnitFamilySchema;
418
+ product_groups?: string[] | Pick<ProductGroup.ProductGroupSchema, "_id" | "name">[];
419
+ variants?: Variant.VariantSchema[];
420
+ defaultVariant?: Variant.VariantSchema;
421
+ assigned_media?: string | Media.MediaSchema;
422
+ };
423
+ type PopulatedKeys = "category" | "sub_category" | "tax" | "sv_tax" | "media" | "measureunit_family" | "measureunit" | "sv_measureUnit" | "brand" | "product_groups";
424
+ export namespace Find {
425
+ type Params = DefaultPaginationQueryParams & {
426
+ populatedKeys?: PopulatedKeys[];
427
+ _id?: string[] | string;
428
+ category?: string[] | string;
429
+ sub_category?: string[] | string;
430
+ name?: string[] | string;
431
+ search?: string;
432
+ active?: boolean;
433
+ disabled?: boolean;
434
+ sv_measureUnit?: string[] | string;
435
+ base_price?: number[] | number;
436
+ assigned_media?: string[] | string;
437
+ modifiers_group?: string[] | string;
438
+ brand?: string[] | string;
439
+ rsp?: number[] | number;
440
+ measureunit_family?: string[] | string;
441
+ teams?: string[] | string;
442
+ position?: number[] | number;
443
+ product_groups?: string[] | string;
444
+ sv_tax?: string[] | string;
445
+ createdAt?: number;
446
+ from_updatedAt?: number;
447
+ to_updatedAt?: number;
448
+ barcode?: string[] | string;
449
+ sku?: string[] | string;
450
+ local_name?: string[] | string;
451
+ frozen_pre_sales?: boolean;
452
+ frozen_sales?: boolean;
453
+ withMedia?: boolean;
454
+ withDefaultVariant?: boolean;
455
+ withVariants?: boolean;
456
+ [key: string]: any;
457
+ };
458
+ interface Result extends DefaultPaginationResult {
459
+ data: ProductWithPopulatedKeys[];
460
+ }
461
+ }
462
+ export namespace Get {
463
+ type ID = string;
464
+ interface Params {
465
+ populatedKeys?: PopulatedKeys[];
466
+ withVariants?: boolean;
467
+ }
468
+ type Result = ProductWithPopulatedKeys;
469
+ }
470
+ export namespace Create {
471
+ interface Body extends ProductBody {
472
+ name: string;
473
+ category: string;
474
+ }
475
+ type Result = ProductSchema;
476
+ }
477
+ export namespace Update {
478
+ type ID = string;
479
+ interface Body extends ProductBody {
480
+ _id?: string;
481
+ createdAt?: string;
482
+ updatedAt?: string;
483
+ __v?: number;
484
+ }
485
+ type Result = ProductSchema;
486
+ }
487
+ export namespace Remove {
488
+ type ID = string;
489
+ type Result = ProductSchema;
490
+ }
491
+ export {};
492
+ }
493
+ namespace Variant {
494
+ export interface VariantSchema {
495
+ _id: string;
496
+ name: string;
497
+ product: string | Product.ProductSchema;
498
+ price: number;
499
+ company_namespace: string[];
500
+ disabled?: boolean;
501
+ uuid?: string;
502
+ local_name?: string;
503
+ sku?: string;
504
+ barcode?: string;
505
+ weight?: number;
506
+ length?: number;
507
+ width?: number;
508
+ height?: number;
509
+ position?: number;
510
+ default?: boolean;
511
+ variant_img?: string;
512
+ modifiers_groups?: string[];
513
+ integration_meta?: {
514
+ [key: string]: any;
515
+ };
516
+ createdAt: string;
517
+ updatedAt: string;
518
+ __v: number;
519
+ }
520
+ export interface VariantBody {
521
+ name?: string;
522
+ product?: string;
523
+ price?: number;
524
+ company_namespace?: string[];
525
+ disabled?: boolean;
526
+ uuid?: string;
527
+ local_name?: string;
528
+ sku?: string;
529
+ barcode?: string;
530
+ weight?: number;
531
+ length?: number;
532
+ width?: number;
533
+ height?: number;
534
+ position?: number;
535
+ default?: boolean;
536
+ variant_img?: string;
537
+ modifiers_groups?: string[];
538
+ integration_meta?: {
539
+ [key: string]: any;
540
+ };
541
+ }
542
+ type PopulatedKeys = "product";
543
+ export namespace Find {
544
+ type Params = DefaultPaginationQueryParams & {
545
+ _id?: string[] | string;
546
+ search?: string;
547
+ name?: string[] | string;
548
+ local_name?: string[] | string;
549
+ disabled?: boolean;
550
+ product?: string[] | string;
551
+ barcode?: string[] | string;
552
+ sku?: string[] | string;
553
+ price?: number[] | number;
554
+ position?: number[] | number;
555
+ createdAt?: number;
556
+ updatedAt?: number;
557
+ default?: boolean;
558
+ category?: string[] | string;
559
+ subCategory?: string[] | string;
560
+ brand?: string[] | string;
561
+ productGroup?: string[] | string;
562
+ teams?: string[] | string;
563
+ withProduct?: boolean;
564
+ [key: string]: any;
565
+ };
566
+ interface Result extends DefaultPaginationResult {
567
+ data: VariantSchema[];
568
+ }
569
+ }
570
+ export namespace Get {
571
+ type ID = string;
572
+ interface Params {
573
+ populatedKeys?: PopulatedKeys[];
574
+ }
575
+ type Result = VariantSchema;
576
+ }
577
+ export namespace Create {
578
+ interface Body extends VariantBody {
579
+ name: string;
580
+ product: string;
581
+ price: number;
582
+ }
583
+ type Result = VariantSchema;
584
+ }
585
+ export namespace Update {
586
+ type ID = string;
587
+ interface Body extends VariantBody {
588
+ _id?: string;
589
+ createdAt?: string;
590
+ updatedAt?: string;
591
+ __v?: number;
592
+ }
593
+ type Result = VariantSchema;
594
+ }
595
+ export namespace Remove {
596
+ type ID = string;
597
+ type Result = VariantSchema;
598
+ }
599
+ export {};
600
+ }
601
+ namespace Category {
602
+ interface CategorySchema {
603
+ _id: string;
604
+ type?: "main";
605
+ name: string;
606
+ photo?: string;
607
+ local_name?: string;
608
+ icon?: string;
609
+ disabled?: boolean;
610
+ position?: number;
611
+ integration_meta?: {
612
+ [key: string]: any;
613
+ };
614
+ company_namespace: string[];
615
+ createdAt: string;
616
+ updatedAt: string;
617
+ __v: number;
618
+ }
619
+ interface CategoryBody {
620
+ name?: string;
621
+ company_namespace?: string[];
622
+ type?: "main";
623
+ disabled?: boolean;
624
+ photo?: string;
625
+ local_name?: string;
626
+ icon?: string;
627
+ position?: number;
628
+ integration_meta?: {
629
+ [key: string]: any;
630
+ };
631
+ }
632
+ namespace Find {
633
+ type Params = DefaultPaginationQueryParams & {
634
+ _id?: string[] | string;
635
+ search?: string;
636
+ name?: string[] | string;
637
+ local_name?: string[] | string;
638
+ disabled?: boolean;
639
+ position?: number[] | number;
640
+ createdAt?: number;
641
+ updatedAt?: number;
642
+ withProduct?: boolean;
643
+ hasSubCategory?: boolean;
644
+ isLeaf?: boolean;
645
+ [key: string]: any;
646
+ };
647
+ interface Result extends DefaultPaginationResult {
648
+ data: (CategorySchema & {
649
+ hasSubCategory?: boolean;
650
+ isLeaf?: boolean;
651
+ })[];
652
+ }
653
+ }
654
+ namespace Get {
655
+ type ID = string;
656
+ type Result = CategorySchema;
657
+ }
658
+ namespace Create {
659
+ interface Body extends CategoryBody {
660
+ name: string;
661
+ }
662
+ type Result = CategorySchema;
663
+ }
664
+ namespace Update {
665
+ type ID = string;
666
+ interface Body extends CategoryBody {
667
+ _id?: string;
668
+ createdAt?: string;
669
+ updatedAt?: string;
670
+ __v?: number;
671
+ }
672
+ type Result = CategorySchema;
673
+ }
674
+ namespace Remove {
675
+ type ID = string;
676
+ type Result = CategorySchema;
677
+ }
678
+ }
679
+ namespace Brand {
680
+ interface BrandSchema {
681
+ _id: string;
682
+ name: string;
683
+ local_name?: string;
684
+ disabled?: boolean;
685
+ integration_meta?: {
686
+ [key: string]: any;
687
+ };
688
+ company_namespace: string[];
689
+ createdAt: string;
690
+ updatedAt: string;
691
+ __v: number;
692
+ }
693
+ interface BrandBody {
694
+ name?: string;
695
+ company_namespace?: string[];
696
+ disabled?: boolean;
697
+ local_name?: string;
698
+ integration_meta?: {
699
+ [key: string]: any;
700
+ };
701
+ }
702
+ namespace Find {
703
+ type Params = DefaultPaginationQueryParams & {
704
+ _id?: string[] | string;
705
+ search?: string;
706
+ name?: string[] | string;
707
+ local_name?: string[] | string;
708
+ disabled?: boolean;
709
+ createdAt?: number;
710
+ updatedAt?: number;
711
+ [key: string]: any;
712
+ };
713
+ interface Result extends DefaultPaginationResult {
714
+ data: BrandSchema[];
715
+ }
716
+ }
717
+ namespace Get {
718
+ type ID = string;
719
+ type Result = BrandSchema;
720
+ }
721
+ namespace Create {
722
+ interface Body extends BrandBody {
723
+ name: string;
724
+ }
725
+ type Result = BrandSchema;
726
+ }
727
+ namespace Update {
728
+ type ID = string;
729
+ interface Body extends BrandBody {
730
+ _id?: string;
731
+ createdAt?: string;
732
+ updatedAt?: string;
733
+ __v?: number;
734
+ }
735
+ type Result = BrandSchema;
736
+ }
737
+ namespace Remove {
738
+ type ID = string;
739
+ type Result = BrandSchema;
740
+ }
741
+ }
742
+ namespace SubCategory {
743
+ export interface SubCategorySchema {
744
+ _id: string;
745
+ name: string;
746
+ parent_id: string | Pick<Category.CategorySchema, "_id" | "name">;
747
+ local_name?: string;
748
+ disabled?: boolean;
749
+ photo?: string;
750
+ position?: number;
751
+ integration_meta?: {
752
+ [key: string]: any;
753
+ };
754
+ company_namespace: string[];
755
+ createdAt: string;
756
+ updatedAt: string;
757
+ __v: number;
758
+ }
759
+ export interface SubCategoryBody {
760
+ name?: string;
761
+ company_namespace?: string[];
762
+ disabled?: boolean;
763
+ local_name?: string;
764
+ photo?: string;
765
+ position?: number;
766
+ parent_id?: string;
767
+ integration_meta?: {
768
+ [key: string]: any;
769
+ };
770
+ }
771
+ type PopulatedKeys = "parent_id";
772
+ export namespace Find {
773
+ type Params = DefaultPaginationQueryParams & {
774
+ populatedKeys?: PopulatedKeys[];
775
+ _id?: string[] | string;
776
+ search?: string;
777
+ name?: string[] | string;
778
+ local_name?: string[] | string;
779
+ parent_id?: string[] | string;
780
+ disabled?: boolean;
781
+ position?: number | number[];
782
+ createdAt?: number;
783
+ updatedAt?: number;
784
+ withProduct?: boolean;
785
+ [key: string]: any;
786
+ };
787
+ interface Result extends DefaultPaginationResult {
788
+ data: SubCategorySchema[];
789
+ }
790
+ }
791
+ export namespace Get {
792
+ type ID = string;
793
+ interface Params {
794
+ populatedKeys?: PopulatedKeys[];
795
+ }
796
+ type Result = SubCategorySchema;
797
+ }
798
+ export namespace Create {
799
+ interface Body extends SubCategoryBody {
800
+ name: string;
801
+ parent_id: string;
802
+ }
803
+ type Result = SubCategorySchema;
804
+ }
805
+ export namespace Update {
806
+ type ID = string;
807
+ interface Body extends SubCategoryBody {
808
+ _id?: string;
809
+ createdAt?: string;
810
+ updatedAt?: string;
811
+ __v?: number;
812
+ }
813
+ type Result = SubCategorySchema;
814
+ }
815
+ export namespace Remove {
816
+ type ID = string;
817
+ type Result = SubCategorySchema;
818
+ }
819
+ export {};
820
+ }
821
+ namespace ProductGroup {
822
+ interface ProductGroupSchema {
823
+ _id: string;
824
+ name: string;
825
+ local_name?: string;
826
+ disabled?: boolean;
827
+ company_namespace: string[];
828
+ createdAt: string;
829
+ updatedAt: string;
830
+ __v: number;
831
+ }
832
+ interface ProductGroupBody {
833
+ name?: string;
834
+ company_namespace?: string[];
835
+ disabled?: boolean;
836
+ local_name?: string;
837
+ }
838
+ namespace Find {
839
+ type Params = DefaultPaginationQueryParams & {
840
+ _id?: string[] | string;
841
+ search?: string;
842
+ name?: string[] | string;
843
+ local_name?: string[] | string;
844
+ disabled?: boolean;
845
+ createdAt?: number;
846
+ updatedAt?: number;
847
+ };
848
+ interface Result extends DefaultPaginationResult {
849
+ data: ProductGroupSchema[];
850
+ }
851
+ }
852
+ namespace Get {
853
+ type ID = string;
854
+ type Result = ProductGroupSchema;
855
+ }
856
+ namespace Create {
857
+ interface Body extends ProductGroupBody {
858
+ name: string;
859
+ }
860
+ type Result = ProductGroupSchema;
861
+ }
862
+ namespace Update {
863
+ type ID = string;
864
+ interface Body extends ProductGroupBody {
865
+ _id?: string;
866
+ createdAt?: string;
867
+ updatedAt?: string;
868
+ __v?: number;
869
+ }
870
+ type Result = ProductGroupSchema;
871
+ }
872
+ namespace Remove {
873
+ type ID = string;
874
+ type Result = ProductGroupSchema;
875
+ }
876
+ }
877
+ namespace Tax {
878
+ type TaxType = "inclusive" | "additive" | "N/A";
879
+ export interface TaxSchema {
880
+ _id: string;
881
+ name: string;
882
+ rate: number;
883
+ type: TaxType;
884
+ disabled?: boolean;
885
+ integration_meta?: {
886
+ [key: string]: any;
887
+ };
888
+ company_namespace: string[];
889
+ createdAt: string;
890
+ updatedAt: string;
891
+ __v: number;
892
+ }
893
+ export interface TaxBody {
894
+ name?: string;
895
+ rate?: number;
896
+ type?: TaxType;
897
+ company_namespace?: string[];
898
+ disabled?: boolean;
899
+ integration_meta?: {
900
+ [key: string]: any;
901
+ };
902
+ }
903
+ export namespace Find {
904
+ type Params = DefaultPaginationQueryParams & {
905
+ _id?: string[] | string;
906
+ search?: string;
907
+ name?: string[] | string;
908
+ rate?: number | number[];
909
+ type?: TaxType | TaxType[];
910
+ disabled?: boolean;
911
+ from_updatedAt?: number;
912
+ [key: string]: any;
913
+ };
914
+ interface Result extends DefaultPaginationResult {
915
+ data: TaxSchema[];
916
+ }
917
+ }
918
+ export namespace Get {
919
+ type ID = string;
920
+ type Result = TaxSchema;
921
+ }
922
+ export namespace Create {
923
+ interface Body extends TaxBody {
924
+ name: string;
925
+ rate: number;
926
+ type: TaxType;
927
+ }
928
+ type Result = TaxSchema;
929
+ }
930
+ export namespace Update {
931
+ type ID = string;
932
+ interface Body extends TaxBody {
933
+ _id?: string;
934
+ createdAt?: string;
935
+ updatedAt?: string;
936
+ __v?: number;
937
+ }
938
+ type Result = TaxSchema;
939
+ }
940
+ export namespace Remove {
941
+ type ID = string;
942
+ type Result = TaxSchema;
943
+ }
944
+ export {};
945
+ }
946
+ namespace MeasureUnit {
947
+ interface MeasureUnitSchema {
948
+ _id: string;
949
+ name: string;
950
+ factor: number;
951
+ local_name?: string;
952
+ parent?: string;
953
+ disabled?: boolean;
954
+ integration_meta?: {
955
+ [key: string]: any;
956
+ };
957
+ company_namespace: string[];
958
+ createdAt: string;
959
+ updatedAt: string;
960
+ __v: number;
961
+ }
962
+ interface MeasureUnitBody {
963
+ name?: string;
964
+ factor: number;
965
+ local_name?: string;
966
+ parent?: string;
967
+ company_namespace?: string[];
968
+ disabled?: boolean;
969
+ integration_meta?: {
970
+ [key: string]: any;
971
+ };
972
+ }
973
+ namespace Find {
974
+ type Params = DefaultPaginationQueryParams & {
975
+ _id?: string[] | string;
976
+ search?: string;
977
+ name?: string[] | string;
978
+ factor?: number | number[];
979
+ parent?: "nil";
980
+ disabled?: boolean;
981
+ from_updatedAt?: number;
982
+ family_name?: string[] | string;
983
+ withFamily?: boolean;
984
+ [key: string]: any;
985
+ };
986
+ interface Result extends DefaultPaginationResult {
987
+ data: (MeasureUnitSchema & {
988
+ family?: MeasureUnitFamily.MeasureUnitFamilySchema[];
989
+ })[];
990
+ }
991
+ }
992
+ namespace Get {
993
+ type ID = string;
994
+ type Result = MeasureUnitSchema;
995
+ }
996
+ namespace Create {
997
+ interface Body extends MeasureUnitBody {
998
+ name: string;
999
+ }
1000
+ type Result = MeasureUnitSchema;
1001
+ }
1002
+ namespace Update {
1003
+ type ID = string;
1004
+ interface Body extends MeasureUnitBody {
1005
+ _id?: string;
1006
+ createdAt?: string;
1007
+ updatedAt?: string;
1008
+ __v?: number;
1009
+ }
1010
+ type Result = MeasureUnitSchema;
1011
+ }
1012
+ namespace Remove {
1013
+ type ID = string;
1014
+ type Result = MeasureUnitSchema;
1015
+ }
1016
+ }
1017
+ namespace MeasureUnitFamily {
1018
+ interface MeasureUnitFamilySchema {
1019
+ _id: string;
1020
+ name: string;
1021
+ local_name?: string;
1022
+ measureunits: string[];
1023
+ disabled?: boolean;
1024
+ integration_meta?: {
1025
+ [key: string]: any;
1026
+ };
1027
+ company_namespace: string[];
1028
+ createdAt: string;
1029
+ updatedAt: string;
1030
+ __v: number;
1031
+ }
1032
+ interface MeasureUnitFamilyBody {
1033
+ name?: string;
1034
+ local_name?: string;
1035
+ measureunits?: string[];
1036
+ company_namespace?: string[];
1037
+ disabled?: boolean;
1038
+ integration_meta?: {
1039
+ [key: string]: any;
1040
+ };
1041
+ }
1042
+ namespace Find {
1043
+ type Params = DefaultPaginationQueryParams & {
1044
+ _id?: string[] | string;
1045
+ search?: string;
1046
+ name?: string[] | string;
1047
+ local_name?: string[] | string;
1048
+ disabled?: boolean;
1049
+ measureunits?: string[] | string;
1050
+ [key: string]: any;
1051
+ };
1052
+ interface Result extends DefaultPaginationResult {
1053
+ data: MeasureUnitFamilySchema[];
1054
+ }
1055
+ }
1056
+ namespace Get {
1057
+ type ID = string;
1058
+ type Result = MeasureUnitFamilySchema;
1059
+ }
1060
+ namespace Create {
1061
+ interface Body extends MeasureUnitFamilyBody {
1062
+ name: string;
1063
+ }
1064
+ type Result = MeasureUnitFamilySchema;
1065
+ }
1066
+ namespace Update {
1067
+ type ID = string;
1068
+ interface Body extends MeasureUnitFamilyBody {
1069
+ _id?: string;
1070
+ createdAt?: string;
1071
+ updatedAt?: string;
1072
+ __v?: number;
1073
+ }
1074
+ type Result = MeasureUnitFamilySchema;
1075
+ }
1076
+ namespace Remove {
1077
+ type ID = string;
1078
+ type Result = MeasureUnitFamilySchema;
1079
+ }
1080
+ }
1081
+ namespace Media {
1082
+ type MediaType = "ppt" | "pptx" | "pdf" | "jpeg" | "jpg" | "png" | "doc" | "docx";
1083
+ export interface MediaSchema {
1084
+ _id: string;
1085
+ name: string;
1086
+ type: MediaType;
1087
+ url: string;
1088
+ creator: AdminCreator | RepCreator;
1089
+ caption?: string;
1090
+ disabled?: boolean;
1091
+ company_namespace: string[];
1092
+ createdAt: string;
1093
+ updatedAt: string;
1094
+ __v: number;
1095
+ }
1096
+ export interface MediaBody {
1097
+ name?: string;
1098
+ type?: MediaType;
1099
+ url?: string[];
1100
+ caption?: string;
1101
+ company_namespace?: string[];
1102
+ disabled?: boolean;
1103
+ }
1104
+ export namespace Find {
1105
+ type Params = DefaultPaginationQueryParams & {
1106
+ _id?: string[] | string;
1107
+ search?: string;
1108
+ name?: string[] | string;
1109
+ "creator._id"?: string[] | string;
1110
+ caption?: string[] | string;
1111
+ url?: string[] | string;
1112
+ type?: MediaType[] | MediaType;
1113
+ disabled?: boolean;
1114
+ repID?: string[] | string;
1115
+ };
1116
+ interface Result extends DefaultPaginationResult {
1117
+ data: MediaSchema[];
1118
+ }
1119
+ }
1120
+ export namespace Get {
1121
+ type ID = string;
1122
+ type Result = MediaSchema;
1123
+ }
1124
+ export namespace Create {
1125
+ interface Body extends MediaBody {
1126
+ name: string;
1127
+ }
1128
+ type Result = MediaSchema;
1129
+ }
1130
+ export namespace Update {
1131
+ type ID = string;
1132
+ interface Body extends MediaBody {
1133
+ _id?: string;
1134
+ createdAt?: string;
1135
+ updatedAt?: string;
1136
+ __v?: number;
1137
+ }
1138
+ type Result = MediaSchema;
1139
+ }
1140
+ export namespace Remove {
1141
+ type ID = string;
1142
+ type Result = string;
1143
+ }
1144
+ export {};
1145
+ }
1146
+ namespace PriceList {
1147
+ interface creator {
1148
+ _id: string;
1149
+ name: string;
1150
+ }
1151
+ export interface PriceListSchema {
1152
+ _id: string;
1153
+ name: string;
1154
+ createdby: creator;
1155
+ disabled?: boolean;
1156
+ integration_meta?: {
1157
+ [key: string]: any;
1158
+ };
1159
+ company_namespace: string[];
1160
+ createdAt: string;
1161
+ updatedAt: string;
1162
+ __v: number;
1163
+ }
1164
+ export interface PriceListBody {
1165
+ name?: string;
1166
+ integration_meta?: {
1167
+ [key: string]: any;
1168
+ };
1169
+ disabled?: boolean;
1170
+ company_namespace?: string[];
1171
+ }
1172
+ export namespace Find {
1173
+ type Params = DefaultPaginationQueryParams & {
1174
+ _id?: string[] | string;
1175
+ search?: string;
1176
+ name?: string[] | string;
1177
+ "createdby._id"?: string[] | string;
1178
+ disabled?: boolean;
1179
+ from_updatedAt?: number;
1180
+ [key: string]: any;
1181
+ };
1182
+ interface Result extends DefaultPaginationResult {
1183
+ data: PriceListSchema[];
1184
+ }
1185
+ }
1186
+ export namespace Get {
1187
+ type ID = string;
1188
+ type Result = PriceListSchema;
1189
+ }
1190
+ export namespace Create {
1191
+ interface Body extends PriceListBody {
1192
+ name: string;
1193
+ }
1194
+ type Result = PriceListSchema;
1195
+ }
1196
+ export namespace Update {
1197
+ type ID = string;
1198
+ interface Body extends PriceListBody {
1199
+ _id?: string;
1200
+ createdAt?: string;
1201
+ updatedAt?: string;
1202
+ __v?: number;
1203
+ }
1204
+ type Result = PriceListSchema;
1205
+ }
1206
+ export namespace Remove {
1207
+ type ID = string;
1208
+ type Result = PriceListSchema;
1209
+ }
1210
+ export {};
1211
+ }
1212
+ namespace PriceListItem {
1213
+ export interface PriceListItemSchema {
1214
+ _id: string;
1215
+ product_id: string;
1216
+ variant_id: string;
1217
+ pricelist_id: string;
1218
+ price: number;
1219
+ disabled?: boolean;
1220
+ integration_meta?: {
1221
+ [key: string]: any;
1222
+ };
1223
+ company_namespace: string[];
1224
+ createdAt: string;
1225
+ updatedAt: string;
1226
+ __v: number;
1227
+ }
1228
+ export interface PriceListItemBody {
1229
+ product_id?: string;
1230
+ variant_id?: string;
1231
+ pricelist_id?: string;
1232
+ price?: number;
1233
+ integration_meta?: {
1234
+ [key: string]: any;
1235
+ };
1236
+ disabled?: boolean;
1237
+ company_namespace?: string[];
1238
+ }
1239
+ type PopulatedKeys = "product" | "variant" | "pricelist";
1240
+ export namespace Find {
1241
+ type Params = DefaultPaginationQueryParams & {
1242
+ _id?: string[] | string;
1243
+ search?: string;
1244
+ product_id?: string[] | string;
1245
+ variant_id?: string[] | string;
1246
+ pricelist_id?: string[] | string;
1247
+ disabled?: boolean;
1248
+ from_updatedAt?: number;
1249
+ populatedKeys?: PopulatedKeys[];
1250
+ [key: string]: any;
1251
+ };
1252
+ interface Result extends DefaultPaginationResult {
1253
+ data: (PriceListItemSchema & {
1254
+ product_id: string | Product.ProductSchema;
1255
+ variant_id: string | Variant.VariantSchema;
1256
+ pricelist_id: string | PriceList.PriceListSchema;
1257
+ })[];
1258
+ }
1259
+ }
1260
+ export namespace Get {
1261
+ type ID = string;
1262
+ type Result = PriceListItemSchema;
1263
+ }
1264
+ export namespace Create {
1265
+ interface Body extends PriceListItemBody {
1266
+ product_id: string;
1267
+ variant_id: string;
1268
+ pricelist_id: string;
1269
+ price: number;
1270
+ }
1271
+ type Result = PriceListItemSchema;
1272
+ }
1273
+ export namespace Update {
1274
+ type ID = string;
1275
+ interface Body extends PriceListItemBody {
1276
+ _id?: string;
1277
+ createdAt?: string;
1278
+ updatedAt?: string;
1279
+ __v?: number;
1280
+ }
1281
+ type Result = PriceListItemSchema;
1282
+ }
1283
+ export namespace Remove {
1284
+ type ID = string;
1285
+ type Result = PriceListItemSchema;
1286
+ }
1287
+ export {};
1288
+ }
1289
+ namespace Team {
1290
+ interface TeamSchema {
1291
+ _id: string;
1292
+ name: string;
1293
+ disabled?: boolean;
1294
+ company_namespace: string[];
1295
+ createdAt: string;
1296
+ updatedAt: string;
1297
+ __v: number;
1298
+ }
1299
+ interface TeamBody {
1300
+ name?: string;
1301
+ company_namespace?: string[];
1302
+ disabled?: boolean;
1303
+ }
1304
+ namespace Find {
1305
+ type Params = DefaultPaginationQueryParams & {
1306
+ _id?: string[] | string;
1307
+ search?: string;
1308
+ name?: string[] | string;
1309
+ disabled?: boolean;
1310
+ };
1311
+ interface Result extends DefaultPaginationResult {
1312
+ data: TeamSchema[];
1313
+ }
1314
+ }
1315
+ namespace Get {
1316
+ type ID = string;
1317
+ type Result = TeamSchema & {
1318
+ admins: any;
1319
+ reps: any;
1320
+ };
1321
+ }
1322
+ namespace Create {
1323
+ interface Body extends TeamBody {
1324
+ name: string;
1325
+ }
1326
+ type Result = TeamSchema;
1327
+ }
1328
+ namespace Update {
1329
+ type ID = string;
1330
+ interface Body extends TeamBody {
1331
+ _id?: string;
1332
+ createdAt?: string;
1333
+ updatedAt?: string;
1334
+ __v?: number;
1335
+ }
1336
+ type Result = TeamSchema;
1337
+ }
1338
+ namespace Remove {
1339
+ type ID = string;
1340
+ type Result = TeamSchema;
1341
+ }
1342
+ }
1343
+ namespace Rep {
1344
+ interface RepPermissions {
1345
+ rep_can_add_client: boolean;
1346
+ rep_can_edit_client: boolean;
1347
+ rep_can_add_calendar: boolean;
1348
+ rep_can_edit_calendar: boolean;
1349
+ rep_can_skip_photo_tag: boolean;
1350
+ rep_can_edit_product_price?: boolean;
1351
+ rep_must_add_client_with_location?: boolean;
1352
+ rep_can_access_shared_history?: boolean;
1353
+ rep_can_edit_total_shelf_share?: boolean;
1354
+ rep_can_create_transfer?: boolean;
1355
+ rep_can_make_call?: boolean;
1356
+ rep_can_read_stock?: boolean;
1357
+ can_rep_pay_other_reps_invoices?: boolean;
1358
+ rep_can_create_sales_order?: boolean;
1359
+ rep_can_create_invoice?: boolean;
1360
+ rep_can_create_transfer_load?: boolean;
1361
+ rep_can_create_transfer_unload?: boolean;
1362
+ rep_can_create_return_invoice?: boolean;
1363
+ rep_can_sell_zero_product_price?: boolean;
1364
+ }
1365
+ interface TargetResults {
1366
+ totalPoints: number;
1367
+ targetsCount: number;
1368
+ totalAchievements: number;
1369
+ averageAchievements: number;
1370
+ pointsCap: number;
1371
+ }
1372
+ type JobOption = 0 | 1 | 2;
1373
+ export interface RepSchema {
1374
+ _id: string;
1375
+ username: string;
1376
+ name: string;
1377
+ password: string;
1378
+ device_id?: string;
1379
+ linked_to_device?: boolean;
1380
+ live_location?: boolean;
1381
+ phone?: string;
1382
+ integration_id?: string;
1383
+ permissions: RepPermissions;
1384
+ preferences: {
1385
+ isLightModeEnabled?: boolean;
1386
+ };
1387
+ profile_pic?: string;
1388
+ teams?: string[];
1389
+ identifier?: number;
1390
+ notification_id?: string;
1391
+ monthly_sales_target?: number;
1392
+ daily_target_visit?: number;
1393
+ sales_type?: 1 | 2;
1394
+ job_option?: JobOption;
1395
+ msl_sales?: string[];
1396
+ job_category?: string[];
1397
+ assigned_warehouse?: string;
1398
+ assigned_main_warehouse?: string;
1399
+ assigned_plan?: string;
1400
+ integration_meta?: {
1401
+ [key: string]: any;
1402
+ };
1403
+ force_online_connectivity?: boolean;
1404
+ assigned_targets?: string[];
1405
+ lines?: string[];
1406
+ targetResults?: TargetResults;
1407
+ previously_assigned_clients?: string[];
1408
+ freshchat_id?: string;
1409
+ disabled?: boolean;
1410
+ company_namespace: string[];
1411
+ createdAt: string;
1412
+ updatedAt: string;
1413
+ __v: number;
1414
+ }
1415
+ export interface RepBody {
1416
+ username?: string;
1417
+ name?: string;
1418
+ password?: string;
1419
+ device_id?: string;
1420
+ linked_to_device?: boolean;
1421
+ live_location?: boolean;
1422
+ phone?: string;
1423
+ integration_id?: string;
1424
+ permissions?: RepPermissions;
1425
+ preferences?: {
1426
+ isLightModeEnabled?: boolean;
1427
+ };
1428
+ profile_pic?: string;
1429
+ teams?: string[];
1430
+ identifier?: number;
1431
+ notification_id?: string;
1432
+ monthly_sales_target?: number;
1433
+ daily_target_visit?: number;
1434
+ sales_type?: 1 | 2;
1435
+ job_option?: JobOption;
1436
+ msl_sales?: string[];
1437
+ job_category?: string[];
1438
+ assigned_warehouse?: string;
1439
+ assigned_main_warehouse?: string;
1440
+ assigned_plan?: string;
1441
+ integration_meta?: {
1442
+ [key: string]: any;
1443
+ };
1444
+ force_online_connectivity?: boolean;
1445
+ assigned_targets?: string[];
1446
+ lines?: string[];
1447
+ targetResults?: TargetResults;
1448
+ previously_assigned_clients?: string[];
1449
+ freshchat_id?: string;
1450
+ disabled?: boolean;
1451
+ company_namespace: string[];
1452
+ }
1453
+ type PopulatedKeys = "line" | "job_category";
1454
+ export type RepWithPopulatedKeysSchema = RepSchema & {
1455
+ lines?: string[] | Line.LineSchema[];
1456
+ job_category?: string[] | JobCategory.JobCategorySchema[];
1457
+ };
1458
+ export namespace Find {
1459
+ type Params = DefaultPaginationQueryParams & {
1460
+ _id?: string[] | string;
1461
+ search?: string;
1462
+ name?: string[] | string;
1463
+ disabled?: boolean;
1464
+ createdAt?: number;
1465
+ updatedAt?: number;
1466
+ username?: string | string[];
1467
+ phone?: string | string[];
1468
+ teams?: string | string[];
1469
+ identifier?: number | number[];
1470
+ msl_sales?: string | string[];
1471
+ job_category?: string | string[];
1472
+ assigned_warehouse?: string | string[];
1473
+ assigned_main_warehouse?: string | string[];
1474
+ assigned_plan?: string | string[];
1475
+ force_online_connectivity?: boolean;
1476
+ assigned_targets?: string | string[];
1477
+ lines?: string | string[];
1478
+ job_option?: JobOption | JobOption[];
1479
+ "permissions.rep_can_add_client"?: boolean;
1480
+ "permissions.rep_can_edit_client"?: boolean;
1481
+ "permissions.rep_can_add_calendar"?: boolean;
1482
+ "permissions.rep_can_edit_calendar"?: boolean;
1483
+ "permissions.rep_can_skip_photo_tag"?: boolean;
1484
+ "permissions.rep_can_edit_product_price"?: boolean;
1485
+ "permissions.rep_must_add_client_with_location"?: boolean;
1486
+ "permissions.rep_can_access_shared_history"?: boolean;
1487
+ "permissions.rep_can_edit_total_shelf_share"?: boolean;
1488
+ "permissions.rep_can_create_transfer"?: boolean;
1489
+ "permissions.rep_can_make_call"?: boolean;
1490
+ "permissions.rep_can_read_stock"?: boolean;
1491
+ "permissions.can_rep_pay_other_reps_invoices"?: boolean;
1492
+ "permissions.rep_can_create_sales_order"?: boolean;
1493
+ "permissions.rep_can_create_invoice"?: boolean;
1494
+ "permissions.rep_can_create_transfer_load"?: boolean;
1495
+ "permissions.rep_can_create_transfer_unload"?: boolean;
1496
+ "permissions.rep_can_create_return_invoice"?: boolean;
1497
+ [key: string]: any;
1498
+ populatedKeys?: PopulatedKeys[];
1499
+ withProductLines?: boolean;
1500
+ withStatus?: boolean;
1501
+ };
1502
+ interface Result extends DefaultPaginationResult {
1503
+ data: (RepSchema & {
1504
+ status?: "Inactive" | "Ended a day" | "Active" | "Visiting" | "Started a day";
1505
+ latest_activity?: string;
1506
+ })[];
1507
+ }
1508
+ }
1509
+ export namespace Get {
1510
+ type ID = string;
1511
+ interface Params {
1512
+ populatedKeys?: PopulatedKeys[];
1513
+ withProductLines?: boolean;
1514
+ }
1515
+ type Result = RepSchema;
1516
+ }
1517
+ export namespace Create {
1518
+ interface Body extends RepBody {
1519
+ name: string;
1520
+ username: string;
1521
+ password: string;
1522
+ }
1523
+ type Result = RepSchema;
1524
+ }
1525
+ export namespace Update {
1526
+ type ID = string;
1527
+ interface Body extends RepBody {
1528
+ _id?: string;
1529
+ createdAt?: string;
1530
+ updatedAt?: string;
1531
+ __v?: number;
1532
+ }
1533
+ type Result = RepSchema;
1534
+ }
1535
+ export namespace Remove {
1536
+ type ID = string;
1537
+ type Result = RepSchema;
1538
+ }
1539
+ export {};
1540
+ }
1541
+ namespace Line {
1542
+ interface LineSchema {
1543
+ _id: string;
1544
+ name: string;
1545
+ local_name?: string;
1546
+ icon?: string;
1547
+ disabled?: boolean;
1548
+ company_namespace: string[];
1549
+ createdAt: string;
1550
+ updatedAt: string;
1551
+ __v: number;
1552
+ }
1553
+ }
1554
+ namespace JobCategory {
1555
+ interface JobSchema {
1556
+ type: 0 | 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9;
1557
+ description: string;
1558
+ tag?: string | Tag.TagSchema;
1559
+ product_id?: string;
1560
+ form_id?: string;
1561
+ msl_id?: string;
1562
+ is_required: boolean;
1563
+ order: number;
1564
+ }
1565
+ export interface JobCategorySchema {
1566
+ _id: string;
1567
+ en_name: string;
1568
+ ar_name?: string;
1569
+ from_date: number;
1570
+ end_date?: number;
1571
+ description?: string;
1572
+ deleted_at?: number;
1573
+ is_sequence: boolean;
1574
+ jobs: JobSchema[];
1575
+ disabled?: boolean;
1576
+ company_namespace: string[];
1577
+ createdAt: string;
1578
+ updatedAt: string;
1579
+ __v: number;
1580
+ }
1581
+ export {};
1582
+ }
1583
+ namespace Tag {
1584
+ type TagType = "photo" | "client" | "area" | "price";
1585
+ export interface TagSchema {
1586
+ _id: string;
1587
+ type: TagType;
1588
+ tag: string;
1589
+ disabled?: boolean;
1590
+ integration_meta?: {
1591
+ [key: string]: any;
1592
+ };
1593
+ company_namespace: string[];
1594
+ createdAt: string;
1595
+ updatedAt: string;
1596
+ __v: number;
1597
+ }
1598
+ export interface TagBody {
1599
+ tag?: string;
1600
+ type?: TagType;
1601
+ disabled?: boolean;
1602
+ integration_meta?: {
1603
+ [key: string]: any;
1604
+ };
1605
+ company_namespace?: string[];
1606
+ }
1607
+ export namespace Find {
1608
+ type Params = DefaultPaginationQueryParams & {
1609
+ _id?: string[] | string;
1610
+ search?: string;
1611
+ tag?: string[] | string;
1612
+ type?: TagType[] | TagType;
1613
+ disabled?: boolean;
1614
+ from_updatedAt?: number;
1615
+ [key: string]: any;
1616
+ };
1617
+ interface Result extends DefaultPaginationResult {
1618
+ data: TagSchema[];
1619
+ }
1620
+ }
1621
+ export namespace Get {
1622
+ type ID = string;
1623
+ type Result = TagSchema;
1624
+ }
1625
+ export namespace Create {
1626
+ interface Body extends TagBody {
1627
+ type: TagType;
1628
+ tag: string;
1629
+ }
1630
+ type Result = TagSchema;
1631
+ }
1632
+ export namespace Update {
1633
+ type ID = string;
1634
+ interface Body extends TagBody {
1635
+ _id?: string;
1636
+ createdAt?: string;
1637
+ updatedAt?: string;
1638
+ __v?: number;
1639
+ }
1640
+ type Result = TagSchema;
1641
+ }
1642
+ export namespace Remove {
1643
+ type ID = string;
1644
+ type Result = TagSchema;
1645
+ }
1646
+ export {};
1647
+ }
1648
+ namespace Warehouse {
1649
+ type WarehouseType = "van" | "main" | "origin";
1650
+ export interface WarehouseSchema {
1651
+ _id: string;
1652
+ type: WarehouseType;
1653
+ name: string;
1654
+ code?: string;
1655
+ disabled?: boolean;
1656
+ integration_meta?: {
1657
+ [key: string]: any;
1658
+ };
1659
+ company_namespace: string[];
1660
+ createdAt: string;
1661
+ updatedAt: string;
1662
+ __v: number;
1663
+ }
1664
+ export interface WarehouseBody {
1665
+ name?: string;
1666
+ type?: "van" | "main";
1667
+ code?: string;
1668
+ disabled?: boolean;
1669
+ integration_meta?: {
1670
+ [key: string]: any;
1671
+ };
1672
+ company_namespace?: string[];
1673
+ }
1674
+ type PopulatedKeys = "rep_id";
1675
+ export namespace Find {
1676
+ type Params = DefaultPaginationQueryParams & {
1677
+ _id?: string[] | string;
1678
+ search?: string;
1679
+ name?: string[] | string;
1680
+ code?: string[] | string;
1681
+ type?: WarehouseType[] | WarehouseType;
1682
+ disabled?: boolean;
1683
+ from_updatedAt?: number;
1684
+ [key: string]: any;
1685
+ populatedKeys?: PopulatedKeys[];
1686
+ };
1687
+ interface Result extends DefaultPaginationResult {
1688
+ data: (WarehouseSchema & {
1689
+ rep_id?: Pick<Rep.RepSchema, "_id" | "name">;
1690
+ })[];
1691
+ }
1692
+ }
1693
+ export namespace Get {
1694
+ type ID = string;
1695
+ type Result = WarehouseSchema;
1696
+ }
1697
+ export namespace Create {
1698
+ interface Body extends WarehouseBody {
1699
+ name: string;
1700
+ type: "van" | "main";
1701
+ }
1702
+ type Result = WarehouseSchema;
1703
+ }
1704
+ export namespace Update {
1705
+ type ID = string;
1706
+ interface Body extends WarehouseBody {
1707
+ _id?: string;
1708
+ createdAt?: string;
1709
+ updatedAt?: string;
1710
+ __v?: number;
1711
+ }
1712
+ type Result = WarehouseSchema;
1713
+ }
1714
+ export namespace Remove {
1715
+ type ID = string;
1716
+ type Result = WarehouseSchema;
1717
+ }
1718
+ export {};
1719
+ }
1720
+ namespace Channel {
1721
+ interface ChannelSchema {
1722
+ _id: string;
1723
+ name: string;
1724
+ local_name?: string;
1725
+ disabled?: boolean;
1726
+ integration_meta?: {
1727
+ [key: string]: any;
1728
+ };
1729
+ company_namespace: string[];
1730
+ createdAt: string;
1731
+ updatedAt: string;
1732
+ __v: number;
1733
+ }
1734
+ interface ChannelBody {
1735
+ name?: string;
1736
+ local_name?: string;
1737
+ disabled?: boolean;
1738
+ integration_meta?: {
1739
+ [key: string]: any;
1740
+ };
1741
+ company_namespace?: string[];
1742
+ }
1743
+ namespace Find {
1744
+ type Params = DefaultPaginationQueryParams & {
1745
+ _id?: string[] | string;
1746
+ search?: string;
1747
+ name?: string[] | string;
1748
+ local_name?: string[] | string;
1749
+ disabled?: boolean;
1750
+ [key: string]: any;
1751
+ };
1752
+ interface Result extends DefaultPaginationResult {
1753
+ data: ChannelSchema[];
1754
+ }
1755
+ }
1756
+ namespace Get {
1757
+ type ID = string;
1758
+ type Result = ChannelSchema;
1759
+ }
1760
+ namespace Create {
1761
+ interface Body extends ChannelBody {
1762
+ name: string;
1763
+ }
1764
+ type Result = ChannelSchema;
1765
+ }
1766
+ namespace Update {
1767
+ type ID = string;
1768
+ interface Body extends ChannelBody {
1769
+ _id?: string;
1770
+ createdAt?: string;
1771
+ updatedAt?: string;
1772
+ __v?: number;
1773
+ }
1774
+ type Result = ChannelSchema;
1775
+ }
1776
+ namespace Remove {
1777
+ type ID = string;
1778
+ type Result = ChannelSchema;
1779
+ }
1780
+ }
1781
+ namespace PaymentTerm {
1782
+ interface PaymentTermSchema {
1783
+ _id: string;
1784
+ name: string;
1785
+ due_days: number;
1786
+ editor: AdminCreator;
1787
+ disabled?: boolean;
1788
+ integration_meta?: {
1789
+ [key: string]: any;
1790
+ };
1791
+ company_namespace: string[];
1792
+ createdAt: string;
1793
+ updatedAt: string;
1794
+ __v: number;
1795
+ }
1796
+ interface PaymentTermBody {
1797
+ name?: string;
1798
+ due_days?: number;
1799
+ editor?: AdminCreator;
1800
+ disabled?: boolean;
1801
+ integration_meta?: {
1802
+ [key: string]: any;
1803
+ };
1804
+ company_namespace?: string[];
1805
+ }
1806
+ namespace Find {
1807
+ type Params = DefaultPaginationQueryParams & {
1808
+ _id?: string[] | string;
1809
+ search?: string;
1810
+ name?: string[] | string;
1811
+ disabled?: boolean;
1812
+ [key: string]: any;
1813
+ };
1814
+ interface Result extends DefaultPaginationResult {
1815
+ data: PaymentTermSchema[];
1816
+ }
1817
+ }
1818
+ namespace Get {
1819
+ type ID = string;
1820
+ type Result = PaymentTermSchema;
1821
+ }
1822
+ namespace Create {
1823
+ interface Body extends PaymentTermBody {
1824
+ name: string;
1825
+ due_days: number;
1826
+ }
1827
+ type Result = PaymentTermSchema;
1828
+ }
1829
+ namespace Update {
1830
+ type ID = string;
1831
+ interface Body extends PaymentTermBody {
1832
+ _id?: string;
1833
+ createdAt?: string;
1834
+ updatedAt?: string;
1835
+ __v?: number;
1836
+ }
1837
+ type Result = PaymentTermSchema;
1838
+ }
1839
+ namespace Remove {
1840
+ type ID = string;
1841
+ type Result = PaymentTermSchema;
1842
+ }
1843
+ }
1844
+ namespace Bank {
1845
+ interface BankSchema {
1846
+ _id: string;
1847
+ name: string;
1848
+ country?: string[];
1849
+ integration_meta?: {
1850
+ [key: string]: any;
1851
+ };
1852
+ company_namespace: string[];
1853
+ createdAt: string;
1854
+ updatedAt: string;
1855
+ __v: number;
1856
+ }
1857
+ interface BankBody {
1858
+ name?: string;
1859
+ country?: string[];
1860
+ integration_meta?: {
1861
+ [key: string]: any;
1862
+ };
1863
+ company_namespace?: string[];
1864
+ }
1865
+ namespace Find {
1866
+ type Params = DefaultPaginationQueryParams & {
1867
+ _id?: string[] | string;
1868
+ search?: string;
1869
+ [key: string]: any;
1870
+ };
1871
+ interface Result extends DefaultPaginationResult {
1872
+ data: BankSchema[];
1873
+ }
1874
+ }
1875
+ namespace Get {
1876
+ type ID = string;
1877
+ type Result = BankSchema;
1878
+ }
1879
+ namespace Create {
1880
+ interface Body extends BankBody {
1881
+ name: string;
1882
+ }
1883
+ type Result = BankSchema;
1884
+ }
1885
+ namespace Update {
1886
+ type ID = string;
1887
+ interface Body extends BankBody {
1888
+ _id?: string;
1889
+ createdAt?: string;
1890
+ updatedAt?: string;
1891
+ __v?: number;
1892
+ }
1893
+ type Result = BankSchema;
1894
+ }
1895
+ }
1896
+ namespace CustomStatus {
1897
+ type CustomStatusModel = "proformas" | "fullinvoices" | "transfers" | "payments";
1898
+ export interface CustomStatusSchema {
1899
+ _id: string;
1900
+ name: string;
1901
+ code: string;
1902
+ model: CustomStatusModel;
1903
+ local_name?: string;
1904
+ is_default: boolean;
1905
+ color?: string;
1906
+ disabled?: boolean;
1907
+ company_namespace: string[];
1908
+ createdAt: string;
1909
+ updatedAt: string;
1910
+ __v: number;
1911
+ }
1912
+ export interface CustomStatusBody {
1913
+ name?: string;
1914
+ code: string;
1915
+ model: CustomStatusModel;
1916
+ local_name?: string;
1917
+ is_default: boolean;
1918
+ color?: string;
1919
+ company_namespace?: string[];
1920
+ disabled?: boolean;
1921
+ }
1922
+ export namespace Find {
1923
+ type Params = DefaultPaginationQueryParams & {
1924
+ _id?: string[] | string;
1925
+ search?: string;
1926
+ name?: string[] | string;
1927
+ code?: string[] | string;
1928
+ model?: CustomStatusModel | CustomStatusModel[];
1929
+ is_default?: boolean;
1930
+ color?: string[] | string;
1931
+ disabled?: boolean;
1932
+ [key: string]: any;
1933
+ };
1934
+ interface Result extends DefaultPaginationResult {
1935
+ data: CustomStatusSchema[];
1936
+ }
1937
+ }
1938
+ export namespace Get {
1939
+ type ID = string;
1940
+ type Result = CustomStatusSchema;
1941
+ }
1942
+ export namespace Create {
1943
+ interface Body extends CustomStatusBody {
1944
+ name: string;
1945
+ model: CustomStatusModel;
1946
+ }
1947
+ type Result = CustomStatusSchema;
1948
+ }
1949
+ export namespace Update {
1950
+ type ID = string;
1951
+ interface Body extends CustomStatusBody {
1952
+ _id?: string;
1953
+ createdAt?: string;
1954
+ updatedAt?: string;
1955
+ __v?: number;
1956
+ }
1957
+ type Result = CustomStatusSchema;
1958
+ }
1959
+ export namespace Remove {
1960
+ type ID = string;
1961
+ type Result = CustomStatusSchema;
1962
+ }
1963
+ export {};
1964
+ }
1965
+ namespace Promotion {
1966
+ interface CompoundSchema {
1967
+ manual_allocation?: boolean;
1968
+ appliedCount: number;
1969
+ sorting: "cheapest" | "expensive";
1970
+ enforcement_mode: "all_in_inventory" | "all" | "gift_in_inventory" | "gift";
1971
+ calculate_hidden_price?: boolean;
1972
+ usage_limit?: number;
1973
+ usage_limit_per_rep?: number;
1974
+ usage_limit_per_client?: number;
1975
+ cart_filters_operator: "and" | "or";
1976
+ cart_filters: {
1977
+ _id: string;
1978
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "cart_total" | "items_count" | "client" | "tag" | "channel" | "distinct_variants_count" | "distinct_products_count" | "promotion";
1979
+ value: string[];
1980
+ operator: "lte" | "lt" | "gte" | "gt" | "eq";
1981
+ reject_if_pass?: boolean;
1982
+ limit_type: "count" | "price_amount";
1983
+ limit_value: number;
1984
+ }[];
1985
+ items_filters_operator: "and" | "or";
1986
+ items_filters: {
1987
+ _id: string;
1988
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "any";
1989
+ value: string[];
1990
+ limit_type: "count" | "price_amount";
1991
+ limit_value: number;
1992
+ }[];
1993
+ get_items_operator: "and" | "or";
1994
+ get_items: {
1995
+ _id: string;
1996
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "gift";
1997
+ value: string[];
1998
+ limit_type: "count";
1999
+ limit_value: number;
2000
+ discount_ratio: number;
2001
+ }[];
2002
+ cart_adjustments: {
2003
+ adjustment_type: "discount_amount" | "discount_ratio" | "shipping_fixed_price" | "shipping_discount_amount" | "shipping_discount_ratio" | "tax_exempt";
2004
+ value: boolean | number;
2005
+ }[];
2006
+ line_filters: {
2007
+ _id: string;
2008
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "line_total" | "base_unit_qty" | "promotion";
2009
+ value: string[];
2010
+ operator: "lte" | "lt" | "gte" | "gt" | "eq";
2011
+ reject_if_pass?: boolean;
2012
+ limit_type: "count" | "price_amount";
2013
+ limit_value: number;
2014
+ }[];
2015
+ line_adjustments: {
2016
+ adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
2017
+ value: number;
2018
+ }[];
2019
+ line_filters_operator: "and" | "or";
2020
+ is_bulk: {
2021
+ type: boolean;
2022
+ default: false;
2023
+ };
2024
+ rounding: "round" | "floor" | "ceil";
2025
+ bulk_over_provide?: boolean;
2026
+ bulk_limit_type?: "count" | "price_amount" | "ratio";
2027
+ bulk_data: {
2028
+ _id: string;
2029
+ from_limit_value: number;
2030
+ to_limit_value?: number;
2031
+ get_limit_value: number;
2032
+ }[];
2033
+ }
2034
+ export interface Schema {
2035
+ _id: string;
2036
+ type: "compound";
2037
+ from: number;
2038
+ to: number;
2039
+ priority?: number;
2040
+ name: string;
2041
+ description?: string;
2042
+ duration?: number;
2043
+ startsAt?: string;
2044
+ disabled?: boolean;
2045
+ details: CompoundSchema;
2046
+ copied_from?: string;
2047
+ ref?: string;
2048
+ company_namespace: string[];
2049
+ createdAt: string;
2050
+ updatedAt: string;
2051
+ __v: number;
2052
+ }
2053
+ export {};
2054
+ }
2055
+ namespace Item {
2056
+ interface Modifier {
2057
+ modifiers_group_id?: string;
2058
+ name?: string;
2059
+ local_name?: string;
2060
+ price?: number;
2061
+ position?: number;
2062
+ disabled?: boolean;
2063
+ company_namespace: string[];
2064
+ overwritePrice?: number;
2065
+ discounted_price?: number;
2066
+ tax_amount?: number;
2067
+ gross_value?: number;
2068
+ }
2069
+ export interface ModifierGroup {
2070
+ name?: string;
2071
+ local_name?: string;
2072
+ position?: number;
2073
+ disabled?: boolean;
2074
+ multiple_modifiers?: boolean;
2075
+ company_namespace: string[];
2076
+ modifiers?: Modifier[];
2077
+ group_total?: number;
2078
+ group_total_before_tax?: number;
2079
+ group_tax_total?: number;
2080
+ }
2081
+ export interface Item_Variant {
2082
+ product_id: string;
2083
+ product_name: string;
2084
+ variant_id: string;
2085
+ variant_name: string;
2086
+ listed_price: number;
2087
+ variant_local_name?: string;
2088
+ variant_img?: string;
2089
+ product_local_name?: string;
2090
+ product_img?: string;
2091
+ product_sku?: string;
2092
+ product_barcode?: string;
2093
+ variant_sku?: string;
2094
+ variant_barcode?: string;
2095
+ }
2096
+ export interface Schema {
2097
+ _id: string;
2098
+ variant: Item_Variant;
2099
+ measureunit: {
2100
+ _id: string;
2101
+ name: string;
2102
+ factor: number;
2103
+ parent?: string;
2104
+ disabled?: boolean;
2105
+ company_namespace: string[];
2106
+ };
2107
+ tax: {
2108
+ name: string;
2109
+ rate: number;
2110
+ type: "inclusive" | "additive" | "N/A";
2111
+ disabled?: boolean;
2112
+ };
2113
+ promotions?: Promotion.Schema[];
2114
+ used_promotions?: {
2115
+ id: string;
2116
+ name: string;
2117
+ };
2118
+ general_promotions?: {
2119
+ id: string;
2120
+ name: string;
2121
+ };
2122
+ applicable_promotions?: {
2123
+ id: string;
2124
+ name: string;
2125
+ };
2126
+ modifiers_groups: ModifierGroup[];
2127
+ isAdditional?: boolean;
2128
+ qty: number;
2129
+ base_unit_qty?: number;
2130
+ overwritePrice?: number;
2131
+ price: number;
2132
+ discounted_price: number;
2133
+ tax_amount: number;
2134
+ tax_total: number;
2135
+ discount_value: number;
2136
+ gross_value?: number;
2137
+ line_total?: number;
2138
+ total_before_tax?: number;
2139
+ hidden_price?: number;
2140
+ modifiers_total?: number;
2141
+ modifiers_total_before_tax?: number;
2142
+ modifiers_tax_total?: number;
2143
+ tax_total_without_modifiers?: number;
2144
+ line_total_without_modifiers?: number;
2145
+ total_before_tax_without_modifiers?: number;
2146
+ deductionRatio?: number;
2147
+ deductedTax?: number;
2148
+ deduction?: number;
2149
+ deductionBeforeTax?: number;
2150
+ lineTotalAfterDeduction?: number;
2151
+ company_namespace: string[];
2152
+ class: "invoice" | "return";
2153
+ note?: string;
2154
+ }
2155
+ export interface Body {
2156
+ variant: Item_Variant;
2157
+ measureunit: {
2158
+ _id: string;
2159
+ name: string;
2160
+ factor: number;
2161
+ parent?: string;
2162
+ disabled?: boolean;
2163
+ company_namespace: string[];
2164
+ };
2165
+ tax: {
2166
+ name: string;
2167
+ rate: number;
2168
+ type: "inclusive" | "additive" | "N/A";
2169
+ disabled?: boolean;
2170
+ };
2171
+ promotions?: Promotion.Schema[];
2172
+ used_promotions?: {
2173
+ id: string;
2174
+ name: string;
2175
+ };
2176
+ general_promotions?: {
2177
+ id: string;
2178
+ name: string;
2179
+ };
2180
+ applicable_promotions?: {
2181
+ id: string;
2182
+ name: string;
2183
+ };
2184
+ modifiers_groups?: ModifierGroup[];
2185
+ isAdditional?: boolean;
2186
+ qty: number;
2187
+ base_unit_qty?: number;
2188
+ overwritePrice?: number;
2189
+ price: number;
2190
+ discounted_price: number;
2191
+ tax_amount: number;
2192
+ tax_total: number;
2193
+ discount_value: number;
2194
+ gross_value?: number;
2195
+ line_total?: number;
2196
+ total_before_tax?: number;
2197
+ hidden_price?: number;
2198
+ modifiers_total?: number;
2199
+ modifiers_total_before_tax?: number;
2200
+ modifiers_tax_total?: number;
2201
+ tax_total_without_modifiers?: number;
2202
+ line_total_without_modifiers?: number;
2203
+ total_before_tax_without_modifiers?: number;
2204
+ deductionRatio?: number;
2205
+ deductedTax?: number;
2206
+ deduction?: number;
2207
+ deductionBeforeTax?: number;
2208
+ lineTotalAfterDeduction?: number;
2209
+ company_namespace?: string[];
2210
+ note?: string;
2211
+ }
2212
+ export {};
2213
+ }
2214
+ namespace FullInvoice {
2215
+ interface InvoiceSchema {
2216
+ _id: string;
2217
+ items: Item.Schema[];
2218
+ return_items: Item.Schema[];
2219
+ integration_meta?: {
2220
+ [key: string]: any;
2221
+ };
2222
+ external_serial_number?: string;
2223
+ qr_code_tlv?: string;
2224
+ processable?: boolean;
2225
+ client_id: string;
2226
+ client_name: string;
2227
+ comment?: string;
2228
+ return_comment?: string;
2229
+ creator: AdminCreator | RepCreator | ClientCreator;
2230
+ latest?: boolean;
2231
+ version?: number;
2232
+ time?: number;
2233
+ issue_date: string;
2234
+ delivery_date?: string;
2235
+ currency: string;
2236
+ serial_number: SerialNumber;
2237
+ geo_tag?: {
2238
+ type: "Point";
2239
+ coordinates: number[];
2240
+ };
2241
+ sync_id: string;
2242
+ address?: {
2243
+ [key: string]: any;
2244
+ };
2245
+ company_namespace: string[];
2246
+ promotions: Promotion.Schema[];
2247
+ priceLists: {
2248
+ [key: string]: any;
2249
+ }[];
2250
+ visit_id?: string;
2251
+ teams?: string[];
2252
+ converter?: AdminCreator | RepCreator | ClientCreator;
2253
+ converted_proforma_serial_number?: SerialNumber;
2254
+ converted_proforma_return_serial_number?: SerialNumber;
2255
+ proforma_reference?: string;
2256
+ converted_at?: number;
2257
+ exclude_return_items?: boolean;
2258
+ returned_from?: string;
2259
+ returned_to?: string;
2260
+ returned_from_serial_number?: SerialNumber;
2261
+ returned_to_serial_number?: SerialNumber;
2262
+ is_void?: boolean;
2263
+ due_date: string;
2264
+ return_serial_number?: SerialNumber;
2265
+ origin_warehouse: string;
2266
+ route?: string;
2267
+ paymentsData: {
2268
+ _id: string;
2269
+ invoice_value: number;
2270
+ paid: number;
2271
+ balance: number;
2272
+ payments: PaymentData[];
2273
+ };
2274
+ consumption: {
2275
+ status: "consumed" | "unconsumed" | "partially_consumed";
2276
+ remainder: number;
2277
+ };
2278
+ status: InvoiceStatus;
2279
+ custom_status?: string;
2280
+ subtotal: number;
2281
+ discount_amount: number;
2282
+ taxable_subtotal: number;
2283
+ tax_amount: number;
2284
+ total: number;
2285
+ pre_subtotal: number;
2286
+ pre_discount_amount: number;
2287
+ pre_taxable_subtotal: number;
2288
+ pre_tax_amount: number;
2289
+ pre_total: number;
2290
+ return_subtotal: number;
2291
+ return_discount_amount: number;
2292
+ return_taxable_subtotal: number;
2293
+ return_tax_amount: number;
2294
+ return_total: number;
2295
+ deductionRatio?: number;
2296
+ deductionFixed?: number;
2297
+ totalDeductedTax?: number;
2298
+ totalDeduction?: number;
2299
+ totalDeductionBeforeTax?: number;
2300
+ totalAfterDeduction?: number;
2301
+ taxes?: {
2302
+ [key: string]: any;
2303
+ };
2304
+ overwriteDeductionFixed?: number;
2305
+ overwriteTaxExempt?: boolean;
2306
+ tax_exempt?: boolean;
2307
+ overwriteDeductionRatio?: number;
2308
+ shipping_zone?: {
2309
+ geoData: {
2310
+ type: "Polygon";
2311
+ coordinates: number[][][];
2312
+ }[];
2313
+ name: string;
2314
+ local_name?: string;
2315
+ shipping_method?: {
2316
+ local_name?: string;
2317
+ name: string;
2318
+ rate?: number;
2319
+ tax?: string;
2320
+ description?: string;
2321
+ local_description?: string;
2322
+ company_namespace: string[];
2323
+ };
2324
+ note?: string;
2325
+ local_note?: string;
2326
+ country: string;
2327
+ reachable: boolean;
2328
+ company_namespace: string[];
2329
+ };
2330
+ payment_method?: {
2331
+ name: string;
2332
+ local_name?: string;
2333
+ fee?: number;
2334
+ rate?: number;
2335
+ type: "online" | "offline";
2336
+ company_namespace: string[];
2337
+ };
2338
+ shipping_price?: number;
2339
+ shipping_tax?: number;
2340
+ shipping_charge?: number;
2341
+ payment_charge?: number;
2342
+ total_with_charges?: number;
2343
+ payment?: {
2344
+ amount?: number;
2345
+ };
2346
+ createdAt: string;
2347
+ updatedAt: string;
2348
+ __v: number;
2349
+ }
2350
+ interface CreateBody {
2351
+ items?: Item.Body[];
2352
+ return_items?: Item.Body[];
2353
+ integration_meta?: {
2354
+ [key: string]: any;
2355
+ };
2356
+ external_serial_number?: string;
2357
+ processable?: boolean;
2358
+ client_id: string;
2359
+ client_name: string;
2360
+ comment?: string;
2361
+ return_comment?: string;
2362
+ creator?: AdminCreator | RepCreator | ClientCreator;
2363
+ version?: number;
2364
+ time?: number;
2365
+ issue_date: string;
2366
+ delivery_date?: string;
2367
+ currency?: string;
2368
+ serial_number?: SerialNumber;
2369
+ geo_tag?: {
2370
+ type: "Point";
2371
+ coordinates: number[];
2372
+ };
2373
+ sync_id: string;
2374
+ address?: {
2375
+ [key: string]: any;
2376
+ };
2377
+ company_namespace?: string[];
2378
+ promotions?: Promotion.Schema[];
2379
+ priceLists: {
2380
+ [key: string]: any;
2381
+ }[];
2382
+ visit_id?: string;
2383
+ teams?: string[];
2384
+ due_date: string;
2385
+ return_serial_number?: SerialNumber;
2386
+ origin_warehouse: string;
2387
+ route?: string;
2388
+ custom_status?: string;
2389
+ subtotal: number;
2390
+ discount_amount: number;
2391
+ taxable_subtotal: number;
2392
+ tax_amount: number;
2393
+ total: number;
2394
+ pre_subtotal: number;
2395
+ pre_discount_amount: number;
2396
+ pre_taxable_subtotal: number;
2397
+ pre_tax_amount: number;
2398
+ pre_total: number;
2399
+ return_subtotal: number;
2400
+ return_discount_amount: number;
2401
+ return_taxable_subtotal: number;
2402
+ return_tax_amount: number;
2403
+ return_total: number;
2404
+ deductionRatio?: number;
2405
+ deductionFixed?: number;
2406
+ totalDeductedTax?: number;
2407
+ totalDeduction?: number;
2408
+ totalDeductionBeforeTax?: number;
2409
+ totalAfterDeduction?: number;
2410
+ taxes?: {
2411
+ [key: string]: any;
2412
+ };
2413
+ overwriteDeductionFixed?: number;
2414
+ overwriteTaxExempt?: boolean;
2415
+ tax_exempt?: boolean;
2416
+ overwriteDeductionRatio?: number;
2417
+ shipping_zone?: {
2418
+ geoData: {
2419
+ type: "Polygon";
2420
+ coordinates: number[][][];
2421
+ }[];
2422
+ name: string;
2423
+ local_name?: string;
2424
+ shipping_method?: {
2425
+ local_name?: string;
2426
+ name: string;
2427
+ rate?: number;
2428
+ tax?: string;
2429
+ description?: string;
2430
+ local_description?: string;
2431
+ company_namespace: string[];
2432
+ };
2433
+ note?: string;
2434
+ local_note?: string;
2435
+ country: string;
2436
+ reachable: boolean;
2437
+ company_namespace: string[];
2438
+ };
2439
+ payment_method?: {
2440
+ name: string;
2441
+ local_name?: string;
2442
+ fee?: number;
2443
+ rate?: number;
2444
+ type: "online" | "offline";
2445
+ company_namespace: string[];
2446
+ };
2447
+ shipping_price?: number;
2448
+ shipping_tax?: number;
2449
+ shipping_charge?: number;
2450
+ payment_charge?: number;
2451
+ total_with_charges?: number;
2452
+ payment?: {
2453
+ amount?: number;
2454
+ };
2455
+ }
2456
+ interface UpdateBody {
2457
+ integration_meta?: {
2458
+ [key: string]: any;
2459
+ };
2460
+ issue_date?: string;
2461
+ }
2462
+ type InvoiceSchemaWithPopulatedKeys = {
2463
+ _id: string;
2464
+ items: {
2465
+ variant: {
2466
+ product_name: string;
2467
+ variant_id: Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
2468
+ product_id: Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
2469
+ variant_name: string;
2470
+ listed_price: number;
2471
+ variant_local_name?: string;
2472
+ variant_img?: string;
2473
+ product_local_name?: string;
2474
+ product_img?: string;
2475
+ product_sku?: string;
2476
+ product_barcode?: string;
2477
+ variant_sku?: string;
2478
+ variant_barcode?: string;
2479
+ };
2480
+ measureunit: {
2481
+ _id: string;
2482
+ name: string;
2483
+ factor: number;
2484
+ parent?: string;
2485
+ disabled?: boolean;
2486
+ company_namespace: string[];
2487
+ };
2488
+ tax: {
2489
+ name: string;
2490
+ rate: number;
2491
+ type: "inclusive" | "additive" | "N/A";
2492
+ disabled?: boolean;
2493
+ };
2494
+ promotions?: Promotion.Schema[];
2495
+ used_promotions?: {
2496
+ id: string;
2497
+ name: string;
2498
+ };
2499
+ general_promotions?: {
2500
+ id: string;
2501
+ name: string;
2502
+ };
2503
+ applicable_promotions?: {
2504
+ id: string;
2505
+ name: string;
2506
+ };
2507
+ modifiers_groups?: Item.ModifierGroup[];
2508
+ isAdditional?: boolean;
2509
+ qty: number;
2510
+ base_unit_qty?: number;
2511
+ overwritePrice?: number;
2512
+ price: number;
2513
+ discounted_price: number;
2514
+ tax_amount: number;
2515
+ tax_total: number;
2516
+ discount_value: number;
2517
+ gross_value?: number;
2518
+ line_total?: number;
2519
+ total_before_tax?: number;
2520
+ hidden_price?: number;
2521
+ modifiers_total?: number;
2522
+ modifiers_total_before_tax?: number;
2523
+ modifiers_tax_total?: number;
2524
+ tax_total_without_modifiers?: number;
2525
+ line_total_without_modifiers?: number;
2526
+ total_before_tax_without_modifiers?: number;
2527
+ deductionRatio?: number;
2528
+ deductedTax?: number;
2529
+ deduction?: number;
2530
+ deductionBeforeTax?: number;
2531
+ lineTotalAfterDeduction?: number;
2532
+ company_namespace?: string[];
2533
+ note?: string;
2534
+ }[];
2535
+ return_items: {
2536
+ variant: {
2537
+ product_name: string;
2538
+ variant_id: Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
2539
+ product_id: Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
2540
+ variant_name: string;
2541
+ listed_price: number;
2542
+ variant_local_name?: string;
2543
+ variant_img?: string;
2544
+ product_local_name?: string;
2545
+ product_img?: string;
2546
+ product_sku?: string;
2547
+ product_barcode?: string;
2548
+ variant_sku?: string;
2549
+ variant_barcode?: string;
2550
+ };
2551
+ measureunit: {
2552
+ _id: string;
2553
+ name: string;
2554
+ factor: number;
2555
+ parent?: string;
2556
+ disabled?: boolean;
2557
+ company_namespace: string[];
2558
+ };
2559
+ tax: {
2560
+ name: string;
2561
+ rate: number;
2562
+ type: "inclusive" | "additive" | "N/A";
2563
+ disabled?: boolean;
2564
+ };
2565
+ promotions?: Promotion.Schema[];
2566
+ used_promotions?: {
2567
+ id: string;
2568
+ name: string;
2569
+ };
2570
+ general_promotions?: {
2571
+ id: string;
2572
+ name: string;
2573
+ };
2574
+ applicable_promotions?: {
2575
+ id: string;
2576
+ name: string;
2577
+ };
2578
+ modifiers_groups?: Item.ModifierGroup[];
2579
+ isAdditional?: boolean;
2580
+ qty: number;
2581
+ base_unit_qty?: number;
2582
+ overwritePrice?: number;
2583
+ price: number;
2584
+ discounted_price: number;
2585
+ tax_amount: number;
2586
+ tax_total: number;
2587
+ discount_value: number;
2588
+ gross_value?: number;
2589
+ line_total?: number;
2590
+ total_before_tax?: number;
2591
+ hidden_price?: number;
2592
+ modifiers_total?: number;
2593
+ modifiers_total_before_tax?: number;
2594
+ modifiers_tax_total?: number;
2595
+ tax_total_without_modifiers?: number;
2596
+ line_total_without_modifiers?: number;
2597
+ total_before_tax_without_modifiers?: number;
2598
+ deductionRatio?: number;
2599
+ deductedTax?: number;
2600
+ deduction?: number;
2601
+ deductionBeforeTax?: number;
2602
+ lineTotalAfterDeduction?: number;
2603
+ company_namespace?: string[];
2604
+ note?: string;
2605
+ }[];
2606
+ integration_meta?: {
2607
+ [key: string]: any;
2608
+ };
2609
+ external_serial_number?: string;
2610
+ qr_code_tlv?: string;
2611
+ processable?: boolean;
2612
+ client_name: string;
2613
+ comment?: string;
2614
+ return_comment?: string;
2615
+ creator: AdminCreator | RepCreator | ClientCreator;
2616
+ latest?: boolean;
2617
+ version?: number;
2618
+ time?: number;
2619
+ issue_date: string;
2620
+ delivery_date?: string;
2621
+ currency: string;
2622
+ serial_number: SerialNumber;
2623
+ geo_tag?: {
2624
+ type: "Point";
2625
+ coordinates: number[];
2626
+ };
2627
+ sync_id: string;
2628
+ address?: {
2629
+ [key: string]: any;
2630
+ };
2631
+ company_namespace: string[];
2632
+ promotions: Promotion.Schema[];
2633
+ priceLists: {
2634
+ [key: string]: any;
2635
+ }[];
2636
+ visit_id?: string;
2637
+ teams?: string[];
2638
+ converter?: AdminCreator | RepCreator | ClientCreator;
2639
+ converted_proforma_serial_number?: SerialNumber;
2640
+ converted_proforma_return_serial_number?: SerialNumber;
2641
+ proforma_reference?: string;
2642
+ converted_at?: number;
2643
+ exclude_return_items?: boolean;
2644
+ returned_from?: string;
2645
+ returned_to?: string;
2646
+ returned_from_serial_number?: SerialNumber;
2647
+ returned_to_serial_number?: SerialNumber;
2648
+ is_void?: boolean;
2649
+ due_date: string;
2650
+ return_serial_number?: SerialNumber;
2651
+ origin_warehouse: string;
2652
+ route?: string;
2653
+ paymentsData: {
2654
+ _id: string;
2655
+ invoice_value: number;
2656
+ paid: number;
2657
+ balance: number;
2658
+ payments: PaymentData[];
2659
+ };
2660
+ consumption: {
2661
+ status: "consumed" | "unconsumed" | "partially_consumed";
2662
+ remainder: number;
2663
+ };
2664
+ status: InvoiceStatus;
2665
+ subtotal: number;
2666
+ discount_amount: number;
2667
+ taxable_subtotal: number;
2668
+ tax_amount: number;
2669
+ total: number;
2670
+ pre_subtotal: number;
2671
+ pre_discount_amount: number;
2672
+ pre_taxable_subtotal: number;
2673
+ pre_tax_amount: number;
2674
+ pre_total: number;
2675
+ return_subtotal: number;
2676
+ return_discount_amount: number;
2677
+ return_taxable_subtotal: number;
2678
+ return_tax_amount: number;
2679
+ return_total: number;
2680
+ deductionRatio?: number;
2681
+ deductionFixed?: number;
2682
+ totalDeductedTax?: number;
2683
+ totalDeduction?: number;
2684
+ totalDeductionBeforeTax?: number;
2685
+ totalAfterDeduction?: number;
2686
+ taxes?: {
2687
+ [key: string]: any;
2688
+ };
2689
+ overwriteDeductionFixed?: number;
2690
+ overwriteTaxExempt?: boolean;
2691
+ tax_exempt?: boolean;
2692
+ overwriteDeductionRatio?: number;
2693
+ shipping_zone?: {
2694
+ geoData: {
2695
+ type: "Polygon";
2696
+ coordinates: number[][][];
2697
+ }[];
2698
+ name: string;
2699
+ local_name?: string;
2700
+ shipping_method?: {
2701
+ local_name?: string;
2702
+ name: string;
2703
+ rate?: number;
2704
+ tax?: string;
2705
+ description?: string;
2706
+ local_description?: string;
2707
+ company_namespace: string[];
2708
+ };
2709
+ note?: string;
2710
+ local_note?: string;
2711
+ country: string;
2712
+ reachable: boolean;
2713
+ company_namespace: string[];
2714
+ };
2715
+ payment_method?: {
2716
+ name: string;
2717
+ local_name?: string;
2718
+ fee?: number;
2719
+ rate?: number;
2720
+ type: "online" | "offline";
2721
+ company_namespace: string[];
2722
+ };
2723
+ shipping_price?: number;
2724
+ shipping_tax?: number;
2725
+ shipping_charge?: number;
2726
+ payment_charge?: number;
2727
+ total_with_charges?: number;
2728
+ payment?: {
2729
+ amount?: number;
2730
+ };
2731
+ createdAt: string;
2732
+ updatedAt: string;
2733
+ __v: number;
2734
+ client_id?: string | Client.ClientSchema;
2735
+ custom_status?: string | CustomStatus.CustomStatusSchema;
2736
+ tax_number?: string | Pick<Client.ClientSchema, "_id" | "tax_number">;
2737
+ };
2738
+ type InvoiceStatus = "paid" | "unpaid" | "partially_paid";
2739
+ type PopulatedKeys = "client" | "tax_number" | "custom_status";
2740
+ type SortingKeys = "line_total" | "product_name" | "variant_name" | "product_sku" | "product_barcode" | "variant_sku" | "variant_barcode";
2741
+ export namespace Find {
2742
+ type Params = DefaultPaginationQueryParams & {
2743
+ _id?: string[] | string;
2744
+ "creator._id"?: string[] | string;
2745
+ creator?: string[] | string;
2746
+ client_id?: string[] | string;
2747
+ clients?: string[] | string;
2748
+ from_issue_date?: number;
2749
+ to_issue_date?: number;
2750
+ origin_warehouse?: string[] | string;
2751
+ custom_status?: string[] | string;
2752
+ status?: InvoiceStatus | InvoiceStatus[];
2753
+ is_void: false;
2754
+ has_return?: boolean;
2755
+ [key: string]: any;
2756
+ populatedKeys?: PopulatedKeys[];
2757
+ sortPage?: SortingKeys;
2758
+ };
2759
+ interface Result extends DefaultPaginationResult {
2760
+ data: InvoiceSchemaWithPopulatedKeys[];
2761
+ absolute_total: number;
2762
+ page_total: number;
2763
+ }
2764
+ }
2765
+ export namespace Get {
2766
+ type ID = string;
2767
+ interface Params {
2768
+ populatedKeys?: PopulatedKeys[];
2769
+ sortPage?: SortingKeys;
2770
+ }
2771
+ type Result = InvoiceSchemaWithPopulatedKeys;
2772
+ }
2773
+ export namespace Create {
2774
+ type Body = CreateBody;
2775
+ type Result = InvoiceSchema;
2776
+ }
2777
+ export namespace Update {
2778
+ type ID = string;
2779
+ type Body = UpdateBody;
2780
+ type Result = InvoiceSchema;
2781
+ }
2782
+ export {};
2783
+ }
2784
+ namespace Proforma {
2785
+ interface ProformaSchema {
2786
+ _id: string;
2787
+ items: Item.Schema[];
2788
+ integration_meta?: {
2789
+ [key: string]: any;
2790
+ };
2791
+ external_serial_number?: string;
2792
+ processable?: boolean;
2793
+ client_id: string;
2794
+ client_name: string;
2795
+ comment?: string;
2796
+ creator: AdminCreator | RepCreator | ClientCreator;
2797
+ latest: boolean;
2798
+ version?: number;
2799
+ time?: number;
2800
+ issue_date: string;
2801
+ delivery_date?: string;
2802
+ currency: string;
2803
+ serial_number: SerialNumber;
2804
+ geo_tag?: {
2805
+ type: "Point";
2806
+ coordinates: number[];
2807
+ };
2808
+ sync_id: string;
2809
+ address?: {
2810
+ [key: string]: any;
2811
+ };
2812
+ company_namespace: string[];
2813
+ promotions: Promotion.Schema[];
2814
+ priceLists: {
2815
+ [key: string]: any;
2816
+ }[];
2817
+ visit_id?: string;
2818
+ teams?: string[];
2819
+ converter?: AdminCreator | RepCreator | ClientCreator;
2820
+ invoice_reference?: string;
2821
+ converted_at?: number;
2822
+ route?: string;
2823
+ status: ProformaStatus;
2824
+ custom_status?: string;
2825
+ editor?: AdminCreator | RepCreator | ClientCreator;
2826
+ disabled: boolean;
2827
+ subtotal: number;
2828
+ discount_amount: number;
2829
+ taxable_subtotal: number;
2830
+ tax_amount: number;
2831
+ total: number;
2832
+ pre_subtotal?: number;
2833
+ pre_discount_amount?: number;
2834
+ pre_taxable_subtotal?: number;
2835
+ pre_tax_amount?: number;
2836
+ pre_total?: number;
2837
+ return_subtotal?: number;
2838
+ return_discount_amount?: number;
2839
+ return_taxable_subtotal?: number;
2840
+ return_tax_amount?: number;
2841
+ return_total?: number;
2842
+ deductionRatio?: number;
2843
+ deductionFixed?: number;
2844
+ totalDeductedTax?: number;
2845
+ totalDeduction?: number;
2846
+ totalDeductionBeforeTax?: number;
2847
+ totalAfterDeduction?: number;
2848
+ taxes?: {
2849
+ [key: string]: any;
2850
+ };
2851
+ overwriteDeductionFixed?: number;
2852
+ overwriteTaxExempt?: boolean;
2853
+ tax_exempt?: boolean;
2854
+ overwriteDeductionRatio?: number;
2855
+ shipping_zone?: {
2856
+ geoData: {
2857
+ type: "Polygon";
2858
+ coordinates: number[][][];
2859
+ }[];
2860
+ name: string;
2861
+ local_name?: string;
2862
+ shipping_method?: {
2863
+ local_name?: string;
2864
+ name: string;
2865
+ rate?: number;
2866
+ tax?: string;
2867
+ description?: string;
2868
+ local_description?: string;
2869
+ company_namespace: string[];
2870
+ };
2871
+ note?: string;
2872
+ local_note?: string;
2873
+ country: string;
2874
+ reachable: boolean;
2875
+ company_namespace: string[];
2876
+ };
2877
+ payment_method?: {
2878
+ name: string;
2879
+ local_name?: string;
2880
+ fee?: number;
2881
+ rate?: number;
2882
+ type: "online" | "offline";
2883
+ company_namespace: string[];
2884
+ };
2885
+ shipping_price?: number;
2886
+ shipping_tax?: number;
2887
+ shipping_charge?: number;
2888
+ payment_charge?: number;
2889
+ total_with_charges?: number;
2890
+ createdAt: string;
2891
+ updatedAt: string;
2892
+ __v: number;
2893
+ }
2894
+ interface CreateBody {
2895
+ items: Item.Schema[];
2896
+ integration_meta?: {
2897
+ [key: string]: any;
2898
+ };
2899
+ external_serial_number?: string;
2900
+ processable?: boolean;
2901
+ client_id: string;
2902
+ client_name: string;
2903
+ comment?: string;
2904
+ creator: AdminCreator | RepCreator | ClientCreator;
2905
+ version?: number;
2906
+ time?: number;
2907
+ issue_date: string;
2908
+ delivery_date?: string;
2909
+ currency?: string;
2910
+ serial_number?: SerialNumber;
2911
+ geo_tag?: {
2912
+ type: "Point";
2913
+ coordinates: number[];
2914
+ };
2915
+ sync_id: string;
2916
+ address?: {
2917
+ [key: string]: any;
2918
+ };
2919
+ company_namespace?: string[];
2920
+ promotions?: Promotion.Schema[];
2921
+ priceLists?: {
2922
+ [key: string]: any;
2923
+ }[];
2924
+ visit_id?: string;
2925
+ teams?: string[];
2926
+ route?: string;
2927
+ custom_status?: string;
2928
+ disabled?: boolean;
2929
+ subtotal: number;
2930
+ discount_amount: number;
2931
+ taxable_subtotal: number;
2932
+ tax_amount: number;
2933
+ total: number;
2934
+ pre_subtotal?: number;
2935
+ pre_discount_amount?: number;
2936
+ pre_taxable_subtotal?: number;
2937
+ pre_tax_amount?: number;
2938
+ pre_total?: number;
2939
+ return_subtotal?: number;
2940
+ return_discount_amount?: number;
2941
+ return_taxable_subtotal?: number;
2942
+ return_tax_amount?: number;
2943
+ return_total?: number;
2944
+ deductionRatio?: number;
2945
+ deductionFixed?: number;
2946
+ totalDeductedTax?: number;
2947
+ totalDeduction?: number;
2948
+ totalDeductionBeforeTax?: number;
2949
+ totalAfterDeduction?: number;
2950
+ taxes?: {
2951
+ [key: string]: any;
2952
+ };
2953
+ overwriteDeductionFixed?: number;
2954
+ overwriteTaxExempt?: boolean;
2955
+ tax_exempt?: boolean;
2956
+ overwriteDeductionRatio?: number;
2957
+ shipping_zone?: {
2958
+ geoData: {
2959
+ type: "Polygon";
2960
+ coordinates: number[][][];
2961
+ }[];
2962
+ name: string;
2963
+ local_name?: string;
2964
+ shipping_method?: {
2965
+ local_name?: string;
2966
+ name: string;
2967
+ rate?: number;
2968
+ tax?: string;
2969
+ description?: string;
2970
+ local_description?: string;
2971
+ company_namespace: string[];
2972
+ };
2973
+ note?: string;
2974
+ local_note?: string;
2975
+ country: string;
2976
+ reachable: boolean;
2977
+ company_namespace: string[];
2978
+ };
2979
+ payment_method?: {
2980
+ name: string;
2981
+ local_name?: string;
2982
+ fee?: number;
2983
+ rate?: number;
2984
+ type: "online" | "offline";
2985
+ company_namespace: string[];
2986
+ };
2987
+ shipping_price?: number;
2988
+ shipping_tax?: number;
2989
+ shipping_charge?: number;
2990
+ payment_charge?: number;
2991
+ total_with_charges?: number;
2992
+ }
2993
+ interface UpdateBody {
2994
+ _id?: string;
2995
+ items?: Item.Schema[];
2996
+ integration_meta?: {
2997
+ [key: string]: any;
2998
+ };
2999
+ external_serial_number?: string;
3000
+ processable?: boolean;
3001
+ client_id?: string;
3002
+ client_name?: string;
3003
+ comment?: string;
3004
+ creator?: AdminCreator | RepCreator | ClientCreator;
3005
+ latest?: boolean;
3006
+ version?: number;
3007
+ time?: number;
3008
+ issue_date?: string;
3009
+ delivery_date?: string;
3010
+ currency?: string;
3011
+ serial_number?: SerialNumber;
3012
+ geo_tag?: {
3013
+ type: "Point";
3014
+ coordinates: number[];
3015
+ };
3016
+ sync_id?: string;
3017
+ address?: {
3018
+ [key: string]: any;
3019
+ };
3020
+ company_namespace?: string[];
3021
+ promotions?: Promotion.Schema[];
3022
+ priceLists?: {
3023
+ [key: string]: any;
3024
+ }[];
3025
+ visit_id?: string;
3026
+ teams?: string[];
3027
+ converter?: AdminCreator | RepCreator | ClientCreator;
3028
+ invoice_reference?: string;
3029
+ converted_at?: number;
3030
+ route?: string;
3031
+ status?: ProformaStatus;
3032
+ custom_status?: string;
3033
+ editor?: AdminCreator | RepCreator | ClientCreator;
3034
+ disabled?: boolean;
3035
+ subtotal?: number;
3036
+ discount_amount?: number;
3037
+ taxable_subtotal?: number;
3038
+ tax_amount?: number;
3039
+ total?: number;
3040
+ pre_subtotal?: number;
3041
+ pre_discount_amount?: number;
3042
+ pre_taxable_subtotal?: number;
3043
+ pre_tax_amount?: number;
3044
+ pre_total?: number;
3045
+ return_subtotal?: number;
3046
+ return_discount_amount?: number;
3047
+ return_taxable_subtotal?: number;
3048
+ return_tax_amount?: number;
3049
+ return_total?: number;
3050
+ deductionRatio?: number;
3051
+ deductionFixed?: number;
3052
+ totalDeductedTax?: number;
3053
+ totalDeduction?: number;
3054
+ totalDeductionBeforeTax?: number;
3055
+ totalAfterDeduction?: number;
3056
+ taxes?: {
3057
+ [key: string]: any;
3058
+ };
3059
+ overwriteDeductionFixed?: number;
3060
+ overwriteTaxExempt?: boolean;
3061
+ tax_exempt?: boolean;
3062
+ overwriteDeductionRatio?: number;
3063
+ shipping_zone?: {
3064
+ geoData: {
3065
+ type: "Polygon";
3066
+ coordinates: number[][][];
3067
+ }[];
3068
+ name: string;
3069
+ local_name?: string;
3070
+ shipping_method?: {
3071
+ local_name?: string;
3072
+ name: string;
3073
+ rate?: number;
3074
+ tax?: string;
3075
+ description?: string;
3076
+ local_description?: string;
3077
+ company_namespace: string[];
3078
+ };
3079
+ note?: string;
3080
+ local_note?: string;
3081
+ country: string;
3082
+ reachable: boolean;
3083
+ company_namespace: string[];
3084
+ };
3085
+ payment_method?: {
3086
+ name: string;
3087
+ local_name?: string;
3088
+ fee?: number;
3089
+ rate?: number;
3090
+ type: "online" | "offline";
3091
+ company_namespace: string[];
3092
+ };
3093
+ shipping_price?: number;
3094
+ shipping_tax?: number;
3095
+ shipping_charge?: number;
3096
+ payment_charge?: number;
3097
+ total_with_charges?: number;
3098
+ createdAt?: string;
3099
+ updatedAt?: string;
3100
+ __v?: number;
3101
+ }
3102
+ type ProformaSchemaWithPopulatedKeys = ProformaSchema & {
3103
+ items: (Item.Body & {
3104
+ variant: Item.Item_Variant & {
3105
+ variant_sku?: string;
3106
+ product_sku?: string;
3107
+ variant_barcode?: string;
3108
+ product_barcode?: string;
3109
+ };
3110
+ })[];
3111
+ client_id?: string | Client.ClientSchema;
3112
+ custom_status?: string | CustomStatus.CustomStatusSchema;
3113
+ cycle?: Cycle.Schema;
3114
+ };
3115
+ type PopulatedKeys = "custom_status";
3116
+ type ProformaStatus = "pending" | "approved" | "processing" | "rejected";
3117
+ type SortingKeys = "product_sku" | "product_barcode" | "variant_name" | "product_name" | "variant_sku" | "variant_barcode";
3118
+ export namespace Find {
3119
+ type Params = DefaultPaginationQueryParams & {
3120
+ _id?: string[] | string;
3121
+ "creator._id"?: string[] | string;
3122
+ creator?: string[] | string;
3123
+ clients?: string[] | string;
3124
+ disabled?: boolean;
3125
+ latest?: boolean;
3126
+ "serial_number.formatted"?: string[] | string;
3127
+ client_id?: string[] | string;
3128
+ from_issue_date?: number;
3129
+ to_issue_date?: number;
3130
+ from_time?: number;
3131
+ to_time?: number;
3132
+ from_createdAt?: number;
3133
+ to_createdAt?: number;
3134
+ from_updatedAt?: number;
3135
+ to_updatedAt?: number;
3136
+ custom_status?: string[] | string;
3137
+ status?: ProformaStatus | ProformaStatus[];
3138
+ [key: string]: any;
3139
+ sortPage?: SortingKeys;
3140
+ export?: "excel";
3141
+ withClientDetails?: boolean;
3142
+ populatedKeys?: PopulatedKeys[];
3143
+ nodeCycles?: string[] | string;
3144
+ withCycle?: boolean;
3145
+ };
3146
+ interface Result extends DefaultPaginationResult {
3147
+ data: ProformaSchemaWithPopulatedKeys[];
3148
+ }
3149
+ }
3150
+ export namespace Get {
3151
+ type ID = string;
3152
+ interface Params {
3153
+ sortPage?: SortingKeys;
3154
+ withClientDetails?: boolean;
3155
+ withCycle?: boolean;
3156
+ }
3157
+ type Result = (ProformaSchemaWithPopulatedKeys & {
3158
+ custom_status: CustomStatus.CustomStatusSchema;
3159
+ }) | {
3160
+ proforma: ProformaSchemaWithPopulatedKeys & {
3161
+ custom_status: CustomStatus.CustomStatusSchema;
3162
+ };
3163
+ cycle: Cycle.Schema & {
3164
+ can_edit: boolean;
3165
+ current_nodes: string[];
3166
+ };
3167
+ };
3168
+ }
3169
+ export namespace Create {
3170
+ type Body = CreateBody;
3171
+ type Result = ProformaSchema;
3172
+ }
3173
+ export namespace Update {
3174
+ type ID = string;
3175
+ type Body = UpdateBody;
3176
+ type Result = ProformaSchema;
3177
+ }
3178
+ export {};
3179
+ }
3180
+ namespace Payment {
3181
+ interface PaymentSchema {
3182
+ _id: string;
3183
+ status: PaymentStatus;
3184
+ remainder: number;
3185
+ amount: number;
3186
+ client_id: string;
3187
+ client_name: string;
3188
+ creator: AdminCreator | RepCreator;
3189
+ time?: number;
3190
+ serial_number: SerialNumber;
3191
+ route?: string;
3192
+ paytime: string;
3193
+ note?: string;
3194
+ currency: string;
3195
+ payment_type: PaymentType;
3196
+ check?: Check;
3197
+ LinkedTxn?: {
3198
+ Txn_serial_number: SerialNumber;
3199
+ Txn_invoice_total: number;
3200
+ TxnType: "refund" | "invoice";
3201
+ };
3202
+ company_namespace: string[];
3203
+ integration_meta?: {
3204
+ [key: string]: any;
3205
+ };
3206
+ sync_id: string;
3207
+ custom_status?: string;
3208
+ visit_id?: string;
3209
+ teams?: string[];
3210
+ paymentsData: {
3211
+ amount: number;
3212
+ paid: number;
3213
+ balance: number;
3214
+ payments: PaymentData[];
3215
+ };
3216
+ createdAt: string;
3217
+ updatedAt: string;
3218
+ __v: number;
3219
+ }
3220
+ interface CreateBody {
3221
+ amount: number;
3222
+ client_id: string;
3223
+ client_name: string;
3224
+ time?: number;
3225
+ serial_number?: SerialNumber;
3226
+ route?: string;
3227
+ paytime: string;
3228
+ note?: string;
3229
+ currency: string;
3230
+ payment_type: PaymentType;
3231
+ check?: Check;
3232
+ LinkedTxn?: {
3233
+ Txn_serial_number: SerialNumber;
3234
+ Txn_invoice_total: number;
3235
+ TxnType: "refund" | "invoice";
3236
+ };
3237
+ company_namespace?: string[];
3238
+ integration_meta?: {
3239
+ [key: string]: any;
3240
+ };
3241
+ sync_id: string;
3242
+ custom_status?: string;
3243
+ visit_id?: string;
3244
+ teams?: string[];
3245
+ }
3246
+ interface UpdateBody {
3247
+ integration_meta?: {
3248
+ [key: string]: any;
3249
+ };
3250
+ }
3251
+ type PaymentSchemaWithPopulatedKeys = PaymentSchema & {
3252
+ balance_to_refund: number;
3253
+ custom_status?: string | CustomStatus.CustomStatusSchema;
3254
+ check?: Check & {
3255
+ bank: Bank.BankSchema;
3256
+ };
3257
+ invoice?: {
3258
+ invoice_serial_number: string;
3259
+ invoice_date: string;
3260
+ invoice_due_date: string;
3261
+ original_amount: number;
3262
+ payment: number;
3263
+ };
3264
+ };
3265
+ type PaymentType = "check" | "cash";
3266
+ type PopulatedKeys = "custom_status";
3267
+ type PaymentStatus = "consumed" | "unconsumed" | "partially_consumed";
3268
+ export namespace Find {
3269
+ type Params = DefaultPaginationQueryParams & {
3270
+ _id?: string[] | string;
3271
+ "creator._id"?: string[] | string;
3272
+ client_id?: string[] | string;
3273
+ from_paytime?: number;
3274
+ to_paytime?: number;
3275
+ custom_status?: string[] | string;
3276
+ payment_type?: PaymentType | PaymentType[];
3277
+ creator?: string[] | string;
3278
+ clients?: string[] | string;
3279
+ withPrintDetails?: boolean;
3280
+ [key: string]: any;
3281
+ populatedKeys?: PopulatedKeys[];
3282
+ };
3283
+ interface Result extends DefaultPaginationResult {
3284
+ data: PaymentSchemaWithPopulatedKeys[];
3285
+ absolute_total: number;
3286
+ page_total: number;
3287
+ }
3288
+ }
3289
+ export namespace Get {
3290
+ type ID = string;
3291
+ interface Params {
3292
+ withPrintDetails?: boolean;
3293
+ populatedKeys?: PopulatedKeys[];
3294
+ }
3295
+ type Result = PaymentSchemaWithPopulatedKeys & {
3296
+ custom_status: CustomStatus.CustomStatusSchema;
3297
+ };
3298
+ }
3299
+ export namespace Create {
3300
+ type Body = CreateBody;
3301
+ type Result = PaymentSchema;
3302
+ }
3303
+ export namespace Update {
3304
+ type ID = string;
3305
+ type Body = UpdateBody;
3306
+ type Result = PaymentSchema;
3307
+ }
3308
+ export {};
3309
+ }
3310
+ namespace Cycle {
3311
+ type CycleStatus = "pending" | "approved" | "processing" | "rejected";
3312
+ export interface Schema {
3313
+ _id: string;
3314
+ document_type: "proforma" | "transfer";
3315
+ document_id: string;
3316
+ status: CycleStatus;
3317
+ node?: AdminCreator | RepCreator | ClientCreator;
3318
+ creator?: AdminCreator | RepCreator | ClientCreator;
3319
+ current_nodes: {
3320
+ admin: string;
3321
+ admin_name: string;
3322
+ }[];
3323
+ stage?: number;
3324
+ stageName?: string;
3325
+ company_namespace: string[];
3326
+ note?: string;
3327
+ serial_number: SerialNumber;
3328
+ version: number;
3329
+ history: {
3330
+ _id: string;
3331
+ status: CycleStatus;
3332
+ stage: number;
3333
+ stageName: string;
3334
+ node: AdminCreator | RepCreator | ClientCreator;
3335
+ creator: AdminCreator | RepCreator | ClientCreator;
3336
+ note: string;
3337
+ serial_number: SerialNumber;
3338
+ version?: number;
3339
+ createdAt: string;
3340
+ updatedAt: string;
3341
+ __v: number;
3342
+ }[];
3343
+ createdAt: string;
3344
+ updatedAt: string;
3345
+ __v: number;
3346
+ }
3347
+ export {};
3348
+ }
3349
+ namespace Transfer {
3350
+ interface VariantTransfer {
3351
+ variant_id: string;
3352
+ variant_name?: string;
3353
+ product_id?: string;
3354
+ product_name?: string;
3355
+ qty: number;
3356
+ measure_unit_id?: string;
3357
+ measure_unit_name?: string;
3358
+ measure_unit_qty?: number;
3359
+ measure_unit_factor?: number;
3360
+ }
3361
+ interface Schema {
3362
+ _id: string;
3363
+ serial_number: SerialNumber;
3364
+ time: number;
3365
+ creator: AdminCreator | RepCreator;
3366
+ type: TransferType;
3367
+ from: string;
3368
+ to: string;
3369
+ status: TransferStatus;
3370
+ variants: VariantTransfer[];
3371
+ items_count?: number;
3372
+ total_items_base_unit_qty?: number;
3373
+ teams?: string[];
3374
+ custom_status?: string;
3375
+ sync_id: string;
3376
+ integration_meta?: {
3377
+ [key: string]: any;
3378
+ };
3379
+ company_namespace: string[];
3380
+ createdAt: string;
3381
+ updatedAt: string;
3382
+ __v: number;
3383
+ }
3384
+ interface CreateBody {
3385
+ serial_number?: SerialNumber;
3386
+ time: number;
3387
+ type?: TransferType;
3388
+ from: string;
3389
+ to: string;
3390
+ variants: {
3391
+ variant_id: string;
3392
+ variant_name?: string;
3393
+ product_id?: string;
3394
+ product_name?: string;
3395
+ qty: number;
3396
+ measureunit?: {
3397
+ _id: string;
3398
+ name: string;
3399
+ factor: number;
3400
+ [key: string]: any;
3401
+ };
3402
+ }[];
3403
+ custom_status?: string;
3404
+ sync_id: string;
3405
+ integration_meta?: {
3406
+ [key: string]: any;
3407
+ };
3408
+ }
3409
+ type UpdateBody = {
3410
+ _id?: string;
3411
+ serial_number?: SerialNumber;
3412
+ time?: number;
3413
+ creator?: AdminCreator | RepCreator;
3414
+ type?: TransferType;
3415
+ from?: string;
3416
+ to?: string;
3417
+ status?: "pending" | "approved" | "processing" | "rejected";
3418
+ variants?: (VariantTransfer | {
3419
+ variant_id: string;
3420
+ variant_name?: string;
3421
+ product_id?: string;
3422
+ product_name?: string;
3423
+ qty: number;
3424
+ measureunit?: {
3425
+ _id: string;
3426
+ name: string;
3427
+ factor: number;
3428
+ [key: string]: any;
3429
+ };
3430
+ })[];
3431
+ items_count?: number;
3432
+ total_items_base_unit_qty?: number;
3433
+ teams?: string[];
3434
+ custom_status?: string;
3435
+ sync_id?: string;
3436
+ integration_meta?: {
3437
+ [key: string]: any;
3438
+ };
3439
+ company_namespace?: string[];
3440
+ createdAt?: string;
3441
+ updatedAt?: string;
3442
+ __v?: number;
3443
+ } | {
3444
+ integration_meta?: {
3445
+ [key: string]: any;
3446
+ };
3447
+ };
3448
+ type FindResult = Schema & {
3449
+ custom_status?: string | CustomStatus.CustomStatusSchema;
3450
+ from: Warehouse.WarehouseSchema;
3451
+ to: Warehouse.WarehouseSchema;
3452
+ variants: {
3453
+ _id: string;
3454
+ variant_id: string;
3455
+ product_id: string;
3456
+ variant_name: string;
3457
+ product_name: string;
3458
+ qty: number;
3459
+ measure_unit_id?: string;
3460
+ measure_unit_name?: string;
3461
+ measure_unit_qty?: number;
3462
+ measure_unit_factor?: number;
3463
+ UpdatedAt: string;
3464
+ }[];
3465
+ };
3466
+ type GetResult = FindResult & {
3467
+ custom_status: CustomStatus.CustomStatusSchema & {
3468
+ variants: {
3469
+ _id: string;
3470
+ variant_id: string;
3471
+ product_id: string;
3472
+ variant_name: string;
3473
+ product_name: string;
3474
+ qty: number;
3475
+ measure_unit_id?: string;
3476
+ measure_unit_name?: string;
3477
+ measure_unit_qty?: number;
3478
+ measure_unit_factor?: number;
3479
+ UpdatedAt: string;
3480
+ qty_from_before?: number;
3481
+ qty_from_after?: number;
3482
+ qty_to_before?: number;
3483
+ qty_to_after?: number;
3484
+ }[];
3485
+ };
3486
+ };
3487
+ type TransferType = "load" | "unload";
3488
+ type PopulatedKeys = "custom_status";
3489
+ type TransferStatus = "pending" | "approved" | "processing" | "rejected" | "processed";
3490
+ export namespace Find {
3491
+ type Params = DefaultPaginationQueryParams & {
3492
+ _id?: string[] | string;
3493
+ "creator._id"?: string[] | string;
3494
+ "creator.name"?: string[] | string;
3495
+ "creator.type"?: string[] | string;
3496
+ type?: TransferType[] | TransferType;
3497
+ to?: string[] | string;
3498
+ from?: string[] | string;
3499
+ from_createdAt?: number;
3500
+ to_createdAt?: number;
3501
+ status?: TransferStatus | TransferStatus[];
3502
+ custom_status?: string[] | string;
3503
+ creator?: string[] | string;
3504
+ nodeCycles?: string[] | string;
3505
+ populatedKeys?: PopulatedKeys[];
3506
+ [key: string]: any;
3507
+ };
3508
+ interface Result extends DefaultPaginationResult {
3509
+ data: FindResult[];
3510
+ }
3511
+ }
3512
+ export namespace Get {
3513
+ type ID = string;
3514
+ interface Params {
3515
+ populatedKeys?: PopulatedKeys[];
3516
+ withCycle?: boolean;
3517
+ }
3518
+ type Result = GetResult | {
3519
+ transfer: GetResult & {
3520
+ can_edit: boolean;
3521
+ current_nodes: string[];
3522
+ };
3523
+ cycle: Cycle.Schema;
3524
+ };
3525
+ }
3526
+ export namespace Create {
3527
+ type Body = CreateBody;
3528
+ type Result = Schema;
3529
+ }
3530
+ export namespace Update {
3531
+ type ID = string;
3532
+ type Body = UpdateBody;
3533
+ type Result = Schema;
3534
+ }
3535
+ export {};
3536
+ }
3537
+ namespace AdjustAccount {
3538
+ interface VariantOfAdjustAccount {
3539
+ variant: string;
3540
+ variant_name?: string;
3541
+ product_id?: string;
3542
+ product_name?: string;
3543
+ qty: number;
3544
+ }
3545
+ interface Schema {
3546
+ _id: string;
3547
+ serial_number: SerialNumber;
3548
+ time: number;
3549
+ creator: AdminCreator | RepCreator;
3550
+ from: string;
3551
+ to: string;
3552
+ variants: VariantOfAdjustAccount[];
3553
+ teams?: string[];
3554
+ sync_id: string;
3555
+ company_namespace: string[];
3556
+ createdAt: string;
3557
+ updatedAt: string;
3558
+ __v: number;
3559
+ }
3560
+ interface CreateBody {
3561
+ serial_number?: SerialNumber;
3562
+ time: number;
3563
+ creator?: AdminCreator | RepCreator;
3564
+ to: string;
3565
+ variants: VariantOfAdjustAccount[];
3566
+ teams?: string[];
3567
+ sync_id: string;
3568
+ company_namespace?: string[];
3569
+ }
3570
+ type FindResult = Schema & {
3571
+ from: string | Warehouse.WarehouseSchema;
3572
+ to: string | Warehouse.WarehouseSchema;
3573
+ variants: (VariantOfAdjustAccount & {
3574
+ variant: string | {
3575
+ _id: string;
3576
+ name: string;
3577
+ product: {
3578
+ _id: string;
3579
+ name: string;
3580
+ };
3581
+ };
3582
+ })[];
3583
+ };
3584
+ type GetResult = Schema & {
3585
+ from: string | Warehouse.WarehouseSchema;
3586
+ to: string | Warehouse.WarehouseSchema;
3587
+ variants: (VariantOfAdjustAccount & {
3588
+ variant: {
3589
+ _id: string;
3590
+ name: string;
3591
+ product: {
3592
+ _id: string;
3593
+ name: string;
3594
+ };
3595
+ };
3596
+ })[];
3597
+ };
3598
+ type PopulatedKeys = "warehouse" | "variant";
3599
+ export namespace Find {
3600
+ type Params = DefaultPaginationQueryParams & {
3601
+ _id?: string[] | string;
3602
+ "creator._id"?: string[] | string;
3603
+ "creator.name"?: string[] | string;
3604
+ "creator.type"?: string[] | string;
3605
+ to?: string[] | string;
3606
+ from?: string[] | string;
3607
+ from_createdAt?: number;
3608
+ to_createdAt?: number;
3609
+ creator?: string[] | string;
3610
+ populatedKeys?: PopulatedKeys[];
3611
+ };
3612
+ interface Result extends DefaultPaginationResult {
3613
+ data: FindResult[];
3614
+ }
3615
+ }
3616
+ export namespace Get {
3617
+ type ID = string;
3618
+ interface Params {
3619
+ populatedKeys?: PopulatedKeys[];
3620
+ }
3621
+ type Result = GetResult | {
3622
+ transfer: GetResult & {
3623
+ can_edit: boolean;
3624
+ current_nodes: string[];
3625
+ };
3626
+ cycle: Cycle.Schema;
3627
+ };
3628
+ }
3629
+ export namespace Create {
3630
+ type Body = CreateBody;
3631
+ type Result = Schema;
3632
+ }
3633
+ export {};
3634
+ }
3635
+ namespace Inventory {
3636
+ interface InventorySchema {
3637
+ _id: string;
3638
+ warehouse_id: string;
3639
+ warehouse_name: string;
3640
+ variant_id: string;
3641
+ variant_name: string;
3642
+ product_id: string;
3643
+ product_name: string;
3644
+ listed_price: number;
3645
+ qty: number;
3646
+ UpdatedAt: string;
3647
+ }
3648
+ namespace Find {
3649
+ type Params = DefaultPaginationQueryParams & {
3650
+ warehouse_id?: string[] | string;
3651
+ variant_id?: string[] | string;
3652
+ rep?: string[] | string;
3653
+ qty?: number[] | number;
3654
+ from_updatedAt?: number;
3655
+ };
3656
+ interface Result extends DefaultPaginationResult {
3657
+ data: InventorySchema[];
3658
+ }
3659
+ }
3660
+ }
3661
+ }
3662
+ export {};