@medusajs/medusa 1.6.2-alpha.0 → 1.6.2
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +11 -2
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/routes/admin/currencies/list-currencies.d.ts +26 -10
- package/dist/api/routes/admin/currencies/list-currencies.js +26 -10
- package/dist/api/routes/admin/currencies/list-currencies.js.map +1 -1
- package/dist/api/routes/admin/currencies/update-currency.d.ts +22 -0
- package/dist/api/routes/admin/currencies/update-currency.js +22 -0
- package/dist/api/routes/admin/currencies/update-currency.js.map +1 -1
- package/dist/api/routes/admin/order-edits/add-line-item.d.ts +27 -6
- package/dist/api/routes/admin/order-edits/add-line-item.js +27 -6
- package/dist/api/routes/admin/order-edits/add-line-item.js.map +1 -1
- package/dist/api/routes/admin/order-edits/cancel-order-edit.d.ts +2 -2
- package/dist/api/routes/admin/order-edits/cancel-order-edit.js +2 -2
- package/dist/api/routes/admin/order-edits/confirm-order-edit.d.ts +2 -2
- package/dist/api/routes/admin/order-edits/confirm-order-edit.js +2 -2
- package/dist/api/routes/admin/order-edits/create-order-edit.d.ts +17 -3
- package/dist/api/routes/admin/order-edits/create-order-edit.js +17 -3
- package/dist/api/routes/admin/order-edits/create-order-edit.js.map +1 -1
- package/dist/api/routes/admin/order-edits/delete-order-edit-item-change.d.ts +1 -1
- package/dist/api/routes/admin/order-edits/delete-order-edit-item-change.js +1 -1
- package/dist/api/routes/admin/order-edits/delete-order-edit.d.ts +1 -1
- package/dist/api/routes/admin/order-edits/delete-order-edit.js +1 -1
- package/dist/api/routes/admin/order-edits/get-order-edit.d.ts +1 -1
- package/dist/api/routes/admin/order-edits/get-order-edit.js +1 -1
- package/dist/api/routes/admin/order-edits/list-order-edit.d.ts +12 -3
- package/dist/api/routes/admin/order-edits/list-order-edit.js +12 -3
- package/dist/api/routes/admin/order-edits/list-order-edit.js.map +1 -1
- package/dist/api/routes/admin/order-edits/request-confirmation.d.ts +1 -1
- package/dist/api/routes/admin/order-edits/request-confirmation.js +1 -1
- package/dist/api/routes/admin/order-edits/update-order-edit-line-item.d.ts +16 -3
- package/dist/api/routes/admin/order-edits/update-order-edit-line-item.js +16 -3
- package/dist/api/routes/admin/order-edits/update-order-edit-line-item.js.map +1 -1
- package/dist/api/routes/admin/order-edits/update-order-edit.d.ts +12 -3
- package/dist/api/routes/admin/order-edits/update-order-edit.js +12 -3
- package/dist/api/routes/admin/order-edits/update-order-edit.js.map +1 -1
- package/dist/api/routes/admin/product-types/list-product-types.d.ts +3 -7
- package/dist/api/routes/admin/product-types/list-product-types.js +3 -24
- package/dist/api/routes/admin/product-types/list-product-types.js.map +1 -1
- package/dist/api/routes/admin/products/list-types.d.ts +1 -0
- package/dist/api/routes/admin/products/list-types.js +1 -0
- package/dist/api/routes/admin/products/list-types.js.map +1 -1
- package/dist/api/routes/admin/returns/receive-return.d.ts +2 -2
- package/dist/api/routes/admin/returns/receive-return.js +2 -2
- package/dist/api/routes/store/carts/create-payment-sessions.js +25 -30
- package/dist/api/routes/store/carts/create-payment-sessions.js.map +1 -1
- package/dist/api/routes/store/index.js +2 -0
- package/dist/api/routes/store/index.js.map +1 -1
- package/dist/api/routes/store/order-edits/complete-order-edit.d.ts +1 -1
- package/dist/api/routes/store/order-edits/complete-order-edit.js +1 -1
- package/dist/api/routes/store/order-edits/decline-order-edit.d.ts +1 -1
- package/dist/api/routes/store/order-edits/decline-order-edit.js +1 -1
- package/dist/api/routes/store/order-edits/get-order-edit.d.ts +1 -1
- package/dist/api/routes/store/order-edits/get-order-edit.js +1 -1
- package/dist/api/routes/store/product-types/index.d.ts +15 -0
- package/dist/api/routes/store/product-types/index.js +59 -0
- package/dist/api/routes/store/product-types/index.js.map +1 -0
- package/dist/api/routes/store/product-types/list-product-types.d.ts +138 -0
- package/dist/api/routes/store/product-types/list-product-types.js +274 -0
- package/dist/api/routes/store/product-types/list-product-types.js.map +1 -0
- package/dist/api/routes/store/products/list-products.d.ts +9 -0
- package/dist/api/routes/store/products/list-products.js +9 -0
- package/dist/api/routes/store/products/list-products.js.map +1 -1
- package/dist/api/routes/store/returns/create-return.d.ts +2 -2
- package/dist/api/routes/store/returns/create-return.js +2 -2
- package/dist/models/order-edit.d.ts +27 -3
- package/dist/models/order-edit.js +27 -3
- package/dist/models/order-edit.js.map +1 -1
- package/dist/models/order-item-change.d.ts +20 -4
- package/dist/models/order-item-change.js +20 -4
- package/dist/models/order-item-change.js.map +1 -1
- package/dist/models/payment-collection.d.ts +98 -0
- package/dist/models/payment-collection.js +98 -0
- package/dist/models/payment-collection.js.map +1 -1
- package/dist/models/region.d.ts +1 -1
- package/dist/models/region.js +1 -1
- package/dist/services/event-bus.d.ts +9 -3
- package/dist/services/event-bus.js +6 -0
- package/dist/services/event-bus.js.map +1 -1
- package/dist/services/product-type.d.ts +2 -2
- package/dist/services/product-type.js +3 -3
- package/dist/services/product-type.js.map +1 -1
- package/package.json +2 -2
|
@@ -110,9 +110,9 @@ var class_validator_1 = require("class-validator");
|
|
|
110
110
|
* import Medusa from "@medusajs/medusa-js"
|
|
111
111
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
112
112
|
* // must be previously logged in or use api token
|
|
113
|
-
* medusa.admin.
|
|
114
|
-
* .then(({ order_edits }) => {
|
|
115
|
-
* console.log(order_edits)
|
|
113
|
+
* medusa.admin.orderEdits.list()
|
|
114
|
+
* .then(({ order_edits, count, limit, offset }) => {
|
|
115
|
+
* console.log(order_edits.length)
|
|
116
116
|
* })
|
|
117
117
|
* - lang: Shell
|
|
118
118
|
* label: cURL
|
|
@@ -134,6 +134,15 @@ var class_validator_1 = require("class-validator");
|
|
|
134
134
|
* order_edits:
|
|
135
135
|
* type: array
|
|
136
136
|
* $ref: "#/components/schemas/order_edit"
|
|
137
|
+
* count:
|
|
138
|
+
* type: integer
|
|
139
|
+
* description: The total number of items available
|
|
140
|
+
* offset:
|
|
141
|
+
* type: integer
|
|
142
|
+
* description: The number of items skipped before these items
|
|
143
|
+
* limit:
|
|
144
|
+
* type: integer
|
|
145
|
+
* description: The number of items per page
|
|
137
146
|
* "400":
|
|
138
147
|
* $ref: "#/components/responses/400_error"
|
|
139
148
|
* "401":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-order-edit.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/order-edits/list-order-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mDAAkE;AAClE,mDAAsD;AAEtD
|
|
1
|
+
{"version":3,"file":"list-order-edit.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/order-edits/list-order-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,mDAAkE;AAClE,mDAAsD;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,mBAAe,UAAO,GAAY,EAAE,GAAa;;;;;;gBACzC,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAE/B,gBAAgB,GAAiB,GAAG,iBAApB,EAAE,UAAU,GAAK,GAAG,WAAR,CAAQ;gBACpC,IAAI,GAAW,UAAU,KAArB,EAAE,IAAI,GAAK,UAAU,KAAf,CAAe;gBAEI,qBAAM,gBAAgB,CAAC,YAAY,CACtE,gBAAgB,EAChB,UAAU,CACX,EAAA;;gBAHK,KAAA,sBAA+B,SAGpC,KAAA,EAHM,UAAU,QAAA,EAAE,cAAc,QAAA;;;;gBAKX,eAAA,SAAA,UAAU,CAAA;;;;gBAAvB,SAAS;gBACJ,qBAAM,gBAAgB,CAAC,cAAc,CAAC,SAAS,CAAC,EAAA;;gBAA5D,SAAS,GAAG,SAAgD,CAAA;;;;;;;;;;;;;;;;oBAG9D,sBAAO,GAAG,CAAC,IAAI,CAAC;oBACd,WAAW,EAAE,UAAU;oBACvB,KAAK,EAAE,cAAc;oBACrB,KAAK,EAAE,IAAI;oBACX,MAAM,EAAE,IAAI;iBACb,CAAC,EAAA;;;KACH,EAAA;AAED;IAAyC,uCAGvC;IAHF;;IAWA,CAAC;IALC;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;kDACH;IAIV;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;yDACI;IACnB,0BAAC;CAAA,AAXD,CAAyC,IAAA,gCAAuB,EAAC;IAC/D,KAAK,EAAE,EAAE;IACT,MAAM,EAAE,CAAC;CACV,CAAC,GAQD;AAXY,kDAAmB"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* import Medusa from "@medusajs/medusa-js"
|
|
14
14
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
15
15
|
* // must be previously logged in or use api token
|
|
16
|
-
* medusa.admin.orderEdits.requestConfirmation(
|
|
16
|
+
* medusa.admin.orderEdits.requestConfirmation(order_edit_id)
|
|
17
17
|
* .then({ order_edit }) => {
|
|
18
18
|
* console.log(order_edit.id)
|
|
19
19
|
* })
|
|
@@ -52,7 +52,7 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
52
52
|
* import Medusa from "@medusajs/medusa-js"
|
|
53
53
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
54
54
|
* // must be previously logged in or use api token
|
|
55
|
-
* medusa.admin.orderEdits.requestConfirmation(
|
|
55
|
+
* medusa.admin.orderEdits.requestConfirmation(order_edit_id)
|
|
56
56
|
* .then({ order_edit }) => {
|
|
57
57
|
* console.log(order_edit.id)
|
|
58
58
|
* })
|
|
@@ -8,6 +8,16 @@ import { Request, Response } from "express";
|
|
|
8
8
|
* parameters:
|
|
9
9
|
* - (path) id=* {string} The ID of the Order Edit to update.
|
|
10
10
|
* - (path) item_id=* {string} The ID of the order edit item to update.
|
|
11
|
+
* requestBody:
|
|
12
|
+
* content:
|
|
13
|
+
* application/json:
|
|
14
|
+
* schema:
|
|
15
|
+
* required:
|
|
16
|
+
* - quantity
|
|
17
|
+
* properties:
|
|
18
|
+
* quantity:
|
|
19
|
+
* description: The quantity to update
|
|
20
|
+
* type: number
|
|
11
21
|
* x-codeSamples:
|
|
12
22
|
* - lang: JavaScript
|
|
13
23
|
* label: JS Client
|
|
@@ -15,7 +25,9 @@ import { Request, Response } from "express";
|
|
|
15
25
|
* import Medusa from "@medusajs/medusa-js"
|
|
16
26
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
17
27
|
* // must be previously logged in or use api token
|
|
18
|
-
* medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id
|
|
28
|
+
* medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id, {
|
|
29
|
+
* quantity: 5
|
|
30
|
+
* })
|
|
19
31
|
* .then(({ order_edit }) => {
|
|
20
32
|
* console.log(order_edit.id)
|
|
21
33
|
* })
|
|
@@ -23,8 +35,9 @@ import { Request, Response } from "express";
|
|
|
23
35
|
* label: cURL
|
|
24
36
|
* source: |
|
|
25
37
|
* curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
|
26
|
-
* --header 'Authorization: Bearer {api_token}'
|
|
27
|
-
*
|
|
38
|
+
* --header 'Authorization: Bearer {api_token}' \
|
|
39
|
+
* --header 'Content-Type: application/json' \
|
|
40
|
+
* --data-raw '{ "quantity": 5 }'
|
|
28
41
|
* security:
|
|
29
42
|
* - api_token: []
|
|
30
43
|
* - cookie_auth: []
|
|
@@ -57,6 +57,16 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
57
57
|
* parameters:
|
|
58
58
|
* - (path) id=* {string} The ID of the Order Edit to update.
|
|
59
59
|
* - (path) item_id=* {string} The ID of the order edit item to update.
|
|
60
|
+
* requestBody:
|
|
61
|
+
* content:
|
|
62
|
+
* application/json:
|
|
63
|
+
* schema:
|
|
64
|
+
* required:
|
|
65
|
+
* - quantity
|
|
66
|
+
* properties:
|
|
67
|
+
* quantity:
|
|
68
|
+
* description: The quantity to update
|
|
69
|
+
* type: number
|
|
60
70
|
* x-codeSamples:
|
|
61
71
|
* - lang: JavaScript
|
|
62
72
|
* label: JS Client
|
|
@@ -64,7 +74,9 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
64
74
|
* import Medusa from "@medusajs/medusa-js"
|
|
65
75
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
66
76
|
* // must be previously logged in or use api token
|
|
67
|
-
* medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id
|
|
77
|
+
* medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id, {
|
|
78
|
+
* quantity: 5
|
|
79
|
+
* })
|
|
68
80
|
* .then(({ order_edit }) => {
|
|
69
81
|
* console.log(order_edit.id)
|
|
70
82
|
* })
|
|
@@ -72,8 +84,9 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
72
84
|
* label: cURL
|
|
73
85
|
* source: |
|
|
74
86
|
* curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
|
75
|
-
* --header 'Authorization: Bearer {api_token}'
|
|
76
|
-
*
|
|
87
|
+
* --header 'Authorization: Bearer {api_token}' \
|
|
88
|
+
* --header 'Content-Type: application/json' \
|
|
89
|
+
* --data-raw '{ "quantity": 5 }'
|
|
77
90
|
* security:
|
|
78
91
|
* - api_token: []
|
|
79
92
|
* - cookie_auth: []
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-order-edit-line-item.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/order-edits/update-order-edit-line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,mDAA0C;AAC1C,2DAGqC;AAErC
|
|
1
|
+
{"version":3,"file":"update-order-edit-line-item.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/order-edits/update-order-edit-line-item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,mDAA0C;AAC1C,2DAGqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,mBAAe,UAAO,GAAY,EAAE,GAAa;;;;;gBACzC,KAAkB,GAAG,CAAC,MAAM,EAA1B,EAAE,QAAA,EAAE,OAAO,aAAA,CAAe;gBAE5B,aAAa,GACjB,GAAG,CAAC,aAA4D,CAAA;gBAE5D,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEjC,OAAO,GAAkB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;gBAE3D,qBAAM,OAAO,CAAC,WAAW,CAAC,UAAO,kBAAkB;;;wCACjD,qBAAM,gBAAgB;yCACnB,eAAe,CAAC,kBAAkB,CAAC;yCACnC,cAAc,CAAC,EAAE,EAAE,OAAO,EAAE,aAAa,CAAC,EAAA;;oCAF7C,SAE6C,CAAA;;;;yBAC9C,CAAC,EAAA;;gBAJF,SAIE,CAAA;gBAEc,qBAAM,gBAAgB,CAAC,QAAQ,CAAC,EAAE,EAAE;wBAClD,MAAM,EAAE,mCAAsB;wBAC9B,SAAS,EAAE,sCAAyB;qBACrC,CAAC,EAAA;;gBAHE,SAAS,GAAG,SAGd;gBACU,qBAAM,gBAAgB,CAAC,cAAc,CAAC,SAAS,CAAC,EAAA;;gBAA5D,SAAS,GAAG,SAAgD,CAAA;gBAE5D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;oBACnB,UAAU,EAAE,SAAS;iBACtB,CAAC,CAAA;;;;KACH,EAAA;AAED;IAAA;IAGA,CAAC;IADC;QADC,IAAA,0BAAQ,GAAE;;iFACK;IAClB,kDAAC;CAAA,AAHD,IAGC;AAHY,kGAA2C"}
|
|
@@ -7,6 +7,14 @@ import { Request, Response } from "express";
|
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
9
9
|
* - (path) id=* {string} The ID of the OrderEdit.
|
|
10
|
+
* requestBody:
|
|
11
|
+
* content:
|
|
12
|
+
* application/json:
|
|
13
|
+
* schema:
|
|
14
|
+
* properties:
|
|
15
|
+
* internal_note:
|
|
16
|
+
* description: An optional note to create or update for the order edit.
|
|
17
|
+
* type: string
|
|
10
18
|
* x-codeSamples:
|
|
11
19
|
* - lang: JavaScript
|
|
12
20
|
* label: JS Client
|
|
@@ -14,8 +22,9 @@ import { Request, Response } from "express";
|
|
|
14
22
|
* import Medusa from "@medusajs/medusa-js"
|
|
15
23
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
16
24
|
* // must be previously logged in or use api token
|
|
17
|
-
*
|
|
18
|
-
*
|
|
25
|
+
* medusa.admin.orderEdits.update(order_edit_id, {
|
|
26
|
+
* internal_note: "internal reason XY"
|
|
27
|
+
* })
|
|
19
28
|
* .then(({ order_edit }) => {
|
|
20
29
|
* console.log(order_edit.id)
|
|
21
30
|
* })
|
|
@@ -23,7 +32,7 @@ import { Request, Response } from "express";
|
|
|
23
32
|
* label: cURL
|
|
24
33
|
* source: |
|
|
25
34
|
* curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}' \
|
|
26
|
-
* --header 'Authorization: Bearer {api_token}'
|
|
35
|
+
* --header 'Authorization: Bearer {api_token}' \
|
|
27
36
|
* --header 'Content-Type: application/json' \
|
|
28
37
|
* --data-raw '{
|
|
29
38
|
* "internal_note": "internal reason XY"
|
|
@@ -56,6 +56,14 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
56
56
|
* x-authenticated: true
|
|
57
57
|
* parameters:
|
|
58
58
|
* - (path) id=* {string} The ID of the OrderEdit.
|
|
59
|
+
* requestBody:
|
|
60
|
+
* content:
|
|
61
|
+
* application/json:
|
|
62
|
+
* schema:
|
|
63
|
+
* properties:
|
|
64
|
+
* internal_note:
|
|
65
|
+
* description: An optional note to create or update for the order edit.
|
|
66
|
+
* type: string
|
|
59
67
|
* x-codeSamples:
|
|
60
68
|
* - lang: JavaScript
|
|
61
69
|
* label: JS Client
|
|
@@ -63,8 +71,9 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
63
71
|
* import Medusa from "@medusajs/medusa-js"
|
|
64
72
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
65
73
|
* // must be previously logged in or use api token
|
|
66
|
-
*
|
|
67
|
-
*
|
|
74
|
+
* medusa.admin.orderEdits.update(order_edit_id, {
|
|
75
|
+
* internal_note: "internal reason XY"
|
|
76
|
+
* })
|
|
68
77
|
* .then(({ order_edit }) => {
|
|
69
78
|
* console.log(order_edit.id)
|
|
70
79
|
* })
|
|
@@ -72,7 +81,7 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
72
81
|
* label: cURL
|
|
73
82
|
* source: |
|
|
74
83
|
* curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}' \
|
|
75
|
-
* --header 'Authorization: Bearer {api_token}'
|
|
84
|
+
* --header 'Authorization: Bearer {api_token}' \
|
|
76
85
|
* --header 'Content-Type: application/json' \
|
|
77
86
|
* --data-raw '{
|
|
78
87
|
* "internal_note": "internal reason XY"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-order-edit.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/order-edits/update-order-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsD;AAKtD,2DAGqC;AAErC
|
|
1
|
+
{"version":3,"file":"update-order-edit.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/order-edits/update-order-edit.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAsD;AAKtD,2DAGqC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,mBAAe,UAAO,GAAY,EAAE,GAAa;;;;;gBACvC,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBACjB,aAAa,GAAK,GAEzB,cAFoB,CAEpB;gBAEK,gBAAgB,GACpB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAA;gBAEjC,OAAO,GAAkB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;gBAElC,qBAAM,OAAO,CAAC,WAAW,CAChD,UAAO,kBAAkB;;;wCAChB,qBAAM,gBAAgB;yCAC1B,eAAe,CAAC,kBAAkB,CAAC;yCACnC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,EAAA;wCAF5B,sBAAO,SAEqB,EAAA;;;yBAC7B,CACF,EAAA;;gBANK,gBAAgB,GAAG,SAMxB;gBAEe,qBAAM,gBAAgB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EAAE;wBACnE,MAAM,EAAE,mCAAsB;wBAC9B,SAAS,EAAE,sCAAyB;qBACrC,CAAC,EAAA;;gBAHE,SAAS,GAAG,SAGd;gBACU,qBAAM,gBAAgB,CAAC,cAAc,CAAC,SAAS,CAAC,EAAA;;gBAA5D,SAAS,GAAG,SAAgD,CAAA;gBAE5D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,CAAC,CAAA;;;;KAChD,EAAA;AAED;IAAA;IAIA,CAAC;IADC;QAFC,IAAA,4BAAU,GAAE;QACZ,IAAA,0BAAQ,GAAE;;0EACW;IACxB,sCAAC;CAAA,AAJD,IAIC;AAJY,0EAA+B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DateComparisonOperator, StringComparisonOperator } from "../../../../types/common";
|
|
1
|
+
import { DateComparisonOperator, FindPaginationParams, StringComparisonOperator } from "../../../../types/common";
|
|
2
2
|
/**
|
|
3
3
|
* @oas [get] /product-types
|
|
4
4
|
* operationId: "GetProductTypes"
|
|
@@ -6,7 +6,7 @@ import { DateComparisonOperator, StringComparisonOperator } from "../../../../ty
|
|
|
6
6
|
* description: "Retrieve a list of Product Types."
|
|
7
7
|
* x-authenticated: true
|
|
8
8
|
* parameters:
|
|
9
|
-
* - (query) limit=
|
|
9
|
+
* - (query) limit=20 {integer} The number of types to return.
|
|
10
10
|
* - (query) offset=0 {integer} The number of items to skip before the results.
|
|
11
11
|
* - (query) order {string} The field to sort items by.
|
|
12
12
|
* - (query) discount_condition_id {string} The discount condition id on which to filter the product types.
|
|
@@ -127,11 +127,7 @@ import { DateComparisonOperator, StringComparisonOperator } from "../../../../ty
|
|
|
127
127
|
*/
|
|
128
128
|
declare const _default: (req: any, res: any) => Promise<void>;
|
|
129
129
|
export default _default;
|
|
130
|
-
export declare class
|
|
131
|
-
limit?: number | undefined;
|
|
132
|
-
offset?: number | undefined;
|
|
133
|
-
}
|
|
134
|
-
export declare class AdminGetProductTypesParams extends AdminGetProductTypesPaginationParams {
|
|
130
|
+
export declare class AdminGetProductTypesParams extends FindPaginationParams {
|
|
135
131
|
id?: string | string[] | StringComparisonOperator;
|
|
136
132
|
q?: string;
|
|
137
133
|
value?: string | string[] | StringComparisonOperator;
|
|
@@ -76,11 +76,10 @@ var __read = (this && this.__read) || function (o, n) {
|
|
|
76
76
|
return ar;
|
|
77
77
|
};
|
|
78
78
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
79
|
-
exports.AdminGetProductTypesParams =
|
|
79
|
+
exports.AdminGetProductTypesParams = void 0;
|
|
80
80
|
var common_1 = require("../../../../types/common");
|
|
81
81
|
var class_validator_1 = require("class-validator");
|
|
82
82
|
var is_type_1 = require("../../../../utils/validators/is-type");
|
|
83
|
-
var class_transformer_1 = require("class-transformer");
|
|
84
83
|
/**
|
|
85
84
|
* @oas [get] /product-types
|
|
86
85
|
* operationId: "GetProductTypes"
|
|
@@ -88,7 +87,7 @@ var class_transformer_1 = require("class-transformer");
|
|
|
88
87
|
* description: "Retrieve a list of Product Types."
|
|
89
88
|
* x-authenticated: true
|
|
90
89
|
* parameters:
|
|
91
|
-
* - (query) limit=
|
|
90
|
+
* - (query) limit=20 {integer} The number of types to return.
|
|
92
91
|
* - (query) offset=0 {integer} The number of items to skip before the results.
|
|
93
92
|
* - (query) order {string} The field to sort items by.
|
|
94
93
|
* - (query) discount_condition_id {string} The discount condition id on which to filter the product types.
|
|
@@ -228,26 +227,6 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
228
227
|
}
|
|
229
228
|
});
|
|
230
229
|
}); });
|
|
231
|
-
var AdminGetProductTypesPaginationParams = /** @class */ (function () {
|
|
232
|
-
function AdminGetProductTypesPaginationParams() {
|
|
233
|
-
this.limit = 10;
|
|
234
|
-
this.offset = 0;
|
|
235
|
-
}
|
|
236
|
-
__decorate([
|
|
237
|
-
(0, class_validator_1.IsNumber)(),
|
|
238
|
-
(0, class_validator_1.IsOptional)(),
|
|
239
|
-
(0, class_transformer_1.Type)(function () { return Number; }),
|
|
240
|
-
__metadata("design:type", Object)
|
|
241
|
-
], AdminGetProductTypesPaginationParams.prototype, "limit", void 0);
|
|
242
|
-
__decorate([
|
|
243
|
-
(0, class_validator_1.IsNumber)(),
|
|
244
|
-
(0, class_validator_1.IsOptional)(),
|
|
245
|
-
(0, class_transformer_1.Type)(function () { return Number; }),
|
|
246
|
-
__metadata("design:type", Object)
|
|
247
|
-
], AdminGetProductTypesPaginationParams.prototype, "offset", void 0);
|
|
248
|
-
return AdminGetProductTypesPaginationParams;
|
|
249
|
-
}());
|
|
250
|
-
exports.AdminGetProductTypesPaginationParams = AdminGetProductTypesPaginationParams;
|
|
251
230
|
// eslint-disable-next-line max-len
|
|
252
231
|
var AdminGetProductTypesParams = /** @class */ (function (_super) {
|
|
253
232
|
__extends(AdminGetProductTypesParams, _super);
|
|
@@ -290,6 +269,6 @@ var AdminGetProductTypesParams = /** @class */ (function (_super) {
|
|
|
290
269
|
__metadata("design:type", String)
|
|
291
270
|
], AdminGetProductTypesParams.prototype, "discount_condition_id", void 0);
|
|
292
271
|
return AdminGetProductTypesParams;
|
|
293
|
-
}(
|
|
272
|
+
}(common_1.FindPaginationParams));
|
|
294
273
|
exports.AdminGetProductTypesParams = AdminGetProductTypesParams;
|
|
295
274
|
//# sourceMappingURL=list-product-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-product-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-types/list-product-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"list-product-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/product-types/list-product-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAIiC;AACjC,mDAAsD;AAEtD,gEAA6D;AAG7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;6DACC;IAId;QAFC,IAAA,0BAAQ,GAAE;QACV,IAAA,4BAAU,GAAE;;6EACiB;IAChC,iCAAC;CAAA,AA5BD,CAAgD,6BAAoB,GA4BnE;AA5BY,gEAA0B"}
|
|
@@ -38,6 +38,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
/**
|
|
40
40
|
* @oas [get] /products/types
|
|
41
|
+
* deprecated: true
|
|
41
42
|
* operationId: "GetProductsTypes"
|
|
42
43
|
* summary: "List Product Types"
|
|
43
44
|
* description: "Retrieves a list of Product Types."
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/products/list-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA
|
|
1
|
+
{"version":3,"file":"list-types.js","sourceRoot":"","sources":["../../../../../src/api/routes/admin/products/list-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACtB,cAAc,GAAmB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;gBAE5D,qBAAM,cAAc,CAAC,SAAS,EAAE,EAAA;;gBAAxC,KAAK,GAAG,SAAgC;gBAE9C,GAAG,CAAC,IAAI,CAAC,EAAE,KAAK,OAAA,EAAE,CAAC,CAAA;;;;KACpB,EAAA"}
|
|
@@ -81,7 +81,7 @@ var _1 = require(".");
|
|
|
81
81
|
* $ref: "#/components/responses/500_error"
|
|
82
82
|
*/
|
|
83
83
|
exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0, function () {
|
|
84
|
-
var id, cartService, idempotencyKeyService, manager, headerKey, idempotencyKey, error_1,
|
|
84
|
+
var id, cartService, idempotencyKeyService, manager, headerKey, idempotencyKey, error_1, inProgress, err, _a;
|
|
85
85
|
return __generator(this, function (_b) {
|
|
86
86
|
switch (_b.label) {
|
|
87
87
|
case 0:
|
|
@@ -115,21 +115,18 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
115
115
|
case 4:
|
|
116
116
|
res.setHeader("Access-Control-Expose-Headers", "Idempotency-Key");
|
|
117
117
|
res.setHeader("Idempotency-Key", idempotencyKey.idempotency_key);
|
|
118
|
+
inProgress = true;
|
|
119
|
+
err = false;
|
|
118
120
|
_b.label = 5;
|
|
119
121
|
case 5:
|
|
120
|
-
|
|
121
|
-
inProgress_1 = true;
|
|
122
|
-
err_1 = false;
|
|
123
|
-
_b.label = 6;
|
|
124
|
-
case 6:
|
|
125
|
-
if (!inProgress_1) return [3 /*break*/, 13];
|
|
122
|
+
if (!inProgress) return [3 /*break*/, 12];
|
|
126
123
|
_a = idempotencyKey.recovery_point;
|
|
127
124
|
switch (_a) {
|
|
128
|
-
case "started": return [3 /*break*/,
|
|
129
|
-
case "finished": return [3 /*break*/,
|
|
125
|
+
case "started": return [3 /*break*/, 6];
|
|
126
|
+
case "finished": return [3 /*break*/, 8];
|
|
130
127
|
}
|
|
131
|
-
return [3 /*break*/,
|
|
132
|
-
case
|
|
128
|
+
return [3 /*break*/, 9];
|
|
129
|
+
case 6: return [4 /*yield*/, manager
|
|
133
130
|
.transaction("SERIALIZABLE", function (transactionManager) { return __awaiter(void 0, void 0, void 0, function () {
|
|
134
131
|
return __generator(this, function (_a) {
|
|
135
132
|
switch (_a.label) {
|
|
@@ -166,19 +163,19 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
166
163
|
});
|
|
167
164
|
}); })
|
|
168
165
|
.catch(function (e) {
|
|
169
|
-
|
|
170
|
-
|
|
166
|
+
inProgress = false;
|
|
167
|
+
err = e;
|
|
171
168
|
})];
|
|
172
|
-
case
|
|
169
|
+
case 7:
|
|
173
170
|
_b.sent();
|
|
174
|
-
return [3 /*break*/,
|
|
175
|
-
case
|
|
171
|
+
return [3 /*break*/, 11];
|
|
172
|
+
case 8:
|
|
176
173
|
{
|
|
177
|
-
|
|
178
|
-
return [3 /*break*/,
|
|
174
|
+
inProgress = false;
|
|
175
|
+
return [3 /*break*/, 11];
|
|
179
176
|
}
|
|
180
|
-
_b.label =
|
|
181
|
-
case
|
|
177
|
+
_b.label = 9;
|
|
178
|
+
case 9: return [4 /*yield*/, manager.transaction(function (transactionManager) { return __awaiter(void 0, void 0, void 0, function () {
|
|
182
179
|
return __generator(this, function (_a) {
|
|
183
180
|
switch (_a.label) {
|
|
184
181
|
case 0: return [4 /*yield*/, idempotencyKeyService
|
|
@@ -194,18 +191,16 @@ exports.default = (function (req, res) { return __awaiter(void 0, void 0, void 0
|
|
|
194
191
|
}
|
|
195
192
|
});
|
|
196
193
|
}); })];
|
|
197
|
-
case
|
|
194
|
+
case 10:
|
|
198
195
|
_b.sent();
|
|
199
|
-
return [3 /*break*/,
|
|
200
|
-
case
|
|
201
|
-
case
|
|
196
|
+
return [3 /*break*/, 11];
|
|
197
|
+
case 11: return [3 /*break*/, 5];
|
|
198
|
+
case 12:
|
|
199
|
+
if (err) {
|
|
200
|
+
throw err;
|
|
201
|
+
}
|
|
202
202
|
res.status(idempotencyKey.response_code).json(idempotencyKey.response_body);
|
|
203
|
-
return [
|
|
204
|
-
case 14:
|
|
205
|
-
e_1 = _b.sent();
|
|
206
|
-
console.log(e_1);
|
|
207
|
-
throw e_1;
|
|
208
|
-
case 15: return [2 /*return*/];
|
|
203
|
+
return [2 /*return*/];
|
|
209
204
|
}
|
|
210
205
|
});
|
|
211
206
|
}); });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-payment-sessions.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/carts/create-payment-sessions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAqE;AAKrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,mBAAe,UAAO,GAAG,EAAE,GAAG;;;;;gBACpB,EAAE,GAAK,GAAG,CAAC,MAAM,GAAf,CAAe;gBAEnB,WAAW,GAAgB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;gBAC3D,qBAAqB,GAA0B,GAAG,CAAC,KAAK,CAAC,OAAO,CACpE,uBAAuB,CACxB,CAAA;gBACK,OAAO,GAAkB,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAA;gBAErD,SAAS,GAAG,GAAG,CAAC,GAAG,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAA;;;;gBAIhD,qBAAM,OAAO,CAAC,WAAW,CAAC,UAAO,kBAAkB;;;wCAChC,qBAAM,qBAAqB;yCACzC,eAAe,CAAC,kBAAkB,CAAC;yCACnC,iBAAiB,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAA;;oCAFjE,cAAc,GAAG,SAEgD,CAAA;;;;yBAClE,CAAC,EAAA;;gBAJF,SAIE,CAAA;;;;gBAEF,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAA;gBACxD,sBAAM;;gBAGR,GAAG,CAAC,SAAS,CAAC,+BAA+B,EAAE,iBAAiB,CAAC,CAAA;gBACjE,GAAG,CAAC,SAAS,CAAC,iBAAiB,EAAE,cAAc,CAAC,eAAe,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"create-payment-sessions.js","sourceRoot":"","sources":["../../../../../src/api/routes/store/carts/create-payment-sessions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sB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oBACP,MAAM,GAAG,CAAA;iBACV;gBAED,GAAG,CAAC,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,aAAa,CAAC,CAAA;;;;KAC5E,EAAA"}
|
|
@@ -14,6 +14,7 @@ var gift_cards_1 = __importDefault(require("./gift-cards"));
|
|
|
14
14
|
var orders_1 = __importDefault(require("./orders"));
|
|
15
15
|
var order_edits_1 = __importDefault(require("./order-edits"));
|
|
16
16
|
var products_1 = __importDefault(require("./products"));
|
|
17
|
+
var product_types_1 = __importDefault(require("../admin/product-types"));
|
|
17
18
|
var regions_1 = __importDefault(require("./regions"));
|
|
18
19
|
var return_reasons_1 = __importDefault(require("./return-reasons"));
|
|
19
20
|
var returns_1 = __importDefault(require("./returns"));
|
|
@@ -33,6 +34,7 @@ exports.default = (function (app, container, config) {
|
|
|
33
34
|
(0, collections_1.default)(route);
|
|
34
35
|
(0, customers_1.default)(route, container);
|
|
35
36
|
(0, products_1.default)(route);
|
|
37
|
+
(0, product_types_1.default)(route);
|
|
36
38
|
(0, orders_1.default)(route);
|
|
37
39
|
(0, order_edits_1.default)(route);
|
|
38
40
|
(0, carts_1.default)(route, container);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/api/routes/store/index.js"],"names":[],"mappings":";;;;;AAAA,8CAAuB;AACvB,mCAAgC;AAChC,kEAA2C;AAC3C,gDAA+B;AAC/B,kDAAgC;AAChC,8DAA4C;AAC5C,0DAAwC;AACxC,4DAAyC;AACzC,oDAAkC;AAClC,8DAA2C;AAC3C,wDAAsC;AACtC,sDAAoC;AACpC,oEAAiD;AACjD,sDAAoC;AACpC,wEAAqD;AACrD,kDAAgC;AAChC,wDAAsC;AAEtC,IAAM,KAAK,GAAG,IAAA,gBAAM,GAAE,CAAA;AAEtB,mBAAe,UAAC,GAAG,EAAE,SAAS,EAAE,MAAM;IACpC,GAAG,CAAC,GAAG,CAAC,QA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,GAAG,CAAA;AACZ,CAAC,EAAA"}
|
|
@@ -12,7 +12,7 @@ import { Request, Response } from "express";
|
|
|
12
12
|
* source: |
|
|
13
13
|
* import Medusa from "@medusajs/medusa-js"
|
|
14
14
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
15
|
-
* medusa.
|
|
15
|
+
* medusa.orderEdits.complete(order_edit_id)
|
|
16
16
|
* .then(({ order_edit }) => {
|
|
17
17
|
* console.log(order_edit.id)
|
|
18
18
|
* })
|
|
@@ -52,7 +52,7 @@ var medusa_core_utils_1 = require("medusa-core-utils");
|
|
|
52
52
|
* source: |
|
|
53
53
|
* import Medusa from "@medusajs/medusa-js"
|
|
54
54
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
55
|
-
* medusa.
|
|
55
|
+
* medusa.orderEdits.complete(order_edit_id)
|
|
56
56
|
* .then(({ order_edit }) => {
|
|
57
57
|
* console.log(order_edit.id)
|
|
58
58
|
* })
|
|
@@ -20,7 +20,7 @@ import { Request, Response } from "express";
|
|
|
20
20
|
* source: |
|
|
21
21
|
* import Medusa from "@medusajs/medusa-js"
|
|
22
22
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
23
|
-
* medusa.
|
|
23
|
+
* medusa.orderEdits.decline(order_edit_id)
|
|
24
24
|
* .then(({ order_edit }) => {
|
|
25
25
|
* console.log(order_edit.id);
|
|
26
26
|
* })
|
|
@@ -69,7 +69,7 @@ var order_edit_1 = require("../../../../types/order-edit");
|
|
|
69
69
|
* source: |
|
|
70
70
|
* import Medusa from "@medusajs/medusa-js"
|
|
71
71
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
72
|
-
* medusa.
|
|
72
|
+
* medusa.orderEdits.decline(order_edit_id)
|
|
73
73
|
* .then(({ order_edit }) => {
|
|
74
74
|
* console.log(order_edit.id);
|
|
75
75
|
* })
|
|
@@ -12,7 +12,7 @@ import { Request, Response } from "express";
|
|
|
12
12
|
* source: |
|
|
13
13
|
* import Medusa from "@medusajs/medusa-js"
|
|
14
14
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
15
|
-
* medusa.
|
|
15
|
+
* medusa.orderEdits.retrieve(order_edit_id)
|
|
16
16
|
* .then(({ order_edit }) => {
|
|
17
17
|
* console.log(order_edit.id);
|
|
18
18
|
* });
|
|
@@ -49,7 +49,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
49
49
|
* source: |
|
|
50
50
|
* import Medusa from "@medusajs/medusa-js"
|
|
51
51
|
* const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|
52
|
-
* medusa.
|
|
52
|
+
* medusa.orderEdits.retrieve(order_edit_id)
|
|
53
53
|
* .then(({ order_edit }) => {
|
|
54
54
|
* console.log(order_edit.id);
|
|
55
55
|
* });
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProductType } from "../../../..";
|
|
2
|
+
import { PaginatedResponse } from "../../../../types/common";
|
|
3
|
+
import "reflect-metadata";
|
|
4
|
+
declare const _default: (app: any) => any;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const allowedStoreProductTypeFields: string[];
|
|
7
|
+
export declare const defaultStoreProductTypeFields: string[];
|
|
8
|
+
export declare const defaultStoreProductTypeRelations: never[];
|
|
9
|
+
export declare type StoreProductTypesListRes = PaginatedResponse & {
|
|
10
|
+
product_types: ProductType[];
|
|
11
|
+
};
|
|
12
|
+
export declare type StoreProductTypesRes = {
|
|
13
|
+
product_type: ProductType;
|
|
14
|
+
};
|
|
15
|
+
export * from "./list-product-types";
|