@respeecher/respeecher-js
Version:
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Frespeecher%2Frespeecher-js) [ • 535 B
text/typescript
import { RawResponse } from "./RawResponse.mjs";
/**
* The response of an API call.
* It is a successful response or a failed response.
*/
export type APIResponse<Success, Failure> = SuccessfulResponse<Success> | FailedResponse<Failure>;
export interface SuccessfulResponse<T> {
ok: true;
body: T;
/**
* @deprecated Use `rawResponse` instead
*/
headers?: Record<string, any>;
rawResponse: RawResponse;
}
export interface FailedResponse<T> {
ok: false;
error: T;
rawResponse: RawResponse;
}