Files
klz-cables.com/.pnpm-store/v10/files/4e/81842516760a27782d4b1a6954955151d6fc7dfa2ed777ffde711ce5ef1222309b29bad6ef7a643d6247c02d8653970b6e5bf69da520e73a75175aab70b3d8
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":"versions.cjs","names":[],"sources":["../../../../src/rest/commands/read/versions.ts"],"sourcesContent":["import type { DirectusVersion } from '../../../schema/version.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadContentVersionOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusVersion<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all Content Versions that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit Content Version objects. If no items are available, data will be an empty array.\n */\nexport const readContentVersions =\n\t<Schema, const TQuery extends Query<Schema, DirectusVersion<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadContentVersionOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/versions`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing COntent Version by primary key.\n * @param key The primary key of the Content Version\n * @param query The query parameters\n * @returns Returns a Content Version object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readContentVersion =\n\t<Schema, const TQuery extends Query<Schema, DirectusVersion<Schema>>>(\n\t\tkey: DirectusVersion<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadContentVersionOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/versions/${key}`,\n\t\t\tparams: query ?? {},\n\t\t\tmethod: 'GET',\n\t\t};\n\t};\n"],"mappings":"kDAgBa,EAEX,QAEM,CACN,KAAM,YACN,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR,EASW,GAEX,EACA,SAGA,EAAA,aAAa,OAAO,EAAI,CAAE,sBAAsB,CAEzC,CACN,KAAM,aAAa,IACnB,OAAQ,GAAS,EAAE,CACnB,OAAQ,MACR"}