@yaakapp/api 0.0.6 → 0.1.0-beta.2
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/Environment.d.ts +10 -0
- package/lib/gen/Environment.js +2 -0
- package/lib/gen/EnvironmentVariable.d.ts +5 -0
- package/lib/gen/EnvironmentVariable.js +3 -0
- package/lib/gen/Folder.d.ts +10 -0
- package/lib/gen/Folder.js +3 -0
- package/lib/gen/GrpcConnection.d.ts +17 -0
- package/lib/gen/GrpcConnection.js +3 -0
- package/lib/gen/GrpcEvent.d.ts +16 -0
- package/lib/gen/GrpcEvent.js +2 -0
- package/lib/gen/GrpcEventType.d.ts +1 -0
- package/lib/gen/GrpcEventType.js +3 -0
- package/lib/gen/GrpcMetadataEntry.d.ts +5 -0
- package/lib/gen/GrpcMetadataEntry.js +3 -0
- package/lib/gen/GrpcRequest.d.ts +18 -0
- package/lib/gen/GrpcRequest.js +2 -0
- package/lib/gen/HttpRequest.d.ts +20 -0
- package/lib/gen/HttpRequest.js +2 -0
- package/lib/gen/HttpRequestHeader.d.ts +5 -0
- package/lib/gen/HttpRequestHeader.js +3 -0
- package/lib/gen/HttpResponse.d.ts +20 -0
- package/lib/gen/HttpResponse.js +2 -0
- package/lib/gen/HttpResponseHeader.d.ts +4 -0
- package/lib/gen/HttpResponseHeader.js +3 -0
- package/lib/gen/HttpUrlParameter.d.ts +5 -0
- package/lib/gen/HttpUrlParameter.js +3 -0
- package/lib/gen/KeyValue.d.ts +8 -0
- package/lib/gen/KeyValue.js +3 -0
- package/lib/gen/Workspace.d.ts +13 -0
- package/lib/gen/Workspace.js +2 -0
- package/lib/index.d.ts +15 -1
- package/lib/index.js +29 -0
- package/lib/plugin-runtime-types/src/gen/Environment.d.ts +10 -0
- package/lib/plugin-runtime-types/src/gen/Environment.js +2 -0
- package/lib/plugin-runtime-types/src/gen/EnvironmentVariable.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/EnvironmentVariable.js +3 -0
- package/lib/plugin-runtime-types/src/gen/Folder.d.ts +10 -0
- package/lib/plugin-runtime-types/src/gen/Folder.js +3 -0
- package/lib/plugin-runtime-types/src/gen/GrpcConnection.d.ts +17 -0
- package/lib/plugin-runtime-types/src/gen/GrpcConnection.js +3 -0
- package/lib/plugin-runtime-types/src/gen/GrpcEvent.d.ts +16 -0
- package/lib/plugin-runtime-types/src/gen/GrpcEvent.js +2 -0
- package/lib/plugin-runtime-types/src/gen/GrpcEventType.d.ts +1 -0
- package/lib/plugin-runtime-types/src/gen/GrpcEventType.js +3 -0
- package/lib/plugin-runtime-types/src/gen/GrpcMetadataEntry.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/GrpcMetadataEntry.js +3 -0
- package/lib/plugin-runtime-types/src/gen/GrpcRequest.d.ts +21 -0
- package/lib/plugin-runtime-types/src/gen/GrpcRequest.js +2 -0
- package/lib/plugin-runtime-types/src/gen/HttpRequest.d.ts +25 -0
- package/lib/plugin-runtime-types/src/gen/HttpRequest.js +2 -0
- package/lib/plugin-runtime-types/src/gen/HttpRequestHeader.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/HttpRequestHeader.js +3 -0
- package/lib/plugin-runtime-types/src/gen/HttpResponse.d.ts +20 -0
- package/lib/plugin-runtime-types/src/gen/HttpResponse.js +2 -0
- package/lib/plugin-runtime-types/src/gen/HttpResponseHeader.d.ts +4 -0
- package/lib/plugin-runtime-types/src/gen/HttpResponseHeader.js +3 -0
- package/lib/plugin-runtime-types/src/gen/HttpUrlParameter.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/HttpUrlParameter.js +3 -0
- package/lib/plugin-runtime-types/src/gen/KeyValue.d.ts +8 -0
- package/lib/plugin-runtime-types/src/gen/KeyValue.js +3 -0
- package/lib/plugin-runtime-types/src/gen/Workspace.d.ts +13 -0
- package/lib/plugin-runtime-types/src/gen/Workspace.js +2 -0
- package/lib/plugin-runtime-types/src/helpers.d.ts +2 -0
- package/lib/plugin-runtime-types/src/helpers.js +2 -0
- package/lib/plugin-runtime-types/src/index.d.ts +17 -0
- package/lib/plugin-runtime-types/src/index.js +31 -0
- package/lib/plugin-runtime-types/src/models/index.d.ts +1 -0
- package/lib/plugin-runtime-types/src/models/index.js +17 -0
- package/lib/plugin-runtime-types/src/models/types.d.ts +117 -0
- package/lib/plugin-runtime-types/src/models/types.js +2 -0
- package/lib/plugin-runtime-types/src/plugins/context.d.ts +10 -0
- package/lib/plugin-runtime-types/src/plugins/context.js +2 -0
- package/lib/plugin-runtime-types/src/plugins/filter.d.ts +13 -0
- package/lib/plugin-runtime-types/src/plugins/filter.js +2 -0
- package/lib/plugin-runtime-types/src/plugins/httpRequestAction.d.ts +9 -0
- package/lib/plugin-runtime-types/src/plugins/httpRequestAction.js +2 -0
- package/lib/plugin-runtime-types/src/plugins/import.d.ts +16 -0
- package/lib/plugin-runtime-types/src/plugins/import.js +2 -0
- package/lib/plugin-runtime-types/src/plugins/index.d.ts +14 -0
- package/lib/plugin-runtime-types/src/plugins/index.js +2 -0
- package/lib/plugin-runtime-types/src/plugins/theme.d.ts +7 -0
- package/lib/plugin-runtime-types/src/plugins/theme.js +2 -0
- package/lib/plugin-runtime-types/src/themes/index.d.ts +39 -0
- package/lib/plugin-runtime-types/src/themes/index.js +2 -0
- package/lib/plugins/filter.d.ts +2 -2
- package/lib/plugins/httpRequestAction.d.ts +2 -2
- package/lib/plugins/import.d.ts +7 -7
- package/lib/plugins/index.d.ts +10 -10
- package/lib/plugins/index.js +0 -17
- package/lib/plugins/theme.d.ts +2 -2
- package/lib/src-tauri/yaak_models/bindings/serde_json/JsonValue.d.ts +3 -0
- package/lib/src-tauri/yaak_models/bindings/serde_json/JsonValue.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EnvironmentVariable } from "./EnvironmentVariable";
|
|
2
|
+
export type Environment = {
|
|
3
|
+
id: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
model: "environment";
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
name: string;
|
|
9
|
+
variables: Array<EnvironmentVariable>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type GrpcConnection = {
|
|
2
|
+
id: string;
|
|
3
|
+
model: "grpc_connection";
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
requestId: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
service: string;
|
|
9
|
+
method: string;
|
|
10
|
+
elapsed: bigint;
|
|
11
|
+
status: bigint;
|
|
12
|
+
url: string;
|
|
13
|
+
error: string | null;
|
|
14
|
+
trailers: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GrpcEventType } from "./GrpcEventType";
|
|
2
|
+
export type GrpcEvent = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "grpc_event";
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
requestId: string;
|
|
7
|
+
connectionId: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
content: string;
|
|
10
|
+
eventType: GrpcEventType;
|
|
11
|
+
metadata: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
status: bigint | null;
|
|
15
|
+
error: string | null;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { GrpcMetadataEntry } from "./GrpcMetadataEntry";
|
|
2
|
+
export type GrpcRequest = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "grpc_request";
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
folderId: string | null;
|
|
9
|
+
name: string;
|
|
10
|
+
sortPriority: number;
|
|
11
|
+
url: string;
|
|
12
|
+
service: string | null;
|
|
13
|
+
method: string | null;
|
|
14
|
+
message: string;
|
|
15
|
+
authenticationType: string | null;
|
|
16
|
+
authentication: Record<string, any>;
|
|
17
|
+
metadata: Array<GrpcMetadataEntry>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HttpRequestHeader } from "./HttpRequestHeader";
|
|
2
|
+
import type { HttpUrlParameter } from "./HttpUrlParameter";
|
|
3
|
+
export type HttpRequest = {
|
|
4
|
+
createdAt: string;
|
|
5
|
+
updatedAt: string;
|
|
6
|
+
id: string;
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
folderId: string | null;
|
|
9
|
+
model: "http_request";
|
|
10
|
+
sortPriority: number;
|
|
11
|
+
name: string;
|
|
12
|
+
url: string;
|
|
13
|
+
urlParameters: Array<HttpUrlParameter>;
|
|
14
|
+
method: string;
|
|
15
|
+
body: Record<string, any>;
|
|
16
|
+
bodyType: string | null;
|
|
17
|
+
authentication: Record<string, any>;
|
|
18
|
+
authenticationType: string | null;
|
|
19
|
+
headers: Array<HttpRequestHeader>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HttpResponseHeader } from "./HttpResponseHeader";
|
|
2
|
+
export type HttpResponse = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "http_response";
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
requestId: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
error: string | null;
|
|
10
|
+
url: string;
|
|
11
|
+
contentLength: bigint | null;
|
|
12
|
+
version: string | null;
|
|
13
|
+
elapsed: bigint;
|
|
14
|
+
elapsedHeaders: bigint;
|
|
15
|
+
remoteAddr: string | null;
|
|
16
|
+
status: bigint;
|
|
17
|
+
statusReason: string | null;
|
|
18
|
+
bodyPath: string | null;
|
|
19
|
+
headers: Array<HttpResponseHeader>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EnvironmentVariable } from "./EnvironmentVariable";
|
|
2
|
+
export type Workspace = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "workspace";
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
variables: Array<EnvironmentVariable>;
|
|
10
|
+
settingValidateCertificates: boolean;
|
|
11
|
+
settingFollowRedirects: boolean;
|
|
12
|
+
settingRequestTimeout: bigint;
|
|
13
|
+
};
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
export type * from './models';
|
|
2
1
|
export type * from './plugins';
|
|
3
2
|
export type * from './themes';
|
|
3
|
+
export * from './gen/Environment';
|
|
4
|
+
export * from './gen/EnvironmentVariable';
|
|
5
|
+
export * from './gen/Folder';
|
|
6
|
+
export * from './gen/GrpcConnection';
|
|
7
|
+
export * from './gen/GrpcEvent';
|
|
8
|
+
export * from './gen/GrpcEventType';
|
|
9
|
+
export * from './gen/GrpcMetadataEntry';
|
|
10
|
+
export * from './gen/GrpcRequest';
|
|
11
|
+
export * from './gen/HttpRequest';
|
|
12
|
+
export * from './gen/HttpRequestHeader';
|
|
13
|
+
export * from './gen/HttpResponse';
|
|
14
|
+
export * from './gen/HttpResponseHeader';
|
|
15
|
+
export * from './gen/HttpUrlParameter';
|
|
16
|
+
export * from './gen/KeyValue';
|
|
17
|
+
export * from './gen/Workspace';
|
package/lib/index.js
CHANGED
|
@@ -1,2 +1,31 @@
|
|
|
1
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
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./gen/Environment"), exports);
|
|
18
|
+
__exportStar(require("./gen/EnvironmentVariable"), exports);
|
|
19
|
+
__exportStar(require("./gen/Folder"), exports);
|
|
20
|
+
__exportStar(require("./gen/GrpcConnection"), exports);
|
|
21
|
+
__exportStar(require("./gen/GrpcEvent"), exports);
|
|
22
|
+
__exportStar(require("./gen/GrpcEventType"), exports);
|
|
23
|
+
__exportStar(require("./gen/GrpcMetadataEntry"), exports);
|
|
24
|
+
__exportStar(require("./gen/GrpcRequest"), exports);
|
|
25
|
+
__exportStar(require("./gen/HttpRequest"), exports);
|
|
26
|
+
__exportStar(require("./gen/HttpRequestHeader"), exports);
|
|
27
|
+
__exportStar(require("./gen/HttpResponse"), exports);
|
|
28
|
+
__exportStar(require("./gen/HttpResponseHeader"), exports);
|
|
29
|
+
__exportStar(require("./gen/HttpUrlParameter"), exports);
|
|
30
|
+
__exportStar(require("./gen/KeyValue"), exports);
|
|
31
|
+
__exportStar(require("./gen/Workspace"), exports);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EnvironmentVariable } from "./EnvironmentVariable";
|
|
2
|
+
export type Environment = {
|
|
3
|
+
id: string;
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
model: "environment";
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
name: string;
|
|
9
|
+
variables: Array<EnvironmentVariable>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type GrpcConnection = {
|
|
2
|
+
id: string;
|
|
3
|
+
model: "grpc_connection";
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
requestId: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
updatedAt: string;
|
|
8
|
+
service: string;
|
|
9
|
+
method: string;
|
|
10
|
+
elapsed: bigint;
|
|
11
|
+
status: bigint;
|
|
12
|
+
url: string;
|
|
13
|
+
error: string | null;
|
|
14
|
+
trailers: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GrpcEventType } from "./GrpcEventType";
|
|
2
|
+
export type GrpcEvent = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "grpc_event";
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
requestId: string;
|
|
7
|
+
connectionId: string;
|
|
8
|
+
createdAt: string;
|
|
9
|
+
content: string;
|
|
10
|
+
eventType: GrpcEventType;
|
|
11
|
+
metadata: {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
status: bigint | null;
|
|
15
|
+
error: string | null;
|
|
16
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { GrpcMetadataEntry } from "./GrpcMetadataEntry";
|
|
2
|
+
import type { JsonValue } from "../../../src-tauri/yaak_models/bindings/serde_json/JsonValue";
|
|
3
|
+
export type GrpcRequest = {
|
|
4
|
+
id: string;
|
|
5
|
+
model: "grpc_request";
|
|
6
|
+
workspaceId: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
folderId: string | null;
|
|
10
|
+
name: string;
|
|
11
|
+
sortPriority: number;
|
|
12
|
+
url: string;
|
|
13
|
+
service: string | null;
|
|
14
|
+
method: string | null;
|
|
15
|
+
message: string;
|
|
16
|
+
authenticationType: string | null;
|
|
17
|
+
authentication: {
|
|
18
|
+
[key: string]: JsonValue;
|
|
19
|
+
};
|
|
20
|
+
metadata: Array<GrpcMetadataEntry>;
|
|
21
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { HttpRequestHeader } from "./HttpRequestHeader";
|
|
2
|
+
import type { HttpUrlParameter } from "./HttpUrlParameter";
|
|
3
|
+
import type { JsonValue } from "../../../src-tauri/yaak_models/bindings/serde_json/JsonValue";
|
|
4
|
+
export type HttpRequest = {
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
id: string;
|
|
8
|
+
workspaceId: string;
|
|
9
|
+
folderId: string | null;
|
|
10
|
+
model: "http_request";
|
|
11
|
+
sortPriority: number;
|
|
12
|
+
name: string;
|
|
13
|
+
url: string;
|
|
14
|
+
urlParameters: Array<HttpUrlParameter>;
|
|
15
|
+
method: string;
|
|
16
|
+
body: {
|
|
17
|
+
[key: string]: JsonValue;
|
|
18
|
+
};
|
|
19
|
+
bodyType: string | null;
|
|
20
|
+
authentication: {
|
|
21
|
+
[key: string]: JsonValue;
|
|
22
|
+
};
|
|
23
|
+
authenticationType: string | null;
|
|
24
|
+
headers: Array<HttpRequestHeader>;
|
|
25
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { HttpResponseHeader } from "./HttpResponseHeader";
|
|
2
|
+
export type HttpResponse = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "http_response";
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
requestId: string;
|
|
7
|
+
createdAt: string;
|
|
8
|
+
updatedAt: string;
|
|
9
|
+
error: string | null;
|
|
10
|
+
url: string;
|
|
11
|
+
contentLength: bigint | null;
|
|
12
|
+
version: string | null;
|
|
13
|
+
elapsed: bigint;
|
|
14
|
+
elapsedHeaders: bigint;
|
|
15
|
+
remoteAddr: string | null;
|
|
16
|
+
status: bigint;
|
|
17
|
+
statusReason: string | null;
|
|
18
|
+
bodyPath: string | null;
|
|
19
|
+
headers: Array<HttpResponseHeader>;
|
|
20
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { EnvironmentVariable } from "./EnvironmentVariable";
|
|
2
|
+
export type Workspace = {
|
|
3
|
+
id: string;
|
|
4
|
+
model: "workspace";
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
variables: Array<EnvironmentVariable>;
|
|
10
|
+
settingValidateCertificates: boolean;
|
|
11
|
+
settingFollowRedirects: boolean;
|
|
12
|
+
settingRequestTimeout: bigint;
|
|
13
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type * from './plugins';
|
|
2
|
+
export type * from './themes';
|
|
3
|
+
export * from './gen/Environment';
|
|
4
|
+
export * from './gen/EnvironmentVariable';
|
|
5
|
+
export * from './gen/Folder';
|
|
6
|
+
export * from './gen/GrpcConnection';
|
|
7
|
+
export * from './gen/GrpcEvent';
|
|
8
|
+
export * from './gen/GrpcEventType';
|
|
9
|
+
export * from './gen/GrpcMetadataEntry';
|
|
10
|
+
export * from './gen/GrpcRequest';
|
|
11
|
+
export * from './gen/HttpRequest';
|
|
12
|
+
export * from './gen/HttpRequestHeader';
|
|
13
|
+
export * from './gen/HttpResponse';
|
|
14
|
+
export * from './gen/HttpResponseHeader';
|
|
15
|
+
export * from './gen/HttpUrlParameter';
|
|
16
|
+
export * from './gen/KeyValue';
|
|
17
|
+
export * from './gen/Workspace';
|
|
@@ -0,0 +1,31 @@
|
|
|
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("./gen/Environment"), exports);
|
|
18
|
+
__exportStar(require("./gen/EnvironmentVariable"), exports);
|
|
19
|
+
__exportStar(require("./gen/Folder"), exports);
|
|
20
|
+
__exportStar(require("./gen/GrpcConnection"), exports);
|
|
21
|
+
__exportStar(require("./gen/GrpcEvent"), exports);
|
|
22
|
+
__exportStar(require("./gen/GrpcEventType"), exports);
|
|
23
|
+
__exportStar(require("./gen/GrpcMetadataEntry"), exports);
|
|
24
|
+
__exportStar(require("./gen/GrpcRequest"), exports);
|
|
25
|
+
__exportStar(require("./gen/HttpRequest"), exports);
|
|
26
|
+
__exportStar(require("./gen/HttpRequestHeader"), exports);
|
|
27
|
+
__exportStar(require("./gen/HttpResponse"), exports);
|
|
28
|
+
__exportStar(require("./gen/HttpResponseHeader"), exports);
|
|
29
|
+
__exportStar(require("./gen/HttpUrlParameter"), exports);
|
|
30
|
+
__exportStar(require("./gen/KeyValue"), exports);
|
|
31
|
+
__exportStar(require("./gen/Workspace"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './types';
|
|
@@ -0,0 +1,17 @@
|
|
|
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("./types"), exports);
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
export interface BaseModel {
|
|
2
|
+
readonly model: string;
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly createdAt: string;
|
|
5
|
+
readonly updatedAt: string;
|
|
6
|
+
}
|
|
7
|
+
export interface Workspace extends BaseModel {
|
|
8
|
+
readonly model: 'workspace';
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
variables: EnvironmentVariable[];
|
|
12
|
+
settingValidateCertificates: boolean;
|
|
13
|
+
settingFollowRedirects: boolean;
|
|
14
|
+
settingRequestTimeout: number;
|
|
15
|
+
}
|
|
16
|
+
export interface EnvironmentVariable {
|
|
17
|
+
name: string;
|
|
18
|
+
value: string;
|
|
19
|
+
enabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface Folder extends BaseModel {
|
|
22
|
+
readonly workspaceId: string;
|
|
23
|
+
readonly model: 'folder';
|
|
24
|
+
folderId: string | null;
|
|
25
|
+
sortPriority: number;
|
|
26
|
+
name: string;
|
|
27
|
+
}
|
|
28
|
+
export interface Environment extends BaseModel {
|
|
29
|
+
readonly workspaceId: string;
|
|
30
|
+
readonly model: 'environment';
|
|
31
|
+
name: string;
|
|
32
|
+
variables: EnvironmentVariable[];
|
|
33
|
+
}
|
|
34
|
+
export interface HttpHeader {
|
|
35
|
+
name: string;
|
|
36
|
+
value: string;
|
|
37
|
+
enabled?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface HttpUrlParameter {
|
|
40
|
+
name: string;
|
|
41
|
+
value: string;
|
|
42
|
+
enabled?: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface GrpcMetadataEntry {
|
|
45
|
+
name: string;
|
|
46
|
+
value: string;
|
|
47
|
+
enabled?: boolean;
|
|
48
|
+
}
|
|
49
|
+
export interface GrpcRequest extends BaseModel {
|
|
50
|
+
readonly workspaceId: string;
|
|
51
|
+
readonly model: 'grpc_request';
|
|
52
|
+
folderId: string | null;
|
|
53
|
+
sortPriority: number;
|
|
54
|
+
name: string;
|
|
55
|
+
url: string;
|
|
56
|
+
service: string | null;
|
|
57
|
+
method: string | null;
|
|
58
|
+
message: string;
|
|
59
|
+
authentication: Record<string, string | number | boolean | null | undefined>;
|
|
60
|
+
authenticationType: string | null;
|
|
61
|
+
metadata: GrpcMetadataEntry[];
|
|
62
|
+
}
|
|
63
|
+
export interface GrpcEvent extends BaseModel {
|
|
64
|
+
readonly workspaceId: string;
|
|
65
|
+
readonly requestId: string;
|
|
66
|
+
readonly connectionId: string;
|
|
67
|
+
readonly model: 'grpc_event';
|
|
68
|
+
content: string;
|
|
69
|
+
status: number | null;
|
|
70
|
+
error: string | null;
|
|
71
|
+
eventType: 'info' | 'error' | 'client_message' | 'server_message' | 'connection_start' | 'connection_end';
|
|
72
|
+
metadata: Record<string, string>;
|
|
73
|
+
}
|
|
74
|
+
export interface GrpcConnection extends BaseModel {
|
|
75
|
+
readonly workspaceId: string;
|
|
76
|
+
readonly requestId: string;
|
|
77
|
+
readonly model: 'grpc_connection';
|
|
78
|
+
service: string;
|
|
79
|
+
method: string;
|
|
80
|
+
elapsed: number;
|
|
81
|
+
elapsedConnection: number;
|
|
82
|
+
status: number;
|
|
83
|
+
url: string;
|
|
84
|
+
error: string | null;
|
|
85
|
+
trailers: Record<string, string>;
|
|
86
|
+
}
|
|
87
|
+
export interface HttpRequest extends BaseModel {
|
|
88
|
+
readonly workspaceId: string;
|
|
89
|
+
readonly model: 'http_request';
|
|
90
|
+
folderId: string | null;
|
|
91
|
+
sortPriority: number;
|
|
92
|
+
name: string;
|
|
93
|
+
url: string;
|
|
94
|
+
urlParameters: HttpUrlParameter[];
|
|
95
|
+
body: Record<string, unknown>;
|
|
96
|
+
bodyType: string | null;
|
|
97
|
+
authentication: Record<string, string | number | boolean | null | undefined>;
|
|
98
|
+
authenticationType: string | null;
|
|
99
|
+
method: string;
|
|
100
|
+
headers: HttpHeader[];
|
|
101
|
+
}
|
|
102
|
+
export interface HttpResponse extends BaseModel {
|
|
103
|
+
readonly workspaceId: string;
|
|
104
|
+
readonly model: 'http_response';
|
|
105
|
+
readonly requestId: string;
|
|
106
|
+
readonly bodyPath: string | null;
|
|
107
|
+
readonly contentLength: number | null;
|
|
108
|
+
readonly error: string;
|
|
109
|
+
readonly status: number;
|
|
110
|
+
readonly elapsed: number;
|
|
111
|
+
readonly elapsedHeaders: number;
|
|
112
|
+
readonly statusReason: string;
|
|
113
|
+
readonly version: string;
|
|
114
|
+
readonly remoteAddr: string;
|
|
115
|
+
readonly url: string;
|
|
116
|
+
readonly headers: HttpHeader[];
|
|
117
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { YaakContext } from './context';
|
|
2
|
+
export type FilterPluginResponse = string[];
|
|
3
|
+
export type FilterPlugin = {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
canFilter(ctx: YaakContext, args: {
|
|
7
|
+
mimeType: string;
|
|
8
|
+
}): Promise<boolean>;
|
|
9
|
+
onFilter(ctx: YaakContext, args: {
|
|
10
|
+
payload: string;
|
|
11
|
+
mimeType: string;
|
|
12
|
+
}): Promise<FilterPluginResponse>;
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AtLeast } from '../helpers';
|
|
2
|
+
import { Environment, Folder, HttpRequest, Workspace } from '../models';
|
|
3
|
+
import { YaakContext } 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: YaakContext, args: {
|
|
14
|
+
text: string;
|
|
15
|
+
}): Promise<ImportPluginResponse>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { OneOrMany } from '../helpers';
|
|
2
|
+
import { FilterPlugin } from './filter';
|
|
3
|
+
import { HttpRequestActionPlugin } from './httpRequestAction';
|
|
4
|
+
import { ImporterPlugin } from './import';
|
|
5
|
+
import { ThemePlugin } from './theme';
|
|
6
|
+
/**
|
|
7
|
+
* The global structure of a Yaak plugin
|
|
8
|
+
*/
|
|
9
|
+
export type YaakPlugin = {
|
|
10
|
+
importer?: OneOrMany<ImporterPlugin>;
|
|
11
|
+
theme?: OneOrMany<ThemePlugin>;
|
|
12
|
+
filter?: OneOrMany<FilterPlugin>;
|
|
13
|
+
httpRequestAction?: OneOrMany<HttpRequestActionPlugin>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
};
|
package/lib/plugins/filter.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { YaakContext } from './context';
|
|
2
2
|
export type FilterPluginResponse = string[];
|
|
3
|
-
export
|
|
3
|
+
export type FilterPlugin = {
|
|
4
4
|
name: string;
|
|
5
5
|
description?: string;
|
|
6
6
|
canFilter(ctx: YaakContext, args: {
|
|
@@ -10,4 +10,4 @@ export interface DataFilterPlugin {
|
|
|
10
10
|
payload: string;
|
|
11
11
|
mimeType: string;
|
|
12
12
|
}): Promise<FilterPluginResponse>;
|
|
13
|
-
}
|
|
13
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HttpRequest } from '../models';
|
|
2
2
|
import { YaakContext } from './context';
|
|
3
|
-
export
|
|
3
|
+
export type HttpRequestActionPlugin = {
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
6
6
|
onSelect(ctx: YaakContext, args: {
|
|
7
7
|
httpRequest: HttpRequest;
|
|
8
8
|
}): void;
|
|
9
|
-
}
|
|
9
|
+
};
|
package/lib/plugins/import.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AtLeast } from '../helpers';
|
|
2
2
|
import { Environment, Folder, HttpRequest, Workspace } from '../models';
|
|
3
3
|
import { YaakContext } from './context';
|
|
4
|
-
export
|
|
4
|
+
export type ImportPluginResponse = null | {
|
|
5
5
|
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
|
6
6
|
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
7
7
|
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
8
8
|
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
9
|
-
}
|
|
10
|
-
export
|
|
9
|
+
};
|
|
10
|
+
export type ImporterPlugin = {
|
|
11
11
|
name: string;
|
|
12
|
-
description
|
|
13
|
-
onImport
|
|
12
|
+
description?: string;
|
|
13
|
+
onImport(ctx: YaakContext, args: {
|
|
14
14
|
text: string;
|
|
15
|
-
})
|
|
16
|
-
}
|
|
15
|
+
}): Promise<ImportPluginResponse>;
|
|
16
|
+
};
|
package/lib/plugins/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export * from './import';
|
|
4
|
-
import { DataFilterPlugin } from './filter';
|
|
1
|
+
import { OneOrMany } from '../helpers';
|
|
2
|
+
import { FilterPlugin } from './filter';
|
|
5
3
|
import { HttpRequestActionPlugin } from './httpRequestAction';
|
|
6
|
-
import {
|
|
4
|
+
import { ImporterPlugin } from './import';
|
|
5
|
+
import { ThemePlugin } from './theme';
|
|
7
6
|
/**
|
|
8
7
|
* The global structure of a Yaak plugin
|
|
9
8
|
*/
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
export type YaakPlugin = {
|
|
10
|
+
importer?: OneOrMany<ImporterPlugin>;
|
|
11
|
+
theme?: OneOrMany<ThemePlugin>;
|
|
12
|
+
filter?: OneOrMany<FilterPlugin>;
|
|
13
|
+
httpRequestAction?: OneOrMany<HttpRequestActionPlugin>;
|
|
14
|
+
};
|
package/lib/plugins/index.js
CHANGED
|
@@ -1,19 +1,2 @@
|
|
|
1
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
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./filter"), exports);
|
|
18
|
-
__exportStar(require("./httpRequestAction"), exports);
|
|
19
|
-
__exportStar(require("./import"), exports);
|
package/lib/plugins/theme.d.ts
CHANGED