repzo 1.0.152 → 1.0.154
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.
- package/lib/index.d.ts +6 -0
- package/lib/index.js +8 -0
- package/lib/types/index.d.ts +1388 -71
- package/lib/types/index.js +91 -1
- package/package.json +1 -1
- package/src/types/index.ts +1881 -91
package/lib/types/index.d.ts
CHANGED
|
@@ -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;
|
|
@@ -2344,12 +2340,13 @@ export declare namespace Service {
|
|
|
2344
2340
|
}
|
|
2345
2341
|
namespace Rep {
|
|
2346
2342
|
interface RepPermissions {
|
|
2343
|
+
rep_can_print_payment_after_allowance_period?: boolean;
|
|
2347
2344
|
rep_can_add_client: boolean;
|
|
2348
2345
|
rep_can_edit_client: boolean;
|
|
2349
2346
|
rep_can_add_calendar: boolean;
|
|
2350
2347
|
rep_can_edit_calendar: boolean;
|
|
2351
|
-
rep_can_skip_photo_tag: boolean;
|
|
2352
2348
|
rep_can_edit_others_calendar: boolean;
|
|
2349
|
+
rep_can_skip_photo_tag: boolean;
|
|
2353
2350
|
rep_can_edit_product_price?: boolean;
|
|
2354
2351
|
rep_must_add_client_with_location?: boolean;
|
|
2355
2352
|
rep_can_access_shared_history?: boolean;
|
|
@@ -2366,9 +2363,6 @@ export declare namespace Service {
|
|
|
2366
2363
|
rep_can_create_partial_return_invoice?: boolean;
|
|
2367
2364
|
rep_can_sell_zero_product_price?: boolean;
|
|
2368
2365
|
rep_can_create_sales_order_out_of_visit?: boolean;
|
|
2369
|
-
rep_can_create_cash_invoice?: boolean;
|
|
2370
|
-
rep_can_sell_above_product_price?: boolean;
|
|
2371
|
-
rep_can_sell_below_product_price?: boolean;
|
|
2372
2366
|
rep_can_create_return_out_of_visit?: boolean;
|
|
2373
2367
|
rep_can_create_partial_return_out_of_visit?: boolean;
|
|
2374
2368
|
rep_can_skip_return_reason?: boolean;
|
|
@@ -2376,8 +2370,10 @@ export declare namespace Service {
|
|
|
2376
2370
|
rep_can_create_free_payments?: boolean;
|
|
2377
2371
|
rep_can_partially_pay_invoice?: boolean;
|
|
2378
2372
|
auto_close_visit_when_out_of_geo_fence?: boolean;
|
|
2379
|
-
end_visit_when_out_of_geofence?: boolean;
|
|
2380
2373
|
end_visit_when_low_accuracy?: boolean;
|
|
2374
|
+
rep_can_create_cash_invoice?: boolean;
|
|
2375
|
+
rep_can_sell_above_product_price?: boolean;
|
|
2376
|
+
rep_can_sell_below_product_price?: boolean;
|
|
2381
2377
|
rep_can_create_workorder?: boolean;
|
|
2382
2378
|
rep_can_create_asset?: boolean;
|
|
2383
2379
|
rep_can_skip_promotions?: boolean;
|
|
@@ -2387,32 +2383,42 @@ export declare namespace Service {
|
|
|
2387
2383
|
rep_can_end_visit_without_submitting_item_status?: boolean;
|
|
2388
2384
|
rep_can_submit_multiple_item_status_products?: boolean;
|
|
2389
2385
|
rep_can_edit_return_product_price?: boolean;
|
|
2386
|
+
rep_can_overwrite_partial_return_invoice_price?: boolean;
|
|
2390
2387
|
rep_can_skip_cart_calculation_until_checkout?: boolean;
|
|
2391
2388
|
rep_can_start_day_without_gps_signal?: boolean;
|
|
2389
|
+
rep_can_start_day_with_outstanding_settlement_balance?: boolean;
|
|
2392
2390
|
rep_can_create_add_client_approval_request?: boolean;
|
|
2393
|
-
rep_can_create_edit_client_details_approval_request
|
|
2394
|
-
rep_can_create_edit_client_assigned_to_approval_request
|
|
2395
|
-
rep_can_create_edit_client_location_approval_request
|
|
2396
|
-
rep_can_create_delete_client_approval_request
|
|
2397
|
-
rep_can_create_skip_job_at_visit_end_approval_request
|
|
2398
|
-
rep_can_create_skip_geofence_at_visit_end_approval_request
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
rep_can_visit_outside_route
|
|
2404
|
-
rep_can_edit_retail_execution_entry
|
|
2405
|
-
rep_can_edit_form_entry
|
|
2406
|
-
rep_can_skip_visit_from_route_sequence
|
|
2407
|
-
rep_can_create_return_sales_order
|
|
2391
|
+
rep_can_create_edit_client_details_approval_request?: boolean;
|
|
2392
|
+
rep_can_create_edit_client_assigned_to_approval_request?: boolean;
|
|
2393
|
+
rep_can_create_edit_client_location_approval_request?: boolean;
|
|
2394
|
+
rep_can_create_delete_client_approval_request?: boolean;
|
|
2395
|
+
rep_can_create_skip_job_at_visit_end_approval_request?: boolean;
|
|
2396
|
+
rep_can_create_skip_geofence_at_visit_end_approval_request?: boolean;
|
|
2397
|
+
rep_can_view_client_credit_limit?: boolean;
|
|
2398
|
+
rep_can_create_edit_client_credit_limit_approval_request?: boolean;
|
|
2399
|
+
rep_can_assign_workorder?: boolean;
|
|
2400
|
+
rep_can_create_credit_invoice_for_cash_client?: boolean;
|
|
2401
|
+
rep_can_visit_outside_route?: boolean;
|
|
2402
|
+
rep_can_edit_retail_execution_entry?: boolean;
|
|
2403
|
+
rep_can_edit_form_entry?: boolean;
|
|
2404
|
+
rep_can_skip_visit_from_route_sequence?: boolean;
|
|
2405
|
+
rep_can_create_return_sales_order?: boolean;
|
|
2408
2406
|
rep_can_edit_sales_order_custom_status?: boolean;
|
|
2409
2407
|
rep_can_edit_invoice_custom_status?: boolean;
|
|
2410
|
-
rep_can_start_day_with_outstanding_settlement_balance?: boolean;
|
|
2411
2408
|
rep_to_create_invoice_variant_batch_from_assigned_warehouse?: boolean;
|
|
2412
2409
|
rep_to_create_sales_order_variant_batch_assigned_main_warehouse?: boolean;
|
|
2413
2410
|
rep_can_create_pull_from_client_assigned_to_approval_request?: boolean;
|
|
2414
|
-
|
|
2415
|
-
|
|
2411
|
+
rep_can_create_payment?: boolean;
|
|
2412
|
+
rep_can_print_offline_invoice?: boolean;
|
|
2413
|
+
rep_can_print_offline_sales_order?: boolean;
|
|
2414
|
+
rep_can_skip_exp_date_in_audit_stock?: boolean;
|
|
2415
|
+
rep_must_start_day_within_specific_time_frame: boolean;
|
|
2416
|
+
rep_can_skip_assigned_client_filter_on_workorder_assigned_to?: boolean;
|
|
2417
|
+
rep_can_assign_client_to_other_reps?: boolean;
|
|
2418
|
+
rep_must_enter_sales_order_external_serial_number?: boolean;
|
|
2419
|
+
rep_must_enter_invoice_external_serial_number?: boolean;
|
|
2420
|
+
rep_can_create_negative_invoices?: boolean;
|
|
2421
|
+
rep_must_end_day_after_specific_time: boolean;
|
|
2416
2422
|
}
|
|
2417
2423
|
interface TargetResults {
|
|
2418
2424
|
totalPoints: number;
|
|
@@ -2637,8 +2643,19 @@ export declare namespace Service {
|
|
|
2637
2643
|
"permissions.rep_to_create_invoice_variant_batch_from_assigned_warehouse"?: boolean;
|
|
2638
2644
|
"permissions.rep_to_create_sales_order_variant_batch_assigned_main_warehouse"?: boolean;
|
|
2639
2645
|
"permissions.rep_can_create_pull_from_client_assigned_to_approval_request"?: boolean;
|
|
2646
|
+
"permissions.rep_can_print_payment_after_allowance_period"?: boolean;
|
|
2647
|
+
"permissions.rep_can_overwrite_partial_return_invoice_price"?: boolean;
|
|
2648
|
+
"permissions.rep_can_create_payment"?: boolean;
|
|
2649
|
+
"permissions.rep_can_print_offline_invoice"?: boolean;
|
|
2650
|
+
"permissions.rep_can_print_offline_sales_order"?: boolean;
|
|
2651
|
+
"permissions.rep_can_skip_exp_date_in_audit_stock"?: boolean;
|
|
2652
|
+
"permissions.rep_must_start_day_within_specific_time_frame"?: boolean;
|
|
2653
|
+
"permissions.rep_can_skip_assigned_client_filter_on_workorder_assigned_to"?: boolean;
|
|
2654
|
+
"permissions.rep_can_assign_client_to_other_reps"?: boolean;
|
|
2655
|
+
"permissions.rep_must_enter_sales_order_external_serial_number"?: boolean;
|
|
2656
|
+
"permissions.rep_must_enter_invoice_external_serial_number"?: boolean;
|
|
2640
2657
|
"permissions.rep_must_end_day_after_specific_time"?: boolean;
|
|
2641
|
-
"permissions.
|
|
2658
|
+
"permissions.rep_can_create_negative_invoices"?: boolean;
|
|
2642
2659
|
"settings.rep_must_end_day_after"?: `${number}:${number}`;
|
|
2643
2660
|
"settings.allowable_accuracy"?: number;
|
|
2644
2661
|
"settings.is_item_status_per_visit_limited"?: boolean;
|
|
@@ -2652,6 +2669,11 @@ export declare namespace Service {
|
|
|
2652
2669
|
"settings.watermark_time"?: boolean;
|
|
2653
2670
|
"settings.watermark_date"?: boolean;
|
|
2654
2671
|
"settings.watermark_coordinates"?: boolean;
|
|
2672
|
+
"settings.watermark_font_size"?: number;
|
|
2673
|
+
"settings.disable_auto_timezone_enforcement"?: boolean;
|
|
2674
|
+
"settings.disable_auto_time_date_enforcement"?: boolean;
|
|
2675
|
+
"settings.start_day_specific_time_frame_start"?: string;
|
|
2676
|
+
"settings.start_day_specific_time_frame_end"?: string;
|
|
2655
2677
|
is_test?: boolean;
|
|
2656
2678
|
form_v2_option?: "all" | "none" | "assigned" | "client_assigned";
|
|
2657
2679
|
assigned_forms_v2?: string | string[];
|
|
@@ -3586,6 +3608,7 @@ export declare namespace Service {
|
|
|
3586
3608
|
createdAt: string;
|
|
3587
3609
|
updatedAt: string;
|
|
3588
3610
|
}
|
|
3611
|
+
export type Data = CustomListSchema;
|
|
3589
3612
|
export interface CreateBody {
|
|
3590
3613
|
code: string;
|
|
3591
3614
|
name: string;
|
|
@@ -4219,6 +4242,7 @@ export declare namespace Service {
|
|
|
4219
4242
|
createdAt: Date;
|
|
4220
4243
|
updatedAt: Date;
|
|
4221
4244
|
}
|
|
4245
|
+
export type Data = VisitSchema;
|
|
4222
4246
|
export interface CreateBody {
|
|
4223
4247
|
geoPoint: {
|
|
4224
4248
|
type: "Point";
|
|
@@ -4750,6 +4774,7 @@ export declare namespace Service {
|
|
|
4750
4774
|
createdAt: Date;
|
|
4751
4775
|
updatedAt: Date;
|
|
4752
4776
|
}
|
|
4777
|
+
export type Data = WorkorderSchema;
|
|
4753
4778
|
export interface PopulatedData {
|
|
4754
4779
|
_id: StringId;
|
|
4755
4780
|
name: string;
|
|
@@ -5709,6 +5734,7 @@ export declare namespace Service {
|
|
|
5709
5734
|
device_id?: string;
|
|
5710
5735
|
device_unique_id?: string;
|
|
5711
5736
|
}
|
|
5737
|
+
export type Data = InvoiceSchema;
|
|
5712
5738
|
export interface CreateBody {
|
|
5713
5739
|
items?: Item.Body[];
|
|
5714
5740
|
return_items?: Item.Body[];
|
|
@@ -6478,6 +6504,7 @@ export declare namespace Service {
|
|
|
6478
6504
|
updatedAt: string;
|
|
6479
6505
|
__v: number;
|
|
6480
6506
|
}
|
|
6507
|
+
export type Data = ProformaSchema;
|
|
6481
6508
|
export interface CreateBody {
|
|
6482
6509
|
items: Item.Schema[];
|
|
6483
6510
|
return_items?: Item.Schema[];
|
|
@@ -6971,6 +6998,7 @@ export declare namespace Service {
|
|
|
6971
6998
|
ending_balance?: number;
|
|
6972
6999
|
__v: number;
|
|
6973
7000
|
}
|
|
7001
|
+
export type Data = PaymentSchema;
|
|
6974
7002
|
export interface CreateBody {
|
|
6975
7003
|
amount: number;
|
|
6976
7004
|
client_id: string;
|
|
@@ -7122,6 +7150,7 @@ export declare namespace Service {
|
|
|
7122
7150
|
updatedAt: string;
|
|
7123
7151
|
__v: number;
|
|
7124
7152
|
}
|
|
7153
|
+
export type Data = RefundSchema;
|
|
7125
7154
|
export interface CreateBody {
|
|
7126
7155
|
amount: number;
|
|
7127
7156
|
client_id: string;
|
|
@@ -7258,6 +7287,7 @@ export declare namespace Service {
|
|
|
7258
7287
|
createdAt: Date;
|
|
7259
7288
|
updatedAt: Date;
|
|
7260
7289
|
}
|
|
7290
|
+
export type Data = SettlementSchema;
|
|
7261
7291
|
export interface CreateBody {
|
|
7262
7292
|
amount: number;
|
|
7263
7293
|
time?: number;
|
|
@@ -7685,6 +7715,7 @@ export declare namespace Service {
|
|
|
7685
7715
|
createdAt: string;
|
|
7686
7716
|
updatedAt: string;
|
|
7687
7717
|
}
|
|
7718
|
+
type Data = ReceivingMaterialSchema;
|
|
7688
7719
|
interface CreateBody {
|
|
7689
7720
|
from: string;
|
|
7690
7721
|
to: string;
|
|
@@ -8054,6 +8085,7 @@ export declare namespace Service {
|
|
|
8054
8085
|
updatedAt: string;
|
|
8055
8086
|
__v: number;
|
|
8056
8087
|
}
|
|
8088
|
+
export type Data = Schema;
|
|
8057
8089
|
export {};
|
|
8058
8090
|
}
|
|
8059
8091
|
namespace Transfer {
|
|
@@ -8096,6 +8128,7 @@ export declare namespace Service {
|
|
|
8096
8128
|
updatedAt: string;
|
|
8097
8129
|
__v: number;
|
|
8098
8130
|
}
|
|
8131
|
+
export type Data = Schema;
|
|
8099
8132
|
export interface CreateBody {
|
|
8100
8133
|
serial_number?: SerialNumber;
|
|
8101
8134
|
time: number;
|
|
@@ -13620,44 +13653,1328 @@ export declare namespace Service {
|
|
|
13620
13653
|
}
|
|
13621
13654
|
export {};
|
|
13622
13655
|
}
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
|
|
13630
|
-
|
|
13631
|
-
|
|
13632
|
-
|
|
13633
|
-
|
|
13634
|
-
|
|
13635
|
-
|
|
13636
|
-
|
|
13637
|
-
|
|
13638
|
-
|
|
13639
|
-
|
|
13640
|
-
|
|
13641
|
-
|
|
13642
|
-
|
|
13643
|
-
|
|
13644
|
-
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
|
|
13657
|
-
|
|
13658
|
-
|
|
13659
|
-
|
|
13660
|
-
|
|
13661
|
-
|
|
13662
|
-
|
|
13656
|
+
namespace ActivityPhoto {
|
|
13657
|
+
interface Data {
|
|
13658
|
+
_id: string;
|
|
13659
|
+
photo?: string;
|
|
13660
|
+
media: string[];
|
|
13661
|
+
caption?: string;
|
|
13662
|
+
photo_meta: {
|
|
13663
|
+
device_orientation?: 1 | 2 | 3 | 4;
|
|
13664
|
+
height?: 1 | 2 | 3 | 4;
|
|
13665
|
+
width?: 1 | 2 | 3 | 4;
|
|
13666
|
+
};
|
|
13667
|
+
geo_tag: GeoTag;
|
|
13668
|
+
time: number;
|
|
13669
|
+
tags?: string[];
|
|
13670
|
+
visit_id: string;
|
|
13671
|
+
user: string;
|
|
13672
|
+
client: string;
|
|
13673
|
+
visit?: string;
|
|
13674
|
+
client_name: string;
|
|
13675
|
+
user_name: string;
|
|
13676
|
+
sync_id: string;
|
|
13677
|
+
route?: string;
|
|
13678
|
+
platform?: string;
|
|
13679
|
+
version_name?: string;
|
|
13680
|
+
battery_level?: number;
|
|
13681
|
+
device_brand?: string;
|
|
13682
|
+
device_os?: string;
|
|
13683
|
+
device_os_version?: string;
|
|
13684
|
+
device_model?: string;
|
|
13685
|
+
time_zone?: string;
|
|
13686
|
+
identifier?: number;
|
|
13687
|
+
device_id?: string;
|
|
13688
|
+
device_unique_id?: string;
|
|
13689
|
+
teams?: string[];
|
|
13690
|
+
reviewed_by: ActivityReview[];
|
|
13691
|
+
network_state?: number;
|
|
13692
|
+
admin_notes: ActivityAdminNote[];
|
|
13693
|
+
comments: ActivityComment[];
|
|
13694
|
+
company_namespace: string[];
|
|
13695
|
+
job_start_time?: number;
|
|
13696
|
+
job_end_time?: number;
|
|
13697
|
+
job_duration?: number;
|
|
13698
|
+
createdAt: string;
|
|
13699
|
+
updatedAt: string;
|
|
13700
|
+
}
|
|
13701
|
+
}
|
|
13702
|
+
namespace ActivityNote {
|
|
13703
|
+
interface Data {
|
|
13704
|
+
_id: string;
|
|
13705
|
+
content: string;
|
|
13706
|
+
geo_tag: GeoTag;
|
|
13707
|
+
time: number;
|
|
13708
|
+
tags?: string[];
|
|
13709
|
+
visit_id: string;
|
|
13710
|
+
user: string;
|
|
13711
|
+
client: string;
|
|
13712
|
+
visit?: string;
|
|
13713
|
+
client_name: string;
|
|
13714
|
+
user_name: string;
|
|
13715
|
+
sync_id: string;
|
|
13716
|
+
route?: string;
|
|
13717
|
+
platform?: string;
|
|
13718
|
+
version_name?: string;
|
|
13719
|
+
battery_level?: number;
|
|
13720
|
+
device_brand?: string;
|
|
13721
|
+
device_os?: string;
|
|
13722
|
+
device_os_version?: string;
|
|
13723
|
+
device_model?: string;
|
|
13724
|
+
time_zone?: string;
|
|
13725
|
+
identifier?: number;
|
|
13726
|
+
device_id?: string;
|
|
13727
|
+
device_unique_id?: string;
|
|
13728
|
+
teams?: string[];
|
|
13729
|
+
reviewed_by: ActivityReview[];
|
|
13730
|
+
network_state?: number;
|
|
13731
|
+
admin_notes: ActivityAdminNote[];
|
|
13732
|
+
comments: ActivityComment[];
|
|
13733
|
+
company_namespace: string[];
|
|
13734
|
+
job_start_time?: number;
|
|
13735
|
+
job_end_time?: number;
|
|
13736
|
+
job_duration?: number;
|
|
13737
|
+
createdAt: string;
|
|
13738
|
+
updatedAt: string;
|
|
13739
|
+
}
|
|
13740
|
+
}
|
|
13741
|
+
namespace ActivityTask {
|
|
13742
|
+
interface Data {
|
|
13743
|
+
_id: string;
|
|
13744
|
+
start_photo?: string;
|
|
13745
|
+
end_photo?: string;
|
|
13746
|
+
start_media?: string[];
|
|
13747
|
+
end_media?: string[];
|
|
13748
|
+
caption?: string;
|
|
13749
|
+
start_photo_meta?: {
|
|
13750
|
+
device_orientation?: 1 | 2 | 3 | 4;
|
|
13751
|
+
height?: 1 | 2 | 3 | 4;
|
|
13752
|
+
width?: 1 | 2 | 3 | 4;
|
|
13753
|
+
};
|
|
13754
|
+
end_photo_meta?: {
|
|
13755
|
+
device_orientation?: 1 | 2 | 3 | 4;
|
|
13756
|
+
height?: 1 | 2 | 3 | 4;
|
|
13757
|
+
width?: 1 | 2 | 3 | 4;
|
|
13758
|
+
};
|
|
13759
|
+
start_time: number;
|
|
13760
|
+
end_time: number;
|
|
13761
|
+
total_time?: string;
|
|
13762
|
+
geo_tag: GeoTag;
|
|
13763
|
+
time: number;
|
|
13764
|
+
tags?: string[];
|
|
13765
|
+
visit_id: string;
|
|
13766
|
+
user: string;
|
|
13767
|
+
client: string;
|
|
13768
|
+
visit?: string;
|
|
13769
|
+
client_name: string;
|
|
13770
|
+
user_name: string;
|
|
13771
|
+
sync_id: string;
|
|
13772
|
+
route?: string;
|
|
13773
|
+
platform?: string;
|
|
13774
|
+
version_name?: string;
|
|
13775
|
+
battery_level?: number;
|
|
13776
|
+
device_brand?: string;
|
|
13777
|
+
device_os?: string;
|
|
13778
|
+
device_os_version?: string;
|
|
13779
|
+
device_model?: string;
|
|
13780
|
+
time_zone?: string;
|
|
13781
|
+
identifier?: number;
|
|
13782
|
+
device_id?: string;
|
|
13783
|
+
device_unique_id?: string;
|
|
13784
|
+
teams?: string[];
|
|
13785
|
+
reviewed_by: ActivityReview[];
|
|
13786
|
+
network_state?: number;
|
|
13787
|
+
admin_notes: ActivityAdminNote[];
|
|
13788
|
+
comments: ActivityComment[];
|
|
13789
|
+
company_namespace: string[];
|
|
13790
|
+
job_start_time?: number;
|
|
13791
|
+
job_end_time?: number;
|
|
13792
|
+
job_duration?: number;
|
|
13793
|
+
createdAt: string;
|
|
13794
|
+
updatedAt: string;
|
|
13795
|
+
}
|
|
13796
|
+
}
|
|
13797
|
+
namespace ActivityAudit {
|
|
13798
|
+
interface Inventory {
|
|
13799
|
+
store_qun?: number;
|
|
13800
|
+
shelf_qun?: number;
|
|
13801
|
+
shelf_price?: number;
|
|
13802
|
+
exp_date: number;
|
|
13803
|
+
photo?: string;
|
|
13804
|
+
media?: string[];
|
|
13805
|
+
caption?: string;
|
|
13806
|
+
photo_meta?: {
|
|
13807
|
+
device_orientation?: 1 | 2 | 3 | 4;
|
|
13808
|
+
height?: 1 | 2 | 3 | 4;
|
|
13809
|
+
width?: 1 | 2 | 3 | 4;
|
|
13810
|
+
};
|
|
13811
|
+
note?: string;
|
|
13812
|
+
}
|
|
13813
|
+
interface AuditItem {
|
|
13814
|
+
product_name: string;
|
|
13815
|
+
product_id: string;
|
|
13816
|
+
product_sub_category?: string;
|
|
13817
|
+
product_category?: string;
|
|
13818
|
+
productCategory?: string;
|
|
13819
|
+
productSubCategory?: string[];
|
|
13820
|
+
product_sku?: string;
|
|
13821
|
+
product_barcode?: string;
|
|
13822
|
+
audit_time: number;
|
|
13823
|
+
inventories: Inventory[];
|
|
13824
|
+
note?: string;
|
|
13825
|
+
}
|
|
13826
|
+
export interface Data {
|
|
13827
|
+
_id: string;
|
|
13828
|
+
geo_tag: GeoTag;
|
|
13829
|
+
time: number;
|
|
13830
|
+
tags?: string[];
|
|
13831
|
+
visit_id: string;
|
|
13832
|
+
user: string;
|
|
13833
|
+
client: string;
|
|
13834
|
+
visit?: string;
|
|
13835
|
+
client_name: string;
|
|
13836
|
+
user_name: string;
|
|
13837
|
+
sync_id: string;
|
|
13838
|
+
route?: string;
|
|
13839
|
+
platform?: string;
|
|
13840
|
+
version_name?: string;
|
|
13841
|
+
battery_level?: number;
|
|
13842
|
+
device_brand?: string;
|
|
13843
|
+
device_os?: string;
|
|
13844
|
+
device_os_version?: string;
|
|
13845
|
+
device_model?: string;
|
|
13846
|
+
time_zone?: string;
|
|
13847
|
+
identifier?: number;
|
|
13848
|
+
device_id?: string;
|
|
13849
|
+
device_unique_id?: string;
|
|
13850
|
+
teams?: string[];
|
|
13851
|
+
reviewed_by: ActivityReview[];
|
|
13852
|
+
network_state?: number;
|
|
13853
|
+
admin_notes: ActivityAdminNote[];
|
|
13854
|
+
comments: ActivityComment[];
|
|
13855
|
+
company_namespace: string[];
|
|
13856
|
+
job_start_time?: number;
|
|
13857
|
+
job_end_time?: number;
|
|
13858
|
+
job_duration?: number;
|
|
13859
|
+
audits: AuditItem[];
|
|
13860
|
+
createdAt: string;
|
|
13861
|
+
updatedAt: string;
|
|
13862
|
+
}
|
|
13863
|
+
export {};
|
|
13864
|
+
}
|
|
13865
|
+
namespace ActivityAvailability {
|
|
13866
|
+
interface Data {
|
|
13867
|
+
_id: string;
|
|
13868
|
+
geo_tag: GeoTag;
|
|
13869
|
+
time: number;
|
|
13870
|
+
tags?: string[];
|
|
13871
|
+
visit_id: string;
|
|
13872
|
+
user: string;
|
|
13873
|
+
client: string;
|
|
13874
|
+
visit?: string;
|
|
13875
|
+
client_name: string;
|
|
13876
|
+
user_name: string;
|
|
13877
|
+
sync_id: string;
|
|
13878
|
+
route?: string;
|
|
13879
|
+
platform?: string;
|
|
13880
|
+
version_name?: string;
|
|
13881
|
+
battery_level?: number;
|
|
13882
|
+
device_brand?: string;
|
|
13883
|
+
device_os?: string;
|
|
13884
|
+
device_os_version?: string;
|
|
13885
|
+
device_model?: string;
|
|
13886
|
+
time_zone?: string;
|
|
13887
|
+
identifier?: number;
|
|
13888
|
+
device_id?: string;
|
|
13889
|
+
device_unique_id?: string;
|
|
13890
|
+
teams?: string[];
|
|
13891
|
+
reviewed_by: ActivityReview[];
|
|
13892
|
+
network_state?: number;
|
|
13893
|
+
admin_notes: ActivityAdminNote[];
|
|
13894
|
+
comments: ActivityComment[];
|
|
13895
|
+
company_namespace: string[];
|
|
13896
|
+
job_start_time?: number;
|
|
13897
|
+
job_end_time?: number;
|
|
13898
|
+
job_duration?: number;
|
|
13899
|
+
msl_id: string;
|
|
13900
|
+
products_available: {
|
|
13901
|
+
product_id: string;
|
|
13902
|
+
available: boolean;
|
|
13903
|
+
}[];
|
|
13904
|
+
createdAt: string;
|
|
13905
|
+
updatedAt: string;
|
|
13906
|
+
}
|
|
13907
|
+
}
|
|
13908
|
+
namespace ActivityCheckoutDisplay {
|
|
13909
|
+
interface Data {
|
|
13910
|
+
_id: string;
|
|
13911
|
+
msl_id: string;
|
|
13912
|
+
checkout_count: number;
|
|
13913
|
+
geo_tag: GeoTag;
|
|
13914
|
+
time: number;
|
|
13915
|
+
tags?: string[];
|
|
13916
|
+
visit_id: string;
|
|
13917
|
+
user: string;
|
|
13918
|
+
client: string;
|
|
13919
|
+
visit?: string;
|
|
13920
|
+
client_name: string;
|
|
13921
|
+
user_name: string;
|
|
13922
|
+
sync_id: string;
|
|
13923
|
+
route?: string;
|
|
13924
|
+
platform?: string;
|
|
13925
|
+
version_name?: string;
|
|
13926
|
+
battery_level?: number;
|
|
13927
|
+
device_brand?: string;
|
|
13928
|
+
device_os?: string;
|
|
13929
|
+
device_os_version?: string;
|
|
13930
|
+
device_model?: string;
|
|
13931
|
+
time_zone?: string;
|
|
13932
|
+
identifier?: number;
|
|
13933
|
+
device_id?: string;
|
|
13934
|
+
device_unique_id?: string;
|
|
13935
|
+
teams?: string[];
|
|
13936
|
+
reviewed_by: ActivityReview[];
|
|
13937
|
+
network_state?: number;
|
|
13938
|
+
admin_notes: ActivityAdminNote[];
|
|
13939
|
+
comments: ActivityComment[];
|
|
13940
|
+
company_namespace: string[];
|
|
13941
|
+
job_start_time?: number;
|
|
13942
|
+
job_end_time?: number;
|
|
13943
|
+
job_duration?: number;
|
|
13944
|
+
createdAt: string;
|
|
13945
|
+
updatedAt: string;
|
|
13946
|
+
}
|
|
13947
|
+
}
|
|
13948
|
+
namespace ActivityFeedback {
|
|
13949
|
+
interface Data {
|
|
13950
|
+
_id: string;
|
|
13951
|
+
visit_id: string;
|
|
13952
|
+
visit_UUID: string;
|
|
13953
|
+
feed_back_option: string;
|
|
13954
|
+
route?: string;
|
|
13955
|
+
teams?: string[];
|
|
13956
|
+
company_namespace: string[];
|
|
13957
|
+
createdAt: string;
|
|
13958
|
+
updatedAt: string;
|
|
13959
|
+
}
|
|
13960
|
+
}
|
|
13961
|
+
namespace ActivityFormResult {
|
|
13962
|
+
interface Data {
|
|
13963
|
+
_id: string;
|
|
13964
|
+
serial_number?: SerialNumber;
|
|
13965
|
+
form_id: string;
|
|
13966
|
+
results: {
|
|
13967
|
+
[key: string]: any;
|
|
13968
|
+
};
|
|
13969
|
+
geo_tag: GeoTag;
|
|
13970
|
+
time: number;
|
|
13971
|
+
tags?: string[];
|
|
13972
|
+
visit_id: string;
|
|
13973
|
+
user: string;
|
|
13974
|
+
client: string;
|
|
13975
|
+
visit?: string;
|
|
13976
|
+
client_name: string;
|
|
13977
|
+
user_name: string;
|
|
13978
|
+
sync_id: string;
|
|
13979
|
+
route?: string;
|
|
13980
|
+
platform?: string;
|
|
13981
|
+
version_name?: string;
|
|
13982
|
+
battery_level?: number;
|
|
13983
|
+
device_brand?: string;
|
|
13984
|
+
device_os?: string;
|
|
13985
|
+
device_os_version?: string;
|
|
13986
|
+
device_model?: string;
|
|
13987
|
+
time_zone?: string;
|
|
13988
|
+
identifier?: number;
|
|
13989
|
+
device_id?: string;
|
|
13990
|
+
device_unique_id?: string;
|
|
13991
|
+
teams?: string[];
|
|
13992
|
+
reviewed_by: ActivityReview[];
|
|
13993
|
+
network_state?: number;
|
|
13994
|
+
admin_notes: ActivityAdminNote[];
|
|
13995
|
+
comments: ActivityComment[];
|
|
13996
|
+
company_namespace: string[];
|
|
13997
|
+
job_start_time?: number;
|
|
13998
|
+
job_end_time?: number;
|
|
13999
|
+
job_duration?: number;
|
|
14000
|
+
workorder?: string;
|
|
14001
|
+
asset?: string;
|
|
14002
|
+
asset_unit?: string;
|
|
14003
|
+
createdAt: string;
|
|
14004
|
+
updatedAt: string;
|
|
14005
|
+
}
|
|
14006
|
+
}
|
|
14007
|
+
namespace AvailableField {
|
|
14008
|
+
interface Data {
|
|
14009
|
+
patch_filter_key: string;
|
|
14010
|
+
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";
|
|
14011
|
+
code: string;
|
|
14012
|
+
formula_key?: string;
|
|
14013
|
+
field_type: "activity_attribute" | "source_attribute" | "template_field" | "calculated_field";
|
|
14014
|
+
data_type: "Separator" | "timestamp" | "String" | "Number" | "Boolean" | "Date" | "Image" | "coords" | "Text" | "Media" | "Heading" | "List" | "Phone" | "Email" | "Signature" | "DateTime" | "YesNo" | "ProductBarcodeScan" | "BarcodeScan" | "GeoPoint";
|
|
14015
|
+
key: string;
|
|
14016
|
+
field_id?: string;
|
|
14017
|
+
isArray: boolean;
|
|
14018
|
+
array_delimiter?: string;
|
|
14019
|
+
label: string;
|
|
14020
|
+
manipulator_function?: string;
|
|
14021
|
+
lookup?: {
|
|
14022
|
+
from: string;
|
|
14023
|
+
select: string;
|
|
14024
|
+
unwind: boolean;
|
|
14025
|
+
filter?: {
|
|
14026
|
+
as: string;
|
|
14027
|
+
cond: any;
|
|
14028
|
+
};
|
|
14029
|
+
};
|
|
14030
|
+
granularity?: Granularity;
|
|
14031
|
+
current_granularity?: Granularity;
|
|
14032
|
+
}
|
|
14033
|
+
}
|
|
14034
|
+
namespace FormV2 {
|
|
14035
|
+
interface Visibility {
|
|
14036
|
+
operator: "and" | "or";
|
|
14037
|
+
conditions: {
|
|
14038
|
+
division_id: string;
|
|
14039
|
+
field_id: string;
|
|
14040
|
+
type: "Boolean" | "List" | "YesNo";
|
|
14041
|
+
custom_list?: string | CustomList.Data;
|
|
14042
|
+
operator: "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin";
|
|
14043
|
+
value: any[];
|
|
14044
|
+
}[];
|
|
14045
|
+
}
|
|
14046
|
+
export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14047
|
+
export type FormV2FieldType = (typeof fieldType_enums)[number];
|
|
14048
|
+
interface FieldPrintSettings {
|
|
14049
|
+
three_inch: {
|
|
14050
|
+
grid_column?: 1 | 2;
|
|
14051
|
+
alignment?: "right" | "left" | "center";
|
|
14052
|
+
border_width?: number;
|
|
14053
|
+
label_font_size?: number;
|
|
14054
|
+
value_font_size?: number;
|
|
14055
|
+
media_height?: number | string;
|
|
14056
|
+
media_width?: number | string;
|
|
14057
|
+
align_media?: "right" | "left" | "center";
|
|
14058
|
+
label_value_spacing?: number;
|
|
14059
|
+
is_hidden?: boolean;
|
|
14060
|
+
};
|
|
14061
|
+
}
|
|
14062
|
+
interface UsedField {
|
|
14063
|
+
code: string;
|
|
14064
|
+
key: string;
|
|
14065
|
+
data_type: AvailableField.Data["data_type"];
|
|
14066
|
+
field_type: "template_field" | "source_attribute" | "activity_attribute";
|
|
14067
|
+
label: string;
|
|
14068
|
+
isArray?: boolean;
|
|
14069
|
+
formula_key: string;
|
|
14070
|
+
field_id?: string;
|
|
14071
|
+
example_value: AvailableField.Data["data_type"];
|
|
14072
|
+
manipulator_function?: string;
|
|
14073
|
+
lookup?: {
|
|
14074
|
+
from?: string;
|
|
14075
|
+
localField?: string;
|
|
14076
|
+
foreignField?: string;
|
|
14077
|
+
as?: string;
|
|
14078
|
+
select?: string;
|
|
14079
|
+
unwind?: boolean;
|
|
14080
|
+
filter?: {
|
|
14081
|
+
input?: string;
|
|
14082
|
+
as: string;
|
|
14083
|
+
cond: any;
|
|
14084
|
+
};
|
|
14085
|
+
};
|
|
14086
|
+
}
|
|
14087
|
+
export interface Field {
|
|
14088
|
+
_id?: string;
|
|
14089
|
+
name: string;
|
|
14090
|
+
local_name?: string;
|
|
14091
|
+
description?: string;
|
|
14092
|
+
local_description?: string;
|
|
14093
|
+
type: FormV2FieldType;
|
|
14094
|
+
isArray?: boolean;
|
|
14095
|
+
isRequired?: boolean;
|
|
14096
|
+
disabled?: boolean;
|
|
14097
|
+
formula_key?: string;
|
|
14098
|
+
scoring_enabled?: boolean;
|
|
14099
|
+
required_for_completion?: boolean;
|
|
14100
|
+
visibility?: Visibility;
|
|
14101
|
+
default_value?: any[];
|
|
14102
|
+
custom_list?: string | CustomList.Data;
|
|
14103
|
+
is_na_allowed?: boolean;
|
|
14104
|
+
score_accumulator_type?: "max" | "sum";
|
|
14105
|
+
yes_score?: number;
|
|
14106
|
+
no_score?: number;
|
|
14107
|
+
na_score?: number;
|
|
14108
|
+
exist_score?: number;
|
|
14109
|
+
media?: (string | MediaDoc)[];
|
|
14110
|
+
invisible: boolean;
|
|
14111
|
+
parent_field?: string;
|
|
14112
|
+
custom_list_element?: string;
|
|
14113
|
+
force_live_photo?: boolean;
|
|
14114
|
+
min?: number;
|
|
14115
|
+
max?: number;
|
|
14116
|
+
is_integer?: boolean;
|
|
14117
|
+
styles?: "check_list" | "toggle_yes_no_na" | "toggle_yes_no" | "buttons";
|
|
14118
|
+
field_print_settings?: FieldPrintSettings;
|
|
14119
|
+
is_calculated_field?: boolean;
|
|
14120
|
+
formula?: string;
|
|
14121
|
+
used_fields?: UsedField[];
|
|
14122
|
+
}
|
|
14123
|
+
interface Division {
|
|
14124
|
+
_id: string;
|
|
14125
|
+
name: string;
|
|
14126
|
+
local_name?: string;
|
|
14127
|
+
description?: string;
|
|
14128
|
+
local_description?: string;
|
|
14129
|
+
disabled?: boolean;
|
|
14130
|
+
min_questions_to_answer_for_completion?: number;
|
|
14131
|
+
min_score_for_completion?: number;
|
|
14132
|
+
visibility?: Visibility;
|
|
14133
|
+
fields: Field[];
|
|
14134
|
+
}
|
|
14135
|
+
interface PrintSettings {
|
|
14136
|
+
three_inch: {
|
|
14137
|
+
grid_columns?: 1 | 2;
|
|
14138
|
+
logo_height?: number | string;
|
|
14139
|
+
logo_width?: number | string;
|
|
14140
|
+
align_logo?: "right" | "left" | "center";
|
|
14141
|
+
space_y?: number;
|
|
14142
|
+
};
|
|
14143
|
+
A_four: {
|
|
14144
|
+
banner_media?: string;
|
|
14145
|
+
banner_height: number;
|
|
14146
|
+
banner_width: number;
|
|
14147
|
+
align_banner: "right" | "left" | "center";
|
|
14148
|
+
header_label_font_size: number;
|
|
14149
|
+
header_value_font_size: number;
|
|
14150
|
+
align_header: "right" | "left" | "center";
|
|
14151
|
+
division_name_font_size: number;
|
|
14152
|
+
align_division: "right" | "left" | "center";
|
|
14153
|
+
grid_columns: 1 | 2 | 3 | 4;
|
|
14154
|
+
space_y: number;
|
|
14155
|
+
field_label_size: number;
|
|
14156
|
+
field_value_size: number;
|
|
14157
|
+
footer_media?: string;
|
|
14158
|
+
align_footer_media: "right" | "left" | "center";
|
|
14159
|
+
footer_media_height: number;
|
|
14160
|
+
footer_media_width: number;
|
|
14161
|
+
footer_details: string;
|
|
14162
|
+
align_footer_details: "right" | "left" | "center";
|
|
14163
|
+
compressed_media_size: "original" | "small" | "medium" | "large" | "extra";
|
|
14164
|
+
view_custom_list_element: boolean;
|
|
14165
|
+
};
|
|
14166
|
+
}
|
|
14167
|
+
export interface Data {
|
|
14168
|
+
_id: string;
|
|
14169
|
+
disabled: boolean;
|
|
14170
|
+
name: string;
|
|
14171
|
+
local_name?: string;
|
|
14172
|
+
description?: string;
|
|
14173
|
+
local_description?: string;
|
|
14174
|
+
copied_from?: string;
|
|
14175
|
+
scoring_enabled?: boolean;
|
|
14176
|
+
completion_rules_enabled?: boolean;
|
|
14177
|
+
min_questions_to_answer_for_completion?: number;
|
|
14178
|
+
min_score_for_completion?: number;
|
|
14179
|
+
divisions: Division[];
|
|
14180
|
+
company_namespace: string[];
|
|
14181
|
+
print_settings?: PrintSettings;
|
|
14182
|
+
createdAt: Date;
|
|
14183
|
+
updatedAt: Date;
|
|
14184
|
+
}
|
|
14185
|
+
export {};
|
|
14186
|
+
}
|
|
14187
|
+
namespace ActivityFormV2Result {
|
|
14188
|
+
const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
|
|
14189
|
+
type FormV2FieldType = (typeof fieldType_enums)[number];
|
|
14190
|
+
interface FieldResult {
|
|
14191
|
+
_id?: string;
|
|
14192
|
+
field_id: string;
|
|
14193
|
+
name: string;
|
|
14194
|
+
type: FormV2FieldType;
|
|
14195
|
+
isArray?: boolean;
|
|
14196
|
+
isRequired?: boolean;
|
|
14197
|
+
custom_list?: string;
|
|
14198
|
+
formula_key?: string;
|
|
14199
|
+
is_calculated_field?: boolean;
|
|
14200
|
+
calculation_status?: "success" | "failed";
|
|
14201
|
+
calculation_error?: any[];
|
|
14202
|
+
score?: number;
|
|
14203
|
+
is_completed?: boolean;
|
|
14204
|
+
result: string[] | number[] | ["yes"] | ["no"] | ["na"] | [] | {
|
|
14205
|
+
coordinates: [number, number];
|
|
14206
|
+
type: "Point";
|
|
14207
|
+
}[] | {
|
|
14208
|
+
_id: string;
|
|
14209
|
+
value: string | number;
|
|
14210
|
+
type: "Number" | "String";
|
|
14211
|
+
score?: number;
|
|
14212
|
+
}[];
|
|
14213
|
+
}
|
|
14214
|
+
interface DivisionResult {
|
|
14215
|
+
_id: string;
|
|
14216
|
+
division_id: string;
|
|
14217
|
+
name: string;
|
|
14218
|
+
score?: number;
|
|
14219
|
+
is_completed?: boolean;
|
|
14220
|
+
fields: FieldResult[];
|
|
14221
|
+
}
|
|
14222
|
+
export interface Data {
|
|
14223
|
+
_id: string;
|
|
14224
|
+
creator: AdminOrRepOrTenantOrClient;
|
|
14225
|
+
editor?: AdminOrRepOrTenantOrClient;
|
|
14226
|
+
serial_number: SerialNumber;
|
|
14227
|
+
teams: string[];
|
|
14228
|
+
tags: string[];
|
|
14229
|
+
time: number;
|
|
14230
|
+
client?: string;
|
|
14231
|
+
client_name?: string;
|
|
14232
|
+
visit?: string;
|
|
14233
|
+
visit_id?: string;
|
|
14234
|
+
route?: string;
|
|
14235
|
+
workorder?: string;
|
|
14236
|
+
sync_id: string;
|
|
14237
|
+
geo_tag?: GeoTag;
|
|
14238
|
+
geoPoint?: GeoPoint;
|
|
14239
|
+
platform?: string;
|
|
14240
|
+
version_name?: string;
|
|
14241
|
+
battery_level?: number;
|
|
14242
|
+
device_brand?: string;
|
|
14243
|
+
device_os?: string;
|
|
14244
|
+
device_os_version?: string;
|
|
14245
|
+
device_model?: string;
|
|
14246
|
+
identifier?: number;
|
|
14247
|
+
device_id?: string;
|
|
14248
|
+
device_unique_id?: string;
|
|
14249
|
+
network_state?: number;
|
|
14250
|
+
time_zone?: string;
|
|
14251
|
+
job_start_time?: number;
|
|
14252
|
+
job_end_time?: number;
|
|
14253
|
+
job_duration?: number;
|
|
14254
|
+
form_id: string;
|
|
14255
|
+
results: DivisionResult[];
|
|
14256
|
+
score?: number;
|
|
14257
|
+
is_completed: boolean;
|
|
14258
|
+
company_namespace: string[];
|
|
14259
|
+
createdAt: Date;
|
|
14260
|
+
updatedAt: Date;
|
|
14261
|
+
}
|
|
14262
|
+
export {};
|
|
14263
|
+
}
|
|
14264
|
+
namespace ActivityItemStatus {
|
|
14265
|
+
type ItemStatus = "current_user" | "non_user" | "generic_user" | "competitor_user" | "other";
|
|
14266
|
+
interface Item {
|
|
14267
|
+
product: string;
|
|
14268
|
+
product_name: string;
|
|
14269
|
+
status: ItemStatus;
|
|
14270
|
+
item_status_type?: string;
|
|
14271
|
+
feedback?: string;
|
|
14272
|
+
note?: string;
|
|
14273
|
+
feedback_current_user?: number;
|
|
14274
|
+
previous_status?: ItemStatus;
|
|
14275
|
+
previous_status_id?: string;
|
|
14276
|
+
previous_user?: string;
|
|
14277
|
+
previous_user_name?: string;
|
|
14278
|
+
previous_time?: number;
|
|
14279
|
+
}
|
|
14280
|
+
export interface Data {
|
|
14281
|
+
_id: string;
|
|
14282
|
+
items: Item[];
|
|
14283
|
+
geoPoint: GeoPoint;
|
|
14284
|
+
time: number;
|
|
14285
|
+
tags?: string[];
|
|
14286
|
+
visit_id: string;
|
|
14287
|
+
user: string;
|
|
14288
|
+
client: string;
|
|
14289
|
+
visit?: string;
|
|
14290
|
+
client_name: string;
|
|
14291
|
+
user_name: string;
|
|
14292
|
+
sync_id: string;
|
|
14293
|
+
route?: string;
|
|
14294
|
+
platform?: string;
|
|
14295
|
+
version_name?: string;
|
|
14296
|
+
battery_level?: number;
|
|
14297
|
+
device_brand?: string;
|
|
14298
|
+
device_os?: string;
|
|
14299
|
+
device_os_version?: string;
|
|
14300
|
+
device_model?: string;
|
|
14301
|
+
time_zone?: string;
|
|
14302
|
+
identifier?: number;
|
|
14303
|
+
device_id?: string;
|
|
14304
|
+
device_unique_id?: string;
|
|
14305
|
+
teams?: string[];
|
|
14306
|
+
reviewed_by: ActivityReview[];
|
|
14307
|
+
network_state?: number;
|
|
14308
|
+
admin_notes: ActivityAdminNote[];
|
|
14309
|
+
comments: ActivityComment[];
|
|
14310
|
+
company_namespace: string[];
|
|
14311
|
+
job_start_time?: number;
|
|
14312
|
+
job_end_time?: number;
|
|
14313
|
+
job_duration?: number;
|
|
14314
|
+
createdAt: string;
|
|
14315
|
+
updatedAt: string;
|
|
14316
|
+
}
|
|
14317
|
+
export {};
|
|
14318
|
+
}
|
|
14319
|
+
namespace ActivityPlanogram {
|
|
14320
|
+
interface Data {
|
|
14321
|
+
_id: string;
|
|
14322
|
+
msl_id: string;
|
|
14323
|
+
media?: string[];
|
|
14324
|
+
actual_planogram_imgs?: string[];
|
|
14325
|
+
does_planogram_comply: boolean;
|
|
14326
|
+
planogram_reason?: string;
|
|
14327
|
+
geo_tag: GeoTag;
|
|
14328
|
+
time: number;
|
|
14329
|
+
tags?: string[];
|
|
14330
|
+
visit_id: string;
|
|
14331
|
+
user: string;
|
|
14332
|
+
client: string;
|
|
14333
|
+
visit?: string;
|
|
14334
|
+
client_name: string;
|
|
14335
|
+
user_name: string;
|
|
14336
|
+
sync_id: string;
|
|
14337
|
+
route?: string;
|
|
14338
|
+
platform?: string;
|
|
14339
|
+
version_name?: string;
|
|
14340
|
+
battery_level?: number;
|
|
14341
|
+
device_brand?: string;
|
|
14342
|
+
device_os?: string;
|
|
14343
|
+
device_os_version?: string;
|
|
14344
|
+
device_model?: string;
|
|
14345
|
+
time_zone?: string;
|
|
14346
|
+
identifier?: number;
|
|
14347
|
+
device_id?: string;
|
|
14348
|
+
device_unique_id?: string;
|
|
14349
|
+
teams?: string[];
|
|
14350
|
+
reviewed_by: ActivityReview[];
|
|
14351
|
+
network_state?: number;
|
|
14352
|
+
admin_notes: ActivityAdminNote[];
|
|
14353
|
+
comments: ActivityComment[];
|
|
14354
|
+
company_namespace: string[];
|
|
14355
|
+
job_start_time?: number;
|
|
14356
|
+
job_end_time?: number;
|
|
14357
|
+
job_duration?: number;
|
|
14358
|
+
createdAt: string;
|
|
14359
|
+
updatedAt: string;
|
|
14360
|
+
}
|
|
14361
|
+
}
|
|
14362
|
+
namespace ActivitySecondaryDisplay {
|
|
14363
|
+
interface Data {
|
|
14364
|
+
_id: string;
|
|
14365
|
+
secondary_count: number;
|
|
14366
|
+
msl_id: string;
|
|
14367
|
+
geo_tag: GeoTag;
|
|
14368
|
+
time: number;
|
|
14369
|
+
tags?: string[];
|
|
14370
|
+
visit_id: string;
|
|
14371
|
+
user: string;
|
|
14372
|
+
client: string;
|
|
14373
|
+
visit?: string;
|
|
14374
|
+
client_name: string;
|
|
14375
|
+
user_name: string;
|
|
14376
|
+
sync_id: string;
|
|
14377
|
+
route?: string;
|
|
14378
|
+
platform?: string;
|
|
14379
|
+
version_name?: string;
|
|
14380
|
+
battery_level?: number;
|
|
14381
|
+
device_brand?: string;
|
|
14382
|
+
device_os?: string;
|
|
14383
|
+
device_os_version?: string;
|
|
14384
|
+
device_model?: string;
|
|
14385
|
+
time_zone?: string;
|
|
14386
|
+
identifier?: number;
|
|
14387
|
+
device_id?: string;
|
|
14388
|
+
device_unique_id?: string;
|
|
14389
|
+
teams?: string[];
|
|
14390
|
+
reviewed_by: ActivityReview[];
|
|
14391
|
+
network_state?: number;
|
|
14392
|
+
admin_notes: ActivityAdminNote[];
|
|
14393
|
+
comments: ActivityComment[];
|
|
14394
|
+
company_namespace: string[];
|
|
14395
|
+
job_start_time?: number;
|
|
14396
|
+
job_end_time?: number;
|
|
14397
|
+
job_duration?: number;
|
|
14398
|
+
createdAt: string;
|
|
14399
|
+
updatedAt: string;
|
|
14400
|
+
}
|
|
14401
|
+
}
|
|
14402
|
+
namespace ActivityShelfshare {
|
|
14403
|
+
interface Data {
|
|
14404
|
+
_id: string;
|
|
14405
|
+
msl_length: number;
|
|
14406
|
+
total_msl_length: number;
|
|
14407
|
+
msl_id: string;
|
|
14408
|
+
geo_tag: GeoTag;
|
|
14409
|
+
time: number;
|
|
14410
|
+
tags?: string[];
|
|
14411
|
+
visit_id: string;
|
|
14412
|
+
user: string;
|
|
14413
|
+
client: string;
|
|
14414
|
+
visit?: string;
|
|
14415
|
+
client_name: string;
|
|
14416
|
+
user_name: string;
|
|
14417
|
+
sync_id: string;
|
|
14418
|
+
route?: string;
|
|
14419
|
+
platform?: string;
|
|
14420
|
+
version_name?: string;
|
|
14421
|
+
battery_level?: number;
|
|
14422
|
+
device_brand?: string;
|
|
14423
|
+
device_os?: string;
|
|
14424
|
+
device_os_version?: string;
|
|
14425
|
+
device_model?: string;
|
|
14426
|
+
time_zone?: string;
|
|
14427
|
+
identifier?: number;
|
|
14428
|
+
device_id?: string;
|
|
14429
|
+
device_unique_id?: string;
|
|
14430
|
+
teams?: string[];
|
|
14431
|
+
reviewed_by: ActivityReview[];
|
|
14432
|
+
network_state?: number;
|
|
14433
|
+
admin_notes: ActivityAdminNote[];
|
|
14434
|
+
comments: ActivityComment[];
|
|
14435
|
+
company_namespace: string[];
|
|
14436
|
+
job_start_time?: number;
|
|
14437
|
+
job_end_time?: number;
|
|
14438
|
+
job_duration?: number;
|
|
14439
|
+
createdAt: string;
|
|
14440
|
+
updatedAt: string;
|
|
14441
|
+
}
|
|
14442
|
+
}
|
|
14443
|
+
namespace ActivityStorecheck {
|
|
14444
|
+
type FieldType = "Text" | "String" | "Date" | "Image" | "Boolean" | "Number" | "List" | "Separator" | "Heading" | "Media";
|
|
14445
|
+
type Source = "product" | "variant" | "product-category" | "product-sub-category" | "product-brand" | "product-group";
|
|
14446
|
+
interface GeoTag {
|
|
14447
|
+
lat?: number;
|
|
14448
|
+
lng?: number;
|
|
14449
|
+
formatted_address?: string;
|
|
14450
|
+
}
|
|
14451
|
+
interface GeoPoint {
|
|
14452
|
+
type: "Point";
|
|
14453
|
+
coordinates: [number, number];
|
|
14454
|
+
}
|
|
14455
|
+
interface Entry {
|
|
14456
|
+
entry_id: string;
|
|
14457
|
+
source: Source;
|
|
14458
|
+
results: Result[];
|
|
14459
|
+
}
|
|
14460
|
+
interface Result {
|
|
14461
|
+
source_id: string;
|
|
14462
|
+
source_name: string;
|
|
14463
|
+
divisions: Division[];
|
|
14464
|
+
}
|
|
14465
|
+
interface Division {
|
|
14466
|
+
fields: Field[];
|
|
14467
|
+
}
|
|
14468
|
+
interface Field {
|
|
14469
|
+
_id?: string;
|
|
14470
|
+
name: string;
|
|
14471
|
+
type: FieldType;
|
|
14472
|
+
isArray: boolean;
|
|
14473
|
+
isRequired?: boolean;
|
|
14474
|
+
is_calculated_field?: boolean;
|
|
14475
|
+
formula_key?: string;
|
|
14476
|
+
parent_field?: string;
|
|
14477
|
+
custom_list?: string | CustomList.Data | StringId;
|
|
14478
|
+
field_id: string | StringId;
|
|
14479
|
+
result: any[];
|
|
14480
|
+
result_custom_list_ids?: any[];
|
|
14481
|
+
calculation_status?: "success" | "failed";
|
|
14482
|
+
calculation_error?: string | any[];
|
|
14483
|
+
company_namespace?: string[];
|
|
14484
|
+
}
|
|
14485
|
+
export interface Data {
|
|
14486
|
+
_id: string;
|
|
14487
|
+
company_namespace: string[];
|
|
14488
|
+
client: string;
|
|
14489
|
+
client_name: string;
|
|
14490
|
+
sync_id: string;
|
|
14491
|
+
time_zone: string;
|
|
14492
|
+
template_id: string;
|
|
14493
|
+
visit?: string;
|
|
14494
|
+
visit_id?: string;
|
|
14495
|
+
battery_level?: number;
|
|
14496
|
+
user: string;
|
|
14497
|
+
user_name: string;
|
|
14498
|
+
time: number;
|
|
14499
|
+
geo_tag?: GeoTag;
|
|
14500
|
+
geoPoint: GeoPoint;
|
|
14501
|
+
teams?: string[];
|
|
14502
|
+
route?: string;
|
|
14503
|
+
tags?: string[];
|
|
14504
|
+
entries: Entry[];
|
|
14505
|
+
platform?: string;
|
|
14506
|
+
version_name?: string;
|
|
14507
|
+
device_brand?: string;
|
|
14508
|
+
device_os?: string;
|
|
14509
|
+
device_os_version?: string;
|
|
14510
|
+
device_model?: string;
|
|
14511
|
+
identifier?: number;
|
|
14512
|
+
device_id?: string;
|
|
14513
|
+
device_unique_id?: string;
|
|
14514
|
+
network_state?: number;
|
|
14515
|
+
serial_number?: SerialNumber;
|
|
14516
|
+
job_start_time?: number;
|
|
14517
|
+
job_end_time?: number;
|
|
14518
|
+
job_duration?: number;
|
|
14519
|
+
createdAt: Date;
|
|
14520
|
+
updatedAt: Date;
|
|
14521
|
+
}
|
|
14522
|
+
export {};
|
|
14523
|
+
}
|
|
14524
|
+
namespace Reminder {
|
|
14525
|
+
interface Data {
|
|
14526
|
+
_id: string;
|
|
14527
|
+
name: string;
|
|
14528
|
+
creator: AdminOrRep;
|
|
14529
|
+
from: number;
|
|
14530
|
+
to: number;
|
|
14531
|
+
visibility: "reps" | "teams" | "public";
|
|
14532
|
+
clients: string[];
|
|
14533
|
+
reps: string[];
|
|
14534
|
+
teams: string[];
|
|
14535
|
+
content: string;
|
|
14536
|
+
disabled: boolean;
|
|
14537
|
+
photo?: string;
|
|
14538
|
+
cover_photo?: string;
|
|
14539
|
+
sync_id: string;
|
|
14540
|
+
company_namespace: string[];
|
|
14541
|
+
createdAt: Date;
|
|
14542
|
+
updatedAt: Date;
|
|
14543
|
+
}
|
|
14544
|
+
}
|
|
14545
|
+
namespace TimelineReport {
|
|
14546
|
+
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"];
|
|
14547
|
+
type ActivityType = (typeof activity_types)[number];
|
|
14548
|
+
export interface Data {
|
|
14549
|
+
_id: StringId;
|
|
14550
|
+
company_namespace: string[];
|
|
14551
|
+
activity_type: ActivityType;
|
|
14552
|
+
activity_id: StringId;
|
|
14553
|
+
time: number;
|
|
14554
|
+
business_day?: string;
|
|
14555
|
+
user: {
|
|
14556
|
+
_id: StringId;
|
|
14557
|
+
type: "admin" | "rep";
|
|
14558
|
+
name?: string;
|
|
14559
|
+
rep?: StringId;
|
|
14560
|
+
admin?: StringId;
|
|
14561
|
+
};
|
|
14562
|
+
action: Method;
|
|
14563
|
+
teams?: StringId[];
|
|
14564
|
+
visit_id?: string;
|
|
14565
|
+
sync_id?: string;
|
|
14566
|
+
client?: StringId;
|
|
14567
|
+
client_name?: string;
|
|
14568
|
+
geoPoint?: {
|
|
14569
|
+
coordinates: [number, number];
|
|
14570
|
+
type: "Point";
|
|
14571
|
+
};
|
|
14572
|
+
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;
|
|
14573
|
+
createdAt: Date;
|
|
14574
|
+
updatedAt: Date;
|
|
14575
|
+
}
|
|
14576
|
+
type VisitDetails = {
|
|
14577
|
+
activity_type: "visit";
|
|
14578
|
+
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)[];
|
|
14579
|
+
} & Pick<Visit.Data, "closed_by_system" | "geoPoint" | "start_time" | "end_time" | "total_time" | "battery_level" | "version_name" | "device_brand">;
|
|
14580
|
+
type ActivityPhotoDetails = {
|
|
14581
|
+
activity_type: "activity-photo";
|
|
14582
|
+
} & Pick<ActivityPhoto.Data, "media">;
|
|
14583
|
+
type ActivityPhotoVisitDetails = {
|
|
14584
|
+
activity_type: "activity-photo";
|
|
14585
|
+
activity_id: StringId;
|
|
14586
|
+
} & Pick<ActivityPhoto.Data, "media" | "time">;
|
|
14587
|
+
type ActivityAuditDetails = {
|
|
14588
|
+
activity_type: "activity-audit";
|
|
14589
|
+
audits_length: number;
|
|
14590
|
+
};
|
|
14591
|
+
type ActivityAuditVisitDetails = {
|
|
14592
|
+
activity_type: "activity-audit";
|
|
14593
|
+
activity_id: StringId;
|
|
14594
|
+
audits_length: number;
|
|
14595
|
+
} & Pick<ActivityAudit.Data, "time">;
|
|
14596
|
+
type ActivityAvailabilityDetails = {
|
|
14597
|
+
activity_type: "activity-availability";
|
|
14598
|
+
products_available_length: number;
|
|
14599
|
+
msl_name: string;
|
|
14600
|
+
} & Pick<ActivityAvailability.Data, "msl_id">;
|
|
14601
|
+
type ActivityAvailabilityVisitDetails = {
|
|
14602
|
+
activity_type: "activity-availability";
|
|
14603
|
+
activity_id: StringId;
|
|
14604
|
+
products_available_length: number;
|
|
14605
|
+
msl_name: string;
|
|
14606
|
+
} & Pick<ActivityAvailability.Data, "time" | "msl_id">;
|
|
14607
|
+
type ActivityNoteDetails = {
|
|
14608
|
+
activity_type: "activity-note";
|
|
14609
|
+
} & Pick<ActivityNote.Data, "content">;
|
|
14610
|
+
type ActivityNoteVisitDetails = {
|
|
14611
|
+
activity_type: "activity-note";
|
|
14612
|
+
activity_id: StringId;
|
|
14613
|
+
} & Pick<ActivityNote.Data, "content" | "time">;
|
|
14614
|
+
type ActivityTaskDetails = {
|
|
14615
|
+
activity_type: "activity-task";
|
|
14616
|
+
} & Pick<ActivityTask.Data, "start_media" | "end_media">;
|
|
14617
|
+
type ActivityTaskVisitDetails = {
|
|
14618
|
+
activity_type: "activity-task";
|
|
14619
|
+
activity_id: StringId;
|
|
14620
|
+
} & Pick<ActivityTask.Data, "start_media" | "end_media" | "time">;
|
|
14621
|
+
type ActivityPlanogramDetails = {
|
|
14622
|
+
activity_type: "activity-planogram";
|
|
14623
|
+
msl_name: string;
|
|
14624
|
+
} & Pick<ActivityPlanogram.Data, "media" | "planogram_reason" | "msl_id">;
|
|
14625
|
+
type ActivityPlanogramVisitDetails = {
|
|
14626
|
+
activity_type: "activity-planogram";
|
|
14627
|
+
activity_id: StringId;
|
|
14628
|
+
msl_name: string;
|
|
14629
|
+
} & Pick<ActivityPlanogram.Data, "media" | "planogram_reason" | "time" | "msl_id">;
|
|
14630
|
+
type ActivityShelfshareDetails = {
|
|
14631
|
+
activity_type: "activity-shelfshare";
|
|
14632
|
+
msl_name: string;
|
|
14633
|
+
} & Pick<ActivityShelfshare.Data, "msl_length" | "total_msl_length" | "msl_id">;
|
|
14634
|
+
type ActivityShelfshareVisitDetails = {
|
|
14635
|
+
activity_type: "activity-shelfshare";
|
|
14636
|
+
activity_id: StringId;
|
|
14637
|
+
msl_name: string;
|
|
14638
|
+
} & Pick<ActivityShelfshare.Data, "msl_length" | "total_msl_length" | "time" | "msl_id">;
|
|
14639
|
+
type ActivitySecondaryDisplayDetails = {
|
|
14640
|
+
activity_type: "activity-secondary-display";
|
|
14641
|
+
msl_name: string;
|
|
14642
|
+
} & Pick<ActivitySecondaryDisplay.Data, "secondary_count" | "msl_id">;
|
|
14643
|
+
type ActivitySecondaryDisplayVisitDetails = {
|
|
14644
|
+
activity_type: "activity-secondary-display";
|
|
14645
|
+
activity_id: StringId;
|
|
14646
|
+
msl_name: string;
|
|
14647
|
+
} & Pick<ActivitySecondaryDisplay.Data, "secondary_count" | "time" | "msl_id">;
|
|
14648
|
+
type ActivityCheckoutDisplayDetails = {
|
|
14649
|
+
activity_type: "activity-checkout-display";
|
|
14650
|
+
msl_name: string;
|
|
14651
|
+
} & Pick<ActivityCheckoutDisplay.Data, "checkout_count" | "msl_id">;
|
|
14652
|
+
type ActivityCheckoutDisplayVisitDetails = {
|
|
14653
|
+
activity_type: "activity-checkout-display";
|
|
14654
|
+
activity_id: StringId;
|
|
14655
|
+
msl_name: string;
|
|
14656
|
+
} & Pick<ActivityCheckoutDisplay.Data, "checkout_count" | "time" | "msl_id">;
|
|
14657
|
+
type ActivityItemStatusDetails = {
|
|
14658
|
+
activity_type: "activity-item-status";
|
|
14659
|
+
items_length?: number;
|
|
14660
|
+
};
|
|
14661
|
+
type ActivityItemStatusVisitDetails = {
|
|
14662
|
+
activity_type: "activity-item-status";
|
|
14663
|
+
activity_id: StringId;
|
|
14664
|
+
items_length?: number;
|
|
14665
|
+
} & Pick<ActivityItemStatus.Data, "time">;
|
|
14666
|
+
type ActivityFormResultDetails = {
|
|
14667
|
+
activity_type: "activity-form-result";
|
|
14668
|
+
form_name?: string;
|
|
14669
|
+
} & Pick<ActivityFormResult.Data, "form_id">;
|
|
14670
|
+
type ActivityFormResultVisitDetails = {
|
|
14671
|
+
activity_type: "activity-form-result";
|
|
14672
|
+
activity_id: StringId;
|
|
14673
|
+
form_name?: string;
|
|
14674
|
+
} & Pick<ActivityFormResult.Data, "form_id" | "time">;
|
|
14675
|
+
type ActivityFormV2ResultDetails = {
|
|
14676
|
+
activity_type: "activity-form-v2-result";
|
|
14677
|
+
form_name?: string;
|
|
14678
|
+
} & Pick<ActivityFormV2Result.Data, "form_id" | "serial_number">;
|
|
14679
|
+
type ActivityFormV2ResultVisitDetails = {
|
|
14680
|
+
activity_type: "activity-form-v2-result";
|
|
14681
|
+
activity_id: StringId;
|
|
14682
|
+
form_name?: string;
|
|
14683
|
+
} & Pick<ActivityFormV2Result.Data, "form_id" | "serial_number" | "time">;
|
|
14684
|
+
type ActivityStorecheckDetails = {
|
|
14685
|
+
activity_type: "activity-storecheck";
|
|
14686
|
+
template_name?: string;
|
|
14687
|
+
} & Pick<ActivityStorecheck.Data, "template_id" | "serial_number">;
|
|
14688
|
+
type ActivityStorecheckVisitDetails = {
|
|
14689
|
+
activity_type: "activity-storecheck";
|
|
14690
|
+
activity_id: StringId;
|
|
14691
|
+
template_name?: string;
|
|
14692
|
+
} & Pick<ActivityStorecheck.Data, "template_id" | "serial_number" | "time">;
|
|
14693
|
+
type ActivityFeedbackDetails = {
|
|
14694
|
+
activity_type: "activity-feedback";
|
|
14695
|
+
feed_back_option_label?: string;
|
|
14696
|
+
} & Pick<ActivityFeedback.Data, "feed_back_option">;
|
|
14697
|
+
type ActivityFeedbackVisitDetails = {
|
|
14698
|
+
activity_type: "activity-feedback";
|
|
14699
|
+
activity_id: StringId;
|
|
14700
|
+
time?: number;
|
|
14701
|
+
feed_back_option_label?: string;
|
|
14702
|
+
} & Pick<ActivityFeedback.Data, "feed_back_option">;
|
|
14703
|
+
type ApprovalRequestDetails = {
|
|
14704
|
+
activity_type: "approval-request";
|
|
14705
|
+
} & Pick<ApprovalRequest.Data, "serial_number" | "type" | "subtype">;
|
|
14706
|
+
type ApprovalRequestVisitDetails = {
|
|
14707
|
+
activity_type: "approval-request";
|
|
14708
|
+
activity_id: StringId;
|
|
14709
|
+
} & Pick<ApprovalRequest.Data, "serial_number" | "type" | "subtype" | "time">;
|
|
14710
|
+
type ReminderDetails = {
|
|
14711
|
+
activity_type: "reminders";
|
|
14712
|
+
} & Pick<Reminder.Data, "content" | "cover_photo">;
|
|
14713
|
+
type AssetDetails = {
|
|
14714
|
+
activity_type: "asset";
|
|
14715
|
+
} & Pick<Asset.Data, "name">;
|
|
14716
|
+
type AssetUnitDetails = {
|
|
14717
|
+
activity_type: "asset-unit";
|
|
14718
|
+
} & Pick<AssetUnit.Data, "name">;
|
|
14719
|
+
type AssetPartDetails = {
|
|
14720
|
+
activity_type: "asset-part";
|
|
14721
|
+
} & Pick<AssetPart.Data, "name">;
|
|
14722
|
+
type AssetPartReceivalDetails = {
|
|
14723
|
+
activity_type: "asset-part-receival";
|
|
14724
|
+
} & Pick<AssetPartReceival.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_parts_count" | "total_asset_parts_qty">;
|
|
14725
|
+
type AssetPartReceivalVisitDetails = {
|
|
14726
|
+
activity_type: "asset-part-receival";
|
|
14727
|
+
activity_id: StringId;
|
|
14728
|
+
} & Pick<AssetPartReceival.Data, "serial_number" | "warehouse" | "warehouse_name" | "time" | "asset_parts_count" | "total_asset_parts_qty">;
|
|
14729
|
+
type AssetPartTransferDetails = {
|
|
14730
|
+
activity_type: "asset-part-transfer";
|
|
14731
|
+
} & Pick<AssetPartTransfer.Data, "serial_number" | "from" | "from_name" | "to" | "to_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
|
|
14732
|
+
type AssetPartTransferVisitDetails = {
|
|
14733
|
+
activity_type: "asset-part-transfer";
|
|
14734
|
+
activity_id: StringId;
|
|
14735
|
+
} & Pick<AssetPartTransfer.Data, "serial_number" | "from" | "from_name" | "to" | "to_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
|
|
14736
|
+
type ReturnAssetPartUnitDetails = {
|
|
14737
|
+
activity_type: "return-asset-part-unit";
|
|
14738
|
+
} & Pick<ReturnAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
|
|
14739
|
+
type ReturnAssetPartUnitVisitDetails = {
|
|
14740
|
+
activity_type: "return-asset-part-unit";
|
|
14741
|
+
activity_id: StringId;
|
|
14742
|
+
} & Pick<ReturnAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
|
|
14743
|
+
type StoreAssetPartUnitDetails = {
|
|
14744
|
+
activity_type: "store-asset-part-unit";
|
|
14745
|
+
} & Pick<StoreAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty">;
|
|
14746
|
+
type StoreAssetPartUnitVisitDetails = {
|
|
14747
|
+
activity_type: "store-asset-part-unit";
|
|
14748
|
+
activity_id: StringId;
|
|
14749
|
+
} & Pick<StoreAssetPartUnit.Data, "serial_number" | "warehouse" | "warehouse_name" | "asset_part_units_count" | "total_asset_part_units_qty" | "time">;
|
|
14750
|
+
type PaymentDetails = {
|
|
14751
|
+
activity_type: "payment";
|
|
14752
|
+
} & Pick<Payment.Data, "amount" | "serial_number" | "paytime" | "currency" | "payment_type">;
|
|
14753
|
+
type PaymentVisitDetails = {
|
|
14754
|
+
activity_type: "payment";
|
|
14755
|
+
activity_id: StringId;
|
|
14756
|
+
} & Pick<Payment.Data, "amount" | "serial_number" | "currency" | "payment_type" | "time">;
|
|
14757
|
+
type RefundDetails = {
|
|
14758
|
+
activity_type: "refund";
|
|
14759
|
+
} & Pick<Refund.Data, "amount" | "serial_number" | "paytime" | "currency" | "transaction_type">;
|
|
14760
|
+
type RefundVisitDetails = {
|
|
14761
|
+
activity_type: "refund";
|
|
14762
|
+
activity_id: StringId;
|
|
14763
|
+
} & Pick<Refund.Data, "amount" | "serial_number" | "currency" | "transaction_type" | "time">;
|
|
14764
|
+
type SettlementDetails = {
|
|
14765
|
+
activity_type: "settlement";
|
|
14766
|
+
} & Pick<Settlement.Data, "amount" | "serial_number" | "paytime" | "origin" | "payment_type">;
|
|
14767
|
+
type SettlementVisitDetails = {
|
|
14768
|
+
activity_type: "settlement";
|
|
14769
|
+
activity_id: StringId;
|
|
14770
|
+
} & Pick<Settlement.Data, "amount" | "serial_number" | "origin" | "payment_type" | "time">;
|
|
14771
|
+
type ConvertProformaDetails = {
|
|
14772
|
+
activity_type: "convert-proforma";
|
|
14773
|
+
proforma_reference: FullInvoice.Data["proforma_reference"];
|
|
14774
|
+
proforma_serial_number: Proforma.Data["serial_number"];
|
|
14775
|
+
invoice_serial_number: FullInvoice.Data["serial_number"];
|
|
14776
|
+
};
|
|
14777
|
+
type ConvertProformaVisitDetails = {
|
|
14778
|
+
activity_type: "convert-proforma";
|
|
14779
|
+
activity_id: StringId;
|
|
14780
|
+
proforma_serial_number: Proforma.Data["serial_number"];
|
|
14781
|
+
invoice_serial_number: FullInvoice.Data["serial_number"];
|
|
14782
|
+
time: number;
|
|
14783
|
+
proforma_reference: FullInvoice.Data["proforma_reference"];
|
|
14784
|
+
};
|
|
14785
|
+
type TransferDetails = {
|
|
14786
|
+
activity_type: "transfer";
|
|
14787
|
+
from_name: string;
|
|
14788
|
+
to_name: string;
|
|
14789
|
+
} & Pick<Transfer.Data, "type" | "serial_number" | "from" | "to" | "items_count" | "comment">;
|
|
14790
|
+
type ReceivingMaterialDetails = {
|
|
14791
|
+
activity_type: "receiving-material";
|
|
14792
|
+
to_name: string;
|
|
14793
|
+
} & Pick<ReceivingMaterial.Data, "serial_number" | "to" | "items_count" | "comment">;
|
|
14794
|
+
type FullInvoiceDetails = {
|
|
14795
|
+
activity_type: "fullinvoices";
|
|
14796
|
+
} & Pick<FullInvoice.Data, "total" | "serial_number" | "currency" | "issue_date" | "due_date" | "external_serial_number">;
|
|
14797
|
+
type FullInvoiceVisitDetails = {
|
|
14798
|
+
activity_type: "fullinvoices";
|
|
14799
|
+
activity_id: StringId;
|
|
14800
|
+
} & Pick<FullInvoice.Data, "total" | "serial_number" | "currency" | "time" | "issue_date" | "due_date" | "external_serial_number">;
|
|
14801
|
+
type ProformaDetails = {
|
|
14802
|
+
activity_type: "proforma";
|
|
14803
|
+
} & Pick<Proforma.Data, "total" | "serial_number" | "currency" | "issue_date" | "external_serial_number">;
|
|
14804
|
+
type ProformaVisitDetails = {
|
|
14805
|
+
activity_type: "proforma";
|
|
14806
|
+
activity_id: StringId;
|
|
14807
|
+
} & Pick<Proforma.Data, "total" | "serial_number" | "currency" | "time" | "issue_date" | "external_serial_number">;
|
|
14808
|
+
type WorkorderDetails = {
|
|
14809
|
+
activity_type: "workorder";
|
|
14810
|
+
} & Pick<Workorder.Data, "name" | "serial_number" | "due_date">;
|
|
14811
|
+
type WorkorderRequestDetails = {
|
|
14812
|
+
activity_type: "workorder-request";
|
|
14813
|
+
} & Pick<WorkorderRequest.Data, "name">;
|
|
14814
|
+
type ReturnWholeInvoiceDetails = {
|
|
14815
|
+
activity_type: "return-whole-invoice";
|
|
14816
|
+
returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
|
|
14817
|
+
} & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number">;
|
|
14818
|
+
type ReturnWholeInvoiceVisitDetails = {
|
|
14819
|
+
activity_type: "return-whole-invoice";
|
|
14820
|
+
activity_id: StringId;
|
|
14821
|
+
returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
|
|
14822
|
+
} & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number" | "time">;
|
|
14823
|
+
type VoidInvoiceDetails = {
|
|
14824
|
+
activity_type: "void-invoice";
|
|
14825
|
+
returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
|
|
14826
|
+
} & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number">;
|
|
14827
|
+
type VoidInvoiceVisitDetails = {
|
|
14828
|
+
activity_type: "void-invoice";
|
|
14829
|
+
activity_id: StringId;
|
|
14830
|
+
returned_from_serial_number: FullInvoice.Data["returned_from_serial_number"];
|
|
14831
|
+
} & Pick<FullInvoice.Data, "returned_from" | "returned_to_serial_number" | "time">;
|
|
14832
|
+
type CycleDetails = {
|
|
14833
|
+
activity_type: "cycle";
|
|
14834
|
+
stage_name?: string;
|
|
14835
|
+
} & Pick<Cycle.Data, "document_type" | "serial_number" | "document_id" | "status">;
|
|
14836
|
+
type ClientDetails = {
|
|
14837
|
+
activity_type: "client";
|
|
14838
|
+
} & Pick<Client.Data, "name" | "client_code" | "local_name">;
|
|
14839
|
+
export type PopulatedDoc = Data & {
|
|
14840
|
+
client_name?: string;
|
|
14841
|
+
client_code?: string;
|
|
14842
|
+
client_local_name?: string;
|
|
14843
|
+
client_customFields?: {
|
|
14844
|
+
[key: string]: any;
|
|
14845
|
+
};
|
|
14846
|
+
chain?: string;
|
|
14847
|
+
channel?: string;
|
|
14848
|
+
area_tags?: string[];
|
|
14849
|
+
client_tags?: string[];
|
|
14850
|
+
city?: string;
|
|
14851
|
+
state?: string;
|
|
14852
|
+
country?: string;
|
|
14853
|
+
rep_username?: string;
|
|
14854
|
+
rep_customFields: {
|
|
14855
|
+
[key: string]: any;
|
|
14856
|
+
};
|
|
14857
|
+
teams?: string[];
|
|
14858
|
+
};
|
|
14859
|
+
type SortingKeys = "_id";
|
|
14860
|
+
export namespace Find {
|
|
14861
|
+
type Params = DefaultPaginationQueryParams & {
|
|
14862
|
+
visit_mode?: boolean;
|
|
14863
|
+
admin?: StringId | StringId[];
|
|
14864
|
+
rep?: StringId | StringId[];
|
|
14865
|
+
sortBy?: {
|
|
14866
|
+
field: SortingKeys;
|
|
14867
|
+
type: "asc" | "desc";
|
|
14868
|
+
}[];
|
|
14869
|
+
_id?: StringId | StringId[];
|
|
14870
|
+
"user._id"?: StringId | StringId[];
|
|
14871
|
+
user?: StringId | StringId[];
|
|
14872
|
+
"user.type"?: Data["user"]["type"] | Data["user"]["type"][];
|
|
14873
|
+
user_type?: Data["user"]["type"] | Data["user"]["type"][];
|
|
14874
|
+
from_createdAt?: number;
|
|
14875
|
+
to_createdAt?: number;
|
|
14876
|
+
teams?: StringId | StringId[];
|
|
14877
|
+
activity_type?: Data["activity_type"] | Data["activity_type"][];
|
|
14878
|
+
action?: Data["action"] | Data["action"][];
|
|
14879
|
+
visit_id?: string | string[];
|
|
14880
|
+
activity_id?: StringId | StringId[];
|
|
14881
|
+
time?: number;
|
|
14882
|
+
from_time?: number;
|
|
14883
|
+
to_time?: number;
|
|
14884
|
+
sync_id?: string | string[];
|
|
14885
|
+
client?: StringId | StringId[];
|
|
14886
|
+
"details.activities.activity_type"?: VisitDetails["activities"][0]["activity_type"] | VisitDetails["activities"][0]["activity_type"][];
|
|
14887
|
+
chain?: StringId | StringId[];
|
|
14888
|
+
channel?: StringId | StringId[];
|
|
14889
|
+
city?: string | string[];
|
|
14890
|
+
region?: string | string[];
|
|
14891
|
+
state?: string | string[];
|
|
14892
|
+
country?: string | string[];
|
|
14893
|
+
tags?: StringId | StringId[];
|
|
14894
|
+
CLIENT_TAGS?: StringId | StringId[];
|
|
14895
|
+
AREA_TAGS?: StringId | StringId[];
|
|
14896
|
+
with_media?: boolean;
|
|
14897
|
+
with_client_customFields?: boolean;
|
|
14898
|
+
with_client_details?: boolean;
|
|
14899
|
+
with_chain?: boolean;
|
|
14900
|
+
with_channel?: boolean;
|
|
14901
|
+
with_area_tags?: boolean;
|
|
14902
|
+
with_tags?: boolean;
|
|
14903
|
+
with_client_tags?: boolean;
|
|
14904
|
+
with_teams?: boolean;
|
|
14905
|
+
with_rep_details?: boolean;
|
|
14906
|
+
with_rep_customFields?: boolean;
|
|
14907
|
+
};
|
|
14908
|
+
interface Result extends DefaultPaginationResult {
|
|
14909
|
+
data: PopulatedDoc[];
|
|
14910
|
+
}
|
|
14911
|
+
}
|
|
14912
|
+
export {};
|
|
14913
|
+
}
|
|
14914
|
+
}
|
|
14915
|
+
export type StringId = string;
|
|
14916
|
+
export type NameSpaces = string[];
|
|
14917
|
+
export interface Admin {
|
|
14918
|
+
_id: StringId;
|
|
14919
|
+
name?: string;
|
|
14920
|
+
type: "admin";
|
|
14921
|
+
admin?: StringId;
|
|
14922
|
+
}
|
|
14923
|
+
export interface Rep {
|
|
14924
|
+
_id: StringId;
|
|
14925
|
+
name?: string;
|
|
14926
|
+
type: "rep";
|
|
14927
|
+
rep?: StringId;
|
|
14928
|
+
}
|
|
14929
|
+
export interface AdminOrRep {
|
|
14930
|
+
_id: StringId;
|
|
14931
|
+
name?: string;
|
|
14932
|
+
type: "admin" | "rep";
|
|
14933
|
+
admin?: StringId;
|
|
14934
|
+
rep?: StringId;
|
|
14935
|
+
}
|
|
14936
|
+
export interface AdminOrRepOrTenant {
|
|
14937
|
+
_id: StringId;
|
|
14938
|
+
type: "admin" | "rep" | "tenant";
|
|
14939
|
+
name?: string;
|
|
14940
|
+
admin?: StringId;
|
|
14941
|
+
rep?: StringId;
|
|
14942
|
+
tenant?: StringId;
|
|
14943
|
+
}
|
|
14944
|
+
export interface AdminOrRepOrTenantOrClient {
|
|
14945
|
+
_id: StringId;
|
|
14946
|
+
type: "admin" | "rep" | "tenant" | "client";
|
|
14947
|
+
name?: string;
|
|
14948
|
+
admin?: StringId;
|
|
14949
|
+
rep?: StringId;
|
|
14950
|
+
tenant?: StringId;
|
|
14951
|
+
client?: StringId;
|
|
14952
|
+
}
|
|
14953
|
+
interface ValidityCheck {
|
|
14954
|
+
valid: boolean;
|
|
14955
|
+
reasons: {
|
|
14956
|
+
message: string;
|
|
14957
|
+
code: string;
|
|
14958
|
+
}[];
|
|
14959
|
+
}
|
|
14960
|
+
type PopulatedMediaStorage = Pick<Service.MediaStorage.MediaStorageSchema, "_id" | "createdAt" | "ContentType" | "media_type" | "mime_type" | "publicUrl" | "type_name" | "file_name" | "media_id" | "thumbnails" | "createdAt"> & {
|
|
14961
|
+
thumbnails: Pick<Service.MediaStorage.Thumbnail, "_id" | "ContentType" | "mime_type" | "publicUrl" | "type_name" | "file_name" | "createdAt">[];
|
|
14962
|
+
};
|
|
14963
|
+
interface ActivityComment {
|
|
14964
|
+
time: number;
|
|
14965
|
+
user_name: string;
|
|
14966
|
+
user_id: string;
|
|
14967
|
+
user_type: string;
|
|
14968
|
+
comment: string;
|
|
14969
|
+
}
|
|
14970
|
+
interface ActivityReview {
|
|
14971
|
+
admin_id: string;
|
|
14972
|
+
time: number;
|
|
14973
|
+
}
|
|
14974
|
+
interface ActivityAdminNote {
|
|
14975
|
+
admin_name: string;
|
|
14976
|
+
note: string;
|
|
14977
|
+
admin_id: string;
|
|
14978
|
+
time: number;
|
|
14979
|
+
}
|
|
13663
14980
|
export {};
|