chore(docs): Generated API Reference (#2417)
Co-authored-by: shahednasser <shahednasser@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c4c83c9717
commit
10b9b0dc49
@@ -3,5 +3,5 @@ const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
medusa.admin.customerGroups.list()
|
||||
.then(({ customer_groups, limit, offset, count }) => {
|
||||
console.log(customer_groups.id);
|
||||
console.log(customer_groups.length);
|
||||
});
|
||||
|
||||
53
docs/api/admin/components/schemas/address_fields.yaml
Normal file
53
docs/api/admin/components/schemas/address_fields.yaml
Normal file
@@ -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
|
||||
@@ -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
|
||||
@@ -222,10 +222,10 @@ paths:
|
||||
$ref: paths/collections.yaml
|
||||
/collections/{id}:
|
||||
$ref: paths/collections_{id}.yaml
|
||||
/customers:
|
||||
$ref: paths/customers.yaml
|
||||
/customers/{id}:
|
||||
$ref: paths/customers_{id}.yaml
|
||||
/currencies:
|
||||
$ref: paths/currencies.yaml
|
||||
/currencies/{code}:
|
||||
$ref: paths/currencies_{code}.yaml
|
||||
/customer-groups/{id}/customers/batch:
|
||||
$ref: paths/customer-groups_{id}_customers_batch.yaml
|
||||
/customer-groups:
|
||||
@@ -234,10 +234,10 @@ paths:
|
||||
$ref: paths/customer-groups_{id}.yaml
|
||||
/customer-groups/{id}/customers:
|
||||
$ref: paths/customer-groups_{id}_customers.yaml
|
||||
/currencies:
|
||||
$ref: paths/currencies.yaml
|
||||
/currencies/{code}:
|
||||
$ref: paths/currencies_{code}.yaml
|
||||
/customers:
|
||||
$ref: paths/customers.yaml
|
||||
/customers/{id}:
|
||||
$ref: paths/customers_{id}.yaml
|
||||
/discounts/{id}/regions/{region_id}:
|
||||
$ref: paths/discounts_{id}_regions_{region_id}.yaml
|
||||
/discounts/{discount_id}/conditions:
|
||||
|
||||
@@ -31,10 +31,10 @@ post:
|
||||
format: email
|
||||
billing_address:
|
||||
description: The Address to be used for billing purposes.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
$ref: ../components/schemas/address_fields.yaml
|
||||
shipping_address:
|
||||
description: The Address to be used for shipping.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
$ref: ../components/schemas/address_fields.yaml
|
||||
discounts:
|
||||
description: An array of Discount codes to add to the Draft Order.
|
||||
type: array
|
||||
|
||||
@@ -25,10 +25,10 @@ post:
|
||||
format: email
|
||||
billing_address:
|
||||
description: The Address to be used for billing purposes.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
$ref: ../components/schemas/address_fields.yaml
|
||||
shipping_address:
|
||||
description: The Address to be used for shipping.
|
||||
$ref: ../components/schemas/address.yaml
|
||||
$ref: ../components/schemas/address_fields.yaml
|
||||
items:
|
||||
description: The Line Items that have been received.
|
||||
type: array
|
||||
|
||||
@@ -68,11 +68,11 @@ post:
|
||||
billing_address:
|
||||
description: Billing address
|
||||
anyOf:
|
||||
- $ref: ../components/schemas/address.yaml
|
||||
- $ref: ../components/schemas/address_fields.yaml
|
||||
shipping_address:
|
||||
description: Shipping address
|
||||
anyOf:
|
||||
- $ref: ../components/schemas/address.yaml
|
||||
- $ref: ../components/schemas/address_fields.yaml
|
||||
items:
|
||||
description: The Line Items for the order
|
||||
type: array
|
||||
|
||||
Reference in New Issue
Block a user