controlresell 2.2.6 → 2.2.7

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.
Files changed (74) hide show
  1. package/package.json +2 -2
  2. package/src/com/controlresell/models/application/RabbitMQRoutingKey.d.ts +1 -1
  3. package/src/com/controlresell/models/application/RabbitMQRoutingKey.js +1 -1
  4. package/src/com/controlresell/models/application/RabbitMQRoutingKey.ts +1 -1
  5. package/src/com/controlresell/models/items/CreatedItems.d.ts +205 -7
  6. package/src/com/controlresell/models/items/Item.d.ts +163 -5
  7. package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +205 -7
  8. package/src/com/controlresell/models/items/UpdatedItem.d.ts +205 -7
  9. package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.d.ts +121 -3
  10. package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.js +2 -1
  11. package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.ts +2 -1
  12. package/src/com/controlresell/models/items/history/ItemHistory.d.ts +121 -3
  13. package/src/com/controlresell/models/items/history/ItemHistory.js +2 -1
  14. package/src/com/controlresell/models/items/history/ItemHistory.ts +2 -1
  15. package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.d.ts +81 -0
  16. package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.js +24 -0
  17. package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.ts +24 -0
  18. package/src/com/controlresell/models/items/history/data/ItemHistoryBuyerPaidPayload.d.ts +15 -0
  19. package/src/com/controlresell/models/items/history/data/ItemHistoryBuyerPaidPayload.js +9 -0
  20. package/src/com/controlresell/models/items/history/data/ItemHistoryBuyerPaidPayload.ts +8 -0
  21. package/src/com/controlresell/models/items/history/data/ItemHistoryDeliveredPayload.d.ts +15 -0
  22. package/src/com/controlresell/models/items/history/data/ItemHistoryDeliveredPayload.js +9 -0
  23. package/src/com/controlresell/models/items/history/data/ItemHistoryDeliveredPayload.ts +8 -0
  24. package/src/com/controlresell/models/platforms/favorites/CreateFavoritePayload.d.ts +15 -0
  25. package/src/com/controlresell/models/platforms/favorites/CreateFavoritePayload.js +9 -0
  26. package/src/com/controlresell/models/platforms/favorites/CreateFavoritePayload.ts +8 -0
  27. package/src/com/controlresell/models/platforms/favorites/Favorite.d.ts +559 -0
  28. package/src/com/controlresell/models/platforms/favorites/Favorite.js +15 -0
  29. package/src/com/controlresell/models/platforms/favorites/Favorite.ts +14 -0
  30. package/src/com/controlresell/models/platforms/favorites/FavoriteOnPlatformUpdateRequest.d.ts +52 -0
  31. package/src/com/controlresell/models/platforms/favorites/FavoriteOnPlatformUpdateRequest.js +10 -0
  32. package/src/com/controlresell/models/platforms/favorites/FavoriteOnPlatformUpdateRequest.ts +9 -0
  33. package/src/com/controlresell/models/platforms/favorites/UpdateFavoritePayload.d.ts +12 -0
  34. package/src/com/controlresell/models/platforms/favorites/UpdateFavoritePayload.js +8 -0
  35. package/src/com/controlresell/models/platforms/favorites/UpdateFavoritePayload.ts +7 -0
  36. package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.d.ts +205 -7
  37. package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.d.ts +205 -7
  38. package/src/com/controlresell/models/preferences/Preference.d.ts +13 -13
  39. package/src/com/controlresell/models/preferences/PreferenceFilter.d.ts +205 -7
  40. package/src/com/controlresell/models/preferences/PreferenceWithCase.d.ts +39 -39
  41. package/src/com/controlresell/models/preferences/cases/CreatePreferenceCasePayload.d.ts +11 -11
  42. package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.d.ts +11 -11
  43. package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +11 -11
  44. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts +3 -3
  45. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.d.ts +1 -1
  46. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.js +1 -1
  47. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadType.ts +1 -1
  48. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +5 -5
  49. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.d.ts +355 -0
  50. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.js +13 -0
  51. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.ts +12 -0
  52. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayloadType.d.ts +3 -0
  53. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayloadType.js +7 -0
  54. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayloadType.ts +6 -0
  55. package/src/com/controlresell/models/preferences/variables/PreferenceVariable.d.ts +3 -3
  56. package/src/com/controlresell/models/preferences/variables/PreferenceVariableName.d.ts +1 -1
  57. package/src/com/controlresell/models/preferences/variables/PreferenceVariableName.js +1 -1
  58. package/src/com/controlresell/models/preferences/variables/PreferenceVariableName.ts +1 -1
  59. package/src/com/controlresell/models/preferences/variants/PartialPreferenceCaseVariantPayload.d.ts +9 -9
  60. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.d.ts +9 -9
  61. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.d.ts +7 -7
  62. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.d.ts +9 -9
  63. package/src/index.d.ts +9 -3
  64. package/src/index.js +21 -9
  65. package/src/index.ts +9 -3
  66. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.d.ts +0 -36
  67. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.js +0 -17
  68. package/src/com/controlresell/models/platforms/preferences/CreatePlatformPreferencePayload.ts +0 -16
  69. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.d.ts +0 -42
  70. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.js +0 -20
  71. package/src/com/controlresell/models/platforms/preferences/PlatformPreference.ts +0 -19
  72. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.d.ts +0 -30
  73. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.js +0 -14
  74. package/src/com/controlresell/models/platforms/preferences/UpdatePlatformPreferencePayload.ts +0 -13
@@ -223,20 +223,138 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
223
223
  id: z.ZodString;
224
224
  itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
225
225
  type: z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>;
226
- data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
+ data: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
227
+ type: z.ZodLiteral<"EMPTY">;
228
+ }, "strip", z.ZodTypeAny, {
229
+ type: "EMPTY";
230
+ }, {
231
+ type: "EMPTY";
232
+ }>, z.ZodObject<{
233
+ type: z.ZodLiteral<"SCHEDULED">;
234
+ data: z.ZodObject<{
235
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
236
+ publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ platform: "VINTED" | "SHOPIFY";
239
+ publishingDate?: Date | null | undefined;
240
+ }, {
241
+ platform: "VINTED" | "SHOPIFY";
242
+ publishingDate?: Date | null | undefined;
243
+ }>;
244
+ }, "strip", z.ZodTypeAny, {
245
+ type: "SCHEDULED";
246
+ data: {
247
+ platform: "VINTED" | "SHOPIFY";
248
+ publishingDate?: Date | null | undefined;
249
+ };
250
+ }, {
251
+ type: "SCHEDULED";
252
+ data: {
253
+ platform: "VINTED" | "SHOPIFY";
254
+ publishingDate?: Date | null | undefined;
255
+ };
256
+ }>, z.ZodObject<{
257
+ type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
258
+ data: z.ZodObject<{
259
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
260
+ }, "strip", z.ZodTypeAny, {
261
+ platform: "VINTED" | "SHOPIFY";
262
+ }, {
263
+ platform: "VINTED" | "SHOPIFY";
264
+ }>;
265
+ }, "strip", z.ZodTypeAny, {
266
+ type: "FAILED_TO_PUBLISH";
267
+ data: {
268
+ platform: "VINTED" | "SHOPIFY";
269
+ };
270
+ }, {
271
+ type: "FAILED_TO_PUBLISH";
272
+ data: {
273
+ platform: "VINTED" | "SHOPIFY";
274
+ };
275
+ }>, z.ZodObject<{
276
+ type: z.ZodLiteral<"BUYER_PAID">;
277
+ data: z.ZodObject<{
278
+ soldAccountId: z.ZodString;
279
+ soldOrderId: z.ZodString;
280
+ soldConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ soldAccountId: string;
283
+ soldOrderId: string;
284
+ soldConversationId?: string | null | undefined;
285
+ }, {
286
+ soldAccountId: string;
287
+ soldOrderId: string;
288
+ soldConversationId?: string | null | undefined;
289
+ }>;
290
+ }, "strip", z.ZodTypeAny, {
291
+ type: "BUYER_PAID";
292
+ data: {
293
+ soldAccountId: string;
294
+ soldOrderId: string;
295
+ soldConversationId?: string | null | undefined;
296
+ };
297
+ }, {
298
+ type: "BUYER_PAID";
299
+ data: {
300
+ soldAccountId: string;
301
+ soldOrderId: string;
302
+ soldConversationId?: string | null | undefined;
303
+ };
304
+ }>]>>>;
227
305
  createdAt: z.ZodDate;
228
306
  }, "strip", z.ZodTypeAny, {
229
307
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
230
308
  id: string;
231
309
  createdAt: Date;
232
310
  itemId: string | number;
233
- data?: string | null | undefined;
311
+ data?: {
312
+ type: "EMPTY";
313
+ } | {
314
+ type: "SCHEDULED";
315
+ data: {
316
+ platform: "VINTED" | "SHOPIFY";
317
+ publishingDate?: Date | null | undefined;
318
+ };
319
+ } | {
320
+ type: "FAILED_TO_PUBLISH";
321
+ data: {
322
+ platform: "VINTED" | "SHOPIFY";
323
+ };
324
+ } | {
325
+ type: "BUYER_PAID";
326
+ data: {
327
+ soldAccountId: string;
328
+ soldOrderId: string;
329
+ soldConversationId?: string | null | undefined;
330
+ };
331
+ } | null | undefined;
234
332
  }, {
235
333
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
236
334
  id: string;
237
335
  createdAt: Date;
238
336
  itemId: string | number;
239
- data?: string | null | undefined;
337
+ data?: {
338
+ type: "EMPTY";
339
+ } | {
340
+ type: "SCHEDULED";
341
+ data: {
342
+ platform: "VINTED" | "SHOPIFY";
343
+ publishingDate?: Date | null | undefined;
344
+ };
345
+ } | {
346
+ type: "FAILED_TO_PUBLISH";
347
+ data: {
348
+ platform: "VINTED" | "SHOPIFY";
349
+ };
350
+ } | {
351
+ type: "BUYER_PAID";
352
+ data: {
353
+ soldAccountId: string;
354
+ soldOrderId: string;
355
+ soldConversationId?: string | null | undefined;
356
+ };
357
+ } | null | undefined;
240
358
  }>>>;
241
359
  platforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
242
360
  id: z.ZodString;
@@ -406,7 +524,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
406
524
  id: string;
407
525
  createdAt: Date;
408
526
  itemId: string | number;
409
- data?: string | null | undefined;
527
+ data?: {
528
+ type: "EMPTY";
529
+ } | {
530
+ type: "SCHEDULED";
531
+ data: {
532
+ platform: "VINTED" | "SHOPIFY";
533
+ publishingDate?: Date | null | undefined;
534
+ };
535
+ } | {
536
+ type: "FAILED_TO_PUBLISH";
537
+ data: {
538
+ platform: "VINTED" | "SHOPIFY";
539
+ };
540
+ } | {
541
+ type: "BUYER_PAID";
542
+ data: {
543
+ soldAccountId: string;
544
+ soldOrderId: string;
545
+ soldConversationId?: string | null | undefined;
546
+ };
547
+ } | null | undefined;
410
548
  } | null | undefined;
411
549
  }, {
412
550
  id: string | number;
@@ -516,7 +654,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
516
654
  id: string;
517
655
  createdAt: Date;
518
656
  itemId: string | number;
519
- data?: string | null | undefined;
657
+ data?: {
658
+ type: "EMPTY";
659
+ } | {
660
+ type: "SCHEDULED";
661
+ data: {
662
+ platform: "VINTED" | "SHOPIFY";
663
+ publishingDate?: Date | null | undefined;
664
+ };
665
+ } | {
666
+ type: "FAILED_TO_PUBLISH";
667
+ data: {
668
+ platform: "VINTED" | "SHOPIFY";
669
+ };
670
+ } | {
671
+ type: "BUYER_PAID";
672
+ data: {
673
+ soldAccountId: string;
674
+ soldOrderId: string;
675
+ soldConversationId?: string | null | undefined;
676
+ };
677
+ } | null | undefined;
520
678
  } | null | undefined;
521
679
  }>, "many">;
522
680
  currentPage: z.ZodNumber;
@@ -632,7 +790,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
632
790
  id: string;
633
791
  createdAt: Date;
634
792
  itemId: string | number;
635
- data?: string | null | undefined;
793
+ data?: {
794
+ type: "EMPTY";
795
+ } | {
796
+ type: "SCHEDULED";
797
+ data: {
798
+ platform: "VINTED" | "SHOPIFY";
799
+ publishingDate?: Date | null | undefined;
800
+ };
801
+ } | {
802
+ type: "FAILED_TO_PUBLISH";
803
+ data: {
804
+ platform: "VINTED" | "SHOPIFY";
805
+ };
806
+ } | {
807
+ type: "BUYER_PAID";
808
+ data: {
809
+ soldAccountId: string;
810
+ soldOrderId: string;
811
+ soldConversationId?: string | null | undefined;
812
+ };
813
+ } | null | undefined;
636
814
  } | null | undefined;
637
815
  }[];
638
816
  currentPage: number;
@@ -748,7 +926,27 @@ export declare const ItemsWithFiltersSchema: z.ZodObject<{
748
926
  id: string;
749
927
  createdAt: Date;
750
928
  itemId: string | number;
751
- data?: string | null | undefined;
929
+ data?: {
930
+ type: "EMPTY";
931
+ } | {
932
+ type: "SCHEDULED";
933
+ data: {
934
+ platform: "VINTED" | "SHOPIFY";
935
+ publishingDate?: Date | null | undefined;
936
+ };
937
+ } | {
938
+ type: "FAILED_TO_PUBLISH";
939
+ data: {
940
+ platform: "VINTED" | "SHOPIFY";
941
+ };
942
+ } | {
943
+ type: "BUYER_PAID";
944
+ data: {
945
+ soldAccountId: string;
946
+ soldOrderId: string;
947
+ soldConversationId?: string | null | undefined;
948
+ };
949
+ } | null | undefined;
752
950
  } | null | undefined;
753
951
  }[];
754
952
  currentPage: number;
@@ -221,20 +221,138 @@ export declare const UpdatedItemSchema: z.ZodObject<{
221
221
  id: z.ZodString;
222
222
  itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
223
223
  type: z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>;
224
- data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
+ data: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
225
+ type: z.ZodLiteral<"EMPTY">;
226
+ }, "strip", z.ZodTypeAny, {
227
+ type: "EMPTY";
228
+ }, {
229
+ type: "EMPTY";
230
+ }>, z.ZodObject<{
231
+ type: z.ZodLiteral<"SCHEDULED">;
232
+ data: z.ZodObject<{
233
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
234
+ publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ platform: "VINTED" | "SHOPIFY";
237
+ publishingDate?: Date | null | undefined;
238
+ }, {
239
+ platform: "VINTED" | "SHOPIFY";
240
+ publishingDate?: Date | null | undefined;
241
+ }>;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: "SCHEDULED";
244
+ data: {
245
+ platform: "VINTED" | "SHOPIFY";
246
+ publishingDate?: Date | null | undefined;
247
+ };
248
+ }, {
249
+ type: "SCHEDULED";
250
+ data: {
251
+ platform: "VINTED" | "SHOPIFY";
252
+ publishingDate?: Date | null | undefined;
253
+ };
254
+ }>, z.ZodObject<{
255
+ type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
256
+ data: z.ZodObject<{
257
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
258
+ }, "strip", z.ZodTypeAny, {
259
+ platform: "VINTED" | "SHOPIFY";
260
+ }, {
261
+ platform: "VINTED" | "SHOPIFY";
262
+ }>;
263
+ }, "strip", z.ZodTypeAny, {
264
+ type: "FAILED_TO_PUBLISH";
265
+ data: {
266
+ platform: "VINTED" | "SHOPIFY";
267
+ };
268
+ }, {
269
+ type: "FAILED_TO_PUBLISH";
270
+ data: {
271
+ platform: "VINTED" | "SHOPIFY";
272
+ };
273
+ }>, z.ZodObject<{
274
+ type: z.ZodLiteral<"BUYER_PAID">;
275
+ data: z.ZodObject<{
276
+ soldAccountId: z.ZodString;
277
+ soldOrderId: z.ZodString;
278
+ soldConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
+ }, "strip", z.ZodTypeAny, {
280
+ soldAccountId: string;
281
+ soldOrderId: string;
282
+ soldConversationId?: string | null | undefined;
283
+ }, {
284
+ soldAccountId: string;
285
+ soldOrderId: string;
286
+ soldConversationId?: string | null | undefined;
287
+ }>;
288
+ }, "strip", z.ZodTypeAny, {
289
+ type: "BUYER_PAID";
290
+ data: {
291
+ soldAccountId: string;
292
+ soldOrderId: string;
293
+ soldConversationId?: string | null | undefined;
294
+ };
295
+ }, {
296
+ type: "BUYER_PAID";
297
+ data: {
298
+ soldAccountId: string;
299
+ soldOrderId: string;
300
+ soldConversationId?: string | null | undefined;
301
+ };
302
+ }>]>>>;
225
303
  createdAt: z.ZodDate;
226
304
  }, "strip", z.ZodTypeAny, {
227
305
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
228
306
  id: string;
229
307
  createdAt: Date;
230
308
  itemId: string | number;
231
- data?: string | null | undefined;
309
+ data?: {
310
+ type: "EMPTY";
311
+ } | {
312
+ type: "SCHEDULED";
313
+ data: {
314
+ platform: "VINTED" | "SHOPIFY";
315
+ publishingDate?: Date | null | undefined;
316
+ };
317
+ } | {
318
+ type: "FAILED_TO_PUBLISH";
319
+ data: {
320
+ platform: "VINTED" | "SHOPIFY";
321
+ };
322
+ } | {
323
+ type: "BUYER_PAID";
324
+ data: {
325
+ soldAccountId: string;
326
+ soldOrderId: string;
327
+ soldConversationId?: string | null | undefined;
328
+ };
329
+ } | null | undefined;
232
330
  }, {
233
331
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
234
332
  id: string;
235
333
  createdAt: Date;
236
334
  itemId: string | number;
237
- data?: string | null | undefined;
335
+ data?: {
336
+ type: "EMPTY";
337
+ } | {
338
+ type: "SCHEDULED";
339
+ data: {
340
+ platform: "VINTED" | "SHOPIFY";
341
+ publishingDate?: Date | null | undefined;
342
+ };
343
+ } | {
344
+ type: "FAILED_TO_PUBLISH";
345
+ data: {
346
+ platform: "VINTED" | "SHOPIFY";
347
+ };
348
+ } | {
349
+ type: "BUYER_PAID";
350
+ data: {
351
+ soldAccountId: string;
352
+ soldOrderId: string;
353
+ soldConversationId?: string | null | undefined;
354
+ };
355
+ } | null | undefined;
238
356
  }>>>;
239
357
  platforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
240
358
  id: z.ZodString;
@@ -404,7 +522,27 @@ export declare const UpdatedItemSchema: z.ZodObject<{
404
522
  id: string;
405
523
  createdAt: Date;
406
524
  itemId: string | number;
407
- data?: string | null | undefined;
525
+ data?: {
526
+ type: "EMPTY";
527
+ } | {
528
+ type: "SCHEDULED";
529
+ data: {
530
+ platform: "VINTED" | "SHOPIFY";
531
+ publishingDate?: Date | null | undefined;
532
+ };
533
+ } | {
534
+ type: "FAILED_TO_PUBLISH";
535
+ data: {
536
+ platform: "VINTED" | "SHOPIFY";
537
+ };
538
+ } | {
539
+ type: "BUYER_PAID";
540
+ data: {
541
+ soldAccountId: string;
542
+ soldOrderId: string;
543
+ soldConversationId?: string | null | undefined;
544
+ };
545
+ } | null | undefined;
408
546
  } | null | undefined;
409
547
  }, {
410
548
  id: string | number;
@@ -514,7 +652,27 @@ export declare const UpdatedItemSchema: z.ZodObject<{
514
652
  id: string;
515
653
  createdAt: Date;
516
654
  itemId: string | number;
517
- data?: string | null | undefined;
655
+ data?: {
656
+ type: "EMPTY";
657
+ } | {
658
+ type: "SCHEDULED";
659
+ data: {
660
+ platform: "VINTED" | "SHOPIFY";
661
+ publishingDate?: Date | null | undefined;
662
+ };
663
+ } | {
664
+ type: "FAILED_TO_PUBLISH";
665
+ data: {
666
+ platform: "VINTED" | "SHOPIFY";
667
+ };
668
+ } | {
669
+ type: "BUYER_PAID";
670
+ data: {
671
+ soldAccountId: string;
672
+ soldOrderId: string;
673
+ soldConversationId?: string | null | undefined;
674
+ };
675
+ } | null | undefined;
518
676
  } | null | undefined;
519
677
  }>;
520
678
  newUserLabels: z.ZodArray<z.ZodObject<{
@@ -656,7 +814,27 @@ export declare const UpdatedItemSchema: z.ZodObject<{
656
814
  id: string;
657
815
  createdAt: Date;
658
816
  itemId: string | number;
659
- data?: string | null | undefined;
817
+ data?: {
818
+ type: "EMPTY";
819
+ } | {
820
+ type: "SCHEDULED";
821
+ data: {
822
+ platform: "VINTED" | "SHOPIFY";
823
+ publishingDate?: Date | null | undefined;
824
+ };
825
+ } | {
826
+ type: "FAILED_TO_PUBLISH";
827
+ data: {
828
+ platform: "VINTED" | "SHOPIFY";
829
+ };
830
+ } | {
831
+ type: "BUYER_PAID";
832
+ data: {
833
+ soldAccountId: string;
834
+ soldOrderId: string;
835
+ soldConversationId?: string | null | undefined;
836
+ };
837
+ } | null | undefined;
660
838
  } | null | undefined;
661
839
  };
662
840
  }, {
@@ -776,7 +954,27 @@ export declare const UpdatedItemSchema: z.ZodObject<{
776
954
  id: string;
777
955
  createdAt: Date;
778
956
  itemId: string | number;
779
- data?: string | null | undefined;
957
+ data?: {
958
+ type: "EMPTY";
959
+ } | {
960
+ type: "SCHEDULED";
961
+ data: {
962
+ platform: "VINTED" | "SHOPIFY";
963
+ publishingDate?: Date | null | undefined;
964
+ };
965
+ } | {
966
+ type: "FAILED_TO_PUBLISH";
967
+ data: {
968
+ platform: "VINTED" | "SHOPIFY";
969
+ };
970
+ } | {
971
+ type: "BUYER_PAID";
972
+ data: {
973
+ soldAccountId: string;
974
+ soldOrderId: string;
975
+ soldConversationId?: string | null | undefined;
976
+ };
977
+ } | null | undefined;
780
978
  } | null | undefined;
781
979
  };
782
980
  }>;
@@ -1,12 +1,130 @@
1
1
  import { z } from "zod";
2
2
  export declare const CreateItemHistoryPayloadSchema: z.ZodObject<{
3
3
  type: z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>;
4
- data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
4
+ data: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
5
+ type: z.ZodLiteral<"EMPTY">;
6
+ }, "strip", z.ZodTypeAny, {
7
+ type: "EMPTY";
8
+ }, {
9
+ type: "EMPTY";
10
+ }>, z.ZodObject<{
11
+ type: z.ZodLiteral<"SCHEDULED">;
12
+ data: z.ZodObject<{
13
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
14
+ publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ platform: "VINTED" | "SHOPIFY";
17
+ publishingDate?: Date | null | undefined;
18
+ }, {
19
+ platform: "VINTED" | "SHOPIFY";
20
+ publishingDate?: Date | null | undefined;
21
+ }>;
22
+ }, "strip", z.ZodTypeAny, {
23
+ type: "SCHEDULED";
24
+ data: {
25
+ platform: "VINTED" | "SHOPIFY";
26
+ publishingDate?: Date | null | undefined;
27
+ };
28
+ }, {
29
+ type: "SCHEDULED";
30
+ data: {
31
+ platform: "VINTED" | "SHOPIFY";
32
+ publishingDate?: Date | null | undefined;
33
+ };
34
+ }>, z.ZodObject<{
35
+ type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
36
+ data: z.ZodObject<{
37
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ platform: "VINTED" | "SHOPIFY";
40
+ }, {
41
+ platform: "VINTED" | "SHOPIFY";
42
+ }>;
43
+ }, "strip", z.ZodTypeAny, {
44
+ type: "FAILED_TO_PUBLISH";
45
+ data: {
46
+ platform: "VINTED" | "SHOPIFY";
47
+ };
48
+ }, {
49
+ type: "FAILED_TO_PUBLISH";
50
+ data: {
51
+ platform: "VINTED" | "SHOPIFY";
52
+ };
53
+ }>, z.ZodObject<{
54
+ type: z.ZodLiteral<"BUYER_PAID">;
55
+ data: z.ZodObject<{
56
+ soldAccountId: z.ZodString;
57
+ soldOrderId: z.ZodString;
58
+ soldConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ soldAccountId: string;
61
+ soldOrderId: string;
62
+ soldConversationId?: string | null | undefined;
63
+ }, {
64
+ soldAccountId: string;
65
+ soldOrderId: string;
66
+ soldConversationId?: string | null | undefined;
67
+ }>;
68
+ }, "strip", z.ZodTypeAny, {
69
+ type: "BUYER_PAID";
70
+ data: {
71
+ soldAccountId: string;
72
+ soldOrderId: string;
73
+ soldConversationId?: string | null | undefined;
74
+ };
75
+ }, {
76
+ type: "BUYER_PAID";
77
+ data: {
78
+ soldAccountId: string;
79
+ soldOrderId: string;
80
+ soldConversationId?: string | null | undefined;
81
+ };
82
+ }>]>;
5
83
  }, "strip", z.ZodTypeAny, {
6
84
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
7
- data?: string | null | undefined;
85
+ data: {
86
+ type: "EMPTY";
87
+ } | {
88
+ type: "SCHEDULED";
89
+ data: {
90
+ platform: "VINTED" | "SHOPIFY";
91
+ publishingDate?: Date | null | undefined;
92
+ };
93
+ } | {
94
+ type: "FAILED_TO_PUBLISH";
95
+ data: {
96
+ platform: "VINTED" | "SHOPIFY";
97
+ };
98
+ } | {
99
+ type: "BUYER_PAID";
100
+ data: {
101
+ soldAccountId: string;
102
+ soldOrderId: string;
103
+ soldConversationId?: string | null | undefined;
104
+ };
105
+ };
8
106
  }, {
9
107
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
10
- data?: string | null | undefined;
108
+ data: {
109
+ type: "EMPTY";
110
+ } | {
111
+ type: "SCHEDULED";
112
+ data: {
113
+ platform: "VINTED" | "SHOPIFY";
114
+ publishingDate?: Date | null | undefined;
115
+ };
116
+ } | {
117
+ type: "FAILED_TO_PUBLISH";
118
+ data: {
119
+ platform: "VINTED" | "SHOPIFY";
120
+ };
121
+ } | {
122
+ type: "BUYER_PAID";
123
+ data: {
124
+ soldAccountId: string;
125
+ soldOrderId: string;
126
+ soldConversationId?: string | null | undefined;
127
+ };
128
+ };
11
129
  }>;
12
130
  export type CreateItemHistoryPayload = z.infer<typeof CreateItemHistoryPayloadSchema>;
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CreateItemHistoryPayloadSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const ItemHistoryType_1 = require("./ItemHistoryType");
6
+ const ItemHistoryDecodedPayload_1 = require("./ItemHistoryDecodedPayload");
6
7
  exports.CreateItemHistoryPayloadSchema = zod_1.z.object({
7
8
  type: ItemHistoryType_1.ItemHistoryTypeSchema,
8
- data: zod_1.z.string().nullish()
9
+ data: ItemHistoryDecodedPayload_1.ItemHistoryDecodedPayloadSchema
9
10
  });
@@ -1,8 +1,9 @@
1
1
  import {z} from "zod"
2
2
  import {ItemHistoryTypeSchema} from "./ItemHistoryType"
3
+ import {ItemHistoryDecodedPayloadSchema} from "./ItemHistoryDecodedPayload"
3
4
 
4
5
  export const CreateItemHistoryPayloadSchema = z.object({
5
6
  type: ItemHistoryTypeSchema,
6
- data: z.string().nullish()
7
+ data: ItemHistoryDecodedPayloadSchema
7
8
  })
8
9
  export type CreateItemHistoryPayload = z.infer<typeof CreateItemHistoryPayloadSchema>