@medusajs/order 0.1.3-snapshot-20240703074611 → 0.1.3-snapshot-20240704102231
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/joiner-config.d.ts +0 -2
- package/dist/joiner-config.js +1 -2
- package/dist/joiner-config.js.map +1 -1
- package/dist/models/return.d.ts +2 -3
- package/dist/models/return.js.map +1 -1
- package/dist/services/actions/cancel-claim.d.ts +2 -0
- package/dist/services/actions/cancel-claim.js +108 -0
- package/dist/services/actions/cancel-claim.js.map +1 -0
- package/dist/services/actions/cancel-exchange.d.ts +2 -0
- package/dist/services/actions/cancel-exchange.js +93 -0
- package/dist/services/actions/cancel-exchange.js.map +1 -0
- package/dist/services/actions/cancel-return.d.ts +2 -0
- package/dist/services/actions/cancel-return.js +73 -0
- package/dist/services/actions/cancel-return.js.map +1 -0
- package/dist/services/actions/create-claim.js +2 -2
- package/dist/services/actions/create-claim.js.map +1 -1
- package/dist/services/actions/create-exchange.js +2 -2
- package/dist/services/actions/create-exchange.js.map +1 -1
- package/dist/services/actions/create-return.js +8 -2
- package/dist/services/actions/create-return.js.map +1 -1
- package/dist/services/actions/index.d.ts +3 -0
- package/dist/services/actions/index.js +3 -0
- package/dist/services/actions/index.js.map +1 -1
- package/dist/services/order-change-service.d.ts +2 -2
- package/dist/services/order-change-service.js.map +1 -1
- package/dist/services/order-module-service.d.ts +12 -7
- package/dist/services/order-module-service.js +119 -27
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +2 -2
- package/dist/services/order-service.js.map +1 -1
- package/dist/types/shipping-method.d.ts +3 -0
- package/dist/types/utils/index.d.ts +3 -3
- package/dist/utils/action-key.d.ts +4 -2
- package/dist/utils/action-key.js +3 -1
- package/dist/utils/action-key.js.map +1 -1
- package/dist/utils/actions/cancel-return.js +1 -1
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/index.d.ts +1 -0
- package/dist/utils/actions/index.js +1 -0
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/reinstate-item.d.ts +1 -0
- package/dist/utils/actions/reinstate-item.js +37 -0
- package/dist/utils/actions/reinstate-item.js.map +1 -0
- package/dist/utils/actions/return-item.js +2 -2
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.js +16 -9
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/shipping-remove.d.ts +1 -0
- package/dist/utils/actions/shipping-remove.js +42 -0
- package/dist/utils/actions/shipping-remove.js.map +1 -0
- package/dist/utils/apply-order-changes.d.ts +1 -1
- package/dist/utils/apply-order-changes.js +3 -3
- package/dist/utils/apply-order-changes.js.map +1 -1
- package/dist/utils/base-repository-find.js +18 -2
- package/dist/utils/base-repository-find.js.map +1 -1
- package/dist/utils/calculate-order-change.js +7 -7
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/transform-order.js +46 -6
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +5 -5
@@ -2,13 +2,15 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.mapRepositoryToOrderModel = exports.formatOrder = void 0;
|
4
4
|
const utils_1 = require("@medusajs/utils");
|
5
|
-
|
5
|
+
// Reshape the order object to match the OrderDTO
|
6
|
+
// This function is used to format the order object before returning to the main module methods
|
6
7
|
function formatOrder(order, options) {
|
7
8
|
const isArray = Array.isArray(order);
|
8
9
|
const orders = [...(isArray ? order : [order])];
|
9
10
|
orders.map((order) => {
|
10
11
|
let mainOrder = order;
|
11
|
-
const isRelatedEntity = options?.entity !==
|
12
|
+
const isRelatedEntity = options?.entity?.name !== "Order";
|
13
|
+
// If the entity is a related entity, the original order is located in the order property
|
12
14
|
if (isRelatedEntity) {
|
13
15
|
if (!order.order) {
|
14
16
|
return order;
|
@@ -30,13 +32,14 @@ function formatOrder(order, options) {
|
|
30
32
|
if (order.return) {
|
31
33
|
formatOrderReturn(order.return, mainOrder);
|
32
34
|
}
|
33
|
-
|
35
|
+
const entityName = options.entity.name;
|
36
|
+
if (entityName === "OrderClaim") {
|
34
37
|
formatClaim(order);
|
35
38
|
}
|
36
|
-
else if (
|
39
|
+
else if (entityName === "OrderExchange") {
|
37
40
|
formatExchange(order);
|
38
41
|
}
|
39
|
-
else if (
|
42
|
+
else if (entityName === "Return") {
|
40
43
|
formatReturn(order);
|
41
44
|
}
|
42
45
|
}
|
@@ -44,6 +47,7 @@ function formatOrder(order, options) {
|
|
44
47
|
order.shipping_methods = order.shipping_methods?.map((shippingMethod) => {
|
45
48
|
const sm = { ...shippingMethod.shipping_method };
|
46
49
|
delete shippingMethod.shipping_method;
|
50
|
+
cleanNestedRelations(shippingMethod);
|
47
51
|
return {
|
48
52
|
...sm,
|
49
53
|
order_id: shippingMethod.order_id,
|
@@ -61,8 +65,13 @@ function formatOrder(order, options) {
|
|
61
65
|
return isArray ? orders : orders[0];
|
62
66
|
}
|
63
67
|
exports.formatOrder = formatOrder;
|
68
|
+
function cleanNestedRelations(obj) {
|
69
|
+
delete obj.order;
|
70
|
+
delete obj.return;
|
71
|
+
delete obj.claim;
|
72
|
+
delete obj.exchange;
|
73
|
+
}
|
64
74
|
function formatOrderReturn(orderReturn, mainOrder) {
|
65
|
-
orderReturn.items = orderReturn.items.filter((item) => !item.is_additional_item);
|
66
75
|
orderReturn.items.forEach((orderItem) => {
|
67
76
|
const item = mainOrder.items?.find((item) => item.id === orderItem.item_id);
|
68
77
|
orderItem.detail = item?.detail;
|
@@ -73,6 +82,7 @@ function formatClaim(claim) {
|
|
73
82
|
claim.additional_items = claim.additional_items.filter((item) => item.is_additional_item);
|
74
83
|
claim.additional_items.forEach((orderItem) => {
|
75
84
|
const item = claim.order.items?.find((item) => item.id === orderItem.item_id);
|
85
|
+
cleanNestedRelations(item);
|
76
86
|
orderItem.detail = item?.detail;
|
77
87
|
});
|
78
88
|
}
|
@@ -82,6 +92,7 @@ function formatClaim(claim) {
|
|
82
92
|
claim.claim_items = claim.claim_items.filter((item) => !item.is_additional_item);
|
83
93
|
claim.claim_items.forEach((orderItem) => {
|
84
94
|
const item = claim.order.items?.find((item) => item.id === orderItem.item_id);
|
95
|
+
cleanNestedRelations(item);
|
85
96
|
orderItem.detail = item?.detail;
|
86
97
|
});
|
87
98
|
}
|
@@ -91,6 +102,7 @@ function formatExchange(exchange) {
|
|
91
102
|
}
|
92
103
|
exchange.additional_items.forEach((orderItem) => {
|
93
104
|
const item = exchange.order.items?.find((item) => item.id === orderItem.item_id);
|
105
|
+
cleanNestedRelations(item);
|
94
106
|
orderItem.detail = item?.detail;
|
95
107
|
});
|
96
108
|
}
|
@@ -100,10 +112,18 @@ function formatReturn(returnOrder) {
|
|
100
112
|
}
|
101
113
|
returnOrder.items.forEach((orderItem) => {
|
102
114
|
const item = returnOrder.order.items?.find((item) => item.id === orderItem.item_id);
|
115
|
+
cleanNestedRelations(item);
|
103
116
|
orderItem.detail = item?.detail;
|
104
117
|
});
|
105
118
|
}
|
119
|
+
// Map the public order model to the repository model format
|
120
|
+
// As the public responses have a different shape than the repository responses, this function is used to map the public properties to the internal db entities
|
121
|
+
// e.g "items" is the relation between "line-item" and "order" + "version", The line item itself is in "items.item"
|
122
|
+
// This helper maps to the correct repository to query the DB, and the function "formatOrder" remap the response to the public shape
|
106
123
|
function mapRepositoryToOrderModel(config, isRelatedEntity = false) {
|
124
|
+
if (isRelatedEntity) {
|
125
|
+
return mapRepositoryToRelatedEntity(config);
|
126
|
+
}
|
107
127
|
const conf = { ...config };
|
108
128
|
function replace(obj, type) {
|
109
129
|
if (!(0, utils_1.isDefined)(obj[type])) {
|
@@ -161,4 +181,24 @@ function mapRepositoryToOrderModel(config, isRelatedEntity = false) {
|
|
161
181
|
return conf;
|
162
182
|
}
|
163
183
|
exports.mapRepositoryToOrderModel = mapRepositoryToOrderModel;
|
184
|
+
// This function has the same purpose as "mapRepositoryToOrderModel" but for returns, claims and exchanges
|
185
|
+
function mapRepositoryToRelatedEntity(config) {
|
186
|
+
const conf = { ...config };
|
187
|
+
function replace(obj, type) {
|
188
|
+
if (!(0, utils_1.isDefined)(obj[type])) {
|
189
|
+
return;
|
190
|
+
}
|
191
|
+
return (0, utils_1.deduplicate)(obj[type].sort().map((rel) => {
|
192
|
+
if (rel.includes("shipping_methods") &&
|
193
|
+
!rel.includes("shipping_methods.shipping_method")) {
|
194
|
+
obj.populate.push("shipping_methods.shipping_method");
|
195
|
+
return rel.replace("shipping_methods", "shipping_methods.shipping_method");
|
196
|
+
}
|
197
|
+
return rel;
|
198
|
+
}));
|
199
|
+
}
|
200
|
+
conf.options.fields = replace(config.options, "fields");
|
201
|
+
conf.options.populate = replace(config.options, "populate");
|
202
|
+
return conf;
|
203
|
+
}
|
164
204
|
//# sourceMappingURL=transform-order.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transform-order.js","sourceRoot":"","sources":["../../src/utils/transform-order.ts"],"names":[],"mappings":";;;AACA,2CAKwB;
|
1
|
+
{"version":3,"file":"transform-order.js","sourceRoot":"","sources":["../../src/utils/transform-order.ts"],"names":[],"mappings":";;;AACA,2CAKwB;AAExB,iDAAiD;AACjD,+FAA+F;AAC/F,SAAgB,WAAW,CACzB,KAAK,EACL,OAGC;IAED,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;IACpC,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IAE/C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;QACnB,IAAI,SAAS,GAAG,KAAK,CAAA;QAErB,MAAM,eAAe,GAAG,OAAO,EAAE,MAAM,EAAE,IAAI,KAAK,OAAO,CAAA;QAEzD,yFAAyF;QACzF,IAAI,eAAe,EAAE,CAAC;YACpB,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;gBACjB,OAAO,KAAK,CAAA;YACd,CAAC;YAED,SAAS,GAAG,KAAK,CAAC,KA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C;gBAChC,CAAC,GAAG,CAAC,QAAQ,CAAC,kCAAkC,CAAC,EACjD,CAAC;gBACD,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;gBAErD,OAAO,GAAG,CAAC,OAAO,CAChB,kBAAkB,EAClB,kCAAkC,CACnC,CAAA;YACH,CAAC;YACD,OAAO,GAAG,CAAA;QACZ,CAAC,CAAC,CACH,CAAA;IACH,CAAC;IAED,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IACvD,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAE3D,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/order",
|
3
|
-
"version": "0.1.3-snapshot-
|
3
|
+
"version": "0.1.3-snapshot-20240704102231",
|
4
4
|
"description": "Medusa Order module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -34,19 +34,19 @@
|
|
34
34
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
|
-
"@medusajs/types": "1.12.0-snapshot-
|
37
|
+
"@medusajs/types": "1.12.0-snapshot-20240704102231",
|
38
38
|
"@mikro-orm/cli": "5.9.7",
|
39
39
|
"cross-env": "^5.2.1",
|
40
40
|
"jest": "^29.7.0",
|
41
|
-
"medusa-test-utils": "1.1.45-snapshot-
|
41
|
+
"medusa-test-utils": "1.1.45-snapshot-20240704102231",
|
42
42
|
"rimraf": "^3.0.2",
|
43
43
|
"ts-node": "^10.9.1",
|
44
44
|
"tsc-alias": "^1.8.6",
|
45
45
|
"typescript": "^5.1.6"
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@medusajs/modules-sdk": "1.13.0-snapshot-
|
49
|
-
"@medusajs/utils": "1.12.0-snapshot-
|
48
|
+
"@medusajs/modules-sdk": "1.13.0-snapshot-20240704102231",
|
49
|
+
"@medusajs/utils": "1.12.0-snapshot-20240704102231",
|
50
50
|
"@mikro-orm/core": "5.9.7",
|
51
51
|
"@mikro-orm/migrations": "5.9.7",
|
52
52
|
"@mikro-orm/postgresql": "5.9.7",
|