Files
klz-cables.com/.pnpm-store/v10/files/74/b3e854f09e5305ff27f80af1c4be58a1d4c603eab76eaefcee2f49528e012b1464f6e22096dacec06caeb8ad6103ea60a56b4de090b1eba2da029a11e1de00
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":"presets.js","names":[],"sources":["../../../../src/rest/commands/read/presets.ts"],"sourcesContent":["import type { DirectusPreset } from '../../../schema/preset.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadPresetOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusPreset<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all Presets that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit Preset objects. If no items are available, data will be an empty array.\n */\nexport const readPresets =\n\t<Schema, const TQuery extends Query<Schema, DirectusPreset<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadPresetOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/presets`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing preset by primary key.\n * @param key The primary key of the dashboard\n * @param query The query parameters\n * @returns Returns a Preset object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readPreset =\n\t<Schema, const TQuery extends Query<Schema, DirectusPreset<Schema>>>(\n\t\tkey: DirectusPreset<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadPresetOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/presets/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"6DAgBA,MAAa,EAEX,QAEM,CACN,KAAM,WACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,YAAY,IAClB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}