chore(docs): Generated API Reference (#2927)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
19d7be31eb
commit
cd32795595
@@ -343,175 +343,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-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:
|
||||
type: object
|
||||
properties:
|
||||
collection:
|
||||
$ref: '#/components/schemas/ProductCollection'
|
||||
'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-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:
|
||||
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
|
||||
'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
|
||||
@@ -1429,6 +1260,175 @@ paths:
|
||||
provider_id:
|
||||
type: string
|
||||
description: The ID of the Payment Provider.
|
||||
'/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-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:
|
||||
type: object
|
||||
properties:
|
||||
collection:
|
||||
$ref: '#/components/schemas/ProductCollection'
|
||||
'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-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:
|
||||
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
|
||||
'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'
|
||||
/customers/me/addresses:
|
||||
post:
|
||||
operationId: PostCustomersCustomerAddresses
|
||||
|
||||
Reference in New Issue
Block a user