repzo 1.0.246 → 1.0.248

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.
@@ -4970,11 +4970,7 @@ export declare namespace Service {
4970
4970
  score?: number;
4971
4971
  is_completed?: boolean;
4972
4972
  forms_v2?: {
4973
- form_id: StringId | {
4974
- _id: StringId;
4975
- name: string;
4976
- local_name?: string;
4977
- };
4973
+ form_id: StringId | Pick<FormV2.Data, "_id" | "name" | "local_name">;
4978
4974
  form_activity_id?: StringId;
4979
4975
  completion_required_for_dunning?: boolean;
4980
4976
  score_required_for_dunning?: boolean;
@@ -14203,235 +14199,6 @@ export declare namespace Service {
14203
14199
  current_granularity?: Granularity;
14204
14200
  }
14205
14201
  }
14206
- namespace FormV2 {
14207
- export interface Visibility {
14208
- operator: "and" | "or";
14209
- conditions: {
14210
- division_id: string;
14211
- field_id: string;
14212
- type: "Boolean" | "List" | "YesNo";
14213
- custom_list?: string | CustomList.Data;
14214
- operator: "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin";
14215
- value: any[];
14216
- }[];
14217
- }
14218
- export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
14219
- export type FormV2FieldType = (typeof fieldType_enums)[number];
14220
- interface FieldPrintSettings {
14221
- three_inch: {
14222
- grid_column?: 1 | 2;
14223
- alignment?: "right" | "left" | "center";
14224
- border_width?: number;
14225
- label_font_size?: number;
14226
- value_font_size?: number;
14227
- media_height?: number | string;
14228
- media_width?: number | string;
14229
- align_media?: "right" | "left" | "center";
14230
- label_value_spacing?: number;
14231
- is_hidden?: boolean;
14232
- };
14233
- }
14234
- interface UsedField {
14235
- code: string;
14236
- key: string;
14237
- data_type: AvailableField.Data["data_type"];
14238
- field_type: "template_field" | "source_attribute" | "activity_attribute";
14239
- label: string;
14240
- isArray?: boolean;
14241
- formula_key: string;
14242
- field_id?: string;
14243
- example_value: AvailableField.Data["data_type"];
14244
- manipulator_function?: string;
14245
- lookup?: {
14246
- from?: string;
14247
- localField?: string;
14248
- foreignField?: string;
14249
- as?: string;
14250
- select?: string;
14251
- unwind?: boolean;
14252
- filter?: {
14253
- input?: string;
14254
- as: string;
14255
- cond: any;
14256
- };
14257
- };
14258
- }
14259
- export interface Field {
14260
- _id?: string;
14261
- name: string;
14262
- local_name?: string;
14263
- description?: string;
14264
- local_description?: string;
14265
- type: FormV2FieldType;
14266
- isArray?: boolean;
14267
- isRequired?: boolean;
14268
- disabled?: boolean;
14269
- formula_key?: string;
14270
- scoring_enabled?: boolean;
14271
- required_for_completion?: boolean;
14272
- visibility?: Visibility;
14273
- default_value?: any[];
14274
- custom_list?: string | CustomList.Data;
14275
- is_na_allowed?: boolean;
14276
- score_accumulator_type?: "max" | "sum";
14277
- yes_score?: number;
14278
- no_score?: number;
14279
- na_score?: number;
14280
- exist_score?: number;
14281
- media?: (string | MediaDoc)[];
14282
- invisible: boolean;
14283
- parent_field?: string;
14284
- custom_list_element?: string;
14285
- force_live_photo?: boolean;
14286
- min?: number;
14287
- max?: number;
14288
- is_integer?: boolean;
14289
- styles?: "check_list" | "toggle_yes_no_na" | "toggle_yes_no" | "buttons";
14290
- field_print_settings?: FieldPrintSettings;
14291
- is_calculated_field?: boolean;
14292
- formula?: string;
14293
- used_fields?: UsedField[];
14294
- }
14295
- interface Division {
14296
- _id: string;
14297
- name: string;
14298
- local_name?: string;
14299
- description?: string;
14300
- local_description?: string;
14301
- disabled?: boolean;
14302
- min_questions_to_answer_for_completion?: number;
14303
- min_score_for_completion?: number;
14304
- visibility?: Visibility;
14305
- fields: Field[];
14306
- }
14307
- interface PrintSettings {
14308
- three_inch: {
14309
- grid_columns?: 1 | 2;
14310
- logo_height?: number | string;
14311
- logo_width?: number | string;
14312
- align_logo?: "right" | "left" | "center";
14313
- space_y?: number;
14314
- };
14315
- A_four: {
14316
- banner_media?: string;
14317
- banner_height: number;
14318
- banner_width: number;
14319
- align_banner: "right" | "left" | "center";
14320
- header_label_font_size: number;
14321
- header_value_font_size: number;
14322
- align_header: "right" | "left" | "center";
14323
- division_name_font_size: number;
14324
- align_division: "right" | "left" | "center";
14325
- grid_columns: 1 | 2 | 3 | 4;
14326
- space_y: number;
14327
- field_label_size: number;
14328
- field_value_size: number;
14329
- footer_media?: string;
14330
- align_footer_media: "right" | "left" | "center";
14331
- footer_media_height: number;
14332
- footer_media_width: number;
14333
- footer_details: string;
14334
- align_footer_details: "right" | "left" | "center";
14335
- compressed_media_size: "original" | "small" | "medium" | "large" | "extra";
14336
- view_custom_list_element: boolean;
14337
- };
14338
- }
14339
- export interface Data {
14340
- _id: string;
14341
- disabled: boolean;
14342
- name: string;
14343
- local_name?: string;
14344
- description?: string;
14345
- local_description?: string;
14346
- copied_from?: string;
14347
- scoring_enabled?: boolean;
14348
- completion_rules_enabled?: boolean;
14349
- min_questions_to_answer_for_completion?: number;
14350
- min_score_for_completion?: number;
14351
- divisions: Division[];
14352
- company_namespace: string[];
14353
- print_settings?: PrintSettings;
14354
- createdAt: Date;
14355
- updatedAt: Date;
14356
- }
14357
- export {};
14358
- }
14359
- namespace ActivityFormV2Result {
14360
- const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
14361
- type FormV2FieldType = (typeof fieldType_enums)[number];
14362
- interface FieldResult {
14363
- _id?: string;
14364
- field_id: string;
14365
- name: string;
14366
- type: FormV2FieldType;
14367
- isArray?: boolean;
14368
- isRequired?: boolean;
14369
- custom_list?: string;
14370
- formula_key?: string;
14371
- is_calculated_field?: boolean;
14372
- calculation_status?: "success" | "failed";
14373
- calculation_error?: any[];
14374
- score?: number;
14375
- is_completed?: boolean;
14376
- result: string[] | number[] | ["yes"] | ["no"] | ["na"] | [] | {
14377
- coordinates: [number, number];
14378
- type: "Point";
14379
- }[] | {
14380
- _id: string;
14381
- value: string | number;
14382
- type: "Number" | "String";
14383
- score?: number;
14384
- }[];
14385
- }
14386
- interface DivisionResult {
14387
- _id: string;
14388
- division_id: string;
14389
- name: string;
14390
- score?: number;
14391
- is_completed?: boolean;
14392
- fields: FieldResult[];
14393
- }
14394
- interface Data {
14395
- _id: string;
14396
- creator: AdminOrRepOrTenantOrClient;
14397
- editor?: AdminOrRepOrTenantOrClient;
14398
- serial_number: SerialNumber;
14399
- teams: string[];
14400
- tags: string[];
14401
- time: number;
14402
- client?: string;
14403
- client_name?: string;
14404
- visit?: string;
14405
- visit_id?: string;
14406
- route?: string;
14407
- workorder?: string;
14408
- sync_id: string;
14409
- geo_tag?: GeoTag;
14410
- geoPoint?: GeoPoint;
14411
- platform?: string;
14412
- version_name?: string;
14413
- battery_level?: number;
14414
- device_brand?: string;
14415
- device_os?: string;
14416
- device_os_version?: string;
14417
- device_model?: string;
14418
- identifier?: number;
14419
- device_id?: string;
14420
- device_unique_id?: string;
14421
- network_state?: number;
14422
- time_zone?: string;
14423
- job_start_time?: number;
14424
- job_end_time?: number;
14425
- job_duration?: number;
14426
- form_id: string;
14427
- results: DivisionResult[];
14428
- score?: number;
14429
- is_completed: boolean;
14430
- company_namespace: string[];
14431
- createdAt: Date;
14432
- updatedAt: Date;
14433
- }
14434
- }
14435
14202
  namespace ActivityItemStatus {
14436
14203
  type ItemStatus = "current_user" | "non_user" | "generic_user" | "competitor_user" | "other";
14437
14204
  interface Item {
@@ -14819,11 +14586,11 @@ export declare namespace Service {
14819
14586
  type Data = AuthenticateAdmin.Data | AuthenticateRep.Data;
14820
14587
  }
14821
14588
  namespace ResetCompanyNamespace {
14822
- export type Services = "rep" | "client" | "product" | "teams" | "tag" | "warehouse" | "msl" | "msl_product" | "job_category" | "role" | "user_role" | "availability_msl" | "media" | "reminder" | "approval" | "custom_field" | "custom_status" | "return_reason" | "feedback_option" | "promotion" | "route" | "address" | "payment_term" | "speciality" | "client_channel" | "client_contact" | "client_location" | "client_status" | "tax" | "measureunits" | "measureunit_family" | "variant" | "brand" | "product_group" | "product_category" | "product_subcategory" | "product_modifier_group" | "product_modifier" | "price_list" | "price_list_item" | "asset" | "asset_unit" | "asset_type" | "workorder_category" | "workorder_request" | "workorder" | "workorder_alarm" | "comments_thread" | "thumbnail_storage" | "media_storage" | "form" | "banner" | "payment_method" | "shipping_zone" | "shipping_method" | "active_client" | "transaction" | "ledger_payment" | "ledger_goods" | "transfer" | "payment" | "refund" | "receiving_material" | "full_invoice" | "cart" | "cart_history" | "proforma" | "settlement" | "adjust_account" | "adjust_inventory" | "cycle" | "check" | "failed_linking_txn" | "failed_adjust_account" | "failed_adjust_inventory" | "failed_cart" | "failed_emails" | "failed_invoices" | "failed_payments" | "failed_proforma_invoices" | "failed_receiving_material" | "failed_refund" | "failed_settlement" | "failed_transfer" | "failed_transaction" | "failed_set_txn_alarm" | "target_group" | "target_rule" | "target_result" | "target_result_history" | "widget_dashboard" | "widget" | "line" | "classification_line" | "line_target" | "client_line" | "day" | "visit" | "activity_audit" | "activity_availability" | "activity_checkout_display" | "activity_feedback" | "activity_form_result" | "activity_note" | "activity_photo" | "activity_planogram" | "activity_secondary_display" | "activity_shelfshare" | "activity_task" | "item_status" | "item_status_type" | "job_result" | "click" | "events_log" | "activity_storecheck" | "custom_list" | "custom_list_item" | "storecheck_template" | "preset" | "retail_execution_previous_result" | "retail_execution_report_view" | "calendar" | "plan" | "integration_app" | "integration_action_log" | "integration_command_log" | "integration_trigger" | "scheduled_email" | "territory" | "territory_level" | "territory_template" | "notifications_center" | "bulk_import" | "email_history" | "big_report" | "history" | "bulk_export" | "generate_rule" | "workorder_portal" | "workorder_portal_link" | "print_workorder_portal_link" | "print_workorder_portal_link_options" | "quick_convert_to_pdf" | "variant_batch" | "form_v2" | "activity_form_v2" | "unSynced_log" | "aiApiHistory" | "bulk_convert_proforma" | "approval_request" | "workflow" | "workflow_version" | "workflow_execution" | "ocr_invoice_job" | "ocr_invoice_job_template" | "ocr_invoice_job_page" | "inventory_adjustment_reason" | "supplier" | "product_audit_trace" | "contract" | "contract_installment" | "old_activity_form_v2" | "old_activity_storecheck" | "bi_view" | "bi_bucket" | "old_bi_bucket" | "bi_view_buckets_total" | "bi_view_instance" | "bi_view_version" | "blank_photo_rep" | "failed_bi_bucket_log" | "failed_consume_bi_alarm" | "failed_set_bi_alarm" | "oauth2_tokens" | "report_ubl_invoice" | "client_ubl_info" | "invoice_alert" | "login_device" | "asset_part_type" | "asset_part" | "asset_part_unit" | "asset_part_transaction" | "asset_part_receival" | "asset_part_transfer" | "return_asset_part_unit" | "store_asset_part_unit" | "activity_ai_sales_order" | "ocr_invoice_job_group" | "ubl_health_check" | "ubl_integration" | "ubl_connection_attempts" | "ai_object_detection_dataset" | "ai_object_detection_label" | "ai_object_detection_task" | "ai_object_detection_model" | "ai_object_detection_model_version" | "promotions_group";
14589
+ export type Services = "rep" | "client" | "product" | "teams" | "tag" | "warehouse" | "msl" | "msl_product" | "job_category" | "role" | "user_role" | "availability_msl" | "media" | "reminder" | "approval" | "custom_field" | "custom_status" | "return_reason" | "feedback_option" | "promotion" | "route" | "address" | "payment_term" | "speciality" | "client_channel" | "client_contact" | "client_location" | "client_status" | "tax" | "measureunits" | "measureunit_family" | "variant" | "brand" | "product_group" | "product_category" | "product_subcategory" | "product_modifier_group" | "product_modifier" | "price_list" | "price_list_item" | "asset" | "asset_unit" | "asset_type" | "workorder_category" | "workorder_request" | "workorder" | "workorder_alarm" | "comments_thread" | "thumbnail_storage" | "media_storage" | "form" | "banner" | "payment_method" | "shipping_zone" | "shipping_method" | "active_client" | "transaction" | "ledger_payment" | "ledger_goods" | "transfer" | "payment" | "refund" | "receiving_material" | "full_invoice" | "cart" | "cart_history" | "proforma" | "settlement" | "adjust_account" | "adjust_inventory" | "cycle" | "check" | "failed_linking_txn" | "failed_adjust_account" | "failed_adjust_inventory" | "failed_cart" | "failed_emails" | "failed_invoices" | "failed_payments" | "failed_proforma_invoices" | "failed_receiving_material" | "failed_refund" | "failed_settlement" | "failed_transfer" | "failed_transaction" | "failed_set_txn_alarm" | "target_group" | "target_rule" | "target_result" | "target_result_history" | "widget_dashboard" | "widget" | "line" | "classification_line" | "line_target" | "client_line" | "day" | "visit" | "activity_audit" | "activity_availability" | "activity_checkout_display" | "activity_feedback" | "activity_form_result" | "activity_note" | "activity_photo" | "activity_planogram" | "activity_secondary_display" | "activity_shelfshare" | "activity_task" | "item_status" | "item_status_type" | "job_result" | "click" | "events_log" | "activity_storecheck" | "custom_list" | "custom_list_item" | "storecheck_template" | "preset" | "retail_execution_previous_result" | "retail_execution_report_view" | "calendar" | "plan" | "integration_app" | "integration_action_log" | "integration_command_log" | "integration_trigger" | "scheduled_email" | "territory" | "territory_level" | "territory_template" | "notifications_center" | "bulk_import" | "email_history" | "big_report" | "history" | "bulk_export" | "generate_rule" | "workorder_portal" | "workorder_portal_link" | "print_workorder_portal_link" | "print_workorder_portal_link_options" | "quick_convert_to_pdf" | "variant_batch" | "form_v2" | "activity_form_v2" | "unSynced_log" | "aiApiHistory" | "bulk_convert_proforma" | "approval_request" | "workflow" | "workflow_version" | "workflow_execution" | "ocr_invoice_job" | "ocr_invoice_job_template" | "ocr_invoice_job_page" | "inventory_adjustment_reason" | "supplier" | "product_audit_trace" | "contract" | "contract_installment" | "old_activity_form_v2" | "old_activity_storecheck" | "bi_view" | "bi_bucket" | "old_bi_bucket" | "bi_view_buckets_total" | "bi_view_instance" | "bi_view_version" | "blank_photo_rep" | "failed_bi_bucket_log" | "failed_consume_bi_alarm" | "failed_set_bi_alarm" | "oauth2_tokens" | "report_ubl_invoice" | "client_ubl_info" | "invoice_alert" | "login_device" | "asset_part_type" | "asset_part" | "asset_part_unit" | "asset_part_transaction" | "asset_part_receival" | "asset_part_transfer" | "return_asset_part_unit" | "store_asset_part_unit" | "activity_ai_sales_order" | "ocr_invoice_job_group" | "ubl_health_check" | "ubl_integration" | "ubl_connection_attempts" | "ai_object_detection_dataset" | "ai_object_detection_label" | "ai_object_detection_task" | "ai_object_detection_model" | "ai_object_detection_model_version" | "promotions_group" | "module_custom_validator" | "report_view" | "report_view_favorite" | "report_view_favorite" | "report_view_default" | "clm_presentation" | "clm_sequence" | "clm_slide" | "clm_feedback_activity";
14823
14590
  type ServiceOptionMap = {
14824
14591
  [key in Services]: {
14825
14592
  checked: boolean;
14826
- prevent_delete_without: Services[];
14593
+ prevent_delete_without?: Services[];
14827
14594
  };
14828
14595
  };
14829
14596
  type Status = "initiated" | "building_report_in_progress" | "building_report_completed" | "building_report_failed" | "reset_in_progress" | "reset_success" | "reset_failed";
@@ -17722,6 +17489,393 @@ export declare namespace Service {
17722
17489
  type Result = Data;
17723
17490
  }
17724
17491
  }
17492
+ namespace FormV2 {
17493
+ export interface Visibility {
17494
+ operator: "and" | "or";
17495
+ conditions: {
17496
+ division_id: string;
17497
+ field_id: string;
17498
+ type: "Boolean" | "List" | "YesNo";
17499
+ custom_list?: string | CustomList.Data;
17500
+ operator: "lte" | "lt" | "gte" | "gt" | "eq" | "ne" | "in" | "nin";
17501
+ value: any[];
17502
+ }[];
17503
+ }
17504
+ export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
17505
+ export type FormV2FieldType = (typeof fieldType_enums)[number];
17506
+ interface FieldPrintSettings {
17507
+ three_inch: {
17508
+ grid_column?: 1 | 2;
17509
+ alignment?: "right" | "left" | "center";
17510
+ border_width?: number;
17511
+ label_font_size?: number;
17512
+ value_font_size?: number;
17513
+ media_height?: number | string;
17514
+ media_width?: number | string;
17515
+ align_media?: "right" | "left" | "center";
17516
+ label_value_spacing?: number;
17517
+ is_hidden?: boolean;
17518
+ };
17519
+ }
17520
+ interface UsedField {
17521
+ code: string;
17522
+ key: string;
17523
+ data_type: AvailableField.Data["data_type"];
17524
+ field_type: "template_field" | "source_attribute" | "activity_attribute";
17525
+ label: string;
17526
+ isArray?: boolean;
17527
+ formula_key: string;
17528
+ field_id?: string;
17529
+ example_value: AvailableField.Data["data_type"];
17530
+ manipulator_function?: string;
17531
+ lookup?: {
17532
+ from?: string;
17533
+ localField?: string;
17534
+ foreignField?: string;
17535
+ as?: string;
17536
+ select?: string;
17537
+ unwind?: boolean;
17538
+ filter?: {
17539
+ input?: string;
17540
+ as: string;
17541
+ cond: any;
17542
+ };
17543
+ };
17544
+ }
17545
+ export interface Field {
17546
+ _id?: string;
17547
+ name: string;
17548
+ local_name?: string;
17549
+ description?: string;
17550
+ local_description?: string;
17551
+ type: FormV2FieldType;
17552
+ isArray?: boolean;
17553
+ isRequired?: boolean;
17554
+ disabled?: boolean;
17555
+ formula_key?: string;
17556
+ scoring_enabled?: boolean;
17557
+ required_for_completion?: boolean;
17558
+ visibility?: Visibility;
17559
+ default_value?: any[];
17560
+ custom_list?: string | CustomList.Data;
17561
+ is_na_allowed?: boolean;
17562
+ score_accumulator_type?: "max" | "sum";
17563
+ yes_score?: number;
17564
+ no_score?: number;
17565
+ na_score?: number;
17566
+ exist_score?: number;
17567
+ media?: (string | MediaDoc)[];
17568
+ invisible: boolean;
17569
+ parent_field?: string;
17570
+ custom_list_element?: string;
17571
+ force_live_photo?: boolean;
17572
+ min?: number;
17573
+ max?: number;
17574
+ is_integer?: boolean;
17575
+ styles?: "check_list" | "toggle_yes_no_na" | "toggle_yes_no" | "buttons";
17576
+ field_print_settings?: FieldPrintSettings;
17577
+ is_calculated_field?: boolean;
17578
+ formula?: string;
17579
+ used_fields?: UsedField[];
17580
+ }
17581
+ interface Division {
17582
+ _id: string;
17583
+ name: string;
17584
+ local_name?: string;
17585
+ description?: string;
17586
+ local_description?: string;
17587
+ disabled?: boolean;
17588
+ min_questions_to_answer_for_completion?: number;
17589
+ min_score_for_completion?: number;
17590
+ visibility?: Visibility;
17591
+ fields: Field[];
17592
+ }
17593
+ interface PrintSettings {
17594
+ three_inch: {
17595
+ grid_columns?: 1 | 2;
17596
+ logo_height?: number | string;
17597
+ logo_width?: number | string;
17598
+ align_logo?: "right" | "left" | "center";
17599
+ space_y?: number;
17600
+ };
17601
+ A_four: {
17602
+ banner_media?: string | MediaDoc;
17603
+ banner_height: number;
17604
+ banner_width: number;
17605
+ align_banner: "right" | "left" | "center";
17606
+ header_label_font_size: number;
17607
+ header_value_font_size: number;
17608
+ align_header: "right" | "left" | "center";
17609
+ division_name_font_size: number;
17610
+ align_division: "right" | "left" | "center";
17611
+ grid_columns: 1 | 2 | 3 | 4;
17612
+ space_y: number;
17613
+ field_label_size: number;
17614
+ field_value_size: number;
17615
+ footer_media?: string | MediaDoc;
17616
+ align_footer_media: "right" | "left" | "center";
17617
+ footer_media_height: number;
17618
+ footer_media_width: number;
17619
+ footer_details: string;
17620
+ align_footer_details: "right" | "left" | "center";
17621
+ compressed_media_size: "original" | "small" | "medium" | "large" | "extra";
17622
+ view_custom_list_element: boolean;
17623
+ };
17624
+ }
17625
+ export interface Data {
17626
+ _id: string;
17627
+ disabled: boolean;
17628
+ name: string;
17629
+ local_name?: string;
17630
+ description?: string;
17631
+ local_description?: string;
17632
+ copied_from?: string;
17633
+ scoring_enabled?: boolean;
17634
+ completion_rules_enabled?: boolean;
17635
+ min_questions_to_answer_for_completion?: number;
17636
+ min_score_for_completion?: number;
17637
+ divisions: Division[];
17638
+ company_namespace: string[];
17639
+ print_settings?: PrintSettings;
17640
+ createdAt: Date;
17641
+ updatedAt: Date;
17642
+ }
17643
+ export interface CreateBody {
17644
+ disabled?: boolean;
17645
+ name: string;
17646
+ local_name?: string;
17647
+ description?: string;
17648
+ local_description?: string;
17649
+ copied_from?: string;
17650
+ scoring_enabled?: boolean;
17651
+ completion_rules_enabled?: boolean;
17652
+ min_questions_to_answer_for_completion?: number;
17653
+ min_score_for_completion?: number;
17654
+ divisions: Division[];
17655
+ company_namespace?: string[];
17656
+ print_settings?: PrintSettings;
17657
+ }
17658
+ export type UpdateBody = Partial<Data>;
17659
+ export type PopulatedDoc = Data & {
17660
+ presentation_populated?: CLMPresentation.Data;
17661
+ sequence_populated?: Pick<CLMSequence.Data, "position" | "_id" | "product" | "presentation">[];
17662
+ photo_media_populated?: PopulatedMediaStorage & {
17663
+ ContentLength?: number;
17664
+ };
17665
+ };
17666
+ type PopulatedKeys = "custom_list" | "media" | "banner_media" | "footer_media";
17667
+ type SortingKeys = "_id" | "position" | "updatedAt";
17668
+ export namespace Find {
17669
+ type Params = DefaultPaginationQueryParams & {
17670
+ sortBy?: {
17671
+ field: SortingKeys;
17672
+ type: "asc" | "desc";
17673
+ }[];
17674
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
17675
+ _id?: StringId | StringId[];
17676
+ search?: string;
17677
+ name?: string;
17678
+ scoring_enabled?: boolean | boolean[];
17679
+ completion_rules_enabled?: boolean | boolean[];
17680
+ disabled?: boolean;
17681
+ };
17682
+ interface Result extends DefaultPaginationResult {
17683
+ data: PopulatedDoc[];
17684
+ }
17685
+ }
17686
+ export namespace Get {
17687
+ type ID = string;
17688
+ type Params = {
17689
+ populatedKeys?: PopulatedKeys[];
17690
+ };
17691
+ type Result = PopulatedDoc & {
17692
+ can_edit_types?: boolean;
17693
+ };
17694
+ }
17695
+ export namespace Create {
17696
+ type Body = CreateBody;
17697
+ type Result = Data;
17698
+ }
17699
+ export namespace Update {
17700
+ type ID = StringId;
17701
+ type Body = UpdateBody;
17702
+ type Result = Data;
17703
+ }
17704
+ export namespace Remove {
17705
+ type ID = string;
17706
+ type Result = Data;
17707
+ }
17708
+ export {};
17709
+ }
17710
+ namespace ActivityFormV2Result {
17711
+ export const fieldType_enums: readonly ["Text", "String", "Phone", "Email", "Date", "Number", "List", "Separator", "Heading", "Media", "Signature", "DateTime", "YesNo", "ProductBarcodeScan", "BarcodeScan", "GeoPoint"];
17712
+ export type FormV2FieldType = (typeof fieldType_enums)[number];
17713
+ export interface FieldResult {
17714
+ _id?: string;
17715
+ field_id: string;
17716
+ name: string;
17717
+ type: FormV2FieldType;
17718
+ isArray?: boolean;
17719
+ isRequired?: boolean;
17720
+ custom_list?: string;
17721
+ formula_key?: string;
17722
+ is_calculated_field?: boolean;
17723
+ calculation_status?: "success" | "failed";
17724
+ calculation_error?: any[];
17725
+ score?: number;
17726
+ is_completed?: boolean;
17727
+ result: string[] | number[] | ["yes"] | ["no"] | ["na"] | [] | {
17728
+ coordinates: [number, number];
17729
+ type: "Point";
17730
+ }[] | {
17731
+ _id: string;
17732
+ value: string | number;
17733
+ type: "Number" | "String";
17734
+ score?: number;
17735
+ }[];
17736
+ }
17737
+ export interface DivisionResult {
17738
+ _id?: string;
17739
+ division_id: string;
17740
+ name: string;
17741
+ score?: number;
17742
+ is_completed?: boolean;
17743
+ fields: FieldResult[];
17744
+ }
17745
+ export interface Data {
17746
+ _id: StringId;
17747
+ creator: AdminOrRepOrTenantOrClient;
17748
+ editor?: AdminOrRepOrTenantOrClient;
17749
+ serial_number: SerialNumber;
17750
+ teams: StringId[];
17751
+ tags: StringId[];
17752
+ time: number;
17753
+ client?: StringId;
17754
+ client_name?: string;
17755
+ visit?: StringId;
17756
+ visit_id?: string;
17757
+ route?: StringId;
17758
+ workorder?: StringId;
17759
+ sync_id: string;
17760
+ geo_tag?: GeoTag;
17761
+ geoPoint?: GeoPoint;
17762
+ platform?: string;
17763
+ version_name?: string;
17764
+ battery_level?: number;
17765
+ device_brand?: string;
17766
+ device_os?: string;
17767
+ device_os_version?: string;
17768
+ device_model?: string;
17769
+ identifier?: number;
17770
+ device_id?: string;
17771
+ device_unique_id?: string;
17772
+ network_state?: number;
17773
+ time_zone?: string;
17774
+ job_start_time?: number;
17775
+ job_end_time?: number;
17776
+ job_duration?: number;
17777
+ form_id: StringId;
17778
+ results: DivisionResult[];
17779
+ score?: number;
17780
+ is_completed: boolean;
17781
+ company_namespace: string[];
17782
+ createdAt: Date;
17783
+ updatedAt: Date;
17784
+ }
17785
+ export interface CreateBody {
17786
+ creator: AdminOrRepOrTenantOrClient;
17787
+ serial_number?: SerialNumber;
17788
+ teams?: StringId[];
17789
+ tags?: StringId[];
17790
+ time?: number;
17791
+ client?: StringId;
17792
+ client_name?: string;
17793
+ visit?: StringId;
17794
+ visit_id?: string;
17795
+ route?: StringId;
17796
+ workorder?: StringId;
17797
+ sync_id: string;
17798
+ geo_tag?: GeoTag;
17799
+ geoPoint?: GeoPoint;
17800
+ platform?: string;
17801
+ version_name?: string;
17802
+ battery_level?: number;
17803
+ device_brand?: string;
17804
+ device_os?: string;
17805
+ device_os_version?: string;
17806
+ device_model?: string;
17807
+ identifier?: number;
17808
+ device_id?: string;
17809
+ device_unique_id?: string;
17810
+ network_state?: number;
17811
+ time_zone?: string;
17812
+ job_start_time?: number;
17813
+ job_end_time?: number;
17814
+ job_duration?: number;
17815
+ form_id: StringId;
17816
+ results: DivisionResult[];
17817
+ score?: number;
17818
+ is_completed?: boolean;
17819
+ company_namespace?: string[];
17820
+ }
17821
+ export type UpdateBody = Partial<Data>;
17822
+ export type PopulatedDoc = Data & {
17823
+ presentation_populated?: CLMPresentation.Data;
17824
+ sequence_populated?: Pick<CLMSequence.Data, "position" | "_id" | "product" | "presentation">[];
17825
+ photo_media_populated?: PopulatedMediaStorage & {
17826
+ ContentLength?: number;
17827
+ };
17828
+ };
17829
+ type PopulatedKeys = "custom_list" | "client" | "workorder" | "visit" | "route" | "form_id" | "teams" | "tags" | "media";
17830
+ export namespace Find {
17831
+ type Params = DefaultPaginationQueryParams & {
17832
+ populatedKeys?: PopulatedKeys | PopulatedKeys[];
17833
+ _id?: StringId | StringId[];
17834
+ search?: string;
17835
+ from_time?: number;
17836
+ to_time?: number;
17837
+ client?: StringId | StringId[];
17838
+ tags?: StringId | StringId[];
17839
+ CLIENT_TAGS?: StringId | StringId[];
17840
+ AREA_TAGS?: StringId | StringId[];
17841
+ form_id?: StringId | StringId[];
17842
+ teams?: StringId | StringId[];
17843
+ route?: StringId | StringId[];
17844
+ is_completed?: boolean;
17845
+ from_score?: number;
17846
+ to_score?: number;
17847
+ score?: number | number[];
17848
+ "creator._id"?: StringId | StringId[];
17849
+ "creator.type"?: Data["creator"]["type"] | Data["creator"]["type"][];
17850
+ visit_id?: string | string[];
17851
+ visit?: StringId | StringId[];
17852
+ workorder?: StringId | StringId[];
17853
+ "serial_number.formatted"?: string | string[];
17854
+ };
17855
+ interface Result extends DefaultPaginationResult {
17856
+ data: PopulatedDoc[];
17857
+ }
17858
+ }
17859
+ export namespace Get {
17860
+ type ID = string;
17861
+ type Params = {
17862
+ populatedKeys?: PopulatedKeys[];
17863
+ };
17864
+ type Result = PopulatedDoc & {
17865
+ can_edit_types?: boolean;
17866
+ };
17867
+ }
17868
+ export namespace Create {
17869
+ type Body = CreateBody;
17870
+ type Result = Data;
17871
+ }
17872
+ export namespace Update {
17873
+ type ID = StringId;
17874
+ type Body = UpdateBody;
17875
+ type Result = Data;
17876
+ }
17877
+ export {};
17878
+ }
17725
17879
  }
17726
17880
  export type StringId = string;
17727
17881
  export type NameSpaces = string[];