controlresell 2.0.11 → 2.1.0

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 (102) hide show
  1. package/package.json +1 -1
  2. package/src/com/controlresell/models/customers/VerifyCustomerRequest.d.ts +9 -0
  3. package/src/com/controlresell/models/customers/VerifyCustomerRequest.js +7 -0
  4. package/src/com/controlresell/models/customers/VerifyCustomerRequest.ts +6 -0
  5. package/src/com/controlresell/models/customers/contracts/Contract.d.ts +4 -4
  6. package/src/com/controlresell/models/customers/contracts/PrepareContractResponse.d.ts +4 -4
  7. package/src/com/controlresell/models/fees/Fee.d.ts +6 -6
  8. package/src/com/controlresell/models/items/CreatedItems.d.ts +86 -86
  9. package/src/com/controlresell/models/items/Item.d.ts +56 -56
  10. package/src/com/controlresell/models/items/ItemPayload.d.ts +2 -2
  11. package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +82 -82
  12. package/src/com/controlresell/models/items/UpdatedItem.d.ts +86 -86
  13. package/src/com/controlresell/models/items/files/ItemFile.d.ts +6 -6
  14. package/src/com/controlresell/models/items/history/ItemHistory.d.ts +2 -2
  15. package/src/com/controlresell/models/items/labels/ItemLabel.d.ts +4 -4
  16. package/src/com/controlresell/models/items/platforms/CreateItemOnPlatformPayload.d.ts +2 -2
  17. package/src/com/controlresell/models/items/platforms/ItemOnPlatform.d.ts +12 -12
  18. package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +82 -82
  19. package/src/com/controlresell/models/items/platforms/UpdateItemOnPlatformPayload.d.ts +2 -2
  20. package/src/com/controlresell/models/metadata/brands/Brand.d.ts +2 -2
  21. package/src/com/controlresell/models/metadata/labels/Label.d.ts +2 -2
  22. package/src/com/controlresell/models/metadata/places/Place.d.ts +2 -2
  23. package/src/com/controlresell/models/platforms/conversations/Conversation.d.ts +144 -50
  24. package/src/com/controlresell/models/platforms/conversations/UserConversations.d.ts +186 -68
  25. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.d.ts +94 -24
  26. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.js +5 -3
  27. package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.ts +5 -3
  28. package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.d.ts +2 -2
  29. package/src/com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages.d.ts +128 -34
  30. package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.d.ts +45 -0
  31. package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.js +10 -0
  32. package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.ts +9 -0
  33. package/src/com/controlresell/models/platforms/conversations/messages/files/ConversationMessageFile.d.ts +48 -0
  34. package/src/com/controlresell/models/platforms/conversations/messages/files/ConversationMessageFile.js +11 -0
  35. package/src/com/controlresell/models/platforms/conversations/messages/files/ConversationMessageFile.ts +10 -0
  36. package/src/com/controlresell/models/platforms/conversations/messages/files/CreateConversationMessageFilePayload.d.ts +12 -0
  37. package/src/com/controlresell/models/platforms/conversations/messages/files/CreateConversationMessageFilePayload.js +8 -0
  38. package/src/com/controlresell/models/platforms/conversations/messages/files/CreateConversationMessageFilePayload.ts +7 -0
  39. package/src/com/controlresell/models/platforms/conversations/messages/files/UpdateConversationMessageFilePayload.d.ts +9 -0
  40. package/src/com/controlresell/models/platforms/conversations/messages/files/UpdateConversationMessageFilePayload.js +7 -0
  41. package/src/com/controlresell/models/platforms/conversations/messages/files/UpdateConversationMessageFilePayload.ts +6 -0
  42. package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationMessageOffer.d.ts +21 -0
  43. package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationMessageOffer.js +12 -0
  44. package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationMessageOffer.ts +11 -0
  45. package/src/com/controlresell/models/platforms/conversations/messages/offers/CreateConversationMessageOfferPayload.d.ts +15 -0
  46. package/src/com/controlresell/models/platforms/conversations/messages/offers/CreateConversationMessageOfferPayload.js +10 -0
  47. package/src/com/controlresell/models/platforms/conversations/messages/offers/CreateConversationMessageOfferPayload.ts +9 -0
  48. package/src/com/controlresell/models/platforms/conversations/messages/offers/UpdateConversationMessageOfferPayload.d.ts +9 -0
  49. package/src/com/controlresell/models/platforms/conversations/messages/offers/UpdateConversationMessageOfferPayload.js +8 -0
  50. package/src/com/controlresell/models/platforms/conversations/messages/offers/UpdateConversationMessageOfferPayload.ts +7 -0
  51. package/src/com/controlresell/models/platforms/conversations/users/ConversationUser.d.ts +4 -4
  52. package/src/com/controlresell/models/platforms/labels/OrderLabel.d.ts +10 -10
  53. package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.d.ts +3 -0
  54. package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.js +1 -0
  55. package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.ts +1 -0
  56. package/src/com/controlresell/models/platforms/orders/Order.d.ts +51 -48
  57. package/src/com/controlresell/models/platforms/orders/Order.js +1 -0
  58. package/src/com/controlresell/models/platforms/orders/Order.ts +1 -0
  59. package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.d.ts +3 -0
  60. package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.js +1 -0
  61. package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.ts +1 -0
  62. package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.d.ts +20 -20
  63. package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.d.ts +1126 -0
  64. package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.js +10 -0
  65. package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.ts +9 -0
  66. package/src/com/controlresell/models/platforms/transactions/CreateTransactionPayload.d.ts +21 -0
  67. package/src/com/controlresell/models/platforms/transactions/CreateTransactionPayload.js +11 -0
  68. package/src/com/controlresell/models/platforms/transactions/CreateTransactionPayload.ts +10 -0
  69. package/src/com/controlresell/models/platforms/transactions/Transaction.d.ts +167 -0
  70. package/src/com/controlresell/models/platforms/transactions/Transaction.js +15 -0
  71. package/src/com/controlresell/models/platforms/transactions/Transaction.ts +14 -0
  72. package/src/com/controlresell/models/platforms/transactions/UpdateTransactionPayload.d.ts +18 -0
  73. package/src/com/controlresell/models/platforms/transactions/UpdateTransactionPayload.js +10 -0
  74. package/src/com/controlresell/models/platforms/transactions/UpdateTransactionPayload.ts +9 -0
  75. package/src/com/controlresell/models/platforms/transactions/items/CreateItemInTransactionPayload.d.ts +9 -0
  76. package/src/com/controlresell/models/platforms/transactions/items/CreateItemInTransactionPayload.js +7 -0
  77. package/src/com/controlresell/models/platforms/transactions/items/CreateItemInTransactionPayload.ts +6 -0
  78. package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.d.ts +102 -0
  79. package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.js +10 -0
  80. package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.ts +9 -0
  81. package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.d.ts +959 -0
  82. package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.js +10 -0
  83. package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.ts +9 -0
  84. package/src/com/controlresell/models/users/UpdateUserPayload.d.ts +2 -2
  85. package/src/com/controlresell/models/users/User.d.ts +2 -2
  86. package/src/com/controlresell/models/users/fields/Field.d.ts +2 -2
  87. package/src/com/controlresell/models/users/fields/FieldsWithData.d.ts +4 -4
  88. package/src/com/controlresell/models/users/files/File.d.ts +2 -2
  89. package/src/com/controlresell/models/users/platforms/CreateUserOnPlatformPayload.d.ts +2 -2
  90. package/src/com/controlresell/models/users/platforms/PlatformAuthRequest.d.ts +8 -8
  91. package/src/com/controlresell/models/users/platforms/PlatformJobUpdate.d.ts +8 -8
  92. package/src/com/controlresell/models/users/platforms/UpdateUserOnPlatformPayload.d.ts +2 -2
  93. package/src/com/controlresell/models/users/platforms/UserOnPlatform.d.ts +4 -4
  94. package/src/index.d.ts +17 -2
  95. package/src/index.js +17 -2
  96. package/src/index.ts +17 -2
  97. package/src/com/controlresell/models/platforms/conversations/messages/{ConversationOfferRequest.d.ts → offers/ConversationOfferRequest.d.ts} +0 -0
  98. package/src/com/controlresell/models/platforms/conversations/messages/{ConversationOfferRequest.js → offers/ConversationOfferRequest.js} +0 -0
  99. package/src/com/controlresell/models/platforms/conversations/messages/{ConversationOfferRequest.ts → offers/ConversationOfferRequest.ts} +0 -0
  100. package/src/com/controlresell/models/{connector → users/platforms}/UserOnPlatformRequest.d.ts +2 -2
  101. /package/src/com/controlresell/models/{connector → users/platforms}/UserOnPlatformRequest.js +0 -0
  102. /package/src/com/controlresell/models/{connector → users/platforms}/UserOnPlatformRequest.ts +0 -0
@@ -15,16 +15,16 @@ export declare const UserConversationsSchema: z.ZodObject<{
15
15
  status: z.ZodEnum<["CONNECTED", "DISCONNECTED", "ERROR"]>;
16
16
  }, "strip", z.ZodTypeAny, {
17
17
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
18
+ userId: string | number;
19
+ name: string;
18
20
  platform: "VINTED" | "SHOPIFY";
19
21
  accountId: string;
20
- name: string;
21
- userId: string | number;
22
22
  }, {
23
23
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
24
+ userId: string | number;
25
+ name: string;
24
26
  platform: "VINTED" | "SHOPIFY";
25
27
  accountId: string;
26
- name: string;
27
- userId: string | number;
28
28
  }>>>;
29
29
  lastMessage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
30
30
  id: z.ZodString;
@@ -33,38 +33,96 @@ export declare const UserConversationsSchema: z.ZodObject<{
33
33
  platformMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
34
34
  type: z.ZodEnum<["MESSAGE", "STATUS_MESSAGE", "ACTION_MESSAGE", "OFFER_REQUEST_MESSAGE", "OFFER_MESSAGE"]>;
35
35
  body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
- files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
36
+ createdAt: z.ZodDate;
37
+ offer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
37
38
  id: z.ZodString;
38
- userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
39
- path: z.ZodString;
40
- signedUrl: z.ZodString;
41
- createdAt: z.ZodDate;
39
+ messageId: z.ZodString;
40
+ price: z.ZodNumber;
41
+ originalPrice: z.ZodNumber;
42
+ status: z.ZodEnum<["PENDING", "ACCEPTED", "REJECTED", "CANCELLED"]>;
42
43
  }, "strip", z.ZodTypeAny, {
43
- path: string;
44
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
44
45
  id: string;
45
- userId: string | number;
46
- createdAt: Date;
47
- signedUrl: string;
46
+ price: number;
47
+ originalPrice: number;
48
+ messageId: string;
48
49
  }, {
49
- path: string;
50
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
50
51
  id: string;
51
- userId: string | number;
52
- createdAt: Date;
53
- signedUrl: string;
52
+ price: number;
53
+ originalPrice: number;
54
+ messageId: string;
55
+ }>>>;
56
+ files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
57
+ fileId: z.ZodString;
58
+ messageId: z.ZodString;
59
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
60
+ file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
61
+ id: z.ZodString;
62
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
63
+ path: z.ZodString;
64
+ signedUrl: z.ZodString;
65
+ createdAt: z.ZodDate;
66
+ }, "strip", z.ZodTypeAny, {
67
+ path: string;
68
+ id: string;
69
+ userId: string | number;
70
+ signedUrl: string;
71
+ createdAt: Date;
72
+ }, {
73
+ path: string;
74
+ id: string;
75
+ userId: string | number;
76
+ signedUrl: string;
77
+ createdAt: Date;
78
+ }>>>;
79
+ }, "strip", z.ZodTypeAny, {
80
+ fileId: string;
81
+ messageId: string;
82
+ file?: {
83
+ path: string;
84
+ id: string;
85
+ userId: string | number;
86
+ signedUrl: string;
87
+ createdAt: Date;
88
+ } | null | undefined;
89
+ index?: number | null | undefined;
90
+ }, {
91
+ fileId: string;
92
+ messageId: string;
93
+ file?: {
94
+ path: string;
95
+ id: string;
96
+ userId: string | number;
97
+ signedUrl: string;
98
+ createdAt: Date;
99
+ } | null | undefined;
100
+ index?: number | null | undefined;
54
101
  }>, "many">>>;
55
- createdAt: z.ZodDate;
56
102
  }, "strip", z.ZodTypeAny, {
57
103
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
58
104
  id: string;
59
105
  createdAt: Date;
60
106
  conversationId: string;
61
107
  body?: string | null | undefined;
62
- files?: {
63
- path: string;
108
+ offer?: {
109
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
64
110
  id: string;
65
- userId: string | number;
66
- createdAt: Date;
67
- signedUrl: string;
111
+ price: number;
112
+ originalPrice: number;
113
+ messageId: string;
114
+ } | null | undefined;
115
+ files?: {
116
+ fileId: string;
117
+ messageId: string;
118
+ file?: {
119
+ path: string;
120
+ id: string;
121
+ userId: string | number;
122
+ signedUrl: string;
123
+ createdAt: Date;
124
+ } | null | undefined;
125
+ index?: number | null | undefined;
68
126
  }[] | null | undefined;
69
127
  conversationUserId?: string | null | undefined;
70
128
  platformMessageId?: string | null | undefined;
@@ -74,12 +132,24 @@ export declare const UserConversationsSchema: z.ZodObject<{
74
132
  createdAt: Date;
75
133
  conversationId: string;
76
134
  body?: string | null | undefined;
77
- files?: {
78
- path: string;
135
+ offer?: {
136
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
79
137
  id: string;
80
- userId: string | number;
81
- createdAt: Date;
82
- signedUrl: string;
138
+ price: number;
139
+ originalPrice: number;
140
+ messageId: string;
141
+ } | null | undefined;
142
+ files?: {
143
+ fileId: string;
144
+ messageId: string;
145
+ file?: {
146
+ path: string;
147
+ id: string;
148
+ userId: string | number;
149
+ signedUrl: string;
150
+ createdAt: Date;
151
+ } | null | undefined;
152
+ index?: number | null | undefined;
83
153
  }[] | null | undefined;
84
154
  conversationUserId?: string | null | undefined;
85
155
  platformMessageId?: string | null | undefined;
@@ -103,14 +173,14 @@ export declare const UserConversationsSchema: z.ZodObject<{
103
173
  path: string;
104
174
  id: string;
105
175
  userId: string | number;
106
- createdAt: Date;
107
176
  signedUrl: string;
177
+ createdAt: Date;
108
178
  }, {
109
179
  path: string;
110
180
  id: string;
111
181
  userId: string | number;
112
- createdAt: Date;
113
182
  signedUrl: string;
183
+ createdAt: Date;
114
184
  }>>>;
115
185
  }, "strip", z.ZodTypeAny, {
116
186
  id: string;
@@ -125,8 +195,8 @@ export declare const UserConversationsSchema: z.ZodObject<{
125
195
  path: string;
126
196
  id: string;
127
197
  userId: string | number;
128
- createdAt: Date;
129
198
  signedUrl: string;
199
+ createdAt: Date;
130
200
  } | null | undefined;
131
201
  }, {
132
202
  id: string;
@@ -141,21 +211,21 @@ export declare const UserConversationsSchema: z.ZodObject<{
141
211
  path: string;
142
212
  id: string;
143
213
  userId: string | number;
144
- createdAt: Date;
145
214
  signedUrl: string;
215
+ createdAt: Date;
146
216
  } | null | undefined;
147
217
  }>, "many">>>;
148
218
  }, "strip", z.ZodTypeAny, {
149
219
  id: string;
150
- accountId: string;
151
220
  updatedAt: Date;
221
+ accountId: string;
152
222
  platformConversationId: string;
153
223
  account?: {
154
224
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
225
+ userId: string | number;
226
+ name: string;
155
227
  platform: "VINTED" | "SHOPIFY";
156
228
  accountId: string;
157
- name: string;
158
- userId: string | number;
159
229
  } | null | undefined;
160
230
  lastMessage?: {
161
231
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
@@ -163,12 +233,24 @@ export declare const UserConversationsSchema: z.ZodObject<{
163
233
  createdAt: Date;
164
234
  conversationId: string;
165
235
  body?: string | null | undefined;
166
- files?: {
167
- path: string;
236
+ offer?: {
237
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
168
238
  id: string;
169
- userId: string | number;
170
- createdAt: Date;
171
- signedUrl: string;
239
+ price: number;
240
+ originalPrice: number;
241
+ messageId: string;
242
+ } | null | undefined;
243
+ files?: {
244
+ fileId: string;
245
+ messageId: string;
246
+ file?: {
247
+ path: string;
248
+ id: string;
249
+ userId: string | number;
250
+ signedUrl: string;
251
+ createdAt: Date;
252
+ } | null | undefined;
253
+ index?: number | null | undefined;
172
254
  }[] | null | undefined;
173
255
  conversationUserId?: string | null | undefined;
174
256
  platformMessageId?: string | null | undefined;
@@ -186,21 +268,21 @@ export declare const UserConversationsSchema: z.ZodObject<{
186
268
  path: string;
187
269
  id: string;
188
270
  userId: string | number;
189
- createdAt: Date;
190
271
  signedUrl: string;
272
+ createdAt: Date;
191
273
  } | null | undefined;
192
274
  }[] | null | undefined;
193
275
  }, {
194
276
  id: string;
195
- accountId: string;
196
277
  updatedAt: Date;
278
+ accountId: string;
197
279
  platformConversationId: string;
198
280
  account?: {
199
281
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
282
+ userId: string | number;
283
+ name: string;
200
284
  platform: "VINTED" | "SHOPIFY";
201
285
  accountId: string;
202
- name: string;
203
- userId: string | number;
204
286
  } | null | undefined;
205
287
  lastMessage?: {
206
288
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
@@ -208,12 +290,24 @@ export declare const UserConversationsSchema: z.ZodObject<{
208
290
  createdAt: Date;
209
291
  conversationId: string;
210
292
  body?: string | null | undefined;
211
- files?: {
212
- path: string;
293
+ offer?: {
294
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
213
295
  id: string;
214
- userId: string | number;
215
- createdAt: Date;
216
- signedUrl: string;
296
+ price: number;
297
+ originalPrice: number;
298
+ messageId: string;
299
+ } | null | undefined;
300
+ files?: {
301
+ fileId: string;
302
+ messageId: string;
303
+ file?: {
304
+ path: string;
305
+ id: string;
306
+ userId: string | number;
307
+ signedUrl: string;
308
+ createdAt: Date;
309
+ } | null | undefined;
310
+ index?: number | null | undefined;
217
311
  }[] | null | undefined;
218
312
  conversationUserId?: string | null | undefined;
219
313
  platformMessageId?: string | null | undefined;
@@ -231,8 +325,8 @@ export declare const UserConversationsSchema: z.ZodObject<{
231
325
  path: string;
232
326
  id: string;
233
327
  userId: string | number;
234
- createdAt: Date;
235
328
  signedUrl: string;
329
+ createdAt: Date;
236
330
  } | null | undefined;
237
331
  }[] | null | undefined;
238
332
  }>, "many">;
@@ -242,15 +336,15 @@ export declare const UserConversationsSchema: z.ZodObject<{
242
336
  count: number;
243
337
  rows: {
244
338
  id: string;
245
- accountId: string;
246
339
  updatedAt: Date;
340
+ accountId: string;
247
341
  platformConversationId: string;
248
342
  account?: {
249
343
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
344
+ userId: string | number;
345
+ name: string;
250
346
  platform: "VINTED" | "SHOPIFY";
251
347
  accountId: string;
252
- name: string;
253
- userId: string | number;
254
348
  } | null | undefined;
255
349
  lastMessage?: {
256
350
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
@@ -258,12 +352,24 @@ export declare const UserConversationsSchema: z.ZodObject<{
258
352
  createdAt: Date;
259
353
  conversationId: string;
260
354
  body?: string | null | undefined;
261
- files?: {
262
- path: string;
355
+ offer?: {
356
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
263
357
  id: string;
264
- userId: string | number;
265
- createdAt: Date;
266
- signedUrl: string;
358
+ price: number;
359
+ originalPrice: number;
360
+ messageId: string;
361
+ } | null | undefined;
362
+ files?: {
363
+ fileId: string;
364
+ messageId: string;
365
+ file?: {
366
+ path: string;
367
+ id: string;
368
+ userId: string | number;
369
+ signedUrl: string;
370
+ createdAt: Date;
371
+ } | null | undefined;
372
+ index?: number | null | undefined;
267
373
  }[] | null | undefined;
268
374
  conversationUserId?: string | null | undefined;
269
375
  platformMessageId?: string | null | undefined;
@@ -281,8 +387,8 @@ export declare const UserConversationsSchema: z.ZodObject<{
281
387
  path: string;
282
388
  id: string;
283
389
  userId: string | number;
284
- createdAt: Date;
285
390
  signedUrl: string;
391
+ createdAt: Date;
286
392
  } | null | undefined;
287
393
  }[] | null | undefined;
288
394
  }[];
@@ -293,15 +399,15 @@ export declare const UserConversationsSchema: z.ZodObject<{
293
399
  count: number;
294
400
  rows: {
295
401
  id: string;
296
- accountId: string;
297
402
  updatedAt: Date;
403
+ accountId: string;
298
404
  platformConversationId: string;
299
405
  account?: {
300
406
  status: "ERROR" | "CONNECTED" | "DISCONNECTED";
407
+ userId: string | number;
408
+ name: string;
301
409
  platform: "VINTED" | "SHOPIFY";
302
410
  accountId: string;
303
- name: string;
304
- userId: string | number;
305
411
  } | null | undefined;
306
412
  lastMessage?: {
307
413
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
@@ -309,12 +415,24 @@ export declare const UserConversationsSchema: z.ZodObject<{
309
415
  createdAt: Date;
310
416
  conversationId: string;
311
417
  body?: string | null | undefined;
312
- files?: {
313
- path: string;
418
+ offer?: {
419
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
314
420
  id: string;
315
- userId: string | number;
316
- createdAt: Date;
317
- signedUrl: string;
421
+ price: number;
422
+ originalPrice: number;
423
+ messageId: string;
424
+ } | null | undefined;
425
+ files?: {
426
+ fileId: string;
427
+ messageId: string;
428
+ file?: {
429
+ path: string;
430
+ id: string;
431
+ userId: string | number;
432
+ signedUrl: string;
433
+ createdAt: Date;
434
+ } | null | undefined;
435
+ index?: number | null | undefined;
318
436
  }[] | null | undefined;
319
437
  conversationUserId?: string | null | undefined;
320
438
  platformMessageId?: string | null | undefined;
@@ -332,8 +450,8 @@ export declare const UserConversationsSchema: z.ZodObject<{
332
450
  path: string;
333
451
  id: string;
334
452
  userId: string | number;
335
- createdAt: Date;
336
453
  signedUrl: string;
454
+ createdAt: Date;
337
455
  } | null | undefined;
338
456
  }[] | null | undefined;
339
457
  }[];
@@ -6,38 +6,96 @@ export declare const ConversationMessageSchema: z.ZodObject<{
6
6
  platformMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
7
7
  type: z.ZodEnum<["MESSAGE", "STATUS_MESSAGE", "ACTION_MESSAGE", "OFFER_REQUEST_MESSAGE", "OFFER_MESSAGE"]>;
8
8
  body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
- files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
9
+ createdAt: z.ZodDate;
10
+ offer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
10
11
  id: z.ZodString;
11
- userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
12
- path: z.ZodString;
13
- signedUrl: z.ZodString;
14
- createdAt: z.ZodDate;
12
+ messageId: z.ZodString;
13
+ price: z.ZodNumber;
14
+ originalPrice: z.ZodNumber;
15
+ status: z.ZodEnum<["PENDING", "ACCEPTED", "REJECTED", "CANCELLED"]>;
15
16
  }, "strip", z.ZodTypeAny, {
16
- path: string;
17
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
17
18
  id: string;
18
- userId: string | number;
19
- createdAt: Date;
20
- signedUrl: string;
19
+ price: number;
20
+ originalPrice: number;
21
+ messageId: string;
21
22
  }, {
22
- path: string;
23
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
23
24
  id: string;
24
- userId: string | number;
25
- createdAt: Date;
26
- signedUrl: string;
25
+ price: number;
26
+ originalPrice: number;
27
+ messageId: string;
28
+ }>>>;
29
+ files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
30
+ fileId: z.ZodString;
31
+ messageId: z.ZodString;
32
+ index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
+ file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
34
+ id: z.ZodString;
35
+ userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
36
+ path: z.ZodString;
37
+ signedUrl: z.ZodString;
38
+ createdAt: z.ZodDate;
39
+ }, "strip", z.ZodTypeAny, {
40
+ path: string;
41
+ id: string;
42
+ userId: string | number;
43
+ signedUrl: string;
44
+ createdAt: Date;
45
+ }, {
46
+ path: string;
47
+ id: string;
48
+ userId: string | number;
49
+ signedUrl: string;
50
+ createdAt: Date;
51
+ }>>>;
52
+ }, "strip", z.ZodTypeAny, {
53
+ fileId: string;
54
+ messageId: string;
55
+ file?: {
56
+ path: string;
57
+ id: string;
58
+ userId: string | number;
59
+ signedUrl: string;
60
+ createdAt: Date;
61
+ } | null | undefined;
62
+ index?: number | null | undefined;
63
+ }, {
64
+ fileId: string;
65
+ messageId: string;
66
+ file?: {
67
+ path: string;
68
+ id: string;
69
+ userId: string | number;
70
+ signedUrl: string;
71
+ createdAt: Date;
72
+ } | null | undefined;
73
+ index?: number | null | undefined;
27
74
  }>, "many">>>;
28
- createdAt: z.ZodDate;
29
75
  }, "strip", z.ZodTypeAny, {
30
76
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
31
77
  id: string;
32
78
  createdAt: Date;
33
79
  conversationId: string;
34
80
  body?: string | null | undefined;
35
- files?: {
36
- path: string;
81
+ offer?: {
82
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
37
83
  id: string;
38
- userId: string | number;
39
- createdAt: Date;
40
- signedUrl: string;
84
+ price: number;
85
+ originalPrice: number;
86
+ messageId: string;
87
+ } | null | undefined;
88
+ files?: {
89
+ fileId: string;
90
+ messageId: string;
91
+ file?: {
92
+ path: string;
93
+ id: string;
94
+ userId: string | number;
95
+ signedUrl: string;
96
+ createdAt: Date;
97
+ } | null | undefined;
98
+ index?: number | null | undefined;
41
99
  }[] | null | undefined;
42
100
  conversationUserId?: string | null | undefined;
43
101
  platformMessageId?: string | null | undefined;
@@ -47,12 +105,24 @@ export declare const ConversationMessageSchema: z.ZodObject<{
47
105
  createdAt: Date;
48
106
  conversationId: string;
49
107
  body?: string | null | undefined;
50
- files?: {
51
- path: string;
108
+ offer?: {
109
+ status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
52
110
  id: string;
53
- userId: string | number;
54
- createdAt: Date;
55
- signedUrl: string;
111
+ price: number;
112
+ originalPrice: number;
113
+ messageId: string;
114
+ } | null | undefined;
115
+ files?: {
116
+ fileId: string;
117
+ messageId: string;
118
+ file?: {
119
+ path: string;
120
+ id: string;
121
+ userId: string | number;
122
+ signedUrl: string;
123
+ createdAt: Date;
124
+ } | null | undefined;
125
+ index?: number | null | undefined;
56
126
  }[] | null | undefined;
57
127
  conversationUserId?: string | null | undefined;
58
128
  platformMessageId?: string | null | undefined;
@@ -3,7 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ConversationMessageSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const controlresell_connector_1 = require("controlresell-connector");
6
- const File_1 = require("../../../users/files/File");
6
+ const ConversationMessageOffer_1 = require("./offers/ConversationMessageOffer");
7
+ const ConversationMessageFile_1 = require("./files/ConversationMessageFile");
7
8
  exports.ConversationMessageSchema = zod_1.z.object({
8
9
  id: zod_1.z.string().uuid(),
9
10
  conversationId: zod_1.z.string().uuid(),
@@ -11,6 +12,7 @@ exports.ConversationMessageSchema = zod_1.z.object({
11
12
  platformMessageId: zod_1.z.string().nullish(),
12
13
  type: controlresell_connector_1.JobConversationMessageTypeSchema,
13
14
  body: zod_1.z.string().nullish(),
14
- files: zod_1.z.array(File_1.FileSchema).nullish(),
15
- createdAt: zod_1.z.coerce.date()
15
+ createdAt: zod_1.z.coerce.date(),
16
+ offer: ConversationMessageOffer_1.ConversationMessageOfferSchema.nullish(),
17
+ files: zod_1.z.array(ConversationMessageFile_1.ConversationMessageFileSchema).nullish()
16
18
  });
@@ -1,6 +1,7 @@
1
1
  import {z} from "zod"
2
2
  import {JobConversationMessageTypeSchema} from "controlresell-connector"
3
- import {FileSchema} from "../../../users/files/File"
3
+ import {ConversationMessageOfferSchema} from "./offers/ConversationMessageOffer"
4
+ import {ConversationMessageFileSchema} from "./files/ConversationMessageFile"
4
5
 
5
6
  export const ConversationMessageSchema = z.object({
6
7
  id: z.string().uuid(),
@@ -9,7 +10,8 @@ export const ConversationMessageSchema = z.object({
9
10
  platformMessageId: z.string().nullish(),
10
11
  type: JobConversationMessageTypeSchema,
11
12
  body: z.string().nullish(),
12
- files: z.array(FileSchema).nullish(),
13
- createdAt: z.coerce.date()
13
+ createdAt: z.coerce.date(),
14
+ offer: ConversationMessageOfferSchema.nullish(),
15
+ files: z.array(ConversationMessageFileSchema).nullish()
14
16
  })
15
17
  export type ConversationMessage = z.infer<typeof ConversationMessageSchema>
@@ -7,14 +7,14 @@ export declare const CreateConversationMessagePayloadSchema: z.ZodObject<{
7
7
  createdAt: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
8
8
  }, "strip", z.ZodTypeAny, {
9
9
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
10
- body?: string | null | undefined;
11
10
  createdAt?: Date | null | undefined;
11
+ body?: string | null | undefined;
12
12
  conversationUserId?: string | null | undefined;
13
13
  platformMessageId?: string | null | undefined;
14
14
  }, {
15
15
  type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
16
- body?: string | null | undefined;
17
16
  createdAt?: Date | null | undefined;
17
+ body?: string | null | undefined;
18
18
  conversationUserId?: string | null | undefined;
19
19
  platformMessageId?: string | null | undefined;
20
20
  }>;