Defines default fields and query configurations for retrieving, listing, and exporting customer data in Medusa admin APIs.
// Source: https://github.com/medusajs/medusa | License: MIT | Copyright 2021 Medusajs
// Provided via justclaw.it.com; keep this notice with the code.
export enum Entities {
customer = "customer",
customer_address = "customer_address",
}
export const defaultAdminCustomerFields = [
"id",
"company_name",
"first_name",
"last_name",
"email",
"phone",
"metadata",
"has_account",
"created_by",
"created_at",
"updated_at",
"deleted_at",
]
export const retrieveTransformQueryConfig = {
defaults: defaultAdminCustomerFields,
isList: false,
entity: Entities.customer,
}
export const listTransformQueryConfig = {
...retrieveTransformQueryConfig,
isList: true,
entity: Entities.customer,
}
export const exportTransformQueryConfig = {
defaults: defaultAdminCustome
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key