Files
klz-cables.com/.pnpm-store/v10/files/d0/922e519d88472e9ad5f638c9cdbdf9d8fc8a5ca7ae0584f31211f3779c4e582e280a0dfa364268aec91d04e985e3d2f783ab1abb14e86fe264921e682158d0
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.8 KiB
Plaintext

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