UNPKG

@swell/cli

Version:

Swell's command line interface/utility

28 lines (27 loc) 1.04 kB
export declare enum HttpMethod { GET = "get", POST = "post", PUT = "put", DELETE = "delete" } export default class Api { envId: string | undefined; secretKey: string | undefined; storeId: string | undefined; constructor(storeId?: string, envId?: string, secretKey?: string); api(pathOpts: Api.Paths, options: Api.RequestOptions): Promise<any>; get(pathOpts: Api.Paths, options?: Api.RequestOptions): Promise<any>; getAll(pathOpts: Api.Paths, options?: Api.RequestOptions): Promise<{ count: number; results: any[]; }>; post(pathOpts: Api.Paths, options?: Api.RequestOptions): Promise<any>; put(pathOpts: Api.Paths, options?: Api.RequestOptions): Promise<any>; delete(pathOpts: Api.Paths, options?: Api.RequestOptions): Promise<any>; isTestEnvEnabled(): Promise<boolean>; setEnv(envId: string): Promise<void>; setStoreEnv(storeId: string, envId?: string): Promise<void>; private isAdmin; private truncatePath; private waitForAsyncResponse; }