repzo 1.0.279 → 1.0.281

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.
@@ -11,9 +11,7 @@ export interface Params {
11
11
  [key: string]: any;
12
12
  }
13
13
  export type ReportType =
14
- | "sales-analytics"
15
- | "retail-execution-gallery"
16
- | "from-v2-gallery";
14
+ "sales-analytics" | "retail-execution-gallery" | "from-v2-gallery";
17
15
  export interface Data {
18
16
  [key: string]: any;
19
17
  }
@@ -355,22 +353,11 @@ export interface Route {
355
353
  }
356
354
  export type Priority = 0 | 1 | 2 | 3;
357
355
  export type WorkorderStatus =
358
- | "open"
359
- | "done"
360
- | "cancelled"
361
- | "inprogress"
362
- | "onhold";
356
+ "open" | "done" | "cancelled" | "inprogress" | "onhold";
363
357
 
364
358
  export type Priority_human = "none" | "low" | "medium" | "high";
365
359
  export type Day =
366
- | "Sun"
367
- | "Mon"
368
- | "Tue"
369
- | "Wed"
370
- | "Thu"
371
- | "Fri"
372
- | "Sat"
373
- | string;
360
+ "Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | string;
374
361
 
375
362
  export type FieldType =
376
363
  | "Text"
@@ -508,12 +495,7 @@ export type DocumentTypes =
508
495
  | "ocrInvoiceJobGroup";
509
496
 
510
497
  export type PrintTypes =
511
- | "workorder"
512
- | "form"
513
- | "invoice"
514
- | "proforma"
515
- | "settlement"
516
- | "formV2";
498
+ "workorder" | "form" | "invoice" | "proforma" | "settlement" | "formV2";
517
499
 
518
500
  export type InvoiceFontStyles =
519
501
  | "InvoiceHeaderTitle"
@@ -817,11 +799,9 @@ export namespace Service {
817
799
 
818
800
  type ClientSchemaWithPopulatedKeys = ClientSchema & {
819
801
  assigned_products?:
820
- | StringId[]
821
- | Pick<Product.ProductSchema, "_id" | "name">[];
802
+ StringId[] | Pick<Product.ProductSchema, "_id" | "name">[];
822
803
  assigned_product_groups?:
823
- | StringId
824
- | Pick<ProductGroup.ProductGroupSchema, "_id" | "name">[];
804
+ StringId | Pick<ProductGroup.ProductGroupSchema, "_id" | "name">[];
825
805
  teams?: StringId[] | Pick<Team.TeamSchema, "_id" | "name">[];
826
806
  contacts?: StringId[] | ClientContact.ClientContactSchema[];
827
807
  speciality?: StringId[] | Speciality.SpecialitySchema[];
@@ -830,8 +810,7 @@ export namespace Service {
830
810
  price_tag?: StringId | Tag.TagSchema;
831
811
  job_category?: StringId[] | JobCategory.JobCategorySchema[];
832
812
  sv_priceList?:
833
- | StringId
834
- | Pick<PriceList.PriceListSchema, "_id" | "name">[];
813
+ StringId | Pick<PriceList.PriceListSchema, "_id" | "name">[];
835
814
  chain?:
836
815
  | StringId
837
816
  | Pick<
@@ -840,14 +819,11 @@ export namespace Service {
840
819
  >;
841
820
  channel?: StringId | Channel.ChannelSchema;
842
821
  assigned_forms_v2_templates?:
843
- | StringId[]
844
- | Pick<FormPopulated, "_id" | "name">[];
822
+ StringId[] | Pick<FormPopulated, "_id" | "name">[];
845
823
  assigned_clm_presentations?:
846
- | StringId[]
847
- | Pick<CLMPresentation.Data, "_id" | "name">[];
824
+ StringId[] | Pick<CLMPresentation.Data, "_id" | "name">[];
848
825
  retail_execution_templates?:
849
- | StringId[]
850
- | Pick<RetailExecutionTemplatePopulated, "_id" | "name">[];
826
+ StringId[] | Pick<RetailExecutionTemplatePopulated, "_id" | "name">[];
851
827
  media?: StringId[] | PopulatedMediaStorage[];
852
828
  cover_photo?: StringId | PopulatedMediaStorage;
853
829
  paymentTerm?:
@@ -1063,8 +1039,7 @@ export namespace Service {
1063
1039
  brand?: string | Brand.BrandSchema;
1064
1040
  measureunit_family?: string | MeasureUnitFamily.MeasureUnitFamilySchema;
1065
1041
  product_groups?:
1066
- | string[]
1067
- | Pick<ProductGroup.ProductGroupSchema, "_id" | "name">[];
1042
+ string[] | Pick<ProductGroup.ProductGroupSchema, "_id" | "name">[];
1068
1043
  variants?: Variant.VariantSchema[];
1069
1044
  defaultVariant?: Variant.VariantSchema;
1070
1045
  assigned_media?: string | Media.MediaSchema;
@@ -1213,8 +1188,7 @@ export namespace Service {
1213
1188
 
1214
1189
  type VariantWithPopulatedKeys = VariantSchema & {
1215
1190
  modifiers_groups?:
1216
- | string[]
1217
- | ProductModifiersGroup.ProductModifiersGroupSchema[];
1191
+ string[] | ProductModifiersGroup.ProductModifiersGroupSchema[];
1218
1192
  product?: string | Product.ProductSchema;
1219
1193
  };
1220
1194
  export namespace Find {
@@ -1847,14 +1821,7 @@ export namespace Service {
1847
1821
 
1848
1822
  export namespace Media {
1849
1823
  type MediaType =
1850
- | "ppt"
1851
- | "pptx"
1852
- | "pdf"
1853
- | "jpeg"
1854
- | "jpg"
1855
- | "png"
1856
- | "doc"
1857
- | "docx";
1824
+ "ppt" | "pptx" | "pdf" | "jpeg" | "jpg" | "png" | "doc" | "docx";
1858
1825
  export interface MediaSchema {
1859
1826
  _id: string;
1860
1827
  name: string;
@@ -2638,13 +2605,7 @@ export namespace Service {
2638
2605
  job_duration?: number;
2639
2606
  }
2640
2607
  export type PopulatedKeys =
2641
- | "teams"
2642
- | "tags"
2643
- | "client"
2644
- | "user"
2645
- | "route"
2646
- | "visit"
2647
- | "template_id";
2608
+ "teams" | "tags" | "client" | "user" | "route" | "visit" | "template_id";
2648
2609
 
2649
2610
  export type ActivityStoreCheckWithPopulatedKeysSchema =
2650
2611
  ActivityStorecheckSchema & {
@@ -2655,8 +2616,7 @@ export namespace Service {
2655
2616
  route_populated: Route.RouteSchema | string;
2656
2617
  visit_populated: Visit.VisitSchema | string;
2657
2618
  template_id_populated:
2658
- | StorecheckTemplate.StorecheckTemplateSchema
2659
- | string;
2619
+ StorecheckTemplate.StorecheckTemplateSchema | string;
2660
2620
  };
2661
2621
 
2662
2622
  export namespace Find {
@@ -3077,10 +3037,7 @@ export namespace Service {
3077
3037
  form_v2_option?: "all" | "none" | "assigned" | "client_assigned";
3078
3038
  assigned_forms_v2?: string[];
3079
3039
  retail_execution_template_option?:
3080
- | "all"
3081
- | "client_assigned"
3082
- | "assigned"
3083
- | "none";
3040
+ "all" | "client_assigned" | "assigned" | "none";
3084
3041
  assigned_retail_execution_templates?: string[];
3085
3042
  clm_presentation_option?: "all" | "client_assigned" | "assigned" | "none";
3086
3043
  assigned_clm_presentations?: string[];
@@ -3137,10 +3094,7 @@ export namespace Service {
3137
3094
  form_v2_option?: "all" | "none" | "assigned" | "client_assigned";
3138
3095
  assigned_forms_v2?: string[];
3139
3096
  retail_execution_template_option?:
3140
- | "all"
3141
- | "client_assigned"
3142
- | "assigned"
3143
- | "none";
3097
+ "all" | "client_assigned" | "assigned" | "none";
3144
3098
  assigned_retail_execution_templates?: string[];
3145
3099
  clm_presentation_option?: "all" | "client_assigned" | "assigned" | "none";
3146
3100
  assigned_clm_presentations?: string[];
@@ -3298,9 +3252,7 @@ export namespace Service {
3298
3252
  "settings.item_status_per_visit_limit"?: number;
3299
3253
  "settings.location_permission"?: "always_allow" | "while_using";
3300
3254
  "settings.activities_report_scope"?:
3301
- | "self"
3302
- | "team"
3303
- | "company_namespace";
3255
+ "self" | "team" | "company_namespace";
3304
3256
  "settings.maximum_cash_outstanding_settlement_balance_to_start_day"?: number;
3305
3257
  "settings.maximum_check_outstanding_settlement_balance_to_start_day"?: number;
3306
3258
  "settings.maximum_total_outstanding_settlement_balance_to_start_day"?: number;
@@ -3318,16 +3270,10 @@ export namespace Service {
3318
3270
  form_v2_option?: "all" | "none" | "assigned" | "client_assigned";
3319
3271
  assigned_forms_v2?: StringId | StringId[];
3320
3272
  retail_execution_template_option?:
3321
- | "all"
3322
- | "client_assigned"
3323
- | "assigned"
3324
- | "none";
3273
+ "all" | "client_assigned" | "assigned" | "none";
3325
3274
  assigned_retail_execution_templates?: StringId | StringId[];
3326
3275
  clm_presentation_option?:
3327
- | "all"
3328
- | "client_assigned"
3329
- | "assigned"
3330
- | "none";
3276
+ "all" | "client_assigned" | "assigned" | "none";
3331
3277
  assigned_clm_presentations?: StringId | StringId[];
3332
3278
  media?: string | string[];
3333
3279
  cover_photo?: string;
@@ -3487,12 +3433,7 @@ export namespace Service {
3487
3433
  enable_auto_skip_interval_conditions?: boolean;
3488
3434
  occurrences_per_interval?: number;
3489
3435
  interval?:
3490
- | "day"
3491
- | "week"
3492
- | "month"
3493
- | "year"
3494
- | "life_time"
3495
- | "last_30_days";
3436
+ "day" | "week" | "month" | "year" | "life_time" | "last_30_days";
3496
3437
  per_client?: boolean;
3497
3438
  per_rep?: boolean;
3498
3439
  enable_auto_skip_excluded_clients?: boolean;
@@ -4413,15 +4354,7 @@ export namespace Service {
4413
4354
  key: string;
4414
4355
  value: any[];
4415
4356
  operator:
4416
- | "lte"
4417
- | "lt"
4418
- | "gte"
4419
- | "gt"
4420
- | "eq"
4421
- | "ne"
4422
- | "in"
4423
- | "nin"
4424
- | "search";
4357
+ "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin" | "search";
4425
4358
  id?: string;
4426
4359
  }
4427
4360
  interface Element {
@@ -4824,10 +4757,7 @@ export namespace Service {
4824
4757
  appliedCount: number;
4825
4758
  sorting: "cheapest" | "expensive";
4826
4759
  enforcement_mode:
4827
- | "all_in_inventory"
4828
- | "all"
4829
- | "gift_in_inventory"
4830
- | "gift";
4760
+ "all_in_inventory" | "all" | "gift_in_inventory" | "gift";
4831
4761
  calculate_hidden_price: boolean;
4832
4762
  usage_limit?: number;
4833
4763
  usage_limit_per_rep?: number;
@@ -5210,9 +5140,7 @@ export namespace Service {
5210
5140
  asset_unit?: string;
5211
5141
  auto_closed_by_geofence?: boolean;
5212
5142
  auto_closed_by_geofence_reason:
5213
- | "out_of_geofence"
5214
- | "low_accuracy"
5215
- | "location_turned_off";
5143
+ "out_of_geofence" | "low_accuracy" | "location_turned_off";
5216
5144
  company_namespace: string[];
5217
5145
  option_id?: string;
5218
5146
  invoice_total?: number;
@@ -5362,9 +5290,7 @@ export namespace Service {
5362
5290
  asset_unit?: string;
5363
5291
  auto_closed_by_geofence?: boolean;
5364
5292
  auto_closed_by_geofence_reason?:
5365
- | "out_of_geofence"
5366
- | "low_accuracy"
5367
- | "location_turned_off";
5293
+ "out_of_geofence" | "low_accuracy" | "location_turned_off";
5368
5294
  company_namespace?: string[];
5369
5295
  option_id?: string;
5370
5296
  invoice_total?: number;
@@ -5617,10 +5543,7 @@ export namespace Service {
5617
5543
  feed_back_option?: string;
5618
5544
  }
5619
5545
  export type PopulatedKeys =
5620
- | "teams"
5621
- | "route"
5622
- | "visit_id"
5623
- | "feed_back_option";
5546
+ "teams" | "route" | "visit_id" | "feed_back_option";
5624
5547
 
5625
5548
  export type ActivityFeedbackV2SchemaWithPopulatedKeys =
5626
5549
  ActivityFeedbackV2Schema & {
@@ -5628,8 +5551,7 @@ export namespace Service {
5628
5551
  route_populated?: string | Route.RouteSchema;
5629
5552
  visit_id_populated?: string | Visit.VisitSchema;
5630
5553
  feed_back_option_populated?:
5631
- | string
5632
- | FeedbackOption.FeedbackOptionSchema;
5554
+ string | FeedbackOption.FeedbackOptionSchema;
5633
5555
  };
5634
5556
 
5635
5557
  export namespace Find {
@@ -6461,8 +6383,7 @@ export namespace Service {
6461
6383
  name?: string | string[];
6462
6384
  default_priority?: Default_Priority | Default_Priority[];
6463
6385
  default_priority_human?:
6464
- | Default_Priority_human
6465
- | Default_Priority_human[];
6386
+ Default_Priority_human | Default_Priority_human[];
6466
6387
  default_workorder_categories?: StringId | StringId[];
6467
6388
  formV2?: StringId | StringId[];
6468
6389
  product_groups?: StringId | StringId[];
@@ -7750,11 +7671,9 @@ export namespace Service {
7750
7671
  variant: {
7751
7672
  product_name: string;
7752
7673
  variant_id:
7753
- | string
7754
- | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
7674
+ string | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
7755
7675
  product_id:
7756
- | string
7757
- | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
7676
+ string | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
7758
7677
  variant_name: string;
7759
7678
  listed_price: number;
7760
7679
  variant_local_name?: string;
@@ -7817,11 +7736,9 @@ export namespace Service {
7817
7736
  variant: {
7818
7737
  product_name: string;
7819
7738
  variant_id:
7820
- | string
7821
- | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
7739
+ string | Pick<Variant.VariantSchema, "sku" | "_id" | "barcode">;
7822
7740
  product_id:
7823
- | string
7824
- | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
7741
+ string | Pick<Product.ProductSchema, "sku" | "_id" | "barcode">;
7825
7742
  variant_name: string;
7826
7743
  listed_price: number;
7827
7744
  variant_local_name?: string;
@@ -9324,11 +9241,7 @@ export namespace Service {
9324
9241
  type TransferType = "load" | "unload";
9325
9242
  type PopulatedKeys = "custom_status" | "teams";
9326
9243
  type TransferStatus =
9327
- | "pending"
9328
- | "approved"
9329
- | "processing"
9330
- | "rejected"
9331
- | "processed";
9244
+ "pending" | "approved" | "processing" | "rejected" | "processed";
9332
9245
  export namespace Find {
9333
9246
  export type Params = DefaultPaginationQueryParams & {
9334
9247
  _id?: string[] | string;
@@ -9590,8 +9503,7 @@ export namespace Service {
9590
9503
  teams?: StringId[] | Team.TeamSchema[];
9591
9504
  sync_id: string;
9592
9505
  reason?:
9593
- | StringId
9594
- | InventoryAdjustmentReason.InventoryAdjustmentReasonSchema;
9506
+ StringId | InventoryAdjustmentReason.InventoryAdjustmentReasonSchema;
9595
9507
  transaction_processed: boolean;
9596
9508
  custom_status?: StringId | CustomStatus.CustomStatusSchema;
9597
9509
  company_namespace: string[];
@@ -9655,11 +9567,7 @@ export namespace Service {
9655
9567
  }
9656
9568
 
9657
9569
  type PopulatedKeys =
9658
- | "warehouse"
9659
- | "teams"
9660
- | "custom_status"
9661
- | "reason"
9662
- | "variant";
9570
+ "warehouse" | "teams" | "custom_status" | "reason" | "variant";
9663
9571
  export namespace Find {
9664
9572
  export type Params = DefaultPaginationQueryParams & {
9665
9573
  nodeCycles?: StringId[] | StringId;
@@ -9912,12 +9820,7 @@ export namespace Service {
9912
9820
 
9913
9821
  export namespace CommandLog {
9914
9822
  export type Status =
9915
- | "success"
9916
- | "fail"
9917
- | "processing"
9918
- | "queued"
9919
- | "received"
9920
- | "skipped";
9823
+ "success" | "fail" | "processing" | "queued" | "received" | "skipped";
9921
9824
  export type Detail = {
9922
9825
  timestamp: number;
9923
9826
  content: string;
@@ -10148,15 +10051,7 @@ export namespace Service {
10148
10051
 
10149
10052
  export namespace PatchAction {
10150
10053
  type ReadOperator =
10151
- | "lte"
10152
- | "lt"
10153
- | "gte"
10154
- | "gt"
10155
- | "eq"
10156
- | "ne"
10157
- | "in"
10158
- | "nin"
10159
- | "search";
10054
+ "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin" | "search";
10160
10055
  type WriteOperator = "set" | "addToSet" | "pull";
10161
10056
  type Slug =
10162
10057
  | "client"
@@ -10455,11 +10350,7 @@ export namespace Service {
10455
10350
  }
10456
10351
 
10457
10352
  type PopulatedKeys =
10458
- | "asset_part_types"
10459
- | "assets"
10460
- | "asset_units"
10461
- | "media"
10462
- | "cover_photo";
10353
+ "asset_part_types" | "assets" | "asset_units" | "media" | "cover_photo";
10463
10354
 
10464
10355
  export namespace Find {
10465
10356
  export type Params = DefaultPaginationQueryParams & {
@@ -10477,12 +10368,7 @@ export namespace Service {
10477
10368
  populatedKeys?: PopulatedKeys[];
10478
10369
  sortBy?: {
10479
10370
  field:
10480
- | "_id"
10481
- | "name"
10482
- | "barcode"
10483
- | "model"
10484
- | "createdAt"
10485
- | "updatedAt";
10371
+ "_id" | "name" | "barcode" | "model" | "createdAt" | "updatedAt";
10486
10372
  type: "asc" | "desc";
10487
10373
  }[];
10488
10374
  from__id?: StringId | StringId[];
@@ -10522,11 +10408,7 @@ export namespace Service {
10522
10408
  creator: AdminOrRep;
10523
10409
  editor?: AdminOrRep;
10524
10410
  directional_status:
10525
- | "received"
10526
- | "handed"
10527
- | "picked"
10528
- | "returned"
10529
- | "stored";
10411
+ "received" | "handed" | "picked" | "returned" | "stored";
10530
10412
  asset_part_receival: StringId;
10531
10413
  asset_part_return?: StringId;
10532
10414
  asset_part_index: number;
@@ -10548,16 +10430,10 @@ export namespace Service {
10548
10430
  integration_meta?: { [key: string]: any };
10549
10431
  quotation_is_recommended: boolean;
10550
10432
  quotation_internal_approval_status:
10551
- | "pending"
10552
- | "approved"
10553
- | "completed"
10554
- | "rejected";
10433
+ "pending" | "approved" | "completed" | "rejected";
10555
10434
  quotation_detail?: string;
10556
10435
  quotation_client_approval_status:
10557
- | "pending"
10558
- | "approved"
10559
- | "collected"
10560
- | "rejected";
10436
+ "pending" | "approved" | "collected" | "rejected";
10561
10437
  company_namespace: string[];
10562
10438
  createdAt: Date;
10563
10439
  updatedAt: Date;
@@ -10567,18 +10443,13 @@ export namespace Service {
10567
10443
  creator: AdminOrRep;
10568
10444
  editor?: AdminOrRep;
10569
10445
  directional_status:
10570
- | "received"
10571
- | "handed"
10572
- | "picked"
10573
- | "returned"
10574
- | "stored";
10446
+ "received" | "handed" | "picked" | "returned" | "stored";
10575
10447
  asset_part_receival: StringId | AssetPartReceival.Data;
10576
10448
  asset_part_return?: StringId | ReturnAssetPartUnit.Data;
10577
10449
  asset_part_index: number;
10578
10450
  splitted_from?: StringId | Data;
10579
10451
  client:
10580
- | StringId
10581
- | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
10452
+ StringId | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
10582
10453
  client_name: string;
10583
10454
  warehouse:
10584
10455
  | StringId
@@ -10619,16 +10490,10 @@ export namespace Service {
10619
10490
  integration_meta?: { [key: string]: any };
10620
10491
  quotation_is_recommended: boolean;
10621
10492
  quotation_internal_approval_status:
10622
- | "pending"
10623
- | "approved"
10624
- | "completed"
10625
- | "rejected";
10493
+ "pending" | "approved" | "completed" | "rejected";
10626
10494
  quotation_detail?: string;
10627
10495
  quotation_client_approval_status:
10628
- | "pending"
10629
- | "approved"
10630
- | "collected"
10631
- | "rejected";
10496
+ "pending" | "approved" | "collected" | "rejected";
10632
10497
  company_namespace: string[];
10633
10498
  createdAt: Date;
10634
10499
  updatedAt: Date;
@@ -10636,11 +10501,7 @@ export namespace Service {
10636
10501
  export interface CreateBody {
10637
10502
  creator?: AdminOrRep;
10638
10503
  directional_status:
10639
- | "received"
10640
- | "handed"
10641
- | "picked"
10642
- | "returned"
10643
- | "stored";
10504
+ "received" | "handed" | "picked" | "returned" | "stored";
10644
10505
  asset_part_receival: StringId;
10645
10506
  asset_part_index: number;
10646
10507
  splitted_from?: StringId;
@@ -10661,16 +10522,10 @@ export namespace Service {
10661
10522
  integration_meta?: { [key: string]: any };
10662
10523
  quotation_is_recommended?: boolean;
10663
10524
  quotation_internal_approval_status?:
10664
- | "pending"
10665
- | "approved"
10666
- | "completed"
10667
- | "rejected";
10525
+ "pending" | "approved" | "completed" | "rejected";
10668
10526
  quotation_detail?: string;
10669
10527
  quotation_client_approval_status?:
10670
- | "pending"
10671
- | "approved"
10672
- | "collected"
10673
- | "rejected";
10528
+ "pending" | "approved" | "collected" | "rejected";
10674
10529
  company_namespace?: string[];
10675
10530
  }
10676
10531
  export interface UpdateBody {
@@ -10680,16 +10535,10 @@ export namespace Service {
10680
10535
  editor?: AdminOrRep;
10681
10536
  quotation_is_recommended?: boolean;
10682
10537
  quotation_internal_approval_status?:
10683
- | "pending"
10684
- | "approved"
10685
- | "completed"
10686
- | "rejected";
10538
+ "pending" | "approved" | "completed" | "rejected";
10687
10539
  quotation_detail?: string;
10688
10540
  quotation_client_approval_status?:
10689
- | "pending"
10690
- | "approved"
10691
- | "collected"
10692
- | "rejected";
10541
+ "pending" | "approved" | "collected" | "rejected";
10693
10542
  }
10694
10543
 
10695
10544
  type PopulatedKeys =
@@ -10716,8 +10565,7 @@ export namespace Service {
10716
10565
  qty?: number;
10717
10566
  custom_status?: StringId[] | StringId;
10718
10567
  directional_status?:
10719
- | Data["directional_status"]
10720
- | Data["directional_status"][];
10568
+ Data["directional_status"] | Data["directional_status"][];
10721
10569
  teams?: StringId[] | StringId;
10722
10570
  from_updatedAt?: number;
10723
10571
  to_updatedAt?: number;
@@ -10801,8 +10649,7 @@ export namespace Service {
10801
10649
  sync_id: string;
10802
10650
  transaction_processed: boolean;
10803
10651
  client:
10804
- | StringId
10805
- | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
10652
+ StringId | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
10806
10653
  client_name: string;
10807
10654
  warehouse:
10808
10655
  | StringId
@@ -11271,8 +11118,7 @@ export namespace Service {
11271
11118
  | "failed";
11272
11119
  transaction_processed: boolean;
11273
11120
  client:
11274
- | StringId
11275
- | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
11121
+ StringId | Pick<Client.ClientSchema, "_id" | "name" | "client_code">;
11276
11122
  client_name: string;
11277
11123
  warehouse:
11278
11124
  | StringId
@@ -12187,10 +12033,7 @@ export namespace Service {
12187
12033
  cart_option?: CartOptions;
12188
12034
  ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o" | "fixed-length-text";
12189
12035
  ai_vision_model:
12190
- | "gpt-4o-mini"
12191
- | "gpt-4o"
12192
- | "local_vision"
12193
- | "fixed-length-text";
12036
+ "gpt-4o-mini" | "gpt-4o" | "local_vision" | "fixed-length-text";
12194
12037
  visible_columns: {
12195
12038
  key:
12196
12039
  | "product_name"
@@ -12243,10 +12086,7 @@ export namespace Service {
12243
12086
  cart_option?: CartOptions;
12244
12087
  ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o" | "fixed-length-text";
12245
12088
  ai_vision_model:
12246
- | "gpt-4o-mini"
12247
- | "gpt-4o"
12248
- | "local_vision"
12249
- | "fixed-length-text";
12089
+ "gpt-4o-mini" | "gpt-4o" | "local_vision" | "fixed-length-text";
12250
12090
  visible_columns: {
12251
12091
  key:
12252
12092
  | "product_name"
@@ -12290,10 +12130,7 @@ export namespace Service {
12290
12130
  cart_option?: CartOptions;
12291
12131
  ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o" | "fixed-length-text";
12292
12132
  ai_vision_model:
12293
- | "gpt-4o-mini"
12294
- | "gpt-4o"
12295
- | "local_vision"
12296
- | "fixed-length-text";
12133
+ "gpt-4o-mini" | "gpt-4o" | "local_vision" | "fixed-length-text";
12297
12134
  visible_columns: {
12298
12135
  key:
12299
12136
  | "product_name"
@@ -12505,18 +12342,14 @@ export namespace Service {
12505
12342
  export type AiApiJsStep = {
12506
12343
  code: "ai-api-js";
12507
12344
  tasks: (
12508
- | PhotoTextExtractionTask
12509
- | PhotoJsonExtractionTask
12510
- | TextJsonParsingTask
12345
+ PhotoTextExtractionTask | PhotoJsonExtractionTask | TextJsonParsingTask
12511
12346
  )[];
12512
12347
  };
12513
12348
 
12514
12349
  export type PythonUtilitiesStep = {
12515
12350
  code: "python-utilities";
12516
12351
  tasks: (
12517
- | PdfTextExtractionTask
12518
- | PdfImageConversionTask
12519
- | PdfImageTextOcrTask
12352
+ PdfTextExtractionTask | PdfImageConversionTask | PdfImageTextOcrTask
12520
12353
  )[];
12521
12354
  };
12522
12355
 
@@ -12656,11 +12489,7 @@ export namespace Service {
12656
12489
  | "external_serial_number"
12657
12490
  | "client";
12658
12491
  code:
12659
- | "missing"
12660
- | "not_equal"
12661
- | "exists"
12662
- | "invalid_date"
12663
- | "custom_warning";
12492
+ "missing" | "not_equal" | "exists" | "invalid_date" | "custom_warning";
12664
12493
  }
12665
12494
 
12666
12495
  export interface CartAnnotationItem {
@@ -13196,9 +13025,7 @@ export namespace Service {
13196
13025
  number_of_digits_after_dot_separator?: 0 | 1 | 2 | 3;
13197
13026
  hide_line_item_tax?: boolean;
13198
13027
  line_total_key?:
13199
- | "line_total"
13200
- | "total_before_tax"
13201
- | "lineTotalAfterDeduction";
13028
+ "line_total" | "total_before_tax" | "lineTotalAfterDeduction";
13202
13029
  return_invoice_title?: string;
13203
13030
  return_invoice_local_title?: string;
13204
13031
  invoice_title?: string;
@@ -13296,11 +13123,7 @@ export namespace Service {
13296
13123
  };
13297
13124
  promotions: {
13298
13125
  enforcement_mode:
13299
- | "all_in_inventory"
13300
- | "all"
13301
- | "gift_in_inventory"
13302
- | "gift"
13303
- | "custom";
13126
+ "all_in_inventory" | "all" | "gift_in_inventory" | "gift" | "custom";
13304
13127
  apply_hidden_price: boolean;
13305
13128
  apply_all_promotions: boolean;
13306
13129
  applying_sort: { [key: string]: -1 | 1 }[];
@@ -13460,11 +13283,7 @@ export namespace Service {
13460
13283
  };
13461
13284
  promotions?: {
13462
13285
  enforcement_mode:
13463
- | "all_in_inventory"
13464
- | "all"
13465
- | "gift_in_inventory"
13466
- | "gift"
13467
- | "custom";
13286
+ "all_in_inventory" | "all" | "gift_in_inventory" | "gift" | "custom";
13468
13287
  apply_hidden_price: boolean;
13469
13288
  apply_all_promotions: boolean;
13470
13289
  applying_sort: { [key: string]: -1 | 1 }[];
@@ -13546,13 +13365,7 @@ export namespace Service {
13546
13365
  rep_must_start_day_within_specific_time_frame: boolean;
13547
13366
  };
13548
13367
  first_business_day_in_week?:
13549
- | "Sun"
13550
- | "Mon"
13551
- | "Tue"
13552
- | "Wed"
13553
- | "Thu"
13554
- | "Fri"
13555
- | "Sat";
13368
+ "Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat";
13556
13369
  allow_assigning_non_creator_teams_when_creating_client?: boolean;
13557
13370
  enable_email_mfa: boolean;
13558
13371
  enable_whatsapp_mfa: boolean;
@@ -13608,10 +13421,7 @@ export namespace Service {
13608
13421
  | "client_location"
13609
13422
  | "client_credit_limit";
13610
13423
  implementation_type:
13611
- | "create_doc"
13612
- | "update_doc"
13613
- | "delete_doc"
13614
- | "no_implementation";
13424
+ "create_doc" | "update_doc" | "delete_doc" | "no_implementation";
13615
13425
  creator: AdminOrRepOrTenant;
13616
13426
  editor?: AdminOrRepOrTenant;
13617
13427
  status: "pending" | "approved" | "processing" | "rejected";
@@ -13693,10 +13503,7 @@ export namespace Service {
13693
13503
  | "client_location"
13694
13504
  | "client_credit_limit";
13695
13505
  implementation_type:
13696
- | "create_doc"
13697
- | "update_doc"
13698
- | "delete_doc"
13699
- | "no_implementation";
13506
+ "create_doc" | "update_doc" | "delete_doc" | "no_implementation";
13700
13507
  creator?: AdminOrRepOrTenant;
13701
13508
  status?: "pending";
13702
13509
  implementation_status?: "pending";
@@ -13769,10 +13576,7 @@ export namespace Service {
13769
13576
  | "client_location"
13770
13577
  | "client_credit_limit";
13771
13578
  implementation_type?:
13772
- | "create_doc"
13773
- | "update_doc"
13774
- | "delete_doc"
13775
- | "no_implementation";
13579
+ "create_doc" | "update_doc" | "delete_doc" | "no_implementation";
13776
13580
  creator?: AdminOrRepOrTenant;
13777
13581
  editor?: AdminOrRepOrTenant;
13778
13582
  teams?: StringId[];
@@ -13849,11 +13653,9 @@ export namespace Service {
13849
13653
  document_type?: Data["document_type"][] | Data["document_type"];
13850
13654
  document_id?: StringId | StringId[];
13851
13655
  implementation_type?:
13852
- | Data["implementation_type"][]
13853
- | Data["implementation_type"];
13656
+ Data["implementation_type"][] | Data["implementation_type"];
13854
13657
  implementation_status?:
13855
- | Data["implementation_status"][]
13856
- | Data["implementation_status"];
13658
+ Data["implementation_status"][] | Data["implementation_status"];
13857
13659
  teams?: StringId[] | StringId;
13858
13660
  status?: Data["status"][] | Data["status"];
13859
13661
  from_time?: number;
@@ -13983,8 +13785,7 @@ export namespace Service {
13983
13785
  "name" | "client_code" | "contacts" | "_id"
13984
13786
  > & {
13985
13787
  contacts:
13986
- | StringId[]
13987
- | Pick<ClientContact.ClientContactSchema, "name">[];
13788
+ StringId[] | Pick<ClientContact.ClientContactSchema, "name">[];
13988
13789
  });
13989
13790
  description?: string;
13990
13791
  address?: string;
@@ -14001,11 +13802,7 @@ export namespace Service {
14001
13802
  }
14002
13803
 
14003
13804
  type PopulatedKeys =
14004
- | "client"
14005
- | "contacts"
14006
- | "media"
14007
- | "cover_photo"
14008
- | "customFields";
13805
+ "client" | "contacts" | "media" | "cover_photo" | "customFields";
14009
13806
 
14010
13807
  export namespace Find {
14011
13808
  export type Params = DefaultPaginationQueryParams & {
@@ -14720,14 +14517,11 @@ export namespace Service {
14720
14517
  disabled: boolean;
14721
14518
  locations?: {
14722
14519
  _id:
14723
- | StringId
14724
- | Pick<ClientLocation.Data, "name" | "_id" | "cover_photo">;
14520
+ StringId | Pick<ClientLocation.Data, "name" | "_id" | "cover_photo">;
14725
14521
  assets?:
14726
- | StringId[]
14727
- | Pick<Asset.Data, "name" | "_id" | "cover_photo">[];
14522
+ StringId[] | Pick<Asset.Data, "name" | "_id" | "cover_photo">[];
14728
14523
  asset_units?:
14729
- | StringId[]
14730
- | Pick<AssetUnit.Data, "name" | "_id" | "cover_photo">[];
14524
+ StringId[] | Pick<AssetUnit.Data, "name" | "_id" | "cover_photo">[];
14731
14525
  }[];
14732
14526
  media?: StringId[];
14733
14527
  media_populated?: PopulatedMediaStorage[];
@@ -15569,11 +15363,7 @@ export namespace Service {
15569
15363
  }
15570
15364
 
15571
15365
  export type PopulatedKeys =
15572
- | "teams"
15573
- | "user"
15574
- | "client"
15575
- | "route"
15576
- | "visit_id";
15366
+ "teams" | "user" | "client" | "route" | "visit_id";
15577
15367
 
15578
15368
  export type ActivityItemStatusWithPopulatedKeysSchema = Data & {
15579
15369
  teams_populated?: Team.TeamSchema[] | string[];
@@ -16003,12 +15793,7 @@ export namespace Service {
16003
15793
  end_of_day: string;
16004
15794
  trial_ends_at: number;
16005
15795
  subscription_status?:
16006
- | "trial"
16007
- | "initiated"
16008
- | "active"
16009
- | "grace"
16010
- | "limited"
16011
- | "blocked";
15796
+ "trial" | "initiated" | "active" | "grace" | "limited" | "blocked";
16012
15797
  grace_until: number | null;
16013
15798
  limited_until: number | null;
16014
15799
  workspace: string;
@@ -16040,10 +15825,7 @@ export namespace Service {
16040
15825
 
16041
15826
  export namespace AuthenticateAdmin {
16042
15827
  export type MfaMethod =
16043
- | "email"
16044
- | "whatsapp"
16045
- | "authenticator"
16046
- | "recovery_codes";
15828
+ "email" | "whatsapp" | "authenticator" | "recovery_codes";
16047
15829
  interface Subscription_data {
16048
15830
  name_space: string;
16049
15831
  grace_until: number;
@@ -17694,8 +17476,7 @@ export namespace Service {
17694
17476
  workorder_categories?: StringId[];
17695
17477
  status?: Workorder.Data["status"] | Workorder.Data["status"][];
17696
17478
  priority_human?:
17697
- | Workorder.Data["priority_human"]
17698
- | Workorder.Data["priority_human"][];
17479
+ Workorder.Data["priority_human"] | Workorder.Data["priority_human"][];
17699
17480
  assets?: StringId[];
17700
17481
  asset_units?: StringId[];
17701
17482
  contract?: StringId[];
@@ -17718,8 +17499,7 @@ export namespace Service {
17718
17499
  workorder_categories?: StringId[];
17719
17500
  status?: Workorder.Data["status"] | Workorder.Data["status"][];
17720
17501
  priority_human?:
17721
- | Workorder.Data["priority_human"]
17722
- | Workorder.Data["priority_human"][];
17502
+ Workorder.Data["priority_human"] | Workorder.Data["priority_human"][];
17723
17503
  assets?: StringId[];
17724
17504
  asset_units?: StringId[];
17725
17505
  contract?: StringId[];
@@ -18295,12 +18075,7 @@ export namespace Service {
18295
18075
  export type DataType = "string" | "number" | "array" | "boolean";
18296
18076
 
18297
18077
  export type InputType =
18298
- | "string"
18299
- | "list"
18300
- | "checkbox"
18301
- | "date"
18302
- | "number"
18303
- | "group_by";
18078
+ "string" | "list" | "checkbox" | "date" | "number" | "group_by";
18304
18079
 
18305
18080
  export type Operator =
18306
18081
  | "eq"
@@ -18322,10 +18097,7 @@ export namespace Service {
18322
18097
  | "last_twelve_months";
18323
18098
 
18324
18099
  export type DateFormat =
18325
- | "s"
18326
- | "YYYY-MM-DD"
18327
- | "YYYY-MM-DD HH:mm:ssZ"
18328
- | "ISO";
18100
+ "s" | "YYYY-MM-DD" | "YYYY-MM-DD HH:mm:ssZ" | "ISO";
18329
18101
 
18330
18102
  export interface Data {
18331
18103
  _id: string;
@@ -19262,12 +19034,7 @@ export namespace Service {
19262
19034
  | "presentation_end"
19263
19035
  | "presentation_cancel";
19264
19036
  interaction_detail:
19265
- | "in"
19266
- | "out"
19267
- | "positive"
19268
- | "negative"
19269
- | "notProvided"
19270
- | null; // required for zoom and feedback_given, null for other
19037
+ "in" | "out" | "positive" | "negative" | "notProvided" | null; // required for zoom and feedback_given, null for other
19271
19038
  slide?: StringId; // optional for presentation_play, presentation_end, presentation_cancel, required for other
19272
19039
  sequence?: StringId; // optional for presentation_play, presentation_end, presentation_cancel, required for other
19273
19040
  sequence_name?: string; // optional
@@ -19288,12 +19055,7 @@ export namespace Service {
19288
19055
  | "presentation_end"
19289
19056
  | "presentation_cancel";
19290
19057
  interaction_detail:
19291
- | "in"
19292
- | "out"
19293
- | "positive"
19294
- | "negative"
19295
- | "notProvided"
19296
- | null; // required for zoom and feedback_given, null for other
19058
+ "in" | "out" | "positive" | "negative" | "notProvided" | null; // required for zoom and feedback_given, null for other
19297
19059
  slide?: StringId; // optional for presentation_play, presentation_end, presentation_cancel, required for other
19298
19060
  sequence?: StringId; // optional for presentation_play, presentation_end, presentation_cancel, required for other
19299
19061
  presentation: StringId;
@@ -19318,12 +19080,7 @@ export namespace Service {
19318
19080
  };
19319
19081
 
19320
19082
  type PopulatedKeys =
19321
- | "client"
19322
- | "visit"
19323
- | "route"
19324
- | "teams"
19325
- | "tags"
19326
- | "presentation";
19083
+ "client" | "visit" | "route" | "teams" | "tags" | "presentation";
19327
19084
 
19328
19085
  export namespace Find {
19329
19086
  export type Params = DefaultPaginationQueryParams & {
@@ -20265,11 +20022,7 @@ export namespace Service {
20265
20022
  footer_details: string;
20266
20023
  align_footer_details: "right" | "left" | "center";
20267
20024
  compressed_media_size:
20268
- | "original"
20269
- | "small"
20270
- | "medium"
20271
- | "large"
20272
- | "extra";
20025
+ "original" | "small" | "medium" | "large" | "extra";
20273
20026
  view_custom_list_element: boolean;
20274
20027
  };
20275
20028
  }
@@ -20323,10 +20076,7 @@ export namespace Service {
20323
20076
  };
20324
20077
 
20325
20078
  type PopulatedKeys =
20326
- | "custom_list"
20327
- | "media"
20328
- | "banner_media"
20329
- | "footer_media";
20079
+ "custom_list" | "media" | "banner_media" | "footer_media";
20330
20080
  type SortingKeys = "_id" | "position" | "updatedAt";
20331
20081
 
20332
20082
  export namespace Find {
@@ -20897,11 +20647,7 @@ export namespace Service {
20897
20647
  template?: StringId;
20898
20648
  report_view?: StringId;
20899
20649
  compressed_media_size?:
20900
- | "original"
20901
- | "small"
20902
- | "medium"
20903
- | "large"
20904
- | "extra";
20650
+ "original" | "small" | "medium" | "large" | "extra";
20905
20651
  file_naming?: NamingKey[];
20906
20652
  group_naming?: NamingKey[];
20907
20653
  bi_view?: StringId;
@@ -20949,8 +20695,7 @@ export namespace Service {
20949
20695
  state?: Data["state"] | Data["state"][];
20950
20696
  template?: StringId | StringId[];
20951
20697
  time_period_tense?:
20952
- | Data["time_period_tense"]
20953
- | Data["time_period_tense"][];
20698
+ Data["time_period_tense"] | Data["time_period_tense"][];
20954
20699
  full_cycle?: boolean;
20955
20700
  row_count?: number | number[];
20956
20701
  };
@@ -21222,8 +20967,7 @@ export namespace Service {
21222
20967
  from?: string;
21223
20968
  to?: string;
21224
20969
  reports?:
21225
- | DataFileWarehouse.Data["report"]
21226
- | DataFileWarehouse.Data["report"][];
20970
+ DataFileWarehouse.Data["report"] | DataFileWarehouse.Data["report"][];
21227
20971
  teams?: StringId | StringId[];
21228
20972
  data_file_warehouse_ids?: StringId | StringId[];
21229
20973
  status?: Data["status"] | Data["status"][];
@@ -21491,6 +21235,608 @@ export namespace Service {
21491
21235
  }
21492
21236
  }
21493
21237
 
21238
+ export namespace TargetRule {
21239
+ export type RuleType =
21240
+ | "rep-visit"
21241
+ | "time-clock"
21242
+ | "rep-photo"
21243
+ | "rep-invoice"
21244
+ | "rep-proforma"
21245
+ | "item-status"
21246
+ | "rep-payment";
21247
+
21248
+ export type Period =
21249
+ "daily" | "weekly" | "monthly" | "quarterly" | "yearly";
21250
+
21251
+ export interface Point {
21252
+ ratio: number;
21253
+ points: number;
21254
+ }
21255
+
21256
+ export interface RepVisitFilter {
21257
+ filter:
21258
+ | "chain"
21259
+ | "channel"
21260
+ | "country"
21261
+ | "city"
21262
+ | "state"
21263
+ | "client"
21264
+ | "photoTag"
21265
+ | "clientTag"
21266
+ | "areaTag"
21267
+ | "from_total_time"
21268
+ | "to_total_time"
21269
+ | "from_call_total_time"
21270
+ | "to_call_total_time"
21271
+ | "feedback"
21272
+ | "activity"
21273
+ | "speciality";
21274
+ value: any[];
21275
+ photoCount?: number;
21276
+ }
21277
+ export interface RepVisitDetails {
21278
+ type?: "rep-visit";
21279
+ filter: RepVisitFilter[];
21280
+ limit?: number;
21281
+ aggregation_key: "count" | "count-distinct" | "duration";
21282
+ period: Period;
21283
+ required_target: {
21284
+ type: "absolute" | "assigned_to";
21285
+ value: number;
21286
+ };
21287
+ }
21288
+
21289
+ export interface TimeClockFilter {
21290
+ filter:
21291
+ | "from_startTime"
21292
+ | "to_startTime"
21293
+ | "from_endTime"
21294
+ | "to_endTime"
21295
+ | "from_timeOnDuty"
21296
+ | "to_timeOnDuty"
21297
+ | "from_breaksTime"
21298
+ | "to_breaksTime"
21299
+ | "from_timeInVisits"
21300
+ | "to_timeInVisits"
21301
+ | "from_totalTravelTime"
21302
+ | "to_totalTravelTime"
21303
+ | "from_travelTimeBetweenVisists"
21304
+ | "to_travelTimeBetweenVisists"
21305
+ | "from_scheduled"
21306
+ | "to_scheduled"
21307
+ | "from_unscheduled"
21308
+ | "to_unscheduled"
21309
+ | "from_missed"
21310
+ | "to_missed"
21311
+ | "closed_by_system";
21312
+ value: any;
21313
+ }
21314
+ export interface TimeClockDetails {
21315
+ type?: "time-clock";
21316
+ filter: TimeClockFilter[];
21317
+ aggregation_key:
21318
+ | "count"
21319
+ | "timeOnDuty"
21320
+ | "breaksTime"
21321
+ | "timeInVisits"
21322
+ | "totalTravelTime"
21323
+ | "travelTimeBetweenVisists"
21324
+ | "scheduled"
21325
+ | "unscheduled"
21326
+ | "missed";
21327
+ period: Period;
21328
+ limit?: number;
21329
+ required_target: {
21330
+ type: "absolute";
21331
+ value: number;
21332
+ };
21333
+ }
21334
+
21335
+ export interface RepPhotoFilter {
21336
+ filter:
21337
+ | "chain"
21338
+ | "channel"
21339
+ | "country"
21340
+ | "city"
21341
+ | "state"
21342
+ | "client"
21343
+ | "photoTag"
21344
+ | "clientTag"
21345
+ | "areaTag"
21346
+ | "speciality";
21347
+ value: any[];
21348
+ }
21349
+ export interface RepPhotoDetails {
21350
+ type?: "rep-photo";
21351
+ filter: RepPhotoFilter[];
21352
+ limit?: number;
21353
+ aggregation_key: "count" | "count-distinct";
21354
+ period: Period;
21355
+ required_target: {
21356
+ type: "absolute" | "assigned_to";
21357
+ value: number;
21358
+ };
21359
+ }
21360
+
21361
+ export interface ItemStatusFilter {
21362
+ filter:
21363
+ | "teams"
21364
+ | "route"
21365
+ | "client"
21366
+ | "chain"
21367
+ | "channel"
21368
+ | "country"
21369
+ | "city"
21370
+ | "state"
21371
+ | "clientTag"
21372
+ | "areaTag"
21373
+ | "speciality"
21374
+ | "product"
21375
+ | "category"
21376
+ | "sub_category"
21377
+ | "brand"
21378
+ | "product_group"
21379
+ | "status"
21380
+ | "previous_status"
21381
+ | "item_status_type";
21382
+ value: any[];
21383
+ }
21384
+ export interface ItemStatusDetails {
21385
+ type?: "item-status";
21386
+ filter: ItemStatusFilter[];
21387
+ limit?: number;
21388
+ aggregation_key: "count" | "prescriptions";
21389
+ period: Period;
21390
+ required_target: {
21391
+ type: "absolute";
21392
+ value: number;
21393
+ };
21394
+ }
21395
+
21396
+ export interface RepPaymentFilter {
21397
+ filter:
21398
+ | "route"
21399
+ | "payment_type"
21400
+ | "status"
21401
+ | "client"
21402
+ | "chain"
21403
+ | "channel"
21404
+ | "country"
21405
+ | "city"
21406
+ | "clientTag"
21407
+ | "areaTag"
21408
+ | "teams"
21409
+ | "from_amount"
21410
+ | "to_amount"
21411
+ | "speciality"
21412
+ | "custom_status";
21413
+ value: any[];
21414
+ }
21415
+ export interface RepPaymentDetails {
21416
+ type?: "rep-payment";
21417
+ filter: RepPaymentFilter[];
21418
+ limit?: number;
21419
+ aggregation_key: "count" | "count-distinct" | "amount";
21420
+ period: Period;
21421
+ required_target: {
21422
+ type: "absolute";
21423
+ value: number;
21424
+ };
21425
+ }
21426
+
21427
+ export interface RepInvoiceFilter {
21428
+ filter:
21429
+ | "client"
21430
+ | "chain"
21431
+ | "channel"
21432
+ | "country"
21433
+ | "city"
21434
+ | "state"
21435
+ | "clientTag"
21436
+ | "areaTag"
21437
+ | "teams"
21438
+ | "product"
21439
+ | "variant"
21440
+ | "category"
21441
+ | "sub_category"
21442
+ | "brand"
21443
+ | "product_group"
21444
+ | "status"
21445
+ | "speciality"
21446
+ | "custom_status"
21447
+ | "from_base_unit_qty"
21448
+ | "to_base_unit_qty";
21449
+ value: any[];
21450
+ }
21451
+ export interface RepInvoiceDetails {
21452
+ type?: "rep-invoice";
21453
+ filter: RepInvoiceFilter[];
21454
+ limit?: number;
21455
+ aggregation_key:
21456
+ | "count"
21457
+ | "total"
21458
+ | "pre_total"
21459
+ | "return_total"
21460
+ | "count-distinct"
21461
+ | "qty";
21462
+ period: Period;
21463
+ required_target: {
21464
+ type: "absolute";
21465
+ value: number;
21466
+ };
21467
+ }
21468
+ export interface RepProformaDetails {
21469
+ type?: "rep-proforma";
21470
+ filter: RepInvoiceFilter[];
21471
+ limit?: number;
21472
+ aggregation_key:
21473
+ | "count"
21474
+ | "total"
21475
+ | "pre_total"
21476
+ | "return_total"
21477
+ | "count-distinct"
21478
+ | "qty";
21479
+ period: Period;
21480
+ required_target: {
21481
+ type: "absolute";
21482
+ value: number;
21483
+ };
21484
+ }
21485
+
21486
+ export type Details =
21487
+ | RepVisitDetails
21488
+ | TimeClockDetails
21489
+ | RepPhotoDetails
21490
+ | ItemStatusDetails
21491
+ | RepPaymentDetails
21492
+ | RepInvoiceDetails
21493
+ | RepProformaDetails;
21494
+
21495
+ export interface Data {
21496
+ _id: StringId;
21497
+ name: string;
21498
+ points: Point[];
21499
+ allowOverOne?: boolean;
21500
+ type: RuleType;
21501
+ disabled: boolean;
21502
+ targets_group?: StringId;
21503
+ company_namespace: string[];
21504
+ details: Details;
21505
+ cycle?: any;
21506
+ createdAt: string;
21507
+ updatedAt: string;
21508
+ __v?: number;
21509
+ }
21510
+ export interface CreateBody {
21511
+ company_namespace?: string[];
21512
+ name: string;
21513
+ type: RuleType;
21514
+ details: Details;
21515
+ points?: Point[];
21516
+ allowOverOne?: boolean;
21517
+ targets_group?: StringId;
21518
+ disabled?: boolean;
21519
+ }
21520
+ export type UpdateBody = Partial<CreateBody>;
21521
+
21522
+ export namespace Find {
21523
+ export type Params = DefaultPaginationQueryParams & {
21524
+ _id?: StringId | StringId[];
21525
+ search?: string;
21526
+ name?: string | string[];
21527
+ type?: RuleType | RuleType[];
21528
+ targets_group?: StringId | StringId[];
21529
+ "details.period"?: Period | Period[];
21530
+ disabled?: boolean;
21531
+ from_updatedAt?: number;
21532
+ to_updatedAt?: number;
21533
+ from_createdAt?: number;
21534
+ to_createdAt?: number;
21535
+ };
21536
+ export interface Result extends DefaultPaginationResult {
21537
+ data: Data[];
21538
+ }
21539
+ }
21540
+ export namespace Get {
21541
+ export type ID = StringId;
21542
+ export type Result = Data;
21543
+ }
21544
+ export namespace Create {
21545
+ export type Body = CreateBody;
21546
+ export type Result = Data;
21547
+ }
21548
+ export namespace Update {
21549
+ export type ID = StringId;
21550
+ export type Body = UpdateBody;
21551
+ export type Result = Data;
21552
+ }
21553
+ export namespace Remove {
21554
+ export type ID = StringId;
21555
+ export type Result = Data;
21556
+ }
21557
+ }
21558
+
21559
+ export namespace Plan {
21560
+ export interface Editor {
21561
+ _id: StringId;
21562
+ type: "admin" | "rep";
21563
+ rep?: StringId;
21564
+ admin?: StringId;
21565
+ name?: string;
21566
+ }
21567
+ export interface BuildListItem {
21568
+ calendar?: StringId;
21569
+ route?: StringId;
21570
+ client?: StringId;
21571
+ note?: string;
21572
+ from?: string;
21573
+ to?: string;
21574
+ visit_reason?: StringId;
21575
+ visit_note?: string;
21576
+ }
21577
+ export interface BuildEntry {
21578
+ day: string;
21579
+ list: BuildListItem[];
21580
+ }
21581
+ export interface Data {
21582
+ _id: StringId;
21583
+ name: string;
21584
+ editor?: Editor;
21585
+ startsAt?: string;
21586
+ endsAt?: string;
21587
+ build: BuildEntry[];
21588
+ sync_id: string;
21589
+ calendars?: StringId[];
21590
+ disabled: boolean;
21591
+ builtAt: number;
21592
+ company_namespace: string[];
21593
+ createdAt: string;
21594
+ updatedAt: string;
21595
+ __v?: number;
21596
+ }
21597
+ export interface CreateBody {
21598
+ company_namespace?: string[];
21599
+ name: string;
21600
+ startsAt?: string;
21601
+ endsAt?: string;
21602
+ build?: BuildEntry[];
21603
+ sync_id: string;
21604
+ calendars?: StringId[];
21605
+ disabled?: boolean;
21606
+ builtAt?: number;
21607
+ }
21608
+ export type UpdateBody = Partial<CreateBody>;
21609
+
21610
+ export namespace Find {
21611
+ export type Params = DefaultPaginationQueryParams & {
21612
+ _id?: StringId | StringId[];
21613
+ search?: string;
21614
+ name?: string | string[];
21615
+ disabled?: boolean;
21616
+ myDailyPlan?: boolean;
21617
+ timezone?: string;
21618
+ from_updatedAt?: number;
21619
+ to_updatedAt?: number;
21620
+ from_createdAt?: number;
21621
+ to_createdAt?: number;
21622
+ populatedKeys?: string | string[];
21623
+ };
21624
+ export interface Result extends DefaultPaginationResult {
21625
+ data: Data[];
21626
+ }
21627
+ }
21628
+ export namespace Get {
21629
+ export type ID = StringId;
21630
+ export type Params = { populatedKeys?: string | string[] };
21631
+ export type Result = Data;
21632
+ }
21633
+ export namespace Create {
21634
+ export type Body = CreateBody;
21635
+ export type Result = Data;
21636
+ }
21637
+ export namespace Update {
21638
+ export type ID = StringId;
21639
+ export type Body = UpdateBody;
21640
+ export type Result = Data;
21641
+ }
21642
+ export namespace Remove {
21643
+ export type ID = StringId;
21644
+ export type Result = Data;
21645
+ }
21646
+ }
21647
+
21648
+ export namespace Calendar {
21649
+ export type CalendarType = "weekly" | "weeklyGroup";
21650
+
21651
+ export interface User {
21652
+ _id: StringId;
21653
+ type: "admin" | "rep";
21654
+ rep?: StringId;
21655
+ admin?: StringId;
21656
+ name?: string;
21657
+ }
21658
+ export interface ClientEntry {
21659
+ client: StringId;
21660
+ from?: string;
21661
+ to?: string;
21662
+ visit_reason?: StringId;
21663
+ visit_note?: string;
21664
+ }
21665
+ export interface WeeklyDetails {
21666
+ type?: "weekly";
21667
+ days: Day[];
21668
+ every: number;
21669
+ }
21670
+ export interface DaysGroup {
21671
+ days: Day[];
21672
+ }
21673
+ export interface WeeklyGroupDetails {
21674
+ type?: "weeklyGroup";
21675
+ daysGroups: DaysGroup[];
21676
+ groupSize: number;
21677
+ }
21678
+ export type Details = WeeklyDetails | WeeklyGroupDetails;
21679
+
21680
+ export interface Data {
21681
+ _id: StringId;
21682
+ name: string;
21683
+ type: CalendarType;
21684
+ details: Details;
21685
+ creator: User;
21686
+ editor: User;
21687
+ routes?: StringId[];
21688
+ sync_id: string;
21689
+ clients?: ClientEntry[];
21690
+ occurrences?: number;
21691
+ startsAt: string;
21692
+ endsAt?: string;
21693
+ disabled: boolean;
21694
+ note?: string;
21695
+ visit_reason?: StringId;
21696
+ visit_note?: string;
21697
+ company_namespace: string[];
21698
+ createdAt: string;
21699
+ updatedAt: string;
21700
+ __v?: number;
21701
+ }
21702
+ export interface CreateBody {
21703
+ company_namespace?: string[];
21704
+ name: string;
21705
+ type: CalendarType;
21706
+ details: Details;
21707
+ sync_id: string;
21708
+ startsAt: string;
21709
+ endsAt?: string;
21710
+ routes?: StringId[];
21711
+ clients?: ClientEntry[];
21712
+ occurrences?: number;
21713
+ disabled?: boolean;
21714
+ note?: string;
21715
+ visit_reason?: StringId;
21716
+ visit_note?: string;
21717
+ }
21718
+ export type UpdateBody = Partial<CreateBody>;
21719
+
21720
+ export namespace Find {
21721
+ export type Params = DefaultPaginationQueryParams & {
21722
+ _id?: StringId | StringId[];
21723
+ search?: string;
21724
+ name?: string | string[];
21725
+ type?: CalendarType | CalendarType[];
21726
+ rep?: StringId | StringId[];
21727
+ plan?: StringId | StringId[];
21728
+ visit_reason?: StringId | StringId[];
21729
+ groupSize?: number;
21730
+ from_groupSize?: number;
21731
+ to_groupSize?: number;
21732
+ disabled?: boolean;
21733
+ from_updatedAt?: number;
21734
+ to_updatedAt?: number;
21735
+ from_createdAt?: number;
21736
+ to_createdAt?: number;
21737
+ populatedKeys?: string | string[];
21738
+ };
21739
+ export interface Result extends DefaultPaginationResult {
21740
+ data: Data[];
21741
+ }
21742
+ }
21743
+ export namespace Get {
21744
+ export type ID = StringId;
21745
+ export type Params = { populatedKeys?: string | string[] };
21746
+ export type Result = Data;
21747
+ }
21748
+ export namespace Create {
21749
+ export type Body = CreateBody;
21750
+ export type Params = {
21751
+ assignTo?: StringId;
21752
+ assignedToMe?: boolean;
21753
+ };
21754
+ export type Result = Data;
21755
+ }
21756
+ export namespace Update {
21757
+ export type ID = StringId;
21758
+ export type Body = UpdateBody;
21759
+ export type Result = Data;
21760
+ }
21761
+ export namespace Remove {
21762
+ export type ID = StringId;
21763
+ export type Result = Data;
21764
+ }
21765
+ }
21766
+
21767
+ export namespace LineTarget {
21768
+ export type UserType = "rep" | "client";
21769
+ export interface User {
21770
+ _id: StringId;
21771
+ name?: string;
21772
+ type?: UserType;
21773
+ rep?: StringId;
21774
+ client?: StringId;
21775
+ }
21776
+ export interface Data {
21777
+ _id: StringId;
21778
+ line: StringId;
21779
+ target: number;
21780
+ classification: StringId;
21781
+ user?: User;
21782
+ company_namespace: string[];
21783
+ createdAt: string;
21784
+ updatedAt: string;
21785
+ __v?: number;
21786
+ }
21787
+ export interface CreateBody {
21788
+ company_namespace?: string[];
21789
+ line: StringId;
21790
+ target: number;
21791
+ classification: StringId;
21792
+ user?: User;
21793
+ }
21794
+ export type UpdateBody = Partial<CreateBody>;
21795
+
21796
+ type PopulatedKeys = "client" | "rep" | "classification" | "line";
21797
+
21798
+ export namespace Find {
21799
+ export type Params = DefaultPaginationQueryParams & {
21800
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
21801
+ _id?: StringId | StringId[];
21802
+ line?: StringId | StringId[];
21803
+ classification?: StringId | StringId[];
21804
+ "user._id"?: StringId | StringId[];
21805
+ rep?: StringId | StringId[];
21806
+ client?: StringId | StringId[];
21807
+ from_updatedAt?: number;
21808
+ to_updatedAt?: number;
21809
+ from_createdAt?: number;
21810
+ to_createdAt?: number;
21811
+ };
21812
+ export interface Result extends DefaultPaginationResult {
21813
+ data: Data[];
21814
+ }
21815
+ }
21816
+ export namespace Get {
21817
+ export type ID = StringId;
21818
+ export type Params = { populatedKeys?: PopulatedKeys | PopulatedKeys[] };
21819
+ export type Result = Data;
21820
+ }
21821
+ export namespace Create {
21822
+ export type Body = CreateBody;
21823
+ export type Result = Data;
21824
+ }
21825
+ export namespace Update {
21826
+ export type ID = StringId;
21827
+ export type Body = UpdateBody;
21828
+ export type Result = Data;
21829
+ }
21830
+ export namespace Remove {
21831
+ export type ID = StringId | null;
21832
+ export type Params = { all?: boolean };
21833
+ export interface Result {
21834
+ deletedCount: number;
21835
+ success: number;
21836
+ }
21837
+ }
21838
+ }
21839
+
21494
21840
  export namespace BulkImport {
21495
21841
  type BulkImportType =
21496
21842
  | "insertTags"
@@ -21654,8 +22000,7 @@ export namespace Service {
21654
22000
  from_time?: number;
21655
22001
  to_time?: number;
21656
22002
  second_phase_status:
21657
- | Data["second_phase_status"]
21658
- | Data["second_phase_status"][];
22003
+ Data["second_phase_status"] | Data["second_phase_status"][];
21659
22004
  status?: Data["status"] | Data["status"][];
21660
22005
  type?: Data["type"] | Data["type"][];
21661
22006
  };