@larksuiteoapi/core
Version:
larksuite open api core sdk
29 lines • 1.22 kB
TypeScript
import { Domain } from "../constants/constants";
import { Logger, LoggerLevel } from "../log/log";
import { Store } from "../store/store";
import { AppSettings } from "./settings";
import { Context } from "../context";
export interface ConfigOpts {
logger?: Logger;
loggerLevel?: LoggerLevel;
store?: Store;
}
export declare class Config {
private readonly domain;
private readonly logger;
private readonly store;
private readonly appSettings;
private readonly helpDeskAuthorization;
constructor(domain: Domain, appSettings: AppSettings, opts: ConfigOpts);
withContext(ctx: Context): void;
getDomain(): Domain;
getAppSettings(): AppSettings;
getLogger(): Logger;
getStore(): Store;
getHelpDeskAuthorization(): string;
}
export declare function newTestConfig(domain: Domain, appSettings: AppSettings): Config;
export declare function newConfigWithOpts(domain: Domain, appSettings: AppSettings, opts: ConfigOpts): Config;
export declare function newConfig(domain: Domain, appSettings: AppSettings, logger: Logger, loggerLevel: LoggerLevel, store: Store): Config;
export declare function getConfigByCtx(ctx: Context): Config;
//# sourceMappingURL=config.d.ts.map