@medusajs/order 0.1.3-snapshot-20240718073308 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.d.ts +8 -6
- package/dist/index.js +26 -4
- package/dist/index.js.map +1 -1
- package/dist/joiner-config.d.ts +5 -0
- package/dist/joiner-config.js +36 -0
- package/dist/joiner-config.js.map +1 -0
- package/dist/migrations/Migration20240219102530.d.ts +0 -1
- package/dist/migrations/Migration20240219102530.js +4 -38
- package/dist/migrations/Migration20240219102530.js.map +1 -1
- package/dist/models/address.d.ts +1 -2
- package/dist/models/adjustment-line.d.ts +1 -3
- package/dist/models/adjustment-line.js +0 -5
- package/dist/models/adjustment-line.js.map +1 -1
- package/dist/models/index.d.ts +0 -9
- package/dist/models/index.js +1 -17
- package/dist/models/index.js.map +1 -1
- package/dist/models/line-item-adjustment.d.ts +1 -3
- package/dist/models/line-item-adjustment.js +3 -3
- package/dist/models/line-item-adjustment.js.map +1 -1
- package/dist/models/line-item-tax-line.d.ts +1 -3
- package/dist/models/line-item-tax-line.js +3 -3
- package/dist/models/line-item-tax-line.js.map +1 -1
- package/dist/models/line-item.d.ts +1 -3
- package/dist/models/line-item.js +4 -18
- package/dist/models/line-item.js.map +1 -1
- package/dist/models/order-change-action.d.ts +4 -15
- package/dist/models/order-change-action.js +7 -102
- package/dist/models/order-change-action.js.map +1 -1
- package/dist/models/order-change.d.ts +5 -17
- package/dist/models/order-change.js +4 -109
- package/dist/models/order-change.js.map +1 -1
- package/dist/models/order-item.d.ts +4 -5
- package/dist/models/order-item.js +13 -13
- package/dist/models/order-item.js.map +1 -1
- package/dist/models/order-shipping-method.d.ts +4 -14
- package/dist/models/order-shipping-method.js +13 -89
- package/dist/models/order-shipping-method.js.map +1 -1
- package/dist/models/order-summary.d.ts +2 -6
- package/dist/models/order-summary.js +6 -9
- package/dist/models/order-summary.js.map +1 -1
- package/dist/models/order.d.ts +4 -6
- package/dist/models/order.js +1 -11
- package/dist/models/order.js.map +1 -1
- package/dist/models/shipping-method-adjustment.d.ts +1 -3
- package/dist/models/shipping-method-adjustment.js +3 -3
- package/dist/models/shipping-method-adjustment.js.map +1 -1
- package/dist/models/shipping-method-tax-line.d.ts +1 -3
- package/dist/models/shipping-method-tax-line.js +3 -3
- package/dist/models/shipping-method-tax-line.js.map +1 -1
- package/dist/models/shipping-method.d.ts +0 -2
- package/dist/models/shipping-method.js +4 -17
- package/dist/models/shipping-method.js.map +1 -1
- package/dist/models/tax-line.d.ts +0 -2
- package/dist/models/tax-line.js +0 -7
- package/dist/models/tax-line.js.map +1 -1
- package/dist/models/transaction.d.ts +3 -15
- package/dist/models/transaction.js +4 -109
- package/dist/models/transaction.js.map +1 -1
- package/dist/module-definition.d.ts +2 -0
- package/dist/module-definition.js +59 -0
- package/dist/module-definition.js.map +1 -0
- package/dist/repositories/index.d.ts +1 -4
- package/dist/repositories/index.js +16 -7
- package/dist/repositories/index.js.map +1 -1
- package/dist/repositories/order.d.ts +3 -1
- package/dist/repositories/order.js +85 -2
- package/dist/repositories/order.js.map +1 -1
- package/dist/scripts/bin/run-seed.d.ts +3 -0
- package/dist/scripts/bin/run-seed.js +49 -0
- package/dist/scripts/bin/run-seed.js.map +1 -0
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +3 -1
- package/dist/services/index.js.map +1 -1
- package/dist/services/order-change-service.d.ts +15 -0
- package/dist/services/order-change-service.js +96 -0
- package/dist/services/order-change-service.js.map +1 -0
- package/dist/services/order-module-service.d.ts +67 -138
- package/dist/services/order-module-service.js +240 -990
- package/dist/services/order-module-service.js.map +1 -1
- package/dist/services/order-service.d.ts +4 -5
- package/dist/services/order-service.js +1 -1
- package/dist/services/order-service.js.map +1 -1
- package/dist/types/address.d.ts +0 -1
- package/dist/types/index.d.ts +1 -3
- package/dist/types/index.js +0 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/line-item-adjustment.d.ts +0 -1
- package/dist/types/line-item-tax-line.d.ts +0 -1
- package/dist/types/line-item.d.ts +0 -1
- package/dist/types/order-detail.d.ts +1 -2
- package/dist/types/order.d.ts +2 -3
- package/dist/types/shipping-method-adjustment.d.ts +0 -1
- package/dist/types/shipping-method-tax-line.d.ts +0 -1
- package/dist/types/shipping-method.d.ts +0 -4
- package/dist/types/tax-line.d.ts +0 -1
- package/dist/types/transaction.d.ts +0 -1
- package/dist/types/utils/index.d.ts +11 -43
- package/dist/types/utils/index.js.map +1 -1
- package/dist/utils/action-key.d.ts +13 -0
- package/dist/utils/action-key.js +18 -0
- package/dist/utils/action-key.js.map +1 -0
- package/dist/utils/actions/cancel-return.d.ts +0 -1
- package/dist/utils/actions/cancel-return.js +6 -7
- package/dist/utils/actions/cancel-return.js.map +1 -1
- package/dist/utils/actions/cancel.d.ts +0 -1
- package/dist/utils/actions/cancel.js +2 -2
- package/dist/utils/actions/cancel.js.map +1 -1
- package/dist/utils/actions/fulfill-item.d.ts +0 -1
- package/dist/utils/actions/fulfill-item.js +6 -7
- package/dist/utils/actions/fulfill-item.js.map +1 -1
- package/dist/utils/actions/index.d.ts +0 -4
- package/dist/utils/actions/index.js +0 -3
- package/dist/utils/actions/index.js.map +1 -1
- package/dist/utils/actions/item-add.d.ts +0 -1
- package/dist/utils/actions/item-add.js +14 -17
- package/dist/utils/actions/item-add.js.map +1 -1
- package/dist/utils/actions/item-remove.d.ts +0 -1
- package/dist/utils/actions/item-remove.js +10 -11
- package/dist/utils/actions/item-remove.js.map +1 -1
- package/dist/utils/actions/receive-damaged-return-item.d.ts +0 -1
- package/dist/utils/actions/receive-damaged-return-item.js +7 -8
- package/dist/utils/actions/receive-damaged-return-item.js.map +1 -1
- package/dist/utils/actions/receive-return-item.d.ts +0 -1
- package/dist/utils/actions/receive-return-item.js +7 -8
- package/dist/utils/actions/receive-return-item.js.map +1 -1
- package/dist/utils/actions/return-item.d.ts +0 -1
- package/dist/utils/actions/return-item.js +8 -9
- package/dist/utils/actions/return-item.js.map +1 -1
- package/dist/utils/actions/ship-item.d.ts +0 -1
- package/dist/utils/actions/ship-item.js +6 -7
- package/dist/utils/actions/ship-item.js.map +1 -1
- package/dist/utils/actions/shipping-add.d.ts +0 -1
- package/dist/utils/actions/shipping-add.js +7 -16
- package/dist/utils/actions/shipping-add.js.map +1 -1
- package/dist/utils/actions/write-off-item.d.ts +0 -1
- package/dist/utils/actions/write-off-item.js +6 -7
- package/dist/utils/actions/write-off-item.js.map +1 -1
- package/dist/utils/calculate-order-change.d.ts +2 -11
- package/dist/utils/calculate-order-change.js +70 -68
- package/dist/utils/calculate-order-change.js.map +1 -1
- package/dist/utils/index.d.ts +1 -4
- package/dist/utils/index.js +1 -3
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/transform-order.d.ts +2 -4
- package/dist/utils/transform-order.js +17 -131
- package/dist/utils/transform-order.js.map +1 -1
- package/package.json +14 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/migrations/Migration20240219102530.d.ts.map +0 -1
- package/dist/migrations/Migration20240604100512.d.ts +0 -5
- package/dist/migrations/Migration20240604100512.d.ts.map +0 -1
- package/dist/migrations/Migration20240604100512.js +0 -364
- package/dist/migrations/Migration20240604100512.js.map +0 -1
- package/dist/migrations/Migration20240715102100.d.ts +0 -5
- package/dist/migrations/Migration20240715102100.d.ts.map +0 -1
- package/dist/migrations/Migration20240715102100.js +0 -15
- package/dist/migrations/Migration20240715102100.js.map +0 -1
- package/dist/migrations/Migration20240715174100.d.ts +0 -5
- package/dist/migrations/Migration20240715174100.d.ts.map +0 -1
- package/dist/migrations/Migration20240715174100.js +0 -21
- package/dist/migrations/Migration20240715174100.js.map +0 -1
- package/dist/migrations/Migration20240716081800.d.ts +0 -5
- package/dist/migrations/Migration20240716081800.d.ts.map +0 -1
- package/dist/migrations/Migration20240716081800.js +0 -67
- package/dist/migrations/Migration20240716081800.js.map +0 -1
- package/dist/models/address.d.ts.map +0 -1
- package/dist/models/adjustment-line.d.ts.map +0 -1
- package/dist/models/claim-item-image.d.ts +0 -19
- package/dist/models/claim-item-image.d.ts.map +0 -1
- package/dist/models/claim-item-image.js +0 -109
- package/dist/models/claim-item-image.js.map +0 -1
- package/dist/models/claim-item.d.ts +0 -29
- package/dist/models/claim-item.d.ts.map +0 -1
- package/dist/models/claim-item.js +0 -156
- package/dist/models/claim-item.js.map +0 -1
- package/dist/models/claim.d.ts +0 -36
- package/dist/models/claim.d.ts.map +0 -1
- package/dist/models/claim.js +0 -195
- package/dist/models/claim.js.map +0 -1
- package/dist/models/exchange-item.d.ts +0 -24
- package/dist/models/exchange-item.d.ts.map +0 -1
- package/dist/models/exchange-item.js +0 -138
- package/dist/models/exchange-item.js.map +0 -1
- package/dist/models/exchange.d.ts +0 -34
- package/dist/models/exchange.d.ts.map +0 -1
- package/dist/models/exchange.js +0 -188
- package/dist/models/exchange.js.map +0 -1
- package/dist/models/index.d.ts.map +0 -1
- package/dist/models/line-item-adjustment.d.ts.map +0 -1
- package/dist/models/line-item-tax-line.d.ts.map +0 -1
- package/dist/models/line-item.d.ts.map +0 -1
- package/dist/models/order-change-action.d.ts.map +0 -1
- package/dist/models/order-change.d.ts.map +0 -1
- package/dist/models/order-item.d.ts.map +0 -1
- package/dist/models/order-shipping-method.d.ts.map +0 -1
- package/dist/models/order-summary.d.ts.map +0 -1
- package/dist/models/order.d.ts.map +0 -1
- package/dist/models/return-item.d.ts +0 -29
- package/dist/models/return-item.d.ts.map +0 -1
- package/dist/models/return-item.js +0 -170
- package/dist/models/return-item.js.map +0 -1
- package/dist/models/return-reason.d.ts +0 -21
- package/dist/models/return-reason.d.ts.map +0 -1
- package/dist/models/return-reason.js +0 -120
- package/dist/models/return-reason.js.map +0 -1
- package/dist/models/return.d.ts +0 -39
- package/dist/models/return.d.ts.map +0 -1
- package/dist/models/return.js +0 -216
- package/dist/models/return.js.map +0 -1
- package/dist/models/shipping-method-adjustment.d.ts.map +0 -1
- package/dist/models/shipping-method-tax-line.d.ts.map +0 -1
- package/dist/models/shipping-method.d.ts.map +0 -1
- package/dist/models/tax-line.d.ts.map +0 -1
- package/dist/models/transaction.d.ts.map +0 -1
- package/dist/repositories/claim.d.ts +0 -9
- package/dist/repositories/claim.d.ts.map +0 -1
- package/dist/repositories/claim.js +0 -11
- package/dist/repositories/claim.js.map +0 -1
- package/dist/repositories/exchange.d.ts +0 -9
- package/dist/repositories/exchange.d.ts.map +0 -1
- package/dist/repositories/exchange.js +0 -11
- package/dist/repositories/exchange.js.map +0 -1
- package/dist/repositories/index.d.ts.map +0 -1
- package/dist/repositories/order.d.ts.map +0 -1
- package/dist/repositories/return.d.ts +0 -9
- package/dist/repositories/return.d.ts.map +0 -1
- package/dist/repositories/return.js +0 -11
- package/dist/repositories/return.js.map +0 -1
- package/dist/services/actions/cancel-claim.d.ts +0 -3
- package/dist/services/actions/cancel-claim.d.ts.map +0 -1
- package/dist/services/actions/cancel-claim.js +0 -107
- package/dist/services/actions/cancel-claim.js.map +0 -1
- package/dist/services/actions/cancel-exchange.d.ts +0 -3
- package/dist/services/actions/cancel-exchange.d.ts.map +0 -1
- package/dist/services/actions/cancel-exchange.js +0 -92
- package/dist/services/actions/cancel-exchange.js.map +0 -1
- package/dist/services/actions/cancel-fulfillment.d.ts +0 -3
- package/dist/services/actions/cancel-fulfillment.d.ts.map +0 -1
- package/dist/services/actions/cancel-fulfillment.js +0 -32
- package/dist/services/actions/cancel-fulfillment.js.map +0 -1
- package/dist/services/actions/cancel-return.d.ts +0 -3
- package/dist/services/actions/cancel-return.d.ts.map +0 -1
- package/dist/services/actions/cancel-return.js +0 -72
- package/dist/services/actions/cancel-return.js.map +0 -1
- package/dist/services/actions/create-claim.d.ts +0 -3
- package/dist/services/actions/create-claim.d.ts.map +0 -1
- package/dist/services/actions/create-claim.js +0 -228
- package/dist/services/actions/create-claim.js.map +0 -1
- package/dist/services/actions/create-exchange.d.ts +0 -3
- package/dist/services/actions/create-exchange.d.ts.map +0 -1
- package/dist/services/actions/create-exchange.js +0 -193
- package/dist/services/actions/create-exchange.js.map +0 -1
- package/dist/services/actions/create-return.d.ts +0 -3
- package/dist/services/actions/create-return.d.ts.map +0 -1
- package/dist/services/actions/create-return.js +0 -102
- package/dist/services/actions/create-return.js.map +0 -1
- package/dist/services/actions/index.d.ts +0 -11
- package/dist/services/actions/index.d.ts.map +0 -1
- package/dist/services/actions/index.js +0 -27
- package/dist/services/actions/index.js.map +0 -1
- package/dist/services/actions/receive-return.d.ts +0 -3
- package/dist/services/actions/receive-return.d.ts.map +0 -1
- package/dist/services/actions/receive-return.js +0 -73
- package/dist/services/actions/receive-return.js.map +0 -1
- package/dist/services/actions/register-fulfillment.d.ts +0 -3
- package/dist/services/actions/register-fulfillment.d.ts.map +0 -1
- package/dist/services/actions/register-fulfillment.js +0 -30
- package/dist/services/actions/register-fulfillment.js.map +0 -1
- package/dist/services/actions/register-shipment.d.ts +0 -3
- package/dist/services/actions/register-shipment.d.ts.map +0 -1
- package/dist/services/actions/register-shipment.js +0 -38
- package/dist/services/actions/register-shipment.js.map +0 -1
- package/dist/services/index.d.ts.map +0 -1
- package/dist/services/order-module-service.d.ts.map +0 -1
- package/dist/services/order-service.d.ts.map +0 -1
- package/dist/types/address.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/line-item-adjustment.d.ts.map +0 -1
- package/dist/types/line-item-tax-line.d.ts.map +0 -1
- package/dist/types/line-item.d.ts.map +0 -1
- package/dist/types/order-change.d.ts +0 -6
- package/dist/types/order-change.d.ts.map +0 -1
- package/dist/types/order-change.js +0 -3
- package/dist/types/order-change.js.map +0 -1
- package/dist/types/order-detail.d.ts.map +0 -1
- package/dist/types/order.d.ts.map +0 -1
- package/dist/types/shipping-method-adjustment.d.ts.map +0 -1
- package/dist/types/shipping-method-tax-line.d.ts.map +0 -1
- package/dist/types/shipping-method.d.ts.map +0 -1
- package/dist/types/tax-line.d.ts.map +0 -1
- package/dist/types/transaction.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/utils/actions/cancel-item-fulfillment.d.ts +0 -2
- package/dist/utils/actions/cancel-item-fulfillment.d.ts.map +0 -1
- package/dist/utils/actions/cancel-item-fulfillment.js +0 -39
- package/dist/utils/actions/cancel-item-fulfillment.js.map +0 -1
- package/dist/utils/actions/cancel-return.d.ts.map +0 -1
- package/dist/utils/actions/cancel.d.ts.map +0 -1
- package/dist/utils/actions/fulfill-item.d.ts.map +0 -1
- package/dist/utils/actions/index.d.ts.map +0 -1
- package/dist/utils/actions/item-add.d.ts.map +0 -1
- package/dist/utils/actions/item-remove.d.ts.map +0 -1
- package/dist/utils/actions/receive-damaged-return-item.d.ts.map +0 -1
- package/dist/utils/actions/receive-return-item.d.ts.map +0 -1
- package/dist/utils/actions/reinstate-item.d.ts +0 -2
- package/dist/utils/actions/reinstate-item.d.ts.map +0 -1
- package/dist/utils/actions/reinstate-item.js +0 -37
- package/dist/utils/actions/reinstate-item.js.map +0 -1
- package/dist/utils/actions/return-item.d.ts.map +0 -1
- package/dist/utils/actions/ship-item.d.ts.map +0 -1
- package/dist/utils/actions/shipping-add.d.ts.map +0 -1
- package/dist/utils/actions/shipping-remove.d.ts +0 -2
- package/dist/utils/actions/shipping-remove.d.ts.map +0 -1
- package/dist/utils/actions/shipping-remove.js +0 -41
- package/dist/utils/actions/shipping-remove.js.map +0 -1
- package/dist/utils/actions/write-off-item.d.ts.map +0 -1
- package/dist/utils/apply-order-changes.d.ts +0 -18
- package/dist/utils/apply-order-changes.d.ts.map +0 -1
- package/dist/utils/apply-order-changes.js +0 -95
- package/dist/utils/apply-order-changes.js.map +0 -1
- package/dist/utils/base-repository-find.d.ts +0 -3
- package/dist/utils/base-repository-find.d.ts.map +0 -1
- package/dist/utils/base-repository-find.js +0 -142
- package/dist/utils/base-repository-find.js.map +0 -1
- package/dist/utils/calculate-order-change.d.ts.map +0 -1
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/set-action-reference.d.ts +0 -3
- package/dist/utils/set-action-reference.d.ts.map +0 -1
- package/dist/utils/set-action-reference.js +0 -17
- package/dist/utils/set-action-reference.js.map +0 -1
- package/dist/utils/transform-order.d.ts.map +0 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@medusajs/order",
|
3
|
-
"version": "0.1.3
|
3
|
+
"version": "0.1.3",
|
4
4
|
"description": "Medusa Order module",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/index.d.ts",
|
@@ -8,7 +8,10 @@
|
|
8
8
|
"dist"
|
9
9
|
],
|
10
10
|
"engines": {
|
11
|
-
"node": ">=
|
11
|
+
"node": ">=16"
|
12
|
+
},
|
13
|
+
"bin": {
|
14
|
+
"medusa-order-seed": "dist/scripts/bin/run-seed.js"
|
12
15
|
},
|
13
16
|
"repository": {
|
14
17
|
"type": "git",
|
@@ -34,22 +37,25 @@
|
|
34
37
|
"orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts mikro-orm cache:clear"
|
35
38
|
},
|
36
39
|
"devDependencies": {
|
37
|
-
"@medusajs/types": "1.12.0-snapshot-20240718073308",
|
38
40
|
"@mikro-orm/cli": "5.9.7",
|
39
41
|
"cross-env": "^5.2.1",
|
40
|
-
"jest": "^29.
|
41
|
-
"medusa-test-utils": "1.1.45
|
42
|
+
"jest": "^29.6.3",
|
43
|
+
"medusa-test-utils": "^1.1.45",
|
42
44
|
"rimraf": "^3.0.2",
|
45
|
+
"ts-jest": "^29.1.1",
|
43
46
|
"ts-node": "^10.9.1",
|
44
47
|
"tsc-alias": "^1.8.6",
|
45
48
|
"typescript": "^5.1.6"
|
46
49
|
},
|
47
50
|
"dependencies": {
|
48
|
-
"@medusajs/modules-sdk": "1.
|
49
|
-
"@medusajs/
|
51
|
+
"@medusajs/modules-sdk": "^1.12.12",
|
52
|
+
"@medusajs/types": "^1.11.17",
|
53
|
+
"@medusajs/utils": "^1.11.10",
|
50
54
|
"@mikro-orm/core": "5.9.7",
|
51
55
|
"@mikro-orm/migrations": "5.9.7",
|
52
56
|
"@mikro-orm/postgresql": "5.9.7",
|
53
|
-
"awilix": "^8.0.0"
|
57
|
+
"awilix": "^8.0.0",
|
58
|
+
"dotenv": "^16.4.5",
|
59
|
+
"knex": "2.4.2"
|
54
60
|
}
|
55
61
|
}
|
package/dist/index.d.ts.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;;;;AAG9C,wBAEE"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240219102530.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240219102530.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAijB1B"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240604100512.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240604100512.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAoW1B"}
|
@@ -1,364 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migration20240604100512 = void 0;
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
-
class Migration20240604100512 extends migrations_1.Migration {
|
6
|
-
async up() {
|
7
|
-
const sql = `
|
8
|
-
ALTER TABLE "order_change"
|
9
|
-
ADD COLUMN if NOT exists "change_type" TEXT NULL;
|
10
|
-
|
11
|
-
ALTER TABLE "order_change"
|
12
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
13
|
-
|
14
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_change_type" ON "order_change" (
|
15
|
-
change_type
|
16
|
-
);
|
17
|
-
|
18
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_deleted_at" ON "order_change" (
|
19
|
-
deleted_at
|
20
|
-
);
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
ALTER TABLE "order_transaction"
|
26
|
-
ADD COLUMN if NOT exists "return_id" TEXT NULL;
|
27
|
-
|
28
|
-
ALTER TABLE "order_transaction"
|
29
|
-
ADD COLUMN if NOT exists "claim_id" TEXT NULL;
|
30
|
-
|
31
|
-
ALTER TABLE "order_transaction"
|
32
|
-
ADD COLUMN if NOT exists "exchange_id" TEXT NULL;
|
33
|
-
|
34
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_return_id" ON "order_transaction" (
|
35
|
-
return_id
|
36
|
-
)
|
37
|
-
WHERE return_id IS NOT NULL AND deleted_at IS NOT NULL;
|
38
|
-
|
39
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_claim_id" ON "order_transaction" (
|
40
|
-
claim_id
|
41
|
-
)
|
42
|
-
WHERE claim_id IS NOT NULL AND deleted_at IS NOT NULL;
|
43
|
-
|
44
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_transaction_exchange_id" ON "order_transaction" (
|
45
|
-
exchange_id
|
46
|
-
)
|
47
|
-
WHERE exchange_id IS NOT NULL AND deleted_at IS NOT NULL;
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
ALTER TABLE "order_shipping"
|
52
|
-
ADD COLUMN if NOT exists "return_id" TEXT NULL;
|
53
|
-
|
54
|
-
ALTER TABLE "order_shipping"
|
55
|
-
ADD COLUMN if NOT exists "claim_id" TEXT NULL;
|
56
|
-
|
57
|
-
ALTER TABLE "order_shipping"
|
58
|
-
ADD COLUMN if NOT exists "exchange_id" TEXT NULL;
|
59
|
-
|
60
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_return_id" ON "order_shipping" (
|
61
|
-
return_id
|
62
|
-
)
|
63
|
-
WHERE return_id IS NOT NULL AND deleted_at IS NOT NULL;
|
64
|
-
|
65
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_claim_id" ON "order_shipping" (
|
66
|
-
claim_id
|
67
|
-
)
|
68
|
-
WHERE claim_id IS NOT NULL AND deleted_at IS NOT NULL;
|
69
|
-
|
70
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_exchange_id" ON "order_shipping" (
|
71
|
-
exchange_id
|
72
|
-
)
|
73
|
-
WHERE exchange_id IS NOT NULL AND deleted_at IS NOT NULL;
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
ALTER TABLE "order_change"
|
79
|
-
ADD COLUMN if NOT exists "return_id" TEXT NULL;
|
80
|
-
|
81
|
-
ALTER TABLE "order_change"
|
82
|
-
ADD COLUMN if NOT exists "claim_id" TEXT NULL;
|
83
|
-
|
84
|
-
ALTER TABLE "order_change"
|
85
|
-
ADD COLUMN if NOT exists "exchange_id" TEXT NULL;
|
86
|
-
|
87
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_return_id" ON "order_change" (
|
88
|
-
return_id
|
89
|
-
)
|
90
|
-
WHERE return_id IS NOT NULL AND deleted_at IS NOT NULL;
|
91
|
-
|
92
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_claim_id" ON "order_change" (
|
93
|
-
claim_id
|
94
|
-
)
|
95
|
-
WHERE claim_id IS NOT NULL AND deleted_at IS NOT NULL;
|
96
|
-
|
97
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_exchange_id" ON "order_change" (
|
98
|
-
exchange_id
|
99
|
-
)
|
100
|
-
WHERE exchange_id IS NOT NULL AND deleted_at IS NOT NULL;
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
ALTER TABLE "order_change_action"
|
105
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
106
|
-
|
107
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_action_deleted_at" ON "order_change_action" (
|
108
|
-
deleted_at
|
109
|
-
);
|
110
|
-
|
111
|
-
ALTER TABLE "order_change_action"
|
112
|
-
ADD COLUMN if NOT exists "return_id" TEXT NULL;
|
113
|
-
|
114
|
-
ALTER TABLE "order_change_action"
|
115
|
-
ADD COLUMN if NOT exists "claim_id" TEXT NULL;
|
116
|
-
|
117
|
-
ALTER TABLE "order_change_action"
|
118
|
-
ADD COLUMN if NOT exists "exchange_id" TEXT NULL;
|
119
|
-
|
120
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_action_return_id" ON "order_change_action" (
|
121
|
-
return_id
|
122
|
-
)
|
123
|
-
WHERE return_id IS NOT NULL AND deleted_at IS NOT NULL;
|
124
|
-
|
125
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_action_claim_id" ON "order_change_action" (
|
126
|
-
claim_id
|
127
|
-
)
|
128
|
-
WHERE claim_id IS NOT NULL AND deleted_at IS NOT NULL;
|
129
|
-
|
130
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_change_action_exchange_id" ON "order_change_action" (
|
131
|
-
exchange_id
|
132
|
-
)
|
133
|
-
WHERE exchange_id IS NOT NULL AND deleted_at IS NOT NULL;
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
CREATE TYPE return_status_enum AS ENUM (
|
138
|
-
'requested',
|
139
|
-
'received',
|
140
|
-
'partially_received',
|
141
|
-
'canceled'
|
142
|
-
);
|
143
|
-
|
144
|
-
CREATE TABLE IF NOT EXISTS "return" (
|
145
|
-
"id" TEXT NOT NULL,
|
146
|
-
"order_id" TEXT NOT NULL,
|
147
|
-
"claim_id" TEXT NULL,
|
148
|
-
"exchange_id" TEXT NULL,
|
149
|
-
"order_version" INTEGER NOT NULL,
|
150
|
-
"display_id" SERIAL,
|
151
|
-
"status" return_status_enum NOT NULL DEFAULT 'requested',
|
152
|
-
"no_notification" boolean NULL,
|
153
|
-
"refund_amount" NUMERIC NULL,
|
154
|
-
"raw_refund_amount" JSONB NULL,
|
155
|
-
"metadata" jsonb NULL,
|
156
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
157
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
158
|
-
"deleted_at" timestamptz NULL,
|
159
|
-
"received_at" timestamptz NULL,
|
160
|
-
"canceled_at" timestamptz NULL,
|
161
|
-
CONSTRAINT "return_pkey" PRIMARY KEY ("id")
|
162
|
-
);
|
163
|
-
|
164
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_order_id" ON "return" (
|
165
|
-
order_id
|
166
|
-
)
|
167
|
-
WHERE deleted_at IS NOT NULL;
|
168
|
-
|
169
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_claim_id" ON "return" (
|
170
|
-
claim_id
|
171
|
-
)
|
172
|
-
WHERE claim_id IS NOT NULL AND deleted_at IS NOT NULL;
|
173
|
-
|
174
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_exchange_id" ON "return" (
|
175
|
-
exchange_id
|
176
|
-
)
|
177
|
-
WHERE exchange_id IS NOT NULL AND deleted_at IS NOT NULL;
|
178
|
-
|
179
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_display_id" ON "return" (
|
180
|
-
display_id
|
181
|
-
)
|
182
|
-
WHERE deleted_at IS NOT NULL;
|
183
|
-
|
184
|
-
|
185
|
-
CREATE TABLE IF NOT EXISTS "return_item" (
|
186
|
-
"id" TEXT NOT NULL,
|
187
|
-
"return_id" TEXT NOT NULL,
|
188
|
-
"reason_id" TEXT NULL,
|
189
|
-
"item_id" TEXT NOT NULL,
|
190
|
-
"quantity" NUMERIC NOT NULL,
|
191
|
-
"raw_quantity" JSONB NOT NULL,
|
192
|
-
"received_quantity" NUMERIC NOT NULL DEFAULT 0,
|
193
|
-
"raw_received_quantity" JSONB NOT NULL,
|
194
|
-
"note" TEXT NULL,
|
195
|
-
"metadata" JSONB NULL,
|
196
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
197
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
198
|
-
"deleted_at" timestamptz NULL,
|
199
|
-
CONSTRAINT "return_item_pkey" PRIMARY KEY ("id")
|
200
|
-
);
|
201
|
-
|
202
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_item_deleted_at" ON "return_item" ("deleted_at")
|
203
|
-
WHERE deleted_at IS NOT NULL;
|
204
|
-
|
205
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_item_return_id" ON "return_item" ("return_id")
|
206
|
-
WHERE deleted_at IS NOT NULL;
|
207
|
-
|
208
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_item_item_id" ON "return_item" ("item_id")
|
209
|
-
WHERE deleted_at IS NOT NULL;
|
210
|
-
|
211
|
-
CREATE INDEX IF NOT EXISTS "IDX_return_item_reason_id" ON "return_item" ("reason_id")
|
212
|
-
WHERE deleted_at IS NOT NULL;
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
CREATE TABLE IF NOT EXISTS "order_exchange" (
|
217
|
-
"id" TEXT NOT NULL,
|
218
|
-
"order_id" TEXT NOT NULL,
|
219
|
-
"return_id" TEXT NULL,
|
220
|
-
"order_version" INTEGER NOT NULL,
|
221
|
-
"display_id" SERIAL,
|
222
|
-
"no_notification" BOOLEAN NULL,
|
223
|
-
"allow_backorder" BOOLEAN NOT NULL DEFAULT FALSE,
|
224
|
-
"difference_due" NUMERIC NULL,
|
225
|
-
"raw_difference_due" JSONB NULL,
|
226
|
-
"metadata" JSONB NULL,
|
227
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
228
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
229
|
-
"deleted_at" timestamptz NULL,
|
230
|
-
"canceled_at" timestamptz NULL,
|
231
|
-
CONSTRAINT "order_exchange_pkey" PRIMARY KEY ("id")
|
232
|
-
);
|
233
|
-
|
234
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_display_id" ON "order_exchange" ("display_id")
|
235
|
-
WHERE deleted_at IS NOT NULL;
|
236
|
-
|
237
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_deleted_at" ON "order_exchange" ("deleted_at")
|
238
|
-
WHERE deleted_at IS NOT NULL;
|
239
|
-
|
240
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_order_id" ON "order_exchange" ("order_id")
|
241
|
-
WHERE deleted_at IS NOT NULL;
|
242
|
-
|
243
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_return_id" ON "order_exchange" ("return_id")
|
244
|
-
WHERE return_id IS NOT NULL AND deleted_at IS NOT NULL;
|
245
|
-
|
246
|
-
|
247
|
-
CREATE TABLE IF NOT EXISTS "order_exchange_item" (
|
248
|
-
"id" TEXT NOT NULL,
|
249
|
-
"exchange_id" TEXT NOT NULL,
|
250
|
-
"item_id" TEXT NOT NULL,
|
251
|
-
"quantity" NUMERIC NOT NULL,
|
252
|
-
"raw_quantity" JSONB NOT NULL,
|
253
|
-
"note" TEXT NULL,
|
254
|
-
"metadata" JSONB NULL,
|
255
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
256
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
257
|
-
"deleted_at" timestamptz NULL,
|
258
|
-
CONSTRAINT "order_exchange_item_pkey" PRIMARY KEY ("id")
|
259
|
-
);
|
260
|
-
|
261
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_item_deleted_at" ON "order_exchange_item" ("deleted_at")
|
262
|
-
WHERE deleted_at IS NOT NULL;
|
263
|
-
|
264
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_item_exchange_id" ON "order_exchange_item" ("exchange_id")
|
265
|
-
WHERE deleted_at IS NOT NULL;
|
266
|
-
|
267
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_exchange_item_item_id" ON "order_exchange_item" ("item_id")
|
268
|
-
WHERE deleted_at IS NOT NULL;
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
CREATE TYPE order_claim_type_enum AS ENUM (
|
273
|
-
'refund',
|
274
|
-
'replace'
|
275
|
-
);
|
276
|
-
|
277
|
-
CREATE TABLE IF NOT EXISTS "order_claim" (
|
278
|
-
"id" TEXT NOT NULL,
|
279
|
-
"order_id" TEXT NOT NULL,
|
280
|
-
"return_id" TEXT NULL,
|
281
|
-
"order_version" INTEGER NOT NULL,
|
282
|
-
"display_id" SERIAL,
|
283
|
-
"type" order_claim_type_enum NOT NULL,
|
284
|
-
"no_notification" BOOLEAN NULL,
|
285
|
-
"refund_amount" NUMERIC NULL,
|
286
|
-
"raw_refund_amount" JSONB NULL,
|
287
|
-
"metadata" JSONB NULL,
|
288
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
289
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
290
|
-
"deleted_at" timestamptz NULL,
|
291
|
-
"canceled_at" timestamptz NULL,
|
292
|
-
CONSTRAINT "order_claim_pkey" PRIMARY KEY ("id")
|
293
|
-
);
|
294
|
-
|
295
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_display_id" ON "order_claim" ("display_id")
|
296
|
-
WHERE deleted_at IS NOT NULL;
|
297
|
-
|
298
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_deleted_at" ON "order_claim" ("deleted_at")
|
299
|
-
WHERE deleted_at IS NOT NULL;
|
300
|
-
|
301
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_order_id" ON "order_claim" ("order_id")
|
302
|
-
WHERE deleted_at IS NOT NULL;
|
303
|
-
|
304
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_return_id" ON "order_claim" ("return_id")
|
305
|
-
WHERE return_id IS NOT NULL AND deleted_at IS NOT NULL;
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
CREATE TYPE claim_reason_enum AS ENUM (
|
310
|
-
'missing_item',
|
311
|
-
'wrong_item',
|
312
|
-
'production_failure',
|
313
|
-
'other'
|
314
|
-
);
|
315
|
-
|
316
|
-
CREATE TABLE IF NOT EXISTS "order_claim_item" (
|
317
|
-
"id" TEXT NOT NULL,
|
318
|
-
"claim_id" TEXT NOT NULL,
|
319
|
-
"item_id" TEXT NOT NULL,
|
320
|
-
"is_additional_item" BOOLEAN NOT NULL DEFAULT FALSE,
|
321
|
-
"reason" claim_reason_enum NULL,
|
322
|
-
"quantity" NUMERIC NOT NULL,
|
323
|
-
"raw_quantity" JSONB NOT NULL,
|
324
|
-
"note" TEXT NULL,
|
325
|
-
"metadata" JSONB NULL,
|
326
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
327
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
328
|
-
"deleted_at" timestamptz NULL,
|
329
|
-
CONSTRAINT "order_claim_item_pkey" PRIMARY KEY ("id")
|
330
|
-
);
|
331
|
-
|
332
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_item_deleted_at" ON "order_claim_item" ("deleted_at")
|
333
|
-
WHERE deleted_at IS NOT NULL;
|
334
|
-
|
335
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_item_claim_id" ON "order_claim_item" ("claim_id")
|
336
|
-
WHERE deleted_at IS NOT NULL;
|
337
|
-
|
338
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_item_item_id" ON "order_claim_item" ("item_id")
|
339
|
-
WHERE deleted_at IS NOT NULL;
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
CREATE TABLE IF NOT EXISTS "order_claim_item_image" (
|
344
|
-
"id" TEXT NOT NULL,
|
345
|
-
"claim_item_id" TEXT NOT NULL,
|
346
|
-
"url" TEXT NOT NULL,
|
347
|
-
"metadata" JSONB NULL,
|
348
|
-
"created_at" timestamptz NOT NULL DEFAULT now(),
|
349
|
-
"updated_at" timestamptz NOT NULL DEFAULT now(),
|
350
|
-
"deleted_at" timestamptz NULL,
|
351
|
-
CONSTRAINT "order_claim_item_image_pkey" PRIMARY KEY ("id")
|
352
|
-
);
|
353
|
-
|
354
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_item_image_claim_item_id" ON "order_claim_item_image" ("claim_item_id")
|
355
|
-
WHERE "deleted_at" IS NOT NULL;
|
356
|
-
|
357
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_claim_item_image_deleted_at" ON "order_claim_item_image" ("deleted_at")
|
358
|
-
WHERE "deleted_at" IS NOT NULL;
|
359
|
-
`;
|
360
|
-
this.addSql(sql);
|
361
|
-
}
|
362
|
-
}
|
363
|
-
exports.Migration20240604100512 = Migration20240604100512;
|
364
|
-
//# sourceMappingURL=Migration20240604100512.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240604100512.js","sourceRoot":"","sources":["../../src/migrations/Migration20240604100512.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgWX,CAAA;QACD,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AArWD,0DAqWC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240715102100.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240715102100.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ1B"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migration20240715102100 = void 0;
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
-
class Migration20240715102100 extends migrations_1.Migration {
|
6
|
-
async up() {
|
7
|
-
const sql = `
|
8
|
-
ALTER TABLE "return"
|
9
|
-
ADD COLUMN if NOT exists "location_id" TEXT NULL;
|
10
|
-
`;
|
11
|
-
this.addSql(sql);
|
12
|
-
}
|
13
|
-
}
|
14
|
-
exports.Migration20240715102100 = Migration20240715102100;
|
15
|
-
//# sourceMappingURL=Migration20240715102100.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240715102100.js","sourceRoot":"","sources":["../../src/migrations/Migration20240715102100.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;KAGX,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AATD,0DASC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240715174100.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240715174100.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CAc1B"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migration20240715174100 = void 0;
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
-
class Migration20240715174100 extends migrations_1.Migration {
|
6
|
-
async up() {
|
7
|
-
const sql = `
|
8
|
-
DROP INDEX IF EXISTS "IDX_order_shipping_method_shipping_option_id";
|
9
|
-
|
10
|
-
ALTER TABLE "order_shipping_method"
|
11
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
12
|
-
|
13
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_method_shipping_option_id" ON "order_shipping_method" (
|
14
|
-
shipping_option_id
|
15
|
-
) WHERE deleted_at IS NULL;
|
16
|
-
`;
|
17
|
-
this.addSql(sql);
|
18
|
-
}
|
19
|
-
}
|
20
|
-
exports.Migration20240715174100 = Migration20240715174100;
|
21
|
-
//# sourceMappingURL=Migration20240715174100.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240715174100.js","sourceRoot":"","sources":["../../src/migrations/Migration20240715174100.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;KASX,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AAfD,0DAeC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240716081800.d.ts","sourceRoot":"","sources":["../../src/migrations/Migration20240716081800.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,qBAAa,uBAAwB,SAAQ,SAAS;IAC9C,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;CA4D1B"}
|
@@ -1,67 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.Migration20240716081800 = void 0;
|
4
|
-
const migrations_1 = require("@mikro-orm/migrations");
|
5
|
-
class Migration20240716081800 extends migrations_1.Migration {
|
6
|
-
async up() {
|
7
|
-
const sql = `
|
8
|
-
DROP INDEX IF EXISTS "IDX_order_line_item_variant_id";
|
9
|
-
DROP INDEX IF EXISTS "IDX_order_line_item_product_id";
|
10
|
-
|
11
|
-
ALTER TABLE "order_line_item"
|
12
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
13
|
-
|
14
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_variant_id" ON "order_line_item" (
|
15
|
-
variant_id
|
16
|
-
) WHERE deleted_at IS NULL;
|
17
|
-
|
18
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_product_id" ON "order_line_item" (
|
19
|
-
product_id
|
20
|
-
) WHERE deleted_at IS NULL;
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
DROP INDEX IF EXISTS "IDX_order_shipping_method_tax_line_shipping_method_id";
|
25
|
-
|
26
|
-
ALTER TABLE "order_shipping_method_tax_line"
|
27
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
28
|
-
|
29
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_method_tax_line_shipping_method_id" ON "order_shipping_method_tax_line" (
|
30
|
-
shipping_method_id
|
31
|
-
) WHERE deleted_at IS NULL;
|
32
|
-
|
33
|
-
|
34
|
-
DROP INDEX IF EXISTS "IDX_order_shipping_method_adjustment_shipping_method_id";
|
35
|
-
|
36
|
-
ALTER TABLE "order_shipping_method_adjustment"
|
37
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
38
|
-
|
39
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_shipping_method_adjustment_shipping_method_id" ON "order_shipping_method_adjustment" (
|
40
|
-
shipping_method_id
|
41
|
-
) WHERE deleted_at IS NULL;
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
DROP INDEX IF EXISTS "IDX_order_line_item_tax_line_item_id";
|
46
|
-
|
47
|
-
ALTER TABLE "order_line_item_tax_line"
|
48
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
49
|
-
|
50
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_tax_line_item_id" ON "order_line_item_tax_line" (
|
51
|
-
item_id
|
52
|
-
) WHERE deleted_at IS NULL;
|
53
|
-
|
54
|
-
DROP INDEX IF EXISTS "IDX_order_line_item_adjustment_item_id";
|
55
|
-
|
56
|
-
ALTER TABLE "order_line_item_adjustment"
|
57
|
-
ADD COLUMN if NOT exists "deleted_at" timestamptz NULL;
|
58
|
-
|
59
|
-
CREATE INDEX IF NOT EXISTS "IDX_order_line_item_adjustment_item_id" ON "order_line_item_adjustment" (
|
60
|
-
item_id
|
61
|
-
) WHERE deleted_at IS NULL;
|
62
|
-
`;
|
63
|
-
this.addSql(sql);
|
64
|
-
}
|
65
|
-
}
|
66
|
-
exports.Migration20240716081800 = Migration20240716081800;
|
67
|
-
//# sourceMappingURL=Migration20240716081800.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"Migration20240716081800.js","sourceRoot":"","sources":["../../src/migrations/Migration20240716081800.ts"],"names":[],"mappings":";;;AAAA,sDAAiD;AAEjD,MAAa,uBAAwB,SAAQ,sBAAS;IACpD,KAAK,CAAC,EAAE;QACN,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuDX,CAAA;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,CAAC;CACF;AA7DD,0DA6DC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/models/address.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAKrC,OAAO,EAIL,aAAa,EAGd,MAAM,iBAAiB,CAAA;AAExB,KAAK,oBAAoB,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAQhD,MAAM,CAAC,OAAO,OAAO,OAAO;IAC1B,CAAC,aAAa,CAAC,EAAE,oBAAoB,CAAA;IAGrC,EAAE,EAAG,MAAM,CAAA;IAIX,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAO;IAG7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAO;IAGhC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAG/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAG/B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAO;IAG/B,IAAI,EAAE,MAAM,GAAG,IAAI,CAAO;IAG1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAO;IAG9B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAGjC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAO;IAG3B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAO/C,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAGhB,QAAQ;IAKR,MAAM;CAGP"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"adjustment-line.d.ts","sourceRoot":"","sources":["../../src/models/adjustment-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,SAAS,EAA6B,MAAM,iBAAiB,CAAA;AACtE,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAA;AAErE,KAAK,2BAA2B,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAEvD;;;GAGG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,cAAc;IAC1C,CAAC,aAAa,CAAC,EAAE,2BAA2B,CAAA;IAG5C,EAAE,EAAE,MAAM,CAAA;IAGV,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAMjC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAO;IAGlC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAO;IAG1B,MAAM,EAAE,SAAS,GAAG,MAAM,CAAA;IAG1B,UAAU,EAAE,iBAAiB,CAAA;IAG7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAO;IAOjC,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAGhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;CAC/B"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { DAL } from "@medusajs/types";
|
2
|
-
import { OptionalProps, Rel } from "@mikro-orm/core";
|
3
|
-
import ClaimItem from "./claim-item";
|
4
|
-
type OptionalClaimItemImageProps = DAL.ModelDateColumns;
|
5
|
-
export default class ClaimItemImage {
|
6
|
-
[OptionalProps]?: OptionalClaimItemImageProps;
|
7
|
-
id: string;
|
8
|
-
claim_item_id: string;
|
9
|
-
item: Rel<ClaimItem>;
|
10
|
-
url: string;
|
11
|
-
metadata: Record<string, unknown> | null;
|
12
|
-
created_at: Date;
|
13
|
-
updated_at: Date;
|
14
|
-
deleted_at: Date | null;
|
15
|
-
onCreate(): void;
|
16
|
-
onInit(): void;
|
17
|
-
}
|
18
|
-
export {};
|
19
|
-
//# sourceMappingURL=claim-item-image.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"claim-item-image.d.ts","sourceRoot":"","sources":["../../src/models/claim-item-image.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAMrC,OAAO,EAML,aAAa,EAGb,GAAG,EACJ,MAAM,iBAAiB,CAAA;AACxB,OAAO,SAAS,MAAM,cAAc,CAAA;AAEpC,KAAK,2BAA2B,GAAG,GAAG,CAAC,gBAAgB,CAAA;AAgBvD,MAAM,CAAC,OAAO,OAAO,cAAc;IACjC,CAAC,aAAa,CAAC,CAAC,EAAE,2BAA2B,CAAA;IAG7C,EAAE,EAAE,MAAM,CAAA;IASV,aAAa,EAAE,MAAM,CAAA;IAKrB,IAAI,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IAGpB,GAAG,EAAE,MAAM,CAAA;IAGX,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAO;IAO/C,UAAU,EAAE,IAAI,CAAA;IAQhB,UAAU,EAAE,IAAI,CAAA;IAIhB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ;IAMR,MAAM;CAIP"}
|