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
package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionPayload.d.ts
CHANGED
|
@@ -9,26 +9,6 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
9
9
|
}, {
|
|
10
10
|
type: "EMPTY";
|
|
11
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
12
|
data: z.ZodObject<{
|
|
33
13
|
type: z.ZodEnum<["PERCENTAGE", "ABSOLUTE"]>;
|
|
34
14
|
value: z.ZodNumber;
|
|
@@ -48,6 +28,7 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
48
28
|
roundStep?: number | null | undefined;
|
|
49
29
|
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
50
30
|
}>;
|
|
31
|
+
type: z.ZodLiteral<"PRICE">;
|
|
51
32
|
}, "strip", z.ZodTypeAny, {
|
|
52
33
|
type: "PRICE";
|
|
53
34
|
data: {
|
|
@@ -67,7 +48,6 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
67
48
|
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
68
49
|
};
|
|
69
50
|
}>, z.ZodObject<{
|
|
70
|
-
type: z.ZodLiteral<"TEXT">;
|
|
71
51
|
data: z.ZodObject<{
|
|
72
52
|
text: z.ZodString;
|
|
73
53
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -75,6 +55,7 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
75
55
|
}, {
|
|
76
56
|
text: string;
|
|
77
57
|
}>;
|
|
58
|
+
type: z.ZodLiteral<"TEXT">;
|
|
78
59
|
}, "strip", z.ZodTypeAny, {
|
|
79
60
|
type: "TEXT";
|
|
80
61
|
data: {
|
|
@@ -85,17 +66,31 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
85
66
|
data: {
|
|
86
67
|
text: string;
|
|
87
68
|
};
|
|
69
|
+
}>, z.ZodObject<{
|
|
70
|
+
data: z.ZodObject<{
|
|
71
|
+
seconds: z.ZodNumber;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
seconds: number;
|
|
74
|
+
}, {
|
|
75
|
+
seconds: number;
|
|
76
|
+
}>;
|
|
77
|
+
type: z.ZodLiteral<"WAIT">;
|
|
78
|
+
}, "strip", z.ZodTypeAny, {
|
|
79
|
+
type: "WAIT";
|
|
80
|
+
data: {
|
|
81
|
+
seconds: number;
|
|
82
|
+
};
|
|
83
|
+
}, {
|
|
84
|
+
type: "WAIT";
|
|
85
|
+
data: {
|
|
86
|
+
seconds: number;
|
|
87
|
+
};
|
|
88
88
|
}>]>;
|
|
89
89
|
mandatory: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
90
90
|
}, "strip", z.ZodTypeAny, {
|
|
91
91
|
type: "MESSAGE" | "REPUBLISH" | "WAIT" | "PRICE_DROP" | "OFFER_AUTO" | "OFFER_MANUAL";
|
|
92
92
|
payload: {
|
|
93
93
|
type: "EMPTY";
|
|
94
|
-
} | {
|
|
95
|
-
type: "WAIT";
|
|
96
|
-
data: {
|
|
97
|
-
seconds: number;
|
|
98
|
-
};
|
|
99
94
|
} | {
|
|
100
95
|
type: "PRICE";
|
|
101
96
|
data: {
|
|
@@ -110,6 +105,11 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
110
105
|
data: {
|
|
111
106
|
text: string;
|
|
112
107
|
};
|
|
108
|
+
} | {
|
|
109
|
+
type: "WAIT";
|
|
110
|
+
data: {
|
|
111
|
+
seconds: number;
|
|
112
|
+
};
|
|
113
113
|
};
|
|
114
114
|
enabled: boolean;
|
|
115
115
|
mandatory?: boolean | null | undefined;
|
|
@@ -117,11 +117,6 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
117
117
|
type: "MESSAGE" | "REPUBLISH" | "WAIT" | "PRICE_DROP" | "OFFER_AUTO" | "OFFER_MANUAL";
|
|
118
118
|
payload: {
|
|
119
119
|
type: "EMPTY";
|
|
120
|
-
} | {
|
|
121
|
-
type: "WAIT";
|
|
122
|
-
data: {
|
|
123
|
-
seconds: number;
|
|
124
|
-
};
|
|
125
120
|
} | {
|
|
126
121
|
type: "PRICE";
|
|
127
122
|
data: {
|
|
@@ -136,6 +131,11 @@ export declare const PreferenceActionPayloadSchema: z.ZodObject<{
|
|
|
136
131
|
data: {
|
|
137
132
|
text: string;
|
|
138
133
|
};
|
|
134
|
+
} | {
|
|
135
|
+
type: "WAIT";
|
|
136
|
+
data: {
|
|
137
|
+
seconds: number;
|
|
138
|
+
};
|
|
139
139
|
};
|
|
140
140
|
enabled: boolean;
|
|
141
141
|
mandatory?: boolean | null | undefined;
|
|
@@ -1,12 +1,75 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const PreferenceActionPayloadDecodedPayloadEmptySchema: z.ZodObject<{
|
|
3
3
|
type: z.ZodLiteral<"EMPTY">;
|
|
4
4
|
}, "strip", z.ZodTypeAny, {
|
|
5
5
|
type: "EMPTY";
|
|
6
6
|
}, {
|
|
7
7
|
type: "EMPTY";
|
|
8
|
-
}
|
|
9
|
-
|
|
8
|
+
}>;
|
|
9
|
+
export type PreferenceActionPayloadDecodedPayloadEmpty = z.infer<typeof PreferenceActionPayloadDecodedPayloadEmptySchema>;
|
|
10
|
+
export declare const PreferenceActionPayloadDecodedPayloadPriceSchema: z.ZodObject<{
|
|
11
|
+
data: z.ZodObject<{
|
|
12
|
+
type: z.ZodEnum<["PERCENTAGE", "ABSOLUTE"]>;
|
|
13
|
+
value: z.ZodNumber;
|
|
14
|
+
roundType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["NEAREST", "UP", "DOWN", "CUSTOM"]>>>;
|
|
15
|
+
roundStep: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
16
|
+
negotiationProfile: z.ZodOptional<z.ZodNullable<z.ZodEnum<["AUTO", "MODERATE", "CONSERVATIVE"]>>>;
|
|
17
|
+
}, "strip", z.ZodTypeAny, {
|
|
18
|
+
value: number;
|
|
19
|
+
type: "PERCENTAGE" | "ABSOLUTE";
|
|
20
|
+
roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
|
|
21
|
+
roundStep?: number | null | undefined;
|
|
22
|
+
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
23
|
+
}, {
|
|
24
|
+
value: number;
|
|
25
|
+
type: "PERCENTAGE" | "ABSOLUTE";
|
|
26
|
+
roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
|
|
27
|
+
roundStep?: number | null | undefined;
|
|
28
|
+
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
type: z.ZodLiteral<"PRICE">;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
type: "PRICE";
|
|
33
|
+
data: {
|
|
34
|
+
value: number;
|
|
35
|
+
type: "PERCENTAGE" | "ABSOLUTE";
|
|
36
|
+
roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
|
|
37
|
+
roundStep?: number | null | undefined;
|
|
38
|
+
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
39
|
+
};
|
|
40
|
+
}, {
|
|
41
|
+
type: "PRICE";
|
|
42
|
+
data: {
|
|
43
|
+
value: number;
|
|
44
|
+
type: "PERCENTAGE" | "ABSOLUTE";
|
|
45
|
+
roundType?: "NEAREST" | "UP" | "DOWN" | "CUSTOM" | null | undefined;
|
|
46
|
+
roundStep?: number | null | undefined;
|
|
47
|
+
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
export type PreferenceActionPayloadDecodedPayloadPrice = z.infer<typeof PreferenceActionPayloadDecodedPayloadPriceSchema>;
|
|
51
|
+
export declare const PreferenceActionPayloadDecodedPayloadTextSchema: z.ZodObject<{
|
|
52
|
+
data: z.ZodObject<{
|
|
53
|
+
text: z.ZodString;
|
|
54
|
+
}, "strip", z.ZodTypeAny, {
|
|
55
|
+
text: string;
|
|
56
|
+
}, {
|
|
57
|
+
text: string;
|
|
58
|
+
}>;
|
|
59
|
+
type: z.ZodLiteral<"TEXT">;
|
|
60
|
+
}, "strip", z.ZodTypeAny, {
|
|
61
|
+
type: "TEXT";
|
|
62
|
+
data: {
|
|
63
|
+
text: string;
|
|
64
|
+
};
|
|
65
|
+
}, {
|
|
66
|
+
type: "TEXT";
|
|
67
|
+
data: {
|
|
68
|
+
text: string;
|
|
69
|
+
};
|
|
70
|
+
}>;
|
|
71
|
+
export type PreferenceActionPayloadDecodedPayloadText = z.infer<typeof PreferenceActionPayloadDecodedPayloadTextSchema>;
|
|
72
|
+
export declare const PreferenceActionPayloadDecodedPayloadWaitSchema: z.ZodObject<{
|
|
10
73
|
data: z.ZodObject<{
|
|
11
74
|
seconds: z.ZodNumber;
|
|
12
75
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -14,6 +77,7 @@ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscrimin
|
|
|
14
77
|
}, {
|
|
15
78
|
seconds: number;
|
|
16
79
|
}>;
|
|
80
|
+
type: z.ZodLiteral<"WAIT">;
|
|
17
81
|
}, "strip", z.ZodTypeAny, {
|
|
18
82
|
type: "WAIT";
|
|
19
83
|
data: {
|
|
@@ -24,8 +88,15 @@ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscrimin
|
|
|
24
88
|
data: {
|
|
25
89
|
seconds: number;
|
|
26
90
|
};
|
|
91
|
+
}>;
|
|
92
|
+
export type PreferenceActionPayloadDecodedPayloadWait = z.infer<typeof PreferenceActionPayloadDecodedPayloadWaitSchema>;
|
|
93
|
+
export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
94
|
+
type: z.ZodLiteral<"EMPTY">;
|
|
95
|
+
}, "strip", z.ZodTypeAny, {
|
|
96
|
+
type: "EMPTY";
|
|
97
|
+
}, {
|
|
98
|
+
type: "EMPTY";
|
|
27
99
|
}>, z.ZodObject<{
|
|
28
|
-
type: z.ZodLiteral<"PRICE">;
|
|
29
100
|
data: z.ZodObject<{
|
|
30
101
|
type: z.ZodEnum<["PERCENTAGE", "ABSOLUTE"]>;
|
|
31
102
|
value: z.ZodNumber;
|
|
@@ -45,6 +116,7 @@ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscrimin
|
|
|
45
116
|
roundStep?: number | null | undefined;
|
|
46
117
|
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
47
118
|
}>;
|
|
119
|
+
type: z.ZodLiteral<"PRICE">;
|
|
48
120
|
}, "strip", z.ZodTypeAny, {
|
|
49
121
|
type: "PRICE";
|
|
50
122
|
data: {
|
|
@@ -64,7 +136,6 @@ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscrimin
|
|
|
64
136
|
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
65
137
|
};
|
|
66
138
|
}>, z.ZodObject<{
|
|
67
|
-
type: z.ZodLiteral<"TEXT">;
|
|
68
139
|
data: z.ZodObject<{
|
|
69
140
|
text: z.ZodString;
|
|
70
141
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -72,6 +143,7 @@ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscrimin
|
|
|
72
143
|
}, {
|
|
73
144
|
text: string;
|
|
74
145
|
}>;
|
|
146
|
+
type: z.ZodLiteral<"TEXT">;
|
|
75
147
|
}, "strip", z.ZodTypeAny, {
|
|
76
148
|
type: "TEXT";
|
|
77
149
|
data: {
|
|
@@ -82,5 +154,24 @@ export declare const PreferenceActionPayloadDecodedPayloadSchema: z.ZodDiscrimin
|
|
|
82
154
|
data: {
|
|
83
155
|
text: string;
|
|
84
156
|
};
|
|
157
|
+
}>, z.ZodObject<{
|
|
158
|
+
data: z.ZodObject<{
|
|
159
|
+
seconds: z.ZodNumber;
|
|
160
|
+
}, "strip", z.ZodTypeAny, {
|
|
161
|
+
seconds: number;
|
|
162
|
+
}, {
|
|
163
|
+
seconds: number;
|
|
164
|
+
}>;
|
|
165
|
+
type: z.ZodLiteral<"WAIT">;
|
|
166
|
+
}, "strip", z.ZodTypeAny, {
|
|
167
|
+
type: "WAIT";
|
|
168
|
+
data: {
|
|
169
|
+
seconds: number;
|
|
170
|
+
};
|
|
171
|
+
}, {
|
|
172
|
+
type: "WAIT";
|
|
173
|
+
data: {
|
|
174
|
+
seconds: number;
|
|
175
|
+
};
|
|
85
176
|
}>]>;
|
|
86
177
|
export type PreferenceActionPayloadDecodedPayload = z.infer<typeof PreferenceActionPayloadDecodedPayloadSchema>;
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PreferenceActionPayloadDecodedPayloadSchema = void 0;
|
|
3
|
+
exports.PreferenceActionPayloadDecodedPayloadSchema = exports.PreferenceActionPayloadDecodedPayloadWaitSchema = exports.PreferenceActionPayloadDecodedPayloadTextSchema = exports.PreferenceActionPayloadDecodedPayloadPriceSchema = exports.PreferenceActionPayloadDecodedPayloadEmptySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const PreferencePricePayload_1 = require("../prices/PreferencePricePayload");
|
|
6
6
|
const PreferenceTextPayload_1 = require("../texts/PreferenceTextPayload");
|
|
7
7
|
const PreferenceWaitPayload_1 = require("../wait/PreferenceWaitPayload");
|
|
8
|
+
exports.PreferenceActionPayloadDecodedPayloadEmptySchema = zod_1.z.object({
|
|
9
|
+
type: zod_1.z.literal("EMPTY")
|
|
10
|
+
});
|
|
11
|
+
exports.PreferenceActionPayloadDecodedPayloadPriceSchema = zod_1.z.object({
|
|
12
|
+
data: PreferencePricePayload_1.PreferencePricePayloadSchema,
|
|
13
|
+
type: zod_1.z.literal("PRICE")
|
|
14
|
+
});
|
|
15
|
+
exports.PreferenceActionPayloadDecodedPayloadTextSchema = zod_1.z.object({
|
|
16
|
+
data: PreferenceTextPayload_1.PreferenceTextPayloadSchema,
|
|
17
|
+
type: zod_1.z.literal("TEXT")
|
|
18
|
+
});
|
|
19
|
+
exports.PreferenceActionPayloadDecodedPayloadWaitSchema = zod_1.z.object({
|
|
20
|
+
data: PreferenceWaitPayload_1.PreferenceWaitPayloadSchema,
|
|
21
|
+
type: zod_1.z.literal("WAIT")
|
|
22
|
+
});
|
|
8
23
|
exports.PreferenceActionPayloadDecodedPayloadSchema = zod_1.z.discriminatedUnion("type", [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: zod_1.z.literal("WAIT"),
|
|
14
|
-
data: PreferenceWaitPayload_1.PreferenceWaitPayloadSchema,
|
|
15
|
-
}),
|
|
16
|
-
zod_1.z.object({
|
|
17
|
-
type: zod_1.z.literal("PRICE"),
|
|
18
|
-
data: PreferencePricePayload_1.PreferencePricePayloadSchema,
|
|
19
|
-
}),
|
|
20
|
-
zod_1.z.object({
|
|
21
|
-
type: zod_1.z.literal("TEXT"),
|
|
22
|
-
data: PreferenceTextPayload_1.PreferenceTextPayloadSchema,
|
|
23
|
-
}),
|
|
24
|
+
exports.PreferenceActionPayloadDecodedPayloadEmptySchema,
|
|
25
|
+
exports.PreferenceActionPayloadDecodedPayloadPriceSchema,
|
|
26
|
+
exports.PreferenceActionPayloadDecodedPayloadTextSchema,
|
|
27
|
+
exports.PreferenceActionPayloadDecodedPayloadWaitSchema
|
|
24
28
|
]);
|
|
@@ -1,24 +1,35 @@
|
|
|
1
1
|
import {z} from "zod"
|
|
2
|
-
|
|
3
2
|
import {PreferencePricePayloadSchema} from "../prices/PreferencePricePayload"
|
|
4
3
|
import {PreferenceTextPayloadSchema} from "../texts/PreferenceTextPayload"
|
|
5
4
|
import {PreferenceWaitPayloadSchema} from "../wait/PreferenceWaitPayload"
|
|
6
5
|
|
|
6
|
+
export const PreferenceActionPayloadDecodedPayloadEmptySchema = z.object({
|
|
7
|
+
type: z.literal("EMPTY")
|
|
8
|
+
})
|
|
9
|
+
export type PreferenceActionPayloadDecodedPayloadEmpty = z.infer<typeof PreferenceActionPayloadDecodedPayloadEmptySchema>
|
|
10
|
+
|
|
11
|
+
export const PreferenceActionPayloadDecodedPayloadPriceSchema = z.object({
|
|
12
|
+
data: PreferencePricePayloadSchema,
|
|
13
|
+
type: z.literal("PRICE")
|
|
14
|
+
})
|
|
15
|
+
export type PreferenceActionPayloadDecodedPayloadPrice = z.infer<typeof PreferenceActionPayloadDecodedPayloadPriceSchema>
|
|
16
|
+
|
|
17
|
+
export const PreferenceActionPayloadDecodedPayloadTextSchema = z.object({
|
|
18
|
+
data: PreferenceTextPayloadSchema,
|
|
19
|
+
type: z.literal("TEXT")
|
|
20
|
+
})
|
|
21
|
+
export type PreferenceActionPayloadDecodedPayloadText = z.infer<typeof PreferenceActionPayloadDecodedPayloadTextSchema>
|
|
22
|
+
|
|
23
|
+
export const PreferenceActionPayloadDecodedPayloadWaitSchema = z.object({
|
|
24
|
+
data: PreferenceWaitPayloadSchema,
|
|
25
|
+
type: z.literal("WAIT")
|
|
26
|
+
})
|
|
27
|
+
export type PreferenceActionPayloadDecodedPayloadWait = z.infer<typeof PreferenceActionPayloadDecodedPayloadWaitSchema>
|
|
28
|
+
|
|
7
29
|
export const PreferenceActionPayloadDecodedPayloadSchema = z.discriminatedUnion("type", [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
type: z.literal("WAIT"),
|
|
13
|
-
data: PreferenceWaitPayloadSchema,
|
|
14
|
-
}),
|
|
15
|
-
z.object({
|
|
16
|
-
type: z.literal("PRICE"),
|
|
17
|
-
data: PreferencePricePayloadSchema,
|
|
18
|
-
}),
|
|
19
|
-
z.object({
|
|
20
|
-
type: z.literal("TEXT"),
|
|
21
|
-
data: PreferenceTextPayloadSchema,
|
|
22
|
-
}),
|
|
30
|
+
PreferenceActionPayloadDecodedPayloadEmptySchema,
|
|
31
|
+
PreferenceActionPayloadDecodedPayloadPriceSchema,
|
|
32
|
+
PreferenceActionPayloadDecodedPayloadTextSchema,
|
|
33
|
+
PreferenceActionPayloadDecodedPayloadWaitSchema
|
|
23
34
|
])
|
|
24
35
|
export type PreferenceActionPayloadDecodedPayload = z.infer<typeof PreferenceActionPayloadDecodedPayloadSchema>
|
package/src/com/controlresell/models/preferences/payloads/actions/PreferenceActionsPayload.d.ts
CHANGED
|
@@ -10,26 +10,6 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
10
10
|
}, {
|
|
11
11
|
type: "EMPTY";
|
|
12
12
|
}>, z.ZodObject<{
|
|
13
|
-
type: z.ZodLiteral<"WAIT">;
|
|
14
|
-
data: z.ZodObject<{
|
|
15
|
-
seconds: z.ZodNumber;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
seconds: number;
|
|
18
|
-
}, {
|
|
19
|
-
seconds: number;
|
|
20
|
-
}>;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
type: "WAIT";
|
|
23
|
-
data: {
|
|
24
|
-
seconds: number;
|
|
25
|
-
};
|
|
26
|
-
}, {
|
|
27
|
-
type: "WAIT";
|
|
28
|
-
data: {
|
|
29
|
-
seconds: number;
|
|
30
|
-
};
|
|
31
|
-
}>, z.ZodObject<{
|
|
32
|
-
type: z.ZodLiteral<"PRICE">;
|
|
33
13
|
data: z.ZodObject<{
|
|
34
14
|
type: z.ZodEnum<["PERCENTAGE", "ABSOLUTE"]>;
|
|
35
15
|
value: z.ZodNumber;
|
|
@@ -49,6 +29,7 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
49
29
|
roundStep?: number | null | undefined;
|
|
50
30
|
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
51
31
|
}>;
|
|
32
|
+
type: z.ZodLiteral<"PRICE">;
|
|
52
33
|
}, "strip", z.ZodTypeAny, {
|
|
53
34
|
type: "PRICE";
|
|
54
35
|
data: {
|
|
@@ -68,7 +49,6 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
68
49
|
negotiationProfile?: "AUTO" | "MODERATE" | "CONSERVATIVE" | null | undefined;
|
|
69
50
|
};
|
|
70
51
|
}>, z.ZodObject<{
|
|
71
|
-
type: z.ZodLiteral<"TEXT">;
|
|
72
52
|
data: z.ZodObject<{
|
|
73
53
|
text: z.ZodString;
|
|
74
54
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -76,6 +56,7 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
76
56
|
}, {
|
|
77
57
|
text: string;
|
|
78
58
|
}>;
|
|
59
|
+
type: z.ZodLiteral<"TEXT">;
|
|
79
60
|
}, "strip", z.ZodTypeAny, {
|
|
80
61
|
type: "TEXT";
|
|
81
62
|
data: {
|
|
@@ -86,17 +67,31 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
86
67
|
data: {
|
|
87
68
|
text: string;
|
|
88
69
|
};
|
|
70
|
+
}>, z.ZodObject<{
|
|
71
|
+
data: z.ZodObject<{
|
|
72
|
+
seconds: z.ZodNumber;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
seconds: number;
|
|
75
|
+
}, {
|
|
76
|
+
seconds: number;
|
|
77
|
+
}>;
|
|
78
|
+
type: z.ZodLiteral<"WAIT">;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
type: "WAIT";
|
|
81
|
+
data: {
|
|
82
|
+
seconds: number;
|
|
83
|
+
};
|
|
84
|
+
}, {
|
|
85
|
+
type: "WAIT";
|
|
86
|
+
data: {
|
|
87
|
+
seconds: number;
|
|
88
|
+
};
|
|
89
89
|
}>]>;
|
|
90
90
|
mandatory: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
91
91
|
}, "strip", z.ZodTypeAny, {
|
|
92
92
|
type: "MESSAGE" | "REPUBLISH" | "WAIT" | "PRICE_DROP" | "OFFER_AUTO" | "OFFER_MANUAL";
|
|
93
93
|
payload: {
|
|
94
94
|
type: "EMPTY";
|
|
95
|
-
} | {
|
|
96
|
-
type: "WAIT";
|
|
97
|
-
data: {
|
|
98
|
-
seconds: number;
|
|
99
|
-
};
|
|
100
95
|
} | {
|
|
101
96
|
type: "PRICE";
|
|
102
97
|
data: {
|
|
@@ -111,6 +106,11 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
111
106
|
data: {
|
|
112
107
|
text: string;
|
|
113
108
|
};
|
|
109
|
+
} | {
|
|
110
|
+
type: "WAIT";
|
|
111
|
+
data: {
|
|
112
|
+
seconds: number;
|
|
113
|
+
};
|
|
114
114
|
};
|
|
115
115
|
enabled: boolean;
|
|
116
116
|
mandatory?: boolean | null | undefined;
|
|
@@ -118,11 +118,6 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
118
118
|
type: "MESSAGE" | "REPUBLISH" | "WAIT" | "PRICE_DROP" | "OFFER_AUTO" | "OFFER_MANUAL";
|
|
119
119
|
payload: {
|
|
120
120
|
type: "EMPTY";
|
|
121
|
-
} | {
|
|
122
|
-
type: "WAIT";
|
|
123
|
-
data: {
|
|
124
|
-
seconds: number;
|
|
125
|
-
};
|
|
126
121
|
} | {
|
|
127
122
|
type: "PRICE";
|
|
128
123
|
data: {
|
|
@@ -137,6 +132,11 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
137
132
|
data: {
|
|
138
133
|
text: string;
|
|
139
134
|
};
|
|
135
|
+
} | {
|
|
136
|
+
type: "WAIT";
|
|
137
|
+
data: {
|
|
138
|
+
seconds: number;
|
|
139
|
+
};
|
|
140
140
|
};
|
|
141
141
|
enabled: boolean;
|
|
142
142
|
mandatory?: boolean | null | undefined;
|
|
@@ -146,11 +146,6 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
146
146
|
type: "MESSAGE" | "REPUBLISH" | "WAIT" | "PRICE_DROP" | "OFFER_AUTO" | "OFFER_MANUAL";
|
|
147
147
|
payload: {
|
|
148
148
|
type: "EMPTY";
|
|
149
|
-
} | {
|
|
150
|
-
type: "WAIT";
|
|
151
|
-
data: {
|
|
152
|
-
seconds: number;
|
|
153
|
-
};
|
|
154
149
|
} | {
|
|
155
150
|
type: "PRICE";
|
|
156
151
|
data: {
|
|
@@ -165,6 +160,11 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
165
160
|
data: {
|
|
166
161
|
text: string;
|
|
167
162
|
};
|
|
163
|
+
} | {
|
|
164
|
+
type: "WAIT";
|
|
165
|
+
data: {
|
|
166
|
+
seconds: number;
|
|
167
|
+
};
|
|
168
168
|
};
|
|
169
169
|
enabled: boolean;
|
|
170
170
|
mandatory?: boolean | null | undefined;
|
|
@@ -174,11 +174,6 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
174
174
|
type: "MESSAGE" | "REPUBLISH" | "WAIT" | "PRICE_DROP" | "OFFER_AUTO" | "OFFER_MANUAL";
|
|
175
175
|
payload: {
|
|
176
176
|
type: "EMPTY";
|
|
177
|
-
} | {
|
|
178
|
-
type: "WAIT";
|
|
179
|
-
data: {
|
|
180
|
-
seconds: number;
|
|
181
|
-
};
|
|
182
177
|
} | {
|
|
183
178
|
type: "PRICE";
|
|
184
179
|
data: {
|
|
@@ -193,6 +188,11 @@ export declare const PreferenceActionsPayloadSchema: z.ZodObject<{
|
|
|
193
188
|
data: {
|
|
194
189
|
text: string;
|
|
195
190
|
};
|
|
191
|
+
} | {
|
|
192
|
+
type: "WAIT";
|
|
193
|
+
data: {
|
|
194
|
+
seconds: number;
|
|
195
|
+
};
|
|
196
196
|
};
|
|
197
197
|
enabled: boolean;
|
|
198
198
|
mandatory?: boolean | null | undefined;
|