bugsnag-source-maps-fork
Version:
CLI and JS library for uploading source maps to Bugsnag
42 lines (41 loc) • 1.34 kB
TypeScript
import http from 'http';
import File from './File';
export declare const enum PayloadType {
Browser = 0,
ReactNative = 1,
Node = 2
}
type Payload = BrowserPayload | ReactNativePayload | NodePayload;
type BrowserPayload = JsPayload;
type NodePayload = JsPayload;
interface JsPayload {
type: PayloadType.Node | PayloadType.Browser;
apiKey: string;
appVersion?: string;
codeBundleId?: string;
minifiedUrl: string;
sourceMap: File;
minifiedFile?: File;
overwrite?: boolean;
}
interface ReactNativePayload {
type: PayloadType.ReactNative;
apiKey: string;
platform: 'ios' | 'android';
appVersion?: string;
codeBundleId?: string;
appBundleVersion?: string;
appVersionCode?: string;
overwrite: boolean;
dev: boolean;
sourceMap: File;
bundle: File;
}
interface RequestOptions {
idleTimeout?: number;
}
export default function request(endpoint: string, payload: Payload, requestOpts: http.RequestOptions, options?: RequestOptions): Promise<void>;
export declare function send(endpoint: string, payload: Payload, requestOpts: http.RequestOptions, options?: RequestOptions): Promise<void>;
export declare function isRetryable(status?: number): boolean;
export declare function fetch(endpoint: string, options?: RequestOptions): Promise<string>;
export {};