shopee-openapi-v2
Version:
shopee open api sdk
17 lines (16 loc) • 985 B
TypeScript
import { AxiosRequestConfig, AxiosResponse, Method } from "axios";
export declare const axios_service: import("axios").AxiosInstance;
export declare type BaseRes = {
request_id: string;
error: string;
message: string;
};
export declare type ShopReq = {
shop_id: number;
access_token: string;
};
export declare type ApiMethod<T = any, R = any> = (data: T, option?: AxiosRequestConfig<T>) => Promise<AxiosResponse<BaseRes & R>>;
export declare type ApiShopMethod<T = any, R = any> = (data: ShopReq & T, option?: AxiosRequestConfig<ShopReq & T>) => Promise<AxiosResponse<BaseRes & R>>;
export declare function createApiByMethod(method: Method): (args: AxiosRequestConfig, request?: import("axios").AxiosInstance) => PropertyDecorator;
export declare const Get: (args: AxiosRequestConfig, request?: import("axios").AxiosInstance) => PropertyDecorator;
export declare const Post: (args: AxiosRequestConfig, request?: import("axios").AxiosInstance) => PropertyDecorator;