import { OAuth2SubKind } from '@authup/common'; import type { RobotEntity, UserEntity } from '@authup/server-database'; import { ClientEntity } from '@authup/server-database'; export type OAuth2SubEntity = T extends `${OAuth2SubKind.USER}` | OAuth2SubKind.USER ? UserEntity : T extends `${OAuth2SubKind.ROBOT}` | OAuth2SubKind.ROBOT ? RobotEntity : T extends `${OAuth2SubKind.CLIENT}` | OAuth2SubKind.CLIENT ? ClientEntity : never; /** * * * @throws TokenError * @throws NotFoundError * @param kind * @param id * @param scope */ export declare function loadOAuth2SubEntity(kind: `${OAuth2SubKind}`, id: string, scope?: string): Promise>; //# sourceMappingURL=sub.d.ts.map