Files
klz-cables.com/.pnpm-store/v10/files/41/6e683c7a095d50e37d235ad7a19f85fe7bff5620e414c19fd9e549e3a50f2d6e26d76b1ffbccf1d869875f9e8434e05f50eec831ad67bed7342f6413082d63
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
1.4 KiB
Plaintext

{"version":3,"file":"collections.js","names":[],"sources":["../../../../src/rest/commands/read/collections.ts"],"sourcesContent":["import type { DirectusCollection } from '../../../schema/collection.js';\nimport type { ApplyQueryFields } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadCollectionOutput<Schema, Item extends object = DirectusCollection<Schema>> = ApplyQueryFields<\n\tSchema,\n\tItem,\n\t'*'\n>;\n\n/**\n * List the available collections.\n * @returns An array of collection objects.\n */\nexport const readCollections =\n\t<Schema>(): RestCommand<ReadCollectionOutput<Schema>[], Schema> =>\n\t() => ({\n\t\tpath: `/collections`,\n\t\tmethod: 'GET',\n\t});\n\n/**\n * Retrieve a single collection by table name.\n * @param collection The collection name\n * @returns A collection object.\n * @throws Will throw if collection is empty\n */\nexport const readCollection =\n\t<Schema>(collection: DirectusCollection<Schema>['collection']): RestCommand<ReadCollectionOutput<Schema>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(collection, 'Collection cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/collections/${collection}`,\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"6DAeA,MAAa,WAEL,CACN,KAAM,eACN,OAAQ,MACR,EAQW,EACH,QAER,EAAa,EAAY,6BAA6B,CAE/C,CACN,KAAM,gBAAgB,IACtB,OAAQ,MACR"}