docs: update OAS for loyalty plugin (#12836)
* updates * cleanup * generate OAS * update links
This commit is contained in:
@@ -1,77 +0,0 @@
|
||||
post:
|
||||
operationId: PostGiftCardInvitationsCodeAccept
|
||||
summary: Accept Customer's Gift Card Invitation
|
||||
x-sidebar-summary: Accept Invitation
|
||||
description: Accept the logged-in customer's gift card invitation
|
||||
x-authenticated: true
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: code
|
||||
in: path
|
||||
description: The gift card invitation's code.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: x-publishable-api-key
|
||||
in: header
|
||||
description: Publishable API Key created in the Medusa Admin.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
|
||||
if a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields.
|
||||
|
||||
without prefix it will replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: >-
|
||||
../code_samples/Shell/store_gift-card-invitations_{code}_accept/post.sh
|
||||
tags:
|
||||
- Gift Card Invitations
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreGiftCardInvitationResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
@@ -1,77 +0,0 @@
|
||||
post:
|
||||
operationId: PostGiftCardInvitationsCodeReject
|
||||
summary: Reject Customer's Gift Card Invitation
|
||||
x-sidebar-summary: Reject Invitation
|
||||
description: Reject the logged-in customer's gift card invitation
|
||||
x-authenticated: true
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: code
|
||||
in: path
|
||||
description: The gift card invitation's code.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: x-publishable-api-key
|
||||
in: header
|
||||
description: Publishable API Key created in the Medusa Admin.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
|
||||
if a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields.
|
||||
|
||||
without prefix it will replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: >-
|
||||
../code_samples/Shell/store_gift-card-invitations_{code}_reject/post.sh
|
||||
tags:
|
||||
- Gift Card Invitations
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreGiftCardInvitationResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
@@ -1,161 +0,0 @@
|
||||
get:
|
||||
operationId: GetGiftCards
|
||||
summary: List Customer's Gift Cards
|
||||
x-sidebar-summary: List Gift Cards
|
||||
description: >-
|
||||
Retrieve a customer's gift cards. The gift cards can be filtered by fields
|
||||
such as `id`. The gift cards can also be sorted or paginated.
|
||||
x-authenticated: true
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: x-publishable-api-key
|
||||
in: header
|
||||
description: Publishable API Key created in the Medusa Admin.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
- name: id
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
title: id
|
||||
description: Filter by a gift card ID.
|
||||
- type: array
|
||||
description: Filter by gift card IDs.
|
||||
items:
|
||||
type: string
|
||||
title: id
|
||||
description: A gift card's ID.
|
||||
- name: limit
|
||||
in: query
|
||||
description: Limit the number of items returned in the list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: limit
|
||||
description: Limit the number of items returned in the list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: offset
|
||||
in: query
|
||||
description: The number of items to skip when retrieving a list.
|
||||
required: false
|
||||
schema:
|
||||
type: number
|
||||
title: offset
|
||||
description: The number of items to skip when retrieving a list.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: order
|
||||
in: query
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is ascending.
|
||||
To change the order to descending, prefix the field name with `-`.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: order
|
||||
description: >-
|
||||
The field to sort the data by. By default, the sort order is
|
||||
ascending. To change the order to descending, prefix the field name
|
||||
with `-`.
|
||||
externalDocs:
|
||||
url: '#pagination'
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data. If
|
||||
a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields. Without prefix it will
|
||||
replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
- name: $and
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an AND condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $and
|
||||
- name: $or
|
||||
in: query
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is the
|
||||
same type as the expected query parameters.
|
||||
required: false
|
||||
schema:
|
||||
type: array
|
||||
description: >-
|
||||
Join query parameters with an OR condition. Each object's content is
|
||||
the same type as the expected query parameters.
|
||||
items:
|
||||
type: object
|
||||
title: $or
|
||||
- name: status
|
||||
in: query
|
||||
required: false
|
||||
schema:
|
||||
oneOf:
|
||||
- type: string
|
||||
description: Filter by a gift card's status.
|
||||
enum:
|
||||
- pending
|
||||
- redeemed
|
||||
- type: array
|
||||
description: Filter by gift card statuses.
|
||||
items:
|
||||
type: string
|
||||
description: A gift card status.
|
||||
enum:
|
||||
- pending
|
||||
- redeemed
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_gift-cards/get.sh
|
||||
tags:
|
||||
- Gift Cards
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
@@ -1,16 +1,16 @@
|
||||
get:
|
||||
operationId: GetGiftCardsId
|
||||
summary: Get Customer's Gift Card
|
||||
operationId: GetGiftCardsIdorcode
|
||||
summary: Get a Gift Card
|
||||
x-sidebar-summary: Get Gift Card
|
||||
description: >-
|
||||
Retrieve the logged-in customer's gift card by its ID. You can expand the
|
||||
gift card's relations or select the fields that should be returned.
|
||||
x-authenticated: true
|
||||
Retrieve a gift card by its ID or code. You can expand the gift card's
|
||||
relations or select the fields that should be returned.
|
||||
x-authenticated: false
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
- name: idOrCode
|
||||
in: path
|
||||
description: The gift card's ID.
|
||||
description: The gift card's ID or code.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
@@ -24,13 +24,10 @@ get:
|
||||
url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
description: |-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
|
||||
if a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields.
|
||||
|
||||
without prefix it will replace the entire default fields.
|
||||
if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
without prefix it will replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
@@ -46,7 +43,7 @@ get:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{id}/get.sh
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{idOrCode}/get.sh
|
||||
tags:
|
||||
- Gift Cards
|
||||
responses:
|
||||
@@ -64,9 +61,6 @@ get:
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
@@ -1,14 +1,16 @@
|
||||
post:
|
||||
operationId: PostGiftCardsIdRedeem
|
||||
summary: Redeem Customer's Gift Card
|
||||
operationId: PostGiftCardsIdorcodeRedeem
|
||||
summary: Redeem a Gift Card
|
||||
x-sidebar-summary: Redeem Gift Card
|
||||
description: Redeem the logged-in customer's gift card
|
||||
description: >-
|
||||
Redeem a gift card by its ID or code. The gift card will be added to the
|
||||
logged-in customer's store credit account.
|
||||
x-authenticated: true
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
- name: idOrCode
|
||||
in: path
|
||||
description: The gift card's ID.
|
||||
description: The gift card's ID or code.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
@@ -22,13 +24,10 @@ post:
|
||||
url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
description: |-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
|
||||
if a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields.
|
||||
|
||||
without prefix it will replace the entire default fields.
|
||||
if a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.
|
||||
without prefix it will replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
@@ -40,11 +39,14 @@ post:
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{id}_redeem/post.sh
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{idOrCode}_redeem/post.sh
|
||||
tags:
|
||||
- Gift Cards
|
||||
responses:
|
||||
@@ -66,9 +68,6 @@ post:
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
@@ -1,84 +0,0 @@
|
||||
post:
|
||||
operationId: PostGiftCardsIdInvitation
|
||||
summary: Send Gift Card Invitation
|
||||
x-sidebar-summary: Send Invitation
|
||||
description: >-
|
||||
Send a gift card invitation to a customer's email address. The gift card
|
||||
must belong to the logged-in customer, and it must not have been redeemed
|
||||
yet.
|
||||
x-authenticated: true
|
||||
x-ignoreCleanup: true
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
description: The gift card's ID.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: x-publishable-api-key
|
||||
in: header
|
||||
description: Publishable API Key created in the Medusa Admin.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
externalDocs:
|
||||
url: https://docs.medusajs.com/api/store#publishable-api-key
|
||||
- name: fields
|
||||
in: query
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
|
||||
if a field is prefixed with `+` it will be added to the default fields,
|
||||
using `-` will remove it from the default fields.
|
||||
|
||||
without prefix it will replace the entire default fields.
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
title: fields
|
||||
description: >-
|
||||
Comma-separated fields that should be included in the returned data.
|
||||
If a field is prefixed with `+` it will be added to the default
|
||||
fields, using `-` will remove it from the default fields. Without
|
||||
prefix it will replace the entire default fields.
|
||||
externalDocs:
|
||||
url: '#select-fields-and-relations'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreCreateGiftCardInvitation.yaml
|
||||
x-codeSamples:
|
||||
- lang: Shell
|
||||
label: cURL
|
||||
source:
|
||||
$ref: ../code_samples/Shell/store_gift-cards_{id}_invitation/post.sh
|
||||
tags:
|
||||
- Gift Cards
|
||||
responses:
|
||||
'200':
|
||||
description: OK
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: ../components/schemas/StoreGiftCardResponse.yaml
|
||||
'400':
|
||||
$ref: ../components/responses/400_error.yaml
|
||||
'401':
|
||||
$ref: ../components/responses/unauthorized.yaml
|
||||
'404':
|
||||
$ref: ../components/responses/not_found_error.yaml
|
||||
'409':
|
||||
$ref: ../components/responses/invalid_state_error.yaml
|
||||
'422':
|
||||
$ref: ../components/responses/invalid_request_error.yaml
|
||||
'500':
|
||||
$ref: ../components/responses/500_error.yaml
|
||||
security:
|
||||
- cookie_auth: []
|
||||
- jwt_token: []
|
||||
x-badges:
|
||||
- text: Cloud
|
||||
description: >
|
||||
This API route is only available in [Medusa
|
||||
Cloud](https://docs.medusajs.com/cloud/loyalty-plugin).
|
||||
Reference in New Issue
Block a user