backtrace-node
Version:
Backtrace error reporting tool
27 lines (26 loc) • 716 B
TypeScript
/**
* Generate a UUID
*/
export declare function uuid(): string;
/**
* Current unix time in seconds.
*/
export declare function currentTimestamp(millis?: boolean): number;
declare type EndpointParameters = {
universe: string | undefined;
token: string | undefined;
};
/**
* Get universe and token from the endpoint.
*/
export declare function getEndpointParams(endpoint: string, token?: string): EndpointParameters | undefined;
/**
* Send POST request.
* @param url - string endpoint
* @param data - JSON Object.
*/
export declare function post(url: string, data: Record<string, unknown>, options?: {
timeout?: number;
headers?: any;
}): Promise<void>;
export {};