Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(oas): declare x-codegen on Admin routes - D to PRI #3092

Merged
merged 4 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { EntityManager } from "typeorm"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostGiftCardsReq"
* x-codegen:
* method: create
Comment on lines +19 to +20
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create(
payload: AdminPostGiftCardsReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminGiftCardsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { EntityManager } from "typeorm"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Gift Card to delete.
* x-codegen:
* method: delete
Comment on lines +11 to +12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminGiftCardsDeleteRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import { defaultAdminGiftCardFields, defaultAdminGiftCardRelations } from "./"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Gift Card.
* x-codegen:
* method: retrieve
Comment on lines +11 to +12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrieve(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminGiftCardsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import { isDefined } from "medusa-core-utils"
* - (query) offset=0 {number} The number of items to skip before the results.
* - (query) limit=50 {number} Limit the number of items returned.
* - (query) q {string} a search term to search by code or display ID
* x-codegen:
* method: list
* queryParams: AdminGetGiftCardsParams
Comment on lines +19 to +21
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(
query?: AdminGetGiftCardsParams,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminGiftCardsListRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { EntityManager } from "typeorm"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostGiftCardsGiftCardReq"
* x-codegen:
* method: update
Comment on lines +22 to +23
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update(
id: string,
payload: AdminPostGiftCardsGiftCardReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminGiftCardsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { EntityManager } from "typeorm"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostInvitesInviteAcceptReq"
* x-codegen:
* method: accept
Comment on lines +18 to +19
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accept(
payload: AdminPostInvitesInviteAcceptReq,
customHeaders: Record<string, any> = {}
): ResponsePromise {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { EntityManager } from "typeorm"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostInvitesReq"
* x-codegen:
* method: create
Comment on lines +19 to +20
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create(
payload: AdminPostInvitesPayload,
customHeaders: Record<string, any> = {}
): ResponsePromise {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import InviteService from "../../../../services/invite"
* x-authenticated: true
* parameters:
* - (path) invite_id=* {string} The ID of the Invite
* x-codegen:
* method: delete
Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminInviteDeleteRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import InviteService from "../../../../services/invite"
* summary: "Lists Invites"
* description: "Lists all Invites"
* x-authenticated: true
* x-codegen:
* method: list
Comment on lines +9 to +10
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminListInvitesRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { EntityManager } from "typeorm"
* x-authenticated: true
* parameters:
* - (path) invite_id=* {string} The ID of the Invite
* x-codegen:
* method: resend
Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resend(id: string, customHeaders: Record<string, any> = {}): ResponsePromise {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/notes/create-note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import { EntityManager } from "typeorm"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostNotesReq"
* x-codegen:
* method: create
Comment on lines +18 to +19
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create(
payload: AdminPostNotesReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotesRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/notes/delete-note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import NoteService from "../../../../services/note"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Note to delete.
* x-codegen:
* method: delete
Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotesDeleteRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/notes/get-note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import NoteService from "../../../../services/note"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the note to retrieve.
* x-codegen:
* method: retrieve
Comment on lines +11 to +12
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrieve(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotesRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
3 changes: 3 additions & 0 deletions packages/medusa/src/api/routes/admin/notes/list-notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ import { validator } from "../../../../utils/validator"
* - (query) limit=50 {number} The number of notes to get
* - (query) offset=0 {number} The offset at which to get notes
* - (query) resource_id {string} The ID which the notes belongs to
* x-codegen:
* method: list
* queryParams: AdminGetNotesParams
Comment on lines +18 to +20
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(
query?: AdminGetNotesParams,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotesListRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/notes/update-note.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { EntityManager } from "typeorm"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostNotesNoteReq"
* x-codegen:
* method: update
Comment on lines +19 to +20
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update(
id: string,
payload: AdminPostNotesNoteReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotesRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ import { validator } from "../../../../utils/validator"
* - (query) resource_id {string} The ID of the resource that the Notification refers to.
* - (query) to {string} The address that the Notification was sent to. This will usually be an email address, but represent other addresses such as a chat bot user id
* - (query) include_resends {string} A boolean indicating whether the result set should include resent notifications or not
* x-codegen:
* method: list
* queryParams: AdminGetNotificationsParams
Comment on lines +30 to +32
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(
query?: AdminGetNotificationsParams,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotificationsListRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { validator } from "../../../../utils/validator"
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostNotificationsNotificationResendReq"
* x-codegen:
* method: resend
Comment on lines +25 to +26
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resend(
id: string,
payload: AdminPostNotificationsNotificationResendReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminNotificationsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
* schema:
* $ref: "#/components/schemas/AdminPostOrderEditsEditLineItemsReq"
* x-authenticated: true
* x-codegen:
* method: addLineItem
Comment on lines +24 to +25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addLineItem(
id: string,
payload: AdminPostOrderEditsEditLineItemsReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the OrderEdit.
* x-codegen:
* method: cancel
Comment on lines +17 to +18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancel(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import {
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the order edit.
* x-codegen:
* method: confirm
Comment on lines +17 to +18
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirm(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import {
* schema:
* $ref: "#/components/schemas/AdminPostOrderEditsReq"
* x-authenticated: true
* x-codegen:
* method: create
Comment on lines +21 to +22
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create(
payload: AdminPostOrderEditsReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import {
* parameters:
* - (path) id=* {string} The ID of the Order Edit to delete from.
* - (path) item_id=* {string} The ID of the order edit item to delete from order.
* x-codegen:
* method: removeLineItem
Comment on lines +18 to +19
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removeLineItem(
orderEditId: string,
itemId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { OrderEditService } from "../../../../services"
* parameters:
* - (path) id=* {string} The ID of the Order Edit to delete.
* - (path) change_id=* {string} The ID of the Order Edit Item Change to delete.
* x-codegen:
* method: deleteItemChange
Comment on lines +13 to +14
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleteItemChange(
orderEditId: string,
itemChangeId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditItemChangeDeleteRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { OrderEditService } from "../../../../services"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order Edit to delete.
* x-codegen:
* method: delete
Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditDeleteRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import { FindParams } from "../../../../types/common"
* - (path) id=* {string} The ID of the OrderEdit.
* - (query) expand {string} Comma separated list of relations to include in the results.
* - (query) fields {string} Comma separated list of fields to include in the results.
* x-codegen:
* method: retrieve
* queryParams: GetOrderEditsOrderEditParams
Comment on lines +15 to +17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

retrieve(
id: string,
query?: GetOrderEditsOrderEditParams,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import { IsOptional, IsString } from "class-validator"
* - (query) offset=0 {number} The offset of items in response
* - (query) expand {string} Comma separated list of relations to include in the results.
* - (query) fields {string} Comma separated list of fields to include in the results.
* x-codegen:
* method: list
* queryParams: GetOrderEditsParams
Comment on lines +19 to +21
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list(
query?: GetOrderEditsParams,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsListRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import {
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order Edit to request confirmation from.
* x-codegen:
* method: requestConfirmation
Comment on lines +22 to +23
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requestConfirmation(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostOrderEditsEditLineItemsLineItemReq"
* x-codegen:
* method: updateLineItem
Comment on lines +24 to +25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updateLineItem(
orderEditId: string,
itemId: string,
payload: AdminPostOrderEditsEditLineItemsLineItemReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostOrderEditsOrderEditReq"
* x-codegen:
* method: update
Comment on lines +24 to +25
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update(
id: string,
payload: AdminPostOrderEditsOrderEditReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrderEditsRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,16 @@ import { EntityManager } from "typeorm"
* operationId: "PostOrdersOrderShippingMethods"
* summary: "Add a Shipping Method"
* description: "Adds a Shipping Method to an Order. If another Shipping Method exists with the same Shipping Profile, the previous Shipping Method will be replaced."
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order.
* - (body) price=* {integer} The price (excluding VAT) that should be charged for the Shipping Method
* - (body) option_id=* {string} The ID of the Shipping Option to create the Shipping Method from.
* - (body) data {object} The data required for the Shipping Option to create a Shipping Method. This will depend on the Fulfillment Provider.
* requestBody:
* content:
* application/json:
* schema:
* $ref: "#/components/schemas/AdminPostOrdersOrderShippingMethodsReq"
* x-authenticated: true
* x-codegen:
* method: addShippingMethod
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addShippingMethod(
id: string,
payload: AdminPostOrdersOrderShippingMethodsReq,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down Expand Up @@ -98,6 +102,23 @@ export default async (req, res) => {
res.status(200).json({ order })
}

/**
* @schema AdminPostOrdersOrderShippingMethodsReq
* type: object
* required:
* - price
* - option_id
* properties:
* price:
* type: number
* description: The price (excluding VAT) that should be charged for the Shipping Method
* option_id:
* type: string
* description: The ID of the Shipping Option to create the Shipping Method from.
* date:
* type: object
* description: The data required for the Shipping Option to create a Shipping Method. This will depend on the Fulfillment Provider.
*/
export class AdminPostOrdersOrderShippingMethodsReq {
@IsInt()
@IsNotEmpty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { EntityManager } from "typeorm"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order.
* x-codegen:
* method: archive
Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

archive(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/orders/cancel-claim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { MedusaError } from "medusa-core-utils"
* parameters:
* - (path) id=* {string} The ID of the Order.
* - (path) claim_id=* {string} The ID of the Claim.
* x-codegen:
* method: cancelClaim
Comment on lines +16 to +17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancelClaim(
id: string,
claimId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { MedusaError } from "medusa-core-utils"
* - (path) id=* {string} The ID of the Order which the Claim relates to.
* - (path) claim_id=* {string} The ID of the Claim which the Fulfillment relates to.
* - (path) fulfillment_id=* {string} The ID of the Fulfillment.
* x-codegen:
* method: cancelClaimFulfillment
Comment on lines +21 to +22
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancelClaimFulfillment(
id: string,
claimId: string,
fulfillmentId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import { MedusaError } from "medusa-core-utils"
* - (path) id=* {string} The ID of the Order which the Swap relates to.
* - (path) swap_id=* {string} The ID of the Swap which the Fulfillment relates to.
* - (path) fulfillment_id=* {string} The ID of the Fulfillment.
* x-codegen:
* method: cancelSwapFulfillment
Comment on lines +21 to +22
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancelSwapFulfillment(
id: string,
swapId: string,
fulfillmentId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { IInventoryService } from "../../../../interfaces"
* parameters:
* - (path) id=* {string} The ID of the Order which the Fulfillment relates to.
* - (path) fulfillment_id=* {string} The ID of the Fulfillment
* x-codegen:
* method: cancelFulfillment
Comment on lines +22 to +23
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancelFulfillment(
id: string,
fulfillmentId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/orders/cancel-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { EntityManager } from "typeorm"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order.
* x-codegen:
* method: cancel
Comment on lines +14 to +15
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancel(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
2 changes: 2 additions & 0 deletions packages/medusa/src/api/routes/admin/orders/cancel-swap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import { MedusaError } from "medusa-core-utils"
* parameters:
* - (path) id=* {string} The ID of the Order.
* - (path) swap_id=* {string} The ID of the Swap.
* x-codegen:
* method: cancelSwap
Comment on lines +16 to +17
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cancelSwap(
id: string,
swapId: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { EntityManager } from "typeorm"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order.
* x-codegen:
* method: capturePayment
Comment on lines +14 to +15
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

capturePayment(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import { EntityManager } from "typeorm"
* x-authenticated: true
* parameters:
* - (path) id=* {string} The ID of the Order.
* x-codegen:
* method: complete
Comment on lines +12 to +13
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

complete(
id: string,
customHeaders: Record<string, any> = {}
): ResponsePromise<AdminOrdersRes> {

* x-codeSamples:
* - lang: JavaScript
* label: JS Client
Expand Down
Loading