@types/loggly
TypeScript icon, indicating that this package has built-in type declarations

1.1.34 • Public • Published

Installation

npm install --save @types/loggly

Summary

This package contains type definitions for loggly (https://github.com/winstonjs/node-loggly).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/loggly.

index.d.ts

export declare interface LogglyOptions {
    token: string;
    subdomain: string;
    tags?: string[] | undefined;
    json?: boolean | undefined;
    host?: string | undefined;
    auth?: {
        username: string;
        password: string;
    } | undefined;
}

declare interface SharedSearchOptions {
    from?: string | undefined;
    until?: string | undefined;
    size?: number | undefined;
    rows?: number | undefined;
}
export declare interface SearchOptionsWithQ extends SharedSearchOptions {
    q: string;
}
export declare interface SearchOptionsWithQuery extends SharedSearchOptions {
    query: string;
}
export declare type SearchOptions = SearchOptionsWithQ | SearchOptionsWithQuery;

export declare interface SearchResults {
    events: SearchResultsEvent[];
    total_events: number;
    page: number;
}
export declare interface SearchResultsEvent {
    id: string;
    logtypes: string[];
    event: any;
    logmsg: string;
    raw: string;
    timestamp: number;
    tags: string[];
}

export declare function createClient(options: LogglyOptions): LogglyInstance;
export declare const version: number;

export declare interface LogglyInstance {
    log(message: any, tags?: string[], callback?: (err: any, results: any) => void): this;
    log(message: any, callback?: (err: any, results: any) => void): this;
    search(query: string, callback?: (err: any, results: SearchResults) => void): Search;
    search(options: SearchOptions, callback?: (err: any, results: SearchResults) => void): Search;
}

export declare interface Search {
    run(callback: (err: any, results: SearchResults) => void): this;
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:38 GMT
  • Dependencies: none

Credits

These definitions were written by Ray Martone, and Joshua DeVinney.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/loggly

Weekly Downloads

1,260

Version

1.1.34

License

MIT

Unpacked Size

5.98 kB

Total Files

5

Last publish

Collaborators

  • types