JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2363
  • Score
    100M100P100Q120158F
  • License MIT

TypeScript definitions for loggly

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@types/loggly) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    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

    // Type definitions for loggly 1.1
    // Project: https://github.com/winstonjs/node-loggly
    // Definitions by: Ray Martone <https://github.com/rmartone>, Joshua DeVinney <https://github.com/geoffreak>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    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: Wed, 30 Aug 2023 19:35:17 GMT
    • Dependencies: none
    • Global values: none

    Credits

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