controlresell 2.2.5 → 2.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/package.json +1 -1
  2. package/src/com/controlresell/models/preferences/Preference.d.ts +1155 -7
  3. package/src/com/controlresell/models/preferences/PreferenceWithCase.d.ts +3496 -19
  4. package/src/com/controlresell/models/preferences/PreferenceWithCase.js +3 -1
  5. package/src/com/controlresell/models/preferences/PreferenceWithCase.ts +3 -1
  6. package/src/com/controlresell/models/preferences/cases/CreatePreferenceCasePayload.d.ts +977 -5
  7. package/src/com/controlresell/models/preferences/cases/PartialPreferenceCasePayload.d.ts +977 -5
  8. package/src/com/controlresell/models/preferences/cases/PreferenceCase.d.ts +977 -5
  9. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts +241 -3
  10. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.js +2 -1
  11. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.ts +2 -1
  12. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.d.ts +165 -0
  13. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.js +29 -0
  14. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayloadDecodedPayload.ts +29 -0
  15. package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts +319 -5
  16. package/src/com/controlresell/models/preferences/variants/PartialPreferenceCaseVariantPayload.d.ts +799 -3
  17. package/src/com/controlresell/models/preferences/variants/PartialPreferenceCaseVariantPayload.js +2 -1
  18. package/src/com/controlresell/models/preferences/variants/PartialPreferenceCaseVariantPayload.ts +2 -1
  19. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.d.ts +799 -3
  20. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.js +2 -1
  21. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariant.ts +2 -1
  22. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.d.ts +623 -0
  23. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.js +34 -0
  24. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantDecodedPayload.ts +34 -0
  25. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.d.ts +799 -3
  26. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.js +2 -1
  27. package/src/com/controlresell/models/preferences/variants/PreferenceCaseVariantPayload.ts +2 -1
  28. package/src/index.d.ts +2 -0
  29. package/src/index.js +6 -2
  30. package/src/index.ts +2 -0
@@ -2,14 +2,252 @@ import { z } from "zod";
2
2
  export declare const PreferenceActionPayloadSchema: z.ZodObject<{
3
3
  type: z.ZodEnum<["WAIT", "PRICE_DROP", "REPUBLISH", "MESSAGE", "OFFER_AUTO"]>;
4
4
  enabled: z.ZodBoolean;
5
- payload: z.ZodString;
5
+ payload: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
6
+ type: z.ZodLiteral<"EMPTY">;
7
+ }, "strip", z.ZodTypeAny, {
8
+ type: "EMPTY";
9
+ }, {
10
+ type: "EMPTY";
11
+ }>, z.ZodObject<{
12
+ type: z.ZodLiteral<"WAIT">;
13
+ data: z.ZodObject<{
14
+ seconds: z.ZodNumber;
15
+ }, "strip", z.ZodTypeAny, {
16
+ seconds: number;
17
+ }, {
18
+ seconds: number;
19
+ }>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ type: "WAIT";
22
+ data: {
23
+ seconds: number;
24
+ };
25
+ }, {
26
+ type: "WAIT";
27
+ data: {
28
+ seconds: number;
29
+ };
30
+ }>, z.ZodObject<{
31
+ type: z.ZodLiteral<"PRICE">;
32
+ data: z.ZodObject<{
33
+ type: z.ZodEnum<["PERCENTAGE", "ABSOLUTE"]>;
34
+ value: z.ZodNumber;
35
+ roundType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["NEAREST", "UP", "DOWN", "CUSTOM"]>>>;
36
+ roundStep: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
37
+ negotiationProfile: z.ZodOptional<z.ZodNullable<z.ZodEnum<["AUTO", "MODERATE", "CONSERVATIVE"]>>>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ value: number;
40
+ type: "PERCENTAGE" | "ABSOLUTE";
41
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
42
+ roundStep?: number | null | undefined;
43
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
44
+ }, {
45
+ value: number;
46
+ type: "PERCENTAGE" | "ABSOLUTE";
47
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
48
+ roundStep?: number | null | undefined;
49
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
50
+ }>;
51
+ }, "strip", z.ZodTypeAny, {
52
+ type: "PRICE";
53
+ data: {
54
+ value: number;
55
+ type: "PERCENTAGE" | "ABSOLUTE";
56
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
57
+ roundStep?: number | null | undefined;
58
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
59
+ };
60
+ }, {
61
+ type: "PRICE";
62
+ data: {
63
+ value: number;
64
+ type: "PERCENTAGE" | "ABSOLUTE";
65
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
66
+ roundStep?: number | null | undefined;
67
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
68
+ };
69
+ }>, z.ZodObject<{
70
+ type: z.ZodLiteral<"VISION">;
71
+ data: z.ZodObject<{
72
+ doRemoveBackground: z.ZodBoolean;
73
+ doSmartCrop: z.ZodBoolean;
74
+ doChangeBackground: z.ZodBoolean;
75
+ doRotate: z.ZodBoolean;
76
+ doAddBorders: z.ZodBoolean;
77
+ shadow: z.ZodBoolean;
78
+ targetWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
79
+ targetHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
80
+ newBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ newBackgroundUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ rotationAngle: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
83
+ borderSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
84
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ doRemoveBackground: boolean;
87
+ doSmartCrop: boolean;
88
+ doChangeBackground: boolean;
89
+ doRotate: boolean;
90
+ doAddBorders: boolean;
91
+ shadow: boolean;
92
+ targetWidth?: number | null | undefined;
93
+ targetHeight?: number | null | undefined;
94
+ newBackgroundColor?: string | null | undefined;
95
+ newBackgroundUrl?: string | null | undefined;
96
+ rotationAngle?: number | null | undefined;
97
+ borderSize?: number | null | undefined;
98
+ borderColor?: string | null | undefined;
99
+ }, {
100
+ doRemoveBackground: boolean;
101
+ doSmartCrop: boolean;
102
+ doChangeBackground: boolean;
103
+ doRotate: boolean;
104
+ doAddBorders: boolean;
105
+ shadow: boolean;
106
+ targetWidth?: number | null | undefined;
107
+ targetHeight?: number | null | undefined;
108
+ newBackgroundColor?: string | null | undefined;
109
+ newBackgroundUrl?: string | null | undefined;
110
+ rotationAngle?: number | null | undefined;
111
+ borderSize?: number | null | undefined;
112
+ borderColor?: string | null | undefined;
113
+ }>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ type: "VISION";
116
+ data: {
117
+ doRemoveBackground: boolean;
118
+ doSmartCrop: boolean;
119
+ doChangeBackground: boolean;
120
+ doRotate: boolean;
121
+ doAddBorders: boolean;
122
+ shadow: boolean;
123
+ targetWidth?: number | null | undefined;
124
+ targetHeight?: number | null | undefined;
125
+ newBackgroundColor?: string | null | undefined;
126
+ newBackgroundUrl?: string | null | undefined;
127
+ rotationAngle?: number | null | undefined;
128
+ borderSize?: number | null | undefined;
129
+ borderColor?: string | null | undefined;
130
+ };
131
+ }, {
132
+ type: "VISION";
133
+ data: {
134
+ doRemoveBackground: boolean;
135
+ doSmartCrop: boolean;
136
+ doChangeBackground: boolean;
137
+ doRotate: boolean;
138
+ doAddBorders: boolean;
139
+ shadow: boolean;
140
+ targetWidth?: number | null | undefined;
141
+ targetHeight?: number | null | undefined;
142
+ newBackgroundColor?: string | null | undefined;
143
+ newBackgroundUrl?: string | null | undefined;
144
+ rotationAngle?: number | null | undefined;
145
+ borderSize?: number | null | undefined;
146
+ borderColor?: string | null | undefined;
147
+ };
148
+ }>, z.ZodObject<{
149
+ type: z.ZodLiteral<"TEXT">;
150
+ data: z.ZodObject<{
151
+ text: z.ZodString;
152
+ }, "strip", z.ZodTypeAny, {
153
+ text: string;
154
+ }, {
155
+ text: string;
156
+ }>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ type: "TEXT";
159
+ data: {
160
+ text: string;
161
+ };
162
+ }, {
163
+ type: "TEXT";
164
+ data: {
165
+ text: string;
166
+ };
167
+ }>]>;
6
168
  }, "strip", z.ZodTypeAny, {
7
169
  type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
8
- payload: string;
170
+ payload: {
171
+ type: "EMPTY";
172
+ } | {
173
+ type: "WAIT";
174
+ data: {
175
+ seconds: number;
176
+ };
177
+ } | {
178
+ type: "PRICE";
179
+ data: {
180
+ value: number;
181
+ type: "PERCENTAGE" | "ABSOLUTE";
182
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
183
+ roundStep?: number | null | undefined;
184
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
185
+ };
186
+ } | {
187
+ type: "VISION";
188
+ data: {
189
+ doRemoveBackground: boolean;
190
+ doSmartCrop: boolean;
191
+ doChangeBackground: boolean;
192
+ doRotate: boolean;
193
+ doAddBorders: boolean;
194
+ shadow: boolean;
195
+ targetWidth?: number | null | undefined;
196
+ targetHeight?: number | null | undefined;
197
+ newBackgroundColor?: string | null | undefined;
198
+ newBackgroundUrl?: string | null | undefined;
199
+ rotationAngle?: number | null | undefined;
200
+ borderSize?: number | null | undefined;
201
+ borderColor?: string | null | undefined;
202
+ };
203
+ } | {
204
+ type: "TEXT";
205
+ data: {
206
+ text: string;
207
+ };
208
+ };
9
209
  enabled: boolean;
10
210
  }, {
11
211
  type: "MESSAGE" | "WAIT" | "PRICE_DROP" | "REPUBLISH" | "OFFER_AUTO";
12
- payload: string;
212
+ payload: {
213
+ type: "EMPTY";
214
+ } | {
215
+ type: "WAIT";
216
+ data: {
217
+ seconds: number;
218
+ };
219
+ } | {
220
+ type: "PRICE";
221
+ data: {
222
+ value: number;
223
+ type: "PERCENTAGE" | "ABSOLUTE";
224
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
225
+ roundStep?: number | null | undefined;
226
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
227
+ };
228
+ } | {
229
+ type: "VISION";
230
+ data: {
231
+ doRemoveBackground: boolean;
232
+ doSmartCrop: boolean;
233
+ doChangeBackground: boolean;
234
+ doRotate: boolean;
235
+ doAddBorders: boolean;
236
+ shadow: boolean;
237
+ targetWidth?: number | null | undefined;
238
+ targetHeight?: number | null | undefined;
239
+ newBackgroundColor?: string | null | undefined;
240
+ newBackgroundUrl?: string | null | undefined;
241
+ rotationAngle?: number | null | undefined;
242
+ borderSize?: number | null | undefined;
243
+ borderColor?: string | null | undefined;
244
+ };
245
+ } | {
246
+ type: "TEXT";
247
+ data: {
248
+ text: string;
249
+ };
250
+ };
13
251
  enabled: boolean;
14
252
  }>;
15
253
  export type PreferenceActionPayload = z.infer<typeof PreferenceActionPayloadSchema>;
@@ -3,8 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PreferenceActionPayloadSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const PreferenceActionPayloadType_1 = require("./PreferenceActionPayloadType");
6
+ const PreferenceActionPayloadDecodedPayload_1 = require("./PreferenceActionPayloadDecodedPayload");
6
7
  exports.PreferenceActionPayloadSchema = zod_1.z.object({
7
8
  type: PreferenceActionPayloadType_1.PreferenceActionPayloadTypeSchema,
8
9
  enabled: zod_1.z.boolean(),
9
- payload: zod_1.z.string()
10
+ payload: PreferenceActionPayloadDecodedPayload_1.PreferenceActionPayloadDecodedPayloadSchema
10
11
  });
@@ -1,9 +1,10 @@
1
1
  import {z} from "zod"
2
2
  import {PreferenceActionPayloadTypeSchema} from "./PreferenceActionPayloadType"
3
+ import {PreferenceActionPayloadDecodedPayloadSchema} from "./PreferenceActionPayloadDecodedPayload"
3
4
 
4
5
  export const PreferenceActionPayloadSchema = z.object({
5
6
  type: PreferenceActionPayloadTypeSchema,
6
7
  enabled: z.boolean(),
7
- payload: z.string()
8
+ payload: PreferenceActionPayloadDecodedPayloadSchema
8
9
  })
9
10
  export type PreferenceActionPayload = z.infer<typeof PreferenceActionPayloadSchema>
@@ -0,0 +1,165 @@
1
+ import { z } from "zod";
2
+ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3
+ type: z.ZodLiteral<"EMPTY">;
4
+ }, "strip", z.ZodTypeAny, {
5
+ type: "EMPTY";
6
+ }, {
7
+ type: "EMPTY";
8
+ }>, z.ZodObject<{
9
+ type: z.ZodLiteral<"WAIT">;
10
+ data: z.ZodObject<{
11
+ seconds: z.ZodNumber;
12
+ }, "strip", z.ZodTypeAny, {
13
+ seconds: number;
14
+ }, {
15
+ seconds: number;
16
+ }>;
17
+ }, "strip", z.ZodTypeAny, {
18
+ type: "WAIT";
19
+ data: {
20
+ seconds: number;
21
+ };
22
+ }, {
23
+ type: "WAIT";
24
+ data: {
25
+ seconds: number;
26
+ };
27
+ }>, z.ZodObject<{
28
+ type: z.ZodLiteral<"PRICE">;
29
+ data: z.ZodObject<{
30
+ type: z.ZodEnum<["PERCENTAGE", "ABSOLUTE"]>;
31
+ value: z.ZodNumber;
32
+ roundType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["NEAREST", "UP", "DOWN", "CUSTOM"]>>>;
33
+ roundStep: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
34
+ negotiationProfile: z.ZodOptional<z.ZodNullable<z.ZodEnum<["AUTO", "MODERATE", "CONSERVATIVE"]>>>;
35
+ }, "strip", z.ZodTypeAny, {
36
+ value: number;
37
+ type: "PERCENTAGE" | "ABSOLUTE";
38
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
39
+ roundStep?: number | null | undefined;
40
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
41
+ }, {
42
+ value: number;
43
+ type: "PERCENTAGE" | "ABSOLUTE";
44
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
45
+ roundStep?: number | null | undefined;
46
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
47
+ }>;
48
+ }, "strip", z.ZodTypeAny, {
49
+ type: "PRICE";
50
+ data: {
51
+ value: number;
52
+ type: "PERCENTAGE" | "ABSOLUTE";
53
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
54
+ roundStep?: number | null | undefined;
55
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
56
+ };
57
+ }, {
58
+ type: "PRICE";
59
+ data: {
60
+ value: number;
61
+ type: "PERCENTAGE" | "ABSOLUTE";
62
+ roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
63
+ roundStep?: number | null | undefined;
64
+ negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
65
+ };
66
+ }>, z.ZodObject<{
67
+ type: z.ZodLiteral<"VISION">;
68
+ data: z.ZodObject<{
69
+ doRemoveBackground: z.ZodBoolean;
70
+ doSmartCrop: z.ZodBoolean;
71
+ doChangeBackground: z.ZodBoolean;
72
+ doRotate: z.ZodBoolean;
73
+ doAddBorders: z.ZodBoolean;
74
+ shadow: z.ZodBoolean;
75
+ targetWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
76
+ targetHeight: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
77
+ newBackgroundColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
78
+ newBackgroundUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ rotationAngle: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
80
+ borderSize: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
81
+ borderColor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ doRemoveBackground: boolean;
84
+ doSmartCrop: boolean;
85
+ doChangeBackground: boolean;
86
+ doRotate: boolean;
87
+ doAddBorders: boolean;
88
+ shadow: boolean;
89
+ targetWidth?: number | null | undefined;
90
+ targetHeight?: number | null | undefined;
91
+ newBackgroundColor?: string | null | undefined;
92
+ newBackgroundUrl?: string | null | undefined;
93
+ rotationAngle?: number | null | undefined;
94
+ borderSize?: number | null | undefined;
95
+ borderColor?: string | null | undefined;
96
+ }, {
97
+ doRemoveBackground: boolean;
98
+ doSmartCrop: boolean;
99
+ doChangeBackground: boolean;
100
+ doRotate: boolean;
101
+ doAddBorders: boolean;
102
+ shadow: boolean;
103
+ targetWidth?: number | null | undefined;
104
+ targetHeight?: number | null | undefined;
105
+ newBackgroundColor?: string | null | undefined;
106
+ newBackgroundUrl?: string | null | undefined;
107
+ rotationAngle?: number | null | undefined;
108
+ borderSize?: number | null | undefined;
109
+ borderColor?: string | null | undefined;
110
+ }>;
111
+ }, "strip", z.ZodTypeAny, {
112
+ type: "VISION";
113
+ data: {
114
+ doRemoveBackground: boolean;
115
+ doSmartCrop: boolean;
116
+ doChangeBackground: boolean;
117
+ doRotate: boolean;
118
+ doAddBorders: boolean;
119
+ shadow: boolean;
120
+ targetWidth?: number | null | undefined;
121
+ targetHeight?: number | null | undefined;
122
+ newBackgroundColor?: string | null | undefined;
123
+ newBackgroundUrl?: string | null | undefined;
124
+ rotationAngle?: number | null | undefined;
125
+ borderSize?: number | null | undefined;
126
+ borderColor?: string | null | undefined;
127
+ };
128
+ }, {
129
+ type: "VISION";
130
+ data: {
131
+ doRemoveBackground: boolean;
132
+ doSmartCrop: boolean;
133
+ doChangeBackground: boolean;
134
+ doRotate: boolean;
135
+ doAddBorders: boolean;
136
+ shadow: boolean;
137
+ targetWidth?: number | null | undefined;
138
+ targetHeight?: number | null | undefined;
139
+ newBackgroundColor?: string | null | undefined;
140
+ newBackgroundUrl?: string | null | undefined;
141
+ rotationAngle?: number | null | undefined;
142
+ borderSize?: number | null | undefined;
143
+ borderColor?: string | null | undefined;
144
+ };
145
+ }>, z.ZodObject<{
146
+ type: z.ZodLiteral<"TEXT">;
147
+ data: z.ZodObject<{
148
+ text: z.ZodString;
149
+ }, "strip", z.ZodTypeAny, {
150
+ text: string;
151
+ }, {
152
+ text: string;
153
+ }>;
154
+ }, "strip", z.ZodTypeAny, {
155
+ type: "TEXT";
156
+ data: {
157
+ text: string;
158
+ };
159
+ }, {
160
+ type: "TEXT";
161
+ data: {
162
+ text: string;
163
+ };
164
+ }>]>;
165
+ export type PreferenceActionPayloadDecodedPayload = z.infer<typeof PreferenceActionPayloadDecodedPayloadSchema>;
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PreferenceActionPayloadDecodedPayloadSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const PreferencePricePayload_1 = require("../prices/PreferencePricePayload");
6
+ const PreferenceVisionPayload_1 = require("../vision/PreferenceVisionPayload");
7
+ const PreferenceTextPayload_1 = require("../texts/PreferenceTextPayload");
8
+ const PreferenceWaitPayload_1 = require("../wait/PreferenceWaitPayload");
9
+ exports.PreferenceActionPayloadDecodedPayloadSchema = zod_1.z.discriminatedUnion("type", [
10
+ zod_1.z.object({
11
+ type: zod_1.z.literal("EMPTY"),
12
+ }),
13
+ zod_1.z.object({
14
+ type: zod_1.z.literal("WAIT"),
15
+ data: PreferenceWaitPayload_1.PreferenceWaitPayloadSchema,
16
+ }),
17
+ zod_1.z.object({
18
+ type: zod_1.z.literal("PRICE"),
19
+ data: PreferencePricePayload_1.PreferencePricePayloadSchema,
20
+ }),
21
+ zod_1.z.object({
22
+ type: zod_1.z.literal("VISION"),
23
+ data: PreferenceVisionPayload_1.PreferenceVisionPayloadSchema,
24
+ }),
25
+ zod_1.z.object({
26
+ type: zod_1.z.literal("TEXT"),
27
+ data: PreferenceTextPayload_1.PreferenceTextPayloadSchema,
28
+ }),
29
+ ]);
@@ -0,0 +1,29 @@
1
+ import {z} from "zod"
2
+
3
+ import {PreferencePricePayloadSchema} from "../prices/PreferencePricePayload"
4
+ import {PreferenceVisionPayloadSchema} from "../vision/PreferenceVisionPayload"
5
+ import {PreferenceTextPayloadSchema} from "../texts/PreferenceTextPayload"
6
+ import {PreferenceWaitPayloadSchema} from "../wait/PreferenceWaitPayload"
7
+
8
+ export const PreferenceActionPayloadDecodedPayloadSchema = z.discriminatedUnion("type", [
9
+ z.object({
10
+ type: z.literal("EMPTY"),
11
+ }),
12
+ z.object({
13
+ type: z.literal("WAIT"),
14
+ data: PreferenceWaitPayloadSchema,
15
+ }),
16
+ z.object({
17
+ type: z.literal("PRICE"),
18
+ data: PreferencePricePayloadSchema,
19
+ }),
20
+ z.object({
21
+ type: z.literal("VISION"),
22
+ data: PreferenceVisionPayloadSchema,
23
+ }),
24
+ z.object({
25
+ type: z.literal("TEXT"),
26
+ data: PreferenceTextPayloadSchema,
27
+ }),
28
+ ])
29
+ export type PreferenceActionPayloadDecodedPayload = z.infer<typeof PreferenceActionPayloadDecodedPayloadSchema>