@mercurjs/b2c-core 1.4.5 → 1.5.0
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/products/validators.d.ts +54 -54
- package/.medusa/server/src/api/admin/stock-locations/route.d.ts +1 -1
- package/.medusa/server/src/api/admin/stock-locations/route.js +22 -9
- package/.medusa/server/src/api/vendor/campaigns/route.d.ts +2 -2
- package/.medusa/server/src/api/vendor/campaigns/route.js +34 -15
- package/.medusa/server/src/api/vendor/campaigns/validators.d.ts +9 -5
- package/.medusa/server/src/api/vendor/campaigns/validators.js +16 -40
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.d.ts +127 -2
- package/.medusa/server/src/api/vendor/products/[id]/variants/route.js +149 -4
- package/.medusa/server/src/api/vendor/products/middlewares.js +12 -1
- package/.medusa/server/src/api/vendor/products/query-config.d.ts +12 -0
- package/.medusa/server/src/api/vendor/products/query-config.js +42 -2
- package/.medusa/server/src/api/vendor/products/route.js +3 -1
- package/.medusa/server/src/api/vendor/products/validators.d.ts +391 -54
- package/.medusa/server/src/api/vendor/products/validators.js +33 -2
- package/.medusa/server/src/api/vendor/promotions/middlewares.js +3 -1
- package/.medusa/server/src/api/vendor/promotions/rule-attribute-options/[rule_type]/route.d.ts +2 -1
- package/.medusa/server/src/api/vendor/promotions/rule-attribute-options/[rule_type]/route.js +8 -8
- package/.medusa/server/src/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route.d.ts +3 -64
- package/.medusa/server/src/api/vendor/promotions/rule-value-options/[rule_type]/[rule_attribute_id]/route.js +47 -24
- package/.medusa/server/src/api/vendor/promotions/utils.d.ts +4 -4
- package/.medusa/server/src/api/vendor/promotions/utils.js +50 -50
- package/.medusa/server/src/api/vendor/promotions/validators.d.ts +11 -10
- package/.medusa/server/src/api/vendor/promotions/validators.js +17 -5
- package/.medusa/server/src/api/vendor/uploads/route.js +1 -1
- package/.medusa/server/src/shared/infra/http/middlewares/types.d.ts +14 -0
- package/.medusa/server/src/shared/infra/http/middlewares/types.js +3 -0
- package/.medusa/server/src/shared/infra/http/middlewares/vendor-promotions-rule-attribute-options-path-params-guard.d.ts +3 -0
- package/.medusa/server/src/shared/infra/http/middlewares/vendor-promotions-rule-attribute-options-path-params-guard.js +24 -0
- package/.medusa/server/src/shared/infra/http/middlewares/vendor-promotions-rule-value-options-path-params-guard.d.ts +2 -1
- package/.medusa/server/src/shared/infra/http/middlewares/vendor-promotions-rule-value-options-path-params-guard.js +9 -1
- package/.medusa/server/src/shared/infra/http/utils/zod.d.ts +33 -0
- package/.medusa/server/src/shared/infra/http/utils/zod.js +28 -2
- package/.medusa/server/src/workflows/seller/steps/validate-products-to-import.d.ts +4 -3
- package/package.json +1 -1
|
@@ -1043,6 +1043,8 @@ export declare const CreateProductVariant: z.ZodObject<{
|
|
|
1043
1043
|
}>, "many">>;
|
|
1044
1044
|
}, "strict", z.ZodTypeAny, {
|
|
1045
1045
|
title: string;
|
|
1046
|
+
allow_backorder: false;
|
|
1047
|
+
manage_inventory: true;
|
|
1046
1048
|
prices: {
|
|
1047
1049
|
currency_code: string;
|
|
1048
1050
|
amount: number;
|
|
@@ -1050,8 +1052,6 @@ export declare const CreateProductVariant: z.ZodObject<{
|
|
|
1050
1052
|
max_quantity?: number | null | undefined;
|
|
1051
1053
|
rules?: Record<string, string> | undefined;
|
|
1052
1054
|
}[];
|
|
1053
|
-
allow_backorder: false;
|
|
1054
|
-
manage_inventory: true;
|
|
1055
1055
|
length?: number | undefined;
|
|
1056
1056
|
options?: Record<string, string> | undefined;
|
|
1057
1057
|
width?: number | undefined;
|
|
@@ -1063,10 +1063,10 @@ export declare const CreateProductVariant: z.ZodObject<{
|
|
|
1063
1063
|
material?: string | undefined;
|
|
1064
1064
|
metadata?: Record<string, unknown> | undefined;
|
|
1065
1065
|
sku?: string | undefined;
|
|
1066
|
+
variant_rank?: number | undefined;
|
|
1066
1067
|
ean?: string | undefined;
|
|
1067
1068
|
upc?: string | undefined;
|
|
1068
1069
|
barcode?: string | undefined;
|
|
1069
|
-
variant_rank?: number | undefined;
|
|
1070
1070
|
inventory_items?: {
|
|
1071
1071
|
inventory_item_id: string;
|
|
1072
1072
|
required_quantity: number;
|
|
@@ -1091,12 +1091,12 @@ export declare const CreateProductVariant: z.ZodObject<{
|
|
|
1091
1091
|
material?: string | undefined;
|
|
1092
1092
|
metadata?: Record<string, unknown> | undefined;
|
|
1093
1093
|
sku?: string | undefined;
|
|
1094
|
-
ean?: string | undefined;
|
|
1095
|
-
upc?: string | undefined;
|
|
1096
|
-
barcode?: string | undefined;
|
|
1097
1094
|
allow_backorder?: false | undefined;
|
|
1098
1095
|
manage_inventory?: true | undefined;
|
|
1099
1096
|
variant_rank?: number | undefined;
|
|
1097
|
+
ean?: string | undefined;
|
|
1098
|
+
upc?: string | undefined;
|
|
1099
|
+
barcode?: string | undefined;
|
|
1100
1100
|
inventory_items?: {
|
|
1101
1101
|
inventory_item_id: string;
|
|
1102
1102
|
required_quantity: number;
|
|
@@ -1241,6 +1241,12 @@ export declare const UpdateProductVariant: z.ZodObject<{
|
|
|
1241
1241
|
material?: string | null | undefined;
|
|
1242
1242
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1243
1243
|
sku?: string | null | undefined;
|
|
1244
|
+
allow_backorder?: boolean | undefined;
|
|
1245
|
+
manage_inventory?: boolean | undefined;
|
|
1246
|
+
variant_rank?: number | undefined;
|
|
1247
|
+
ean?: string | null | undefined;
|
|
1248
|
+
upc?: string | null | undefined;
|
|
1249
|
+
barcode?: string | null | undefined;
|
|
1244
1250
|
prices?: {
|
|
1245
1251
|
id?: string | undefined;
|
|
1246
1252
|
currency_code?: string | undefined;
|
|
@@ -1249,12 +1255,6 @@ export declare const UpdateProductVariant: z.ZodObject<{
|
|
|
1249
1255
|
max_quantity?: number | null | undefined;
|
|
1250
1256
|
rules?: Record<string, string> | undefined;
|
|
1251
1257
|
}[] | undefined;
|
|
1252
|
-
ean?: string | null | undefined;
|
|
1253
|
-
upc?: string | null | undefined;
|
|
1254
|
-
barcode?: string | null | undefined;
|
|
1255
|
-
allow_backorder?: boolean | undefined;
|
|
1256
|
-
manage_inventory?: boolean | undefined;
|
|
1257
|
-
variant_rank?: number | undefined;
|
|
1258
1258
|
}, {
|
|
1259
1259
|
length?: number | null | undefined;
|
|
1260
1260
|
options?: Record<string, string> | undefined;
|
|
@@ -1269,6 +1269,12 @@ export declare const UpdateProductVariant: z.ZodObject<{
|
|
|
1269
1269
|
material?: string | null | undefined;
|
|
1270
1270
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1271
1271
|
sku?: string | null | undefined;
|
|
1272
|
+
allow_backorder?: boolean | undefined;
|
|
1273
|
+
manage_inventory?: boolean | undefined;
|
|
1274
|
+
variant_rank?: number | undefined;
|
|
1275
|
+
ean?: string | null | undefined;
|
|
1276
|
+
upc?: string | null | undefined;
|
|
1277
|
+
barcode?: string | null | undefined;
|
|
1272
1278
|
prices?: {
|
|
1273
1279
|
id?: string | undefined;
|
|
1274
1280
|
currency_code?: string | undefined;
|
|
@@ -1277,12 +1283,6 @@ export declare const UpdateProductVariant: z.ZodObject<{
|
|
|
1277
1283
|
max_quantity?: number | null | undefined;
|
|
1278
1284
|
rules?: Record<string, string> | undefined;
|
|
1279
1285
|
}[] | undefined;
|
|
1280
|
-
ean?: string | null | undefined;
|
|
1281
|
-
upc?: string | null | undefined;
|
|
1282
|
-
barcode?: string | null | undefined;
|
|
1283
|
-
allow_backorder?: boolean | undefined;
|
|
1284
|
-
manage_inventory?: boolean | undefined;
|
|
1285
|
-
variant_rank?: number | undefined;
|
|
1286
1286
|
}>;
|
|
1287
1287
|
/**
|
|
1288
1288
|
* @schema CreateProduct
|
|
@@ -1499,6 +1499,8 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1499
1499
|
}>, "many">>;
|
|
1500
1500
|
}, "strict", z.ZodTypeAny, {
|
|
1501
1501
|
title: string;
|
|
1502
|
+
allow_backorder: false;
|
|
1503
|
+
manage_inventory: true;
|
|
1502
1504
|
prices: {
|
|
1503
1505
|
currency_code: string;
|
|
1504
1506
|
amount: number;
|
|
@@ -1506,8 +1508,6 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1506
1508
|
max_quantity?: number | null | undefined;
|
|
1507
1509
|
rules?: Record<string, string> | undefined;
|
|
1508
1510
|
}[];
|
|
1509
|
-
allow_backorder: false;
|
|
1510
|
-
manage_inventory: true;
|
|
1511
1511
|
length?: number | undefined;
|
|
1512
1512
|
options?: Record<string, string> | undefined;
|
|
1513
1513
|
width?: number | undefined;
|
|
@@ -1519,10 +1519,10 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1519
1519
|
material?: string | undefined;
|
|
1520
1520
|
metadata?: Record<string, unknown> | undefined;
|
|
1521
1521
|
sku?: string | undefined;
|
|
1522
|
+
variant_rank?: number | undefined;
|
|
1522
1523
|
ean?: string | undefined;
|
|
1523
1524
|
upc?: string | undefined;
|
|
1524
1525
|
barcode?: string | undefined;
|
|
1525
|
-
variant_rank?: number | undefined;
|
|
1526
1526
|
inventory_items?: {
|
|
1527
1527
|
inventory_item_id: string;
|
|
1528
1528
|
required_quantity: number;
|
|
@@ -1547,12 +1547,12 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1547
1547
|
material?: string | undefined;
|
|
1548
1548
|
metadata?: Record<string, unknown> | undefined;
|
|
1549
1549
|
sku?: string | undefined;
|
|
1550
|
-
ean?: string | undefined;
|
|
1551
|
-
upc?: string | undefined;
|
|
1552
|
-
barcode?: string | undefined;
|
|
1553
1550
|
allow_backorder?: false | undefined;
|
|
1554
1551
|
manage_inventory?: true | undefined;
|
|
1555
1552
|
variant_rank?: number | undefined;
|
|
1553
|
+
ean?: string | undefined;
|
|
1554
|
+
upc?: string | undefined;
|
|
1555
|
+
barcode?: string | undefined;
|
|
1556
1556
|
inventory_items?: {
|
|
1557
1557
|
inventory_item_id: string;
|
|
1558
1558
|
required_quantity: number;
|
|
@@ -1589,6 +1589,8 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1589
1589
|
description?: string | undefined;
|
|
1590
1590
|
variants?: {
|
|
1591
1591
|
title: string;
|
|
1592
|
+
allow_backorder: false;
|
|
1593
|
+
manage_inventory: true;
|
|
1592
1594
|
prices: {
|
|
1593
1595
|
currency_code: string;
|
|
1594
1596
|
amount: number;
|
|
@@ -1596,8 +1598,6 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1596
1598
|
max_quantity?: number | null | undefined;
|
|
1597
1599
|
rules?: Record<string, string> | undefined;
|
|
1598
1600
|
}[];
|
|
1599
|
-
allow_backorder: false;
|
|
1600
|
-
manage_inventory: true;
|
|
1601
1601
|
length?: number | undefined;
|
|
1602
1602
|
options?: Record<string, string> | undefined;
|
|
1603
1603
|
width?: number | undefined;
|
|
@@ -1609,10 +1609,10 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1609
1609
|
material?: string | undefined;
|
|
1610
1610
|
metadata?: Record<string, unknown> | undefined;
|
|
1611
1611
|
sku?: string | undefined;
|
|
1612
|
+
variant_rank?: number | undefined;
|
|
1612
1613
|
ean?: string | undefined;
|
|
1613
1614
|
upc?: string | undefined;
|
|
1614
1615
|
barcode?: string | undefined;
|
|
1615
|
-
variant_rank?: number | undefined;
|
|
1616
1616
|
inventory_items?: {
|
|
1617
1617
|
inventory_item_id: string;
|
|
1618
1618
|
required_quantity: number;
|
|
@@ -1674,12 +1674,12 @@ export declare const CreateProduct: z.ZodObject<{
|
|
|
1674
1674
|
material?: string | undefined;
|
|
1675
1675
|
metadata?: Record<string, unknown> | undefined;
|
|
1676
1676
|
sku?: string | undefined;
|
|
1677
|
-
ean?: string | undefined;
|
|
1678
|
-
upc?: string | undefined;
|
|
1679
|
-
barcode?: string | undefined;
|
|
1680
1677
|
allow_backorder?: false | undefined;
|
|
1681
1678
|
manage_inventory?: true | undefined;
|
|
1682
1679
|
variant_rank?: number | undefined;
|
|
1680
|
+
ean?: string | undefined;
|
|
1681
|
+
upc?: string | undefined;
|
|
1682
|
+
barcode?: string | undefined;
|
|
1683
1683
|
inventory_items?: {
|
|
1684
1684
|
inventory_item_id: string;
|
|
1685
1685
|
required_quantity: number;
|
|
@@ -1932,6 +1932,12 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
1932
1932
|
material?: string | null | undefined;
|
|
1933
1933
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1934
1934
|
sku?: string | null | undefined;
|
|
1935
|
+
allow_backorder?: boolean | undefined;
|
|
1936
|
+
manage_inventory?: boolean | undefined;
|
|
1937
|
+
variant_rank?: number | undefined;
|
|
1938
|
+
ean?: string | null | undefined;
|
|
1939
|
+
upc?: string | null | undefined;
|
|
1940
|
+
barcode?: string | null | undefined;
|
|
1935
1941
|
prices?: {
|
|
1936
1942
|
id?: string | undefined;
|
|
1937
1943
|
currency_code?: string | undefined;
|
|
@@ -1940,12 +1946,6 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
1940
1946
|
max_quantity?: number | null | undefined;
|
|
1941
1947
|
rules?: Record<string, string> | undefined;
|
|
1942
1948
|
}[] | undefined;
|
|
1943
|
-
ean?: string | null | undefined;
|
|
1944
|
-
upc?: string | null | undefined;
|
|
1945
|
-
barcode?: string | null | undefined;
|
|
1946
|
-
allow_backorder?: boolean | undefined;
|
|
1947
|
-
manage_inventory?: boolean | undefined;
|
|
1948
|
-
variant_rank?: number | undefined;
|
|
1949
1949
|
}, {
|
|
1950
1950
|
length?: number | null | undefined;
|
|
1951
1951
|
options?: Record<string, string> | undefined;
|
|
@@ -1960,6 +1960,12 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
1960
1960
|
material?: string | null | undefined;
|
|
1961
1961
|
metadata?: Record<string, unknown> | null | undefined;
|
|
1962
1962
|
sku?: string | null | undefined;
|
|
1963
|
+
allow_backorder?: boolean | undefined;
|
|
1964
|
+
manage_inventory?: boolean | undefined;
|
|
1965
|
+
variant_rank?: number | undefined;
|
|
1966
|
+
ean?: string | null | undefined;
|
|
1967
|
+
upc?: string | null | undefined;
|
|
1968
|
+
barcode?: string | null | undefined;
|
|
1963
1969
|
prices?: {
|
|
1964
1970
|
id?: string | undefined;
|
|
1965
1971
|
currency_code?: string | undefined;
|
|
@@ -1968,12 +1974,6 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
1968
1974
|
max_quantity?: number | null | undefined;
|
|
1969
1975
|
rules?: Record<string, string> | undefined;
|
|
1970
1976
|
}[] | undefined;
|
|
1971
|
-
ean?: string | null | undefined;
|
|
1972
|
-
upc?: string | null | undefined;
|
|
1973
|
-
barcode?: string | null | undefined;
|
|
1974
|
-
allow_backorder?: boolean | undefined;
|
|
1975
|
-
manage_inventory?: boolean | undefined;
|
|
1976
|
-
variant_rank?: number | undefined;
|
|
1977
1977
|
}>, "many">>;
|
|
1978
1978
|
subtitle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
1979
1979
|
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -2042,6 +2042,12 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
2042
2042
|
material?: string | null | undefined;
|
|
2043
2043
|
metadata?: Record<string, unknown> | null | undefined;
|
|
2044
2044
|
sku?: string | null | undefined;
|
|
2045
|
+
allow_backorder?: boolean | undefined;
|
|
2046
|
+
manage_inventory?: boolean | undefined;
|
|
2047
|
+
variant_rank?: number | undefined;
|
|
2048
|
+
ean?: string | null | undefined;
|
|
2049
|
+
upc?: string | null | undefined;
|
|
2050
|
+
barcode?: string | null | undefined;
|
|
2045
2051
|
prices?: {
|
|
2046
2052
|
id?: string | undefined;
|
|
2047
2053
|
currency_code?: string | undefined;
|
|
@@ -2050,12 +2056,6 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
2050
2056
|
max_quantity?: number | null | undefined;
|
|
2051
2057
|
rules?: Record<string, string> | undefined;
|
|
2052
2058
|
}[] | undefined;
|
|
2053
|
-
ean?: string | null | undefined;
|
|
2054
|
-
upc?: string | null | undefined;
|
|
2055
|
-
barcode?: string | null | undefined;
|
|
2056
|
-
allow_backorder?: boolean | undefined;
|
|
2057
|
-
manage_inventory?: boolean | undefined;
|
|
2058
|
-
variant_rank?: number | undefined;
|
|
2059
2059
|
}[] | undefined;
|
|
2060
2060
|
title?: string | undefined;
|
|
2061
2061
|
subtitle?: string | null | undefined;
|
|
@@ -2108,6 +2108,12 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
2108
2108
|
material?: string | null | undefined;
|
|
2109
2109
|
metadata?: Record<string, unknown> | null | undefined;
|
|
2110
2110
|
sku?: string | null | undefined;
|
|
2111
|
+
allow_backorder?: boolean | undefined;
|
|
2112
|
+
manage_inventory?: boolean | undefined;
|
|
2113
|
+
variant_rank?: number | undefined;
|
|
2114
|
+
ean?: string | null | undefined;
|
|
2115
|
+
upc?: string | null | undefined;
|
|
2116
|
+
barcode?: string | null | undefined;
|
|
2111
2117
|
prices?: {
|
|
2112
2118
|
id?: string | undefined;
|
|
2113
2119
|
currency_code?: string | undefined;
|
|
@@ -2116,12 +2122,6 @@ export declare const UpdateProduct: z.ZodObject<{
|
|
|
2116
2122
|
max_quantity?: number | null | undefined;
|
|
2117
2123
|
rules?: Record<string, string> | undefined;
|
|
2118
2124
|
}[] | undefined;
|
|
2119
|
-
ean?: string | null | undefined;
|
|
2120
|
-
upc?: string | null | undefined;
|
|
2121
|
-
barcode?: string | null | undefined;
|
|
2122
|
-
allow_backorder?: boolean | undefined;
|
|
2123
|
-
manage_inventory?: boolean | undefined;
|
|
2124
|
-
variant_rank?: number | undefined;
|
|
2125
2125
|
}[] | undefined;
|
|
2126
2126
|
title?: string | undefined;
|
|
2127
2127
|
subtitle?: string | null | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { MedusaRequest, MedusaResponse } from
|
|
1
|
+
import { MedusaRequest, MedusaResponse } from "@medusajs/framework";
|
|
2
2
|
export declare function GET(req: MedusaRequest, res: MedusaResponse): Promise<void>;
|
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.GET = GET;
|
|
4
7
|
const utils_1 = require("@medusajs/framework/utils");
|
|
8
|
+
const seller_stock_location_1 = __importDefault(require("../../../links/seller-stock-location"));
|
|
5
9
|
async function GET(req, res) {
|
|
6
10
|
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
11
|
+
const { data: sellerLinks } = await query.graph({
|
|
12
|
+
entity: seller_stock_location_1.default.entryPoint,
|
|
13
|
+
fields: ["stock_location_id"],
|
|
14
|
+
});
|
|
15
|
+
const linkedStockLocationIds = sellerLinks.map((link) => link.stock_location_id);
|
|
7
16
|
const { data: stockLocations, metadata } = await query.graph({
|
|
8
|
-
entity:
|
|
9
|
-
fields:
|
|
10
|
-
filters:
|
|
11
|
-
|
|
17
|
+
entity: "stock_location",
|
|
18
|
+
fields: req.queryConfig.fields,
|
|
19
|
+
filters: {
|
|
20
|
+
...req.filterableFields,
|
|
21
|
+
...(linkedStockLocationIds.length > 0 && {
|
|
22
|
+
id: { $nin: linkedStockLocationIds },
|
|
23
|
+
}),
|
|
24
|
+
},
|
|
25
|
+
pagination: req.queryConfig.pagination,
|
|
12
26
|
});
|
|
13
|
-
const filteredStockLocations = stockLocations.filter((stockLocation) => !stockLocation.seller);
|
|
14
27
|
res.json({
|
|
15
|
-
stock_locations:
|
|
16
|
-
count:
|
|
28
|
+
stock_locations: stockLocations,
|
|
29
|
+
count: metadata?.count,
|
|
17
30
|
offset: metadata?.skip,
|
|
18
|
-
limit: metadata?.take
|
|
31
|
+
limit: metadata?.take,
|
|
19
32
|
});
|
|
20
33
|
}
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;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FBQyxJQUFJO2dCQUN2QyxFQUFFLEVBQUUsRUFBRSxJQUFJLEVBQUUsc0JBQXNCLEVBQUU7YUFDckMsQ0FBQztTQUNIO1FBQ0QsVUFBVSxFQUFFLEdBQUcsQ0FBQyxXQUFXLENBQUMsVUFBVTtLQUN2QyxDQUFDLENBQUM7SUFFSCxHQUFHLENBQUMsSUFBSSxDQUFDO1FBQ1AsZUFBZSxFQUFFLGNBQWM7UUFDL0IsS0FBSyxFQUFFLFFBQVEsRUFBRSxLQUFLO1FBQ3RCLE1BQU0sRUFBRSxRQUFRLEVBQUUsSUFBSTtRQUN0QixLQUFLLEVBQUUsUUFBUSxFQUFFLElBQUk7S0FDdEIsQ0FBQyxDQUFDO0FBQ0wsQ0FBQyJ9
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AuthenticatedMedusaRequest, MedusaResponse } from "@medusajs/framework";
|
|
2
|
-
import { VendorCreateCampaignType } from "./validators";
|
|
2
|
+
import { VendorCreateCampaignType, VendorGetCampaignsParamsType } from "./validators";
|
|
3
3
|
/**
|
|
4
4
|
* @oas [get] /vendor/campaigns
|
|
5
5
|
* operationId: "VendorListCampaigns"
|
|
@@ -58,7 +58,7 @@ import { VendorCreateCampaignType } from "./validators";
|
|
|
58
58
|
* - api_token: []
|
|
59
59
|
* - cookie_auth: []
|
|
60
60
|
*/
|
|
61
|
-
export declare const GET: (req: AuthenticatedMedusaRequest, res: MedusaResponse) => Promise<
|
|
61
|
+
export declare const GET: (req: AuthenticatedMedusaRequest<{}, VendorGetCampaignsParamsType>, res: MedusaResponse) => Promise<MedusaResponse | undefined>;
|
|
62
62
|
/**
|
|
63
63
|
* @oas [post] /vendor/campaigns
|
|
64
64
|
* operationId: "VendorCreateCampaign"
|
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.POST = exports.GET = void 0;
|
|
7
7
|
const utils_1 = require("@medusajs/framework/utils");
|
|
8
8
|
const framework_1 = require("@mercurjs/framework");
|
|
9
|
-
const workflows_1 = require("../../../workflows/campaigns/workflows");
|
|
10
9
|
const seller_campaign_1 = __importDefault(require("../../../links/seller-campaign"));
|
|
10
|
+
const workflows_1 = require("../../../workflows/campaigns/workflows");
|
|
11
11
|
/**
|
|
12
12
|
* @oas [get] /vendor/campaigns
|
|
13
13
|
* operationId: "VendorListCampaigns"
|
|
@@ -68,25 +68,44 @@ const seller_campaign_1 = __importDefault(require("../../../links/seller-campaig
|
|
|
68
68
|
*/
|
|
69
69
|
const GET = async (req, res) => {
|
|
70
70
|
const query = req.scope.resolve(utils_1.ContainerRegistrationKeys.QUERY);
|
|
71
|
-
const
|
|
71
|
+
const searchQuery = req.validatedQuery.q;
|
|
72
|
+
const { q: _, seller_id, ...filterableFields } = req.filterableFields;
|
|
73
|
+
const { data: sellerCampaigns } = await query.graph({
|
|
72
74
|
entity: seller_campaign_1.default.entryPoint,
|
|
73
|
-
fields:
|
|
75
|
+
fields: ["campaign_id"],
|
|
74
76
|
filters: {
|
|
75
|
-
|
|
76
|
-
deleted_at: {
|
|
77
|
-
$eq: null,
|
|
78
|
-
},
|
|
77
|
+
seller_id,
|
|
78
|
+
deleted_at: { $eq: null },
|
|
79
79
|
},
|
|
80
|
+
});
|
|
81
|
+
const campaignIds = sellerCampaigns.map((rel) => rel.campaign_id);
|
|
82
|
+
if (campaignIds.length === 0) {
|
|
83
|
+
return res.json({
|
|
84
|
+
campaigns: [],
|
|
85
|
+
count: 0,
|
|
86
|
+
offset: req.queryConfig.pagination?.skip ?? 0,
|
|
87
|
+
limit: req.queryConfig.pagination?.take ?? 50,
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const campaignFilters = {
|
|
91
|
+
...filterableFields,
|
|
92
|
+
id: campaignIds,
|
|
93
|
+
deleted_at: { $eq: null },
|
|
94
|
+
};
|
|
95
|
+
if (searchQuery) {
|
|
96
|
+
campaignFilters.name = { $ilike: `%${searchQuery}%` };
|
|
97
|
+
}
|
|
98
|
+
const { data: campaigns, metadata } = await query.graph({
|
|
99
|
+
entity: "campaign",
|
|
100
|
+
fields: req.queryConfig.fields,
|
|
101
|
+
filters: campaignFilters,
|
|
80
102
|
pagination: req.queryConfig.pagination,
|
|
81
103
|
});
|
|
82
|
-
const activeCampaigns = relations
|
|
83
|
-
.map((relation) => relation.campaign)
|
|
84
|
-
.filter((campaign) => !!campaign);
|
|
85
104
|
res.json({
|
|
86
|
-
campaigns
|
|
87
|
-
count:
|
|
88
|
-
offset: metadata?.skip,
|
|
89
|
-
limit: metadata?.take,
|
|
105
|
+
campaigns,
|
|
106
|
+
count: metadata?.count ?? campaigns.length,
|
|
107
|
+
offset: metadata?.skip ?? 0,
|
|
108
|
+
limit: metadata?.take ?? 50,
|
|
90
109
|
});
|
|
91
110
|
};
|
|
92
111
|
exports.GET = GET;
|
|
@@ -141,4 +160,4 @@ const POST = async (req, res) => {
|
|
|
141
160
|
res.status(201).json({ campaign });
|
|
142
161
|
};
|
|
143
162
|
exports.POST = POST;
|
|
144
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
163
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicm91dGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBpL3ZlbmRvci9jYW1wYWlnbnMvcm91dGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBSUEscURBQXNFO0FBQ3RFLG1EQUErRDtBQUMvRCxxRkFBNEQ7QUFDNUQsc0VBQXNGO0FBTXRGOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0F5REc7QUFDSSxNQUFNLEdBQUcsR0FBRyxLQUFLLEVBQ3RCLEdBQWlFLEVBQ2pFLEdBQW1CLEVBQ25CLEVBQUU7SUFDRix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|
export declare const VendorGetCampaignsParamsFields: z.ZodObject<{
|
|
4
4
|
q: z.ZodOptional<z.ZodString>;
|
|
5
5
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -15,18 +15,22 @@ export declare const VendorGetCampaignsParams: z.ZodObject<{
|
|
|
15
15
|
limit: z.ZodEffects<z.ZodDefault<z.ZodOptional<z.ZodNumber>>, number, unknown>;
|
|
16
16
|
order: z.ZodOptional<z.ZodString> | z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
17
17
|
with_deleted: z.ZodEffects<z.ZodOptional<z.ZodBoolean>, boolean | undefined, unknown>;
|
|
18
|
+
} & {
|
|
19
|
+
q: z.ZodOptional<z.ZodString>;
|
|
18
20
|
}, "strip", z.ZodTypeAny, {
|
|
19
21
|
offset: number;
|
|
20
22
|
limit: number;
|
|
21
|
-
order?: string | undefined;
|
|
22
23
|
fields?: string | undefined;
|
|
24
|
+
order?: string | undefined;
|
|
23
25
|
with_deleted?: boolean | undefined;
|
|
26
|
+
q?: string | undefined;
|
|
24
27
|
}, {
|
|
25
|
-
order?: string | undefined;
|
|
26
|
-
fields?: string | undefined;
|
|
27
28
|
offset?: unknown;
|
|
28
29
|
limit?: unknown;
|
|
30
|
+
fields?: string | undefined;
|
|
31
|
+
order?: string | undefined;
|
|
29
32
|
with_deleted?: unknown;
|
|
33
|
+
q?: string | undefined;
|
|
30
34
|
}>;
|
|
31
35
|
export declare const VendorGetCampaignByIdParamsFields: z.ZodObject<{
|
|
32
36
|
q: z.ZodOptional<z.ZodString>;
|
|
@@ -4,46 +4,22 @@ exports.VendorUpdateCampaign = exports.VendorCreateCampaign = exports.VendorCrea
|
|
|
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
|
+
const zod_2 = require("../../../shared/infra/http/utils/zod");
|
|
7
8
|
exports.VendorGetCampaignsParamsFields = zod_1.z.object({
|
|
8
|
-
q: zod_1.z.string().optional()
|
|
9
|
+
q: zod_1.z.string().optional(),
|
|
9
10
|
});
|
|
10
11
|
exports.VendorGetCampaignsParams = (0, validators_1.createFindParams)({
|
|
11
12
|
limit: 50,
|
|
12
|
-
offset: 0
|
|
13
|
-
});
|
|
14
|
-
// TODO: will be used when we'll get back to using index module
|
|
15
|
-
// .merge(VendorGetCampaignsParamsFields)
|
|
16
|
-
// .strict()
|
|
17
|
-
const dateFilterSchema = zod_1.z
|
|
18
|
-
.preprocess((val) => {
|
|
19
|
-
if (typeof val === 'string') {
|
|
20
|
-
try {
|
|
21
|
-
return JSON.parse(val);
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return val;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return val;
|
|
28
|
-
}, zod_1.z
|
|
29
|
-
.object({
|
|
30
|
-
$gte: zod_1.z.string().optional(),
|
|
31
|
-
$lte: zod_1.z.string().optional(),
|
|
32
|
-
$gt: zod_1.z.string().optional(),
|
|
33
|
-
$lt: zod_1.z.string().optional(),
|
|
34
|
-
$eq: zod_1.z.string().optional(),
|
|
35
|
-
$ne: zod_1.z.string().optional()
|
|
36
|
-
})
|
|
37
|
-
.optional())
|
|
38
|
-
.optional();
|
|
13
|
+
offset: 0,
|
|
14
|
+
}).merge(exports.VendorGetCampaignsParamsFields);
|
|
39
15
|
exports.VendorGetCampaignByIdParamsFields = zod_1.z.object({
|
|
40
16
|
q: zod_1.z.string().optional(),
|
|
41
|
-
created_at: dateFilterSchema,
|
|
42
|
-
updated_at: dateFilterSchema
|
|
17
|
+
created_at: zod_2.dateFilterSchema,
|
|
18
|
+
updated_at: zod_2.dateFilterSchema,
|
|
43
19
|
});
|
|
44
20
|
exports.VendorGetCampaignByIdParams = (0, validators_1.createFindParams)({
|
|
45
21
|
limit: 50,
|
|
46
|
-
offset: 0
|
|
22
|
+
offset: 0,
|
|
47
23
|
})
|
|
48
24
|
.merge(exports.VendorGetCampaignByIdParamsFields)
|
|
49
25
|
.strict();
|
|
@@ -66,16 +42,16 @@ exports.VendorCreateCampaignBudget = zod_1.z
|
|
|
66
42
|
.object({
|
|
67
43
|
type: zod_1.z.nativeEnum(utils_1.CampaignBudgetType),
|
|
68
44
|
limit: zod_1.z.number().nullish(),
|
|
69
|
-
currency_code: zod_1.z.string().nullish()
|
|
45
|
+
currency_code: zod_1.z.string().nullish(),
|
|
70
46
|
})
|
|
71
47
|
.strict()
|
|
72
48
|
.refine((data) => data.type !== utils_1.CampaignBudgetType.SPEND || (0, utils_1.isPresent)(data.currency_code), {
|
|
73
|
-
path: [
|
|
74
|
-
message: `currency_code is required when budget type is ${utils_1.CampaignBudgetType.SPEND}
|
|
49
|
+
path: ["currency_code"],
|
|
50
|
+
message: `currency_code is required when budget type is ${utils_1.CampaignBudgetType.SPEND}`,
|
|
75
51
|
})
|
|
76
52
|
.refine((data) => data.type !== utils_1.CampaignBudgetType.USAGE || !(0, utils_1.isPresent)(data.currency_code), {
|
|
77
|
-
path: [
|
|
78
|
-
message: `currency_code should not be present when budget type is ${utils_1.CampaignBudgetType.USAGE}
|
|
53
|
+
path: ["currency_code"],
|
|
54
|
+
message: `currency_code should not be present when budget type is ${utils_1.CampaignBudgetType.USAGE}`,
|
|
79
55
|
});
|
|
80
56
|
exports.VendorCreateCampaign = zod_1.z
|
|
81
57
|
.object({
|
|
@@ -84,7 +60,7 @@ exports.VendorCreateCampaign = zod_1.z
|
|
|
84
60
|
description: zod_1.z.string().nullish(),
|
|
85
61
|
budget: exports.VendorCreateCampaignBudget.nullish(),
|
|
86
62
|
starts_at: zod_1.z.coerce.date().nullish(),
|
|
87
|
-
ends_at: zod_1.z.coerce.date().nullish()
|
|
63
|
+
ends_at: zod_1.z.coerce.date().nullish(),
|
|
88
64
|
})
|
|
89
65
|
.strict();
|
|
90
66
|
exports.VendorUpdateCampaign = zod_1.z.object({
|
|
@@ -93,10 +69,10 @@ exports.VendorUpdateCampaign = zod_1.z.object({
|
|
|
93
69
|
description: zod_1.z.string().nullish(),
|
|
94
70
|
budget: zod_1.z
|
|
95
71
|
.object({
|
|
96
|
-
limit: zod_1.z.number().nullish()
|
|
72
|
+
limit: zod_1.z.number().nullish(),
|
|
97
73
|
})
|
|
98
74
|
.optional(),
|
|
99
75
|
starts_at: zod_1.z.coerce.date().nullish(),
|
|
100
|
-
ends_at: zod_1.z.coerce.date().nullish()
|
|
76
|
+
ends_at: zod_1.z.coerce.date().nullish(),
|
|
101
77
|
});
|
|
102
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdG9ycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcGkvdmVuZG9yL2NhbXBhaWducy92YWxpZGF0b3JzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZCQUF3QjtBQUV4QixxREFBMEU7QUFDMUUsc0VBQXlFO0FBQ3pFLDhEQUF3RTtBQUUzRCxRQUFBLDhCQUE4QixHQUFHLE9BQUMsQ0FBQyxNQUFNLENBQUM7SUFDckQsQ0FBQyxFQUFFLE9BQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQyxRQUFRLEVBQUU7Q0FDekIsQ0FBQyxDQUFDO0FBS1UsUUFBQSx3QkFBd0IsR0FBRyxJQUFBLDZCQUFnQixFQUFDO0lBQ3ZELEtBQUssRUFBRSxFQUFFO0lBQ1QsTUFBTSxFQUFFLENBQUM7Q0FDVixDQUFDLENBQUMsS0FBSyxDQUFDLHNDQUE4QixDQUFDLENBQUM7QUFFNUIsUUFBQSxpQ0FBaUMsR0FBRyxPQUFDLENBQUMsTUFBTSxDQUFDO0lBQ3hELENBQUMsRUFBRSxPQUFDLENBQUMsTUFBTSxFQUFFLENBQUMsUUFBUSxFQUFFO0lBQ3hCLFVBQVUsRUFBRSxzQ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