diff --git a/types/auth0/auth0-tests.ts b/types/auth0/auth0-tests.ts index 60bbf86823..cca6bf8373 100644 --- a/types/auth0/auth0-tests.ts +++ b/types/auth0/auth0-tests.ts @@ -147,11 +147,21 @@ management management .updateUser({id: "user_id"}, {"email": "hi@me.co"}, (err: Error, users: auth0.User) => {}); - // Update user metadata management .updateUserMetadata({id: "user_id"}, {"key": "value"}); +// Update user metadata with JSON object +management + .updateUserMetadata({id: "user_id"}, { + key: "value", + numKey: 123, + objKey: { + foo: "bar", + another: "value" + } + }); + // Update user metadata using callback management .updateUserMetadata({id: "user_id"}, {"key": "value"}, (err: Error, users: auth0.User) => {}); diff --git a/types/auth0/index.d.ts b/types/auth0/index.d.ts index 39d9d36fd7..98c9b32caa 100644 --- a/types/auth0/index.d.ts +++ b/types/auth0/index.d.ts @@ -1,6 +1,7 @@ -// Type definitions for auth0 2.9.2 +// Type definitions for auth0 2.9.3 // Project: https://github.com/auth0/node-auth0 // Definitions by: Seth Westphal +// Ian Howe // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 @@ -32,7 +33,7 @@ export interface RetryOptions { } export interface UserMetadata { - [propName: string]: string + [propName: string]: any } export interface AppMetadata {