@yaakapp/api 0.2.8 → 0.2.10
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/bindings/events.d.ts +21 -4
- package/lib/bindings/serde_json/JsonValue.d.ts +3 -0
- package/lib/{src-tauri/yaak_plugin_runtime/bindings/models.js → bindings/serde_json/JsonValue.js} +2 -1
- package/lib/plugins/Context.d.ts +4 -0
- package/package.json +4 -2
- package/lib/plugin-runtime-types/src/helpers.d.ts +0 -2
- package/lib/plugin-runtime-types/src/helpers.js +0 -2
- package/lib/plugin-runtime-types/src/index.d.ts +0 -4
- package/lib/plugin-runtime-types/src/index.js +0 -18
- package/lib/plugin-runtime-types/src/plugins/Context.d.ts +0 -17
- package/lib/plugin-runtime-types/src/plugins/Context.js +0 -2
- package/lib/plugin-runtime-types/src/plugins/FilterPlugin.d.ts +0 -13
- package/lib/plugin-runtime-types/src/plugins/FilterPlugin.js +0 -2
- package/lib/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.d.ts +0 -5
- package/lib/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.js +0 -2
- package/lib/plugin-runtime-types/src/plugins/ImporterPlugin.d.ts +0 -16
- package/lib/plugin-runtime-types/src/plugins/ImporterPlugin.js +0 -2
- package/lib/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.d.ts +0 -5
- package/lib/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.js +0 -2
- package/lib/plugin-runtime-types/src/plugins/ThemePlugin.d.ts +0 -7
- package/lib/plugin-runtime-types/src/plugins/ThemePlugin.js +0 -2
- package/lib/plugin-runtime-types/src/plugins/index.d.ts +0 -16
- package/lib/plugin-runtime-types/src/plugins/index.js +0 -2
- package/lib/plugin-runtime-types/src/themes/index.d.ts +0 -39
- package/lib/plugin-runtime-types/src/themes/index.js +0 -2
- package/lib/src-tauri/yaak_plugin_runtime/bindings/events.d.ts +0 -232
- package/lib/src-tauri/yaak_plugin_runtime/bindings/events.js +0 -1
- package/lib/src-tauri/yaak_plugin_runtime/bindings/models.d.ts +0 -151
package/lib/bindings/events.d.ts
CHANGED
|
@@ -3,9 +3,11 @@ import type { Folder } from "./models";
|
|
|
3
3
|
import type { GrpcRequest } from "./models";
|
|
4
4
|
import type { HttpRequest } from "./models";
|
|
5
5
|
import type { HttpResponse } from "./models";
|
|
6
|
+
import type { JsonValue } from "./serde_json/JsonValue";
|
|
6
7
|
import type { Workspace } from "./models";
|
|
7
8
|
export type BootRequest = {
|
|
8
9
|
dir: string;
|
|
10
|
+
watch: boolean;
|
|
9
11
|
};
|
|
10
12
|
export type BootResponse = {
|
|
11
13
|
name: string;
|
|
@@ -96,6 +98,7 @@ export type InternalEvent = {
|
|
|
96
98
|
pluginRefId: string;
|
|
97
99
|
replyId: string | null;
|
|
98
100
|
payload: InternalEventPayload;
|
|
101
|
+
windowContext: WindowContext;
|
|
99
102
|
};
|
|
100
103
|
export type InternalEventPayload = {
|
|
101
104
|
"type": "boot_request";
|
|
@@ -142,10 +145,10 @@ export type InternalEventPayload = {
|
|
|
142
145
|
} & CallTemplateFunctionResponse | {
|
|
143
146
|
"type": "copy_text_request";
|
|
144
147
|
} & CopyTextRequest | {
|
|
145
|
-
"type": "
|
|
146
|
-
} &
|
|
147
|
-
"type": "
|
|
148
|
-
} &
|
|
148
|
+
"type": "template_render_request";
|
|
149
|
+
} & TemplateRenderRequest | {
|
|
150
|
+
"type": "template_render_response";
|
|
151
|
+
} & TemplateRenderResponse | {
|
|
149
152
|
"type": "show_toast_request";
|
|
150
153
|
} & ShowToastRequest | {
|
|
151
154
|
"type": "get_http_request_by_id_request";
|
|
@@ -179,6 +182,7 @@ export type ShowToastRequest = {
|
|
|
179
182
|
};
|
|
180
183
|
export type TemplateFunction = {
|
|
181
184
|
name: string;
|
|
185
|
+
aliases: Array<string>;
|
|
182
186
|
args: Array<TemplateFunctionArg>;
|
|
183
187
|
};
|
|
184
188
|
export type TemplateFunctionArg = {
|
|
@@ -226,3 +230,16 @@ export type TemplateFunctionTextArg = {
|
|
|
226
230
|
label?: string | null;
|
|
227
231
|
defaultValue?: string | null;
|
|
228
232
|
};
|
|
233
|
+
export type TemplateRenderRequest = {
|
|
234
|
+
data: JsonValue;
|
|
235
|
+
purpose: RenderPurpose;
|
|
236
|
+
};
|
|
237
|
+
export type TemplateRenderResponse = {
|
|
238
|
+
data: JsonValue;
|
|
239
|
+
};
|
|
240
|
+
export type WindowContext = {
|
|
241
|
+
"type": "none";
|
|
242
|
+
} | {
|
|
243
|
+
"type": "label";
|
|
244
|
+
label: string;
|
|
245
|
+
};
|
package/lib/plugins/Context.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TemplateRenderRequest, TemplateRenderResponse } from '@yaakapp-internal/plugin';
|
|
1
2
|
import { FindHttpResponsesRequest, FindHttpResponsesResponse, GetHttpRequestByIdRequest, GetHttpRequestByIdResponse, RenderHttpRequestRequest, RenderHttpRequestResponse, SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest } from '..';
|
|
2
3
|
export type Context = {
|
|
3
4
|
clipboard: {
|
|
@@ -14,4 +15,7 @@ export type Context = {
|
|
|
14
15
|
httpResponse: {
|
|
15
16
|
find(args: FindHttpResponsesRequest): Promise<FindHttpResponsesResponse['httpResponses']>;
|
|
16
17
|
};
|
|
18
|
+
templates: {
|
|
19
|
+
render(args: TemplateRenderRequest): Promise<TemplateRenderResponse['data']>;
|
|
20
|
+
};
|
|
17
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yaakapp/api",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"typings": "./lib/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "run-s build:copy-types build:tsc",
|
|
11
11
|
"build:tsc": "tsc",
|
|
12
|
-
"build:copy-types": "
|
|
12
|
+
"build:copy-types": "run-p build:copy-types:*",
|
|
13
|
+
"build:copy-types:root": "cpy --flat ../src-tauri/yaak_plugin_runtime/bindings/*.ts ./src/bindings",
|
|
14
|
+
"build:copy-types:next": "cpy --flat ../src-tauri/yaak_plugin_runtime/bindings/serde_json/*.ts ./src/bindings/serde_json",
|
|
13
15
|
"prepublishOnly": "npm run build"
|
|
14
16
|
},
|
|
15
17
|
"dependencies": {
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("../../src-tauri/yaak_plugin_runtime/bindings/models.ts"), exports);
|
|
18
|
-
__exportStar(require("../../src-tauri/yaak_plugin_runtime/bindings/events.ts"), exports);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { FindHttpResponsesRequest, FindHttpResponsesResponse, GetHttpRequestByIdRequest, GetHttpRequestByIdResponse, RenderHttpRequestRequest, RenderHttpRequestResponse, SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest } from '../gen/events';
|
|
2
|
-
export type Context = {
|
|
3
|
-
clipboard: {
|
|
4
|
-
copyText(text: string): void;
|
|
5
|
-
};
|
|
6
|
-
toast: {
|
|
7
|
-
show(args: ShowToastRequest): void;
|
|
8
|
-
};
|
|
9
|
-
httpRequest: {
|
|
10
|
-
send(args: SendHttpRequestRequest): Promise<SendHttpRequestResponse['httpResponse']>;
|
|
11
|
-
getById(args: GetHttpRequestByIdRequest): Promise<GetHttpRequestByIdResponse['httpRequest']>;
|
|
12
|
-
render(args: RenderHttpRequestRequest): Promise<RenderHttpRequestResponse['httpRequest']>;
|
|
13
|
-
};
|
|
14
|
-
httpResponse: {
|
|
15
|
-
find(args: FindHttpResponsesRequest): Promise<FindHttpResponsesResponse['httpResponses']>;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Context } from './Context';
|
|
2
|
-
export type FilterPluginResponse = string[];
|
|
3
|
-
export type FilterPlugin = {
|
|
4
|
-
name: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
canFilter(ctx: Context, args: {
|
|
7
|
-
mimeType: string;
|
|
8
|
-
}): Promise<boolean>;
|
|
9
|
-
onFilter(ctx: Context, args: {
|
|
10
|
-
payload: string;
|
|
11
|
-
mimeType: string;
|
|
12
|
-
}): Promise<FilterPluginResponse>;
|
|
13
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Environment, Folder, HttpRequest, Workspace } from '../gen/model_util';
|
|
2
|
-
import { AtLeast } from '../helpers';
|
|
3
|
-
import { Context } from './Context';
|
|
4
|
-
export type ImportPluginResponse = null | {
|
|
5
|
-
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
|
6
|
-
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
7
|
-
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
8
|
-
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
9
|
-
};
|
|
10
|
-
export type ImporterPlugin = {
|
|
11
|
-
name: string;
|
|
12
|
-
description?: string;
|
|
13
|
-
onImport(ctx: Context, args: {
|
|
14
|
-
text: string;
|
|
15
|
-
}): Promise<ImportPluginResponse>;
|
|
16
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { FilterPlugin } from './FilterPlugin';
|
|
2
|
-
import { HttpRequestActionPlugin } from './HttpRequestActionPlugin';
|
|
3
|
-
import { ImporterPlugin } from './ImporterPlugin';
|
|
4
|
-
import { TemplateFunctionPlugin } from './TemplateFunctionPlugin';
|
|
5
|
-
import { ThemePlugin } from './ThemePlugin';
|
|
6
|
-
export type { Context } from './Context';
|
|
7
|
-
/**
|
|
8
|
-
* The global structure of a Yaak plugin
|
|
9
|
-
*/
|
|
10
|
-
export type PluginDefinition = {
|
|
11
|
-
importer?: ImporterPlugin;
|
|
12
|
-
theme?: ThemePlugin;
|
|
13
|
-
filter?: FilterPlugin;
|
|
14
|
-
httpRequestActions?: HttpRequestActionPlugin[];
|
|
15
|
-
templateFunctions?: TemplateFunctionPlugin[];
|
|
16
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export type Colors = {
|
|
2
|
-
surface: string;
|
|
3
|
-
surfaceHighlight?: string;
|
|
4
|
-
surfaceActive?: string;
|
|
5
|
-
text: string;
|
|
6
|
-
textSubtle?: string;
|
|
7
|
-
textSubtlest?: string;
|
|
8
|
-
border?: string;
|
|
9
|
-
borderSubtle?: string;
|
|
10
|
-
borderFocus?: string;
|
|
11
|
-
shadow?: string;
|
|
12
|
-
backdrop?: string;
|
|
13
|
-
selection?: string;
|
|
14
|
-
primary?: string;
|
|
15
|
-
secondary?: string;
|
|
16
|
-
info?: string;
|
|
17
|
-
success?: string;
|
|
18
|
-
notice?: string;
|
|
19
|
-
warning?: string;
|
|
20
|
-
danger?: string;
|
|
21
|
-
};
|
|
22
|
-
export type Theme = Colors & {
|
|
23
|
-
id: string;
|
|
24
|
-
name: string;
|
|
25
|
-
components?: Partial<{
|
|
26
|
-
dialog: Partial<Colors>;
|
|
27
|
-
menu: Partial<Colors>;
|
|
28
|
-
toast: Partial<Colors>;
|
|
29
|
-
sidebar: Partial<Colors>;
|
|
30
|
-
responsePane: Partial<Colors>;
|
|
31
|
-
appHeader: Partial<Colors>;
|
|
32
|
-
button: Partial<Colors>;
|
|
33
|
-
banner: Partial<Colors>;
|
|
34
|
-
placeholder: Partial<Colors>;
|
|
35
|
-
urlBar: Partial<Colors>;
|
|
36
|
-
editor: Partial<Colors>;
|
|
37
|
-
input: Partial<Colors>;
|
|
38
|
-
}>;
|
|
39
|
-
};
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import type { Environment } from "./models";
|
|
2
|
-
import type { Folder } from "./models";
|
|
3
|
-
import type { GrpcConnection } from "./models";
|
|
4
|
-
import type { GrpcEvent } from "./models";
|
|
5
|
-
import type { GrpcRequest } from "./models";
|
|
6
|
-
import type { HttpRequest } from "./models";
|
|
7
|
-
import type { HttpResponse } from "./models";
|
|
8
|
-
import type { KeyValue } from "./models";
|
|
9
|
-
import type { Workspace } from "./models";
|
|
10
|
-
export type BootRequest = {
|
|
11
|
-
dir: string;
|
|
12
|
-
};
|
|
13
|
-
export type BootResponse = {
|
|
14
|
-
name: string;
|
|
15
|
-
version: string;
|
|
16
|
-
capabilities: Array<string>;
|
|
17
|
-
};
|
|
18
|
-
export type CallHttpRequestActionArgs = {
|
|
19
|
-
httpRequest: HttpRequest;
|
|
20
|
-
};
|
|
21
|
-
export type CallHttpRequestActionRequest = {
|
|
22
|
-
key: string;
|
|
23
|
-
pluginRefId: string;
|
|
24
|
-
args: CallHttpRequestActionArgs;
|
|
25
|
-
};
|
|
26
|
-
export type CallTemplateFunctionArgs = {
|
|
27
|
-
purpose: RenderPurpose;
|
|
28
|
-
values: {
|
|
29
|
-
[key in string]?: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export type CallTemplateFunctionRequest = {
|
|
33
|
-
name: string;
|
|
34
|
-
args: CallTemplateFunctionArgs;
|
|
35
|
-
};
|
|
36
|
-
export type CallTemplateFunctionResponse = {
|
|
37
|
-
value: string | null;
|
|
38
|
-
};
|
|
39
|
-
export type Color = "custom" | "default" | "primary" | "secondary" | "info" | "success" | "notice" | "warning" | "danger";
|
|
40
|
-
export type CopyTextRequest = {
|
|
41
|
-
text: string;
|
|
42
|
-
};
|
|
43
|
-
export type ExportHttpRequestRequest = {
|
|
44
|
-
httpRequest: HttpRequest;
|
|
45
|
-
};
|
|
46
|
-
export type ExportHttpRequestResponse = {
|
|
47
|
-
content: string;
|
|
48
|
-
};
|
|
49
|
-
export type FilterRequest = {
|
|
50
|
-
content: string;
|
|
51
|
-
filter: string;
|
|
52
|
-
};
|
|
53
|
-
export type FilterResponse = {
|
|
54
|
-
content: string;
|
|
55
|
-
};
|
|
56
|
-
export type FindHttpResponsesRequest = {
|
|
57
|
-
requestId: string;
|
|
58
|
-
limit: number | null;
|
|
59
|
-
};
|
|
60
|
-
export type FindHttpResponsesResponse = {
|
|
61
|
-
httpResponses: Array<HttpResponse>;
|
|
62
|
-
};
|
|
63
|
-
export type GetHttpRequestActionsRequest = Record<string, never>;
|
|
64
|
-
export type GetHttpRequestActionsResponse = {
|
|
65
|
-
actions: Array<HttpRequestAction>;
|
|
66
|
-
pluginRefId: string;
|
|
67
|
-
};
|
|
68
|
-
export type GetHttpRequestByIdRequest = {
|
|
69
|
-
id: string;
|
|
70
|
-
};
|
|
71
|
-
export type GetHttpRequestByIdResponse = {
|
|
72
|
-
httpRequest: HttpRequest | null;
|
|
73
|
-
};
|
|
74
|
-
export type GetTemplateFunctionsResponse = {
|
|
75
|
-
functions: Array<TemplateFunction>;
|
|
76
|
-
pluginRefId: string;
|
|
77
|
-
};
|
|
78
|
-
export type HttpRequestAction = {
|
|
79
|
-
key: string;
|
|
80
|
-
label: string;
|
|
81
|
-
icon: string | null;
|
|
82
|
-
};
|
|
83
|
-
export type Icon = "copy" | "info" | "check_circle" | "alert_triangle";
|
|
84
|
-
export type ImportRequest = {
|
|
85
|
-
content: string;
|
|
86
|
-
};
|
|
87
|
-
export type ImportResources = {
|
|
88
|
-
workspaces: Array<Workspace>;
|
|
89
|
-
environments: Array<Environment>;
|
|
90
|
-
folders: Array<Folder>;
|
|
91
|
-
httpRequests: Array<HttpRequest>;
|
|
92
|
-
grpcRequests: Array<GrpcRequest>;
|
|
93
|
-
};
|
|
94
|
-
export type ImportResponse = {
|
|
95
|
-
resources: ImportResources;
|
|
96
|
-
};
|
|
97
|
-
export type InternalEvent = {
|
|
98
|
-
id: string;
|
|
99
|
-
pluginRefId: string;
|
|
100
|
-
replyId: string | null;
|
|
101
|
-
payload: InternalEventPayload;
|
|
102
|
-
};
|
|
103
|
-
export type InternalEventPayload = {
|
|
104
|
-
"type": "boot_request";
|
|
105
|
-
} & BootRequest | {
|
|
106
|
-
"type": "boot_response";
|
|
107
|
-
} & BootResponse | {
|
|
108
|
-
"type": "reload_request";
|
|
109
|
-
} | {
|
|
110
|
-
"type": "reload_response";
|
|
111
|
-
} | {
|
|
112
|
-
"type": "terminate_request";
|
|
113
|
-
} | {
|
|
114
|
-
"type": "terminate_response";
|
|
115
|
-
} | {
|
|
116
|
-
"type": "import_request";
|
|
117
|
-
} & ImportRequest | {
|
|
118
|
-
"type": "import_response";
|
|
119
|
-
} & ImportResponse | {
|
|
120
|
-
"type": "filter_request";
|
|
121
|
-
} & FilterRequest | {
|
|
122
|
-
"type": "filter_response";
|
|
123
|
-
} & FilterResponse | {
|
|
124
|
-
"type": "export_http_request_request";
|
|
125
|
-
} & ExportHttpRequestRequest | {
|
|
126
|
-
"type": "export_http_request_response";
|
|
127
|
-
} & ExportHttpRequestResponse | {
|
|
128
|
-
"type": "send_http_request_request";
|
|
129
|
-
} & SendHttpRequestRequest | {
|
|
130
|
-
"type": "send_http_request_response";
|
|
131
|
-
} & SendHttpRequestResponse | {
|
|
132
|
-
"type": "get_http_request_actions_request";
|
|
133
|
-
} & GetHttpRequestActionsRequest | {
|
|
134
|
-
"type": "get_http_request_actions_response";
|
|
135
|
-
} & GetHttpRequestActionsResponse | {
|
|
136
|
-
"type": "call_http_request_action_request";
|
|
137
|
-
} & CallHttpRequestActionRequest | {
|
|
138
|
-
"type": "get_template_functions_request";
|
|
139
|
-
} | {
|
|
140
|
-
"type": "get_template_functions_response";
|
|
141
|
-
} & GetTemplateFunctionsResponse | {
|
|
142
|
-
"type": "call_template_function_request";
|
|
143
|
-
} & CallTemplateFunctionRequest | {
|
|
144
|
-
"type": "call_template_function_response";
|
|
145
|
-
} & CallTemplateFunctionResponse | {
|
|
146
|
-
"type": "copy_text_request";
|
|
147
|
-
} & CopyTextRequest | {
|
|
148
|
-
"type": "render_http_request_request";
|
|
149
|
-
} & RenderHttpRequestRequest | {
|
|
150
|
-
"type": "render_http_request_response";
|
|
151
|
-
} & RenderHttpRequestResponse | {
|
|
152
|
-
"type": "show_toast_request";
|
|
153
|
-
} & ShowToastRequest | {
|
|
154
|
-
"type": "get_http_request_by_id_request";
|
|
155
|
-
} & GetHttpRequestByIdRequest | {
|
|
156
|
-
"type": "get_http_request_by_id_response";
|
|
157
|
-
} & GetHttpRequestByIdResponse | {
|
|
158
|
-
"type": "find_http_responses_request";
|
|
159
|
-
} & FindHttpResponsesRequest | {
|
|
160
|
-
"type": "find_http_responses_response";
|
|
161
|
-
} & FindHttpResponsesResponse | {
|
|
162
|
-
"type": "empty_response";
|
|
163
|
-
};
|
|
164
|
-
export type Model = Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | KeyValue | Workspace;
|
|
165
|
-
export type RenderHttpRequestRequest = {
|
|
166
|
-
httpRequest: HttpRequest;
|
|
167
|
-
purpose: RenderPurpose;
|
|
168
|
-
};
|
|
169
|
-
export type RenderHttpRequestResponse = {
|
|
170
|
-
httpRequest: HttpRequest;
|
|
171
|
-
};
|
|
172
|
-
export type RenderPurpose = "send" | "preview";
|
|
173
|
-
export type SendHttpRequestRequest = {
|
|
174
|
-
httpRequest: HttpRequest;
|
|
175
|
-
};
|
|
176
|
-
export type SendHttpRequestResponse = {
|
|
177
|
-
httpResponse: HttpResponse;
|
|
178
|
-
};
|
|
179
|
-
export type ShowToastRequest = {
|
|
180
|
-
message: string;
|
|
181
|
-
color?: Color | null;
|
|
182
|
-
icon?: Icon | null;
|
|
183
|
-
};
|
|
184
|
-
export type TemplateFunction = {
|
|
185
|
-
name: string;
|
|
186
|
-
args: Array<TemplateFunctionArg>;
|
|
187
|
-
};
|
|
188
|
-
export type TemplateFunctionArg = {
|
|
189
|
-
"type": "text";
|
|
190
|
-
} & TemplateFunctionTextArg | {
|
|
191
|
-
"type": "select";
|
|
192
|
-
} & TemplateFunctionSelectArg | {
|
|
193
|
-
"type": "checkbox";
|
|
194
|
-
} & TemplateFunctionCheckboxArg | {
|
|
195
|
-
"type": "http_request";
|
|
196
|
-
} & TemplateFunctionHttpRequestArg;
|
|
197
|
-
export type TemplateFunctionBaseArg = {
|
|
198
|
-
name: string;
|
|
199
|
-
optional?: boolean | null;
|
|
200
|
-
label?: string | null;
|
|
201
|
-
defaultValue?: string | null;
|
|
202
|
-
};
|
|
203
|
-
export type TemplateFunctionCheckboxArg = {
|
|
204
|
-
name: string;
|
|
205
|
-
optional?: boolean | null;
|
|
206
|
-
label?: string | null;
|
|
207
|
-
defaultValue?: string | null;
|
|
208
|
-
};
|
|
209
|
-
export type TemplateFunctionHttpRequestArg = {
|
|
210
|
-
name: string;
|
|
211
|
-
optional?: boolean | null;
|
|
212
|
-
label?: string | null;
|
|
213
|
-
defaultValue?: string | null;
|
|
214
|
-
};
|
|
215
|
-
export type TemplateFunctionSelectArg = {
|
|
216
|
-
options: Array<TemplateFunctionSelectOption>;
|
|
217
|
-
name: string;
|
|
218
|
-
optional?: boolean | null;
|
|
219
|
-
label?: string | null;
|
|
220
|
-
defaultValue?: string | null;
|
|
221
|
-
};
|
|
222
|
-
export type TemplateFunctionSelectOption = {
|
|
223
|
-
name: string;
|
|
224
|
-
value: string;
|
|
225
|
-
};
|
|
226
|
-
export type TemplateFunctionTextArg = {
|
|
227
|
-
placeholder?: string | null;
|
|
228
|
-
name: string;
|
|
229
|
-
optional?: boolean | null;
|
|
230
|
-
label?: string | null;
|
|
231
|
-
defaultValue?: string | null;
|
|
232
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
export type Environment = {
|
|
2
|
-
model: "environment";
|
|
3
|
-
id: string;
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
createdAt: string;
|
|
6
|
-
updatedAt: string;
|
|
7
|
-
name: string;
|
|
8
|
-
variables: Array<EnvironmentVariable>;
|
|
9
|
-
};
|
|
10
|
-
export type EnvironmentVariable = {
|
|
11
|
-
enabled?: boolean;
|
|
12
|
-
name: string;
|
|
13
|
-
value: string;
|
|
14
|
-
};
|
|
15
|
-
export type Folder = {
|
|
16
|
-
model: "folder";
|
|
17
|
-
id: string;
|
|
18
|
-
createdAt: string;
|
|
19
|
-
updatedAt: string;
|
|
20
|
-
workspaceId: string;
|
|
21
|
-
folderId: string | null;
|
|
22
|
-
name: string;
|
|
23
|
-
sortPriority: number;
|
|
24
|
-
};
|
|
25
|
-
export type GrpcConnection = {
|
|
26
|
-
model: "grpc_connection";
|
|
27
|
-
id: string;
|
|
28
|
-
createdAt: string;
|
|
29
|
-
updatedAt: string;
|
|
30
|
-
workspaceId: string;
|
|
31
|
-
requestId: string;
|
|
32
|
-
elapsed: number;
|
|
33
|
-
error: string | null;
|
|
34
|
-
method: string;
|
|
35
|
-
service: string;
|
|
36
|
-
status: number;
|
|
37
|
-
trailers: {
|
|
38
|
-
[key in string]?: string;
|
|
39
|
-
};
|
|
40
|
-
url: string;
|
|
41
|
-
};
|
|
42
|
-
export type GrpcEvent = {
|
|
43
|
-
model: "grpc_event";
|
|
44
|
-
id: string;
|
|
45
|
-
createdAt: string;
|
|
46
|
-
updatedAt: string;
|
|
47
|
-
workspaceId: string;
|
|
48
|
-
requestId: string;
|
|
49
|
-
connectionId: string;
|
|
50
|
-
content: string;
|
|
51
|
-
error: string | null;
|
|
52
|
-
eventType: GrpcEventType;
|
|
53
|
-
metadata: {
|
|
54
|
-
[key in string]?: string;
|
|
55
|
-
};
|
|
56
|
-
status: number | null;
|
|
57
|
-
};
|
|
58
|
-
export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end";
|
|
59
|
-
export type GrpcMetadataEntry = {
|
|
60
|
-
enabled?: boolean;
|
|
61
|
-
name: string;
|
|
62
|
-
value: string;
|
|
63
|
-
};
|
|
64
|
-
export type GrpcRequest = {
|
|
65
|
-
model: "grpc_request";
|
|
66
|
-
id: string;
|
|
67
|
-
createdAt: string;
|
|
68
|
-
updatedAt: string;
|
|
69
|
-
workspaceId: string;
|
|
70
|
-
folderId: string | null;
|
|
71
|
-
authenticationType: string | null;
|
|
72
|
-
authentication: Record<string, any>;
|
|
73
|
-
message: string;
|
|
74
|
-
metadata: Array<GrpcMetadataEntry>;
|
|
75
|
-
method: string | null;
|
|
76
|
-
name: string;
|
|
77
|
-
service: string | null;
|
|
78
|
-
sortPriority: number;
|
|
79
|
-
url: string;
|
|
80
|
-
};
|
|
81
|
-
export type HttpRequest = {
|
|
82
|
-
model: "http_request";
|
|
83
|
-
id: string;
|
|
84
|
-
createdAt: string;
|
|
85
|
-
updatedAt: string;
|
|
86
|
-
workspaceId: string;
|
|
87
|
-
folderId: string | null;
|
|
88
|
-
authentication: Record<string, any>;
|
|
89
|
-
authenticationType: string | null;
|
|
90
|
-
body: Record<string, any>;
|
|
91
|
-
bodyType: string | null;
|
|
92
|
-
headers: Array<HttpRequestHeader>;
|
|
93
|
-
method: string;
|
|
94
|
-
name: string;
|
|
95
|
-
sortPriority: number;
|
|
96
|
-
url: string;
|
|
97
|
-
urlParameters: Array<HttpUrlParameter>;
|
|
98
|
-
};
|
|
99
|
-
export type HttpRequestHeader = {
|
|
100
|
-
enabled?: boolean;
|
|
101
|
-
name: string;
|
|
102
|
-
value: string;
|
|
103
|
-
};
|
|
104
|
-
export type HttpResponse = {
|
|
105
|
-
model: "http_response";
|
|
106
|
-
id: string;
|
|
107
|
-
createdAt: string;
|
|
108
|
-
updatedAt: string;
|
|
109
|
-
workspaceId: string;
|
|
110
|
-
requestId: string;
|
|
111
|
-
bodyPath: string | null;
|
|
112
|
-
contentLength: number | null;
|
|
113
|
-
elapsed: number;
|
|
114
|
-
elapsedHeaders: number;
|
|
115
|
-
error: string | null;
|
|
116
|
-
headers: Array<HttpResponseHeader>;
|
|
117
|
-
remoteAddr: string | null;
|
|
118
|
-
status: number;
|
|
119
|
-
statusReason: string | null;
|
|
120
|
-
url: string;
|
|
121
|
-
version: string | null;
|
|
122
|
-
};
|
|
123
|
-
export type HttpResponseHeader = {
|
|
124
|
-
name: string;
|
|
125
|
-
value: string;
|
|
126
|
-
};
|
|
127
|
-
export type HttpUrlParameter = {
|
|
128
|
-
enabled?: boolean;
|
|
129
|
-
name: string;
|
|
130
|
-
value: string;
|
|
131
|
-
};
|
|
132
|
-
export type KeyValue = {
|
|
133
|
-
model: "key_value";
|
|
134
|
-
createdAt: string;
|
|
135
|
-
updatedAt: string;
|
|
136
|
-
key: string;
|
|
137
|
-
namespace: string;
|
|
138
|
-
value: string;
|
|
139
|
-
};
|
|
140
|
-
export type Workspace = {
|
|
141
|
-
model: "workspace";
|
|
142
|
-
id: string;
|
|
143
|
-
createdAt: string;
|
|
144
|
-
updatedAt: string;
|
|
145
|
-
name: string;
|
|
146
|
-
description: string;
|
|
147
|
-
variables: Array<EnvironmentVariable>;
|
|
148
|
-
settingValidateCertificates: boolean;
|
|
149
|
-
settingFollowRedirects: boolean;
|
|
150
|
-
settingRequestTimeout: number;
|
|
151
|
-
};
|