@cauth/core 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -273,10 +273,11 @@ declare const ChangePasswordSchema: z.ZodObject<{
|
|
|
273
273
|
type ChangePasswordSchemaType = z.infer<typeof ChangePasswordSchema>;
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/cauth.d.ts
|
|
276
|
-
declare class _CAuth<T extends string[]> {
|
|
276
|
+
declare class _CAuth<T extends string[], TContractor extends RoutesContract<any> = RoutesContract<any>> {
|
|
277
277
|
#private;
|
|
278
278
|
constructor(config: Omit<CAuthOptions, 'roles'> & {
|
|
279
279
|
roles: T;
|
|
280
|
+
routeContractor: TContractor;
|
|
280
281
|
});
|
|
281
282
|
get RoleType(): T[number];
|
|
282
283
|
/**
|
|
@@ -358,8 +359,9 @@ declare class _CAuth<T extends string[]> {
|
|
|
358
359
|
VerifyAccessToken: <T_1>(token: any) => Promise<T_1 | null>;
|
|
359
360
|
};
|
|
360
361
|
}
|
|
361
|
-
declare function CAuth<const T extends string[]
|
|
362
|
+
declare function CAuth<const T extends string[], const TContractor extends RoutesContract<any>>(options: Omit<CAuthOptions, 'roles'> & {
|
|
362
363
|
roles: T;
|
|
363
|
-
|
|
364
|
+
routeContractor: TContractor;
|
|
365
|
+
}): _CAuth<T, RoutesContract<(...args: any[]) => any> & TContractor>;
|
|
364
366
|
//#endregion
|
|
365
367
|
export { AccountNotFoundError, CAuth, type CAuthOptions, CredentialMismatchError, type DatabaseContract, DuplicateAccountError, InvalidDataError, InvalidOTPCode, InvalidRefreshTokenError, InvalidRoleError, type RoutesContract };
|