@medusajs/medusa 3.0.0-snapshot-20251114155958 → 3.0.0-snapshot-20251126221441
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/dist/api/admin/draft-orders/[id]/edit/promotions/route.d.ts.map +1 -1
- package/dist/api/admin/draft-orders/[id]/edit/promotions/route.js.map +1 -1
- package/dist/api/admin/draft-orders/query-config.d.ts.map +1 -1
- package/dist/api/admin/draft-orders/query-config.js +2 -0
- package/dist/api/admin/draft-orders/query-config.js.map +1 -1
- package/dist/api/admin/orders/query-config.d.ts.map +1 -1
- package/dist/api/admin/orders/query-config.js +1 -0
- package/dist/api/admin/orders/query-config.js.map +1 -1
- package/dist/api/admin/price-lists/[id]/prices/batch/route.js +2 -2
- package/dist/api/admin/price-lists/[id]/prices/batch/route.js.map +1 -1
- package/dist/api/admin/price-lists/[id]/prices/route.d.ts +4 -0
- package/dist/api/admin/price-lists/[id]/prices/route.d.ts.map +1 -0
- package/dist/api/admin/price-lists/[id]/prices/route.js +24 -0
- package/dist/api/admin/price-lists/[id]/prices/route.js.map +1 -0
- package/dist/api/admin/price-lists/middlewares.d.ts.map +1 -1
- package/dist/api/admin/price-lists/middlewares.js +10 -3
- package/dist/api/admin/price-lists/middlewares.js.map +1 -1
- package/dist/api/admin/price-lists/query-config.d.ts +1 -1
- package/dist/api/admin/price-lists/query-config.d.ts.map +1 -1
- package/dist/api/admin/price-lists/query-config.js +4 -4
- package/dist/api/admin/price-lists/query-config.js.map +1 -1
- package/dist/api/admin/price-lists/validators.d.ts +20 -0
- package/dist/api/admin/price-lists/validators.d.ts.map +1 -1
- package/dist/api/admin/price-lists/validators.js +6 -2
- package/dist/api/admin/price-lists/validators.js.map +1 -1
- package/dist/api/admin/product-categories/middlewares.d.ts.map +1 -1
- package/dist/api/admin/product-categories/middlewares.js +1 -0
- package/dist/api/admin/product-categories/middlewares.js.map +1 -1
- package/dist/api/admin/product-tags/middlewares.d.ts.map +1 -1
- package/dist/api/admin/product-tags/middlewares.js +1 -0
- package/dist/api/admin/product-tags/middlewares.js.map +1 -1
- package/dist/api/admin/products/[id]/options/[option_id]/route.d.ts +6 -0
- package/dist/api/admin/products/[id]/options/[option_id]/route.d.ts.map +1 -0
- package/dist/api/admin/products/[id]/options/[option_id]/route.js +60 -0
- package/dist/api/admin/products/[id]/options/[option_id]/route.js.map +1 -0
- package/dist/api/admin/products/[id]/options/route.d.ts +2 -2
- package/dist/api/admin/products/[id]/options/route.d.ts.map +1 -1
- package/dist/api/admin/products/[id]/options/route.js +11 -5
- package/dist/api/admin/products/[id]/options/route.js.map +1 -1
- package/dist/api/admin/products/middlewares.d.ts.map +1 -1
- package/dist/api/admin/products/middlewares.js +24 -1
- package/dist/api/admin/products/middlewares.js.map +1 -1
- package/dist/api/admin/products/validators.d.ts +55 -122
- package/dist/api/admin/products/validators.d.ts.map +1 -1
- package/dist/api/admin/products/validators.js +7 -34
- package/dist/api/admin/products/validators.js.map +1 -1
- package/dist/api/admin/views/[entity]/columns/helpers.d.ts.map +1 -1
- package/dist/api/admin/views/[entity]/columns/helpers.js +10 -3
- package/dist/api/admin/views/[entity]/columns/helpers.js.map +1 -1
- package/dist/api/admin/workflows-executions/[workflow_id]/steps/failure/route.d.ts.map +1 -1
- package/dist/api/admin/workflows-executions/[workflow_id]/steps/failure/route.js +2 -0
- package/dist/api/admin/workflows-executions/[workflow_id]/steps/failure/route.js.map +1 -1
- package/dist/api/middlewares.d.ts.map +1 -1
- package/dist/api/middlewares.js +86 -88
- package/dist/api/middlewares.js.map +1 -1
- package/dist/api/store/orders/query-config.d.ts.map +1 -1
- package/dist/api/store/orders/query-config.js +2 -0
- package/dist/api/store/orders/query-config.js.map +1 -1
- package/dist/api/store/product-variants/validators.d.ts +4 -4
- package/dist/api/store/products/middlewares.d.ts.map +1 -1
- package/dist/api/store/products/middlewares.js +27 -13
- package/dist/api/store/products/middlewares.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +53 -53
- package/dist/api/admin/product-options/[id]/route.d.ts +0 -7
- package/dist/api/admin/product-options/[id]/route.d.ts.map +0 -1
- package/dist/api/admin/product-options/[id]/route.js +0 -44
- package/dist/api/admin/product-options/[id]/route.js.map +0 -1
- package/dist/api/admin/product-options/middlewares.d.ts +0 -3
- package/dist/api/admin/product-options/middlewares.d.ts.map +0 -1
- package/dist/api/admin/product-options/middlewares.js +0 -76
- package/dist/api/admin/product-options/middlewares.js.map +0 -1
- package/dist/api/admin/product-options/query-config.d.ts +0 -11
- package/dist/api/admin/product-options/query-config.d.ts.map +0 -1
- package/dist/api/admin/product-options/query-config.js +0 -23
- package/dist/api/admin/product-options/query-config.js.map +0 -1
- package/dist/api/admin/product-options/route.d.ts +0 -5
- package/dist/api/admin/product-options/route.d.ts.map +0 -1
- package/dist/api/admin/product-options/route.js +0 -36
- package/dist/api/admin/product-options/route.js.map +0 -1
- package/dist/api/admin/product-options/validators.d.ts +0 -486
- package/dist/api/admin/product-options/validators.d.ts.map +0 -1
- package/dist/api/admin/product-options/validators.js +0 -41
- package/dist/api/admin/product-options/validators.js.map +0 -1
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POST = exports.GET = void 0;
|
|
4
|
-
const core_flows_1 = require("@medusajs/core-flows");
|
|
5
|
-
const utils_1 = require("@medusajs/framework/utils");
|
|
6
|
-
const GET = async (req, res) => {
|
|
7
|
-
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
8
|
-
const { data: product_options, metadata } = await query.graph({
|
|
9
|
-
entity: "product_option",
|
|
10
|
-
filters: req.filterableFields,
|
|
11
|
-
fields: req.queryConfig.fields,
|
|
12
|
-
pagination: req.queryConfig.pagination,
|
|
13
|
-
});
|
|
14
|
-
res.json({
|
|
15
|
-
product_options,
|
|
16
|
-
count: metadata.count,
|
|
17
|
-
offset: metadata.skip,
|
|
18
|
-
limit: metadata.take,
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
exports.GET = GET;
|
|
22
|
-
const POST = async (req, res) => {
|
|
23
|
-
const input = [req.validatedBody];
|
|
24
|
-
const { result } = await (0, core_flows_1.createProductOptionsWorkflow)(req.scope).run({
|
|
25
|
-
input: { product_options: input },
|
|
26
|
-
});
|
|
27
|
-
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
28
|
-
const { data: [productOption], } = await query.graph({
|
|
29
|
-
entity: "product_option",
|
|
30
|
-
filters: { id: result[0].id },
|
|
31
|
-
fields: req.queryConfig.fields,
|
|
32
|
-
});
|
|
33
|
-
res.status(200).json({ product_option: productOption });
|
|
34
|
-
};
|
|
35
|
-
exports.POST = POST;
|
|
36
|
-
//# sourceMappingURL=route.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/api/admin/product-options/route.ts"],"names":[],"mappings":";;;AAKA,qDAAmE;AAEnE,qDAAqE;AAE9D,MAAM,GAAG,GAAG,KAAK,EACtB,GAAuE,EACvE,GAA6D,EAC7D,EAAE;IACF,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,iCAAyB,CAAC,KAAK,CAAC,CAAA;IAChE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC;QAC5D,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,GAAG,CAAC,gBAAgB;QAC7B,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,MAAM;QAC9B,UAAU,EAAE,GAAG,CAAC,WAAW,CAAC,UAAU;KACvC,CAAC,CAAA;IAEF,GAAG,CAAC,IAAI,CAAC;QACP,eAAe;QACf,KAAK,EAAE,QAAS,CAAC,KAAK;QACtB,MAAM,EAAE,QAAS,CAAC,IAAI;QACtB,KAAK,EAAE,QAAS,CAAC,IAAI;KACtB,CAAC,CAAA;AACJ,CAAC,CAAA;AAlBY,QAAA,GAAG,OAkBf;AAEM,MAAM,IAAI,GAAG,KAAK,EACvB,GAAmE,EACnE,GAAyD,EACzD,EAAE;IACF,MAAM,KAAK,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,CAAA;IAEjC,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,IAAA,yCAA4B,EAAC,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC;QACnE,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,EAAE;KAClC,CAAC,CAAA;IAEF,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,iCAAyB,CAAC,KAAK,CAAC,CAAA;IAChE,MAAM,EACJ,IAAI,EAAE,CAAC,aAAa,CAAC,GACtB,GAAG,MAAM,KAAK,CAAC,KAAK,CAAC;QACpB,MAAM,EAAE,gBAAgB;QACxB,OAAO,EAAE,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;QAC7B,MAAM,EAAE,GAAG,CAAC,WAAW,CAAC,MAAM;KAC/B,CAAC,CAAA;IAEF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,CAAA;AACzD,CAAC,CAAA;AApBY,QAAA,IAAI,QAoBhB"}
|
|
@@ -1,486 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export type AdminGetProductOptionParamsType = z.infer<typeof AdminGetProductOptionParams>;
|
|
3
|
-
export declare const AdminGetProductOptionParams: z.ZodObject<{
|
|
4
|
-
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
-
}, "strip", z.ZodTypeAny, {
|
|
6
|
-
fields?: string | undefined;
|
|
7
|
-
}, {
|
|
8
|
-
fields?: string | undefined;
|
|
9
|
-
}>;
|
|
10
|
-
export declare const AdminGetProductOptionsParamsFields: z.ZodObject<{
|
|
11
|
-
q: z.ZodOptional<z.ZodString>;
|
|
12
|
-
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
13
|
-
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
14
|
-
is_exclusive: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodString]>, string | boolean, string | boolean>, boolean, string | boolean>>;
|
|
15
|
-
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
16
|
-
$eq: any;
|
|
17
|
-
$ne: any;
|
|
18
|
-
$in: any;
|
|
19
|
-
$nin: any;
|
|
20
|
-
$like: any;
|
|
21
|
-
$ilike: any;
|
|
22
|
-
$re: any;
|
|
23
|
-
$contains: any;
|
|
24
|
-
$gt: any;
|
|
25
|
-
$gte: any;
|
|
26
|
-
$lt: any;
|
|
27
|
-
$lte: any;
|
|
28
|
-
}, "strip", z.ZodTypeAny, {
|
|
29
|
-
$eq?: any;
|
|
30
|
-
$ne?: any;
|
|
31
|
-
$in?: any;
|
|
32
|
-
$nin?: any;
|
|
33
|
-
$like?: any;
|
|
34
|
-
$ilike?: any;
|
|
35
|
-
$re?: any;
|
|
36
|
-
$contains?: any;
|
|
37
|
-
$gt?: any;
|
|
38
|
-
$gte?: any;
|
|
39
|
-
$lt?: any;
|
|
40
|
-
$lte?: any;
|
|
41
|
-
}, {
|
|
42
|
-
$eq?: any;
|
|
43
|
-
$ne?: any;
|
|
44
|
-
$in?: any;
|
|
45
|
-
$nin?: any;
|
|
46
|
-
$like?: any;
|
|
47
|
-
$ilike?: any;
|
|
48
|
-
$re?: any;
|
|
49
|
-
$contains?: any;
|
|
50
|
-
$gt?: any;
|
|
51
|
-
$gte?: any;
|
|
52
|
-
$lt?: any;
|
|
53
|
-
$lte?: any;
|
|
54
|
-
}>]>>;
|
|
55
|
-
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
56
|
-
$eq: any;
|
|
57
|
-
$ne: any;
|
|
58
|
-
$in: any;
|
|
59
|
-
$nin: any;
|
|
60
|
-
$like: any;
|
|
61
|
-
$ilike: any;
|
|
62
|
-
$re: any;
|
|
63
|
-
$contains: any;
|
|
64
|
-
$gt: any;
|
|
65
|
-
$gte: any;
|
|
66
|
-
$lt: any;
|
|
67
|
-
$lte: any;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
$eq?: any;
|
|
70
|
-
$ne?: any;
|
|
71
|
-
$in?: any;
|
|
72
|
-
$nin?: any;
|
|
73
|
-
$like?: any;
|
|
74
|
-
$ilike?: any;
|
|
75
|
-
$re?: any;
|
|
76
|
-
$contains?: any;
|
|
77
|
-
$gt?: any;
|
|
78
|
-
$gte?: any;
|
|
79
|
-
$lt?: any;
|
|
80
|
-
$lte?: any;
|
|
81
|
-
}, {
|
|
82
|
-
$eq?: any;
|
|
83
|
-
$ne?: any;
|
|
84
|
-
$in?: any;
|
|
85
|
-
$nin?: any;
|
|
86
|
-
$like?: any;
|
|
87
|
-
$ilike?: any;
|
|
88
|
-
$re?: any;
|
|
89
|
-
$contains?: any;
|
|
90
|
-
$gt?: any;
|
|
91
|
-
$gte?: any;
|
|
92
|
-
$lt?: any;
|
|
93
|
-
$lte?: any;
|
|
94
|
-
}>]>>;
|
|
95
|
-
deleted_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
96
|
-
$eq: any;
|
|
97
|
-
$ne: any;
|
|
98
|
-
$in: any;
|
|
99
|
-
$nin: any;
|
|
100
|
-
$like: any;
|
|
101
|
-
$ilike: any;
|
|
102
|
-
$re: any;
|
|
103
|
-
$contains: any;
|
|
104
|
-
$gt: any;
|
|
105
|
-
$gte: any;
|
|
106
|
-
$lt: any;
|
|
107
|
-
$lte: any;
|
|
108
|
-
}, "strip", z.ZodTypeAny, {
|
|
109
|
-
$eq?: any;
|
|
110
|
-
$ne?: any;
|
|
111
|
-
$in?: any;
|
|
112
|
-
$nin?: any;
|
|
113
|
-
$like?: any;
|
|
114
|
-
$ilike?: any;
|
|
115
|
-
$re?: any;
|
|
116
|
-
$contains?: any;
|
|
117
|
-
$gt?: any;
|
|
118
|
-
$gte?: any;
|
|
119
|
-
$lt?: any;
|
|
120
|
-
$lte?: any;
|
|
121
|
-
}, {
|
|
122
|
-
$eq?: any;
|
|
123
|
-
$ne?: any;
|
|
124
|
-
$in?: any;
|
|
125
|
-
$nin?: any;
|
|
126
|
-
$like?: any;
|
|
127
|
-
$ilike?: any;
|
|
128
|
-
$re?: any;
|
|
129
|
-
$contains?: any;
|
|
130
|
-
$gt?: any;
|
|
131
|
-
$gte?: any;
|
|
132
|
-
$lt?: any;
|
|
133
|
-
$lte?: any;
|
|
134
|
-
}>]>>;
|
|
135
|
-
}, "strip", z.ZodTypeAny, {
|
|
136
|
-
id?: string | string[] | undefined;
|
|
137
|
-
created_at?: any;
|
|
138
|
-
updated_at?: any;
|
|
139
|
-
deleted_at?: any;
|
|
140
|
-
title?: string | string[] | undefined;
|
|
141
|
-
q?: string | undefined;
|
|
142
|
-
is_exclusive?: boolean | undefined;
|
|
143
|
-
}, {
|
|
144
|
-
id?: string | string[] | undefined;
|
|
145
|
-
created_at?: any;
|
|
146
|
-
updated_at?: any;
|
|
147
|
-
deleted_at?: any;
|
|
148
|
-
title?: string | string[] | undefined;
|
|
149
|
-
q?: string | undefined;
|
|
150
|
-
is_exclusive?: string | boolean | undefined;
|
|
151
|
-
}>;
|
|
152
|
-
export declare const AdminGetProductOptionsParams: z.ZodObject<{} & {
|
|
153
|
-
[x: string]: any;
|
|
154
|
-
$and: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
|
|
155
|
-
q: z.ZodOptional<z.ZodString>;
|
|
156
|
-
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
157
|
-
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
158
|
-
is_exclusive: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodString]>, string | boolean, string | boolean>, boolean, string | boolean>>;
|
|
159
|
-
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
160
|
-
$eq: any;
|
|
161
|
-
$ne: any;
|
|
162
|
-
$in: any;
|
|
163
|
-
$nin: any;
|
|
164
|
-
$like: any;
|
|
165
|
-
$ilike: any;
|
|
166
|
-
$re: any;
|
|
167
|
-
$contains: any;
|
|
168
|
-
$gt: any;
|
|
169
|
-
$gte: any;
|
|
170
|
-
$lt: any;
|
|
171
|
-
$lte: any;
|
|
172
|
-
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
$eq?: any;
|
|
174
|
-
$ne?: any;
|
|
175
|
-
$in?: any;
|
|
176
|
-
$nin?: any;
|
|
177
|
-
$like?: any;
|
|
178
|
-
$ilike?: any;
|
|
179
|
-
$re?: any;
|
|
180
|
-
$contains?: any;
|
|
181
|
-
$gt?: any;
|
|
182
|
-
$gte?: any;
|
|
183
|
-
$lt?: any;
|
|
184
|
-
$lte?: any;
|
|
185
|
-
}, {
|
|
186
|
-
$eq?: any;
|
|
187
|
-
$ne?: any;
|
|
188
|
-
$in?: any;
|
|
189
|
-
$nin?: any;
|
|
190
|
-
$like?: any;
|
|
191
|
-
$ilike?: any;
|
|
192
|
-
$re?: any;
|
|
193
|
-
$contains?: any;
|
|
194
|
-
$gt?: any;
|
|
195
|
-
$gte?: any;
|
|
196
|
-
$lt?: any;
|
|
197
|
-
$lte?: any;
|
|
198
|
-
}>]>>;
|
|
199
|
-
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
200
|
-
$eq: any;
|
|
201
|
-
$ne: any;
|
|
202
|
-
$in: any;
|
|
203
|
-
$nin: any;
|
|
204
|
-
$like: any;
|
|
205
|
-
$ilike: any;
|
|
206
|
-
$re: any;
|
|
207
|
-
$contains: any;
|
|
208
|
-
$gt: any;
|
|
209
|
-
$gte: any;
|
|
210
|
-
$lt: any;
|
|
211
|
-
$lte: any;
|
|
212
|
-
}, "strip", z.ZodTypeAny, {
|
|
213
|
-
$eq?: any;
|
|
214
|
-
$ne?: any;
|
|
215
|
-
$in?: any;
|
|
216
|
-
$nin?: any;
|
|
217
|
-
$like?: any;
|
|
218
|
-
$ilike?: any;
|
|
219
|
-
$re?: any;
|
|
220
|
-
$contains?: any;
|
|
221
|
-
$gt?: any;
|
|
222
|
-
$gte?: any;
|
|
223
|
-
$lt?: any;
|
|
224
|
-
$lte?: any;
|
|
225
|
-
}, {
|
|
226
|
-
$eq?: any;
|
|
227
|
-
$ne?: any;
|
|
228
|
-
$in?: any;
|
|
229
|
-
$nin?: any;
|
|
230
|
-
$like?: any;
|
|
231
|
-
$ilike?: any;
|
|
232
|
-
$re?: any;
|
|
233
|
-
$contains?: any;
|
|
234
|
-
$gt?: any;
|
|
235
|
-
$gte?: any;
|
|
236
|
-
$lt?: any;
|
|
237
|
-
$lte?: any;
|
|
238
|
-
}>]>>;
|
|
239
|
-
deleted_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
240
|
-
$eq: any;
|
|
241
|
-
$ne: any;
|
|
242
|
-
$in: any;
|
|
243
|
-
$nin: any;
|
|
244
|
-
$like: any;
|
|
245
|
-
$ilike: any;
|
|
246
|
-
$re: any;
|
|
247
|
-
$contains: any;
|
|
248
|
-
$gt: any;
|
|
249
|
-
$gte: any;
|
|
250
|
-
$lt: any;
|
|
251
|
-
$lte: any;
|
|
252
|
-
}, "strip", z.ZodTypeAny, {
|
|
253
|
-
$eq?: any;
|
|
254
|
-
$ne?: any;
|
|
255
|
-
$in?: any;
|
|
256
|
-
$nin?: any;
|
|
257
|
-
$like?: any;
|
|
258
|
-
$ilike?: any;
|
|
259
|
-
$re?: any;
|
|
260
|
-
$contains?: any;
|
|
261
|
-
$gt?: any;
|
|
262
|
-
$gte?: any;
|
|
263
|
-
$lt?: any;
|
|
264
|
-
$lte?: any;
|
|
265
|
-
}, {
|
|
266
|
-
$eq?: any;
|
|
267
|
-
$ne?: any;
|
|
268
|
-
$in?: any;
|
|
269
|
-
$nin?: any;
|
|
270
|
-
$like?: any;
|
|
271
|
-
$ilike?: any;
|
|
272
|
-
$re?: any;
|
|
273
|
-
$contains?: any;
|
|
274
|
-
$gt?: any;
|
|
275
|
-
$gte?: any;
|
|
276
|
-
$lt?: any;
|
|
277
|
-
$lte?: any;
|
|
278
|
-
}>]>>;
|
|
279
|
-
}, "strip", z.ZodTypeAny, {
|
|
280
|
-
id?: string | string[] | undefined;
|
|
281
|
-
created_at?: any;
|
|
282
|
-
updated_at?: any;
|
|
283
|
-
deleted_at?: any;
|
|
284
|
-
title?: string | string[] | undefined;
|
|
285
|
-
q?: string | undefined;
|
|
286
|
-
is_exclusive?: boolean | undefined;
|
|
287
|
-
}, {
|
|
288
|
-
id?: string | string[] | undefined;
|
|
289
|
-
created_at?: any;
|
|
290
|
-
updated_at?: any;
|
|
291
|
-
deleted_at?: any;
|
|
292
|
-
title?: string | string[] | undefined;
|
|
293
|
-
q?: string | undefined;
|
|
294
|
-
is_exclusive?: string | boolean | undefined;
|
|
295
|
-
}>, "many">>>;
|
|
296
|
-
$or: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
|
|
297
|
-
q: z.ZodOptional<z.ZodString>;
|
|
298
|
-
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
299
|
-
title: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
300
|
-
is_exclusive: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodUnion<[z.ZodBoolean, z.ZodString]>, string | boolean, string | boolean>, boolean, string | boolean>>;
|
|
301
|
-
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
302
|
-
$eq: any;
|
|
303
|
-
$ne: any;
|
|
304
|
-
$in: any;
|
|
305
|
-
$nin: any;
|
|
306
|
-
$like: any;
|
|
307
|
-
$ilike: any;
|
|
308
|
-
$re: any;
|
|
309
|
-
$contains: any;
|
|
310
|
-
$gt: any;
|
|
311
|
-
$gte: any;
|
|
312
|
-
$lt: any;
|
|
313
|
-
$lte: any;
|
|
314
|
-
}, "strip", z.ZodTypeAny, {
|
|
315
|
-
$eq?: any;
|
|
316
|
-
$ne?: any;
|
|
317
|
-
$in?: any;
|
|
318
|
-
$nin?: any;
|
|
319
|
-
$like?: any;
|
|
320
|
-
$ilike?: any;
|
|
321
|
-
$re?: any;
|
|
322
|
-
$contains?: any;
|
|
323
|
-
$gt?: any;
|
|
324
|
-
$gte?: any;
|
|
325
|
-
$lt?: any;
|
|
326
|
-
$lte?: any;
|
|
327
|
-
}, {
|
|
328
|
-
$eq?: any;
|
|
329
|
-
$ne?: any;
|
|
330
|
-
$in?: any;
|
|
331
|
-
$nin?: any;
|
|
332
|
-
$like?: any;
|
|
333
|
-
$ilike?: any;
|
|
334
|
-
$re?: any;
|
|
335
|
-
$contains?: any;
|
|
336
|
-
$gt?: any;
|
|
337
|
-
$gte?: any;
|
|
338
|
-
$lt?: any;
|
|
339
|
-
$lte?: any;
|
|
340
|
-
}>]>>;
|
|
341
|
-
updated_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
342
|
-
$eq: any;
|
|
343
|
-
$ne: any;
|
|
344
|
-
$in: any;
|
|
345
|
-
$nin: any;
|
|
346
|
-
$like: any;
|
|
347
|
-
$ilike: any;
|
|
348
|
-
$re: any;
|
|
349
|
-
$contains: any;
|
|
350
|
-
$gt: any;
|
|
351
|
-
$gte: any;
|
|
352
|
-
$lt: any;
|
|
353
|
-
$lte: any;
|
|
354
|
-
}, "strip", z.ZodTypeAny, {
|
|
355
|
-
$eq?: any;
|
|
356
|
-
$ne?: any;
|
|
357
|
-
$in?: any;
|
|
358
|
-
$nin?: any;
|
|
359
|
-
$like?: any;
|
|
360
|
-
$ilike?: any;
|
|
361
|
-
$re?: any;
|
|
362
|
-
$contains?: any;
|
|
363
|
-
$gt?: any;
|
|
364
|
-
$gte?: any;
|
|
365
|
-
$lt?: any;
|
|
366
|
-
$lte?: any;
|
|
367
|
-
}, {
|
|
368
|
-
$eq?: any;
|
|
369
|
-
$ne?: any;
|
|
370
|
-
$in?: any;
|
|
371
|
-
$nin?: any;
|
|
372
|
-
$like?: any;
|
|
373
|
-
$ilike?: any;
|
|
374
|
-
$re?: any;
|
|
375
|
-
$contains?: any;
|
|
376
|
-
$gt?: any;
|
|
377
|
-
$gte?: any;
|
|
378
|
-
$lt?: any;
|
|
379
|
-
$lte?: any;
|
|
380
|
-
}>]>>;
|
|
381
|
-
deleted_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
382
|
-
$eq: any;
|
|
383
|
-
$ne: any;
|
|
384
|
-
$in: any;
|
|
385
|
-
$nin: any;
|
|
386
|
-
$like: any;
|
|
387
|
-
$ilike: any;
|
|
388
|
-
$re: any;
|
|
389
|
-
$contains: any;
|
|
390
|
-
$gt: any;
|
|
391
|
-
$gte: any;
|
|
392
|
-
$lt: any;
|
|
393
|
-
$lte: any;
|
|
394
|
-
}, "strip", z.ZodTypeAny, {
|
|
395
|
-
$eq?: any;
|
|
396
|
-
$ne?: any;
|
|
397
|
-
$in?: any;
|
|
398
|
-
$nin?: any;
|
|
399
|
-
$like?: any;
|
|
400
|
-
$ilike?: any;
|
|
401
|
-
$re?: any;
|
|
402
|
-
$contains?: any;
|
|
403
|
-
$gt?: any;
|
|
404
|
-
$gte?: any;
|
|
405
|
-
$lt?: any;
|
|
406
|
-
$lte?: any;
|
|
407
|
-
}, {
|
|
408
|
-
$eq?: any;
|
|
409
|
-
$ne?: any;
|
|
410
|
-
$in?: any;
|
|
411
|
-
$nin?: any;
|
|
412
|
-
$like?: any;
|
|
413
|
-
$ilike?: any;
|
|
414
|
-
$re?: any;
|
|
415
|
-
$contains?: any;
|
|
416
|
-
$gt?: any;
|
|
417
|
-
$gte?: any;
|
|
418
|
-
$lt?: any;
|
|
419
|
-
$lte?: any;
|
|
420
|
-
}>]>>;
|
|
421
|
-
}, "strip", z.ZodTypeAny, {
|
|
422
|
-
id?: string | string[] | undefined;
|
|
423
|
-
created_at?: any;
|
|
424
|
-
updated_at?: any;
|
|
425
|
-
deleted_at?: any;
|
|
426
|
-
title?: string | string[] | undefined;
|
|
427
|
-
q?: string | undefined;
|
|
428
|
-
is_exclusive?: boolean | undefined;
|
|
429
|
-
}, {
|
|
430
|
-
id?: string | string[] | undefined;
|
|
431
|
-
created_at?: any;
|
|
432
|
-
updated_at?: any;
|
|
433
|
-
deleted_at?: any;
|
|
434
|
-
title?: string | string[] | undefined;
|
|
435
|
-
q?: string | undefined;
|
|
436
|
-
is_exclusive?: string | boolean | undefined;
|
|
437
|
-
}>, "many">>>;
|
|
438
|
-
}, "strip", z.ZodTypeAny, {
|
|
439
|
-
[x: string]: any;
|
|
440
|
-
$and?: unknown;
|
|
441
|
-
$or?: unknown;
|
|
442
|
-
}, {
|
|
443
|
-
[x: string]: any;
|
|
444
|
-
$and?: unknown;
|
|
445
|
-
$or?: unknown;
|
|
446
|
-
}>;
|
|
447
|
-
export declare const AdminCreateProductOption: z.ZodObject<{
|
|
448
|
-
title: z.ZodString;
|
|
449
|
-
values: z.ZodArray<z.ZodString, "many">;
|
|
450
|
-
ranks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
451
|
-
is_exclusive: z.ZodOptional<z.ZodBoolean>;
|
|
452
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
453
|
-
}, "strict", z.ZodTypeAny, {
|
|
454
|
-
values: string[];
|
|
455
|
-
title: string;
|
|
456
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
457
|
-
is_exclusive?: boolean | undefined;
|
|
458
|
-
ranks?: Record<string, number> | undefined;
|
|
459
|
-
}, {
|
|
460
|
-
values: string[];
|
|
461
|
-
title: string;
|
|
462
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
463
|
-
is_exclusive?: boolean | undefined;
|
|
464
|
-
ranks?: Record<string, number> | undefined;
|
|
465
|
-
}>;
|
|
466
|
-
export type AdminUpdateProductOptionType = z.infer<typeof AdminUpdateProductOption>;
|
|
467
|
-
export declare const AdminUpdateProductOption: z.ZodObject<{
|
|
468
|
-
title: z.ZodOptional<z.ZodString>;
|
|
469
|
-
values: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
470
|
-
ranks: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
471
|
-
is_exclusive: z.ZodOptional<z.ZodBoolean>;
|
|
472
|
-
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
473
|
-
}, "strict", z.ZodTypeAny, {
|
|
474
|
-
values?: string[] | undefined;
|
|
475
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
476
|
-
title?: string | undefined;
|
|
477
|
-
is_exclusive?: boolean | undefined;
|
|
478
|
-
ranks?: Record<string, number> | undefined;
|
|
479
|
-
}, {
|
|
480
|
-
values?: string[] | undefined;
|
|
481
|
-
metadata?: Record<string, unknown> | null | undefined;
|
|
482
|
-
title?: string | undefined;
|
|
483
|
-
is_exclusive?: boolean | undefined;
|
|
484
|
-
ranks?: Record<string, number> | undefined;
|
|
485
|
-
}>;
|
|
486
|
-
//# sourceMappingURL=validators.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../../src/api/admin/product-options/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAWvB,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CACnD,OAAO,2BAA2B,CACnC,CAAA;AACD,eAAO,MAAM,2BAA2B;;;;;;EAAuB,CAAA;AAE/D,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ7C,CAAA;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK2B,CAAA;AAEpE,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAQ1B,CAAA;AAEX,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAChD,OAAO,wBAAwB,CAChC,CAAA;AACD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;EAQ1B,CAAA"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AdminUpdateProductOption = exports.AdminCreateProductOption = exports.AdminGetProductOptionsParams = exports.AdminGetProductOptionsParamsFields = exports.AdminGetProductOptionParams = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const validators_1 = require("../../utils/validators");
|
|
6
|
-
const common_validators_1 = require("../../utils/common-validators");
|
|
7
|
-
exports.AdminGetProductOptionParams = (0, validators_1.createSelectParams)();
|
|
8
|
-
exports.AdminGetProductOptionsParamsFields = zod_1.z.object({
|
|
9
|
-
q: zod_1.z.string().optional(),
|
|
10
|
-
id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
11
|
-
title: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
12
|
-
is_exclusive: (0, common_validators_1.booleanString)().optional(),
|
|
13
|
-
created_at: (0, validators_1.createOperatorMap)().optional(),
|
|
14
|
-
updated_at: (0, validators_1.createOperatorMap)().optional(),
|
|
15
|
-
deleted_at: (0, validators_1.createOperatorMap)().optional(),
|
|
16
|
-
});
|
|
17
|
-
exports.AdminGetProductOptionsParams = (0, validators_1.createFindParams)({
|
|
18
|
-
limit: 20,
|
|
19
|
-
offset: 0,
|
|
20
|
-
})
|
|
21
|
-
.merge(exports.AdminGetProductOptionsParamsFields)
|
|
22
|
-
.merge((0, common_validators_1.applyAndAndOrOperators)(exports.AdminGetProductOptionsParamsFields));
|
|
23
|
-
exports.AdminCreateProductOption = zod_1.z
|
|
24
|
-
.object({
|
|
25
|
-
title: zod_1.z.string(),
|
|
26
|
-
values: zod_1.z.array(zod_1.z.string()),
|
|
27
|
-
ranks: zod_1.z.record(zod_1.z.number()).optional(),
|
|
28
|
-
is_exclusive: zod_1.z.boolean().optional(),
|
|
29
|
-
metadata: zod_1.z.record(zod_1.z.unknown()).nullish(),
|
|
30
|
-
})
|
|
31
|
-
.strict();
|
|
32
|
-
exports.AdminUpdateProductOption = zod_1.z
|
|
33
|
-
.object({
|
|
34
|
-
title: zod_1.z.string().optional(),
|
|
35
|
-
values: zod_1.z.array(zod_1.z.string()).optional(),
|
|
36
|
-
ranks: zod_1.z.record(zod_1.z.number()).optional(),
|
|
37
|
-
is_exclusive: zod_1.z.boolean().optional(),
|
|
38
|
-
metadata: zod_1.z.record(zod_1.z.unknown()).nullish(),
|
|
39
|
-
})
|
|
40
|
-
.strict();
|
|
41
|
-
//# sourceMappingURL=validators.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../src/api/admin/product-options/validators.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,uDAI+B;AAC/B,qEAGsC;AAKzB,QAAA,2BAA2B,GAAG,IAAA,+BAAkB,GAAE,CAAA;AAElD,QAAA,kCAAkC,GAAG,OAAC,CAAC,MAAM,CAAC;IACzD,CAAC,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxB,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACzD,KAAK,EAAE,OAAC,CAAC,KAAK,CAAC,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC5D,YAAY,EAAE,IAAA,iCAAa,GAAE,CAAC,QAAQ,EAAE;IACxC,UAAU,EAAE,IAAA,8BAAiB,GAAE,CAAC,QAAQ,EAAE;IAC1C,UAAU,EAAE,IAAA,8BAAiB,GAAE,CAAC,QAAQ,EAAE;IAC1C,UAAU,EAAE,IAAA,8BAAiB,GAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,IAAA,6BAAgB,EAAC;IAC3D,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,CAAC;CACV,CAAC;KACC,KAAK,CAAC,0CAAkC,CAAC;KACzC,KAAK,CAAC,IAAA,0CAAsB,EAAC,0CAAkC,CAAC,CAAC,CAAA;AAEvD,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CAC1C,CAAC;KACD,MAAM,EAAE,CAAA;AAKE,QAAA,wBAAwB,GAAG,OAAC;KACtC,MAAM,CAAC;IACN,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,MAAM,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,KAAK,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;IACtC,YAAY,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACpC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;CAC1C,CAAC;KACD,MAAM,EAAE,CAAA"}
|