mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Type for Signalfx package (#38638)
* added signalfx * fixed test errors * fixed test errors
This commit is contained in:
committed by
Ben Lichtman
parent
8d3e4aacc9
commit
13e90c82cf
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
// Type definitions for signalfx 7.0
|
||||
// Project: https://github.com/signalfx/signalfx-nodejs
|
||||
// Definitions by: Vladimir Grenaderov <https://github.com/VladimirGrenaderov>
|
||||
// Max Boguslavskiy <https://github.com/maxbogus>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
export interface IngestOptions {
|
||||
enableAmazonUniqueId?: boolean;
|
||||
dimensions?: object;
|
||||
ingestEndpoint?: string;
|
||||
timeout?: number;
|
||||
batchSize?: number;
|
||||
userAgents?: string[];
|
||||
proxy?: string;
|
||||
}
|
||||
|
||||
export interface SignalMetric {
|
||||
metric: string;
|
||||
value: number;
|
||||
timestamp?: number;
|
||||
}
|
||||
|
||||
export interface SignalReport {
|
||||
cumulative_counters?: SignalMetric[];
|
||||
gauges?: SignalMetric[];
|
||||
counters?: SignalMetric[];
|
||||
}
|
||||
|
||||
export interface SignalClient {
|
||||
send(report: SignalReport): void;
|
||||
}
|
||||
|
||||
export class Ingest {
|
||||
constructor(token: string, options?: IngestOptions);
|
||||
send(report: SignalReport): void;
|
||||
}
|
||||
|
||||
export class IngestJson {
|
||||
constructor(token: string, options?: IngestOptions);
|
||||
send(report: SignalReport): void;
|
||||
}
|
||||
|
||||
export const CONSTANTS: {
|
||||
MESSAGE_TYPES: {
|
||||
CONTROL: string;
|
||||
DATA: string;
|
||||
EVENT: string;
|
||||
METADATA: string;
|
||||
};
|
||||
};
|
||||
|
||||
export function SignalFlow(apiToken: any, options: any): any;
|
||||
@@ -0,0 +1,4 @@
|
||||
import * as signalfx from 'signalfx';
|
||||
|
||||
const sgnlfx = new signalfx.Ingest('1');
|
||||
sgnlfx.send({});
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"signalfx-tests.ts"
|
||||
],
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user