cecon-interfaces 1.1.79 → 1.1.80
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm2022/index.mjs +4 -1
- package/dist/esm2022/product-company/entities/index.mjs +2 -0
- package/dist/esm2022/product-company/entities/product.entity.mjs +18 -0
- package/dist/esm2022/product-company/index.mjs +3 -0
- package/dist/esm2022/product-company/interfaces/i-product.mjs +2 -0
- package/dist/esm2022/product-company/interfaces/index.mjs +2 -0
- package/dist/esm2022/product-container/entities/index.mjs +2 -0
- package/dist/esm2022/product-container/entities/product.entity.mjs +22 -0
- package/dist/esm2022/product-container/index.mjs +3 -0
- package/dist/esm2022/product-container/interfaces/i-product.mjs +2 -0
- package/dist/esm2022/product-container/interfaces/index.mjs +2 -0
- package/dist/esm2022/product-global/entities/index.mjs +4 -0
- package/dist/esm2022/product-global/entities/product-brand.entity.mjs +17 -0
- package/dist/esm2022/product-global/entities/product-ncm.entity.mjs +18 -0
- package/dist/esm2022/product-global/entities/product.entity.mjs +46 -0
- package/dist/esm2022/product-global/enums/gtin-type.enum.mjs +9 -0
- package/dist/esm2022/product-global/enums/index.mjs +2 -0
- package/dist/esm2022/product-global/index.mjs +4 -0
- package/dist/esm2022/product-global/interfaces/i-brand.mjs +2 -0
- package/dist/esm2022/product-global/interfaces/i-ncm.mjs +2 -0
- package/dist/esm2022/product-global/interfaces/i-product.mjs +2 -0
- package/dist/esm2022/product-global/interfaces/index.mjs +2 -0
- package/dist/fesm2022/cecon-interfaces.mjs +126 -1
- package/dist/fesm2022/cecon-interfaces.mjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/package.json +1 -1
- package/dist/product-company/entities/index.d.ts +1 -0
- package/dist/product-company/entities/index.js +5 -0
- package/dist/product-company/entities/product.entity.d.ts +6 -0
- package/dist/product-company/entities/product.entity.js +39 -0
- package/dist/product-company/index.d.ts +2 -0
- package/dist/product-company/index.js +18 -0
- package/dist/product-company/interfaces/i-product.d.ts +11 -0
- package/dist/product-company/interfaces/i-product.js +2 -0
- package/dist/product-company/interfaces/index.d.ts +1 -0
- package/dist/product-company/interfaces/index.js +2 -0
- package/dist/product-container/entities/index.d.ts +1 -0
- package/dist/product-container/entities/index.js +5 -0
- package/dist/product-container/entities/product.entity.d.ts +10 -0
- package/dist/product-container/entities/product.entity.js +43 -0
- package/dist/product-container/index.d.ts +2 -0
- package/dist/product-container/index.js +18 -0
- package/dist/product-container/interfaces/i-product.d.ts +39 -0
- package/dist/product-container/interfaces/i-product.js +2 -0
- package/dist/product-container/interfaces/index.d.ts +1 -0
- package/dist/product-container/interfaces/index.js +2 -0
- package/dist/product-global/entities/index.d.ts +3 -0
- package/dist/product-global/entities/index.js +9 -0
- package/dist/product-global/entities/product-brand.entity.d.ts +6 -0
- package/dist/product-global/entities/product-brand.entity.js +21 -0
- package/dist/product-global/entities/product-ncm.entity.d.ts +7 -0
- package/dist/product-global/entities/product-ncm.entity.js +22 -0
- package/dist/product-global/entities/product.entity.d.ts +35 -0
- package/dist/product-global/entities/product.entity.js +50 -0
- package/dist/product-global/enums/gtin-type.enum.d.ts +7 -0
- package/dist/product-global/enums/gtin-type.enum.js +11 -0
- package/dist/product-global/enums/index.d.ts +1 -0
- package/dist/product-global/enums/index.js +5 -0
- package/dist/product-global/index.d.ts +3 -0
- package/dist/product-global/index.js +19 -0
- package/dist/product-global/interfaces/i-brand.d.ts +14 -0
- package/dist/product-global/interfaces/i-brand.js +2 -0
- package/dist/product-global/interfaces/i-ncm.d.ts +5 -0
- package/dist/product-global/interfaces/i-ncm.js +2 -0
- package/dist/product-global/interfaces/i-product.d.ts +211 -0
- package/dist/product-global/interfaces/i-product.js +2 -0
- package/dist/product-global/interfaces/index.d.ts +3 -0
- package/dist/product-global/interfaces/index.js +2 -0
- package/package.json +1 -1
@@ -0,0 +1,211 @@
|
|
1
|
+
import { GTINTypeEnum } from '../enums';
|
2
|
+
import { IProductBrand } from './i-brand';
|
3
|
+
import { IProductNcm } from './i-ncm';
|
4
|
+
export interface IProductBase {
|
5
|
+
/**
|
6
|
+
* Indicates whether the product is active.
|
7
|
+
* @default true
|
8
|
+
* @example true
|
9
|
+
*/
|
10
|
+
active: boolean;
|
11
|
+
/**
|
12
|
+
* Average price of the product.
|
13
|
+
* @example 1.5
|
14
|
+
* @default 0
|
15
|
+
* @minimum 0
|
16
|
+
* @maximum 9999999999999.99
|
17
|
+
*/
|
18
|
+
avgPrice: number;
|
19
|
+
/**
|
20
|
+
* Barcode of the product.
|
21
|
+
* @example "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAgAElEQ…"
|
22
|
+
* @default ""
|
23
|
+
*/
|
24
|
+
barcodeImage: string | null;
|
25
|
+
/**
|
26
|
+
* Contains brand information of the product.
|
27
|
+
* @example { "id": "5e4f1b1b1b1b1b1b1b1b1b1b", "name": "Brand name" }
|
28
|
+
*
|
29
|
+
*/
|
30
|
+
brand: IProductBrand;
|
31
|
+
/**
|
32
|
+
* CEST Code.
|
33
|
+
* @minlength 7
|
34
|
+
* @maxlength 7
|
35
|
+
*/
|
36
|
+
cest: string | null;
|
37
|
+
/**
|
38
|
+
* Date of product creation.
|
39
|
+
* @format date-time
|
40
|
+
* @example "2019-01-01T00:00:00.000Z"
|
41
|
+
* @default Date.now()
|
42
|
+
* @readonly
|
43
|
+
*/
|
44
|
+
createdAt: Date;
|
45
|
+
/**
|
46
|
+
* Description of the product or service.
|
47
|
+
* @minlength 1
|
48
|
+
* @maxlength 120
|
49
|
+
* @example "Product description"
|
50
|
+
*/
|
51
|
+
description: string;
|
52
|
+
/**
|
53
|
+
* Gross weight of the product.
|
54
|
+
* @example 1.5
|
55
|
+
* @default 0
|
56
|
+
*/
|
57
|
+
grossWeight: number | null;
|
58
|
+
/**
|
59
|
+
* Unit of measurement of gross weight.
|
60
|
+
* @minlength 1
|
61
|
+
* @maxlength 6
|
62
|
+
*/
|
63
|
+
grossWeightUnit: string | null;
|
64
|
+
/**
|
65
|
+
* To be filled with the GTIN-8, GTIN-12, GTIN-13 or GTIN-14 code
|
66
|
+
* (old EAN, UPC and DUN-14 codes).
|
67
|
+
* For products that do not have a bar code with GTIN,
|
68
|
+
* the literal "WITHOUT GTIN" must be informed.
|
69
|
+
* @minlength 1
|
70
|
+
* @maxlength 14
|
71
|
+
* @example "123456789"
|
72
|
+
*/
|
73
|
+
gtin: string;
|
74
|
+
/**
|
75
|
+
* Type of GTIN.
|
76
|
+
* @default GTINTypeEnum.GTIN_13
|
77
|
+
* @minlength 1
|
78
|
+
* @maxlength 8
|
79
|
+
*/
|
80
|
+
gtinType: GTINTypeEnum;
|
81
|
+
/**
|
82
|
+
* Height of the product.
|
83
|
+
* @example 15
|
84
|
+
* @default 0
|
85
|
+
*/
|
86
|
+
height: number | null;
|
87
|
+
/**
|
88
|
+
* Identifier of the product.
|
89
|
+
* @minlength 24
|
90
|
+
* @maxlength 24
|
91
|
+
* @example "5e4f1b1b1b1b1b1b1b1b1b1b"
|
92
|
+
*/
|
93
|
+
id: string;
|
94
|
+
/**
|
95
|
+
* Length of the product.
|
96
|
+
* @example 15
|
97
|
+
* @default 0
|
98
|
+
*/
|
99
|
+
length: number | null;
|
100
|
+
/**
|
101
|
+
* Max cost of the product.
|
102
|
+
* @example 1.5
|
103
|
+
* @default 0
|
104
|
+
* @minimum 0
|
105
|
+
* @maximum 9999999999999.99
|
106
|
+
*/
|
107
|
+
maxPrice: number;
|
108
|
+
/**
|
109
|
+
* Quantity of the product.
|
110
|
+
* @example 1.5
|
111
|
+
* @default 0
|
112
|
+
*/
|
113
|
+
measureQuantity: number;
|
114
|
+
/**
|
115
|
+
* Height of the product.
|
116
|
+
* @example "UN"
|
117
|
+
* @default "UN"
|
118
|
+
*/
|
119
|
+
measureUnit: string;
|
120
|
+
/**
|
121
|
+
* Min cost of the product.
|
122
|
+
* @example 1.5
|
123
|
+
* @default 0
|
124
|
+
* @minimum 0
|
125
|
+
* @maximum 9999999999999.99
|
126
|
+
*/
|
127
|
+
minPrice: number;
|
128
|
+
/**
|
129
|
+
* Name of the product.
|
130
|
+
* @minlength 1
|
131
|
+
* @maxlength 120
|
132
|
+
* @example "Product name"
|
133
|
+
*/
|
134
|
+
name: string;
|
135
|
+
/**
|
136
|
+
* Fill in with the full NCM Code (position and sub-item) or, if you do not have it,
|
137
|
+
* with the NCM code "00" (two zeros). Format: "99999999" or "00"
|
138
|
+
* @minlength 2
|
139
|
+
* @maxlength 8
|
140
|
+
*/
|
141
|
+
ncm: IProductNcm;
|
142
|
+
/**
|
143
|
+
* Net weight of the product.
|
144
|
+
* @example 1.5
|
145
|
+
* @default 0
|
146
|
+
* @minimum 0
|
147
|
+
* @maximum 9999999999999.999
|
148
|
+
* @multipleOf 0.001
|
149
|
+
*/
|
150
|
+
netWeight: number | null;
|
151
|
+
/**
|
152
|
+
* Unit of measurement of net weight.
|
153
|
+
* @minlength 1
|
154
|
+
* @maxlength 6
|
155
|
+
* @example "KG"
|
156
|
+
* @default "UN"
|
157
|
+
* @pattern ^[A-Z]+$
|
158
|
+
*/
|
159
|
+
netWeightUnit: string | null;
|
160
|
+
/**
|
161
|
+
* Price of the product.
|
162
|
+
* @example 1.5
|
163
|
+
* @default 0
|
164
|
+
* @minimum 0
|
165
|
+
* @maximum 9999999999999.99
|
166
|
+
* @multipleOf 0.01
|
167
|
+
*/
|
168
|
+
price: number;
|
169
|
+
/**
|
170
|
+
* Code of the product.
|
171
|
+
* @minlength 1
|
172
|
+
* @maxlength 60
|
173
|
+
* @pattern ^[a-zA-Z0-9]+$
|
174
|
+
* @example "123456789"
|
175
|
+
*/
|
176
|
+
sku: string;
|
177
|
+
/**
|
178
|
+
* Tags associated with the product.
|
179
|
+
* @example ["tag1", "tag2"]
|
180
|
+
* @default []
|
181
|
+
* @uniqueItems true
|
182
|
+
* @minItems 0
|
183
|
+
* @maxItems 50
|
184
|
+
* @items
|
185
|
+
* @minlength 1
|
186
|
+
* @maxlength 60
|
187
|
+
*/
|
188
|
+
tags: string[];
|
189
|
+
/**
|
190
|
+
* URL of the product image.
|
191
|
+
* @minlength 1
|
192
|
+
* @maxlength 120
|
193
|
+
* @example "https://www.example.com/image.jpg"
|
194
|
+
* @default ""
|
195
|
+
*/
|
196
|
+
thumbnail: string | null;
|
197
|
+
/**
|
198
|
+
* Date when the product was last updated.
|
199
|
+
* @format date-time
|
200
|
+
* @example "2019-01-01T00:00:00.000Z"
|
201
|
+
* @default Date.now()
|
202
|
+
*/
|
203
|
+
updatedAt: Date;
|
204
|
+
/**
|
205
|
+
* Width of the product.
|
206
|
+
* @example 15
|
207
|
+
* @default 0
|
208
|
+
*
|
209
|
+
*/
|
210
|
+
width: number | null;
|
211
|
+
}
|