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
26 lines
1.4 KiB
Plaintext
26 lines
1.4 KiB
Plaintext
import type { CollectionSlug, FindOptions, JoinQuery } from '../../index.js';
|
|
import type { ApplyDisableErrors, JsonObject, PayloadRequest, PopulateType, SelectType, TransformCollectionWithSelect } from '../../types/index.js';
|
|
import type { Collection, SelectFromCollectionSlug } from '../config/types.js';
|
|
import { type AfterReadArgs } from '../../fields/hooks/afterRead/index.js';
|
|
export type FindByIDArgs = {
|
|
collection: Collection;
|
|
currentDepth?: number;
|
|
/**
|
|
* You may pass the document data directly which will skip the `db.findOne` database query.
|
|
* This is useful if you want to use this endpoint solely for running hooks and populating data.
|
|
*/
|
|
data?: Record<string, unknown>;
|
|
depth?: number;
|
|
disableErrors?: boolean;
|
|
draft?: boolean;
|
|
id: number | string;
|
|
includeLockStatus?: boolean;
|
|
joins?: JoinQuery;
|
|
overrideAccess?: boolean;
|
|
populate?: PopulateType;
|
|
req: PayloadRequest;
|
|
showHiddenFields?: boolean;
|
|
trash?: boolean;
|
|
} & Pick<AfterReadArgs<JsonObject>, 'flattenLocales'> & Pick<FindOptions<string, SelectType>, 'select'>;
|
|
export declare const findByIDOperation: <TSlug extends CollectionSlug, TDisableErrors extends boolean, TSelect extends SelectFromCollectionSlug<TSlug>>(incomingArgs: FindByIDArgs) => Promise<ApplyDisableErrors<TransformCollectionWithSelect<TSlug, TSelect>, TDisableErrors>>;
|
|
//# sourceMappingURL=findByID.d.ts.map |