@squarecloud/blob
Version:
Official Square Cloud Blob SDK for NodeJS
15 lines (13 loc) • 405 B
text/typescript
type APIRequestInit = Omit<RequestInit, "method" | "body"> & {
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
params?: Record<string, string | number | boolean | undefined>;
body?: object | FormData;
};
type APIPayload<TResponse = unknown> = {
status: "success";
response?: TResponse;
} | {
status: "error";
code: string;
};
export type { APIPayload, APIRequestInit };