repzo 1.0.87 → 1.0.88

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.
@@ -200,21 +200,21 @@ export interface Build {
200
200
  list: List[];
201
201
  start_date?: number | undefined;
202
202
  }
203
- export declare type Calendar = CalendarWeekly | CalendarWeeklyGroup;
203
+ export type Calendar = CalendarWeekly | CalendarWeeklyGroup;
204
204
  export interface Route {
205
205
  disabled: boolean;
206
206
  list: List[];
207
207
  _id: string;
208
208
  }
209
- export declare type Priority = 0 | 1 | 2 | 3;
210
- export declare type WorkorderStatus =
209
+ export type Priority = 0 | 1 | 2 | 3;
210
+ export type WorkorderStatus =
211
211
  | "open"
212
212
  | "done"
213
213
  | "cancelled"
214
214
  | "inprogress"
215
215
  | "onhold";
216
- export declare type Priority_human = "none" | "low" | "medium" | "high";
217
- export declare type Day =
216
+ export type Priority_human = "none" | "low" | "medium" | "high";
217
+ export type Day =
218
218
  | "Sun"
219
219
  | "Mon"
220
220
  | "Tue"
@@ -223,7 +223,7 @@ export declare type Day =
223
223
  | "Fri"
224
224
  | "Sat"
225
225
  | string;
226
- export declare type FieldType =
226
+ export type FieldType =
227
227
  | "Text"
228
228
  | "String"
229
229
  | "Date"
@@ -269,7 +269,7 @@ export interface CalendarWeeklyGroup {
269
269
  note?: string;
270
270
  _id: string;
271
271
  }
272
- export declare type Model =
272
+ export type Model =
273
273
  | "quickConvertToPdf"
274
274
  | "warehouses"
275
275
  | "transfers"
@@ -294,7 +294,7 @@ export declare type Model =
294
294
  | "activities"
295
295
  | "bigReports"
296
296
  | "admins";
297
- export declare type DocumentTypes =
297
+ export type DocumentTypes =
298
298
  | "form"
299
299
  | "quickConvertToPdf"
300
300
  | "clients"
@@ -338,7 +338,7 @@ export declare type DocumentTypes =
338
338
  | "retailExecutionPreset"
339
339
  | "paymentMethod"
340
340
  | "approvalRequest";
341
- export declare type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
341
+ export type PrintTypes = "workorder" | "form" | "invoice" | "proforma";
342
342
  export interface MediaDoc {
343
343
  _id?: string;
344
344
  media_id: string;
@@ -4678,11 +4678,21 @@ export declare namespace Service {
4678
4678
  assets_populated?: AssetsPopulated[];
4679
4679
  asset_part_units_populated?: (Pick<
4680
4680
  AssetPartUnit.Data,
4681
- "_id" | "asset_part"
4681
+ | "_id"
4682
+ | "asset_part"
4683
+ | "custom_status"
4684
+ | "qty"
4685
+ | "directional_status"
4686
+ | "warehouse"
4687
+ | "warehouse_name"
4682
4688
  > & {
4683
4689
  asset_part: Pick<AssetPart.Data, "_id" | "name" | "local_name"> & {
4684
4690
  cover_photo?: PopulatedMediaStorage[];
4685
4691
  };
4692
+ custom_status?: Pick<
4693
+ CustomStatus.CustomStatusSchema,
4694
+ "_id" | "code" | "color" | "local_name" | "name"
4695
+ >;
4686
4696
  })[];
4687
4697
  assigned_to_populated?: RepresentativesPopulated;
4688
4698
  client_location_populated?: ClientLocationPopulated;
@@ -9230,9 +9240,1309 @@ export declare namespace Service {
9230
9240
  };
9231
9241
  }
9232
9242
  }
9243
+ namespace Cart {
9244
+ type Promo = Promotion.Schema & {
9245
+ details: Promotion.Schema["details"] & {
9246
+ promotions_enabled?: boolean;
9247
+ };
9248
+ applied: {
9249
+ doesApply: boolean;
9250
+ appliedCount: number;
9251
+ limit_reached: boolean;
9252
+ is_prospective: boolean;
9253
+ rounds_status: ("full" | "partial" | "none")[];
9254
+ last_round_buy_success: boolean;
9255
+ used: boolean;
9256
+ bulk_get_limit_values: number[];
9257
+ };
9258
+ promoApplicableCount: number;
9259
+ };
9260
+ interface Data {
9261
+ _id: StringId;
9262
+ type: "invoice" | "proforma";
9263
+ processable?: boolean;
9264
+ failure_reasons: string[];
9265
+ external_serial_number?: string;
9266
+ qr_code_tlv?: string;
9267
+ skip_promos?: boolean;
9268
+ skipped_promotions: {
9269
+ _id: string;
9270
+ name: string;
9271
+ ref: string;
9272
+ }[];
9273
+ client_id: StringId;
9274
+ client_name: string;
9275
+ comment?: string;
9276
+ return_comment?: string;
9277
+ creator: {
9278
+ _id: string;
9279
+ type: "rep" | "client" | "admin";
9280
+ rep?: string;
9281
+ admin?: string;
9282
+ client?: string;
9283
+ name?: string;
9284
+ };
9285
+ implemented_by?: {
9286
+ _id: string;
9287
+ type: "rep" | "client" | "admin";
9288
+ rep?: string;
9289
+ admin?: string;
9290
+ client?: string;
9291
+ name?: string;
9292
+ };
9293
+ latest: boolean;
9294
+ version?: number;
9295
+ time?: number;
9296
+ issue_date: string;
9297
+ delivery_date?: string;
9298
+ currency: string;
9299
+ serial_number?: SerialNumber;
9300
+ geo_tag: {
9301
+ type: "Point";
9302
+ coordinates: number[];
9303
+ };
9304
+ sync_id: string;
9305
+ address?: {
9306
+ [key: string]: any;
9307
+ };
9308
+ company_namespace: string[];
9309
+ promotions: Promo[];
9310
+ priceLists: PriceListItem.PriceListItemSchema[];
9311
+ visit_id?: string;
9312
+ teams: string[];
9313
+ converter?: {
9314
+ _id: string;
9315
+ type: "rep" | "client" | "admin";
9316
+ rep?: string;
9317
+ admin?: string;
9318
+ client?: string;
9319
+ name?: string;
9320
+ };
9321
+ converted_proforma_serial_number?: SerialNumber;
9322
+ converted_proforma_return_serial_number?: SerialNumber;
9323
+ proforma_reference?: string;
9324
+ converted_at?: number;
9325
+ exclude_return_items?: boolean;
9326
+ returned_from?: string;
9327
+ returned_to?: string;
9328
+ returned_from_serial_number?: SerialNumber;
9329
+ returned_to_serial_number?: SerialNumber;
9330
+ due_date?: string;
9331
+ return_serial_number?: SerialNumber;
9332
+ origin_warehouse?: string;
9333
+ msl_sales?: string;
9334
+ route?: string;
9335
+ paymentsData: {
9336
+ invoice_value: number;
9337
+ paid: number;
9338
+ balance: number;
9339
+ payments: {
9340
+ payment_serial_number?: SerialNumber;
9341
+ payment_id?: string;
9342
+ invoice_serial_number?: SerialNumber;
9343
+ return_serial_number?: SerialNumber;
9344
+ fullinvoice_id?: string;
9345
+ view_serial_number?: SerialNumber;
9346
+ type: "invoice" | "payment" | "return_invoice";
9347
+ amount: number;
9348
+ }[];
9349
+ };
9350
+ consumption: {
9351
+ status: "consumed" | "unconsumed" | "partially_consumed";
9352
+ remainder: number;
9353
+ };
9354
+ subtotal?: number;
9355
+ discount_amount?: number;
9356
+ discount_amount_float?: number;
9357
+ taxable_subtotal?: number;
9358
+ net_total?: number;
9359
+ tax_amount?: number;
9360
+ tax_amount_after_deduction_float?: number;
9361
+ tax_amount_after_deduction_float_rounded_sum?: number;
9362
+ tax_amount_after_deduction_float_rounded?: number;
9363
+ total?: number;
9364
+ total_float?: number;
9365
+ total_float_rounded?: number;
9366
+ total_float_rounded_sum?: number;
9367
+ total_before_tax?: number;
9368
+ taxable_amount_float?: number;
9369
+ taxable_amount_float_rounded_sum?: number;
9370
+ taxable_amount_float_rounded?: number;
9371
+ pre_subtotal?: number;
9372
+ pre_discount_amount?: number;
9373
+ pre_discount_amount_float?: number;
9374
+ pre_taxable_subtotal?: number;
9375
+ pre_net_total?: number;
9376
+ pre_tax_amount?: number;
9377
+ pre_tax_amount_after_deduction_float?: number;
9378
+ pre_tax_amount_after_deduction_float_rounded?: number;
9379
+ pre_tax_amount_after_deduction_float_rounded_sum?: number;
9380
+ pre_total?: number;
9381
+ pre_total_float?: number;
9382
+ pre_total_float_rounded?: number;
9383
+ pre_total_float_rounded_sum?: number;
9384
+ pre_total_before_tax?: number;
9385
+ pre_taxable_amount_float?: number;
9386
+ pre_taxable_amount_float_rounded?: number;
9387
+ pre_taxable_amount_float_rounded_sum?: number;
9388
+ return_subtotal?: number;
9389
+ return_discount_amount?: number;
9390
+ return_discount_amount_float?: number;
9391
+ return_taxable_subtotal?: number;
9392
+ return_net_total?: number;
9393
+ return_tax_amount?: number;
9394
+ return_tax_amount_after_deduction_float?: number;
9395
+ return_tax_amount_after_deduction_float_rounded?: number;
9396
+ return_tax_amount_after_deduction_float_rounded_sum?: number;
9397
+ return_total?: number;
9398
+ return_total_float?: number;
9399
+ return_total_float_rounded?: number;
9400
+ return_total_float_rounded_sum?: number;
9401
+ return_total_before_tax?: number;
9402
+ return_taxable_amount_float?: number;
9403
+ return_taxable_amount_float_rounded?: number;
9404
+ return_taxable_amount_float_rounded_sum?: number;
9405
+ deductionRatio?: number;
9406
+ deductionFixed?: number;
9407
+ totalDeductedTax?: number;
9408
+ totalDeductedTaxFloat?: number;
9409
+ totalDeduction?: number;
9410
+ totalDeductionFloat?: number;
9411
+ totalDeductionBeforeTax?: number;
9412
+ totalDeductionBeforeTaxFloat?: number;
9413
+ totalAfterDeduction?: number;
9414
+ totalAfterDeductionFloat?: number;
9415
+ lines_discount?: number;
9416
+ lines_discount_float?: number;
9417
+ taxes: {
9418
+ [key: string]: any;
9419
+ };
9420
+ overwriteDeductionFixed?: number;
9421
+ overwriteTaxExempt?: boolean;
9422
+ tax_exempt?: boolean;
9423
+ overwriteDeductionRatio?: number;
9424
+ shipping_zone?: {
9425
+ [key: string]: any;
9426
+ };
9427
+ payment_method?: {
9428
+ [key: string]: any;
9429
+ };
9430
+ shipping_price?: number;
9431
+ shipping_tax?: number;
9432
+ shipping_charge?: number;
9433
+ payment_charge?: number;
9434
+ total_with_charges?: number;
9435
+ payment?: {
9436
+ amount?: number;
9437
+ };
9438
+ workorder?: string;
9439
+ asset?: string;
9440
+ asset_unit?: string;
9441
+ signature?: string;
9442
+ createdAt: Date;
9443
+ updatedAt: Date;
9444
+ items: (Item.Schema & {
9445
+ notes?: {
9446
+ [key: string]: any;
9447
+ };
9448
+ })[];
9449
+ return_items?: (Item.Schema & {
9450
+ notes?: {
9451
+ [key: string]: any;
9452
+ };
9453
+ })[];
9454
+ invoice_payment_type: "cash" | "credit";
9455
+ total_items_base_unit_qty?: number;
9456
+ total_items_qty?: number;
9457
+ total_return_items_base_unit_qty?: number;
9458
+ total_return_items_qty?: number;
9459
+ cart?: {
9460
+ [key: string]: any;
9461
+ };
9462
+ __v?: number;
9463
+ }
9464
+ interface CreateBody {
9465
+ type: "invoice" | "proforma";
9466
+ processable?: boolean;
9467
+ failure_reasons: string[];
9468
+ external_serial_number?: string;
9469
+ skip_promos?: boolean;
9470
+ skipped_promotions: {
9471
+ _id: string;
9472
+ name: string;
9473
+ ref: string;
9474
+ }[];
9475
+ client_id: StringId;
9476
+ client_name: string;
9477
+ comment?: string;
9478
+ return_comment?: string;
9479
+ creator: {
9480
+ _id: string;
9481
+ type: "rep" | "client" | "admin";
9482
+ rep?: string;
9483
+ admin?: string;
9484
+ client?: string;
9485
+ name?: string;
9486
+ };
9487
+ implemented_by?: {
9488
+ _id: string;
9489
+ type: "rep" | "client" | "admin";
9490
+ rep?: string;
9491
+ admin?: string;
9492
+ client?: string;
9493
+ name?: string;
9494
+ };
9495
+ latest: boolean;
9496
+ version?: number;
9497
+ time?: number;
9498
+ issue_date: string;
9499
+ delivery_date?: string;
9500
+ currency: string;
9501
+ serial_number?: SerialNumber;
9502
+ geo_tag: {
9503
+ type: "Point";
9504
+ coordinates: number[];
9505
+ };
9506
+ sync_id: string;
9507
+ address?: {
9508
+ [key: string]: any;
9509
+ };
9510
+ company_namespace: string[];
9511
+ promotions: Promo[];
9512
+ priceLists: PriceListItem.PriceListItemSchema[];
9513
+ visit_id?: string;
9514
+ teams: string[];
9515
+ converter?: {
9516
+ _id: string;
9517
+ type: "rep" | "client" | "admin";
9518
+ rep?: string;
9519
+ admin?: string;
9520
+ client?: string;
9521
+ name?: string;
9522
+ };
9523
+ converted_proforma_serial_number?: SerialNumber;
9524
+ converted_proforma_return_serial_number?: SerialNumber;
9525
+ proforma_reference?: string;
9526
+ converted_at?: number;
9527
+ exclude_return_items?: boolean;
9528
+ returned_from?: string;
9529
+ returned_to?: string;
9530
+ returned_from_serial_number?: SerialNumber;
9531
+ returned_to_serial_number?: SerialNumber;
9532
+ due_date?: string;
9533
+ return_serial_number?: SerialNumber;
9534
+ origin_warehouse?: string;
9535
+ msl_sales?: string;
9536
+ route?: string;
9537
+ paymentsData: {
9538
+ invoice_value: number;
9539
+ paid: number;
9540
+ balance: number;
9541
+ payments: {
9542
+ payment_serial_number?: SerialNumber;
9543
+ payment_id?: string;
9544
+ invoice_serial_number?: SerialNumber;
9545
+ return_serial_number?: SerialNumber;
9546
+ fullinvoice_id?: string;
9547
+ view_serial_number?: SerialNumber;
9548
+ type: "invoice" | "payment" | "return_invoice";
9549
+ amount: number;
9550
+ }[];
9551
+ };
9552
+ consumption: {
9553
+ status: "consumed" | "unconsumed" | "partially_consumed";
9554
+ remainder: number;
9555
+ };
9556
+ subtotal?: number;
9557
+ discount_amount?: number;
9558
+ discount_amount_float?: number;
9559
+ taxable_subtotal?: number;
9560
+ net_total?: number;
9561
+ tax_amount?: number;
9562
+ tax_amount_after_deduction_float?: number;
9563
+ tax_amount_after_deduction_float_rounded_sum?: number;
9564
+ tax_amount_after_deduction_float_rounded?: number;
9565
+ total?: number;
9566
+ total_float?: number;
9567
+ total_float_rounded?: number;
9568
+ total_float_rounded_sum?: number;
9569
+ total_before_tax?: number;
9570
+ taxable_amount_float?: number;
9571
+ taxable_amount_float_rounded_sum?: number;
9572
+ taxable_amount_float_rounded?: number;
9573
+ pre_subtotal?: number;
9574
+ pre_discount_amount?: number;
9575
+ pre_discount_amount_float?: number;
9576
+ pre_taxable_subtotal?: number;
9577
+ pre_net_total?: number;
9578
+ pre_tax_amount?: number;
9579
+ pre_tax_amount_after_deduction_float?: number;
9580
+ pre_tax_amount_after_deduction_float_rounded?: number;
9581
+ pre_tax_amount_after_deduction_float_rounded_sum?: number;
9582
+ pre_total?: number;
9583
+ pre_total_float?: number;
9584
+ pre_total_float_rounded?: number;
9585
+ pre_total_float_rounded_sum?: number;
9586
+ pre_total_before_tax?: number;
9587
+ pre_taxable_amount_float?: number;
9588
+ pre_taxable_amount_float_rounded?: number;
9589
+ pre_taxable_amount_float_rounded_sum?: number;
9590
+ return_subtotal?: number;
9591
+ return_discount_amount?: number;
9592
+ return_discount_amount_float?: number;
9593
+ return_taxable_subtotal?: number;
9594
+ return_net_total?: number;
9595
+ return_tax_amount?: number;
9596
+ return_tax_amount_after_deduction_float?: number;
9597
+ return_tax_amount_after_deduction_float_rounded?: number;
9598
+ return_tax_amount_after_deduction_float_rounded_sum?: number;
9599
+ return_total?: number;
9600
+ return_total_float?: number;
9601
+ return_total_float_rounded?: number;
9602
+ return_total_float_rounded_sum?: number;
9603
+ return_total_before_tax?: number;
9604
+ return_taxable_amount_float?: number;
9605
+ return_taxable_amount_float_rounded?: number;
9606
+ return_taxable_amount_float_rounded_sum?: number;
9607
+ deductionRatio?: number;
9608
+ deductionFixed?: number;
9609
+ totalDeductedTax?: number;
9610
+ totalDeductedTaxFloat?: number;
9611
+ totalDeduction?: number;
9612
+ totalDeductionFloat?: number;
9613
+ totalDeductionBeforeTax?: number;
9614
+ totalDeductionBeforeTaxFloat?: number;
9615
+ totalAfterDeduction?: number;
9616
+ totalAfterDeductionFloat?: number;
9617
+ lines_discount?: number;
9618
+ lines_discount_float?: number;
9619
+ taxes: {
9620
+ [key: string]: any;
9621
+ };
9622
+ overwriteDeductionFixed?: number;
9623
+ overwriteTaxExempt?: boolean;
9624
+ tax_exempt?: boolean;
9625
+ overwriteDeductionRatio?: number;
9626
+ shipping_zone?: {
9627
+ [key: string]: any;
9628
+ };
9629
+ payment_method?: {
9630
+ [key: string]: any;
9631
+ };
9632
+ shipping_price?: number;
9633
+ shipping_tax?: number;
9634
+ shipping_charge?: number;
9635
+ payment_charge?: number;
9636
+ total_with_charges?: number;
9637
+ payment?: {
9638
+ amount?: number;
9639
+ };
9640
+ workorder?: string;
9641
+ asset?: string;
9642
+ asset_unit?: string;
9643
+ signature?: string;
9644
+ createdAt: Date;
9645
+ updatedAt: Date;
9646
+ items: (Item.Schema & {
9647
+ notes?: {
9648
+ [key: string]: any;
9649
+ };
9650
+ })[];
9651
+ return_items?: (Item.Schema & {
9652
+ notes?: {
9653
+ [key: string]: any;
9654
+ };
9655
+ })[];
9656
+ invoice_payment_type: "cash" | "credit";
9657
+ total_items_base_unit_qty?: number;
9658
+ total_items_qty?: number;
9659
+ total_return_items_base_unit_qty?: number;
9660
+ total_return_items_qty?: number;
9661
+ cart?: {
9662
+ [key: string]: any;
9663
+ };
9664
+ }
9665
+ namespace Find {
9666
+ type Params = DefaultPaginationQueryParams & {
9667
+ client_id?: string;
9668
+ type?: string;
9669
+ };
9670
+ interface Result extends DefaultPaginationResult {
9671
+ data: Data[];
9672
+ }
9673
+ }
9674
+ namespace Get {
9675
+ type ID = string;
9676
+ type Result = Data;
9677
+ }
9678
+ namespace Create {
9679
+ type Body = CreateBody;
9680
+ type Result = Data;
9681
+ }
9682
+ }
9683
+ namespace OcrInvoiceJobTemplate {
9684
+ interface ProductMatchStage {
9685
+ model: "products" | "productvariations" | "ocrInvoiceJobPages";
9686
+ model_key:
9687
+ | "name"
9688
+ | "barcode"
9689
+ | "sku"
9690
+ | "ai_json_data.barcode"
9691
+ | "ai_json_data.code"
9692
+ | "ai_json_data.description";
9693
+ operator: "eq";
9694
+ ai_json_key: "barcode" | "code" | "description";
9695
+ condition: "learn_ignorance";
9696
+ warning_message: string;
9697
+ is_warning: boolean;
9698
+ }
9699
+ interface MeasureUnitMatchStage {
9700
+ model: "measureunits";
9701
+ quick_action: "product_default" | "base_measure_unit";
9702
+ condition: "eq_product_default" | "in_product_family";
9703
+ model_key: "name";
9704
+ operator: "eq";
9705
+ ai_json_key: "measure_unit";
9706
+ warning_message: string;
9707
+ is_warning: boolean;
9708
+ }
9709
+ interface ClientMatchingStage {
9710
+ model: "clients" | "ocrInvoiceJobPages";
9711
+ condition?: "in_current_template";
9712
+ model_key: "name" | "ai_invoice_json.client_name";
9713
+ operator: "eq";
9714
+ ai_json_key: "client_name";
9715
+ warning_message?: string;
9716
+ is_warning?: boolean;
9717
+ }
9718
+ interface CartOptions {
9719
+ overwrite_price: boolean;
9720
+ client_override?: boolean;
9721
+ product_matching_stages: ProductMatchStage[];
9722
+ measure_unit_matching_stages: MeasureUnitMatchStage[];
9723
+ client_matching_stages: ClientMatchingStage[];
9724
+ }
9725
+ interface Data {
9726
+ _id: StringId;
9727
+ name: string;
9728
+ company_namespace: string[];
9729
+ disabled: boolean;
9730
+ document_scan_listed: boolean;
9731
+ client?: StringId;
9732
+ doc_type: "pdf" | "image";
9733
+ preparation_option?: {
9734
+ rotate?: boolean;
9735
+ convert_to_image: boolean;
9736
+ lang?: {
9737
+ en?: boolean;
9738
+ ar?: boolean;
9739
+ };
9740
+ };
9741
+ cart_option?: CartOptions;
9742
+ ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o";
9743
+ ai_vision_model: "gpt-4o-mini" | "gpt-4o" | "local_vision";
9744
+ visible_columns: {
9745
+ key:
9746
+ | "product_name"
9747
+ | "variant_name"
9748
+ | "product_sku"
9749
+ | "product_barcode"
9750
+ | "variant_barcode"
9751
+ | "variant_sku"
9752
+ | "price"
9753
+ | "qty"
9754
+ | "measure_unit"
9755
+ | "total_amount"
9756
+ | "total"
9757
+ | "code";
9758
+ visible: boolean;
9759
+ }[];
9760
+ ai_parsing_prompt_amendment?: string;
9761
+ ai_vision_prompt_amendment?: string;
9762
+ ai_parsing_prompt_overwrite?: string;
9763
+ ai_vision_prompt_overwrite?: string;
9764
+ enable_ai_parsing_prompt_amendment?: boolean;
9765
+ enable_ai_vision_prompt_amendment?: boolean;
9766
+ enable_ai_parsing_prompt_overwrite?: boolean;
9767
+ enable_ai_vision_prompt_overwrite?: boolean;
9768
+ always_merge_pages_for_job?: boolean;
9769
+ trim_barcode_zero_from_left?: boolean;
9770
+ createdAt: Date;
9771
+ updatedAt: Date;
9772
+ }
9773
+ interface PopulatedDoc {
9774
+ _id: StringId;
9775
+ name: string;
9776
+ company_namespace: string[];
9777
+ disabled: boolean;
9778
+ document_scan_listed: boolean;
9779
+ client?: StringId;
9780
+ client_populated?: Pick<Client.ClientSchema, "name" | "_id">;
9781
+ doc_type: "pdf" | "image";
9782
+ preparation_option?: {
9783
+ rotate?: boolean;
9784
+ convert_to_image: boolean;
9785
+ lang?: {
9786
+ en?: boolean;
9787
+ ar?: boolean;
9788
+ };
9789
+ };
9790
+ cart_option?: CartOptions;
9791
+ ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o";
9792
+ ai_vision_model: "gpt-4o-mini" | "gpt-4o" | "local_vision";
9793
+ visible_columns: {
9794
+ key:
9795
+ | "product_name"
9796
+ | "variant_name"
9797
+ | "product_sku"
9798
+ | "product_barcode"
9799
+ | "variant_barcode"
9800
+ | "variant_sku"
9801
+ | "price"
9802
+ | "qty"
9803
+ | "measure_unit"
9804
+ | "total_amount"
9805
+ | "total"
9806
+ | "code";
9807
+ visible: boolean;
9808
+ }[];
9809
+ ai_parsing_prompt_amendment?: string;
9810
+ ai_vision_prompt_amendment?: string;
9811
+ ai_parsing_prompt_overwrite?: string;
9812
+ ai_vision_prompt_overwrite?: string;
9813
+ enable_ai_parsing_prompt_amendment?: boolean;
9814
+ enable_ai_vision_prompt_amendment?: boolean;
9815
+ enable_ai_parsing_prompt_overwrite?: boolean;
9816
+ enable_ai_vision_prompt_overwrite?: boolean;
9817
+ always_merge_pages_for_job?: boolean;
9818
+ trim_zero_from_first?: boolean;
9819
+ createdAt: Date;
9820
+ updatedAt: Date;
9821
+ }
9822
+ interface CreateBody {
9823
+ name: string;
9824
+ company_namespace: string[];
9825
+ document_scan_listed: boolean;
9826
+ client?: StringId;
9827
+ doc_type: "pdf" | "image";
9828
+ preparation_option?: {
9829
+ rotate?: boolean;
9830
+ convert_to_image: boolean;
9831
+ lang?: {
9832
+ en?: boolean;
9833
+ ar?: boolean;
9834
+ };
9835
+ };
9836
+ cart_option?: CartOptions;
9837
+ ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o";
9838
+ ai_vision_model: "gpt-4o-mini" | "gpt-4o" | "local_vision";
9839
+ visible_columns: {
9840
+ key:
9841
+ | "product_name"
9842
+ | "variant_name"
9843
+ | "product_sku"
9844
+ | "product_barcode"
9845
+ | "variant_barcode"
9846
+ | "variant_sku"
9847
+ | "price"
9848
+ | "qty"
9849
+ | "measure_unit"
9850
+ | "total_amount"
9851
+ | "total"
9852
+ | "code";
9853
+ visible: boolean;
9854
+ }[];
9855
+ ai_parsing_prompt_amendment?: string;
9856
+ ai_vision_prompt_amendment?: string;
9857
+ ai_parsing_prompt_overwrite?: string;
9858
+ ai_vision_prompt_overwrite?: string;
9859
+ enable_ai_parsing_prompt_amendment?: boolean;
9860
+ enable_ai_vision_prompt_amendment?: boolean;
9861
+ enable_ai_parsing_prompt_overwrite?: boolean;
9862
+ enable_ai_vision_prompt_overwrite?: boolean;
9863
+ always_merge_pages_for_job?: boolean;
9864
+ trim_zero_from_first?: boolean;
9865
+ }
9866
+ interface UpdateBody {
9867
+ name: string;
9868
+ company_namespace: string[];
9869
+ document_scan_listed: boolean;
9870
+ client?: StringId;
9871
+ preparation_option?: {
9872
+ rotate?: boolean;
9873
+ convert_to_image: boolean;
9874
+ lang?: {
9875
+ en?: boolean;
9876
+ ar?: boolean;
9877
+ };
9878
+ };
9879
+ cart_option?: CartOptions;
9880
+ ai_json_parsing_model: "gpt-4o-mini" | "gpt-4o";
9881
+ ai_vision_model: "gpt-4o-mini" | "gpt-4o" | "local_vision";
9882
+ visible_columns: {
9883
+ key:
9884
+ | "product_name"
9885
+ | "variant_name"
9886
+ | "product_sku"
9887
+ | "product_barcode"
9888
+ | "variant_barcode"
9889
+ | "variant_sku"
9890
+ | "price"
9891
+ | "qty"
9892
+ | "measure_unit"
9893
+ | "total_amount"
9894
+ | "total"
9895
+ | "code";
9896
+ visible: boolean;
9897
+ }[];
9898
+ ai_parsing_prompt_amendment?: string;
9899
+ ai_vision_prompt_amendment?: string;
9900
+ ai_parsing_prompt_overwrite?: string;
9901
+ ai_vision_prompt_overwrite?: string;
9902
+ enable_ai_parsing_prompt_amendment?: boolean;
9903
+ enable_ai_vision_prompt_amendment?: boolean;
9904
+ enable_ai_parsing_prompt_overwrite?: boolean;
9905
+ enable_ai_vision_prompt_overwrite?: boolean;
9906
+ always_merge_pages_for_job?: boolean;
9907
+ trim_zero_from_first?: boolean;
9908
+ }
9909
+ namespace Find {
9910
+ type Params = DefaultPaginationQueryParams & {
9911
+ _id?: StringId[] | StringId;
9912
+ client?: string[] | string;
9913
+ disabled?: boolean;
9914
+ doc_type?: string[] | string;
9915
+ };
9916
+ interface Result extends DefaultPaginationResult {
9917
+ data: Data[] | PopulatedDoc[];
9918
+ }
9919
+ }
9920
+ namespace Get {
9921
+ type ID = string;
9922
+ type Result = Data | PopulatedDoc;
9923
+ }
9924
+ namespace Create {
9925
+ type Body = CreateBody;
9926
+ type Result = Data;
9927
+ }
9928
+ namespace Update {
9929
+ type ID = string;
9930
+ type Body = UpdateBody;
9931
+ type Result = Data;
9932
+ }
9933
+ }
9934
+ namespace OcrInvoiceJobGroup {
9935
+ interface Data {
9936
+ _id: StringId;
9937
+ name: string;
9938
+ sync_id: string;
9939
+ company_namespace: string[];
9940
+ disabled: boolean;
9941
+ template: StringId;
9942
+ client: StringId | Pick<Client.ClientSchema, "name">;
9943
+ doc_type: "pdf" | "image";
9944
+ media: string[];
9945
+ creator: AdminOrRep;
9946
+ status:
9947
+ | "initiated"
9948
+ | "failed"
9949
+ | "incomplete"
9950
+ | "partially_completed"
9951
+ | "completed"
9952
+ | "in_progress";
9953
+ time: number;
9954
+ visit_id?: StringId;
9955
+ geo_tag: GeoTag;
9956
+ }
9957
+ interface PopulatedDoc {
9958
+ _id: StringId;
9959
+ name: string;
9960
+ sync_id: string;
9961
+ company_namespace: string[];
9962
+ disabled: boolean;
9963
+ template: StringId;
9964
+ template_poplated: OcrInvoiceJobTemplate.Data;
9965
+ client: StringId;
9966
+ client_populated: Pick<Client.ClientSchema, "name" | "_id">;
9967
+ doc_type: "pdf" | "image";
9968
+ media: StringId[];
9969
+ media_populated: PopulatedMediaStorage[];
9970
+ creator: AdminOrRep;
9971
+ status:
9972
+ | "initiated"
9973
+ | "failed"
9974
+ | "incomplete"
9975
+ | "partially_completed"
9976
+ | "completed"
9977
+ | "in_progress";
9978
+ time: number;
9979
+ visit_id?: StringId;
9980
+ geo_tag: GeoTag;
9981
+ }
9982
+ interface CreateBody {
9983
+ sync_id: string;
9984
+ name: string;
9985
+ company_namespace: string[];
9986
+ template: StringId;
9987
+ client: StringId;
9988
+ media: StringId[];
9989
+ creator?: AdminOrRep;
9990
+ time: number;
9991
+ visit_id?: StringId;
9992
+ geo_tag?: GeoTag;
9993
+ }
9994
+ namespace Find {
9995
+ type Params = DefaultPaginationQueryParams & {
9996
+ _id?: StringId[] | StringId;
9997
+ client?: string[] | string;
9998
+ disabled?: boolean;
9999
+ doc_type?: string[] | string;
10000
+ template?: StringId[] | StringId;
10001
+ visit_id?: StringId[] | StringId;
10002
+ from_time?: number;
10003
+ to_time?: number;
10004
+ status: string[];
10005
+ rep?: StringId[] | StringId;
10006
+ admin?: StringId[] | StringId;
10007
+ "creator._id"?: StringId[] | StringId;
10008
+ "creator.type"?: string[] | string;
10009
+ search?: string;
10010
+ };
10011
+ interface Result extends DefaultPaginationResult {
10012
+ data: Data[] | PopulatedDoc[];
10013
+ }
10014
+ }
10015
+ namespace Get {
10016
+ type ID = string;
10017
+ type Result = Data | PopulatedDoc;
10018
+ }
10019
+ namespace Create {
10020
+ type Body = CreateBody;
10021
+ type Result = Data;
10022
+ }
10023
+ }
10024
+ namespace OcrInvoiceJob {
10025
+ export type StepCode = "ai-api-js" | "python-utilities" | "job-handler";
10026
+ export type TaskCode =
10027
+ | "create-job-pages"
10028
+ | "photo-json-extraction"
10029
+ | "photo-text-extraction"
10030
+ | "pdf-text-extraction"
10031
+ | "text-json-parsing"
10032
+ | "pdf-image-conversion"
10033
+ | "pdf-image-text-ocr"
10034
+ | "finalize";
10035
+ export interface Task {
10036
+ code: TaskCode;
10037
+ options: {};
10038
+ }
10039
+ export type Step = {
10040
+ code: StepCode;
10041
+ tasks: Task[];
10042
+ };
10043
+ export interface PhotoTextExtractionTask extends Task {
10044
+ code: "photo-text-extraction";
10045
+ options: {};
10046
+ }
10047
+ export interface PhotoJsonExtractionTask extends Task {
10048
+ code: "photo-json-extraction";
10049
+ options: {
10050
+ ai_model: "gpt-4o-mini" | "gpt-4o";
10051
+ };
10052
+ }
10053
+ export interface PdfTextExtractionTask extends Task {
10054
+ code: "pdf-text-extraction";
10055
+ options: {};
10056
+ }
10057
+ export interface PdfImageConversionTask extends Task {
10058
+ code: "pdf-image-conversion";
10059
+ options: {};
10060
+ }
10061
+ export interface PdfImageTextOcrTask extends Task {
10062
+ code: "pdf-image-text-ocr";
10063
+ options: {};
10064
+ }
10065
+ export interface TextJsonParsingTask extends Task {
10066
+ code: "text-json-parsing";
10067
+ options: {
10068
+ ai_model: "gpt-4o-mini" | "gpt-4o";
10069
+ };
10070
+ }
10071
+ export interface FinalizeTask extends Task {
10072
+ code: "finalize";
10073
+ options: {};
10074
+ }
10075
+ export interface CreateJobPagesTask extends Task {
10076
+ code: "create-job-pages";
10077
+ options: {};
10078
+ }
10079
+ export type AiApiJsStep = {
10080
+ code: "ai-api-js";
10081
+ tasks: (
10082
+ | PhotoTextExtractionTask
10083
+ | PhotoJsonExtractionTask
10084
+ | TextJsonParsingTask
10085
+ )[];
10086
+ };
10087
+ export type PythonUtilitiesStep = {
10088
+ code: "python-utilities";
10089
+ tasks: (
10090
+ | PdfTextExtractionTask
10091
+ | PdfImageConversionTask
10092
+ | PdfImageTextOcrTask
10093
+ )[];
10094
+ };
10095
+ export type JobHandlerStep = {
10096
+ code: "job-handler";
10097
+ tasks: (FinalizeTask | CreateJobPagesTask | TextJsonParsingTask)[];
10098
+ };
10099
+ export type PlanStep = AiApiJsStep | JobHandlerStep | PythonUtilitiesStep;
10100
+ type PlanOptions = {
10101
+ early_page_generation?: boolean;
10102
+ };
10103
+ export type Plan = {
10104
+ steps: PlanStep[];
10105
+ options: PlanOptions;
10106
+ };
10107
+ export interface Data {
10108
+ _id: StringId;
10109
+ company_namespace: string[];
10110
+ disabled: boolean;
10111
+ template: StringId;
10112
+ client: StringId;
10113
+ doc_type: "pdf" | "image";
10114
+ convert_to_image?: boolean;
10115
+ rotate?: boolean;
10116
+ file_media: StringId;
10117
+ text_media?: StringId;
10118
+ pages_count?: number;
10119
+ createdAt: Date;
10120
+ updatedAt: Date;
10121
+ job_group: StringId;
10122
+ planner?: Plan;
10123
+ status:
10124
+ | "pending"
10125
+ | "initiated"
10126
+ | "incomplete"
10127
+ | "in_progress"
10128
+ | "completed"
10129
+ | "failed";
10130
+ creator: AdminOrRep;
10131
+ error_message?: any;
10132
+ }
10133
+ export interface PopulatedDoc {
10134
+ _id: StringId;
10135
+ company_namespace: string[];
10136
+ disabled: boolean;
10137
+ template: StringId;
10138
+ template_populated: Pick<OcrInvoiceJobTemplate.Data, "name" | "_id">;
10139
+ client: StringId;
10140
+ client_populated: Pick<Client.ClientSchema, "name" | "_id">;
10141
+ doc_type: "pdf" | "image";
10142
+ convert_to_image?: boolean;
10143
+ rotate?: boolean;
10144
+ file_media: StringId | PopulatedMediaStorage;
10145
+ file_media_populated: PopulatedMediaStorage;
10146
+ text_media?: StringId;
10147
+ pages_count?: number;
10148
+ createdAt: Date;
10149
+ updatedAt: Date;
10150
+ job_group: StringId;
10151
+ job_group_populated: Pick<OcrInvoiceJobGroup.Data, "name" | "_id">;
10152
+ planner?: Plan;
10153
+ status:
10154
+ | "pending"
10155
+ | "initiated"
10156
+ | "incomplete"
10157
+ | "in_progress"
10158
+ | "completed"
10159
+ | "failed";
10160
+ creator: AdminOrRep;
10161
+ error_message?: any;
10162
+ }
10163
+ export namespace Find {
10164
+ type Params = DefaultPaginationQueryParams & {
10165
+ _id?: StringId[] | StringId;
10166
+ disabled?: boolean;
10167
+ template: StringId[] | StringId;
10168
+ client?: StringId[] | StringId;
10169
+ doc_type?: string[] | string;
10170
+ job_group?: StringId[] | StringId;
10171
+ };
10172
+ interface Result extends DefaultPaginationResult {
10173
+ data: Data[] | PopulatedDoc[];
10174
+ }
10175
+ }
10176
+ export namespace Get {
10177
+ type ID = string;
10178
+ type Result = Data | PopulatedDoc;
10179
+ }
10180
+ export {};
10181
+ }
10182
+ namespace OcrInvoiceJobPage {
10183
+ interface AIInvoiceJsonSchema {
10184
+ new_page?: boolean;
10185
+ issue_date?: string;
10186
+ reference?: string;
10187
+ client_name?: string;
10188
+ items: [
10189
+ {
10190
+ barcode?: string;
10191
+ code?: string;
10192
+ description?: string;
10193
+ quantity?: number;
10194
+ unit_price?: number;
10195
+ total?: number;
10196
+ measure_unit?: string;
10197
+ total_amount?: number;
10198
+ tax_amount?: number;
10199
+ discount_amount?: number;
10200
+ }
10201
+ ];
10202
+ total_amount?: number;
10203
+ total_tax?: number;
10204
+ }
10205
+ interface CartAnnotationErrorType {
10206
+ message: string;
10207
+ key:
10208
+ | "items.variant.listed_price"
10209
+ | "items.overwrite_price"
10210
+ | "items.tax"
10211
+ | "items.measure_unit"
10212
+ | "items.qty"
10213
+ | "items.variant.variant_sku"
10214
+ | "items.variant.variant_barcode"
10215
+ | "items.variant.product_barcode"
10216
+ | "items.variant.product_sku"
10217
+ | "items.cart_line_total"
10218
+ | "items.cart_line_amount"
10219
+ | "items.variant.product_id"
10220
+ | "items.variant.variant_id"
10221
+ | "total"
10222
+ | "tax_total"
10223
+ | "issue_date"
10224
+ | "external_serial_number"
10225
+ | "client";
10226
+ code:
10227
+ | "missing"
10228
+ | "not_equal"
10229
+ | "exists"
10230
+ | "invalid_date"
10231
+ | "custom_warning";
10232
+ }
10233
+ interface CartAnnotationItem {
10234
+ ai_json_data?: {
10235
+ barcode?: string;
10236
+ description?: string;
10237
+ qty?: number;
10238
+ measure_unit?: string;
10239
+ code?: string;
10240
+ unit_price?: number;
10241
+ total?: number;
10242
+ total_amount?: number;
10243
+ tax_amount?: number;
10244
+ discount_amount?: number;
10245
+ };
10246
+ overwrite_price?: number;
10247
+ client_id: StringId;
10248
+ qty: number;
10249
+ variant?: {
10250
+ product_id?: string;
10251
+ product_name?: string;
10252
+ product_sku?: string;
10253
+ product_barcode?: string;
10254
+ variant_id?: string;
10255
+ variant_name?: string;
10256
+ variant_sku?: string;
10257
+ variant_barcode?: string;
10258
+ listed_price?: number;
10259
+ };
10260
+ measure_unit?: {
10261
+ parent: string;
10262
+ name: string;
10263
+ factor: number;
10264
+ disabled: boolean;
10265
+ company_namespace: string[];
10266
+ };
10267
+ tax?: {
10268
+ name: string;
10269
+ rate: number;
10270
+ type: "inclusive" | "additive" | "N/A";
10271
+ ubl_tax_details?: {
10272
+ tax_code: {
10273
+ type: String;
10274
+ enum: ["Z", "O", "S", "E"];
10275
+ };
10276
+ reason: {
10277
+ type: String;
10278
+ };
10279
+ reason_code: {
10280
+ type: String;
10281
+ };
10282
+ };
10283
+ disabled: boolean;
10284
+ };
10285
+ warnings?: CartAnnotationErrorType[];
10286
+ _errors?: CartAnnotationErrorType[];
10287
+ status?: "red" | "green" | "orange";
10288
+ cart_line_total?: number;
10289
+ cart_line_amount?: number;
10290
+ ignore?: boolean;
10291
+ }
10292
+ interface CartAnnotation {
10293
+ issue_date: string;
10294
+ external_serial_number?: string;
10295
+ total: number;
10296
+ tax_total: number;
10297
+ cart_total: number;
10298
+ cart_tax_total: number;
10299
+ cart_total_before_tax: number;
10300
+ items: CartAnnotationItem[];
10301
+ warnings?: CartAnnotationErrorType[];
10302
+ _errors?: CartAnnotationErrorType[];
10303
+ status?: "red" | "orange" | "green";
10304
+ }
10305
+ interface Data {
10306
+ _id: string;
10307
+ company_namespace: string[];
10308
+ disabled: boolean;
10309
+ job: StringId;
10310
+ template: StringId;
10311
+ page_number: number;
10312
+ text?: string;
10313
+ media_url?: string;
10314
+ proforma?: StringId;
10315
+ cart?: Cart.Data;
10316
+ cart_annotation?: CartAnnotation;
10317
+ ai_invoice_json?: AIInvoiceJsonSchema;
10318
+ error_message?: any;
10319
+ client: StringId;
10320
+ status?:
10321
+ | "pending"
10322
+ | "in_progress"
10323
+ | "converted"
10324
+ | "failed"
10325
+ | "ready_to_convert"
10326
+ | "incomplete"
10327
+ | "merged";
10328
+ last_page: boolean;
10329
+ creator: AdminOrRep;
10330
+ editor?: AdminOrRep;
10331
+ createdAt: Date;
10332
+ updatedAt: Date;
10333
+ }
10334
+ interface PopulatedDoc {
10335
+ _id: StringId;
10336
+ company_namespace: string[];
10337
+ disabled: boolean;
10338
+ job: StringId;
10339
+ job_populated: OcrInvoiceJob.Data & {
10340
+ job_group_populated: OcrInvoiceJobGroup.Data;
10341
+ };
10342
+ template: StringId;
10343
+ template_populated: Pick<OcrInvoiceJobTemplate.Data, "name" | "_id">;
10344
+ page_number: number;
10345
+ text?: string;
10346
+ media_url?: string;
10347
+ proforma?: StringId;
10348
+ proforma_populated?: Pick<
10349
+ Proforma.ProformaSchema,
10350
+ "serial_number" | "_id"
10351
+ >;
10352
+ cart?: Cart.Data;
10353
+ cart_annotation?: CartAnnotation;
10354
+ ai_invoice_json?: AIInvoiceJsonSchema;
10355
+ error_message?: any;
10356
+ client: StringId;
10357
+ client_populated: Pick<Client.ClientSchema, "_id" | "name">;
10358
+ status?:
10359
+ | "pending"
10360
+ | "in_progress"
10361
+ | "converted"
10362
+ | "failed"
10363
+ | "ready_to_convert"
10364
+ | "incomplete"
10365
+ | "merged";
10366
+ last_page: boolean;
10367
+ creator: AdminOrRep;
10368
+ editor?: AdminOrRep;
10369
+ createdAt: Date;
10370
+ updatedAt: Date;
10371
+ }
10372
+ interface UpdateBody {
10373
+ disabled: boolean;
10374
+ cart_annotation?: CartAnnotation;
10375
+ client: StringId;
10376
+ cart?: Cart.Data;
10377
+ }
10378
+ namespace Find {
10379
+ type Params = DefaultPaginationQueryParams & {
10380
+ _id?: StringId | StringId[];
10381
+ job?: StringId | StringId[];
10382
+ template?: StringId | StringId[];
10383
+ page_number?: number;
10384
+ proforma?: StringId | StringId[];
10385
+ status: string | string[];
10386
+ };
10387
+ interface Result extends DefaultPaginationResult {
10388
+ data: Data[] | PopulatedDoc[];
10389
+ }
10390
+ }
10391
+ namespace Get {
10392
+ type ID = string;
10393
+ type Result = Data | PopulatedDoc;
10394
+ }
10395
+ namespace Update {
10396
+ type ID = StringId;
10397
+ type Body = UpdateBody;
10398
+ type Result = Data;
10399
+ }
10400
+ }
10401
+ namespace ActivityAiSalesOrder {
10402
+ interface Data {
10403
+ _id: string;
10404
+ creator: RepCreator;
10405
+ editor?: RepCreator;
10406
+ teams: StringId[];
10407
+ tags: StringId[];
10408
+ time: number;
10409
+ client?: StringId;
10410
+ client_name?: string;
10411
+ visit?: StringId;
10412
+ visit_id?: string;
10413
+ route?: string;
10414
+ sync_id: string;
10415
+ template_id: StringId;
10416
+ jo_group_id?: StringId;
10417
+ media: StringId[];
10418
+ geo_tag?: GeoTag;
10419
+ geoPoint?: GeoPoint;
10420
+ platform?: string;
10421
+ version_name?: string;
10422
+ battery_level?: number;
10423
+ device_brand?: string;
10424
+ device_os?: string;
10425
+ device_os_version?: string;
10426
+ device_model?: string;
10427
+ identifier?: number;
10428
+ device_id?: string;
10429
+ device_unique_id?: string;
10430
+ network_state?: number;
10431
+ time_zone?: string;
10432
+ job_start_time?: number;
10433
+ job_end_time?: number;
10434
+ job_duration?: number;
10435
+ company_namespace: string[];
10436
+ createdAt: Date;
10437
+ updatedAt: Date;
10438
+ }
10439
+ interface PopulatedDoc {
10440
+ _id: string;
10441
+ creator: RepCreator;
10442
+ editor?: RepCreator;
10443
+ teams: StringId[];
10444
+ teams_populated: Pick<Team.TeamSchema, "name" | "_id">[];
10445
+ tags: StringId[];
10446
+ tags_populated: Pick<Tag.TagSchema, "tag" | "type" | "_id">[];
10447
+ time: number;
10448
+ client?: StringId;
10449
+ client_populated?: Pick<
10450
+ Client.ClientSchema,
10451
+ "name" | "client_code" | "_id"
10452
+ >;
10453
+ client_name?: string;
10454
+ visit?: string;
10455
+ visit_populated?: Visit.VisitSchema;
10456
+ visit_id?: string;
10457
+ route?: StringId;
10458
+ route_populated?: Pick<Route.RouteSchema, "name" | "_id">;
10459
+ sync_id: string;
10460
+ template_id: StringId;
10461
+ jo_group_id?: StringId;
10462
+ jo_group_id_populated?: Pick<
10463
+ OcrInvoiceJobGroup.Data,
10464
+ "name" | "status" | "_id"
10465
+ >;
10466
+ media: StringId[];
10467
+ media_populated: PopulatedMediaStorage[];
10468
+ geo_tag?: GeoTag;
10469
+ geoPoint?: GeoPoint;
10470
+ platform?: string;
10471
+ version_name?: string;
10472
+ battery_level?: number;
10473
+ device_brand?: string;
10474
+ device_os?: string;
10475
+ device_os_version?: string;
10476
+ device_model?: string;
10477
+ identifier?: number;
10478
+ device_id?: string;
10479
+ device_unique_id?: string;
10480
+ network_state?: number;
10481
+ time_zone?: string;
10482
+ job_start_time?: number;
10483
+ job_end_time?: number;
10484
+ job_duration?: number;
10485
+ company_namespace: string[];
10486
+ createdAt: Date;
10487
+ updatedAt: Date;
10488
+ }
10489
+ interface CreateBody {
10490
+ creator: RepCreator;
10491
+ teams: StringId[];
10492
+ tags: StringId[];
10493
+ time: number;
10494
+ client?: StringId;
10495
+ client_name?: string;
10496
+ visit?: StringId;
10497
+ visit_id?: string;
10498
+ route?: string;
10499
+ sync_id: string;
10500
+ template_id: StringId;
10501
+ media: StringId[];
10502
+ geo_tag?: GeoTag;
10503
+ geoPoint?: GeoPoint;
10504
+ platform?: string;
10505
+ version_name?: string;
10506
+ battery_level?: number;
10507
+ device_brand?: string;
10508
+ device_os?: string;
10509
+ device_os_version?: string;
10510
+ device_model?: string;
10511
+ identifier?: number;
10512
+ device_id?: string;
10513
+ device_unique_id?: string;
10514
+ network_state?: number;
10515
+ time_zone?: string;
10516
+ job_start_time?: number;
10517
+ job_end_time?: number;
10518
+ job_duration?: number;
10519
+ company_namespace: string[];
10520
+ }
10521
+ namespace Find {
10522
+ type Params = DefaultPaginationQueryParams & {
10523
+ _id?: StringId | StringId[];
10524
+ job?: StringId | StringId[];
10525
+ template?: StringId | StringId[];
10526
+ page_number?: number;
10527
+ proforma?: StringId | StringId[];
10528
+ status: string | string[];
10529
+ };
10530
+ interface Result extends DefaultPaginationResult {
10531
+ data: Data[] | PopulatedDoc[];
10532
+ }
10533
+ }
10534
+ namespace Get {
10535
+ type ID = string;
10536
+ type Result = Data | PopulatedDoc;
10537
+ }
10538
+ namespace Create {
10539
+ type Body = CreateBody;
10540
+ type Result = Data;
10541
+ }
10542
+ }
9233
10543
  }
9234
- export declare type StringId = string;
9235
- export declare type NameSpaces = string[];
10544
+ export type StringId = string;
10545
+ export type NameSpaces = string[];
9236
10546
  export interface AdminOrRep {
9237
10547
  _id: StringId;
9238
10548
  name?: string;
@@ -9240,7 +10550,7 @@ export interface AdminOrRep {
9240
10550
  admin?: StringId;
9241
10551
  rep?: StringId;
9242
10552
  }
9243
- declare type PopulatedMediaStorage = Pick<
10553
+ type PopulatedMediaStorage = Pick<
9244
10554
  Service.MediaStorage.MediaStorageSchema,
9245
10555
  | "_id"
9246
10556
  | "createdAt"