Configuration objects defining fields and query transformations for stock location entities. Use this to standardize data fetching and API responses in inventory management systems.
// 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 {
stock_location = "stock_location",
}
export const defaultAdminStockLocationFields = [
"id",
"name",
"metadata",
"created_at",
"updated_at",
"address.id",
"address.address_1",
"address.address_2",
"address.city",
"address.country_code",
"address.phone",
"address.province",
"address.postal_code",
"address.metadata",
]
export const retrieveTransformQueryConfig = {
defaults: defaultAdminStockLocationFields,
isList: false,
entity: Entities.stock_location,
}
export const listTransformQueryConfig = {
...retrieveTransformQueryConfig,
isList: true,
entity: Entities.stock_location,
}
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key