repzo 1.0.151 → 1.0.153

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.
@@ -17,13 +17,6 @@ export interface Headers {
17
17
  Accept: string;
18
18
  [key: string]: string;
19
19
  }
20
- interface ActivityComment {
21
- time: number;
22
- user_name: string;
23
- user_id: string;
24
- user_type: string;
25
- comment: string;
26
- }
27
20
  interface AdminCreator {
28
21
  _id: string;
29
22
  type: "admin";
@@ -200,6 +193,7 @@ export type WorkorderStatus = "open" | "done" | "cancelled" | "inprogress" | "on
200
193
  export type Priority_human = "none" | "low" | "medium" | "high";
201
194
  export type Day = "Sun" | "Mon" | "Tue" | "Wed" | "Thu" | "Fri" | "Sat" | string;
202
195
  export type FieldType = "Text" | "String" | "Date" | "Image" | "Boolean" | "Number" | "List" | "Separator" | "Heading" | "Media";
196
+ export type Method = "find" | "get" | "create" | "update" | "patch" | "remove";
203
197
  export interface WeeklyDetails {
204
198
  every: number;
205
199
  days: Day[];
@@ -238,6 +232,7 @@ export interface CalendarWeeklyGroup {
238
232
  export type Model = "quickConvertToPdf" | "warehouses" | "transfers" | "transactions" | "taxes" | "productvariations" | "products" | "pricelistsitems" | "pricelists" | "payments" | "ledger_payments" | "mslsales" | "mslproducts" | "measureunits" | "measureunitfamilies" | "invoicesitems" | "invoices" | "ledger_goods" | "fullinvoices" | "checks" | "clients" | "activities" | "bigReports" | "admins";
239
233
  export type DocumentTypes = "form" | "quickConvertToPdf" | "clients" | "asset" | "assetUnit" | "workorder" | "clientLocation" | "clientContact" | "commentsThread" | "workorderRequest" | "workorderPortal" | "invoice" | "products" | "productvariations" | "representatives" | "productcategories" | "productSubCategory" | "speciality" | "line" | "banner" | "intgAvailableApps" | "availability_msl" | "reminders" | "audits" | "availability" | "photos" | "planogram" | "tasks" | "checks" | "notificationsCenter" | "admins" | "settings" | "printWorkorderPortalLink" | "bulkExport" | "generateRule" | "scheduleEmail" | "custom-list-item" | "days" | "bulkImport" | "sv.activitiesstorechecks" | "retailExecutionPreset" | "paymentMethod" | "approvalRequest" | "activityFormV2Result" | "formV2" | "payments" | "ocrInvoiceJob" | "contract" | "contractInstallment" | "form" | "paymentMethod" | "aiObjectDetectionModelVersion" | "aiObjectDetectionTask" | "assetPart" | "assetPartReceival" | "assetPartUnit" | "returnAssetPartUnit" | "storeAssetPartUnit" | "activityAiSalesOrder" | "ocrInvoiceJobGroup";
240
234
  export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
235
+ type Granularity = "Year" | "Year Month" | "Year Week" | "Month" | "Year Month Day" | "Year Month Day Time" | "Year Month Day Time Offset";
241
236
  export interface MediaDoc {
242
237
  _id?: string;
243
238
  media_id: string;
@@ -398,6 +393,7 @@ export declare namespace Service {
398
393
  updatedAt: string;
399
394
  __v: number;
400
395
  }
396
+ export type Data = ClientSchema;
401
397
  export interface CreateBody {
402
398
  name?: string;
403
399
  local_name?: string;
@@ -2684,7 +2680,7 @@ export declare namespace Service {
2684
2680
  populatedKeys?: PopulatedKeys[];
2685
2681
  withProductLines?: boolean;
2686
2682
  }
2687
- type Result = RepSchema;
2683
+ type Result = RepWithPopulatedKeysSchema;
2688
2684
  }
2689
2685
  export namespace Create {
2690
2686
  interface Body extends RepBody {
@@ -3586,6 +3582,7 @@ export declare namespace Service {
3586
3582
  createdAt: string;
3587
3583
  updatedAt: string;
3588
3584
  }
3585
+ export type Data = CustomListSchema;
3589
3586
  export interface CreateBody {
3590
3587
  code: string;
3591
3588
  name: string;
@@ -4219,6 +4216,7 @@ export declare namespace Service {
4219
4216
  createdAt: Date;
4220
4217
  updatedAt: Date;
4221
4218
  }
4219
+ export type Data = VisitSchema;
4222
4220
  export interface CreateBody {
4223
4221
  geoPoint: {
4224
4222
  type: "Point";
@@ -4750,6 +4748,7 @@ export declare namespace Service {
4750
4748
  createdAt: Date;
4751
4749
  updatedAt: Date;
4752
4750
  }
4751
+ export type Data = WorkorderSchema;
4753
4752
  export interface PopulatedData {
4754
4753
  _id: StringId;
4755
4754
  name: string;
@@ -5709,6 +5708,7 @@ export declare namespace Service {
5709
5708
  device_id?: string;
5710
5709
  device_unique_id?: string;
5711
5710
  }
5711
+ export type Data = InvoiceSchema;
5712
5712
  export interface CreateBody {
5713
5713
  items?: Item.Body[];
5714
5714
  return_items?: Item.Body[];
@@ -6478,6 +6478,7 @@ export declare namespace Service {
6478
6478
  updatedAt: string;
6479
6479
  __v: number;
6480
6480
  }
6481
+ export type Data = ProformaSchema;
6481
6482
  export interface CreateBody {
6482
6483
  items: Item.Schema[];
6483
6484
  return_items?: Item.Schema[];
@@ -6971,6 +6972,7 @@ export declare namespace Service {
6971
6972
  ending_balance?: number;
6972
6973
  __v: number;
6973
6974
  }
6975
+ export type Data = PaymentSchema;
6974
6976
  export interface CreateBody {
6975
6977
  amount: number;
6976
6978
  client_id: string;
@@ -7122,6 +7124,7 @@ export declare namespace Service {
7122
7124
  updatedAt: string;
7123
7125
  __v: number;
7124
7126
  }
7127
+ export type Data = RefundSchema;
7125
7128
  export interface CreateBody {
7126
7129
  amount: number;
7127
7130
  client_id: string;
@@ -7254,9 +7257,11 @@ export declare namespace Service {
7254
7257
  company_namespace: string[];
7255
7258
  sync_id: string;
7256
7259
  transaction_processed: boolean;
7260
+ media?: StringId[];
7257
7261
  createdAt: Date;
7258
7262
  updatedAt: Date;
7259
7263
  }
7264
+ export type Data = SettlementSchema;
7260
7265
  export interface CreateBody {
7261
7266
  amount: number;
7262
7267
  time?: number;
@@ -7283,12 +7288,14 @@ export declare namespace Service {
7283
7288
  company_namespace: string[];
7284
7289
  sync_id: string;
7285
7290
  transaction_processed: boolean;
7291
+ media?: StringId[];
7286
7292
  }
7287
7293
  type SettlementSchemaWithPopulatedKeys = SettlementSchema & {
7288
7294
  teams_populated?: string[] | Team.TeamSchema[];
7289
7295
  check_populated?: string | Check.CheckSchema;
7296
+ media_populated?: StringId[] | MediaPopulated[];
7290
7297
  };
7291
- type PopulatedKeys = "teams" | "check_id";
7298
+ type PopulatedKeys = "teams" | "check_id" | "media";
7292
7299
  export namespace Find {
7293
7300
  type Params = DefaultPaginationQueryParams & {
7294
7301
  _id?: StringId[] | StringId;
@@ -7682,6 +7689,7 @@ export declare namespace Service {
7682
7689
  createdAt: string;
7683
7690
  updatedAt: string;
7684
7691
  }
7692
+ type Data = ReceivingMaterialSchema;
7685
7693
  interface CreateBody {
7686
7694
  from: string;
7687
7695
  to: string;
@@ -8051,6 +8059,7 @@ export declare namespace Service {
8051
8059
  updatedAt: string;
8052
8060
  __v: number;
8053
8061
  }
8062
+ export type Data = Schema;
8054
8063
  export {};
8055
8064
  }
8056
8065
  namespace Transfer {
@@ -8093,6 +8102,7 @@ export declare namespace Service {
8093
8102
  updatedAt: string;
8094
8103
  __v: number;
8095
8104
  }
8105
+ export type Data = Schema;
8096
8106
  export interface CreateBody {
8097
8107
  serial_number?: SerialNumber;
8098
8108
  time: number;
@@ -13617,44 +13627,1328 @@ export declare namespace Service {
13617
13627
  }
13618
13628
  export {};
13619
13629
  }
13620
- }
13621
- export type StringId = string;
13622
- export type NameSpaces = string[];
13623
- export interface Admin {
13624
- _id: StringId;
13625
- name?: string;
13626
- type: "admin";
13627
- admin?: StringId;
13628
- }
13629
- export interface Rep {
13630
- _id: StringId;
13631
- name?: string;
13632
- type: "rep";
13633
- rep?: StringId;
13634
- }
13635
- export interface AdminOrRep {
13636
- _id: StringId;
13637
- name?: string;
13638
- type: "admin" | "rep";
13639
- admin?: StringId;
13640
- rep?: StringId;
13641
- }
13642
- export interface AdminOrRepOrTenant {
13643
- _id: StringId;
13644
- type: "admin" | "rep" | "tenant";
13645
- name?: string;
13646
- admin?: StringId;
13647
- rep?: StringId;
13648
- tenant?: StringId;
13649
- }
13650
- interface ValidityCheck {
13651
- valid: boolean;
13652
- reasons: {
13653
- message: string;
13654
- code: string;
13655
- }[];
13656
- }
13657
- type PopulatedMediaStorage = Pick<Service.MediaStorage.MediaStorageSchema, "_id" | "createdAt" | "ContentType" | "media_type" | "mime_type" | "publicUrl" | "type_name" | "file_name" | "media_id" | "thumbnails" | "createdAt"> & {
13658
- thumbnails: Pick<Service.MediaStorage.Thumbnail, "_id" | "ContentType" | "mime_type" | "publicUrl" | "type_name" | "file_name" | "createdAt">[];
13659
- };
13630
+ namespace ActivityPhoto {
13631
+ interface Data {
13632
+ _id: string;
13633
+ photo?: string;
13634
+ media: string[];
13635
+ caption?: string;
13636
+ photo_meta: {
13637
+ device_orientation?: 1 | 2 | 3 | 4;
13638
+ height?: 1 | 2 | 3 | 4;
13639
+ width?: 1 | 2 | 3 | 4;
13640
+ };
13641
+ geo_tag: GeoTag;
13642
+ time: number;
13643
+ tags?: string[];
13644
+ visit_id: string;
13645
+ user: string;
13646
+ client: string;
13647
+ visit?: string;
13648
+ client_name: string;
13649
+ user_name: string;
13650
+ sync_id: string;
13651
+ route?: string;
13652
+ platform?: string;
13653
+ version_name?: string;
13654
+ battery_level?: number;
13655
+ device_brand?: string;
13656
+ device_os?: string;
13657
+ device_os_version?: string;
13658
+ device_model?: string;
13659
+ time_zone?: string;
13660
+ identifier?: number;
13661
+ device_id?: string;
13662
+ device_unique_id?: string;
13663
+ teams?: string[];
13664
+ reviewed_by: ActivityReview[];
13665
+ network_state?: number;
13666
+ admin_notes: ActivityAdminNote[];
13667
+ comments: ActivityComment[];
13668
+ company_namespace: string[];
13669
+ job_start_time?: number;
13670
+ job_end_time?: number;
13671
+ job_duration?: number;
13672
+ createdAt: string;
13673
+ updatedAt: string;
13674
+ }
13675
+ }
13676
+ namespace ActivityNote {
13677
+ interface Data {
13678
+ _id: string;
13679
+ content: string;
13680
+ geo_tag: GeoTag;
13681
+ time: number;
13682
+ tags?: string[];
13683
+ visit_id: string;
13684
+ user: string;
13685
+ client: string;
13686
+ visit?: string;
13687
+ client_name: string;
13688
+ user_name: string;
13689
+ sync_id: string;
13690
+ route?: string;
13691
+ platform?: string;
13692
+ version_name?: string;
13693
+ battery_level?: number;
13694
+ device_brand?: string;
13695
+ device_os?: string;
13696
+ device_os_version?: string;
13697
+ device_model?: string;
13698
+ time_zone?: string;
13699
+ identifier?: number;
13700
+ device_id?: string;
13701
+ device_unique_id?: string;
13702
+ teams?: string[];
13703
+ reviewed_by: ActivityReview[];
13704
+ network_state?: number;
13705
+ admin_notes: ActivityAdminNote[];
13706
+ comments: ActivityComment[];
13707
+ company_namespace: string[];
13708
+ job_start_time?: number;
13709
+ job_end_time?: number;
13710
+ job_duration?: number;
13711
+ createdAt: string;
13712
+ updatedAt: string;
13713
+ }
13714
+ }
13715
+ namespace ActivityTask {
13716
+ interface Data {
13717
+ _id: string;
13718
+ start_photo?: string;
13719
+ end_photo?: string;
13720
+ start_media?: string[];
13721
+ end_media?: string[];
13722
+ caption?: string;
13723
+ start_photo_meta?: {
13724
+ device_orientation?: 1 | 2 | 3 | 4;
13725
+ height?: 1 | 2 | 3 | 4;
13726
+ width?: 1 | 2 | 3 | 4;
13727
+ };
13728
+ end_photo_meta?: {
13729
+ device_orientation?: 1 | 2 | 3 | 4;
13730
+ height?: 1 | 2 | 3 | 4;
13731
+ width?: 1 | 2 | 3 | 4;
13732
+ };
13733
+ start_time: number;
13734
+ end_time: number;
13735
+ total_time?: string;
13736
+ geo_tag: GeoTag;
13737
+ time: number;
13738
+ tags?: string[];
13739
+ visit_id: string;
13740
+ user: string;
13741
+ client: string;
13742
+ visit?: string;
13743
+ client_name: string;
13744
+ user_name: string;
13745
+ sync_id: string;
13746
+ route?: string;
13747
+ platform?: string;
13748
+ version_name?: string;
13749
+ battery_level?: number;
13750
+ device_brand?: string;
13751
+ device_os?: string;
13752
+ device_os_version?: string;
13753
+ device_model?: string;
13754
+ time_zone?: string;
13755
+ identifier?: number;
13756
+ device_id?: string;
13757
+ device_unique_id?: string;
13758
+ teams?: string[];
13759
+ reviewed_by: ActivityReview[];
13760
+ network_state?: number;
13761
+ admin_notes: ActivityAdminNote[];
13762
+ comments: ActivityComment[];
13763
+ company_namespace: string[];
13764
+ job_start_time?: number;
13765
+ job_end_time?: number;
13766
+ job_duration?: number;
13767
+ createdAt: string;
13768
+ updatedAt: string;
13769
+ }
13770
+ }
13771
+ namespace ActivityAudit {
13772
+ interface Inventory {
13773
+ store_qun?: number;
13774
+ shelf_qun?: number;
13775
+ shelf_price?: number;
13776
+ exp_date: number;
13777
+ photo?: string;
13778
+ media?: string[];
13779
+ caption?: string;
13780
+ photo_meta?: {
13781
+ device_orientation?: 1 | 2 | 3 | 4;
13782
+ height?: 1 | 2 | 3 | 4;
13783
+ width?: 1 | 2 | 3 | 4;
13784
+ };
13785
+ note?: string;
13786
+ }
13787
+ interface AuditItem {
13788
+ product_name: string;
13789
+ product_id: string;
13790
+ product_sub_category?: string;
13791
+ product_category?: string;
13792
+ productCategory?: string;
13793
+ productSubCategory?: string[];
13794
+ product_sku?: string;
13795
+ product_barcode?: string;
13796
+ audit_time: number;
13797
+ inventories: Inventory[];
13798
+ note?: string;
13799
+ }
13800
+ export interface Data {
13801
+ _id: string;
13802
+ geo_tag: GeoTag;
13803
+ time: number;
13804
+ tags?: string[];
13805
+ visit_id: string;
13806
+ user: string;
13807
+ client: string;
13808
+ visit?: string;
13809
+ client_name: string;
13810
+ user_name: string;
13811
+ sync_id: string;
13812
+ route?: string;
13813
+ platform?: string;
13814
+ version_name?: string;
13815
+ battery_level?: number;
13816
+ device_brand?: string;
13817
+ device_os?: string;
13818
+ device_os_version?: string;
13819
+ device_model?: string;
13820
+ time_zone?: string;
13821
+ identifier?: number;
13822
+ device_id?: string;
13823
+ device_unique_id?: string;
13824
+ teams?: string[];
13825
+ reviewed_by: ActivityReview[];
13826
+ network_state?: number;
13827
+ admin_notes: ActivityAdminNote[];
13828
+ comments: ActivityComment[];
13829
+ company_namespace: string[];
13830
+ job_start_time?: number;
13831
+ job_end_time?: number;
13832
+ job_duration?: number;
13833
+ audits: AuditItem[];
13834
+ createdAt: string;
13835
+ updatedAt: string;
13836
+ }
13837
+ export {};
13838
+ }
13839
+ namespace ActivityAvailability {
13840
+ interface Data {
13841
+ _id: string;
13842
+ geo_tag: GeoTag;
13843
+ time: number;
13844
+ tags?: string[];
13845
+ visit_id: string;
13846
+ user: string;
13847
+ client: string;
13848
+ visit?: string;
13849
+ client_name: string;
13850
+ user_name: string;
13851
+ sync_id: string;
13852
+ route?: string;
13853
+ platform?: string;
13854
+ version_name?: string;
13855
+ battery_level?: number;
13856
+ device_brand?: string;
13857
+ device_os?: string;
13858
+ device_os_version?: string;
13859
+ device_model?: string;
13860
+ time_zone?: string;
13861
+ identifier?: number;
13862
+ device_id?: string;
13863
+ device_unique_id?: string;
13864
+ teams?: string[];
13865
+ reviewed_by: ActivityReview[];
13866
+ network_state?: number;
13867
+ admin_notes: ActivityAdminNote[];
13868
+ comments: ActivityComment[];
13869
+ company_namespace: string[];
13870
+ job_start_time?: number;
13871
+ job_end_time?: number;
13872
+ job_duration?: number;
13873
+ msl_id: string;
13874
+ products_available: {
13875
+ product_id: string;
13876
+ available: boolean;
13877
+ }[];
13878
+ createdAt: string;
13879
+ updatedAt: string;
13880
+ }
13881
+ }
13882
+ namespace ActivityCheckoutDisplay {
13883
+ interface Data {
13884
+ _id: string;
13885
+ msl_id: string;
13886
+ checkout_count: number;
13887
+ geo_tag: GeoTag;
13888
+ time: number;
13889
+ tags?: string[];
13890
+ visit_id: string;
13891
+ user: string;
13892
+ client: string;
13893
+ visit?: string;
13894
+ client_name: string;
13895
+ user_name: string;
13896
+ sync_id: string;
13897
+ route?: string;
13898
+ platform?: string;
13899
+ version_name?: string;
13900
+ battery_level?: number;
13901
+ device_brand?: string;
13902
+ device_os?: string;
13903
+ device_os_version?: string;
13904
+ device_model?: string;
13905
+ time_zone?: string;
13906
+ identifier?: number;
13907
+ device_id?: string;
13908
+ device_unique_id?: string;
13909
+ teams?: string[];
13910
+ reviewed_by: ActivityReview[];
13911
+ network_state?: number;
13912
+ admin_notes: ActivityAdminNote[];
13913
+ comments: ActivityComment[];
13914
+ company_namespace: string[];
13915
+ job_start_time?: number;
13916
+ job_end_time?: number;
13917
+ job_duration?: number;
13918
+ createdAt: string;
13919
+ updatedAt: string;
13920
+ }
13921
+ }
13922
+ namespace ActivityFeedback {
13923
+ interface Data {
13924
+ _id: string;
13925
+ visit_id: string;
13926
+ visit_UUID: string;
13927
+ feed_back_option: string;
13928
+ route?: string;
13929
+ teams?: string[];
13930
+ company_namespace: string[];
13931
+ createdAt: string;
13932
+ updatedAt: string;
13933
+ }
13934
+ }
13935
+ namespace ActivityFormResult {
13936
+ interface Data {
13937
+ _id: string;
13938
+ serial_number?: SerialNumber;
13939
+ form_id: string;
13940
+ results: {
13941
+ [key: string]: any;
13942
+ };
13943
+ geo_tag: GeoTag;
13944
+ time: number;
13945
+ tags?: string[];
13946
+ visit_id: string;
13947
+ user: string;
13948
+ client: string;
13949
+ visit?: string;
13950
+ client_name: string;
13951
+ user_name: string;
13952
+ sync_id: string;
13953
+ route?: string;
13954
+ platform?: string;
13955
+ version_name?: string;
13956
+ battery_level?: number;
13957
+ device_brand?: string;
13958
+ device_os?: string;
13959
+ device_os_version?: string;
13960
+ device_model?: string;
13961
+ time_zone?: string;
13962
+ identifier?: number;
13963
+ device_id?: string;
13964
+ device_unique_id?: string;
13965
+ teams?: string[];
13966
+ reviewed_by: ActivityReview[];
13967
+ network_state?: number;
13968
+ admin_notes: ActivityAdminNote[];
13969
+ comments: ActivityComment[];
13970
+ company_namespace: string[];
13971
+ job_start_time?: number;
13972
+ job_end_time?: number;
13973
+ job_duration?: number;
13974
+ workorder?: string;
13975
+ asset?: string;
13976
+ asset_unit?: string;
13977
+ createdAt: string;
13978
+ updatedAt: string;
13979
+ }
13980
+ }
13981
+ namespace AvailableField {
13982
+ interface Data {
13983
+ patch_filter_key: string;
13984
+ patch_filter_slug: "activity-storecheck" | "client" | "variant" | "product" | "product-group" | "product-brand" | "product-category" | "product-sub-category" | "measureunits" | "rep" | "tag" | "client-channel" | "paymentterms" | "speciality" | "activity-form-v2-result" | "bi-bucket";
13985
+ code: string;
13986
+ formula_key?: string;
13987
+ field_type: "activity_attribute" | "source_attribute" | "template_field" | "calculated_field";
13988
+ data_type: "Separator" | "timestamp" | "String" | "Number" | "Boolean" | "Date" | "Image" | "coords" | "Text" | "Media" | "Heading" | "List" | "Phone" | "Email" | "Signature" | "DateTime" | "YesNo" | "ProductBarcodeScan" | "BarcodeScan" | "GeoPoint";
13989
+ key: string;
13990
+ field_id?: string;
13991
+ isArray: boolean;
13992
+ array_delimiter?: string;
13993
+ label: string;
13994
+ manipulator_function?: string;
13995
+ lookup?: {
13996
+ from: string;
13997
+ select: string;
13998
+ unwind: boolean;
13999
+ filter?: {
14000
+ as: string;
14001
+ cond: any;
14002
+ };
14003
+ };
14004
+ granularity?: Granularity;
14005
+ current_granularity?: Granularity;
14006
+ }
14007
+ }
14008
+ namespace FormV2 {
14009
+ interface Visibility {
14010
+ operator: "and" | "or";
14011
+ conditions: {
14012
+ division_id: string;
14013
+ field_id: string;
14014
+ type: "Boolean" | "List" | "YesNo";
14015
+ custom_list?: string | CustomList.Data;
14016
+ operator: "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin";
14017
+ value: any[];
14018
+ }[];
14019
+ }
14020
+ export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
14021
+ export type FormV2FieldType = (typeof fieldType_enums)[number];
14022
+ interface FieldPrintSettings {
14023
+ three_inch: {
14024
+ grid_column?: 1 | 2;
14025
+ alignment?: "right" | "left" | "center";
14026
+ border_width?: number;
14027
+ label_font_size?: number;
14028
+ value_font_size?: number;
14029
+ media_height?: number | string;
14030
+ media_width?: number | string;
14031
+ align_media?: "right" | "left" | "center";
14032
+ label_value_spacing?: number;
14033
+ is_hidden?: boolean;
14034
+ };
14035
+ }
14036
+ interface UsedField {
14037
+ code: string;
14038
+ key: string;
14039
+ data_type: AvailableField.Data["data_type"];
14040
+ field_type: "template_field" | "source_attribute" | "activity_attribute";
14041
+ label: string;
14042
+ isArray?: boolean;
14043
+ formula_key: string;
14044
+ field_id?: string;
14045
+ example_value: AvailableField.Data["data_type"];
14046
+ manipulator_function?: string;
14047
+ lookup?: {
14048
+ from?: string;
14049
+ localField?: string;
14050
+ foreignField?: string;
14051
+ as?: string;
14052
+ select?: string;
14053
+ unwind?: boolean;
14054
+ filter?: {
14055
+ input?: string;
14056
+ as: string;
14057
+ cond: any;
14058
+ };
14059
+ };
14060
+ }
14061
+ export interface Field {
14062
+ _id?: string;
14063
+ name: string;
14064
+ local_name?: string;
14065
+ description?: string;
14066
+ local_description?: string;
14067
+ type: FormV2FieldType;
14068
+ isArray?: boolean;
14069
+ isRequired?: boolean;
14070
+ disabled?: boolean;
14071
+ formula_key?: string;
14072
+ scoring_enabled?: boolean;
14073
+ required_for_completion?: boolean;
14074
+ visibility?: Visibility;
14075
+ default_value?: any[];
14076
+ custom_list?: string | CustomList.Data;
14077
+ is_na_allowed?: boolean;
14078
+ score_accumulator_type?: "max" | "sum";
14079
+ yes_score?: number;
14080
+ no_score?: number;
14081
+ na_score?: number;
14082
+ exist_score?: number;
14083
+ media?: (string | MediaDoc)[];
14084
+ invisible: boolean;
14085
+ parent_field?: string;
14086
+ custom_list_element?: string;
14087
+ force_live_photo?: boolean;
14088
+ min?: number;
14089
+ max?: number;
14090
+ is_integer?: boolean;
14091
+ styles?: "check_list" | "toggle_yes_no_na" | "toggle_yes_no" | "buttons";
14092
+ field_print_settings?: FieldPrintSettings;
14093
+ is_calculated_field?: boolean;
14094
+ formula?: string;
14095
+ used_fields?: UsedField[];
14096
+ }
14097
+ interface Division {
14098
+ _id: string;
14099
+ name: string;
14100
+ local_name?: string;
14101
+ description?: string;
14102
+ local_description?: string;
14103
+ disabled?: boolean;
14104
+ min_questions_to_answer_for_completion?: number;
14105
+ min_score_for_completion?: number;
14106
+ visibility?: Visibility;
14107
+ fields: Field[];
14108
+ }
14109
+ interface PrintSettings {
14110
+ three_inch: {
14111
+ grid_columns?: 1 | 2;
14112
+ logo_height?: number | string;
14113
+ logo_width?: number | string;
14114
+ align_logo?: "right" | "left" | "center";
14115
+ space_y?: number;
14116
+ };
14117
+ A_four: {
14118
+ banner_media?: string;
14119
+ banner_height: number;
14120
+ banner_width: number;
14121
+ align_banner: "right" | "left" | "center";
14122
+ header_label_font_size: number;
14123
+ header_value_font_size: number;
14124
+ align_header: "right" | "left" | "center";
14125
+ division_name_font_size: number;
14126
+ align_division: "right" | "left" | "center";
14127
+ grid_columns: 1 | 2 | 3 | 4;
14128
+ space_y: number;
14129
+ field_label_size: number;
14130
+ field_value_size: number;
14131
+ footer_media?: string;
14132
+ align_footer_media: "right" | "left" | "center";
14133
+ footer_media_height: number;
14134
+ footer_media_width: number;
14135
+ footer_details: string;
14136
+ align_footer_details: "right" | "left" | "center";
14137
+ compressed_media_size: "original" | "small" | "medium" | "large" | "extra";
14138
+ view_custom_list_element: boolean;
14139
+ };
14140
+ }
14141
+ export interface Data {
14142
+ _id: string;
14143
+ disabled: boolean;
14144
+ name: string;
14145
+ local_name?: string;
14146
+ description?: string;
14147
+ local_description?: string;
14148
+ copied_from?: string;
14149
+ scoring_enabled?: boolean;
14150
+ completion_rules_enabled?: boolean;
14151
+ min_questions_to_answer_for_completion?: number;
14152
+ min_score_for_completion?: number;
14153
+ divisions: Division[];
14154
+ company_namespace: string[];
14155
+ print_settings?: PrintSettings;
14156
+ createdAt: Date;
14157
+ updatedAt: Date;
14158
+ }
14159
+ export {};
14160
+ }
14161
+ namespace ActivityFormV2Result {
14162
+ const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
14163
+ type FormV2FieldType = (typeof fieldType_enums)[number];
14164
+ interface FieldResult {
14165
+ _id?: string;
14166
+ field_id: string;
14167
+ name: string;
14168
+ type: FormV2FieldType;
14169
+ isArray?: boolean;
14170
+ isRequired?: boolean;
14171
+ custom_list?: string;
14172
+ formula_key?: string;
14173
+ is_calculated_field?: boolean;
14174
+ calculation_status?: "success" | "failed";
14175
+ calculation_error?: any[];
14176
+ score?: number;
14177
+ is_completed?: boolean;
14178
+ result: string[] | number[] | ["yes"] | ["no"] | ["na"] | [] | {
14179
+ coordinates: [number, number];
14180
+ type: "Point";
14181
+ }[] | {
14182
+ _id: string;
14183
+ value: string | number;
14184
+ type: "Number" | "String";
14185
+ score?: number;
14186
+ }[];
14187
+ }
14188
+ interface DivisionResult {
14189
+ _id: string;
14190
+ division_id: string;
14191
+ name: string;
14192
+ score?: number;
14193
+ is_completed?: boolean;
14194
+ fields: FieldResult[];
14195
+ }
14196
+ export interface Data {
14197
+ _id: string;
14198
+ creator: AdminOrRepOrTenantOrClient;
14199
+ editor?: AdminOrRepOrTenantOrClient;
14200
+ serial_number: SerialNumber;
14201
+ teams: string[];
14202
+ tags: string[];
14203
+ time: number;
14204
+ client?: string;
14205
+ client_name?: string;
14206
+ visit?: string;
14207
+ visit_id?: string;
14208
+ route?: string;
14209
+ workorder?: string;
14210
+ sync_id: string;
14211
+ geo_tag?: GeoTag;
14212
+ geoPoint?: GeoPoint;
14213
+ platform?: string;
14214
+ version_name?: string;
14215
+ battery_level?: number;
14216
+ device_brand?: string;
14217
+ device_os?: string;
14218
+ device_os_version?: string;
14219
+ device_model?: string;
14220
+ identifier?: number;
14221
+ device_id?: string;
14222
+ device_unique_id?: string;
14223
+ network_state?: number;
14224
+ time_zone?: string;
14225
+ job_start_time?: number;
14226
+ job_end_time?: number;
14227
+ job_duration?: number;
14228
+ form_id: string;
14229
+ results: DivisionResult[];
14230
+ score?: number;
14231
+ is_completed: boolean;
14232
+ company_namespace: string[];
14233
+ createdAt: Date;
14234
+ updatedAt: Date;
14235
+ }
14236
+ export {};
14237
+ }
14238
+ namespace ActivityItemStatus {
14239
+ type ItemStatus = "current_user" | "non_user" | "generic_user" | "competitor_user" | "other";
14240
+ interface Item {
14241
+ product: string;
14242
+ product_name: string;
14243
+ status: ItemStatus;
14244
+ item_status_type?: string;
14245
+ feedback?: string;
14246
+ note?: string;
14247
+ feedback_current_user?: number;
14248
+ previous_status?: ItemStatus;
14249
+ previous_status_id?: string;
14250
+ previous_user?: string;
14251
+ previous_user_name?: string;
14252
+ previous_time?: number;
14253
+ }
14254
+ export interface Data {
14255
+ _id: string;
14256
+ items: Item[];
14257
+ geoPoint: GeoPoint;
14258
+ time: number;
14259
+ tags?: string[];
14260
+ visit_id: string;
14261
+ user: string;
14262
+ client: string;
14263
+ visit?: string;
14264
+ client_name: string;
14265
+ user_name: string;
14266
+ sync_id: string;
14267
+ route?: string;
14268
+ platform?: string;
14269
+ version_name?: string;
14270
+ battery_level?: number;
14271
+ device_brand?: string;
14272
+ device_os?: string;
14273
+ device_os_version?: string;
14274
+ device_model?: string;
14275
+ time_zone?: string;
14276
+ identifier?: number;
14277
+ device_id?: string;
14278
+ device_unique_id?: string;
14279
+ teams?: string[];
14280
+ reviewed_by: ActivityReview[];
14281
+ network_state?: number;
14282
+ admin_notes: ActivityAdminNote[];
14283
+ comments: ActivityComment[];
14284
+ company_namespace: string[];
14285
+ job_start_time?: number;
14286
+ job_end_time?: number;
14287
+ job_duration?: number;
14288
+ createdAt: string;
14289
+ updatedAt: string;
14290
+ }
14291
+ export {};
14292
+ }
14293
+ namespace ActivityPlanogram {
14294
+ interface Data {
14295
+ _id: string;
14296
+ msl_id: string;
14297
+ media?: string[];
14298
+ actual_planogram_imgs?: string[];
14299
+ does_planogram_comply: boolean;
14300
+ planogram_reason?: string;
14301
+ geo_tag: GeoTag;
14302
+ time: number;
14303
+ tags?: string[];
14304
+ visit_id: string;
14305
+ user: string;
14306
+ client: string;
14307
+ visit?: string;
14308
+ client_name: string;
14309
+ user_name: string;
14310
+ sync_id: string;
14311
+ route?: string;
14312
+ platform?: string;
14313
+ version_name?: string;
14314
+ battery_level?: number;
14315
+ device_brand?: string;
14316
+ device_os?: string;
14317
+ device_os_version?: string;
14318
+ device_model?: string;
14319
+ time_zone?: string;
14320
+ identifier?: number;
14321
+ device_id?: string;
14322
+ device_unique_id?: string;
14323
+ teams?: string[];
14324
+ reviewed_by: ActivityReview[];
14325
+ network_state?: number;
14326
+ admin_notes: ActivityAdminNote[];
14327
+ comments: ActivityComment[];
14328
+ company_namespace: string[];
14329
+ job_start_time?: number;
14330
+ job_end_time?: number;
14331
+ job_duration?: number;
14332
+ createdAt: string;
14333
+ updatedAt: string;
14334
+ }
14335
+ }
14336
+ namespace ActivitySecondaryDisplay {
14337
+ interface Data {
14338
+ _id: string;
14339
+ secondary_count: number;
14340
+ msl_id: string;
14341
+ geo_tag: GeoTag;
14342
+ time: number;
14343
+ tags?: string[];
14344
+ visit_id: string;
14345
+ user: string;
14346
+ client: string;
14347
+ visit?: string;
14348
+ client_name: string;
14349
+ user_name: string;
14350
+ sync_id: string;
14351
+ route?: string;
14352
+ platform?: string;
14353
+ version_name?: string;
14354
+ battery_level?: number;
14355
+ device_brand?: string;
14356
+ device_os?: string;
14357
+ device_os_version?: string;
14358
+ device_model?: string;
14359
+ time_zone?: string;
14360
+ identifier?: number;
14361
+ device_id?: string;
14362
+ device_unique_id?: string;
14363
+ teams?: string[];
14364
+ reviewed_by: ActivityReview[];
14365
+ network_state?: number;
14366
+ admin_notes: ActivityAdminNote[];
14367
+ comments: ActivityComment[];
14368
+ company_namespace: string[];
14369
+ job_start_time?: number;
14370
+ job_end_time?: number;
14371
+ job_duration?: number;
14372
+ createdAt: string;
14373
+ updatedAt: string;
14374
+ }
14375
+ }
14376
+ namespace ActivityShelfshare {
14377
+ interface Data {
14378
+ _id: string;
14379
+ msl_length: number;
14380
+ total_msl_length: number;
14381
+ msl_id: string;
14382
+ geo_tag: GeoTag;
14383
+ time: number;
14384
+ tags?: string[];
14385
+ visit_id: string;
14386
+ user: string;
14387
+ client: string;
14388
+ visit?: string;
14389
+ client_name: string;
14390
+ user_name: string;
14391
+ sync_id: string;
14392
+ route?: string;
14393
+ platform?: string;
14394
+ version_name?: string;
14395
+ battery_level?: number;
14396
+ device_brand?: string;
14397
+ device_os?: string;
14398
+ device_os_version?: string;
14399
+ device_model?: string;
14400
+ time_zone?: string;
14401
+ identifier?: number;
14402
+ device_id?: string;
14403
+ device_unique_id?: string;
14404
+ teams?: string[];
14405
+ reviewed_by: ActivityReview[];
14406
+ network_state?: number;
14407
+ admin_notes: ActivityAdminNote[];
14408
+ comments: ActivityComment[];
14409
+ company_namespace: string[];
14410
+ job_start_time?: number;
14411
+ job_end_time?: number;
14412
+ job_duration?: number;
14413
+ createdAt: string;
14414
+ updatedAt: string;
14415
+ }
14416
+ }
14417
+ namespace ActivityStorecheck {
14418
+ type FieldType = "Text" | "String" | "Date" | "Image" | "Boolean" | "Number" | "List" | "Separator" | "Heading" | "Media";
14419
+ type Source = "product" | "variant" | "product-category" | "product-sub-category" | "product-brand" | "product-group";
14420
+ interface GeoTag {
14421
+ lat?: number;
14422
+ lng?: number;
14423
+ formatted_address?: string;
14424
+ }
14425
+ interface GeoPoint {
14426
+ type: "Point";
14427
+ coordinates: [number, number];
14428
+ }
14429
+ interface Entry {
14430
+ entry_id: string;
14431
+ source: Source;
14432
+ results: Result[];
14433
+ }
14434
+ interface Result {
14435
+ source_id: string;
14436
+ source_name: string;
14437
+ divisions: Division[];
14438
+ }
14439
+ interface Division {
14440
+ fields: Field[];
14441
+ }
14442
+ interface Field {
14443
+ _id?: string;
14444
+ name: string;
14445
+ type: FieldType;
14446
+ isArray: boolean;
14447
+ isRequired?: boolean;
14448
+ is_calculated_field?: boolean;
14449
+ formula_key?: string;
14450
+ parent_field?: string;
14451
+ custom_list?: string | CustomList.Data | StringId;
14452
+ field_id: string | StringId;
14453
+ result: any[];
14454
+ result_custom_list_ids?: any[];
14455
+ calculation_status?: "success" | "failed";
14456
+ calculation_error?: string | any[];
14457
+ company_namespace?: string[];
14458
+ }
14459
+ export interface Data {
14460
+ _id: string;
14461
+ company_namespace: string[];
14462
+ client: string;
14463
+ client_name: string;
14464
+ sync_id: string;
14465
+ time_zone: string;
14466
+ template_id: string;
14467
+ visit?: string;
14468
+ visit_id?: string;
14469
+ battery_level?: number;
14470
+ user: string;
14471
+ user_name: string;
14472
+ time: number;
14473
+ geo_tag?: GeoTag;
14474
+ geoPoint: GeoPoint;
14475
+ teams?: string[];
14476
+ route?: string;
14477
+ tags?: string[];
14478
+ entries: Entry[];
14479
+ platform?: string;
14480
+ version_name?: string;
14481
+ device_brand?: string;
14482
+ device_os?: string;
14483
+ device_os_version?: string;
14484
+ device_model?: string;
14485
+ identifier?: number;
14486
+ device_id?: string;
14487
+ device_unique_id?: string;
14488
+ network_state?: number;
14489
+ serial_number?: SerialNumber;
14490
+ job_start_time?: number;
14491
+ job_end_time?: number;
14492
+ job_duration?: number;
14493
+ createdAt: Date;
14494
+ updatedAt: Date;
14495
+ }
14496
+ export {};
14497
+ }
14498
+ namespace Reminder {
14499
+ interface Data {
14500
+ _id: string;
14501
+ name: string;
14502
+ creator: AdminOrRep;
14503
+ from: number;
14504
+ to: number;
14505
+ visibility: "reps" | "teams" | "public";
14506
+ clients: string[];
14507
+ reps: string[];
14508
+ teams: string[];
14509
+ content: string;
14510
+ disabled: boolean;
14511
+ photo?: string;
14512
+ cover_photo?: string;
14513
+ sync_id: string;
14514
+ company_namespace: string[];
14515
+ createdAt: Date;
14516
+ updatedAt: Date;
14517
+ }
14518
+ }
14519
+ namespace TimelineReport {
14520
+ export const activity_types: readonly ["client", "visit", "payment", "activity-photo", "activity-audit", "activity-availability", "activity-checkout-display", "activity-feedback", "activity-form-result", "activity-form-v2-result", "activity-item-status", "activity-note", "activity-planogram", "activity-secondary-display", "activity-shelfshare", "activity-storecheck", "activity-task", "approval-request", "asset-part-receival", "asset-part-transfer", "asset", "asset-part", "asset-unit", "reminders", "return-asset-part-unit", "store-asset-part-unit", "refund", "settlement", "convert-proforma", "transfer", "proforma", "receiving-material", "void-invoice", "fullinvoices", "workorder", "workorder-request", "return-whole-invoice", "cycle"];
14521
+ type ActivityType = (typeof activity_types)[number];
14522
+ export interface Data {
14523
+ _id: StringId;
14524
+ company_namespace: string[];
14525
+ activity_type: ActivityType;
14526
+ activity_id: StringId;
14527
+ time: number;
14528
+ business_day?: string;
14529
+ user: {
14530
+ _id: StringId;
14531
+ type: "admin" | "rep";
14532
+ name?: string;
14533
+ rep?: StringId;
14534
+ admin?: StringId;
14535
+ };
14536
+ action: Method;
14537
+ teams?: StringId[];
14538
+ visit_id?: string;
14539
+ sync_id?: string;
14540
+ client?: StringId;
14541
+ client_name?: string;
14542
+ geoPoint?: {
14543
+ coordinates: [number, number];
14544
+ type: "Point";
14545
+ };
14546
+ details: VisitDetails | PaymentDetails | RefundDetails | ActivityPhotoDetails | ActivityAuditDetails | ActivityNoteDetails | ActivityTaskDetails | ActivityAvailabilityDetails | ActivityCheckoutDisplayDetails | ActivityFeedbackDetails | ActivityFormResultDetails | ActivityFormV2ResultDetails | ActivityItemStatusDetails | ActivityPlanogramDetails | ActivitySecondaryDisplayDetails | ActivityShelfshareDetails | ActivityStorecheckDetails | ApprovalRequestDetails | AssetPartReceivalDetails | AssetPartTransferDetails | AssetDetails | AssetPartDetails | AssetUnitDetails | ReminderDetails | ReturnAssetPartUnitDetails | StoreAssetPartUnitDetails | SettlementDetails | ConvertProformaDetails | TransferDetails | ReceivingMaterialDetails | FullInvoiceDetails | ProformaDetails | WorkorderDetails | WorkorderRequestDetails | ReturnWholeInvoiceDetails | VoidInvoiceDetails | CycleDetails | ClientDetails;
14547
+ createdAt: Date;
14548
+ updatedAt: Date;
14549
+ }
14550
+ type VisitDetails = {
14551
+ activity_type: "visit";
14552
+ activities: (ActivityAuditVisitDetails | ActivityPhotoVisitDetails | ActivityAvailabilityVisitDetails | ActivityNoteVisitDetails | ActivityTaskVisitDetails | ActivityPlanogramVisitDetails | ActivityShelfshareVisitDetails | ActivitySecondaryDisplayVisitDetails | ActivityCheckoutDisplayVisitDetails | ActivityItemStatusVisitDetails | ActivityFormResultVisitDetails | ActivityFormV2ResultVisitDetails | ActivityStorecheckVisitDetails | ActivityFeedbackVisitDetails | ApprovalRequestVisitDetails | AssetPartReceivalVisitDetails | AssetPartTransferVisitDetails | ReturnAssetPartUnitVisitDetails | StoreAssetPartUnitVisitDetails | PaymentVisitDetails | RefundVisitDetails | ConvertProformaVisitDetails | SettlementVisitDetails | FullInvoiceVisitDetails | ProformaVisitDetails | ReturnWholeInvoiceVisitDetails | VoidInvoiceVisitDetails)[];
14553
+ } & Pick<Visit.Data, "closed_by_system" | "geoPoint" | "start_time" | "end_time" | "total_time" | "battery_level" | "version_name" | "device_brand">;
14554
+ type ActivityPhotoDetails = {
14555
+ activity_type: "activity-photo";
14556
+ } & Pick<ActivityPhoto.Data, "media">;
14557
+ type ActivityPhotoVisitDetails = {
14558
+ activity_type: "activity-photo";
14559
+ activity_id: StringId;
14560
+ } & Pick<ActivityPhoto.Data, "media" | "time">;
14561
+ type ActivityAuditDetails = {
14562
+ activity_type: "activity-audit";
14563
+ audits_length: number;
14564
+ };
14565
+ type ActivityAuditVisitDetails = {
14566
+ activity_type: "activity-audit";
14567
+ activity_id: StringId;
14568
+ audits_length: number;
14569
+ } & Pick<ActivityAudit.Data, "time">;
14570
+ type ActivityAvailabilityDetails = {
14571
+ activity_type: "activity-availability";
14572
+ products_available_length: number;
14573
+ msl_name: string;
14574
+ } & Pick<ActivityAvailability.Data, "msl_id">;
14575
+ type ActivityAvailabilityVisitDetails = {
14576
+ activity_type: "activity-availability";
14577
+ activity_id: StringId;
14578
+ products_available_length: number;
14579
+ msl_name: string;
14580
+ } & Pick<ActivityAvailability.Data, "time" | "msl_id">;
14581
+ type ActivityNoteDetails = {
14582
+ activity_type: "activity-note";
14583
+ } & Pick<ActivityNote.Data, "content">;
14584
+ type ActivityNoteVisitDetails = {
14585
+ activity_type: "activity-note";
14586
+ activity_id: StringId;
14587
+ } & Pick<ActivityNote.Data, "content" | "time">;
14588
+ type ActivityTaskDetails = {
14589
+ activity_type: "activity-task";
14590
+ } & Pick<ActivityTask.Data, "start_media" | "end_media">;
14591
+ type ActivityTaskVisitDetails = {
14592
+ activity_type: "activity-task";
14593
+ activity_id: StringId;
14594
+ } & Pick<ActivityTask.Data, "start_media" | "end_media" | "time">;
14595
+ type ActivityPlanogramDetails = {
14596
+ activity_type: "activity-planogram";
14597
+ msl_name: string;
14598
+ } & Pick<ActivityPlanogram.Data, "media" | "planogram_reason" | "msl_id">;
14599
+ type ActivityPlanogramVisitDetails = {
14600
+ activity_type: "activity-planogram";
14601
+ activity_id: StringId;
14602
+ msl_name: string;
14603
+ } & Pick<ActivityPlanogram.Data, "media" | "planogram_reason" | "time" | "msl_id">;
14604
+ type ActivityShelfshareDetails = {
14605
+ activity_type: "activity-shelfshare";
14606
+ msl_name: string;
14607
+ } & Pick<ActivityShelfshare.Data, "msl_length" | "total_msl_length" | "msl_id">;
14608
+ type ActivityShelfshareVisitDetails = {
14609
+ activity_type: "activity-shelfshare";
14610
+ activity_id: StringId;
14611
+ msl_name: string;
14612
+ } & Pick<ActivityShelfshare.Data, "msl_length" | "total_msl_length" | "time" | "msl_id">;
14613
+ type ActivitySecondaryDisplayDetails = {
14614
+ activity_type: "activity-secondary-display";
14615
+ msl_name: string;
14616
+ } & Pick<ActivitySecondaryDisplay.Data, "secondary_count" | "msl_id">;
14617
+ type ActivitySecondaryDisplayVisitDetails = {
14618
+ activity_type: "activity-secondary-display";
14619
+ activity_id: StringId;
14620
+ msl_name: string;
14621
+ } & Pick<ActivitySecondaryDisplay.Data, "secondary_count" | "time" | "msl_id">;
14622
+ type ActivityCheckoutDisplayDetails = {
14623
+ activity_type: "activity-checkout-display";
14624
+ msl_name: string;
14625
+ } & Pick<ActivityCheckoutDisplay.Data, "checkout_count" | "msl_id">;
14626
+ type ActivityCheckoutDisplayVisitDetails = {
14627
+ activity_type: "activity-checkout-display";
14628
+ activity_id: StringId;
14629
+ msl_name: string;
14630
+ } & Pick<ActivityCheckoutDisplay.Data, "checkout_count" | "time" | "msl_id">;
14631
+ type ActivityItemStatusDetails = {
14632
+ activity_type: "activity-item-status";
14633
+ items_length?: number;
14634
+ };
14635
+ type ActivityItemStatusVisitDetails = {
14636
+ activity_type: "activity-item-status";
14637
+ activity_id: StringId;
14638
+ items_length?: number;
14639
+ } & Pick<ActivityItemStatus.Data, "time">;
14640
+ type ActivityFormResultDetails = {
14641
+ activity_type: "activity-form-result";
14642
+ form_name?: string;
14643
+ } & Pick<ActivityFormResult.Data, "form_id">;
14644
+ type ActivityFormResultVisitDetails = {
14645
+ activity_type: "activity-form-result";
14646
+ activity_id: StringId;
14647
+ form_name?: string;
14648
+ } & Pick<ActivityFormResult.Data, "form_id" | "time">;
14649
+ type ActivityFormV2ResultDetails = {
14650
+ activity_type: "activity-form-v2-result";
14651
+ form_name?: string;
14652
+ } & Pick<ActivityFormV2Result.Data, "form_id" | "serial_number">;
14653
+ type ActivityFormV2ResultVisitDetails = {
14654
+ activity_type: "activity-form-v2-result";
14655
+ activity_id: StringId;
14656
+ form_name?: string;
14657
+ } & Pick<ActivityFormV2Result.Data, "form_id" | "serial_number" | "time">;
14658
+ type ActivityStorecheckDetails = {
14659
+ activity_type: "activity-storecheck";
14660
+ template_name?: string;
14661
+ } & Pick<ActivityStorecheck.Data, "template_id" | "serial_number">;
14662
+ type ActivityStorecheckVisitDetails = {
14663
+ activity_type: "activity-storecheck";
14664
+ activity_id: StringId;
14665
+ template_name?: string;
14666
+ } & Pick<ActivityStorecheck.Data, "template_id" | "serial_number" | "time">;
14667
+ type ActivityFeedbackDetails = {
14668
+ activity_type: "activity-feedback";
14669
+ feed_back_option_label?: string;
14670
+ } & Pick<ActivityFeedback.Data, "feed_back_option">;
14671
+ type ActivityFeedbackVisitDetails = {
14672
+ activity_type: "activity-feedback";
14673
+ activity_id: StringId;
14674
+ time?: number;
14675
+ feed_back_option_label?: string;
14676
+ } & Pick<ActivityFeedback.Data, "feed_back_option">;
14677
+ type ApprovalRequestDetails = {
14678
+ activity_type: "approval-request";
14679
+ } & Pick<ApprovalRequest.Data, "serial_number" | "type" | "subtype">;
14680
+ type ApprovalRequestVisitDetails = {
14681
+ activity_type: "approval-request";
14682
+ activity_id: StringId;
14683
+ } & Pick<ApprovalRequest.Data, "serial_number" | "type" | "subtype" | "time">;
14684
+ type ReminderDetails = {
14685
+ activity_type: "reminders";
14686
+ } & Pick<Reminder.Data, "content" | "cover_photo">;
14687
+ type AssetDetails = {
14688
+ activity_type: "asset";
14689
+ } & Pick<Asset.Data, "name">;
14690
+ type AssetUnitDetails = {
14691
+ activity_type: "asset-unit";
14692
+ } & Pick<AssetUnit.Data, "name">;
14693
+ type AssetPartDetails = {
14694
+ activity_type: "asset-part";
14695
+ } & Pick<AssetPart.Data, "name">;
14696
+ type AssetPartReceivalDetails = {
14697
+ activity_type: "asset-part-receival";
14698
+ } & Pick<AssetPartReceival.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_parts_count" | "total_asset_parts_qty">;
14699
+ type AssetPartReceivalVisitDetails = {
14700
+ activity_type: "asset-part-receival";
14701
+ activity_id: StringId;
14702
+ } & Pick<AssetPartReceival.Data, "serial_number" | "warehouse" | "warehouse_name" | "time" | "asset_parts_count" | "total_asset_parts_qty">;
14703
+ type AssetPartTransferDetails = {
14704
+ activity_type: "asset-part-transfer";
14705
+ } & Pick<AssetPartTransfer.Data, "serial_number" | "from" | "from_name" | "to" | "to_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
14706
+ type AssetPartTransferVisitDetails = {
14707
+ activity_type: "asset-part-transfer";
14708
+ activity_id: StringId;
14709
+ } & Pick<AssetPartTransfer.Data, "serial_number" | "from" | "from_name" | "to" | "to_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
14710
+ type ReturnAssetPartUnitDetails = {
14711
+ activity_type: "return-asset-part-unit";
14712
+ } & Pick<ReturnAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
14713
+ type ReturnAssetPartUnitVisitDetails = {
14714
+ activity_type: "return-asset-part-unit";
14715
+ activity_id: StringId;
14716
+ } & Pick<ReturnAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
14717
+ type StoreAssetPartUnitDetails = {
14718
+ activity_type: "store-asset-part-unit";
14719
+ } & Pick<StoreAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
14720
+ type StoreAssetPartUnitVisitDetails = {
14721
+ activity_type: "store-asset-part-unit";
14722
+ activity_id: StringId;
14723
+ } & Pick<StoreAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
14724
+ type PaymentDetails = {
14725
+ activity_type: "payment";
14726
+ } & Pick<Payment.Data, "amount" | "serial_number" | "paytime" | "currency" | "payment_type">;
14727
+ type PaymentVisitDetails = {
14728
+ activity_type: "payment";
14729
+ activity_id: StringId;
14730
+ } & Pick<Payment.Data, "amount" | "serial_number" | "currency" | "payment_type" | "time">;
14731
+ type RefundDetails = {
14732
+ activity_type: "refund";
14733
+ } & Pick<Refund.Data, "amount" | "serial_number" | "paytime" | "currency" | "transaction_type">;
14734
+ type RefundVisitDetails = {
14735
+ activity_type: "refund";
14736
+ activity_id: StringId;
14737
+ } & Pick<Refund.Data, "amount" | "serial_number" | "currency" | "transaction_type" | "time">;
14738
+ type SettlementDetails = {
14739
+ activity_type: "settlement";
14740
+ } & Pick<Settlement.Data, "amount" | "serial_number" | "paytime" | "origin" | "payment_type">;
14741
+ type SettlementVisitDetails = {
14742
+ activity_type: "settlement";
14743
+ activity_id: StringId;
14744
+ } & Pick<Settlement.Data, "amount" | "serial_number" | "origin" | "payment_type" | "time">;
14745
+ type ConvertProformaDetails = {
14746
+ activity_type: "convert-proforma";
14747
+ proforma_reference: FullInvoice.Data["proforma_reference"];
14748
+ proforma_serial_number: Proforma.Data["serial_number"];
14749
+ invoice_serial_number: FullInvoice.Data["serial_number"];
14750
+ };
14751
+ type ConvertProformaVisitDetails = {
14752
+ activity_type: "convert-proforma";
14753
+ activity_id: StringId;
14754
+ proforma_serial_number: Proforma.Data["serial_number"];
14755
+ invoice_serial_number: FullInvoice.Data["serial_number"];
14756
+ time: number;
14757
+ proforma_reference: FullInvoice.Data["proforma_reference"];
14758
+ };
14759
+ type TransferDetails = {
14760
+ activity_type: "transfer";
14761
+ from_name: string;
14762
+ to_name: string;
14763
+ } & Pick<Transfer.Data, "type" | "serial_number" | "from" | "to" | "items_count" | "comment">;
14764
+ type ReceivingMaterialDetails = {
14765
+ activity_type: "receiving-material";
14766
+ to_name: string;
14767
+ } & Pick<ReceivingMaterial.Data, "serial_number" | "to" | "items_count" | "comment">;
14768
+ type FullInvoiceDetails = {
14769
+ activity_type: "fullinvoices";
14770
+ } & Pick<FullInvoice.Data, "total" | "serial_number" | "currency" | "issue_date" | "due_date" | "external_serial_number">;
14771
+ type FullInvoiceVisitDetails = {
14772
+ activity_type: "fullinvoices";
14773
+ activity_id: StringId;
14774
+ } & Pick<FullInvoice.Data, "total" | "serial_number" | "currency" | "time" | "issue_date" | "due_date" | "external_serial_number">;
14775
+ type ProformaDetails = {
14776
+ activity_type: "proforma";
14777
+ } & Pick<Proforma.Data, "total" | "serial_number" | "currency" | "issue_date" | "external_serial_number">;
14778
+ type ProformaVisitDetails = {
14779
+ activity_type: "proforma";
14780
+ activity_id: StringId;
14781
+ } & Pick<Proforma.Data, "total" | "serial_number" | "currency" | "time" | "issue_date" | "external_serial_number">;
14782
+ type WorkorderDetails = {
14783
+ activity_type: "workorder";
14784
+ } & Pick<Workorder.Data, "name" | "serial_number" | "due_date">;
14785
+ type WorkorderRequestDetails = {
14786
+ activity_type: "workorder-request";
14787
+ } & Pick<WorkorderRequest.Data, "name">;
14788
+ type ReturnWholeInvoiceDetails = {
14789
+ activity_type: "return-whole-invoice";
14790
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
14791
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number">;
14792
+ type ReturnWholeInvoiceVisitDetails = {
14793
+ activity_type: "return-whole-invoice";
14794
+ activity_id: StringId;
14795
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
14796
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number" | "time">;
14797
+ type VoidInvoiceDetails = {
14798
+ activity_type: "void-invoice";
14799
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
14800
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number">;
14801
+ type VoidInvoiceVisitDetails = {
14802
+ activity_type: "void-invoice";
14803
+ activity_id: StringId;
14804
+ returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
14805
+ } & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number" | "time">;
14806
+ type CycleDetails = {
14807
+ activity_type: "cycle";
14808
+ stage_name?: string;
14809
+ } & Pick<Cycle.Data, "document_type" | "serial_number" | "document_id" | "status">;
14810
+ type ClientDetails = {
14811
+ activity_type: "client";
14812
+ } & Pick<Client.Data, "name" | "client_code" | "local_name">;
14813
+ export type PopulatedDoc = Data & {
14814
+ client_name?: string;
14815
+ client_code?: string;
14816
+ client_local_name?: string;
14817
+ client_customFields?: {
14818
+ [key: string]: any;
14819
+ };
14820
+ chain?: string;
14821
+ channel?: string;
14822
+ area_tags?: string[];
14823
+ client_tags?: string[];
14824
+ city?: string;
14825
+ state?: string;
14826
+ country?: string;
14827
+ rep_username?: string;
14828
+ rep_customFields: {
14829
+ [key: string]: any;
14830
+ };
14831
+ teams?: string[];
14832
+ };
14833
+ type SortingKeys = "_id";
14834
+ export namespace Find {
14835
+ type Params = DefaultPaginationQueryParams & {
14836
+ visit_mode?: boolean;
14837
+ admin?: StringId | StringId[];
14838
+ rep?: StringId | StringId[];
14839
+ sortBy?: {
14840
+ field: SortingKeys;
14841
+ type: "asc" | "desc";
14842
+ }[];
14843
+ _id?: StringId | StringId[];
14844
+ "user._id"?: StringId | StringId[];
14845
+ user?: StringId | StringId[];
14846
+ "user.type"?: Data["user"]["type"] | Data["user"]["type"][];
14847
+ user_type?: Data["user"]["type"] | Data["user"]["type"][];
14848
+ from_createdAt?: number;
14849
+ to_createdAt?: number;
14850
+ teams?: StringId | StringId[];
14851
+ activity_type?: Data["activity_type"] | Data["activity_type"][];
14852
+ action?: Data["action"] | Data["action"][];
14853
+ visit_id?: string | string[];
14854
+ activity_id?: StringId | StringId[];
14855
+ time?: number;
14856
+ from_time?: number;
14857
+ to_time?: number;
14858
+ sync_id?: string | string[];
14859
+ client?: StringId | StringId[];
14860
+ "details.activities.activity_type"?: VisitDetails["activities"][0]["activity_type"] | VisitDetails["activities"][0]["activity_type"][];
14861
+ chain?: StringId | StringId[];
14862
+ channel?: StringId | StringId[];
14863
+ city?: string | string[];
14864
+ region?: string | string[];
14865
+ state?: string | string[];
14866
+ country?: string | string[];
14867
+ tags?: StringId | StringId[];
14868
+ CLIENT_TAGS?: StringId | StringId[];
14869
+ AREA_TAGS?: StringId | StringId[];
14870
+ with_media?: boolean;
14871
+ with_client_customFields?: boolean;
14872
+ with_client_details?: boolean;
14873
+ with_chain?: boolean;
14874
+ with_channel?: boolean;
14875
+ with_area_tags?: boolean;
14876
+ with_tags?: boolean;
14877
+ with_client_tags?: boolean;
14878
+ with_teams?: boolean;
14879
+ with_rep_details?: boolean;
14880
+ with_rep_customFields?: boolean;
14881
+ };
14882
+ interface Result extends DefaultPaginationResult {
14883
+ data: PopulatedDoc[];
14884
+ }
14885
+ }
14886
+ export {};
14887
+ }
14888
+ }
14889
+ export type StringId = string;
14890
+ export type NameSpaces = string[];
14891
+ export interface Admin {
14892
+ _id: StringId;
14893
+ name?: string;
14894
+ type: "admin";
14895
+ admin?: StringId;
14896
+ }
14897
+ export interface Rep {
14898
+ _id: StringId;
14899
+ name?: string;
14900
+ type: "rep";
14901
+ rep?: StringId;
14902
+ }
14903
+ export interface AdminOrRep {
14904
+ _id: StringId;
14905
+ name?: string;
14906
+ type: "admin" | "rep";
14907
+ admin?: StringId;
14908
+ rep?: StringId;
14909
+ }
14910
+ export interface AdminOrRepOrTenant {
14911
+ _id: StringId;
14912
+ type: "admin" | "rep" | "tenant";
14913
+ name?: string;
14914
+ admin?: StringId;
14915
+ rep?: StringId;
14916
+ tenant?: StringId;
14917
+ }
14918
+ export interface AdminOrRepOrTenantOrClient {
14919
+ _id: StringId;
14920
+ type: "admin" | "rep" | "tenant" | "client";
14921
+ name?: string;
14922
+ admin?: StringId;
14923
+ rep?: StringId;
14924
+ tenant?: StringId;
14925
+ client?: StringId;
14926
+ }
14927
+ interface ValidityCheck {
14928
+ valid: boolean;
14929
+ reasons: {
14930
+ message: string;
14931
+ code: string;
14932
+ }[];
14933
+ }
14934
+ type PopulatedMediaStorage = Pick<Service.MediaStorage.MediaStorageSchema, "_id" | "createdAt" | "ContentType" | "media_type" | "mime_type" | "publicUrl" | "type_name" | "file_name" | "media_id" | "thumbnails" | "createdAt"> & {
14935
+ thumbnails: Pick<Service.MediaStorage.Thumbnail, "_id" | "ContentType" | "mime_type" | "publicUrl" | "type_name" | "file_name" | "createdAt">[];
14936
+ };
14937
+ interface ActivityComment {
14938
+ time: number;
14939
+ user_name: string;
14940
+ user_id: string;
14941
+ user_type: string;
14942
+ comment: string;
14943
+ }
14944
+ interface ActivityReview {
14945
+ admin_id: string;
14946
+ time: number;
14947
+ }
14948
+ interface ActivityAdminNote {
14949
+ admin_name: string;
14950
+ note: string;
14951
+ admin_id: string;
14952
+ time: number;
14953
+ }
13660
14954
  export {};