feat: Clean up shipping options management (#6977)
**What** - cleanup existing route on some aspects but not all - add new create shipping options end point and types - add set of integration tests - cleanup existing fulfillment routes - align existing integration tests - transform old type to zod types and validators - fix stock location route
This commit is contained in:
@@ -4,12 +4,12 @@ import { AdminShippingOptionTypeResponse } from "./shipping-option-type"
|
||||
import { AdminShippingOptionRuleResponse } from "./shipping-option-rule"
|
||||
import { AdminShippingProfileResponse } from "./shipping-profile"
|
||||
import { AdminFulfillmentProviderResponse } from "./fulfillment-provider"
|
||||
import { AdminFulfillmentResponse } from "./fulfillment"
|
||||
import { AdminPriceSetPriceResponse } from "../../pricing"
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminShippingOptionResponse {
|
||||
interface AdminShippingOptionResponse {
|
||||
id: string
|
||||
name: string
|
||||
price_type: ShippingOptionPriceType
|
||||
@@ -21,11 +21,18 @@ export interface AdminShippingOptionResponse {
|
||||
metadata: Record<string, unknown> | null
|
||||
service_zone: AdminServiceZoneResponse
|
||||
shipping_profile: AdminShippingProfileResponse
|
||||
fulfillment_provider: AdminFulfillmentProviderResponse
|
||||
provider: AdminFulfillmentProviderResponse
|
||||
type: AdminShippingOptionTypeResponse
|
||||
rules: AdminShippingOptionRuleResponse[]
|
||||
fulfillments: AdminFulfillmentResponse[]
|
||||
prices: AdminPriceSetPriceResponse[]
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental
|
||||
*/
|
||||
export interface AdminShippingOptionRetrieveResponse {
|
||||
shipping_option: AdminShippingOptionResponse[]
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
export * from "./api-key"
|
||||
export * from "./fulfillment"
|
||||
export * from "./pricing"
|
||||
export * from "./sales-channel"
|
||||
export * from "./stock-locations"
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
export * from "./price"
|
||||
@@ -0,0 +1,7 @@
|
||||
export interface AdminPriceSetPriceResponse {
|
||||
id: string
|
||||
amount: number
|
||||
currency_code: string
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
Reference in New Issue
Block a user