@yaakapp/api 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/gen/CallHttpRequestActionArgs.d.ts +4 -0
- package/lib/gen/CallHttpRequestActionArgs.js +2 -0
- package/lib/gen/CallHttpRequestActionRequest.d.ts +6 -0
- package/lib/gen/CallHttpRequestActionRequest.js +2 -0
- package/lib/gen/Cookie.d.ts +8 -0
- package/lib/gen/Cookie.js +2 -0
- package/lib/gen/CookieDomain.d.ts +5 -0
- package/lib/gen/CookieDomain.js +3 -0
- package/lib/gen/CookieExpires.d.ts +3 -0
- package/lib/gen/CookieExpires.js +3 -0
- package/lib/gen/CookieJar.d.ts +10 -0
- package/lib/gen/CookieJar.js +2 -0
- package/lib/gen/CopyTextRequest.d.ts +3 -0
- package/lib/gen/CopyTextRequest.js +3 -0
- package/lib/gen/GetHttpRequestActionsRequest.d.ts +3 -0
- package/lib/gen/GetHttpRequestActionsRequest.js +3 -0
- package/lib/gen/GetHttpRequestActionsResponse.d.ts +5 -0
- package/lib/gen/GetHttpRequestActionsResponse.js +2 -0
- package/lib/gen/GetHttpRequestByIdRequest.d.ts +3 -0
- package/lib/gen/GetHttpRequestByIdRequest.js +3 -0
- package/lib/gen/GetHttpRequestByIdResponse.d.ts +4 -0
- package/lib/gen/GetHttpRequestByIdResponse.js +2 -0
- package/lib/gen/HttpRequestAction.d.ts +4 -0
- package/lib/gen/HttpRequestAction.js +3 -0
- package/lib/gen/InternalEventPayload.d.ts +23 -0
- package/lib/gen/Model.d.ts +3 -1
- package/lib/gen/SendHttpRequestRequest.d.ts +4 -0
- package/lib/gen/SendHttpRequestRequest.js +2 -0
- package/lib/gen/SendHttpRequestResponse.d.ts +4 -0
- package/lib/gen/SendHttpRequestResponse.js +2 -0
- package/lib/gen/Settings.d.ts +16 -0
- package/lib/gen/Settings.js +3 -0
- package/lib/index.d.ts +15 -0
- package/lib/index.js +16 -0
- package/lib/plugins/context.d.ts +8 -6
- package/lib/plugins/httpRequestAction.d.ts +4 -7
- package/lib/plugins/index.d.ts +5 -5
- package/package.json +1 -1
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import type { BootRequest } from "./BootRequest";
|
|
2
2
|
import type { BootResponse } from "./BootResponse";
|
|
3
|
+
import type { CallHttpRequestActionRequest } from "./CallHttpRequestActionRequest";
|
|
4
|
+
import type { CopyTextRequest } from "./CopyTextRequest";
|
|
3
5
|
import type { EmptyResponse } from "./EmptyResponse";
|
|
4
6
|
import type { ExportHttpRequestRequest } from "./ExportHttpRequestRequest";
|
|
5
7
|
import type { ExportHttpRequestResponse } from "./ExportHttpRequestResponse";
|
|
6
8
|
import type { FilterRequest } from "./FilterRequest";
|
|
7
9
|
import type { FilterResponse } from "./FilterResponse";
|
|
10
|
+
import type { GetHttpRequestActionsResponse } from "./GetHttpRequestActionsResponse";
|
|
11
|
+
import type { GetHttpRequestByIdRequest } from "./GetHttpRequestByIdRequest";
|
|
12
|
+
import type { GetHttpRequestByIdResponse } from "./GetHttpRequestByIdResponse";
|
|
8
13
|
import type { ImportRequest } from "./ImportRequest";
|
|
9
14
|
import type { ImportResponse } from "./ImportResponse";
|
|
15
|
+
import type { SendHttpRequestRequest } from "./SendHttpRequestRequest";
|
|
16
|
+
import type { SendHttpRequestResponse } from "./SendHttpRequestResponse";
|
|
10
17
|
export type InternalEventPayload = {
|
|
11
18
|
"type": "boot_request";
|
|
12
19
|
} & BootRequest | {
|
|
@@ -24,5 +31,21 @@ export type InternalEventPayload = {
|
|
|
24
31
|
} & ExportHttpRequestRequest | {
|
|
25
32
|
"type": "export_http_request_response";
|
|
26
33
|
} & ExportHttpRequestResponse | {
|
|
34
|
+
"type": "send_http_request_request";
|
|
35
|
+
} & SendHttpRequestRequest | {
|
|
36
|
+
"type": "send_http_request_response";
|
|
37
|
+
} & SendHttpRequestResponse | {
|
|
38
|
+
"type": "get_http_request_actions_request";
|
|
39
|
+
} | {
|
|
40
|
+
"type": "get_http_request_actions_response";
|
|
41
|
+
} & GetHttpRequestActionsResponse | {
|
|
42
|
+
"type": "call_http_request_action_request";
|
|
43
|
+
} & CallHttpRequestActionRequest | {
|
|
44
|
+
"type": "copy_text_request";
|
|
45
|
+
} & CopyTextRequest | {
|
|
46
|
+
"type": "get_http_request_by_id_request";
|
|
47
|
+
} & GetHttpRequestByIdRequest | {
|
|
48
|
+
"type": "get_http_request_by_id_response";
|
|
49
|
+
} & GetHttpRequestByIdResponse | {
|
|
27
50
|
"type": "empty_response";
|
|
28
51
|
} & EmptyResponse;
|
package/lib/gen/Model.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CookieJar } from "./CookieJar";
|
|
1
2
|
import type { Environment } from "./Environment";
|
|
2
3
|
import type { Folder } from "./Folder";
|
|
3
4
|
import type { GrpcConnection } from "./GrpcConnection";
|
|
@@ -6,5 +7,6 @@ import type { GrpcRequest } from "./GrpcRequest";
|
|
|
6
7
|
import type { HttpRequest } from "./HttpRequest";
|
|
7
8
|
import type { HttpResponse } from "./HttpResponse";
|
|
8
9
|
import type { KeyValue } from "./KeyValue";
|
|
10
|
+
import type { Settings } from "./Settings";
|
|
9
11
|
import type { Workspace } from "./Workspace";
|
|
10
|
-
export type Model = Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | KeyValue | Workspace;
|
|
12
|
+
export type Model = Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | KeyValue | Workspace | CookieJar | Settings;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Settings = {
|
|
2
|
+
id: string;
|
|
3
|
+
model: "settings";
|
|
4
|
+
createdAt: string;
|
|
5
|
+
updatedAt: string;
|
|
6
|
+
theme: string;
|
|
7
|
+
appearance: string;
|
|
8
|
+
themeDark: string;
|
|
9
|
+
themeLight: string;
|
|
10
|
+
updateChannel: string;
|
|
11
|
+
interfaceFontSize: number;
|
|
12
|
+
interfaceScale: number;
|
|
13
|
+
editorFontSize: number;
|
|
14
|
+
editorSoftWrap: boolean;
|
|
15
|
+
openWorkspaceNewWindow: boolean | null;
|
|
16
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ export type * from './plugins';
|
|
|
2
2
|
export type * from './themes';
|
|
3
3
|
export * from './gen/BootRequest';
|
|
4
4
|
export * from './gen/BootResponse';
|
|
5
|
+
export * from './gen/CallHttpRequestActionRequest';
|
|
6
|
+
export * from './gen/CallHttpRequestActionArgs';
|
|
7
|
+
export * from './gen/Cookie';
|
|
8
|
+
export * from './gen/CookieDomain';
|
|
9
|
+
export * from './gen/CookieExpires';
|
|
10
|
+
export * from './gen/CookieJar';
|
|
5
11
|
export * from './gen/EmptyResponse';
|
|
6
12
|
export * from './gen/Environment';
|
|
7
13
|
export * from './gen/EnvironmentVariable';
|
|
@@ -10,11 +16,16 @@ export * from './gen/ExportHttpRequestResponse';
|
|
|
10
16
|
export * from './gen/FilterRequest';
|
|
11
17
|
export * from './gen/FilterResponse';
|
|
12
18
|
export * from './gen/Folder';
|
|
19
|
+
export * from './gen/GetHttpRequestActionsResponse';
|
|
20
|
+
export * from './gen/GetHttpRequestByIdRequest';
|
|
21
|
+
export * from './gen/CopyTextRequest';
|
|
22
|
+
export * from './gen/GetHttpRequestByIdResponse';
|
|
13
23
|
export * from './gen/GrpcConnection';
|
|
14
24
|
export * from './gen/GrpcEvent';
|
|
15
25
|
export * from './gen/GrpcMetadataEntry';
|
|
16
26
|
export * from './gen/GrpcRequest';
|
|
17
27
|
export * from './gen/HttpRequest';
|
|
28
|
+
export * from './gen/HttpRequestAction';
|
|
18
29
|
export * from './gen/HttpRequestHeader';
|
|
19
30
|
export * from './gen/HttpResponse';
|
|
20
31
|
export * from './gen/HttpResponseHeader';
|
|
@@ -26,4 +37,8 @@ export * from './gen/InternalEvent';
|
|
|
26
37
|
export * from './gen/InternalEventPayload';
|
|
27
38
|
export * from './gen/KeyValue';
|
|
28
39
|
export * from './gen/Model';
|
|
40
|
+
export * from './gen/SendHttpRequestRequest';
|
|
41
|
+
export * from './gen/SendHttpRequestResponse';
|
|
42
|
+
export * from './gen/SendHttpRequestResponse';
|
|
43
|
+
export * from './gen/Settings';
|
|
29
44
|
export * from './gen/Workspace';
|
package/lib/index.js
CHANGED
|
@@ -14,8 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
// TODO: The next ts-rs release includes the ability to put everything in 1 file!
|
|
17
18
|
__exportStar(require("./gen/BootRequest"), exports);
|
|
18
19
|
__exportStar(require("./gen/BootResponse"), exports);
|
|
20
|
+
__exportStar(require("./gen/CallHttpRequestActionRequest"), exports);
|
|
21
|
+
__exportStar(require("./gen/CallHttpRequestActionArgs"), exports);
|
|
22
|
+
__exportStar(require("./gen/Cookie"), exports);
|
|
23
|
+
__exportStar(require("./gen/CookieDomain"), exports);
|
|
24
|
+
__exportStar(require("./gen/CookieExpires"), exports);
|
|
25
|
+
__exportStar(require("./gen/CookieJar"), exports);
|
|
19
26
|
__exportStar(require("./gen/EmptyResponse"), exports);
|
|
20
27
|
__exportStar(require("./gen/Environment"), exports);
|
|
21
28
|
__exportStar(require("./gen/EnvironmentVariable"), exports);
|
|
@@ -24,11 +31,16 @@ __exportStar(require("./gen/ExportHttpRequestResponse"), exports);
|
|
|
24
31
|
__exportStar(require("./gen/FilterRequest"), exports);
|
|
25
32
|
__exportStar(require("./gen/FilterResponse"), exports);
|
|
26
33
|
__exportStar(require("./gen/Folder"), exports);
|
|
34
|
+
__exportStar(require("./gen/GetHttpRequestActionsResponse"), exports);
|
|
35
|
+
__exportStar(require("./gen/GetHttpRequestByIdRequest"), exports);
|
|
36
|
+
__exportStar(require("./gen/CopyTextRequest"), exports);
|
|
37
|
+
__exportStar(require("./gen/GetHttpRequestByIdResponse"), exports);
|
|
27
38
|
__exportStar(require("./gen/GrpcConnection"), exports);
|
|
28
39
|
__exportStar(require("./gen/GrpcEvent"), exports);
|
|
29
40
|
__exportStar(require("./gen/GrpcMetadataEntry"), exports);
|
|
30
41
|
__exportStar(require("./gen/GrpcRequest"), exports);
|
|
31
42
|
__exportStar(require("./gen/HttpRequest"), exports);
|
|
43
|
+
__exportStar(require("./gen/HttpRequestAction"), exports);
|
|
32
44
|
__exportStar(require("./gen/HttpRequestHeader"), exports);
|
|
33
45
|
__exportStar(require("./gen/HttpResponse"), exports);
|
|
34
46
|
__exportStar(require("./gen/HttpResponseHeader"), exports);
|
|
@@ -40,4 +52,8 @@ __exportStar(require("./gen/InternalEvent"), exports);
|
|
|
40
52
|
__exportStar(require("./gen/InternalEventPayload"), exports);
|
|
41
53
|
__exportStar(require("./gen/KeyValue"), exports);
|
|
42
54
|
__exportStar(require("./gen/Model"), exports);
|
|
55
|
+
__exportStar(require("./gen/SendHttpRequestRequest"), exports);
|
|
56
|
+
__exportStar(require("./gen/SendHttpRequestResponse"), exports);
|
|
57
|
+
__exportStar(require("./gen/SendHttpRequestResponse"), exports);
|
|
58
|
+
__exportStar(require("./gen/Settings"), exports);
|
|
43
59
|
__exportStar(require("./gen/Workspace"), exports);
|
package/lib/plugins/context.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { GetHttpRequestByIdRequest } from '../gen/GetHttpRequestByIdRequest';
|
|
2
|
+
import { GetHttpRequestByIdResponse } from '../gen/GetHttpRequestByIdResponse';
|
|
3
|
+
import { SendHttpRequestRequest } from '../gen/SendHttpRequestRequest';
|
|
4
|
+
import { SendHttpRequestResponse } from '../gen/SendHttpRequestResponse';
|
|
3
5
|
export type YaakContext = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
clipboard: {
|
|
7
|
+
copyText(text: string): void;
|
|
6
8
|
};
|
|
7
9
|
httpRequest: {
|
|
8
|
-
send(
|
|
9
|
-
getById(
|
|
10
|
+
send(args: SendHttpRequestRequest): Promise<SendHttpRequestResponse['httpResponse']>;
|
|
11
|
+
getById(args: GetHttpRequestByIdRequest): Promise<GetHttpRequestByIdResponse['httpRequest']>;
|
|
10
12
|
};
|
|
11
13
|
};
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CallHttpRequestActionArgs } from '../gen/CallHttpRequestActionArgs';
|
|
2
|
+
import { HttpRequestAction } from '../gen/HttpRequestAction';
|
|
2
3
|
import { YaakContext } from './context';
|
|
3
|
-
export type HttpRequestActionPlugin = {
|
|
4
|
-
|
|
5
|
-
label: string;
|
|
6
|
-
onSelect(ctx: YaakContext, args: {
|
|
7
|
-
httpRequest: HttpRequest;
|
|
8
|
-
}): void;
|
|
4
|
+
export type HttpRequestActionPlugin = HttpRequestAction & {
|
|
5
|
+
onSelect(ctx: YaakContext, args: CallHttpRequestActionArgs): Promise<void> | void;
|
|
9
6
|
};
|
package/lib/plugins/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { OneOrMany } from '../helpers';
|
|
2
1
|
import { FilterPlugin } from './filter';
|
|
3
2
|
import { HttpRequestActionPlugin } from './httpRequestAction';
|
|
4
3
|
import { ImporterPlugin } from './import';
|
|
5
4
|
import { ThemePlugin } from './theme';
|
|
5
|
+
export { YaakContext } from './context';
|
|
6
6
|
/**
|
|
7
7
|
* The global structure of a Yaak plugin
|
|
8
8
|
*/
|
|
9
9
|
export type YaakPlugin = {
|
|
10
|
-
importer?:
|
|
11
|
-
theme?:
|
|
12
|
-
filter?:
|
|
13
|
-
|
|
10
|
+
importer?: ImporterPlugin;
|
|
11
|
+
theme?: ThemePlugin;
|
|
12
|
+
filter?: FilterPlugin;
|
|
13
|
+
httpRequestActions?: HttpRequestActionPlugin[];
|
|
14
14
|
};
|