feat: Add missing endpoints and normalize customer and currency endpoints for storefront (#7160)

This commit is contained in:
Stevche Radevski
2024-04-29 16:15:05 +02:00
committed by GitHub
parent 08a9297f76
commit 32c2a9d76b
24 changed files with 368 additions and 423 deletions
@@ -1,6 +1,6 @@
import {
CreateCustomerAddressDTO,
CustomerAddressDTO,
UpdateCustomerAddressDTO,
FilterableCustomerAddressProps,
ICustomerModuleService,
} from "@medusajs/types"
@@ -13,7 +13,7 @@ type StepInput = {
create?: CreateCustomerAddressDTO[]
update?: {
selector: FilterableCustomerAddressProps
update: Partial<CustomerAddressDTO>
update: UpdateCustomerAddressDTO
}
}
@@ -1,6 +1,6 @@
import {
CreateCustomerAddressDTO,
CustomerAddressDTO,
UpdateCustomerAddressDTO,
FilterableCustomerAddressProps,
ICustomerModuleService,
} from "@medusajs/types"
@@ -13,7 +13,7 @@ type StepInput = {
create?: CreateCustomerAddressDTO[]
update?: {
selector: FilterableCustomerAddressProps
update: Partial<CustomerAddressDTO>
update: UpdateCustomerAddressDTO
}
}
@@ -1,6 +1,6 @@
import { ModuleRegistrationName } from "@medusajs/modules-sdk"
import {
CustomerAddressDTO,
UpdateCustomerAddressDTO,
FilterableCustomerAddressProps,
ICustomerModuleService,
} from "@medusajs/types"
@@ -12,7 +12,7 @@ import { createStep, StepResponse } from "@medusajs/workflows-sdk"
type UpdateCustomerAddresseStepInput = {
selector: FilterableCustomerAddressProps
update: Partial<CustomerAddressDTO>
update: UpdateCustomerAddressDTO
}
export const updateCustomerAddresseStepId = "update-customer-addresses"
@@ -1,5 +1,5 @@
import {
CustomerAddressDTO,
UpdateCustomerAddressDTO,
FilterableCustomerAddressProps,
ICustomerModuleService,
} from "@medusajs/types"
@@ -8,7 +8,7 @@ import { StepResponse } from "@medusajs/workflows-sdk"
export const unsetForUpdate = async (
data: {
selector: FilterableCustomerAddressProps
update: Partial<CustomerAddressDTO>
update: UpdateCustomerAddressDTO
},
customerService: ICustomerModuleService,
field: "is_default_billing" | "is_default_shipping"
@@ -1,6 +1,7 @@
import {
FilterableCustomerAddressProps,
CustomerAddressDTO,
UpdateCustomerAddressDTO,
} from "@medusajs/types"
import {
WorkflowData,
@@ -16,7 +17,7 @@ import {
type WorkflowInput = {
selector: FilterableCustomerAddressProps
update: Partial<CustomerAddressDTO>
update: UpdateCustomerAddressDTO
}
export const updateCustomerAddressesWorkflowId = "update-customer-addresses"