repzo 1.0.222 → 1.0.224
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +6 -0
- package/lib/index.js +8 -0
- package/lib/types/index.d.ts +31 -6
- package/package.json +1 -1
- package/src/index.ts +16 -0
- package/src/types/index.ts +32 -6
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"
|
package/lib/types/index.d.ts
CHANGED
|
@@ -3892,7 +3892,7 @@ export declare namespace Service {
|
|
|
3892
3892
|
}
|
|
3893
3893
|
}
|
|
3894
3894
|
namespace Promotion {
|
|
3895
|
-
interface CartFilter {
|
|
3895
|
+
export interface CartFilter {
|
|
3896
3896
|
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
3897
|
value: string[];
|
|
3898
3898
|
operator: "lte" | "lt" | "gte" | "gt" | "eq";
|
|
@@ -3904,18 +3904,18 @@ export declare namespace Service {
|
|
|
3904
3904
|
limit_value: number;
|
|
3905
3905
|
variants?: string[];
|
|
3906
3906
|
}
|
|
3907
|
-
interface ItemFilter {
|
|
3907
|
+
export interface ItemFilter {
|
|
3908
3908
|
filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "any";
|
|
3909
3909
|
value: string[];
|
|
3910
3910
|
limit_type: "count" | "price_amount";
|
|
3911
3911
|
limit_value: number;
|
|
3912
3912
|
variants?: string[];
|
|
3913
3913
|
}
|
|
3914
|
-
interface CartAdjustment {
|
|
3914
|
+
export interface CartAdjustment {
|
|
3915
3915
|
adjustment_type: "discount_amount" | "discount_ratio" | "shipping_fixed_price" | "shipping_discount_amount" | "shipping_discount_ratio" | "tax_exempt";
|
|
3916
3916
|
value: any;
|
|
3917
3917
|
}
|
|
3918
|
-
interface LineFilter {
|
|
3918
|
+
export interface LineFilter {
|
|
3919
3919
|
filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "line_total" | "base_unit_qty" | "promotion";
|
|
3920
3920
|
value: string[];
|
|
3921
3921
|
operator: "lte" | "lt" | "gte" | "gt" | "eq";
|
|
@@ -3924,11 +3924,11 @@ export declare namespace Service {
|
|
|
3924
3924
|
limit_value: number;
|
|
3925
3925
|
variants?: string[];
|
|
3926
3926
|
}
|
|
3927
|
-
interface LineAdjustment {
|
|
3927
|
+
export interface LineAdjustment {
|
|
3928
3928
|
adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
|
|
3929
3929
|
value: number;
|
|
3930
3930
|
}
|
|
3931
|
-
interface GetItem {
|
|
3931
|
+
export interface GetItem {
|
|
3932
3932
|
filter_type: "product" | "category" | "sub_category" | "product_group" | "brand" | "variant" | "gift";
|
|
3933
3933
|
value: string[];
|
|
3934
3934
|
limit_type: "count";
|
|
@@ -16996,6 +16996,31 @@ export declare namespace Service {
|
|
|
16996
16996
|
type Result = CLMPresentation.Find.Result | CLMSequence.Find.Result | CLMSlide.Find.Result;
|
|
16997
16997
|
}
|
|
16998
16998
|
}
|
|
16999
|
+
namespace CompareInvoiceToWarehouse {
|
|
17000
|
+
type Data = Proforma.Data & {
|
|
17001
|
+
items?: Proforma.Data["items"][0] & {
|
|
17002
|
+
comparison: {
|
|
17003
|
+
same_variant_line_reduction?: number[];
|
|
17004
|
+
qty_before: number;
|
|
17005
|
+
qty_after: number;
|
|
17006
|
+
measureunit_qty_before: number;
|
|
17007
|
+
measureunit_qty_after: number;
|
|
17008
|
+
};
|
|
17009
|
+
};
|
|
17010
|
+
};
|
|
17011
|
+
namespace Find {
|
|
17012
|
+
type Params = DefaultPaginationQueryParams & {
|
|
17013
|
+
proforma?: StringId[];
|
|
17014
|
+
warehouses?: StringId[];
|
|
17015
|
+
};
|
|
17016
|
+
interface Result extends DefaultPaginationResult {
|
|
17017
|
+
data: Data[];
|
|
17018
|
+
comment?: string;
|
|
17019
|
+
totals?: number;
|
|
17020
|
+
number_of_negative_items?: number;
|
|
17021
|
+
}
|
|
17022
|
+
}
|
|
17023
|
+
}
|
|
16999
17024
|
}
|
|
17000
17025
|
export type StringId = string;
|
|
17001
17026
|
export type NameSpaces = string[];
|
package/package.json
CHANGED
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 } {
|
package/src/types/index.ts
CHANGED
|
@@ -4398,7 +4398,7 @@ export namespace Service {
|
|
|
4398
4398
|
}
|
|
4399
4399
|
|
|
4400
4400
|
export namespace Promotion {
|
|
4401
|
-
interface CartFilter {
|
|
4401
|
+
export interface CartFilter {
|
|
4402
4402
|
filter_type:
|
|
4403
4403
|
| "product"
|
|
4404
4404
|
| "category"
|
|
@@ -4424,7 +4424,7 @@ export namespace Service {
|
|
|
4424
4424
|
limit_value: number;
|
|
4425
4425
|
variants?: string[];
|
|
4426
4426
|
}
|
|
4427
|
-
interface ItemFilter {
|
|
4427
|
+
export interface ItemFilter {
|
|
4428
4428
|
filter_type:
|
|
4429
4429
|
| "product"
|
|
4430
4430
|
| "category"
|
|
@@ -4438,7 +4438,7 @@ export namespace Service {
|
|
|
4438
4438
|
limit_value: number;
|
|
4439
4439
|
variants?: string[];
|
|
4440
4440
|
}
|
|
4441
|
-
interface CartAdjustment {
|
|
4441
|
+
export interface CartAdjustment {
|
|
4442
4442
|
adjustment_type:
|
|
4443
4443
|
| "discount_amount"
|
|
4444
4444
|
| "discount_ratio"
|
|
@@ -4448,7 +4448,7 @@ export namespace Service {
|
|
|
4448
4448
|
| "tax_exempt";
|
|
4449
4449
|
value: any;
|
|
4450
4450
|
}
|
|
4451
|
-
interface LineFilter {
|
|
4451
|
+
export interface LineFilter {
|
|
4452
4452
|
filter_type:
|
|
4453
4453
|
| "product"
|
|
4454
4454
|
| "category"
|
|
@@ -4466,11 +4466,11 @@ export namespace Service {
|
|
|
4466
4466
|
limit_value: number;
|
|
4467
4467
|
variants?: string[];
|
|
4468
4468
|
}
|
|
4469
|
-
interface LineAdjustment {
|
|
4469
|
+
export interface LineAdjustment {
|
|
4470
4470
|
adjustment_type: "discount_amount" | "discount_ratio" | "fixed_price";
|
|
4471
4471
|
value: number;
|
|
4472
4472
|
}
|
|
4473
|
-
interface GetItem {
|
|
4473
|
+
export interface GetItem {
|
|
4474
4474
|
filter_type:
|
|
4475
4475
|
| "product"
|
|
4476
4476
|
| "category"
|
|
@@ -18984,6 +18984,32 @@ export namespace Service {
|
|
|
18984
18984
|
| CLMSlide.Find.Result;
|
|
18985
18985
|
}
|
|
18986
18986
|
}
|
|
18987
|
+
|
|
18988
|
+
export namespace CompareInvoiceToWarehouse {
|
|
18989
|
+
export type Data = Proforma.Data & {
|
|
18990
|
+
items?: Proforma.Data["items"][0] & {
|
|
18991
|
+
comparison: {
|
|
18992
|
+
same_variant_line_reduction?: number[];
|
|
18993
|
+
qty_before: number;
|
|
18994
|
+
qty_after: number;
|
|
18995
|
+
measureunit_qty_before: number;
|
|
18996
|
+
measureunit_qty_after: number;
|
|
18997
|
+
};
|
|
18998
|
+
};
|
|
18999
|
+
};
|
|
19000
|
+
export namespace Find {
|
|
19001
|
+
export type Params = DefaultPaginationQueryParams & {
|
|
19002
|
+
proforma?: StringId[];
|
|
19003
|
+
warehouses?: StringId[];
|
|
19004
|
+
};
|
|
19005
|
+
export interface Result extends DefaultPaginationResult {
|
|
19006
|
+
data: Data[];
|
|
19007
|
+
comment?: string;
|
|
19008
|
+
totals?: number;
|
|
19009
|
+
number_of_negative_items?: number;
|
|
19010
|
+
}
|
|
19011
|
+
}
|
|
19012
|
+
}
|
|
18987
19013
|
}
|
|
18988
19014
|
|
|
18989
19015
|
export type StringId = string;
|