@yaakapp/api 0.2.4 → 0.2.6

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.
Files changed (162) hide show
  1. package/lib/helpers.d.ts +0 -1
  2. package/lib/index.d.ts +1 -2
  3. package/lib/index.js +1 -2
  4. package/lib/plugin-runtime-types/src/helpers.d.ts +2 -0
  5. package/lib/plugin-runtime-types/src/index.d.ts +4 -0
  6. package/lib/plugin-runtime-types/src/index.js +18 -0
  7. package/lib/plugin-runtime-types/src/plugins/Context.d.ts +17 -0
  8. package/lib/plugin-runtime-types/src/plugins/FilterPlugin.d.ts +13 -0
  9. package/lib/plugin-runtime-types/src/plugins/HttpRequestActionPlugin.d.ts +5 -0
  10. package/lib/plugin-runtime-types/src/plugins/ImporterPlugin.d.ts +16 -0
  11. package/lib/plugin-runtime-types/src/plugins/TemplateFunctionPlugin.d.ts +5 -0
  12. package/lib/plugin-runtime-types/src/plugins/ThemePlugin.d.ts +7 -0
  13. package/lib/plugin-runtime-types/src/plugins/index.d.ts +16 -0
  14. package/lib/plugin-runtime-types/src/themes/index.d.ts +39 -0
  15. package/lib/plugins/Context.d.ts +1 -1
  16. package/lib/plugins/HttpRequestActionPlugin.d.ts +1 -1
  17. package/lib/plugins/ImporterPlugin.d.ts +1 -1
  18. package/lib/plugins/TemplateFunctionPlugin.d.ts +1 -1
  19. package/lib/{gen → src-tauri/yaak_plugin_runtime/bindings}/events.d.ts +1 -4
  20. package/lib/src-tauri/yaak_plugin_runtime/bindings/events.js +1 -0
  21. package/lib/{gen → src-tauri/yaak_plugin_runtime/bindings}/models.d.ts +41 -91
  22. package/lib/{gen → src-tauri/yaak_plugin_runtime/bindings}/models.js +1 -2
  23. package/package.json +1 -1
  24. package/lib/gen/BootRequest.d.ts +0 -3
  25. package/lib/gen/BootRequest.js +0 -3
  26. package/lib/gen/BootResponse.d.ts +0 -5
  27. package/lib/gen/BootResponse.js +0 -3
  28. package/lib/gen/CallHttpRequestActionArgs.d.ts +0 -4
  29. package/lib/gen/CallHttpRequestActionRequest.d.ts +0 -6
  30. package/lib/gen/CallTemplateFunctionArgs.d.ts +0 -7
  31. package/lib/gen/CallTemplateFunctionRequest.d.ts +0 -5
  32. package/lib/gen/CallTemplateFunctionResponse.d.ts +0 -3
  33. package/lib/gen/CallTemplateFunctionResponse.js +0 -3
  34. package/lib/gen/Cookie.d.ts +0 -8
  35. package/lib/gen/CookieDomain.d.ts +0 -5
  36. package/lib/gen/CookieDomain.js +0 -3
  37. package/lib/gen/CookieExpires.d.ts +0 -3
  38. package/lib/gen/CookieExpires.js +0 -3
  39. package/lib/gen/CookieJar.d.ts +0 -10
  40. package/lib/gen/CopyTextRequest.d.ts +0 -3
  41. package/lib/gen/CopyTextRequest.js +0 -3
  42. package/lib/gen/EmptyResponse.d.ts +0 -1
  43. package/lib/gen/EmptyResponse.js +0 -3
  44. package/lib/gen/Environment.d.ts +0 -10
  45. package/lib/gen/EnvironmentVariable.d.ts +0 -5
  46. package/lib/gen/EnvironmentVariable.js +0 -3
  47. package/lib/gen/ExportHttpRequestRequest.d.ts +0 -4
  48. package/lib/gen/ExportHttpRequestResponse.d.ts +0 -3
  49. package/lib/gen/ExportHttpRequestResponse.js +0 -3
  50. package/lib/gen/FilterRequest.d.ts +0 -4
  51. package/lib/gen/FilterRequest.js +0 -3
  52. package/lib/gen/FilterResponse.d.ts +0 -3
  53. package/lib/gen/FilterResponse.js +0 -3
  54. package/lib/gen/FindHttpResponsesRequest.d.ts +0 -4
  55. package/lib/gen/FindHttpResponsesRequest.js +0 -3
  56. package/lib/gen/FindHttpResponsesResponse.d.ts +0 -4
  57. package/lib/gen/Folder.d.ts +0 -10
  58. package/lib/gen/Folder.js +0 -3
  59. package/lib/gen/GetHttpRequestActionsRequest.d.ts +0 -1
  60. package/lib/gen/GetHttpRequestActionsRequest.js +0 -3
  61. package/lib/gen/GetHttpRequestActionsResponse.d.ts +0 -5
  62. package/lib/gen/GetHttpRequestActionsResponse.js +0 -2
  63. package/lib/gen/GetHttpRequestByIdRequest.d.ts +0 -3
  64. package/lib/gen/GetHttpRequestByIdRequest.js +0 -3
  65. package/lib/gen/GetHttpRequestByIdResponse.d.ts +0 -4
  66. package/lib/gen/GetHttpRequestByIdResponse.js +0 -2
  67. package/lib/gen/GetTemplateFunctionsResponse.d.ts +0 -5
  68. package/lib/gen/GetTemplateFunctionsResponse.js +0 -2
  69. package/lib/gen/GrpcConnection.d.ts +0 -17
  70. package/lib/gen/GrpcConnection.js +0 -3
  71. package/lib/gen/GrpcEvent.d.ts +0 -17
  72. package/lib/gen/GrpcEvent.js +0 -2
  73. package/lib/gen/GrpcEventType.d.ts +0 -1
  74. package/lib/gen/GrpcEventType.js +0 -3
  75. package/lib/gen/GrpcMetadataEntry.d.ts +0 -5
  76. package/lib/gen/GrpcMetadataEntry.js +0 -3
  77. package/lib/gen/GrpcRequest.d.ts +0 -18
  78. package/lib/gen/GrpcRequest.js +0 -2
  79. package/lib/gen/HttpRequest.d.ts +0 -20
  80. package/lib/gen/HttpRequest.js +0 -2
  81. package/lib/gen/HttpRequestAction.d.ts +0 -5
  82. package/lib/gen/HttpRequestAction.js +0 -3
  83. package/lib/gen/HttpRequestHeader.d.ts +0 -5
  84. package/lib/gen/HttpRequestHeader.js +0 -3
  85. package/lib/gen/HttpResponse.d.ts +0 -20
  86. package/lib/gen/HttpResponse.js +0 -2
  87. package/lib/gen/HttpResponseHeader.d.ts +0 -4
  88. package/lib/gen/HttpResponseHeader.js +0 -3
  89. package/lib/gen/HttpUrlParameter.d.ts +0 -5
  90. package/lib/gen/HttpUrlParameter.js +0 -3
  91. package/lib/gen/ImportRequest.d.ts +0 -3
  92. package/lib/gen/ImportRequest.js +0 -3
  93. package/lib/gen/ImportResources.d.ts +0 -12
  94. package/lib/gen/ImportResources.js +0 -2
  95. package/lib/gen/ImportResponse.d.ts +0 -4
  96. package/lib/gen/ImportResponse.js +0 -2
  97. package/lib/gen/InternalEvent.d.ts +0 -7
  98. package/lib/gen/InternalEvent.js +0 -2
  99. package/lib/gen/InternalEventPayload.d.ts +0 -85
  100. package/lib/gen/InternalEventPayload.js +0 -2
  101. package/lib/gen/KeyValue.d.ts +0 -8
  102. package/lib/gen/KeyValue.js +0 -3
  103. package/lib/gen/Model.d.ts +0 -13
  104. package/lib/gen/Model.js +0 -2
  105. package/lib/gen/Plugin.d.ts +0 -10
  106. package/lib/gen/Plugin.js +0 -3
  107. package/lib/gen/PluginBootRequest.d.ts +0 -3
  108. package/lib/gen/PluginBootRequest.js +0 -3
  109. package/lib/gen/PluginBootResponse.d.ts +0 -5
  110. package/lib/gen/PluginBootResponse.js +0 -3
  111. package/lib/gen/PluginReloadRequest.d.ts +0 -1
  112. package/lib/gen/PluginReloadRequest.js +0 -3
  113. package/lib/gen/PluginReloadResponse.d.ts +0 -1
  114. package/lib/gen/PluginReloadResponse.js +0 -3
  115. package/lib/gen/ReloadRequest.d.ts +0 -1
  116. package/lib/gen/ReloadRequest.js +0 -3
  117. package/lib/gen/ReloadResponse.d.ts +0 -1
  118. package/lib/gen/ReloadResponse.js +0 -3
  119. package/lib/gen/RenderHttpRequestRequest.d.ts +0 -6
  120. package/lib/gen/RenderHttpRequestRequest.js +0 -2
  121. package/lib/gen/RenderHttpRequestResponse.d.ts +0 -4
  122. package/lib/gen/RenderHttpRequestResponse.js +0 -2
  123. package/lib/gen/RenderPurpose.d.ts +0 -1
  124. package/lib/gen/RenderPurpose.js +0 -3
  125. package/lib/gen/SendHttpRequestRequest.d.ts +0 -4
  126. package/lib/gen/SendHttpRequestRequest.js +0 -2
  127. package/lib/gen/SendHttpRequestResponse.d.ts +0 -4
  128. package/lib/gen/SendHttpRequestResponse.js +0 -2
  129. package/lib/gen/Settings.d.ts +0 -17
  130. package/lib/gen/Settings.js +0 -3
  131. package/lib/gen/ShowToastRequest.d.ts +0 -5
  132. package/lib/gen/ShowToastRequest.js +0 -2
  133. package/lib/gen/TemplateFunction.d.ts +0 -5
  134. package/lib/gen/TemplateFunction.js +0 -2
  135. package/lib/gen/TemplateFunctionArg.d.ts +0 -13
  136. package/lib/gen/TemplateFunctionArg.js +0 -2
  137. package/lib/gen/TemplateFunctionBaseArg.d.ts +0 -6
  138. package/lib/gen/TemplateFunctionBaseArg.js +0 -3
  139. package/lib/gen/TemplateFunctionCheckboxArg.d.ts +0 -6
  140. package/lib/gen/TemplateFunctionCheckboxArg.js +0 -3
  141. package/lib/gen/TemplateFunctionHttpRequestArg.d.ts +0 -6
  142. package/lib/gen/TemplateFunctionHttpRequestArg.js +0 -3
  143. package/lib/gen/TemplateFunctionSelectArg.d.ts +0 -8
  144. package/lib/gen/TemplateFunctionSelectArg.js +0 -2
  145. package/lib/gen/TemplateFunctionSelectOption.d.ts +0 -4
  146. package/lib/gen/TemplateFunctionSelectOption.js +0 -3
  147. package/lib/gen/TemplateFunctionTextArg.d.ts +0 -7
  148. package/lib/gen/TemplateFunctionTextArg.js +0 -3
  149. package/lib/gen/ToastVariant.d.ts +0 -1
  150. package/lib/gen/ToastVariant.js +0 -3
  151. package/lib/gen/Workspace.d.ts +0 -13
  152. package/lib/gen/Workspace.js +0 -2
  153. package/lib/gen/events.js +0 -2
  154. /package/lib/{gen/CallHttpRequestActionArgs.js → plugin-runtime-types/src/helpers.js} +0 -0
  155. /package/lib/{gen/CallHttpRequestActionRequest.js → plugin-runtime-types/src/plugins/Context.js} +0 -0
  156. /package/lib/{gen/CallTemplateFunctionArgs.js → plugin-runtime-types/src/plugins/FilterPlugin.js} +0 -0
  157. /package/lib/{gen/CallTemplateFunctionRequest.js → plugin-runtime-types/src/plugins/HttpRequestActionPlugin.js} +0 -0
  158. /package/lib/{gen/Cookie.js → plugin-runtime-types/src/plugins/ImporterPlugin.js} +0 -0
  159. /package/lib/{gen/CookieJar.js → plugin-runtime-types/src/plugins/TemplateFunctionPlugin.js} +0 -0
  160. /package/lib/{gen/Environment.js → plugin-runtime-types/src/plugins/ThemePlugin.js} +0 -0
  161. /package/lib/{gen/ExportHttpRequestRequest.js → plugin-runtime-types/src/plugins/index.js} +0 -0
  162. /package/lib/{gen/FindHttpResponsesResponse.js → plugin-runtime-types/src/themes/index.js} +0 -0
package/lib/helpers.d.ts CHANGED
@@ -1,2 +1 @@
1
1
  export type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
2
- export type OneOrMany<T> = T[] | T;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export type * from './plugins';
2
2
  export type * from './themes';
3
- export * from './gen/models';
4
- export * from './gen/events';
3
+ export * from '@yaakapp-internal/plugin';
package/lib/index.js CHANGED
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./gen/models"), exports);
18
- __exportStar(require("./gen/events"), exports);
17
+ __exportStar(require("@yaakapp-internal/plugin"), exports);
@@ -0,0 +1,2 @@
1
+ export type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
2
+ export type OneOrMany<T> = T[] | T;
@@ -0,0 +1,4 @@
1
+ export type * from './plugins';
2
+ export type * from './themes';
3
+ export * from '../../src-tauri/yaak_plugin_runtime/bindings/models.ts';
4
+ export * from '../../src-tauri/yaak_plugin_runtime/bindings/events.ts';
@@ -0,0 +1,18 @@
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);
@@ -0,0 +1,17 @@
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
+ };
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1,5 @@
1
+ import { CallHttpRequestActionArgs, HttpRequestAction } from '../gen/events';
2
+ import { Context } from './Context';
3
+ export type HttpRequestActionPlugin = HttpRequestAction & {
4
+ onSelect(ctx: Context, args: CallHttpRequestActionArgs): Promise<void> | void;
5
+ };
@@ -0,0 +1,16 @@
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
+ };
@@ -0,0 +1,5 @@
1
+ import { CallTemplateFunctionArgs, TemplateFunction } from '../gen/events';
2
+ import { Context } from './Context';
3
+ export type TemplateFunctionPlugin = TemplateFunction & {
4
+ onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null>;
5
+ };
@@ -0,0 +1,7 @@
1
+ import { Theme } from '../themes';
2
+ import { Context } from './Context';
3
+ export type ThemePlugin = {
4
+ name: string;
5
+ description?: string;
6
+ getTheme(ctx: Context, fileContents: string): Promise<Theme>;
7
+ };
@@ -0,0 +1,16 @@
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
+ };
@@ -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
+ };
@@ -1,4 +1,4 @@
1
- import { FindHttpResponsesRequest, FindHttpResponsesResponse, GetHttpRequestByIdRequest, GetHttpRequestByIdResponse, RenderHttpRequestRequest, RenderHttpRequestResponse, SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest } from '../gen/events';
1
+ import { FindHttpResponsesRequest, FindHttpResponsesResponse, GetHttpRequestByIdRequest, GetHttpRequestByIdResponse, RenderHttpRequestRequest, RenderHttpRequestResponse, SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest } from '@yaakapp-internal/plugin';
2
2
  export type Context = {
3
3
  clipboard: {
4
4
  copyText(text: string): void;
@@ -1,4 +1,4 @@
1
- import { CallHttpRequestActionArgs, HttpRequestAction } from '../gen/events';
1
+ import { CallHttpRequestActionArgs, HttpRequestAction } from '@yaakapp-internal/plugin';
2
2
  import { Context } from './Context';
3
3
  export type HttpRequestActionPlugin = HttpRequestAction & {
4
4
  onSelect(ctx: Context, args: CallHttpRequestActionArgs): Promise<void> | void;
@@ -1,4 +1,4 @@
1
- import { Environment, Folder, HttpRequest, Workspace } from '../gen/models';
1
+ import { Environment, Folder, HttpRequest, Workspace } from '@yaakapp-internal/models';
2
2
  import { AtLeast } from '../helpers';
3
3
  import { Context } from './Context';
4
4
  export type ImportPluginResponse = null | {
@@ -1,4 +1,4 @@
1
- import { CallTemplateFunctionArgs, TemplateFunction } from '../gen/events';
1
+ import { CallTemplateFunctionArgs, TemplateFunction } from '@yaakapp-internal/plugin';
2
2
  import { Context } from './Context';
3
3
  export type TemplateFunctionPlugin = TemplateFunction & {
4
4
  onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null>;
@@ -1,4 +1,3 @@
1
- import type { CookieJar } from "./models";
2
1
  import type { Environment } from "./models";
3
2
  import type { Folder } from "./models";
4
3
  import type { GrpcConnection } from "./models";
@@ -7,8 +6,6 @@ import type { GrpcRequest } from "./models";
7
6
  import type { HttpRequest } from "./models";
8
7
  import type { HttpResponse } from "./models";
9
8
  import type { KeyValue } from "./models";
10
- import type { Plugin } from "./models";
11
- import type { Settings } from "./models";
12
9
  import type { Workspace } from "./models";
13
10
  export type BootRequest = {
14
11
  dir: string;
@@ -164,7 +161,7 @@ export type InternalEventPayload = {
164
161
  } & FindHttpResponsesResponse | {
165
162
  "type": "empty_response";
166
163
  };
167
- export type Model = Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | KeyValue | Workspace | CookieJar | Settings | Plugin;
164
+ export type Model = Environment | Folder | GrpcConnection | GrpcEvent | GrpcRequest | HttpRequest | HttpResponse | KeyValue | Workspace;
168
165
  export type RenderHttpRequestRequest = {
169
166
  httpRequest: HttpRequest;
170
167
  purpose: RenderPurpose;
@@ -1,30 +1,7 @@
1
- export type Cookie = {
2
- raw_cookie: string;
3
- domain: CookieDomain;
4
- expires: CookieExpires;
5
- path: [string, boolean];
6
- };
7
- export type CookieDomain = {
8
- "HostOnly": string;
9
- } | {
10
- "Suffix": string;
11
- } | "NotPresent" | "Empty";
12
- export type CookieExpires = {
13
- "AtUtc": string;
14
- } | "SessionEnd";
15
- export type CookieJar = {
16
- id: string;
17
- model: "cookie_jar";
18
- createdAt: string;
19
- updatedAt: string;
20
- workspaceId: string;
21
- name: string;
22
- cookies: Array<Cookie>;
23
- };
24
1
  export type Environment = {
2
+ model: "environment";
25
3
  id: string;
26
4
  workspaceId: string;
27
- model: "environment";
28
5
  createdAt: string;
29
6
  updatedAt: string;
30
7
  name: string;
@@ -36,47 +13,47 @@ export type EnvironmentVariable = {
36
13
  value: string;
37
14
  };
38
15
  export type Folder = {
16
+ model: "folder";
17
+ id: string;
39
18
  createdAt: string;
40
19
  updatedAt: string;
41
- id: string;
42
20
  workspaceId: string;
43
21
  folderId: string | null;
44
- model: "folder";
45
22
  name: string;
46
23
  sortPriority: number;
47
24
  };
48
25
  export type GrpcConnection = {
49
- id: string;
50
26
  model: "grpc_connection";
51
- workspaceId: string;
52
- requestId: string;
27
+ id: string;
53
28
  createdAt: string;
54
29
  updatedAt: string;
55
- service: string;
56
- method: string;
30
+ workspaceId: string;
31
+ requestId: string;
57
32
  elapsed: number;
58
- status: number;
59
- url: string;
60
33
  error: string | null;
34
+ method: string;
35
+ service: string;
36
+ status: number;
61
37
  trailers: {
62
38
  [key in string]?: string;
63
39
  };
40
+ url: string;
64
41
  };
65
42
  export type GrpcEvent = {
66
- id: string;
67
43
  model: "grpc_event";
44
+ id: string;
45
+ createdAt: string;
46
+ updatedAt: string;
68
47
  workspaceId: string;
69
48
  requestId: string;
70
49
  connectionId: string;
71
- createdAt: string;
72
- updatedAt: string;
73
50
  content: string;
51
+ error: string | null;
74
52
  eventType: GrpcEventType;
75
53
  metadata: {
76
54
  [key in string]?: string;
77
55
  };
78
56
  status: number | null;
79
- error: string | null;
80
57
  };
81
58
  export type GrpcEventType = "info" | "error" | "client_message" | "server_message" | "connection_start" | "connection_end";
82
59
  export type GrpcMetadataEntry = {
@@ -85,39 +62,39 @@ export type GrpcMetadataEntry = {
85
62
  value: string;
86
63
  };
87
64
  export type GrpcRequest = {
88
- id: string;
89
65
  model: "grpc_request";
90
- workspaceId: string;
66
+ id: string;
91
67
  createdAt: string;
92
68
  updatedAt: string;
69
+ workspaceId: string;
93
70
  folderId: string | null;
94
- name: string;
95
- sortPriority: number;
96
- url: string;
97
- service: string | null;
98
- method: string | null;
99
- message: string;
100
71
  authenticationType: string | null;
101
72
  authentication: Record<string, any>;
73
+ message: string;
102
74
  metadata: Array<GrpcMetadataEntry>;
75
+ method: string | null;
76
+ name: string;
77
+ service: string | null;
78
+ sortPriority: number;
79
+ url: string;
103
80
  };
104
81
  export type HttpRequest = {
82
+ model: "http_request";
83
+ id: string;
105
84
  createdAt: string;
106
85
  updatedAt: string;
107
- id: string;
108
86
  workspaceId: string;
109
87
  folderId: string | null;
110
- model: "http_request";
111
- sortPriority: number;
112
- name: string;
113
- url: string;
114
- urlParameters: Array<HttpUrlParameter>;
115
- method: string;
116
- body: Record<string, any>;
117
- bodyType: string | null;
118
88
  authentication: Record<string, any>;
119
89
  authenticationType: string | null;
90
+ body: Record<string, any>;
91
+ bodyType: string | null;
120
92
  headers: Array<HttpRequestHeader>;
93
+ method: string;
94
+ name: string;
95
+ sortPriority: number;
96
+ url: string;
97
+ urlParameters: Array<HttpUrlParameter>;
121
98
  };
122
99
  export type HttpRequestHeader = {
123
100
  enabled?: boolean;
@@ -125,23 +102,23 @@ export type HttpRequestHeader = {
125
102
  value: string;
126
103
  };
127
104
  export type HttpResponse = {
128
- id: string;
129
105
  model: "http_response";
130
- workspaceId: string;
131
- requestId: string;
106
+ id: string;
132
107
  createdAt: string;
133
108
  updatedAt: string;
134
- error: string | null;
135
- url: string;
109
+ workspaceId: string;
110
+ requestId: string;
111
+ bodyPath: string | null;
136
112
  contentLength: number | null;
137
- version: string | null;
138
113
  elapsed: number;
139
114
  elapsedHeaders: number;
115
+ error: string | null;
116
+ headers: Array<HttpResponseHeader>;
140
117
  remoteAddr: string | null;
141
118
  status: number;
142
119
  statusReason: string | null;
143
- bodyPath: string | null;
144
- headers: Array<HttpResponseHeader>;
120
+ url: string;
121
+ version: string | null;
145
122
  };
146
123
  export type HttpResponseHeader = {
147
124
  name: string;
@@ -156,40 +133,13 @@ export type KeyValue = {
156
133
  model: "key_value";
157
134
  createdAt: string;
158
135
  updatedAt: string;
159
- namespace: string;
160
136
  key: string;
137
+ namespace: string;
161
138
  value: string;
162
139
  };
163
- export type Plugin = {
164
- id: string;
165
- model: "plugin";
166
- createdAt: string;
167
- updatedAt: string;
168
- checkedAt: string | null;
169
- directory: string;
170
- url: string | null;
171
- enabled: boolean;
172
- };
173
- export type Settings = {
174
- id: string;
175
- model: "settings";
176
- createdAt: string;
177
- updatedAt: string;
178
- theme: string;
179
- appearance: string;
180
- themeDark: string;
181
- themeLight: string;
182
- updateChannel: string;
183
- interfaceFontSize: number;
184
- interfaceScale: number;
185
- editorFontSize: number;
186
- editorSoftWrap: boolean;
187
- telemetry: boolean;
188
- openWorkspaceNewWindow: boolean | null;
189
- };
190
140
  export type Workspace = {
191
- id: string;
192
141
  model: "workspace";
142
+ id: string;
193
143
  createdAt: string;
194
144
  updatedAt: string;
195
145
  name: string;
@@ -1,3 +1,2 @@
1
- "use strict";
2
1
  // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
2
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/api",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "main": "lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "files": [
@@ -1,3 +0,0 @@
1
- export type BootRequest = {
2
- dir: string;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +0,0 @@
1
- export type BootResponse = {
2
- name: string;
3
- version: string;
4
- capabilities: Array<string>;
5
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import type { HttpRequest } from "./HttpRequest";
2
- export type CallHttpRequestActionArgs = {
3
- httpRequest: HttpRequest;
4
- };
@@ -1,6 +0,0 @@
1
- import type { CallHttpRequestActionArgs } from "./CallHttpRequestActionArgs";
2
- export type CallHttpRequestActionRequest = {
3
- key: string;
4
- pluginRefId: string;
5
- args: CallHttpRequestActionArgs;
6
- };
@@ -1,7 +0,0 @@
1
- import type { RenderPurpose } from "./RenderPurpose";
2
- export type CallTemplateFunctionArgs = {
3
- purpose: RenderPurpose;
4
- values: {
5
- [key: string]: string;
6
- };
7
- };
@@ -1,5 +0,0 @@
1
- import type { CallTemplateFunctionArgs } from "./CallTemplateFunctionArgs";
2
- export type CallTemplateFunctionRequest = {
3
- name: string;
4
- args: CallTemplateFunctionArgs;
5
- };
@@ -1,3 +0,0 @@
1
- export type CallTemplateFunctionResponse = {
2
- value: string | null;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +0,0 @@
1
- import type { CookieDomain } from "./CookieDomain";
2
- import type { CookieExpires } from "./CookieExpires";
3
- export type Cookie = {
4
- raw_cookie: string;
5
- domain: CookieDomain;
6
- expires: CookieExpires;
7
- path: [string, boolean];
8
- };
@@ -1,5 +0,0 @@
1
- export type CookieDomain = {
2
- "HostOnly": string;
3
- } | {
4
- "Suffix": string;
5
- } | "NotPresent" | "Empty";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- export type CookieExpires = {
2
- "AtUtc": string;
3
- } | "SessionEnd";
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,10 +0,0 @@
1
- import type { Cookie } from "./Cookie";
2
- export type CookieJar = {
3
- id: string;
4
- model: "cookie_jar";
5
- createdAt: string;
6
- updatedAt: string;
7
- workspaceId: string;
8
- name: string;
9
- cookies: Array<Cookie>;
10
- };
@@ -1,3 +0,0 @@
1
- export type CopyTextRequest = {
2
- text: string;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1 +0,0 @@
1
- export type EmptyResponse = {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,5 +0,0 @@
1
- export type EnvironmentVariable = {
2
- enabled?: boolean;
3
- name: string;
4
- value: string;
5
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- import type { HttpRequest } from "./HttpRequest";
2
- export type ExportHttpRequestRequest = {
3
- httpRequest: HttpRequest;
4
- };
@@ -1,3 +0,0 @@
1
- export type ExportHttpRequestResponse = {
2
- content: string;
3
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +0,0 @@
1
- export type FilterRequest = {
2
- content: string;
3
- filter: string;
4
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
- Object.defineProperty(exports, "__esModule", { value: true });