feat(medusa, core-workflows, product): slightly improve create cart workflow (#5725)

This commit is contained in:
Adrien de Peretti
2023-12-07 17:05:23 +01:00
committed by GitHub
parent 946db51a9b
commit 85cda7ce37
14 changed files with 136 additions and 43 deletions

View File

@@ -1,5 +1,6 @@
export * as CacheTypes from "./cache"
export * as CommonTypes from "./common"
export * as CustomerTypes from "./customer"
export * as DAL from "./dal"
export * as EventBusTypes from "./event-bus"
export * as FeatureFlagTypes from "./feature-flag"
@@ -8,6 +9,7 @@ export * as LoggerTypes from "./logger"
export * as ModulesSdkTypes from "./modules-sdk"
export * as PricingTypes from "./pricing"
export * as ProductTypes from "./product"
export * as RegionTypes from "./region"
export * as SalesChannelTypes from "./sales-channel"
export * as SearchTypes from "./search"
export * as StockLocationTypes from "./stock-location"

View File

@@ -0,0 +1,24 @@
import { AddressDTO } from "../address"
export interface CustomerDTO {
id: string
email: string
billing_address_id?: string | null
shipping_address_id?: string | null
first_name?: string | null
last_name?: string | null
billing_address?: AddressDTO
shipping_address?: AddressDTO
phone?: string | null
has_account: boolean
groups?: {
id: string
}[]
orders: {
id: string
}[]
metadata?: Record<string, unknown>
deleted_at?: Date | string
created_at?: Date | string
updated_at?: Date | string
}

View File

@@ -0,0 +1 @@
export * from "./common"

View File

@@ -3,6 +3,7 @@ export * from "./bundles"
export * from "./cache"
export * from "./cart"
export * from "./common"
export * from "./customer"
export * from "./dal"
export * from "./event-bus"
export * from "./feature-flag"
@@ -15,6 +16,7 @@ export * from "./modules-sdk"
export * from "./pricing"
export * from "./product"
export * from "./product-category"
export * from "./region"
export * from "./sales-channel"
export * from "./search"
export * from "./shared-context"

View File

@@ -0,0 +1,11 @@
export type RegionDTO = {
name: string
currency_code: string
tax_rate?: number
tax_code?: string | null
gift_cards_taxable?: boolean
automatic_taxes?: boolean
tax_provider_id?: string | null
metadata?: Record<string, unknown>
includes_tax?: boolean
}

View File

@@ -0,0 +1 @@
export * from "./common"