UNPKG

@stuntman/client

Version:

Stuntman - HTTP proxy / mock API client

18 lines 908 B
import type * as Stuntman from '@stuntman/shared'; export declare const serializeApiFunction: (fn: (...args: any[]) => any, variables?: Stuntman.LocalVariables) => string; export declare const serializeRemotableFunctions: <T>(obj: any) => Stuntman.WithSerializedFunctions<T>; export declare class Client { private options; private get baseUrl(); constructor(options?: Partial<Stuntman.ClientConfig>); private fetch; getRules(): Promise<Stuntman.LiveRule[]>; getRule(id: string): Promise<Stuntman.LiveRule>; disableRule(id: string): Promise<void>; enableRule(id: string): Promise<void>; removeRule(id: string): Promise<void>; addRule(rule: Stuntman.SerializableRule): Promise<Stuntman.Rule>; getTraffic(rule: Stuntman.Rule): Promise<Stuntman.LogEntry[]>; getTraffic(ruleIdOrLabel: string): Promise<Stuntman.LogEntry[]>; } //# sourceMappingURL=apiClient.d.ts.map