controlresell 0.0.44 → 0.0.46
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/package.json +1 -1
- package/src/com/controlresell/models/platforms/labels/CreateOrderLabelPayload.d.ts +3 -0
- package/src/com/controlresell/models/platforms/labels/CreateOrderLabelPayload.js +2 -1
- package/src/com/controlresell/models/platforms/labels/CreateOrderLabelPayload.ts +2 -1
- package/src/com/controlresell/models/platforms/labels/OrderLabel.d.ts +36 -0
- package/src/com/controlresell/models/platforms/labels/OrderLabel.js +3 -1
- package/src/com/controlresell/models/platforms/labels/OrderLabel.ts +3 -1
- package/src/com/controlresell/models/platforms/orders/Order.d.ts +253 -0
- package/src/com/controlresell/models/platforms/orders/Order.js +5 -1
- package/src/com/controlresell/models/platforms/orders/Order.ts +5 -1
- package/src/com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload.d.ts +9 -0
- package/src/com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload.js +7 -0
- package/src/com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload.ts +6 -0
- package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.d.ts +95 -0
- package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.js +10 -0
- package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.ts +9 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.ts +2 -0
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const CreateOrderLabelPayloadSchema: z.ZodObject<{
|
|
3
3
|
fileId: z.ZodString;
|
|
4
|
+
originalFile: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
5
|
}, "strip", z.ZodTypeAny, {
|
|
5
6
|
fileId: string;
|
|
7
|
+
originalFile?: string | null | undefined;
|
|
6
8
|
}, {
|
|
7
9
|
fileId: string;
|
|
10
|
+
originalFile?: string | null | undefined;
|
|
8
11
|
}>;
|
|
9
12
|
export type CreateOrderLabelPayload = z.infer<typeof CreateOrderLabelPayloadSchema>;
|
|
@@ -3,5 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CreateOrderLabelPayloadSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.CreateOrderLabelPayloadSchema = zod_1.z.object({
|
|
6
|
-
fileId: zod_1.z.string().uuid()
|
|
6
|
+
fileId: zod_1.z.string().uuid(),
|
|
7
|
+
originalFile: zod_1.z.string().uuid().nullish()
|
|
7
8
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
2
|
|
|
3
3
|
export const CreateOrderLabelPayloadSchema = z.object({
|
|
4
|
-
fileId: z.string().uuid()
|
|
4
|
+
fileId: z.string().uuid(),
|
|
5
|
+
originalFile: z.string().uuid().nullish()
|
|
5
6
|
})
|
|
6
7
|
export type CreateOrderLabelPayload = z.infer<typeof CreateOrderLabelPayloadSchema>
|
|
@@ -3,6 +3,7 @@ export declare const OrderLabelSchema: z.ZodObject<{
|
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
orderId: z.ZodString;
|
|
5
5
|
fileId: z.ZodString;
|
|
6
|
+
originalFileId: z.ZodString;
|
|
6
7
|
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
7
8
|
id: z.ZodString;
|
|
8
9
|
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
@@ -22,10 +23,30 @@ export declare const OrderLabelSchema: z.ZodObject<{
|
|
|
22
23
|
createdAt: Date;
|
|
23
24
|
signedUrl: string;
|
|
24
25
|
}>>>;
|
|
26
|
+
originalFile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
29
|
+
path: z.ZodString;
|
|
30
|
+
signedUrl: z.ZodString;
|
|
31
|
+
createdAt: z.ZodDate;
|
|
32
|
+
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
path: string;
|
|
34
|
+
id: string;
|
|
35
|
+
userId: string | number;
|
|
36
|
+
createdAt: Date;
|
|
37
|
+
signedUrl: string;
|
|
38
|
+
}, {
|
|
39
|
+
path: string;
|
|
40
|
+
id: string;
|
|
41
|
+
userId: string | number;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
signedUrl: string;
|
|
44
|
+
}>>>;
|
|
25
45
|
}, "strip", z.ZodTypeAny, {
|
|
26
46
|
id: string;
|
|
27
47
|
orderId: string;
|
|
28
48
|
fileId: string;
|
|
49
|
+
originalFileId: string;
|
|
29
50
|
file?: {
|
|
30
51
|
path: string;
|
|
31
52
|
id: string;
|
|
@@ -33,10 +54,18 @@ export declare const OrderLabelSchema: z.ZodObject<{
|
|
|
33
54
|
createdAt: Date;
|
|
34
55
|
signedUrl: string;
|
|
35
56
|
} | null | undefined;
|
|
57
|
+
originalFile?: {
|
|
58
|
+
path: string;
|
|
59
|
+
id: string;
|
|
60
|
+
userId: string | number;
|
|
61
|
+
createdAt: Date;
|
|
62
|
+
signedUrl: string;
|
|
63
|
+
} | null | undefined;
|
|
36
64
|
}, {
|
|
37
65
|
id: string;
|
|
38
66
|
orderId: string;
|
|
39
67
|
fileId: string;
|
|
68
|
+
originalFileId: string;
|
|
40
69
|
file?: {
|
|
41
70
|
path: string;
|
|
42
71
|
id: string;
|
|
@@ -44,5 +73,12 @@ export declare const OrderLabelSchema: z.ZodObject<{
|
|
|
44
73
|
createdAt: Date;
|
|
45
74
|
signedUrl: string;
|
|
46
75
|
} | null | undefined;
|
|
76
|
+
originalFile?: {
|
|
77
|
+
path: string;
|
|
78
|
+
id: string;
|
|
79
|
+
userId: string | number;
|
|
80
|
+
createdAt: Date;
|
|
81
|
+
signedUrl: string;
|
|
82
|
+
} | null | undefined;
|
|
47
83
|
}>;
|
|
48
84
|
export type OrderLabel = z.infer<typeof OrderLabelSchema>;
|
|
@@ -7,5 +7,7 @@ exports.OrderLabelSchema = zod_1.z.object({
|
|
|
7
7
|
id: zod_1.z.string().uuid(),
|
|
8
8
|
orderId: zod_1.z.string().uuid(),
|
|
9
9
|
fileId: zod_1.z.string().uuid(),
|
|
10
|
-
|
|
10
|
+
originalFileId: zod_1.z.string().uuid(),
|
|
11
|
+
file: File_1.FileSchema.nullish(),
|
|
12
|
+
originalFile: File_1.FileSchema.nullish()
|
|
11
13
|
});
|
|
@@ -5,6 +5,8 @@ export const OrderLabelSchema = z.object({
|
|
|
5
5
|
id: z.string().uuid(),
|
|
6
6
|
orderId: z.string().uuid(),
|
|
7
7
|
fileId: z.string().uuid(),
|
|
8
|
-
|
|
8
|
+
originalFileId: z.string().uuid(),
|
|
9
|
+
file: FileSchema.nullish(),
|
|
10
|
+
originalFile: FileSchema.nullish()
|
|
9
11
|
})
|
|
10
12
|
export type OrderLabel = z.infer<typeof OrderLabelSchema>
|
|
@@ -7,6 +7,181 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
7
7
|
conversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
8
|
price: z.ZodNumber;
|
|
9
9
|
date: z.ZodDate;
|
|
10
|
+
items: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
11
|
+
itemOnPlatformId: z.ZodString;
|
|
12
|
+
orderId: z.ZodString;
|
|
13
|
+
itemOnPlatform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
14
|
+
id: z.ZodString;
|
|
15
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
16
|
+
accountId: z.ZodString;
|
|
17
|
+
platformId: z.ZodString;
|
|
18
|
+
platformUrl: z.ZodString;
|
|
19
|
+
platformPrice: z.ZodNumber;
|
|
20
|
+
status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
|
|
21
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
22
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
23
|
+
accountId: z.ZodString;
|
|
24
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
platform: "VINTED" | "SHOPIFY";
|
|
28
|
+
accountId: string;
|
|
29
|
+
userId: string | number;
|
|
30
|
+
name: string;
|
|
31
|
+
}, {
|
|
32
|
+
platform: "VINTED" | "SHOPIFY";
|
|
33
|
+
accountId: string;
|
|
34
|
+
userId: string | number;
|
|
35
|
+
name: string;
|
|
36
|
+
}>>>;
|
|
37
|
+
}, "strip", z.ZodTypeAny, {
|
|
38
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
39
|
+
id: string;
|
|
40
|
+
accountId: string;
|
|
41
|
+
itemId: string | number;
|
|
42
|
+
platformId: string;
|
|
43
|
+
platformUrl: string;
|
|
44
|
+
platformPrice: number;
|
|
45
|
+
account?: {
|
|
46
|
+
platform: "VINTED" | "SHOPIFY";
|
|
47
|
+
accountId: string;
|
|
48
|
+
userId: string | number;
|
|
49
|
+
name: string;
|
|
50
|
+
} | null | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
53
|
+
id: string;
|
|
54
|
+
accountId: string;
|
|
55
|
+
itemId: string | number;
|
|
56
|
+
platformId: string;
|
|
57
|
+
platformUrl: string;
|
|
58
|
+
platformPrice: number;
|
|
59
|
+
account?: {
|
|
60
|
+
platform: "VINTED" | "SHOPIFY";
|
|
61
|
+
accountId: string;
|
|
62
|
+
userId: string | number;
|
|
63
|
+
name: string;
|
|
64
|
+
} | null | undefined;
|
|
65
|
+
}>>>;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
orderId: string;
|
|
68
|
+
itemOnPlatformId: string;
|
|
69
|
+
itemOnPlatform?: {
|
|
70
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
71
|
+
id: string;
|
|
72
|
+
accountId: string;
|
|
73
|
+
itemId: string | number;
|
|
74
|
+
platformId: string;
|
|
75
|
+
platformUrl: string;
|
|
76
|
+
platformPrice: number;
|
|
77
|
+
account?: {
|
|
78
|
+
platform: "VINTED" | "SHOPIFY";
|
|
79
|
+
accountId: string;
|
|
80
|
+
userId: string | number;
|
|
81
|
+
name: string;
|
|
82
|
+
} | null | undefined;
|
|
83
|
+
} | null | undefined;
|
|
84
|
+
}, {
|
|
85
|
+
orderId: string;
|
|
86
|
+
itemOnPlatformId: string;
|
|
87
|
+
itemOnPlatform?: {
|
|
88
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
89
|
+
id: string;
|
|
90
|
+
accountId: string;
|
|
91
|
+
itemId: string | number;
|
|
92
|
+
platformId: string;
|
|
93
|
+
platformUrl: string;
|
|
94
|
+
platformPrice: number;
|
|
95
|
+
account?: {
|
|
96
|
+
platform: "VINTED" | "SHOPIFY";
|
|
97
|
+
accountId: string;
|
|
98
|
+
userId: string | number;
|
|
99
|
+
name: string;
|
|
100
|
+
} | null | undefined;
|
|
101
|
+
} | null | undefined;
|
|
102
|
+
}>, "many">>>;
|
|
103
|
+
labels: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
104
|
+
id: z.ZodString;
|
|
105
|
+
orderId: z.ZodString;
|
|
106
|
+
fileId: z.ZodString;
|
|
107
|
+
originalFileId: z.ZodString;
|
|
108
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
109
|
+
id: z.ZodString;
|
|
110
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
111
|
+
path: z.ZodString;
|
|
112
|
+
signedUrl: z.ZodString;
|
|
113
|
+
createdAt: z.ZodDate;
|
|
114
|
+
}, "strip", z.ZodTypeAny, {
|
|
115
|
+
path: string;
|
|
116
|
+
id: string;
|
|
117
|
+
userId: string | number;
|
|
118
|
+
createdAt: Date;
|
|
119
|
+
signedUrl: string;
|
|
120
|
+
}, {
|
|
121
|
+
path: string;
|
|
122
|
+
id: string;
|
|
123
|
+
userId: string | number;
|
|
124
|
+
createdAt: Date;
|
|
125
|
+
signedUrl: string;
|
|
126
|
+
}>>>;
|
|
127
|
+
originalFile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
128
|
+
id: z.ZodString;
|
|
129
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
130
|
+
path: z.ZodString;
|
|
131
|
+
signedUrl: z.ZodString;
|
|
132
|
+
createdAt: z.ZodDate;
|
|
133
|
+
}, "strip", z.ZodTypeAny, {
|
|
134
|
+
path: string;
|
|
135
|
+
id: string;
|
|
136
|
+
userId: string | number;
|
|
137
|
+
createdAt: Date;
|
|
138
|
+
signedUrl: string;
|
|
139
|
+
}, {
|
|
140
|
+
path: string;
|
|
141
|
+
id: string;
|
|
142
|
+
userId: string | number;
|
|
143
|
+
createdAt: Date;
|
|
144
|
+
signedUrl: string;
|
|
145
|
+
}>>>;
|
|
146
|
+
}, "strip", z.ZodTypeAny, {
|
|
147
|
+
id: string;
|
|
148
|
+
orderId: string;
|
|
149
|
+
fileId: string;
|
|
150
|
+
originalFileId: string;
|
|
151
|
+
file?: {
|
|
152
|
+
path: string;
|
|
153
|
+
id: string;
|
|
154
|
+
userId: string | number;
|
|
155
|
+
createdAt: Date;
|
|
156
|
+
signedUrl: string;
|
|
157
|
+
} | null | undefined;
|
|
158
|
+
originalFile?: {
|
|
159
|
+
path: string;
|
|
160
|
+
id: string;
|
|
161
|
+
userId: string | number;
|
|
162
|
+
createdAt: Date;
|
|
163
|
+
signedUrl: string;
|
|
164
|
+
} | null | undefined;
|
|
165
|
+
}, {
|
|
166
|
+
id: string;
|
|
167
|
+
orderId: string;
|
|
168
|
+
fileId: string;
|
|
169
|
+
originalFileId: string;
|
|
170
|
+
file?: {
|
|
171
|
+
path: string;
|
|
172
|
+
id: string;
|
|
173
|
+
userId: string | number;
|
|
174
|
+
createdAt: Date;
|
|
175
|
+
signedUrl: string;
|
|
176
|
+
} | null | undefined;
|
|
177
|
+
originalFile?: {
|
|
178
|
+
path: string;
|
|
179
|
+
id: string;
|
|
180
|
+
userId: string | number;
|
|
181
|
+
createdAt: Date;
|
|
182
|
+
signedUrl: string;
|
|
183
|
+
} | null | undefined;
|
|
184
|
+
}>, "many">>>;
|
|
10
185
|
}, "strip", z.ZodTypeAny, {
|
|
11
186
|
status: "PAYMENT_VALIDATED" | "SHIPPING_LABEL_SENT_TO_SELLER";
|
|
12
187
|
id: string;
|
|
@@ -15,6 +190,45 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
15
190
|
price: number;
|
|
16
191
|
platformOrderId: string;
|
|
17
192
|
conversationId?: string | null | undefined;
|
|
193
|
+
items?: {
|
|
194
|
+
orderId: string;
|
|
195
|
+
itemOnPlatformId: string;
|
|
196
|
+
itemOnPlatform?: {
|
|
197
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
198
|
+
id: string;
|
|
199
|
+
accountId: string;
|
|
200
|
+
itemId: string | number;
|
|
201
|
+
platformId: string;
|
|
202
|
+
platformUrl: string;
|
|
203
|
+
platformPrice: number;
|
|
204
|
+
account?: {
|
|
205
|
+
platform: "VINTED" | "SHOPIFY";
|
|
206
|
+
accountId: string;
|
|
207
|
+
userId: string | number;
|
|
208
|
+
name: string;
|
|
209
|
+
} | null | undefined;
|
|
210
|
+
} | null | undefined;
|
|
211
|
+
}[] | null | undefined;
|
|
212
|
+
labels?: {
|
|
213
|
+
id: string;
|
|
214
|
+
orderId: string;
|
|
215
|
+
fileId: string;
|
|
216
|
+
originalFileId: string;
|
|
217
|
+
file?: {
|
|
218
|
+
path: string;
|
|
219
|
+
id: string;
|
|
220
|
+
userId: string | number;
|
|
221
|
+
createdAt: Date;
|
|
222
|
+
signedUrl: string;
|
|
223
|
+
} | null | undefined;
|
|
224
|
+
originalFile?: {
|
|
225
|
+
path: string;
|
|
226
|
+
id: string;
|
|
227
|
+
userId: string | number;
|
|
228
|
+
createdAt: Date;
|
|
229
|
+
signedUrl: string;
|
|
230
|
+
} | null | undefined;
|
|
231
|
+
}[] | null | undefined;
|
|
18
232
|
}, {
|
|
19
233
|
status: "PAYMENT_VALIDATED" | "SHIPPING_LABEL_SENT_TO_SELLER";
|
|
20
234
|
id: string;
|
|
@@ -23,5 +237,44 @@ export declare const OrderSchema: z.ZodObject<{
|
|
|
23
237
|
price: number;
|
|
24
238
|
platformOrderId: string;
|
|
25
239
|
conversationId?: string | null | undefined;
|
|
240
|
+
items?: {
|
|
241
|
+
orderId: string;
|
|
242
|
+
itemOnPlatformId: string;
|
|
243
|
+
itemOnPlatform?: {
|
|
244
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
245
|
+
id: string;
|
|
246
|
+
accountId: string;
|
|
247
|
+
itemId: string | number;
|
|
248
|
+
platformId: string;
|
|
249
|
+
platformUrl: string;
|
|
250
|
+
platformPrice: number;
|
|
251
|
+
account?: {
|
|
252
|
+
platform: "VINTED" | "SHOPIFY";
|
|
253
|
+
accountId: string;
|
|
254
|
+
userId: string | number;
|
|
255
|
+
name: string;
|
|
256
|
+
} | null | undefined;
|
|
257
|
+
} | null | undefined;
|
|
258
|
+
}[] | null | undefined;
|
|
259
|
+
labels?: {
|
|
260
|
+
id: string;
|
|
261
|
+
orderId: string;
|
|
262
|
+
fileId: string;
|
|
263
|
+
originalFileId: string;
|
|
264
|
+
file?: {
|
|
265
|
+
path: string;
|
|
266
|
+
id: string;
|
|
267
|
+
userId: string | number;
|
|
268
|
+
createdAt: Date;
|
|
269
|
+
signedUrl: string;
|
|
270
|
+
} | null | undefined;
|
|
271
|
+
originalFile?: {
|
|
272
|
+
path: string;
|
|
273
|
+
id: string;
|
|
274
|
+
userId: string | number;
|
|
275
|
+
createdAt: Date;
|
|
276
|
+
signedUrl: string;
|
|
277
|
+
} | null | undefined;
|
|
278
|
+
}[] | null | undefined;
|
|
26
279
|
}>;
|
|
27
280
|
export type Order = z.infer<typeof OrderSchema>;
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OrderSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const controlresell_connector_1 = require("controlresell-connector");
|
|
6
|
+
const ItemInOrder_1 = require("./items/ItemInOrder");
|
|
7
|
+
const OrderLabel_1 = require("../labels/OrderLabel");
|
|
6
8
|
exports.OrderSchema = zod_1.z.object({
|
|
7
9
|
id: zod_1.z.string().uuid(),
|
|
8
10
|
accountId: zod_1.z.string().uuid(),
|
|
@@ -10,5 +12,7 @@ exports.OrderSchema = zod_1.z.object({
|
|
|
10
12
|
status: controlresell_connector_1.JobOrderStatusSchema,
|
|
11
13
|
conversationId: zod_1.z.string().uuid().nullish(),
|
|
12
14
|
price: zod_1.z.number(),
|
|
13
|
-
date: zod_1.z.coerce.date()
|
|
15
|
+
date: zod_1.z.coerce.date(),
|
|
16
|
+
items: zod_1.z.array(ItemInOrder_1.ItemInOrderSchema).nullish(),
|
|
17
|
+
labels: zod_1.z.array(OrderLabel_1.OrderLabelSchema).nullish()
|
|
14
18
|
});
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
2
|
import {JobOrderStatusSchema} from "controlresell-connector"
|
|
3
|
+
import {ItemInOrderSchema} from "./items/ItemInOrder"
|
|
4
|
+
import {OrderLabelSchema} from "../labels/OrderLabel"
|
|
3
5
|
|
|
4
6
|
export const OrderSchema = z.object({
|
|
5
7
|
id: z.string().uuid(),
|
|
@@ -8,6 +10,8 @@ export const OrderSchema = z.object({
|
|
|
8
10
|
status: JobOrderStatusSchema,
|
|
9
11
|
conversationId: z.string().uuid().nullish(),
|
|
10
12
|
price: z.number(),
|
|
11
|
-
date: z.coerce.date()
|
|
13
|
+
date: z.coerce.date(),
|
|
14
|
+
items: z.array(ItemInOrderSchema).nullish(),
|
|
15
|
+
labels: z.array(OrderLabelSchema).nullish()
|
|
12
16
|
})
|
|
13
17
|
export type Order = z.infer<typeof OrderSchema>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateItemInOrderPayloadSchema: z.ZodObject<{
|
|
3
|
+
itemOnPlatformId: z.ZodString;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
itemOnPlatformId: string;
|
|
6
|
+
}, {
|
|
7
|
+
itemOnPlatformId: string;
|
|
8
|
+
}>;
|
|
9
|
+
export type CreateItemInOrderPayload = z.infer<typeof CreateItemInOrderPayloadSchema>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateItemInOrderPayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.CreateItemInOrderPayloadSchema = zod_1.z.object({
|
|
6
|
+
itemOnPlatformId: zod_1.z.string().uuid()
|
|
7
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ItemInOrderSchema: z.ZodObject<{
|
|
3
|
+
itemOnPlatformId: z.ZodString;
|
|
4
|
+
orderId: z.ZodString;
|
|
5
|
+
itemOnPlatform: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
8
|
+
accountId: z.ZodString;
|
|
9
|
+
platformId: z.ZodString;
|
|
10
|
+
platformUrl: z.ZodString;
|
|
11
|
+
platformPrice: z.ZodNumber;
|
|
12
|
+
status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
|
|
13
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
14
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
15
|
+
accountId: z.ZodString;
|
|
16
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
17
|
+
name: z.ZodString;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
platform: "VINTED" | "SHOPIFY";
|
|
20
|
+
accountId: string;
|
|
21
|
+
userId: string | number;
|
|
22
|
+
name: string;
|
|
23
|
+
}, {
|
|
24
|
+
platform: "VINTED" | "SHOPIFY";
|
|
25
|
+
accountId: string;
|
|
26
|
+
userId: string | number;
|
|
27
|
+
name: string;
|
|
28
|
+
}>>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
31
|
+
id: string;
|
|
32
|
+
accountId: string;
|
|
33
|
+
itemId: string | number;
|
|
34
|
+
platformId: string;
|
|
35
|
+
platformUrl: string;
|
|
36
|
+
platformPrice: number;
|
|
37
|
+
account?: {
|
|
38
|
+
platform: "VINTED" | "SHOPIFY";
|
|
39
|
+
accountId: string;
|
|
40
|
+
userId: string | number;
|
|
41
|
+
name: string;
|
|
42
|
+
} | null | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
45
|
+
id: string;
|
|
46
|
+
accountId: string;
|
|
47
|
+
itemId: string | number;
|
|
48
|
+
platformId: string;
|
|
49
|
+
platformUrl: string;
|
|
50
|
+
platformPrice: number;
|
|
51
|
+
account?: {
|
|
52
|
+
platform: "VINTED" | "SHOPIFY";
|
|
53
|
+
accountId: string;
|
|
54
|
+
userId: string | number;
|
|
55
|
+
name: string;
|
|
56
|
+
} | null | undefined;
|
|
57
|
+
}>>>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
orderId: string;
|
|
60
|
+
itemOnPlatformId: string;
|
|
61
|
+
itemOnPlatform?: {
|
|
62
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
63
|
+
id: string;
|
|
64
|
+
accountId: string;
|
|
65
|
+
itemId: string | number;
|
|
66
|
+
platformId: string;
|
|
67
|
+
platformUrl: string;
|
|
68
|
+
platformPrice: number;
|
|
69
|
+
account?: {
|
|
70
|
+
platform: "VINTED" | "SHOPIFY";
|
|
71
|
+
accountId: string;
|
|
72
|
+
userId: string | number;
|
|
73
|
+
name: string;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
} | null | undefined;
|
|
76
|
+
}, {
|
|
77
|
+
orderId: string;
|
|
78
|
+
itemOnPlatformId: string;
|
|
79
|
+
itemOnPlatform?: {
|
|
80
|
+
status: "ONLINE" | "DRAFT" | "DELETED" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
81
|
+
id: string;
|
|
82
|
+
accountId: string;
|
|
83
|
+
itemId: string | number;
|
|
84
|
+
platformId: string;
|
|
85
|
+
platformUrl: string;
|
|
86
|
+
platformPrice: number;
|
|
87
|
+
account?: {
|
|
88
|
+
platform: "VINTED" | "SHOPIFY";
|
|
89
|
+
accountId: string;
|
|
90
|
+
userId: string | number;
|
|
91
|
+
name: string;
|
|
92
|
+
} | null | undefined;
|
|
93
|
+
} | null | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
export type ItemInOrder = z.infer<typeof ItemInOrderSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ItemInOrderSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ItemOnPlatform_1 = require("../../../items/platforms/ItemOnPlatform");
|
|
6
|
+
exports.ItemInOrderSchema = zod_1.z.object({
|
|
7
|
+
itemOnPlatformId: zod_1.z.string().uuid(),
|
|
8
|
+
orderId: zod_1.z.string().uuid(),
|
|
9
|
+
itemOnPlatform: ItemOnPlatform_1.ItemOnPlatformSchema.nullish()
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {ItemOnPlatformSchema} from "../../../items/platforms/ItemOnPlatform"
|
|
3
|
+
|
|
4
|
+
export const ItemInOrderSchema = z.object({
|
|
5
|
+
itemOnPlatformId: z.string().uuid(),
|
|
6
|
+
orderId: z.string().uuid(),
|
|
7
|
+
itemOnPlatform: ItemOnPlatformSchema.nullish()
|
|
8
|
+
})
|
|
9
|
+
export type ItemInOrder = z.infer<typeof ItemInOrderSchema>
|
package/src/index.d.ts
CHANGED
|
@@ -60,6 +60,8 @@ export * from "./com/controlresell/models/platforms/labels/OrderLabel";
|
|
|
60
60
|
export * from "./com/controlresell/models/platforms/orders/CreateOrderPayload";
|
|
61
61
|
export * from "./com/controlresell/models/platforms/orders/Order";
|
|
62
62
|
export * from "./com/controlresell/models/platforms/orders/UpdateOrderPayload";
|
|
63
|
+
export * from "./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload";
|
|
64
|
+
export * from "./com/controlresell/models/platforms/orders/items/ItemInOrder";
|
|
63
65
|
export * from "./com/controlresell/models/users/GettingStartedSteps";
|
|
64
66
|
export * from "./com/controlresell/models/users/UpdateUserPayload";
|
|
65
67
|
export * from "./com/controlresell/models/users/User";
|
package/src/index.js
CHANGED
|
@@ -76,6 +76,8 @@ __exportStar(require("./com/controlresell/models/platforms/labels/OrderLabel"),
|
|
|
76
76
|
__exportStar(require("./com/controlresell/models/platforms/orders/CreateOrderPayload"), exports);
|
|
77
77
|
__exportStar(require("./com/controlresell/models/platforms/orders/Order"), exports);
|
|
78
78
|
__exportStar(require("./com/controlresell/models/platforms/orders/UpdateOrderPayload"), exports);
|
|
79
|
+
__exportStar(require("./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload"), exports);
|
|
80
|
+
__exportStar(require("./com/controlresell/models/platforms/orders/items/ItemInOrder"), exports);
|
|
79
81
|
__exportStar(require("./com/controlresell/models/users/GettingStartedSteps"), exports);
|
|
80
82
|
__exportStar(require("./com/controlresell/models/users/UpdateUserPayload"), exports);
|
|
81
83
|
__exportStar(require("./com/controlresell/models/users/User"), exports);
|
package/src/index.ts
CHANGED
|
@@ -60,6 +60,8 @@ export * from "./com/controlresell/models/platforms/labels/OrderLabel"
|
|
|
60
60
|
export * from "./com/controlresell/models/platforms/orders/CreateOrderPayload"
|
|
61
61
|
export * from "./com/controlresell/models/platforms/orders/Order"
|
|
62
62
|
export * from "./com/controlresell/models/platforms/orders/UpdateOrderPayload"
|
|
63
|
+
export * from "./com/controlresell/models/platforms/orders/items/CreateItemInOrderPayload"
|
|
64
|
+
export * from "./com/controlresell/models/platforms/orders/items/ItemInOrder"
|
|
63
65
|
export * from "./com/controlresell/models/users/GettingStartedSteps"
|
|
64
66
|
export * from "./com/controlresell/models/users/UpdateUserPayload"
|
|
65
67
|
export * from "./com/controlresell/models/users/User"
|