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