repzo 1.0.288 → 1.0.290

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/changelog.md CHANGED
@@ -17,6 +17,12 @@
17
17
  - add: approval @maramalshen
18
18
  - add: apps-management, reset-company-namespace & test-reset-company-namespace @maramalshen
19
19
  - add: `rep_can_edit_invoice_discount` & `rep_can_edit_sales_order_discount` to RepPermissions and the Rep find-params filters — gate the header discount overwrite (`overwriteDeductionFixed`/`overwriteDeductionRatio`) on invoices and Sales Orders @mkhamis
20
+ - add: header total `total_before_deduction_and_tax` (+ `pre_`/`return_` legs) on FullInvoice, Proforma and Cart (Schema, CreateBody, UpdateBody) — `total_before_tax + totalDeductionBeforeTax`, i.e. the net-of-tax subtotal before the cart (header) deduction; net of tax for inclusive-tax lines too, unlike `taxable_subtotal`. The Proforma types were also missing the `total_before_tax` / `pre_` / `return_` trio the backend has stored all along, so those are added alongside @mkhamis
21
+ - add: geo-zone (GeoZone) service and types — `find`/`get`/`create`/`update`/`remove`, `inject_assigned_reps` on find/get, GeoJSON `Polygon` (`{ type: "Polygon"; coordinates }`) with server-side ring validation, soft-delete via `disabled`, and the server-stamped `editor` audit object; `NotificationsCenter.Command` gains `update-geo-zone`; OAS `geo-zone.yaml`
22
+ - add: Rep `assigned_geo_zones` (RepSchema, RepBody, find-params filter, populated keys, RepWithPopulatedKeysSchema) — links a rep to geo zone(s) (currently at most one); OAS `rep.yaml`
23
+ - add: `rep_can_start_visit_out_of_geofence` & `rep_can_create_approval_request_to_start_visit_out_of_geofence` to RepPermissions and the Rep find-params filters — gate starting a visit while outside the geofence / assigned geo zone
24
+ - add: Settings geo-zone enforcement fields — `start_day_outside_active_zone_action` / `start_visit_outside_active_zone_action` / `work_outside_active_zone_action` (`monitor`/`warning`/`block`), `no_active_zone_action` (`allow`/`block`), `use_accuracy_radius_near_zone_boundary`, `zone_boundary_grace_minutes` (Settings.Data + UpdateBody); OAS `settings.yaml`
25
+ - add: bulkExport (BulkExport) service + types — `find` (list export jobs) and `create` (start an Excel/Parquet export job for ~50 entity types, keyed by `type`); mirrors `bulkImport` (the backend rejects get/update/patch/remove with 400); OAS `bulk-export.yaml`
20
26
 
21
27
  ### Changed
22
28
 
package/lib/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export declare const end_points: {
22
22
  readonly TAG: "tag";
23
23
  readonly WAREHOUSE: "warehouse";
24
24
  readonly ROUTE: "route";
25
+ readonly GEO_ZONE: "geo-zone";
25
26
  readonly PRODUCT_MODIFIERS_GROUP: "product-modifiers-group";
26
27
  readonly CHANNEL: "client-channel";
27
28
  readonly SPECIALITY: "speciality";
@@ -145,11 +146,12 @@ export declare const end_points: {
145
146
  readonly CALENDAR: "calendar";
146
147
  readonly LINE_TARGET: "line-target";
147
148
  readonly BULK_IMPORT: "bulk-import";
149
+ readonly BULK_EXPORT: "bulk-export";
148
150
  readonly DELIVERY_NOTE: "delivery-note";
149
151
  readonly RESERVATION: "reservation";
150
152
  };
151
153
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
152
- export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
154
+ export declare const availableService: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "geoZone", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport", "bulkExport"];
153
155
  export type AvailableService = (typeof availableService)[number];
154
156
  export default class Repzo {
155
157
  private svAPIEndpoint;
@@ -184,6 +186,7 @@ export default class Repzo {
184
186
  readonly TAG: "tag";
185
187
  readonly WAREHOUSE: "warehouse";
186
188
  readonly ROUTE: "route";
189
+ readonly GEO_ZONE: "geo-zone";
187
190
  readonly PRODUCT_MODIFIERS_GROUP: "product-modifiers-group";
188
191
  readonly CHANNEL: "client-channel";
189
192
  readonly SPECIALITY: "speciality";
@@ -307,6 +310,7 @@ export default class Repzo {
307
310
  readonly CALENDAR: "calendar";
308
311
  readonly LINE_TARGET: "line-target";
309
312
  readonly BULK_IMPORT: "bulk-import";
313
+ readonly BULK_EXPORT: "bulk-export";
310
314
  readonly DELIVERY_NOTE: "delivery-note";
311
315
  readonly RESERVATION: "reservation";
312
316
  };
@@ -316,7 +320,7 @@ export default class Repzo {
316
320
  private _update;
317
321
  private _patch;
318
322
  private _delete;
319
- available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport"];
323
+ available_services: readonly ["client", "product", "variant", "category", "sub_category", "brand", "product_group", "tax", "measureunit", "measureunitFamily", "media", "priceList", "priceListItem", "team", "returnReason", "rep", "tag", "warehouse", "route", "geoZone", "productModifiersGroup", "channel", "speciality", "clientContact", "paymentTerm", "bank", "bank_list", "customStatus", "customList", "customListItem", "inventoryAdjustmentReason", "workorder", "workorderRequest", "supplier", "quickConvertToPdf", "visit", "activityFeedback", "activityFeedbackV2", "feedbackOption", "invoice", "proforma", "payment", "refund", "settlement", "voidSettlement", "check", "day", "receivingMaterial", "adjustAccount", "transfer", "msl", "mslProduct", "mediaStorage", "storecheckTemplate", "activityStorecheck", "activityItemStatus", "itemStatusType", "adjustInventory", "inventory", "integrationApp", "joinActionsWebHook", "patchAction", "updateIntegrationMeta", "assetPartType", "assetPart", "assetPartUnit", "assetPartReceival", "assetPartTransfer", "returnAssetPartUnit", "storeAssetPartUnit", "ocrInvoiceJobTemplate", "ocrInvoiceJobGroup", "activityAiSalesOrder", "ocrInvoiceJob", "ocrInvoiceJobPage", "settings", "mailUnsubscribe", "approvalRequest", "safeInvoiceSerialCounter", "clientLocation", "assetType", "asset", "assetUnit", "workorderPortal", "approval", "workorderCategory", "contract", "contractInstallment", "repBalanceSummary", "workorderPortalLink", "customField", "salesAnalyticsReport", "clmPresentation", "clmSequence", "clmSlide", "clmFetch", "pdfMergeField", "visitReason", "targetRule", "plan", "calendar", "lineTarget", "bulkImport", "bulkExport"];
320
324
  generateUUID: ({ prefix, suffix, length, }: {
321
325
  prefix?: string;
322
326
  suffix?: string;
@@ -481,6 +485,14 @@ export default class Repzo {
481
485
  update: (id: Service.Route.Update.ID, body: Service.Route.Update.Body) => Promise<Service.Route.Update.Result>;
482
486
  remove: (id: Service.Route.Remove.ID) => Promise<Service.Route.Remove.Result>;
483
487
  };
488
+ geoZone: {
489
+ _path: "geo-zone";
490
+ find: (params?: Service.GeoZone.Find.Params) => Promise<Service.GeoZone.Find.Result>;
491
+ get: (id: Service.GeoZone.Get.ID, params?: Service.GeoZone.Get.Params) => Promise<Service.GeoZone.Get.Result>;
492
+ create: (body: Service.GeoZone.Create.Body) => Promise<Service.GeoZone.Create.Result>;
493
+ update: (id: Service.GeoZone.Update.ID, body: Service.GeoZone.Update.Body) => Promise<Service.GeoZone.Update.Result>;
494
+ remove: (id: Service.GeoZone.Remove.ID) => Promise<Service.GeoZone.Remove.Result>;
495
+ };
484
496
  productModifiersGroup: {
485
497
  _path: "product-modifiers-group";
486
498
  find: (params?: Service.ProductModifiersGroup.Find.Params) => Promise<Service.ProductModifiersGroup.Find.Result>;
@@ -1420,6 +1432,11 @@ export default class Repzo {
1420
1432
  create: (params: Service.BulkImport.Create.Params, body: Service.BulkImport.Create.Body) => Promise<Service.BulkImport.Create.Result>;
1421
1433
  update: (id: Service.BulkImport.Update.ID) => Promise<Service.BulkImport.Update.Result>;
1422
1434
  };
1435
+ bulkExport: {
1436
+ _path: "bulk-export";
1437
+ find: (params?: Service.BulkExport.Find.Params) => Promise<Service.BulkExport.Find.Result>;
1438
+ create: (params: Service.BulkExport.Create.Params, body: Service.BulkExport.Create.Body) => Promise<Service.BulkExport.Create.Result>;
1439
+ };
1423
1440
  deliveryNote: {
1424
1441
  _path: "delivery-note";
1425
1442
  find: (params?: Service.DeliveryNote.Find.Params) => Promise<Service.DeliveryNote.Find.Result>;
package/lib/index.js CHANGED
@@ -24,6 +24,7 @@ export const end_points = {
24
24
  TAG: "tag",
25
25
  WAREHOUSE: "warehouse",
26
26
  ROUTE: "route",
27
+ GEO_ZONE: "geo-zone",
27
28
  PRODUCT_MODIFIERS_GROUP: "product-modifiers-group",
28
29
  CHANNEL: "client-channel",
29
30
  SPECIALITY: "speciality",
@@ -147,6 +148,7 @@ export const end_points = {
147
148
  CALENDAR: "calendar",
148
149
  LINE_TARGET: "line-target",
149
150
  BULK_IMPORT: "bulk-import",
151
+ BULK_EXPORT: "bulk-export",
150
152
  DELIVERY_NOTE: "delivery-note",
151
153
  RESERVATION: "reservation",
152
154
  };
@@ -170,6 +172,7 @@ export const availableService = [
170
172
  "tag",
171
173
  "warehouse",
172
174
  "route",
175
+ "geoZone",
173
176
  "productModifiersGroup",
174
177
  "channel",
175
178
  "speciality",
@@ -253,6 +256,7 @@ export const availableService = [
253
256
  "calendar",
254
257
  "lineTarget",
255
258
  "bulkImport",
259
+ "bulkExport",
256
260
  ];
257
261
  class Repzo {
258
262
  constructor(apiKey, options) {
@@ -712,6 +716,28 @@ class Repzo {
712
716
  return res;
713
717
  },
714
718
  };
719
+ this.geoZone = {
720
+ _path: Repzo._end_points.GEO_ZONE,
721
+ find: async (params) => {
722
+ let res = await this._fetch(this.svAPIEndpoint, this.geoZone._path, params);
723
+ return res;
724
+ },
725
+ get: async (id, params) => {
726
+ return await this._fetch(this.svAPIEndpoint, this.geoZone._path + `/${id}`, params);
727
+ },
728
+ create: async (body) => {
729
+ let res = await this._create(this.svAPIEndpoint, this.geoZone._path, body);
730
+ return res;
731
+ },
732
+ update: async (id, body) => {
733
+ let res = await this._update(this.svAPIEndpoint, this.geoZone._path + `/${id}`, body);
734
+ return res;
735
+ },
736
+ remove: async (id) => {
737
+ let res = await this._delete(this.svAPIEndpoint, this.geoZone._path + `/${id}`);
738
+ return res;
739
+ },
740
+ };
715
741
  this.productModifiersGroup = {
716
742
  _path: Repzo._end_points.PRODUCT_MODIFIERS_GROUP,
717
743
  find: async (params) => {
@@ -2955,6 +2981,17 @@ class Repzo {
2955
2981
  return res;
2956
2982
  },
2957
2983
  };
2984
+ this.bulkExport = {
2985
+ _path: Repzo._end_points.BULK_EXPORT,
2986
+ find: async (params) => {
2987
+ let res = await this._fetch(this.svAPIEndpoint, this.bulkExport._path, params);
2988
+ return res;
2989
+ },
2990
+ create: async (params, body) => {
2991
+ let res = await this._create(this.svAPIEndpoint, this.bulkExport._path, body, params);
2992
+ return res;
2993
+ },
2994
+ };
2958
2995
  this.deliveryNote = {
2959
2996
  _path: Repzo._end_points.DELIVERY_NOTE,
2960
2997
  find: async (params) => {
@@ -2466,6 +2466,78 @@ export declare namespace Service {
2466
2466
  type Result = TeamSchema;
2467
2467
  }
2468
2468
  }
2469
+ namespace GeoZone {
2470
+ interface Polygon {
2471
+ type: "Polygon";
2472
+ coordinates: [number, number][][];
2473
+ }
2474
+ interface AssignedRep {
2475
+ _id: StringId;
2476
+ name: string;
2477
+ }
2478
+ interface Data {
2479
+ _id: StringId;
2480
+ name: string;
2481
+ description?: string;
2482
+ polygon: Polygon;
2483
+ disabled: boolean;
2484
+ editor: AdminOrRepOrTenantOrClient;
2485
+ assigned_reps?: AssignedRep[];
2486
+ company_namespace: string[];
2487
+ createdAt: string;
2488
+ updatedAt: string;
2489
+ __v: number;
2490
+ }
2491
+ interface CreateBody {
2492
+ name: string;
2493
+ description?: string;
2494
+ polygon: Polygon;
2495
+ company_namespace?: string[];
2496
+ }
2497
+ interface UpdateBody {
2498
+ name?: string;
2499
+ description?: string;
2500
+ polygon?: Polygon;
2501
+ disabled?: boolean;
2502
+ editor?: AdminOrRepOrTenantOrClient;
2503
+ }
2504
+ namespace Find {
2505
+ type Params = DefaultPaginationQueryParams & {
2506
+ _id?: StringId | StringId[];
2507
+ name?: string | string[];
2508
+ search?: string;
2509
+ disabled?: boolean;
2510
+ inject_assigned_reps?: boolean;
2511
+ from_updatedAt?: number;
2512
+ to_updatedAt?: number;
2513
+ from_createdAt?: number;
2514
+ to_createdAt?: number;
2515
+ };
2516
+ interface Result extends DefaultPaginationResult {
2517
+ data: Data[];
2518
+ }
2519
+ }
2520
+ namespace Get {
2521
+ type ID = StringId;
2522
+ type Params = {
2523
+ inject_assigned_reps?: boolean;
2524
+ };
2525
+ type Result = Data;
2526
+ }
2527
+ namespace Create {
2528
+ type Body = CreateBody;
2529
+ type Result = Data;
2530
+ }
2531
+ namespace Update {
2532
+ type ID = StringId;
2533
+ type Body = UpdateBody;
2534
+ type Result = Data;
2535
+ }
2536
+ namespace Remove {
2537
+ type ID = StringId;
2538
+ type Result = Data;
2539
+ }
2540
+ }
2469
2541
  namespace Rep {
2470
2542
  interface RepPermissions {
2471
2543
  rep_can_print_payment_after_allowance_period?: boolean;
@@ -2558,6 +2630,8 @@ export declare namespace Service {
2558
2630
  rep_can_create_client_line_approval_request?: boolean;
2559
2631
  rep_can_enter_client_code_at_create_client?: boolean;
2560
2632
  rep_can_edit_client_location_at_create_client?: boolean;
2633
+ rep_can_start_visit_out_of_geofence?: boolean;
2634
+ rep_can_create_approval_request_to_start_visit_out_of_geofence?: boolean;
2561
2635
  }
2562
2636
  interface TargetResults {
2563
2637
  totalPoints: number;
@@ -2621,6 +2695,7 @@ export declare namespace Service {
2621
2695
  };
2622
2696
  force_online_connectivity?: boolean;
2623
2697
  assigned_targets?: string[];
2698
+ assigned_geo_zones?: (string | GeoZone.Data)[];
2624
2699
  lines?: string[];
2625
2700
  targetResults?: TargetResults;
2626
2701
  previously_assigned_clients?: string[];
@@ -2681,6 +2756,7 @@ export declare namespace Service {
2681
2756
  };
2682
2757
  force_online_connectivity?: boolean;
2683
2758
  assigned_targets?: string[];
2759
+ assigned_geo_zones?: string[] | null;
2684
2760
  lines?: string[];
2685
2761
  targetResults?: TargetResults;
2686
2762
  previously_assigned_clients?: string[];
@@ -2705,13 +2781,14 @@ export declare namespace Service {
2705
2781
  handle_credit_limit?: boolean;
2706
2782
  credit_limit?: number;
2707
2783
  }
2708
- type PopulatedKeys = "line" | "lines" | "job_category" | "teams" | "assigned_forms_v2" | "job_category" | "cover_photo" | "assigned_plan" | "assigned_retail_execution_templates" | "assigned_clm_presentations" | "warehouse";
2784
+ type PopulatedKeys = "line" | "lines" | "job_category" | "teams" | "assigned_forms_v2" | "job_category" | "cover_photo" | "assigned_plan" | "assigned_retail_execution_templates" | "assigned_clm_presentations" | "assigned_geo_zones" | "warehouse";
2709
2785
  export type RepWithPopulatedKeysSchema = RepSchema & {
2710
2786
  lines?: string[] | Line.LineSchema[];
2711
2787
  job_category?: string[] | JobCategory.JobCategorySchema[];
2712
2788
  teams?: string[] | Team.TeamSchema[];
2713
2789
  assigned_warehouse?: string | Pick<Warehouse.WarehouseSchema, "_id" | "name" | "code" | "type" | "integration_meta">;
2714
2790
  assigned_main_warehouse?: string | Pick<Warehouse.WarehouseSchema, "_id" | "name" | "code" | "type" | "integration_meta">;
2791
+ assigned_geo_zones?: (string | GeoZone.Data)[];
2715
2792
  };
2716
2793
  export namespace Find {
2717
2794
  type Params = DefaultPaginationQueryParams & {
@@ -2733,6 +2810,7 @@ export declare namespace Service {
2733
2810
  assigned_plan?: string | string[];
2734
2811
  force_online_connectivity?: boolean;
2735
2812
  assigned_targets?: string | string[];
2813
+ assigned_geo_zones?: string | string[];
2736
2814
  lines?: string | string[];
2737
2815
  job_option?: JobOption | JobOption[];
2738
2816
  "permissions.rep_can_add_client"?: boolean;
@@ -2821,6 +2899,8 @@ export declare namespace Service {
2821
2899
  "permissions.rep_can_create_client_line_approval_request"?: boolean;
2822
2900
  "permissions.rep_can_enter_client_code_at_create_client"?: boolean;
2823
2901
  "permissions.rep_can_edit_client_location_at_create_client"?: boolean;
2902
+ "permissions.rep_can_start_visit_out_of_geofence"?: boolean;
2903
+ "permissions.rep_can_create_approval_request_to_start_visit_out_of_geofence"?: boolean;
2824
2904
  "permissions.rep_can_view_stock_on_transfers"?: boolean;
2825
2905
  "permissions.rep_must_invoice_items_from_cross_inventory_and_msl"?: boolean;
2826
2906
  "settings.rep_must_end_day_after"?: `${number}:${number}`;
@@ -6043,6 +6123,12 @@ export declare namespace Service {
6043
6123
  total_float_rounded?: number;
6044
6124
  total_float_rounded_sum?: number;
6045
6125
  total_before_tax?: number;
6126
+ /**
6127
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
6128
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
6129
+ * `taxable_subtotal`.
6130
+ */
6131
+ total_before_deduction_and_tax?: number;
6046
6132
  taxable_amount_float?: number;
6047
6133
  taxable_amount_float_rounded_sum?: number;
6048
6134
  taxable_amount_float_rounded?: number;
@@ -6055,6 +6141,7 @@ export declare namespace Service {
6055
6141
  pre_total_float_rounded?: number;
6056
6142
  pre_total_float_rounded_sum?: number;
6057
6143
  pre_total_before_tax?: number;
6144
+ pre_total_before_deduction_and_tax?: number;
6058
6145
  pre_taxable_amount_float?: number;
6059
6146
  pre_taxable_amount_float_rounded?: number;
6060
6147
  pre_taxable_amount_float_rounded_sum?: number;
@@ -6067,6 +6154,7 @@ export declare namespace Service {
6067
6154
  return_total_float_rounded?: number;
6068
6155
  return_total_float_rounded_sum?: number;
6069
6156
  return_total_before_tax?: number;
6157
+ return_total_before_deduction_and_tax?: number;
6070
6158
  return_taxable_amount_float?: number;
6071
6159
  return_taxable_amount_float_rounded?: number;
6072
6160
  return_taxable_amount_float_rounded_sum?: number;
@@ -6252,6 +6340,12 @@ export declare namespace Service {
6252
6340
  total_float_rounded?: number;
6253
6341
  total_float_rounded_sum?: number;
6254
6342
  total_before_tax?: number;
6343
+ /**
6344
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
6345
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
6346
+ * `taxable_subtotal`.
6347
+ */
6348
+ total_before_deduction_and_tax?: number;
6255
6349
  taxable_amount_float?: number;
6256
6350
  taxable_amount_float_rounded_sum?: number;
6257
6351
  taxable_amount_float_rounded?: number;
@@ -6264,6 +6358,7 @@ export declare namespace Service {
6264
6358
  pre_total_float_rounded?: number;
6265
6359
  pre_total_float_rounded_sum?: number;
6266
6360
  pre_total_before_tax?: number;
6361
+ pre_total_before_deduction_and_tax?: number;
6267
6362
  pre_taxable_amount_float?: number;
6268
6363
  pre_taxable_amount_float_rounded?: number;
6269
6364
  pre_taxable_amount_float_rounded_sum?: number;
@@ -6276,6 +6371,7 @@ export declare namespace Service {
6276
6371
  return_total_float_rounded?: number;
6277
6372
  return_total_float_rounded_sum?: number;
6278
6373
  return_total_before_tax?: number;
6374
+ return_total_before_deduction_and_tax?: number;
6279
6375
  return_taxable_amount_float?: number;
6280
6376
  return_taxable_amount_float_rounded?: number;
6281
6377
  return_taxable_amount_float_rounded_sum?: number;
@@ -6649,6 +6745,12 @@ export declare namespace Service {
6649
6745
  total_float_rounded?: number;
6650
6746
  total_float_rounded_sum?: number;
6651
6747
  total_before_tax?: number;
6748
+ /**
6749
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
6750
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
6751
+ * `taxable_subtotal`.
6752
+ */
6753
+ total_before_deduction_and_tax?: number;
6652
6754
  taxable_amount_float?: number;
6653
6755
  taxable_amount_float_rounded_sum?: number;
6654
6756
  taxable_amount_float_rounded?: number;
@@ -6661,6 +6763,7 @@ export declare namespace Service {
6661
6763
  pre_total_float_rounded?: number;
6662
6764
  pre_total_float_rounded_sum?: number;
6663
6765
  pre_total_before_tax?: number;
6766
+ pre_total_before_deduction_and_tax?: number;
6664
6767
  pre_taxable_amount_float?: number;
6665
6768
  pre_taxable_amount_float_rounded?: number;
6666
6769
  pre_taxable_amount_float_rounded_sum?: number;
@@ -6673,6 +6776,7 @@ export declare namespace Service {
6673
6776
  return_total_float_rounded?: number;
6674
6777
  return_total_float_rounded_sum?: number;
6675
6778
  return_total_before_tax?: number;
6779
+ return_total_before_deduction_and_tax?: number;
6676
6780
  return_taxable_amount_float?: number;
6677
6781
  return_taxable_amount_float_rounded?: number;
6678
6782
  return_taxable_amount_float_rounded_sum?: number;
@@ -6819,6 +6923,17 @@ export declare namespace Service {
6819
6923
  taxable_subtotal: number;
6820
6924
  tax_amount: number;
6821
6925
  total: number;
6926
+ total_before_tax?: number;
6927
+ /**
6928
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
6929
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
6930
+ * `taxable_subtotal`.
6931
+ */
6932
+ total_before_deduction_and_tax?: number;
6933
+ pre_total_before_tax?: number;
6934
+ pre_total_before_deduction_and_tax?: number;
6935
+ return_total_before_tax?: number;
6936
+ return_total_before_deduction_and_tax?: number;
6822
6937
  pre_subtotal?: number;
6823
6938
  pre_discount_amount?: number;
6824
6939
  pre_taxable_subtotal?: number;
@@ -6932,6 +7047,17 @@ export declare namespace Service {
6932
7047
  taxable_subtotal: number;
6933
7048
  tax_amount: number;
6934
7049
  total: number;
7050
+ total_before_tax?: number;
7051
+ /**
7052
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
7053
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
7054
+ * `taxable_subtotal`.
7055
+ */
7056
+ total_before_deduction_and_tax?: number;
7057
+ pre_total_before_tax?: number;
7058
+ pre_total_before_deduction_and_tax?: number;
7059
+ return_total_before_tax?: number;
7060
+ return_total_before_deduction_and_tax?: number;
6935
7061
  pre_subtotal?: number;
6936
7062
  pre_discount_amount?: number;
6937
7063
  pre_taxable_subtotal?: number;
@@ -7046,6 +7172,17 @@ export declare namespace Service {
7046
7172
  taxable_subtotal?: number;
7047
7173
  tax_amount?: number;
7048
7174
  total?: number;
7175
+ total_before_tax?: number;
7176
+ /**
7177
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
7178
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
7179
+ * `taxable_subtotal`.
7180
+ */
7181
+ total_before_deduction_and_tax?: number;
7182
+ pre_total_before_tax?: number;
7183
+ pre_total_before_deduction_and_tax?: number;
7184
+ return_total_before_tax?: number;
7185
+ return_total_before_deduction_and_tax?: number;
7049
7186
  pre_subtotal?: number;
7050
7187
  pre_discount_amount?: number;
7051
7188
  pre_taxable_subtotal?: number;
@@ -11240,6 +11377,12 @@ export declare namespace Service {
11240
11377
  total_float_rounded?: number;
11241
11378
  total_float_rounded_sum?: number;
11242
11379
  total_before_tax?: number;
11380
+ /**
11381
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
11382
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
11383
+ * `taxable_subtotal`.
11384
+ */
11385
+ total_before_deduction_and_tax?: number;
11243
11386
  taxable_amount_float?: number;
11244
11387
  taxable_amount_float_rounded_sum?: number;
11245
11388
  taxable_amount_float_rounded?: number;
@@ -11257,6 +11400,7 @@ export declare namespace Service {
11257
11400
  pre_total_float_rounded?: number;
11258
11401
  pre_total_float_rounded_sum?: number;
11259
11402
  pre_total_before_tax?: number;
11403
+ pre_total_before_deduction_and_tax?: number;
11260
11404
  pre_taxable_amount_float?: number;
11261
11405
  pre_taxable_amount_float_rounded?: number;
11262
11406
  pre_taxable_amount_float_rounded_sum?: number;
@@ -11274,6 +11418,7 @@ export declare namespace Service {
11274
11418
  return_total_float_rounded?: number;
11275
11419
  return_total_float_rounded_sum?: number;
11276
11420
  return_total_before_tax?: number;
11421
+ return_total_before_deduction_and_tax?: number;
11277
11422
  return_taxable_amount_float?: number;
11278
11423
  return_taxable_amount_float_rounded?: number;
11279
11424
  return_taxable_amount_float_rounded_sum?: number;
@@ -11447,6 +11592,12 @@ export declare namespace Service {
11447
11592
  total_float_rounded?: number;
11448
11593
  total_float_rounded_sum?: number;
11449
11594
  total_before_tax?: number;
11595
+ /**
11596
+ * `total_before_tax + totalDeductionBeforeTax`: net of tax and before the
11597
+ * cart (header) deduction. Net of tax for inclusive-tax lines too, unlike
11598
+ * `taxable_subtotal`.
11599
+ */
11600
+ total_before_deduction_and_tax?: number;
11450
11601
  taxable_amount_float?: number;
11451
11602
  taxable_amount_float_rounded_sum?: number;
11452
11603
  taxable_amount_float_rounded?: number;
@@ -11464,6 +11615,7 @@ export declare namespace Service {
11464
11615
  pre_total_float_rounded?: number;
11465
11616
  pre_total_float_rounded_sum?: number;
11466
11617
  pre_total_before_tax?: number;
11618
+ pre_total_before_deduction_and_tax?: number;
11467
11619
  pre_taxable_amount_float?: number;
11468
11620
  pre_taxable_amount_float_rounded?: number;
11469
11621
  pre_taxable_amount_float_rounded_sum?: number;
@@ -11481,6 +11633,7 @@ export declare namespace Service {
11481
11633
  return_total_float_rounded?: number;
11482
11634
  return_total_float_rounded_sum?: number;
11483
11635
  return_total_before_tax?: number;
11636
+ return_total_before_deduction_and_tax?: number;
11484
11637
  return_taxable_amount_float?: number;
11485
11638
  return_taxable_amount_float_rounded?: number;
11486
11639
  return_taxable_amount_float_rounded_sum?: number;
@@ -12673,6 +12826,12 @@ export declare namespace Service {
12673
12826
  enable_whatsapp_mfa: boolean;
12674
12827
  enable_authenticator_mfa: boolean;
12675
12828
  minimum_accepted_mfa: number;
12829
+ start_day_outside_active_zone_action: "monitor" | "warning" | "block";
12830
+ start_visit_outside_active_zone_action: "monitor" | "warning" | "block";
12831
+ work_outside_active_zone_action: "monitor" | "warning" | "block";
12832
+ no_active_zone_action: "allow" | "block";
12833
+ use_accuracy_radius_near_zone_boundary: boolean;
12834
+ zone_boundary_grace_minutes: number;
12676
12835
  createdAt: Date;
12677
12836
  updatedAt: Date;
12678
12837
  }
@@ -12865,6 +13024,12 @@ export declare namespace Service {
12865
13024
  enable_whatsapp_mfa: boolean;
12866
13025
  enable_authenticator_mfa: boolean;
12867
13026
  minimum_accepted_mfa: number;
13027
+ start_day_outside_active_zone_action?: "monitor" | "warning" | "block";
13028
+ start_visit_outside_active_zone_action?: "monitor" | "warning" | "block";
13029
+ work_outside_active_zone_action?: "monitor" | "warning" | "block";
13030
+ no_active_zone_action?: "allow" | "block";
13031
+ use_accuracy_radius_near_zone_boundary?: boolean;
13032
+ zone_boundary_grace_minutes?: number;
12868
13033
  }
12869
13034
  namespace Update {
12870
13035
  type ID = StringId;
@@ -16159,7 +16324,7 @@ export declare namespace Service {
16159
16324
  export {};
16160
16325
  }
16161
16326
  namespace NotificationsCenter {
16162
- export type Command = "update-categories" | "update-clients" | "bulk-update-clients" | "update-inventory" | "update-measureunitFamilies" | "update-measureunits" | "update-pricelistItems" | "update-pricelists" | "update-products" | "update-rep" | "update-salesmsl" | "update-settings" | "update-tags" | "update-taxes" | "update-transfer" | "update-warehouses" | "update-jobCategories" | "update-plans" | "update-workorders" | "update-commentsThread" | "update-approval-request" | "update-variant-batch" | "update-asset-part-type" | "update-asset-part" | "update-asset-part-unit" | "update-custom-status" | "update-module-custom-validator" | "update-feedback-options" | "update-customfields" | "update-speciality" | "update-clm-presentation" | "update-clm-sequence" | "update-clm-slide" | "update-promotions" | "ai-chat-navigate" | "ai-chat-api-call" | "ai-chat-message-update" | "ai-chat-message-amend" | "update-delivery-note" | "update-item-status-type";
16327
+ export type Command = "update-categories" | "update-clients" | "bulk-update-clients" | "update-inventory" | "update-measureunitFamilies" | "update-measureunits" | "update-pricelistItems" | "update-pricelists" | "update-products" | "update-rep" | "update-salesmsl" | "update-settings" | "update-geo-zone" | "update-tags" | "update-taxes" | "update-transfer" | "update-warehouses" | "update-jobCategories" | "update-plans" | "update-workorders" | "update-commentsThread" | "update-approval-request" | "update-variant-batch" | "update-asset-part-type" | "update-asset-part" | "update-asset-part-unit" | "update-custom-status" | "update-module-custom-validator" | "update-feedback-options" | "update-customfields" | "update-speciality" | "update-clm-presentation" | "update-clm-sequence" | "update-clm-slide" | "update-promotions" | "ai-chat-navigate" | "ai-chat-api-call" | "ai-chat-message-update" | "ai-chat-message-amend" | "update-delivery-note" | "update-item-status-type";
16163
16328
  export interface Data {
16164
16329
  _id: StringId;
16165
16330
  command: Command;
@@ -19925,6 +20090,61 @@ export declare namespace Service {
19925
20090
  }
19926
20091
  export {};
19927
20092
  }
20093
+ namespace BulkExport {
20094
+ type BulkExportType = "clients" | "products" | "variants" | "categories" | "subCategories" | "availabilityMsl" | "availabilityMslWithProducts" | "reps" | "mslWithVariants" | "jobCategories" | "jobs" | "tags" | "routes" | "routesWithClients" | "plans" | "planWithRules" | "targetRulesWithClients" | "rulesWithRoutes" | "targetRulesWithReps" | "adjustAccount" | "rules" | "warehouses" | "productGroups" | "priceListItems" | "measureunit" | "measureunitFamily" | "lineTarget" | "clientLineClassification" | "retailExecutionPresets" | "promotions" | "customListItems" | "assets" | "assetUnits" | "speciality" | "clientLocation" | "reminders" | "admins" | "companyGroup" | "company" | "variantBatch" | "banksList" | "clientUblInfo" | "supplier" | "contractInstallment" | "targetRule" | "contracts" | "assetPartTypes" | "assetParts" | "clientUblInfo_JO" | "clientUblInfo_SA" | "nameSpaceFreshnessWindowCodes";
20095
+ interface Data {
20096
+ _id: StringId;
20097
+ creator: AdminOrRepOrTenantOrClient;
20098
+ type: BulkExportType;
20099
+ status: "processing" | "success" | "fail";
20100
+ messages: any[];
20101
+ _errors: any[];
20102
+ start_time: number;
20103
+ end_time?: number;
20104
+ bucket_name?: string;
20105
+ region?: string;
20106
+ key?: string;
20107
+ link?: string;
20108
+ media?: StringId[];
20109
+ teams: string[];
20110
+ export_type: "excel" | "parquet";
20111
+ row_count?: number;
20112
+ company_namespace: string[];
20113
+ createdAt: Date;
20114
+ updatedAt: Date;
20115
+ }
20116
+ interface CreateBody {
20117
+ export_type?: "excel" | "parquet";
20118
+ columns?: {
20119
+ [key: string]: any;
20120
+ };
20121
+ name?: string;
20122
+ creator?: AdminOrRepOrTenantOrClient;
20123
+ company_namespace?: string[];
20124
+ }
20125
+ namespace Find {
20126
+ type Params = DefaultPaginationQueryParams & {
20127
+ _id?: StringId | StringId[];
20128
+ type?: BulkExportType;
20129
+ status?: Data["status"] | Data["status"][];
20130
+ export?: boolean;
20131
+ export_type?: "excel" | "parquet";
20132
+ from_updatedAt?: number;
20133
+ to_updatedAt?: number;
20134
+ };
20135
+ interface Result extends DefaultPaginationResult {
20136
+ data: Data[];
20137
+ }
20138
+ }
20139
+ namespace Create {
20140
+ type Params = {
20141
+ type: BulkExportType;
20142
+ [key: string]: any;
20143
+ };
20144
+ type Body = CreateBody;
20145
+ type Result = Data;
20146
+ }
20147
+ }
19928
20148
  namespace DeliveryNote {
19929
20149
  interface User {
19930
20150
  _id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.288",
3
+ "version": "1.0.290",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",