// Generated by dts-bundle-generator v9.5.1 import Stacktrace from 'stacktrace-js'; export interface OriginData { function_name: string | null; file: string | null; line_number: number | null; hostname: string | null; } export interface PayloadData { type: string; content: Record | any; origin: OriginData; } declare abstract class Payload { abstract getType(): string; remotePath: string | null; localPath: string | null; initialized: boolean; data: PayloadData; replaceRemotePathWithLocalPath(filePath: string): string; getContent(): Record; toArray(): PayloadData; toJson(): string; } declare class Request$1 { uuid: string; payloads: Payload[]; meta: any[]; constructor(uuid: string, payloads: Payload[], meta?: any); toArray(): Record; toJson(): string; } declare class Client { protected portNumber: number; protected host: string; protected scheme: string; static rayState: boolean | null; static lastRayStateCheck: number | null; constructor(portNumber?: number, host?: string, scheme?: string); init(): Promise; isRayAvailable(): boolean; protected attemptAvailableReset(): void; protected updateRayAvailability(): Promise; protected getUrlForPath(path: string): string; send(request: Request$1): Promise; protected ensureAllPayloadsHaveAnOrigin(payloads: Payload[]): Payload[]; lockExists(lockName: string): Promise; } declare class RayColors { color(name: string): this; green(): this; orange(): this; red(): this; purple(): this; blue(): this; gray(): this; } declare class RayScreenColors { screenColor(color: string): this; screenGreen(): this; screenOrange(): this; screenRed(): this; screenPurple(): this; screenBlue(): this; screenGray(): this; } declare class RaySizes { size(size: string): this; small(): this; large(): this; } declare class ConsoleInterceptor { static active: boolean; enable(): void; disable(): void; active(): boolean; } export type HtmlMarkupHighlightTypes = "tailwindcss" | "none"; export interface HtmlMarkupOptions { highlight?: HtmlMarkupHighlightTypes; } export type RayEnabledCallback = () => boolean; export type RayAfterPayloadSentCallback = (rayInstance: Ray) => void; export type RayBeforePayloadSentCallback = (rayInstance: Ray, payloads: Payload[]) => void; export interface RaySettings { enable?: boolean; host?: string; port?: number; scheme?: string; remote_path?: string | null; local_path?: string | null; always_send_raw_values?: boolean; not_defined?: boolean; intercept_console_log?: boolean; enabled_callback?: RayEnabledCallback | null; sent_payload_callback?: RayAfterPayloadSentCallback | null; sending_payload_callback?: RayBeforePayloadSentCallback | null; } declare class Settings { set host(value: string); get host(): string; set port(value: number); get port(): number; get scheme(): string; set scheme(value: string); enable: boolean; protected _host: string; protected _port: number; protected _scheme: string; remote_path: string | null; local_path: string | null; always_send_raw_values: boolean; intercept_console_log: boolean; enabled_callback: RayEnabledCallback | null; sent_payload_callback: RayAfterPayloadSentCallback | null; sending_payload_callback: RayBeforePayloadSentCallback | null; protected originalSettings: RaySettings; constructor(settings: RaySettings); toObject(): RaySettings; } declare class StopwatchEvent { protected name: string | undefined; protected laps: number[]; protected startedAt: number; protected endedAt: number; protected lapTime: number; constructor(sw: Stopwatch, lapTime?: number | null); getDuration(): number; getMemory(callback?: null | CallableFunction): number; getPeriods(): number[]; getPreviousDuration(): number; } declare class Stopwatch { name: string | undefined; laps: number[]; startedAt: number; endedAt: number; constructor(name?: string | undefined); protected initialize(name: string | undefined): void; start(name: string | undefined): StopwatchEvent; lap(): StopwatchEvent; stop(): StopwatchEvent; totalDuration(): number; reset(): this; getLaps(): number[]; } declare class Counters { protected counters: Record; increment(name: string): Promise; get(name: string): number; clear(): void; setRay(name: string, ray: Ray): void; getCounters(): Record; } export interface LimiterCounter { counter: number; limit: number; valid: boolean; } declare class Limiters { protected counters: Record; initialize(origin: OriginData, limit: number): LimiterCounter; increment(origin: OriginData): LimiterCounter; canSendPayload(origin: OriginData): boolean; } declare class DateImmutable { dateStr: string; dateTs: number; protected _date: Date; get date(): Date; set date(value: Date); static createFrom(date: Date): DateImmutable; constructor(date?: Date | null); getTimestamp(): number; addSeconds(seconds: number): DateImmutable; subSeconds(seconds: number): DateImmutable; } declare abstract class Clock { abstract now(): DateImmutable; } declare class CacheStore { protected store: DateImmutable[]; protected clock: Clock; constructor(clock: Clock); hit(): this; clear(): this; count(): number; countLastSecond(): number; protected isBetween(toCheck: DateImmutable, start: DateImmutable, end: DateImmutable): boolean; } declare class RateLimiter { protected maxCalls: number | null; protected maxPerSecond: number | null; protected cache: CacheStore; notified: boolean; protected constructor(maxCalls?: number | null, maxPerSecond?: number | null); static disabled(): RateLimiter; hit(): this; max(maxCalls?: number | null): this; perSecond(callsPerSecond?: number | null): this; isMaxReached(): boolean; isMaxPerSecondReached(): boolean; clear(): this; isNotified(): boolean; notify(): void; getCache(): CacheStore; } declare enum SendRequestCallbackType { Sending = "sending", Sent = "sent" } export type RayCallback = (r: Ray) => void; declare const Ray_base: import("ts-mixer/dist/types/types").Class; export declare class Ray extends Ray_base { protected static lockCounter: number; protected inCallback: boolean; settings: Settings; static defaultSettings: RaySettings; static client: Client; static projectName: string; static counters: Counters; static limiters: Limiters; static interceptor: ConsoleInterceptor; static fakeUuid: string; uuid: string; static stopWatches: Record; static enabled: boolean | null; static macros: Record; limitOrigin: OriginData | null; canSendPayload: boolean; protected chaining: boolean; protected chainedPayloads: Payload[]; [macroName: string]: any; static _rateLimiter: RateLimiter; static create(client?: Client | null, uuid?: string | null): Ray; constructor(settings: Settings, client?: Client | null, uuid?: string | null, inCallback?: boolean); static useDefaultSettings(settings: RaySettings): typeof Ray; protected loadMacros(): this; interceptor(): ConsoleInterceptor; client(): Client; enable(): this; disable(): this; enabled(): boolean; disabled(): boolean; static useClient(client: Client): void; project(projectName: string): this; newScreen(name?: string): this; clearAll(): this; clearScreen(): this; color(color: string): this; confetti(): this; screenColor(color: string): this; label(label: string): this; size(size: string): this; remove(): this; hide(): this; notify(text: string): this; toJson(...values: any[]): this; json(...jsons: string[]): this; file(filename: string): this; image(location: string): this; die(status?: string): void; className(object: any): this; error(err: Error): this; event(eventName: string, data?: any[]): this; exception(err: Error, meta?: Record): Promise; ban(): this; charles(): this; table(values: Record | any[], label?: string): this; count(name?: string | null): Promise; clearCounters(): this; pause(): Promise; stopTime(stopwatchName?: string): this; caller(): Promise; trace(): Promise; measure(stopwatchName?: CallableFunction | string): this; protected measureClosure(closure: CallableFunction): this; protected getStopwatch(name: string): Stopwatch; protected getMeasurePayload(name: string, event: any): any; separator(): this; xml(xml: string): this; html(html?: string): this; text(text?: string): this; date(date: Date): this; raw(...args: any[]): this; send(...args: any[]): this; pass(argument: any): any; showApp(): this; hideApp(): this; macro(name: string, handler: CallableFunction): this; htmlMarkup(html: string, options?: HtmlMarkupOptions): this; if(boolOrCallable: CallableFunction | boolean, callback?: CallableFunction | null): this; limit(count: number): Promise; once(...args: any[]): Promise; chain(callback: RayCallback): this; sendCustom(content: string, label?: string): this; getOriginFrame(): Promise; getCaller(): Promise; getOriginData(): Promise; protected prepareMeta(meta: Record): { node_ray_package_version: any; project_name: string; } & Record; protected executePayloadCallback(callbackType: SendRequestCallbackType, args?: any): void; sendRequest(payloads: Payload | Payload[], meta?: any[]): this; rateLimiter(): RateLimiter; protected notifyWhenRateLimitReached(): Promise; standalone(windowObject: any): void; } export declare const ray: (...args: any[]) => Ray; export declare const standalone: (windowObject: any) => void;