mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-05-10 18:00:17 +02:00
Start on plugin ctx API (#64)
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { HttpRequest } from '../gen/HttpRequest';
|
||||
import { HttpResponse } from '../gen/HttpResponse';
|
||||
import { GetHttpRequestByIdRequest } from '../gen/GetHttpRequestByIdRequest';
|
||||
import { GetHttpRequestByIdResponse } from '../gen/GetHttpRequestByIdResponse';
|
||||
import { SendHttpRequestRequest } from '../gen/SendHttpRequestRequest';
|
||||
import { SendHttpRequestResponse } from '../gen/SendHttpRequestResponse';
|
||||
|
||||
export type YaakContext = {
|
||||
metadata: {
|
||||
getVersion(): Promise<string>;
|
||||
};
|
||||
httpRequest: {
|
||||
send(id: string): Promise<HttpResponse>;
|
||||
getById(id: string): Promise<HttpRequest | null>;
|
||||
send(args: SendHttpRequestRequest): Promise<SendHttpRequestResponse['httpResponse']>;
|
||||
getById(args: GetHttpRequestByIdRequest): Promise<GetHttpRequestByIdResponse['httpRequest']>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3,6 +3,7 @@ import { FilterPlugin } from './filter';
|
||||
import { HttpRequestActionPlugin } from './httpRequestAction';
|
||||
import { ImporterPlugin } from './import';
|
||||
import { ThemePlugin } from './theme';
|
||||
export { YaakContext } from './context';
|
||||
|
||||
/**
|
||||
* The global structure of a Yaak plugin
|
||||
|
||||
Reference in New Issue
Block a user