mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
types/auth0: Add rules config types (#43230)
* types/auth0: Add rules config types * types/auth0: Fix trailing whitespaces
This commit is contained in:
parent
0ae7aa751a
commit
1168acc915
@ -569,3 +569,13 @@ management.unblockUserByIdentifier({ identifier: 'email' }, (err, response) => {
|
||||
}
|
||||
console.log(response);
|
||||
});
|
||||
|
||||
// Rules configurations
|
||||
management.setRulesConfig({key: 'test'}, {value: 'test'}).then((config) => console.log(config));
|
||||
management.setRulesConfig({key: 'test'}, {value: 'test'}, (err, config) => console.log(config));
|
||||
|
||||
management.deleteRulesConfig({key: 'test'}).then(() => {});
|
||||
management.deleteRulesConfig({key: 'test'}, (err) => {});
|
||||
|
||||
management.getRulesConfigs().then((configs) => console.log(configs));
|
||||
management.getRulesConfigs((err, configs) => console.log(configs));
|
||||
|
||||
24
types/auth0/index.d.ts
vendored
24
types/auth0/index.d.ts
vendored
@ -118,6 +118,20 @@ export interface Rule {
|
||||
order?: number;
|
||||
}
|
||||
|
||||
export interface RulesConfig {
|
||||
/**
|
||||
* Key for a rules config variable.
|
||||
*/
|
||||
key: string;
|
||||
}
|
||||
|
||||
export interface RulesConfigData {
|
||||
/**
|
||||
* Value for a rules config variable.
|
||||
*/
|
||||
value: string
|
||||
}
|
||||
|
||||
export interface Role {
|
||||
id?: string;
|
||||
name?: string;
|
||||
@ -961,6 +975,16 @@ export class ManagementClient<A=AppMetadata, U=UserMetadata> {
|
||||
deleteRule(params: ObjectWithId): Promise<void>;
|
||||
deleteRule(params: ObjectWithId, cb: (err: Error) => void): void;
|
||||
|
||||
// Rules Configurations
|
||||
getRulesConfigs(): Promise<RulesConfig[]>;
|
||||
getRulesConfigs(cb: (err: Error, rulesConfigs: RulesConfig[]) => void): void;
|
||||
|
||||
setRulesConfig(params: RulesConfig, data: RulesConfigData): Promise<RulesConfig & RulesConfigData>;
|
||||
setRulesConfig(params: RulesConfig, data: RulesConfigData,
|
||||
cb: (err: Error, rulesConfig: RulesConfig & RulesConfigData) => void):void;
|
||||
|
||||
deleteRulesConfig(params: RulesConfig): Promise<void>;
|
||||
deleteRulesConfig(params: RulesConfig, cb: (err: Error) => void): void;
|
||||
|
||||
// Users
|
||||
getUsers(params: GetUsersDataPaged): Promise<UserPage<A, U>>;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user