@mercurjs/b2c-core 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.medusa/server/src/admin/index.js +3 -1
- package/.medusa/server/src/admin/index.mjs +3 -1
- package/.medusa/server/src/api/admin/attributes/validators.d.ts +355 -59
- package/.medusa/server/src/api/admin/configuration/validators.d.ts +3 -2
- package/.medusa/server/src/api/admin/notifications/route.js +8 -2
- package/.medusa/server/src/api/admin/order-sets/validators.d.ts +5 -3
- package/.medusa/server/src/api/admin/products/validators.d.ts +909 -500
- package/.medusa/server/src/api/admin/sellers/validators.d.ts +20 -16
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.d.ts +3 -0
- package/.medusa/server/src/api/store/carts/[id]/promotions/route.js +34 -0
- package/.medusa/server/src/api/store/order-set/validators.d.ts +3 -2
- package/.medusa/server/src/api/store/returns/validators.d.ts +3 -2
- package/.medusa/server/src/api/store/seller/validators.d.ts +3 -2
- package/.medusa/server/src/api/store/shipping-options/validators.d.ts +24 -26
- package/.medusa/server/src/api/store/wishlist/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/attributes/validators.d.ts +9 -7
- package/.medusa/server/src/api/vendor/campaigns/[id]/promotions/route.d.ts +76 -0
- package/.medusa/server/src/api/vendor/campaigns/[id]/promotions/route.js +89 -0
- package/.medusa/server/src/api/vendor/campaigns/middlewares.js +11 -2
- package/.medusa/server/src/api/vendor/campaigns/route.d.ts +6 -0
- package/.medusa/server/src/api/vendor/campaigns/route.js +10 -4
- package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +20 -12
- package/.medusa/server/src/api/vendor/campaigns/validators.js +10 -4
- package/.medusa/server/src/api/vendor/customer-groups/route.d.ts +2 -2
- package/.medusa/server/src/api/vendor/customer-groups/route.js +5 -5
- package/.medusa/server/src/api/vendor/customer-groups/validators.d.ts +604 -2
- package/.medusa/server/src/api/vendor/customer-groups/validators.js +37 -2
- package/.medusa/server/src/api/vendor/customers/validators.d.ts +6 -4
- package/.medusa/server/src/api/vendor/fulfillment-providers/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/fulfillment-sets/validators.d.ts +22 -6
- package/.medusa/server/src/api/vendor/inventory-items/[id]/route.d.ts +23 -0
- package/.medusa/server/src/api/vendor/inventory-items/[id]/route.js +48 -2
- package/.medusa/server/src/api/vendor/inventory-items/middlewares.js +12 -1
- package/.medusa/server/src/api/vendor/inventory-items/validators.d.ts +37 -104
- package/.medusa/server/src/api/vendor/invites/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/members/validators.d.ts +7 -6
- package/.medusa/server/src/api/vendor/notifications/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/orders/validators.d.ts +13 -11
- package/.medusa/server/src/api/vendor/payouts/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/price-lists/validators.d.ts +18 -16
- package/.medusa/server/src/api/vendor/price-preferences/validators.d.ts +37 -29
- package/.medusa/server/src/api/vendor/product-categories/validators.d.ts +317 -26
- package/.medusa/server/src/api/vendor/product-collections/validators.d.ts +6 -4
- package/.medusa/server/src/api/vendor/product-tags/route.js +8 -2
- package/.medusa/server/src/api/vendor/product-tags/validators.d.ts +31 -29
- package/.medusa/server/src/api/vendor/product-types/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/products/route.js +7 -3
- package/.medusa/server/src/api/vendor/products/utils.d.ts +4 -1
- package/.medusa/server/src/api/vendor/products/utils.js +40 -2
- package/.medusa/server/src/api/vendor/products/validators.d.ts +905 -377
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +57 -53
- package/.medusa/server/src/api/vendor/regions/validators.d.ts +3 -2
- package/.medusa/server/src/api/vendor/reservations/validators.d.ts +7 -6
- package/.medusa/server/src/api/vendor/returns/validators.d.ts +9 -8
- package/.medusa/server/src/api/vendor/sellers/validators.d.ts +20 -20
- package/.medusa/server/src/api/vendor/shipping-options/validators.d.ts +27 -26
- package/.medusa/server/src/api/vendor/shipping-profiles/validators.d.ts +5 -4
- package/.medusa/server/src/api/vendor/stock-locations/validators.d.ts +49 -59
- package/.medusa/server/src/links/seller-campaign.js +1 -1
- package/.medusa/server/src/links/seller-customer-group.js +1 -1
- package/.medusa/server/src/modules/attribute/migrations/Migration20250617080244.d.ts +1 -1
- package/.medusa/server/src/modules/attribute/migrations/Migration20250617080244.js +2 -2
- package/.medusa/server/src/modules/attribute/migrations/Migration20250620110849.d.ts +1 -1
- package/.medusa/server/src/modules/attribute/migrations/Migration20250620110849.js +2 -2
- package/.medusa/server/src/modules/attribute/migrations/Migration20250828065431.d.ts +1 -1
- package/.medusa/server/src/modules/attribute/migrations/Migration20250828065431.js +2 -2
- package/.medusa/server/src/modules/attribute/service.d.ts +1 -1
- package/.medusa/server/src/modules/configuration/migrations/Migration20250114063624.d.ts +1 -1
- package/.medusa/server/src/modules/configuration/migrations/Migration20250114063624.js +2 -2
- package/.medusa/server/src/modules/configuration/migrations/Migration20250324131111.d.ts +1 -1
- package/.medusa/server/src/modules/configuration/migrations/Migration20250324131111.js +2 -2
- package/.medusa/server/src/modules/marketplace/migrations/Migration20241207151814.d.ts +1 -1
- package/.medusa/server/src/modules/marketplace/migrations/Migration20241207151814.js +2 -2
- package/.medusa/server/src/modules/payout/migrations/Migration20250317090626.d.ts +1 -1
- package/.medusa/server/src/modules/payout/migrations/Migration20250317090626.js +2 -2
- package/.medusa/server/src/modules/payout/migrations/Migration20250612144913.d.ts +1 -1
- package/.medusa/server/src/modules/payout/migrations/Migration20250612144913.js +2 -2
- package/.medusa/server/src/modules/payout/service.d.ts +1 -1
- package/.medusa/server/src/modules/secondary_categories/migrations/Migration20251014102054.d.ts +1 -1
- package/.medusa/server/src/modules/secondary_categories/migrations/Migration20251014102054.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20241206125415.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20241206125415.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20250212131627.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20250212131627.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20250225083755.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20250225083755.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20250225094708.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20250225094708.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20250307091819.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20250307091819.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20250313065552.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20250313065552.js +2 -2
- package/.medusa/server/src/modules/seller/migrations/Migration20250530111528.d.ts +1 -1
- package/.medusa/server/src/modules/seller/migrations/Migration20250530111528.js +2 -2
- package/.medusa/server/src/modules/seller/utils.d.ts +4 -0
- package/.medusa/server/src/modules/seller/utils.js +18 -1
- package/.medusa/server/src/modules/split-order-payment/migrations/Migration20250516075429.d.ts +1 -1
- package/.medusa/server/src/modules/split-order-payment/migrations/Migration20250516075429.js +2 -2
- package/.medusa/server/src/modules/taxcode/migrations/Migration20250116135408.d.ts +1 -1
- package/.medusa/server/src/modules/taxcode/migrations/Migration20250116135408.js +2 -2
- package/.medusa/server/src/modules/wishlist/migrations/Migration20250424110903.d.ts +1 -1
- package/.medusa/server/src/modules/wishlist/migrations/Migration20250424110903.js +2 -2
- package/.medusa/server/src/workflows/cart/workflows/split-and-complete-cart.js +2 -2
- package/.medusa/server/src/workflows/order/steps/calculate-payout-for-order.d.ts +1 -1
- package/.medusa/server/src/workflows/promotions/steps/register-usage-step.d.ts +7 -2
- package/.medusa/server/src/workflows/promotions/steps/register-usage-step.js +6 -6
- package/.medusa/server/src/workflows/seller/steps/validate-products-to-import.d.ts +10 -10
- package/package.json +15 -28
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export type VendorGetCustomersParamsType = z.infer<typeof VendorGetCustomersParams>;
|
|
3
3
|
export declare const VendorGetCustomersParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
} & {
|
|
5
6
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
6
7
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
7
8
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,19 +10,20 @@ export declare const VendorGetCustomersParams: z.ZodObject<{
|
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
offset: number;
|
|
11
12
|
limit: number;
|
|
12
|
-
fields?: string | undefined;
|
|
13
13
|
order?: string | undefined;
|
|
14
|
+
fields?: string | undefined;
|
|
14
15
|
with_deleted?: boolean | undefined;
|
|
15
16
|
}, {
|
|
17
|
+
order?: string | undefined;
|
|
16
18
|
fields?: string | undefined;
|
|
17
19
|
offset?: unknown;
|
|
18
20
|
limit?: unknown;
|
|
19
|
-
order?: string | undefined;
|
|
20
21
|
with_deleted?: unknown;
|
|
21
22
|
}>;
|
|
22
23
|
export type VendorGetCustomerOrdersParamsType = z.infer<typeof VendorGetCustomerOrdersParams>;
|
|
23
24
|
export declare const VendorGetCustomerOrdersParams: z.ZodObject<{
|
|
24
25
|
fields: z.ZodOptional<z.ZodString>;
|
|
26
|
+
} & {
|
|
25
27
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
26
28
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
27
29
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -29,14 +31,14 @@ export declare const VendorGetCustomerOrdersParams: z.ZodObject<{
|
|
|
29
31
|
}, "strip", z.ZodTypeAny, {
|
|
30
32
|
offset: number;
|
|
31
33
|
limit: number;
|
|
32
|
-
fields?: string | undefined;
|
|
33
34
|
order?: string | undefined;
|
|
35
|
+
fields?: string | undefined;
|
|
34
36
|
with_deleted?: boolean | undefined;
|
|
35
37
|
}, {
|
|
38
|
+
order?: string | undefined;
|
|
36
39
|
fields?: string | undefined;
|
|
37
40
|
offset?: unknown;
|
|
38
41
|
limit?: unknown;
|
|
39
|
-
order?: string | undefined;
|
|
40
42
|
with_deleted?: unknown;
|
|
41
43
|
}>;
|
|
42
44
|
/**
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export type VendorGetFulfillmentProvidersParamsType = z.infer<typeof VendorGetFulfillmentProvidersParams>;
|
|
3
3
|
export declare const VendorGetFulfillmentProvidersParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
} & {
|
|
5
6
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
6
7
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
7
8
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,13 +10,13 @@ export declare const VendorGetFulfillmentProvidersParams: z.ZodObject<{
|
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
offset: number;
|
|
11
12
|
limit: number;
|
|
12
|
-
fields?: string | undefined;
|
|
13
13
|
order?: string | undefined;
|
|
14
|
+
fields?: string | undefined;
|
|
14
15
|
with_deleted?: boolean | undefined;
|
|
15
16
|
}, {
|
|
17
|
+
order?: string | undefined;
|
|
16
18
|
fields?: string | undefined;
|
|
17
19
|
offset?: unknown;
|
|
18
20
|
limit?: unknown;
|
|
19
|
-
order?: string | undefined;
|
|
20
21
|
with_deleted?: unknown;
|
|
21
22
|
}>;
|
|
@@ -24,6 +24,7 @@ export declare const VendorFulfillmentSetParams: z.ZodObject<{
|
|
|
24
24
|
*/
|
|
25
25
|
export declare const geoZoneCountry: z.ZodObject<{
|
|
26
26
|
country_code: z.ZodString;
|
|
27
|
+
} & {
|
|
27
28
|
type: z.ZodLiteral<"country">;
|
|
28
29
|
}, "strip", z.ZodTypeAny, {
|
|
29
30
|
type: "country";
|
|
@@ -53,6 +54,7 @@ export declare const geoZoneCountry: z.ZodObject<{
|
|
|
53
54
|
*/
|
|
54
55
|
export declare const geoZoneProvince: z.ZodObject<{
|
|
55
56
|
country_code: z.ZodString;
|
|
57
|
+
} & {
|
|
56
58
|
type: z.ZodLiteral<"province">;
|
|
57
59
|
province_code: z.ZodString;
|
|
58
60
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -89,6 +91,7 @@ export declare const geoZoneProvince: z.ZodObject<{
|
|
|
89
91
|
*/
|
|
90
92
|
export declare const geoZoneCity: z.ZodObject<{
|
|
91
93
|
country_code: z.ZodString;
|
|
94
|
+
} & {
|
|
92
95
|
type: z.ZodLiteral<"city">;
|
|
93
96
|
province_code: z.ZodString;
|
|
94
97
|
city: z.ZodString;
|
|
@@ -132,6 +135,7 @@ export declare const geoZoneCity: z.ZodObject<{
|
|
|
132
135
|
*/
|
|
133
136
|
export declare const geoZoneZip: z.ZodObject<{
|
|
134
137
|
country_code: z.ZodString;
|
|
138
|
+
} & {
|
|
135
139
|
type: z.ZodLiteral<"zip">;
|
|
136
140
|
province_code: z.ZodString;
|
|
137
141
|
city: z.ZodString;
|
|
@@ -172,6 +176,7 @@ export declare const VendorCreateFulfillmentSetServiceZonesSchema: z.ZodObject<{
|
|
|
172
176
|
name: z.ZodString;
|
|
173
177
|
geo_zones: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
174
178
|
country_code: z.ZodString;
|
|
179
|
+
} & {
|
|
175
180
|
type: z.ZodLiteral<"country">;
|
|
176
181
|
}, "strip", z.ZodTypeAny, {
|
|
177
182
|
type: "country";
|
|
@@ -181,6 +186,7 @@ export declare const VendorCreateFulfillmentSetServiceZonesSchema: z.ZodObject<{
|
|
|
181
186
|
country_code: string;
|
|
182
187
|
}>, z.ZodObject<{
|
|
183
188
|
country_code: z.ZodString;
|
|
189
|
+
} & {
|
|
184
190
|
type: z.ZodLiteral<"province">;
|
|
185
191
|
province_code: z.ZodString;
|
|
186
192
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -193,6 +199,7 @@ export declare const VendorCreateFulfillmentSetServiceZonesSchema: z.ZodObject<{
|
|
|
193
199
|
province_code: string;
|
|
194
200
|
}>, z.ZodObject<{
|
|
195
201
|
country_code: z.ZodString;
|
|
202
|
+
} & {
|
|
196
203
|
type: z.ZodLiteral<"city">;
|
|
197
204
|
province_code: z.ZodString;
|
|
198
205
|
city: z.ZodString;
|
|
@@ -208,6 +215,7 @@ export declare const VendorCreateFulfillmentSetServiceZonesSchema: z.ZodObject<{
|
|
|
208
215
|
province_code: string;
|
|
209
216
|
}>, z.ZodObject<{
|
|
210
217
|
country_code: z.ZodString;
|
|
218
|
+
} & {
|
|
211
219
|
type: z.ZodLiteral<"zip">;
|
|
212
220
|
province_code: z.ZodString;
|
|
213
221
|
city: z.ZodString;
|
|
@@ -312,8 +320,10 @@ export declare const VendorCreateFulfillmentSetServiceZonesSchema: z.ZodObject<{
|
|
|
312
320
|
export declare const VendorUpdateServiceZone: z.ZodObject<{
|
|
313
321
|
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
314
322
|
geo_zones: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
|
|
315
|
-
type: z.ZodLiteral<"country">;
|
|
316
323
|
country_code: z.ZodString;
|
|
324
|
+
} & {
|
|
325
|
+
type: z.ZodLiteral<"country">;
|
|
326
|
+
} & {
|
|
317
327
|
id: z.ZodOptional<z.ZodString>;
|
|
318
328
|
}, "strip", z.ZodTypeAny, {
|
|
319
329
|
type: "country";
|
|
@@ -324,9 +334,11 @@ export declare const VendorUpdateServiceZone: z.ZodObject<{
|
|
|
324
334
|
country_code: string;
|
|
325
335
|
id?: string | undefined;
|
|
326
336
|
}>, z.ZodObject<{
|
|
327
|
-
type: z.ZodLiteral<"province">;
|
|
328
337
|
country_code: z.ZodString;
|
|
338
|
+
} & {
|
|
339
|
+
type: z.ZodLiteral<"province">;
|
|
329
340
|
province_code: z.ZodString;
|
|
341
|
+
} & {
|
|
330
342
|
id: z.ZodOptional<z.ZodString>;
|
|
331
343
|
}, "strip", z.ZodTypeAny, {
|
|
332
344
|
type: "province";
|
|
@@ -339,10 +351,12 @@ export declare const VendorUpdateServiceZone: z.ZodObject<{
|
|
|
339
351
|
province_code: string;
|
|
340
352
|
id?: string | undefined;
|
|
341
353
|
}>, z.ZodObject<{
|
|
342
|
-
type: z.ZodLiteral<"city">;
|
|
343
|
-
city: z.ZodString;
|
|
344
354
|
country_code: z.ZodString;
|
|
355
|
+
} & {
|
|
356
|
+
type: z.ZodLiteral<"city">;
|
|
345
357
|
province_code: z.ZodString;
|
|
358
|
+
city: z.ZodString;
|
|
359
|
+
} & {
|
|
346
360
|
id: z.ZodOptional<z.ZodString>;
|
|
347
361
|
}, "strip", z.ZodTypeAny, {
|
|
348
362
|
type: "city";
|
|
@@ -357,11 +371,13 @@ export declare const VendorUpdateServiceZone: z.ZodObject<{
|
|
|
357
371
|
province_code: string;
|
|
358
372
|
id?: string | undefined;
|
|
359
373
|
}>, z.ZodObject<{
|
|
360
|
-
type: z.ZodLiteral<"zip">;
|
|
361
|
-
city: z.ZodString;
|
|
362
374
|
country_code: z.ZodString;
|
|
375
|
+
} & {
|
|
376
|
+
type: z.ZodLiteral<"zip">;
|
|
363
377
|
province_code: z.ZodString;
|
|
378
|
+
city: z.ZodString;
|
|
364
379
|
postal_expression: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
380
|
+
} & {
|
|
365
381
|
id: z.ZodOptional<z.ZodString>;
|
|
366
382
|
}, "strip", z.ZodTypeAny, {
|
|
367
383
|
type: "zip";
|
|
@@ -51,3 +51,26 @@ export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse)
|
|
|
51
51
|
* - cookie_auth: []
|
|
52
52
|
*/
|
|
53
53
|
export declare const POST: (req: AuthenticatedMedusaRequest<VendorUpdateInventoryItemType>, res: MedusaResponse) => Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* @oas [delete] /vendor/inventory-items/{id}
|
|
56
|
+
* operationId: "VendorDeleteInventoryItem"
|
|
57
|
+
* summary: "Delete inventory item"
|
|
58
|
+
* description: "Deletes InventoryItem of specified id"
|
|
59
|
+
* x-authenticated: true
|
|
60
|
+
* parameters:
|
|
61
|
+
* - in: path
|
|
62
|
+
* name: id
|
|
63
|
+
* required: true
|
|
64
|
+
* description: The ID of the InventoryItem.
|
|
65
|
+
* schema:
|
|
66
|
+
* type: string
|
|
67
|
+
* responses:
|
|
68
|
+
* "200":
|
|
69
|
+
* description: Ok
|
|
70
|
+
* tags:
|
|
71
|
+
* - Vendor Inventory Items
|
|
72
|
+
* security:
|
|
73
|
+
* - api_token: []
|
|
74
|
+
* - cookie_auth: []
|
|
75
|
+
*/
|
|
76
|
+
export declare const DELETE: (req: AuthenticatedMedusaRequest, res: MedusaResponse) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.POST = exports.GET = void 0;
|
|
3
|
+
exports.DELETE = exports.POST = exports.GET = void 0;
|
|
4
4
|
const utils_1 = require("@medusajs/framework/utils");
|
|
5
5
|
const core_flows_1 = require("@medusajs/medusa/core-flows");
|
|
6
6
|
const framework_1 = require("@mercurjs/framework");
|
|
@@ -92,4 +92,50 @@ const POST = async (req, res) => {
|
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
exports.POST = POST;
|
|
95
|
-
|
|
95
|
+
/**
|
|
96
|
+
* @oas [delete] /vendor/inventory-items/{id}
|
|
97
|
+
* operationId: "VendorDeleteInventoryItem"
|
|
98
|
+
* summary: "Delete inventory item"
|
|
99
|
+
* description: "Deletes InventoryItem of specified id"
|
|
100
|
+
* x-authenticated: true
|
|
101
|
+
* parameters:
|
|
102
|
+
* - in: path
|
|
103
|
+
* name: id
|
|
104
|
+
* required: true
|
|
105
|
+
* description: The ID of the InventoryItem.
|
|
106
|
+
* schema:
|
|
107
|
+
* type: string
|
|
108
|
+
* responses:
|
|
109
|
+
* "200":
|
|
110
|
+
* description: Ok
|
|
111
|
+
* tags:
|
|
112
|
+
* - Vendor Inventory Items
|
|
113
|
+
* security:
|
|
114
|
+
* - api_token: []
|
|
115
|
+
* - cookie_auth: []
|
|
116
|
+
*/
|
|
117
|
+
const DELETE = async (req, res) => {
|
|
118
|
+
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
119
|
+
const { id } = req.params;
|
|
120
|
+
const { data: [inventory_item] } = await query.graph({
|
|
121
|
+
entity: 'inventory_item',
|
|
122
|
+
fields: req.queryConfig.fields,
|
|
123
|
+
filters: {
|
|
124
|
+
id
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
if (!inventory_item) {
|
|
128
|
+
throw new utils_1.MedusaError(utils_1.MedusaError.Types.NOT_FOUND, `Inventory item with id: ${id} was not found`);
|
|
129
|
+
}
|
|
130
|
+
await (0, core_flows_1.deleteInventoryItemWorkflow)(req.scope).run({
|
|
131
|
+
input: [inventory_item.id]
|
|
132
|
+
});
|
|
133
|
+
res.json({
|
|
134
|
+
id,
|
|
135
|
+
object: "inventory_item",
|
|
136
|
+
deleted: true,
|
|
137
|
+
inventory_item
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
exports.DELETE = DELETE;
|
|
141
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9pbnZlbnRvcnkta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id',
|
|
53
|
+
middlewares: [
|
|
54
|
+
(0, framework_1.validateAndTransformQuery)(validators_1.VendorGetInventoryItemsParams, query_config_1.vendorInventoryItemQueryConfig.retrieve),
|
|
55
|
+
(0, middlewares_1.checkResourceOwnershipByResourceId)({
|
|
56
|
+
entryPoint: seller_inventory_item_1.default.entryPoint,
|
|
57
|
+
filterField: 'inventory_item_id'
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
},
|
|
50
61
|
{
|
|
51
62
|
method: ['GET'],
|
|
52
63
|
matcher: '/vendor/inventory-items/:id/location-levels',
|
|
@@ -118,4 +129,4 @@ exports.vendorInventoryItemsMiddlewares = [
|
|
|
118
129
|
],
|
|
119
130
|
},
|
|
120
131
|
];
|
|
121
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
132
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWlkZGxld2FyZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9pbnZlbnRvcnktaXRlbXMvbWlkZGxld2FyZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQUEsbURBSTRCO0FBRzVCLGlHQUFzRTtBQUN0RSxpR0FBc0U7QUFDdEUsd0VBRytDO0FBQy9DLGlEQUd1QjtBQUN2Qiw2Q0FPcUI7QUFFUixRQUFBLCtCQUErQixHQUFzQjtJQUNoRTtRQUNFLE1BQU0sRUFBRSxDQUFDLEtBQUssQ0FBQztRQUNmLE9BQU8sRUFBRSx5QkFBeUI7UUFDbEMsV0FBVyxFQUFFO1lBQ1gsSUFBQSxxQ0FBeUIsRUFDdkIsMENBQTZCLEVBQzdCLDZDQUE4QixDQUFDLElBQUksQ0FDcEM7WUFDRCxJQUFBLDhCQUFnQixHQUFFO1NBQ25CO0tBQ0Y7SUFDRDtRQUNFLE1BQU0sRUFBRSxDQU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DSDtZQUNELElBQUEsc0JBQVUsRUFDUiw0QkFBNEIsRUFDNUIsSUFBQSxnREFBa0MsRUFBQztnQkFDakMsVUFBVSxFQUFFLCtCQUFtQixDQUFDLFVBQVU7Z0JBQzFDLFdBQVcsRUFBRSxtQkFBbUI7Z0JBQ2hDLFVBQVUsRUFBRSxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQUMsR0FBRyxDQUFDLE1BQU0sQ0FBQyxXQUFXO2FBQzVDLENBQUMsQ0FDSDtTQUNGO0tBQ0Y7SUFDRDtRQUNFLE1BQU0sRUFBRSxDQUFDLFFBQVEsQ0FBQztRQUNsQixPQUFPLEVBQUUsMERBQTBEO1FBQ25FLFdBQVcsRUFBRTtZQUNYLElBQUEscUNBQXlCLEVBQ3ZCLDBDQUE2QixFQUM3Qiw4Q0FBK0IsQ0FBQyxRQUFRLENBQ3pDO1NBQ0Y7S0FDRjtDQUNGLENBQUEifQ==
|
|
@@ -11,103 +11,36 @@ export declare const VendorGetInventoryItemsParamsFields: z.ZodObject<{
|
|
|
11
11
|
inventory_item_id?: string | string[] | undefined;
|
|
12
12
|
}>;
|
|
13
13
|
export type VendorGetInventoryItemsParamsType = z.infer<typeof VendorGetInventoryItemsParams>;
|
|
14
|
-
export declare const VendorGetInventoryItemsParams: z.ZodObject<{
|
|
14
|
+
export declare const VendorGetInventoryItemsParams: z.ZodObject<{} & {
|
|
15
15
|
[x: string]: any;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
$and: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
|
|
17
|
+
q: z.ZodOptional<z.ZodString>;
|
|
18
|
+
inventory_item_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
19
|
+
}, "strip", z.ZodTypeAny, {
|
|
20
|
+
q?: string | undefined;
|
|
21
|
+
inventory_item_id?: string | string[] | undefined;
|
|
20
22
|
}, {
|
|
21
|
-
|
|
23
|
+
q?: string | undefined;
|
|
24
|
+
inventory_item_id?: string | string[] | undefined;
|
|
22
25
|
}>, "many">>>;
|
|
23
|
-
$or: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* properties:
|
|
30
|
-
* sku:
|
|
31
|
-
* type: string
|
|
32
|
-
* title: sku
|
|
33
|
-
* description: The inventory item's SKU.
|
|
34
|
-
* hs_code:
|
|
35
|
-
* type: string
|
|
36
|
-
* title: hs_code
|
|
37
|
-
* description: The inventory item's HS code.
|
|
38
|
-
* weight:
|
|
39
|
-
* type: number
|
|
40
|
-
* title: weight
|
|
41
|
-
* description: The inventory item's weight.
|
|
42
|
-
* length:
|
|
43
|
-
* type: number
|
|
44
|
-
* title: length
|
|
45
|
-
* description: The inventory item's length.
|
|
46
|
-
* height:
|
|
47
|
-
* type: number
|
|
48
|
-
* title: height
|
|
49
|
-
* description: The inventory item's height.
|
|
50
|
-
* width:
|
|
51
|
-
* type: number
|
|
52
|
-
* title: width
|
|
53
|
-
* description: The inventory item's width.
|
|
54
|
-
* origin_country:
|
|
55
|
-
* type: string
|
|
56
|
-
* title: origin_country
|
|
57
|
-
* description: The inventory item's origin country.
|
|
58
|
-
* mid_code:
|
|
59
|
-
* type: string
|
|
60
|
-
* title: mid_code
|
|
61
|
-
* description: The inventory item's mid code.
|
|
62
|
-
* material:
|
|
63
|
-
* type: string
|
|
64
|
-
* title: material
|
|
65
|
-
* description: The inventory item's material.
|
|
66
|
-
* title:
|
|
67
|
-
* type: string
|
|
68
|
-
* title: title
|
|
69
|
-
* description: The inventory item's title.
|
|
70
|
-
* description:
|
|
71
|
-
* type: string
|
|
72
|
-
* title: description
|
|
73
|
-
* description: The description of the variant associated with the inventory item.
|
|
74
|
-
* requires_shipping:
|
|
75
|
-
* type: boolean
|
|
76
|
-
* title: requires_shipping
|
|
77
|
-
* description: Whether the item requires shipping.
|
|
78
|
-
* thumbnail:
|
|
79
|
-
* type: string
|
|
80
|
-
* title: thumbnail
|
|
81
|
-
* description: The inventory item's thumbnail.
|
|
82
|
-
* metadata:
|
|
83
|
-
* type: object
|
|
84
|
-
* description: The inventory item's metadata, used to store custom key-value pairs.
|
|
85
|
-
*/
|
|
86
|
-
z.UnknownKeysParam, z.ZodTypeAny, {
|
|
87
|
-
[x: string]: any;
|
|
26
|
+
$or: z.ZodOptional<z.ZodLazy<z.ZodArray<z.ZodObject<{
|
|
27
|
+
q: z.ZodOptional<z.ZodString>;
|
|
28
|
+
inventory_item_id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
q?: string | undefined;
|
|
31
|
+
inventory_item_id?: string | string[] | undefined;
|
|
88
32
|
}, {
|
|
89
|
-
|
|
33
|
+
q?: string | undefined;
|
|
34
|
+
inventory_item_id?: string | string[] | undefined;
|
|
90
35
|
}>, "many">>>;
|
|
91
36
|
}, "strict", z.ZodTypeAny, {
|
|
92
37
|
[x: string]: any;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
$and?: {
|
|
96
|
-
[x: string]: any;
|
|
97
|
-
}[] | undefined;
|
|
98
|
-
$or?: {
|
|
99
|
-
[x: string]: any;
|
|
100
|
-
}[] | undefined;
|
|
38
|
+
$and?: unknown;
|
|
39
|
+
$or?: unknown;
|
|
101
40
|
}, {
|
|
102
41
|
[x: string]: any;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
$and?: {
|
|
106
|
-
[x: string]: any;
|
|
107
|
-
}[] | undefined;
|
|
108
|
-
$or?: {
|
|
109
|
-
[x: string]: any;
|
|
110
|
-
}[] | undefined;
|
|
42
|
+
$and?: unknown;
|
|
43
|
+
$or?: unknown;
|
|
111
44
|
}>;
|
|
112
45
|
/**
|
|
113
46
|
* @schema VendorUpdateInventoryLevel
|
|
@@ -244,35 +177,35 @@ export declare const VendorUpdateInventoryItem: z.ZodObject<{
|
|
|
244
177
|
thumbnail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
245
178
|
metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
246
179
|
}, "strict", z.ZodTypeAny, {
|
|
247
|
-
sku?: string | null | undefined;
|
|
248
|
-
hs_code?: string | null | undefined;
|
|
249
|
-
weight?: number | null | undefined;
|
|
250
180
|
length?: number | null | undefined;
|
|
251
|
-
|
|
181
|
+
description?: string | null | undefined;
|
|
182
|
+
title?: string | null | undefined;
|
|
183
|
+
thumbnail?: string | null | undefined;
|
|
252
184
|
width?: number | null | undefined;
|
|
185
|
+
weight?: number | null | undefined;
|
|
186
|
+
height?: number | null | undefined;
|
|
253
187
|
origin_country?: string | null | undefined;
|
|
188
|
+
hs_code?: string | null | undefined;
|
|
254
189
|
mid_code?: string | null | undefined;
|
|
255
190
|
material?: string | null | undefined;
|
|
256
|
-
title?: string | null | undefined;
|
|
257
|
-
description?: string | null | undefined;
|
|
258
|
-
requires_shipping?: boolean | undefined;
|
|
259
|
-
thumbnail?: string | null | undefined;
|
|
260
191
|
metadata?: Record<string, unknown> | null | undefined;
|
|
261
|
-
}, {
|
|
262
192
|
sku?: string | null | undefined;
|
|
263
|
-
|
|
264
|
-
|
|
193
|
+
requires_shipping?: boolean | undefined;
|
|
194
|
+
}, {
|
|
265
195
|
length?: number | null | undefined;
|
|
266
|
-
|
|
196
|
+
description?: string | null | undefined;
|
|
197
|
+
title?: string | null | undefined;
|
|
198
|
+
thumbnail?: string | null | undefined;
|
|
267
199
|
width?: number | null | undefined;
|
|
200
|
+
weight?: number | null | undefined;
|
|
201
|
+
height?: number | null | undefined;
|
|
268
202
|
origin_country?: string | null | undefined;
|
|
203
|
+
hs_code?: string | null | undefined;
|
|
269
204
|
mid_code?: string | null | undefined;
|
|
270
205
|
material?: string | null | undefined;
|
|
271
|
-
title?: string | null | undefined;
|
|
272
|
-
description?: string | null | undefined;
|
|
273
|
-
requires_shipping?: boolean | undefined;
|
|
274
|
-
thumbnail?: string | null | undefined;
|
|
275
206
|
metadata?: Record<string, unknown> | null | undefined;
|
|
207
|
+
sku?: string | null | undefined;
|
|
208
|
+
requires_shipping?: boolean | undefined;
|
|
276
209
|
}>;
|
|
277
210
|
/**
|
|
278
211
|
* @schema VendorBatchInventoryItemLevels
|
|
@@ -3,6 +3,7 @@ import { MemberRole } from '@mercurjs/framework';
|
|
|
3
3
|
export type VendorGetMemberInviteParamsType = z.infer<typeof VendorGetMemberInviteParams>;
|
|
4
4
|
export declare const VendorGetMemberInviteParams: z.ZodObject<{
|
|
5
5
|
fields: z.ZodOptional<z.ZodString>;
|
|
6
|
+
} & {
|
|
6
7
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
7
8
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
8
9
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -10,14 +11,14 @@ export declare const VendorGetMemberInviteParams: z.ZodObject<{
|
|
|
10
11
|
}, "strip", z.ZodTypeAny, {
|
|
11
12
|
offset: number;
|
|
12
13
|
limit: number;
|
|
13
|
-
fields?: string | undefined;
|
|
14
14
|
order?: string | undefined;
|
|
15
|
+
fields?: string | undefined;
|
|
15
16
|
with_deleted?: boolean | undefined;
|
|
16
17
|
}, {
|
|
18
|
+
order?: string | undefined;
|
|
17
19
|
fields?: string | undefined;
|
|
18
20
|
offset?: unknown;
|
|
19
21
|
limit?: unknown;
|
|
20
|
-
order?: string | undefined;
|
|
21
22
|
with_deleted?: unknown;
|
|
22
23
|
}>;
|
|
23
24
|
/**
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export type VendorGetMemberParamsType = z.infer<typeof VendorGetMemberParams>;
|
|
3
3
|
export declare const VendorGetMemberParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
} & {
|
|
5
6
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
6
7
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
7
8
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,14 +10,14 @@ export declare const VendorGetMemberParams: z.ZodObject<{
|
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
offset: number;
|
|
11
12
|
limit: number;
|
|
12
|
-
fields?: string | undefined;
|
|
13
13
|
order?: string | undefined;
|
|
14
|
+
fields?: string | undefined;
|
|
14
15
|
with_deleted?: boolean | undefined;
|
|
15
16
|
}, {
|
|
17
|
+
order?: string | undefined;
|
|
16
18
|
fields?: string | undefined;
|
|
17
19
|
offset?: unknown;
|
|
18
20
|
limit?: unknown;
|
|
19
|
-
order?: string | undefined;
|
|
20
21
|
with_deleted?: unknown;
|
|
21
22
|
}>;
|
|
22
23
|
/**
|
|
@@ -47,12 +48,12 @@ export declare const VendorUpdateMember: z.ZodObject<{
|
|
|
47
48
|
photo: z.ZodOptional<z.ZodString>;
|
|
48
49
|
}, "strict", z.ZodTypeAny, {
|
|
49
50
|
name?: string | undefined;
|
|
50
|
-
bio?: string | undefined;
|
|
51
|
-
phone?: string | undefined;
|
|
52
51
|
photo?: string | undefined;
|
|
52
|
+
phone?: string | undefined;
|
|
53
|
+
bio?: string | undefined;
|
|
53
54
|
}, {
|
|
54
55
|
name?: string | undefined;
|
|
55
|
-
bio?: string | undefined;
|
|
56
|
-
phone?: string | undefined;
|
|
57
56
|
photo?: string | undefined;
|
|
57
|
+
phone?: string | undefined;
|
|
58
|
+
bio?: string | undefined;
|
|
58
59
|
}>;
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export type VendorGetNotificationParamsType = z.infer<typeof VendorGetNotificationParams>;
|
|
3
3
|
export declare const VendorGetNotificationParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
} & {
|
|
5
6
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
6
7
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
7
8
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,13 +10,13 @@ export declare const VendorGetNotificationParams: z.ZodObject<{
|
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
offset: number;
|
|
11
12
|
limit: number;
|
|
12
|
-
fields?: string | undefined;
|
|
13
13
|
order?: string | undefined;
|
|
14
|
+
fields?: string | undefined;
|
|
14
15
|
with_deleted?: boolean | undefined;
|
|
15
16
|
}, {
|
|
17
|
+
order?: string | undefined;
|
|
16
18
|
fields?: string | undefined;
|
|
17
19
|
offset?: unknown;
|
|
18
20
|
limit?: unknown;
|
|
19
|
-
order?: string | undefined;
|
|
20
21
|
with_deleted?: unknown;
|
|
21
22
|
}>;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
2
|
export type VendorGetOrderParamsType = z.infer<typeof VendorGetOrderParams>;
|
|
3
3
|
export declare const VendorGetOrderParams: z.ZodObject<{
|
|
4
|
+
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
} & {
|
|
4
6
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
5
7
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
6
|
-
fields: z.ZodOptional<z.ZodString>;
|
|
7
8
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
8
9
|
with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
10
|
+
} & {
|
|
9
11
|
created_at: z.ZodOptional<z.ZodUnion<[any, z.ZodObject<{
|
|
10
12
|
$eq: any;
|
|
11
13
|
$ne: any;
|
|
@@ -94,29 +96,29 @@ export declare const VendorGetOrderParams: z.ZodObject<{
|
|
|
94
96
|
}, "strip", z.ZodTypeAny, {
|
|
95
97
|
offset: number;
|
|
96
98
|
limit: number;
|
|
99
|
+
status?: any;
|
|
100
|
+
created_at?: any;
|
|
97
101
|
fields?: string | undefined;
|
|
98
102
|
order?: string | undefined;
|
|
99
103
|
with_deleted?: boolean | undefined;
|
|
100
|
-
|
|
101
|
-
status?: any;
|
|
102
|
-
fulfillment_status?: string | undefined;
|
|
103
|
-
payment_status?: string | undefined;
|
|
104
|
+
q?: string | undefined;
|
|
104
105
|
region_id?: string | undefined;
|
|
105
106
|
sales_channel_id?: string | undefined;
|
|
106
|
-
|
|
107
|
+
fulfillment_status?: string | undefined;
|
|
108
|
+
payment_status?: string | undefined;
|
|
107
109
|
}, {
|
|
110
|
+
status?: any;
|
|
111
|
+
created_at?: any;
|
|
108
112
|
offset?: unknown;
|
|
109
113
|
limit?: unknown;
|
|
110
114
|
fields?: string | undefined;
|
|
111
115
|
order?: string | undefined;
|
|
112
116
|
with_deleted?: unknown;
|
|
113
|
-
|
|
114
|
-
status?: any;
|
|
115
|
-
fulfillment_status?: string | undefined;
|
|
116
|
-
payment_status?: string | undefined;
|
|
117
|
+
q?: string | undefined;
|
|
117
118
|
region_id?: string | undefined;
|
|
118
119
|
sales_channel_id?: string | undefined;
|
|
119
|
-
|
|
120
|
+
fulfillment_status?: string | undefined;
|
|
121
|
+
payment_status?: string | undefined;
|
|
120
122
|
}>;
|
|
121
123
|
export type VendorGetOrderChangesParamsType = z.infer<typeof VendorGetOrderChangesParams>;
|
|
122
124
|
export declare const VendorGetOrderChangesParams: z.ZodObject<{
|
|
@@ -2,6 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
export type VendorGetPayoutParamsType = z.infer<typeof VendorGetPayoutParams>;
|
|
3
3
|
export declare const VendorGetPayoutParams: z.ZodObject<{
|
|
4
4
|
fields: z.ZodOptional<z.ZodString>;
|
|
5
|
+
} & {
|
|
5
6
|
offset: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
6
7
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
7
8
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
@@ -9,13 +10,13 @@ export declare const VendorGetPayoutParams: z.ZodObject<{
|
|
|
9
10
|
}, "strip", z.ZodTypeAny, {
|
|
10
11
|
offset: number;
|
|
11
12
|
limit: number;
|
|
12
|
-
fields?: string | undefined;
|
|
13
13
|
order?: string | undefined;
|
|
14
|
+
fields?: string | undefined;
|
|
14
15
|
with_deleted?: boolean | undefined;
|
|
15
16
|
}, {
|
|
17
|
+
order?: string | undefined;
|
|
16
18
|
fields?: string | undefined;
|
|
17
19
|
offset?: unknown;
|
|
18
20
|
limit?: unknown;
|
|
19
|
-
order?: string | undefined;
|
|
20
21
|
with_deleted?: unknown;
|
|
21
22
|
}>;
|