@medusajs/order 0.1.3-snapshot-20240704061641 → 0.1.3-snapshot-20240704104329
Sign up to get free protection for your applications and to get access to all the features.
@@ -62,11 +62,15 @@ function setFindMethods(klass, entity) {
|
|
62
62
|
orderWhere.summary.version = version;
|
63
63
|
orderWhere.items ??= {};
|
64
64
|
orderWhere.items.version = version;
|
65
|
+
orderWhere.items.deleted_at ??= null;
|
65
66
|
popWhere.shipping_methods ??= {};
|
66
67
|
popWhere.shipping_methods.version = version;
|
68
|
+
popWhere.shipping_methods.deleted_at ??= null;
|
67
69
|
if (!config.options.orderBy) {
|
68
70
|
config.options.orderBy = { id: "ASC" };
|
69
71
|
}
|
72
|
+
config.where ??= {};
|
73
|
+
config.where.deleted_at ??= null;
|
70
74
|
return await manager.find(entity, config.where, config.options);
|
71
75
|
};
|
72
76
|
klass.prototype.findAndCount = async function findAndCount(findOptions = { where: {} }, context = {}) {
|
@@ -115,8 +119,10 @@ function setFindMethods(klass, entity) {
|
|
115
119
|
orderWhere.summary.version = version;
|
116
120
|
orderWhere.items ??= {};
|
117
121
|
orderWhere.items.version = version;
|
122
|
+
orderWhere.items.deleted_at ??= null;
|
118
123
|
popWhere.shipping_methods ??= {};
|
119
124
|
popWhere.shipping_methods.version = version;
|
125
|
+
popWhere.shipping_methods.deleted_at ??= null;
|
120
126
|
if (!config.options.orderBy) {
|
121
127
|
config.options.orderBy = { id: "ASC" };
|
122
128
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base-repository-find.js","sourceRoot":"","sources":["../../src/utils/base-repository-find.ts"],"names":[],"mappings":";;;AACA,0CAA8C;AAC9C,qCAA+B;AAC/B,wBAA6C;AAE7C,SAAgB,cAAc,CAAI,KAAqB,EAAE,MAAW;IAClE,KAAK,CAAC,SAAS,CAAC,IAAI,GAAG,KAAK,UAAU,IAAI,CAExC,OAA4B,EAC5B,OAAiB;QAEjB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAA;QAC9C,M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,CAAC,gBAAgB,KAAK,EAAE,CAAA;QAChC,QAAQ,CAAC,gBAAgB,CAAC,OAAO,GAAG,OAAO,CAAA;QAC3C,QAAQ,CAAC,gBAAgB,CAAC,UAAU,KAAK,IAAI,CAAA;QAE7C,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;YAC5B,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAA;QACxC,CAAC;QAED,OAAO,MAAM,OAAO,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;IACzE,CAAC,CAAA;AACH,CAAC;AAtKD,wCAsKC"}
|
@@ -47,6 +47,7 @@ function formatOrder(order, options) {
|
|
47
47
|
order.shipping_methods = order.shipping_methods?.map((shippingMethod) => {
|
48
48
|
const sm = { ...shippingMethod.shipping_method };
|
49
49
|
delete shippingMethod.shipping_method;
|
50
|
+
cleanNestedRelations(shippingMethod);
|
50
51
|
return {
|
51
52
|
...sm,
|
52
53
|
order_id: shippingMethod.order_id,
|
@@ -64,6 +65,12 @@ function formatOrder(order, options) {
|
|
64
65
|
return isArray ? orders : orders[0];
|
65
66
|
}
|
66
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
|
+
}
|
67
74
|
function formatOrderReturn(orderReturn, mainOrder) {
|
68
75
|
orderReturn.items.forEach((orderItem) => {
|
69
76
|
const item = mainOrder.items?.find((item) => item.id === orderItem.item_id);
|
@@ -75,6 +82,7 @@ function formatClaim(claim) {
|
|
75
82
|
claim.additional_items = claim.additional_items.filter((item) => item.is_additional_item);
|
76
83
|
claim.additional_items.forEach((orderItem) => {
|
77
84
|
const item = claim.order.items?.find((item) => item.id === orderItem.item_id);
|
85
|
+
cleanNestedRelations(item);
|
78
86
|
orderItem.detail = item?.detail;
|
79
87
|
});
|
80
88
|
}
|
@@ -84,6 +92,7 @@ function formatClaim(claim) {
|
|
84
92
|
claim.claim_items = claim.claim_items.filter((item) => !item.is_additional_item);
|
85
93
|
claim.claim_items.forEach((orderItem) => {
|
86
94
|
const item = claim.order.items?.find((item) => item.id === orderItem.item_id);
|
95
|
+
cleanNestedRelations(item);
|
87
96
|
orderItem.detail = item?.detail;
|
88
97
|
});
|
89
98
|
}
|
@@ -93,6 +102,7 @@ function formatExchange(exchange) {
|
|
93
102
|
}
|
94
103
|
exchange.additional_items.forEach((orderItem) => {
|
95
104
|
const item = exchange.order.items?.find((item) => item.id === orderItem.item_id);
|
105
|
+
cleanNestedRelations(item);
|
96
106
|
orderItem.detail = item?.detail;
|
97
107
|
});
|
98
108
|
}
|
@@ -102,6 +112,7 @@ function formatReturn(returnOrder) {
|
|
102
112
|
}
|
103
113
|
returnOrder.items.forEach((orderItem) => {
|
104
114
|
const item = returnOrder.order.items?.find((item) => item.id === orderItem.item_id);
|
115
|
+
cleanNestedRelations(item);
|
105
116
|
orderItem.detail = item?.detail;
|
106
117
|
});
|
107
118
|
}
|
@@ -1 +1 @@
|
|
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,MA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,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YAC3B,IACE,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC;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-20240704104329",
|
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-20240704104329",
|
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-20240704104329",
|
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-20240704104329",
|
49
|
+
"@medusajs/utils": "1.12.0-snapshot-20240704104329",
|
50
50
|
"@mikro-orm/core": "5.9.7",
|
51
51
|
"@mikro-orm/migrations": "5.9.7",
|
52
52
|
"@mikro-orm/postgresql": "5.9.7",
|