controlresell 2.0.8 → 2.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/com/controlresell/models/platforms/conversations/Conversation.d.ts +128 -0
- package/src/com/controlresell/models/platforms/conversations/Conversation.js +5 -1
- package/src/com/controlresell/models/platforms/conversations/Conversation.ts +5 -1
- package/src/com/controlresell/models/platforms/conversations/UserConversations.d.ts +176 -0
- package/src/com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages.d.ts +105 -0
- package/src/com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages.js +11 -0
- package/src/com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages.ts +10 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -4,6 +4,25 @@ export declare const ConversationSchema: z.ZodObject<{
|
|
|
4
4
|
accountId: z.ZodString;
|
|
5
5
|
platformConversationId: z.ZodString;
|
|
6
6
|
updatedAt: z.ZodDate;
|
|
7
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
8
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
9
|
+
accountId: z.ZodString;
|
|
10
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
status: z.ZodEnum<["CONNECTED", "DISCONNECTED", "ERROR"]>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
15
|
+
platform: "VINTED" | "SHOPIFY";
|
|
16
|
+
accountId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
userId: string | number;
|
|
19
|
+
}, {
|
|
20
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
21
|
+
platform: "VINTED" | "SHOPIFY";
|
|
22
|
+
accountId: string;
|
|
23
|
+
name: string;
|
|
24
|
+
userId: string | number;
|
|
25
|
+
}>>>;
|
|
7
26
|
lastMessage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
8
27
|
id: z.ZodString;
|
|
9
28
|
conversationId: z.ZodString;
|
|
@@ -62,11 +81,79 @@ export declare const ConversationSchema: z.ZodObject<{
|
|
|
62
81
|
signedUrl: string;
|
|
63
82
|
}[] | null | undefined;
|
|
64
83
|
}>>>;
|
|
84
|
+
users: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
85
|
+
id: z.ZodString;
|
|
86
|
+
platformUserId: z.ZodString;
|
|
87
|
+
conversationId: z.ZodString;
|
|
88
|
+
login: z.ZodString;
|
|
89
|
+
location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
90
|
+
reviewCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
91
|
+
reviewValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
92
|
+
photoFileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
photoFile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
94
|
+
id: z.ZodString;
|
|
95
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
96
|
+
path: z.ZodString;
|
|
97
|
+
signedUrl: z.ZodString;
|
|
98
|
+
createdAt: z.ZodDate;
|
|
99
|
+
}, "strip", z.ZodTypeAny, {
|
|
100
|
+
path: string;
|
|
101
|
+
id: string;
|
|
102
|
+
userId: string | number;
|
|
103
|
+
createdAt: Date;
|
|
104
|
+
signedUrl: string;
|
|
105
|
+
}, {
|
|
106
|
+
path: string;
|
|
107
|
+
id: string;
|
|
108
|
+
userId: string | number;
|
|
109
|
+
createdAt: Date;
|
|
110
|
+
signedUrl: string;
|
|
111
|
+
}>>>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
id: string;
|
|
114
|
+
login: string;
|
|
115
|
+
conversationId: string;
|
|
116
|
+
platformUserId: string;
|
|
117
|
+
reviewCount?: number | null | undefined;
|
|
118
|
+
reviewValue?: number | null | undefined;
|
|
119
|
+
location?: string | null | undefined;
|
|
120
|
+
photoFileId?: string | null | undefined;
|
|
121
|
+
photoFile?: {
|
|
122
|
+
path: string;
|
|
123
|
+
id: string;
|
|
124
|
+
userId: string | number;
|
|
125
|
+
createdAt: Date;
|
|
126
|
+
signedUrl: string;
|
|
127
|
+
} | null | undefined;
|
|
128
|
+
}, {
|
|
129
|
+
id: string;
|
|
130
|
+
login: string;
|
|
131
|
+
conversationId: string;
|
|
132
|
+
platformUserId: string;
|
|
133
|
+
reviewCount?: number | null | undefined;
|
|
134
|
+
reviewValue?: number | null | undefined;
|
|
135
|
+
location?: string | null | undefined;
|
|
136
|
+
photoFileId?: string | null | undefined;
|
|
137
|
+
photoFile?: {
|
|
138
|
+
path: string;
|
|
139
|
+
id: string;
|
|
140
|
+
userId: string | number;
|
|
141
|
+
createdAt: Date;
|
|
142
|
+
signedUrl: string;
|
|
143
|
+
} | null | undefined;
|
|
144
|
+
}>, "many">>>;
|
|
65
145
|
}, "strip", z.ZodTypeAny, {
|
|
66
146
|
id: string;
|
|
67
147
|
accountId: string;
|
|
68
148
|
updatedAt: Date;
|
|
69
149
|
platformConversationId: string;
|
|
150
|
+
account?: {
|
|
151
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
152
|
+
platform: "VINTED" | "SHOPIFY";
|
|
153
|
+
accountId: string;
|
|
154
|
+
name: string;
|
|
155
|
+
userId: string | number;
|
|
156
|
+
} | null | undefined;
|
|
70
157
|
lastMessage?: {
|
|
71
158
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
72
159
|
id: string;
|
|
@@ -83,11 +170,35 @@ export declare const ConversationSchema: z.ZodObject<{
|
|
|
83
170
|
signedUrl: string;
|
|
84
171
|
}[] | null | undefined;
|
|
85
172
|
} | null | undefined;
|
|
173
|
+
users?: {
|
|
174
|
+
id: string;
|
|
175
|
+
login: string;
|
|
176
|
+
conversationId: string;
|
|
177
|
+
platformUserId: string;
|
|
178
|
+
reviewCount?: number | null | undefined;
|
|
179
|
+
reviewValue?: number | null | undefined;
|
|
180
|
+
location?: string | null | undefined;
|
|
181
|
+
photoFileId?: string | null | undefined;
|
|
182
|
+
photoFile?: {
|
|
183
|
+
path: string;
|
|
184
|
+
id: string;
|
|
185
|
+
userId: string | number;
|
|
186
|
+
createdAt: Date;
|
|
187
|
+
signedUrl: string;
|
|
188
|
+
} | null | undefined;
|
|
189
|
+
}[] | null | undefined;
|
|
86
190
|
}, {
|
|
87
191
|
id: string;
|
|
88
192
|
accountId: string;
|
|
89
193
|
updatedAt: Date;
|
|
90
194
|
platformConversationId: string;
|
|
195
|
+
account?: {
|
|
196
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
197
|
+
platform: "VINTED" | "SHOPIFY";
|
|
198
|
+
accountId: string;
|
|
199
|
+
name: string;
|
|
200
|
+
userId: string | number;
|
|
201
|
+
} | null | undefined;
|
|
91
202
|
lastMessage?: {
|
|
92
203
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
93
204
|
id: string;
|
|
@@ -104,5 +215,22 @@ export declare const ConversationSchema: z.ZodObject<{
|
|
|
104
215
|
signedUrl: string;
|
|
105
216
|
}[] | null | undefined;
|
|
106
217
|
} | null | undefined;
|
|
218
|
+
users?: {
|
|
219
|
+
id: string;
|
|
220
|
+
login: string;
|
|
221
|
+
conversationId: string;
|
|
222
|
+
platformUserId: string;
|
|
223
|
+
reviewCount?: number | null | undefined;
|
|
224
|
+
reviewValue?: number | null | undefined;
|
|
225
|
+
location?: string | null | undefined;
|
|
226
|
+
photoFileId?: string | null | undefined;
|
|
227
|
+
photoFile?: {
|
|
228
|
+
path: string;
|
|
229
|
+
id: string;
|
|
230
|
+
userId: string | number;
|
|
231
|
+
createdAt: Date;
|
|
232
|
+
signedUrl: string;
|
|
233
|
+
} | null | undefined;
|
|
234
|
+
}[] | null | undefined;
|
|
107
235
|
}>;
|
|
108
236
|
export type Conversation = z.infer<typeof ConversationSchema>;
|
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ConversationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const UserOnPlatform_1 = require("../../users/platforms/UserOnPlatform");
|
|
5
6
|
const ConversationMessage_1 = require("./messages/ConversationMessage");
|
|
7
|
+
const ConversationUser_1 = require("./users/ConversationUser");
|
|
6
8
|
exports.ConversationSchema = zod_1.z.object({
|
|
7
9
|
id: zod_1.z.string().uuid(),
|
|
8
10
|
accountId: zod_1.z.string().uuid(),
|
|
9
11
|
platformConversationId: zod_1.z.string(),
|
|
10
12
|
updatedAt: zod_1.z.coerce.date(),
|
|
11
|
-
|
|
13
|
+
account: UserOnPlatform_1.UserOnPlatformSchema.nullish(),
|
|
14
|
+
lastMessage: ConversationMessage_1.ConversationMessageSchema.nullish(),
|
|
15
|
+
users: zod_1.z.array(ConversationUser_1.ConversationUserSchema).nullish()
|
|
12
16
|
});
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
+
import {UserOnPlatformSchema} from "../../users/platforms/UserOnPlatform"
|
|
2
3
|
import {ConversationMessageSchema} from "./messages/ConversationMessage"
|
|
4
|
+
import {ConversationUserSchema} from "./users/ConversationUser"
|
|
3
5
|
|
|
4
6
|
export const ConversationSchema = z.object({
|
|
5
7
|
id: z.string().uuid(),
|
|
6
8
|
accountId: z.string().uuid(),
|
|
7
9
|
platformConversationId: z.string(),
|
|
8
10
|
updatedAt: z.coerce.date(),
|
|
9
|
-
|
|
11
|
+
account: UserOnPlatformSchema.nullish(),
|
|
12
|
+
lastMessage: ConversationMessageSchema.nullish(),
|
|
13
|
+
users: z.array(ConversationUserSchema).nullish()
|
|
10
14
|
})
|
|
11
15
|
export type Conversation = z.infer<typeof ConversationSchema>
|
|
@@ -7,6 +7,25 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
7
7
|
accountId: z.ZodString;
|
|
8
8
|
platformConversationId: z.ZodString;
|
|
9
9
|
updatedAt: z.ZodDate;
|
|
10
|
+
account: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
11
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
12
|
+
accountId: z.ZodString;
|
|
13
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
status: z.ZodEnum<["CONNECTED", "DISCONNECTED", "ERROR"]>;
|
|
16
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
18
|
+
platform: "VINTED" | "SHOPIFY";
|
|
19
|
+
accountId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
userId: string | number;
|
|
22
|
+
}, {
|
|
23
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
24
|
+
platform: "VINTED" | "SHOPIFY";
|
|
25
|
+
accountId: string;
|
|
26
|
+
name: string;
|
|
27
|
+
userId: string | number;
|
|
28
|
+
}>>>;
|
|
10
29
|
lastMessage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
11
30
|
id: z.ZodString;
|
|
12
31
|
conversationId: z.ZodString;
|
|
@@ -65,11 +84,79 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
65
84
|
signedUrl: string;
|
|
66
85
|
}[] | null | undefined;
|
|
67
86
|
}>>>;
|
|
87
|
+
users: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
88
|
+
id: z.ZodString;
|
|
89
|
+
platformUserId: z.ZodString;
|
|
90
|
+
conversationId: z.ZodString;
|
|
91
|
+
login: z.ZodString;
|
|
92
|
+
location: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
93
|
+
reviewCount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
94
|
+
reviewValue: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
95
|
+
photoFileId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
96
|
+
photoFile: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
97
|
+
id: z.ZodString;
|
|
98
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
99
|
+
path: z.ZodString;
|
|
100
|
+
signedUrl: z.ZodString;
|
|
101
|
+
createdAt: z.ZodDate;
|
|
102
|
+
}, "strip", z.ZodTypeAny, {
|
|
103
|
+
path: string;
|
|
104
|
+
id: string;
|
|
105
|
+
userId: string | number;
|
|
106
|
+
createdAt: Date;
|
|
107
|
+
signedUrl: string;
|
|
108
|
+
}, {
|
|
109
|
+
path: string;
|
|
110
|
+
id: string;
|
|
111
|
+
userId: string | number;
|
|
112
|
+
createdAt: Date;
|
|
113
|
+
signedUrl: string;
|
|
114
|
+
}>>>;
|
|
115
|
+
}, "strip", z.ZodTypeAny, {
|
|
116
|
+
id: string;
|
|
117
|
+
login: string;
|
|
118
|
+
conversationId: string;
|
|
119
|
+
platformUserId: string;
|
|
120
|
+
reviewCount?: number | null | undefined;
|
|
121
|
+
reviewValue?: number | null | undefined;
|
|
122
|
+
location?: string | null | undefined;
|
|
123
|
+
photoFileId?: string | null | undefined;
|
|
124
|
+
photoFile?: {
|
|
125
|
+
path: string;
|
|
126
|
+
id: string;
|
|
127
|
+
userId: string | number;
|
|
128
|
+
createdAt: Date;
|
|
129
|
+
signedUrl: string;
|
|
130
|
+
} | null | undefined;
|
|
131
|
+
}, {
|
|
132
|
+
id: string;
|
|
133
|
+
login: string;
|
|
134
|
+
conversationId: string;
|
|
135
|
+
platformUserId: string;
|
|
136
|
+
reviewCount?: number | null | undefined;
|
|
137
|
+
reviewValue?: number | null | undefined;
|
|
138
|
+
location?: string | null | undefined;
|
|
139
|
+
photoFileId?: string | null | undefined;
|
|
140
|
+
photoFile?: {
|
|
141
|
+
path: string;
|
|
142
|
+
id: string;
|
|
143
|
+
userId: string | number;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
signedUrl: string;
|
|
146
|
+
} | null | undefined;
|
|
147
|
+
}>, "many">>>;
|
|
68
148
|
}, "strip", z.ZodTypeAny, {
|
|
69
149
|
id: string;
|
|
70
150
|
accountId: string;
|
|
71
151
|
updatedAt: Date;
|
|
72
152
|
platformConversationId: string;
|
|
153
|
+
account?: {
|
|
154
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
155
|
+
platform: "VINTED" | "SHOPIFY";
|
|
156
|
+
accountId: string;
|
|
157
|
+
name: string;
|
|
158
|
+
userId: string | number;
|
|
159
|
+
} | null | undefined;
|
|
73
160
|
lastMessage?: {
|
|
74
161
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
75
162
|
id: string;
|
|
@@ -86,11 +173,35 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
86
173
|
signedUrl: string;
|
|
87
174
|
}[] | null | undefined;
|
|
88
175
|
} | null | undefined;
|
|
176
|
+
users?: {
|
|
177
|
+
id: string;
|
|
178
|
+
login: string;
|
|
179
|
+
conversationId: string;
|
|
180
|
+
platformUserId: string;
|
|
181
|
+
reviewCount?: number | null | undefined;
|
|
182
|
+
reviewValue?: number | null | undefined;
|
|
183
|
+
location?: string | null | undefined;
|
|
184
|
+
photoFileId?: string | null | undefined;
|
|
185
|
+
photoFile?: {
|
|
186
|
+
path: string;
|
|
187
|
+
id: string;
|
|
188
|
+
userId: string | number;
|
|
189
|
+
createdAt: Date;
|
|
190
|
+
signedUrl: string;
|
|
191
|
+
} | null | undefined;
|
|
192
|
+
}[] | null | undefined;
|
|
89
193
|
}, {
|
|
90
194
|
id: string;
|
|
91
195
|
accountId: string;
|
|
92
196
|
updatedAt: Date;
|
|
93
197
|
platformConversationId: string;
|
|
198
|
+
account?: {
|
|
199
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
200
|
+
platform: "VINTED" | "SHOPIFY";
|
|
201
|
+
accountId: string;
|
|
202
|
+
name: string;
|
|
203
|
+
userId: string | number;
|
|
204
|
+
} | null | undefined;
|
|
94
205
|
lastMessage?: {
|
|
95
206
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
96
207
|
id: string;
|
|
@@ -107,6 +218,23 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
107
218
|
signedUrl: string;
|
|
108
219
|
}[] | null | undefined;
|
|
109
220
|
} | null | undefined;
|
|
221
|
+
users?: {
|
|
222
|
+
id: string;
|
|
223
|
+
login: string;
|
|
224
|
+
conversationId: string;
|
|
225
|
+
platformUserId: string;
|
|
226
|
+
reviewCount?: number | null | undefined;
|
|
227
|
+
reviewValue?: number | null | undefined;
|
|
228
|
+
location?: string | null | undefined;
|
|
229
|
+
photoFileId?: string | null | undefined;
|
|
230
|
+
photoFile?: {
|
|
231
|
+
path: string;
|
|
232
|
+
id: string;
|
|
233
|
+
userId: string | number;
|
|
234
|
+
createdAt: Date;
|
|
235
|
+
signedUrl: string;
|
|
236
|
+
} | null | undefined;
|
|
237
|
+
}[] | null | undefined;
|
|
110
238
|
}>, "many">;
|
|
111
239
|
currentPage: z.ZodNumber;
|
|
112
240
|
totalPages: z.ZodNumber;
|
|
@@ -117,6 +245,13 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
117
245
|
accountId: string;
|
|
118
246
|
updatedAt: Date;
|
|
119
247
|
platformConversationId: string;
|
|
248
|
+
account?: {
|
|
249
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
250
|
+
platform: "VINTED" | "SHOPIFY";
|
|
251
|
+
accountId: string;
|
|
252
|
+
name: string;
|
|
253
|
+
userId: string | number;
|
|
254
|
+
} | null | undefined;
|
|
120
255
|
lastMessage?: {
|
|
121
256
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
122
257
|
id: string;
|
|
@@ -133,6 +268,23 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
133
268
|
signedUrl: string;
|
|
134
269
|
}[] | null | undefined;
|
|
135
270
|
} | null | undefined;
|
|
271
|
+
users?: {
|
|
272
|
+
id: string;
|
|
273
|
+
login: string;
|
|
274
|
+
conversationId: string;
|
|
275
|
+
platformUserId: string;
|
|
276
|
+
reviewCount?: number | null | undefined;
|
|
277
|
+
reviewValue?: number | null | undefined;
|
|
278
|
+
location?: string | null | undefined;
|
|
279
|
+
photoFileId?: string | null | undefined;
|
|
280
|
+
photoFile?: {
|
|
281
|
+
path: string;
|
|
282
|
+
id: string;
|
|
283
|
+
userId: string | number;
|
|
284
|
+
createdAt: Date;
|
|
285
|
+
signedUrl: string;
|
|
286
|
+
} | null | undefined;
|
|
287
|
+
}[] | null | undefined;
|
|
136
288
|
}[];
|
|
137
289
|
currentPage: number;
|
|
138
290
|
totalPages: number;
|
|
@@ -144,6 +296,13 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
144
296
|
accountId: string;
|
|
145
297
|
updatedAt: Date;
|
|
146
298
|
platformConversationId: string;
|
|
299
|
+
account?: {
|
|
300
|
+
status: "ERROR" | "CONNECTED" | "DISCONNECTED";
|
|
301
|
+
platform: "VINTED" | "SHOPIFY";
|
|
302
|
+
accountId: string;
|
|
303
|
+
name: string;
|
|
304
|
+
userId: string | number;
|
|
305
|
+
} | null | undefined;
|
|
147
306
|
lastMessage?: {
|
|
148
307
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
149
308
|
id: string;
|
|
@@ -160,6 +319,23 @@ export declare const UserConversationsSchema: z.ZodObject<{
|
|
|
160
319
|
signedUrl: string;
|
|
161
320
|
}[] | null | undefined;
|
|
162
321
|
} | null | undefined;
|
|
322
|
+
users?: {
|
|
323
|
+
id: string;
|
|
324
|
+
login: string;
|
|
325
|
+
conversationId: string;
|
|
326
|
+
platformUserId: string;
|
|
327
|
+
reviewCount?: number | null | undefined;
|
|
328
|
+
reviewValue?: number | null | undefined;
|
|
329
|
+
location?: string | null | undefined;
|
|
330
|
+
photoFileId?: string | null | undefined;
|
|
331
|
+
photoFile?: {
|
|
332
|
+
path: string;
|
|
333
|
+
id: string;
|
|
334
|
+
userId: string | number;
|
|
335
|
+
createdAt: Date;
|
|
336
|
+
signedUrl: string;
|
|
337
|
+
} | null | undefined;
|
|
338
|
+
}[] | null | undefined;
|
|
163
339
|
}[];
|
|
164
340
|
currentPage: number;
|
|
165
341
|
totalPages: number;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PaginatedConversationMessagesSchema: z.ZodObject<{
|
|
3
|
+
count: z.ZodNumber;
|
|
4
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
conversationId: z.ZodString;
|
|
7
|
+
conversationUserId: z.ZodString;
|
|
8
|
+
platformMessageId: z.ZodString;
|
|
9
|
+
type: z.ZodEnum<["MESSAGE", "STATUS_MESSAGE", "ACTION_MESSAGE", "OFFER_REQUEST_MESSAGE", "OFFER_MESSAGE"]>;
|
|
10
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
+
files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
12
|
+
id: z.ZodString;
|
|
13
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
14
|
+
path: z.ZodString;
|
|
15
|
+
signedUrl: z.ZodString;
|
|
16
|
+
createdAt: z.ZodDate;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
path: string;
|
|
19
|
+
id: string;
|
|
20
|
+
userId: string | number;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
signedUrl: string;
|
|
23
|
+
}, {
|
|
24
|
+
path: string;
|
|
25
|
+
id: string;
|
|
26
|
+
userId: string | number;
|
|
27
|
+
createdAt: Date;
|
|
28
|
+
signedUrl: string;
|
|
29
|
+
}>, "many">>>;
|
|
30
|
+
createdAt: z.ZodDate;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
33
|
+
id: string;
|
|
34
|
+
createdAt: Date;
|
|
35
|
+
conversationId: string;
|
|
36
|
+
conversationUserId: string;
|
|
37
|
+
platformMessageId: string;
|
|
38
|
+
body?: string | null | undefined;
|
|
39
|
+
files?: {
|
|
40
|
+
path: string;
|
|
41
|
+
id: string;
|
|
42
|
+
userId: string | number;
|
|
43
|
+
createdAt: Date;
|
|
44
|
+
signedUrl: string;
|
|
45
|
+
}[] | null | undefined;
|
|
46
|
+
}, {
|
|
47
|
+
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
48
|
+
id: string;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
conversationId: string;
|
|
51
|
+
conversationUserId: string;
|
|
52
|
+
platformMessageId: string;
|
|
53
|
+
body?: string | null | undefined;
|
|
54
|
+
files?: {
|
|
55
|
+
path: string;
|
|
56
|
+
id: string;
|
|
57
|
+
userId: string | number;
|
|
58
|
+
createdAt: Date;
|
|
59
|
+
signedUrl: string;
|
|
60
|
+
}[] | null | undefined;
|
|
61
|
+
}>, "many">;
|
|
62
|
+
currentPage: z.ZodNumber;
|
|
63
|
+
totalPages: z.ZodNumber;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
count: number;
|
|
66
|
+
rows: {
|
|
67
|
+
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
68
|
+
id: string;
|
|
69
|
+
createdAt: Date;
|
|
70
|
+
conversationId: string;
|
|
71
|
+
conversationUserId: string;
|
|
72
|
+
platformMessageId: string;
|
|
73
|
+
body?: string | null | undefined;
|
|
74
|
+
files?: {
|
|
75
|
+
path: string;
|
|
76
|
+
id: string;
|
|
77
|
+
userId: string | number;
|
|
78
|
+
createdAt: Date;
|
|
79
|
+
signedUrl: string;
|
|
80
|
+
}[] | null | undefined;
|
|
81
|
+
}[];
|
|
82
|
+
currentPage: number;
|
|
83
|
+
totalPages: number;
|
|
84
|
+
}, {
|
|
85
|
+
count: number;
|
|
86
|
+
rows: {
|
|
87
|
+
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
88
|
+
id: string;
|
|
89
|
+
createdAt: Date;
|
|
90
|
+
conversationId: string;
|
|
91
|
+
conversationUserId: string;
|
|
92
|
+
platformMessageId: string;
|
|
93
|
+
body?: string | null | undefined;
|
|
94
|
+
files?: {
|
|
95
|
+
path: string;
|
|
96
|
+
id: string;
|
|
97
|
+
userId: string | number;
|
|
98
|
+
createdAt: Date;
|
|
99
|
+
signedUrl: string;
|
|
100
|
+
}[] | null | undefined;
|
|
101
|
+
}[];
|
|
102
|
+
currentPage: number;
|
|
103
|
+
totalPages: number;
|
|
104
|
+
}>;
|
|
105
|
+
export type PaginatedConversationMessages = z.infer<typeof PaginatedConversationMessagesSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PaginatedConversationMessagesSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const ConversationMessage_1 = require("./ConversationMessage");
|
|
6
|
+
exports.PaginatedConversationMessagesSchema = zod_1.z.object({
|
|
7
|
+
count: zod_1.z.number(),
|
|
8
|
+
rows: zod_1.z.array(ConversationMessage_1.ConversationMessageSchema),
|
|
9
|
+
currentPage: zod_1.z.number(),
|
|
10
|
+
totalPages: zod_1.z.number()
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {ConversationMessageSchema} from "./ConversationMessage"
|
|
3
|
+
|
|
4
|
+
export const PaginatedConversationMessagesSchema = z.object({
|
|
5
|
+
count: z.number(),
|
|
6
|
+
rows: z.array(ConversationMessageSchema),
|
|
7
|
+
currentPage: z.number(),
|
|
8
|
+
totalPages: z.number()
|
|
9
|
+
})
|
|
10
|
+
export type PaginatedConversationMessages = z.infer<typeof PaginatedConversationMessagesSchema>
|
package/src/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from "./com/controlresell/models/platforms/conversations/UpdateConversa
|
|
|
68
68
|
export * from "./com/controlresell/models/platforms/conversations/UserConversations";
|
|
69
69
|
export * from "./com/controlresell/models/platforms/conversations/messages/ConversationMessage";
|
|
70
70
|
export * from "./com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload";
|
|
71
|
+
export * from "./com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages";
|
|
71
72
|
export * from "./com/controlresell/models/platforms/conversations/users/ConversationUser";
|
|
72
73
|
export * from "./com/controlresell/models/platforms/conversations/users/CreateConversationUserPayload";
|
|
73
74
|
export * from "./com/controlresell/models/platforms/conversations/users/UpdateConversationUserPayload";
|
package/src/index.js
CHANGED
|
@@ -84,6 +84,7 @@ __exportStar(require("./com/controlresell/models/platforms/conversations/UpdateC
|
|
|
84
84
|
__exportStar(require("./com/controlresell/models/platforms/conversations/UserConversations"), exports);
|
|
85
85
|
__exportStar(require("./com/controlresell/models/platforms/conversations/messages/ConversationMessage"), exports);
|
|
86
86
|
__exportStar(require("./com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload"), exports);
|
|
87
|
+
__exportStar(require("./com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages"), exports);
|
|
87
88
|
__exportStar(require("./com/controlresell/models/platforms/conversations/users/ConversationUser"), exports);
|
|
88
89
|
__exportStar(require("./com/controlresell/models/platforms/conversations/users/CreateConversationUserPayload"), exports);
|
|
89
90
|
__exportStar(require("./com/controlresell/models/platforms/conversations/users/UpdateConversationUserPayload"), exports);
|
package/src/index.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from "./com/controlresell/models/platforms/conversations/UpdateConversa
|
|
|
68
68
|
export * from "./com/controlresell/models/platforms/conversations/UserConversations"
|
|
69
69
|
export * from "./com/controlresell/models/platforms/conversations/messages/ConversationMessage"
|
|
70
70
|
export * from "./com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload"
|
|
71
|
+
export * from "./com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages"
|
|
71
72
|
export * from "./com/controlresell/models/platforms/conversations/users/ConversationUser"
|
|
72
73
|
export * from "./com/controlresell/models/platforms/conversations/users/CreateConversationUserPayload"
|
|
73
74
|
export * from "./com/controlresell/models/platforms/conversations/users/UpdateConversationUserPayload"
|