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

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
github-actions[bot]
2023-05-31 17:10:23 +03:00
committed by GitHub
parent 5c8ef2d370
commit 274056a38d
7 changed files with 215 additions and 46 deletions

View File

@@ -6353,6 +6353,19 @@
"type": "string"
}
},
{
"in": "query",
"name": "location_id",
"style": "form",
"explode": false,
"description": "Locations ids to search for.",
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
},
{
"in": "query",
"name": "expand",
@@ -17748,6 +17761,65 @@
}
}
},
{
"in": "query",
"name": "description",
"description": "A param for search reservation descriptions",
"schema": {
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"properties": {
"contains": {
"type": "string",
"description": "filter by reservation description containing search string."
},
"starts_with": {
"type": "string",
"description": "filter by reservation description starting with search string."
},
"ends_with": {
"type": "string",
"description": "filter by reservation description ending with search string."
}
}
}
]
}
},
{
"in": "query",
"name": "created_at",
"description": "Date comparison for when resulting reservations 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": "offset",
@@ -25509,36 +25581,7 @@
"inventory_items": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/InventoryItemDTO"
},
{
"type": "object",
"properties": {
"location_levels": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/InventoryLevelDTO"
}
]
}
},
"variants": {
"type": "array",
"items": {
"allOf": [
{
"$ref": "#/components/schemas/ProductVariant"
}
]
}
}
}
}
]
"$ref": "#/components/schemas/DecoratedInventoryItemDTO"
}
},
"count": {
@@ -31178,7 +31221,7 @@
"reservations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReservationItemDTO"
"$ref": "#/components/schemas/ExtendedReservationItem"
}
},
"count": {
@@ -33281,6 +33324,43 @@
}
}
},
"DecoratedInventoryItemDTO": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/InventoryItemDTO"
},
{
"type": "object",
"required": [
"stocked_quantity",
"reserved_quantity"
],
"properties": {
"location_levels": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InventoryLevelDTO"
}
},
"variants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductVariant"
}
},
"stocked_quantity": {
"type": "number",
"description": "The total quantity of the item in stock across levels"
},
"reserved_quantity": {
"type": "number",
"description": "The total quantity of the item available across levels"
}
}
}
]
},
"Discount": {
"title": "Discount",
"description": "Represents a discount that can be applied to a cart for promotional purposes.",
@@ -33987,6 +34067,27 @@
}
}
},
"ExtendedReservationItem": {
"type": "object",
"allOf": [
{
"$ref": "#/components/schemas/ReservationItemDTO"
},
{
"type": "object",
"properties": {
"line_item": {
"description": "optional line item",
"$ref": "#/components/schemas/LineItem"
},
"inventory_item": {
"description": "inventory item from inventory module",
"$ref": "#/components/schemas/InventoryItemDTO"
}
}
}
]
},
"ExtendedStoreDTO": {
"allOf": [
{

View File

@@ -8,20 +8,7 @@ properties:
inventory_items:
type: array
items:
allOf:
- $ref: ./InventoryItemDTO.yaml
- type: object
properties:
location_levels:
type: array
items:
allOf:
- $ref: ./InventoryLevelDTO.yaml
variants:
type: array
items:
allOf:
- $ref: ./ProductVariant.yaml
$ref: ./DecoratedInventoryItemDTO.yaml
count:
type: integer
description: The total number of items available

View File

@@ -8,7 +8,7 @@ properties:
reservations:
type: array
items:
$ref: ./ReservationItemDTO.yaml
$ref: ./ExtendedReservationItem.yaml
count:
type: integer
description: The total number of items available

View File

@@ -0,0 +1,22 @@
type: object
allOf:
- $ref: ./InventoryItemDTO.yaml
- type: object
required:
- stocked_quantity
- reserved_quantity
properties:
location_levels:
type: array
items:
$ref: ./InventoryLevelDTO.yaml
variants:
type: array
items:
$ref: ./ProductVariant.yaml
stocked_quantity:
type: number
description: The total quantity of the item in stock across levels
reserved_quantity:
type: number
description: The total quantity of the item available across levels

View File

@@ -0,0 +1,11 @@
type: object
allOf:
- $ref: ./ReservationItemDTO.yaml
- type: object
properties:
line_item:
description: optional line item
$ref: ./LineItem.yaml
inventory_item:
description: inventory item from inventory module
$ref: ./InventoryItemDTO.yaml

View File

@@ -10,6 +10,15 @@ get:
description: The ID of the Inventory Item.
schema:
type: string
- in: query
name: location_id
style: form
explode: false
description: Locations ids to search for.
schema:
type: array
items:
type: string
- in: query
name: expand
description: Comma separated list of relations to include in the results.

View File

@@ -51,6 +51,45 @@ get:
description: >-
filter by reservation quantity greater than or equal to this
number
- in: query
name: description
description: A param for search reservation descriptions
schema:
oneOf:
- type: string
- type: object
properties:
contains:
type: string
description: filter by reservation description containing search string.
starts_with:
type: string
description: filter by reservation description starting with search string.
ends_with:
type: string
description: filter by reservation description ending with search string.
- in: query
name: created_at
description: Date comparison for when resulting reservations 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: offset
description: How many Reservations to skip in the result.