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