@@ -63,18 +63,19 @@ const EVENT_MAPPING: Record<string, string> = {
6363} ;
6464
6565/**
66- * The UserRecord passed to Cloud Functions is the same UserRecord that is returned by the Firebase Admin
67- * SDK.
66+ * The `UserRecord` passed to Cloud Functions is the same
67+ * {@link https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userrecord | UserRecord}
68+ * that is returned by the Firebase Admin SDK.
6869 */
6970export type UserRecord = auth . UserRecord ;
7071
7172/**
72- * UserInfo that is part of the UserRecord
73+ * ` UserInfo` that is part of the ` UserRecord`.
7374 */
7475export type UserInfo = auth . UserInfo ;
7576
7677/**
77- * Helper class to create the user metadata in a UserRecord object
78+ * Helper class to create the user metadata in a ` UserRecord` object.
7879 */
7980export class UserRecordMetadata implements auth . UserMetadata {
8081 constructor ( public creationTime : string , public lastSignInTime : string ) { }
@@ -89,9 +90,9 @@ export class UserRecordMetadata implements auth.UserMetadata {
8990}
9091
9192/**
92- * Helper function that creates a UserRecord Class from data sent over the wire.
93+ * Helper function that creates a ` UserRecord` class from data sent over the wire.
9394 * @param wireData data sent over the wire
94- * @returns an instance of UserRecord with correct toJSON functions
95+ * @returns an instance of ` UserRecord` with correct toJSON functions
9596 */
9697export function userRecordConstructor ( wireData : Record < string , unknown > ) : UserRecord {
9798 // Falsey values from the wire format proto get lost when converted to JSON, this adds them back.
@@ -157,7 +158,7 @@ export function userRecordConstructor(wireData: Record<string, unknown>): UserRe
157158}
158159
159160/**
160- * User info that is part of the AuthUserRecord
161+ * User info that is part of the ` AuthUserRecord`.
161162 */
162163export interface AuthUserInfo {
163164 /**
@@ -237,7 +238,7 @@ export interface AuthMultiFactorSettings {
237238}
238239
239240/**
240- * The UserRecord passed to auth blocking Cloud Functions from the identity platform.
241+ * The ` UserRecord` passed to auth blocking functions from the identity platform.
241242 */
242243export interface AuthUserRecord {
243244 /**
@@ -334,7 +335,7 @@ export interface AuthEventContext extends EventContext {
334335 credential ?: Credential ;
335336}
336337
337- /** Defines the auth event for v2 blocking events */
338+ /** Defines the auth event for 2nd gen blocking events */
338339export interface AuthBlockingEvent extends AuthEventContext {
339340 data : AuthUserRecord ;
340341}
@@ -344,7 +345,7 @@ export interface AuthBlockingEvent extends AuthEventContext {
344345 */
345346export type RecaptchaActionOptions = "ALLOW" | "BLOCK" ;
346347
347- /** The handler response type for beforeCreate blocking events */
348+ /** The handler response type for ` beforeCreate` blocking events */
348349export interface BeforeCreateResponse {
349350 displayName ?: string ;
350351 disabled ?: boolean ;
@@ -354,7 +355,7 @@ export interface BeforeCreateResponse {
354355 recaptchaActionOverride ?: RecaptchaActionOptions ;
355356}
356357
357- /** The handler response type for beforeSignIn blocking events */
358+ /** The handler response type for ` beforeSignIn` blocking events */
358359export interface BeforeSignInResponse extends BeforeCreateResponse {
359360 sessionClaims ?: object ;
360361}
@@ -472,7 +473,7 @@ type HandlerV2 = (
472473 | Promise < void > ;
473474
474475/**
475- * Checks for a valid identity platform web request, otherwise throws an HttpsError
476+ * Checks for a valid identity platform web request, otherwise throws an HttpsError.
476477 * @internal
477478 */
478479export function isValidRequest ( req : express . Request ) : boolean {
@@ -508,7 +509,7 @@ function unsafeDecodeAuthBlockingToken(token: string): DecodedPayload {
508509}
509510
510511/**
511- * Helper function to parse the decoded metadata object into a UserMetaData object
512+ * Helper function to parse the decoded metadata object into a ` UserMetaData` object
512513 * @internal
513514 */
514515export function parseMetadata ( metadata : DecodedPayloadUserRecordMetadata ) : AuthUserMetadata {
@@ -525,7 +526,7 @@ export function parseMetadata(metadata: DecodedPayloadUserRecordMetadata): AuthU
525526}
526527
527528/**
528- * Helper function to parse the decoded user info array into an AuthUserInfo array
529+ * Helper function to parse the decoded user info array into an ` AuthUserInfo` array.
529530 * @internal
530531 */
531532export function parseProviderData (
@@ -546,7 +547,7 @@ export function parseProviderData(
546547}
547548
548549/**
549- * Helper function to parse the date into a UTC string
550+ * Helper function to parse the date into a UTC string.
550551 * @internal
551552 */
552553export function parseDate ( tokensValidAfterTime ?: number ) : string | null {
@@ -639,7 +640,7 @@ export function parseAuthUserRecord(
639640 } ;
640641}
641642
642- /** Helper to get the AdditionalUserInfo from the decoded jwt */
643+ /** Helper to get the ` AdditionalUserInfo` from the decoded JWT */
643644function parseAdditionalUserInfo ( decodedJWT : DecodedPayload ) : AdditionalUserInfo {
644645 let profile ;
645646 let username ;
@@ -697,7 +698,7 @@ export function generateResponsePayload(
697698 return result ;
698699}
699700
700- /** Helper to get the Credential from the decoded jwt */
701+ /** Helper to get the Credential from the decoded JWT */
701702function parseAuthCredential ( decodedJWT : DecodedPayload , time : number ) : Credential {
702703 if (
703704 ! decodedJWT . sign_in_attributes &&
0 commit comments