import { CommunicationChannel, CrashReportingLevel, DataCollectionLevel, LoggerFactory, LogLevel, OpenKit, Orientation, RandomNumberProvider } from './api'; import { SessionNumberStrategy } from './api/SessionNumberStrategy'; import { Configuration } from './core/config/Configuration'; /** * Builder for an OpenKit instance. */ export declare class OpenKitBuilder { private readonly beaconUrl; private readonly applicationId; private readonly deviceId; private operatingSystem; private applicationVersion?; private crashReportingLevel; private dataCollectionLevel; private communicationChannel?; private randomNumberProvider?; private logLevel; private loggerFactory?; private manufacturer?; private modelId?; private userLanguage?; private screenWidth?; private screenHeight?; private orientation?; private sessionNumberStrategy; /** * Creates a new OpenKitBuilder * * @param beaconURL The url to the beacon endpoint * @param applicationId The id of the custom application * @param deviceId The id of the current device, which must be a decimal number * in the range of Number.MIN_SAFE_INTEGER to Number.MAX_SAFE_INTEGER. If the * number is outside of this range, not decimal or invalid it will be hashed. */ constructor(beaconURL: string, applicationId: string, deviceId: number); /** * Sets the operating system information. Defaults to 'OpenKit'. * * @param operatingSystem The operating system * @returns The current OpenKitBuilder */ withOperatingSystem(operatingSystem: string): this; /** * Defines the version of the application. * * @param appVersion The application version * @returns The current OpenKitBuilder */ withApplicationVersion(appVersion: string): this; /** * Sets the data collection level. * * Depending on the chosen level the amount and granularity of data sent is controlled. * Off (0) - no data collected * Performance (1) - only performance related data is collected * UserBehavior (2) - all available RUM data including performance related data is collected.. * * If an invalid value is passed, it is ignored. * * Default value is UserBehavior (2) * * @param dataCollectionLevel The data collection level * @returns The current OpenKitBuilder */ withDataCollectionLevel(dataCollectionLevel: DataCollectionLevel): this; /** * Sets the flag if crash reporting is enabled * *

* Off (0) - No crashes are reported * OptOutCrashes = (1) - No crashes are reported * OptInCrashes = (2) - Crashes are reported *

* * If an invalid value is passed, it is ignored. * * @param crashReportingLevel */ withCrashReportingLevel(crashReportingLevel: CrashReportingLevel): this; /** * Sets the communication channel. If the object is null or undefined, it is ignored. * * @param communicationChannel */ withCommunicationChannel(communicationChannel: CommunicationChannel): this; /** * Sets the random number provider. If the object is null or undefined, it is ignored. * * @param random The random number provider. */ withRandomNumberProvider(random: RandomNumberProvider): this; /** * Sets the manufacturer of the device. If the argument is not a string or empty string, it is ignored. * * @param manufacturer The manufacturer of the device */ withManufacturer(manufacturer: string): this; /** * Sets the modelId of the device. If the argument is not a string or empty string, it is ignored. * * @param modelId The model id of the device */ withModelId(modelId: string): this; /** * Sets the user language. If the language is not a string or empty string, it is ignored. * Currently, there are no restrictions on RFC/ISO codes. * * @param language The user language */ withUserLanguage(language: string): this; /** * Sets the screen resolution. If the width or height are not positive finite numbers, both are ignored. * * @param width The width of the screen * @param height The height of the screen */ withScreenResolution(width: number, height: number): this; /** * Sets the screen orientation. Allowed values are Orientation.Portrait ('p') and Orientation.Landscape ('l'). * All other values are ignored. * * @param orientation The orientation. 'p' || 'l'. */ withScreenOrientation(orientation: Orientation): this; /** * Sets the logger factory. * If the argument is null or undefined, it is ignored. * * @param loggerFactory */ withLoggerFactory(loggerFactory: LoggerFactory): this; /** * Sets the default log level if the default logger factory is used. * * @param logLevel The loglevel for the default logger factory. */ withLogLevel(logLevel: LogLevel): this; /** * Sets the session number strategy which will be used. If not used at * all OpenKit will default to the normal session number strategy. * * @param sessionNumberStrategy Session number strategy which should be used. */ withSessionNumberStrategy(sessionNumberStrategy: SessionNumberStrategy): this; /** * Builds and gets the current configuration. * * @returns the current configuration */ getConfig(): Readonly; /** * Build and initialize an OpenKit instance. * * @returns The OpenKit instance. */ build(): OpenKit; private buildConfig; } //# sourceMappingURL=OpenKitBuilder.d.ts.map