Files
klz-cables.com/.pnpm-store/v10/files/38/ea4eb46b626ff2a9bc962d13527c5e340f0d5e529888df1b4d9e2ecdfe5c36ef593cdb3d130c03675e3b7cddbee6c22445d3c2bf0708a512c394c1b925a6fc
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":"comments.cjs","names":[],"sources":["../../../../src/rest/commands/read/comments.ts"],"sourcesContent":["import type { DirectusComment } from '../../../schema/comment.js';\nimport type { ApplyQueryFields, Query } from '../../../types/index.js';\nimport type { RestCommand } from '../../types.js';\nimport { throwIfEmpty } from '../../utils/index.js';\n\nexport type ReadCommentOutput<\n\tSchema,\n\tTQuery extends Query<Schema, Item>,\n\tItem extends object = DirectusComment<Schema>,\n> = ApplyQueryFields<Schema, Item, TQuery['fields']>;\n\n/**\n * List all Comments that exist in Directus.\n * @param query The query parameters\n * @returns An array of up to limit Comment objects. If no items are available, data will be an empty array.\n */\nexport const readComments =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\tquery?: TQuery,\n\t): RestCommand<ReadCommentOutput<Schema, TQuery>[], Schema> =>\n\t() => ({\n\t\tpath: `/comments`,\n\t\tparams: query ?? {},\n\t\tmethod: 'GET',\n\t});\n\n/**\n * List an existing comment by primary key.\n * @param key The primary key of the dashboard\n * @param query The query parameters\n * @returns Returns a Comment object if a valid primary key was provided.\n * @throws Will throw if key is empty\n */\nexport const readComment =\n\t<Schema, const TQuery extends Query<Schema, DirectusComment<Schema>>>(\n\t\tkey: DirectusComment<Schema>['id'],\n\t\tquery?: TQuery,\n\t): RestCommand<ReadCommentOutput<Schema, TQuery>, Schema> =>\n\t() => {\n\t\tthrowIfEmpty(String(key), 'Key cannot be empty');\n\n\t\treturn {\n\t\t\tpath: `/comments/${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"}