Files
klz-cables.com/.pnpm-store/v10/files/3e/28b9b27d8eebccbeda97eba6b4bd27dc2a74d951d1baed6da32436657d79c560d04fa71654bdec46b27bd2bb4647610f7ee5d03324d77e858797a378b126d9
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

82 lines
3.7 KiB
Plaintext

import type { PaginatedDocs } from '../../../database/types.js';
import type { FindOptions, GlobalSlug, Payload, RequestContext, TypedLocale } from '../../../index.js';
import type { Document, PayloadRequest, PopulateType, SelectType, Sort, Where } from '../../../types/index.js';
import type { TypeWithVersion } from '../../../versions/types.js';
import type { DataFromGlobalSlug } from '../../config/types.js';
export type Options<TSlug extends GlobalSlug> = {
/**
* [Context](https://payloadcms.com/docs/hooks/context), which will then be passed to `context` and `req.context`,
* which can be read by hooks. Useful if you want to pass additional information to the hooks which
* shouldn't be necessarily part of the document, for example a `triggerBeforeChange` option which can be read by the BeforeChange hook
* to determine if it should run or not.
*/
context?: RequestContext;
/**
* [Control auto-population](https://payloadcms.com/docs/queries/depth) of nested relationship and upload fields.
*/
depth?: number;
/**
* Specify a [fallback locale](https://payloadcms.com/docs/configuration/localization) to use for any returned documents.
*/
fallbackLocale?: false | TypedLocale;
/**
* The maximum related documents to be returned.
* Defaults unless `defaultLimit` is specified for the collection config
* @default 10
*/
limit?: number;
/**
* Specify [locale](https://payloadcms.com/docs/configuration/localization) for any returned documents.
*/
locale?: 'all' | TypedLocale;
/**
* Skip access control.
* Set to `false` if you want to respect Access Control for the operation, for example when fetching data for the front-end.
* @default true
*/
overrideAccess?: boolean;
/**
* Get a specific page number
* @default 1
*/
page?: number;
/**
* Set to `false` to return all documents and avoid querying for document counts which introduces some overhead.
* You can also combine that property with a specified `limit` to limit documents but avoid the count query.
*/
pagination?: boolean;
/**
* Specify [populate](https://payloadcms.com/docs/queries/select#populate) to control which fields to include to the result from populated documents.
*/
populate?: PopulateType;
/**
* The `PayloadRequest` object. You can pass it to thread the current [transaction](https://payloadcms.com/docs/database/transactions), user and locale to the operation.
* Recommended to pass when using the Local API from hooks, as usually you want to execute the operation within the current transaction.
*/
req?: Partial<PayloadRequest>;
/**
* Opt-in to receiving hidden fields. By default, they are hidden from returned documents in accordance to your config.
* @default false
*/
showHiddenFields?: boolean;
/**
* the Global slug to operate against.
*/
slug: TSlug;
/**
* Sort the documents, can be a string or an array of strings
* @example '-version.createdAt' // Sort DESC by createdAt
* @example ['version.group', '-version.createdAt'] // sort by 2 fields, ASC group and DESC createdAt
*/
sort?: Sort;
/**
* If you set `overrideAccess` to `false`, you can pass a user to use against the access control checks.
*/
user?: Document;
/**
* A filter [query](https://payloadcms.com/docs/queries/overview)
*/
where?: Where;
} & Pick<FindOptions<string, SelectType>, 'select'>;
export declare function findGlobalVersionsLocal<TSlug extends GlobalSlug>(payload: Payload, options: Options<TSlug>): Promise<PaginatedDocs<TypeWithVersion<DataFromGlobalSlug<TSlug>>>>;
//# sourceMappingURL=findVersions.d.ts.map