@mercurjs/b2c-core 1.5.0 → 1.5.1
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/.medusa/server/src/api/admin/inventory-items/[id]/location-levels/[location_id]/route.d.ts +3 -0
- package/.medusa/server/src/api/admin/inventory-items/[id]/location-levels/[location_id]/route.js +36 -0
- package/.medusa/server/src/api/admin/notifications/route.js +8 -8
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +2 -2
- package/.medusa/server/src/api/admin/sellers/validators.js +9 -7
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.js +3 -4
- package/.medusa/server/src/api/store/middlewares.js +11 -9
- package/.medusa/server/src/api/store/products/middlewares.d.ts +2 -0
- package/.medusa/server/src/api/store/products/middlewares.js +13 -0
- package/.medusa/server/src/api/store/products/search/route.d.ts +81 -0
- package/.medusa/server/src/api/store/products/search/route.js +170 -0
- package/.medusa/server/src/api/store/products/validators.d.ts +36 -0
- package/.medusa/server/src/api/store/products/validators.js +17 -0
- package/.medusa/server/src/api/store/wishlist/middlewares.d.ts +1 -1
- package/.medusa/server/src/api/store/wishlist/middlewares.js +47 -25
- package/.medusa/server/src/api/store/wishlist/{[id]/product → product}/[reference_id]/route.d.ts +3 -9
- package/.medusa/server/src/api/store/wishlist/product/[reference_id]/route.js +65 -0
- package/.medusa/server/src/api/store/wishlist/route.d.ts +789 -28
- package/.medusa/server/src/api/store/wishlist/route.js +817 -37
- package/.medusa/server/src/api/vendor/campaigns/validators.js +4 -4
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/[location_id]/route.js +2 -5
- package/.medusa/server/src/api/vendor/inventory-items/[id]/location-levels/batch/route.js +2 -2
- package/.medusa/server/src/api/vendor/orders/validators.d.ts +4 -4
- package/.medusa/server/src/api/vendor/payout-account/route.js +3 -2
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/route.d.ts +2 -2
- package/.medusa/server/src/api/vendor/price-lists/[id]/prices/route.js +2 -2
- package/.medusa/server/src/api/vendor/price-lists/route.d.ts +1 -1
- package/.medusa/server/src/api/vendor/price-lists/route.js +27 -8
- package/.medusa/server/src/api/vendor/product-collections/middlewares.js +2 -2
- package/.medusa/server/src/api/vendor/product-collections/route.d.ts +18 -0
- package/.medusa/server/src/api/vendor/product-collections/route.js +19 -1
- package/.medusa/server/src/api/vendor/product-collections/validators.d.ts +404 -15
- package/.medusa/server/src/api/vendor/product-collections/validators.js +18 -3
- package/.medusa/server/src/api/vendor/product-tags/route.d.ts +4 -1
- package/.medusa/server/src/api/vendor/product-tags/route.js +8 -8
- package/.medusa/server/src/api/vendor/products/route.d.ts +8 -2
- package/.medusa/server/src/api/vendor/products/route.js +28 -20
- package/.medusa/server/src/api/vendor/products/utils.d.ts +20 -1
- package/.medusa/server/src/api/vendor/products/utils.js +81 -5
- package/.medusa/server/src/api/vendor/products/validators.d.ts +60 -0
- package/.medusa/server/src/api/vendor/products/validators.js +8 -2
- package/.medusa/server/src/api/vendor/promotions/route.d.ts +86 -2
- package/.medusa/server/src/api/vendor/promotions/route.js +116 -7
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +237 -38
- package/.medusa/server/src/api/vendor/promotions/validators.js +23 -5
- package/.medusa/server/src/api/vendor/shipping-profiles/route.d.ts +31 -2
- package/.medusa/server/src/api/vendor/shipping-profiles/route.js +61 -10
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +92 -3
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.js +10 -2
- package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +10 -10
- package/.medusa/server/src/links/wishlist-product.js +3 -3
- package/.medusa/server/src/modules/seller/utils.d.ts +1 -1
- package/.medusa/server/src/modules/seller/utils.js +37 -10
- package/.medusa/server/src/shared/infra/http/utils/products.js +8 -2
- package/.medusa/server/src/workflows/attribute/steps/validate-attribute-value.js +7 -3
- package/.medusa/server/src/workflows/attribute/utils/products-updated-handler.d.ts +3 -3
- package/.medusa/server/src/workflows/attribute/utils/products-updated-handler.js +17 -15
- package/.medusa/server/src/workflows/hooks/fetch-shipping-option-pricing-context.d.ts +1 -0
- package/.medusa/server/src/workflows/hooks/fetch-shipping-option-pricing-context.js +97 -0
- package/.medusa/server/src/workflows/promotions/steps/index.d.ts +2 -0
- package/.medusa/server/src/workflows/promotions/steps/index.js +3 -1
- package/.medusa/server/src/workflows/promotions/steps/inject-seller-product-rule.d.ts +6 -0
- package/.medusa/server/src/workflows/promotions/steps/inject-seller-product-rule.js +40 -0
- package/.medusa/server/src/workflows/promotions/steps/verify-seller-product-rule-deletion.d.ts +9 -0
- package/.medusa/server/src/workflows/promotions/steps/verify-seller-product-rule-deletion.js +27 -0
- package/.medusa/server/src/workflows/promotions/steps/verify-vendor-target-promotion-rules.d.ts +5 -0
- package/.medusa/server/src/workflows/promotions/steps/verify-vendor-target-promotion-rules.js +27 -11
- package/.medusa/server/src/workflows/promotions/workflows/batch-vendor-promotion-rules.js +5 -1
- package/.medusa/server/src/workflows/promotions/workflows/create-vendor-promotion.js +4 -3
- package/.medusa/server/src/workflows/seller/steps/validate-products-to-import.d.ts +5 -0
- package/package.json +1 -1
- package/.medusa/server/src/api/store/wishlist/[id]/product/[reference_id]/route.js +0 -61
|
@@ -1,5 +1,106 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { ApplicationMethodAllocation, ApplicationMethodTargetType, ApplicationMethodType, PromotionStatus, PromotionType } from "@medusajs/framework/utils";
|
|
3
|
+
export declare const VendorGetPromotionsParamsFields: z.ZodObject<{
|
|
4
|
+
q: z.ZodOptional<z.ZodString>;
|
|
5
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
6
|
+
code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
7
|
+
campaign_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
8
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof PromotionStatus>, z.ZodArray<z.ZodNativeEnum<typeof PromotionStatus>, "many">]>>;
|
|
9
|
+
is_automatic: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof PromotionType>, z.ZodArray<z.ZodNativeEnum<typeof PromotionType>, "many">]>>;
|
|
11
|
+
created_at: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
12
|
+
$gte: z.ZodOptional<z.ZodString>;
|
|
13
|
+
$lte: z.ZodOptional<z.ZodString>;
|
|
14
|
+
$gt: z.ZodOptional<z.ZodString>;
|
|
15
|
+
$lt: z.ZodOptional<z.ZodString>;
|
|
16
|
+
$eq: z.ZodOptional<z.ZodString>;
|
|
17
|
+
$ne: z.ZodOptional<z.ZodString>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
$gte?: string | undefined;
|
|
20
|
+
$lte?: string | undefined;
|
|
21
|
+
$gt?: string | undefined;
|
|
22
|
+
$lt?: string | undefined;
|
|
23
|
+
$eq?: string | undefined;
|
|
24
|
+
$ne?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
$gte?: string | undefined;
|
|
27
|
+
$lte?: string | undefined;
|
|
28
|
+
$gt?: string | undefined;
|
|
29
|
+
$lt?: string | undefined;
|
|
30
|
+
$eq?: string | undefined;
|
|
31
|
+
$ne?: string | undefined;
|
|
32
|
+
}>>, {
|
|
33
|
+
$gte?: string | undefined;
|
|
34
|
+
$lte?: string | undefined;
|
|
35
|
+
$gt?: string | undefined;
|
|
36
|
+
$lt?: string | undefined;
|
|
37
|
+
$eq?: string | undefined;
|
|
38
|
+
$ne?: string | undefined;
|
|
39
|
+
} | undefined, unknown>>;
|
|
40
|
+
updated_at: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
41
|
+
$gte: z.ZodOptional<z.ZodString>;
|
|
42
|
+
$lte: z.ZodOptional<z.ZodString>;
|
|
43
|
+
$gt: z.ZodOptional<z.ZodString>;
|
|
44
|
+
$lt: z.ZodOptional<z.ZodString>;
|
|
45
|
+
$eq: z.ZodOptional<z.ZodString>;
|
|
46
|
+
$ne: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, "strip", z.ZodTypeAny, {
|
|
48
|
+
$gte?: string | undefined;
|
|
49
|
+
$lte?: string | undefined;
|
|
50
|
+
$gt?: string | undefined;
|
|
51
|
+
$lt?: string | undefined;
|
|
52
|
+
$eq?: string | undefined;
|
|
53
|
+
$ne?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
$gte?: string | undefined;
|
|
56
|
+
$lte?: string | undefined;
|
|
57
|
+
$gt?: string | undefined;
|
|
58
|
+
$lt?: string | undefined;
|
|
59
|
+
$eq?: string | undefined;
|
|
60
|
+
$ne?: string | undefined;
|
|
61
|
+
}>>, {
|
|
62
|
+
$gte?: string | undefined;
|
|
63
|
+
$lte?: string | undefined;
|
|
64
|
+
$gt?: string | undefined;
|
|
65
|
+
$lt?: string | undefined;
|
|
66
|
+
$eq?: string | undefined;
|
|
67
|
+
$ne?: string | undefined;
|
|
68
|
+
} | undefined, unknown>>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
status?: PromotionStatus | PromotionStatus[] | undefined;
|
|
71
|
+
code?: string | string[] | undefined;
|
|
72
|
+
type?: PromotionType | PromotionType[] | undefined;
|
|
73
|
+
id?: string | string[] | undefined;
|
|
74
|
+
created_at?: {
|
|
75
|
+
$gte?: string | undefined;
|
|
76
|
+
$lte?: string | undefined;
|
|
77
|
+
$gt?: string | undefined;
|
|
78
|
+
$lt?: string | undefined;
|
|
79
|
+
$eq?: string | undefined;
|
|
80
|
+
$ne?: string | undefined;
|
|
81
|
+
} | undefined;
|
|
82
|
+
updated_at?: {
|
|
83
|
+
$gte?: string | undefined;
|
|
84
|
+
$lte?: string | undefined;
|
|
85
|
+
$gt?: string | undefined;
|
|
86
|
+
$lt?: string | undefined;
|
|
87
|
+
$eq?: string | undefined;
|
|
88
|
+
$ne?: string | undefined;
|
|
89
|
+
} | undefined;
|
|
90
|
+
q?: string | undefined;
|
|
91
|
+
campaign_id?: string | string[] | undefined;
|
|
92
|
+
is_automatic?: boolean | undefined;
|
|
93
|
+
}, {
|
|
94
|
+
status?: PromotionStatus | PromotionStatus[] | undefined;
|
|
95
|
+
code?: string | string[] | undefined;
|
|
96
|
+
type?: PromotionType | PromotionType[] | undefined;
|
|
97
|
+
id?: string | string[] | undefined;
|
|
98
|
+
created_at?: unknown;
|
|
99
|
+
updated_at?: unknown;
|
|
100
|
+
q?: string | undefined;
|
|
101
|
+
campaign_id?: string | string[] | undefined;
|
|
102
|
+
is_automatic?: boolean | undefined;
|
|
103
|
+
}>;
|
|
3
104
|
export type VendorGetPromotionsParamsType = z.infer<typeof VendorGetPromotionsParams>;
|
|
4
105
|
export declare const VendorGetPromotionsParams: z.ZodObject<{
|
|
5
106
|
fields: z.ZodOptional<z.ZodString>;
|
|
@@ -8,18 +109,116 @@ export declare const VendorGetPromotionsParams: z.ZodObject<{
|
|
|
8
109
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
9
110
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
10
111
|
with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
112
|
+
} & {
|
|
113
|
+
q: z.ZodOptional<z.ZodString>;
|
|
114
|
+
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
115
|
+
code: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
116
|
+
campaign_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
117
|
+
status: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof PromotionStatus>, z.ZodArray<z.ZodNativeEnum<typeof PromotionStatus>, "many">]>>;
|
|
118
|
+
is_automatic: z.ZodOptional<z.ZodBoolean>;
|
|
119
|
+
type: z.ZodOptional<z.ZodUnion<[z.ZodNativeEnum<typeof PromotionType>, z.ZodArray<z.ZodNativeEnum<typeof PromotionType>, "many">]>>;
|
|
120
|
+
created_at: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
121
|
+
$gte: z.ZodOptional<z.ZodString>;
|
|
122
|
+
$lte: z.ZodOptional<z.ZodString>;
|
|
123
|
+
$gt: z.ZodOptional<z.ZodString>;
|
|
124
|
+
$lt: z.ZodOptional<z.ZodString>;
|
|
125
|
+
$eq: z.ZodOptional<z.ZodString>;
|
|
126
|
+
$ne: z.ZodOptional<z.ZodString>;
|
|
127
|
+
}, "strip", z.ZodTypeAny, {
|
|
128
|
+
$gte?: string | undefined;
|
|
129
|
+
$lte?: string | undefined;
|
|
130
|
+
$gt?: string | undefined;
|
|
131
|
+
$lt?: string | undefined;
|
|
132
|
+
$eq?: string | undefined;
|
|
133
|
+
$ne?: string | undefined;
|
|
134
|
+
}, {
|
|
135
|
+
$gte?: string | undefined;
|
|
136
|
+
$lte?: string | undefined;
|
|
137
|
+
$gt?: string | undefined;
|
|
138
|
+
$lt?: string | undefined;
|
|
139
|
+
$eq?: string | undefined;
|
|
140
|
+
$ne?: string | undefined;
|
|
141
|
+
}>>, {
|
|
142
|
+
$gte?: string | undefined;
|
|
143
|
+
$lte?: string | undefined;
|
|
144
|
+
$gt?: string | undefined;
|
|
145
|
+
$lt?: string | undefined;
|
|
146
|
+
$eq?: string | undefined;
|
|
147
|
+
$ne?: string | undefined;
|
|
148
|
+
} | undefined, unknown>>;
|
|
149
|
+
updated_at: z.ZodOptional<z.ZodEffects<z.ZodOptional<z.ZodObject<{
|
|
150
|
+
$gte: z.ZodOptional<z.ZodString>;
|
|
151
|
+
$lte: z.ZodOptional<z.ZodString>;
|
|
152
|
+
$gt: z.ZodOptional<z.ZodString>;
|
|
153
|
+
$lt: z.ZodOptional<z.ZodString>;
|
|
154
|
+
$eq: z.ZodOptional<z.ZodString>;
|
|
155
|
+
$ne: z.ZodOptional<z.ZodString>;
|
|
156
|
+
}, "strip", z.ZodTypeAny, {
|
|
157
|
+
$gte?: string | undefined;
|
|
158
|
+
$lte?: string | undefined;
|
|
159
|
+
$gt?: string | undefined;
|
|
160
|
+
$lt?: string | undefined;
|
|
161
|
+
$eq?: string | undefined;
|
|
162
|
+
$ne?: string | undefined;
|
|
163
|
+
}, {
|
|
164
|
+
$gte?: string | undefined;
|
|
165
|
+
$lte?: string | undefined;
|
|
166
|
+
$gt?: string | undefined;
|
|
167
|
+
$lt?: string | undefined;
|
|
168
|
+
$eq?: string | undefined;
|
|
169
|
+
$ne?: string | undefined;
|
|
170
|
+
}>>, {
|
|
171
|
+
$gte?: string | undefined;
|
|
172
|
+
$lte?: string | undefined;
|
|
173
|
+
$gt?: string | undefined;
|
|
174
|
+
$lt?: string | undefined;
|
|
175
|
+
$eq?: string | undefined;
|
|
176
|
+
$ne?: string | undefined;
|
|
177
|
+
} | undefined, unknown>>;
|
|
11
178
|
}, "strip", z.ZodTypeAny, {
|
|
12
179
|
offset: number;
|
|
13
180
|
limit: number;
|
|
14
|
-
|
|
181
|
+
status?: PromotionStatus | PromotionStatus[] | undefined;
|
|
182
|
+
code?: string | string[] | undefined;
|
|
183
|
+
type?: PromotionType | PromotionType[] | undefined;
|
|
184
|
+
id?: string | string[] | undefined;
|
|
185
|
+
created_at?: {
|
|
186
|
+
$gte?: string | undefined;
|
|
187
|
+
$lte?: string | undefined;
|
|
188
|
+
$gt?: string | undefined;
|
|
189
|
+
$lt?: string | undefined;
|
|
190
|
+
$eq?: string | undefined;
|
|
191
|
+
$ne?: string | undefined;
|
|
192
|
+
} | undefined;
|
|
193
|
+
updated_at?: {
|
|
194
|
+
$gte?: string | undefined;
|
|
195
|
+
$lte?: string | undefined;
|
|
196
|
+
$gt?: string | undefined;
|
|
197
|
+
$lt?: string | undefined;
|
|
198
|
+
$eq?: string | undefined;
|
|
199
|
+
$ne?: string | undefined;
|
|
200
|
+
} | undefined;
|
|
15
201
|
fields?: string | undefined;
|
|
202
|
+
order?: string | undefined;
|
|
16
203
|
with_deleted?: boolean | undefined;
|
|
204
|
+
q?: string | undefined;
|
|
205
|
+
campaign_id?: string | string[] | undefined;
|
|
206
|
+
is_automatic?: boolean | undefined;
|
|
17
207
|
}, {
|
|
18
|
-
|
|
19
|
-
|
|
208
|
+
status?: PromotionStatus | PromotionStatus[] | undefined;
|
|
209
|
+
code?: string | string[] | undefined;
|
|
210
|
+
type?: PromotionType | PromotionType[] | undefined;
|
|
211
|
+
id?: string | string[] | undefined;
|
|
212
|
+
created_at?: unknown;
|
|
213
|
+
updated_at?: unknown;
|
|
20
214
|
offset?: unknown;
|
|
21
215
|
limit?: unknown;
|
|
216
|
+
fields?: string | undefined;
|
|
217
|
+
order?: string | undefined;
|
|
22
218
|
with_deleted?: unknown;
|
|
219
|
+
q?: string | undefined;
|
|
220
|
+
campaign_id?: string | string[] | undefined;
|
|
221
|
+
is_automatic?: boolean | undefined;
|
|
23
222
|
}>;
|
|
24
223
|
/**
|
|
25
224
|
* @schema VendorCreatePromotionRule
|
|
@@ -90,7 +289,7 @@ export declare const VendorCreatePromotionRule: z.ZodObject<{
|
|
|
90
289
|
* description: The allocation of the application method.
|
|
91
290
|
* target_rules:
|
|
92
291
|
* type: array
|
|
93
|
-
* description:
|
|
292
|
+
* description: Optional additional target rules. A default rule restricting the promotion to the seller's products is automatically added. Any additional rules are combined with AND logic.
|
|
94
293
|
* items:
|
|
95
294
|
* $ref: "#/components/schemas/VendorCreatePromotionRule"
|
|
96
295
|
*/
|
|
@@ -101,7 +300,7 @@ export declare const VendorCreateApplicationMethod: z.ZodObject<{
|
|
|
101
300
|
type: z.ZodLiteral<ApplicationMethodType.PERCENTAGE>;
|
|
102
301
|
target_type: z.ZodLiteral<ApplicationMethodTargetType.ITEMS>;
|
|
103
302
|
allocation: z.ZodNativeEnum<typeof ApplicationMethodAllocation>;
|
|
104
|
-
target_rules: z.ZodArray<z.ZodObject<{
|
|
303
|
+
target_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
105
304
|
operator: z.ZodEnum<["in", "eq"]>;
|
|
106
305
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
107
306
|
attribute: z.ZodString;
|
|
@@ -116,7 +315,7 @@ export declare const VendorCreateApplicationMethod: z.ZodObject<{
|
|
|
116
315
|
attribute: string;
|
|
117
316
|
operator: "in" | "eq";
|
|
118
317
|
description?: string | null | undefined;
|
|
119
|
-
}>, "many"
|
|
318
|
+
}>, "many">>;
|
|
120
319
|
apply_to_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
121
320
|
buy_rules_min_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
122
321
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -124,14 +323,14 @@ export declare const VendorCreateApplicationMethod: z.ZodObject<{
|
|
|
124
323
|
type: ApplicationMethodType.PERCENTAGE;
|
|
125
324
|
target_type: ApplicationMethodTargetType.ITEMS;
|
|
126
325
|
allocation: ApplicationMethodAllocation;
|
|
127
|
-
|
|
326
|
+
description?: string | null | undefined;
|
|
327
|
+
max_quantity?: number | null | undefined;
|
|
328
|
+
target_rules?: {
|
|
128
329
|
values: string | string[];
|
|
129
330
|
attribute: string;
|
|
130
331
|
operator: "in" | "eq";
|
|
131
332
|
description?: string | null | undefined;
|
|
132
|
-
}[];
|
|
133
|
-
description?: string | null | undefined;
|
|
134
|
-
max_quantity?: number | null | undefined;
|
|
333
|
+
}[] | undefined;
|
|
135
334
|
apply_to_quantity?: number | null | undefined;
|
|
136
335
|
buy_rules_min_quantity?: number | null | undefined;
|
|
137
336
|
}, {
|
|
@@ -139,14 +338,14 @@ export declare const VendorCreateApplicationMethod: z.ZodObject<{
|
|
|
139
338
|
type: ApplicationMethodType.PERCENTAGE;
|
|
140
339
|
target_type: ApplicationMethodTargetType.ITEMS;
|
|
141
340
|
allocation: ApplicationMethodAllocation;
|
|
142
|
-
|
|
341
|
+
description?: string | null | undefined;
|
|
342
|
+
max_quantity?: number | null | undefined;
|
|
343
|
+
target_rules?: {
|
|
143
344
|
values: string | string[];
|
|
144
345
|
attribute: string;
|
|
145
346
|
operator: "in" | "eq";
|
|
146
347
|
description?: string | null | undefined;
|
|
147
|
-
}[];
|
|
148
|
-
description?: string | null | undefined;
|
|
149
|
-
max_quantity?: number | null | undefined;
|
|
348
|
+
}[] | undefined;
|
|
150
349
|
apply_to_quantity?: number | null | undefined;
|
|
151
350
|
buy_rules_min_quantity?: number | null | undefined;
|
|
152
351
|
}>;
|
|
@@ -254,7 +453,7 @@ export declare const VendorCreatePromotion: z.ZodObject<{
|
|
|
254
453
|
type: z.ZodLiteral<ApplicationMethodType.PERCENTAGE>;
|
|
255
454
|
target_type: z.ZodLiteral<ApplicationMethodTargetType.ITEMS>;
|
|
256
455
|
allocation: z.ZodNativeEnum<typeof ApplicationMethodAllocation>;
|
|
257
|
-
target_rules: z.ZodArray<z.ZodObject<{
|
|
456
|
+
target_rules: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
258
457
|
operator: z.ZodEnum<["in", "eq"]>;
|
|
259
458
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
260
459
|
attribute: z.ZodString;
|
|
@@ -269,7 +468,7 @@ export declare const VendorCreatePromotion: z.ZodObject<{
|
|
|
269
468
|
attribute: string;
|
|
270
469
|
operator: "in" | "eq";
|
|
271
470
|
description?: string | null | undefined;
|
|
272
|
-
}>, "many"
|
|
471
|
+
}>, "many">>;
|
|
273
472
|
apply_to_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
274
473
|
buy_rules_min_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
275
474
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -277,14 +476,14 @@ export declare const VendorCreatePromotion: z.ZodObject<{
|
|
|
277
476
|
type: ApplicationMethodType.PERCENTAGE;
|
|
278
477
|
target_type: ApplicationMethodTargetType.ITEMS;
|
|
279
478
|
allocation: ApplicationMethodAllocation;
|
|
280
|
-
|
|
479
|
+
description?: string | null | undefined;
|
|
480
|
+
max_quantity?: number | null | undefined;
|
|
481
|
+
target_rules?: {
|
|
281
482
|
values: string | string[];
|
|
282
483
|
attribute: string;
|
|
283
484
|
operator: "in" | "eq";
|
|
284
485
|
description?: string | null | undefined;
|
|
285
|
-
}[];
|
|
286
|
-
description?: string | null | undefined;
|
|
287
|
-
max_quantity?: number | null | undefined;
|
|
486
|
+
}[] | undefined;
|
|
288
487
|
apply_to_quantity?: number | null | undefined;
|
|
289
488
|
buy_rules_min_quantity?: number | null | undefined;
|
|
290
489
|
}, {
|
|
@@ -292,14 +491,14 @@ export declare const VendorCreatePromotion: z.ZodObject<{
|
|
|
292
491
|
type: ApplicationMethodType.PERCENTAGE;
|
|
293
492
|
target_type: ApplicationMethodTargetType.ITEMS;
|
|
294
493
|
allocation: ApplicationMethodAllocation;
|
|
295
|
-
|
|
494
|
+
description?: string | null | undefined;
|
|
495
|
+
max_quantity?: number | null | undefined;
|
|
496
|
+
target_rules?: {
|
|
296
497
|
values: string | string[];
|
|
297
498
|
attribute: string;
|
|
298
499
|
operator: "in" | "eq";
|
|
299
500
|
description?: string | null | undefined;
|
|
300
|
-
}[];
|
|
301
|
-
description?: string | null | undefined;
|
|
302
|
-
max_quantity?: number | null | undefined;
|
|
501
|
+
}[] | undefined;
|
|
303
502
|
apply_to_quantity?: number | null | undefined;
|
|
304
503
|
buy_rules_min_quantity?: number | null | undefined;
|
|
305
504
|
}>;
|
|
@@ -329,14 +528,14 @@ export declare const VendorCreatePromotion: z.ZodObject<{
|
|
|
329
528
|
type: ApplicationMethodType.PERCENTAGE;
|
|
330
529
|
target_type: ApplicationMethodTargetType.ITEMS;
|
|
331
530
|
allocation: ApplicationMethodAllocation;
|
|
332
|
-
|
|
531
|
+
description?: string | null | undefined;
|
|
532
|
+
max_quantity?: number | null | undefined;
|
|
533
|
+
target_rules?: {
|
|
333
534
|
values: string | string[];
|
|
334
535
|
attribute: string;
|
|
335
536
|
operator: "in" | "eq";
|
|
336
537
|
description?: string | null | undefined;
|
|
337
|
-
}[];
|
|
338
|
-
description?: string | null | undefined;
|
|
339
|
-
max_quantity?: number | null | undefined;
|
|
538
|
+
}[] | undefined;
|
|
340
539
|
apply_to_quantity?: number | null | undefined;
|
|
341
540
|
buy_rules_min_quantity?: number | null | undefined;
|
|
342
541
|
};
|
|
@@ -367,14 +566,14 @@ export declare const VendorCreatePromotion: z.ZodObject<{
|
|
|
367
566
|
type: ApplicationMethodType.PERCENTAGE;
|
|
368
567
|
target_type: ApplicationMethodTargetType.ITEMS;
|
|
369
568
|
allocation: ApplicationMethodAllocation;
|
|
370
|
-
|
|
569
|
+
description?: string | null | undefined;
|
|
570
|
+
max_quantity?: number | null | undefined;
|
|
571
|
+
target_rules?: {
|
|
371
572
|
values: string | string[];
|
|
372
573
|
attribute: string;
|
|
373
574
|
operator: "in" | "eq";
|
|
374
575
|
description?: string | null | undefined;
|
|
375
|
-
}[];
|
|
376
|
-
description?: string | null | undefined;
|
|
377
|
-
max_quantity?: number | null | undefined;
|
|
576
|
+
}[] | undefined;
|
|
378
577
|
apply_to_quantity?: number | null | undefined;
|
|
379
578
|
buy_rules_min_quantity?: number | null | undefined;
|
|
380
579
|
};
|
|
@@ -484,15 +683,15 @@ export declare const VendorUpdateApplicationMethod: z.ZodObject<{
|
|
|
484
683
|
buy_rules_min_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
485
684
|
}, "strict", z.ZodTypeAny, {
|
|
486
685
|
value?: number | undefined;
|
|
487
|
-
description?: string | null | undefined;
|
|
488
686
|
currency_code?: string | null | undefined;
|
|
687
|
+
description?: string | null | undefined;
|
|
489
688
|
max_quantity?: number | null | undefined;
|
|
490
689
|
apply_to_quantity?: number | null | undefined;
|
|
491
690
|
buy_rules_min_quantity?: number | null | undefined;
|
|
492
691
|
}, {
|
|
493
692
|
value?: number | undefined;
|
|
494
|
-
description?: string | null | undefined;
|
|
495
693
|
currency_code?: string | null | undefined;
|
|
694
|
+
description?: string | null | undefined;
|
|
496
695
|
max_quantity?: number | null | undefined;
|
|
497
696
|
apply_to_quantity?: number | null | undefined;
|
|
498
697
|
buy_rules_min_quantity?: number | null | undefined;
|
|
@@ -533,15 +732,15 @@ export declare const VendorUpdatePromotion: z.ZodObject<{
|
|
|
533
732
|
buy_rules_min_quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
534
733
|
}, "strict", z.ZodTypeAny, {
|
|
535
734
|
value?: number | undefined;
|
|
536
|
-
description?: string | null | undefined;
|
|
537
735
|
currency_code?: string | null | undefined;
|
|
736
|
+
description?: string | null | undefined;
|
|
538
737
|
max_quantity?: number | null | undefined;
|
|
539
738
|
apply_to_quantity?: number | null | undefined;
|
|
540
739
|
buy_rules_min_quantity?: number | null | undefined;
|
|
541
740
|
}, {
|
|
542
741
|
value?: number | undefined;
|
|
543
|
-
description?: string | null | undefined;
|
|
544
742
|
currency_code?: string | null | undefined;
|
|
743
|
+
description?: string | null | undefined;
|
|
545
744
|
max_quantity?: number | null | undefined;
|
|
546
745
|
apply_to_quantity?: number | null | undefined;
|
|
547
746
|
buy_rules_min_quantity?: number | null | undefined;
|
|
@@ -553,8 +752,8 @@ export declare const VendorUpdatePromotion: z.ZodObject<{
|
|
|
553
752
|
is_automatic?: boolean | undefined;
|
|
554
753
|
application_method?: {
|
|
555
754
|
value?: number | undefined;
|
|
556
|
-
description?: string | null | undefined;
|
|
557
755
|
currency_code?: string | null | undefined;
|
|
756
|
+
description?: string | null | undefined;
|
|
558
757
|
max_quantity?: number | null | undefined;
|
|
559
758
|
apply_to_quantity?: number | null | undefined;
|
|
560
759
|
buy_rules_min_quantity?: number | null | undefined;
|
|
@@ -566,8 +765,8 @@ export declare const VendorUpdatePromotion: z.ZodObject<{
|
|
|
566
765
|
is_automatic?: boolean | undefined;
|
|
567
766
|
application_method?: {
|
|
568
767
|
value?: number | undefined;
|
|
569
|
-
description?: string | null | undefined;
|
|
570
768
|
currency_code?: string | null | undefined;
|
|
769
|
+
description?: string | null | undefined;
|
|
571
770
|
max_quantity?: number | null | undefined;
|
|
572
771
|
apply_to_quantity?: number | null | undefined;
|
|
573
772
|
buy_rules_min_quantity?: number | null | undefined;
|
|
@@ -1,14 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VendorGetPromotionsRuleValuePathParams = exports.VendorRuleTypePathParam = exports.VendorGetPromotionRuleTypeParams = exports.VendorGetPromotionRuleParams = exports.VendorGetPromotionsRuleValueParams = exports.VendorUpdatePromotion = exports.VendorUpdateApplicationMethod = exports.VendorBatchPromotionRules = exports.VendorCreatePromotion = exports.VendorCreateApplicationMethod = exports.VendorCreatePromotionRule = exports.VendorGetPromotionsParams = void 0;
|
|
3
|
+
exports.VendorGetPromotionsRuleValuePathParams = exports.VendorRuleTypePathParam = exports.VendorGetPromotionRuleTypeParams = exports.VendorGetPromotionRuleParams = exports.VendorGetPromotionsRuleValueParams = exports.VendorUpdatePromotion = exports.VendorUpdateApplicationMethod = exports.VendorBatchPromotionRules = exports.VendorCreatePromotion = exports.VendorCreateApplicationMethod = exports.VendorCreatePromotionRule = exports.VendorGetPromotionsParams = exports.VendorGetPromotionsParamsFields = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const utils_1 = require("@medusajs/framework/utils");
|
|
6
6
|
const validators_1 = require("@medusajs/medusa/api/utils/validators");
|
|
7
7
|
const validators_2 = require("../campaigns/validators");
|
|
8
|
+
const utils_2 = require("../../../shared/infra/http/utils");
|
|
9
|
+
exports.VendorGetPromotionsParamsFields = zod_1.z.object({
|
|
10
|
+
q: zod_1.z.string().optional(),
|
|
11
|
+
id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
12
|
+
code: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
13
|
+
campaign_id: zod_1.z.union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
14
|
+
status: zod_1.z.union([
|
|
15
|
+
zod_1.z.nativeEnum(utils_1.PromotionStatus),
|
|
16
|
+
zod_1.z.array(zod_1.z.nativeEnum(utils_1.PromotionStatus))
|
|
17
|
+
]).optional(),
|
|
18
|
+
is_automatic: zod_1.z.boolean().optional(),
|
|
19
|
+
type: zod_1.z.union([
|
|
20
|
+
zod_1.z.nativeEnum(utils_1.PromotionType),
|
|
21
|
+
zod_1.z.array(zod_1.z.nativeEnum(utils_1.PromotionType))
|
|
22
|
+
]).optional(),
|
|
23
|
+
created_at: utils_2.dateFilterSchema,
|
|
24
|
+
updated_at: utils_2.dateFilterSchema,
|
|
25
|
+
});
|
|
8
26
|
exports.VendorGetPromotionsParams = (0, validators_1.createFindParams)({
|
|
9
27
|
offset: 0,
|
|
10
28
|
limit: 50,
|
|
11
|
-
});
|
|
29
|
+
}).merge(exports.VendorGetPromotionsParamsFields);
|
|
12
30
|
/**
|
|
13
31
|
* @schema VendorCreatePromotionRule
|
|
14
32
|
* type: object
|
|
@@ -70,7 +88,7 @@ exports.VendorCreatePromotionRule = zod_1.z
|
|
|
70
88
|
* description: The allocation of the application method.
|
|
71
89
|
* target_rules:
|
|
72
90
|
* type: array
|
|
73
|
-
* description:
|
|
91
|
+
* description: Optional additional target rules. A default rule restricting the promotion to the seller's products is automatically added. Any additional rules are combined with AND logic.
|
|
74
92
|
* items:
|
|
75
93
|
* $ref: "#/components/schemas/VendorCreatePromotionRule"
|
|
76
94
|
*/
|
|
@@ -82,7 +100,7 @@ exports.VendorCreateApplicationMethod = zod_1.z
|
|
|
82
100
|
type: zod_1.z.literal(utils_1.ApplicationMethodType.PERCENTAGE),
|
|
83
101
|
target_type: zod_1.z.literal(utils_1.ApplicationMethodTargetType.ITEMS),
|
|
84
102
|
allocation: zod_1.z.nativeEnum(utils_1.ApplicationMethodAllocation),
|
|
85
|
-
target_rules: zod_1.z.array(exports.VendorCreatePromotionRule),
|
|
103
|
+
target_rules: zod_1.z.array(exports.VendorCreatePromotionRule).optional(),
|
|
86
104
|
apply_to_quantity: zod_1.z.number().nullish(),
|
|
87
105
|
buy_rules_min_quantity: zod_1.z.number().nullish(),
|
|
88
106
|
})
|
|
@@ -155,4 +173,4 @@ exports.VendorGetPromotionsRuleValuePathParams = zod_1.z.object({
|
|
|
155
173
|
rule_type: exports.VendorRuleTypePathParam,
|
|
156
174
|
rule_attribute_id: zod_1.z.string(),
|
|
157
175
|
});
|
|
158
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
176
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL3Byb21vdGlvbnMvdmFsaWRhdG9ycy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2QkFBd0I7QUFFeEIscURBTW1DO0FBQ25DLHNFQUcrQztBQUUvQyx3REFBK0Q7QUFDL0QsNERBQW9FO0FBRXZELFFBQUEsK0JBQStCLEdBQUcsT0FBQyxDQUFDLE1BQU0sQ0FBQztJQUN0RCxDQUFDLEVBQUUsT0FBQyxDQUFDLE1BQU0sRUFBRSxDQUFDLFFBQVEsRUFBRTtJQUN4QixFQUFFLEVBQUUsT0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsRUFBRSxPQUFDLENBQUMsS0FBSyxDQUFDLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0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FDLFFBQVEsRUFBRTtDQUN4RSxDQUFDLENBQUM7QUFLVSxRQUFBLGdDQUFnQyxHQUFHLElBQUEsK0JBQWtCLEdBQUUsQ0FBQyxLQUFLLENBQ3hFLE9BQUMsQ0FBQyxNQUFNLENBQUM7SUFDUCxjQUFjLEVBQUUsT0FBQyxDQUFDLFVBQVUsQ0FBQyxxQkFBYSxDQUFDLENBQUMsUUFBUSxFQUFFO0lBQ3RELHVCQUF1QixFQUFFLE9BQUMsQ0FBQyxVQUFVLENBQUMsNkJBQXFCLENBQUMsQ0FBQyxRQUFRLEVBQUU7Q0FDeEUsQ0FBQyxDQUNILENBQUM7QUFFVyxRQUFBLHVCQUF1QixHQUFHLE9BQUM7S0FDckMsTUFBTSxFQUFFO0tBQ1IsTUFBTSxDQUNMLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FDTjtJQUNFLE9BQU87SUFDUCxjQUFjO0lBQ2QsY0FBYztJQUNkLFdBQVc7SUFDWCxXQUFXO0NBQ1osQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQ2pCO0lBQ0UsT0FBTyxFQUNMLG9FQUFvRTtDQUN2RSxDQUNGO0tBQ0EsU0FBUyxDQUFDLENBQUMsR0FBRyxFQUFFLEVBQUUsQ0FBQyxHQUFHLENBQUMsT0FBTyxDQUFDLElBQUksRUFBRSxHQUFHLENBQUMsQ0FBQyxDQUFDO0FBRWpDLFFBQUEsc0NBQXNDLEdBQUcsT0FBQyxDQUFDLE1BQU0sQ0FBQztJQUM3RCxTQUFTLEVBQUUsK0JBQXVCO0lBQ2xDLGlCQUFpQixFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUU7Q0FDOUIsQ0FBQyxDQUFDIn0=
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework";
|
|
2
|
-
import { VendorCreateShippingProfileType } from "./validators";
|
|
2
|
+
import { VendorCreateShippingProfileType, VendorGetShippingProfilesParamsType } from "./validators";
|
|
3
3
|
/**
|
|
4
4
|
* @oas [post] /vendor/shipping-profiles
|
|
5
5
|
* operationId: "VendorCreateShippingProfile"
|
|
@@ -46,6 +46,26 @@ export declare const POST: (req: AuthenticatedMedusaRequest<VendorCreateShipping
|
|
|
46
46
|
* description: The comma-separated fields to include in the response
|
|
47
47
|
* schema:
|
|
48
48
|
* type: string
|
|
49
|
+
* - in: query
|
|
50
|
+
* name: q
|
|
51
|
+
* description: Search term to filter shipping profiles by name
|
|
52
|
+
* schema:
|
|
53
|
+
* type: string
|
|
54
|
+
* - in: query
|
|
55
|
+
* name: offset
|
|
56
|
+
* description: The number of items to skip before starting to collect the result set
|
|
57
|
+
* schema:
|
|
58
|
+
* type: number
|
|
59
|
+
* - in: query
|
|
60
|
+
* name: limit
|
|
61
|
+
* description: The number of items to return
|
|
62
|
+
* schema:
|
|
63
|
+
* type: number
|
|
64
|
+
* - in: query
|
|
65
|
+
* name: order
|
|
66
|
+
* description: The order of the returned items
|
|
67
|
+
* schema:
|
|
68
|
+
* type: string
|
|
49
69
|
* responses:
|
|
50
70
|
* "200":
|
|
51
71
|
* description: OK
|
|
@@ -58,10 +78,19 @@ export declare const POST: (req: AuthenticatedMedusaRequest<VendorCreateShipping
|
|
|
58
78
|
* type: array
|
|
59
79
|
* items:
|
|
60
80
|
* $ref: "#/components/schemas/VendorShippingProfile"
|
|
81
|
+
* count:
|
|
82
|
+
* type: integer
|
|
83
|
+
* description: The total number of items available
|
|
84
|
+
* offset:
|
|
85
|
+
* type: integer
|
|
86
|
+
* description: The number of items skipped before these items
|
|
87
|
+
* limit:
|
|
88
|
+
* type: integer
|
|
89
|
+
* description: The number of items per page
|
|
61
90
|
* tags:
|
|
62
91
|
* - Vendor Shipping Profiles
|
|
63
92
|
* security:
|
|
64
93
|
* - api_token: []
|
|
65
94
|
* - cookie_auth: []
|
|
66
95
|
*/
|
|
67
|
-
export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse) => Promise<
|
|
96
|
+
export declare const GET: (req: AuthenticatedMedusaRequest<{}, VendorGetShippingProfilesParamsType>, res: MedusaResponse) => Promise<MedusaResponse | undefined>;
|