fsm-sdk
Version:
Node.JS sdk to interface with SAP Field Service Management APIs.
30 lines (29 loc) • 772 B
TypeScript
/// <reference types="node" />
export declare type ErrorResponse<TError, TOptions> = {
uri: string;
statusCode: number;
message: string;
error: TError;
response: HttpResponse;
options: TOptions;
};
export declare type HttpResponse = {
headers: Iterable<[string, string]> & {
get: (key: string) => string | null;
};
ok: boolean;
redirected: boolean;
status: number;
statusText: string;
type: string;
url: string;
json<T>(): Promise<T>;
text(): Promise<string>;
};
export declare type HttpRequestOptions = {
body?: ArrayBuffer | ArrayBufferView | NodeJS.ReadableStream | string | any;
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
headers: {
[key: string]: string;
};
};