controlresell 2.2.12 → 2.3.2

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 (81) hide show
  1. package/package.json +2 -2
  2. package/src/com/controlresell/models/catalogs/Catalog.d.ts +3 -6
  3. package/src/com/controlresell/models/catalogs/Catalog.js +2 -3
  4. package/src/com/controlresell/models/catalogs/Catalog.ts +2 -3
  5. package/src/com/controlresell/models/catalogs/CatalogRoot.d.ts +5 -10
  6. package/src/com/controlresell/models/items/CreatedItems.d.ts +139 -130
  7. package/src/com/controlresell/models/items/Item.d.ts +111 -104
  8. package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +139 -130
  9. package/src/com/controlresell/models/items/UpdatedItem.d.ts +139 -130
  10. package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.d.ts +71 -71
  11. package/src/com/controlresell/models/items/history/ItemHistory.d.ts +78 -78
  12. package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.d.ts +156 -18
  13. package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.js +32 -26
  14. package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.ts +43 -26
  15. package/src/com/controlresell/models/items/platforms/ItemOnPlatform.d.ts +5 -0
  16. package/src/com/controlresell/models/items/platforms/ItemOnPlatformUpdateRequest.d.ts +5 -0
  17. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequest.d.ts +2 -2
  18. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +4 -4
  19. package/src/com/controlresell/models/platforms/conversations/Conversation.d.ts +15 -0
  20. package/src/com/controlresell/models/platforms/conversations/ConversationOnPlatformUpdateRequest.d.ts +5 -0
  21. package/src/com/controlresell/models/platforms/conversations/UserConversations.d.ts +21 -0
  22. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.d.ts +6 -0
  23. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.js +4 -0
  24. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.ts +4 -0
  25. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageRequest.d.ts +6 -0
  26. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageRequest.js +4 -1
  27. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageRequest.ts +4 -1
  28. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageStatus.d.ts +3 -0
  29. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageStatus.js +7 -0
  30. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageStatus.ts +6 -0
  31. package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.d.ts +6 -0
  32. package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.js +4 -0
  33. package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.ts +4 -0
  34. package/src/com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages.d.ts +10 -0
  35. package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.d.ts +6 -0
  36. package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.js +4 -0
  37. package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.ts +4 -0
  38. package/src/com/controlresell/models/platforms/favorites/Favorite.d.ts +26 -0
  39. package/src/com/controlresell/models/platforms/favorites/FavoriteOnPlatformUpdateRequest.d.ts +5 -0
  40. package/src/com/controlresell/models/platforms/orders/Order.d.ts +9 -0
  41. package/src/com/controlresell/models/platforms/orders/OrderOnPlatformUpdateRequest.d.ts +5 -0
  42. package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.d.ts +7 -0
  43. package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.d.ts +150 -130
  44. package/src/com/controlresell/models/platforms/transactions/Transaction.d.ts +9 -0
  45. package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.d.ts +7 -0
  46. package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.d.ts +150 -130
  47. package/src/com/controlresell/models/preferences/Preference.d.ts +356 -356
  48. package/src/com/controlresell/models/preferences/PreferenceFilter.d.ts +144 -130
  49. package/src/com/controlresell/models/preferences/PreferenceWithCase.d.ts +1121 -1121
  50. package/src/com/controlresell/models/preferences/PreferenceWithChildren.d.ts +815 -815
  51. package/src/com/controlresell/models/preferences/cases/CreatePreferenceCasePayload.d.ts +275 -275
  52. package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.d.ts +276 -276
  53. package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +286 -286
  54. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts +31 -31
  55. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.d.ts +96 -5
  56. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.js +20 -16
  57. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.ts +27 -16
  58. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +41 -41
  59. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.d.ts +3476 -41
  60. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.js +3 -1
  61. package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.ts +3 -1
  62. package/src/com/controlresell/models/preferences/variants/PartialPreferenceCaseVariantPayload.d.ts +229 -229
  63. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.d.ts +232 -232
  64. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.d.ts +541 -83
  65. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.js +33 -27
  66. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.ts +44 -27
  67. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.d.ts +229 -229
  68. package/src/com/controlresell/models/users/platforms/PlatformAuthRequest.d.ts +5 -0
  69. package/src/com/controlresell/models/users/platforms/PlatformJobUpdate.d.ts +5 -0
  70. package/src/com/controlresell/models/users/platforms/UpdateUserOnPlatformPayload.d.ts +3 -0
  71. package/src/com/controlresell/models/users/platforms/UpdateUserOnPlatformPayload.js +1 -0
  72. package/src/com/controlresell/models/users/platforms/UpdateUserOnPlatformPayload.ts +1 -0
  73. package/src/com/controlresell/models/users/platforms/UserOnPlatform.d.ts +3 -0
  74. package/src/com/controlresell/models/users/platforms/UserOnPlatform.js +1 -0
  75. package/src/com/controlresell/models/users/platforms/UserOnPlatform.ts +1 -0
  76. package/src/com/controlresell/models/users/ws/UserWsPayload.d.ts +1205 -0
  77. package/src/com/controlresell/models/users/ws/UserWsPayload.js +34 -0
  78. package/src/com/controlresell/models/users/ws/UserWsPayload.ts +43 -0
  79. package/src/index.d.ts +2 -0
  80. package/src/index.js +7 -3
  81. package/src/index.ts +2 -0
@@ -1,36 +1,96 @@
1
1
  import { z } from "zod";
2
- export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2
+ export declare const ItemHistoryDecodedPayloadBuyerPaidSchema: z.ZodObject<{
3
+ data: z.ZodObject<{
4
+ soldAccountId: z.ZodString;
5
+ soldOrderId: z.ZodString;
6
+ soldConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ soldAccountId: string;
9
+ soldOrderId: string;
10
+ soldConversationId?: string | null | undefined;
11
+ }, {
12
+ soldAccountId: string;
13
+ soldOrderId: string;
14
+ soldConversationId?: string | null | undefined;
15
+ }>;
16
+ type: z.ZodLiteral<"BUYER_PAID">;
17
+ }, "strip", z.ZodTypeAny, {
18
+ type: "BUYER_PAID";
19
+ data: {
20
+ soldAccountId: string;
21
+ soldOrderId: string;
22
+ soldConversationId?: string | null | undefined;
23
+ };
24
+ }, {
25
+ type: "BUYER_PAID";
26
+ data: {
27
+ soldAccountId: string;
28
+ soldOrderId: string;
29
+ soldConversationId?: string | null | undefined;
30
+ };
31
+ }>;
32
+ export type ItemHistoryDecodedPayloadBuyerPaid = z.infer<typeof ItemHistoryDecodedPayloadBuyerPaidSchema>;
33
+ export declare const ItemHistoryDecodedPayloadDeliveredSchema: z.ZodObject<{
34
+ data: z.ZodObject<{
35
+ soldAccountId: z.ZodString;
36
+ soldOrderId: z.ZodString;
37
+ soldConversationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ soldAccountId: string;
40
+ soldOrderId: string;
41
+ soldConversationId?: string | null | undefined;
42
+ }, {
43
+ soldAccountId: string;
44
+ soldOrderId: string;
45
+ soldConversationId?: string | null | undefined;
46
+ }>;
47
+ type: z.ZodLiteral<"DELIVERED">;
48
+ }, "strip", z.ZodTypeAny, {
49
+ type: "DELIVERED";
50
+ data: {
51
+ soldAccountId: string;
52
+ soldOrderId: string;
53
+ soldConversationId?: string | null | undefined;
54
+ };
55
+ }, {
56
+ type: "DELIVERED";
57
+ data: {
58
+ soldAccountId: string;
59
+ soldOrderId: string;
60
+ soldConversationId?: string | null | undefined;
61
+ };
62
+ }>;
63
+ export type ItemHistoryDecodedPayloadDelivered = z.infer<typeof ItemHistoryDecodedPayloadDeliveredSchema>;
64
+ export declare const ItemHistoryDecodedPayloadEmptySchema: z.ZodObject<{
3
65
  type: z.ZodLiteral<"EMPTY">;
4
66
  }, "strip", z.ZodTypeAny, {
5
67
  type: "EMPTY";
6
68
  }, {
7
69
  type: "EMPTY";
8
- }>, z.ZodObject<{
9
- type: z.ZodLiteral<"SCHEDULED">;
70
+ }>;
71
+ export type ItemHistoryDecodedPayloadEmpty = z.infer<typeof ItemHistoryDecodedPayloadEmptySchema>;
72
+ export declare const ItemHistoryDecodedPayloadFailedToPublishSchema: z.ZodObject<{
10
73
  data: z.ZodObject<{
11
74
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
12
- publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
13
75
  }, "strip", z.ZodTypeAny, {
14
76
  platform: "VINTED" | "SHOPIFY";
15
- publishingDate?: Date | null | undefined;
16
77
  }, {
17
78
  platform: "VINTED" | "SHOPIFY";
18
- publishingDate?: Date | null | undefined;
19
79
  }>;
80
+ type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
20
81
  }, "strip", z.ZodTypeAny, {
21
- type: "SCHEDULED";
82
+ type: "FAILED_TO_PUBLISH";
22
83
  data: {
23
84
  platform: "VINTED" | "SHOPIFY";
24
- publishingDate?: Date | null | undefined;
25
85
  };
26
86
  }, {
27
- type: "SCHEDULED";
87
+ type: "FAILED_TO_PUBLISH";
28
88
  data: {
29
89
  platform: "VINTED" | "SHOPIFY";
30
- publishingDate?: Date | null | undefined;
31
90
  };
32
- }>, z.ZodObject<{
33
- type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
91
+ }>;
92
+ export type ItemHistoryDecodedPayloadFailedToPublish = z.infer<typeof ItemHistoryDecodedPayloadFailedToPublishSchema>;
93
+ export declare const ItemHistoryDecodedPayloadRepublishingSchema: z.ZodObject<{
34
94
  data: z.ZodObject<{
35
95
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
36
96
  }, "strip", z.ZodTypeAny, {
@@ -38,18 +98,46 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
38
98
  }, {
39
99
  platform: "VINTED" | "SHOPIFY";
40
100
  }>;
101
+ type: z.ZodLiteral<"REPUBLISHING">;
41
102
  }, "strip", z.ZodTypeAny, {
42
- type: "FAILED_TO_PUBLISH";
103
+ type: "REPUBLISHING";
43
104
  data: {
44
105
  platform: "VINTED" | "SHOPIFY";
45
106
  };
46
107
  }, {
47
- type: "FAILED_TO_PUBLISH";
108
+ type: "REPUBLISHING";
48
109
  data: {
49
110
  platform: "VINTED" | "SHOPIFY";
50
111
  };
51
- }>, z.ZodObject<{
52
- type: z.ZodLiteral<"BUYER_PAID">;
112
+ }>;
113
+ export type ItemHistoryDecodedPayloadRepublishing = z.infer<typeof ItemHistoryDecodedPayloadRepublishingSchema>;
114
+ export declare const ItemHistoryDecodedPayloadScheduledSchema: z.ZodObject<{
115
+ data: z.ZodObject<{
116
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
117
+ publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
118
+ }, "strip", z.ZodTypeAny, {
119
+ platform: "VINTED" | "SHOPIFY";
120
+ publishingDate?: Date | null | undefined;
121
+ }, {
122
+ platform: "VINTED" | "SHOPIFY";
123
+ publishingDate?: Date | null | undefined;
124
+ }>;
125
+ type: z.ZodLiteral<"SCHEDULED">;
126
+ }, "strip", z.ZodTypeAny, {
127
+ type: "SCHEDULED";
128
+ data: {
129
+ platform: "VINTED" | "SHOPIFY";
130
+ publishingDate?: Date | null | undefined;
131
+ };
132
+ }, {
133
+ type: "SCHEDULED";
134
+ data: {
135
+ platform: "VINTED" | "SHOPIFY";
136
+ publishingDate?: Date | null | undefined;
137
+ };
138
+ }>;
139
+ export type ItemHistoryDecodedPayloadScheduled = z.infer<typeof ItemHistoryDecodedPayloadScheduledSchema>;
140
+ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
53
141
  data: z.ZodObject<{
54
142
  soldAccountId: z.ZodString;
55
143
  soldOrderId: z.ZodString;
@@ -63,6 +151,7 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
63
151
  soldOrderId: string;
64
152
  soldConversationId?: string | null | undefined;
65
153
  }>;
154
+ type: z.ZodLiteral<"BUYER_PAID">;
66
155
  }, "strip", z.ZodTypeAny, {
67
156
  type: "BUYER_PAID";
68
157
  data: {
@@ -78,7 +167,6 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
78
167
  soldConversationId?: string | null | undefined;
79
168
  };
80
169
  }>, z.ZodObject<{
81
- type: z.ZodLiteral<"DELIVERED">;
82
170
  data: z.ZodObject<{
83
171
  soldAccountId: z.ZodString;
84
172
  soldOrderId: z.ZodString;
@@ -92,6 +180,7 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
92
180
  soldOrderId: string;
93
181
  soldConversationId?: string | null | undefined;
94
182
  }>;
183
+ type: z.ZodLiteral<"DELIVERED">;
95
184
  }, "strip", z.ZodTypeAny, {
96
185
  type: "DELIVERED";
97
186
  data: {
@@ -107,7 +196,31 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
107
196
  soldConversationId?: string | null | undefined;
108
197
  };
109
198
  }>, z.ZodObject<{
110
- type: z.ZodLiteral<"REPUBLISHING">;
199
+ type: z.ZodLiteral<"EMPTY">;
200
+ }, "strip", z.ZodTypeAny, {
201
+ type: "EMPTY";
202
+ }, {
203
+ type: "EMPTY";
204
+ }>, z.ZodObject<{
205
+ data: z.ZodObject<{
206
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
207
+ }, "strip", z.ZodTypeAny, {
208
+ platform: "VINTED" | "SHOPIFY";
209
+ }, {
210
+ platform: "VINTED" | "SHOPIFY";
211
+ }>;
212
+ type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
213
+ }, "strip", z.ZodTypeAny, {
214
+ type: "FAILED_TO_PUBLISH";
215
+ data: {
216
+ platform: "VINTED" | "SHOPIFY";
217
+ };
218
+ }, {
219
+ type: "FAILED_TO_PUBLISH";
220
+ data: {
221
+ platform: "VINTED" | "SHOPIFY";
222
+ };
223
+ }>, z.ZodObject<{
111
224
  data: z.ZodObject<{
112
225
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
113
226
  }, "strip", z.ZodTypeAny, {
@@ -115,6 +228,7 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
115
228
  }, {
116
229
  platform: "VINTED" | "SHOPIFY";
117
230
  }>;
231
+ type: z.ZodLiteral<"REPUBLISHING">;
118
232
  }, "strip", z.ZodTypeAny, {
119
233
  type: "REPUBLISHING";
120
234
  data: {
@@ -125,5 +239,29 @@ export declare const ItemHistoryDecodedPayloadSchema: z.ZodDiscriminatedUnion<"t
125
239
  data: {
126
240
  platform: "VINTED" | "SHOPIFY";
127
241
  };
242
+ }>, z.ZodObject<{
243
+ data: z.ZodObject<{
244
+ platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
245
+ publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
246
+ }, "strip", z.ZodTypeAny, {
247
+ platform: "VINTED" | "SHOPIFY";
248
+ publishingDate?: Date | null | undefined;
249
+ }, {
250
+ platform: "VINTED" | "SHOPIFY";
251
+ publishingDate?: Date | null | undefined;
252
+ }>;
253
+ type: z.ZodLiteral<"SCHEDULED">;
254
+ }, "strip", z.ZodTypeAny, {
255
+ type: "SCHEDULED";
256
+ data: {
257
+ platform: "VINTED" | "SHOPIFY";
258
+ publishingDate?: Date | null | undefined;
259
+ };
260
+ }, {
261
+ type: "SCHEDULED";
262
+ data: {
263
+ platform: "VINTED" | "SHOPIFY";
264
+ publishingDate?: Date | null | undefined;
265
+ };
128
266
  }>]>;
129
267
  export type ItemHistoryDecodedPayload = z.infer<typeof ItemHistoryDecodedPayloadSchema>;
@@ -1,34 +1,40 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ItemHistoryDecodedPayloadSchema = void 0;
3
+ exports.ItemHistoryDecodedPayloadSchema = exports.ItemHistoryDecodedPayloadScheduledSchema = exports.ItemHistoryDecodedPayloadRepublishingSchema = exports.ItemHistoryDecodedPayloadFailedToPublishSchema = exports.ItemHistoryDecodedPayloadEmptySchema = exports.ItemHistoryDecodedPayloadDeliveredSchema = exports.ItemHistoryDecodedPayloadBuyerPaidSchema = void 0;
4
4
  const zod_1 = require("zod");
5
- const ItemHistoryScheduledPayload_1 = require("./data/ItemHistoryScheduledPayload");
6
- const ItemHistoryFailedToPublishPayload_1 = require("./data/ItemHistoryFailedToPublishPayload");
7
5
  const ItemHistoryBuyerPaidPayload_1 = require("./data/ItemHistoryBuyerPaidPayload");
8
6
  const ItemHistoryDeliveredPayload_1 = require("./data/ItemHistoryDeliveredPayload");
7
+ const ItemHistoryFailedToPublishPayload_1 = require("./data/ItemHistoryFailedToPublishPayload");
9
8
  const ItemHistoryRepublishing_1 = require("./data/ItemHistoryRepublishing");
9
+ const ItemHistoryScheduledPayload_1 = require("./data/ItemHistoryScheduledPayload");
10
+ exports.ItemHistoryDecodedPayloadBuyerPaidSchema = zod_1.z.object({
11
+ data: ItemHistoryBuyerPaidPayload_1.ItemHistoryBuyerPaidPayloadSchema,
12
+ type: zod_1.z.literal("BUYER_PAID")
13
+ });
14
+ exports.ItemHistoryDecodedPayloadDeliveredSchema = zod_1.z.object({
15
+ data: ItemHistoryDeliveredPayload_1.ItemHistoryDeliveredPayloadSchema,
16
+ type: zod_1.z.literal("DELIVERED")
17
+ });
18
+ exports.ItemHistoryDecodedPayloadEmptySchema = zod_1.z.object({
19
+ type: zod_1.z.literal("EMPTY")
20
+ });
21
+ exports.ItemHistoryDecodedPayloadFailedToPublishSchema = zod_1.z.object({
22
+ data: ItemHistoryFailedToPublishPayload_1.ItemHistoryFailedToPublishPayloadSchema,
23
+ type: zod_1.z.literal("FAILED_TO_PUBLISH")
24
+ });
25
+ exports.ItemHistoryDecodedPayloadRepublishingSchema = zod_1.z.object({
26
+ data: ItemHistoryRepublishing_1.ItemHistoryRepublishingSchema,
27
+ type: zod_1.z.literal("REPUBLISHING")
28
+ });
29
+ exports.ItemHistoryDecodedPayloadScheduledSchema = zod_1.z.object({
30
+ data: ItemHistoryScheduledPayload_1.ItemHistoryScheduledPayloadSchema,
31
+ type: zod_1.z.literal("SCHEDULED")
32
+ });
10
33
  exports.ItemHistoryDecodedPayloadSchema = zod_1.z.discriminatedUnion("type", [
11
- zod_1.z.object({
12
- type: zod_1.z.literal("EMPTY"),
13
- }),
14
- zod_1.z.object({
15
- type: zod_1.z.literal("SCHEDULED"),
16
- data: ItemHistoryScheduledPayload_1.ItemHistoryScheduledPayloadSchema,
17
- }),
18
- zod_1.z.object({
19
- type: zod_1.z.literal("FAILED_TO_PUBLISH"),
20
- data: ItemHistoryFailedToPublishPayload_1.ItemHistoryFailedToPublishPayloadSchema,
21
- }),
22
- zod_1.z.object({
23
- type: zod_1.z.literal("BUYER_PAID"),
24
- data: ItemHistoryBuyerPaidPayload_1.ItemHistoryBuyerPaidPayloadSchema,
25
- }),
26
- zod_1.z.object({
27
- type: zod_1.z.literal("DELIVERED"),
28
- data: ItemHistoryDeliveredPayload_1.ItemHistoryDeliveredPayloadSchema,
29
- }),
30
- zod_1.z.object({
31
- type: zod_1.z.literal("REPUBLISHING"),
32
- data: ItemHistoryRepublishing_1.ItemHistoryRepublishingSchema,
33
- }),
34
+ exports.ItemHistoryDecodedPayloadBuyerPaidSchema,
35
+ exports.ItemHistoryDecodedPayloadDeliveredSchema,
36
+ exports.ItemHistoryDecodedPayloadEmptySchema,
37
+ exports.ItemHistoryDecodedPayloadFailedToPublishSchema,
38
+ exports.ItemHistoryDecodedPayloadRepublishingSchema,
39
+ exports.ItemHistoryDecodedPayloadScheduledSchema
34
40
  ]);
@@ -1,34 +1,51 @@
1
1
  import {z} from "zod"
2
-
3
- import {ItemHistoryScheduledPayloadSchema} from "./data/ItemHistoryScheduledPayload"
4
- import {ItemHistoryFailedToPublishPayloadSchema} from "./data/ItemHistoryFailedToPublishPayload"
5
2
  import {ItemHistoryBuyerPaidPayloadSchema} from "./data/ItemHistoryBuyerPaidPayload"
6
3
  import {ItemHistoryDeliveredPayloadSchema} from "./data/ItemHistoryDeliveredPayload"
4
+ import {ItemHistoryFailedToPublishPayloadSchema} from "./data/ItemHistoryFailedToPublishPayload"
7
5
  import {ItemHistoryRepublishingSchema} from "./data/ItemHistoryRepublishing"
6
+ import {ItemHistoryScheduledPayloadSchema} from "./data/ItemHistoryScheduledPayload"
7
+
8
+ export const ItemHistoryDecodedPayloadBuyerPaidSchema = z.object({
9
+ data: ItemHistoryBuyerPaidPayloadSchema,
10
+ type: z.literal("BUYER_PAID")
11
+ })
12
+ export type ItemHistoryDecodedPayloadBuyerPaid = z.infer<typeof ItemHistoryDecodedPayloadBuyerPaidSchema>
13
+
14
+ export const ItemHistoryDecodedPayloadDeliveredSchema = z.object({
15
+ data: ItemHistoryDeliveredPayloadSchema,
16
+ type: z.literal("DELIVERED")
17
+ })
18
+ export type ItemHistoryDecodedPayloadDelivered = z.infer<typeof ItemHistoryDecodedPayloadDeliveredSchema>
19
+
20
+ export const ItemHistoryDecodedPayloadEmptySchema = z.object({
21
+ type: z.literal("EMPTY")
22
+ })
23
+ export type ItemHistoryDecodedPayloadEmpty = z.infer<typeof ItemHistoryDecodedPayloadEmptySchema>
24
+
25
+ export const ItemHistoryDecodedPayloadFailedToPublishSchema = z.object({
26
+ data: ItemHistoryFailedToPublishPayloadSchema,
27
+ type: z.literal("FAILED_TO_PUBLISH")
28
+ })
29
+ export type ItemHistoryDecodedPayloadFailedToPublish = z.infer<typeof ItemHistoryDecodedPayloadFailedToPublishSchema>
30
+
31
+ export const ItemHistoryDecodedPayloadRepublishingSchema = z.object({
32
+ data: ItemHistoryRepublishingSchema,
33
+ type: z.literal("REPUBLISHING")
34
+ })
35
+ export type ItemHistoryDecodedPayloadRepublishing = z.infer<typeof ItemHistoryDecodedPayloadRepublishingSchema>
36
+
37
+ export const ItemHistoryDecodedPayloadScheduledSchema = z.object({
38
+ data: ItemHistoryScheduledPayloadSchema,
39
+ type: z.literal("SCHEDULED")
40
+ })
41
+ export type ItemHistoryDecodedPayloadScheduled = z.infer<typeof ItemHistoryDecodedPayloadScheduledSchema>
8
42
 
9
43
  export const ItemHistoryDecodedPayloadSchema = z.discriminatedUnion("type", [
10
- z.object({
11
- type: z.literal("EMPTY"),
12
- }),
13
- z.object({
14
- type: z.literal("SCHEDULED"),
15
- data: ItemHistoryScheduledPayloadSchema,
16
- }),
17
- z.object({
18
- type: z.literal("FAILED_TO_PUBLISH"),
19
- data: ItemHistoryFailedToPublishPayloadSchema,
20
- }),
21
- z.object({
22
- type: z.literal("BUYER_PAID"),
23
- data: ItemHistoryBuyerPaidPayloadSchema,
24
- }),
25
- z.object({
26
- type: z.literal("DELIVERED"),
27
- data: ItemHistoryDeliveredPayloadSchema,
28
- }),
29
- z.object({
30
- type: z.literal("REPUBLISHING"),
31
- data: ItemHistoryRepublishingSchema,
32
- }),
44
+ ItemHistoryDecodedPayloadBuyerPaidSchema,
45
+ ItemHistoryDecodedPayloadDeliveredSchema,
46
+ ItemHistoryDecodedPayloadEmptySchema,
47
+ ItemHistoryDecodedPayloadFailedToPublishSchema,
48
+ ItemHistoryDecodedPayloadRepublishingSchema,
49
+ ItemHistoryDecodedPayloadScheduledSchema
33
50
  ])
34
51
  export type ItemHistoryDecodedPayload = z.infer<typeof ItemHistoryDecodedPayloadSchema>
@@ -12,6 +12,7 @@ export declare const ItemOnPlatformSchema: z.ZodObject<{
12
12
  accountId: z.ZodString;
13
13
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
14
14
  name: z.ZodString;
15
+ locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
15
16
  status: z.ZodEnum<["CONNECTED", "DISCONNECTED", "ERROR"]>;
16
17
  }, "strip", z.ZodTypeAny, {
17
18
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
@@ -19,12 +20,14 @@ export declare const ItemOnPlatformSchema: z.ZodObject<{
19
20
  name: string;
20
21
  platform: "VINTED" | "SHOPIFY";
21
22
  accountId: string;
23
+ locale?: string | null | undefined;
22
24
  }, {
23
25
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
24
26
  userId: string | number;
25
27
  name: string;
26
28
  platform: "VINTED" | "SHOPIFY";
27
29
  accountId: string;
30
+ locale?: string | null | undefined;
28
31
  }>>>;
29
32
  }, "strip", z.ZodTypeAny, {
30
33
  status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
@@ -40,6 +43,7 @@ export declare const ItemOnPlatformSchema: z.ZodObject<{
40
43
  name: string;
41
44
  platform: "VINTED" | "SHOPIFY";
42
45
  accountId: string;
46
+ locale?: string | null | undefined;
43
47
  } | null | undefined;
44
48
  }, {
45
49
  status: "DELETED" | "PENDING" | "DRAFT" | "ONLINE" | "SOLD" | "SOLD_ELSEWHERE" | "HIDDEN" | "ERROR" | "DISPUTE";
@@ -55,6 +59,7 @@ export declare const ItemOnPlatformSchema: z.ZodObject<{
55
59
  name: string;
56
60
  platform: "VINTED" | "SHOPIFY";
57
61
  accountId: string;
62
+ locale?: string | null | undefined;
58
63
  } | null | undefined;
59
64
  }>;
60
65
  export type ItemOnPlatform = z.infer<typeof ItemOnPlatformSchema>;
@@ -117,6 +117,7 @@ export declare const ItemOnPlatformUpdateRequestSchema: z.ZodObject<{
117
117
  accountId: z.ZodString;
118
118
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
119
119
  name: z.ZodString;
120
+ locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
121
  status: z.ZodEnum<["CONNECTED", "DISCONNECTED", "ERROR"]>;
121
122
  }, "strip", z.ZodTypeAny, {
122
123
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
@@ -124,12 +125,14 @@ export declare const ItemOnPlatformUpdateRequestSchema: z.ZodObject<{
124
125
  name: string;
125
126
  platform: "VINTED" | "SHOPIFY";
126
127
  accountId: string;
128
+ locale?: string | null | undefined;
127
129
  }, {
128
130
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
129
131
  userId: string | number;
130
132
  name: string;
131
133
  platform: "VINTED" | "SHOPIFY";
132
134
  accountId: string;
135
+ locale?: string | null | undefined;
133
136
  }>;
134
137
  }, "strip", z.ZodTypeAny, {
135
138
  account: {
@@ -138,6 +141,7 @@ export declare const ItemOnPlatformUpdateRequestSchema: z.ZodObject<{
138
141
  name: string;
139
142
  platform: "VINTED" | "SHOPIFY";
140
143
  accountId: string;
144
+ locale?: string | null | undefined;
141
145
  };
142
146
  item: {
143
147
  platformId: string;
@@ -172,6 +176,7 @@ export declare const ItemOnPlatformUpdateRequestSchema: z.ZodObject<{
172
176
  name: string;
173
177
  platform: "VINTED" | "SHOPIFY";
174
178
  accountId: string;
179
+ locale?: string | null | undefined;
175
180
  };
176
181
  item: {
177
182
  platformId: string;
@@ -8,14 +8,14 @@ export declare const ItemOnPlatformsRequestSchema: z.ZodObject<{
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  accountsId: string[];
10
10
  publishingDate?: Date | null | undefined;
11
+ locale?: string | null | undefined;
11
12
  overrideFileIds?: string[] | null | undefined;
12
13
  disableGetDraft?: boolean | null | undefined;
13
- locale?: string | null | undefined;
14
14
  }, {
15
15
  accountsId: string[];
16
16
  publishingDate?: Date | null | undefined;
17
+ locale?: string | null | undefined;
17
18
  overrideFileIds?: string[] | null | undefined;
18
19
  disableGetDraft?: boolean | null | undefined;
19
- locale?: string | null | undefined;
20
20
  }>;
21
21
  export type ItemOnPlatformsRequest = z.infer<typeof ItemOnPlatformsRequestSchema>;
@@ -9,15 +9,15 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
9
9
  }, "strip", z.ZodTypeAny, {
10
10
  accountsId: string[];
11
11
  publishingDate?: Date | null | undefined;
12
+ locale?: string | null | undefined;
12
13
  overrideFileIds?: string[] | null | undefined;
13
14
  disableGetDraft?: boolean | null | undefined;
14
- locale?: string | null | undefined;
15
15
  }, {
16
16
  accountsId: string[];
17
17
  publishingDate?: Date | null | undefined;
18
+ locale?: string | null | undefined;
18
19
  overrideFileIds?: string[] | null | undefined;
19
20
  disableGetDraft?: boolean | null | undefined;
20
- locale?: string | null | undefined;
21
21
  }>;
22
22
  itemId: z.ZodNumber;
23
23
  userId: z.ZodNumber;
@@ -28,9 +28,9 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
28
28
  request: {
29
29
  accountsId: string[];
30
30
  publishingDate?: Date | null | undefined;
31
+ locale?: string | null | undefined;
31
32
  overrideFileIds?: string[] | null | undefined;
32
33
  disableGetDraft?: boolean | null | undefined;
33
- locale?: string | null | undefined;
34
34
  };
35
35
  platformId?: string | null | undefined;
36
36
  }, {
@@ -39,9 +39,9 @@ export declare const ItemOnPlatformsRequestWithItemSchema: z.ZodObject<{
39
39
  request: {
40
40
  accountsId: string[];
41
41
  publishingDate?: Date | null | undefined;
42
+ locale?: string | null | undefined;
42
43
  overrideFileIds?: string[] | null | undefined;
43
44
  disableGetDraft?: boolean | null | undefined;
44
- locale?: string | null | undefined;
45
45
  };
46
46
  platformId?: string | null | undefined;
47
47
  }>;
@@ -9,6 +9,7 @@ export declare const ConversationSchema: z.ZodObject<{
9
9
  accountId: z.ZodString;
10
10
  platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
11
11
  name: z.ZodString;
12
+ locale: z.ZodOptional<z.ZodNullable<z.ZodString>>;
12
13
  status: z.ZodEnum<["CONNECTED", "DISCONNECTED", "ERROR"]>;
13
14
  }, "strip", z.ZodTypeAny, {
14
15
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
@@ -16,12 +17,14 @@ export declare const ConversationSchema: z.ZodObject<{
16
17
  name: string;
17
18
  platform: "VINTED" | "SHOPIFY";
18
19
  accountId: string;
20
+ locale?: string | null | undefined;
19
21
  }, {
20
22
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
21
23
  userId: string | number;
22
24
  name: string;
23
25
  platform: "VINTED" | "SHOPIFY";
24
26
  accountId: string;
27
+ locale?: string | null | undefined;
25
28
  }>>>;
26
29
  lastMessage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
27
30
  id: z.ZodString;
@@ -29,6 +32,8 @@ export declare const ConversationSchema: z.ZodObject<{
29
32
  conversationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
30
33
  platformMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
31
34
  type: z.ZodEnum<["MESSAGE", "STATUS_MESSAGE", "ACTION_MESSAGE", "OFFER_REQUEST_MESSAGE", "OFFER_MESSAGE"]>;
35
+ status: z.ZodEnum<["NEEDS_VALIDATION", "SENDING", "FAILED_TO_SEND", "SENT"]>;
36
+ associatedPreferenceType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["NEGOTIATION", "REPUBLISH", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"]>>>;
32
37
  body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
33
38
  createdAt: z.ZodDate;
34
39
  offer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
@@ -117,6 +122,7 @@ export declare const ConversationSchema: z.ZodObject<{
117
122
  }>, "many">>>;
118
123
  }, "strip", z.ZodTypeAny, {
119
124
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
125
+ status: "NEEDS_VALIDATION" | "SENDING" | "FAILED_TO_SEND" | "SENT";
120
126
  id: string;
121
127
  createdAt: Date;
122
128
  conversationId: string;
@@ -144,6 +150,7 @@ export declare const ConversationSchema: z.ZodObject<{
144
150
  }[] | null | undefined;
145
151
  conversationUserId?: string | null | undefined;
146
152
  platformMessageId?: string | null | undefined;
153
+ associatedPreferenceType?: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "REPUBLISH" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE" | null | undefined;
147
154
  translation?: {
148
155
  body: string;
149
156
  messageId: string;
@@ -151,6 +158,7 @@ export declare const ConversationSchema: z.ZodObject<{
151
158
  } | null | undefined;
152
159
  }, {
153
160
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
161
+ status: "NEEDS_VALIDATION" | "SENDING" | "FAILED_TO_SEND" | "SENT";
154
162
  id: string;
155
163
  createdAt: Date;
156
164
  conversationId: string;
@@ -178,6 +186,7 @@ export declare const ConversationSchema: z.ZodObject<{
178
186
  }[] | null | undefined;
179
187
  conversationUserId?: string | null | undefined;
180
188
  platformMessageId?: string | null | undefined;
189
+ associatedPreferenceType?: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "REPUBLISH" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE" | null | undefined;
181
190
  translation?: {
182
191
  body: string;
183
192
  messageId: string;
@@ -256,6 +265,7 @@ export declare const ConversationSchema: z.ZodObject<{
256
265
  name: string;
257
266
  platform: "VINTED" | "SHOPIFY";
258
267
  accountId: string;
268
+ locale?: string | null | undefined;
259
269
  } | null | undefined;
260
270
  users?: {
261
271
  id: string;
@@ -276,6 +286,7 @@ export declare const ConversationSchema: z.ZodObject<{
276
286
  }[] | null | undefined;
277
287
  lastMessage?: {
278
288
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
289
+ status: "NEEDS_VALIDATION" | "SENDING" | "FAILED_TO_SEND" | "SENT";
279
290
  id: string;
280
291
  createdAt: Date;
281
292
  conversationId: string;
@@ -303,6 +314,7 @@ export declare const ConversationSchema: z.ZodObject<{
303
314
  }[] | null | undefined;
304
315
  conversationUserId?: string | null | undefined;
305
316
  platformMessageId?: string | null | undefined;
317
+ associatedPreferenceType?: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "REPUBLISH" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE" | null | undefined;
306
318
  translation?: {
307
319
  body: string;
308
320
  messageId: string;
@@ -320,6 +332,7 @@ export declare const ConversationSchema: z.ZodObject<{
320
332
  name: string;
321
333
  platform: "VINTED" | "SHOPIFY";
322
334
  accountId: string;
335
+ locale?: string | null | undefined;
323
336
  } | null | undefined;
324
337
  users?: {
325
338
  id: string;
@@ -340,6 +353,7 @@ export declare const ConversationSchema: z.ZodObject<{
340
353
  }[] | null | undefined;
341
354
  lastMessage?: {
342
355
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
356
+ status: "NEEDS_VALIDATION" | "SENDING" | "FAILED_TO_SEND" | "SENT";
343
357
  id: string;
344
358
  createdAt: Date;
345
359
  conversationId: string;
@@ -367,6 +381,7 @@ export declare const ConversationSchema: z.ZodObject<{
367
381
  }[] | null | undefined;
368
382
  conversationUserId?: string | null | undefined;
369
383
  platformMessageId?: string | null | undefined;
384
+ associatedPreferenceType?: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "REPUBLISH" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE" | null | undefined;
370
385
  translation?: {
371
386
  body: string;
372
387
  messageId: string;