|
14 | 14 | * limitations under the License.
|
15 | 15 | */
|
16 | 16 |
|
17 |
| -import {UserRecord} from './user-record'; |
| 17 | +import {UserRecord, CreateRequest, UpdateRequest} from './user-record'; |
18 | 18 | import {Certificate} from './credential';
|
19 | 19 | import {FirebaseApp} from '../firebase-app';
|
20 | 20 | import {FirebaseTokenGenerator} from './token-generator';
|
@@ -181,10 +181,10 @@ class Auth implements FirebaseServiceInterface {
|
181 | 181 | /**
|
182 | 182 | * Creates a new user with the properties provided.
|
183 | 183 | *
|
184 |
| - * @param {Object} properties The properties to set on the new user record to be created. |
| 184 | + * @param {CreateRequest} properties The properties to set on the new user record to be created. |
185 | 185 | * @return {Promise<UserRecord>} A promise that resolves with the newly created user record.
|
186 | 186 | */
|
187 |
| - public createUser(properties: Object): Promise<UserRecord> { |
| 187 | + public createUser(properties: CreateRequest): Promise<UserRecord> { |
188 | 188 | return this.authRequestHandler.createNewAccount(properties)
|
189 | 189 | .then((uid) => {
|
190 | 190 | // Return the corresponding user record.
|
@@ -219,10 +219,10 @@ class Auth implements FirebaseServiceInterface {
|
219 | 219 | * Updates an existing user with the properties provided.
|
220 | 220 | *
|
221 | 221 | * @param {string} uid The uid identifier of the user to update.
|
222 |
| - * @param {Object} properties The properties to update on the existing user. |
| 222 | + * @param {UpdateRequest} properties The properties to update on the existing user. |
223 | 223 | * @return {Promise<UserRecord>} A promise that resolves with the modified user record.
|
224 | 224 | */
|
225 |
| - public updateUser(uid: string, properties: Object): Promise<UserRecord> { |
| 225 | + public updateUser(uid: string, properties: UpdateRequest): Promise<UserRecord> { |
226 | 226 | return this.authRequestHandler.updateExistingAccount(uid, properties)
|
227 | 227 | .then((existingUid) => {
|
228 | 228 | // Return the corresponding user record.
|
|
0 commit comments