@yaakapp/api 0.1.5 → 0.1.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.
@@ -1,4 +1,5 @@
1
1
  export type HttpRequestAction = {
2
2
  key: string;
3
3
  label: string;
4
+ icon: string | null;
4
5
  };
@@ -12,8 +12,11 @@ import type { GetHttpRequestByIdRequest } from "./GetHttpRequestByIdRequest";
12
12
  import type { GetHttpRequestByIdResponse } from "./GetHttpRequestByIdResponse";
13
13
  import type { ImportRequest } from "./ImportRequest";
14
14
  import type { ImportResponse } from "./ImportResponse";
15
+ import type { RenderHttpRequestRequest } from "./RenderHttpRequestRequest";
16
+ import type { RenderHttpRequestResponse } from "./RenderHttpRequestResponse";
15
17
  import type { SendHttpRequestRequest } from "./SendHttpRequestRequest";
16
18
  import type { SendHttpRequestResponse } from "./SendHttpRequestResponse";
19
+ import type { ShowToastRequest } from "./ShowToastRequest";
17
20
  export type InternalEventPayload = {
18
21
  "type": "boot_request";
19
22
  } & BootRequest | {
@@ -43,6 +46,12 @@ export type InternalEventPayload = {
43
46
  } & CallHttpRequestActionRequest | {
44
47
  "type": "copy_text_request";
45
48
  } & CopyTextRequest | {
49
+ "type": "render_http_request_request";
50
+ } & RenderHttpRequestRequest | {
51
+ "type": "render_http_request_response";
52
+ } & RenderHttpRequestResponse | {
53
+ "type": "show_toast_request";
54
+ } & ShowToastRequest | {
46
55
  "type": "get_http_request_by_id_request";
47
56
  } & GetHttpRequestByIdRequest | {
48
57
  "type": "get_http_request_by_id_response";
@@ -0,0 +1,4 @@
1
+ import type { HttpRequest } from "./HttpRequest";
2
+ export type RenderHttpRequestRequest = {
3
+ httpRequest: HttpRequest;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type { HttpRequest } from "./HttpRequest";
2
+ export type RenderHttpRequestResponse = {
3
+ httpRequest: HttpRequest;
4
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import type { ToastVariant } from "./ToastVariant";
2
+ export type ShowToastRequest = {
3
+ message: string;
4
+ variant: ToastVariant;
5
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1 @@
1
+ export type ToastVariant = "custom" | "copied" | "success" | "info" | "warning" | "error";
@@ -0,0 +1,3 @@
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 });
package/lib/index.d.ts CHANGED
@@ -38,6 +38,10 @@ export * from './gen/InternalEventPayload';
38
38
  export * from './gen/KeyValue';
39
39
  export * from './gen/Model';
40
40
  export * from './gen/SendHttpRequestRequest';
41
+ export * from './gen/ToastVariant';
42
+ export * from './gen/ShowToastRequest';
43
+ export * from './gen/RenderHttpRequestRequest';
44
+ export * from './gen/RenderHttpRequestResponse';
41
45
  export * from './gen/SendHttpRequestResponse';
42
46
  export * from './gen/SendHttpRequestResponse';
43
47
  export * from './gen/Settings';
package/lib/index.js CHANGED
@@ -53,6 +53,10 @@ __exportStar(require("./gen/InternalEventPayload"), exports);
53
53
  __exportStar(require("./gen/KeyValue"), exports);
54
54
  __exportStar(require("./gen/Model"), exports);
55
55
  __exportStar(require("./gen/SendHttpRequestRequest"), exports);
56
+ __exportStar(require("./gen/ToastVariant"), exports);
57
+ __exportStar(require("./gen/ShowToastRequest"), exports);
58
+ __exportStar(require("./gen/RenderHttpRequestRequest"), exports);
59
+ __exportStar(require("./gen/RenderHttpRequestResponse"), exports);
56
60
  __exportStar(require("./gen/SendHttpRequestResponse"), exports);
57
61
  __exportStar(require("./gen/SendHttpRequestResponse"), exports);
58
62
  __exportStar(require("./gen/Settings"), exports);
@@ -1,13 +1,20 @@
1
1
  import { GetHttpRequestByIdRequest } from '../gen/GetHttpRequestByIdRequest';
2
2
  import { GetHttpRequestByIdResponse } from '../gen/GetHttpRequestByIdResponse';
3
+ import { RenderHttpRequestRequest } from '../gen/RenderHttpRequestRequest';
4
+ import { RenderHttpRequestResponse } from '../gen/RenderHttpRequestResponse';
3
5
  import { SendHttpRequestRequest } from '../gen/SendHttpRequestRequest';
4
6
  import { SendHttpRequestResponse } from '../gen/SendHttpRequestResponse';
7
+ import { ShowToastRequest } from '../gen/ShowToastRequest';
5
8
  export type YaakContext = {
6
9
  clipboard: {
7
10
  copyText(text: string): void;
8
11
  };
12
+ toast: {
13
+ show(args: ShowToastRequest): void;
14
+ };
9
15
  httpRequest: {
10
16
  send(args: SendHttpRequestRequest): Promise<SendHttpRequestResponse['httpResponse']>;
11
17
  getById(args: GetHttpRequestByIdRequest): Promise<GetHttpRequestByIdResponse['httpRequest']>;
18
+ render(args: RenderHttpRequestRequest): Promise<RenderHttpRequestResponse['httpRequest']>;
12
19
  };
13
20
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/api",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "main": "lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "files": [