Files
klz-cables.com/.pnpm-store/v10/files/07/0745d420fa0d641c6490287f0743740b4056f74191f4ded123f7d517ccf76cf3366ba90c9594bbd941888411278546261374ce57dda892b238285fd24a5891
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

34 lines
1.9 KiB
Plaintext

import { CollectionType, RegularCollections } from "../../../types/schema.js";
import { ApplyQueryFields } from "../../../types/output.js";
import { Query, QueryItem } from "../../../types/query.js";
import { RestCommand } from "../../types.js";
//#region src/rest/commands/read/items.d.ts
type ReadItemOutput<Schema, Collection extends RegularCollections<Schema>, TQuery extends Query<Schema, CollectionType<Schema, Collection>>> = ApplyQueryFields<Schema, CollectionType<Schema, Collection>, TQuery['fields']>;
/**
* List all items that exist in Directus.
*
* @param collection The collection of the items
* @param query The query parameters
*
* @returns An array of up to limit item objects. If no items are available, data will be an empty array.
* @throws Will throw if collection is a core collection
* @throws Will throw if collection is empty
*/
declare const readItems: <Schema, Collection extends RegularCollections<Schema>, const TQuery extends Query<Schema, CollectionType<Schema, Collection>>>(collection: Collection, query?: TQuery) => RestCommand<ReadItemOutput<Schema, Collection, TQuery>[], Schema>;
/**
* Get an item that exists in Directus.
*
* @param collection The collection of the item
* @param key The primary key of the item
* @param query The query parameters
*
* @returns Returns an item object if a valid primary key was provided.
* @throws Will throw if collection is a core collection
* @throws Will throw if collection is empty
* @throws Will throw if key is empty
*/
declare const readItem: <Schema, Collection extends RegularCollections<Schema>, const TQuery extends QueryItem<Schema, CollectionType<Schema, Collection>>>(collection: Collection, key: string | number, query?: TQuery) => RestCommand<ReadItemOutput<Schema, Collection, TQuery>, Schema>;
//#endregion
export { ReadItemOutput, readItem, readItems };
//# sourceMappingURL=items.d.ts.map