Files
klz-cables.com/.pnpm-store/v10/files/66/229880140e209ae26fdc9f5f494b68f46d57e476fb134886b61e2fc015c14b044bc5dcb3999a0087c2ef0a599d7a85287db3664ae2ae64b4dbd42f2f6ff097
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

30 lines
1.4 KiB
Plaintext

import type { AuthOperationsFromCollectionSlug, Collection, DataFromCollectionSlug } from '../../collections/config/types.js';
import type { AuthCollectionSlug } from '../../index.js';
import type { PayloadRequest } from '../../types/index.js';
export type LoginResult<TSlug extends AuthCollectionSlug> = {
exp?: number;
token?: string;
user?: DataFromCollectionSlug<TSlug>;
};
export type Arguments<TSlug extends AuthCollectionSlug> = {
collection: Collection;
data: AuthOperationsFromCollectionSlug<TSlug>['login'];
depth?: number;
overrideAccess?: boolean;
req: PayloadRequest;
showHiddenFields?: boolean;
};
type CheckLoginPermissionArgs<TSlug extends AuthCollectionSlug> = {
loggingInWithUsername?: boolean;
req: PayloadRequest;
user: DataFromCollectionSlug<TSlug>;
};
/**
* Throws an error if the user is locked or does not exist.
* This does not check the login attempts, only the lock status. Whoever increments login attempts
* is responsible for locking the user properly, not whoever checks the login permission.
*/
export declare const checkLoginPermission: <TSlug extends AuthCollectionSlug>({ loggingInWithUsername, req, user, }: CheckLoginPermissionArgs<TSlug>) => void;
export declare const loginOperation: <TSlug extends AuthCollectionSlug>(incomingArgs: Arguments<TSlug>) => Promise<LoginResult<TSlug>>;
export {};
//# sourceMappingURL=login.d.ts.map