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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "controlresell",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "main": "src/index.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "controlresell-connector": "^0.3.7",
21
- "zod": "^3.25.64",
21
+ "zod": "^3.25.67",
22
22
  "zodable-idschema": "^1.0.0",
23
23
  "zodable-kotlin-primitives": "^1.0.0"
24
24
  }
@@ -1,3 +1,3 @@
1
1
  import { z } from "zod";
2
- export declare const RabbitMQRoutingKeySchema: z.ZodEnum<["PLATFORMS_AUTH", "PLATFORMS_JOB", "PLATFORMS_ITEMS_PUBLISH", "PLATFORMS_ITEMS_UPDATE", "PLATFORMS_ORDERS_UPDATE", "PLATFORMS_CONVERSATIONS_UPDATE", "CONNECTOR_JOB_POSTS_GET", "CONNECTOR_JOB_CONVERSATIONS_GET"]>;
2
+ export declare const RabbitMQRoutingKeySchema: z.ZodEnum<["PLATFORMS_AUTH", "PLATFORMS_JOB", "PLATFORMS_ITEMS_PUBLISH", "PLATFORMS_ITEMS_UPDATE", "PLATFORMS_ORDERS_UPDATE", "PLATFORMS_CONVERSATIONS_UPDATE", "PLATFORMS_FAVORITES_UPDATE", "PREFERENCES_ACTIONS_NEXT", "CONNECTOR_JOB_POSTS_GET", "CONNECTOR_JOB_CONVERSATIONS_GET"]>;
3
3
  export type RabbitMQRoutingKey = z.infer<typeof RabbitMQRoutingKeySchema>;
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RabbitMQRoutingKeySchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  exports.RabbitMQRoutingKeySchema = zod_1.z.enum([
6
- "PLATFORMS_AUTH", "PLATFORMS_JOB", "PLATFORMS_ITEMS_PUBLISH", "PLATFORMS_ITEMS_UPDATE", "PLATFORMS_ORDERS_UPDATE", "PLATFORMS_CONVERSATIONS_UPDATE", "CONNECTOR_JOB_POSTS_GET", "CONNECTOR_JOB_CONVERSATIONS_GET"
6
+ "PLATFORMS_AUTH", "PLATFORMS_JOB", "PLATFORMS_ITEMS_PUBLISH", "PLATFORMS_ITEMS_UPDATE", "PLATFORMS_ORDERS_UPDATE", "PLATFORMS_CONVERSATIONS_UPDATE", "PLATFORMS_FAVORITES_UPDATE", "PREFERENCES_ACTIONS_NEXT", "CONNECTOR_JOB_POSTS_GET", "CONNECTOR_JOB_CONVERSATIONS_GET"
7
7
  ]);
@@ -1,6 +1,6 @@
1
1
  import {z} from "zod"
2
2
 
3
3
  export const RabbitMQRoutingKeySchema = z.enum([
4
- "PLATFORMS_AUTH", "PLATFORMS_JOB", "PLATFORMS_ITEMS_PUBLISH", "PLATFORMS_ITEMS_UPDATE", "PLATFORMS_ORDERS_UPDATE", "PLATFORMS_CONVERSATIONS_UPDATE", "CONNECTOR_JOB_POSTS_GET", "CONNECTOR_JOB_CONVERSATIONS_GET"
4
+ "PLATFORMS_AUTH", "PLATFORMS_JOB", "PLATFORMS_ITEMS_PUBLISH", "PLATFORMS_ITEMS_UPDATE", "PLATFORMS_ORDERS_UPDATE", "PLATFORMS_CONVERSATIONS_UPDATE", "PLATFORMS_FAVORITES_UPDATE", "PREFERENCES_ACTIONS_NEXT", "CONNECTOR_JOB_POSTS_GET", "CONNECTOR_JOB_CONVERSATIONS_GET"
5
5
  ])
6
6
  export type RabbitMQRoutingKey = z.infer<typeof RabbitMQRoutingKeySchema>
@@ -221,20 +221,138 @@ export declare const CreatedItemsSchema: 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 CreatedItemsSchema: 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 CreatedItemsSchema: 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
  }>, "many">;
520
678
  newUserLabels: z.ZodArray<z.ZodObject<{
@@ -648,7 +806,27 @@ export declare const CreatedItemsSchema: z.ZodObject<{
648
806
  id: string;
649
807
  createdAt: Date;
650
808
  itemId: string | number;
651
- data?: string | null | undefined;
809
+ data?: {
810
+ type: "EMPTY";
811
+ } | {
812
+ type: "SCHEDULED";
813
+ data: {
814
+ platform: "VINTED" | "SHOPIFY";
815
+ publishingDate?: Date | null | undefined;
816
+ };
817
+ } | {
818
+ type: "FAILED_TO_PUBLISH";
819
+ data: {
820
+ platform: "VINTED" | "SHOPIFY";
821
+ };
822
+ } | {
823
+ type: "BUYER_PAID";
824
+ data: {
825
+ soldAccountId: string;
826
+ soldOrderId: string;
827
+ soldConversationId?: string | null | undefined;
828
+ };
829
+ } | null | undefined;
652
830
  } | null | undefined;
653
831
  }[];
654
832
  newUserLabels: {
@@ -768,7 +946,27 @@ export declare const CreatedItemsSchema: z.ZodObject<{
768
946
  id: string;
769
947
  createdAt: Date;
770
948
  itemId: string | number;
771
- data?: string | null | undefined;
949
+ data?: {
950
+ type: "EMPTY";
951
+ } | {
952
+ type: "SCHEDULED";
953
+ data: {
954
+ platform: "VINTED" | "SHOPIFY";
955
+ publishingDate?: Date | null | undefined;
956
+ };
957
+ } | {
958
+ type: "FAILED_TO_PUBLISH";
959
+ data: {
960
+ platform: "VINTED" | "SHOPIFY";
961
+ };
962
+ } | {
963
+ type: "BUYER_PAID";
964
+ data: {
965
+ soldAccountId: string;
966
+ soldOrderId: string;
967
+ soldConversationId?: string | null | undefined;
968
+ };
969
+ } | null | undefined;
772
970
  } | null | undefined;
773
971
  }[];
774
972
  newUserLabels: {
@@ -220,20 +220,138 @@ export declare const ItemSchema: z.ZodObject<{
220
220
  id: z.ZodString;
221
221
  itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
222
222
  type: z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>;
223
- data: z.ZodOptional<z.ZodNullable<z.ZodString>>;
223
+ data: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
224
+ type: z.ZodLiteral<"EMPTY">;
225
+ }, "strip", z.ZodTypeAny, {
226
+ type: "EMPTY";
227
+ }, {
228
+ type: "EMPTY";
229
+ }>, z.ZodObject<{
230
+ type: z.ZodLiteral<"SCHEDULED">;
231
+ data: z.ZodObject<{
232
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
233
+ publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
234
+ }, "strip", z.ZodTypeAny, {
235
+ platform: "VINTED" | "SHOPIFY";
236
+ publishingDate?: Date | null | undefined;
237
+ }, {
238
+ platform: "VINTED" | "SHOPIFY";
239
+ publishingDate?: Date | null | undefined;
240
+ }>;
241
+ }, "strip", z.ZodTypeAny, {
242
+ type: "SCHEDULED";
243
+ data: {
244
+ platform: "VINTED" | "SHOPIFY";
245
+ publishingDate?: Date | null | undefined;
246
+ };
247
+ }, {
248
+ type: "SCHEDULED";
249
+ data: {
250
+ platform: "VINTED" | "SHOPIFY";
251
+ publishingDate?: Date | null | undefined;
252
+ };
253
+ }>, z.ZodObject<{
254
+ type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
255
+ data: z.ZodObject<{
256
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
257
+ }, "strip", z.ZodTypeAny, {
258
+ platform: "VINTED" | "SHOPIFY";
259
+ }, {
260
+ platform: "VINTED" | "SHOPIFY";
261
+ }>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ type: "FAILED_TO_PUBLISH";
264
+ data: {
265
+ platform: "VINTED" | "SHOPIFY";
266
+ };
267
+ }, {
268
+ type: "FAILED_TO_PUBLISH";
269
+ data: {
270
+ platform: "VINTED" | "SHOPIFY";
271
+ };
272
+ }>, z.ZodObject<{
273
+ type: z.ZodLiteral<"BUYER_PAID">;
274
+ data: z.ZodObject<{
275
+ soldAccountId: z.ZodString;
276
+ soldOrderId: z.ZodString;
277
+ soldConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
278
+ }, "strip", z.ZodTypeAny, {
279
+ soldAccountId: string;
280
+ soldOrderId: string;
281
+ soldConversationId?: string | null | undefined;
282
+ }, {
283
+ soldAccountId: string;
284
+ soldOrderId: string;
285
+ soldConversationId?: string | null | undefined;
286
+ }>;
287
+ }, "strip", z.ZodTypeAny, {
288
+ type: "BUYER_PAID";
289
+ data: {
290
+ soldAccountId: string;
291
+ soldOrderId: string;
292
+ soldConversationId?: string | null | undefined;
293
+ };
294
+ }, {
295
+ type: "BUYER_PAID";
296
+ data: {
297
+ soldAccountId: string;
298
+ soldOrderId: string;
299
+ soldConversationId?: string | null | undefined;
300
+ };
301
+ }>]>>>;
224
302
  createdAt: z.ZodDate;
225
303
  }, "strip", z.ZodTypeAny, {
226
304
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
227
305
  id: string;
228
306
  createdAt: Date;
229
307
  itemId: string | number;
230
- data?: string | null | undefined;
308
+ data?: {
309
+ type: "EMPTY";
310
+ } | {
311
+ type: "SCHEDULED";
312
+ data: {
313
+ platform: "VINTED" | "SHOPIFY";
314
+ publishingDate?: Date | null | undefined;
315
+ };
316
+ } | {
317
+ type: "FAILED_TO_PUBLISH";
318
+ data: {
319
+ platform: "VINTED" | "SHOPIFY";
320
+ };
321
+ } | {
322
+ type: "BUYER_PAID";
323
+ data: {
324
+ soldAccountId: string;
325
+ soldOrderId: string;
326
+ soldConversationId?: string | null | undefined;
327
+ };
328
+ } | null | undefined;
231
329
  }, {
232
330
  type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
233
331
  id: string;
234
332
  createdAt: Date;
235
333
  itemId: string | number;
236
- data?: string | null | undefined;
334
+ data?: {
335
+ type: "EMPTY";
336
+ } | {
337
+ type: "SCHEDULED";
338
+ data: {
339
+ platform: "VINTED" | "SHOPIFY";
340
+ publishingDate?: Date | null | undefined;
341
+ };
342
+ } | {
343
+ type: "FAILED_TO_PUBLISH";
344
+ data: {
345
+ platform: "VINTED" | "SHOPIFY";
346
+ };
347
+ } | {
348
+ type: "BUYER_PAID";
349
+ data: {
350
+ soldAccountId: string;
351
+ soldOrderId: string;
352
+ soldConversationId?: string | null | undefined;
353
+ };
354
+ } | null | undefined;
237
355
  }>>>;
238
356
  platforms: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
239
357
  id: z.ZodString;
@@ -403,7 +521,27 @@ export declare const ItemSchema: z.ZodObject<{
403
521
  id: string;
404
522
  createdAt: Date;
405
523
  itemId: string | number;
406
- data?: string | null | undefined;
524
+ data?: {
525
+ type: "EMPTY";
526
+ } | {
527
+ type: "SCHEDULED";
528
+ data: {
529
+ platform: "VINTED" | "SHOPIFY";
530
+ publishingDate?: Date | null | undefined;
531
+ };
532
+ } | {
533
+ type: "FAILED_TO_PUBLISH";
534
+ data: {
535
+ platform: "VINTED" | "SHOPIFY";
536
+ };
537
+ } | {
538
+ type: "BUYER_PAID";
539
+ data: {
540
+ soldAccountId: string;
541
+ soldOrderId: string;
542
+ soldConversationId?: string | null | undefined;
543
+ };
544
+ } | null | undefined;
407
545
  } | null | undefined;
408
546
  }, {
409
547
  id: string | number;
@@ -513,7 +651,27 @@ export declare const ItemSchema: z.ZodObject<{
513
651
  id: string;
514
652
  createdAt: Date;
515
653
  itemId: string | number;
516
- data?: string | null | undefined;
654
+ data?: {
655
+ type: "EMPTY";
656
+ } | {
657
+ type: "SCHEDULED";
658
+ data: {
659
+ platform: "VINTED" | "SHOPIFY";
660
+ publishingDate?: Date | null | undefined;
661
+ };
662
+ } | {
663
+ type: "FAILED_TO_PUBLISH";
664
+ data: {
665
+ platform: "VINTED" | "SHOPIFY";
666
+ };
667
+ } | {
668
+ type: "BUYER_PAID";
669
+ data: {
670
+ soldAccountId: string;
671
+ soldOrderId: string;
672
+ soldConversationId?: string | null | undefined;
673
+ };
674
+ } | null | undefined;
517
675
  } | null | undefined;
518
676
  }>;
519
677
  export type Item = z.infer<typeof ItemSchema>;