Merge branch 'master' into develop
This commit is contained in:
commit
5efbee32b9
628 files changed
+16241
-6820
No files matched your search
@@ -41,14 +41,14 @@ jobs:
|
|||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
- name: Generate Services Reference
|
- name: Generate Services Reference
|
||||||
run: yarn generate:services
|
run: yarn generate:js-client
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4
|
uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
commit-message: 'chore(docs): Generated JS Client Reference (automated)'
|
commit-message: 'chore(docs): Generated JS Client Reference (automated)'
|
||||||
base: 'master'
|
base: 'master'
|
||||||
title: 'chore(docs): Updated API Reference'
|
title: 'chore(docs): Generated JS Client Reference'
|
||||||
labels: 'type: chore'
|
labels: 'type: chore'
|
||||||
add-paths: docs/content/references/js-client/**
|
add-paths: docs/content/references/js-client/**
|
||||||
branch: 'chore/generate-js-client'
|
branch: 'chore/generate-js-client'
|
||||||
|
|||||||
+891
-8
@@ -15,6 +15,89 @@ info:
|
|||||||
|
|
||||||
|
|
||||||
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
||||||
|
|
||||||
|
|
||||||
|
## Expanding Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find an `expand` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `expand` query parameter to unpack an
|
||||||
|
entity's relations and return them in the response.
|
||||||
|
|
||||||
|
|
||||||
|
For example, when you list customers you can also retrieve their groups by
|
||||||
|
passing to the `expand` query parameter the value `groups`.
|
||||||
|
|
||||||
|
|
||||||
|
You can expand more than one relation by separating the relations in the
|
||||||
|
`expand` query parameter with a comma. For example, to retrieve both the
|
||||||
|
orders and the groups of a customer, pass to the `expand` query parameter
|
||||||
|
the value `groups,orders`.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that the parameters you pass to `expand` replace any relations
|
||||||
|
that are expanded by default.
|
||||||
|
|
||||||
|
|
||||||
|
## Selecting Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find a `fields` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `fields` query parameter to specify which
|
||||||
|
fields in the entity should be returned in the response.
|
||||||
|
|
||||||
|
|
||||||
|
You can pass more than one field by seperating the field names in the
|
||||||
|
`fields` query parameter with a comma.
|
||||||
|
|
||||||
|
|
||||||
|
Only the fields you pass to `field` will be retrieved and returned in the
|
||||||
|
response. Any fields that are returned by default will not be returned in
|
||||||
|
this case. This does not affect relations.
|
||||||
|
|
||||||
|
|
||||||
|
For example, to only select the `title` and `description` fields of a
|
||||||
|
product, pass to the `fields` query parameter the value `title,description`.
|
||||||
|
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
|
||||||
|
|
||||||
|
### Query Parameters
|
||||||
|
|
||||||
|
|
||||||
|
In listing endpoints, such as list customers or list products, you can
|
||||||
|
control the pagination using the query parameters `limit` and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
`limit` is used to specify the maximum number of items that can be return in
|
||||||
|
the response. `offset` is used to specify how many items to skip before
|
||||||
|
returning the resulting entities.
|
||||||
|
|
||||||
|
|
||||||
|
You can use the `offset` query parameter to change between pages. For
|
||||||
|
example, if the limit is 50, at page 1 the offset should be 0; at page 2 the
|
||||||
|
offset should be 50, and so on.
|
||||||
|
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
|
||||||
|
In listing fields, aside from the entities retrieved, there are three
|
||||||
|
pagination-related fields returned: `count`, `limit`, and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
Similarly to the query parameters, `limit` is the maximum number of items
|
||||||
|
that can be returned in the response, and `field` is the number of items
|
||||||
|
that were skipped before the entities in the result.
|
||||||
|
|
||||||
|
|
||||||
|
`count` is the total number of available items of this entity. It can be
|
||||||
|
used to determine how many pages are there.
|
||||||
|
|
||||||
|
|
||||||
|
For example, if the `count` is 100 and the `limit` is 50, you can divide the
|
||||||
|
`count` by the `limit` to get the number of pages: `100/50 = 2 pages`.
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
||||||
@@ -2075,7 +2158,7 @@ paths:
|
|||||||
medusa.admin.customerGroups.list()
|
medusa.admin.customerGroups.list()
|
||||||
|
|
||||||
.then(({ customer_groups, limit, offset, count }) => {
|
.then(({ customer_groups, limit, offset, count }) => {
|
||||||
console.log(customer_groups.id);
|
console.log(customer_groups.length);
|
||||||
});
|
});
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
@@ -4338,10 +4421,10 @@ paths:
|
|||||||
format: email
|
format: email
|
||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: The Address to be used for shipping.
|
description: The Address to be used for shipping.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
items:
|
items:
|
||||||
description: The Line Items that have been received.
|
description: The Line Items that have been received.
|
||||||
type: array
|
type: array
|
||||||
@@ -5068,10 +5151,10 @@ paths:
|
|||||||
format: email
|
format: email
|
||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: The Address to be used for shipping.
|
description: The Address to be used for shipping.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
discounts:
|
discounts:
|
||||||
description: An array of Discount codes to add to the Draft Order.
|
description: An array of Discount codes to add to the Draft Order.
|
||||||
type: array
|
type: array
|
||||||
@@ -6490,6 +6573,689 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/items':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsEditLineItems
|
||||||
|
summary: Add an line item to an order (edit)
|
||||||
|
description: Create an OrderEdit LineItem.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-authenticated: true
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.addLineItem(order_edit_id, { variant_id,
|
||||||
|
quantity })
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/items' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
-d '{ "variant_id": "some_variant_id", "quantity": 3 }'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/cancel':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditCancel
|
||||||
|
summary: Cancel an OrderEdit
|
||||||
|
description: Cancels an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.cancel(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/:id/cancel' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/confirm':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditConfirm
|
||||||
|
summary: Confirms an OrderEdit
|
||||||
|
description: Confirms an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.confirm(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/:id/confirm' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
/order-edits:
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEdits
|
||||||
|
summary: Create an OrderEdit
|
||||||
|
description: Creates an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.create({ order_id, internal_note })
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
-d '{ "order_id": "my_order_id", "internal_note": "my_optional_note"
|
||||||
|
}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/items/{item_id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEditLineItemsLineItem
|
||||||
|
summary: Delete line items from an order edit and create change item
|
||||||
|
description: Delete line items from an order edit and create change item
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete from.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: item_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit item to delete from order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.removeLineItem(order_edit_id, line_item_id)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request DELETE
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsEditLineItemsLineItem
|
||||||
|
summary: Create or update the order edit change holding the line item changes
|
||||||
|
description: Create or update the order edit change holding the line item changes
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: item_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit item to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
-d '{ "quantity": 5 }'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/changes/{change_id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEditItemChange
|
||||||
|
summary: Delete an Order Edit Item Change
|
||||||
|
description: Deletes an Order Edit Item Change
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: change_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit Item Change to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.deleteItemChange(item_change_id,
|
||||||
|
order_edit_id)
|
||||||
|
.then(({ id, object, deleted }) => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request DELETE
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/changes/{change_id}'
|
||||||
|
\
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the deleted Order Edit Item Change.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
format: item_change
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
description: Whether or not the Order Edit Item Change was deleted.
|
||||||
|
default: true
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'/order-edits/{id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEdit
|
||||||
|
summary: Delete an Order Edit
|
||||||
|
description: Deletes an Order Edit
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.delete(edit_id)
|
||||||
|
.then(({ id, object, deleted }) => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request DELETE
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the deleted Order Edit.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
format: order_edit
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
description: Whether or not the Order Edit was deleted.
|
||||||
|
default: true
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
get:
|
||||||
|
operationId: GetOrderEditsOrderEdit
|
||||||
|
summary: Retrieve an OrderEdit
|
||||||
|
description: Retrieves a OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.retrieve(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request GET
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEdit
|
||||||
|
summary: Updates an OrderEdit
|
||||||
|
description: Updates a OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
const params = {internal_note: "internal reason XY"}
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.update(orderEditId, params)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
|
||||||
|
--data-raw '{
|
||||||
|
"internal_note": "internal reason XY"
|
||||||
|
}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/request':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditRequest
|
||||||
|
summary: Request order edit confirmation
|
||||||
|
description: Request customer confirmation of an Order Edit
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to request confirmation from.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.requestConfirmation(edit_id)
|
||||||
|
.then({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/request' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
'/orders/{id}/shipping-methods':
|
'/orders/{id}/shipping-methods':
|
||||||
post:
|
post:
|
||||||
operationId: PostOrdersOrderShippingMethods
|
operationId: PostOrdersOrderShippingMethods
|
||||||
@@ -8214,11 +8980,11 @@ paths:
|
|||||||
billing_address:
|
billing_address:
|
||||||
description: Billing address
|
description: Billing address
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: Shipping address
|
description: Shipping address
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
items:
|
items:
|
||||||
description: The Line Items for the order
|
description: The Line Items for the order
|
||||||
type: array
|
type: array
|
||||||
@@ -18496,6 +19262,60 @@ components:
|
|||||||
|
|
||||||
Where `{sid}` is the value of `connect.sid` that you copied.
|
Where `{sid}` is the value of `connect.sid` that you copied.
|
||||||
schemas:
|
schemas:
|
||||||
|
address_fields:
|
||||||
|
title: Address Fields
|
||||||
|
description: Address fields used when creating/updating an address.
|
||||||
|
x-resourceId: address
|
||||||
|
properties:
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
description: Company name
|
||||||
|
example: Acme
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
example: Arno
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
example: Willms
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
description: Address line 1
|
||||||
|
example: 14433 Kemmer Court
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
description: Address line 2
|
||||||
|
example: Suite 369
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
description: City
|
||||||
|
example: South Geoffreyview
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
description: The 2 character ISO code of the country in lower case
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||||
|
description: See a list of codes.
|
||||||
|
example: st
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
description: Province
|
||||||
|
example: Kentucky
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: Postal Code
|
||||||
|
example: 72093
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: Phone Number
|
||||||
|
example: 16128234334802
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: An optional key-value map with additional details
|
||||||
|
example:
|
||||||
|
car: white
|
||||||
address:
|
address:
|
||||||
title: Address
|
title: Address
|
||||||
description: An address.
|
description: An address.
|
||||||
@@ -20630,6 +21450,17 @@ components:
|
|||||||
includes_tax:
|
includes_tax:
|
||||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
original_item_id:
|
||||||
|
description: '[EXPERIMENTAL] The id of the original line item'
|
||||||
|
type: string
|
||||||
|
order_edit_id:
|
||||||
|
description: >-
|
||||||
|
[EXPERIMENTAL] The ID of the order edit to which a cloned item
|
||||||
|
belongs
|
||||||
|
type: string
|
||||||
|
order_edit:
|
||||||
|
description: '[EXPERIMENTAL] The order edit joined'
|
||||||
|
type: object
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
@@ -21035,12 +21866,24 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
subtotal:
|
subtotal:
|
||||||
type: integer
|
type: integer
|
||||||
description: The subtotal for line items computed from changes.
|
description: The total of subtotal
|
||||||
example: 8000
|
example: 8000
|
||||||
discount_total:
|
discount_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of discount
|
description: The total of discount
|
||||||
example: 800
|
example: 800
|
||||||
|
shipping_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the shipping amount
|
||||||
|
example: 800
|
||||||
|
gift_card_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card amount
|
||||||
|
example: 800
|
||||||
|
gift_card_tax_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card tax amount
|
||||||
|
example: 800
|
||||||
tax_total:
|
tax_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of tax
|
description: The total of tax
|
||||||
@@ -22099,6 +22942,46 @@ components:
|
|||||||
description: An optional key-value map with additional details
|
description: An optional key-value map with additional details
|
||||||
example:
|
example:
|
||||||
car: white
|
car: white
|
||||||
|
product_variant_prices_fields:
|
||||||
|
title: Product Variant Prices Fields
|
||||||
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
|
x-resourceId: product_variant_prices_fields
|
||||||
|
properties:
|
||||||
|
original_price:
|
||||||
|
type: number
|
||||||
|
description: >-
|
||||||
|
The original price of the variant without any discounted prices
|
||||||
|
applied.
|
||||||
|
calculated_price:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant. Can be a discounted price.
|
||||||
|
original_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant including taxes.
|
||||||
|
calculated_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant including taxes.
|
||||||
|
original_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the original price.
|
||||||
|
calculated_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the calculated price.
|
||||||
|
tax_rates:
|
||||||
|
type: array
|
||||||
|
description: An array of applied tax rates
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The tax rate value
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the tax rate
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code of the tax rate
|
||||||
product:
|
product:
|
||||||
title: Product
|
title: Product
|
||||||
description: >-
|
description: >-
|
||||||
|
|||||||
+891
-8
@@ -15,6 +15,89 @@ info:
|
|||||||
|
|
||||||
|
|
||||||
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
||||||
|
|
||||||
|
|
||||||
|
## Expanding Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find an `expand` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `expand` query parameter to unpack an
|
||||||
|
entity's relations and return them in the response.
|
||||||
|
|
||||||
|
|
||||||
|
For example, when you list customers you can also retrieve their groups by
|
||||||
|
passing to the `expand` query parameter the value `groups`.
|
||||||
|
|
||||||
|
|
||||||
|
You can expand more than one relation by separating the relations in the
|
||||||
|
`expand` query parameter with a comma. For example, to retrieve both the
|
||||||
|
orders and the groups of a customer, pass to the `expand` query parameter
|
||||||
|
the value `groups,orders`.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that the parameters you pass to `expand` replace any relations
|
||||||
|
that are expanded by default.
|
||||||
|
|
||||||
|
|
||||||
|
## Selecting Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find a `fields` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `fields` query parameter to specify which
|
||||||
|
fields in the entity should be returned in the response.
|
||||||
|
|
||||||
|
|
||||||
|
You can pass more than one field by seperating the field names in the
|
||||||
|
`fields` query parameter with a comma.
|
||||||
|
|
||||||
|
|
||||||
|
Only the fields you pass to `field` will be retrieved and returned in the
|
||||||
|
response. Any fields that are returned by default will not be returned in
|
||||||
|
this case. This does not affect relations.
|
||||||
|
|
||||||
|
|
||||||
|
For example, to only select the `title` and `description` fields of a
|
||||||
|
product, pass to the `fields` query parameter the value `title,description`.
|
||||||
|
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
|
||||||
|
|
||||||
|
### Query Parameters
|
||||||
|
|
||||||
|
|
||||||
|
In listing endpoints, such as list customers or list products, you can
|
||||||
|
control the pagination using the query parameters `limit` and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
`limit` is used to specify the maximum number of items that can be return in
|
||||||
|
the response. `offset` is used to specify how many items to skip before
|
||||||
|
returning the resulting entities.
|
||||||
|
|
||||||
|
|
||||||
|
You can use the `offset` query parameter to change between pages. For
|
||||||
|
example, if the limit is 50, at page 1 the offset should be 0; at page 2 the
|
||||||
|
offset should be 50, and so on.
|
||||||
|
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
|
||||||
|
In listing fields, aside from the entities retrieved, there are three
|
||||||
|
pagination-related fields returned: `count`, `limit`, and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
Similarly to the query parameters, `limit` is the maximum number of items
|
||||||
|
that can be returned in the response, and `field` is the number of items
|
||||||
|
that were skipped before the entities in the result.
|
||||||
|
|
||||||
|
|
||||||
|
`count` is the total number of available items of this entity. It can be
|
||||||
|
used to determine how many pages are there.
|
||||||
|
|
||||||
|
|
||||||
|
For example, if the `count` is 100 and the `limit` is 50, you can divide the
|
||||||
|
`count` by the `limit` to get the number of pages: `100/50 = 2 pages`.
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
||||||
@@ -2075,7 +2158,7 @@ paths:
|
|||||||
medusa.admin.customerGroups.list()
|
medusa.admin.customerGroups.list()
|
||||||
|
|
||||||
.then(({ customer_groups, limit, offset, count }) => {
|
.then(({ customer_groups, limit, offset, count }) => {
|
||||||
console.log(customer_groups.id);
|
console.log(customer_groups.length);
|
||||||
});
|
});
|
||||||
- lang: Shell
|
- lang: Shell
|
||||||
label: cURL
|
label: cURL
|
||||||
@@ -4338,10 +4421,10 @@ paths:
|
|||||||
format: email
|
format: email
|
||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: The Address to be used for shipping.
|
description: The Address to be used for shipping.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
items:
|
items:
|
||||||
description: The Line Items that have been received.
|
description: The Line Items that have been received.
|
||||||
type: array
|
type: array
|
||||||
@@ -5068,10 +5151,10 @@ paths:
|
|||||||
format: email
|
format: email
|
||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: The Address to be used for shipping.
|
description: The Address to be used for shipping.
|
||||||
$ref: '#/components/schemas/address'
|
$ref: '#/components/schemas/address_fields'
|
||||||
discounts:
|
discounts:
|
||||||
description: An array of Discount codes to add to the Draft Order.
|
description: An array of Discount codes to add to the Draft Order.
|
||||||
type: array
|
type: array
|
||||||
@@ -6490,6 +6573,689 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/items':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsEditLineItems
|
||||||
|
summary: Add an line item to an order (edit)
|
||||||
|
description: Create an OrderEdit LineItem.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-authenticated: true
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.addLineItem(order_edit_id, { variant_id,
|
||||||
|
quantity })
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/items' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
-d '{ "variant_id": "some_variant_id", "quantity": 3 }'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/cancel':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditCancel
|
||||||
|
summary: Cancel an OrderEdit
|
||||||
|
description: Cancels an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.cancel(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/:id/cancel' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/confirm':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditConfirm
|
||||||
|
summary: Confirms an OrderEdit
|
||||||
|
description: Confirms an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.confirm(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/:id/confirm' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
/order-edits:
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEdits
|
||||||
|
summary: Create an OrderEdit
|
||||||
|
description: Creates an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.create({ order_id, internal_note })
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
-d '{ "order_id": "my_order_id", "internal_note": "my_optional_note"
|
||||||
|
}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/items/{item_id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEditLineItemsLineItem
|
||||||
|
summary: Delete line items from an order edit and create change item
|
||||||
|
description: Delete line items from an order edit and create change item
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete from.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: item_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit item to delete from order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.removeLineItem(order_edit_id, line_item_id)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request DELETE
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsEditLineItemsLineItem
|
||||||
|
summary: Create or update the order edit change holding the line item changes
|
||||||
|
description: Create or update the order edit change holding the line item changes
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: item_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit item to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
-d '{ "quantity": 5 }'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/changes/{change_id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEditItemChange
|
||||||
|
summary: Delete an Order Edit Item Change
|
||||||
|
description: Deletes an Order Edit Item Change
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: change_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit Item Change to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.deleteItemChange(item_change_id,
|
||||||
|
order_edit_id)
|
||||||
|
.then(({ id, object, deleted }) => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request DELETE
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/changes/{change_id}'
|
||||||
|
\
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the deleted Order Edit Item Change.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
format: item_change
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
description: Whether or not the Order Edit Item Change was deleted.
|
||||||
|
default: true
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'/order-edits/{id}':
|
||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEdit
|
||||||
|
summary: Delete an Order Edit
|
||||||
|
description: Deletes an Order Edit
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.delete(edit_id)
|
||||||
|
.then(({ id, object, deleted }) => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request DELETE
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the deleted Order Edit.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
format: order_edit
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
description: Whether or not the Order Edit was deleted.
|
||||||
|
default: true
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
get:
|
||||||
|
operationId: GetOrderEditsOrderEdit
|
||||||
|
summary: Retrieve an OrderEdit
|
||||||
|
description: Retrieves a OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.retrieve(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request GET
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEdit
|
||||||
|
summary: Updates an OrderEdit
|
||||||
|
description: Updates a OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
const params = {internal_note: "internal reason XY"}
|
||||||
|
|
||||||
|
medusa.admin.orderEdit.update(orderEditId, params)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
|
||||||
|
--data-raw '{
|
||||||
|
"internal_note": "internal reason XY"
|
||||||
|
}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/request':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditRequest
|
||||||
|
summary: Request order edit confirmation
|
||||||
|
description: Request customer confirmation of an Order Edit
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to request confirmation from.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
|
||||||
|
medusa.admin.orderEdits.requestConfirmation(edit_id)
|
||||||
|
.then({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/admin/order-edits/{id}/request' \
|
||||||
|
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
'/orders/{id}/shipping-methods':
|
'/orders/{id}/shipping-methods':
|
||||||
post:
|
post:
|
||||||
operationId: PostOrdersOrderShippingMethods
|
operationId: PostOrdersOrderShippingMethods
|
||||||
@@ -8214,11 +8980,11 @@ paths:
|
|||||||
billing_address:
|
billing_address:
|
||||||
description: Billing address
|
description: Billing address
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: Shipping address
|
description: Shipping address
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
items:
|
items:
|
||||||
description: The Line Items for the order
|
description: The Line Items for the order
|
||||||
type: array
|
type: array
|
||||||
@@ -18496,6 +19262,60 @@ components:
|
|||||||
|
|
||||||
Where `{sid}` is the value of `connect.sid` that you copied.
|
Where `{sid}` is the value of `connect.sid` that you copied.
|
||||||
schemas:
|
schemas:
|
||||||
|
address_fields:
|
||||||
|
title: Address Fields
|
||||||
|
description: Address fields used when creating/updating an address.
|
||||||
|
x-resourceId: address
|
||||||
|
properties:
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
description: Company name
|
||||||
|
example: Acme
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
example: Arno
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
example: Willms
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
description: Address line 1
|
||||||
|
example: 14433 Kemmer Court
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
description: Address line 2
|
||||||
|
example: Suite 369
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
description: City
|
||||||
|
example: South Geoffreyview
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
description: The 2 character ISO code of the country in lower case
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||||
|
description: See a list of codes.
|
||||||
|
example: st
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
description: Province
|
||||||
|
example: Kentucky
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: Postal Code
|
||||||
|
example: 72093
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: Phone Number
|
||||||
|
example: 16128234334802
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: An optional key-value map with additional details
|
||||||
|
example:
|
||||||
|
car: white
|
||||||
address:
|
address:
|
||||||
title: Address
|
title: Address
|
||||||
description: An address.
|
description: An address.
|
||||||
@@ -20630,6 +21450,17 @@ components:
|
|||||||
includes_tax:
|
includes_tax:
|
||||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
original_item_id:
|
||||||
|
description: '[EXPERIMENTAL] The id of the original line item'
|
||||||
|
type: string
|
||||||
|
order_edit_id:
|
||||||
|
description: >-
|
||||||
|
[EXPERIMENTAL] The ID of the order edit to which a cloned item
|
||||||
|
belongs
|
||||||
|
type: string
|
||||||
|
order_edit:
|
||||||
|
description: '[EXPERIMENTAL] The order edit joined'
|
||||||
|
type: object
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
@@ -21035,12 +21866,24 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
subtotal:
|
subtotal:
|
||||||
type: integer
|
type: integer
|
||||||
description: The subtotal for line items computed from changes.
|
description: The total of subtotal
|
||||||
example: 8000
|
example: 8000
|
||||||
discount_total:
|
discount_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of discount
|
description: The total of discount
|
||||||
example: 800
|
example: 800
|
||||||
|
shipping_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the shipping amount
|
||||||
|
example: 800
|
||||||
|
gift_card_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card amount
|
||||||
|
example: 800
|
||||||
|
gift_card_tax_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card tax amount
|
||||||
|
example: 800
|
||||||
tax_total:
|
tax_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of tax
|
description: The total of tax
|
||||||
@@ -22099,6 +22942,46 @@ components:
|
|||||||
description: An optional key-value map with additional details
|
description: An optional key-value map with additional details
|
||||||
example:
|
example:
|
||||||
car: white
|
car: white
|
||||||
|
product_variant_prices_fields:
|
||||||
|
title: Product Variant Prices Fields
|
||||||
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
|
x-resourceId: product_variant_prices_fields
|
||||||
|
properties:
|
||||||
|
original_price:
|
||||||
|
type: number
|
||||||
|
description: >-
|
||||||
|
The original price of the variant without any discounted prices
|
||||||
|
applied.
|
||||||
|
calculated_price:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant. Can be a discounted price.
|
||||||
|
original_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant including taxes.
|
||||||
|
calculated_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant including taxes.
|
||||||
|
original_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the original price.
|
||||||
|
calculated_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the calculated price.
|
||||||
|
tax_rates:
|
||||||
|
type: array
|
||||||
|
description: An array of applied tax rates
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The tax rate value
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the tax rate
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code of the tax rate
|
||||||
product:
|
product:
|
||||||
title: Product
|
title: Product
|
||||||
description: >-
|
description: >-
|
||||||
|
|||||||
@@ -3,5 +3,5 @@ const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
|||||||
// must be previously logged in or use api token
|
// must be previously logged in or use api token
|
||||||
medusa.admin.customerGroups.list()
|
medusa.admin.customerGroups.list()
|
||||||
.then(({ customer_groups, limit, offset, count }) => {
|
.then(({ customer_groups, limit, offset, count }) => {
|
||||||
console.log(customer_groups.id);
|
console.log(customer_groups.length);
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdit.create({ order_id, internal_note })
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdits.delete(edit_id)
|
||||||
|
.then(({ id, object, deleted }) => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdit.retrieve(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
const params = {internal_note: "internal reason XY"}
|
||||||
|
medusa.admin.orderEdit.update(orderEditId, params)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdit.cancel(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdits.deleteItemChange(item_change_id, order_edit_id)
|
||||||
|
.then(({ id, object, deleted }) => {
|
||||||
|
console.log(id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdit.confirm(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdit.addLineItem(order_edit_id, { variant_id, quantity })
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdits.removeLineItem(order_edit_id, line_item_id)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdits.updateLineItem(order_edit_id, line_item_id)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
// must be previously logged in or use api token
|
||||||
|
medusa.admin.orderEdits.requestConfirmation(edit_id)
|
||||||
|
.then({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
-d '{ "order_id": "my_order_id", "internal_note": "my_optional_note" }'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request DELETE 'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request GET 'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data-raw '{
|
||||||
|
"internal_note": "internal reason XY"
|
||||||
|
}'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits/:id/cancel' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request DELETE 'https://medusa-url.com/admin/order-edits/{id}/changes/{change_id}' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits/:id/confirm' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}/items' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
-d '{ "variant_id": "some_variant_id", "quantity": 3 }'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request DELETE 'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}/items/{item_id}' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
-d '{ "quantity": 5 }'
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/admin/order-edits/{id}/request' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
title: Address Fields
|
||||||
|
description: Address fields used when creating/updating an address.
|
||||||
|
x-resourceId: address
|
||||||
|
properties:
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
description: Company name
|
||||||
|
example: Acme
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
example: Arno
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
example: Willms
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
description: Address line 1
|
||||||
|
example: 14433 Kemmer Court
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
description: Address line 2
|
||||||
|
example: Suite 369
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
description: City
|
||||||
|
example: South Geoffreyview
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
description: The 2 character ISO code of the country in lower case
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||||
|
description: See a list of codes.
|
||||||
|
example: st
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
description: Province
|
||||||
|
example: Kentucky
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: Postal Code
|
||||||
|
example: 72093
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: Phone Number
|
||||||
|
example: 16128234334802
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: An optional key-value map with additional details
|
||||||
|
example:
|
||||||
|
car: white
|
||||||
@@ -160,6 +160,15 @@ properties:
|
|||||||
includes_tax:
|
includes_tax:
|
||||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
original_item_id:
|
||||||
|
description: '[EXPERIMENTAL] The id of the original line item'
|
||||||
|
type: string
|
||||||
|
order_edit_id:
|
||||||
|
description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs'
|
||||||
|
type: string
|
||||||
|
order_edit:
|
||||||
|
description: '[EXPERIMENTAL] The order edit joined'
|
||||||
|
type: object
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
|
|||||||
@@ -60,12 +60,24 @@ properties:
|
|||||||
type: string
|
type: string
|
||||||
subtotal:
|
subtotal:
|
||||||
type: integer
|
type: integer
|
||||||
description: The subtotal for line items computed from changes.
|
description: The total of subtotal
|
||||||
example: 8000
|
example: 8000
|
||||||
discount_total:
|
discount_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of discount
|
description: The total of discount
|
||||||
example: 800
|
example: 800
|
||||||
|
shipping_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the shipping amount
|
||||||
|
example: 800
|
||||||
|
gift_card_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card amount
|
||||||
|
example: 800
|
||||||
|
gift_card_tax_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card tax amount
|
||||||
|
example: 800
|
||||||
tax_total:
|
tax_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of tax
|
description: The total of tax
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
title: Product Variant Prices Fields
|
||||||
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
|
x-resourceId: product_variant_prices_fields
|
||||||
|
properties:
|
||||||
|
original_price:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant without any discounted prices applied.
|
||||||
|
calculated_price:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant. Can be a discounted price.
|
||||||
|
original_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant including taxes.
|
||||||
|
calculated_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant including taxes.
|
||||||
|
original_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the original price.
|
||||||
|
calculated_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the calculated price.
|
||||||
|
tax_rates:
|
||||||
|
type: array
|
||||||
|
description: An array of applied tax rates
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The tax rate value
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the tax rate
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code of the tax rate
|
||||||
@@ -15,6 +15,89 @@ info:
|
|||||||
|
|
||||||
|
|
||||||
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
||||||
|
|
||||||
|
|
||||||
|
## Expanding Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find an `expand` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `expand` query parameter to unpack an
|
||||||
|
entity's relations and return them in the response.
|
||||||
|
|
||||||
|
|
||||||
|
For example, when you list customers you can also retrieve their groups by
|
||||||
|
passing to the `expand` query parameter the value `groups`.
|
||||||
|
|
||||||
|
|
||||||
|
You can expand more than one relation by separating the relations in the
|
||||||
|
`expand` query parameter with a comma. For example, to retrieve both the
|
||||||
|
orders and the groups of a customer, pass to the `expand` query parameter
|
||||||
|
the value `groups,orders`.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that the parameters you pass to `expand` replace any relations
|
||||||
|
that are expanded by default.
|
||||||
|
|
||||||
|
|
||||||
|
## Selecting Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find a `fields` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `fields` query parameter to specify which
|
||||||
|
fields in the entity should be returned in the response.
|
||||||
|
|
||||||
|
|
||||||
|
You can pass more than one field by seperating the field names in the
|
||||||
|
`fields` query parameter with a comma.
|
||||||
|
|
||||||
|
|
||||||
|
Only the fields you pass to `field` will be retrieved and returned in the
|
||||||
|
response. Any fields that are returned by default will not be returned in
|
||||||
|
this case. This does not affect relations.
|
||||||
|
|
||||||
|
|
||||||
|
For example, to only select the `title` and `description` fields of a
|
||||||
|
product, pass to the `fields` query parameter the value `title,description`.
|
||||||
|
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
|
||||||
|
|
||||||
|
### Query Parameters
|
||||||
|
|
||||||
|
|
||||||
|
In listing endpoints, such as list customers or list products, you can
|
||||||
|
control the pagination using the query parameters `limit` and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
`limit` is used to specify the maximum number of items that can be return in
|
||||||
|
the response. `offset` is used to specify how many items to skip before
|
||||||
|
returning the resulting entities.
|
||||||
|
|
||||||
|
|
||||||
|
You can use the `offset` query parameter to change between pages. For
|
||||||
|
example, if the limit is 50, at page 1 the offset should be 0; at page 2 the
|
||||||
|
offset should be 50, and so on.
|
||||||
|
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
|
||||||
|
In listing fields, aside from the entities retrieved, there are three
|
||||||
|
pagination-related fields returned: `count`, `limit`, and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
Similarly to the query parameters, `limit` is the maximum number of items
|
||||||
|
that can be returned in the response, and `field` is the number of items
|
||||||
|
that were skipped before the entities in the result.
|
||||||
|
|
||||||
|
|
||||||
|
`count` is the total number of available items of this entity. It can be
|
||||||
|
used to determine how many pages are there.
|
||||||
|
|
||||||
|
|
||||||
|
For example, if the `count` is 100 and the `limit` is 50, you can divide the
|
||||||
|
`count` by the `limit` to get the number of pages: `100/50 = 2 pages`.
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: https://github.com/medusajs/medusa/blob/master/LICENSE
|
url: https://github.com/medusajs/medusa/blob/master/LICENSE
|
||||||
@@ -203,6 +286,22 @@ paths:
|
|||||||
$ref: paths/notifications.yaml
|
$ref: paths/notifications.yaml
|
||||||
/notifications/{id}/resend:
|
/notifications/{id}/resend:
|
||||||
$ref: paths/notifications_{id}_resend.yaml
|
$ref: paths/notifications_{id}_resend.yaml
|
||||||
|
/order-edits/{id}/items:
|
||||||
|
$ref: paths/order-edits_{id}_items.yaml
|
||||||
|
/order-edits/{id}/cancel:
|
||||||
|
$ref: paths/order-edits_{id}_cancel.yaml
|
||||||
|
/order-edits/{id}/confirm:
|
||||||
|
$ref: paths/order-edits_{id}_confirm.yaml
|
||||||
|
/order-edits:
|
||||||
|
$ref: paths/order-edits.yaml
|
||||||
|
/order-edits/{id}/items/{item_id}:
|
||||||
|
$ref: paths/order-edits_{id}_items_{item_id}.yaml
|
||||||
|
/order-edits/{id}/changes/{change_id}:
|
||||||
|
$ref: paths/order-edits_{id}_changes_{change_id}.yaml
|
||||||
|
/order-edits/{id}:
|
||||||
|
$ref: paths/order-edits_{id}.yaml
|
||||||
|
/order-edits/{id}/request:
|
||||||
|
$ref: paths/order-edits_{id}_request.yaml
|
||||||
/orders/{id}/shipping-methods:
|
/orders/{id}/shipping-methods:
|
||||||
$ref: paths/orders_{id}_shipping-methods.yaml
|
$ref: paths/orders_{id}_shipping-methods.yaml
|
||||||
/orders/{id}/archive:
|
/orders/{id}/archive:
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ post:
|
|||||||
format: email
|
format: email
|
||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
$ref: ../components/schemas/address.yaml
|
$ref: ../components/schemas/address_fields.yaml
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: The Address to be used for shipping.
|
description: The Address to be used for shipping.
|
||||||
$ref: ../components/schemas/address.yaml
|
$ref: ../components/schemas/address_fields.yaml
|
||||||
discounts:
|
discounts:
|
||||||
description: An array of Discount codes to add to the Draft Order.
|
description: An array of Discount codes to add to the Draft Order.
|
||||||
type: array
|
type: array
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ post:
|
|||||||
format: email
|
format: email
|
||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
$ref: ../components/schemas/address.yaml
|
$ref: ../components/schemas/address_fields.yaml
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: The Address to be used for shipping.
|
description: The Address to be used for shipping.
|
||||||
$ref: ../components/schemas/address.yaml
|
$ref: ../components/schemas/address_fields.yaml
|
||||||
items:
|
items:
|
||||||
description: The Line Items that have been received.
|
description: The Line Items that have been received.
|
||||||
type: array
|
type: array
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEdits
|
||||||
|
summary: Create an OrderEdit
|
||||||
|
description: Creates an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEdit
|
||||||
|
summary: Delete an Order Edit
|
||||||
|
description: Deletes an Order Edit
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}/deleteundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}/deleteundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the deleted Order Edit.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
format: order_edit
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
description: Whether or not the Order Edit was deleted.
|
||||||
|
default: true
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
get:
|
||||||
|
operationId: GetOrderEditsOrderEdit
|
||||||
|
summary: Retrieve an OrderEdit
|
||||||
|
description: Retrieves a OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}/getundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}/getundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEdit
|
||||||
|
summary: Updates an OrderEdit
|
||||||
|
description: Updates a OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditCancel
|
||||||
|
summary: Cancel an OrderEdit
|
||||||
|
description: Cancels an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}_cancel/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_cancel/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEditItemChange
|
||||||
|
summary: Delete an Order Edit Item Change
|
||||||
|
description: Deletes an Order Edit Item Change
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: change_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit Item Change to delete.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: >-
|
||||||
|
../code_samples/JavaScript/order-edits_{id}_changes_{change_id}/deleteundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: >-
|
||||||
|
../code_samples/Shell/order-edits_{id}_changes_{change_id}/deleteundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
id:
|
||||||
|
type: string
|
||||||
|
description: The ID of the deleted Order Edit Item Change.
|
||||||
|
object:
|
||||||
|
type: string
|
||||||
|
description: The type of the object that was deleted.
|
||||||
|
format: item_change
|
||||||
|
deleted:
|
||||||
|
type: boolean
|
||||||
|
description: Whether or not the Order Edit Item Change was deleted.
|
||||||
|
default: true
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditConfirm
|
||||||
|
summary: Confirms an OrderEdit
|
||||||
|
description: Confirms an OrderEdit.
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}_confirm/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_confirm/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEditsEditLineItems
|
||||||
|
summary: Add an line item to an order (edit)
|
||||||
|
description: Create an OrderEdit LineItem.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-authenticated: true
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}_items/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_items/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,108 @@
|
|||||||
|
delete:
|
||||||
|
operationId: DeleteOrderEditsOrderEditLineItemsLineItem
|
||||||
|
summary: Delete line items from an order edit and create change item
|
||||||
|
description: Delete line items from an order edit and create change item
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to delete from.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: item_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit item to delete from order.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: >-
|
||||||
|
../code_samples/JavaScript/order-edits_{id}_items_{item_id}/deleteundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_items_{item_id}/deleteundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsEditLineItemsLineItem
|
||||||
|
summary: Create or update the order edit change holding the line item changes
|
||||||
|
description: Create or update the order edit change holding the line item changes
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
- in: path
|
||||||
|
name: item_id
|
||||||
|
required: true
|
||||||
|
description: The ID of the order edit item to update.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: >-
|
||||||
|
../code_samples/JavaScript/order-edits_{id}_items_{item_id}/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_items_{item_id}/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditRequest
|
||||||
|
summary: Request order edit confirmation
|
||||||
|
description: Request customer confirmation of an Order Edit
|
||||||
|
x-authenticated: true
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit to request confirmation from.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}_request/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_request/postundefined
|
||||||
|
security:
|
||||||
|
- api_token: []
|
||||||
|
- cookie_auth: []
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -68,11 +68,11 @@ post:
|
|||||||
billing_address:
|
billing_address:
|
||||||
description: Billing address
|
description: Billing address
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: ../components/schemas/address.yaml
|
- $ref: ../components/schemas/address_fields.yaml
|
||||||
shipping_address:
|
shipping_address:
|
||||||
description: Shipping address
|
description: Shipping address
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: ../components/schemas/address.yaml
|
- $ref: ../components/schemas/address_fields.yaml
|
||||||
items:
|
items:
|
||||||
description: The Line Items for the order
|
description: The Line Items for the order
|
||||||
type: array
|
type: array
|
||||||
|
|||||||
+401
-9
@@ -15,6 +15,89 @@ info:
|
|||||||
|
|
||||||
|
|
||||||
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
||||||
|
|
||||||
|
|
||||||
|
## Expanding Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find an `expand` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `expand` query parameter to unpack an
|
||||||
|
entity's relations and return them in the response.
|
||||||
|
|
||||||
|
|
||||||
|
For example, when you list customers you can also retrieve their groups by
|
||||||
|
passing to the `expand` query parameter the value `groups`.
|
||||||
|
|
||||||
|
|
||||||
|
You can expand more than one relation by separating the relations in the
|
||||||
|
`expand` query parameter with a comma. For example, to retrieve both the
|
||||||
|
orders and the groups of a customer, pass to the `expand` query parameter
|
||||||
|
the value `groups,orders`.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that the parameters you pass to `expand` replace any relations
|
||||||
|
that are expanded by default.
|
||||||
|
|
||||||
|
|
||||||
|
## Selecting Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find a `fields` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `fields` query parameter to specify which
|
||||||
|
fields in the entity should be returned in the response.
|
||||||
|
|
||||||
|
|
||||||
|
You can pass more than one field by seperating the field names in the
|
||||||
|
`fields` query parameter with a comma.
|
||||||
|
|
||||||
|
|
||||||
|
Only the fields you pass to `field` will be retrieved and returned in the
|
||||||
|
response. Any fields that are returned by default will not be returned in
|
||||||
|
this case. This does not affect relations.
|
||||||
|
|
||||||
|
|
||||||
|
For example, to only select the `title` and `description` fields of a
|
||||||
|
product, pass to the `fields` query parameter the value `title,description`.
|
||||||
|
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
|
||||||
|
|
||||||
|
### Query Parameters
|
||||||
|
|
||||||
|
|
||||||
|
In listing endpoints, such as list customers or list products, you can
|
||||||
|
control the pagination using the query parameters `limit` and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
`limit` is used to specify the maximum number of items that can be return in
|
||||||
|
the response. `offset` is used to specify how many items to skip before
|
||||||
|
returning the resulting entities.
|
||||||
|
|
||||||
|
|
||||||
|
You can use the `offset` query parameter to change between pages. For
|
||||||
|
example, if the limit is 50, at page 1 the offset should be 0; at page 2 the
|
||||||
|
offset should be 50, and so on.
|
||||||
|
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
|
||||||
|
In listing fields, aside from the entities retrieved, there are three
|
||||||
|
pagination-related fields returned: `count`, `limit`, and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
Similarly to the query parameters, `limit` is the maximum number of items
|
||||||
|
that can be returned in the response, and `field` is the number of items
|
||||||
|
that were skipped before the entities in the result.
|
||||||
|
|
||||||
|
|
||||||
|
`count` is the total number of available items of this entity. It can be
|
||||||
|
used to determine how many pages are there.
|
||||||
|
|
||||||
|
|
||||||
|
For example, if the `count` is 100 and the `limit` is 50, you can divide the
|
||||||
|
`count` by the `limit` to get the number of pages: `100/50 = 2 pages`.
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
||||||
@@ -1542,8 +1625,16 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
address:
|
address:
|
||||||
description: The Address to add to the Customer.
|
description: The Address to add to the Customer.
|
||||||
anyOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
|
- type: object
|
||||||
|
required:
|
||||||
|
- first_name
|
||||||
|
- last_name
|
||||||
|
- address_1
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- postal_code
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS Client
|
label: JS Client
|
||||||
@@ -1802,7 +1893,7 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS Client
|
label: JS Client
|
||||||
@@ -1934,7 +2025,7 @@ paths:
|
|||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
description: The full billing address object
|
description: The full billing address object
|
||||||
- type: string
|
- type: string
|
||||||
description: The ID of an existing billing address
|
description: The ID of an existing billing address
|
||||||
@@ -2505,6 +2596,166 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/complete':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditComplete
|
||||||
|
summary: Completes an OrderEdit
|
||||||
|
description: Completes an OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
medusa.orderEdit.complete(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/store/order-edits/{id}/complete'
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/decline':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditDecline
|
||||||
|
summary: Decline an OrderEdit
|
||||||
|
description: Declines an OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
declined_reason:
|
||||||
|
type: string
|
||||||
|
description: The reason for declining the OrderEdit.
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
medusa.orderEdit.decline(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id);
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/store/order-edits/{id}/decline'
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}':
|
||||||
|
get:
|
||||||
|
operationId: GetOrderEditsOrderEdit
|
||||||
|
summary: Retrieve an OrderEdit
|
||||||
|
description: Retrieves a OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
medusa.orderEdit.retrieve(orderEditId)
|
||||||
|
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id);
|
||||||
|
});
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request GET
|
||||||
|
'https://medusa-url.com/store/order-edits/{id}'
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
'/orders/cart/{cart_id}':
|
'/orders/cart/{cart_id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetOrdersOrderCartId
|
operationId: GetOrdersOrderCartId
|
||||||
@@ -2751,7 +3002,17 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
product:
|
product:
|
||||||
$ref: '#/components/schemas/product'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
variants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: >-
|
||||||
|
#/components/schemas/product_variant_prices_fields
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
'404':
|
'404':
|
||||||
@@ -2930,7 +3191,17 @@ paths:
|
|||||||
products:
|
products:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
variants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: >-
|
||||||
|
#/components/schemas/product_variant_prices_fields
|
||||||
count:
|
count:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total number of items available
|
description: The total number of items available
|
||||||
@@ -3732,7 +4003,9 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
variant:
|
variant:
|
||||||
$ref: '#/components/schemas/product_variant'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: '#/components/schemas/product_variant_prices_fields'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
'404':
|
'404':
|
||||||
@@ -3828,7 +4101,9 @@ paths:
|
|||||||
variants:
|
variants:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product_variant'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: '#/components/schemas/product_variant_prices_fields'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
'404':
|
'404':
|
||||||
@@ -4040,6 +4315,60 @@ components:
|
|||||||
|
|
||||||
Where `{sid}` is the value of `connect.sid` that you copied.
|
Where `{sid}` is the value of `connect.sid` that you copied.
|
||||||
schemas:
|
schemas:
|
||||||
|
address_fields:
|
||||||
|
title: Address Fields
|
||||||
|
description: Address fields used when creating/updating an address.
|
||||||
|
x-resourceId: address
|
||||||
|
properties:
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
description: Company name
|
||||||
|
example: Acme
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
example: Arno
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
example: Willms
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
description: Address line 1
|
||||||
|
example: 14433 Kemmer Court
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
description: Address line 2
|
||||||
|
example: Suite 369
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
description: City
|
||||||
|
example: South Geoffreyview
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
description: The 2 character ISO code of the country in lower case
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||||
|
description: See a list of codes.
|
||||||
|
example: st
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
description: Province
|
||||||
|
example: Kentucky
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: Postal Code
|
||||||
|
example: 72093
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: Phone Number
|
||||||
|
example: 16128234334802
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: An optional key-value map with additional details
|
||||||
|
example:
|
||||||
|
car: white
|
||||||
address:
|
address:
|
||||||
title: Address
|
title: Address
|
||||||
description: An address.
|
description: An address.
|
||||||
@@ -6174,6 +6503,17 @@ components:
|
|||||||
includes_tax:
|
includes_tax:
|
||||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
original_item_id:
|
||||||
|
description: '[EXPERIMENTAL] The id of the original line item'
|
||||||
|
type: string
|
||||||
|
order_edit_id:
|
||||||
|
description: >-
|
||||||
|
[EXPERIMENTAL] The ID of the order edit to which a cloned item
|
||||||
|
belongs
|
||||||
|
type: string
|
||||||
|
order_edit:
|
||||||
|
description: '[EXPERIMENTAL] The order edit joined'
|
||||||
|
type: object
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
@@ -6579,12 +6919,24 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
subtotal:
|
subtotal:
|
||||||
type: integer
|
type: integer
|
||||||
description: The subtotal for line items computed from changes.
|
description: The total of subtotal
|
||||||
example: 8000
|
example: 8000
|
||||||
discount_total:
|
discount_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of discount
|
description: The total of discount
|
||||||
example: 800
|
example: 800
|
||||||
|
shipping_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the shipping amount
|
||||||
|
example: 800
|
||||||
|
gift_card_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card amount
|
||||||
|
example: 800
|
||||||
|
gift_card_tax_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card tax amount
|
||||||
|
example: 800
|
||||||
tax_total:
|
tax_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of tax
|
description: The total of tax
|
||||||
@@ -7643,6 +7995,46 @@ components:
|
|||||||
description: An optional key-value map with additional details
|
description: An optional key-value map with additional details
|
||||||
example:
|
example:
|
||||||
car: white
|
car: white
|
||||||
|
product_variant_prices_fields:
|
||||||
|
title: Product Variant Prices Fields
|
||||||
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
|
x-resourceId: product_variant_prices_fields
|
||||||
|
properties:
|
||||||
|
original_price:
|
||||||
|
type: number
|
||||||
|
description: >-
|
||||||
|
The original price of the variant without any discounted prices
|
||||||
|
applied.
|
||||||
|
calculated_price:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant. Can be a discounted price.
|
||||||
|
original_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant including taxes.
|
||||||
|
calculated_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant including taxes.
|
||||||
|
original_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the original price.
|
||||||
|
calculated_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the calculated price.
|
||||||
|
tax_rates:
|
||||||
|
type: array
|
||||||
|
description: An array of applied tax rates
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The tax rate value
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the tax rate
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code of the tax rate
|
||||||
product:
|
product:
|
||||||
title: Product
|
title: Product
|
||||||
description: >-
|
description: >-
|
||||||
|
|||||||
+401
-9
@@ -15,6 +15,89 @@ info:
|
|||||||
|
|
||||||
|
|
||||||
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
||||||
|
|
||||||
|
|
||||||
|
## Expanding Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find an `expand` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `expand` query parameter to unpack an
|
||||||
|
entity's relations and return them in the response.
|
||||||
|
|
||||||
|
|
||||||
|
For example, when you list customers you can also retrieve their groups by
|
||||||
|
passing to the `expand` query parameter the value `groups`.
|
||||||
|
|
||||||
|
|
||||||
|
You can expand more than one relation by separating the relations in the
|
||||||
|
`expand` query parameter with a comma. For example, to retrieve both the
|
||||||
|
orders and the groups of a customer, pass to the `expand` query parameter
|
||||||
|
the value `groups,orders`.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that the parameters you pass to `expand` replace any relations
|
||||||
|
that are expanded by default.
|
||||||
|
|
||||||
|
|
||||||
|
## Selecting Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find a `fields` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `fields` query parameter to specify which
|
||||||
|
fields in the entity should be returned in the response.
|
||||||
|
|
||||||
|
|
||||||
|
You can pass more than one field by seperating the field names in the
|
||||||
|
`fields` query parameter with a comma.
|
||||||
|
|
||||||
|
|
||||||
|
Only the fields you pass to `field` will be retrieved and returned in the
|
||||||
|
response. Any fields that are returned by default will not be returned in
|
||||||
|
this case. This does not affect relations.
|
||||||
|
|
||||||
|
|
||||||
|
For example, to only select the `title` and `description` fields of a
|
||||||
|
product, pass to the `fields` query parameter the value `title,description`.
|
||||||
|
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
|
||||||
|
|
||||||
|
### Query Parameters
|
||||||
|
|
||||||
|
|
||||||
|
In listing endpoints, such as list customers or list products, you can
|
||||||
|
control the pagination using the query parameters `limit` and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
`limit` is used to specify the maximum number of items that can be return in
|
||||||
|
the response. `offset` is used to specify how many items to skip before
|
||||||
|
returning the resulting entities.
|
||||||
|
|
||||||
|
|
||||||
|
You can use the `offset` query parameter to change between pages. For
|
||||||
|
example, if the limit is 50, at page 1 the offset should be 0; at page 2 the
|
||||||
|
offset should be 50, and so on.
|
||||||
|
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
|
||||||
|
In listing fields, aside from the entities retrieved, there are three
|
||||||
|
pagination-related fields returned: `count`, `limit`, and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
Similarly to the query parameters, `limit` is the maximum number of items
|
||||||
|
that can be returned in the response, and `field` is the number of items
|
||||||
|
that were skipped before the entities in the result.
|
||||||
|
|
||||||
|
|
||||||
|
`count` is the total number of available items of this entity. It can be
|
||||||
|
used to determine how many pages are there.
|
||||||
|
|
||||||
|
|
||||||
|
For example, if the `count` is 100 and the `limit` is 50, you can divide the
|
||||||
|
`count` by the `limit` to get the number of pages: `100/50 = 2 pages`.
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
url: 'https://github.com/medusajs/medusa/blob/master/LICENSE'
|
||||||
@@ -1542,8 +1625,16 @@ paths:
|
|||||||
properties:
|
properties:
|
||||||
address:
|
address:
|
||||||
description: The Address to add to the Customer.
|
description: The Address to add to the Customer.
|
||||||
anyOf:
|
allOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
|
- type: object
|
||||||
|
required:
|
||||||
|
- first_name
|
||||||
|
- last_name
|
||||||
|
- address_1
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- postal_code
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS Client
|
label: JS Client
|
||||||
@@ -1802,7 +1893,7 @@ paths:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS Client
|
label: JS Client
|
||||||
@@ -1934,7 +2025,7 @@ paths:
|
|||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: '#/components/schemas/address'
|
- $ref: '#/components/schemas/address_fields'
|
||||||
description: The full billing address object
|
description: The full billing address object
|
||||||
- type: string
|
- type: string
|
||||||
description: The ID of an existing billing address
|
description: The ID of an existing billing address
|
||||||
@@ -2505,6 +2596,166 @@ paths:
|
|||||||
$ref: '#/components/responses/invalid_request_error'
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
'500':
|
'500':
|
||||||
$ref: '#/components/responses/500_error'
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/complete':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditComplete
|
||||||
|
summary: Completes an OrderEdit
|
||||||
|
description: Completes an OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
medusa.orderEdit.complete(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/store/order-edits/{id}/complete'
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}/decline':
|
||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditDecline
|
||||||
|
summary: Decline an OrderEdit
|
||||||
|
description: Declines an OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
declined_reason:
|
||||||
|
type: string
|
||||||
|
description: The reason for declining the OrderEdit.
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
medusa.orderEdit.decline(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id);
|
||||||
|
})
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request POST
|
||||||
|
'https://medusa-url.com/store/order-edits/{id}/decline'
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
|
'/order-edits/{id}':
|
||||||
|
get:
|
||||||
|
operationId: GetOrderEditsOrderEdit
|
||||||
|
summary: Retrieve an OrderEdit
|
||||||
|
description: Retrieves a OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source: >
|
||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries:
|
||||||
|
3 })
|
||||||
|
|
||||||
|
medusa.orderEdit.retrieve(orderEditId)
|
||||||
|
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id);
|
||||||
|
});
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source: >
|
||||||
|
curl --location --request GET
|
||||||
|
'https://medusa-url.com/store/order-edits/{id}'
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: '#/components/schemas/order_edit'
|
||||||
|
'400':
|
||||||
|
$ref: '#/components/responses/400_error'
|
||||||
|
'401':
|
||||||
|
$ref: '#/components/responses/unauthorized'
|
||||||
|
'404':
|
||||||
|
$ref: '#/components/responses/not_found_error'
|
||||||
|
'409':
|
||||||
|
$ref: '#/components/responses/invalid_state_error'
|
||||||
|
'422':
|
||||||
|
$ref: '#/components/responses/invalid_request_error'
|
||||||
|
'500':
|
||||||
|
$ref: '#/components/responses/500_error'
|
||||||
'/orders/cart/{cart_id}':
|
'/orders/cart/{cart_id}':
|
||||||
get:
|
get:
|
||||||
operationId: GetOrdersOrderCartId
|
operationId: GetOrdersOrderCartId
|
||||||
@@ -2751,7 +3002,17 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
product:
|
product:
|
||||||
$ref: '#/components/schemas/product'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
variants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: >-
|
||||||
|
#/components/schemas/product_variant_prices_fields
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
'404':
|
'404':
|
||||||
@@ -2930,7 +3191,17 @@ paths:
|
|||||||
products:
|
products:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product'
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
variants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: >-
|
||||||
|
#/components/schemas/product_variant_prices_fields
|
||||||
count:
|
count:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total number of items available
|
description: The total number of items available
|
||||||
@@ -3732,7 +4003,9 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
variant:
|
variant:
|
||||||
$ref: '#/components/schemas/product_variant'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: '#/components/schemas/product_variant_prices_fields'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
'404':
|
'404':
|
||||||
@@ -3828,7 +4101,9 @@ paths:
|
|||||||
variants:
|
variants:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: '#/components/schemas/product_variant'
|
allOf:
|
||||||
|
- $ref: '#/components/schemas/product_variant'
|
||||||
|
- $ref: '#/components/schemas/product_variant_prices_fields'
|
||||||
'400':
|
'400':
|
||||||
$ref: '#/components/responses/400_error'
|
$ref: '#/components/responses/400_error'
|
||||||
'404':
|
'404':
|
||||||
@@ -4040,6 +4315,60 @@ components:
|
|||||||
|
|
||||||
Where `{sid}` is the value of `connect.sid` that you copied.
|
Where `{sid}` is the value of `connect.sid` that you copied.
|
||||||
schemas:
|
schemas:
|
||||||
|
address_fields:
|
||||||
|
title: Address Fields
|
||||||
|
description: Address fields used when creating/updating an address.
|
||||||
|
x-resourceId: address
|
||||||
|
properties:
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
description: Company name
|
||||||
|
example: Acme
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
example: Arno
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
example: Willms
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
description: Address line 1
|
||||||
|
example: 14433 Kemmer Court
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
description: Address line 2
|
||||||
|
example: Suite 369
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
description: City
|
||||||
|
example: South Geoffreyview
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
description: The 2 character ISO code of the country in lower case
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||||
|
description: See a list of codes.
|
||||||
|
example: st
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
description: Province
|
||||||
|
example: Kentucky
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: Postal Code
|
||||||
|
example: 72093
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: Phone Number
|
||||||
|
example: 16128234334802
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: An optional key-value map with additional details
|
||||||
|
example:
|
||||||
|
car: white
|
||||||
address:
|
address:
|
||||||
title: Address
|
title: Address
|
||||||
description: An address.
|
description: An address.
|
||||||
@@ -6174,6 +6503,17 @@ components:
|
|||||||
includes_tax:
|
includes_tax:
|
||||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
original_item_id:
|
||||||
|
description: '[EXPERIMENTAL] The id of the original line item'
|
||||||
|
type: string
|
||||||
|
order_edit_id:
|
||||||
|
description: >-
|
||||||
|
[EXPERIMENTAL] The ID of the order edit to which a cloned item
|
||||||
|
belongs
|
||||||
|
type: string
|
||||||
|
order_edit:
|
||||||
|
description: '[EXPERIMENTAL] The order edit joined'
|
||||||
|
type: object
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
@@ -6579,12 +6919,24 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
subtotal:
|
subtotal:
|
||||||
type: integer
|
type: integer
|
||||||
description: The subtotal for line items computed from changes.
|
description: The total of subtotal
|
||||||
example: 8000
|
example: 8000
|
||||||
discount_total:
|
discount_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of discount
|
description: The total of discount
|
||||||
example: 800
|
example: 800
|
||||||
|
shipping_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the shipping amount
|
||||||
|
example: 800
|
||||||
|
gift_card_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card amount
|
||||||
|
example: 800
|
||||||
|
gift_card_tax_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card tax amount
|
||||||
|
example: 800
|
||||||
tax_total:
|
tax_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of tax
|
description: The total of tax
|
||||||
@@ -7643,6 +7995,46 @@ components:
|
|||||||
description: An optional key-value map with additional details
|
description: An optional key-value map with additional details
|
||||||
example:
|
example:
|
||||||
car: white
|
car: white
|
||||||
|
product_variant_prices_fields:
|
||||||
|
title: Product Variant Prices Fields
|
||||||
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
|
x-resourceId: product_variant_prices_fields
|
||||||
|
properties:
|
||||||
|
original_price:
|
||||||
|
type: number
|
||||||
|
description: >-
|
||||||
|
The original price of the variant without any discounted prices
|
||||||
|
applied.
|
||||||
|
calculated_price:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant. Can be a discounted price.
|
||||||
|
original_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant including taxes.
|
||||||
|
calculated_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant including taxes.
|
||||||
|
original_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the original price.
|
||||||
|
calculated_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the calculated price.
|
||||||
|
tax_rates:
|
||||||
|
type: array
|
||||||
|
description: An array of applied tax rates
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The tax rate value
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the tax rate
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code of the tax rate
|
||||||
product:
|
product:
|
||||||
title: Product
|
title: Product
|
||||||
description: >-
|
description: >-
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
medusa.orderEdit.retrieve(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id);
|
||||||
|
});
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
medusa.orderEdit.complete(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id)
|
||||||
|
})
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import Medusa from "@medusajs/medusa-js"
|
||||||
|
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||||
|
medusa.orderEdit.decline(orderEditId)
|
||||||
|
.then(({ order_edit }) => {
|
||||||
|
console.log(order_edit.id);
|
||||||
|
})
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
curl --location --request GET 'https://medusa-url.com/store/order-edits/{id}'
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/store/order-edits/{id}/complete'
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
curl --location --request POST 'https://medusa-url.com/store/order-edits/{id}/decline'
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
title: Address Fields
|
||||||
|
description: Address fields used when creating/updating an address.
|
||||||
|
x-resourceId: address
|
||||||
|
properties:
|
||||||
|
company:
|
||||||
|
type: string
|
||||||
|
description: Company name
|
||||||
|
example: Acme
|
||||||
|
first_name:
|
||||||
|
type: string
|
||||||
|
description: First name
|
||||||
|
example: Arno
|
||||||
|
last_name:
|
||||||
|
type: string
|
||||||
|
description: Last name
|
||||||
|
example: Willms
|
||||||
|
address_1:
|
||||||
|
type: string
|
||||||
|
description: Address line 1
|
||||||
|
example: 14433 Kemmer Court
|
||||||
|
address_2:
|
||||||
|
type: string
|
||||||
|
description: Address line 2
|
||||||
|
example: Suite 369
|
||||||
|
city:
|
||||||
|
type: string
|
||||||
|
description: City
|
||||||
|
example: South Geoffreyview
|
||||||
|
country_code:
|
||||||
|
type: string
|
||||||
|
description: The 2 character ISO code of the country in lower case
|
||||||
|
externalDocs:
|
||||||
|
url: >-
|
||||||
|
https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements
|
||||||
|
description: See a list of codes.
|
||||||
|
example: st
|
||||||
|
province:
|
||||||
|
type: string
|
||||||
|
description: Province
|
||||||
|
example: Kentucky
|
||||||
|
postal_code:
|
||||||
|
type: string
|
||||||
|
description: Postal Code
|
||||||
|
example: 72093
|
||||||
|
phone:
|
||||||
|
type: string
|
||||||
|
description: Phone Number
|
||||||
|
example: 16128234334802
|
||||||
|
metadata:
|
||||||
|
type: object
|
||||||
|
description: An optional key-value map with additional details
|
||||||
|
example:
|
||||||
|
car: white
|
||||||
@@ -160,6 +160,15 @@ properties:
|
|||||||
includes_tax:
|
includes_tax:
|
||||||
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
description: '[EXPERIMENTAL] Indicates if the line item unit_price include tax'
|
||||||
type: boolean
|
type: boolean
|
||||||
|
original_item_id:
|
||||||
|
description: '[EXPERIMENTAL] The id of the original line item'
|
||||||
|
type: string
|
||||||
|
order_edit_id:
|
||||||
|
description: '[EXPERIMENTAL] The ID of the order edit to which a cloned item belongs'
|
||||||
|
type: string
|
||||||
|
order_edit:
|
||||||
|
description: '[EXPERIMENTAL] The order edit joined'
|
||||||
|
type: object
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
description: The date with timezone at which the resource was created.
|
description: The date with timezone at which the resource was created.
|
||||||
|
|||||||
@@ -60,12 +60,24 @@ properties:
|
|||||||
type: string
|
type: string
|
||||||
subtotal:
|
subtotal:
|
||||||
type: integer
|
type: integer
|
||||||
description: The subtotal for line items computed from changes.
|
description: The total of subtotal
|
||||||
example: 8000
|
example: 8000
|
||||||
discount_total:
|
discount_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of discount
|
description: The total of discount
|
||||||
example: 800
|
example: 800
|
||||||
|
shipping_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the shipping amount
|
||||||
|
example: 800
|
||||||
|
gift_card_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card amount
|
||||||
|
example: 800
|
||||||
|
gift_card_tax_total:
|
||||||
|
type: integer
|
||||||
|
description: The total of the gift card tax amount
|
||||||
|
example: 800
|
||||||
tax_total:
|
tax_total:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total of tax
|
description: The total of tax
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
title: Product Variant Prices Fields
|
||||||
|
description: Product Variants Prices Fields that are only available in some requests.
|
||||||
|
x-resourceId: product_variant_prices_fields
|
||||||
|
properties:
|
||||||
|
original_price:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant without any discounted prices applied.
|
||||||
|
calculated_price:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant. Can be a discounted price.
|
||||||
|
original_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The original price of the variant including taxes.
|
||||||
|
calculated_price_incl_tax:
|
||||||
|
type: number
|
||||||
|
description: The calculated price of the variant including taxes.
|
||||||
|
original_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the original price.
|
||||||
|
calculated_tax:
|
||||||
|
type: number
|
||||||
|
description: The taxes applied on the calculated price.
|
||||||
|
tax_rates:
|
||||||
|
type: array
|
||||||
|
description: An array of applied tax rates
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
rate:
|
||||||
|
type: number
|
||||||
|
description: The tax rate value
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
description: The name of the tax rate
|
||||||
|
code:
|
||||||
|
type: string
|
||||||
|
description: The code of the tax rate
|
||||||
@@ -15,6 +15,89 @@ info:
|
|||||||
|
|
||||||
|
|
||||||
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
<!-- ReDoc-Inject: <SecurityDefinitions> -->
|
||||||
|
|
||||||
|
|
||||||
|
## Expanding Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find an `expand` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `expand` query parameter to unpack an
|
||||||
|
entity's relations and return them in the response.
|
||||||
|
|
||||||
|
|
||||||
|
For example, when you list customers you can also retrieve their groups by
|
||||||
|
passing to the `expand` query parameter the value `groups`.
|
||||||
|
|
||||||
|
|
||||||
|
You can expand more than one relation by separating the relations in the
|
||||||
|
`expand` query parameter with a comma. For example, to retrieve both the
|
||||||
|
orders and the groups of a customer, pass to the `expand` query parameter
|
||||||
|
the value `groups,orders`.
|
||||||
|
|
||||||
|
|
||||||
|
Please note that the parameters you pass to `expand` replace any relations
|
||||||
|
that are expanded by default.
|
||||||
|
|
||||||
|
|
||||||
|
## Selecting Fields
|
||||||
|
|
||||||
|
|
||||||
|
In many endpoints you'll find a `fields` query parameter that can be passed
|
||||||
|
to the endpoint. You can use the `fields` query parameter to specify which
|
||||||
|
fields in the entity should be returned in the response.
|
||||||
|
|
||||||
|
|
||||||
|
You can pass more than one field by seperating the field names in the
|
||||||
|
`fields` query parameter with a comma.
|
||||||
|
|
||||||
|
|
||||||
|
Only the fields you pass to `field` will be retrieved and returned in the
|
||||||
|
response. Any fields that are returned by default will not be returned in
|
||||||
|
this case. This does not affect relations.
|
||||||
|
|
||||||
|
|
||||||
|
For example, to only select the `title` and `description` fields of a
|
||||||
|
product, pass to the `fields` query parameter the value `title,description`.
|
||||||
|
|
||||||
|
|
||||||
|
## Pagination
|
||||||
|
|
||||||
|
|
||||||
|
### Query Parameters
|
||||||
|
|
||||||
|
|
||||||
|
In listing endpoints, such as list customers or list products, you can
|
||||||
|
control the pagination using the query parameters `limit` and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
`limit` is used to specify the maximum number of items that can be return in
|
||||||
|
the response. `offset` is used to specify how many items to skip before
|
||||||
|
returning the resulting entities.
|
||||||
|
|
||||||
|
|
||||||
|
You can use the `offset` query parameter to change between pages. For
|
||||||
|
example, if the limit is 50, at page 1 the offset should be 0; at page 2 the
|
||||||
|
offset should be 50, and so on.
|
||||||
|
|
||||||
|
|
||||||
|
### Response Fields
|
||||||
|
|
||||||
|
|
||||||
|
In listing fields, aside from the entities retrieved, there are three
|
||||||
|
pagination-related fields returned: `count`, `limit`, and `offset`.
|
||||||
|
|
||||||
|
|
||||||
|
Similarly to the query parameters, `limit` is the maximum number of items
|
||||||
|
that can be returned in the response, and `field` is the number of items
|
||||||
|
that were skipped before the entities in the result.
|
||||||
|
|
||||||
|
|
||||||
|
`count` is the total number of available items of this entity. It can be
|
||||||
|
used to determine how many pages are there.
|
||||||
|
|
||||||
|
|
||||||
|
For example, if the `count` is 100 and the `limit` is 50, you can divide the
|
||||||
|
`count` by the `limit` to get the number of pages: `100/50 = 2 pages`.
|
||||||
license:
|
license:
|
||||||
name: MIT
|
name: MIT
|
||||||
url: https://github.com/medusajs/medusa/blob/master/LICENSE
|
url: https://github.com/medusajs/medusa/blob/master/LICENSE
|
||||||
@@ -112,6 +195,12 @@ paths:
|
|||||||
$ref: paths/customers_password-reset.yaml
|
$ref: paths/customers_password-reset.yaml
|
||||||
/gift-cards/{code}:
|
/gift-cards/{code}:
|
||||||
$ref: paths/gift-cards_{code}.yaml
|
$ref: paths/gift-cards_{code}.yaml
|
||||||
|
/order-edits/{id}/complete:
|
||||||
|
$ref: paths/order-edits_{id}_complete.yaml
|
||||||
|
/order-edits/{id}/decline:
|
||||||
|
$ref: paths/order-edits_{id}_decline.yaml
|
||||||
|
/order-edits/{id}:
|
||||||
|
$ref: paths/order-edits_{id}.yaml
|
||||||
/orders/cart/{cart_id}:
|
/orders/cart/{cart_id}:
|
||||||
$ref: paths/orders_cart_{cart_id}.yaml
|
$ref: paths/orders_cart_{cart_id}.yaml
|
||||||
/orders/{id}:
|
/orders/{id}:
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ post:
|
|||||||
billing_address:
|
billing_address:
|
||||||
description: The Address to be used for billing purposes.
|
description: The Address to be used for billing purposes.
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: ../components/schemas/address.yaml
|
- $ref: ../components/schemas/address_fields.yaml
|
||||||
description: The full billing address object
|
description: The full billing address object
|
||||||
- type: string
|
- type: string
|
||||||
description: The ID of an existing billing address
|
description: The ID of an existing billing address
|
||||||
|
|||||||
@@ -12,8 +12,16 @@ post:
|
|||||||
properties:
|
properties:
|
||||||
address:
|
address:
|
||||||
description: The Address to add to the Customer.
|
description: The Address to add to the Customer.
|
||||||
anyOf:
|
allOf:
|
||||||
- $ref: ../components/schemas/address.yaml
|
- $ref: ../components/schemas/address_fields.yaml
|
||||||
|
- type: object
|
||||||
|
required:
|
||||||
|
- first_name
|
||||||
|
- last_name
|
||||||
|
- address_1
|
||||||
|
- city
|
||||||
|
- country_code
|
||||||
|
- postal_code
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS Client
|
label: JS Client
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ post:
|
|||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
anyOf:
|
anyOf:
|
||||||
- $ref: ../components/schemas/address.yaml
|
- $ref: ../components/schemas/address_fields.yaml
|
||||||
x-codeSamples:
|
x-codeSamples:
|
||||||
- lang: JavaScript
|
- lang: JavaScript
|
||||||
label: JS Client
|
label: JS Client
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
get:
|
||||||
|
operationId: GetOrderEditsOrderEdit
|
||||||
|
summary: Retrieve an OrderEdit
|
||||||
|
description: Retrieves a OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}/getundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}/getundefined
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'409':
|
||||||
|
$ref: ../components/responses/invalid_state_error.yaml
|
||||||
|
'422':
|
||||||
|
$ref: ../components/responses/invalid_request_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditComplete
|
||||||
|
summary: Completes an OrderEdit
|
||||||
|
description: Completes an OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the Order Edit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}_complete/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_complete/postundefined
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
post:
|
||||||
|
operationId: PostOrderEditsOrderEditDecline
|
||||||
|
summary: Decline an OrderEdit
|
||||||
|
description: Declines an OrderEdit.
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
description: The ID of the OrderEdit.
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
requestBody:
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
declined_reason:
|
||||||
|
type: string
|
||||||
|
description: The reason for declining the OrderEdit.
|
||||||
|
x-codeSamples:
|
||||||
|
- lang: JavaScript
|
||||||
|
label: JS Client
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/JavaScript/order-edits_{id}_decline/postundefined
|
||||||
|
- lang: Shell
|
||||||
|
label: cURL
|
||||||
|
source:
|
||||||
|
$ref: ../code_samples/Shell/order-edits_{id}_decline/postundefined
|
||||||
|
tags:
|
||||||
|
- OrderEdit
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: OK
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
properties:
|
||||||
|
order_edit:
|
||||||
|
$ref: ../components/schemas/order_edit.yaml
|
||||||
|
'400':
|
||||||
|
$ref: ../components/responses/400_error.yaml
|
||||||
|
'401':
|
||||||
|
$ref: ../components/responses/unauthorized.yaml
|
||||||
|
'404':
|
||||||
|
$ref: ../components/responses/not_found_error.yaml
|
||||||
|
'500':
|
||||||
|
$ref: ../components/responses/500_error.yaml
|
||||||
@@ -155,7 +155,17 @@ get:
|
|||||||
products:
|
products:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: ../components/schemas/product.yaml
|
allOf:
|
||||||
|
- $ref: ../components/schemas/product.yaml
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
variants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../components/schemas/product_variant.yaml
|
||||||
|
- $ref: >-
|
||||||
|
../components/schemas/product_variant_prices_fields.yaml
|
||||||
count:
|
count:
|
||||||
type: integer
|
type: integer
|
||||||
description: The total number of items available
|
description: The total number of items available
|
||||||
|
|||||||
@@ -52,7 +52,17 @@ get:
|
|||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
product:
|
product:
|
||||||
$ref: ../components/schemas/product.yaml
|
allOf:
|
||||||
|
- $ref: ../components/schemas/product.yaml
|
||||||
|
- type: object
|
||||||
|
properties:
|
||||||
|
variants:
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
allOf:
|
||||||
|
- $ref: ../components/schemas/product_variant.yaml
|
||||||
|
- $ref: >-
|
||||||
|
../components/schemas/product_variant_prices_fields.yaml
|
||||||
'400':
|
'400':
|
||||||
$ref: ../components/responses/400_error.yaml
|
$ref: ../components/responses/400_error.yaml
|
||||||
'404':
|
'404':
|
||||||
|
|||||||
@@ -79,7 +79,9 @@ get:
|
|||||||
variants:
|
variants:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: ../components/schemas/product_variant.yaml
|
allOf:
|
||||||
|
- $ref: ../components/schemas/product_variant.yaml
|
||||||
|
- $ref: ../components/schemas/product_variant_prices_fields.yaml
|
||||||
'400':
|
'400':
|
||||||
$ref: ../components/responses/400_error.yaml
|
$ref: ../components/responses/400_error.yaml
|
||||||
'404':
|
'404':
|
||||||
|
|||||||
@@ -44,7 +44,9 @@ get:
|
|||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
variant:
|
variant:
|
||||||
$ref: ../components/schemas/product_variant.yaml
|
allOf:
|
||||||
|
- $ref: ../components/schemas/product_variant.yaml
|
||||||
|
- $ref: ../components/schemas/product_variant_prices_fields.yaml
|
||||||
'400':
|
'400':
|
||||||
$ref: ../components/responses/400_error.yaml
|
$ref: ../components/responses/400_error.yaml
|
||||||
'404':
|
'404':
|
||||||
|
|||||||
@@ -0,0 +1,306 @@
|
|||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# How to Import Prices
|
||||||
|
|
||||||
|
In this document, you’ll learn how to import prices into a price list using the Admin APIs.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Using Medusa’s [Batch Job Admin APIs](https://docs.medusajs.com/api/admin/#tag/Batch-Job), you can import prices into a price list.
|
||||||
|
|
||||||
|
:::caution
|
||||||
|
|
||||||
|
Importing prices into a price list removes all existing prices in the price list and adds the imported prices.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
### Medusa Components
|
||||||
|
|
||||||
|
It is assumed that you already have a Medusa server installed and set up. If not, you can follow our [quickstart guide](../../quickstart/quick-start.md) to get started.
|
||||||
|
|
||||||
|
### Redis
|
||||||
|
|
||||||
|
Redis is required for batch jobs to work. Make sure you [install Redis](../../tutorial/0-set-up-your-development-environment.mdx#redis) and [configure it with your Medusa server](./../../usage/configurations.md#redis).
|
||||||
|
|
||||||
|
### File Service Plugin
|
||||||
|
|
||||||
|
Part of the process of importing prices is uploading a CSV file. This requires a file service plugin to be installed on your server. If you don’t have any installed, you can install one of the following options:
|
||||||
|
|
||||||
|
- [MinIO](../../add-plugins/minio.md) (At least version `1.1.0`)
|
||||||
|
- [Spaces](../../add-plugins/spaces.md)
|
||||||
|
|
||||||
|
### CSV File
|
||||||
|
|
||||||
|
You must have a CSV file that you will use to import prices into your Medusa server. You can check [this CSV example file](https://medusa-doc-files.s3.amazonaws.com/price-list-import-template.csv) to see which format is required for your import.
|
||||||
|
|
||||||
|
### JS Client
|
||||||
|
|
||||||
|
This guide includes code snippets to send requests to your Medusa server using Medusa’s JS Client, JavaScript’s Fetch API, or cURL.
|
||||||
|
|
||||||
|
If you follow the JS Client code blocks, it’s assumed you already have [Medusa’s JS Client](../../js-client/overview.md) installed and have [created an instance of the client](../../js-client/overview.md#configuration).
|
||||||
|
|
||||||
|
### Authenticated Admin User
|
||||||
|
|
||||||
|
You must be an authenticated admin user before following along with the steps in the tutorial.
|
||||||
|
|
||||||
|
You can learn more about [authenticating as an admin user in the API reference](https://docs.medusajs.com/api/admin/#section/Authentication).
|
||||||
|
|
||||||
|
### Created Price List
|
||||||
|
|
||||||
|
Before importing the prices, you must have a price list to import them to.
|
||||||
|
|
||||||
|
You can use the [Create Price List](https://docs.medusajs.com/api/admin/#tag/Price-List/operation/PostPriceListsPriceList) endpoint, or follow the [how-to guide to learn how to create and manage price lists using the Admin API](../backend/price-lists/use-api.mdx).
|
||||||
|
|
||||||
|
## 1. Upload CSV File
|
||||||
|
|
||||||
|
The first step is to upload the CSV file to import prices from.
|
||||||
|
|
||||||
|
You can do that by sending the following request to the [Upload Files](https://docs.medusajs.com/api/admin/#tag/Upload/operation/PostUploads) endpoint:
|
||||||
|
|
||||||
|
<Tabs groupId="request-type">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.admin.uploads.create(file) //file is an instance of File
|
||||||
|
.then(({ uploads }) => {
|
||||||
|
const key = uploads[0].key;
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
const formData = new FormData();
|
||||||
|
formData.append('files', file); //file is an instance of File
|
||||||
|
|
||||||
|
fetch(`<YOUR_SERVER>/admin/uploads`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data',
|
||||||
|
},
|
||||||
|
body: formData
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({ uploads }) => {
|
||||||
|
const key = uploads[0].key;
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="curl" label="cURL">
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --location --request POST '<YOUR_SERVER>/admin/uploads' \
|
||||||
|
--header 'Authorization: Bearer {api_token}' \
|
||||||
|
--header 'Content-Type: text/csv' \
|
||||||
|
--form 'files=@"<FILE_PATH_1>"'
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
This request returns an array of uploads. Each item in the array is an object that includes the properties `url` and `key`. You’ll need the `key` to import the prices next.
|
||||||
|
|
||||||
|
## 2. Create a Batch Job for Prices Import
|
||||||
|
|
||||||
|
To start a new price import, you must create a batch job.
|
||||||
|
|
||||||
|
You can do that by sending the following request to the [Create a Batch Job](https://docs.medusajs.com/api/admin/#tag/Batch-Job/operation/PostBatchJobs) endpoint:
|
||||||
|
|
||||||
|
<Tabs groupId="request-type">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.admin.batchJobs.create({
|
||||||
|
type: 'price-list-import',
|
||||||
|
context: {
|
||||||
|
fileKey: key, //obtained from previous step
|
||||||
|
price_list_id
|
||||||
|
},
|
||||||
|
dry_run: true
|
||||||
|
})
|
||||||
|
.then(( batch_job ) => {
|
||||||
|
console.log(batch_job.status);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
fetch(`<YOUR_SERVER>/admin/batch-jobs`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
type: 'price-list-import',
|
||||||
|
context: {
|
||||||
|
fileKey: key, //obtained from previous step
|
||||||
|
price_list_id
|
||||||
|
},
|
||||||
|
dry_run: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({ batch_job }) => {
|
||||||
|
console.log(batch_job.status);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="curl" label="cURL">
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --location --request POST '<YOUR_SERVER>/admin/batch-jobs' \
|
||||||
|
--header 'Authorization: Bearer {api_token}' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data-raw '{
|
||||||
|
"type": "price-list-import",
|
||||||
|
"context": {
|
||||||
|
"fileKey": "<KEY>",
|
||||||
|
"price_list_id": "<PRICE_LIST_ID>"
|
||||||
|
},
|
||||||
|
"dry_run": true
|
||||||
|
}'
|
||||||
|
# <KEY> is the key you obtained from the previous step
|
||||||
|
# <PRICE_LIST_ID> is the ID of the price list to import prices into
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
In the body of the request, you must pass the following parameters:
|
||||||
|
|
||||||
|
- `type`: Batch jobs can be of different types. For price imports, the type should always be `price-list-import`.
|
||||||
|
- `context`: An object that must contain:
|
||||||
|
- The `fileKey` property. The value of this property is the key received when you uploaded the CSV file.
|
||||||
|
- The `price_list_id` property. The value of this property is the ID of the price list you’re importing the prices into.
|
||||||
|
- `dry_run`: This is optional to include. If not set or if its value is `false`, the price import will start right after you send this request. Settings its value to `true` allows you to retrieve afterward a brief of the number of prices that will be added.
|
||||||
|
|
||||||
|
This request returns the batch job with its details such as the `status` or `id`.
|
||||||
|
|
||||||
|
:::note
|
||||||
|
|
||||||
|
If you don’t set `dry_run` or you set it to `false`, you don’t need to follow the rest of these steps.
|
||||||
|
|
||||||
|
:::
|
||||||
|
|
||||||
|
## (Optional) Retrieve Batch Job
|
||||||
|
|
||||||
|
After creating the batch job, it will be pre-processed. At this point, the CSV file will be validated, and the number of prices to add are counted.
|
||||||
|
|
||||||
|
You can retrieve all the details of the batch job, including its status and the brief statistics related to the prices by sending the following request:
|
||||||
|
|
||||||
|
<Tabs groupId="request-type">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.admin.batchJobs.retrieve(batchJobId)
|
||||||
|
.then(( batch_job ) => {
|
||||||
|
console.log(batch_job.status, batch_job.result);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}`)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({ batch_job }) => {
|
||||||
|
console.log(batch_job.status, batch_job.result);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="curl" label="cURL">
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --location --request GET '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
# <BATCH_JOB_ID> is the ID of the batch job
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
This request accepts the batch job’s ID as a parameter, which can be retrieved from the previous request. It returns the batch job in the response.
|
||||||
|
|
||||||
|
If the batch job has been pre-processed, the status of the batch job will be `pre_processed` and the `result` property will contain details about the import.
|
||||||
|
|
||||||
|
Here’s an example of the `result` property:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"result": {
|
||||||
|
"count": 5, // Total number of prices to be added
|
||||||
|
"stat_descriptors": [ //details about the prices to be added
|
||||||
|
{
|
||||||
|
"key": "price-list-import-count",
|
||||||
|
"name": "PriceList to import",
|
||||||
|
"message": "5 prices will be added"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"advancement_count": 0 //number of prices processed so far. Will be 0 before the import is confirmed.
|
||||||
|
},
|
||||||
|
```
|
||||||
|
|
||||||
|
## 3. Confirm Batch Job
|
||||||
|
|
||||||
|
A batch job can be confirmed only once the batch job has the status `pre_processed`. Once you confirm a batch job, the price import will start which will add prices to the price list
|
||||||
|
|
||||||
|
To confirm a batch job send the following request:
|
||||||
|
|
||||||
|
<Tabs groupId="request-type">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.admin.batchJobs.confirm(batchJobId)
|
||||||
|
.then(( batch_job ) => {
|
||||||
|
console.log(batch_job.status);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
fetch(`<YOUR_SERVER>/admin/batch-jobs/${batchJobId}/confirm`, {
|
||||||
|
method: 'POST'
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({ batch_job }) => {
|
||||||
|
console.log(batch_job.status);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="curl" label="cURL">
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl --location --request POST '<YOUR_SERVER>/admin/batch-jobs/<BATCH_JOB_ID>/confirm' \
|
||||||
|
--header 'Authorization: Bearer {api_token}'
|
||||||
|
# <BATCH_JOB_ID> is the ID of the batch job
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
This request accepts the ID of the batch job as a path parameter and returns the updated batch job. The returned batch job should have the status `confirmed`, which indicates that the batch job will now start processing.
|
||||||
|
|
||||||
|
### Checking the Status After Confirmation
|
||||||
|
|
||||||
|
After confirming the batch job, you can check the status while it is processing at any given point by retrieving the batch job. Based on the status, you can infer the progress of the batch job:
|
||||||
|
|
||||||
|
- If the status is `processing`, it means that the import is currently in progress. You can also check `result.advancement_count` to find out how many prices have been added so far.
|
||||||
|
- If the status is `failed`, it means an error has occurred during the import. You can check the error in `result.errors`.
|
||||||
|
- If the status is `completed`, it means the import has finished successfully.
|
||||||
|
|
||||||
|
## What’s Next 🚀
|
||||||
|
|
||||||
|
- Learn more about [Batch Jobs and how they work](../backend/batch-jobs/index.md).
|
||||||
|
- Check out the [Batch Jobs API Reference](https://docs.medusajs.com/api/admin/#tag/Batch-Job).
|
||||||
@@ -20,17 +20,17 @@ Redis is required for cron jobs to work. Make sure you [install Redis](../../../
|
|||||||
|
|
||||||
## 1. Create a File
|
## 1. Create a File
|
||||||
|
|
||||||
Each cron job should reside in a file under the `src/loaders` directory.
|
Each cron job should reside in a TypeScript or JavaScript file under the `src/loaders` directory.
|
||||||
|
|
||||||
Start by creating the `src/loaders` directory. Then, inside that directory, create the JavaScript or TypeScript file that you’ll add the cron job in. You can use any name for the file.
|
Start by creating the `src/loaders` directory. Then, inside that directory, create the JavaScript or TypeScript file that you’ll add the cron job in. You can use any name for the file.
|
||||||
|
|
||||||
For the example in this tutorial, you can create the file `src/loaders/publish.js`.
|
For the example in this tutorial, you can create the file `src/loaders/publish.ts`.
|
||||||
|
|
||||||
## 2. Create Cron Job
|
## 2. Create Cron Job
|
||||||
|
|
||||||
To create a cron job, add the following code in the file you created, which is `src/loaders/publish.js` in this example:
|
To create a cron job, add the following code in the file you created, which is `src/loaders/publish.ts` in this example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
const publishJob = async (container, options) => {
|
const publishJob = async (container, options) => {
|
||||||
const eventBus = container.resolve("eventBusService");
|
const eventBus = container.resolve("eventBusService");
|
||||||
eventBus.createCronJob("publish-products", {}, "0 0 * * *", async () => {
|
eventBus.createCronJob("publish-products", {}, "0 0 * * *", async () => {
|
||||||
@@ -72,7 +72,7 @@ To pass data to your cron job, you can add them to the object passed as a second
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
eventBus.createCronJob("publish-products", {
|
eventBus.createCronJob("publish-products", {
|
||||||
data: {
|
data: {
|
||||||
productId
|
productId
|
||||||
|
|||||||
@@ -4,13 +4,13 @@ In this document, you’ll learn how to create endpoints in your Medusa server.
|
|||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
Custom endpoints reside under the `src/api` directory in your Medusa Backend. To define a new endpoint, you can add the file `index.js` under the `src/api` directory. This file should export a function that returns an Express router.
|
Custom endpoints reside under the `src/api` directory in your Medusa Backend. They're defined in a TypeScript or JavaScript file that is named `index` (for example, `index.ts`). This file should export a function that returns an Express router.
|
||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
To create a new endpoint, start by creating a new file in `src/api` called `index.js`. At its basic format, `index.js` should look something like this:
|
To create a new endpoint, start by creating a new file in `src/api` called `index.ts`. At its basic format, `index.ts` should look something like this:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import { Router } from "express"
|
import { Router } from "express"
|
||||||
|
|
||||||
export default (rootDirectory, pluginOptions) => {
|
export default (rootDirectory, pluginOptions) => {
|
||||||
@@ -26,21 +26,21 @@ export default (rootDirectory, pluginOptions) => {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
This exports a function that returns an Express router. The function receives two parameters:
|
This exports a function that returns an Express router. The function receives two parameters:
|
||||||
|
|
||||||
- `rootDirectory` is the absolute path to the root directory that your server is running from.
|
- `rootDirectory` is the absolute path to the root directory that your server is running from.
|
||||||
- `pluginOptions` is an object that has your plugin's options. If your API route is not implemented in a plugin, then it will be an empty object.
|
- `pluginOptions` is an object that has your plugin's options. If your API route is not implemented in a plugin, then it will be an empty object.
|
||||||
|
|
||||||
### Endpoints Path
|
### Endpoints Path
|
||||||
|
|
||||||
Your endpoint can be under any path you wish.
|
Your endpoint can be under any path you wish.
|
||||||
|
|
||||||
By Medusa’s conventions:
|
By Medusa’s conventions:
|
||||||
|
|
||||||
- All Storefront REST APIs are prefixed by `/store`. For example, the `/store/products` endpoint lets you retrieve the products to display them on your storefront.
|
- All Storefront REST APIs are prefixed by `/store`. For example, the `/store/products` endpoint lets you retrieve the products to display them on your storefront.
|
||||||
- All Admin REST APIs are prefixed by `/admin`. For example, the `/admin/products` endpoint lets you retrieve the products to display them on your Admin.
|
- All Admin REST APIs are prefixed by `/admin`. For example, the `/admin/products` endpoint lets you retrieve the products to display them on your Admin.
|
||||||
|
|
||||||
You can also create endpoints that do not reside under these two prefixes, similar to the `hello` endpoint in the previous example.
|
You can also create endpoints that don't reside under these two prefixes, similar to the `hello` endpoint in the previous example.
|
||||||
|
|
||||||
## CORS Configuration
|
## CORS Configuration
|
||||||
|
|
||||||
@@ -48,14 +48,14 @@ If you’re adding a storefront or admin endpoint and you want to access these e
|
|||||||
|
|
||||||
First, you need to import your Medusa configurations along with the `cors` library:
|
First, you need to import your Medusa configurations along with the `cors` library:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import cors from "cors"
|
import cors from "cors"
|
||||||
import { projectConfig } from "../../medusa-config"
|
import { projectConfig } from "../../medusa-config"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, create an object that will hold the Cross-Origin Resource Sharing (CORS) configurations. If it’s a storefront endpoint, pass the `origin` property storefront options:
|
Then, create an object that will hold the Cross-Origin Resource Sharing (CORS) configurations. If it’s a storefront endpoint, pass the `origin` property storefront options:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
const corsOptions = {
|
const corsOptions = {
|
||||||
origin: projectConfig.store_cors.split(","),
|
origin: projectConfig.store_cors.split(","),
|
||||||
credentials: true,
|
credentials: true,
|
||||||
@@ -64,7 +64,7 @@ const corsOptions = {
|
|||||||
|
|
||||||
If it’s an admin endpoint, pass the `origin` property admin options:
|
If it’s an admin endpoint, pass the `origin` property admin options:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
const corsOptions = {
|
const corsOptions = {
|
||||||
origin: projectConfig.admin_cors.split(","),
|
origin: projectConfig.admin_cors.split(","),
|
||||||
credentials: true,
|
credentials: true,
|
||||||
@@ -73,7 +73,7 @@ const corsOptions = {
|
|||||||
|
|
||||||
Finally, for each route you add, create an `OPTIONS` request and add `cors` as a middleware for the route:
|
Finally, for each route you add, create an `OPTIONS` request and add `cors` as a middleware for the route:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
router.options("/admin/hello", cors(corsOptions))
|
router.options("/admin/hello", cors(corsOptions))
|
||||||
router.get("/admin/hello", cors(corsOptions), (req, res) => {
|
router.get("/admin/hello", cors(corsOptions), (req, res) => {
|
||||||
//...
|
//...
|
||||||
@@ -84,9 +84,9 @@ router.get("/admin/hello", cors(corsOptions), (req, res) => {
|
|||||||
|
|
||||||
### Same File
|
### Same File
|
||||||
|
|
||||||
You can add more than one endpoint in `src/api/index.js`:
|
You can add more than one endpoint in `src/api/index.ts`:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
router.options("/store/hello", cors(storeCorsOptions))
|
router.options("/store/hello", cors(storeCorsOptions))
|
||||||
router.get("/store/hello", cors(storeCorsOptions), (req, res) => {
|
router.get("/store/hello", cors(storeCorsOptions), (req, res) => {
|
||||||
res.json({
|
res.json({
|
||||||
@@ -106,11 +106,11 @@ router.get("/admin/hello", cors(adminCorsOptions), (req, res) => {
|
|||||||
|
|
||||||
Alternatively, you can add multiple files for each endpoint or set of endpoints for readability and easy maintenance.
|
Alternatively, you can add multiple files for each endpoint or set of endpoints for readability and easy maintenance.
|
||||||
|
|
||||||
To do that with the previous example, first, create the file `src/api/store.js` with the following content:
|
To do that with the previous example, first, create the file `src/api/store.ts` with the following content:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import cors from "cors"
|
import cors from "cors"
|
||||||
import { projectConfig } from "../../../medusa-config"
|
import { projectConfig } from "../../medusa-config"
|
||||||
|
|
||||||
export default (router) => {
|
export default (router) => {
|
||||||
const storeCorsOptions = {
|
const storeCorsOptions = {
|
||||||
@@ -128,11 +128,11 @@ export default (router) => {
|
|||||||
|
|
||||||
You export a function that receives an Express router as a parameter and adds the endpoint `store/hello` to it.
|
You export a function that receives an Express router as a parameter and adds the endpoint `store/hello` to it.
|
||||||
|
|
||||||
Next, create the file `src/api/admin.js` with the following content:
|
Next, create the file `src/api/admin.ts` with the following content:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import cors from "cors"
|
import cors from "cors"
|
||||||
import { projectConfig } from "../../../medusa-config"
|
import { projectConfig } from "../../medusa-config"
|
||||||
|
|
||||||
export default (router) => {
|
export default (router) => {
|
||||||
const adminCorsOptions = {
|
const adminCorsOptions = {
|
||||||
@@ -150,16 +150,16 @@ export default (router) => {
|
|||||||
|
|
||||||
Again, you export a function that receives an Express router as a parameter and adds the endpoint `admin/hello` to it.
|
Again, you export a function that receives an Express router as a parameter and adds the endpoint `admin/hello` to it.
|
||||||
|
|
||||||
Finally, in `src/api/index.js` import the two functions at the beginning of the file:
|
Finally, in `src/api/index.ts` import the two functions at the beginning of the file:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import storeRoutes from "./store"
|
import storeRoutes from "./store"
|
||||||
import adminRoutes from "./admin"
|
import adminRoutes from "./admin"
|
||||||
```
|
```
|
||||||
|
|
||||||
and in the exported function, call each of the functions passing them the Express router:
|
and in the exported function, call each of the functions passing them the Express router:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
export default () => {
|
export default () => {
|
||||||
const router = Router()
|
const router = Router()
|
||||||
|
|
||||||
@@ -178,13 +178,13 @@ Protected routes are routes that should be accessible by logged-in customers or
|
|||||||
|
|
||||||
To make a storefront route protected, first, import the `authenticate-customer` middleware:
|
To make a storefront route protected, first, import the `authenticate-customer` middleware:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import authenticate from "@medusajs/medusa/dist/api/middlewares/authenticate-customer"
|
import authenticate from "@medusajs/medusa/dist/api/middlewares/authenticate-customer"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, add the middleware to your route:
|
Then, add the middleware to your route:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
router.options("/store/hello", cors(corsOptions))
|
router.options("/store/hello", cors(corsOptions))
|
||||||
router.get("/store/hello", cors(corsOptions), authenticate(), async (req, res) => {
|
router.get("/store/hello", cors(corsOptions), authenticate(), async (req, res) => {
|
||||||
if (req.user) {
|
if (req.user) {
|
||||||
@@ -203,15 +203,15 @@ To disallow guest customers from accessing the endpoint, you can throw an error
|
|||||||
|
|
||||||
To make an admin route protected, first, import the `authenticate` middleware:
|
To make an admin route protected, first, import the `authenticate` middleware:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import authenticate from "@medusajs/medusa/dist/api/middlewares/authenticate"
|
import authenticate from "@medusajs/medusa/dist/api/middlewares/authenticate"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, add the middleware to your route:
|
Then, add the middleware to your route:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
router.options("/admin/products/count", cors(corsOptions))
|
router.options("/admin/products/count", cors(corsOptions))
|
||||||
router.get("/admin/products/count", cors(corsOptions), authenticate(), (req, res) => {
|
router.get("/admin/products/count", cors(corsOptions), authenticate(), async (req, res) => {
|
||||||
//access current user
|
//access current user
|
||||||
const id = req.user.userId
|
const id = req.user.userId
|
||||||
const userService = req.scope.resolve("userService")
|
const userService = req.scope.resolve("userService")
|
||||||
@@ -231,7 +231,7 @@ You can retrieve any registered service in your endpoint using `req.scope.resol
|
|||||||
|
|
||||||
Here’s an example of an endpoint that retrieves the count of products in your store:
|
Here’s an example of an endpoint that retrieves the count of products in your store:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
router.get("/admin/products/count", cors(corsOptions), authenticate(), (req, res) => {
|
router.get("/admin/products/count", cors(corsOptions), authenticate(), (req, res) => {
|
||||||
const productService = req.scope.resolve("productService")
|
const productService = req.scope.resolve("productService")
|
||||||
|
|
||||||
|
|||||||
@@ -16,10 +16,16 @@ The migration file must be inside the `src/migrations` directory. When you run t
|
|||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
|
||||||
You can learn more about writing migrations in [Typeorm’s Documentation](https://typeorm.io/migrations).
|
You can alternatively use Typeorm's `generate` command to generate a Migration file from existing database tables, which requires setting up a data source in Typeorm. Check out Typeorm's documentation to learn [how to create a data source](https://typeorm.io/data-source#creating-a-new-datasource), then use the [generate command](https://typeorm.io/using-cli#generate-a-migration-from-existing-table-schema).
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
|
## Write Migration File
|
||||||
|
|
||||||
|
The migration file contains the necessary commands to create the database columns, foreign keys, and more.
|
||||||
|
|
||||||
|
You can learn more about writing the migration file in You can learn more about writing migrations in [Typeorm’s Documentation](https://typeorm.io/migrations).
|
||||||
|
|
||||||
## Build Files
|
## Build Files
|
||||||
|
|
||||||
Before you can run the migrations you need to run the build command to transpile the TypeScript files to JavaScript files:
|
Before you can run the migrations you need to run the build command to transpile the TypeScript files to JavaScript files:
|
||||||
|
|||||||
@@ -1,43 +1,39 @@
|
|||||||
# How to Create a Notification Provider
|
# How to Create a Notification Provider
|
||||||
|
|
||||||
In this document, you’ll learn how to add a Notification Provider to your Medusa server. If you’re unfamiliar with the Notification architecture in Medusa, it is recommended to check out the [architecture overview](overview.md) first.
|
In this document, you’ll learn how to add a Notification Provider to your Medusa server.
|
||||||
|
|
||||||
## Overview
|
:::note
|
||||||
|
|
||||||
A Notification Provider is the custom or third-party service used to handle sending alerts to customers or users when an event occurs.
|
If you’re unfamiliar with the Notification architecture in Medusa, it is recommended to check out the [architecture overview](overview.md) first.
|
||||||
|
|
||||||
For example, you can use SendGrid to send a confirmation email to a customer after they place an order. SendGrid in this example is a Notification Provider.
|
|
||||||
|
|
||||||
:::tip
|
|
||||||
|
|
||||||
If you’re interested in using SendGrid to send Notifications, you can use the [SendGrid](../../../add-plugins/sendgrid.mdx) plugin instead of using your own.
|
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
Adding a Notification Provider is as simple as creating a [Service](../services/create-service.md) file in `src/services`. A Notification Provider is essentially a Service that extends the `NotificationService` from `medusa-interfaces`.
|
|
||||||
|
|
||||||
:::info
|
|
||||||
|
|
||||||
Notification Providers are loaded and installed at the server startup.
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
After creating the Notification Provider Service, you must create a [Subscriber](../subscribers/create-subscriber.md) that subscribes the Notification Provider to specific events.
|
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
Before you start creating a Notification Provider, you need to install a [Medusa server](../../../quickstart/quick-start.md).
|
Before you start creating a Notification Provider, you need to install a [Medusa server](../../../quickstart/quick-start.md).
|
||||||
|
|
||||||
You also need to install and configure Redis. You can check out the documentation “[Set Up Your Development Environment](../../../tutorial/0-set-up-your-development-environment.mdx)” for help.
|
You also need to (../../../tutorial/0-set-up-your-development-environment.mdx#redis) and [configure it with the Medusa server](../../../usage/configurations.md#redis).
|
||||||
|
|
||||||
## Create a Notification Provider
|
## Create a Notification Provider
|
||||||
|
|
||||||
The first step to creating a Notification Provider is to create a file in `src/services` with the following content:
|
Creating a Notification Provider is as simple as creating a TypeScript or JavaScript file in `src/services`. The name of the file is the name of the provider (for example, `sendgrid.ts`). A Notification Provider is essentially a Service that extends the `NotificationService` from `medusa-interfaces`.
|
||||||
|
|
||||||
```jsx
|
For example, create the file `src/services/email-sender.ts` with the following content:
|
||||||
import { NotificationService } from "medusa-interfaces";
|
|
||||||
|
|
||||||
class EmailSenderService extends NotificationService {
|
```ts
|
||||||
|
import { AbstractNotificationService } from "@medusajs/medusa";
|
||||||
|
import { EntityManager } from "typeorm";
|
||||||
|
|
||||||
|
class EmailSenderService extends AbstractNotificationService {
|
||||||
|
protected manager_: EntityManager;
|
||||||
|
protected transactionManager_: EntityManager;
|
||||||
|
|
||||||
|
sendNotification(event: string, data: unknown, attachmentGenerator: unknown): Promise<{ to: string; status: string; data: Record<string, unknown>; }> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
resendNotification(notification: unknown, config: unknown, attachmentGenerator: unknown): Promise<{ to: string; status: string; data: Record<string, unknown>; }> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -64,7 +60,7 @@ The value of this property is also used later when you want to subscribe the Not
|
|||||||
|
|
||||||
For example, in the class you created in the previous code snippet you can add the following property:
|
For example, in the class you created in the previous code snippet you can add the following property:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
static identifier = "email-sender";
|
static identifier = "email-sender";
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -84,13 +80,26 @@ You can learn more about plugins and how to create them in the [Plugins](../plug
|
|||||||
|
|
||||||
Continuing on with the previous example, if you want to use the [`OrderService`](../../../references/services/classes/OrderService.md) later when sending notifications, you can inject it into the constructor:
|
Continuing on with the previous example, if you want to use the [`OrderService`](../../../references/services/classes/OrderService.md) later when sending notifications, you can inject it into the constructor:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
constructor({ orderService }, options) {
|
import { AbstractNotificationService, OrderService } from "@medusajs/medusa";
|
||||||
//you can access options here in case you're
|
|
||||||
//using a plugin
|
|
||||||
super();
|
|
||||||
|
|
||||||
this.orderService = orderService;
|
class EmailSenderService extends AbstractNotificationService {
|
||||||
|
protected manager_: EntityManager;
|
||||||
|
protected transactionManager_: EntityManager;
|
||||||
|
static identifier = "email-sender";
|
||||||
|
protected orderService: OrderService;
|
||||||
|
|
||||||
|
// highlight-start
|
||||||
|
constructor(container, options) {
|
||||||
|
super(container);
|
||||||
|
//you can access options here in case you're
|
||||||
|
//using a plugin
|
||||||
|
|
||||||
|
this.orderService = container.orderService;
|
||||||
|
}
|
||||||
|
// highlight-end
|
||||||
|
|
||||||
|
//...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -119,16 +128,17 @@ This method must return an object containing two properties:
|
|||||||
|
|
||||||
Continuing with the previous example you can have the following implementation of the `sendNotification` method:
|
Continuing with the previous example you can have the following implementation of the `sendNotification` method:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async sendNotification(eventName, eventData, attachmentGenerator) {
|
async sendNotification(event: string, data: any, attachmentGenerator: unknown): Promise<{ to: string; status: string; data: Record<string, unknown>; }> {
|
||||||
if (eventName === 'order.placed') {
|
if (event === 'order.placed') {
|
||||||
//retrieve order
|
//retrieve order
|
||||||
const order = await this.orderService.retrieve(eventData.id);
|
const order = await this.orderService.retrieve(data.id);
|
||||||
//TODO send email
|
//TODO send email
|
||||||
|
|
||||||
console.log('Notification sent');
|
console.log('Notification sent');
|
||||||
return {
|
return {
|
||||||
to: order.email,
|
to: order.email,
|
||||||
|
status: 'done',
|
||||||
data: {
|
data: {
|
||||||
//any data necessary to send the email
|
//any data necessary to send the email
|
||||||
//for example:
|
//for example:
|
||||||
@@ -169,16 +179,17 @@ Similarly to the `sendNotification` method, this method must return an object co
|
|||||||
|
|
||||||
Continuing with the previous example you can have the following implementation of the `resendNotification` method:
|
Continuing with the previous example you can have the following implementation of the `resendNotification` method:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
resendNotification(notification, config, attachmentGenerator) {
|
async resendNotification(notification: any, config: any, attachmentGenerator: unknown): Promise<{ to: string; status: string; data: Record<string, unknown>; }> {
|
||||||
//check if the receiver of the notification should be changed
|
//check if the receiver of the notification should be changed
|
||||||
const to = config.to ? config.to : notification.to;
|
const to: string = config.to ? config.to : notification.to;
|
||||||
|
|
||||||
//TODO resend the notification using the same data that is saved under notification.data
|
//TODO resend the notification using the same data that is saved under notification.data
|
||||||
|
|
||||||
console.log('Notification resent');
|
console.log('Notification resent');
|
||||||
return {
|
return {
|
||||||
to,
|
to,
|
||||||
|
status: 'done',
|
||||||
data: notification.data //you can also make changes to the data
|
data: notification.data //you can also make changes to the data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -208,7 +219,7 @@ This section will not cover the basics of Subscribers. You can read the [Subscri
|
|||||||
|
|
||||||
Following the previous example, to make sure the `email-sender` Notification Provider handles the `order.placed` event, create the file `src/subscribers/notification.js` with the following content:
|
Following the previous example, to make sure the `email-sender` Notification Provider handles the `order.placed` event, create the file `src/subscribers/notification.js` with the following content:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
class NotificationSubscriber {
|
class NotificationSubscriber {
|
||||||
constructor({ notificationService }) {
|
constructor({ notificationService }) {
|
||||||
notificationService.subscribe('order.placed', 'email-sender');
|
notificationService.subscribe('order.placed', 'email-sender');
|
||||||
@@ -232,7 +243,7 @@ Make sure you've configured Redis with your Medusa server as explained in the Pr
|
|||||||
|
|
||||||
Then, start by running your Medusa server:
|
Then, start by running your Medusa server:
|
||||||
|
|
||||||
```bash
|
```bash npm2yarn
|
||||||
npm run start
|
npm run start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ When you run your Medusa server, the Notification Provider is registered on your
|
|||||||
|
|
||||||
### NotificationProvider Entity Overview
|
### NotificationProvider Entity Overview
|
||||||
|
|
||||||
The [`NotificationProvider`](../../../references/js-client/classes/internal-11.NotificationProvider.md) entity only has 2 attributes: `id` and `is_installed`.
|
The `NotificationProvider` entity only has 2 attributes: `id` and `is_installed`.
|
||||||
|
|
||||||
`id` is the value of the static property `identifier` defined inside the notification Service class.
|
`id` is the value of the static property `identifier` defined inside the notification Service class.
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ Notifications can take on other forms such as an SMS or a Slack message.
|
|||||||
|
|
||||||
### How Notification is Created
|
### How Notification is Created
|
||||||
|
|
||||||
Notifications are created in the `NotificationService` class in Medusa’s core after the Notification has been handled by the Notification Provider.
|
Notifications are created in the `NotificationService` class in Medusa’s core after the Notification has been handled by the Notification Provider.
|
||||||
|
|
||||||
The data and additional details that the Notification Provider returns to the `NotificationService` is used to fill some of the attributes of the Notification in the database.
|
The data and additional details that the Notification Provider returns to the `NotificationService` is used to fill some of the attributes of the Notification in the database.
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ A Notification also represents a resent notification. So, when a notification is
|
|||||||
|
|
||||||
### Notification Entity Overview
|
### Notification Entity Overview
|
||||||
|
|
||||||
The two most important properties in the [`Notification`](../../../references/js-client/classes/internal-11.Notification.md) entity are the `to` and `data` properties.
|
The two most important properties in the [`Notification`](../../../references/entities/classes/Notification.md) entity are the `to` and `data` properties.
|
||||||
|
|
||||||
The `to` property is a string that represents the receiver of the Notification. For example, if the Notification was sent to an email address, the `to` property holds the email address the Notification was sent to.
|
The `to` property is a string that represents the receiver of the Notification. For example, if the Notification was sent to an email address, the `to` property holds the email address the Notification was sent to.
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ By default, Medusa has a [manual payment provider](https://github.com/medusajs/m
|
|||||||
|
|
||||||
Adding a Payment Provider is as simple as creating a [service](../services/create-service.md) file in `src/services`. A Payment Provider is essentially a service that extends `AbstractPaymentService` from the core Medusa package `@medusajs/medusa`.
|
Adding a Payment Provider is as simple as creating a [service](../services/create-service.md) file in `src/services`. A Payment Provider is essentially a service that extends `AbstractPaymentService` from the core Medusa package `@medusajs/medusa`.
|
||||||
|
|
||||||
Payment Provider Services must have a static property `identifier`. It is the name that will be used to install and refer to the Payment Provider in the Medusa server.
|
Payment Provider Services must have a static property `identifier`. It's the name that will be used to install and refer to the Payment Provider in the Medusa server.
|
||||||
|
|
||||||
:::tip
|
:::tip
|
||||||
|
|
||||||
@@ -44,12 +44,51 @@ These methods are used at different points in the Checkout flow as well as when
|
|||||||
|
|
||||||
## Create a Payment Provider
|
## Create a Payment Provider
|
||||||
|
|
||||||
The first step to create a payment provider is to create a file in `src/services` with the following content:
|
The first step to create a payment provider is to create a JavaScript or TypeScript file in `src/services`. The file's name should be the name of the payment provider.
|
||||||
|
|
||||||
```jsx
|
For example, create the file `src/services/my-payment.ts` with the following content:
|
||||||
import { AbstractPaymentService } from "@medusajs/medusa"
|
|
||||||
|
|
||||||
class MyPaymentService extends AbstractPaymentService {
|
```ts
|
||||||
|
import { AbstractPaymentService, Cart, Data, Payment, PaymentSession, PaymentSessionStatus, TransactionBaseService } from "@medusajs/medusa"
|
||||||
|
import { EntityManager } from "typeorm";
|
||||||
|
|
||||||
|
class MyPaymentService extends AbstractPaymentService<TransactionBaseService> {
|
||||||
|
protected manager_: EntityManager;
|
||||||
|
protected transactionManager_: EntityManager;
|
||||||
|
|
||||||
|
getPaymentData(paymentSession: PaymentSession): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
updatePaymentData(paymentSessionData: Data, data: Data): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
createPayment(cart: Cart): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
retrievePayment(paymentData: Data): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
updatePayment(paymentSessionData: Data, cart: Cart): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
authorizePayment(paymentSession: PaymentSession, context: Data): Promise<{ data: Data; status: PaymentSessionStatus; }> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
capturePayment(payment: Payment): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
refundPayment(payment: Payment, refundAmount: number): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
cancelPayment(payment: Payment): Promise<Data> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
deletePayment(paymentSession: PaymentSession): Promise<void> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
getStatus(data: Data): Promise<PaymentSessionStatus> {
|
||||||
|
throw new Error("Method not implemented.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,8 +121,9 @@ You can also use the constructor to initialize your integration with the third-p
|
|||||||
|
|
||||||
Additionally, if you’re creating your Payment Provider as an external plugin to be installed on any Medusa server and you want to access the options added for the plugin, you can access it in the constructor. The options are passed as a second parameter:
|
Additionally, if you’re creating your Payment Provider as an external plugin to be installed on any Medusa server and you want to access the options added for the plugin, you can access it in the constructor. The options are passed as a second parameter:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
constructor({}, options) {
|
constructor({ productService }, options) {
|
||||||
|
super();
|
||||||
//you can access options here
|
//you can access options here
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -98,8 +138,11 @@ This method must return an object that is going to be stored in the `data` field
|
|||||||
|
|
||||||
An example of a minimal implementation of `createPayment` that does not interact with any third-party providers:
|
An example of a minimal implementation of `createPayment` that does not interact with any third-party providers:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async createPayment(cart) {
|
import { Cart, Data } from "@medusajs/medusa"
|
||||||
|
//...
|
||||||
|
|
||||||
|
async createPayment(cart: Cart): Promise<Data> {
|
||||||
return {
|
return {
|
||||||
id: 'test-payment',
|
id: 'test-payment',
|
||||||
status: 'pending'
|
status: 'pending'
|
||||||
@@ -117,8 +160,11 @@ This method must return an object containing the data from the third-party provi
|
|||||||
|
|
||||||
An example of a minimal implementation of `retrievePayment` where you don’t need to interact with the third-party provider:
|
An example of a minimal implementation of `retrievePayment` where you don’t need to interact with the third-party provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async retrievePayment(cart) {
|
import { Data } from "@medusajs/medusa"
|
||||||
|
//...
|
||||||
|
|
||||||
|
async retrievePayment(paymentData: Data): Promise<Data> {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -141,9 +187,12 @@ This method returns a string that represents the status. The status must be one
|
|||||||
|
|
||||||
An example of a minimal implementation of `getStatus` where you don’t need to interact with the third-party provider:
|
An example of a minimal implementation of `getStatus` where you don’t need to interact with the third-party provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async getStatus (data) {
|
import { Data, PaymentSessionStatus } from "@medusajs/medusa"
|
||||||
return data.status;
|
//...
|
||||||
|
|
||||||
|
async getStatus(data: Data): Promise<PaymentSessionStatus> {
|
||||||
|
return PaymentSessionStatus.AUTHORIZED;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -171,9 +220,12 @@ This method must return an object that will be stored in the `data` field of the
|
|||||||
|
|
||||||
An example of a minimal implementation of `updatePayment` that does not need to make any updates on the third-party provider or the `data` field of the Payment Session:
|
An example of a minimal implementation of `updatePayment` that does not need to make any updates on the third-party provider or the `data` field of the Payment Session:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async updatePayment(sessionData, cart) {
|
import { Cart, Data } from "@medusajs/medusa";
|
||||||
return sessionData;
|
//...
|
||||||
|
|
||||||
|
async updatePayment(paymentSessionData: Data, cart: Cart): Promise<Data> {
|
||||||
|
return paymentSessionData;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -189,8 +241,11 @@ This method must return an object that will be stored in the `data` field of the
|
|||||||
|
|
||||||
An example of a minimal implementation of `updatePaymentData` that returns the `updatedData` passed in the body of the request as-is to update the `data` field of the Payment Session.
|
An example of a minimal implementation of `updatePaymentData` that returns the `updatedData` passed in the body of the request as-is to update the `data` field of the Payment Session.
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async updatePaymentData(sessionData, updatedData) {
|
import { Data } from "@medusajs/medusa";
|
||||||
|
//...
|
||||||
|
|
||||||
|
async updatePaymentData(paymentSessionData: Data, updatedData: Data): Promise<Data> {
|
||||||
return updatedData;
|
return updatedData;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -210,8 +265,11 @@ You can use this method to interact with the third-party provider to delete data
|
|||||||
|
|
||||||
An example of a minimal implementation of `deletePayment` where no interaction with a third-party provider is required:
|
An example of a minimal implementation of `deletePayment` where no interaction with a third-party provider is required:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async deletePayment(paymentSession) {
|
import { PaymentSession } from "@medusajs/medusa";
|
||||||
|
//...
|
||||||
|
|
||||||
|
async deletePayment(paymentSession: PaymentSession): Promise<void> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -245,15 +303,18 @@ You can utilize this method to interact with the third-party provider and perfor
|
|||||||
|
|
||||||
An example of a minimal implementation of `authorizePayment` that doesn’t need to interact with any third-party provider:
|
An example of a minimal implementation of `authorizePayment` that doesn’t need to interact with any third-party provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async authorizePayment(paymentSession, context) {
|
import { Data, PaymentSession, PaymentSessionStatus } from "@medusajs/medusa";
|
||||||
return {
|
//...
|
||||||
status: 'authorized',
|
|
||||||
data: {
|
async authorizePayment(paymentSession: PaymentSession, context: Data): Promise<{ data: Data; status: PaymentSessionStatus; }> {
|
||||||
id: 'test'
|
return {
|
||||||
}
|
status: PaymentSessionStatus.AUTHORIZED,
|
||||||
};
|
data: {
|
||||||
}
|
id: 'test'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### getPaymentData
|
### getPaymentData
|
||||||
@@ -266,8 +327,11 @@ This method must return an object to be stored in the `data` field of the Paymen
|
|||||||
|
|
||||||
An example of a minimal implementation of `getPaymentData`:
|
An example of a minimal implementation of `getPaymentData`:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async getPaymentData(paymentSession) {
|
import { Data, PaymentSession } from "@medusajs/medusa";
|
||||||
|
//...
|
||||||
|
|
||||||
|
async getPaymentData(paymentSession: PaymentSession): Promise<Data> {
|
||||||
return paymentSession.data;
|
return paymentSession.data;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -286,8 +350,11 @@ This method must return an object that will be stored in the `data` field of the
|
|||||||
|
|
||||||
An example of a minimal implementation of `capturePayment` that doesn’t need to interact with a third-party provider:
|
An example of a minimal implementation of `capturePayment` that doesn’t need to interact with a third-party provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async capturePayment(payment) {
|
import { Data, Payment } from "@medusajs/medusa";
|
||||||
|
//...
|
||||||
|
|
||||||
|
async capturePayment(payment: Payment): Promise<Data> {
|
||||||
return {
|
return {
|
||||||
status: 'captured'
|
status: 'captured'
|
||||||
};
|
};
|
||||||
@@ -308,8 +375,11 @@ This method must return an object that is stored in the `data` field of the Paym
|
|||||||
|
|
||||||
An example of a minimal implementation of `refundPayment` that doesn’t need to interact with a third-party provider:
|
An example of a minimal implementation of `refundPayment` that doesn’t need to interact with a third-party provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async refundPayment(payment, amount) {
|
import { Data, Payment } from "@medusajs/medusa";
|
||||||
|
//...
|
||||||
|
|
||||||
|
async refundPayment(payment: Payment, refundAmount: number): Promise<Data> {
|
||||||
return {
|
return {
|
||||||
id: 'test'
|
id: 'test'
|
||||||
}
|
}
|
||||||
@@ -333,8 +403,11 @@ This method must return an object that is stored in the `data` field of the Paym
|
|||||||
|
|
||||||
An example of a minimal implementation of `cancelPayment` that doesn’t need to interact with a third-party provider:
|
An example of a minimal implementation of `cancelPayment` that doesn’t need to interact with a third-party provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async cancelPayment(payment) {
|
import { Data, Payment } from "@medusajs/medusa";
|
||||||
|
//...
|
||||||
|
|
||||||
|
async cancelPayment(payment: Payment): Promise<Data> {
|
||||||
return {
|
return {
|
||||||
id: 'test'
|
id: 'test'
|
||||||
}
|
}
|
||||||
@@ -361,13 +434,16 @@ If you’re using Medusa’s [Next.js](../../../starters/nextjs-medusa-starter.m
|
|||||||
|
|
||||||
An example of the implementation of `retrieveSavedMethods` taken from Stripe’s Payment Provider:
|
An example of the implementation of `retrieveSavedMethods` taken from Stripe’s Payment Provider:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
|
import { Customer, Data } from "@medusajs/medusa"
|
||||||
|
//...
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Fetches a customers saved payment methods if registered in Stripe.
|
* Fetches a customers saved payment methods if registered in Stripe.
|
||||||
* @param {object} customer - customer to fetch saved cards for
|
* @param {object} customer - customer to fetch saved cards for
|
||||||
* @returns {Promise<Array<object>>} saved payments methods
|
* @returns {Promise<Array<object>>} saved payments methods
|
||||||
*/
|
*/
|
||||||
async retrieveSavedMethods(customer) {
|
async retrieveSavedMethods(customer: Customer): Promise<Data[]> {
|
||||||
if (customer.metadata && customer.metadata.stripe_id) {
|
if (customer.metadata && customer.metadata.stripe_id) {
|
||||||
const methods = await this.stripe_.paymentMethods.list({
|
const methods = await this.stripe_.paymentMethods.list({
|
||||||
customer: customer.metadata.stripe_id,
|
customer: customer.metadata.stripe_id,
|
||||||
|
|||||||
@@ -4,14 +4,16 @@ In this document, you’ll learn how you can create a [Service](./overview.md) a
|
|||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
To create a service, you should create a JavaScript file in `src/services` to hold the service. The name of the file should be the registration name of the service without `Service` as it will be appended to it by default.
|
To create a service, create a TypeScript or JavaScript file in `src/services` to hold the service. The name of the file should be the registration name of the service without `Service` as it will be appended to it by default.
|
||||||
|
|
||||||
For example, if you want to create a service `helloService`, create the file `hello.js` in `src/services` with the following content:
|
For example, if you want to create a service `helloService`, create the file `hello.ts` in `src/services` with the following content:
|
||||||
|
|
||||||
```js
|
```ts
|
||||||
import { TransactionBaseService } from '@medusajs/medusa';
|
import { TransactionBaseService } from '@medusajs/medusa';
|
||||||
|
|
||||||
class HelloService extends TransactionBaseService {
|
class HelloService extends TransactionBaseService {
|
||||||
|
protected manager_: EntityManager;
|
||||||
|
protected transactionManager_: EntityManager;
|
||||||
getMessage() {
|
getMessage() {
|
||||||
return `Welcome to My Store!`
|
return `Welcome to My Store!`
|
||||||
}
|
}
|
||||||
@@ -26,18 +28,18 @@ As the service extends the `TransactionBaseService` class, all services in Medus
|
|||||||
|
|
||||||
So, if you want your service to use another service, simply add it as part of your constructor’s dependencies and set it to a field inside your service’s class:
|
So, if you want your service to use another service, simply add it as part of your constructor’s dependencies and set it to a field inside your service’s class:
|
||||||
|
|
||||||
```js
|
```ts
|
||||||
productService;
|
private productService: ProductService;
|
||||||
|
|
||||||
constructor({ productService }) {
|
constructor(container) {
|
||||||
super();
|
super(container);
|
||||||
this.productService = productService;
|
this.productService = container.productService;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Then, you can use that service anywhere in your custom service:
|
Then, you can use that service anywhere in your custom service:
|
||||||
|
|
||||||
```js
|
```ts
|
||||||
async getProductCount() {
|
async getProductCount() {
|
||||||
return await this.productService.count();
|
return await this.productService.count();
|
||||||
}
|
}
|
||||||
@@ -61,10 +63,10 @@ npm run build
|
|||||||
|
|
||||||
To use your custom service in another custom service, you can have easy access to it in the dependencies injected to the constructor of your service:
|
To use your custom service in another custom service, you can have easy access to it in the dependencies injected to the constructor of your service:
|
||||||
|
|
||||||
```js
|
```ts
|
||||||
constructor({ helloService }) {
|
constructor(container) {
|
||||||
super();
|
super(container);
|
||||||
this.helloService = helloService;
|
this.helloService = container.helloService;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ constructor({ helloService }) {
|
|||||||
|
|
||||||
To use your custom service in an endpoint, you can use `req.scope.resolve` passing it the service’s registration name:
|
To use your custom service in an endpoint, you can use `req.scope.resolve` passing it the service’s registration name:
|
||||||
|
|
||||||
```js
|
```ts
|
||||||
const helloService = req.scope.resolve("helloService")
|
const helloService = req.scope.resolve("helloService")
|
||||||
|
|
||||||
res.json({
|
res.json({
|
||||||
@@ -84,7 +86,7 @@ res.json({
|
|||||||
|
|
||||||
To use your custom service in a subscriber, you can have easy access to it in the subscriber’s dependencies injected to the constructor of your subscriber:
|
To use your custom service in a subscriber, you can have easy access to it in the subscriber’s dependencies injected to the constructor of your subscriber:
|
||||||
|
|
||||||
```js
|
```ts
|
||||||
constructor({ helloService, eventBusService }) {
|
constructor({ helloService, eventBusService }) {
|
||||||
this.helloService = helloService;
|
this.helloService = helloService;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,9 +21,9 @@ Fulfillment providers are loaded and installed on the server startup.
|
|||||||
|
|
||||||
## Create a Fulfillment Provider
|
## Create a Fulfillment Provider
|
||||||
|
|
||||||
The first step is to create the file that will hold the fulfillment provider class in `src/services`:
|
The first step is to create a JavaScript or TypeScript file under `src/services`. For example, create the file `src/services/my-fulfillment.ts` with the following content:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import { FulfillmentService } from "medusa-interfaces"
|
import { FulfillmentService } from "medusa-interfaces"
|
||||||
|
|
||||||
class MyFulfillmentService extends FulfillmentService {
|
class MyFulfillmentService extends FulfillmentService {
|
||||||
@@ -33,7 +33,7 @@ class MyFulfillmentService extends FulfillmentService {
|
|||||||
export default MyFulfillmentService;
|
export default MyFulfillmentService;
|
||||||
```
|
```
|
||||||
|
|
||||||
Fulfillment provider services should extend `FulfillmentService` imported from `medusa-interfaces`.
|
Fulfillment provider services must extend the `FulfillmentService` class imported from `medusa-interfaces`.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ The `FulfillmentProvider` entity has 2 properties: `identifier` and `is_installe
|
|||||||
|
|
||||||
The value of this property will also be used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin/#tag/Region/operation/PostRegionsRegionFulfillmentProviders) to a region.
|
The value of this property will also be used to reference the fulfillment provider throughout Medusa. For example, it is used to [add a fulfillment provider](https://docs.medusajs.com/api/admin/#tag/Region/operation/PostRegionsRegionFulfillmentProviders) to a region.
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
import { FulfillmentService } from "medusa-interfaces"
|
import { FulfillmentService } from "medusa-interfaces"
|
||||||
|
|
||||||
class MyFulfillmentService extends FulfillmentService {
|
class MyFulfillmentService extends FulfillmentService {
|
||||||
@@ -61,14 +61,17 @@ export default MyFulfillmentService;
|
|||||||
|
|
||||||
### constructor
|
### constructor
|
||||||
|
|
||||||
You can use the `constructor` of your fulfillment provider to have access to different services in Medusa through dependency injection.
|
You can use the `constructor` of your fulfillment provider to have access to different services in Medusa through dependency injection. You can access any services you create in Medusa in the first parameter.
|
||||||
|
|
||||||
You can also use the constructor to initialize your integration with the third-party provider. For example, if you use a client to connect to the third-party provider’s APIs, you can initialize it in the constructor and use it in other methods in the service.
|
You can also use the constructor to initialize your integration with the third-party provider. For example, if you use a client to connect to the third-party provider’s APIs, you can initialize it in the constructor and use it in other methods in the service.
|
||||||
|
|
||||||
Additionally, if you’re creating your fulfillment provider as an external plugin to be installed on any Medusa server and you want to access the options added for the plugin, you can access it in the constructor. The options are passed as a second parameter:
|
Additionally, if you’re creating your fulfillment provider as an external plugin to be installed on any Medusa server and you want to access the options added for the plugin, you can access it in the constructor. The options are passed as a second parameter.
|
||||||
|
|
||||||
```jsx
|
For example:
|
||||||
constructor({}, options) {
|
|
||||||
|
```ts
|
||||||
|
constructor({ productService }, options) {
|
||||||
|
super();
|
||||||
//you can access options here
|
//you can access options here
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@@ -83,22 +86,22 @@ These fulfillment options are defined in the `getFulfillmentOptions` method. Thi
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async getFulfillmentOptions () {
|
async getFulfillmentOptions () {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
id: 'my-fulfillment'
|
id: 'my-fulfillment'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'my-fulfillment-dynamic'
|
id: 'my-fulfillment-dynamic'
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
When the admin chooses one of those fulfillment options, the data of the chosen fulfillment option is stored in the `data` property of the shipping option created. This property is used to add any additional data you need to fulfill the order with the third-party provider.
|
When the admin chooses one of those fulfillment options, the data of the chosen fulfillment option is stored in the `data` property of the shipping option created. This property is used to add any additional data you need to fulfill the order with the third-party provider.
|
||||||
|
|
||||||
For that reason, the fulfillment option does not have any required structure and can be of any format that works for your integration.
|
For that reason, the fulfillment option doesn't have any required structure and can be of any format that works for your integration.
|
||||||
|
|
||||||
### validateOption
|
### validateOption
|
||||||
|
|
||||||
@@ -110,7 +113,7 @@ This method returns a boolean. If the result is false, an error is thrown and th
|
|||||||
|
|
||||||
For example, you can use this method to ensure that the `id` in the `data` object is correct:
|
For example, you can use this method to ensure that the `id` in the `data` object is correct:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async validateOption (data) {
|
async validateOption (data) {
|
||||||
return data.id == 'my-fulfillment';
|
return data.id == 'my-fulfillment';
|
||||||
}
|
}
|
||||||
@@ -138,7 +141,7 @@ If everything is valid, this method must return a value that will be stored in t
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
async validateFulfillmentData(optionData, data, cart) {
|
async validateFulfillmentData(optionData, data, cart) {
|
||||||
if (data.id !== "my-fulfillment") {
|
if (data.id !== "my-fulfillment") {
|
||||||
throw new Error("invalid data");
|
throw new Error("invalid data");
|
||||||
@@ -167,7 +170,7 @@ You can use the `data` property in the shipping method (first parameter) to acce
|
|||||||
|
|
||||||
Here is a basic implementation of `createFulfillment` for a fulfillment provider that does not interact with any third-party provider to create the fulfillment:
|
Here is a basic implementation of `createFulfillment` for a fulfillment provider that does not interact with any third-party provider to create the fulfillment:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
createFulfillment(
|
createFulfillment(
|
||||||
methodData,
|
methodData,
|
||||||
fulfillmentItems,
|
fulfillmentItems,
|
||||||
@@ -200,7 +203,7 @@ This method receives as a parameter the `data` object sent with the request that
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
canCalculate(data) {
|
canCalculate(data) {
|
||||||
return data.id === 'my-fulfillment-dynamic';
|
return data.id === 'my-fulfillment-dynamic';
|
||||||
}
|
}
|
||||||
@@ -218,7 +221,7 @@ This method receives three parameters:
|
|||||||
|
|
||||||
If your fulfillment provider does not provide any dynamically calculated rates you can keep the function empty:
|
If your fulfillment provider does not provide any dynamically calculated rates you can keep the function empty:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
calculatePrice() {
|
calculatePrice() {
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -226,7 +229,7 @@ calculatePrice() {
|
|||||||
|
|
||||||
Otherwise, you can use it to calculate the price with a custom logic. For example:
|
Otherwise, you can use it to calculate the price with a custom logic. For example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
calculatePrice (optionData, data, cart) {
|
calculatePrice (optionData, data, cart) {
|
||||||
return cart.items.length * 1000;
|
return cart.items.length * 1000;
|
||||||
}
|
}
|
||||||
@@ -244,7 +247,7 @@ It receives the return created as a parameter. The value it returns is set to th
|
|||||||
|
|
||||||
This is the basic implementation of the method for a fulfillment provider that does not contact with a third-party provider to fulfill the return:
|
This is the basic implementation of the method for a fulfillment provider that does not contact with a third-party provider to fulfill the return:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
createReturn(returnOrder) {
|
createReturn(returnOrder) {
|
||||||
return Promise.resolve({})
|
return Promise.resolve({})
|
||||||
}
|
}
|
||||||
@@ -260,7 +263,7 @@ This method receives the fulfillment being cancelled as a parameter.
|
|||||||
|
|
||||||
This is the basic implementation of the method for a fulfillment provider that does not interact with a third-party provider to cancel the fulfillment:
|
This is the basic implementation of the method for a fulfillment provider that does not interact with a third-party provider to cancel the fulfillment:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
cancelFulfillment(fulfillment) {
|
cancelFulfillment(fulfillment) {
|
||||||
return Promise.resolve({})
|
return Promise.resolve({})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,36 +4,21 @@ In this document, you’ll learn how to create a [Subscriber](overview.md) in yo
|
|||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
Medusa's event system works by pushing data to a Queue that each handler then gets notified of. The queuing system is based on Redis and you will therefore need to make sure that [Redis](https://redis.io) is installed and configured for your Medusa project.
|
Medusa's event system works by pushing data to a Queue that each handler then gets notified of. The queuing system is based on Redis, so it's required for subscribers to work.
|
||||||
|
|
||||||
Then, you need to set your Redis URL in your Medusa server. By default, the Redis URL is `redis://localhost:6379`. If you use a different one, set the following environment variable in `.env`:
|
You can learn how to [install Redis](../../../tutorial/0-set-up-your-development-environment.mdx#redis) and [configure it with Medusa](../../../usage/configurations.md#redis) before you get started.
|
||||||
|
|
||||||
```bash
|
|
||||||
REDIS_URL=<YOUR_REDIS_URL>
|
|
||||||
```
|
|
||||||
|
|
||||||
After that, in `medusa-config.js`, you’ll need to comment out the following line:
|
|
||||||
|
|
||||||
```jsx
|
|
||||||
module.exports = {
|
|
||||||
projectConfig: {
|
|
||||||
redis_url: REDIS_URL, //this line is commented out
|
|
||||||
...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
After that, you are able to listen to events on your server.
|
|
||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
After creating the file under `src/subscribers`, in the constructor of your subscriber, you should listen to events using `eventBusService.subscribe` , where `eventBusService` is a service injected into your subscriber’s constructor.
|
A subscriber is a TypeScript or JavaScript file that is created under `src/subscribers`. Its file name, by convension, should be the class name of the subscriber without the word `Subscriber`. For example, if the subscriber is `HelloSubscriber`, the file name should be `hello.ts`.
|
||||||
|
|
||||||
|
After creating the file under `src/subscribers`, in the constructor of your subscriber, listen to events using `eventBusService.subscribe` , where `eventBusService` is a service injected into your subscriber’s constructor.
|
||||||
|
|
||||||
The `eventBusService.subscribe` method receives the name of the event as a first parameter and as a second parameter a method in your subscriber that will handle this event.
|
The `eventBusService.subscribe` method receives the name of the event as a first parameter and as a second parameter a method in your subscriber that will handle this event.
|
||||||
|
|
||||||
For example, here is the `OrderNotifierSubscriber` class which is created in `src/subscribers/orderNotifier.js`:
|
For example, here is the `OrderNotifierSubscriber` class which is created in `src/subscribers/orderNotifier.js`:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
class OrderNotifierSubscriber {
|
class OrderNotifierSubscriber {
|
||||||
constructor({ eventBusService }) {
|
constructor({ eventBusService }) {
|
||||||
eventBusService.subscribe("order.placed", this.handleOrder);
|
eventBusService.subscribe("order.placed", this.handleOrder);
|
||||||
@@ -47,21 +32,21 @@ class OrderNotifierSubscriber {
|
|||||||
export default OrderNotifierSubscriber;
|
export default OrderNotifierSubscriber;
|
||||||
```
|
```
|
||||||
|
|
||||||
This subscriber will register the method `handleOrder` as one of the handlers of the `order.placed` event. The method `handleOrder` will be executed every time an order is placed, and it will receive the order ID in the `data` parameter. You can then use the order’s details to perform any kind of task you need.
|
This subscriber registers the method `handleOrder` as one of the handlers of the `order.placed` event. The method `handleOrder` will be executed every time an order is placed. It receives the order ID in the `data` parameter. You can then use the order’s details to perform any kind of task you need.
|
||||||
|
|
||||||
:::note
|
:::note
|
||||||
|
|
||||||
The `data` object will not contain other order data. Only the ID of the order. You can retrieve the order information using the `orderService`.
|
The `data` object won't contain other order data. Only the ID of the order. You can retrieve the order information using the `orderService`.
|
||||||
|
|
||||||
:::
|
:::
|
||||||
|
|
||||||
## Using Services in Subscribers
|
## Using Services in Subscribers
|
||||||
|
|
||||||
You can access any service through the dependencies injected to your subscriber’s constructor.
|
You can access any service through the dependencies injected to your subscriber’s constructor.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
```jsx
|
```ts
|
||||||
constructor({ productService, eventBusService }) {
|
constructor({ productService, eventBusService }) {
|
||||||
this.productService = productService;
|
this.productService = productService;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,148 @@
|
|||||||
|
import Tabs from '@theme/Tabs';
|
||||||
|
import TabItem from '@theme/TabItem';
|
||||||
|
|
||||||
|
# How to Use Sales Channels in Storefronts
|
||||||
|
|
||||||
|
In this document, you’ll learn how to use sales channels in your storefront.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
In your storefront, you can filter products by sales channels. You can also associate carts with a sales channel.
|
||||||
|
|
||||||
|
This guide explains how to perform these operations using the Storefront APIs.
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
### Medusa Components
|
||||||
|
|
||||||
|
It's assumed that you already have a Medusa server installed and set up. If not, you can follow our [quickstart guide](../../quickstart/quick-start.md) to get started.
|
||||||
|
|
||||||
|
It is also assumed you already have a storefront set up. It can be a custom storefront or one of Medusa’s storefronts. If you don’t have a storefront set up, you can install either the [Next.js](../../starters/nextjs-medusa-starter.md) or [Gatsby](../../starters/gatsby-medusa-starter.md) storefronts.
|
||||||
|
|
||||||
|
### JS Client
|
||||||
|
|
||||||
|
This guide includes code snippets to send requests to your Medusa server using Medusa’s JS Client and JavaScript’s Fetch API.
|
||||||
|
|
||||||
|
If you follow the JS Client code blocks, it’s assumed you already have [Medusa’s JS Client installed](../../js-client/overview.md) and have [created an instance of the client](../../js-client/overview.md#configuration).
|
||||||
|
|
||||||
|
## Filter Products by Sales Channel
|
||||||
|
|
||||||
|
To filter products by a specific sales channel, pass the `sales_channel_id` query parameter to the List Products endpoint:
|
||||||
|
|
||||||
|
<Tabs groupId="request-tyoe">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.products.list({
|
||||||
|
sales_channel_id: [
|
||||||
|
salesChannelId
|
||||||
|
]
|
||||||
|
})
|
||||||
|
.then(({ products, limit, offset, count }) => {
|
||||||
|
console.log(products.length);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
fetch(`<SERVER_URL>/store/products?sales_channel_id[0]=${salesChannelId}`)
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({ products, limit, offset, count }) => {
|
||||||
|
console.log(products.length)
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
The `sales_channel_id` query parameter is an array of sales channel IDs. You can pass more than one sales channel.
|
||||||
|
|
||||||
|
The request returns an array of products. These are the products that are available in the sales channel.
|
||||||
|
|
||||||
|
## Associate a Cart with a Sales Channel
|
||||||
|
|
||||||
|
### When Creating a Cart
|
||||||
|
|
||||||
|
To associate a sales channel with a cart while creating it, you can pass the `sales_channel_id` request body parameter with the ID of the sales channel:
|
||||||
|
|
||||||
|
<Tabs groupId="request-tyoe">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.carts.create({
|
||||||
|
sales_channel_id: salesChannelId
|
||||||
|
})
|
||||||
|
.then(({cart}) => {
|
||||||
|
console.log(cart.id);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
fetch(`<SERVER_URL>/store/carts`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
sales_channel_id: salesChannelId
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({cart}) => {
|
||||||
|
console.log(cart.id);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
The request returns the created cart.
|
||||||
|
|
||||||
|
### Updating an Existing Cart
|
||||||
|
|
||||||
|
You can update the sales channel of an existing cart by passing the `sales_channel_id` request body parameter with the ID of the sales channel:
|
||||||
|
|
||||||
|
<Tabs groupId="request-tyoe">
|
||||||
|
<TabItem value="client" label="Medusa JS Client" default>
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
medusa.carts.update(cartId, {
|
||||||
|
sales_channel_id: salesChannelId
|
||||||
|
})
|
||||||
|
.then(({cart}) => {
|
||||||
|
console.log(cart.id);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="fetch" label="Fetch API">
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
fetch(`<SERVER_URL>/store/carts/${cartId}`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
sales_channel_id: salesChannelId
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then(({cart}) => console.log(cart.id));
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
|
The request returns the updated cart.
|
||||||
|
|
||||||
|
## What’s Next 🚀
|
||||||
|
|
||||||
|
- Learn how to [Implement the Cart functionality in a storefront](../../guides/carts-in-medusa.mdx).
|
||||||
|
- Learn how to [Implement the Checkout functionality in a storefront](./how-to-implement-checkout-flow.mdx).
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:120](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L120)
|
[models/address.ts:36](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L36)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:123](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L123)
|
[models/address.ts:39](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L39)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:126](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L126)
|
[models/address.ts:42](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L42)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:111](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L111)
|
[models/address.ts:27](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L27)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:133](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L133)
|
[models/address.ts:49](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L49)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:129](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L129)
|
[models/address.ts:45](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L45)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:108](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L108)
|
[models/address.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:104](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L104)
|
[models/address.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:114](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L114)
|
[models/address.ts:30](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L30)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:117](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L117)
|
[models/address.ts:33](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L33)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:145](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L145)
|
[models/address.ts:61](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L61)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:142](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L142)
|
[models/address.ts:58](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L58)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:139](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L139)
|
[models/address.ts:55](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L55)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:136](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L136)
|
[models/address.ts:52](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L52)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -228,4 +228,4 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/address.ts:147](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/address.ts#L147)
|
[models/address.ts:63](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/address.ts#L63)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:62](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L62)
|
[models/batch-job.ts:62](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L62)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:59](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L59)
|
[models/batch-job.ts:59](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L59)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:56](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L56)
|
[models/batch-job.ts:56](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L56)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:33](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L33)
|
[models/batch-job.ts:33](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L33)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:26](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L26)
|
[models/batch-job.ts:26](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L26)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:30](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L30)
|
[models/batch-job.ts:30](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L30)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:47](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L47)
|
[models/batch-job.ts:47](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L47)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:65](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L65)
|
[models/batch-job.ts:65](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L65)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:50](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L50)
|
[models/batch-job.ts:50](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L50)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:53](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L53)
|
[models/batch-job.ts:53](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L53)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:36](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L36)
|
[models/batch-job.ts:36](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L36)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:67](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L67)
|
[models/batch-job.ts:67](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L67)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:23](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L23)
|
[models/batch-job.ts:23](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L23)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -218,7 +218,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:94](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L94)
|
[models/batch-job.ts:94](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L94)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:69](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L69)
|
[models/batch-job.ts:69](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L69)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -246,4 +246,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/batch-job.ts:99](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/batch-job.ts#L99)
|
[models/batch-job.ts:99](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/batch-job.ts#L99)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:226](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L226)
|
[models/cart.ts:226](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L226)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:220](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L220)
|
[models/cart.ts:220](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L220)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:311](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L311)
|
[models/cart.ts:311](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L311)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:320](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L320)
|
[models/cart.ts:320](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L320)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:285](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L285)
|
[models/cart.ts:285](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L285)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:281](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L281)
|
[models/cart.ts:281](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L281)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:335](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L335)
|
[models/cart.ts:335](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L335)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:263](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L263)
|
[models/cart.ts:263](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L263)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:216](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L216)
|
[models/cart.ts:216](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L216)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:342](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L342)
|
[models/cart.ts:344](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L344)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:341](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L341)
|
[models/cart.ts:343](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L343)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:277](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L277)
|
[models/cart.ts:277](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L277)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -190,7 +190,17 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:317](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L317)
|
[models/cart.ts:317](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L317)
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
### item\_tax\_total
|
||||||
|
|
||||||
|
• `Optional` **item\_tax\_total**: ``null`` \| `number`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[models/cart.ts:336](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L336)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -200,7 +210,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:241](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L241)
|
[models/cart.ts:241](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L241)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -210,7 +220,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:323](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L323)
|
[models/cart.ts:323](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L323)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -220,7 +230,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:213](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L213)
|
[models/cart.ts:213](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L213)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -230,7 +240,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:300](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L300)
|
[models/cart.ts:300](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L300)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -240,7 +250,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:314](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L314)
|
[models/cart.ts:314](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L314)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -250,7 +260,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:296](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L296)
|
[models/cart.ts:296](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L296)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -260,7 +270,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:287](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L287)
|
[models/cart.ts:287](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L287)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -270,7 +280,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:292](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L292)
|
[models/cart.ts:292](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L292)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -280,7 +290,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:340](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L340)
|
[models/cart.ts:342](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L342)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -290,7 +300,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:337](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L337)
|
[models/cart.ts:339](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L339)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -300,7 +310,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:249](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L249)
|
[models/cart.ts:249](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L249)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -310,7 +320,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:245](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L245)
|
[models/cart.ts:245](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L245)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -320,7 +330,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:332](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L332)
|
[models/cart.ts:332](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L332)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -330,7 +340,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:326](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L326)
|
[models/cart.ts:326](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L326)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -340,7 +350,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:236](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L236)
|
[models/cart.ts:236](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L236)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -350,7 +360,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:230](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L230)
|
[models/cart.ts:230](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L230)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -360,7 +370,17 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:305](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L305)
|
[models/cart.ts:305](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L305)
|
||||||
|
|
||||||
|
___
|
||||||
|
|
||||||
|
### shipping\_tax\_total
|
||||||
|
|
||||||
|
• `Optional` **shipping\_tax\_total**: ``null`` \| `number`
|
||||||
|
|
||||||
|
#### Defined in
|
||||||
|
|
||||||
|
[models/cart.ts:337](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L337)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -370,7 +390,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:334](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L334)
|
[models/cart.ts:334](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L334)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -380,7 +400,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:339](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L339)
|
[models/cart.ts:341](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L341)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -390,7 +410,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:336](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L336)
|
[models/cart.ts:338](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L338)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -400,7 +420,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:338](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L338)
|
[models/cart.ts:340](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L340)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -410,7 +430,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:308](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L308)
|
[models/cart.ts:308](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L308)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -424,7 +444,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -438,7 +458,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:344](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L344)
|
[models/cart.ts:346](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L346)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -452,4 +472,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/cart.ts:351](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/cart.ts#L351)
|
[models/cart.ts:353](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/cart.ts#L353)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-image.ts:23](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-image.ts#L23)
|
[models/claim-image.ts:23](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-image.ts#L23)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-image.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-image.ts#L19)
|
[models/claim-image.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-image.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-image.ts:29](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-image.ts#L29)
|
[models/claim-image.ts:29](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-image.ts#L29)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-image.ts:26](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-image.ts#L26)
|
[models/claim-image.ts:26](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-image.ts#L26)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -128,4 +128,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-image.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-image.ts#L31)
|
[models/claim-image.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-image.ts#L31)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:42](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L42)
|
[models/claim-item.ts:42](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L42)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:38](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L38)
|
[models/claim-item.ts:38](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L38)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L34)
|
[models/claim-item.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L34)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:50](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L50)
|
[models/claim-item.ts:50](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L50)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:46](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L46)
|
[models/claim-item.ts:46](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L46)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:84](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L84)
|
[models/claim-item.ts:84](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L84)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:64](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L64)
|
[models/claim-item.ts:64](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L64)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:67](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L67)
|
[models/claim-item.ts:67](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L67)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:61](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L61)
|
[models/claim-item.ts:61](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L61)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:81](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L81)
|
[models/claim-item.ts:81](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L81)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:58](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L58)
|
[models/claim-item.ts:58](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L58)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:54](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L54)
|
[models/claim-item.ts:54](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L54)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -208,4 +208,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-item.ts:86](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-item.ts#L86)
|
[models/claim-item.ts:86](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-item.ts#L86)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:69](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L69)
|
[models/claim-order.ts:69](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L69)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:107](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L107)
|
[models/claim-order.ts:107](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L107)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:66](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L66)
|
[models/claim-order.ts:66](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L66)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:110](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L110)
|
[models/claim-order.ts:110](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L110)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:116](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L116)
|
[models/claim-order.ts:116](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L116)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:63](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L63)
|
[models/claim-order.ts:63](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L63)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:101](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L101)
|
[models/claim-order.ts:101](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L101)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:125](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L125)
|
[models/claim-order.ts:125](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L125)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:122](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L122)
|
[models/claim-order.ts:122](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L122)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:119](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L119)
|
[models/claim-order.ts:119](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L119)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:80](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L80)
|
[models/claim-order.ts:80](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L80)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:76](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L76)
|
[models/claim-order.ts:76](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L76)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:56](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L56)
|
[models/claim-order.ts:56](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L56)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:104](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L104)
|
[models/claim-order.ts:104](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L104)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:83](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L83)
|
[models/claim-order.ts:83](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L83)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:91](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L91)
|
[models/claim-order.ts:91](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L91)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:87](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L87)
|
[models/claim-order.ts:87](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L87)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:96](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L96)
|
[models/claim-order.ts:96](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L96)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:72](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L72)
|
[models/claim-order.ts:72](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L72)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:113](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L113)
|
[models/claim-order.ts:113](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L113)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -258,4 +258,4 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-order.ts:127](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-order.ts#L127)
|
[models/claim-order.ts:127](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-order.ts#L127)
|
||||||
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-tag.ts:14](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-tag.ts#L14)
|
[models/claim-tag.ts:14](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-tag.ts#L14)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-tag.ts:11](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-tag.ts#L11)
|
[models/claim-tag.ts:11](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-tag.ts#L11)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -108,4 +108,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/claim-tag.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/claim-tag.ts#L16)
|
[models/claim-tag.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/claim-tag.ts#L16)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L31)
|
[models/country.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L31)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:15](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L15)
|
[models/country.ts:15](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L15)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L19)
|
[models/country.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:22](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L22)
|
[models/country.ts:22](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L22)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L28)
|
[models/country.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:25](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L25)
|
[models/country.ts:25](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L25)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:39](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L39)
|
[models/country.ts:39](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L39)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -88,4 +88,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/country.ts:35](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/country.ts#L35)
|
[models/country.ts:35](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/country.ts#L35)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/currency.ts:8](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/currency.ts#L8)
|
[models/currency.ts:8](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/currency.ts#L8)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/currency.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/currency.ts#L20)
|
[models/currency.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/currency.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/currency.ts:17](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/currency.ts#L17)
|
[models/currency.ts:17](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/currency.ts#L17)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/currency.ts:11](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/currency.ts#L11)
|
[models/currency.ts:11](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/currency.ts#L11)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,4 +58,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/currency.ts:14](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/currency.ts#L14)
|
[models/currency.ts:14](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/currency.ts#L14)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L37)
|
[models/custom-shipping-option.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:33](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L33)
|
[models/custom-shipping-option.ts:33](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L33)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:40](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L40)
|
[models/custom-shipping-option.ts:40](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L40)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:21](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L21)
|
[models/custom-shipping-option.ts:21](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L21)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:29](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L29)
|
[models/custom-shipping-option.ts:29](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L29)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:25](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L25)
|
[models/custom-shipping-option.ts:25](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L25)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -148,4 +148,4 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/custom-shipping-option.ts:42](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/custom-shipping-option.ts#L42)
|
[models/custom-shipping-option.ts:42](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/custom-shipping-option.ts#L42)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:38](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L38)
|
[models/customer.ts:38](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L38)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L34)
|
[models/customer.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L34)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:24](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L24)
|
[models/customer.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:27](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L27)
|
[models/customer.ts:27](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L27)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:69](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L69)
|
[models/customer.ts:69](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L69)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:50](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L50)
|
[models/customer.ts:50](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L50)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:30](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L30)
|
[models/customer.ts:30](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L30)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:72](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L72)
|
[models/customer.ts:72](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L72)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:53](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L53)
|
[models/customer.ts:53](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L53)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:44](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L44)
|
[models/customer.ts:44](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L44)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:47](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L47)
|
[models/customer.ts:47](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L47)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -180,7 +180,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:41](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L41)
|
[models/customer.ts:41](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L41)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -208,4 +208,4 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer.ts:74](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer.ts#L74)
|
[models/customer.ts:74](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer.ts#L74)
|
||||||
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer-group.ts:18](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer-group.ts#L18)
|
[models/customer-group.ts:18](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer-group.ts#L18)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer-group.ts:26](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer-group.ts#L26)
|
[models/customer-group.ts:26](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer-group.ts#L26)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer-group.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer-group.ts#L13)
|
[models/customer-group.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer-group.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer-group.ts:23](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer-group.ts#L23)
|
[models/customer-group.ts:23](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer-group.ts#L23)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -114,7 +114,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -128,4 +128,4 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/customer-group.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/customer-group.ts#L28)
|
[models/customer-group.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/customer-group.ts#L28)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:22](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L22)
|
[models/discount.ts:22](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L22)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:52](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L52)
|
[models/discount.ts:52](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L52)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:36](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L36)
|
[models/discount.ts:36](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L36)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:25](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L25)
|
[models/discount.ts:25](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L25)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:78](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L78)
|
[models/discount.ts:78](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L78)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:43](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L43)
|
[models/discount.ts:43](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L43)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:39](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L39)
|
[models/discount.ts:39](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L39)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:69](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L69)
|
[models/discount.ts:69](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L69)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:33](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L33)
|
[models/discount.ts:33](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L33)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:29](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L29)
|
[models/discount.ts:29](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L29)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:49](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L49)
|
[models/discount.ts:49](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L49)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -194,7 +194,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:75](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L75)
|
[models/discount.ts:75](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L75)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -204,7 +204,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:72](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L72)
|
[models/discount.ts:72](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L72)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -214,13 +214,13 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:55](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L55)
|
[models/discount.ts:55](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L55)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
### upperCaseCode
|
### upperCaseCodeAndTrim
|
||||||
|
|
||||||
▸ `Private` **upperCaseCode**(): `void`
|
▸ `Private` **upperCaseCodeAndTrim**(): `void`
|
||||||
|
|
||||||
#### Returns
|
#### Returns
|
||||||
|
|
||||||
@@ -228,4 +228,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount.ts:80](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount.ts#L80)
|
[models/discount.ts:80](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount.ts#L80)
|
||||||
@@ -32,7 +32,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:127](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L127)
|
[models/discount-condition.ts:127](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L127)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:57](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L57)
|
[models/discount-condition.ts:57](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L57)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:53](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L53)
|
[models/discount-condition.ts:53](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L53)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:130](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L130)
|
[models/discount-condition.ts:130](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L130)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:49](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L49)
|
[models/discount-condition.ts:49](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L49)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:113](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L113)
|
[models/discount-condition.ts:113](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L113)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:99](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L99)
|
[models/discount-condition.ts:99](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L99)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:85](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L85)
|
[models/discount-condition.ts:85](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L85)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:71](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L71)
|
[models/discount-condition.ts:71](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L71)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -160,7 +160,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:43](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L43)
|
[models/discount-condition.ts:43](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L43)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -188,4 +188,4 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition.ts:132](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition.ts#L132)
|
[models/discount-condition.ts:132](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition.ts#L132)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L20)
|
[models/discount-condition-customer-group.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L31)
|
[models/discount-condition-customer-group.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L31)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:24](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L24)
|
[models/discount-condition-customer-group.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:17](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L17)
|
[models/discount-condition-customer-group.ts:17](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L17)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L28)
|
[models/discount-condition-customer-group.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L37)
|
[models/discount-condition-customer-group.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,4 +78,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-customer-group.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-customer-group.ts#L34)
|
[models/discount-condition-customer-group.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-customer-group.ts#L34)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L20)
|
[models/discount-condition-product.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L31)
|
[models/discount-condition-product.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L31)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L28)
|
[models/discount-condition-product.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L37)
|
[models/discount-condition-product.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:24](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L24)
|
[models/discount-condition-product.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:17](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L17)
|
[models/discount-condition-product.ts:17](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L17)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,4 +78,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product.ts#L34)
|
[models/discount-condition-product.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product.ts#L34)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L20)
|
[models/discount-condition-product-collection.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L31)
|
[models/discount-condition-product-collection.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L31)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L28)
|
[models/discount-condition-product-collection.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L37)
|
[models/discount-condition-product-collection.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:24](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L24)
|
[models/discount-condition-product-collection.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:17](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L17)
|
[models/discount-condition-product-collection.ts:17](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L17)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,4 +78,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-collection.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-collection.ts#L34)
|
[models/discount-condition-product-collection.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-collection.ts#L34)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L20)
|
[models/discount-condition-product-tag.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L31)
|
[models/discount-condition-product-tag.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L31)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L28)
|
[models/discount-condition-product-tag.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L37)
|
[models/discount-condition-product-tag.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:24](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L24)
|
[models/discount-condition-product-tag.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:17](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L17)
|
[models/discount-condition-product-tag.ts:17](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L17)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,4 +78,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-tag.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-tag.ts#L34)
|
[models/discount-condition-product-tag.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-tag.ts#L34)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L20)
|
[models/discount-condition-product-type.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L31)
|
[models/discount-condition-product-type.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L31)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L28)
|
[models/discount-condition-product-type.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L37)
|
[models/discount-condition-product-type.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:24](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L24)
|
[models/discount-condition-product-type.ts:24](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L24)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:17](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L17)
|
[models/discount-condition-product-type.ts:17](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L17)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -78,4 +78,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-condition-product-type.ts:34](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-condition-product-type.ts#L34)
|
[models/discount-condition-product-type.ts:34](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-condition-product-type.ts#L34)
|
||||||
@@ -28,7 +28,7 @@ SoftDeletableEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:38](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L38)
|
[models/discount-rule.ts:38](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L38)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:41](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L41)
|
[models/discount-rule.ts:41](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L41)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ SoftDeletableEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ SoftDeletableEntity.deleted\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
[interfaces/models/soft-deletable-entity.ts:7](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/soft-deletable-entity.ts#L7)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:22](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L22)
|
[models/discount-rule.ts:22](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L22)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ SoftDeletableEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -100,7 +100,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:44](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L44)
|
[models/discount-rule.ts:44](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L44)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:28](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L28)
|
[models/discount-rule.ts:28](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L28)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ SoftDeletableEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:31](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L31)
|
[models/discount-rule.ts:31](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L31)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -148,4 +148,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/discount-rule.ts:46](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/discount-rule.ts#L46)
|
[models/discount-rule.ts:46](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/discount-rule.ts#L46)
|
||||||
@@ -28,7 +28,7 @@ BaseEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:54](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L54)
|
[models/draft-order.ts:54](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L54)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:43](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L43)
|
[models/draft-order.ts:43](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L43)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:39](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L39)
|
[models/draft-order.ts:39](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L39)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:57](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L57)
|
[models/draft-order.ts:57](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L57)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ BaseEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:35](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L35)
|
[models/draft-order.ts:35](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L35)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ BaseEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:66](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L66)
|
[models/draft-order.ts:66](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L66)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:63](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L63)
|
[models/draft-order.ts:63](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L63)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:60](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L60)
|
[models/draft-order.ts:60](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L60)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:51](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L51)
|
[models/draft-order.ts:51](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L51)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:47](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L47)
|
[models/draft-order.ts:47](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L47)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:30](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L30)
|
[models/draft-order.ts:30](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L30)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ BaseEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -184,4 +184,4 @@ BaseEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/draft-order.ts:68](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/draft-order.ts#L68)
|
[models/draft-order.ts:68](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/draft-order.ts#L68)
|
||||||
@@ -28,7 +28,7 @@ BaseEntity.constructor
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:79](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L79)
|
[models/fulfillment.ts:79](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L79)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:29](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L29)
|
[models/fulfillment.ts:29](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L29)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:25](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L25)
|
[models/fulfillment.ts:25](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L25)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ BaseEntity.created\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
[interfaces/models/base-entity.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:73](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L73)
|
[models/fulfillment.ts:73](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L73)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ BaseEntity.id
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
[interfaces/models/base-entity.ts:13](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L13)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:85](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L85)
|
[models/fulfillment.ts:85](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L85)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:62](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L62)
|
[models/fulfillment.ts:62](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L62)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:82](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L82)
|
[models/fulfillment.ts:82](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L82)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:48](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L48)
|
[models/fulfillment.ts:48](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L48)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:45](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L45)
|
[models/fulfillment.ts:45](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L45)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:41](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L41)
|
[models/fulfillment.ts:41](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L41)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:56](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L56)
|
[models/fulfillment.ts:56](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L56)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:52](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L52)
|
[models/fulfillment.ts:52](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L52)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:76](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L76)
|
[models/fulfillment.ts:76](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L76)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:37](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L37)
|
[models/fulfillment.ts:37](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L37)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:33](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L33)
|
[models/fulfillment.ts:33](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L33)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:67](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L67)
|
[models/fulfillment.ts:67](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L67)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:70](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L70)
|
[models/fulfillment.ts:70](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L70)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ BaseEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
[interfaces/models/base-entity.ts:19](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/interfaces/models/base-entity.ts#L19)
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
@@ -244,4 +244,4 @@ BaseEntity.updated\_at
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment.ts:87](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment.ts#L87)
|
[models/fulfillment.ts:87](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment.ts#L87)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-item.ts:16](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-item.ts#L16)
|
[models/fulfillment-item.ts:16](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-item.ts#L16)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-item.ts:9](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-item.ts#L9)
|
[models/fulfillment-item.ts:9](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-item.ts#L9)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-item.ts:20](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-item.ts#L20)
|
[models/fulfillment-item.ts:20](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-item.ts#L20)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-item.ts:12](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-item.ts#L12)
|
[models/fulfillment-item.ts:12](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-item.ts#L12)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -58,4 +58,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-item.ts:23](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-item.ts#L23)
|
[models/fulfillment-item.ts:23](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-item.ts#L23)
|
||||||
@@ -18,7 +18,7 @@ displayed_sidebar: entitiesSidebar
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-provider.ts:6](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-provider.ts#L6)
|
[models/fulfillment-provider.ts:6](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-provider.ts#L6)
|
||||||
|
|
||||||
___
|
___
|
||||||
|
|
||||||
@@ -28,4 +28,4 @@ ___
|
|||||||
|
|
||||||
#### Defined in
|
#### Defined in
|
||||||
|
|
||||||
[models/fulfillment-provider.ts:9](https://github.com/medusajs/medusa/blob/6225aa57b/packages/medusa/src/models/fulfillment-provider.ts#L9)
|
[models/fulfillment-provider.ts:9](https://github.com/medusajs/medusa/blob/c4c83c971/packages/medusa/src/models/fulfillment-provider.ts#L9)
|
||||||
Loaded 100 of 628 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user