@yaakapp/api 0.1.0-beta.8 → 0.1.0
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/BootRequest.d.ts +3 -0
- package/lib/gen/BootRequest.js +3 -0
- package/lib/gen/BootResponse.d.ts +5 -0
- package/lib/gen/BootResponse.js +3 -0
- package/lib/gen/EmptyResponse.d.ts +1 -0
- package/lib/gen/EmptyResponse.js +3 -0
- package/lib/gen/ExportHttpRequestRequest.d.ts +4 -0
- package/lib/gen/ExportHttpRequestRequest.js +2 -0
- package/lib/gen/ExportHttpRequestResponse.d.ts +3 -0
- package/lib/gen/ExportHttpRequestResponse.js +3 -0
- package/lib/gen/FilterRequest.d.ts +4 -0
- package/lib/gen/FilterRequest.js +3 -0
- package/lib/gen/FilterResponse.d.ts +4 -0
- package/lib/gen/FilterResponse.js +2 -0
- package/lib/gen/ImportRequest.d.ts +3 -0
- package/lib/gen/ImportRequest.js +3 -0
- package/lib/gen/ImportResources.d.ts +12 -0
- package/lib/gen/ImportResources.js +2 -0
- package/lib/gen/ImportResponse.d.ts +4 -0
- package/lib/gen/ImportResponse.js +2 -0
- package/lib/gen/InternalEvent.d.ts +7 -0
- package/lib/gen/InternalEvent.js +2 -0
- package/lib/gen/InternalEventPayload.d.ts +28 -0
- package/lib/gen/InternalEventPayload.js +2 -0
- package/lib/gen/PingRequest.d.ts +3 -0
- package/lib/gen/PingRequest.js +3 -0
- package/lib/gen/PingResponse.d.ts +3 -0
- package/lib/gen/PingResponse.js +3 -0
- package/lib/gen/PluginBootRequest.d.ts +3 -0
- package/lib/gen/PluginBootRequest.js +3 -0
- package/lib/gen/PluginBootResponse.d.ts +5 -0
- package/lib/gen/PluginBootResponse.js +3 -0
- package/lib/gen/common/ExportableModel.d.ts +6 -0
- package/lib/gen/common/ExportableModel.js +2 -0
- package/lib/gen/common/PluginImportResources.d.ts +12 -0
- package/lib/gen/common/PluginImportResources.js +2 -0
- package/lib/gen/events/PluginBootRequest.d.ts +3 -0
- package/lib/gen/events/PluginBootRequest.js +3 -0
- package/lib/gen/events/PluginBootResponse.d.ts +5 -0
- package/lib/gen/events/PluginBootResponse.js +3 -0
- package/lib/gen/events/PluginEvent.d.ts +7 -0
- package/lib/gen/events/PluginEvent.js +2 -0
- package/lib/gen/events/PluginEventPayload.d.ts +19 -0
- package/lib/gen/events/PluginEventPayload.js +2 -0
- package/lib/gen/events/PluginImportRequest.d.ts +3 -0
- package/lib/gen/events/PluginImportRequest.js +3 -0
- package/lib/gen/events/PluginImportResponse.d.ts +4 -0
- package/lib/gen/events/PluginImportResponse.js +2 -0
- package/lib/gen/events/PluginPingRequest.d.ts +3 -0
- package/lib/gen/events/PluginPingRequest.js +3 -0
- package/lib/gen/events/PluginPingResponse.d.ts +3 -0
- package/lib/gen/events/PluginPingResponse.js +3 -0
- package/lib/gen/models/Environment.d.ts +10 -0
- package/lib/gen/models/Environment.js +2 -0
- package/lib/gen/models/EnvironmentVariable.d.ts +5 -0
- package/lib/gen/models/EnvironmentVariable.js +3 -0
- package/lib/gen/models/Folder.d.ts +10 -0
- package/lib/gen/models/Folder.js +3 -0
- package/lib/gen/models/GrpcConnection.d.ts +17 -0
- package/lib/gen/models/GrpcConnection.js +3 -0
- package/lib/gen/models/GrpcEvent.d.ts +16 -0
- package/lib/gen/models/GrpcEvent.js +2 -0
- package/lib/gen/models/GrpcEventType.d.ts +1 -0
- package/lib/gen/models/GrpcEventType.js +3 -0
- package/lib/gen/models/GrpcMetadataEntry.d.ts +5 -0
- package/lib/gen/models/GrpcMetadataEntry.js +3 -0
- package/lib/gen/models/GrpcRequest.d.ts +18 -0
- package/lib/gen/models/GrpcRequest.js +2 -0
- package/lib/gen/models/HttpRequest.d.ts +20 -0
- package/lib/gen/models/HttpRequest.js +2 -0
- package/lib/gen/models/HttpRequestHeader.d.ts +5 -0
- package/lib/gen/models/HttpRequestHeader.js +3 -0
- package/lib/gen/models/HttpResponse.d.ts +20 -0
- package/lib/gen/models/HttpResponse.js +2 -0
- package/lib/gen/models/HttpResponseHeader.d.ts +4 -0
- package/lib/gen/models/HttpResponseHeader.js +3 -0
- package/lib/gen/models/HttpUrlParameter.d.ts +5 -0
- package/lib/gen/models/HttpUrlParameter.js +3 -0
- package/lib/gen/models/KeyValue.d.ts +8 -0
- package/lib/gen/models/KeyValue.js +3 -0
- package/lib/gen/models/Workspace.d.ts +13 -0
- package/lib/gen/models/Workspace.js +2 -0
- package/lib/gen/serde_json/JsonValue.d.ts +3 -0
- package/lib/gen/serde_json/JsonValue.js +3 -0
- package/lib/index.d.ts +12 -5
- package/lib/index.js +12 -5
- package/lib/plugin-runtime-types/src/gen/common/PluginImportResources.d.ts +12 -0
- package/lib/plugin-runtime-types/src/gen/common/PluginImportResources.js +2 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginBootRequest.d.ts +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginBootRequest.js +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginBootResponse.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginBootResponse.js +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginEvent.d.ts +7 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginEvent.js +2 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginEventPayload.d.ts +19 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginEventPayload.js +2 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginExportHttpRequestRequest.d.ts +4 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginExportHttpRequestRequest.js +2 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginExportHttpRequestResponse.d.ts +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginExportHttpRequestResponse.js +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginFilterRequest.d.ts +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginFilterRequest.js +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginFilterResponse.d.ts +4 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginFilterResponse.js +2 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginImportRequest.d.ts +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginImportRequest.js +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginImportResponse.d.ts +4 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginImportResponse.js +2 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginPingRequest.d.ts +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginPingRequest.js +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginPingResponse.d.ts +3 -0
- package/lib/plugin-runtime-types/src/gen/events/PluginPingResponse.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/Environment.d.ts +10 -0
- package/lib/plugin-runtime-types/src/gen/models/Environment.js +2 -0
- package/lib/plugin-runtime-types/src/gen/models/EnvironmentVariable.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/models/EnvironmentVariable.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/Folder.d.ts +10 -0
- package/lib/plugin-runtime-types/src/gen/models/Folder.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcConnection.d.ts +17 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcConnection.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcEvent.d.ts +16 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcEvent.js +2 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcEventType.d.ts +1 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcEventType.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcMetadataEntry.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcMetadataEntry.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcRequest.d.ts +18 -0
- package/lib/plugin-runtime-types/src/gen/models/GrpcRequest.js +2 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpRequest.d.ts +20 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpRequest.js +2 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpRequestHeader.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpRequestHeader.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpResponse.d.ts +20 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpResponse.js +2 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpResponseHeader.d.ts +4 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpResponseHeader.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpUrlParameter.d.ts +5 -0
- package/lib/plugin-runtime-types/src/gen/models/HttpUrlParameter.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/KeyValue.d.ts +8 -0
- package/lib/plugin-runtime-types/src/gen/models/KeyValue.js +3 -0
- package/lib/plugin-runtime-types/src/gen/models/Workspace.d.ts +13 -0
- package/lib/plugin-runtime-types/src/gen/models/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 +31 -0
- package/lib/plugin-runtime-types/src/index.js +45 -0
- package/lib/plugin-runtime-types/src/plugins/context.d.ts +11 -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 +19 -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/src-tauri/yaak_plugin_runtime/bindings/serde_json/JsonValue.d.ts +3 -0
- package/lib/src-tauri/yaak_plugin_runtime/bindings/serde_json/JsonValue.js +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Environment } from '../gen/models/Environment';
|
|
2
|
+
import { Folder } from '../gen/models/Folder';
|
|
3
|
+
import { HttpRequest } from '../gen/models/HttpRequest';
|
|
4
|
+
import { Workspace } from '../gen/models/Workspace';
|
|
5
|
+
import { AtLeast } from '../helpers';
|
|
6
|
+
import { YaakContext } from './context';
|
|
7
|
+
export type ImportPluginResponse = null | {
|
|
8
|
+
workspaces: AtLeast<Workspace, 'name' | 'id' | 'model'>[];
|
|
9
|
+
environments: AtLeast<Environment, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
10
|
+
httpRequests: AtLeast<HttpRequest, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
11
|
+
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
|
|
12
|
+
};
|
|
13
|
+
export type ImporterPlugin = {
|
|
14
|
+
name: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
onImport(ctx: YaakContext, args: {
|
|
17
|
+
text: string;
|
|
18
|
+
}): Promise<ImportPluginResponse>;
|
|
19
|
+
};
|
|
@@ -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
|
+
};
|