controlresell 2.0.10 → 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.
- package/package.json +2 -2
- package/src/com/controlresell/models/customers/VerifyCustomerRequest.d.ts +9 -0
- package/src/com/controlresell/models/customers/VerifyCustomerRequest.js +7 -0
- package/src/com/controlresell/models/customers/VerifyCustomerRequest.ts +6 -0
- package/src/com/controlresell/models/customers/contracts/Contract.d.ts +4 -4
- package/src/com/controlresell/models/customers/contracts/PrepareContractResponse.d.ts +4 -4
- package/src/com/controlresell/models/fees/Fee.d.ts +6 -6
- package/src/com/controlresell/models/items/CreatedItems.d.ts +74 -74
- package/src/com/controlresell/models/items/Item.d.ts +48 -48
- package/src/com/controlresell/models/items/ItemFiltersContext.d.ts +6 -6
- package/src/com/controlresell/models/items/ItemFiltersContext.js +2 -2
- package/src/com/controlresell/models/items/ItemFiltersContext.ts +2 -2
- package/src/com/controlresell/models/items/ItemPayload.d.ts +2 -2
- package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +70 -70
- package/src/com/controlresell/models/items/UpdatedItem.d.ts +74 -74
- package/src/com/controlresell/models/items/files/ItemFile.d.ts +6 -6
- package/src/com/controlresell/models/items/labels/ItemLabel.d.ts +4 -4
- package/src/com/controlresell/models/items/platforms/ItemOnPlatform.d.ts +10 -10
- package/src/com/controlresell/models/items/platforms/ItemOnPlatformsRequestWithItem.d.ts +70 -70
- package/src/com/controlresell/models/metadata/brands/Brand.d.ts +2 -2
- package/src/com/controlresell/models/metadata/labels/Label.d.ts +2 -2
- package/src/com/controlresell/models/metadata/places/Place.d.ts +2 -2
- package/src/com/controlresell/models/platforms/conversations/Conversation.d.ts +149 -55
- package/src/com/controlresell/models/platforms/conversations/UserConversations.d.ts +193 -75
- package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.d.ts +97 -27
- package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.js +6 -4
- package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessage.ts +6 -4
- package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageRequest.d.ts +12 -0
- package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageRequest.js +8 -0
- package/src/com/controlresell/models/platforms/conversations/messages/ConversationMessageRequest.ts +7 -0
- package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.d.ts +5 -5
- package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.js +1 -1
- package/src/com/controlresell/models/platforms/conversations/messages/CreateConversationMessagePayload.ts +1 -1
- package/src/com/controlresell/models/platforms/conversations/messages/PaginatedConversationMessages.d.ts +133 -39
- package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.d.ts +45 -0
- package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.js +10 -0
- package/src/com/controlresell/models/platforms/conversations/messages/UpdateConversationMessagePayload.ts +9 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/ConversationMessageFile.d.ts +48 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/ConversationMessageFile.js +11 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/ConversationMessageFile.ts +10 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/CreateConversationMessageFilePayload.d.ts +12 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/CreateConversationMessageFilePayload.js +8 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/CreateConversationMessageFilePayload.ts +7 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/UpdateConversationMessageFilePayload.d.ts +9 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/UpdateConversationMessageFilePayload.js +7 -0
- package/src/com/controlresell/models/platforms/conversations/messages/files/UpdateConversationMessageFilePayload.ts +6 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationMessageOffer.d.ts +21 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationMessageOffer.js +12 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationMessageOffer.ts +11 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationOfferRequest.d.ts +9 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationOfferRequest.js +7 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/ConversationOfferRequest.ts +6 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/CreateConversationMessageOfferPayload.d.ts +15 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/CreateConversationMessageOfferPayload.js +10 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/CreateConversationMessageOfferPayload.ts +9 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/UpdateConversationMessageOfferPayload.d.ts +9 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/UpdateConversationMessageOfferPayload.js +8 -0
- package/src/com/controlresell/models/platforms/conversations/messages/offers/UpdateConversationMessageOfferPayload.ts +7 -0
- package/src/com/controlresell/models/platforms/conversations/users/ConversationUser.d.ts +4 -4
- package/src/com/controlresell/models/platforms/labels/OrderLabel.d.ts +10 -10
- package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.d.ts +3 -0
- package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.js +1 -0
- package/src/com/controlresell/models/platforms/orders/CreateOrderPayload.ts +1 -0
- package/src/com/controlresell/models/platforms/orders/Order.d.ts +45 -42
- package/src/com/controlresell/models/platforms/orders/Order.js +1 -0
- package/src/com/controlresell/models/platforms/orders/Order.ts +1 -0
- package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.d.ts +5 -2
- package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.js +1 -0
- package/src/com/controlresell/models/platforms/orders/UpdateOrderPayload.ts +1 -0
- package/src/com/controlresell/models/platforms/orders/items/ItemInOrder.d.ts +16 -16
- package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.d.ts +1126 -0
- package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.js +10 -0
- package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.ts +9 -0
- package/src/com/controlresell/models/platforms/transactions/CreateTransactionPayload.d.ts +21 -0
- package/src/com/controlresell/models/platforms/transactions/CreateTransactionPayload.js +11 -0
- package/src/com/controlresell/models/platforms/transactions/CreateTransactionPayload.ts +10 -0
- package/src/com/controlresell/models/platforms/transactions/Transaction.d.ts +167 -0
- package/src/com/controlresell/models/platforms/transactions/Transaction.js +15 -0
- package/src/com/controlresell/models/platforms/transactions/Transaction.ts +14 -0
- package/src/com/controlresell/models/platforms/transactions/UpdateTransactionPayload.d.ts +18 -0
- package/src/com/controlresell/models/platforms/transactions/UpdateTransactionPayload.js +10 -0
- package/src/com/controlresell/models/platforms/transactions/UpdateTransactionPayload.ts +9 -0
- package/src/com/controlresell/models/platforms/transactions/items/CreateItemInTransactionPayload.d.ts +9 -0
- package/src/com/controlresell/models/platforms/transactions/items/CreateItemInTransactionPayload.js +7 -0
- package/src/com/controlresell/models/platforms/transactions/items/CreateItemInTransactionPayload.ts +6 -0
- package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.d.ts +102 -0
- package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.js +10 -0
- package/src/com/controlresell/models/platforms/transactions/items/ItemInTransaction.ts +9 -0
- package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.d.ts +959 -0
- package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.js +10 -0
- package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.ts +9 -0
- package/src/com/controlresell/models/users/UpdateUserPayload.d.ts +2 -2
- package/src/com/controlresell/models/users/User.d.ts +2 -2
- package/src/com/controlresell/models/users/fields/Field.d.ts +2 -2
- package/src/com/controlresell/models/users/fields/FieldsWithData.d.ts +4 -4
- package/src/com/controlresell/models/users/files/File.d.ts +2 -2
- package/src/com/controlresell/models/users/platforms/CreateUserOnPlatformPayload.d.ts +2 -2
- package/src/com/controlresell/models/users/platforms/PlatformAuthRequest.d.ts +8 -8
- package/src/com/controlresell/models/users/platforms/PlatformJobUpdate.d.ts +11 -11
- package/src/com/controlresell/models/users/platforms/UpdateUserOnPlatformPayload.d.ts +2 -2
- package/src/com/controlresell/models/users/platforms/UserOnPlatform.d.ts +4 -4
- package/src/com/controlresell/models/users/platforms/UserOnPlatformSessionMessage.d.ts +6 -6
- package/src/index.d.ts +18 -1
- package/src/index.js +18 -1
- package/src/index.ts +18 -1
- package/src/com/controlresell/models/{connector → users/platforms}/UserOnPlatformRequest.d.ts +2 -2
- /package/src/com/controlresell/models/{connector → users/platforms}/UserOnPlatformRequest.js +0 -0
- /package/src/com/controlresell/models/{connector → users/platforms}/UserOnPlatformRequest.ts +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const CreateConversationMessagePayloadSchema: z.ZodObject<{
|
|
3
3
|
conversationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
|
-
platformMessageId: z.ZodString
|
|
4
|
+
platformMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
5
|
type: z.ZodEnum<["MESSAGE", "STATUS_MESSAGE", "ACTION_MESSAGE", "OFFER_REQUEST_MESSAGE", "OFFER_MESSAGE"]>;
|
|
6
6
|
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
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
|
-
platformMessageId: string;
|
|
11
|
-
body?: string | null | undefined;
|
|
12
10
|
createdAt?: Date | null | undefined;
|
|
11
|
+
body?: string | null | undefined;
|
|
13
12
|
conversationUserId?: string | null | undefined;
|
|
13
|
+
platformMessageId?: string | null | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
16
|
-
platformMessageId: string;
|
|
17
|
-
body?: string | null | undefined;
|
|
18
16
|
createdAt?: Date | null | undefined;
|
|
17
|
+
body?: string | null | undefined;
|
|
19
18
|
conversationUserId?: string | null | undefined;
|
|
19
|
+
platformMessageId?: string | null | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export type CreateConversationMessagePayload = z.infer<typeof CreateConversationMessagePayloadSchema>;
|
|
@@ -5,7 +5,7 @@ const zod_1 = require("zod");
|
|
|
5
5
|
const controlresell_connector_1 = require("controlresell-connector");
|
|
6
6
|
exports.CreateConversationMessagePayloadSchema = zod_1.z.object({
|
|
7
7
|
conversationUserId: zod_1.z.string().uuid().nullish(),
|
|
8
|
-
platformMessageId: zod_1.z.string(),
|
|
8
|
+
platformMessageId: zod_1.z.string().nullish(),
|
|
9
9
|
type: controlresell_connector_1.JobConversationMessageTypeSchema,
|
|
10
10
|
body: zod_1.z.string().nullish(),
|
|
11
11
|
createdAt: zod_1.z.coerce.date().nullish()
|
|
@@ -3,7 +3,7 @@ import {JobConversationMessageTypeSchema} from "controlresell-connector"
|
|
|
3
3
|
|
|
4
4
|
export const CreateConversationMessagePayloadSchema = z.object({
|
|
5
5
|
conversationUserId: z.string().uuid().nullish(),
|
|
6
|
-
platformMessageId: z.string(),
|
|
6
|
+
platformMessageId: z.string().nullish(),
|
|
7
7
|
type: JobConversationMessageTypeSchema,
|
|
8
8
|
body: z.string().nullish(),
|
|
9
9
|
createdAt: z.coerce.date().nullish()
|
|
@@ -5,59 +5,129 @@ export declare const PaginatedConversationMessagesSchema: z.ZodObject<{
|
|
|
5
5
|
id: z.ZodString;
|
|
6
6
|
conversationId: z.ZodString;
|
|
7
7
|
conversationUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
8
|
-
platformMessageId: z.ZodString
|
|
8
|
+
platformMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
9
9
|
type: z.ZodEnum<["MESSAGE", "STATUS_MESSAGE", "ACTION_MESSAGE", "OFFER_REQUEST_MESSAGE", "OFFER_MESSAGE"]>;
|
|
10
10
|
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
11
|
-
|
|
11
|
+
createdAt: z.ZodDate;
|
|
12
|
+
offer: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
12
13
|
id: z.ZodString;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
messageId: z.ZodString;
|
|
15
|
+
price: z.ZodNumber;
|
|
16
|
+
originalPrice: z.ZodNumber;
|
|
17
|
+
status: z.ZodEnum<["PENDING", "ACCEPTED", "REJECTED", "CANCELLED"]>;
|
|
17
18
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
|
|
19
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
19
20
|
id: string;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
price: number;
|
|
22
|
+
originalPrice: number;
|
|
23
|
+
messageId: string;
|
|
23
24
|
}, {
|
|
24
|
-
|
|
25
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
25
26
|
id: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
price: number;
|
|
28
|
+
originalPrice: number;
|
|
29
|
+
messageId: string;
|
|
30
|
+
}>>>;
|
|
31
|
+
files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
32
|
+
fileId: z.ZodString;
|
|
33
|
+
messageId: z.ZodString;
|
|
34
|
+
index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
38
|
+
path: z.ZodString;
|
|
39
|
+
signedUrl: z.ZodString;
|
|
40
|
+
createdAt: z.ZodDate;
|
|
41
|
+
}, "strip", z.ZodTypeAny, {
|
|
42
|
+
path: string;
|
|
43
|
+
id: string;
|
|
44
|
+
userId: string | number;
|
|
45
|
+
signedUrl: string;
|
|
46
|
+
createdAt: Date;
|
|
47
|
+
}, {
|
|
48
|
+
path: string;
|
|
49
|
+
id: string;
|
|
50
|
+
userId: string | number;
|
|
51
|
+
signedUrl: string;
|
|
52
|
+
createdAt: Date;
|
|
53
|
+
}>>>;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
fileId: string;
|
|
56
|
+
messageId: string;
|
|
57
|
+
file?: {
|
|
58
|
+
path: string;
|
|
59
|
+
id: string;
|
|
60
|
+
userId: string | number;
|
|
61
|
+
signedUrl: string;
|
|
62
|
+
createdAt: Date;
|
|
63
|
+
} | null | undefined;
|
|
64
|
+
index?: number | null | undefined;
|
|
65
|
+
}, {
|
|
66
|
+
fileId: string;
|
|
67
|
+
messageId: string;
|
|
68
|
+
file?: {
|
|
69
|
+
path: string;
|
|
70
|
+
id: string;
|
|
71
|
+
userId: string | number;
|
|
72
|
+
signedUrl: string;
|
|
73
|
+
createdAt: Date;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
index?: number | null | undefined;
|
|
29
76
|
}>, "many">>>;
|
|
30
|
-
createdAt: z.ZodDate;
|
|
31
77
|
}, "strip", z.ZodTypeAny, {
|
|
32
78
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
33
79
|
id: string;
|
|
34
80
|
createdAt: Date;
|
|
35
81
|
conversationId: string;
|
|
36
|
-
platformMessageId: string;
|
|
37
82
|
body?: string | null | undefined;
|
|
38
|
-
|
|
39
|
-
|
|
83
|
+
offer?: {
|
|
84
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
40
85
|
id: string;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
86
|
+
price: number;
|
|
87
|
+
originalPrice: number;
|
|
88
|
+
messageId: string;
|
|
89
|
+
} | null | undefined;
|
|
90
|
+
files?: {
|
|
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;
|
|
44
101
|
}[] | null | undefined;
|
|
45
102
|
conversationUserId?: string | null | undefined;
|
|
103
|
+
platformMessageId?: string | null | undefined;
|
|
46
104
|
}, {
|
|
47
105
|
type: "MESSAGE" | "STATUS_MESSAGE" | "ACTION_MESSAGE" | "OFFER_REQUEST_MESSAGE" | "OFFER_MESSAGE";
|
|
48
106
|
id: string;
|
|
49
107
|
createdAt: Date;
|
|
50
108
|
conversationId: string;
|
|
51
|
-
platformMessageId: string;
|
|
52
109
|
body?: string | null | undefined;
|
|
53
|
-
|
|
54
|
-
|
|
110
|
+
offer?: {
|
|
111
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
55
112
|
id: string;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
113
|
+
price: number;
|
|
114
|
+
originalPrice: number;
|
|
115
|
+
messageId: string;
|
|
116
|
+
} | null | undefined;
|
|
117
|
+
files?: {
|
|
118
|
+
fileId: string;
|
|
119
|
+
messageId: string;
|
|
120
|
+
file?: {
|
|
121
|
+
path: string;
|
|
122
|
+
id: string;
|
|
123
|
+
userId: string | number;
|
|
124
|
+
signedUrl: string;
|
|
125
|
+
createdAt: Date;
|
|
126
|
+
} | null | undefined;
|
|
127
|
+
index?: number | null | undefined;
|
|
59
128
|
}[] | null | undefined;
|
|
60
129
|
conversationUserId?: string | null | undefined;
|
|
130
|
+
platformMessageId?: string | null | undefined;
|
|
61
131
|
}>, "many">;
|
|
62
132
|
currentPage: z.ZodNumber;
|
|
63
133
|
totalPages: z.ZodNumber;
|
|
@@ -68,16 +138,28 @@ export declare const PaginatedConversationMessagesSchema: z.ZodObject<{
|
|
|
68
138
|
id: string;
|
|
69
139
|
createdAt: Date;
|
|
70
140
|
conversationId: string;
|
|
71
|
-
platformMessageId: string;
|
|
72
141
|
body?: string | null | undefined;
|
|
73
|
-
|
|
74
|
-
|
|
142
|
+
offer?: {
|
|
143
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
75
144
|
id: string;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
145
|
+
price: number;
|
|
146
|
+
originalPrice: number;
|
|
147
|
+
messageId: string;
|
|
148
|
+
} | null | undefined;
|
|
149
|
+
files?: {
|
|
150
|
+
fileId: string;
|
|
151
|
+
messageId: string;
|
|
152
|
+
file?: {
|
|
153
|
+
path: string;
|
|
154
|
+
id: string;
|
|
155
|
+
userId: string | number;
|
|
156
|
+
signedUrl: string;
|
|
157
|
+
createdAt: Date;
|
|
158
|
+
} | null | undefined;
|
|
159
|
+
index?: number | null | undefined;
|
|
79
160
|
}[] | null | undefined;
|
|
80
161
|
conversationUserId?: string | null | undefined;
|
|
162
|
+
platformMessageId?: string | null | undefined;
|
|
81
163
|
}[];
|
|
82
164
|
currentPage: number;
|
|
83
165
|
totalPages: number;
|
|
@@ -88,16 +170,28 @@ export declare const PaginatedConversationMessagesSchema: z.ZodObject<{
|
|
|
88
170
|
id: string;
|
|
89
171
|
createdAt: Date;
|
|
90
172
|
conversationId: string;
|
|
91
|
-
platformMessageId: string;
|
|
92
173
|
body?: string | null | undefined;
|
|
93
|
-
|
|
94
|
-
|
|
174
|
+
offer?: {
|
|
175
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
95
176
|
id: string;
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
177
|
+
price: number;
|
|
178
|
+
originalPrice: number;
|
|
179
|
+
messageId: string;
|
|
180
|
+
} | null | undefined;
|
|
181
|
+
files?: {
|
|
182
|
+
fileId: string;
|
|
183
|
+
messageId: string;
|
|
184
|
+
file?: {
|
|
185
|
+
path: string;
|
|
186
|
+
id: string;
|
|
187
|
+
userId: string | number;
|
|
188
|
+
signedUrl: string;
|
|
189
|
+
createdAt: Date;
|
|
190
|
+
} | null | undefined;
|
|
191
|
+
index?: number | null | undefined;
|
|
99
192
|
}[] | null | undefined;
|
|
100
193
|
conversationUserId?: string | null | undefined;
|
|
194
|
+
platformMessageId?: string | null | undefined;
|
|
101
195
|
}[];
|
|
102
196
|
currentPage: number;
|
|
103
197
|
totalPages: number;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdateConversationMessagePayloadSchema: z.ZodObject<{
|
|
3
|
+
platformMessageId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
4
|
+
body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
5
|
+
files: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
8
|
+
path: z.ZodString;
|
|
9
|
+
signedUrl: z.ZodString;
|
|
10
|
+
createdAt: z.ZodDate;
|
|
11
|
+
}, "strip", z.ZodTypeAny, {
|
|
12
|
+
path: string;
|
|
13
|
+
id: string;
|
|
14
|
+
userId: string | number;
|
|
15
|
+
signedUrl: string;
|
|
16
|
+
createdAt: Date;
|
|
17
|
+
}, {
|
|
18
|
+
path: string;
|
|
19
|
+
id: string;
|
|
20
|
+
userId: string | number;
|
|
21
|
+
signedUrl: string;
|
|
22
|
+
createdAt: Date;
|
|
23
|
+
}>, "many">>>;
|
|
24
|
+
}, "strip", z.ZodTypeAny, {
|
|
25
|
+
body?: string | null | undefined;
|
|
26
|
+
files?: {
|
|
27
|
+
path: string;
|
|
28
|
+
id: string;
|
|
29
|
+
userId: string | number;
|
|
30
|
+
signedUrl: string;
|
|
31
|
+
createdAt: Date;
|
|
32
|
+
}[] | null | undefined;
|
|
33
|
+
platformMessageId?: string | null | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
body?: string | null | undefined;
|
|
36
|
+
files?: {
|
|
37
|
+
path: string;
|
|
38
|
+
id: string;
|
|
39
|
+
userId: string | number;
|
|
40
|
+
signedUrl: string;
|
|
41
|
+
createdAt: Date;
|
|
42
|
+
}[] | null | undefined;
|
|
43
|
+
platformMessageId?: string | null | undefined;
|
|
44
|
+
}>;
|
|
45
|
+
export type UpdateConversationMessagePayload = z.infer<typeof UpdateConversationMessagePayloadSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateConversationMessagePayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const File_1 = require("../../../users/files/File");
|
|
6
|
+
exports.UpdateConversationMessagePayloadSchema = zod_1.z.object({
|
|
7
|
+
platformMessageId: zod_1.z.string().nullish(),
|
|
8
|
+
body: zod_1.z.string().nullish(),
|
|
9
|
+
files: zod_1.z.array(File_1.FileSchema).nullish()
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {FileSchema} from "../../../users/files/File"
|
|
3
|
+
|
|
4
|
+
export const UpdateConversationMessagePayloadSchema = z.object({
|
|
5
|
+
platformMessageId: z.string().nullish(),
|
|
6
|
+
body: z.string().nullish(),
|
|
7
|
+
files: z.array(FileSchema).nullish()
|
|
8
|
+
})
|
|
9
|
+
export type UpdateConversationMessagePayload = z.infer<typeof UpdateConversationMessagePayloadSchema>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ConversationMessageFileSchema: z.ZodObject<{
|
|
3
|
+
fileId: z.ZodString;
|
|
4
|
+
messageId: z.ZodString;
|
|
5
|
+
index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
6
|
+
file: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
7
|
+
id: z.ZodString;
|
|
8
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
9
|
+
path: z.ZodString;
|
|
10
|
+
signedUrl: z.ZodString;
|
|
11
|
+
createdAt: z.ZodDate;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
path: string;
|
|
14
|
+
id: string;
|
|
15
|
+
userId: string | number;
|
|
16
|
+
signedUrl: string;
|
|
17
|
+
createdAt: Date;
|
|
18
|
+
}, {
|
|
19
|
+
path: string;
|
|
20
|
+
id: string;
|
|
21
|
+
userId: string | number;
|
|
22
|
+
signedUrl: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
}>>>;
|
|
25
|
+
}, "strip", z.ZodTypeAny, {
|
|
26
|
+
fileId: string;
|
|
27
|
+
messageId: string;
|
|
28
|
+
file?: {
|
|
29
|
+
path: string;
|
|
30
|
+
id: string;
|
|
31
|
+
userId: string | number;
|
|
32
|
+
signedUrl: string;
|
|
33
|
+
createdAt: Date;
|
|
34
|
+
} | null | undefined;
|
|
35
|
+
index?: number | null | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
fileId: string;
|
|
38
|
+
messageId: string;
|
|
39
|
+
file?: {
|
|
40
|
+
path: string;
|
|
41
|
+
id: string;
|
|
42
|
+
userId: string | number;
|
|
43
|
+
signedUrl: string;
|
|
44
|
+
createdAt: Date;
|
|
45
|
+
} | null | undefined;
|
|
46
|
+
index?: number | null | undefined;
|
|
47
|
+
}>;
|
|
48
|
+
export type ConversationMessageFile = z.infer<typeof ConversationMessageFileSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationMessageFileSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const File_1 = require("../../../../users/files/File");
|
|
6
|
+
exports.ConversationMessageFileSchema = zod_1.z.object({
|
|
7
|
+
fileId: zod_1.z.string().uuid(),
|
|
8
|
+
messageId: zod_1.z.string().uuid(),
|
|
9
|
+
index: zod_1.z.number().int().nullish(),
|
|
10
|
+
file: File_1.FileSchema.nullish()
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {FileSchema} from "../../../../users/files/File"
|
|
3
|
+
|
|
4
|
+
export const ConversationMessageFileSchema = z.object({
|
|
5
|
+
fileId: z.string().uuid(),
|
|
6
|
+
messageId: z.string().uuid(),
|
|
7
|
+
index: z.number().int().nullish(),
|
|
8
|
+
file: FileSchema.nullish()
|
|
9
|
+
})
|
|
10
|
+
export type ConversationMessageFile = z.infer<typeof ConversationMessageFileSchema>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateConversationMessageFilePayloadSchema: z.ZodObject<{
|
|
3
|
+
fileId: z.ZodString;
|
|
4
|
+
index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
fileId: string;
|
|
7
|
+
index?: number | null | undefined;
|
|
8
|
+
}, {
|
|
9
|
+
fileId: string;
|
|
10
|
+
index?: number | null | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
export type CreateConversationMessageFilePayload = z.infer<typeof CreateConversationMessageFilePayloadSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateConversationMessageFilePayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.CreateConversationMessageFilePayloadSchema = zod_1.z.object({
|
|
6
|
+
fileId: zod_1.z.string().uuid(),
|
|
7
|
+
index: zod_1.z.number().int().nullish()
|
|
8
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
|
|
3
|
+
export const CreateConversationMessageFilePayloadSchema = z.object({
|
|
4
|
+
fileId: z.string().uuid(),
|
|
5
|
+
index: z.number().int().nullish()
|
|
6
|
+
})
|
|
7
|
+
export type CreateConversationMessageFilePayload = z.infer<typeof CreateConversationMessageFilePayloadSchema>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdateConversationMessageFilePayloadSchema: z.ZodObject<{
|
|
3
|
+
index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
index?: number | null | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
index?: number | null | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type UpdateConversationMessageFilePayload = z.infer<typeof UpdateConversationMessageFilePayloadSchema>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateConversationMessageFilePayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.UpdateConversationMessageFilePayloadSchema = zod_1.z.object({
|
|
6
|
+
index: zod_1.z.number().int().nullish()
|
|
7
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ConversationMessageOfferSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
messageId: z.ZodString;
|
|
5
|
+
price: z.ZodNumber;
|
|
6
|
+
originalPrice: z.ZodNumber;
|
|
7
|
+
status: z.ZodEnum<["PENDING", "ACCEPTED", "REJECTED", "CANCELLED"]>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
10
|
+
id: string;
|
|
11
|
+
price: number;
|
|
12
|
+
originalPrice: number;
|
|
13
|
+
messageId: string;
|
|
14
|
+
}, {
|
|
15
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
16
|
+
id: string;
|
|
17
|
+
price: number;
|
|
18
|
+
originalPrice: number;
|
|
19
|
+
messageId: string;
|
|
20
|
+
}>;
|
|
21
|
+
export type ConversationMessageOffer = z.infer<typeof ConversationMessageOfferSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConversationMessageOfferSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const controlresell_connector_1 = require("controlresell-connector");
|
|
6
|
+
exports.ConversationMessageOfferSchema = zod_1.z.object({
|
|
7
|
+
id: zod_1.z.string().uuid(),
|
|
8
|
+
messageId: zod_1.z.string().uuid(),
|
|
9
|
+
price: zod_1.z.number(),
|
|
10
|
+
originalPrice: zod_1.z.number(),
|
|
11
|
+
status: controlresell_connector_1.JobConversationMessageOfferStatusSchema
|
|
12
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {JobConversationMessageOfferStatusSchema} from "controlresell-connector"
|
|
3
|
+
|
|
4
|
+
export const ConversationMessageOfferSchema = z.object({
|
|
5
|
+
id: z.string().uuid(),
|
|
6
|
+
messageId: z.string().uuid(),
|
|
7
|
+
price: z.number(),
|
|
8
|
+
originalPrice: z.number(),
|
|
9
|
+
status: JobConversationMessageOfferStatusSchema
|
|
10
|
+
})
|
|
11
|
+
export type ConversationMessageOffer = z.infer<typeof ConversationMessageOfferSchema>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const ConversationOfferRequestSchema: z.ZodObject<{
|
|
3
|
+
price: z.ZodNumber;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
price: number;
|
|
6
|
+
}, {
|
|
7
|
+
price: number;
|
|
8
|
+
}>;
|
|
9
|
+
export type ConversationOfferRequest = z.infer<typeof ConversationOfferRequestSchema>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const CreateConversationMessageOfferPayloadSchema: z.ZodObject<{
|
|
3
|
+
price: z.ZodNumber;
|
|
4
|
+
originalPrice: z.ZodNumber;
|
|
5
|
+
status: z.ZodEnum<["PENDING", "ACCEPTED", "REJECTED", "CANCELLED"]>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
8
|
+
price: number;
|
|
9
|
+
originalPrice: number;
|
|
10
|
+
}, {
|
|
11
|
+
status: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED";
|
|
12
|
+
price: number;
|
|
13
|
+
originalPrice: number;
|
|
14
|
+
}>;
|
|
15
|
+
export type CreateConversationMessageOfferPayload = z.infer<typeof CreateConversationMessageOfferPayloadSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateConversationMessageOfferPayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const controlresell_connector_1 = require("controlresell-connector");
|
|
6
|
+
exports.CreateConversationMessageOfferPayloadSchema = zod_1.z.object({
|
|
7
|
+
price: zod_1.z.number(),
|
|
8
|
+
originalPrice: zod_1.z.number(),
|
|
9
|
+
status: controlresell_connector_1.JobConversationMessageOfferStatusSchema
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {JobConversationMessageOfferStatusSchema} from "controlresell-connector"
|
|
3
|
+
|
|
4
|
+
export const CreateConversationMessageOfferPayloadSchema = z.object({
|
|
5
|
+
price: z.number(),
|
|
6
|
+
originalPrice: z.number(),
|
|
7
|
+
status: JobConversationMessageOfferStatusSchema
|
|
8
|
+
})
|
|
9
|
+
export type CreateConversationMessageOfferPayload = z.infer<typeof CreateConversationMessageOfferPayloadSchema>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const UpdateConversationMessageOfferPayloadSchema: z.ZodObject<{
|
|
3
|
+
status: z.ZodOptional<z.ZodNullable<z.ZodEnum<["PENDING", "ACCEPTED", "REJECTED", "CANCELLED"]>>>;
|
|
4
|
+
}, "strip", z.ZodTypeAny, {
|
|
5
|
+
status?: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED" | null | undefined;
|
|
6
|
+
}, {
|
|
7
|
+
status?: "PENDING" | "ACCEPTED" | "REJECTED" | "CANCELLED" | null | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export type UpdateConversationMessageOfferPayload = z.infer<typeof UpdateConversationMessageOfferPayloadSchema>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateConversationMessageOfferPayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const controlresell_connector_1 = require("controlresell-connector");
|
|
6
|
+
exports.UpdateConversationMessageOfferPayloadSchema = zod_1.z.object({
|
|
7
|
+
status: controlresell_connector_1.JobConversationMessageOfferStatusSchema.nullish()
|
|
8
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {JobConversationMessageOfferStatusSchema} from "controlresell-connector"
|
|
3
|
+
|
|
4
|
+
export const UpdateConversationMessageOfferPayloadSchema = z.object({
|
|
5
|
+
status: JobConversationMessageOfferStatusSchema.nullish()
|
|
6
|
+
})
|
|
7
|
+
export type UpdateConversationMessageOfferPayload = z.infer<typeof UpdateConversationMessageOfferPayloadSchema>
|