Skip to content

Commit 89acd4c

Browse files
merlinnotbojeil-google
authored andcommitted
Improve typings of UpdateRequest interface (#460)
1 parent 84d8a4f commit 89acd4c

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Unreleased
22

3-
-
3+
- [fixed] Improved typings of `UpdateRequest` interface to support deletion of
4+
properties.
45

56
# v7.0.0
67

src/auth/user-record.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ function parseDate(time: any): string {
3838

3939
/** Parameters for update user operation */
4040
export interface UpdateRequest {
41-
displayName?: string;
41+
disabled?: boolean;
42+
displayName?: string | null;
4243
email?: string;
4344
emailVerified?: boolean;
44-
phoneNumber?: string;
45-
photoURL?: string;
46-
disabled?: boolean;
4745
password?: string;
46+
phoneNumber?: string | null;
47+
photoURL?: string | null;
4848
}
4949

5050
/** Parameters for create user operation */

src/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ declare namespace admin.auth {
121121
}
122122

123123
interface UpdateRequest {
124-
displayName?: string;
124+
disabled?: boolean;
125+
displayName?: string | null;
125126
email?: string;
126127
emailVerified?: boolean;
127-
phoneNumber?: string;
128-
photoURL?: string;
129-
disabled?: boolean;
130128
password?: string;
129+
phoneNumber?: string | null;
130+
photoURL?: string | null;
131131
}
132132

133133
interface CreateRequest extends UpdateRequest {

0 commit comments

Comments
 (0)