@nomalism-com/types 0.49.30 → 0.49.31
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 +27 -3
- package/dist/index.js +27 -3
- package/dist/modules/stock/productUpdate/interface.d.ts +13 -9
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -990,7 +990,8 @@ __export(interface_exports22, {
|
|
|
990
990
|
ExtractErrorCodeEnum: () => ExtractErrorCodeEnum,
|
|
991
991
|
MappableFieldEnum: () => MappableFieldEnum,
|
|
992
992
|
MappableFieldLabels: () => MappableFieldLabels,
|
|
993
|
-
Route: () => Route65
|
|
993
|
+
Route: () => Route65,
|
|
994
|
+
UpdatableFieldKinds: () => UpdatableFieldKinds
|
|
994
995
|
});
|
|
995
996
|
var Route65 = "product_update";
|
|
996
997
|
var ExtractErrorCodeEnum = {
|
|
@@ -1010,13 +1011,36 @@ var MappableFieldEnum = {
|
|
|
1010
1011
|
// obrigatório: liga a linha do PDF ao artigo
|
|
1011
1012
|
designation: "designation",
|
|
1012
1013
|
price_cost: "price_cost",
|
|
1013
|
-
price_sale: "price_sale"
|
|
1014
|
+
price_sale: "price_sale",
|
|
1015
|
+
width: "width",
|
|
1016
|
+
height: "height",
|
|
1017
|
+
length: "length",
|
|
1018
|
+
diameter: "diameter",
|
|
1019
|
+
weight: "weight",
|
|
1020
|
+
compositions: "compositions"
|
|
1014
1021
|
};
|
|
1015
1022
|
var MappableFieldLabels = {
|
|
1016
1023
|
provider_ref: "Refer\xEAncia do fornecedor",
|
|
1017
1024
|
designation: "Designa\xE7\xE3o",
|
|
1018
1025
|
price_cost: "Pre\xE7o de custo",
|
|
1019
|
-
price_sale: "Pre\xE7o de venda"
|
|
1026
|
+
price_sale: "Pre\xE7o de venda",
|
|
1027
|
+
width: "Largura",
|
|
1028
|
+
height: "Altura",
|
|
1029
|
+
length: "Comprimento",
|
|
1030
|
+
diameter: "Di\xE2metro",
|
|
1031
|
+
weight: "Peso",
|
|
1032
|
+
compositions: "Composi\xE7\xE3o"
|
|
1033
|
+
};
|
|
1034
|
+
var UpdatableFieldKinds = {
|
|
1035
|
+
designation: "text",
|
|
1036
|
+
price_cost: "price",
|
|
1037
|
+
price_sale: "price",
|
|
1038
|
+
width: "number",
|
|
1039
|
+
height: "number",
|
|
1040
|
+
length: "number",
|
|
1041
|
+
diameter: "number",
|
|
1042
|
+
weight: "number",
|
|
1043
|
+
compositions: "text"
|
|
1020
1044
|
};
|
|
1021
1045
|
|
|
1022
1046
|
// src/modules/stock/promotion/interface.ts
|
package/dist/index.js
CHANGED
|
@@ -817,7 +817,8 @@ __export(interface_exports22, {
|
|
|
817
817
|
ExtractErrorCodeEnum: () => ExtractErrorCodeEnum,
|
|
818
818
|
MappableFieldEnum: () => MappableFieldEnum,
|
|
819
819
|
MappableFieldLabels: () => MappableFieldLabels,
|
|
820
|
-
Route: () => Route65
|
|
820
|
+
Route: () => Route65,
|
|
821
|
+
UpdatableFieldKinds: () => UpdatableFieldKinds
|
|
821
822
|
});
|
|
822
823
|
var Route65 = "product_update";
|
|
823
824
|
var ExtractErrorCodeEnum = {
|
|
@@ -837,13 +838,36 @@ var MappableFieldEnum = {
|
|
|
837
838
|
// obrigatório: liga a linha do PDF ao artigo
|
|
838
839
|
designation: "designation",
|
|
839
840
|
price_cost: "price_cost",
|
|
840
|
-
price_sale: "price_sale"
|
|
841
|
+
price_sale: "price_sale",
|
|
842
|
+
width: "width",
|
|
843
|
+
height: "height",
|
|
844
|
+
length: "length",
|
|
845
|
+
diameter: "diameter",
|
|
846
|
+
weight: "weight",
|
|
847
|
+
compositions: "compositions"
|
|
841
848
|
};
|
|
842
849
|
var MappableFieldLabels = {
|
|
843
850
|
provider_ref: "Refer\xEAncia do fornecedor",
|
|
844
851
|
designation: "Designa\xE7\xE3o",
|
|
845
852
|
price_cost: "Pre\xE7o de custo",
|
|
846
|
-
price_sale: "Pre\xE7o de venda"
|
|
853
|
+
price_sale: "Pre\xE7o de venda",
|
|
854
|
+
width: "Largura",
|
|
855
|
+
height: "Altura",
|
|
856
|
+
length: "Comprimento",
|
|
857
|
+
diameter: "Di\xE2metro",
|
|
858
|
+
weight: "Peso",
|
|
859
|
+
compositions: "Composi\xE7\xE3o"
|
|
860
|
+
};
|
|
861
|
+
var UpdatableFieldKinds = {
|
|
862
|
+
designation: "text",
|
|
863
|
+
price_cost: "price",
|
|
864
|
+
price_sale: "price",
|
|
865
|
+
width: "number",
|
|
866
|
+
height: "number",
|
|
867
|
+
length: "number",
|
|
868
|
+
diameter: "number",
|
|
869
|
+
weight: "number",
|
|
870
|
+
compositions: "text"
|
|
847
871
|
};
|
|
848
872
|
|
|
849
873
|
// src/modules/stock/promotion/interface.ts
|
|
@@ -59,15 +59,23 @@ export declare const MappableFieldEnum: {
|
|
|
59
59
|
designation: "designation";
|
|
60
60
|
price_cost: "price_cost";
|
|
61
61
|
price_sale: "price_sale";
|
|
62
|
+
width: "width";
|
|
63
|
+
height: "height";
|
|
64
|
+
length: "length";
|
|
65
|
+
diameter: "diameter";
|
|
66
|
+
weight: "weight";
|
|
67
|
+
compositions: "compositions";
|
|
62
68
|
};
|
|
63
69
|
export type IMappableField = (typeof MappableFieldEnum)[keyof typeof MappableFieldEnum];
|
|
70
|
+
export type IUpdatableField = Exclude<IMappableField, "provider_ref">;
|
|
64
71
|
export declare const MappableFieldLabels: Record<IMappableField, string>;
|
|
72
|
+
export type IMappableFieldKind = "text" | "price" | "number";
|
|
73
|
+
export declare const UpdatableFieldKinds: Record<IUpdatableField, IMappableFieldKind>;
|
|
74
|
+
export type IAnalyzeRowValues = Partial<Record<IUpdatableField, string>>;
|
|
65
75
|
export interface IAnalyzeRowInput {
|
|
66
76
|
page: number;
|
|
67
77
|
provider_ref: string;
|
|
68
|
-
|
|
69
|
-
price_cost?: string;
|
|
70
|
-
price_sale?: string;
|
|
78
|
+
values: IAnalyzeRowValues;
|
|
71
79
|
}
|
|
72
80
|
export interface IAnalyzeRequest {
|
|
73
81
|
id_provider: number;
|
|
@@ -75,11 +83,7 @@ export interface IAnalyzeRequest {
|
|
|
75
83
|
new_products_vat_tax_id?: string;
|
|
76
84
|
rows: IAnalyzeRowInput[];
|
|
77
85
|
}
|
|
78
|
-
export
|
|
79
|
-
designation: string | null;
|
|
80
|
-
price_cost: number | null;
|
|
81
|
-
price_sale: number | null;
|
|
82
|
-
}
|
|
86
|
+
export type IAnalyzeValues = Partial<Record<IUpdatableField, string | number | null>>;
|
|
83
87
|
export interface IAnalyzeUpdate {
|
|
84
88
|
product_id: string;
|
|
85
89
|
reference: string;
|
|
@@ -89,7 +93,7 @@ export interface IAnalyzeUpdate {
|
|
|
89
93
|
state: IProductState;
|
|
90
94
|
};
|
|
91
95
|
new: IAnalyzeValues;
|
|
92
|
-
changes:
|
|
96
|
+
changes: IUpdatableField[];
|
|
93
97
|
reactivate: boolean;
|
|
94
98
|
}
|
|
95
99
|
export interface IAnalyzeCreate {
|
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.31",
|
|
5
5
|
"author": "Nomalism <it.nomalism@gmail.com> (https://nomalism.com/)",
|
|
6
6
|
"license": "UNLICENSED",
|
|
7
7
|
"type": "module",
|