chore(medusa,types): [3] Add request types to API routes (#8560)
* chore(medusa,types): [3] Add request types to API routes * more types
This commit is contained in:
1 parent
e5e8489cc0
commit
578e5182dd
14 files changed
+49
-17
No files matched your search
+1
-4
@@ -1,14 +1,11 @@
|
||||
import {
|
||||
BaseOrder,
|
||||
BaseOrderAddress,
|
||||
BaseOrderFilters,
|
||||
BaseOrderLineItem,
|
||||
BaseOrderShippingMethod,
|
||||
} from "./common"
|
||||
} from "../common"
|
||||
|
||||
export interface StoreOrder extends BaseOrder {}
|
||||
export interface StoreOrderLineItem extends BaseOrderLineItem {}
|
||||
export interface StoreOrderAddress extends BaseOrderAddress {}
|
||||
export interface StoreOrderShippingMethod extends BaseOrderShippingMethod {}
|
||||
|
||||
export interface StoreOrderFilters extends BaseOrderFilters {}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./entities"
|
||||
export * from "./queries"
|
||||
export * from "./responses"
|
||||
@@ -0,0 +1,3 @@
|
||||
import { BaseOrderFilters } from "../common";
|
||||
|
||||
export interface StoreOrderFilters extends BaseOrderFilters {}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { PaginatedResponse } from "../../common";
|
||||
import { StoreOrder } from "./entities";
|
||||
|
||||
export interface StoreOrderResponse {
|
||||
order: StoreOrder
|
||||
}
|
||||
|
||||
export type StoreOrderListResponse = PaginatedResponse<{ orders: StoreOrder[] }>
|
||||
@@ -17,6 +17,7 @@ export type BasePaymentCollectionStatus =
|
||||
*/
|
||||
export type BasePaymentSessionStatus =
|
||||
| "authorized"
|
||||
| "captured"
|
||||
| "pending"
|
||||
| "requires_more"
|
||||
| "error"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import {
|
||||
BasePaymentCollection,
|
||||
BasePaymentProvider,
|
||||
BasePaymentSession,
|
||||
} from "../common"
|
||||
|
||||
export interface StorePaymentProvider extends BasePaymentProvider {}
|
||||
export interface StorePaymentCollection extends BasePaymentCollection {}
|
||||
export interface StorePaymentSession extends BasePaymentSession {}
|
||||
@@ -0,0 +1,3 @@
|
||||
export * from "./entities"
|
||||
export * from "./queries"
|
||||
export * from "./responses"
|
||||
+1
-8
@@ -1,15 +1,8 @@
|
||||
import {
|
||||
BasePaymentCollection,
|
||||
BasePaymentCollectionFilters,
|
||||
BasePaymentProvider,
|
||||
BasePaymentProviderFilters,
|
||||
BasePaymentSession,
|
||||
BasePaymentSessionFilters,
|
||||
} from "./common"
|
||||
|
||||
export interface StorePaymentProvider extends BasePaymentProvider {}
|
||||
export interface StorePaymentCollection extends BasePaymentCollection {}
|
||||
export interface StorePaymentSession extends BasePaymentSession {}
|
||||
} from "../common"
|
||||
|
||||
export interface StorePaymentProviderFilters
|
||||
extends BasePaymentProviderFilters {}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { PaginatedResponse } from "../../common";
|
||||
import { StorePaymentCollection, StorePaymentProvider } from "./entities";
|
||||
|
||||
export interface StorePaymentCollectionResponse {
|
||||
payment_collection: StorePaymentCollection
|
||||
}
|
||||
|
||||
export type StorePaymentProviderListResponse = PaginatedResponse<{
|
||||
payment_providers: StorePaymentProvider[]
|
||||
}>
|
||||
Reference in new issue
Block a user