repzo 1.0.107 → 1.0.109

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.
@@ -2467,12 +2467,14 @@ export declare namespace Service {
2467
2467
  rep_can_create_transfer_load?: boolean;
2468
2468
  rep_can_create_transfer_unload?: boolean;
2469
2469
  rep_can_create_return_invoice?: boolean;
2470
+ rep_can_create_partial_return_invoice?: boolean;
2470
2471
  rep_can_sell_zero_product_price?: boolean;
2471
2472
  rep_can_create_sales_order_out_of_visit?: boolean;
2472
2473
  rep_can_create_cash_invoice?: boolean;
2473
2474
  rep_can_sell_above_product_price?: boolean;
2474
2475
  rep_can_sell_below_product_price?: boolean;
2475
2476
  rep_can_create_return_out_of_visit?: boolean;
2477
+ rep_can_create_partial_return_out_of_visit?: boolean;
2476
2478
  rep_can_skip_return_reason?: boolean;
2477
2479
  rep_can_create_invoice_out_of_visit?: boolean;
2478
2480
  rep_can_create_free_payments?: boolean;
@@ -4631,35 +4633,33 @@ export declare namespace Service {
4631
4633
  }
4632
4634
  namespace Workorder {
4633
4635
  export interface WorkorderSchema {
4634
- _id: string;
4635
- creator?: AdminCreator | RepCreator | ClientCreator;
4636
- editor?: AdminCreator | RepCreator | ClientCreator;
4637
- name?: string;
4636
+ _id: StringId;
4637
+ name: string;
4638
4638
  local_name?: string;
4639
- description?: string;
4640
4639
  disabled: boolean;
4640
+ client: StringId;
4641
+ client_name: string;
4642
+ sync_id: string;
4643
+ status: WorkorderStatus;
4644
+ creator: AdminCreator | RepCreator | ClientCreator;
4645
+ editor?: AdminCreator | RepCreator | ClientCreator;
4646
+ workorder_categories: StringId[];
4647
+ description?: string;
4641
4648
  integration_meta?: {
4642
4649
  [key: string]: any;
4643
4650
  };
4644
- status: WorkorderStatus;
4645
- assets?: string[];
4646
- asset_units?: string[];
4651
+ assets?: StringId[];
4652
+ asset_units?: StringId[];
4647
4653
  asset_part_units?: StringId[];
4648
- workorder_categories: string[];
4649
4654
  due_date?: number;
4650
4655
  start_date?: number;
4651
- client_location: string;
4656
+ client_location: StringId;
4652
4657
  priority?: Priority;
4653
4658
  priority_human?: Priority_human;
4654
- client: string;
4655
- client_name: string;
4656
4659
  workorder_request?: string;
4657
- createdAt?: Date;
4658
- updatedAt?: Date;
4659
- company_namespace: string[];
4660
4660
  serial_number?: SerialNumber;
4661
- assigned_to?: string[];
4662
- forms?: string[];
4661
+ assigned_to?: StringId[];
4662
+ forms?: StringId[];
4663
4663
  time: number;
4664
4664
  is_overdue: boolean;
4665
4665
  opened_at: number;
@@ -4673,13 +4673,116 @@ export declare namespace Service {
4673
4673
  build: Build[];
4674
4674
  calendars: Calendar[];
4675
4675
  builtAt: number;
4676
- due_date_day: string;
4677
- last_done_at: number;
4678
- last_done_by: AdminCreator | RepCreator | ClientCreator;
4679
- resolve_time: number;
4676
+ due_date_day?: string;
4677
+ last_done_at?: number;
4678
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
4679
+ resolve_time?: number;
4680
+ startsAt: string;
4681
+ endsAt?: string;
4682
+ is_dunning_allowed?: boolean;
4683
+ score_required_for_dunning?: boolean;
4684
+ min_score_required_for_dunning?: number;
4685
+ score?: number;
4686
+ is_completed?: boolean;
4687
+ forms_v2?: {
4688
+ form_id: StringId;
4689
+ form_activity_id?: StringId;
4690
+ completion_required_for_dunning?: boolean;
4691
+ score_required_for_dunning?: boolean;
4692
+ min_score_required_for_dunning?: number;
4693
+ score?: number;
4694
+ is_completed?: boolean;
4695
+ }[];
4696
+ teams?: StringId[];
4697
+ media?: StringId[];
4698
+ cover_photo?: StringId;
4699
+ custom_status?: StringId;
4700
+ contract?: StringId;
4701
+ parent_repeating_workorder?: StringId;
4702
+ parent_repeating_day?: string;
4703
+ filter_asset_units_by_location?: boolean;
4704
+ company_namespace: string[];
4705
+ createdAt: Date;
4706
+ updatedAt: Date;
4707
+ }
4708
+ export interface PopulatedData {
4709
+ _id: StringId;
4710
+ name: string;
4711
+ local_name?: string;
4712
+ disabled: boolean;
4713
+ client: StringId;
4714
+ client_name: string;
4680
4715
  sync_id: string;
4716
+ status: WorkorderStatus;
4717
+ creator: AdminCreator | RepCreator | ClientCreator;
4718
+ editor?: AdminCreator | RepCreator | ClientCreator;
4719
+ workorder_categories: StringId[];
4720
+ description?: string;
4721
+ integration_meta?: {
4722
+ [key: string]: any;
4723
+ };
4724
+ assets?: StringId[];
4725
+ asset_units?: StringId[];
4726
+ asset_part_units?: StringId[];
4727
+ due_date?: number;
4728
+ start_date?: number;
4729
+ client_location: StringId;
4730
+ priority?: Priority;
4731
+ priority_human?: Priority_human;
4732
+ workorder_request?: string;
4733
+ serial_number?: SerialNumber;
4734
+ assigned_to?: StringId[];
4735
+ forms?: StringId[];
4736
+ time: number;
4737
+ is_overdue: boolean;
4738
+ opened_at: number;
4739
+ done_at: number;
4740
+ cancelled_at: number;
4741
+ inprogress_at: number;
4742
+ done_by?: AdminCreator | RepCreator | ClientCreator;
4743
+ cancelled_by?: AdminCreator | RepCreator | ClientCreator;
4744
+ opened_by?: AdminCreator | RepCreator | ClientCreator;
4745
+ inprogress_by?: AdminCreator | RepCreator | ClientCreator;
4746
+ build: Build[];
4747
+ calendars: Calendar[];
4748
+ builtAt: number;
4749
+ due_date_day?: string;
4750
+ last_done_at?: number;
4751
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
4752
+ resolve_time?: number;
4681
4753
  startsAt: string;
4682
- endsAt: string;
4754
+ endsAt?: string;
4755
+ is_dunning_allowed?: boolean;
4756
+ score_required_for_dunning?: boolean;
4757
+ min_score_required_for_dunning?: number;
4758
+ score?: number;
4759
+ is_completed?: boolean;
4760
+ forms_v2?: {
4761
+ form_id:
4762
+ | StringId
4763
+ | {
4764
+ _id: StringId;
4765
+ name: string;
4766
+ local_name?: string;
4767
+ };
4768
+ form_activity_id?: StringId;
4769
+ completion_required_for_dunning?: boolean;
4770
+ score_required_for_dunning?: boolean;
4771
+ min_score_required_for_dunning?: number;
4772
+ score?: number;
4773
+ is_completed?: boolean;
4774
+ }[];
4775
+ teams?: StringId[];
4776
+ media?: StringId[];
4777
+ cover_photo?: StringId;
4778
+ custom_status?: StringId;
4779
+ contract?: StringId;
4780
+ parent_repeating_workorder?: StringId;
4781
+ parent_repeating_day?: string;
4782
+ filter_asset_units_by_location?: boolean;
4783
+ company_namespace: string[];
4784
+ createdAt: Date;
4785
+ updatedAt: Date;
4683
4786
  teams_populated?: Pick<Team.TeamSchema, "name">;
4684
4787
  client_populated?: Pick<Client.ClientSchema, "client_code" | "name">;
4685
4788
  asset_units_populated?: AssetUnitsPopulated[];
@@ -4708,9 +4811,16 @@ export declare namespace Service {
4708
4811
  forms_populated?: FormPopulated[];
4709
4812
  media_populated?: MediaPopulated;
4710
4813
  cover_photo_populated?: MediaPopulated;
4814
+ contract_populated?: {
4815
+ _id: StringId;
4816
+ serial_number: SerialNumber;
4817
+ title?: string;
4818
+ external_serial_number?: string;
4819
+ status?: "open" | "closed" | "canceled";
4820
+ };
4711
4821
  }
4712
4822
  export interface CreateBody {
4713
- company_namespace: string[];
4823
+ company_namespace?: string[];
4714
4824
  creator?: AdminCreator | RepCreator | ClientCreator;
4715
4825
  name: string;
4716
4826
  local_name?: string;
@@ -4719,36 +4829,56 @@ export declare namespace Service {
4719
4829
  integration_meta?: {
4720
4830
  [key: string]: any;
4721
4831
  };
4722
- status: WorkorderStatus;
4723
- assets?: string[];
4724
- asset_units?: string[];
4832
+ status?: WorkorderStatus;
4833
+ assets?: StringId[];
4834
+ asset_units?: StringId[];
4725
4835
  asset_part_units?: StringId[];
4726
- workorder_categories: string[];
4836
+ workorder_categories: StringId[];
4727
4837
  due_date?: number;
4728
4838
  start_date?: number;
4729
- client_location: string;
4839
+ client_location: StringId;
4730
4840
  priority?: Priority;
4731
4841
  priority_human?: Priority_human;
4732
- client: string;
4842
+ client: StringId;
4733
4843
  client_name?: string;
4734
4844
  serial_number?: SerialNumber;
4735
- workorder_request?: string;
4736
- assigned_to?: string[];
4737
- forms?: string[];
4845
+ workorder_request?: StringId;
4846
+ assigned_to?: StringId[];
4847
+ forms?: StringId[];
4738
4848
  calendars: Calendar[];
4739
- parent_repeating_workorder?: string;
4849
+ parent_repeating_workorder?: StringId;
4740
4850
  due_date_day?: string;
4741
- last_done_at: number;
4742
- last_done_by: AdminCreator | RepCreator | ClientCreator;
4743
- resolve_time: number;
4851
+ last_done_at?: number;
4852
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
4853
+ resolve_time?: number;
4744
4854
  sync_id: string;
4745
- opened_at: number;
4746
- time: number;
4747
- opened_by: AdminCreator | RepCreator | ClientCreator;
4855
+ opened_at?: number;
4856
+ time?: number;
4857
+ opened_by?: AdminCreator | RepCreator | ClientCreator;
4858
+ teams?: StringId[];
4859
+ media?: StringId[];
4860
+ cover_photo?: StringId;
4861
+ custom_status?: StringId;
4862
+ contract?: StringId;
4863
+ is_dunning_allowed?: boolean;
4864
+ score_required_for_dunning?: boolean;
4865
+ min_score_required_for_dunning?: number;
4866
+ score?: number;
4867
+ is_completed?: boolean;
4868
+ forms_v2?: {
4869
+ form_id: StringId;
4870
+ form_activity_id?: StringId;
4871
+ completion_required_for_dunning?: boolean;
4872
+ score_required_for_dunning?: boolean;
4873
+ min_score_required_for_dunning?: number;
4874
+ score?: number;
4875
+ is_completed?: boolean;
4876
+ }[];
4877
+ filter_asset_units_by_location?: boolean;
4748
4878
  }
4749
4879
  export interface UpdateBody {
4750
- company_namespace: string[];
4751
- _id?: string;
4880
+ company_namespace?: string[];
4881
+ _id?: StringId;
4752
4882
  creator?: AdminCreator | RepCreator | ClientCreator;
4753
4883
  editor?: AdminCreator | RepCreator | ClientCreator;
4754
4884
  name?: string;
@@ -4758,41 +4888,46 @@ export declare namespace Service {
4758
4888
  integration_meta?: {
4759
4889
  [key: string]: any;
4760
4890
  };
4761
- status: WorkorderStatus;
4762
- assets?: string[];
4763
- asset_units?: string[];
4891
+ status?: WorkorderStatus;
4892
+ assets?: StringId[];
4893
+ asset_units?: StringId[];
4764
4894
  asset_part_units?: StringId[];
4765
- workorder_categories: string[];
4895
+ workorder_categories?: string[];
4766
4896
  due_date?: number;
4767
4897
  start_date?: number;
4768
- client_location: string;
4898
+ client_location: StringId;
4769
4899
  priority?: Priority;
4770
4900
  priority_human?: Priority_human;
4771
- client: string;
4901
+ client?: StringId;
4772
4902
  client_name?: string;
4773
- workorder_request?: string;
4903
+ workorder_request?: StringId;
4774
4904
  createdAt?: Date;
4775
4905
  updatedAt?: Date;
4776
4906
  serial_number?: SerialNumber;
4777
- assigned_to?: string[];
4778
- forms?: string[];
4779
- time: number;
4780
- is_overdue: boolean;
4781
- opened_at: number;
4782
- done_at: number;
4783
- cancelled_at: number;
4784
- inprogress_at: number;
4907
+ assigned_to?: StringId[];
4908
+ forms?: StringId[];
4909
+ time?: number;
4910
+ is_overdue?: boolean;
4911
+ opened_at?: number;
4912
+ done_at?: number;
4913
+ cancelled_at?: number;
4914
+ inprogress_at?: number;
4785
4915
  done_by?: AdminCreator | RepCreator | ClientCreator;
4786
4916
  cancelled_by?: AdminCreator | RepCreator | ClientCreator;
4787
4917
  opened_by?: AdminCreator | RepCreator | ClientCreator;
4788
4918
  inprogress_by?: AdminCreator | RepCreator | ClientCreator;
4789
- calendars: Calendar[];
4919
+ calendars?: Calendar[];
4790
4920
  parent_repeating_workorder?: string;
4791
4921
  due_date_day?: string;
4792
- last_done_at: number;
4793
- last_done_by: AdminCreator | RepCreator | ClientCreator;
4794
- resolve_time: number;
4922
+ last_done_at?: number;
4923
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
4924
+ resolve_time?: number;
4795
4925
  sync_id?: string;
4926
+ teams?: StringId[];
4927
+ media?: StringId[];
4928
+ cover_photo?: StringId;
4929
+ custom_status?: StringId;
4930
+ contract?: StringId;
4796
4931
  }
4797
4932
  type SortingKeys =
4798
4933
  | "due_date"
@@ -4813,24 +4948,26 @@ export declare namespace Service {
4813
4948
  | "forms"
4814
4949
  | "media"
4815
4950
  | "cover_photo"
4816
- | "teams";
4951
+ | "teams"
4952
+ | "forms_v2"
4953
+ | "contract";
4817
4954
  export namespace Find {
4818
4955
  type Params = DefaultPaginationQueryParams & {
4819
- name?: string;
4820
- _id?: string;
4821
- assigned_to?: string[];
4822
- priority?: Priority;
4823
- priority_human?: Priority_human;
4824
- status?: WorkorderStatus;
4825
- workorder_categories?: string[];
4826
- client_location?: string;
4827
- client?: string;
4828
- assets?: string[];
4829
- asset_units?: string[];
4830
- asset_part_units?: StringId[];
4956
+ name?: string | string[];
4957
+ _id?: StringId | StringId[];
4958
+ assigned_to?: StringId | StringId[];
4959
+ priority?: Priority | Priority[];
4960
+ priority_human?: Priority_human | Priority_human[];
4961
+ status?: WorkorderStatus | WorkorderStatus[];
4962
+ workorder_categories?: StringId | StringId[];
4963
+ client_location?: StringId | StringId[];
4964
+ client?: StringId | StringId[];
4965
+ assets?: StringId | StringId[];
4966
+ asset_units?: StringId | StringId[];
4967
+ asset_part_units?: StringId | StringId[];
4831
4968
  due_date?: number;
4832
4969
  start_date?: number;
4833
- forms?: string[];
4970
+ forms?: StringId | StringId[];
4834
4971
  from_createdAt?: number;
4835
4972
  to_createdAt?: number;
4836
4973
  from_updatedAt?: number;
@@ -4839,10 +4976,26 @@ export declare namespace Service {
4839
4976
  to_start_date?: number;
4840
4977
  from_due_date?: number;
4841
4978
  to_due_date?: number;
4842
- teams?: string[];
4979
+ teams?: StringId | StringId[];
4980
+ is_dunning_allowed?: boolean | boolean[];
4981
+ is_completed?: boolean | boolean[];
4982
+ from_score?: number;
4983
+ to_score?: number;
4984
+ score?: number;
4985
+ contract?: StringId | StringId[];
4986
+ "forms_v2.form_id"?: StringId | StringId[];
4987
+ started?: boolean;
4988
+ assignedToMe?: boolean;
4989
+ search?: string;
4990
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
4991
+ sortBy?: {
4992
+ field: SortingKeys;
4993
+ type: "asc" | "desc";
4994
+ }[];
4995
+ [key: string]: any;
4843
4996
  };
4844
4997
  interface Result extends DefaultPaginationResult {
4845
- data: WorkorderSchema[];
4998
+ data: WorkorderSchema[] | PopulatedData[];
4846
4999
  absolute_total: number;
4847
5000
  page_total: number;
4848
5001
  }
@@ -4853,7 +5006,20 @@ export declare namespace Service {
4853
5006
  populatedKeys?: PopulatedKeys[];
4854
5007
  sortPage?: SortingKeys;
4855
5008
  }
4856
- type Result = WorkorderSchema;
5009
+ type Result = WorkorderSchema | PopulatedData;
5010
+ }
5011
+ export namespace Create {
5012
+ type Body = CreateBody;
5013
+ type Result = Data;
5014
+ }
5015
+ export namespace Update {
5016
+ type ID = string;
5017
+ type Body = UpdateBody;
5018
+ type Result = Data;
5019
+ }
5020
+ export namespace Remove {
5021
+ type ID = string;
5022
+ type Result = Data;
4857
5023
  }
4858
5024
  export {};
4859
5025
  }
@@ -5078,9 +5244,9 @@ export declare namespace Service {
5078
5244
  ref?: string;
5079
5245
  }[];
5080
5246
  partially_returned_from?: StringId;
5081
- partially_returned_to?: StringId;
5247
+ partially_returned_to?: StringId[];
5082
5248
  partially_returned_from_serial_number?: SerialNumber;
5083
- partially_returned_to_serial_number?: SerialNumber;
5249
+ partially_returned_to_serial_number?: SerialNumber[];
5084
5250
  discount_amount_float?: number;
5085
5251
  net_total?: number;
5086
5252
  tax_amount_after_deduction_float?: number;
@@ -5283,9 +5449,9 @@ export declare namespace Service {
5283
5449
  ref?: string;
5284
5450
  }[];
5285
5451
  partially_returned_from?: StringId;
5286
- partially_returned_to?: StringId;
5452
+ partially_returned_to?: StringId[];
5287
5453
  partially_returned_from_serial_number?: SerialNumber;
5288
- partially_returned_to_serial_number?: SerialNumber;
5454
+ partially_returned_to_serial_number?: SerialNumber[];
5289
5455
  discount_amount_float?: number;
5290
5456
  net_total?: number;
5291
5457
  tax_amount_after_deduction_float?: number;
@@ -5675,9 +5841,9 @@ export declare namespace Service {
5675
5841
  ref?: string;
5676
5842
  }[];
5677
5843
  partially_returned_from?: StringId;
5678
- partially_returned_to?: StringId;
5844
+ partially_returned_to?: StringId[];
5679
5845
  partially_returned_from_serial_number?: SerialNumber;
5680
- partially_returned_to_serial_number?: SerialNumber;
5846
+ partially_returned_to_serial_number?: SerialNumber[];
5681
5847
  discount_amount_float?: number;
5682
5848
  net_total?: number;
5683
5849
  tax_amount_after_deduction_float?: number;
@@ -11326,6 +11492,626 @@ export declare namespace Service {
11326
11492
  type Result = Data;
11327
11493
  }
11328
11494
  }
11495
+ namespace Settings {
11496
+ type Separator = "," | " " | "." | "'";
11497
+ interface EmailFilter {
11498
+ id?: string;
11499
+ key: string;
11500
+ operator: "eq" | "ne" | "in" | "nin" | "gt" | "gte" | "lt" | "lte";
11501
+ value: any[];
11502
+ }
11503
+ interface SalesSettings {
11504
+ currency: string;
11505
+ name_on_invoice?: string;
11506
+ invoice_footer?: string;
11507
+ logo?: string;
11508
+ logo_media?: StringId | PopulatedMediaStorage;
11509
+ tax_number?: string;
11510
+ default_payment_type?: "cash" | "credit";
11511
+ saudi_law?: boolean;
11512
+ handle_integrated_client_balance?: boolean;
11513
+ dot_separator?: Separator;
11514
+ thousands_separator?: Separator;
11515
+ number_of_digits_after_dot_separator?: 0 | 1 | 2 | 3;
11516
+ hide_line_item_tax?: boolean;
11517
+ line_total_key?:
11518
+ | "line_total"
11519
+ | "total_before_tax"
11520
+ | "lineTotalAfterDeduction";
11521
+ return_invoice_title?: string;
11522
+ return_invoice_local_title?: string;
11523
+ invoice_title?: string;
11524
+ invoice_local_title?: string;
11525
+ proforma_title?: string;
11526
+ proforma_local_title?: string;
11527
+ show_total_in_words?: boolean;
11528
+ address_1?: string;
11529
+ address_2?: string;
11530
+ prevent_negative_convert_to_invoice_stock?: boolean;
11531
+ empty_proforma_cart_at_visit_start_by_same_creator?: boolean;
11532
+ empty_proforma_cart_at_visit_start_by_any_creator?: boolean;
11533
+ empty_fullinvoice_cart_at_visit_start_by_same_creator?: boolean;
11534
+ empty_fullinvoice_cart_at_visit_start_by_any_creator?: boolean;
11535
+ enforce_serial_number_by_server?: boolean;
11536
+ invoice_advanced_serial_number_format?: {
11537
+ format: {
11538
+ year_format?: "YYYY" | "YY";
11539
+ month_format?: "M" | "MM" | "MMM" | "MMMM";
11540
+ day_format?: "D" | "DD";
11541
+ counter_length_fixed?: boolean;
11542
+ counter_length?: number;
11543
+ id_format: string;
11544
+ };
11545
+ counter: number;
11546
+ };
11547
+ activate_advanced_serial_number?: boolean;
11548
+ enable_variant_batches_at_invoice?: boolean;
11549
+ enable_variant_batches_at_proforma?: boolean;
11550
+ enable_variant_batches_at_return_invoice?: boolean;
11551
+ prevent_negative_transfer_stock?: boolean;
11552
+ currency_subunit?: string;
11553
+ local_currency?: string;
11554
+ local_currency_subunit?: string;
11555
+ currency_factor?: 100 | 1000;
11556
+ }
11557
+ interface Data {
11558
+ _id: string;
11559
+ company_namespace: string[];
11560
+ live_location: {
11561
+ active: boolean;
11562
+ from?: string;
11563
+ to?: string;
11564
+ };
11565
+ use_original_image_compression?: boolean;
11566
+ use_client_specific_sales_settings?: boolean;
11567
+ use_client_specific_sales_settings_for_payment?: boolean;
11568
+ use_client_specific_sales_settings_for_client_statement?: boolean;
11569
+ disable_ubl_integration_for_return_invoice?: boolean;
11570
+ sales: SalesSettings;
11571
+ geofencing: {
11572
+ visit_start: boolean;
11573
+ visit_end: boolean;
11574
+ radius: number;
11575
+ visit_strict: boolean;
11576
+ };
11577
+ mail_list: {
11578
+ invoice_sales: {
11579
+ name: string;
11580
+ email: string;
11581
+ filters?: EmailFilter[];
11582
+ }[];
11583
+ mocking: {
11584
+ name: string;
11585
+ email: string;
11586
+ }[];
11587
+ sales_order: {
11588
+ name: string;
11589
+ email: string;
11590
+ filters?: EmailFilter[];
11591
+ }[];
11592
+ photo: {
11593
+ name: string;
11594
+ email: string;
11595
+ filters?: EmailFilter[];
11596
+ }[];
11597
+ live_location: {
11598
+ name: string;
11599
+ email: string;
11600
+ filters?: EmailFilter[];
11601
+ }[];
11602
+ location_off: {
11603
+ name: string;
11604
+ email: string;
11605
+ filters?: EmailFilter[];
11606
+ }[];
11607
+ location_on: {
11608
+ name: string;
11609
+ email: string;
11610
+ filters?: EmailFilter[];
11611
+ }[];
11612
+ contract_expiry: {
11613
+ name: string;
11614
+ email: string;
11615
+ }[];
11616
+ contract_near_expiry: {
11617
+ name: string;
11618
+ email: string;
11619
+ }[];
11620
+ contract_installment_due: {
11621
+ name: string;
11622
+ email: string;
11623
+ }[];
11624
+ contract_installment_near_due: {
11625
+ name: string;
11626
+ email: string;
11627
+ }[];
11628
+ };
11629
+ promotions: {
11630
+ enforcement_mode:
11631
+ | "all_in_inventory"
11632
+ | "all"
11633
+ | "gift_in_inventory"
11634
+ | "gift"
11635
+ | "custom";
11636
+ apply_hidden_price: boolean;
11637
+ apply_all_promotions: boolean;
11638
+ applying_sort: {
11639
+ [key: string]: -1 | 1;
11640
+ }[];
11641
+ force_cash_only: boolean;
11642
+ allow_manual_discounts?: boolean;
11643
+ manual_discounts_limit_percentage: number;
11644
+ manual_discounts_limit_value?: number;
11645
+ promotions_enabled: boolean;
11646
+ round_discounted_price: boolean;
11647
+ };
11648
+ teams_shared_collections: string[];
11649
+ days_of_work:
11650
+ | "Sunday"
11651
+ | "Monday"
11652
+ | "Tuesday"
11653
+ | "Wednesday"
11654
+ | "Thursday"
11655
+ | "Friday"
11656
+ | "Saturday";
11657
+ signUpMethod: "email" | "phone";
11658
+ calculate_target_for_absent_days: boolean;
11659
+ disable_module_custom_validator: boolean;
11660
+ activate_ubl_integration: boolean;
11661
+ last_activate_ubl_integration_time?: number;
11662
+ visit: {
11663
+ manual_product_line_selection: boolean;
11664
+ };
11665
+ custom_status: {
11666
+ use_custom_status_transfer?: boolean;
11667
+ use_system_status_transfer?: boolean;
11668
+ use_custom_status_payment?: boolean;
11669
+ use_system_status_payment?: boolean;
11670
+ use_custom_status_fullinvoice?: boolean;
11671
+ use_system_status_fullinvoice?: boolean;
11672
+ use_custom_status_proforma?: boolean;
11673
+ use_system_status_proforma?: boolean;
11674
+ use_custom_status_workorder?: boolean;
11675
+ use_system_status_workorder?: boolean;
11676
+ };
11677
+ business_apps: {
11678
+ code: string;
11679
+ services: {
11680
+ permission: string;
11681
+ teams_shared: "shared" | "unshared";
11682
+ }[];
11683
+ }[];
11684
+ form: {
11685
+ overwrite_serial_number?: boolean;
11686
+ allow_create_v1: boolean;
11687
+ };
11688
+ workorder?: {
11689
+ workorder_teams_follow_client?: boolean;
11690
+ workorder_request_teams_follow_client?: boolean;
11691
+ send_email_at_contract_expiry?: boolean;
11692
+ send_email_at_contract_near_expiry?: boolean;
11693
+ send_email_at_contract_installment_due?: boolean;
11694
+ send_email_at_contract_installment_near_due?: boolean;
11695
+ contract_near_expiry_days: number;
11696
+ contract_installment_near_due_days: number;
11697
+ workorder_near_due_days?: number;
11698
+ };
11699
+ notifications?: {
11700
+ calendar_update?: boolean;
11701
+ transfer_update?: boolean;
11702
+ cycle_update?: boolean;
11703
+ client_update?: boolean;
11704
+ approval_request_update?: boolean;
11705
+ workorder_update?: boolean;
11706
+ workorder_start?: boolean;
11707
+ workorder_near_due?: boolean;
11708
+ activity_note?: boolean;
11709
+ activity_form?: boolean;
11710
+ activity_photo?: boolean;
11711
+ activity_audit?: boolean;
11712
+ activity_task?: boolean;
11713
+ activity_availability?: boolean;
11714
+ activity_planogram?: boolean;
11715
+ activity_shelfsahre?: boolean;
11716
+ activity_checkout_display?: boolean;
11717
+ activity_secondary_display?: boolean;
11718
+ };
11719
+ asset_part?: {
11720
+ prevent_negative_asset_part_inventory: boolean;
11721
+ };
11722
+ default_lang?: "en" | "ar";
11723
+ second_lang?: "en" | "ar";
11724
+ report_value_delimiter?: "|" | "," | " " | "." | "-";
11725
+ rep_settings?: {
11726
+ rep_start_day_specific_time_frame_start: string;
11727
+ rep_start_day_specific_time_frame_end: string;
11728
+ };
11729
+ rep_permissions?: {
11730
+ rep_must_start_day_within_specific_time_frame: boolean;
11731
+ };
11732
+ createdAt: Date;
11733
+ updatedAt: Date;
11734
+ }
11735
+ interface PopulatedDoc {
11736
+ _id: string;
11737
+ company_namespace: string[];
11738
+ live_location?: {
11739
+ active: boolean;
11740
+ from?: string;
11741
+ to?: string;
11742
+ };
11743
+ use_original_image_compression?: boolean;
11744
+ use_client_specific_sales_settings?: boolean;
11745
+ use_client_specific_sales_settings_for_payment?: boolean;
11746
+ use_client_specific_sales_settings_for_client_statement?: boolean;
11747
+ disable_ubl_integration_for_return_invoice?: boolean;
11748
+ sales: SalesSettings;
11749
+ geofencing?: {
11750
+ visit_start: boolean;
11751
+ visit_end: boolean;
11752
+ radius: number;
11753
+ visit_strict: boolean;
11754
+ };
11755
+ mail_list?: {
11756
+ invoice_sales?: {
11757
+ name: string;
11758
+ email: string;
11759
+ filters?: EmailFilter[];
11760
+ }[];
11761
+ mocking?: {
11762
+ name: string;
11763
+ email: string;
11764
+ }[];
11765
+ sales_order?: {
11766
+ name: string;
11767
+ email: string;
11768
+ filters?: EmailFilter[];
11769
+ }[];
11770
+ photo?: {
11771
+ name: string;
11772
+ email: string;
11773
+ filters?: EmailFilter[];
11774
+ }[];
11775
+ live_location?: {
11776
+ name: string;
11777
+ email: string;
11778
+ filters?: EmailFilter[];
11779
+ }[];
11780
+ location_off?: {
11781
+ name: string;
11782
+ email: string;
11783
+ filters?: EmailFilter[];
11784
+ }[];
11785
+ location_on?: {
11786
+ name: string;
11787
+ email: string;
11788
+ filters?: EmailFilter[];
11789
+ }[];
11790
+ contract_expiry?: {
11791
+ name: string;
11792
+ email: string;
11793
+ }[];
11794
+ contract_near_expiry?: {
11795
+ name: string;
11796
+ email: string;
11797
+ }[];
11798
+ contract_installment_due?: {
11799
+ name: string;
11800
+ email: string;
11801
+ }[];
11802
+ contract_installment_near_due?: {
11803
+ name: string;
11804
+ email: string;
11805
+ }[];
11806
+ };
11807
+ promotions?: {
11808
+ enforcement_mode?:
11809
+ | "all_in_inventory"
11810
+ | "all"
11811
+ | "gift_in_inventory"
11812
+ | "gift"
11813
+ | "custom";
11814
+ apply_hidden_price?: boolean;
11815
+ apply_all_promotions?: boolean;
11816
+ applying_sort?: {
11817
+ [key: string]: -1 | 1;
11818
+ }[];
11819
+ force_cash_only?: boolean;
11820
+ allow_manual_discounts?: boolean;
11821
+ manual_discounts_limit_percentage?: number;
11822
+ manual_discounts_limit_value?: number;
11823
+ promotions_enabled?: boolean;
11824
+ round_discounted_price?: boolean;
11825
+ };
11826
+ teams_shared_collections?: string[];
11827
+ days_of_work?:
11828
+ | "Sunday"
11829
+ | "Monday"
11830
+ | "Tuesday"
11831
+ | "Wednesday"
11832
+ | "Thursday"
11833
+ | "Friday"
11834
+ | "Saturday";
11835
+ signUpMethod?: "email" | "phone";
11836
+ calculate_target_for_absent_days?: boolean;
11837
+ disable_module_custom_validator?: boolean;
11838
+ activate_ubl_integration?: boolean;
11839
+ last_activate_ubl_integration_time?: number;
11840
+ visit?: {
11841
+ manual_product_line_selection: boolean;
11842
+ };
11843
+ custom_status?: {
11844
+ use_custom_status_transfer?: boolean;
11845
+ use_system_status_transfer?: boolean;
11846
+ use_custom_status_payment?: boolean;
11847
+ use_system_status_payment?: boolean;
11848
+ use_custom_status_fullinvoice?: boolean;
11849
+ use_system_status_fullinvoice?: boolean;
11850
+ use_custom_status_proforma?: boolean;
11851
+ use_system_status_proforma?: boolean;
11852
+ use_custom_status_workorder?: boolean;
11853
+ use_system_status_workorder?: boolean;
11854
+ };
11855
+ business_apps?: {
11856
+ code: string;
11857
+ services: {
11858
+ permission:
11859
+ | StringId
11860
+ | {
11861
+ name: string;
11862
+ _id: StringId;
11863
+ };
11864
+ teams_shared: "shared" | "unshared";
11865
+ }[];
11866
+ }[];
11867
+ form?: {
11868
+ overwrite_serial_number?: boolean;
11869
+ allow_create_v1: boolean;
11870
+ };
11871
+ workorder?: {
11872
+ workorder_teams_follow_client?: boolean;
11873
+ workorder_request_teams_follow_client?: boolean;
11874
+ send_email_at_contract_expiry?: boolean;
11875
+ send_email_at_contract_near_expiry?: boolean;
11876
+ send_email_at_contract_installment_due?: boolean;
11877
+ send_email_at_contract_installment_near_due?: boolean;
11878
+ contract_near_expiry_days?: number;
11879
+ contract_installment_near_due_days?: number;
11880
+ workorder_near_due_days?: number;
11881
+ };
11882
+ notifications?: {
11883
+ calendar_update?: boolean;
11884
+ transfer_update?: boolean;
11885
+ cycle_update?: boolean;
11886
+ client_update?: boolean;
11887
+ approval_request_update?: boolean;
11888
+ workorder_update?: boolean;
11889
+ workorder_start?: boolean;
11890
+ workorder_near_due?: boolean;
11891
+ activity_note?: boolean;
11892
+ activity_form?: boolean;
11893
+ activity_photo?: boolean;
11894
+ activity_audit?: boolean;
11895
+ activity_task?: boolean;
11896
+ activity_availability?: boolean;
11897
+ activity_planogram?: boolean;
11898
+ activity_shelfsahre?: boolean;
11899
+ activity_checkout_display?: boolean;
11900
+ activity_secondary_display?: boolean;
11901
+ };
11902
+ asset_part?: {
11903
+ prevent_negative_asset_part_inventory: boolean;
11904
+ };
11905
+ default_lang?: "en" | "ar";
11906
+ second_lang?: "en" | "ar";
11907
+ report_value_delimiter?: "|" | "," | " " | "." | "-";
11908
+ rep_settings?: {
11909
+ rep_start_day_specific_time_frame_start: string;
11910
+ rep_start_day_specific_time_frame_end: string;
11911
+ };
11912
+ rep_permissions?: {
11913
+ rep_must_start_day_within_specific_time_frame: boolean;
11914
+ };
11915
+ createdAt: Date;
11916
+ updatedAt: Date;
11917
+ }
11918
+ namespace Find {
11919
+ type Params = DefaultPaginationQueryParams & {
11920
+ _id?: StringId | StringId[];
11921
+ job?: StringId | StringId[];
11922
+ template?: StringId | StringId[];
11923
+ page_number?: number;
11924
+ proforma?: StringId | StringId[];
11925
+ status?: string | string[];
11926
+ };
11927
+ interface Result extends DefaultPaginationResult {
11928
+ data: Data[];
11929
+ }
11930
+ }
11931
+ namespace Get {
11932
+ type ID = string;
11933
+ type Result = Data;
11934
+ }
11935
+ interface UpdateBody {
11936
+ live_location?: {
11937
+ active: boolean;
11938
+ from?: string;
11939
+ to?: string;
11940
+ };
11941
+ use_original_image_compression?: boolean;
11942
+ use_client_specific_sales_settings?: boolean;
11943
+ use_client_specific_sales_settings_for_payment?: boolean;
11944
+ use_client_specific_sales_settings_for_client_statement?: boolean;
11945
+ disable_ubl_integration_for_return_invoice?: boolean;
11946
+ sales?: SalesSettings;
11947
+ geofencing?: {
11948
+ visit_start: boolean;
11949
+ visit_end: boolean;
11950
+ radius: number;
11951
+ visit_strict: boolean;
11952
+ };
11953
+ mail_list?: {
11954
+ invoice_sales: {
11955
+ name: string;
11956
+ email: string;
11957
+ filters?: EmailFilter[];
11958
+ }[];
11959
+ mocking: {
11960
+ name: string;
11961
+ email: string;
11962
+ }[];
11963
+ sales_order: {
11964
+ name: string;
11965
+ email: string;
11966
+ filters?: EmailFilter[];
11967
+ }[];
11968
+ photo: {
11969
+ name: string;
11970
+ email: string;
11971
+ filters?: EmailFilter[];
11972
+ }[];
11973
+ live_location: {
11974
+ name: string;
11975
+ email: string;
11976
+ filters?: EmailFilter[];
11977
+ }[];
11978
+ location_off: {
11979
+ name: string;
11980
+ email: string;
11981
+ filters?: EmailFilter[];
11982
+ }[];
11983
+ location_on: {
11984
+ name: string;
11985
+ email: string;
11986
+ filters?: EmailFilter[];
11987
+ }[];
11988
+ contract_expiry: {
11989
+ name: string;
11990
+ email: string;
11991
+ }[];
11992
+ contract_near_expiry: {
11993
+ name: string;
11994
+ email: string;
11995
+ }[];
11996
+ contract_installment_due: {
11997
+ name: string;
11998
+ email: string;
11999
+ }[];
12000
+ contract_installment_near_due: {
12001
+ name: string;
12002
+ email: string;
12003
+ }[];
12004
+ };
12005
+ promotions?: {
12006
+ enforcement_mode:
12007
+ | "all_in_inventory"
12008
+ | "all"
12009
+ | "gift_in_inventory"
12010
+ | "gift"
12011
+ | "custom";
12012
+ apply_hidden_price: boolean;
12013
+ apply_all_promotions: boolean;
12014
+ applying_sort: {
12015
+ [key: string]: -1 | 1;
12016
+ }[];
12017
+ force_cash_only: boolean;
12018
+ allow_manual_discounts: boolean;
12019
+ manual_discounts_limit_percentage: number;
12020
+ manual_discounts_limit_value: number;
12021
+ promotions_enabled: boolean;
12022
+ round_discounted_price: boolean;
12023
+ };
12024
+ teams_shared_collections?: string[];
12025
+ days_of_work?:
12026
+ | "Sunday"
12027
+ | "Monday"
12028
+ | "Tuesday"
12029
+ | "Wednesday"
12030
+ | "Thursday"
12031
+ | "Friday"
12032
+ | "Saturday";
12033
+ signUpMethod?: "email" | "phone";
12034
+ calculate_target_for_absent_days?: boolean;
12035
+ disable_module_custom_validator?: boolean;
12036
+ activate_ubl_integration?: boolean;
12037
+ last_activate_ubl_integration_time?: number;
12038
+ visit?: {
12039
+ manual_product_line_selection: boolean;
12040
+ };
12041
+ custom_status?: {
12042
+ use_custom_status_transfer?: boolean;
12043
+ use_system_status_transfer?: boolean;
12044
+ use_custom_status_payment?: boolean;
12045
+ use_system_status_payment?: boolean;
12046
+ use_custom_status_fullinvoice?: boolean;
12047
+ use_system_status_fullinvoice?: boolean;
12048
+ use_custom_status_proforma?: boolean;
12049
+ use_system_status_proforma?: boolean;
12050
+ use_custom_status_workorder?: boolean;
12051
+ use_system_status_workorder?: boolean;
12052
+ };
12053
+ business_apps?: {
12054
+ code: string;
12055
+ services: {
12056
+ permission: string;
12057
+ teams_shared: "shared" | "unshared";
12058
+ }[];
12059
+ }[];
12060
+ form?: {
12061
+ overwrite_serial_number?: boolean;
12062
+ allow_create_v1: boolean;
12063
+ };
12064
+ workorder?: {
12065
+ workorder_teams_follow_client?: boolean;
12066
+ workorder_request_teams_follow_client?: boolean;
12067
+ send_email_at_contract_expiry?: boolean;
12068
+ send_email_at_contract_near_expiry?: boolean;
12069
+ send_email_at_contract_installment_due?: boolean;
12070
+ send_email_at_contract_installment_near_due?: boolean;
12071
+ contract_near_expiry_days?: number;
12072
+ contract_installment_near_due_days?: number;
12073
+ workorder_near_due_days?: number;
12074
+ };
12075
+ notifications?: {
12076
+ calendar_update: boolean;
12077
+ transfer_update: boolean;
12078
+ cycle_update: boolean;
12079
+ client_update: boolean;
12080
+ approval_request_update: boolean;
12081
+ workorder_update: boolean;
12082
+ workorder_start: boolean;
12083
+ workorder_near_due: boolean;
12084
+ activity_note: boolean;
12085
+ activity_form: boolean;
12086
+ activity_photo: boolean;
12087
+ activity_audit: boolean;
12088
+ activity_task: boolean;
12089
+ activity_availability: boolean;
12090
+ activity_planogram: boolean;
12091
+ activity_shelfsahre: boolean;
12092
+ activity_checkout_display: boolean;
12093
+ activity_secondary_display: boolean;
12094
+ };
12095
+ asset_part?: {
12096
+ prevent_negative_asset_part_inventory: boolean;
12097
+ };
12098
+ default_lang?: "en" | "ar";
12099
+ second_lang?: "en" | "ar";
12100
+ report_value_delimiter?: "|" | "," | " " | "." | "-";
12101
+ rep_settings?: {
12102
+ rep_start_day_specific_time_frame_start: string;
12103
+ rep_start_day_specific_time_frame_end: string;
12104
+ };
12105
+ rep_permissions?: {
12106
+ rep_must_start_day_within_specific_time_frame: boolean;
12107
+ };
12108
+ }
12109
+ namespace Update {
12110
+ type ID = StringId;
12111
+ type Body = UpdateBody;
12112
+ type Result = Data;
12113
+ }
12114
+ }
11329
12115
  }
11330
12116
  export type StringId = string;
11331
12117
  export type NameSpaces = string[];