controlresell 0.0.47 → 0.0.49
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 +2 -2
- package/src/com/controlresell/models/items/CreatedItems.d.ts +127 -14
- package/src/com/controlresell/models/items/Item.d.ts +93 -10
- package/src/com/controlresell/models/items/Item.js +2 -0
- package/src/com/controlresell/models/items/Item.ts +2 -0
- package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +127 -14
- package/src/com/controlresell/models/items/UpdatedItem.d.ts +127 -14
- package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.d.ts +6 -6
- package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.js +1 -1
- package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.ts +1 -1
- package/src/com/controlresell/models/items/history/ItemHistory.d.ts +6 -6
- package/src/com/controlresell/models/items/history/ItemHistory.js +1 -1
- package/src/com/controlresell/models/items/history/ItemHistory.ts +1 -1
- package/src/com/controlresell/models/items/history/ItemHistoryType.d.ts +1 -1
- package/src/com/controlresell/models/items/history/ItemHistoryType.js +1 -1
- package/src/com/controlresell/models/items/history/ItemHistoryType.ts +1 -1
- package/src/com/controlresell/models/items/platforms/CreateItemOnPlatformPayload.d.ts +2 -2
- package/src/com/controlresell/models/items/platforms/ItemOnPlatform.d.ts +2 -2
- package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +127 -14
- package/src/com/controlresell/models/items/platforms/UpdateItemOnPlatformPayload.d.ts +2 -2
- package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.d.ts +3 -3
- package/src/com/controlresell/models/platforms/orders/Order.d.ts +9 -9
- package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.d.ts +3 -3
- package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.d.ts +4 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "controlresell",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.49",
|
|
4
4
|
"main": "src/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"typescript": "^5.8.2"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"controlresell-connector": "^0.0.
|
|
20
|
+
"controlresell-connector": "^0.0.18",
|
|
21
21
|
"zod": "^3.24.2",
|
|
22
22
|
"zodable-idschema": "^1.0.0"
|
|
23
23
|
}
|
|
@@ -211,22 +211,75 @@ export declare const CreatedItemsSchema: z.ZodObject<{
|
|
|
211
211
|
lastHistory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
212
212
|
id: z.ZodString;
|
|
213
213
|
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
214
|
-
type: z.ZodEnum<["
|
|
215
|
-
data: z.ZodString
|
|
214
|
+
type: z.ZodEnum<["IMPORTED", "PUBLISHED", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT"]>;
|
|
215
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
216
216
|
createdAt: z.ZodDate;
|
|
217
217
|
}, "strip", z.ZodTypeAny, {
|
|
218
|
-
type: "
|
|
218
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
219
219
|
id: string;
|
|
220
|
-
data: string;
|
|
221
220
|
createdAt: Date;
|
|
222
221
|
itemId: string | number;
|
|
222
|
+
data?: string | null | undefined;
|
|
223
223
|
}, {
|
|
224
|
-
type: "
|
|
224
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
225
225
|
id: string;
|
|
226
|
-
data: string;
|
|
227
226
|
createdAt: Date;
|
|
228
227
|
itemId: string | number;
|
|
228
|
+
data?: string | null | undefined;
|
|
229
229
|
}>>>;
|
|
230
|
+
itemOnPlatforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
231
|
+
id: z.ZodString;
|
|
232
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
233
|
+
accountId: z.ZodString;
|
|
234
|
+
platformId: z.ZodString;
|
|
235
|
+
platformUrl: z.ZodString;
|
|
236
|
+
platformPrice: z.ZodNumber;
|
|
237
|
+
status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
|
|
238
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
239
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
240
|
+
accountId: z.ZodString;
|
|
241
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
242
|
+
name: z.ZodString;
|
|
243
|
+
}, "strip", z.ZodTypeAny, {
|
|
244
|
+
platform: "VINTED" | "SHOPIFY";
|
|
245
|
+
accountId: string;
|
|
246
|
+
userId: string | number;
|
|
247
|
+
name: string;
|
|
248
|
+
}, {
|
|
249
|
+
platform: "VINTED" | "SHOPIFY";
|
|
250
|
+
accountId: string;
|
|
251
|
+
userId: string | number;
|
|
252
|
+
name: string;
|
|
253
|
+
}>>>;
|
|
254
|
+
}, "strip", z.ZodTypeAny, {
|
|
255
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
256
|
+
id: string;
|
|
257
|
+
accountId: string;
|
|
258
|
+
itemId: string | number;
|
|
259
|
+
platformId: string;
|
|
260
|
+
platformUrl: string;
|
|
261
|
+
platformPrice: number;
|
|
262
|
+
account?: {
|
|
263
|
+
platform: "VINTED" | "SHOPIFY";
|
|
264
|
+
accountId: string;
|
|
265
|
+
userId: string | number;
|
|
266
|
+
name: string;
|
|
267
|
+
} | null | undefined;
|
|
268
|
+
}, {
|
|
269
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
270
|
+
id: string;
|
|
271
|
+
accountId: string;
|
|
272
|
+
itemId: string | number;
|
|
273
|
+
platformId: string;
|
|
274
|
+
platformUrl: string;
|
|
275
|
+
platformPrice: number;
|
|
276
|
+
account?: {
|
|
277
|
+
platform: "VINTED" | "SHOPIFY";
|
|
278
|
+
accountId: string;
|
|
279
|
+
userId: string | number;
|
|
280
|
+
name: string;
|
|
281
|
+
} | null | undefined;
|
|
282
|
+
}>, "many">>>;
|
|
230
283
|
createdAt: z.ZodDate;
|
|
231
284
|
updatedAt: z.ZodDate;
|
|
232
285
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -316,12 +369,27 @@ export declare const CreatedItemsSchema: z.ZodObject<{
|
|
|
316
369
|
fieldId: string | number;
|
|
317
370
|
}[] | null | undefined;
|
|
318
371
|
lastHistory?: {
|
|
319
|
-
type: "
|
|
372
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
320
373
|
id: string;
|
|
321
|
-
data: string;
|
|
322
374
|
createdAt: Date;
|
|
323
375
|
itemId: string | number;
|
|
376
|
+
data?: string | null | undefined;
|
|
324
377
|
} | null | undefined;
|
|
378
|
+
itemOnPlatforms?: {
|
|
379
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
380
|
+
id: string;
|
|
381
|
+
accountId: string;
|
|
382
|
+
itemId: string | number;
|
|
383
|
+
platformId: string;
|
|
384
|
+
platformUrl: string;
|
|
385
|
+
platformPrice: number;
|
|
386
|
+
account?: {
|
|
387
|
+
platform: "VINTED" | "SHOPIFY";
|
|
388
|
+
accountId: string;
|
|
389
|
+
userId: string | number;
|
|
390
|
+
name: string;
|
|
391
|
+
} | null | undefined;
|
|
392
|
+
}[] | null | undefined;
|
|
325
393
|
}, {
|
|
326
394
|
id: string | number;
|
|
327
395
|
userId: string | number;
|
|
@@ -409,12 +477,27 @@ export declare const CreatedItemsSchema: z.ZodObject<{
|
|
|
409
477
|
fieldId: string | number;
|
|
410
478
|
}[] | null | undefined;
|
|
411
479
|
lastHistory?: {
|
|
412
|
-
type: "
|
|
480
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
413
481
|
id: string;
|
|
414
|
-
data: string;
|
|
415
482
|
createdAt: Date;
|
|
416
483
|
itemId: string | number;
|
|
484
|
+
data?: string | null | undefined;
|
|
417
485
|
} | null | undefined;
|
|
486
|
+
itemOnPlatforms?: {
|
|
487
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
488
|
+
id: string;
|
|
489
|
+
accountId: string;
|
|
490
|
+
itemId: string | number;
|
|
491
|
+
platformId: string;
|
|
492
|
+
platformUrl: string;
|
|
493
|
+
platformPrice: number;
|
|
494
|
+
account?: {
|
|
495
|
+
platform: "VINTED" | "SHOPIFY";
|
|
496
|
+
accountId: string;
|
|
497
|
+
userId: string | number;
|
|
498
|
+
name: string;
|
|
499
|
+
} | null | undefined;
|
|
500
|
+
}[] | null | undefined;
|
|
418
501
|
}>, "many">;
|
|
419
502
|
newUserLabels: z.ZodArray<z.ZodObject<{
|
|
420
503
|
id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
@@ -520,12 +603,27 @@ export declare const CreatedItemsSchema: z.ZodObject<{
|
|
|
520
603
|
fieldId: string | number;
|
|
521
604
|
}[] | null | undefined;
|
|
522
605
|
lastHistory?: {
|
|
523
|
-
type: "
|
|
606
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
524
607
|
id: string;
|
|
525
|
-
data: string;
|
|
526
608
|
createdAt: Date;
|
|
527
609
|
itemId: string | number;
|
|
610
|
+
data?: string | null | undefined;
|
|
528
611
|
} | null | undefined;
|
|
612
|
+
itemOnPlatforms?: {
|
|
613
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
614
|
+
id: string;
|
|
615
|
+
accountId: string;
|
|
616
|
+
itemId: string | number;
|
|
617
|
+
platformId: string;
|
|
618
|
+
platformUrl: string;
|
|
619
|
+
platformPrice: number;
|
|
620
|
+
account?: {
|
|
621
|
+
platform: "VINTED" | "SHOPIFY";
|
|
622
|
+
accountId: string;
|
|
623
|
+
userId: string | number;
|
|
624
|
+
name: string;
|
|
625
|
+
} | null | undefined;
|
|
626
|
+
}[] | null | undefined;
|
|
529
627
|
}[];
|
|
530
628
|
newUserLabels: {
|
|
531
629
|
id: string | number;
|
|
@@ -621,12 +719,27 @@ export declare const CreatedItemsSchema: z.ZodObject<{
|
|
|
621
719
|
fieldId: string | number;
|
|
622
720
|
}[] | null | undefined;
|
|
623
721
|
lastHistory?: {
|
|
624
|
-
type: "
|
|
722
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
625
723
|
id: string;
|
|
626
|
-
data: string;
|
|
627
724
|
createdAt: Date;
|
|
628
725
|
itemId: string | number;
|
|
726
|
+
data?: string | null | undefined;
|
|
629
727
|
} | null | undefined;
|
|
728
|
+
itemOnPlatforms?: {
|
|
729
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
730
|
+
id: string;
|
|
731
|
+
accountId: string;
|
|
732
|
+
itemId: string | number;
|
|
733
|
+
platformId: string;
|
|
734
|
+
platformUrl: string;
|
|
735
|
+
platformPrice: number;
|
|
736
|
+
account?: {
|
|
737
|
+
platform: "VINTED" | "SHOPIFY";
|
|
738
|
+
accountId: string;
|
|
739
|
+
userId: string | number;
|
|
740
|
+
name: string;
|
|
741
|
+
} | null | undefined;
|
|
742
|
+
}[] | null | undefined;
|
|
630
743
|
}[];
|
|
631
744
|
newUserLabels: {
|
|
632
745
|
id: string | number;
|
|
@@ -210,22 +210,75 @@ export declare const ItemSchema: z.ZodObject<{
|
|
|
210
210
|
lastHistory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
211
211
|
id: z.ZodString;
|
|
212
212
|
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
213
|
-
type: z.ZodEnum<["
|
|
214
|
-
data: z.ZodString
|
|
213
|
+
type: z.ZodEnum<["IMPORTED", "PUBLISHED", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT"]>;
|
|
214
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
215
215
|
createdAt: z.ZodDate;
|
|
216
216
|
}, "strip", z.ZodTypeAny, {
|
|
217
|
-
type: "
|
|
217
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
218
218
|
id: string;
|
|
219
|
-
data: string;
|
|
220
219
|
createdAt: Date;
|
|
221
220
|
itemId: string | number;
|
|
221
|
+
data?: string | null | undefined;
|
|
222
222
|
}, {
|
|
223
|
-
type: "
|
|
223
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
224
224
|
id: string;
|
|
225
|
-
data: string;
|
|
226
225
|
createdAt: Date;
|
|
227
226
|
itemId: string | number;
|
|
227
|
+
data?: string | null | undefined;
|
|
228
228
|
}>>>;
|
|
229
|
+
itemOnPlatforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
230
|
+
id: z.ZodString;
|
|
231
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
232
|
+
accountId: z.ZodString;
|
|
233
|
+
platformId: z.ZodString;
|
|
234
|
+
platformUrl: z.ZodString;
|
|
235
|
+
platformPrice: z.ZodNumber;
|
|
236
|
+
status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
|
|
237
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
238
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
239
|
+
accountId: z.ZodString;
|
|
240
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
241
|
+
name: z.ZodString;
|
|
242
|
+
}, "strip", z.ZodTypeAny, {
|
|
243
|
+
platform: "VINTED" | "SHOPIFY";
|
|
244
|
+
accountId: string;
|
|
245
|
+
userId: string | number;
|
|
246
|
+
name: string;
|
|
247
|
+
}, {
|
|
248
|
+
platform: "VINTED" | "SHOPIFY";
|
|
249
|
+
accountId: string;
|
|
250
|
+
userId: string | number;
|
|
251
|
+
name: string;
|
|
252
|
+
}>>>;
|
|
253
|
+
}, "strip", z.ZodTypeAny, {
|
|
254
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
255
|
+
id: string;
|
|
256
|
+
accountId: string;
|
|
257
|
+
itemId: string | number;
|
|
258
|
+
platformId: string;
|
|
259
|
+
platformUrl: string;
|
|
260
|
+
platformPrice: number;
|
|
261
|
+
account?: {
|
|
262
|
+
platform: "VINTED" | "SHOPIFY";
|
|
263
|
+
accountId: string;
|
|
264
|
+
userId: string | number;
|
|
265
|
+
name: string;
|
|
266
|
+
} | null | undefined;
|
|
267
|
+
}, {
|
|
268
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
269
|
+
id: string;
|
|
270
|
+
accountId: string;
|
|
271
|
+
itemId: string | number;
|
|
272
|
+
platformId: string;
|
|
273
|
+
platformUrl: string;
|
|
274
|
+
platformPrice: number;
|
|
275
|
+
account?: {
|
|
276
|
+
platform: "VINTED" | "SHOPIFY";
|
|
277
|
+
accountId: string;
|
|
278
|
+
userId: string | number;
|
|
279
|
+
name: string;
|
|
280
|
+
} | null | undefined;
|
|
281
|
+
}>, "many">>>;
|
|
229
282
|
createdAt: z.ZodDate;
|
|
230
283
|
updatedAt: z.ZodDate;
|
|
231
284
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -315,12 +368,27 @@ export declare const ItemSchema: z.ZodObject<{
|
|
|
315
368
|
fieldId: string | number;
|
|
316
369
|
}[] | null | undefined;
|
|
317
370
|
lastHistory?: {
|
|
318
|
-
type: "
|
|
371
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
319
372
|
id: string;
|
|
320
|
-
data: string;
|
|
321
373
|
createdAt: Date;
|
|
322
374
|
itemId: string | number;
|
|
375
|
+
data?: string | null | undefined;
|
|
323
376
|
} | null | undefined;
|
|
377
|
+
itemOnPlatforms?: {
|
|
378
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
379
|
+
id: string;
|
|
380
|
+
accountId: string;
|
|
381
|
+
itemId: string | number;
|
|
382
|
+
platformId: string;
|
|
383
|
+
platformUrl: string;
|
|
384
|
+
platformPrice: number;
|
|
385
|
+
account?: {
|
|
386
|
+
platform: "VINTED" | "SHOPIFY";
|
|
387
|
+
accountId: string;
|
|
388
|
+
userId: string | number;
|
|
389
|
+
name: string;
|
|
390
|
+
} | null | undefined;
|
|
391
|
+
}[] | null | undefined;
|
|
324
392
|
}, {
|
|
325
393
|
id: string | number;
|
|
326
394
|
userId: string | number;
|
|
@@ -408,11 +476,26 @@ export declare const ItemSchema: z.ZodObject<{
|
|
|
408
476
|
fieldId: string | number;
|
|
409
477
|
}[] | null | undefined;
|
|
410
478
|
lastHistory?: {
|
|
411
|
-
type: "
|
|
479
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
412
480
|
id: string;
|
|
413
|
-
data: string;
|
|
414
481
|
createdAt: Date;
|
|
415
482
|
itemId: string | number;
|
|
483
|
+
data?: string | null | undefined;
|
|
416
484
|
} | null | undefined;
|
|
485
|
+
itemOnPlatforms?: {
|
|
486
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
487
|
+
id: string;
|
|
488
|
+
accountId: string;
|
|
489
|
+
itemId: string | number;
|
|
490
|
+
platformId: string;
|
|
491
|
+
platformUrl: string;
|
|
492
|
+
platformPrice: number;
|
|
493
|
+
account?: {
|
|
494
|
+
platform: "VINTED" | "SHOPIFY";
|
|
495
|
+
accountId: string;
|
|
496
|
+
userId: string | number;
|
|
497
|
+
name: string;
|
|
498
|
+
} | null | undefined;
|
|
499
|
+
}[] | null | undefined;
|
|
417
500
|
}>;
|
|
418
501
|
export type Item = z.infer<typeof ItemSchema>;
|
|
@@ -9,6 +9,7 @@ const ItemLabel_1 = require("./labels/ItemLabel");
|
|
|
9
9
|
const Customer_1 = require("../customers/Customer");
|
|
10
10
|
const ItemField_1 = require("./fields/ItemField");
|
|
11
11
|
const ItemHistory_1 = require("./history/ItemHistory");
|
|
12
|
+
const ItemOnPlatform_1 = require("./platforms/ItemOnPlatform");
|
|
12
13
|
exports.ItemSchema = zod_1.z.object({
|
|
13
14
|
id: zodable_idschema_1.IdSchema,
|
|
14
15
|
userId: zodable_idschema_1.IdSchema,
|
|
@@ -43,6 +44,7 @@ exports.ItemSchema = zod_1.z.object({
|
|
|
43
44
|
contractId: zodable_idschema_1.IdSchema.nullish(),
|
|
44
45
|
fields: zod_1.z.array(ItemField_1.ItemFieldSchema).nullish(),
|
|
45
46
|
lastHistory: ItemHistory_1.ItemHistorySchema.nullish(),
|
|
47
|
+
itemOnPlatforms: zod_1.z.array(ItemOnPlatform_1.ItemOnPlatformSchema).nullish(),
|
|
46
48
|
createdAt: zod_1.z.coerce.date(),
|
|
47
49
|
updatedAt: zod_1.z.coerce.date()
|
|
48
50
|
});
|
|
@@ -6,6 +6,7 @@ import {ItemLabelSchema} from "./labels/ItemLabel"
|
|
|
6
6
|
import {CustomerSchema} from "../customers/Customer"
|
|
7
7
|
import {ItemFieldSchema} from "./fields/ItemField"
|
|
8
8
|
import {ItemHistorySchema} from "./history/ItemHistory"
|
|
9
|
+
import {ItemOnPlatformSchema} from "./platforms/ItemOnPlatform"
|
|
9
10
|
|
|
10
11
|
export const ItemSchema = z.object({
|
|
11
12
|
id: IdSchema,
|
|
@@ -41,6 +42,7 @@ export const ItemSchema = z.object({
|
|
|
41
42
|
contractId: IdSchema.nullish(),
|
|
42
43
|
fields: z.array(ItemFieldSchema).nullish(),
|
|
43
44
|
lastHistory: ItemHistorySchema.nullish(),
|
|
45
|
+
itemOnPlatforms: z.array(ItemOnPlatformSchema).nullish(),
|
|
44
46
|
createdAt: z.coerce.date(),
|
|
45
47
|
updatedAt: z.coerce.date()
|
|
46
48
|
})
|
|
@@ -213,22 +213,75 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
|
|
|
213
213
|
lastHistory: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
214
214
|
id: z.ZodString;
|
|
215
215
|
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
216
|
-
type: z.ZodEnum<["
|
|
217
|
-
data: z.ZodString
|
|
216
|
+
type: z.ZodEnum<["IMPORTED", "PUBLISHED", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT"]>;
|
|
217
|
+
data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
218
218
|
createdAt: z.ZodDate;
|
|
219
219
|
}, "strip", z.ZodTypeAny, {
|
|
220
|
-
type: "
|
|
220
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
221
221
|
id: string;
|
|
222
|
-
data: string;
|
|
223
222
|
createdAt: Date;
|
|
224
223
|
itemId: string | number;
|
|
224
|
+
data?: string | null | undefined;
|
|
225
225
|
}, {
|
|
226
|
-
type: "
|
|
226
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
227
227
|
id: string;
|
|
228
|
-
data: string;
|
|
229
228
|
createdAt: Date;
|
|
230
229
|
itemId: string | number;
|
|
230
|
+
data?: string | null | undefined;
|
|
231
231
|
}>>>;
|
|
232
|
+
itemOnPlatforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
233
|
+
id: z.ZodString;
|
|
234
|
+
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
235
|
+
accountId: z.ZodString;
|
|
236
|
+
platformId: z.ZodString;
|
|
237
|
+
platformUrl: z.ZodString;
|
|
238
|
+
platformPrice: z.ZodNumber;
|
|
239
|
+
status: z.ZodEnum<["ONLINE", "DRAFT", "DELETED", "SOLD", "HIDDEN", "PENDING", "ERROR", "DISPUTE"]>;
|
|
240
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
241
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
242
|
+
accountId: z.ZodString;
|
|
243
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
244
|
+
name: z.ZodString;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
platform: "VINTED" | "SHOPIFY";
|
|
247
|
+
accountId: string;
|
|
248
|
+
userId: string | number;
|
|
249
|
+
name: string;
|
|
250
|
+
}, {
|
|
251
|
+
platform: "VINTED" | "SHOPIFY";
|
|
252
|
+
accountId: string;
|
|
253
|
+
userId: string | number;
|
|
254
|
+
name: string;
|
|
255
|
+
}>>>;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
258
|
+
id: string;
|
|
259
|
+
accountId: string;
|
|
260
|
+
itemId: string | number;
|
|
261
|
+
platformId: string;
|
|
262
|
+
platformUrl: string;
|
|
263
|
+
platformPrice: number;
|
|
264
|
+
account?: {
|
|
265
|
+
platform: "VINTED" | "SHOPIFY";
|
|
266
|
+
accountId: string;
|
|
267
|
+
userId: string | number;
|
|
268
|
+
name: string;
|
|
269
|
+
} | null | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
272
|
+
id: string;
|
|
273
|
+
accountId: string;
|
|
274
|
+
itemId: string | number;
|
|
275
|
+
platformId: string;
|
|
276
|
+
platformUrl: string;
|
|
277
|
+
platformPrice: number;
|
|
278
|
+
account?: {
|
|
279
|
+
platform: "VINTED" | "SHOPIFY";
|
|
280
|
+
accountId: string;
|
|
281
|
+
userId: string | number;
|
|
282
|
+
name: string;
|
|
283
|
+
} | null | undefined;
|
|
284
|
+
}>, "many">>>;
|
|
232
285
|
createdAt: z.ZodDate;
|
|
233
286
|
updatedAt: z.ZodDate;
|
|
234
287
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -318,12 +371,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
|
|
|
318
371
|
fieldId: string | number;
|
|
319
372
|
}[] | null | undefined;
|
|
320
373
|
lastHistory?: {
|
|
321
|
-
type: "
|
|
374
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
322
375
|
id: string;
|
|
323
|
-
data: string;
|
|
324
376
|
createdAt: Date;
|
|
325
377
|
itemId: string | number;
|
|
378
|
+
data?: string | null | undefined;
|
|
326
379
|
} | null | undefined;
|
|
380
|
+
itemOnPlatforms?: {
|
|
381
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
382
|
+
id: string;
|
|
383
|
+
accountId: string;
|
|
384
|
+
itemId: string | number;
|
|
385
|
+
platformId: string;
|
|
386
|
+
platformUrl: string;
|
|
387
|
+
platformPrice: number;
|
|
388
|
+
account?: {
|
|
389
|
+
platform: "VINTED" | "SHOPIFY";
|
|
390
|
+
accountId: string;
|
|
391
|
+
userId: string | number;
|
|
392
|
+
name: string;
|
|
393
|
+
} | null | undefined;
|
|
394
|
+
}[] | null | undefined;
|
|
327
395
|
}, {
|
|
328
396
|
id: string | number;
|
|
329
397
|
userId: string | number;
|
|
@@ -411,12 +479,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
|
|
|
411
479
|
fieldId: string | number;
|
|
412
480
|
}[] | null | undefined;
|
|
413
481
|
lastHistory?: {
|
|
414
|
-
type: "
|
|
482
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
415
483
|
id: string;
|
|
416
|
-
data: string;
|
|
417
484
|
createdAt: Date;
|
|
418
485
|
itemId: string | number;
|
|
486
|
+
data?: string | null | undefined;
|
|
419
487
|
} | null | undefined;
|
|
488
|
+
itemOnPlatforms?: {
|
|
489
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
490
|
+
id: string;
|
|
491
|
+
accountId: string;
|
|
492
|
+
itemId: string | number;
|
|
493
|
+
platformId: string;
|
|
494
|
+
platformUrl: string;
|
|
495
|
+
platformPrice: number;
|
|
496
|
+
account?: {
|
|
497
|
+
platform: "VINTED" | "SHOPIFY";
|
|
498
|
+
accountId: string;
|
|
499
|
+
userId: string | number;
|
|
500
|
+
name: string;
|
|
501
|
+
} | null | undefined;
|
|
502
|
+
}[] | null | undefined;
|
|
420
503
|
}>, "many">;
|
|
421
504
|
currentPage: z.ZodNumber;
|
|
422
505
|
totalPages: z.ZodNumber;
|
|
@@ -564,12 +647,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
|
|
|
564
647
|
fieldId: string | number;
|
|
565
648
|
}[] | null | undefined;
|
|
566
649
|
lastHistory?: {
|
|
567
|
-
type: "
|
|
650
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
568
651
|
id: string;
|
|
569
|
-
data: string;
|
|
570
652
|
createdAt: Date;
|
|
571
653
|
itemId: string | number;
|
|
654
|
+
data?: string | null | undefined;
|
|
572
655
|
} | null | undefined;
|
|
656
|
+
itemOnPlatforms?: {
|
|
657
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
658
|
+
id: string;
|
|
659
|
+
accountId: string;
|
|
660
|
+
itemId: string | number;
|
|
661
|
+
platformId: string;
|
|
662
|
+
platformUrl: string;
|
|
663
|
+
platformPrice: number;
|
|
664
|
+
account?: {
|
|
665
|
+
platform: "VINTED" | "SHOPIFY";
|
|
666
|
+
accountId: string;
|
|
667
|
+
userId: string | number;
|
|
668
|
+
name: string;
|
|
669
|
+
} | null | undefined;
|
|
670
|
+
}[] | null | undefined;
|
|
573
671
|
}[];
|
|
574
672
|
currentPage: number;
|
|
575
673
|
totalPages: number;
|
|
@@ -680,12 +778,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
|
|
|
680
778
|
fieldId: string | number;
|
|
681
779
|
}[] | null | undefined;
|
|
682
780
|
lastHistory?: {
|
|
683
|
-
type: "
|
|
781
|
+
type: "IMPORTED" | "PUBLISHED" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT";
|
|
684
782
|
id: string;
|
|
685
|
-
data: string;
|
|
686
783
|
createdAt: Date;
|
|
687
784
|
itemId: string | number;
|
|
785
|
+
data?: string | null | undefined;
|
|
688
786
|
} | null | undefined;
|
|
787
|
+
itemOnPlatforms?: {
|
|
788
|
+
status: "DELETED" | "ONLINE" | "DRAFT" | "SOLD" | "HIDDEN" | "PENDING" | "ERROR" | "DISPUTE";
|
|
789
|
+
id: string;
|
|
790
|
+
accountId: string;
|
|
791
|
+
itemId: string | number;
|
|
792
|
+
platformId: string;
|
|
793
|
+
platformUrl: string;
|
|
794
|
+
platformPrice: number;
|
|
795
|
+
account?: {
|
|
796
|
+
platform: "VINTED" | "SHOPIFY";
|
|
797
|
+
accountId: string;
|
|
798
|
+
userId: string | number;
|
|
799
|
+
name: string;
|
|
800
|
+
} | null | undefined;
|
|
801
|
+
}[] | null | undefined;
|
|
689
802
|
}[];
|
|
690
803
|
currentPage: number;
|
|
691
804
|
totalPages: number;
|