bc-node-sdk
Version:
BetterCommerce's NodeJS SDK encapsulates the base framework for all the Next.js applications.
24 lines (23 loc) • 1.01 kB
TypeScript
import { ResponseType } from "axios";
import { RequestCookies } from "next/dist/compiled/@edge-runtime/cookies";
/**
* The interface for the API parameters.
*
* @interface IApiParams
* @property {string} endpoint - The endpoint URL of the API.
* @property {Object} [data] - The data to be sent with the request.
* @property {Object} [params] - The URL parameters to be sent with the request.
* @property {Headers | Object} [headers] - The headers to be sent with the request.
* @property {RequestCookies} [cookies] - The cookies to be sent with the request.
* @property {string} [baseUrl] - The base URL of the API.
* @property {ResponseType} [responseType] - The response type of the API.
*/
export default interface IApiParams {
readonly endpoint: string;
readonly data?: Object;
readonly params?: Object;
readonly headers?: Headers | Object;
readonly cookies?: RequestCookies;
readonly baseUrl?: string;
readonly responseType?: ResponseType;
}