import { HookContext, NextFunction, Params } from '@feathersjs/feathers'; import { FeathersError } from '@feathersjs/errors'; import { AuthenticationService } from '@feathersjs/authentication'; import { OauthSetupSettings } from './utils'; export type GrantResponse = { location: string; session: any; state: any; }; export type OAuthParams = Omit & { session: any; state: Record; route: { provider: string; }; }; export declare class OAuthError extends FeathersError { location: string; constructor(message: string, data: any, location: string); } export declare const redirectHook: () => (context: HookContext, next: NextFunction) => Promise; export declare class OAuthService { service: AuthenticationService; settings: OauthSetupSettings; grant: any; constructor(service: AuthenticationService, settings: OauthSetupSettings); handler(method: string, params: OAuthParams, body?: any, override?: string): Promise; authenticate(params: OAuthParams, result: GrantResponse): Promise<{ location: string; }>; find(params: OAuthParams): Promise; get(override: string, params: OAuthParams): Promise; create(data: any, params: OAuthParams): Promise; } export declare class OAuthCallbackService { service: OAuthService; constructor(service: OAuthService); find(params: OAuthParams): Promise<{ location: string; }>; create(data: any, params: OAuthParams): Promise<{ location: string; }>; }