docs: generate OAS with events (#12394)

* docs: generate OAS with events

* small change
This commit is contained in:
Shahed Nasser
2025-05-07 14:57:03 +03:00
committed by GitHub
parent 262064fe96
commit a3bdb3e383
515 changed files with 3808 additions and 189 deletions

View File

@@ -72,3 +72,19 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: generateResetPasswordTokenWorkflow
x-events:
- name: auth.password_reset
payload: |-
```ts
{
entity_id, // The identifier of the user or customer. For example, an email address.
actor_type, // The type of actor. For example, "customer", "user", or custom.
token, // The generated token.
}
```
description: >-
Emitted when a reset password token is generated. You can listen to this
event
to send a reset password email to the user or customer, for example.
deprecated: false

View File

@@ -77,3 +77,13 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: createCartWorkflow
x-events:
- name: cart.created
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: Emitted when a cart is created.
deprecated: false

View File

@@ -165,3 +165,33 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: updateCartWorkflow
x-events:
- name: cart.updated
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: Emitted when a cart's details are updated.
deprecated: false
- name: cart.customer_updated
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: Emitted when the customer in the cart is updated.
deprecated: false
- name: cart.region_updated
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: |-
Emitted when the cart's region is updated. This
event is emitted alongside the `cart.updated` event.
deprecated: false

View File

@@ -127,3 +127,17 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: completeCartWorkflow
x-events:
- name: order.placed
payload: |-
```ts
{
id, // The ID of the order
}
```
description: >-
Emitted when an order is placed, or when a draft order is converted to
an
order.
deprecated: false

View File

@@ -76,3 +76,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: transferCartCustomerWorkflow
x-events: []

View File

@@ -77,3 +77,13 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: addToCartWorkflow
x-events:
- name: cart.updated
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: Emitted when a cart's details are updated.
deprecated: false

View File

@@ -84,6 +84,16 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: updateLineItemInCartWorkflow
x-events:
- name: cart.updated
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: Emitted when a cart's details are updated.
deprecated: false
delete:
operationId: DeleteCartsIdLineItemsLine_id
summary: Remove Line Item from Cart
@@ -192,3 +202,4 @@ delete:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: deleteLineItemsWorkflow
x-events: []

View File

@@ -69,6 +69,7 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: updateCartPromotionsWorkflow
x-events: []
delete:
operationId: DeleteCartsIdPromotions
summary: Remove Promotions from Cart
@@ -145,3 +146,4 @@ delete:
application/json:
schema:
$ref: ../components/schemas/StoreCartRemovePromotion.yaml
x-events: []

View File

@@ -96,3 +96,13 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: addShippingMethodToCartWorkflow
x-events:
- name: cart.updated
payload: |-
```ts
{
id, // The ID of the cart
}
```
description: Emitted when a cart's details are updated.
deprecated: false

View File

@@ -64,3 +64,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: updateTaxLinesWorkflow
x-events: []

View File

@@ -80,3 +80,13 @@ post:
security:
- cookie_auth: []
- jwt_token: []
x-events:
- name: customer.created
payload: |-
```ts
[{
id, // The ID of the customer
}]
```
description: Emitted when a customer is created.
deprecated: false

View File

@@ -157,3 +157,13 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: updateCustomersWorkflow
x-events:
- name: customer.updated
payload: |-
```ts
[{
id, // The ID of the customer
}]
```
description: Emitted when a customer is updated.
deprecated: false

View File

@@ -255,7 +255,11 @@ post:
province:
type: string
title: province
description: The address's province.
description: The address's ISO 3166-2 province code. Must be lower-case.
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
postal_code:
type: string
title: postal_code
@@ -310,3 +314,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: createCustomerAddressesWorkflow
x-events: []

View File

@@ -177,7 +177,11 @@ post:
province:
type: string
title: province
description: The address's province.
description: The address's ISO 3166-2 province code. Must be lower-case.
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
postal_code:
type: string
title: postal_code
@@ -234,6 +238,7 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: updateCustomerAddressesWorkflow
x-events: []
delete:
operationId: DeleteCustomersMeAddressesAddress_id
summary: Remove Customer's Address
@@ -348,3 +353,4 @@ delete:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: deleteCustomerAddressesWorkflow
x-events: []

View File

@@ -198,3 +198,4 @@ get:
- cookie_auth: []
- jwt_token: []
x-workflow: getOrdersListWorkflow
x-events: []

View File

@@ -69,3 +69,4 @@ get:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: getOrderDetailWorkflow
x-events: []

View File

@@ -82,3 +82,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: acceptOrderTransferWorkflow
x-events: []

View File

@@ -77,3 +77,4 @@ post:
security:
- cookie_auth: []
- jwt_token: []
x-events: []

View File

@@ -78,3 +78,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: declineOrderTransferRequestWorkflow
x-events: []

View File

@@ -82,3 +82,4 @@ post:
security:
- cookie_auth: []
- jwt_token: []
x-events: []

View File

@@ -72,3 +72,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: createPaymentCollectionForCartWorkflow
x-events: []

View File

@@ -78,3 +78,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: createPaymentSessionsWorkflow
x-events: []

View File

@@ -758,17 +758,21 @@ get:
- name: province
in: query
description: >-
The province the products are being viewed from. This is useful to
narrow down the tax context when calculating product variant prices with
taxes.
The lower-case ISO 3166-2 province code the products are being viewed
from. This is useful to narrow down the tax context when calculating
product variant prices with taxes.
required: false
schema:
type: string
title: province
description: >-
The province the products are being viewed from. This is useful to
narrow down the tax context when calculating product variant prices
with taxes.
The lower-case ISO 3166-2 province code the products are being viewed
from. This is useful to narrow down the tax context when calculating
product variant prices with taxes.
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
- name: sales_channel_id
in: query
required: false

View File

@@ -73,16 +73,21 @@ get:
- name: province
in: query
description: >-
The province the product is being viewed from. This is useful to narrow
down the tax context when calculating product variant prices with taxes.
The lower-case ISO 3166-2 province code the product is being viewed
from. This is useful to narrow down the tax context when calculating
product variant prices with taxes.
required: false
schema:
type: string
title: province
description: >-
The province the product is being viewed from. This is useful to
narrow down the tax context when calculating product variant prices
with taxes.
The lower-case ISO 3166-2 province code the product is being viewed
from. This is useful to narrow down the tax context when calculating
product variant prices with taxes.
example: us-ca
externalDocs:
url: https://en.wikipedia.org/wiki/ISO_3166-2
description: Learn more about ISO 3166-2
- name: cart_id
in: query
description: >-

View File

@@ -147,3 +147,4 @@ get:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: listShippingOptionsForCartWorkflow
x-events: []

View File

@@ -91,3 +91,4 @@ post:
'500':
$ref: ../components/responses/500_error.yaml
x-workflow: calculateShippingOptionsPricesWorkflow
x-events: []