Files
klz-cables.com/.pnpm-store/v10/files/ac/b561d2f30e2965d278032e02bd356fa40bd6c352a1deee9ceefea4f4099132e0842a93c186646329214253ad96dd5e2d3c7e6e705f925d817a2cf419e3c88f
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.9 KiB
Plaintext

{"version":3,"file":"dashboards.cjs","names":[],"sources":["../../../../src/rest/commands/read/dashboards.ts"],"sourcesContent":["import type { DirectusDashboard } from '../../../schema/dashboard.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadDashboardOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusDashboard<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all dashboards that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit dashboard objects. If no items are available, data will be an empty array.\n */\nexport const readDashboards =\n\t<Schema, const TQuery extends Query<Schema, DirectusDashboard<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadDashboardOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/dashboards`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing dashboard by primary key.\n * @param key The primary key of the dashboard\n * @param query The query parameters\n * @returns Returns the requested dashboard object.\n * @throws Will throw if key is empty\n */\nexport const readDashboard =\n\t<Schema, const TQuery extends Query<Schema, DirectusDashboard<Schema>>>(\n\t\tkey: DirectusDashboard<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadDashboardOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/dashboards/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"kDAgBa,EAEX,QAEM,CACN,KAAM,cACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,eAAe,IACrB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}