chore(docs): Generated API Reference (#3308)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2023-02-22 14:45:23 +02:00
committed by GitHub
co-authored by olivermrbl
parent 3f5b7fbe7e
commit e3305188bd
31 changed files with 9056 additions and 8251 deletions
+186 -181
View File
@@ -262,151 +262,6 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/collections/{id}:
get:
operationId: GetCollectionsCollection
summary: Get a Collection
description: Retrieves a Product Collection.
parameters:
- in: path
name: id
required: true
description: The id of the Product Collection
schema:
type: string
x-codegen:
method: retrieve
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.collections.retrieve(collection_id)
.then(({ collection }) => {
console.log(collection.id);
});
- lang: Shell
label: cURL
source: |
curl --location --request GET 'https://medusa-url.com/store/collections/{id}'
tags:
- Collection
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreCollectionsRes'
'400':
$ref: '#/components/responses/400_error'
'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'
/collections:
get:
operationId: GetCollections
summary: List Collections
description: Retrieve a list of Product Collection.
parameters:
- in: query
name: offset
description: The number of collections to skip before starting to collect the collections set
schema:
type: integer
default: 0
- in: query
name: limit
description: The number of collections to return
schema:
type: integer
default: 10
- in: query
name: created_at
description: Date comparison for when resulting collections were created.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: updated_at
description: Date comparison for when resulting collections were updated.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
x-codegen:
method: list
queryParams: StoreGetCollectionsParams
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.collections.list()
.then(({ collections, limit, offset, count }) => {
console.log(collections.length);
});
- lang: Shell
label: cURL
source: |
curl --location --request GET 'https://medusa-url.com/store/collections'
tags:
- Collection
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreCollectionsListRes'
'400':
$ref: '#/components/responses/400_error'
'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'
/carts/{id}/shipping-methods:
post:
operationId: PostCartsCartShippingMethod
@@ -1143,16 +998,16 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/gift-cards/{code}:
/collections/{id}:
get:
operationId: GetGiftCardsCode
summary: Get Gift Card by Code
description: Retrieves a Gift Card by its associated unique code.
operationId: GetCollectionsCollection
summary: Get a Collection
description: Retrieves a Product Collection.
parameters:
- in: path
name: code
name: id
required: true
description: The unique Gift Card code.
description: The id of the Product Collection
schema:
type: string
x-codegen:
@@ -1163,23 +1018,121 @@ paths:
source: |
import Medusa from "@medusajs/medusa-js"
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
medusa.giftCards.retrieve(code)
.then(({ gift_card }) => {
console.log(gift_card.id);
medusa.collections.retrieve(collection_id)
.then(({ collection }) => {
console.log(collection.id);
});
- lang: Shell
label: cURL
source: |
curl --location --request GET 'https://medusa-url.com/store/gift-cards/{code}'
curl --location --request GET 'https://medusa-url.com/store/collections/{id}'
tags:
- Gift Card
- Collection
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreGiftCardsRes'
$ref: '#/components/schemas/StoreCollectionsRes'
'400':
$ref: '#/components/responses/400_error'
'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'
/collections:
get:
operationId: GetCollections
summary: List Collections
description: Retrieve a list of Product Collection.
parameters:
- in: query
name: offset
description: The number of collections to skip before starting to collect the collections set
schema:
type: integer
default: 0
- in: query
name: limit
description: The number of collections to return
schema:
type: integer
default: 10
- in: query
name: created_at
description: Date comparison for when resulting collections were created.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
- in: query
name: updated_at
description: Date comparison for when resulting collections were updated.
schema:
type: object
properties:
lt:
type: string
description: filter by dates less than this date
format: date
gt:
type: string
description: filter by dates greater than this date
format: date
lte:
type: string
description: filter by dates less than or equal to this date
format: date
gte:
type: string
description: filter by dates greater than or equal to this date
format: date
x-codegen:
method: list
queryParams: StoreGetCollectionsParams
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.collections.list()
.then(({ collections, limit, offset, count }) => {
console.log(collections.length);
});
- lang: Shell
label: cURL
source: |
curl --location --request GET 'https://medusa-url.com/store/collections'
tags:
- Collection
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreCollectionsListRes'
'400':
$ref: '#/components/responses/400_error'
'404':
@@ -1929,6 +1882,53 @@ paths:
$ref: '#/components/responses/invalid_request_error'
'500':
$ref: '#/components/responses/500_error'
/gift-cards/{code}:
get:
operationId: GetGiftCardsCode
summary: Get Gift Card by Code
description: Retrieves a Gift Card by its associated unique code.
parameters:
- in: path
name: code
required: true
description: The unique Gift Card code.
schema:
type: string
x-codegen:
method: retrieve
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.giftCards.retrieve(code)
.then(({ gift_card }) => {
console.log(gift_card.id);
});
- lang: Shell
label: cURL
source: |
curl --location --request GET 'https://medusa-url.com/store/gift-cards/{code}'
tags:
- Gift Card
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/StoreGiftCardsRes'
'400':
$ref: '#/components/responses/400_error'
'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}/complete:
post:
operationId: PostOrderEditsOrderEditComplete
@@ -7685,6 +7685,11 @@ components:
description: The total of gift cards with taxes
type: integer
example: 0
returnable_items:
description: The items that are returnable as part of the order, order swaps or order claims
type: array
items:
$ref: '#/components/schemas/LineItem'
created_at:
description: The date with timezone at which the resource was created.
type: string
@@ -10798,27 +10803,6 @@ components:
exists:
type: boolean
description: Whether email exists or not.
StoreCollectionsListRes:
type: object
properties:
collections:
type: array
items:
$ref: '#/components/schemas/ProductCollection'
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page
StoreCollectionsRes:
type: object
properties:
collection:
$ref: '#/components/schemas/ProductCollection'
StorePostCartsCartShippingMethodReq:
type: object
required:
@@ -10985,11 +10969,27 @@ components:
data:
type: object
description: The data to update the payment session with.
StoreGiftCardsRes:
StoreCollectionsListRes:
type: object
properties:
gift_card:
$ref: '#/components/schemas/GiftCard'
collections:
type: array
items:
$ref: '#/components/schemas/ProductCollection'
count:
type: integer
description: The total number of items available
offset:
type: integer
description: The number of items skipped before these items
limit:
type: integer
description: The number of items per page
StoreCollectionsRes:
type: object
properties:
collection:
$ref: '#/components/schemas/ProductCollection'
StorePostCustomersCustomerAddressesReq:
type: object
required:
@@ -11125,6 +11125,11 @@ components:
metadata:
description: Metadata about the customer.
type: object
StoreGiftCardsRes:
type: object
properties:
gift_card:
$ref: '#/components/schemas/GiftCard'
StorePostOrderEditsOrderEditDecline:
type: object
properties: