@sauce-api/core
Version:
Sauce API core functionality
23 lines (22 loc) • 692 B
TypeScript
import { ObjectOfAnything } from "./Common";
import { PaginatedObject } from "./PaginationTypes";
export type SauceResponseType = IPaginatedResponse | IResponse | IArrayResponse | IErrorResponse;
interface ICommonResponse {
code: number;
}
export interface IPaginatedResponse extends ICommonResponse {
response: PaginatedObject["data"];
page: PaginatedObject["page"];
}
export interface IResponse extends ICommonResponse {
response: ObjectOfAnything;
}
export interface IArrayResponse extends ICommonResponse {
response: Array<any>;
}
export interface IErrorResponse extends ICommonResponse {
response: any;
error: string;
error_description: any;
}
export {};