fix(oas): fix paths and fix schema names to match convention (#3288)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
"@medusajs/medusa-js": patch
|
||||||
|
"@medusajs/medusa": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix(oas): fix paths and fix schema names to match convention
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
AdminUpdatePaymentCollectionsReq,
|
AdminGetPaymentCollectionsParams,
|
||||||
AdminPaymentCollectionDeleteRes,
|
AdminPaymentCollectionDeleteRes,
|
||||||
AdminPaymentCollectionsRes,
|
AdminPaymentCollectionsRes,
|
||||||
GetPaymentCollectionsParams,
|
AdminUpdatePaymentCollectionsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { ResponsePromise } from "../../typings"
|
import { ResponsePromise } from "../../typings"
|
||||||
import BaseResource from "../base"
|
import BaseResource from "../base"
|
||||||
@@ -11,7 +11,7 @@ import qs from "qs"
|
|||||||
class AdminPaymentCollectionsResource extends BaseResource {
|
class AdminPaymentCollectionsResource extends BaseResource {
|
||||||
retrieve(
|
retrieve(
|
||||||
id: string,
|
id: string,
|
||||||
query?: GetPaymentCollectionsParams,
|
query?: AdminGetPaymentCollectionsParams,
|
||||||
customHeaders: Record<string, any> = {}
|
customHeaders: Record<string, any> = {}
|
||||||
): ResponsePromise<AdminPaymentCollectionsRes> {
|
): ResponsePromise<AdminPaymentCollectionsRes> {
|
||||||
let path = `/admin/payment-collections/${id}`
|
let path = `/admin/payment-collections/${id}`
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
GetPaymentCollectionsParams,
|
StoreGetPaymentCollectionsParams,
|
||||||
StorePostPaymentCollectionsBatchSessionsReq,
|
|
||||||
StorePostPaymentCollectionsBatchSessionsAuthorizeReq,
|
|
||||||
StorePaymentCollectionSessionsReq,
|
StorePaymentCollectionSessionsReq,
|
||||||
StorePaymentCollectionsSessionRes,
|
|
||||||
StorePaymentCollectionsRes,
|
StorePaymentCollectionsRes,
|
||||||
|
StorePaymentCollectionsSessionRes,
|
||||||
|
StorePostPaymentCollectionsBatchSessionsAuthorizeReq,
|
||||||
|
StorePostPaymentCollectionsBatchSessionsReq,
|
||||||
} from "@medusajs/medusa"
|
} from "@medusajs/medusa"
|
||||||
import { ResponsePromise } from "../typings"
|
import { ResponsePromise } from "../typings"
|
||||||
import BaseResource from "./base"
|
import BaseResource from "./base"
|
||||||
@@ -13,7 +13,7 @@ import qs from "qs"
|
|||||||
class PaymentCollectionsResource extends BaseResource {
|
class PaymentCollectionsResource extends BaseResource {
|
||||||
retrieve(
|
retrieve(
|
||||||
id: string,
|
id: string,
|
||||||
query?: GetPaymentCollectionsParams,
|
query?: StoreGetPaymentCollectionsParams,
|
||||||
customHeaders: Record<string, any> = {}
|
customHeaders: Record<string, any> = {}
|
||||||
): ResponsePromise<StorePaymentCollectionsRes> {
|
): ResponsePromise<StorePaymentCollectionsRes> {
|
||||||
let path = `/store/payment-collections/${id}`
|
let path = `/store/payment-collections/${id}`
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { validator } from "../../../../utils/validator"
|
|||||||
import { IsType } from "../../../../utils/validators/is-type"
|
import { IsType } from "../../../../utils/validators/is-type"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [post] /admin/draft-orders/{id}
|
* @oas [post] /draft-orders/{id}
|
||||||
* operationId: PostDraftOrdersDraftOrder
|
* operationId: PostDraftOrdersDraftOrder
|
||||||
* summary: Update a Draft Order
|
* summary: Update a Draft Order
|
||||||
* description: "Updates a Draft Order."
|
* description: "Updates a Draft Order."
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { FindParams } from "../../../../types/common"
|
|||||||
* - (query) fields {string} Comma separated list of fields to include in the results.
|
* - (query) fields {string} Comma separated list of fields to include in the results.
|
||||||
* x-codegen:
|
* x-codegen:
|
||||||
* method: retrieve
|
* method: retrieve
|
||||||
* queryParams: GetPaymentCollectionsParams
|
* queryParams: AdminGetPaymentCollectionsParams
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS Client
|
* label: JS Client
|
||||||
@@ -71,4 +71,4 @@ export default async (req, res) => {
|
|||||||
res.status(200).json({ payment_collection: paymentCollection })
|
res.status(200).json({ payment_collection: paymentCollection })
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetPaymentCollectionsParams extends FindParams {}
|
export class AdminGetPaymentCollectionsParams extends FindParams {}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import middlewares, {
|
|||||||
} from "../../../middlewares"
|
} from "../../../middlewares"
|
||||||
|
|
||||||
import { PaymentCollection } from "../../../../models"
|
import { PaymentCollection } from "../../../../models"
|
||||||
import { GetPaymentCollectionsParams } from "./get-payment-collection"
|
import { AdminGetPaymentCollectionsParams } from "./get-payment-collection"
|
||||||
import { AdminUpdatePaymentCollectionsReq } from "./update-payment-collection"
|
import { AdminUpdatePaymentCollectionsReq } from "./update-payment-collection"
|
||||||
|
|
||||||
const route = Router()
|
const route = Router()
|
||||||
@@ -16,7 +16,7 @@ export default (app, container) => {
|
|||||||
|
|
||||||
route.get(
|
route.get(
|
||||||
"/:id",
|
"/:id",
|
||||||
transformQuery(GetPaymentCollectionsParams, {
|
transformQuery(AdminGetPaymentCollectionsParams, {
|
||||||
defaultFields: defaultPaymentCollectionFields,
|
defaultFields: defaultPaymentCollectionFields,
|
||||||
defaultRelations: defaulPaymentCollectionRelations,
|
defaultRelations: defaulPaymentCollectionRelations,
|
||||||
isList: false,
|
isList: false,
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { IsString } from "class-validator"
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @oas [delete] /uploads
|
* @oas [delete] /uploads
|
||||||
* operationId: "AdminDeleteUploads"
|
* operationId: "DeleteUploads"
|
||||||
* summary: "Delete an Uploaded File"
|
* summary: "Delete an Uploaded File"
|
||||||
* description: "Removes an uploaded file using the installed fileservice"
|
* description: "Removes an uploaded file using the installed fileservice"
|
||||||
* x-authenticated: true
|
* x-authenticated: true
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { FindParams } from "../../../../types/common"
|
|||||||
* - (query) fields {string} Comma separated list of fields to include in the results.
|
* - (query) fields {string} Comma separated list of fields to include in the results.
|
||||||
* x-codegen:
|
* x-codegen:
|
||||||
* method: retrieve
|
* method: retrieve
|
||||||
* queryParams: GetPaymentCollectionsParams
|
* queryParams: StoreGetPaymentCollectionsParams
|
||||||
* x-codeSamples:
|
* x-codeSamples:
|
||||||
* - lang: JavaScript
|
* - lang: JavaScript
|
||||||
* label: JS Client
|
* label: JS Client
|
||||||
@@ -70,4 +70,4 @@ export default async (req, res) => {
|
|||||||
res.status(200).json({ payment_collection: paymentCollection })
|
res.status(200).json({ payment_collection: paymentCollection })
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetPaymentCollectionsParams extends FindParams {}
|
export class StoreGetPaymentCollectionsParams extends FindParams {}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import middlewares, {
|
|||||||
|
|
||||||
import { PaymentCollection, PaymentSession } from "../../../../models"
|
import { PaymentCollection, PaymentSession } from "../../../../models"
|
||||||
import { StorePostPaymentCollectionsBatchSessionsAuthorizeReq } from "./authorize-batch-payment-sessions"
|
import { StorePostPaymentCollectionsBatchSessionsAuthorizeReq } from "./authorize-batch-payment-sessions"
|
||||||
import { GetPaymentCollectionsParams } from "./get-payment-collection"
|
import { StoreGetPaymentCollectionsParams } from "./get-payment-collection"
|
||||||
import { StorePostPaymentCollectionsBatchSessionsReq } from "./manage-batch-payment-sessions"
|
import { StorePostPaymentCollectionsBatchSessionsReq } from "./manage-batch-payment-sessions"
|
||||||
import { StorePaymentCollectionSessionsReq } from "./manage-payment-session"
|
import { StorePaymentCollectionSessionsReq } from "./manage-payment-session"
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ export default (app, container) => {
|
|||||||
|
|
||||||
route.get(
|
route.get(
|
||||||
"/:id",
|
"/:id",
|
||||||
transformQuery(GetPaymentCollectionsParams, {
|
transformQuery(StoreGetPaymentCollectionsParams, {
|
||||||
defaultFields: defaultPaymentCollectionFields,
|
defaultFields: defaultPaymentCollectionFields,
|
||||||
defaultRelations: defaultPaymentCollectionRelations,
|
defaultRelations: defaultPaymentCollectionRelations,
|
||||||
isList: false,
|
isList: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user