controlresell 2.2.2 → 2.2.4
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 +5 -4
- package/src/com/controlresell/models/filters/SavedFilters.d.ts +130 -25
- package/src/com/controlresell/models/filters/SavedFiltersPayload.d.ts +130 -25
- package/src/com/controlresell/models/items/ItemFiltersContext.d.ts +90 -15
- package/src/com/controlresell/models/items/ItemFiltersContext.js +7 -6
- package/src/com/controlresell/models/items/ItemFiltersContext.ts +7 -6
- package/src/com/controlresell/models/items/platforms/ItemOnPlatformUpdateRequest.d.ts +7 -0
- package/src/com/controlresell/models/platforms/conversations/ConversationOnPlatformUpdateRequest.d.ts +9 -0
- package/src/com/controlresell/models/preferences/CreatePreferencePayload.d.ts +2 -2
- package/src/com/controlresell/models/preferences/Preference.d.ts +54 -7
- package/src/com/controlresell/models/preferences/PreferenceFilter.d.ts +778 -0
- package/src/com/controlresell/models/preferences/PreferenceFilter.js +10 -0
- package/src/com/controlresell/models/preferences/PreferenceFilter.ts +9 -0
- package/src/com/controlresell/models/preferences/PreferenceWithCase.d.ts +244 -0
- package/src/com/controlresell/models/preferences/PreferenceWithCase.js +10 -0
- package/src/com/controlresell/models/preferences/PreferenceWithCase.ts +9 -0
- package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.d.ts +41 -0
- package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.js +12 -0
- package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.ts +11 -0
- package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +36 -3
- package/src/com/controlresell/models/preferences/cases/PreferenceCase.js +3 -1
- package/src/com/controlresell/models/preferences/cases/PreferenceCase.ts +3 -1
- package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.d.ts +26 -3
- package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.js +3 -1
- package/src/com/controlresell/models/preferences/cases/PreferenceCasePayload.ts +3 -1
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +13 -34
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.js +2 -2
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.ts +2 -2
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.d.ts +21 -0
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.js +11 -0
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.ts +10 -0
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.d.ts +15 -0
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.js +9 -0
- package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.ts +8 -0
- package/src/index.d.ts +5 -1
- package/src/index.js +12 -4
- package/src/index.ts +5 -1
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.d.ts +0 -27
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.js +0 -9
- package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionVariantPayload.ts +0 -8
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreferenceFilterSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const Item_1 = require("../items/Item");
|
|
6
|
+
const UserOnPlatform_1 = require("../users/platforms/UserOnPlatform");
|
|
7
|
+
exports.PreferenceFilterSchema = zod_1.z.object({
|
|
8
|
+
items: zod_1.z.array(Item_1.ItemSchema).nullish(),
|
|
9
|
+
accounts: zod_1.z.array(UserOnPlatform_1.UserOnPlatformSchema).nullish()
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {ItemSchema} from "../items/Item"
|
|
3
|
+
import {UserOnPlatformSchema} from "../users/platforms/UserOnPlatform"
|
|
4
|
+
|
|
5
|
+
export const PreferenceFilterSchema = z.object({
|
|
6
|
+
items: z.array(ItemSchema).nullish(),
|
|
7
|
+
accounts: z.array(UserOnPlatformSchema).nullish()
|
|
8
|
+
})
|
|
9
|
+
export type PreferenceFilter = z.infer<typeof PreferenceFilterSchema>
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PreferenceWithCaseSchema: z.ZodObject<{
|
|
3
|
+
preference: z.ZodObject<{
|
|
4
|
+
id: z.ZodString;
|
|
5
|
+
parentPreferenceId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
|
+
userId: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
|
|
7
|
+
type: z.ZodEnum<["NEGOTIATION", "VISION", "TITLE", "DESCRIPTION", "LIFECYCLE", "FEES", "MESSAGES_QUESTIONS", "MESSAGES_STREAM", "MESSAGES_STREAM__ON_FAVORITE", "MESSAGES_STREAM__ON_FAVORITES", "MESSAGES_STREAM__ON_LOW_OFFER", "MESSAGES_STREAM__ON_CORRECT_OFFER", "MESSAGES_STREAM__ON_OFFER_REJECTED", "MESSAGES_STREAM__ON_NO_ANSWER", "MESSAGES_STREAM__ON_BUYER_PAID", "MESSAGES_STREAM__ON_ITEM_DELIVERED", "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE"]>;
|
|
8
|
+
enabled: z.ZodBoolean;
|
|
9
|
+
testMode: z.ZodBoolean;
|
|
10
|
+
cases: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
11
|
+
id: z.ZodString;
|
|
12
|
+
preferenceId: z.ZodString;
|
|
13
|
+
savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
14
|
+
enabled: z.ZodBoolean;
|
|
15
|
+
testMode: z.ZodBoolean;
|
|
16
|
+
abTest: z.ZodBoolean;
|
|
17
|
+
variants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
caseId: z.ZodString;
|
|
20
|
+
name: z.ZodString;
|
|
21
|
+
weight: z.ZodNumber;
|
|
22
|
+
payload: z.ZodString;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
payload: string;
|
|
27
|
+
caseId: string;
|
|
28
|
+
weight: number;
|
|
29
|
+
}, {
|
|
30
|
+
id: string;
|
|
31
|
+
name: string;
|
|
32
|
+
payload: string;
|
|
33
|
+
caseId: string;
|
|
34
|
+
weight: number;
|
|
35
|
+
}>, "many">>>;
|
|
36
|
+
}, "strip", z.ZodTypeAny, {
|
|
37
|
+
id: string;
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
testMode: boolean;
|
|
40
|
+
preferenceId: string;
|
|
41
|
+
abTest: boolean;
|
|
42
|
+
savedFiltersId?: string | null | undefined;
|
|
43
|
+
variants?: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
payload: string;
|
|
47
|
+
caseId: string;
|
|
48
|
+
weight: number;
|
|
49
|
+
}[] | null | undefined;
|
|
50
|
+
}, {
|
|
51
|
+
id: string;
|
|
52
|
+
enabled: boolean;
|
|
53
|
+
testMode: boolean;
|
|
54
|
+
preferenceId: string;
|
|
55
|
+
abTest: boolean;
|
|
56
|
+
savedFiltersId?: string | null | undefined;
|
|
57
|
+
variants?: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
payload: string;
|
|
61
|
+
caseId: string;
|
|
62
|
+
weight: number;
|
|
63
|
+
}[] | null | undefined;
|
|
64
|
+
}>, "many">>>;
|
|
65
|
+
}, "strip", z.ZodTypeAny, {
|
|
66
|
+
type: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
|
|
67
|
+
id: string;
|
|
68
|
+
userId: string | number;
|
|
69
|
+
enabled: boolean;
|
|
70
|
+
testMode: boolean;
|
|
71
|
+
parentPreferenceId?: string | null | undefined;
|
|
72
|
+
cases?: {
|
|
73
|
+
id: string;
|
|
74
|
+
enabled: boolean;
|
|
75
|
+
testMode: boolean;
|
|
76
|
+
preferenceId: string;
|
|
77
|
+
abTest: boolean;
|
|
78
|
+
savedFiltersId?: string | null | undefined;
|
|
79
|
+
variants?: {
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
payload: string;
|
|
83
|
+
caseId: string;
|
|
84
|
+
weight: number;
|
|
85
|
+
}[] | null | undefined;
|
|
86
|
+
}[] | null | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
type: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
|
|
89
|
+
id: string;
|
|
90
|
+
userId: string | number;
|
|
91
|
+
enabled: boolean;
|
|
92
|
+
testMode: boolean;
|
|
93
|
+
parentPreferenceId?: string | null | undefined;
|
|
94
|
+
cases?: {
|
|
95
|
+
id: string;
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
testMode: boolean;
|
|
98
|
+
preferenceId: string;
|
|
99
|
+
abTest: boolean;
|
|
100
|
+
savedFiltersId?: string | null | undefined;
|
|
101
|
+
variants?: {
|
|
102
|
+
id: string;
|
|
103
|
+
name: string;
|
|
104
|
+
payload: string;
|
|
105
|
+
caseId: string;
|
|
106
|
+
weight: number;
|
|
107
|
+
}[] | null | undefined;
|
|
108
|
+
}[] | null | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
preferenceCase: z.ZodObject<{
|
|
111
|
+
id: z.ZodString;
|
|
112
|
+
preferenceId: z.ZodString;
|
|
113
|
+
savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
114
|
+
enabled: z.ZodBoolean;
|
|
115
|
+
testMode: z.ZodBoolean;
|
|
116
|
+
abTest: z.ZodBoolean;
|
|
117
|
+
variants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
caseId: z.ZodString;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
weight: z.ZodNumber;
|
|
122
|
+
payload: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
id: string;
|
|
125
|
+
name: string;
|
|
126
|
+
payload: string;
|
|
127
|
+
caseId: string;
|
|
128
|
+
weight: number;
|
|
129
|
+
}, {
|
|
130
|
+
id: string;
|
|
131
|
+
name: string;
|
|
132
|
+
payload: string;
|
|
133
|
+
caseId: string;
|
|
134
|
+
weight: number;
|
|
135
|
+
}>, "many">>>;
|
|
136
|
+
}, "strip", z.ZodTypeAny, {
|
|
137
|
+
id: string;
|
|
138
|
+
enabled: boolean;
|
|
139
|
+
testMode: boolean;
|
|
140
|
+
preferenceId: string;
|
|
141
|
+
abTest: boolean;
|
|
142
|
+
savedFiltersId?: string | null | undefined;
|
|
143
|
+
variants?: {
|
|
144
|
+
id: string;
|
|
145
|
+
name: string;
|
|
146
|
+
payload: string;
|
|
147
|
+
caseId: string;
|
|
148
|
+
weight: number;
|
|
149
|
+
}[] | null | undefined;
|
|
150
|
+
}, {
|
|
151
|
+
id: string;
|
|
152
|
+
enabled: boolean;
|
|
153
|
+
testMode: boolean;
|
|
154
|
+
preferenceId: string;
|
|
155
|
+
abTest: boolean;
|
|
156
|
+
savedFiltersId?: string | null | undefined;
|
|
157
|
+
variants?: {
|
|
158
|
+
id: string;
|
|
159
|
+
name: string;
|
|
160
|
+
payload: string;
|
|
161
|
+
caseId: string;
|
|
162
|
+
weight: number;
|
|
163
|
+
}[] | null | undefined;
|
|
164
|
+
}>;
|
|
165
|
+
}, "strip", z.ZodTypeAny, {
|
|
166
|
+
preference: {
|
|
167
|
+
type: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
|
|
168
|
+
id: string;
|
|
169
|
+
userId: string | number;
|
|
170
|
+
enabled: boolean;
|
|
171
|
+
testMode: boolean;
|
|
172
|
+
parentPreferenceId?: string | null | undefined;
|
|
173
|
+
cases?: {
|
|
174
|
+
id: string;
|
|
175
|
+
enabled: boolean;
|
|
176
|
+
testMode: boolean;
|
|
177
|
+
preferenceId: string;
|
|
178
|
+
abTest: boolean;
|
|
179
|
+
savedFiltersId?: string | null | undefined;
|
|
180
|
+
variants?: {
|
|
181
|
+
id: string;
|
|
182
|
+
name: string;
|
|
183
|
+
payload: string;
|
|
184
|
+
caseId: string;
|
|
185
|
+
weight: number;
|
|
186
|
+
}[] | null | undefined;
|
|
187
|
+
}[] | null | undefined;
|
|
188
|
+
};
|
|
189
|
+
preferenceCase: {
|
|
190
|
+
id: string;
|
|
191
|
+
enabled: boolean;
|
|
192
|
+
testMode: boolean;
|
|
193
|
+
preferenceId: string;
|
|
194
|
+
abTest: boolean;
|
|
195
|
+
savedFiltersId?: string | null | undefined;
|
|
196
|
+
variants?: {
|
|
197
|
+
id: string;
|
|
198
|
+
name: string;
|
|
199
|
+
payload: string;
|
|
200
|
+
caseId: string;
|
|
201
|
+
weight: number;
|
|
202
|
+
}[] | null | undefined;
|
|
203
|
+
};
|
|
204
|
+
}, {
|
|
205
|
+
preference: {
|
|
206
|
+
type: "TITLE" | "DESCRIPTION" | "NEGOTIATION" | "VISION" | "LIFECYCLE" | "FEES" | "MESSAGES_QUESTIONS" | "MESSAGES_STREAM" | "MESSAGES_STREAM__ON_FAVORITE" | "MESSAGES_STREAM__ON_FAVORITES" | "MESSAGES_STREAM__ON_LOW_OFFER" | "MESSAGES_STREAM__ON_CORRECT_OFFER" | "MESSAGES_STREAM__ON_OFFER_REJECTED" | "MESSAGES_STREAM__ON_NO_ANSWER" | "MESSAGES_STREAM__ON_BUYER_PAID" | "MESSAGES_STREAM__ON_ITEM_DELIVERED" | "MESSAGES_STREAM__ON_ITEM_NO_LONGER_AVAILABLE";
|
|
207
|
+
id: string;
|
|
208
|
+
userId: string | number;
|
|
209
|
+
enabled: boolean;
|
|
210
|
+
testMode: boolean;
|
|
211
|
+
parentPreferenceId?: string | null | undefined;
|
|
212
|
+
cases?: {
|
|
213
|
+
id: string;
|
|
214
|
+
enabled: boolean;
|
|
215
|
+
testMode: boolean;
|
|
216
|
+
preferenceId: string;
|
|
217
|
+
abTest: boolean;
|
|
218
|
+
savedFiltersId?: string | null | undefined;
|
|
219
|
+
variants?: {
|
|
220
|
+
id: string;
|
|
221
|
+
name: string;
|
|
222
|
+
payload: string;
|
|
223
|
+
caseId: string;
|
|
224
|
+
weight: number;
|
|
225
|
+
}[] | null | undefined;
|
|
226
|
+
}[] | null | undefined;
|
|
227
|
+
};
|
|
228
|
+
preferenceCase: {
|
|
229
|
+
id: string;
|
|
230
|
+
enabled: boolean;
|
|
231
|
+
testMode: boolean;
|
|
232
|
+
preferenceId: string;
|
|
233
|
+
abTest: boolean;
|
|
234
|
+
savedFiltersId?: string | null | undefined;
|
|
235
|
+
variants?: {
|
|
236
|
+
id: string;
|
|
237
|
+
name: string;
|
|
238
|
+
payload: string;
|
|
239
|
+
caseId: string;
|
|
240
|
+
weight: number;
|
|
241
|
+
}[] | null | undefined;
|
|
242
|
+
};
|
|
243
|
+
}>;
|
|
244
|
+
export type PreferenceWithCase = z.infer<typeof PreferenceWithCaseSchema>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreferenceWithCaseSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const Preference_1 = require("./Preference");
|
|
6
|
+
const PreferenceCase_1 = require("./cases/PreferenceCase");
|
|
7
|
+
exports.PreferenceWithCaseSchema = zod_1.z.object({
|
|
8
|
+
preference: Preference_1.PreferenceSchema,
|
|
9
|
+
preferenceCase: PreferenceCase_1.PreferenceCaseSchema
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {PreferenceSchema} from "./Preference"
|
|
3
|
+
import {PreferenceCaseSchema} from "./cases/PreferenceCase"
|
|
4
|
+
|
|
5
|
+
export const PreferenceWithCaseSchema = z.object({
|
|
6
|
+
preference: PreferenceSchema,
|
|
7
|
+
preferenceCase: PreferenceCaseSchema
|
|
8
|
+
})
|
|
9
|
+
export type PreferenceWithCase = z.infer<typeof PreferenceWithCaseSchema>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PartialPreferenceCasePayloadSchema: z.ZodObject<{
|
|
3
|
+
enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4
|
+
testMode: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
5
|
+
abTest: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
6
|
+
variants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
weight: z.ZodNumber;
|
|
9
|
+
payload: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
payload: string;
|
|
13
|
+
weight: number;
|
|
14
|
+
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
payload: string;
|
|
17
|
+
weight: number;
|
|
18
|
+
}>, "many">>>;
|
|
19
|
+
savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
enabled?: boolean | null | undefined;
|
|
22
|
+
testMode?: boolean | null | undefined;
|
|
23
|
+
savedFiltersId?: string | null | undefined;
|
|
24
|
+
abTest?: boolean | null | undefined;
|
|
25
|
+
variants?: {
|
|
26
|
+
name: string;
|
|
27
|
+
payload: string;
|
|
28
|
+
weight: number;
|
|
29
|
+
}[] | null | undefined;
|
|
30
|
+
}, {
|
|
31
|
+
enabled?: boolean | null | undefined;
|
|
32
|
+
testMode?: boolean | null | undefined;
|
|
33
|
+
savedFiltersId?: string | null | undefined;
|
|
34
|
+
abTest?: boolean | null | undefined;
|
|
35
|
+
variants?: {
|
|
36
|
+
name: string;
|
|
37
|
+
payload: string;
|
|
38
|
+
weight: number;
|
|
39
|
+
}[] | null | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
export type PartialPreferenceCasePayload = z.infer<typeof PartialPreferenceCasePayloadSchema>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PartialPreferenceCasePayloadSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const PreferenceCaseVariantPayload_1 = require("../variants/PreferenceCaseVariantPayload");
|
|
6
|
+
exports.PartialPreferenceCasePayloadSchema = zod_1.z.object({
|
|
7
|
+
enabled: zod_1.z.boolean().nullish(),
|
|
8
|
+
testMode: zod_1.z.boolean().nullish(),
|
|
9
|
+
abTest: zod_1.z.boolean().nullish(),
|
|
10
|
+
variants: zod_1.z.array(PreferenceCaseVariantPayload_1.PreferenceCaseVariantPayloadSchema).nullish(),
|
|
11
|
+
savedFiltersId: zod_1.z.string().uuid().nullish()
|
|
12
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
import {PreferenceCaseVariantPayloadSchema} from "../variants/PreferenceCaseVariantPayload"
|
|
3
|
+
|
|
4
|
+
export const PartialPreferenceCasePayloadSchema = z.object({
|
|
5
|
+
enabled: z.boolean().nullish(),
|
|
6
|
+
testMode: z.boolean().nullish(),
|
|
7
|
+
abTest: z.boolean().nullish(),
|
|
8
|
+
variants: z.array(PreferenceCaseVariantPayloadSchema).nullish(),
|
|
9
|
+
savedFiltersId: z.string().uuid().nullish()
|
|
10
|
+
})
|
|
11
|
+
export type PartialPreferenceCasePayload = z.infer<typeof PartialPreferenceCasePayloadSchema>
|
|
@@ -5,20 +5,53 @@ export declare const PreferenceCaseSchema: z.ZodObject<{
|
|
|
5
5
|
savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
6
6
|
enabled: z.ZodBoolean;
|
|
7
7
|
testMode: z.ZodBoolean;
|
|
8
|
-
|
|
8
|
+
abTest: z.ZodBoolean;
|
|
9
|
+
variants: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
caseId: z.ZodString;
|
|
12
|
+
name: z.ZodString;
|
|
13
|
+
weight: z.ZodNumber;
|
|
14
|
+
payload: z.ZodString;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
payload: string;
|
|
19
|
+
caseId: string;
|
|
20
|
+
weight: number;
|
|
21
|
+
}, {
|
|
22
|
+
id: string;
|
|
23
|
+
name: string;
|
|
24
|
+
payload: string;
|
|
25
|
+
caseId: string;
|
|
26
|
+
weight: number;
|
|
27
|
+
}>, "many">>>;
|
|
9
28
|
}, "strip", z.ZodTypeAny, {
|
|
10
29
|
id: string;
|
|
11
|
-
payload: string;
|
|
12
30
|
enabled: boolean;
|
|
13
31
|
testMode: boolean;
|
|
14
32
|
preferenceId: string;
|
|
33
|
+
abTest: boolean;
|
|
15
34
|
savedFiltersId?: string | null | undefined;
|
|
35
|
+
variants?: {
|
|
36
|
+
id: string;
|
|
37
|
+
name: string;
|
|
38
|
+
payload: string;
|
|
39
|
+
caseId: string;
|
|
40
|
+
weight: number;
|
|
41
|
+
}[] | null | undefined;
|
|
16
42
|
}, {
|
|
17
43
|
id: string;
|
|
18
|
-
payload: string;
|
|
19
44
|
enabled: boolean;
|
|
20
45
|
testMode: boolean;
|
|
21
46
|
preferenceId: string;
|
|
47
|
+
abTest: boolean;
|
|
22
48
|
savedFiltersId?: string | null | undefined;
|
|
49
|
+
variants?: {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
payload: string;
|
|
53
|
+
caseId: string;
|
|
54
|
+
weight: number;
|
|
55
|
+
}[] | null | undefined;
|
|
23
56
|
}>;
|
|
24
57
|
export type PreferenceCase = z.infer<typeof PreferenceCaseSchema>;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PreferenceCaseSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const PreferenceCaseVariant_1 = require("../variants/PreferenceCaseVariant");
|
|
5
6
|
exports.PreferenceCaseSchema = zod_1.z.object({
|
|
6
7
|
id: zod_1.z.string().uuid(),
|
|
7
8
|
preferenceId: zod_1.z.string().uuid(),
|
|
8
9
|
savedFiltersId: zod_1.z.string().uuid().nullish(),
|
|
9
10
|
enabled: zod_1.z.boolean(),
|
|
10
11
|
testMode: zod_1.z.boolean(),
|
|
11
|
-
|
|
12
|
+
abTest: zod_1.z.boolean(),
|
|
13
|
+
variants: zod_1.z.array(PreferenceCaseVariant_1.PreferenceCaseVariantSchema).nullish()
|
|
12
14
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
+
import {PreferenceCaseVariantSchema} from "../variants/PreferenceCaseVariant"
|
|
2
3
|
|
|
3
4
|
export const PreferenceCaseSchema = z.object({
|
|
4
5
|
id: z.string().uuid(),
|
|
@@ -6,6 +7,7 @@ export const PreferenceCaseSchema = z.object({
|
|
|
6
7
|
savedFiltersId: z.string().uuid().nullish(),
|
|
7
8
|
enabled: z.boolean(),
|
|
8
9
|
testMode: z.boolean(),
|
|
9
|
-
|
|
10
|
+
abTest: z.boolean(),
|
|
11
|
+
variants: z.array(PreferenceCaseVariantSchema).nullish()
|
|
10
12
|
})
|
|
11
13
|
export type PreferenceCase = z.infer<typeof PreferenceCaseSchema>
|
|
@@ -2,17 +2,40 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const PreferenceCasePayloadSchema: z.ZodObject<{
|
|
3
3
|
enabled: z.ZodBoolean;
|
|
4
4
|
testMode: z.ZodBoolean;
|
|
5
|
-
|
|
5
|
+
abTest: z.ZodBoolean;
|
|
6
|
+
variants: z.ZodArray<z.ZodObject<{
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
weight: z.ZodNumber;
|
|
9
|
+
payload: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
name: string;
|
|
12
|
+
payload: string;
|
|
13
|
+
weight: number;
|
|
14
|
+
}, {
|
|
15
|
+
name: string;
|
|
16
|
+
payload: string;
|
|
17
|
+
weight: number;
|
|
18
|
+
}>, "many">;
|
|
6
19
|
savedFiltersId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
7
20
|
}, "strip", z.ZodTypeAny, {
|
|
8
21
|
enabled: boolean;
|
|
9
22
|
testMode: boolean;
|
|
10
|
-
|
|
23
|
+
abTest: boolean;
|
|
24
|
+
variants: {
|
|
25
|
+
name: string;
|
|
26
|
+
payload: string;
|
|
27
|
+
weight: number;
|
|
28
|
+
}[];
|
|
11
29
|
savedFiltersId?: string | null | undefined;
|
|
12
30
|
}, {
|
|
13
31
|
enabled: boolean;
|
|
14
32
|
testMode: boolean;
|
|
15
|
-
|
|
33
|
+
abTest: boolean;
|
|
34
|
+
variants: {
|
|
35
|
+
name: string;
|
|
36
|
+
payload: string;
|
|
37
|
+
weight: number;
|
|
38
|
+
}[];
|
|
16
39
|
savedFiltersId?: string | null | undefined;
|
|
17
40
|
}>;
|
|
18
41
|
export type PreferenceCasePayload = z.infer<typeof PreferenceCasePayloadSchema>;
|
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PreferenceCasePayloadSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const PreferenceCaseVariantPayload_1 = require("../variants/PreferenceCaseVariantPayload");
|
|
5
6
|
exports.PreferenceCasePayloadSchema = zod_1.z.object({
|
|
6
7
|
enabled: zod_1.z.boolean(),
|
|
7
8
|
testMode: zod_1.z.boolean(),
|
|
8
|
-
|
|
9
|
+
abTest: zod_1.z.boolean(),
|
|
10
|
+
variants: zod_1.z.array(PreferenceCaseVariantPayload_1.PreferenceCaseVariantPayloadSchema),
|
|
9
11
|
savedFiltersId: zod_1.z.string().uuid().nullish()
|
|
10
12
|
});
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
+
import {PreferenceCaseVariantPayloadSchema} from "../variants/PreferenceCaseVariantPayload"
|
|
2
3
|
|
|
3
4
|
export const PreferenceCasePayloadSchema = z.object({
|
|
4
5
|
enabled: z.boolean(),
|
|
5
6
|
testMode: z.boolean(),
|
|
6
|
-
|
|
7
|
+
abTest: z.boolean(),
|
|
8
|
+
variants: z.array(PreferenceCaseVariantPayloadSchema),
|
|
7
9
|
savedFiltersId: z.string().uuid().nullish()
|
|
8
10
|
})
|
|
9
11
|
export type PreferenceCasePayload = z.infer<typeof PreferenceCasePayloadSchema>
|
package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts
CHANGED
|
@@ -1,45 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type: z.ZodEnum<["WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"]>;
|
|
7
|
-
payload: z.ZodString;
|
|
8
|
-
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
10
|
-
payload: string;
|
|
11
|
-
}, {
|
|
12
|
-
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
13
|
-
payload: string;
|
|
14
|
-
}>, "many">;
|
|
3
|
+
actions: z.ZodArray<z.ZodObject<{
|
|
4
|
+
type: z.ZodEnum<["WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"]>;
|
|
5
|
+
payload: z.ZodString;
|
|
15
6
|
}, "strip", z.ZodTypeAny, {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
19
|
-
payload: string;
|
|
20
|
-
}[];
|
|
7
|
+
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
8
|
+
payload: string;
|
|
21
9
|
}, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
25
|
-
payload: string;
|
|
26
|
-
}[];
|
|
10
|
+
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
11
|
+
payload: string;
|
|
27
12
|
}>, "many">;
|
|
28
13
|
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
33
|
-
payload: string;
|
|
34
|
-
}[];
|
|
14
|
+
actions: {
|
|
15
|
+
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
16
|
+
payload: string;
|
|
35
17
|
}[];
|
|
36
18
|
}, {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
41
|
-
payload: string;
|
|
42
|
-
}[];
|
|
19
|
+
actions: {
|
|
20
|
+
type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
|
|
21
|
+
payload: string;
|
|
43
22
|
}[];
|
|
44
23
|
}>;
|
|
45
24
|
export type PreferenceActionsPayload = z.infer<typeof PreferenceActionsPayloadSchema>;
|
package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PreferenceActionsPayloadSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const
|
|
5
|
+
const PreferenceActionPayload_1 = require("./PreferenceActionPayload");
|
|
6
6
|
exports.PreferenceActionsPayloadSchema = zod_1.z.object({
|
|
7
|
-
|
|
7
|
+
actions: zod_1.z.array(PreferenceActionPayload_1.PreferenceActionPayloadSchema)
|
|
8
8
|
});
|
package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
-
import {
|
|
2
|
+
import {PreferenceActionPayloadSchema} from "./PreferenceActionPayload"
|
|
3
3
|
|
|
4
4
|
export const PreferenceActionsPayloadSchema = z.object({
|
|
5
|
-
|
|
5
|
+
actions: z.array(PreferenceActionPayloadSchema)
|
|
6
6
|
})
|
|
7
7
|
export type PreferenceActionsPayload = z.infer<typeof PreferenceActionsPayloadSchema>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PreferenceCaseVariantSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodString;
|
|
4
|
+
caseId: z.ZodString;
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
weight: z.ZodNumber;
|
|
7
|
+
payload: z.ZodString;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
payload: string;
|
|
12
|
+
caseId: string;
|
|
13
|
+
weight: number;
|
|
14
|
+
}, {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
payload: string;
|
|
18
|
+
caseId: string;
|
|
19
|
+
weight: number;
|
|
20
|
+
}>;
|
|
21
|
+
export type PreferenceCaseVariant = z.infer<typeof PreferenceCaseVariantSchema>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PreferenceCaseVariantSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.PreferenceCaseVariantSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.string().uuid(),
|
|
7
|
+
caseId: zod_1.z.string().uuid(),
|
|
8
|
+
name: zod_1.z.string(),
|
|
9
|
+
weight: zod_1.z.number().int(),
|
|
10
|
+
payload: zod_1.z.string()
|
|
11
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import {z} from "zod"
|
|
2
|
+
|
|
3
|
+
export const PreferenceCaseVariantSchema = z.object({
|
|
4
|
+
id: z.string().uuid(),
|
|
5
|
+
caseId: z.string().uuid(),
|
|
6
|
+
name: z.string(),
|
|
7
|
+
weight: z.number().int(),
|
|
8
|
+
payload: z.string()
|
|
9
|
+
})
|
|
10
|
+
export type PreferenceCaseVariant = z.infer<typeof PreferenceCaseVariantSchema>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const PreferenceCaseVariantPayloadSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
weight: z.ZodNumber;
|
|
5
|
+
payload: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
name: string;
|
|
8
|
+
payload: string;
|
|
9
|
+
weight: number;
|
|
10
|
+
}, {
|
|
11
|
+
name: string;
|
|
12
|
+
payload: string;
|
|
13
|
+
weight: number;
|
|
14
|
+
}>;
|
|
15
|
+
export type PreferenceCaseVariantPayload = z.infer<typeof PreferenceCaseVariantPayloadSchema>;
|