repzo 1.0.223 → 1.0.225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -114,6 +114,7 @@ export declare const end_points: {
114
114
  readonly CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity";
115
115
  readonly CLM_FETCH: "clm-fetch";
116
116
  readonly PROMOTIONS: "promotions";
117
+ readonly COMPARE_INVOICE_TO_WAREHOUSE: "compare-invoice-to-warehouse";
117
118
  };
118
119
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
119
120
  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", "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"];
@@ -239,6 +240,7 @@ export default class Repzo {
239
240
  readonly CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity";
240
241
  readonly CLM_FETCH: "clm-fetch";
241
242
  readonly PROMOTIONS: "promotions";
243
+ readonly COMPARE_INVOICE_TO_WAREHOUSE: "compare-invoice-to-warehouse";
242
244
  };
243
245
  private _fetch;
244
246
  private _create;
@@ -1122,4 +1124,8 @@ export default class Repzo {
1122
1124
  update: (id: Service.Promotion.Update.ID, body: Service.Promotion.Update.Body) => Promise<Service.Promotion.Update.Result>;
1123
1125
  remove: (id: Service.Promotion.Update.ID, params: Service.Promotion.Remove.Params) => Promise<Service.Promotion.Remove.Result>;
1124
1126
  };
1127
+ compareInvoiceToWarehouse: {
1128
+ _path: "compare-invoice-to-warehouse";
1129
+ find: (params?: Service.CompareInvoiceToWarehouse.Find.Params) => Promise<Service.CompareInvoiceToWarehouse.Find.Result>;
1130
+ };
1125
1131
  }
package/lib/index.js CHANGED
@@ -115,6 +115,7 @@ export const end_points = {
115
115
  CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity",
116
116
  CLM_FETCH: "clm-fetch",
117
117
  PROMOTIONS: "promotions",
118
+ COMPARE_INVOICE_TO_WAREHOUSE: "compare-invoice-to-warehouse",
118
119
  };
119
120
  export const availableService = [
120
121
  "client",
@@ -2309,6 +2310,13 @@ class Repzo {
2309
2310
  return res;
2310
2311
  },
2311
2312
  };
2313
+ this.compareInvoiceToWarehouse = {
2314
+ _path: Repzo._end_points.COMPARE_INVOICE_TO_WAREHOUSE,
2315
+ find: async (params) => {
2316
+ let res = await this._fetch(this.svAPIEndpoint, this.compareInvoiceToWarehouse._path, params);
2317
+ return res;
2318
+ },
2319
+ };
2312
2320
  this.svAPIEndpoint =
2313
2321
  !options?.env || options?.env == "production"
2314
2322
  ? "https://sv.api.repzo.me"
@@ -3893,6 +3893,7 @@ export declare namespace Service {
3893
3893
  }
3894
3894
  namespace Promotion {
3895
3895
  export interface CartFilter {
3896
+ _id?: StringId;
3896
3897
  filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "cart_total" | "items_count" | "client" | "tag" | "channel" | "distinct_variants_count" | "distinct_products_count" | "promotion" | "cart_type" | "invoice_payment_type" | "creator_id";
3897
3898
  value: string[];
3898
3899
  operator: "lte" | "lt" | "gte" | "gt" | "eq";
@@ -3902,41 +3903,47 @@ export declare namespace Service {
3902
3903
  };
3903
3904
  limit_type: "count" | "price_amount";
3904
3905
  limit_value: number;
3905
- variants?: string[];
3906
+ variants?: StringId[];
3906
3907
  }
3907
3908
  export interface ItemFilter {
3908
- filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "any";
3909
- value: string[];
3909
+ _id?: StringId;
3910
+ filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "any" | "gift";
3911
+ value: StringId[];
3910
3912
  limit_type: "count" | "price_amount";
3911
3913
  limit_value: number;
3912
- variants?: string[];
3914
+ variants?: StringId[];
3913
3915
  }
3914
3916
  export interface CartAdjustment {
3917
+ _id?: StringId;
3915
3918
  adjustment_type: "discount_amount" | "discount_ratio" | "shipping_fixed_price" | "shipping_discount_amount" | "shipping_discount_ratio" | "tax_exempt";
3916
3919
  value: any;
3917
3920
  }
3918
3921
  export interface LineFilter {
3922
+ _id?: StringId;
3919
3923
  filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "line_total" | "base_unit_qty" | "promotion";
3920
3924
  value: string[];
3921
3925
  operator: "lte" | "lt" | "gte" | "gt" | "eq";
3922
3926
  reject_if_pass: boolean;
3923
3927
  limit_type: "count" | "price_amount";
3924
3928
  limit_value: number;
3925
- variants?: string[];
3929
+ variants?: StringId[];
3926
3930
  }
3927
3931
  export interface LineAdjustment {
3932
+ _id?: StringId;
3928
3933
  adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
3929
3934
  value: number;
3930
3935
  }
3931
3936
  export interface GetItem {
3937
+ _id?: StringId;
3932
3938
  filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "gift";
3933
3939
  value: string[];
3934
3940
  limit_type: "count";
3935
3941
  limit_value: number;
3936
3942
  discount_ratio: number;
3937
- variants?: string[];
3943
+ variants?: StringId[];
3938
3944
  }
3939
3945
  interface Compound {
3946
+ _id?: StringId;
3940
3947
  type: "compound";
3941
3948
  manual_allocation?: boolean;
3942
3949
  appliedCount: number;
@@ -3967,7 +3974,7 @@ export declare namespace Service {
3967
3974
  }[];
3968
3975
  }
3969
3976
  export interface Data {
3970
- _id: string;
3977
+ _id: StringId;
3971
3978
  type: "compound";
3972
3979
  from: number;
3973
3980
  to: number;
@@ -3978,13 +3985,14 @@ export declare namespace Service {
3978
3985
  duration?: number;
3979
3986
  startsAt?: string;
3980
3987
  disabled: boolean;
3981
- promotions_groups?: string[];
3988
+ promotions_groups?: StringId[];
3982
3989
  details: Compound;
3983
- copied_from?: string;
3990
+ copied_from?: StringId;
3984
3991
  ref?: string;
3985
3992
  company_namespace: string[];
3986
- createdAt: Date;
3987
- updatedAt: Date;
3993
+ createdAt: string;
3994
+ updatedAt: string;
3995
+ __v?: number;
3988
3996
  }
3989
3997
  interface CreateBody {
3990
3998
  type: "compound";
@@ -16996,6 +17004,31 @@ export declare namespace Service {
16996
17004
  type Result = CLMPresentation.Find.Result | CLMSequence.Find.Result | CLMSlide.Find.Result;
16997
17005
  }
16998
17006
  }
17007
+ namespace CompareInvoiceToWarehouse {
17008
+ type Data = Proforma.Data & {
17009
+ items?: Proforma.Data["items"][0] & {
17010
+ comparison: {
17011
+ same_variant_line_reduction?: number[];
17012
+ qty_before: number;
17013
+ qty_after: number;
17014
+ measureunit_qty_before: number;
17015
+ measureunit_qty_after: number;
17016
+ };
17017
+ };
17018
+ };
17019
+ namespace Find {
17020
+ type Params = DefaultPaginationQueryParams & {
17021
+ proforma?: StringId[];
17022
+ warehouses?: StringId[];
17023
+ };
17024
+ interface Result extends DefaultPaginationResult {
17025
+ data: Data[];
17026
+ comment?: string;
17027
+ totals?: number;
17028
+ number_of_negative_items?: number;
17029
+ }
17030
+ }
17031
+ }
16999
17032
  }
17000
17033
  export type StringId = string;
17001
17034
  export type NameSpaces = string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repzo",
3
- "version": "1.0.223",
3
+ "version": "1.0.225",
4
4
  "description": "Repzo TypeScript SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/index.ts CHANGED
@@ -125,6 +125,7 @@ export const end_points = {
125
125
  CLM_FEEDBACK_ACTIVITY: "clm-feedback-activity",
126
126
  CLM_FETCH: "clm-fetch",
127
127
  PROMOTIONS: "promotions",
128
+ COMPARE_INVOICE_TO_WAREHOUSE: "compare-invoice-to-warehouse",
128
129
  } as const;
129
130
  export type EndPoints = (typeof end_points)[keyof typeof end_points];
130
131
 
@@ -5842,6 +5843,21 @@ export default class Repzo {
5842
5843
  return res;
5843
5844
  },
5844
5845
  };
5846
+
5847
+ compareInvoiceToWarehouse = {
5848
+ _path: Repzo._end_points.COMPARE_INVOICE_TO_WAREHOUSE,
5849
+ find: async (
5850
+ params?: Service.CompareInvoiceToWarehouse.Find.Params,
5851
+ ): Promise<Service.CompareInvoiceToWarehouse.Find.Result> => {
5852
+ let res: Service.CompareInvoiceToWarehouse.Find.Result =
5853
+ await this._fetch(
5854
+ this.svAPIEndpoint,
5855
+ this.compareInvoiceToWarehouse._path,
5856
+ params,
5857
+ );
5858
+ return res;
5859
+ },
5860
+ };
5845
5861
  }
5846
5862
 
5847
5863
  function normalizeParams(params: Params): { [key: string]: any } {
@@ -4399,6 +4399,7 @@ export namespace Service {
4399
4399
 
4400
4400
  export namespace Promotion {
4401
4401
  export interface CartFilter {
4402
+ _id?: StringId;
4402
4403
  filter_type:
4403
4404
  | "product"
4404
4405
  | "category"
@@ -4422,9 +4423,10 @@ export namespace Service {
4422
4423
  reject_if_pass: { type: Boolean; default: false };
4423
4424
  limit_type: "count" | "price_amount";
4424
4425
  limit_value: number;
4425
- variants?: string[];
4426
+ variants?: StringId[];
4426
4427
  }
4427
4428
  export interface ItemFilter {
4429
+ _id?: StringId;
4428
4430
  filter_type:
4429
4431
  | "product"
4430
4432
  | "category"
@@ -4432,13 +4434,15 @@ export namespace Service {
4432
4434
  | "product_group"
4433
4435
  | "brand"
4434
4436
  | "variant"
4435
- | "any";
4436
- value: string[];
4437
+ | "any"
4438
+ | "gift";
4439
+ value: StringId[];
4437
4440
  limit_type: "count" | "price_amount";
4438
4441
  limit_value: number;
4439
- variants?: string[];
4442
+ variants?: StringId[];
4440
4443
  }
4441
4444
  export interface CartAdjustment {
4445
+ _id?: StringId;
4442
4446
  adjustment_type:
4443
4447
  | "discount_amount"
4444
4448
  | "discount_ratio"
@@ -4449,6 +4453,7 @@ export namespace Service {
4449
4453
  value: any;
4450
4454
  }
4451
4455
  export interface LineFilter {
4456
+ _id?: StringId;
4452
4457
  filter_type:
4453
4458
  | "product"
4454
4459
  | "category"
@@ -4464,13 +4469,15 @@ export namespace Service {
4464
4469
  reject_if_pass: boolean;
4465
4470
  limit_type: "count" | "price_amount";
4466
4471
  limit_value: number;
4467
- variants?: string[];
4472
+ variants?: StringId[];
4468
4473
  }
4469
4474
  export interface LineAdjustment {
4475
+ _id?: StringId;
4470
4476
  adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
4471
4477
  value: number;
4472
4478
  }
4473
4479
  export interface GetItem {
4480
+ _id?: StringId;
4474
4481
  filter_type:
4475
4482
  | "product"
4476
4483
  | "category"
@@ -4483,10 +4490,11 @@ export namespace Service {
4483
4490
  limit_type: "count";
4484
4491
  limit_value: number;
4485
4492
  discount_ratio: number;
4486
- variants?: string[];
4493
+ variants?: StringId[];
4487
4494
  }
4488
4495
 
4489
4496
  interface Compound {
4497
+ _id?: StringId;
4490
4498
  type: "compound";
4491
4499
  manual_allocation?: boolean;
4492
4500
  appliedCount: number;
@@ -4522,7 +4530,7 @@ export namespace Service {
4522
4530
  }
4523
4531
 
4524
4532
  export interface Data {
4525
- _id: string;
4533
+ _id: StringId;
4526
4534
  type: "compound";
4527
4535
  from: number;
4528
4536
  to: number;
@@ -4533,13 +4541,14 @@ export namespace Service {
4533
4541
  duration?: number;
4534
4542
  startsAt?: string;
4535
4543
  disabled: boolean;
4536
- promotions_groups?: string[];
4544
+ promotions_groups?: StringId[];
4537
4545
  details: Compound;
4538
- copied_from?: string;
4546
+ copied_from?: StringId;
4539
4547
  ref?: string;
4540
4548
  company_namespace: string[];
4541
- createdAt: Date;
4542
- updatedAt: Date;
4549
+ createdAt: string;
4550
+ updatedAt: string;
4551
+ __v?: number;
4543
4552
  }
4544
4553
 
4545
4554
  interface CreateBody {
@@ -18984,6 +18993,32 @@ export namespace Service {
18984
18993
  | CLMSlide.Find.Result;
18985
18994
  }
18986
18995
  }
18996
+
18997
+ export namespace CompareInvoiceToWarehouse {
18998
+ export type Data = Proforma.Data & {
18999
+ items?: Proforma.Data["items"][0] & {
19000
+ comparison: {
19001
+ same_variant_line_reduction?: number[];
19002
+ qty_before: number;
19003
+ qty_after: number;
19004
+ measureunit_qty_before: number;
19005
+ measureunit_qty_after: number;
19006
+ };
19007
+ };
19008
+ };
19009
+ export namespace Find {
19010
+ export type Params = DefaultPaginationQueryParams & {
19011
+ proforma?: StringId[];
19012
+ warehouses?: StringId[];
19013
+ };
19014
+ export interface Result extends DefaultPaginationResult {
19015
+ data: Data[];
19016
+ comment?: string;
19017
+ totals?: number;
19018
+ number_of_negative_items?: number;
19019
+ }
19020
+ }
19021
+ }
18987
19022
  }
18988
19023
 
18989
19024
  export type StringId = string;