@iotize/tap
Version:
IoTize Device client for Javascript
37 lines (36 loc) • 1.21 kB
TypeScript
import { AnonymousProfileConfig, ProfileConfig, SpecialProfileConfig, TapConfiguratorConfig } from '@iotize/tap/config/schema/v1';
declare type ProfileConfigType = SpecialProfileConfig | AnonymousProfileConfig | ProfileConfig;
/**
* Utility class to build a configuration
*/
export declare class TapConfiguratorConfigBuilder {
private _schema;
constructor(_schema: TapConfiguratorConfig);
private get configData();
private get profiles();
private get tapConfig();
/**
* @deprecated
* TODO move from here as factory method should not polute the class
*/
static default(): TapConfiguratorConfigBuilder;
/**
* Set application name
* @param appName
*/
appName(appName: string): this;
/**
* Edit user identified by username
* If user does not it will be created with default values
* @param username
* @param editor
*/
user(username: string, editor: (user: ProfileConfigType) => ProfileConfigType): this;
/**
* Enable/disable scram
* @param enabled true to enable scram
*/
scram(enabled: boolean): this;
build(): TapConfiguratorConfig;
}
export {};