23 lines
855 B
TypeScript
23 lines
855 B
TypeScript
// The module's names, in a file with no import: a browser bundle can take them without the schemas.
|
|
|
|
/** The platform service this module is a client of (B-wave contract §3.14). */
|
|
export const CATALOG_SERVICE_NAME = "catalog"
|
|
|
|
/** The app permissions of the module. */
|
|
export const CATALOG_PERMISSIONS = {
|
|
read: "catalog.product.read",
|
|
write: "catalog.product.write",
|
|
} as const
|
|
|
|
/** What a search looks in: the name, the start of the code, or one identifier. */
|
|
export const PRODUCT_SEARCH_FIELDS = ["name", "code", "gtin", "erp"] as const
|
|
|
|
/** The most rows one page of a list asks the service for. */
|
|
export const PAGE_LIMIT = 50
|
|
|
|
/** The most rows one import chunk carries: the service's own limit. */
|
|
export const IMPORT_CHUNK_ROWS = 200
|
|
|
|
/** The largest file the import form reads in the browser. */
|
|
export const MAX_IMPORT_BYTES = 5_000_000
|