repzo 1.0.108 → 1.0.110

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.
@@ -630,6 +630,12 @@ export namespace Service {
630
630
  speciality?: string[] | string;
631
631
  assigned_product_groups?: string[] | string;
632
632
  populatedKeys?: PopulatedKeys[];
633
+ from__id?: string;
634
+ to__id?: string;
635
+ sortBy?: {
636
+ field: "_id";
637
+ type: "asc" | "desc";
638
+ }[];
633
639
  [key: string]: any; // integration_meta. & customFields.
634
640
  };
635
641
  export interface Result extends DefaultPaginationResult {
@@ -811,6 +817,12 @@ export namespace Service {
811
817
  withMedia?: boolean;
812
818
  withDefaultVariant?: boolean;
813
819
  withVariants?: boolean;
820
+ from__id?: string;
821
+ to__id?: string;
822
+ sortBy?: {
823
+ field: "_id";
824
+ type: "asc" | "desc";
825
+ }[];
814
826
  [key: string]: any; // integration_meta.
815
827
  };
816
828
  export interface Result extends DefaultPaginationResult {
@@ -920,6 +932,8 @@ export namespace Service {
920
932
  createdAt?: number;
921
933
  updatedAt?: number;
922
934
  from_updatedAt?: number;
935
+ from__id?: string;
936
+ to__id?: string;
923
937
  default?: boolean;
924
938
  category?: string[] | string;
925
939
  subCategory?: string[] | string;
@@ -1011,6 +1025,12 @@ export namespace Service {
1011
1025
  withProduct?: boolean;
1012
1026
  hasSubCategory?: boolean;
1013
1027
  isLeaf?: boolean;
1028
+ from__id?: string;
1029
+ to__id?: string;
1030
+ sortBy?: {
1031
+ field: "_id";
1032
+ type: "asc" | "desc";
1033
+ }[];
1014
1034
  [key: string]: any; // integration_meta.
1015
1035
  };
1016
1036
  export interface Result extends DefaultPaginationResult {
@@ -1080,6 +1100,12 @@ export namespace Service {
1080
1100
  from_updatedAt?: number;
1081
1101
  createdAt?: number;
1082
1102
  updatedAt?: number;
1103
+ from__id?: string;
1104
+ to__id?: string;
1105
+ sortBy?: {
1106
+ field: "_id";
1107
+ type: "asc" | "desc";
1108
+ }[];
1083
1109
  [key: string]: any; // integration_meta.
1084
1110
  };
1085
1111
  export interface Result extends DefaultPaginationResult {
@@ -1158,6 +1184,12 @@ export namespace Service {
1158
1184
  createdAt?: number;
1159
1185
  updatedAt?: number;
1160
1186
  withProduct?: boolean;
1187
+ from__id?: string;
1188
+ to__id?: string;
1189
+ sortBy?: {
1190
+ field: "_id";
1191
+ type: "asc" | "desc";
1192
+ }[];
1161
1193
  [key: string]: any; // integration_meta.
1162
1194
  };
1163
1195
  export interface Result extends DefaultPaginationResult {
@@ -1224,6 +1256,12 @@ export namespace Service {
1224
1256
  local_name?: string[] | string;
1225
1257
  disabled?: boolean;
1226
1258
  from_updatedAt?: number;
1259
+ from__id?: string;
1260
+ to__id?: string;
1261
+ sortBy?: {
1262
+ field: "_id";
1263
+ type: "asc" | "desc";
1264
+ }[];
1227
1265
  createdAt?: number;
1228
1266
  updatedAt?: number;
1229
1267
  };
@@ -1293,6 +1331,12 @@ export namespace Service {
1293
1331
  type?: TaxType | TaxType[];
1294
1332
  disabled?: boolean;
1295
1333
  from_updatedAt?: number;
1334
+ from__id?: string;
1335
+ to__id?: string;
1336
+ sortBy?: {
1337
+ field: "_id";
1338
+ type: "asc" | "desc";
1339
+ }[];
1296
1340
  [key: string]: any; // integration_meta.
1297
1341
  };
1298
1342
  export interface Result extends DefaultPaginationResult {
@@ -1366,6 +1410,12 @@ export namespace Service {
1366
1410
  from_updatedAt?: number;
1367
1411
  family_name?: string[] | string;
1368
1412
  withFamily?: boolean;
1413
+ from__id?: string;
1414
+ to__id?: string;
1415
+ sortBy?: {
1416
+ field: "_id";
1417
+ type: "asc" | "desc";
1418
+ }[];
1369
1419
  [key: string]: any; // integration_meta.
1370
1420
  };
1371
1421
  export interface Result extends DefaultPaginationResult {
@@ -1440,6 +1490,12 @@ export namespace Service {
1440
1490
  from_updatedAt?: number;
1441
1491
  measureunits?: string[] | string;
1442
1492
  populatedKeys?: PopulatedKeys[];
1493
+ from__id?: string;
1494
+ to__id?: string;
1495
+ sortBy?: {
1496
+ field: "_id";
1497
+ type: "asc" | "desc";
1498
+ }[];
1443
1499
  [key: string]: any; // integration_meta.
1444
1500
  };
1445
1501
  export interface Result extends DefaultPaginationResult {
@@ -1585,6 +1641,12 @@ export namespace Service {
1585
1641
  "createdby._id"?: string[] | string;
1586
1642
  disabled?: boolean;
1587
1643
  from_updatedAt?: number;
1644
+ from__id?: string;
1645
+ to__id?: string;
1646
+ sortBy?: {
1647
+ field: "_id";
1648
+ type: "asc" | "desc";
1649
+ }[];
1588
1650
  [key: string]: any; // integration_meta.
1589
1651
  };
1590
1652
  export interface Result extends DefaultPaginationResult {
@@ -1905,6 +1967,12 @@ export namespace Service {
1905
1967
  _id?: string[] | string;
1906
1968
  key?: string;
1907
1969
  from_updatedAt?: number;
1970
+ from__id?: string;
1971
+ to__id?: string;
1972
+ sortBy?: {
1973
+ field: "_id";
1974
+ type: "asc" | "desc";
1975
+ }[];
1908
1976
  };
1909
1977
  export interface Result extends DefaultPaginationResult {
1910
1978
  data: MediaStorageSchema[];
@@ -2084,6 +2152,12 @@ export namespace Service {
2084
2152
  local_name?: string;
2085
2153
  disabled?: boolean;
2086
2154
  from_updatedAt?: number;
2155
+ from__id?: string;
2156
+ to__id?: string;
2157
+ sortBy?: {
2158
+ field: "_id";
2159
+ type: "asc" | "desc";
2160
+ }[];
2087
2161
  };
2088
2162
  export interface Result extends DefaultPaginationResult {
2089
2163
  data: StorecheckTemplateSchema[];
@@ -2273,6 +2347,12 @@ export namespace Service {
2273
2347
  teams?: string[];
2274
2348
  route?: string;
2275
2349
  populatedKeys?: PopulatedKeys[];
2350
+ from__id?: string;
2351
+ to__id?: string;
2352
+ sortBy?: {
2353
+ field: "_id";
2354
+ type: "asc" | "desc";
2355
+ }[];
2276
2356
  [key: string]: any;
2277
2357
  };
2278
2358
  export interface Result extends DefaultPaginationResult {
@@ -2322,6 +2402,12 @@ export namespace Service {
2322
2402
  name?: string;
2323
2403
  search?: string;
2324
2404
  from_updatedAt?: number;
2405
+ from__id?: string;
2406
+ to__id?: string;
2407
+ sortBy?: {
2408
+ field: "_id";
2409
+ type: "asc" | "desc";
2410
+ }[];
2325
2411
  };
2326
2412
  export interface Result extends DefaultPaginationResult {
2327
2413
  data: MslSchema[];
@@ -2401,6 +2487,12 @@ export namespace Service {
2401
2487
  from_updatedAt?: number;
2402
2488
  to_updatedAt?: number;
2403
2489
  populatedKeys?: PopulatedKeys[];
2490
+ from__id?: string;
2491
+ to__id?: string;
2492
+ sortBy?: {
2493
+ field: "_id";
2494
+ type: "asc" | "desc";
2495
+ }[];
2404
2496
  };
2405
2497
  export interface Result extends DefaultPaginationResult {
2406
2498
  data: MslProductWithPopulatedKeysSchema[];
@@ -2450,6 +2542,12 @@ export namespace Service {
2450
2542
  disabled?: boolean;
2451
2543
  from_updatedAt?: number;
2452
2544
  to_updatedAt?: number;
2545
+ from__id?: string;
2546
+ to__id?: string;
2547
+ sortBy?: {
2548
+ field: "_id";
2549
+ type: "asc" | "desc";
2550
+ }[];
2453
2551
  };
2454
2552
  export interface Result extends DefaultPaginationResult {
2455
2553
  data: TeamSchema[];
@@ -2808,6 +2906,12 @@ export namespace Service {
2808
2906
  last_login_time?: number;
2809
2907
  [key: string]: any; // integration_meta.
2810
2908
  populatedKeys?: PopulatedKeys[];
2909
+ from__id?: string;
2910
+ to__id?: string;
2911
+ sortBy?: {
2912
+ field: "_id";
2913
+ type: "asc" | "desc";
2914
+ }[];
2811
2915
  withProductLines?: boolean;
2812
2916
  withStatus?: boolean;
2813
2917
  };
@@ -2935,6 +3039,12 @@ export namespace Service {
2935
3039
  type?: TagType[] | TagType;
2936
3040
  disabled?: boolean;
2937
3041
  from_updatedAt?: number;
3042
+ from__id?: string;
3043
+ to__id?: string;
3044
+ sortBy?: {
3045
+ field: "_id";
3046
+ type: "asc" | "desc";
3047
+ }[];
2938
3048
  populatedKeys?: PopulatedKeys[];
2939
3049
  [key: string]: any; // integration_meta.
2940
3050
  };
@@ -3017,6 +3127,12 @@ export namespace Service {
3017
3127
  name?: string[] | string;
3018
3128
  disabled?: boolean;
3019
3129
  from_updatedAt?: number;
3130
+ from__id?: string;
3131
+ to__id?: string;
3132
+ sortBy?: {
3133
+ field: "_id";
3134
+ type: "asc" | "desc";
3135
+ }[];
3020
3136
  populatedKeys?: PopulatedKeys[];
3021
3137
  };
3022
3138
  export interface Result extends DefaultPaginationResult {
@@ -3093,8 +3209,14 @@ export namespace Service {
3093
3209
  type?: WarehouseType[] | WarehouseType;
3094
3210
  disabled?: boolean;
3095
3211
  from_updatedAt?: number;
3212
+ from__id?: string;
3213
+ to__id?: string;
3096
3214
  [key: string]: any; // integration_meta.
3097
3215
  populatedKeys?: PopulatedKeys[];
3216
+ sortBy?: {
3217
+ field: "_id";
3218
+ type: "asc" | "desc";
3219
+ }[];
3098
3220
  };
3099
3221
  export interface Result extends DefaultPaginationResult {
3100
3222
  data: WarehouseWithPopulatedKeysSchema[];
@@ -3160,6 +3282,12 @@ export namespace Service {
3160
3282
  local_name?: string[] | string;
3161
3283
  disabled?: boolean;
3162
3284
  from_updatedAt?: number;
3285
+ from__id?: string;
3286
+ to__id?: string;
3287
+ sortBy?: {
3288
+ field: "_id";
3289
+ type: "asc" | "desc";
3290
+ }[];
3163
3291
  };
3164
3292
  export interface Result extends DefaultPaginationResult {
3165
3293
  data: ProductModifiersGroupSchema[];
@@ -3222,6 +3350,12 @@ export namespace Service {
3222
3350
  local_name?: string[] | string;
3223
3351
  disabled?: boolean;
3224
3352
  from_updatedAt?: number;
3353
+ from__id?: string;
3354
+ to__id?: string;
3355
+ sortBy?: {
3356
+ field: "_id";
3357
+ type: "asc" | "desc";
3358
+ }[];
3225
3359
  [key: string]: any; // integration_meta.
3226
3360
  };
3227
3361
  export interface Result extends DefaultPaginationResult {
@@ -3366,6 +3500,12 @@ export namespace Service {
3366
3500
  name?: string[] | string;
3367
3501
  from_updatedAt?: number;
3368
3502
  to_updatedAt?: number;
3503
+ from__id?: string;
3504
+ to__id?: string;
3505
+ sortBy?: {
3506
+ field: "_id";
3507
+ type: "asc" | "desc";
3508
+ }[];
3369
3509
  };
3370
3510
  export interface Result extends DefaultPaginationResult {
3371
3511
  data: ClientContactSchema[];
@@ -3489,6 +3629,12 @@ export namespace Service {
3489
3629
  _id?: string[] | string;
3490
3630
  search?: string;
3491
3631
  from_updatedAt?: number;
3632
+ from__id?: string;
3633
+ to__id?: string;
3634
+ sortBy?: {
3635
+ field: "_id";
3636
+ type: "asc" | "desc";
3637
+ }[];
3492
3638
  [key: string]: any; // integration_meta.
3493
3639
  };
3494
3640
  export interface Result extends DefaultPaginationResult {
@@ -3621,6 +3767,12 @@ export namespace Service {
3621
3767
  color?: string[] | string;
3622
3768
  disabled?: boolean;
3623
3769
  from_updatedAt?: number;
3770
+ from__id?: string;
3771
+ to__id?: string;
3772
+ sortBy?: {
3773
+ field: "_id";
3774
+ type: "asc" | "desc";
3775
+ }[];
3624
3776
  [key: string]: any; // integration_meta.
3625
3777
  };
3626
3778
  export interface Result extends DefaultPaginationResult {
@@ -3793,6 +3945,12 @@ export namespace Service {
3793
3945
  type?: string;
3794
3946
  code?: string;
3795
3947
  from_updatedAt?: number;
3948
+ from__id?: string;
3949
+ to__id?: string;
3950
+ sortBy?: {
3951
+ field: "_id";
3952
+ type: "asc" | "desc";
3953
+ }[];
3796
3954
  [key: string]: any; // integration_meta.
3797
3955
  };
3798
3956
  export interface Result extends DefaultPaginationResult {
@@ -3882,6 +4040,12 @@ export namespace Service {
3882
4040
  from_updatedAt?: number;
3883
4041
  [key: string]: any; // integration_meta.
3884
4042
  populatedKeys?: PopulatedKeys[];
4043
+ from__id?: string;
4044
+ to__id?: string;
4045
+ sortBy?: {
4046
+ field: "_id";
4047
+ type: "asc" | "desc";
4048
+ }[];
3885
4049
  };
3886
4050
  export interface Result extends DefaultPaginationResult {
3887
4051
  data: CustomListItemSchemaWithPopulatedKeys[];
@@ -3935,6 +4099,12 @@ export namespace Service {
3935
4099
  local_name?: string[] | string;
3936
4100
  disabled?: boolean;
3937
4101
  from_updatedAt?: number;
4102
+ from__id?: string;
4103
+ to__id?: string;
4104
+ sortBy?: {
4105
+ field: "_id";
4106
+ type: "asc" | "desc";
4107
+ }[];
3938
4108
  [key: string]: any; // integration_meta.
3939
4109
  };
3940
4110
  export interface Result extends DefaultPaginationResult {
@@ -4669,30 +4839,99 @@ export namespace Service {
4669
4839
 
4670
4840
  export namespace Workorder {
4671
4841
  export interface WorkorderSchema {
4672
- _id: string;
4673
- creator?: AdminCreator | RepCreator | ClientCreator;
4674
- editor?: AdminCreator | RepCreator | ClientCreator;
4675
- name?: string;
4842
+ _id: StringId;
4843
+ name: string;
4676
4844
  local_name?: string;
4677
- description?: string;
4678
4845
  disabled: boolean;
4679
- integration_meta?: { [key: string]: any };
4846
+ client: StringId;
4847
+ client_name: string;
4848
+ sync_id: string;
4680
4849
  status: WorkorderStatus;
4850
+ creator: AdminCreator | RepCreator | ClientCreator;
4851
+ editor?: AdminCreator | RepCreator | ClientCreator;
4852
+ workorder_categories: StringId[];
4853
+ description?: string;
4854
+ integration_meta?: { [key: string]: any };
4681
4855
  assets?: StringId[];
4682
4856
  asset_units?: StringId[];
4683
4857
  asset_part_units?: StringId[];
4684
- workorder_categories: StringId[];
4685
4858
  due_date?: number;
4686
4859
  start_date?: number;
4687
4860
  client_location: StringId;
4688
4861
  priority?: Priority;
4689
4862
  priority_human?: Priority_human;
4863
+ workorder_request?: string;
4864
+ serial_number?: SerialNumber;
4865
+ assigned_to?: StringId[];
4866
+ forms?: StringId[];
4867
+ time: number;
4868
+ is_overdue: boolean;
4869
+ opened_at: number;
4870
+ done_at: number;
4871
+ cancelled_at: number;
4872
+ inprogress_at: number;
4873
+ done_by?: AdminCreator | RepCreator | ClientCreator;
4874
+ cancelled_by?: AdminCreator | RepCreator | ClientCreator;
4875
+ opened_by?: AdminCreator | RepCreator | ClientCreator;
4876
+ inprogress_by?: AdminCreator | RepCreator | ClientCreator;
4877
+ build: Build[];
4878
+ calendars: Calendar[];
4879
+ builtAt: number;
4880
+ due_date_day?: string;
4881
+ last_done_at?: number;
4882
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
4883
+ resolve_time?: number;
4884
+ startsAt: string;
4885
+ endsAt?: string;
4886
+ is_dunning_allowed?: boolean;
4887
+ score_required_for_dunning?: boolean;
4888
+ min_score_required_for_dunning?: number;
4889
+ score?: number;
4890
+ is_completed?: boolean;
4891
+ forms_v2?: {
4892
+ form_id: StringId;
4893
+ form_activity_id?: StringId;
4894
+ completion_required_for_dunning?: boolean;
4895
+ score_required_for_dunning?: boolean;
4896
+ min_score_required_for_dunning?: number;
4897
+ score?: number;
4898
+ is_completed?: boolean;
4899
+ }[];
4900
+ teams?: StringId[];
4901
+ media?: StringId[];
4902
+ cover_photo?: StringId;
4903
+ custom_status?: StringId;
4904
+ contract?: StringId;
4905
+ parent_repeating_workorder?: StringId;
4906
+ parent_repeating_day?: string;
4907
+ filter_asset_units_by_location?: boolean;
4908
+ company_namespace: string[];
4909
+ createdAt: Date;
4910
+ updatedAt: Date;
4911
+ }
4912
+ export interface PopulatedData {
4913
+ _id: StringId;
4914
+ name: string;
4915
+ local_name?: string;
4916
+ disabled: boolean;
4690
4917
  client: StringId;
4691
4918
  client_name: string;
4919
+ sync_id: string;
4920
+ status: WorkorderStatus;
4921
+ creator: AdminCreator | RepCreator | ClientCreator;
4922
+ editor?: AdminCreator | RepCreator | ClientCreator;
4923
+ workorder_categories: StringId[];
4924
+ description?: string;
4925
+ integration_meta?: { [key: string]: any };
4926
+ assets?: StringId[];
4927
+ asset_units?: StringId[];
4928
+ asset_part_units?: StringId[];
4929
+ due_date?: number;
4930
+ start_date?: number;
4931
+ client_location: StringId;
4932
+ priority?: Priority;
4933
+ priority_human?: Priority_human;
4692
4934
  workorder_request?: string;
4693
- createdAt?: Date;
4694
- updatedAt?: Date;
4695
- company_namespace: string[];
4696
4935
  serial_number?: SerialNumber;
4697
4936
  assigned_to?: StringId[];
4698
4937
  forms?: StringId[];
@@ -4709,48 +4948,21 @@ export namespace Service {
4709
4948
  build: Build[];
4710
4949
  calendars: Calendar[];
4711
4950
  builtAt: number;
4712
- due_date_day: string;
4713
- last_done_at: number;
4714
- last_done_by: AdminCreator | RepCreator | ClientCreator;
4715
- resolve_time: number;
4716
- sync_id: string;
4951
+ due_date_day?: string;
4952
+ last_done_at?: number;
4953
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
4954
+ resolve_time?: number;
4717
4955
  startsAt: string;
4718
- endsAt: string;
4719
- teams_populated?: Pick<Team.TeamSchema, "name">;
4720
- client_populated?: Pick<Client.ClientSchema, "client_code" | "name">;
4721
- asset_units_populated?: AssetUnitsPopulated[];
4722
- assets_populated?: AssetsPopulated[];
4723
- asset_part_units_populated?: (Pick<
4724
- AssetPartUnit.Data,
4725
- | "_id"
4726
- | "asset_part"
4727
- | "custom_status"
4728
- | "qty"
4729
- | "directional_status"
4730
- | "warehouse"
4731
- | "warehouse_name"
4732
- > & {
4733
- asset_part: Pick<AssetPart.Data, "_id" | "name" | "local_name"> & {
4734
- cover_photo?: PopulatedMediaStorage[];
4735
- };
4736
- custom_status?: Pick<
4737
- CustomStatus.CustomStatusSchema,
4738
- "_id" | "code" | "color" | "local_name" | "name"
4739
- >;
4740
- })[];
4741
- assigned_to_populated?: RepresentativesPopulated;
4742
- client_location_populated?: ClientLocationPopulated;
4743
- workorder_categories_populated?: WorkorderCategoryPopulated[];
4744
- forms_populated?: FormPopulated[];
4745
- media_populated?: MediaPopulated;
4746
- cover_photo_populated?: MediaPopulated;
4956
+ endsAt?: string;
4747
4957
  is_dunning_allowed?: boolean;
4748
4958
  score_required_for_dunning?: boolean;
4749
4959
  min_score_required_for_dunning?: number;
4750
4960
  score?: number;
4751
4961
  is_completed?: boolean;
4752
4962
  forms_v2?: {
4753
- form_id: StringId;
4963
+ form_id:
4964
+ | StringId
4965
+ | { _id: StringId; name: string; local_name?: string }; // Pick<FormV2.Data, "_id"|"name"|"local_name">
4754
4966
  form_activity_id?: StringId;
4755
4967
  completion_required_for_dunning?: boolean;
4756
4968
  score_required_for_dunning?: boolean;
@@ -4766,16 +4978,54 @@ export namespace Service {
4766
4978
  parent_repeating_workorder?: StringId;
4767
4979
  parent_repeating_day?: string;
4768
4980
  filter_asset_units_by_location?: boolean;
4981
+ company_namespace: string[];
4982
+ createdAt: Date;
4983
+ updatedAt: Date;
4984
+ teams_populated?: Pick<Team.TeamSchema, "name">;
4985
+ client_populated?: Pick<Client.ClientSchema, "client_code" | "name">;
4986
+ asset_units_populated?: AssetUnitsPopulated[];
4987
+ assets_populated?: AssetsPopulated[];
4988
+ asset_part_units_populated?: (Pick<
4989
+ AssetPartUnit.Data,
4990
+ | "_id"
4991
+ | "asset_part"
4992
+ | "custom_status"
4993
+ | "qty"
4994
+ | "directional_status"
4995
+ | "warehouse"
4996
+ | "warehouse_name"
4997
+ > & {
4998
+ asset_part: Pick<AssetPart.Data, "_id" | "name" | "local_name"> & {
4999
+ cover_photo?: PopulatedMediaStorage[];
5000
+ };
5001
+ custom_status?: Pick<
5002
+ CustomStatus.CustomStatusSchema,
5003
+ "_id" | "code" | "color" | "local_name" | "name"
5004
+ >;
5005
+ })[];
5006
+ assigned_to_populated?: RepresentativesPopulated;
5007
+ client_location_populated?: ClientLocationPopulated;
5008
+ workorder_categories_populated?: WorkorderCategoryPopulated[];
5009
+ forms_populated?: FormPopulated[];
5010
+ media_populated?: MediaPopulated;
5011
+ cover_photo_populated?: MediaPopulated;
5012
+ contract_populated?: {
5013
+ _id: StringId;
5014
+ serial_number: SerialNumber;
5015
+ title?: string;
5016
+ external_serial_number?: string;
5017
+ status?: "open" | "closed" | "canceled";
5018
+ }; // Pick<Contract.Data,"_id" | "serial_number" | "title" | "external_serial_number" | "status">;
4769
5019
  }
4770
5020
  export interface CreateBody {
4771
- company_namespace: string[];
5021
+ company_namespace?: string[];
4772
5022
  creator?: AdminCreator | RepCreator | ClientCreator;
4773
5023
  name: string;
4774
5024
  local_name?: string;
4775
5025
  description?: string;
4776
5026
  disabled?: boolean;
4777
5027
  integration_meta?: { [key: string]: any };
4778
- status: WorkorderStatus;
5028
+ status?: WorkorderStatus;
4779
5029
  assets?: StringId[];
4780
5030
  asset_units?: StringId[];
4781
5031
  asset_part_units?: StringId[];
@@ -4794,22 +5044,37 @@ export namespace Service {
4794
5044
  calendars: Calendar[];
4795
5045
  parent_repeating_workorder?: StringId;
4796
5046
  due_date_day?: string;
4797
- last_done_at: number;
4798
- last_done_by: AdminCreator | RepCreator | ClientCreator;
4799
- resolve_time: number;
5047
+ last_done_at?: number;
5048
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
5049
+ resolve_time?: number;
4800
5050
  sync_id: string;
4801
- opened_at: number;
4802
- time: number;
4803
- opened_by: AdminCreator | RepCreator | ClientCreator;
5051
+ opened_at?: number;
5052
+ time?: number;
5053
+ opened_by?: AdminCreator | RepCreator | ClientCreator;
4804
5054
  teams?: StringId[];
4805
5055
  media?: StringId[];
4806
5056
  cover_photo?: StringId;
4807
5057
  custom_status?: StringId;
4808
5058
  contract?: StringId;
5059
+ is_dunning_allowed?: boolean;
5060
+ score_required_for_dunning?: boolean;
5061
+ min_score_required_for_dunning?: number;
5062
+ score?: number;
5063
+ is_completed?: boolean;
5064
+ forms_v2?: {
5065
+ form_id: StringId;
5066
+ form_activity_id?: StringId;
5067
+ completion_required_for_dunning?: boolean;
5068
+ score_required_for_dunning?: boolean;
5069
+ min_score_required_for_dunning?: number;
5070
+ score?: number;
5071
+ is_completed?: boolean;
5072
+ }[];
5073
+ filter_asset_units_by_location?: boolean;
4809
5074
  }
4810
5075
  export interface UpdateBody {
4811
- company_namespace: string[];
4812
- _id?: string;
5076
+ company_namespace?: string[];
5077
+ _id?: StringId;
4813
5078
  creator?: AdminCreator | RepCreator | ClientCreator;
4814
5079
  editor?: AdminCreator | RepCreator | ClientCreator;
4815
5080
  name?: string;
@@ -4817,40 +5082,40 @@ export namespace Service {
4817
5082
  description?: string;
4818
5083
  disabled?: boolean;
4819
5084
  integration_meta?: { [key: string]: any };
4820
- status: WorkorderStatus;
4821
- assets?: string[];
4822
- asset_units?: string[];
5085
+ status?: WorkorderStatus;
5086
+ assets?: StringId[];
5087
+ asset_units?: StringId[];
4823
5088
  asset_part_units?: StringId[];
4824
- workorder_categories: string[];
5089
+ workorder_categories?: string[];
4825
5090
  due_date?: number;
4826
5091
  start_date?: number;
4827
- client_location: string;
5092
+ client_location: StringId;
4828
5093
  priority?: Priority;
4829
5094
  priority_human?: Priority_human;
4830
- client: string;
5095
+ client?: StringId;
4831
5096
  client_name?: string;
4832
- workorder_request?: string;
5097
+ workorder_request?: StringId;
4833
5098
  createdAt?: Date;
4834
5099
  updatedAt?: Date;
4835
5100
  serial_number?: SerialNumber;
4836
- assigned_to?: string[];
4837
- forms?: string[];
4838
- time: number;
4839
- is_overdue: boolean;
4840
- opened_at: number;
4841
- done_at: number;
4842
- cancelled_at: number;
4843
- inprogress_at: number;
5101
+ assigned_to?: StringId[];
5102
+ forms?: StringId[];
5103
+ time?: number;
5104
+ is_overdue?: boolean;
5105
+ opened_at?: number;
5106
+ done_at?: number;
5107
+ cancelled_at?: number;
5108
+ inprogress_at?: number;
4844
5109
  done_by?: AdminCreator | RepCreator | ClientCreator;
4845
5110
  cancelled_by?: AdminCreator | RepCreator | ClientCreator;
4846
5111
  opened_by?: AdminCreator | RepCreator | ClientCreator;
4847
5112
  inprogress_by?: AdminCreator | RepCreator | ClientCreator;
4848
- calendars: Calendar[];
5113
+ calendars?: Calendar[];
4849
5114
  parent_repeating_workorder?: string;
4850
5115
  due_date_day?: string;
4851
- last_done_at: number;
4852
- last_done_by: AdminCreator | RepCreator | ClientCreator;
4853
- resolve_time: number;
5116
+ last_done_at?: number;
5117
+ last_done_by?: AdminCreator | RepCreator | ClientCreator;
5118
+ resolve_time?: number;
4854
5119
  sync_id?: string;
4855
5120
  teams?: StringId[];
4856
5121
  media?: StringId[];
@@ -4877,24 +5142,26 @@ export namespace Service {
4877
5142
  | "forms"
4878
5143
  | "media"
4879
5144
  | "cover_photo"
4880
- | "teams";
5145
+ | "teams"
5146
+ | "forms_v2"
5147
+ | "contract";
4881
5148
  export namespace Find {
4882
5149
  export type Params = DefaultPaginationQueryParams & {
4883
- name?: string;
4884
- _id?: string;
4885
- assigned_to?: string[];
4886
- priority?: Priority;
4887
- priority_human?: Priority_human;
4888
- status?: WorkorderStatus;
4889
- workorder_categories?: string[];
4890
- client_location?: string;
4891
- client?: string;
4892
- assets?: string[];
4893
- asset_units?: string[];
4894
- asset_part_units?: StringId[];
5150
+ name?: string | string[];
5151
+ _id?: StringId | StringId[];
5152
+ assigned_to?: StringId | StringId[];
5153
+ priority?: Priority | Priority[];
5154
+ priority_human?: Priority_human | Priority_human[];
5155
+ status?: WorkorderStatus | WorkorderStatus[];
5156
+ workorder_categories?: StringId | StringId[];
5157
+ client_location?: StringId | StringId[];
5158
+ client?: StringId | StringId[];
5159
+ assets?: StringId | StringId[];
5160
+ asset_units?: StringId | StringId[];
5161
+ asset_part_units?: StringId | StringId[];
4895
5162
  due_date?: number;
4896
5163
  start_date?: number;
4897
- forms?: string[];
5164
+ forms?: StringId | StringId[];
4898
5165
  from_createdAt?: number;
4899
5166
  to_createdAt?: number;
4900
5167
  from_updatedAt?: number;
@@ -4903,10 +5170,23 @@ export namespace Service {
4903
5170
  to_start_date?: number;
4904
5171
  from_due_date?: number;
4905
5172
  to_due_date?: number;
4906
- teams?: string[];
5173
+ teams?: StringId | StringId[];
5174
+ is_dunning_allowed?: boolean | boolean[];
5175
+ is_completed?: boolean | boolean[];
5176
+ from_score?: number;
5177
+ to_score?: number;
5178
+ score?: number;
5179
+ contract?: StringId | StringId[];
5180
+ "forms_v2.form_id"?: StringId | StringId[];
5181
+ started?: boolean;
5182
+ assignedToMe?: boolean;
5183
+ search?: string;
5184
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
5185
+ sortBy?: { field: SortingKeys; type: "asc" | "desc" }[];
5186
+ [key: string]: any; // integration_meta.
4907
5187
  };
4908
5188
  export interface Result extends DefaultPaginationResult {
4909
- data: WorkorderSchema[];
5189
+ data: WorkorderSchema[] | PopulatedData[];
4910
5190
  absolute_total: number;
4911
5191
  page_total: number;
4912
5192
  }
@@ -4917,7 +5197,20 @@ export namespace Service {
4917
5197
  populatedKeys?: PopulatedKeys[];
4918
5198
  sortPage?: SortingKeys;
4919
5199
  }
4920
- export type Result = WorkorderSchema;
5200
+ export type Result = WorkorderSchema | PopulatedData;
5201
+ }
5202
+ export namespace Create {
5203
+ export type Body = CreateBody;
5204
+ export type Result = Data;
5205
+ }
5206
+ export namespace Update {
5207
+ export type ID = string;
5208
+ export type Body = UpdateBody;
5209
+ export type Result = Data;
5210
+ }
5211
+ export namespace Remove {
5212
+ export type ID = string;
5213
+ export type Result = Data;
4921
5214
  }
4922
5215
  }
4923
5216
 
@@ -5668,9 +5961,9 @@ export namespace Service {
5668
5961
  skip_promos?: boolean;
5669
5962
  skipped_promotions?: { _id: StringId; name?: string; ref?: string }[];
5670
5963
  partially_returned_from?: StringId;
5671
- partially_returned_to?: StringId;
5964
+ partially_returned_to?: StringId[];
5672
5965
  partially_returned_from_serial_number?: SerialNumber;
5673
- partially_returned_to_serial_number?: SerialNumber;
5966
+ partially_returned_to_serial_number?: SerialNumber[];
5674
5967
  discount_amount_float?: number;
5675
5968
  net_total?: number;
5676
5969
  tax_amount_after_deduction_float?: number;
@@ -5775,6 +6068,12 @@ export namespace Service {
5775
6068
  "serial_number.formatted"?: string[] | string;
5776
6069
  "return_serial_number.formatted"?: string[] | string;
5777
6070
  returned_from?: string[] | string;
6071
+ from__id?: string;
6072
+ to__id?: string;
6073
+ sortBy?: {
6074
+ field: "_id";
6075
+ type: "asc" | "desc";
6076
+ }[];
5778
6077
  };
5779
6078
  export interface Result extends DefaultPaginationResult {
5780
6079
  data: InvoiceSchemaWithPopulatedKeys[];
@@ -6256,7 +6555,7 @@ export namespace Service {
6256
6555
  };
6257
6556
  type PopulatedKeys = "custom_status" | "return_reason" | "teams" | "route";
6258
6557
  type ProformaStatus = "pending" | "approved" | "processing" | "rejected";
6259
- type SortingKeys =
6558
+ type VariantSortingKeys =
6260
6559
  | "product_sku"
6261
6560
  | "product_barcode"
6262
6561
  | "variant_name"
@@ -6284,10 +6583,16 @@ export namespace Service {
6284
6583
  custom_status?: string[] | string;
6285
6584
  status?: ProformaStatus | ProformaStatus[];
6286
6585
  [key: string]: any; // integration_meta.
6287
- sortPage?: SortingKeys;
6586
+ sortPage?: VariantSortingKeys;
6288
6587
  export?: "excel";
6289
6588
  withClientDetails?: boolean;
6290
6589
  populatedKeys?: PopulatedKeys[];
6590
+ from__id?: string;
6591
+ to__id?: string;
6592
+ sortBy?: {
6593
+ field: "_id";
6594
+ type: "asc" | "desc";
6595
+ }[];
6291
6596
  nodeCycles?: string[] | string;
6292
6597
  withCycle?: boolean;
6293
6598
  };
@@ -6299,7 +6604,7 @@ export namespace Service {
6299
6604
  export namespace Get {
6300
6605
  export type ID = string;
6301
6606
  export interface Params {
6302
- sortPage?: SortingKeys;
6607
+ sortPage?: VariantSortingKeys;
6303
6608
  withClientDetails?: boolean;
6304
6609
  withCycle?: boolean;
6305
6610
  }
@@ -6440,6 +6745,12 @@ export namespace Service {
6440
6745
  "serial_number.formatted"?: string[] | string;
6441
6746
  [key: string]: any; // integration_meta.
6442
6747
  populatedKeys?: PopulatedKeys[];
6748
+ from__id?: string;
6749
+ to__id?: string;
6750
+ sortBy?: {
6751
+ field: "_id";
6752
+ type: "asc" | "desc";
6753
+ }[];
6443
6754
  };
6444
6755
  export interface Result extends DefaultPaginationResult {
6445
6756
  data: PaymentSchemaWithPopulatedKeys[];
@@ -6580,6 +6891,12 @@ export namespace Service {
6580
6891
  withPrintDetails?: boolean;
6581
6892
  [key: string]: any; // integration_meta.
6582
6893
  populatedKeys?: PopulatedKeys[];
6894
+ from__id?: string;
6895
+ to__id?: string;
6896
+ sortBy?: {
6897
+ field: "_id";
6898
+ type: "asc" | "desc";
6899
+ }[];
6583
6900
  };
6584
6901
  export interface Result extends DefaultPaginationResult {
6585
6902
  data: RefundSchemaWithPopulatedKeys[];
@@ -6690,6 +7007,12 @@ export namespace Service {
6690
7007
  from_createdAt?: number;
6691
7008
  to_createdAt?: number;
6692
7009
  from_updatedAt?: number;
7010
+ from__id?: string;
7011
+ to__id?: string;
7012
+ sortBy?: {
7013
+ field: "_id";
7014
+ type: "asc" | "desc";
7015
+ }[];
6693
7016
  [key: string]: any; // integration_meta.
6694
7017
  populatedKeys?: PopulatedKeys[];
6695
7018
  };
@@ -6805,6 +7128,12 @@ export namespace Service {
6805
7128
  from_updatedAt?: number;
6806
7129
  [key: string]: any; // integration_meta.
6807
7130
  populatedKeys?: PopulatedKeys[];
7131
+ from__id?: string;
7132
+ to__id?: string;
7133
+ sortBy?: {
7134
+ field: "_id";
7135
+ type: "asc" | "desc";
7136
+ }[];
6808
7137
  };
6809
7138
  export interface Result extends DefaultPaginationResult {
6810
7139
  data: CheckSchemaWithPopulatedKeys[];
@@ -6979,6 +7308,12 @@ export namespace Service {
6979
7308
  from_updatedAt?: number;
6980
7309
  [key: string]: any; // integration_meta.
6981
7310
  populatedKeys?: PopulatedKeys[];
7311
+ from__id?: string;
7312
+ to__id?: string;
7313
+ sortBy?: {
7314
+ field: "_id";
7315
+ type: "asc" | "desc";
7316
+ }[];
6982
7317
  };
6983
7318
  export interface Result extends DefaultPaginationResult {
6984
7319
  data: DaySchemaWithPopulatedKeys[];
@@ -7117,6 +7452,12 @@ export namespace Service {
7117
7452
  from_createdAt?: number;
7118
7453
  to_createdAt?: number;
7119
7454
  from_updatedAt?: number;
7455
+ from__id?: string;
7456
+ to__id?: string;
7457
+ sortBy?: {
7458
+ field: "_id";
7459
+ type: "asc" | "desc";
7460
+ }[];
7120
7461
  [key: string]: any; // integration_meta.
7121
7462
  };
7122
7463
  export interface Result extends DefaultPaginationResult {
@@ -7183,6 +7524,12 @@ export namespace Service {
7183
7524
  local_name?: string;
7184
7525
  type?: string;
7185
7526
  from_updatedAt?: number;
7527
+ from__id?: string;
7528
+ to__id?: string;
7529
+ sortBy?: {
7530
+ field: "_id";
7531
+ type: "asc" | "desc";
7532
+ }[];
7186
7533
  [key: string]: any; // integration_meta.
7187
7534
  };
7188
7535
  export interface Result extends DefaultPaginationResult {
@@ -7415,7 +7762,13 @@ export namespace Service {
7415
7762
  custom_status?: string[] | string;
7416
7763
  creator?: string[] | string;
7417
7764
  nodeCycles?: string[] | string;
7765
+ from__id?: string;
7766
+ to__id?: string;
7418
7767
  populatedKeys?: PopulatedKeys[];
7768
+ sortBy?: {
7769
+ field: "_id";
7770
+ type: "asc" | "desc";
7771
+ }[];
7419
7772
  [key: string]: any; // integration_meta.
7420
7773
  };
7421
7774
  export interface Result extends DefaultPaginationResult {
@@ -7573,6 +7926,12 @@ export namespace Service {
7573
7926
  from_createdAt?: number;
7574
7927
  to_createdAt?: number;
7575
7928
  from_updatedAt?: number;
7929
+ from__id?: string;
7930
+ to__id?: string;
7931
+ sortBy?: {
7932
+ field: "_id";
7933
+ type: "asc" | "desc";
7934
+ }[];
7576
7935
  [key: string]: any; // integration_meta.
7577
7936
  };
7578
7937
  export interface Result extends DefaultPaginationResult {
@@ -7744,6 +8103,12 @@ export namespace Service {
7744
8103
  from_updatedAt?: number;
7745
8104
  to_updatedAt?: number;
7746
8105
  populatedKeys?: PopulatedKeys[];
8106
+ from__id?: string;
8107
+ to__id?: string;
8108
+ sortBy?: {
8109
+ field: "_id";
8110
+ type: "asc" | "desc";
8111
+ }[];
7747
8112
  };
7748
8113
  export interface Result extends DefaultPaginationResult {
7749
8114
  data: Data[] | PopulatedData[];
@@ -7799,6 +8164,12 @@ export namespace Service {
7799
8164
  _id?: string[] | string;
7800
8165
  name?: string;
7801
8166
  from_updatedAt?: number;
8167
+ from__id?: string;
8168
+ to__id?: string;
8169
+ sortBy?: {
8170
+ field: "_id";
8171
+ type: "asc" | "desc";
8172
+ }[];
7802
8173
  [key: string]: any; // integration_meta.
7803
8174
  };
7804
8175
  export interface Result extends DefaultPaginationResult {
@@ -11032,6 +11403,518 @@ export namespace Service {
11032
11403
  export type Result = Data;
11033
11404
  }
11034
11405
  }
11406
+
11407
+ export namespace Settings {
11408
+ export type Separator = "," | " " | "." | "'";
11409
+
11410
+ export interface EmailFilter {
11411
+ id?: string;
11412
+ key: string;
11413
+ operator: "eq" | "ne" | "in" | "nin" | "gt" | "gte" | "lt" | "lte";
11414
+ value: any[];
11415
+ }
11416
+
11417
+ export interface SalesSettings {
11418
+ currency: string;
11419
+ name_on_invoice?: string;
11420
+ invoice_footer?: string;
11421
+ logo?: string;
11422
+ logo_media?: StringId | PopulatedMediaStorage;
11423
+ tax_number?: string;
11424
+ default_payment_type?: "cash" | "credit";
11425
+ saudi_law?: boolean;
11426
+ handle_integrated_client_balance?: boolean;
11427
+ dot_separator?: Separator;
11428
+ thousands_separator?: Separator;
11429
+ number_of_digits_after_dot_separator?: 0 | 1 | 2 | 3;
11430
+ hide_line_item_tax?: boolean;
11431
+ line_total_key?:
11432
+ | "line_total"
11433
+ | "total_before_tax"
11434
+ | "lineTotalAfterDeduction";
11435
+ return_invoice_title?: string;
11436
+ return_invoice_local_title?: string;
11437
+ invoice_title?: string;
11438
+ invoice_local_title?: string;
11439
+ proforma_title?: string;
11440
+ proforma_local_title?: string;
11441
+ show_total_in_words?: boolean;
11442
+ address_1?: string;
11443
+ address_2?: string;
11444
+ prevent_negative_convert_to_invoice_stock?: boolean;
11445
+ empty_proforma_cart_at_visit_start_by_same_creator?: boolean;
11446
+ empty_proforma_cart_at_visit_start_by_any_creator?: boolean;
11447
+ empty_fullinvoice_cart_at_visit_start_by_same_creator?: boolean;
11448
+ empty_fullinvoice_cart_at_visit_start_by_any_creator?: boolean;
11449
+ enforce_serial_number_by_server?: boolean;
11450
+ invoice_advanced_serial_number_format?: {
11451
+ format: {
11452
+ year_format?: "YYYY" | "YY";
11453
+ month_format?: "M" | "MM" | "MMM" | "MMMM";
11454
+ day_format?: "D" | "DD";
11455
+ counter_length_fixed?: boolean;
11456
+ counter_length?: number;
11457
+ id_format: string;
11458
+ };
11459
+ counter: number;
11460
+ };
11461
+ activate_advanced_serial_number?: boolean;
11462
+ enable_variant_batches_at_invoice?: boolean;
11463
+ enable_variant_batches_at_proforma?: boolean;
11464
+ enable_variant_batches_at_return_invoice?: boolean;
11465
+ prevent_negative_transfer_stock?: boolean;
11466
+ currency_subunit?: string;
11467
+ local_currency?: string;
11468
+ local_currency_subunit?: string;
11469
+ currency_factor?: 100 | 1000;
11470
+ }
11471
+
11472
+ export interface Data {
11473
+ _id: string;
11474
+ company_namespace: string[];
11475
+ live_location: { active: boolean; from?: string; to?: string };
11476
+ use_original_image_compression?: boolean;
11477
+ use_client_specific_sales_settings?: boolean;
11478
+ use_client_specific_sales_settings_for_payment?: boolean;
11479
+ use_client_specific_sales_settings_for_client_statement?: boolean;
11480
+ disable_ubl_integration_for_return_invoice?: boolean;
11481
+ sales: SalesSettings;
11482
+ geofencing: {
11483
+ visit_start: boolean;
11484
+ visit_end: boolean;
11485
+ radius: number;
11486
+ visit_strict: boolean;
11487
+ };
11488
+ mail_list: {
11489
+ invoice_sales: {
11490
+ name: string;
11491
+ email: string;
11492
+ filters?: EmailFilter[];
11493
+ }[];
11494
+ mocking: { name: string; email: string }[];
11495
+ sales_order: { name: string; email: string; filters?: EmailFilter[] }[];
11496
+ photo: { name: string; email: string; filters?: EmailFilter[] }[];
11497
+ live_location: {
11498
+ name: string;
11499
+ email: string;
11500
+ filters?: EmailFilter[];
11501
+ }[];
11502
+ location_off: {
11503
+ name: string;
11504
+ email: string;
11505
+ filters?: EmailFilter[];
11506
+ }[];
11507
+ location_on: { name: string; email: string; filters?: EmailFilter[] }[];
11508
+ contract_expiry: { name: string; email: string }[];
11509
+ contract_near_expiry: { name: string; email: string }[];
11510
+ contract_installment_due: { name: string; email: string }[];
11511
+ contract_installment_near_due: { name: string; email: string }[];
11512
+ };
11513
+ promotions: {
11514
+ enforcement_mode:
11515
+ | "all_in_inventory"
11516
+ | "all"
11517
+ | "gift_in_inventory"
11518
+ | "gift"
11519
+ | "custom";
11520
+ apply_hidden_price: boolean;
11521
+ apply_all_promotions: boolean;
11522
+ applying_sort: { [key: string]: -1 | 1 }[];
11523
+ force_cash_only: boolean;
11524
+ allow_manual_discounts?: boolean;
11525
+ manual_discounts_limit_percentage: number;
11526
+ manual_discounts_limit_value?: number;
11527
+ promotions_enabled: boolean;
11528
+ round_discounted_price: boolean;
11529
+ };
11530
+ teams_shared_collections: string[];
11531
+ days_of_work:
11532
+ | "Sunday"
11533
+ | "Monday"
11534
+ | "Tuesday"
11535
+ | "Wednesday"
11536
+ | "Thursday"
11537
+ | "Friday"
11538
+ | "Saturday";
11539
+ signUpMethod: "email" | "phone";
11540
+ calculate_target_for_absent_days: boolean;
11541
+ disable_module_custom_validator: boolean;
11542
+ activate_ubl_integration: boolean;
11543
+ last_activate_ubl_integration_time?: number;
11544
+ visit: { manual_product_line_selection: boolean };
11545
+ custom_status: {
11546
+ use_custom_status_transfer?: boolean;
11547
+ use_system_status_transfer?: boolean;
11548
+ use_custom_status_payment?: boolean;
11549
+ use_system_status_payment?: boolean;
11550
+ use_custom_status_fullinvoice?: boolean;
11551
+ use_system_status_fullinvoice?: boolean;
11552
+ use_custom_status_proforma?: boolean;
11553
+ use_system_status_proforma?: boolean;
11554
+ use_custom_status_workorder?: boolean;
11555
+ use_system_status_workorder?: boolean;
11556
+ };
11557
+ business_apps: {
11558
+ code: string;
11559
+ services: {
11560
+ permission: string;
11561
+ teams_shared: "shared" | "unshared";
11562
+ }[];
11563
+ }[];
11564
+ form: { overwrite_serial_number?: boolean; allow_create_v1: boolean };
11565
+ workorder?: {
11566
+ workorder_teams_follow_client?: boolean;
11567
+ workorder_request_teams_follow_client?: boolean;
11568
+ send_email_at_contract_expiry?: boolean;
11569
+ send_email_at_contract_near_expiry?: boolean;
11570
+ send_email_at_contract_installment_due?: boolean;
11571
+ send_email_at_contract_installment_near_due?: boolean;
11572
+ contract_near_expiry_days: number;
11573
+ contract_installment_near_due_days: number;
11574
+ workorder_near_due_days?: number;
11575
+ };
11576
+ notifications?: {
11577
+ calendar_update?: boolean;
11578
+ transfer_update?: boolean;
11579
+ cycle_update?: boolean;
11580
+ client_update?: boolean;
11581
+ approval_request_update?: boolean;
11582
+ workorder_update?: boolean;
11583
+ workorder_start?: boolean;
11584
+ workorder_near_due?: boolean;
11585
+ activity_note?: boolean;
11586
+ activity_form?: boolean;
11587
+ activity_photo?: boolean;
11588
+ activity_audit?: boolean;
11589
+ activity_task?: boolean;
11590
+ activity_availability?: boolean;
11591
+ activity_planogram?: boolean;
11592
+ activity_shelfsahre?: boolean;
11593
+ activity_checkout_display?: boolean;
11594
+ activity_secondary_display?: boolean;
11595
+ };
11596
+ asset_part?: { prevent_negative_asset_part_inventory: boolean };
11597
+ default_lang?: "en" | "ar";
11598
+ second_lang?: "en" | "ar";
11599
+ report_value_delimiter?: "|" | "," | " " | "." | "-";
11600
+ rep_settings?: {
11601
+ rep_start_day_specific_time_frame_start: string;
11602
+ rep_start_day_specific_time_frame_end: string;
11603
+ };
11604
+ rep_permissions?: {
11605
+ rep_must_start_day_within_specific_time_frame: boolean;
11606
+ };
11607
+ createdAt: Date;
11608
+ updatedAt: Date;
11609
+ }
11610
+
11611
+ export interface PopulatedDoc {
11612
+ _id: string;
11613
+ company_namespace: string[];
11614
+ live_location?: { active: boolean; from?: string; to?: string };
11615
+ use_original_image_compression?: boolean;
11616
+ use_client_specific_sales_settings?: boolean;
11617
+ use_client_specific_sales_settings_for_payment?: boolean;
11618
+ use_client_specific_sales_settings_for_client_statement?: boolean;
11619
+ disable_ubl_integration_for_return_invoice?: boolean;
11620
+ sales: SalesSettings;
11621
+ geofencing?: {
11622
+ visit_start: boolean;
11623
+ visit_end: boolean;
11624
+ radius: number;
11625
+ visit_strict: boolean;
11626
+ };
11627
+ mail_list?: {
11628
+ invoice_sales?: {
11629
+ name: string;
11630
+ email: string;
11631
+ filters?: EmailFilter[];
11632
+ }[];
11633
+ mocking?: { name: string; email: string }[];
11634
+ sales_order?: {
11635
+ name: string;
11636
+ email: string;
11637
+ filters?: EmailFilter[];
11638
+ }[];
11639
+ photo?: { name: string; email: string; filters?: EmailFilter[] }[];
11640
+ live_location?: {
11641
+ name: string;
11642
+ email: string;
11643
+ filters?: EmailFilter[];
11644
+ }[];
11645
+ location_off?: {
11646
+ name: string;
11647
+ email: string;
11648
+ filters?: EmailFilter[];
11649
+ }[];
11650
+ location_on?: {
11651
+ name: string;
11652
+ email: string;
11653
+ filters?: EmailFilter[];
11654
+ }[];
11655
+ contract_expiry?: { name: string; email: string }[];
11656
+ contract_near_expiry?: { name: string; email: string }[];
11657
+ contract_installment_due?: { name: string; email: string }[];
11658
+ contract_installment_near_due?: { name: string; email: string }[];
11659
+ };
11660
+ promotions?: {
11661
+ enforcement_mode?:
11662
+ | "all_in_inventory"
11663
+ | "all"
11664
+ | "gift_in_inventory"
11665
+ | "gift"
11666
+ | "custom";
11667
+ apply_hidden_price?: boolean;
11668
+ apply_all_promotions?: boolean;
11669
+ applying_sort?: { [key: string]: -1 | 1 }[];
11670
+ force_cash_only?: boolean;
11671
+ allow_manual_discounts?: boolean;
11672
+ manual_discounts_limit_percentage?: number;
11673
+ manual_discounts_limit_value?: number;
11674
+ promotions_enabled?: boolean;
11675
+ round_discounted_price?: boolean;
11676
+ };
11677
+ teams_shared_collections?: string[];
11678
+ days_of_work?:
11679
+ | "Sunday"
11680
+ | "Monday"
11681
+ | "Tuesday"
11682
+ | "Wednesday"
11683
+ | "Thursday"
11684
+ | "Friday"
11685
+ | "Saturday";
11686
+ signUpMethod?: "email" | "phone";
11687
+ calculate_target_for_absent_days?: boolean;
11688
+ disable_module_custom_validator?: boolean;
11689
+ activate_ubl_integration?: boolean;
11690
+ last_activate_ubl_integration_time?: number;
11691
+ visit?: { manual_product_line_selection: boolean };
11692
+ custom_status?: {
11693
+ use_custom_status_transfer?: boolean;
11694
+ use_system_status_transfer?: boolean;
11695
+ use_custom_status_payment?: boolean;
11696
+ use_system_status_payment?: boolean;
11697
+ use_custom_status_fullinvoice?: boolean;
11698
+ use_system_status_fullinvoice?: boolean;
11699
+ use_custom_status_proforma?: boolean;
11700
+ use_system_status_proforma?: boolean;
11701
+ use_custom_status_workorder?: boolean;
11702
+ use_system_status_workorder?: boolean;
11703
+ };
11704
+ business_apps?: {
11705
+ code: string;
11706
+ services: {
11707
+ permission: StringId | { name: string; _id: StringId };
11708
+ teams_shared: "shared" | "unshared";
11709
+ }[];
11710
+ }[];
11711
+ form?: { overwrite_serial_number?: boolean; allow_create_v1: boolean };
11712
+ workorder?: {
11713
+ workorder_teams_follow_client?: boolean;
11714
+ workorder_request_teams_follow_client?: boolean;
11715
+ send_email_at_contract_expiry?: boolean;
11716
+ send_email_at_contract_near_expiry?: boolean;
11717
+ send_email_at_contract_installment_due?: boolean;
11718
+ send_email_at_contract_installment_near_due?: boolean;
11719
+ contract_near_expiry_days?: number;
11720
+ contract_installment_near_due_days?: number;
11721
+ workorder_near_due_days?: number;
11722
+ };
11723
+ notifications?: {
11724
+ calendar_update?: boolean;
11725
+ transfer_update?: boolean;
11726
+ cycle_update?: boolean;
11727
+ client_update?: boolean;
11728
+ approval_request_update?: boolean;
11729
+ workorder_update?: boolean;
11730
+ workorder_start?: boolean;
11731
+ workorder_near_due?: boolean;
11732
+ activity_note?: boolean;
11733
+ activity_form?: boolean;
11734
+ activity_photo?: boolean;
11735
+ activity_audit?: boolean;
11736
+ activity_task?: boolean;
11737
+ activity_availability?: boolean;
11738
+ activity_planogram?: boolean;
11739
+ activity_shelfsahre?: boolean;
11740
+ activity_checkout_display?: boolean;
11741
+ activity_secondary_display?: boolean;
11742
+ };
11743
+ asset_part?: { prevent_negative_asset_part_inventory: boolean };
11744
+ default_lang?: "en" | "ar";
11745
+ second_lang?: "en" | "ar";
11746
+ report_value_delimiter?: "|" | "," | " " | "." | "-";
11747
+ rep_settings?: {
11748
+ rep_start_day_specific_time_frame_start: string;
11749
+ rep_start_day_specific_time_frame_end: string;
11750
+ };
11751
+ rep_permissions?: {
11752
+ rep_must_start_day_within_specific_time_frame: boolean;
11753
+ };
11754
+ createdAt: Date;
11755
+ updatedAt: Date;
11756
+ }
11757
+
11758
+ export namespace Find {
11759
+ export type Params = DefaultPaginationQueryParams & {
11760
+ _id?: StringId | StringId[];
11761
+ job?: StringId | StringId[];
11762
+ template?: StringId | StringId[];
11763
+ page_number?: number;
11764
+ proforma?: StringId | StringId[];
11765
+ status?: string | string[];
11766
+ };
11767
+ export interface Result extends DefaultPaginationResult {
11768
+ data: Data[];
11769
+ }
11770
+ }
11771
+
11772
+ export namespace Get {
11773
+ export type ID = string;
11774
+ export type Result = Data;
11775
+ }
11776
+
11777
+ export interface UpdateBody {
11778
+ live_location?: { active: boolean; from?: string; to?: string };
11779
+ use_original_image_compression?: boolean;
11780
+ use_client_specific_sales_settings?: boolean;
11781
+ use_client_specific_sales_settings_for_payment?: boolean;
11782
+ use_client_specific_sales_settings_for_client_statement?: boolean;
11783
+ disable_ubl_integration_for_return_invoice?: boolean;
11784
+ sales?: SalesSettings;
11785
+ geofencing?: {
11786
+ visit_start: boolean;
11787
+ visit_end: boolean;
11788
+ radius: number;
11789
+ visit_strict: boolean;
11790
+ };
11791
+ mail_list?: {
11792
+ invoice_sales: {
11793
+ name: string;
11794
+ email: string;
11795
+ filters?: EmailFilter[];
11796
+ }[];
11797
+ mocking: { name: string; email: string }[];
11798
+ sales_order: { name: string; email: string; filters?: EmailFilter[] }[];
11799
+ photo: { name: string; email: string; filters?: EmailFilter[] }[];
11800
+ live_location: {
11801
+ name: string;
11802
+ email: string;
11803
+ filters?: EmailFilter[];
11804
+ }[];
11805
+ location_off: {
11806
+ name: string;
11807
+ email: string;
11808
+ filters?: EmailFilter[];
11809
+ }[];
11810
+ location_on: { name: string; email: string; filters?: EmailFilter[] }[];
11811
+ contract_expiry: { name: string; email: string }[];
11812
+ contract_near_expiry: { name: string; email: string }[];
11813
+ contract_installment_due: { name: string; email: string }[];
11814
+ contract_installment_near_due: { name: string; email: string }[];
11815
+ };
11816
+ promotions?: {
11817
+ enforcement_mode:
11818
+ | "all_in_inventory"
11819
+ | "all"
11820
+ | "gift_in_inventory"
11821
+ | "gift"
11822
+ | "custom";
11823
+ apply_hidden_price: boolean;
11824
+ apply_all_promotions: boolean;
11825
+ applying_sort: { [key: string]: -1 | 1 }[];
11826
+ force_cash_only: boolean;
11827
+ allow_manual_discounts: boolean;
11828
+ manual_discounts_limit_percentage: number;
11829
+ manual_discounts_limit_value: number;
11830
+ promotions_enabled: boolean;
11831
+ round_discounted_price: boolean;
11832
+ };
11833
+ teams_shared_collections?: string[];
11834
+ days_of_work?:
11835
+ | "Sunday"
11836
+ | "Monday"
11837
+ | "Tuesday"
11838
+ | "Wednesday"
11839
+ | "Thursday"
11840
+ | "Friday"
11841
+ | "Saturday";
11842
+ signUpMethod?: "email" | "phone";
11843
+ calculate_target_for_absent_days?: boolean;
11844
+ disable_module_custom_validator?: boolean;
11845
+ activate_ubl_integration?: boolean;
11846
+ last_activate_ubl_integration_time?: number;
11847
+ visit?: { manual_product_line_selection: boolean };
11848
+ custom_status?: {
11849
+ use_custom_status_transfer?: boolean;
11850
+ use_system_status_transfer?: boolean;
11851
+ use_custom_status_payment?: boolean;
11852
+ use_system_status_payment?: boolean;
11853
+ use_custom_status_fullinvoice?: boolean;
11854
+ use_system_status_fullinvoice?: boolean;
11855
+ use_custom_status_proforma?: boolean;
11856
+ use_system_status_proforma?: boolean;
11857
+ use_custom_status_workorder?: boolean;
11858
+ use_system_status_workorder?: boolean;
11859
+ };
11860
+ business_apps?: {
11861
+ code: string;
11862
+ services: {
11863
+ permission: string;
11864
+ teams_shared: "shared" | "unshared";
11865
+ }[];
11866
+ }[];
11867
+ form?: { overwrite_serial_number?: boolean; allow_create_v1: boolean };
11868
+ workorder?: {
11869
+ workorder_teams_follow_client?: boolean;
11870
+ workorder_request_teams_follow_client?: boolean;
11871
+ send_email_at_contract_expiry?: boolean;
11872
+ send_email_at_contract_near_expiry?: boolean;
11873
+ send_email_at_contract_installment_due?: boolean;
11874
+ send_email_at_contract_installment_near_due?: boolean;
11875
+ contract_near_expiry_days?: number;
11876
+ contract_installment_near_due_days?: number;
11877
+ workorder_near_due_days?: number;
11878
+ };
11879
+ notifications?: {
11880
+ calendar_update: boolean;
11881
+ transfer_update: boolean;
11882
+ cycle_update: boolean;
11883
+ client_update: boolean;
11884
+ approval_request_update: boolean;
11885
+ workorder_update: boolean;
11886
+ workorder_start: boolean;
11887
+ workorder_near_due: boolean;
11888
+ activity_note: boolean;
11889
+ activity_form: boolean;
11890
+ activity_photo: boolean;
11891
+ activity_audit: boolean;
11892
+ activity_task: boolean;
11893
+ activity_availability: boolean;
11894
+ activity_planogram: boolean;
11895
+ activity_shelfsahre: boolean;
11896
+ activity_checkout_display: boolean;
11897
+ activity_secondary_display: boolean;
11898
+ };
11899
+ asset_part?: { prevent_negative_asset_part_inventory: boolean };
11900
+ default_lang?: "en" | "ar";
11901
+ second_lang?: "en" | "ar";
11902
+ report_value_delimiter?: "|" | "," | " " | "." | "-";
11903
+ rep_settings?: {
11904
+ rep_start_day_specific_time_frame_start: string;
11905
+ rep_start_day_specific_time_frame_end: string;
11906
+ };
11907
+ rep_permissions?: {
11908
+ rep_must_start_day_within_specific_time_frame: boolean;
11909
+ };
11910
+ }
11911
+
11912
+ export namespace Update {
11913
+ export type ID = StringId;
11914
+ export type Body = UpdateBody;
11915
+ export type Result = Data;
11916
+ }
11917
+ }
11035
11918
  }
11036
11919
 
11037
11920
  export type StringId = string;