@nomalism-com/types 0.49.31 → 0.49.32
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/dist/index.cjs +24 -6
- package/dist/index.js +24 -6
- package/dist/modules/stock/productUpdate/interface.d.ts +25 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -988,10 +988,14 @@ var Route64 = "product_location";
|
|
|
988
988
|
var interface_exports22 = {};
|
|
989
989
|
__export(interface_exports22, {
|
|
990
990
|
ExtractErrorCodeEnum: () => ExtractErrorCodeEnum,
|
|
991
|
+
LengthUnitEnum: () => LengthUnitEnum,
|
|
991
992
|
MappableFieldEnum: () => MappableFieldEnum,
|
|
992
993
|
MappableFieldLabels: () => MappableFieldLabels,
|
|
994
|
+
RefMatchEnum: () => RefMatchEnum,
|
|
995
|
+
RefMatchLabels: () => RefMatchLabels,
|
|
993
996
|
Route: () => Route65,
|
|
994
|
-
UpdatableFieldKinds: () => UpdatableFieldKinds
|
|
997
|
+
UpdatableFieldKinds: () => UpdatableFieldKinds,
|
|
998
|
+
WeightUnitEnum: () => WeightUnitEnum
|
|
995
999
|
});
|
|
996
1000
|
var Route65 = "product_update";
|
|
997
1001
|
var ExtractErrorCodeEnum = {
|
|
@@ -1035,13 +1039,27 @@ var UpdatableFieldKinds = {
|
|
|
1035
1039
|
designation: "text",
|
|
1036
1040
|
price_cost: "price",
|
|
1037
1041
|
price_sale: "price",
|
|
1038
|
-
width: "
|
|
1039
|
-
height: "
|
|
1040
|
-
length: "
|
|
1041
|
-
diameter: "
|
|
1042
|
-
weight: "
|
|
1042
|
+
width: "length",
|
|
1043
|
+
height: "length",
|
|
1044
|
+
length: "length",
|
|
1045
|
+
diameter: "length",
|
|
1046
|
+
weight: "weight",
|
|
1043
1047
|
compositions: "text"
|
|
1044
1048
|
};
|
|
1049
|
+
var LengthUnitEnum = {
|
|
1050
|
+
m: "m",
|
|
1051
|
+
cm: "cm",
|
|
1052
|
+
mm: "mm"
|
|
1053
|
+
};
|
|
1054
|
+
var WeightUnitEnum = { kg: "kg", g: "g" };
|
|
1055
|
+
var RefMatchEnum = {
|
|
1056
|
+
exact: "exact",
|
|
1057
|
+
contains: "contains"
|
|
1058
|
+
};
|
|
1059
|
+
var RefMatchLabels = {
|
|
1060
|
+
exact: "Igual \xE0 ref. fornecedor",
|
|
1061
|
+
contains: "Contida na ref. fornecedor"
|
|
1062
|
+
};
|
|
1045
1063
|
|
|
1046
1064
|
// src/modules/stock/promotion/interface.ts
|
|
1047
1065
|
var interface_exports23 = {};
|
package/dist/index.js
CHANGED
|
@@ -815,10 +815,14 @@ var Route64 = "product_location";
|
|
|
815
815
|
var interface_exports22 = {};
|
|
816
816
|
__export(interface_exports22, {
|
|
817
817
|
ExtractErrorCodeEnum: () => ExtractErrorCodeEnum,
|
|
818
|
+
LengthUnitEnum: () => LengthUnitEnum,
|
|
818
819
|
MappableFieldEnum: () => MappableFieldEnum,
|
|
819
820
|
MappableFieldLabels: () => MappableFieldLabels,
|
|
821
|
+
RefMatchEnum: () => RefMatchEnum,
|
|
822
|
+
RefMatchLabels: () => RefMatchLabels,
|
|
820
823
|
Route: () => Route65,
|
|
821
|
-
UpdatableFieldKinds: () => UpdatableFieldKinds
|
|
824
|
+
UpdatableFieldKinds: () => UpdatableFieldKinds,
|
|
825
|
+
WeightUnitEnum: () => WeightUnitEnum
|
|
822
826
|
});
|
|
823
827
|
var Route65 = "product_update";
|
|
824
828
|
var ExtractErrorCodeEnum = {
|
|
@@ -862,13 +866,27 @@ var UpdatableFieldKinds = {
|
|
|
862
866
|
designation: "text",
|
|
863
867
|
price_cost: "price",
|
|
864
868
|
price_sale: "price",
|
|
865
|
-
width: "
|
|
866
|
-
height: "
|
|
867
|
-
length: "
|
|
868
|
-
diameter: "
|
|
869
|
-
weight: "
|
|
869
|
+
width: "length",
|
|
870
|
+
height: "length",
|
|
871
|
+
length: "length",
|
|
872
|
+
diameter: "length",
|
|
873
|
+
weight: "weight",
|
|
870
874
|
compositions: "text"
|
|
871
875
|
};
|
|
876
|
+
var LengthUnitEnum = {
|
|
877
|
+
m: "m",
|
|
878
|
+
cm: "cm",
|
|
879
|
+
mm: "mm"
|
|
880
|
+
};
|
|
881
|
+
var WeightUnitEnum = { kg: "kg", g: "g" };
|
|
882
|
+
var RefMatchEnum = {
|
|
883
|
+
exact: "exact",
|
|
884
|
+
contains: "contains"
|
|
885
|
+
};
|
|
886
|
+
var RefMatchLabels = {
|
|
887
|
+
exact: "Igual \xE0 ref. fornecedor",
|
|
888
|
+
contains: "Contida na ref. fornecedor"
|
|
889
|
+
};
|
|
872
890
|
|
|
873
891
|
// src/modules/stock/promotion/interface.ts
|
|
874
892
|
var interface_exports23 = {};
|
|
@@ -69,8 +69,25 @@ export declare const MappableFieldEnum: {
|
|
|
69
69
|
export type IMappableField = (typeof MappableFieldEnum)[keyof typeof MappableFieldEnum];
|
|
70
70
|
export type IUpdatableField = Exclude<IMappableField, "provider_ref">;
|
|
71
71
|
export declare const MappableFieldLabels: Record<IMappableField, string>;
|
|
72
|
-
export type IMappableFieldKind = "text" | "price" | "
|
|
72
|
+
export type IMappableFieldKind = "text" | "price" | "length" | "weight";
|
|
73
73
|
export declare const UpdatableFieldKinds: Record<IUpdatableField, IMappableFieldKind>;
|
|
74
|
+
export declare const LengthUnitEnum: {
|
|
75
|
+
m: "m";
|
|
76
|
+
cm: "cm";
|
|
77
|
+
mm: "mm";
|
|
78
|
+
};
|
|
79
|
+
export type ILengthUnit = (typeof LengthUnitEnum)[keyof typeof LengthUnitEnum];
|
|
80
|
+
export declare const WeightUnitEnum: {
|
|
81
|
+
kg: "kg";
|
|
82
|
+
g: "g";
|
|
83
|
+
};
|
|
84
|
+
export type IWeightUnit = (typeof WeightUnitEnum)[keyof typeof WeightUnitEnum];
|
|
85
|
+
export declare const RefMatchEnum: {
|
|
86
|
+
exact: "exact";
|
|
87
|
+
contains: "contains";
|
|
88
|
+
};
|
|
89
|
+
export type IRefMatch = (typeof RefMatchEnum)[keyof typeof RefMatchEnum];
|
|
90
|
+
export declare const RefMatchLabels: Record<IRefMatch, string>;
|
|
74
91
|
export type IAnalyzeRowValues = Partial<Record<IUpdatableField, string>>;
|
|
75
92
|
export interface IAnalyzeRowInput {
|
|
76
93
|
page: number;
|
|
@@ -79,8 +96,11 @@ export interface IAnalyzeRowInput {
|
|
|
79
96
|
}
|
|
80
97
|
export interface IAnalyzeRequest {
|
|
81
98
|
id_provider: number;
|
|
99
|
+
ref_match: IRefMatch;
|
|
82
100
|
price_sale_includes_vat: boolean;
|
|
83
101
|
new_products_vat_tax_id?: string;
|
|
102
|
+
length_unit: ILengthUnit;
|
|
103
|
+
weight_unit: IWeightUnit;
|
|
84
104
|
rows: IAnalyzeRowInput[];
|
|
85
105
|
}
|
|
86
106
|
export type IAnalyzeValues = Partial<Record<IUpdatableField, string | number | null>>;
|
|
@@ -88,6 +108,7 @@ export interface IAnalyzeUpdate {
|
|
|
88
108
|
product_id: string;
|
|
89
109
|
reference: string;
|
|
90
110
|
provider_ref: string;
|
|
111
|
+
product_provider_ref: string;
|
|
91
112
|
page: number;
|
|
92
113
|
current: IAnalyzeValues & {
|
|
93
114
|
state: IProductState;
|
|
@@ -101,7 +122,7 @@ export interface IAnalyzeCreate {
|
|
|
101
122
|
page: number;
|
|
102
123
|
values: IAnalyzeValues;
|
|
103
124
|
}
|
|
104
|
-
export interface
|
|
125
|
+
export interface IAnalyzeProduct {
|
|
105
126
|
product_id: string;
|
|
106
127
|
reference: string;
|
|
107
128
|
provider_ref: string;
|
|
@@ -110,6 +131,7 @@ export interface IAnalyzeDiscontinue {
|
|
|
110
131
|
price_cost: number | null;
|
|
111
132
|
price_sale: number | null;
|
|
112
133
|
}
|
|
134
|
+
export type IAnalyzeDiscontinue = IAnalyzeProduct;
|
|
113
135
|
export interface IAnalyzeProblem {
|
|
114
136
|
page: number;
|
|
115
137
|
provider_ref: string | null;
|
|
@@ -121,7 +143,7 @@ export interface IAnalyzeResponse {
|
|
|
121
143
|
to_discontinue: IAnalyzeDiscontinue[];
|
|
122
144
|
problems: IAnalyzeProblem[];
|
|
123
145
|
unchanged_count: number;
|
|
124
|
-
|
|
146
|
+
without_provider_ref: IAnalyzeProduct[];
|
|
125
147
|
}
|
|
126
148
|
export interface IRepository {
|
|
127
149
|
extract(data: IExtractRequest): Promise<IExtractResponse>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nomalism-com/types",
|
|
3
3
|
"description": "A nomalism package with all necessary types and validations for developing APIs",
|
|
4
|
-
"version": "0.49.
|
|
4
|
+
"version": "0.49.32",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|