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

2.8.10 • Public • Published

Installation

npm install --save @types/dogapi

Summary

This package contains type definitions for dogapi (https://github.com/brettlangdon/node-dogapi#readme).

Details

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

index.d.ts

export function initialize(opts: { api_key: string; app_key: string; api_host?: string | undefined }): void;

interface event {
    create(title: string, text: string, callback: (err: Error | null, res: EventCreateResponse) => void): void;
    create(
        title: string,
        text: string,
        properties: {
            date_happened?: number | undefined;
            priority?: "normal" | "low" | undefined;
            host?: string | undefined;
            tags?: readonly string[] | undefined;
            alert_type?: "error" | "warning" | "info" | "success" | undefined;
            aggregation_key?: string | undefined;
            source_type_name?:
                | "nagios"
                | "hudson"
                | "jenkins"
                | "user"
                | "my apps"
                | "feed"
                | "chef"
                | "puppet"
                | "git"
                | "bitbucket"
                | "fabric"
                | "capistrano"
                | undefined;
        },
        callback: (err: Error | null, res: EventCreateResponse) => void,
    ): void;
}

export const event: event;

interface metric {
    send(metric: string, points: number | number[], callback: (err: Error | null, res: "ok") => void): void;
    send(
        metric: string,
        points: number | number[],
        extra: {
            type?: "gauge" | "rate" | "count" | undefined;
            metric_type?: "gauge" | "count" | undefined;
            host?: string | undefined;
            tags?: readonly string[] | undefined;
        },
        callback: (err: Error | null, res: "ok") => void,
    ): void;
    send_all(
        metrics: Array<{
            metric: string;
            points: number | number[] | Array<[string, number]>;
            tags?: string[] | undefined;
            type?: string | undefined;
            metric_type?: string | undefined;
        }>,
        callback: (err: Error | null, res: EventCreateResponse) => void,
    ): void;
}

export const metric: metric;

export interface EventCreateResponse {
    ok: boolean;
    event: {
        date_happened: number;
        handle: any;
        id: bigint;
        priority: "normal" | "low";
        related_event_id: number | null;
        tags: readonly string[];
        text: string;
        title: string;
        url: string;
    };
    status: "ok";
}

export {};

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:24 GMT
  • Dependencies: none

Credits

These definitions were written by olebedev.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/dogapi

Weekly Downloads

59,532

Version

2.8.10

License

MIT

Unpacked Size

7.31 kB

Total Files

5

Last publish

Collaborators

  • types