diff --git a/src/v2/providers/identity.ts b/src/v2/providers/identity.ts index 798a39212..e59db6590 100644 --- a/src/v2/providers/identity.ts +++ b/src/v2/providers/identity.ts @@ -11,7 +11,7 @@ import * as options from '../options'; export { HttpsError }; -/** Internally used when parsing the options. */ +/** @hidden Internally used when parsing the options. */ interface InternalOptions { opts: options.GlobalOptions; idToken: boolean; @@ -29,7 +29,8 @@ export interface BlockingOptions extends options.GlobalOptions { } /** - * Handle an event that is triggered before a user is created. + * Handles an event that is triggered before a user is created. + * @param handler - Event handler which is run every time before a user is created */ export function beforeUserCreated( handler: ( @@ -40,6 +41,12 @@ export function beforeUserCreated( | void | Promise ): BlockingFunction; + +/** + * Handles an event that is triggered before a user is created. + * @param opts - Object containing function options + * @param handler - Event handler which is run every time before a user is created + */ export function beforeUserCreated( opts: BlockingOptions, handler: ( @@ -50,6 +57,12 @@ export function beforeUserCreated( | void | Promise ): BlockingFunction; + +/** + * Handles an event that is triggered before a user is created + * @param optsOrHandler - Either an object containing function options, or an event handler (run before user creation) + * @param handler? - If defined, an event handler which is run every time before a user is created + */ export function beforeUserCreated( optsOrHandler: | BlockingOptions @@ -72,7 +85,8 @@ export function beforeUserCreated( } /** - * Handle an event that is triggered before a user is signed in. + * Handles an event that is triggered before a user is signed in. + * @param handler - Event handler which is run every time before a user is signed in */ export function beforeUserSignedIn( handler: ( @@ -83,6 +97,12 @@ export function beforeUserSignedIn( | void | Promise ): BlockingFunction; + +/** + * Handles an event that is triggered before a user is signed in. + * @param opts - Object containing function options + * @param handler - Event handler which is run every time before a user is signed in + */ export function beforeUserSignedIn( opts: BlockingOptions, handler: ( @@ -93,6 +113,12 @@ export function beforeUserSignedIn( | void | Promise ): BlockingFunction; + +/** + * Handles an event that is triggered before a user is signed in. + * @param optsOrHandler - Either an object containing function options, or an event handler (run before user signin) + * @param handler - Event handler which is run every time before a user is signed in + */ export function beforeUserSignedIn( optsOrHandler: | BlockingOptions @@ -114,7 +140,7 @@ export function beforeUserSignedIn( return beforeOperation('beforeSignIn', optsOrHandler, handler); } -/** @internal */ +/** @hidden */ export function beforeOperation( eventType: AuthBlockingEventType, optsOrHandler: @@ -197,7 +223,7 @@ export function beforeOperation( return func; } -/** @internal */ +/** @hidden */ export function getOpts(blockingOptions: BlockingOptions): InternalOptions { const accessToken = blockingOptions.accessToken || false; const idToken = blockingOptions.idToken || false;