@yaakapp/api 0.4.0 → 0.5.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.
@@ -4,6 +4,7 @@ import type { GrpcRequest } from "./gen_models.js";
4
4
  import type { HttpRequest } from "./gen_models.js";
5
5
  import type { HttpResponse } from "./gen_models.js";
6
6
  import type { JsonValue } from "./serde_json/JsonValue.js";
7
+ import type { WebsocketRequest } from "./gen_models.js";
7
8
  import type { Workspace } from "./gen_models.js";
8
9
  export type BootRequest = {
9
10
  dir: string;
@@ -455,6 +456,7 @@ export type ImportResources = {
455
456
  folders: Array<Folder>;
456
457
  httpRequests: Array<HttpRequest>;
457
458
  grpcRequests: Array<GrpcRequest>;
459
+ websocketRequests: Array<WebsocketRequest>;
458
460
  };
459
461
  export type ImportResponse = {
460
462
  resources: ImportResources;
@@ -550,6 +552,8 @@ export type InternalEventPayload = {
550
552
  } & OpenWindowRequest | {
551
553
  "type": "window_navigate_event";
552
554
  } & WindowNavigateEvent | {
555
+ "type": "window_close_event";
556
+ } | {
553
557
  "type": "close_window_request";
554
558
  } & CloseWindowRequest | {
555
559
  "type": "template_render_request";
@@ -585,6 +589,7 @@ export type OpenWindowRequest = {
585
589
  label: string;
586
590
  title?: string;
587
591
  size?: WindowSize;
592
+ dataDirKey?: string;
588
593
  };
589
594
  export type PromptTextRequest = {
590
595
  id: string;
@@ -105,6 +105,23 @@ export type HttpUrlParameter = {
105
105
  value: string;
106
106
  id?: string;
107
107
  };
108
+ export type WebsocketRequest = {
109
+ model: "websocket_request";
110
+ id: string;
111
+ createdAt: string;
112
+ updatedAt: string;
113
+ workspaceId: string;
114
+ folderId: string | null;
115
+ authentication: Record<string, any>;
116
+ authenticationType: string | null;
117
+ description: string;
118
+ headers: Array<HttpRequestHeader>;
119
+ message: string;
120
+ name: string;
121
+ sortPriority: number;
122
+ url: string;
123
+ urlParameters: Array<HttpUrlParameter>;
124
+ };
108
125
  export type Workspace = {
109
126
  model: "workspace";
110
127
  id: string;
@@ -19,6 +19,7 @@ export interface Context {
19
19
  onNavigate?: (args: {
20
20
  url: string;
21
21
  }) => void;
22
+ onClose: () => void;
22
23
  }): Promise<{
23
24
  close: () => void;
24
25
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/api",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "main": "lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "files": [