inventora-shopify-admin-api
Version:
Shopify Admin API is a NodeJS library built to help developers easily authenticate and make calls against the Shopify API. It was inspired by and borrows heavily from ShopifySharp.
26 lines (25 loc) • 972 B
TypeScript
export interface CallLimits {
timestamp: number | undefined;
remaining: number | undefined;
current: number | undefined;
max: number | undefined;
}
export declare class BaseService {
private shopDomain;
private accessToken;
private resource;
private static apiInfo;
constructor(shopDomain: string, accessToken: string, resource: string);
getCallLimits(): CallLimits;
static buildDefaultHeaders(): {
Accept: string;
"User-Agent": string;
};
/**
* Joins URI paths into one single string, replacing bad slashes and ensuring the path doesn't end in /.json.
*/
protected joinUriPaths(...paths: string[]): string;
protected createRequest<T>(method: "GET" | "POST" | "PUT" | "DELETE", path: string, rootElement?: string, payload?: Object): Promise<T>;
protected createPaginatedRequest<T>(path: string, rootElement?: string, payload?: Object): Promise<any[]>;
}
export default BaseService;