@pksep/zod-shared 0.0.549 → 0.0.551
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/action/enums/enums.d.ts +10 -0
- package/dist/action/enums/enums.js +10 -0
- package/dist/assemble/dto/get-assemble-operation-count.dto.d.ts +38 -24
- package/dist/assemble/interfaces/interfaces.d.ts +1 -0
- package/dist/assemble/schemas/assemble-coming.schema.d.ts +28 -18
- package/dist/assemble/schemas/assemble.schema.d.ts +28 -18
- package/dist/assemble-kit/schemas/assemble-kit.schema.d.ts +6 -6
- package/dist/buyer/schemas/buyer.schema.d.ts +2 -2
- package/dist/buyer/schemas/purchases.schema.d.ts +2 -2
- package/dist/cbed/schemas/cbed.schema.d.ts +2 -2
- package/dist/company/schemas/companies.schema.d.ts +2 -2
- package/dist/detal/default-values/default-values.d.ts +4 -0
- package/dist/detal/default-values/default-values.js +4 -0
- package/dist/detal/schemas/detal-deficit.schema.d.ts +198 -28
- package/dist/detal/schemas/detal.schema.d.ts +192 -22
- package/dist/document/dto/update-document.dto.d.ts +2 -2
- package/dist/edizm/schemas/edizm.schema.d.ts +2 -2
- package/dist/edizm/schemas/type-edizm.schema.d.ts +6 -6
- package/dist/equipment/dto/udate-equipment-type.dto.d.ts +2 -2
- package/dist/equipment/dto/update-equipment.dto.d.ts +1 -1
- package/dist/equipment/schemas/equipment-pt.schema.d.ts +2 -2
- package/dist/equipment/schemas/equipment.schema.d.ts +6 -6
- package/dist/expenditure/schema/expenditure-consumption.schema.d.ts +4 -4
- package/dist/expenditure/schema/expenditure-position.schema.d.ts +2 -2
- package/dist/instrument/dto/update-instrument.dto.d.ts +2 -2
- package/dist/instrument/dto/update-pt.dto.d.ts +2 -2
- package/dist/instrument/schemas/pt-instrument.schema.d.ts +2 -2
- package/dist/inventary/dto/update-inventary.dto.d.ts +2 -2
- package/dist/material/dto/create-material.dto.d.ts +136 -0
- package/dist/material/dto/create-material.dto.js +16 -0
- package/dist/material/dto/up-create-type-material.dto.d.ts +4 -0
- package/dist/material/dto/up-create-type-material.dto.js +6 -1
- package/dist/material/enum/enum.d.ts +10 -0
- package/dist/material/enum/enum.js +12 -1
- package/dist/material/index.d.ts +1 -0
- package/dist/material/index.js +1 -0
- package/dist/material/interfaces/interface.d.ts +5 -0
- package/dist/material/schemas/material-characteristics.schema.d.ts +56 -0
- package/dist/material/schemas/material-characteristics.schema.js +3 -1
- package/dist/material/schemas/material-shipments-response.schema.d.ts +130 -6
- package/dist/material/schemas/material.schema.d.ts +130 -6
- package/dist/material/schemas/subtype-material.schema.d.ts +2 -2
- package/dist/material/schemas/subtype-material.schema.js +1 -1
- package/dist/material/schemas/type-material.schema.d.ts +118 -2
- package/dist/material/schemas/type-material.schema.js +9 -2
- package/dist/material/utils/workpiece-mass.d.ts +56 -0
- package/dist/material/utils/workpiece-mass.js +536 -0
- package/dist/material/workpiece-mass.d.ts +45 -0
- package/dist/material/workpiece-mass.js +400 -0
- package/dist/metaloworking/dto/get-metallworking-pagination.dto.d.ts +3 -0
- package/dist/metaloworking/dto/get-metallworking-pagination.dto.js +1 -0
- package/dist/metaloworking/schemas/metaloworking-coming.schema.d.ts +2 -2
- package/dist/movement-object/schemas/get-one-object-history.schema.d.ts +40 -6
- package/dist/movement-object/schemas/get-one-object-history.schema.js +7 -1
- package/dist/moving/schemas/moving.schema.d.ts +6 -6
- package/dist/operations/dto/get-type-operation-by-id.dto.d.ts +3 -3
- package/dist/operations/dto/update-type-operation.dto.d.ts +2 -2
- package/dist/product/schemas/product-deficit.schema.d.ts +6 -6
- package/dist/production-tasks/interfaces/online-board.d.ts +1 -0
- package/dist/role/dto/update-role.dto.d.ts +2 -2
- package/dist/role/schemas/role.schema.d.ts +8 -8
- package/dist/sclad/schemas/remain.schema.d.ts +2 -2
- package/dist/sclad/schemas/remains.schema.d.ts +16 -16
- package/dist/settings/dto/update-edizm.dto.d.ts +2 -2
- package/dist/shipments/dto/format-list-shipment.dto.d.ts +3 -0
- package/dist/shipments/dto/format-list-shipment.dto.js +1 -0
- package/dist/shipments/dto/get-shipment-items-by-entity.dto.d.ts +22 -0
- package/dist/shipments/dto/get-shipment-items-by-entity.dto.js +12 -0
- package/dist/shipments/dto/shipments-list-pagination-response.dto.d.ts +18 -18
- package/dist/shipments/dto/up-create-shipments.dto.d.ts +342 -4
- package/dist/shipments/dto/up-create-shipments.dto.js +97 -3
- package/dist/shipments/dto/update-ready-to-ship-status.dto.d.ts +9 -0
- package/dist/shipments/dto/update-ready-to-ship-status.dto.js +7 -0
- package/dist/shipments/index.d.ts +2 -0
- package/dist/shipments/index.js +2 -0
- package/dist/shipments/schemas/shipment-list-item.schema.d.ts +12 -12
- package/dist/shipments/schemas/shipments.schema.d.ts +4 -4
- package/dist/shipments/types/increment-shipments-kolvo.type.d.ts +12 -12
- package/dist/shipments/types/types.d.ts +1 -0
- package/dist/shipments/types/update-shipments-by-product.type.d.ts +12 -12
- package/dist/specification/schema/attributes.schema.d.ts +432 -46
- package/dist/specification/type/type.d.ts +47 -1
- package/dist/tech-process/schemas/tech-process.schema.d.ts +2 -2
- package/dist/user/schemas/user.schema.d.ts +4 -4
- package/dist/utils/default-value/default-value.js +2 -1
- package/dist/utils/enums.d.ts +4 -2
- package/dist/utils/enums.js +2 -0
- package/dist/utils/schemas/schema.d.ts +2 -2
- package/dist/utils/types.d.ts +6 -0
- package/dist/waybill/dto/create-waybill-product.dto.d.ts +3 -3
- package/dist/waybill/dto/create-waybill-product.dto.js +1 -1
- package/dist/waybill/dto/create-waybill.dto.d.ts +5 -5
- package/dist/waybill/schemas/waybill.schema.d.ts +6 -0
- package/dist/waybill/schemas/waybill.schema.js +3 -1
- package/package.json +1 -1
|
@@ -1,12 +1,350 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
2
|
+
export declare const ShipmentProductDataSchema: z.ZodEffects<z.ZodObject<{
|
|
3
|
+
id: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
4
|
+
name: z.ZodOptional<z.ZodString>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
id: number;
|
|
7
|
+
name?: string | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
id?: unknown;
|
|
11
|
+
}>, {
|
|
12
|
+
id: number;
|
|
13
|
+
name?: string | undefined;
|
|
14
|
+
}, unknown>;
|
|
15
|
+
export declare const CreateShipmentsSchema: z.ZodEffects<z.ZodObject<{
|
|
16
|
+
dateOrder: z.ZodString;
|
|
17
|
+
dateShipments: z.ZodString;
|
|
18
|
+
kol: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, unknown>>;
|
|
19
|
+
quantity: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, unknown>>;
|
|
20
|
+
bron: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
21
|
+
base: z.ZodString;
|
|
22
|
+
buyer: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
23
|
+
toSklad: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
24
|
+
isCustomProduct: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
25
|
+
description: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, unknown>;
|
|
26
|
+
nameCustomProduct: z.ZodOptional<z.ZodString>;
|
|
27
|
+
managerId: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
28
|
+
documentsData: z.ZodOptional<z.ZodString>;
|
|
29
|
+
product: z.ZodEffects<z.ZodObject<{
|
|
30
|
+
id: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
31
|
+
name: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
id: number;
|
|
34
|
+
name?: string | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
id?: unknown;
|
|
38
|
+
}>, {
|
|
39
|
+
id: number;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
}, unknown>;
|
|
42
|
+
parentId: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
43
|
+
warehouseReadinessDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
44
|
+
docs: z.ZodOptional<z.ZodAny>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
product: {
|
|
47
|
+
id: number;
|
|
48
|
+
name?: string | undefined;
|
|
49
|
+
};
|
|
50
|
+
description: string | null;
|
|
51
|
+
base: string;
|
|
52
|
+
bron: boolean;
|
|
53
|
+
dateShipments: string;
|
|
54
|
+
dateOrder: string;
|
|
55
|
+
isCustomProduct: boolean;
|
|
56
|
+
managerId: number;
|
|
57
|
+
buyer?: number | undefined;
|
|
58
|
+
quantity?: number | undefined;
|
|
59
|
+
docs?: any;
|
|
60
|
+
kol?: number | undefined;
|
|
61
|
+
parentId?: number | undefined;
|
|
62
|
+
warehouseReadinessDate?: string | null | undefined;
|
|
63
|
+
toSklad?: boolean | undefined;
|
|
64
|
+
nameCustomProduct?: string | undefined;
|
|
65
|
+
documentsData?: string | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
base: string;
|
|
68
|
+
dateShipments: string;
|
|
69
|
+
dateOrder: string;
|
|
70
|
+
product?: unknown;
|
|
71
|
+
buyer?: unknown;
|
|
72
|
+
description?: unknown;
|
|
73
|
+
quantity?: unknown;
|
|
74
|
+
docs?: any;
|
|
75
|
+
kol?: unknown;
|
|
76
|
+
parentId?: unknown;
|
|
77
|
+
bron?: unknown;
|
|
78
|
+
warehouseReadinessDate?: unknown;
|
|
79
|
+
toSklad?: unknown;
|
|
80
|
+
isCustomProduct?: unknown;
|
|
81
|
+
nameCustomProduct?: string | undefined;
|
|
82
|
+
managerId?: unknown;
|
|
83
|
+
documentsData?: string | undefined;
|
|
84
|
+
}>, {
|
|
85
|
+
product: {
|
|
86
|
+
id: number;
|
|
87
|
+
name?: string | undefined;
|
|
88
|
+
};
|
|
89
|
+
description: string | null;
|
|
90
|
+
base: string;
|
|
91
|
+
bron: boolean;
|
|
92
|
+
dateShipments: string;
|
|
93
|
+
dateOrder: string;
|
|
94
|
+
isCustomProduct: boolean;
|
|
95
|
+
managerId: number;
|
|
96
|
+
buyer?: number | undefined;
|
|
97
|
+
quantity?: number | undefined;
|
|
98
|
+
docs?: any;
|
|
99
|
+
kol?: number | undefined;
|
|
100
|
+
parentId?: number | undefined;
|
|
101
|
+
warehouseReadinessDate?: string | null | undefined;
|
|
102
|
+
toSklad?: boolean | undefined;
|
|
103
|
+
nameCustomProduct?: string | undefined;
|
|
104
|
+
documentsData?: string | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
base: string;
|
|
107
|
+
dateShipments: string;
|
|
108
|
+
dateOrder: string;
|
|
109
|
+
product?: unknown;
|
|
110
|
+
buyer?: unknown;
|
|
111
|
+
description?: unknown;
|
|
112
|
+
quantity?: unknown;
|
|
113
|
+
docs?: any;
|
|
114
|
+
kol?: unknown;
|
|
115
|
+
parentId?: unknown;
|
|
116
|
+
bron?: unknown;
|
|
117
|
+
warehouseReadinessDate?: unknown;
|
|
118
|
+
toSklad?: unknown;
|
|
119
|
+
isCustomProduct?: unknown;
|
|
120
|
+
nameCustomProduct?: string | undefined;
|
|
121
|
+
managerId?: unknown;
|
|
122
|
+
documentsData?: string | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
export declare const UpdateShipmentsSchema: z.ZodEffects<z.ZodObject<{
|
|
125
|
+
dateOrder: z.ZodString;
|
|
126
|
+
dateShipments: z.ZodString;
|
|
127
|
+
kol: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, unknown>>;
|
|
128
|
+
quantity: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, unknown>>;
|
|
129
|
+
bron: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
130
|
+
base: z.ZodString;
|
|
131
|
+
buyer: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
132
|
+
toSklad: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
133
|
+
isCustomProduct: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
134
|
+
description: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, unknown>;
|
|
135
|
+
nameCustomProduct: z.ZodOptional<z.ZodString>;
|
|
136
|
+
managerId: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
137
|
+
documentsData: z.ZodOptional<z.ZodString>;
|
|
138
|
+
product: z.ZodEffects<z.ZodObject<{
|
|
139
|
+
id: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
140
|
+
name: z.ZodOptional<z.ZodString>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
id: number;
|
|
143
|
+
name?: string | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
name?: string | undefined;
|
|
146
|
+
id?: unknown;
|
|
147
|
+
}>, {
|
|
148
|
+
id: number;
|
|
149
|
+
name?: string | undefined;
|
|
150
|
+
}, unknown>;
|
|
151
|
+
parentId: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
152
|
+
warehouseReadinessDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
4
153
|
docs: z.ZodOptional<z.ZodAny>;
|
|
154
|
+
} & {
|
|
155
|
+
id: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
5
156
|
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
|
|
157
|
+
product: {
|
|
158
|
+
id: number;
|
|
159
|
+
name?: string | undefined;
|
|
160
|
+
};
|
|
161
|
+
description: string | null;
|
|
162
|
+
id: number;
|
|
163
|
+
base: string;
|
|
164
|
+
bron: boolean;
|
|
165
|
+
dateShipments: string;
|
|
166
|
+
dateOrder: string;
|
|
167
|
+
isCustomProduct: boolean;
|
|
168
|
+
managerId: number;
|
|
169
|
+
buyer?: number | undefined;
|
|
170
|
+
quantity?: number | undefined;
|
|
171
|
+
docs?: any;
|
|
172
|
+
kol?: number | undefined;
|
|
173
|
+
parentId?: number | undefined;
|
|
174
|
+
warehouseReadinessDate?: string | null | undefined;
|
|
175
|
+
toSklad?: boolean | undefined;
|
|
176
|
+
nameCustomProduct?: string | undefined;
|
|
177
|
+
documentsData?: string | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
base: string;
|
|
180
|
+
dateShipments: string;
|
|
181
|
+
dateOrder: string;
|
|
182
|
+
product?: unknown;
|
|
183
|
+
buyer?: unknown;
|
|
184
|
+
description?: unknown;
|
|
185
|
+
id?: unknown;
|
|
186
|
+
quantity?: unknown;
|
|
187
|
+
docs?: any;
|
|
188
|
+
kol?: unknown;
|
|
189
|
+
parentId?: unknown;
|
|
190
|
+
bron?: unknown;
|
|
191
|
+
warehouseReadinessDate?: unknown;
|
|
192
|
+
toSklad?: unknown;
|
|
193
|
+
isCustomProduct?: unknown;
|
|
194
|
+
nameCustomProduct?: string | undefined;
|
|
195
|
+
managerId?: unknown;
|
|
196
|
+
documentsData?: string | undefined;
|
|
197
|
+
}>, {
|
|
198
|
+
product: {
|
|
199
|
+
id: number;
|
|
200
|
+
name?: string | undefined;
|
|
201
|
+
};
|
|
202
|
+
description: string | null;
|
|
203
|
+
id: number;
|
|
204
|
+
base: string;
|
|
205
|
+
bron: boolean;
|
|
206
|
+
dateShipments: string;
|
|
207
|
+
dateOrder: string;
|
|
208
|
+
isCustomProduct: boolean;
|
|
209
|
+
managerId: number;
|
|
210
|
+
buyer?: number | undefined;
|
|
211
|
+
quantity?: number | undefined;
|
|
212
|
+
docs?: any;
|
|
213
|
+
kol?: number | undefined;
|
|
214
|
+
parentId?: number | undefined;
|
|
215
|
+
warehouseReadinessDate?: string | null | undefined;
|
|
216
|
+
toSklad?: boolean | undefined;
|
|
217
|
+
nameCustomProduct?: string | undefined;
|
|
218
|
+
documentsData?: string | undefined;
|
|
219
|
+
}, {
|
|
220
|
+
base: string;
|
|
221
|
+
dateShipments: string;
|
|
222
|
+
dateOrder: string;
|
|
223
|
+
product?: unknown;
|
|
224
|
+
buyer?: unknown;
|
|
225
|
+
description?: unknown;
|
|
226
|
+
id?: unknown;
|
|
227
|
+
quantity?: unknown;
|
|
228
|
+
docs?: any;
|
|
229
|
+
kol?: unknown;
|
|
230
|
+
parentId?: unknown;
|
|
231
|
+
bron?: unknown;
|
|
232
|
+
warehouseReadinessDate?: unknown;
|
|
233
|
+
toSklad?: unknown;
|
|
234
|
+
isCustomProduct?: unknown;
|
|
235
|
+
nameCustomProduct?: string | undefined;
|
|
236
|
+
managerId?: unknown;
|
|
237
|
+
documentsData?: string | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
export declare const UpCreateShipmentsSchema: z.ZodEffects<z.ZodObject<{
|
|
240
|
+
dateOrder: z.ZodString;
|
|
241
|
+
dateShipments: z.ZodString;
|
|
242
|
+
kol: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, unknown>>;
|
|
243
|
+
quantity: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, unknown>>;
|
|
244
|
+
bron: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
245
|
+
base: z.ZodString;
|
|
246
|
+
buyer: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
247
|
+
toSklad: z.ZodOptional<z.ZodEffects<z.ZodBoolean, boolean, unknown>>;
|
|
248
|
+
isCustomProduct: z.ZodEffects<z.ZodBoolean, boolean, unknown>;
|
|
249
|
+
description: z.ZodEffects<z.ZodNullable<z.ZodString>, string | null, unknown>;
|
|
250
|
+
nameCustomProduct: z.ZodOptional<z.ZodString>;
|
|
251
|
+
managerId: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
252
|
+
documentsData: z.ZodOptional<z.ZodString>;
|
|
253
|
+
product: z.ZodEffects<z.ZodObject<{
|
|
254
|
+
id: z.ZodEffects<z.ZodNumber, number, unknown>;
|
|
255
|
+
name: z.ZodOptional<z.ZodString>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
id: number;
|
|
258
|
+
name?: string | undefined;
|
|
259
|
+
}, {
|
|
260
|
+
name?: string | undefined;
|
|
261
|
+
id?: unknown;
|
|
262
|
+
}>, {
|
|
263
|
+
id: number;
|
|
264
|
+
name?: string | undefined;
|
|
265
|
+
}, unknown>;
|
|
266
|
+
parentId: z.ZodEffects<z.ZodOptional<z.ZodNumber>, number | undefined, unknown>;
|
|
267
|
+
warehouseReadinessDate: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | null | undefined, unknown>;
|
|
268
|
+
docs: z.ZodOptional<z.ZodAny>;
|
|
269
|
+
}, "strip", z.ZodTypeAny, {
|
|
270
|
+
product: {
|
|
271
|
+
id: number;
|
|
272
|
+
name?: string | undefined;
|
|
273
|
+
};
|
|
274
|
+
description: string | null;
|
|
275
|
+
base: string;
|
|
276
|
+
bron: boolean;
|
|
277
|
+
dateShipments: string;
|
|
278
|
+
dateOrder: string;
|
|
279
|
+
isCustomProduct: boolean;
|
|
280
|
+
managerId: number;
|
|
281
|
+
buyer?: number | undefined;
|
|
282
|
+
quantity?: number | undefined;
|
|
283
|
+
docs?: any;
|
|
284
|
+
kol?: number | undefined;
|
|
285
|
+
parentId?: number | undefined;
|
|
286
|
+
warehouseReadinessDate?: string | null | undefined;
|
|
287
|
+
toSklad?: boolean | undefined;
|
|
288
|
+
nameCustomProduct?: string | undefined;
|
|
289
|
+
documentsData?: string | undefined;
|
|
290
|
+
}, {
|
|
291
|
+
base: string;
|
|
292
|
+
dateShipments: string;
|
|
293
|
+
dateOrder: string;
|
|
294
|
+
product?: unknown;
|
|
295
|
+
buyer?: unknown;
|
|
296
|
+
description?: unknown;
|
|
297
|
+
quantity?: unknown;
|
|
298
|
+
docs?: any;
|
|
299
|
+
kol?: unknown;
|
|
300
|
+
parentId?: unknown;
|
|
301
|
+
bron?: unknown;
|
|
302
|
+
warehouseReadinessDate?: unknown;
|
|
303
|
+
toSklad?: unknown;
|
|
304
|
+
isCustomProduct?: unknown;
|
|
305
|
+
nameCustomProduct?: string | undefined;
|
|
306
|
+
managerId?: unknown;
|
|
307
|
+
documentsData?: string | undefined;
|
|
308
|
+
}>, {
|
|
309
|
+
product: {
|
|
310
|
+
id: number;
|
|
311
|
+
name?: string | undefined;
|
|
312
|
+
};
|
|
313
|
+
description: string | null;
|
|
314
|
+
base: string;
|
|
315
|
+
bron: boolean;
|
|
316
|
+
dateShipments: string;
|
|
317
|
+
dateOrder: string;
|
|
318
|
+
isCustomProduct: boolean;
|
|
319
|
+
managerId: number;
|
|
320
|
+
buyer?: number | undefined;
|
|
321
|
+
quantity?: number | undefined;
|
|
7
322
|
docs?: any;
|
|
323
|
+
kol?: number | undefined;
|
|
324
|
+
parentId?: number | undefined;
|
|
325
|
+
warehouseReadinessDate?: string | null | undefined;
|
|
326
|
+
toSklad?: boolean | undefined;
|
|
327
|
+
nameCustomProduct?: string | undefined;
|
|
328
|
+
documentsData?: string | undefined;
|
|
8
329
|
}, {
|
|
9
|
-
|
|
330
|
+
base: string;
|
|
331
|
+
dateShipments: string;
|
|
332
|
+
dateOrder: string;
|
|
333
|
+
product?: unknown;
|
|
334
|
+
buyer?: unknown;
|
|
335
|
+
description?: unknown;
|
|
336
|
+
quantity?: unknown;
|
|
10
337
|
docs?: any;
|
|
338
|
+
kol?: unknown;
|
|
339
|
+
parentId?: unknown;
|
|
340
|
+
bron?: unknown;
|
|
341
|
+
warehouseReadinessDate?: unknown;
|
|
342
|
+
toSklad?: unknown;
|
|
343
|
+
isCustomProduct?: unknown;
|
|
344
|
+
nameCustomProduct?: string | undefined;
|
|
345
|
+
managerId?: unknown;
|
|
346
|
+
documentsData?: string | undefined;
|
|
11
347
|
}>;
|
|
12
348
|
export type UpCreateShipmentsDto = z.infer<typeof UpCreateShipmentsSchema>;
|
|
349
|
+
export type CreateShipmentData = z.infer<typeof CreateShipmentsSchema>;
|
|
350
|
+
export type UpdateShipmentData = z.infer<typeof UpdateShipmentsSchema>;
|
|
@@ -1,8 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpCreateShipmentsSchema = void 0;
|
|
3
|
+
exports.UpCreateShipmentsSchema = exports.UpdateShipmentsSchema = exports.CreateShipmentsSchema = exports.ShipmentProductDataSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
const parseJsonString = (value) => {
|
|
6
|
+
if (typeof value !== 'string')
|
|
7
|
+
return value;
|
|
8
|
+
try {
|
|
9
|
+
return JSON.parse(value);
|
|
10
|
+
}
|
|
11
|
+
catch (_a) {
|
|
12
|
+
return value;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
const nullableStringSchema = zod_1.z.preprocess(value => {
|
|
16
|
+
if (value === 'null')
|
|
17
|
+
return null;
|
|
18
|
+
return value;
|
|
19
|
+
}, zod_1.z.string().nullable());
|
|
20
|
+
const booleanSchema = zod_1.z.preprocess(value => {
|
|
21
|
+
if (typeof value === 'boolean')
|
|
22
|
+
return value;
|
|
23
|
+
if (value === 'true')
|
|
24
|
+
return true;
|
|
25
|
+
if (value === 'false')
|
|
26
|
+
return false;
|
|
27
|
+
return value;
|
|
28
|
+
}, zod_1.z.boolean());
|
|
29
|
+
const numericIdSchema = zod_1.z.preprocess(value => {
|
|
30
|
+
if (typeof value === 'number')
|
|
31
|
+
return value;
|
|
32
|
+
if (typeof value === 'string' && value.trim() !== '')
|
|
33
|
+
return Number(value);
|
|
34
|
+
return value;
|
|
35
|
+
}, zod_1.z.number().int().positive());
|
|
36
|
+
const optionalNumericIdSchema = zod_1.z.preprocess(value => {
|
|
37
|
+
if (value === undefined ||
|
|
38
|
+
value === null ||
|
|
39
|
+
value === '' ||
|
|
40
|
+
value === 'null') {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (typeof value === 'number')
|
|
44
|
+
return value;
|
|
45
|
+
if (typeof value === 'string')
|
|
46
|
+
return Number(value);
|
|
47
|
+
return value;
|
|
48
|
+
}, zod_1.z.number().int().positive().optional());
|
|
49
|
+
const nullableDateSchema = zod_1.z.preprocess(value => {
|
|
50
|
+
if (value === undefined ||
|
|
51
|
+
value === null ||
|
|
52
|
+
value === '' ||
|
|
53
|
+
value === 'null') {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return value;
|
|
57
|
+
}, zod_1.z.string().datetime({ offset: true }).nullable().optional());
|
|
58
|
+
const shipmentQuantitySchema = zod_1.z.preprocess(value => {
|
|
59
|
+
if (typeof value === 'number')
|
|
60
|
+
return value;
|
|
61
|
+
if (typeof value === 'string' && value.trim() !== '')
|
|
62
|
+
return Number(value);
|
|
63
|
+
return value;
|
|
64
|
+
}, zod_1.z.number().positive());
|
|
65
|
+
const optionalShipmentQuantitySchema = shipmentQuantitySchema.optional();
|
|
66
|
+
exports.ShipmentProductDataSchema = zod_1.z.preprocess(parseJsonString, zod_1.z.object({
|
|
67
|
+
id: numericIdSchema,
|
|
68
|
+
name: zod_1.z.string().optional()
|
|
69
|
+
}));
|
|
70
|
+
const BaseShipmentsSchema = zod_1.z.object({
|
|
71
|
+
dateOrder: zod_1.z.string().datetime({ offset: true }),
|
|
72
|
+
dateShipments: zod_1.z.string().datetime({ offset: true }),
|
|
73
|
+
kol: optionalShipmentQuantitySchema,
|
|
74
|
+
quantity: optionalShipmentQuantitySchema,
|
|
75
|
+
bron: booleanSchema,
|
|
76
|
+
base: zod_1.z.string(),
|
|
77
|
+
buyer: optionalNumericIdSchema,
|
|
78
|
+
toSklad: booleanSchema.optional(),
|
|
79
|
+
isCustomProduct: booleanSchema,
|
|
80
|
+
description: nullableStringSchema,
|
|
81
|
+
nameCustomProduct: zod_1.z.string().optional(),
|
|
82
|
+
managerId: numericIdSchema,
|
|
83
|
+
documentsData: zod_1.z.string().optional(),
|
|
84
|
+
product: exports.ShipmentProductDataSchema,
|
|
85
|
+
parentId: optionalNumericIdSchema,
|
|
86
|
+
warehouseReadinessDate: nullableDateSchema,
|
|
7
87
|
docs: zod_1.z.any().optional()
|
|
8
88
|
});
|
|
89
|
+
const requireShipmentQuantity = (data, ctx) => {
|
|
90
|
+
if (data.kol === undefined && data.quantity === undefined) {
|
|
91
|
+
ctx.addIssue({
|
|
92
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
93
|
+
path: ['kol'],
|
|
94
|
+
message: 'kol or quantity is required'
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
exports.CreateShipmentsSchema = BaseShipmentsSchema.superRefine(requireShipmentQuantity);
|
|
99
|
+
exports.UpdateShipmentsSchema = BaseShipmentsSchema.extend({
|
|
100
|
+
id: numericIdSchema
|
|
101
|
+
}).superRefine(requireShipmentQuantity);
|
|
102
|
+
exports.UpCreateShipmentsSchema = exports.CreateShipmentsSchema;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const UpdateReadyToShipStatusDtoSchema: z.ZodObject<{
|
|
3
|
+
readyToShip: z.ZodBoolean;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
readyToShip: boolean;
|
|
6
|
+
}, {
|
|
7
|
+
readyToShip: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
export type UpdateReadyToShipStatusDto = z.infer<typeof UpdateReadyToShipStatusDtoSchema>;
|
|
@@ -21,3 +21,5 @@ export * from './dto/entity-filtering-by-shipment.dto';
|
|
|
21
21
|
export * from './schemas/shipments-sh-complit.schema';
|
|
22
22
|
export * from './dto/sh-complit-update.dto';
|
|
23
23
|
export * from './dto/set-warehouse-readiness-date.dto';
|
|
24
|
+
export * from './dto/update-ready-to-ship-status.dto';
|
|
25
|
+
export * from './dto/get-shipment-items-by-entity.dto';
|
package/dist/shipments/index.js
CHANGED
|
@@ -37,3 +37,5 @@ __exportStar(require("./dto/entity-filtering-by-shipment.dto"), exports);
|
|
|
37
37
|
__exportStar(require("./schemas/shipments-sh-complit.schema"), exports);
|
|
38
38
|
__exportStar(require("./dto/sh-complit-update.dto"), exports);
|
|
39
39
|
__exportStar(require("./dto/set-warehouse-readiness-date.dto"), exports);
|
|
40
|
+
__exportStar(require("./dto/update-ready-to-ship-status.dto"), exports);
|
|
41
|
+
__exportStar(require("./dto/get-shipment-items-by-entity.dto"), exports);
|
|
@@ -8,11 +8,11 @@ export declare const ShipmentListItem: z.ZodObject<{
|
|
|
8
8
|
id: z.ZodNumber;
|
|
9
9
|
name: z.ZodString;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
id: number;
|
|
12
11
|
name: string;
|
|
13
|
-
}, {
|
|
14
12
|
id: number;
|
|
13
|
+
}, {
|
|
15
14
|
name: string;
|
|
15
|
+
id: number;
|
|
16
16
|
}>>;
|
|
17
17
|
detals: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
18
18
|
id: z.ZodNumber;
|
|
@@ -78,37 +78,37 @@ export declare const ShipmentListItem: z.ZodObject<{
|
|
|
78
78
|
id: z.ZodNumber;
|
|
79
79
|
name: z.ZodString;
|
|
80
80
|
}, "strip", z.ZodTypeAny, {
|
|
81
|
-
id: number;
|
|
82
81
|
name: string;
|
|
83
|
-
}, {
|
|
84
82
|
id: number;
|
|
83
|
+
}, {
|
|
85
84
|
name: string;
|
|
85
|
+
id: number;
|
|
86
86
|
}>>;
|
|
87
87
|
company: z.ZodOptional<z.ZodObject<{
|
|
88
88
|
id: z.ZodNumber;
|
|
89
89
|
name: z.ZodString;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
id: number;
|
|
92
91
|
name: string;
|
|
93
|
-
}, {
|
|
94
92
|
id: number;
|
|
93
|
+
}, {
|
|
95
94
|
name: string;
|
|
95
|
+
id: number;
|
|
96
96
|
}>>;
|
|
97
97
|
}, "strip", z.ZodTypeAny, {
|
|
98
98
|
id: number;
|
|
99
99
|
number_order: string;
|
|
100
100
|
date_shipments: string | Date;
|
|
101
101
|
product?: {
|
|
102
|
-
id: number;
|
|
103
102
|
name: string;
|
|
103
|
+
id: number;
|
|
104
104
|
} | undefined;
|
|
105
105
|
buyer?: {
|
|
106
|
-
id: number;
|
|
107
106
|
name: string;
|
|
107
|
+
id: number;
|
|
108
108
|
} | undefined;
|
|
109
109
|
company?: {
|
|
110
|
-
id: number;
|
|
111
110
|
name: string;
|
|
111
|
+
id: number;
|
|
112
112
|
} | undefined;
|
|
113
113
|
cbeds?: {
|
|
114
114
|
id: number;
|
|
@@ -132,16 +132,16 @@ export declare const ShipmentListItem: z.ZodObject<{
|
|
|
132
132
|
number_order: string;
|
|
133
133
|
date_shipments: string | Date;
|
|
134
134
|
product?: {
|
|
135
|
-
id: number;
|
|
136
135
|
name: string;
|
|
136
|
+
id: number;
|
|
137
137
|
} | undefined;
|
|
138
138
|
buyer?: {
|
|
139
|
-
id: number;
|
|
140
139
|
name: string;
|
|
140
|
+
id: number;
|
|
141
141
|
} | undefined;
|
|
142
142
|
company?: {
|
|
143
|
-
id: number;
|
|
144
143
|
name: string;
|
|
144
|
+
id: number;
|
|
145
145
|
} | undefined;
|
|
146
146
|
cbeds?: {
|
|
147
147
|
id: number;
|
|
@@ -39,8 +39,8 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
39
39
|
purchasesId: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
}, "strip", z.ZodTypeAny, {
|
|
41
41
|
ban: boolean;
|
|
42
|
-
id: number;
|
|
43
42
|
name: string;
|
|
43
|
+
id: number;
|
|
44
44
|
attention: boolean;
|
|
45
45
|
description?: string | null | undefined;
|
|
46
46
|
contacts?: string | null | undefined;
|
|
@@ -49,8 +49,8 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
49
49
|
rekvisit?: string | null | undefined;
|
|
50
50
|
purchasesId?: number | undefined;
|
|
51
51
|
}, {
|
|
52
|
-
id: number;
|
|
53
52
|
name: string;
|
|
53
|
+
id: number;
|
|
54
54
|
ban?: boolean | undefined;
|
|
55
55
|
description?: string | null | undefined;
|
|
56
56
|
contacts?: string | null | undefined;
|
|
@@ -82,8 +82,8 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
82
82
|
product?: any;
|
|
83
83
|
buyer?: {
|
|
84
84
|
ban: boolean;
|
|
85
|
-
id: number;
|
|
86
85
|
name: string;
|
|
86
|
+
id: number;
|
|
87
87
|
attention: boolean;
|
|
88
88
|
description?: string | null | undefined;
|
|
89
89
|
contacts?: string | null | undefined;
|
|
@@ -110,8 +110,8 @@ export declare const ShipmentsSchema: z.ZodObject<{
|
|
|
110
110
|
ban?: boolean | undefined;
|
|
111
111
|
product?: any;
|
|
112
112
|
buyer?: {
|
|
113
|
-
id: number;
|
|
114
113
|
name: string;
|
|
114
|
+
id: number;
|
|
115
115
|
ban?: boolean | undefined;
|
|
116
116
|
description?: string | null | undefined;
|
|
117
117
|
contacts?: string | null | undefined;
|