From c63bd116e6882667964187079b615cbc106d0464 Mon Sep 17 00:00:00 2001 From: Tyler Stark Date: Mon, 9 May 2022 12:19:35 -0500 Subject: [PATCH 1/3] Update docs for auth Update docs for auth --- src/providers/auth.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/providers/auth.ts b/src/providers/auth.ts index 283310472..cc16183c4 100644 --- a/src/providers/auth.ts +++ b/src/providers/auth.ts @@ -54,7 +54,7 @@ export const provider = 'google.firebase.auth'; /** @hidden */ export const service = 'firebaseauth.googleapis.com'; -/** Resource level options */ +/** @public Resource level options */ export interface UserOptions { blockingOptions?: { idToken?: boolean; @@ -64,7 +64,7 @@ export interface UserOptions { } /** - * Handle events related to Firebase authentication users. + * @public Handle events related to Firebase authentication users. */ export function user(userOptions?: UserOptions) { return _userWithOptions({}, userOptions || {}); @@ -87,7 +87,7 @@ export function _userWithOptions( ); } -/** Builder used to create Cloud Functions for Firebase Auth user lifecycle events. */ +/** @public Builder used to create Cloud Functions for Firebase Auth user lifecycle events. */ export class UserBuilder { private static dataConstructor(raw: Event): UserRecord { return userRecordConstructor(raw.data); @@ -100,14 +100,14 @@ export class UserBuilder { private userOptions?: UserOptions ) {} - /** Respond to the creation of a Firebase Auth user. */ + /** @public Respond to the creation of a Firebase Auth user. */ onCreate( handler: (user: UserRecord, context: EventContext) => PromiseLike | any ): CloudFunction { return this.onOperation(handler, 'user.create'); } - /** Respond to the deletion of a Firebase Auth user. */ + /** @public Respond to the deletion of a Firebase Auth user. */ onDelete( handler: (user: UserRecord, context: EventContext) => PromiseLike | any ): CloudFunction { From af4c8591dd9a5692c685bc9f167749c9fdbafabc Mon Sep 17 00:00:00 2001 From: Tyler Stark Date: Mon, 9 May 2022 15:11:24 -0500 Subject: [PATCH 2/3] Update docs (Per pr feedback) --- src/providers/auth.ts | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/providers/auth.ts b/src/providers/auth.ts index cc16183c4..224402b97 100644 --- a/src/providers/auth.ts +++ b/src/providers/auth.ts @@ -54,7 +54,10 @@ export const provider = 'google.firebase.auth'; /** @hidden */ export const service = 'firebaseauth.googleapis.com'; -/** @public Resource level options */ +/** + * Resource level options + * @public + */ export interface UserOptions { blockingOptions?: { idToken?: boolean; @@ -64,9 +67,12 @@ export interface UserOptions { } /** - * @public Handle events related to Firebase authentication users. + * Handles events related to Firebase authentication users. + * @param userOptions - Resource level options + * @returns UserBuilder - Builder used to create Cloud Functions for Firebase Auth user lifecycle events + * @public */ -export function user(userOptions?: UserOptions) { +export function user(userOptions?: UserOptions): UserBuilder { return _userWithOptions({}, userOptions || {}); } @@ -87,7 +93,10 @@ export function _userWithOptions( ); } -/** @public Builder used to create Cloud Functions for Firebase Auth user lifecycle events. */ +/** + * Builder used to create Cloud Functions for Firebase Auth user lifecycle events. + * @public + */ export class UserBuilder { private static dataConstructor(raw: Event): UserRecord { return userRecordConstructor(raw.data); @@ -100,14 +109,14 @@ export class UserBuilder { private userOptions?: UserOptions ) {} - /** @public Respond to the creation of a Firebase Auth user. */ + /** Responds to the creation of a Firebase Auth user. */ onCreate( handler: (user: UserRecord, context: EventContext) => PromiseLike | any ): CloudFunction { return this.onOperation(handler, 'user.create'); } - /** @public Respond to the deletion of a Firebase Auth user. */ + /** Responds to the deletion of a Firebase Auth user. */ onDelete( handler: (user: UserRecord, context: EventContext) => PromiseLike | any ): CloudFunction { From 03a77a2ed9eb9c16fe9880ef041f14378f994bed Mon Sep 17 00:00:00 2001 From: Tyler Stark Date: Mon, 9 May 2022 15:13:37 -0500 Subject: [PATCH 3/3] More minor updates --- src/providers/auth.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/providers/auth.ts b/src/providers/auth.ts index 224402b97..fcc612e76 100644 --- a/src/providers/auth.ts +++ b/src/providers/auth.ts @@ -109,14 +109,20 @@ export class UserBuilder { private userOptions?: UserOptions ) {} - /** Responds to the creation of a Firebase Auth user. */ + /** + * Responds to the creation of a Firebase Auth user. + * @public + */ onCreate( handler: (user: UserRecord, context: EventContext) => PromiseLike | any ): CloudFunction { return this.onOperation(handler, 'user.create'); } - /** Responds to the deletion of a Firebase Auth user. */ + /** + * Responds to the deletion of a Firebase Auth user. + * @public + */ onDelete( handler: (user: UserRecord, context: EventContext) => PromiseLike | any ): CloudFunction {