controlresell 2.2.18 → 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.
- package/package.json +2 -2
- package/src/com/controlresell/models/items/CreatedItems.d.ts +130 -130
- package/src/com/controlresell/models/items/Item.d.ts +104 -104
- package/src/com/controlresell/models/items/ItemsWithFilters.d.ts +130 -130
- package/src/com/controlresell/models/items/UpdatedItem.d.ts +130 -130
- package/src/com/controlresell/models/items/history/CreateItemHistoryPayload.d.ts +71 -71
- package/src/com/controlresell/models/items/history/ItemHistory.d.ts +78 -78
- package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.d.ts +156 -18
- package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.js +32 -26
- package/src/com/controlresell/models/items/history/ItemHistoryDecodedPayload.ts +43 -26
- package/src/com/controlresell/models/platforms/orders/items/OrderWithItems.d.ts +130 -130
- package/src/com/controlresell/models/platforms/transactions/items/TransactionWithItems.d.ts +130 -130
- package/src/com/controlresell/models/preferences/Preference.d.ts +356 -356
- package/src/com/controlresell/models/preferences/PreferenceFilter.d.ts +130 -130
- package/src/com/controlresell/models/preferences/PreferenceWithCase.d.ts +1121 -1121
- package/src/com/controlresell/models/preferences/PreferenceWithChildren.d.ts +815 -815
- package/src/com/controlresell/models/preferences/cases/CreatePreferenceCasePayload.d.ts +275 -275
- package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.d.ts +276 -276
- package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +286 -286
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts +31 -31
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.d.ts +96 -5
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.js +20 -16
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.ts +27 -16
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +41 -41
- package/src/com/controlresell/models/preferences/queue/PreferenceNextActionPayload.d.ts +1417 -1417
- package/src/com/controlresell/models/preferences/variants/PartialPreferenceCaseVariantPayload.d.ts +229 -229
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.d.ts +232 -232
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.d.ts +541 -83
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.js +33 -27
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.ts +44 -27
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.d.ts +229 -229
- package/src/com/controlresell/models/users/ws/UserWsPayload.d.ts +1205 -0
- package/src/com/controlresell/models/users/ws/UserWsPayload.js +34 -0
- package/src/com/controlresell/models/users/ws/UserWsPayload.ts +43 -0
- package/src/index.d.ts +1 -0
- package/src/index.js +3 -1
- package/src/index.ts +1 -0
|
@@ -4,56 +4,6 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
4
4
|
itemId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
5
5
|
type: z.ZodEnum<["IMPORTED", "PUBLISHED", "FAILED_TO_PUBLISH", "SCHEDULED", "REPUBLISHING", "REPUBLISHED", "UPDATED", "DELETED", "TO_BE_SENT", "IN_TRANSIT", "BUYER_PAID", "DELIVERED", "RECEIVED", "FINALIZED", "RETURN", "REFUND"]>;
|
|
6
6
|
data: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
7
|
-
type: z.ZodLiteral<"EMPTY">;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
type: "EMPTY";
|
|
10
|
-
}, {
|
|
11
|
-
type: "EMPTY";
|
|
12
|
-
}>, z.ZodObject<{
|
|
13
|
-
type: z.ZodLiteral<"SCHEDULED">;
|
|
14
|
-
data: z.ZodObject<{
|
|
15
|
-
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
16
|
-
publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
platform: "VINTED" | "SHOPIFY";
|
|
19
|
-
publishingDate?: Date | null | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
platform: "VINTED" | "SHOPIFY";
|
|
22
|
-
publishingDate?: Date | null | undefined;
|
|
23
|
-
}>;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
type: "SCHEDULED";
|
|
26
|
-
data: {
|
|
27
|
-
platform: "VINTED" | "SHOPIFY";
|
|
28
|
-
publishingDate?: Date | null | undefined;
|
|
29
|
-
};
|
|
30
|
-
}, {
|
|
31
|
-
type: "SCHEDULED";
|
|
32
|
-
data: {
|
|
33
|
-
platform: "VINTED" | "SHOPIFY";
|
|
34
|
-
publishingDate?: Date | null | undefined;
|
|
35
|
-
};
|
|
36
|
-
}>, z.ZodObject<{
|
|
37
|
-
type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
|
|
38
|
-
data: z.ZodObject<{
|
|
39
|
-
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
40
|
-
}, "strip", z.ZodTypeAny, {
|
|
41
|
-
platform: "VINTED" | "SHOPIFY";
|
|
42
|
-
}, {
|
|
43
|
-
platform: "VINTED" | "SHOPIFY";
|
|
44
|
-
}>;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
type: "FAILED_TO_PUBLISH";
|
|
47
|
-
data: {
|
|
48
|
-
platform: "VINTED" | "SHOPIFY";
|
|
49
|
-
};
|
|
50
|
-
}, {
|
|
51
|
-
type: "FAILED_TO_PUBLISH";
|
|
52
|
-
data: {
|
|
53
|
-
platform: "VINTED" | "SHOPIFY";
|
|
54
|
-
};
|
|
55
|
-
}>, z.ZodObject<{
|
|
56
|
-
type: z.ZodLiteral<"BUYER_PAID">;
|
|
57
7
|
data: z.ZodObject<{
|
|
58
8
|
soldAccountId: z.ZodString;
|
|
59
9
|
soldOrderId: z.ZodString;
|
|
@@ -67,6 +17,7 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
67
17
|
soldOrderId: string;
|
|
68
18
|
soldConversationId?: string | null | undefined;
|
|
69
19
|
}>;
|
|
20
|
+
type: z.ZodLiteral<"BUYER_PAID">;
|
|
70
21
|
}, "strip", z.ZodTypeAny, {
|
|
71
22
|
type: "BUYER_PAID";
|
|
72
23
|
data: {
|
|
@@ -82,7 +33,6 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
82
33
|
soldConversationId?: string | null | undefined;
|
|
83
34
|
};
|
|
84
35
|
}>, z.ZodObject<{
|
|
85
|
-
type: z.ZodLiteral<"DELIVERED">;
|
|
86
36
|
data: z.ZodObject<{
|
|
87
37
|
soldAccountId: z.ZodString;
|
|
88
38
|
soldOrderId: z.ZodString;
|
|
@@ -96,6 +46,7 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
96
46
|
soldOrderId: string;
|
|
97
47
|
soldConversationId?: string | null | undefined;
|
|
98
48
|
}>;
|
|
49
|
+
type: z.ZodLiteral<"DELIVERED">;
|
|
99
50
|
}, "strip", z.ZodTypeAny, {
|
|
100
51
|
type: "DELIVERED";
|
|
101
52
|
data: {
|
|
@@ -111,7 +62,31 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
111
62
|
soldConversationId?: string | null | undefined;
|
|
112
63
|
};
|
|
113
64
|
}>, z.ZodObject<{
|
|
114
|
-
type: z.ZodLiteral<"
|
|
65
|
+
type: z.ZodLiteral<"EMPTY">;
|
|
66
|
+
}, "strip", z.ZodTypeAny, {
|
|
67
|
+
type: "EMPTY";
|
|
68
|
+
}, {
|
|
69
|
+
type: "EMPTY";
|
|
70
|
+
}>, z.ZodObject<{
|
|
71
|
+
data: z.ZodObject<{
|
|
72
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
platform: "VINTED" | "SHOPIFY";
|
|
75
|
+
}, {
|
|
76
|
+
platform: "VINTED" | "SHOPIFY";
|
|
77
|
+
}>;
|
|
78
|
+
type: z.ZodLiteral<"FAILED_TO_PUBLISH">;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
type: "FAILED_TO_PUBLISH";
|
|
81
|
+
data: {
|
|
82
|
+
platform: "VINTED" | "SHOPIFY";
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
type: "FAILED_TO_PUBLISH";
|
|
86
|
+
data: {
|
|
87
|
+
platform: "VINTED" | "SHOPIFY";
|
|
88
|
+
};
|
|
89
|
+
}>, z.ZodObject<{
|
|
115
90
|
data: z.ZodObject<{
|
|
116
91
|
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
117
92
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -119,6 +94,7 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
119
94
|
}, {
|
|
120
95
|
platform: "VINTED" | "SHOPIFY";
|
|
121
96
|
}>;
|
|
97
|
+
type: z.ZodLiteral<"REPUBLISHING">;
|
|
122
98
|
}, "strip", z.ZodTypeAny, {
|
|
123
99
|
type: "REPUBLISHING";
|
|
124
100
|
data: {
|
|
@@ -129,27 +105,38 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
129
105
|
data: {
|
|
130
106
|
platform: "VINTED" | "SHOPIFY";
|
|
131
107
|
};
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
108
|
+
}>, z.ZodObject<{
|
|
109
|
+
data: z.ZodObject<{
|
|
110
|
+
platform: z.ZodEnum<["VINTED", "SHOPIFY"]>;
|
|
111
|
+
publishingDate: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
platform: "VINTED" | "SHOPIFY";
|
|
114
|
+
publishingDate?: Date | null | undefined;
|
|
115
|
+
}, {
|
|
116
|
+
platform: "VINTED" | "SHOPIFY";
|
|
117
|
+
publishingDate?: Date | null | undefined;
|
|
118
|
+
}>;
|
|
119
|
+
type: z.ZodLiteral<"SCHEDULED">;
|
|
120
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
121
|
type: "SCHEDULED";
|
|
143
122
|
data: {
|
|
144
123
|
platform: "VINTED" | "SHOPIFY";
|
|
145
124
|
publishingDate?: Date | null | undefined;
|
|
146
125
|
};
|
|
147
|
-
}
|
|
148
|
-
type: "
|
|
126
|
+
}, {
|
|
127
|
+
type: "SCHEDULED";
|
|
149
128
|
data: {
|
|
150
129
|
platform: "VINTED" | "SHOPIFY";
|
|
130
|
+
publishingDate?: Date | null | undefined;
|
|
151
131
|
};
|
|
152
|
-
}
|
|
132
|
+
}>]>>>;
|
|
133
|
+
createdAt: z.ZodDate;
|
|
134
|
+
}, "strip", z.ZodTypeAny, {
|
|
135
|
+
type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "REPUBLISHING" | "REPUBLISHED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
|
|
136
|
+
id: string;
|
|
137
|
+
createdAt: Date;
|
|
138
|
+
itemId: string | number;
|
|
139
|
+
data?: {
|
|
153
140
|
type: "BUYER_PAID";
|
|
154
141
|
data: {
|
|
155
142
|
soldAccountId: string;
|
|
@@ -164,30 +151,30 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
164
151
|
soldConversationId?: string | null | undefined;
|
|
165
152
|
};
|
|
166
153
|
} | {
|
|
167
|
-
type: "
|
|
154
|
+
type: "EMPTY";
|
|
155
|
+
} | {
|
|
156
|
+
type: "FAILED_TO_PUBLISH";
|
|
168
157
|
data: {
|
|
169
158
|
platform: "VINTED" | "SHOPIFY";
|
|
170
159
|
};
|
|
171
|
-
} | null | undefined;
|
|
172
|
-
}, {
|
|
173
|
-
type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "REPUBLISHING" | "REPUBLISHED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
|
|
174
|
-
id: string;
|
|
175
|
-
createdAt: Date;
|
|
176
|
-
itemId: string | number;
|
|
177
|
-
data?: {
|
|
178
|
-
type: "EMPTY";
|
|
179
160
|
} | {
|
|
180
|
-
type: "
|
|
161
|
+
type: "REPUBLISHING";
|
|
181
162
|
data: {
|
|
182
163
|
platform: "VINTED" | "SHOPIFY";
|
|
183
|
-
publishingDate?: Date | null | undefined;
|
|
184
164
|
};
|
|
185
165
|
} | {
|
|
186
|
-
type: "
|
|
166
|
+
type: "SCHEDULED";
|
|
187
167
|
data: {
|
|
188
168
|
platform: "VINTED" | "SHOPIFY";
|
|
169
|
+
publishingDate?: Date | null | undefined;
|
|
189
170
|
};
|
|
190
|
-
} |
|
|
171
|
+
} | null | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
type: "IMPORTED" | "PUBLISHED" | "FAILED_TO_PUBLISH" | "SCHEDULED" | "REPUBLISHING" | "REPUBLISHED" | "UPDATED" | "DELETED" | "TO_BE_SENT" | "IN_TRANSIT" | "BUYER_PAID" | "DELIVERED" | "RECEIVED" | "FINALIZED" | "RETURN" | "REFUND";
|
|
174
|
+
id: string;
|
|
175
|
+
createdAt: Date;
|
|
176
|
+
itemId: string | number;
|
|
177
|
+
data?: {
|
|
191
178
|
type: "BUYER_PAID";
|
|
192
179
|
data: {
|
|
193
180
|
soldAccountId: string;
|
|
@@ -201,11 +188,24 @@ export declare const ItemHistorySchema: z.ZodObject<{
|
|
|
201
188
|
soldOrderId: string;
|
|
202
189
|
soldConversationId?: string | null | undefined;
|
|
203
190
|
};
|
|
191
|
+
} | {
|
|
192
|
+
type: "EMPTY";
|
|
193
|
+
} | {
|
|
194
|
+
type: "FAILED_TO_PUBLISH";
|
|
195
|
+
data: {
|
|
196
|
+
platform: "VINTED" | "SHOPIFY";
|
|
197
|
+
};
|
|
204
198
|
} | {
|
|
205
199
|
type: "REPUBLISHING";
|
|
206
200
|
data: {
|
|
207
201
|
platform: "VINTED" | "SHOPIFY";
|
|
208
202
|
};
|
|
203
|
+
} | {
|
|
204
|
+
type: "SCHEDULED";
|
|
205
|
+
data: {
|
|
206
|
+
platform: "VINTED" | "SHOPIFY";
|
|
207
|
+
publishingDate?: Date | null | undefined;
|
|
208
|
+
};
|
|
209
209
|
} | null | undefined;
|
|
210
210
|
}>;
|
|
211
211
|
export type ItemHistory = z.infer<typeof ItemHistorySchema>;
|
|
@@ -1,36 +1,96 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
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
|
-
}
|
|
9
|
-
|
|
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: "
|
|
82
|
+
type: "FAILED_TO_PUBLISH";
|
|
22
83
|
data: {
|
|
23
84
|
platform: "VINTED" | "SHOPIFY";
|
|
24
|
-
publishingDate?: Date | null | undefined;
|
|
25
85
|
};
|
|
26
86
|
}, {
|
|
27
|
-
type: "
|
|
87
|
+
type: "FAILED_TO_PUBLISH";
|
|
28
88
|
data: {
|
|
29
89
|
platform: "VINTED" | "SHOPIFY";
|
|
30
|
-
publishingDate?: Date | null | undefined;
|
|
31
90
|
};
|
|
32
|
-
}
|
|
33
|
-
|
|
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: "
|
|
103
|
+
type: "REPUBLISHING";
|
|
43
104
|
data: {
|
|
44
105
|
platform: "VINTED" | "SHOPIFY";
|
|
45
106
|
};
|
|
46
107
|
}, {
|
|
47
|
-
type: "
|
|
108
|
+
type: "REPUBLISHING";
|
|
48
109
|
data: {
|
|
49
110
|
platform: "VINTED" | "SHOPIFY";
|
|
50
111
|
};
|
|
51
|
-
}
|
|
52
|
-
|
|
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<"
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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>
|