@yaakapp/api 0.2.21 → 0.2.24

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.
@@ -5,10 +5,6 @@ import type { HttpRequest } from "./models";
5
5
  import type { HttpResponse } from "./models";
6
6
  import type { JsonValue } from "./serde_json/JsonValue";
7
7
  import type { Workspace } from "./models";
8
- export type AuthMiddleware = {
9
- name: string;
10
- args: Array<FormInput>;
11
- };
12
8
  export type BootRequest = {
13
9
  dir: string;
14
10
  watch: boolean;
@@ -18,7 +14,7 @@ export type BootResponse = {
18
14
  version: string;
19
15
  capabilities: Array<string>;
20
16
  };
21
- export type CallAuthMiddlewareRequest = {
17
+ export type CallHttpAuthenticationRequest = {
22
18
  config: {
23
19
  [key in string]?: JsonValue;
24
20
  };
@@ -26,7 +22,7 @@ export type CallAuthMiddlewareRequest = {
26
22
  url: string;
27
23
  headers: Array<HttpHeader>;
28
24
  };
29
- export type CallAuthMiddlewareResponse = {
25
+ export type CallHttpAuthenticationResponse = {
30
26
  url: string;
31
27
  headers: Array<HttpHeader>;
32
28
  };
@@ -207,8 +203,9 @@ export type FormInputText = {
207
203
  */
208
204
  defaultValue?: string;
209
205
  };
210
- export type GetAuthMiddlewareResponse = {
211
- authMiddleware: Array<AuthMiddleware>;
206
+ export type GetHttpAuthenticationResponse = {
207
+ name: string;
208
+ config: Array<HttpAuthenticationConfigInput>;
212
209
  };
213
210
  export type GetHttpRequestActionsRequest = Record<string, never>;
214
211
  export type GetHttpRequestActionsResponse = {
@@ -225,6 +222,10 @@ export type GetTemplateFunctionsResponse = {
225
222
  functions: Array<TemplateFunction>;
226
223
  pluginRefId: string;
227
224
  };
225
+ export type HttpAuthenticationConfigInput = {
226
+ name: string;
227
+ args: Array<FormInput>;
228
+ };
228
229
  export type HttpHeader = {
229
230
  name: string;
230
231
  value: string;
@@ -298,14 +299,14 @@ export type InternalEventPayload = {
298
299
  } & CallTemplateFunctionRequest | {
299
300
  "type": "call_template_function_response";
300
301
  } & CallTemplateFunctionResponse | {
301
- "type": "get_auth_middleware_request";
302
+ "type": "get_http_authentication_request";
302
303
  } & EmptyPayload | {
303
- "type": "get_auth_middleware_response";
304
- } & GetAuthMiddlewareResponse | {
305
- "type": "call_auth_middleware_request";
306
- } & CallAuthMiddlewareRequest | {
307
- "type": "call_auth_middleware_response";
308
- } & CallAuthMiddlewareResponse | {
304
+ "type": "get_http_authentication_response";
305
+ } & GetHttpAuthenticationResponse | {
306
+ "type": "call_http_authentication_request";
307
+ } & CallHttpAuthenticationRequest | {
308
+ "type": "call_http_authentication_response";
309
+ } & CallHttpAuthenticationResponse | {
309
310
  "type": "copy_text_request";
310
311
  } & CopyTextRequest | {
311
312
  "type": "render_http_request_request";
@@ -29,7 +29,7 @@ export type GrpcMetadataEntry = {
29
29
  enabled?: boolean;
30
30
  name: string;
31
31
  value: string;
32
- id: string;
32
+ id?: string;
33
33
  };
34
34
  export type GrpcRequest = {
35
35
  model: "grpc_request";
@@ -72,7 +72,7 @@ export type HttpRequestHeader = {
72
72
  enabled?: boolean;
73
73
  name: string;
74
74
  value: string;
75
- id: string;
75
+ id?: string;
76
76
  };
77
77
  export type HttpResponse = {
78
78
  model: "http_response";
@@ -103,7 +103,7 @@ export type HttpUrlParameter = {
103
103
  enabled?: boolean;
104
104
  name: string;
105
105
  value: string;
106
- id: string;
106
+ id?: string;
107
107
  };
108
108
  export type Workspace = {
109
109
  model: "workspace";
@@ -1,5 +1,5 @@
1
- import { CallAuthMiddlewareRequest, CallAuthMiddlewareResponse, GetAuthMiddlewareResponse } from '..';
1
+ import { CallHttpAuthenticationRequest, CallHttpAuthenticationResponse, GetHttpAuthenticationResponse } from '..';
2
2
  import type { Context } from './Context';
3
- export type AuthenticationPlugin = GetAuthMiddlewareResponse & {
4
- onApply(ctx: Context, args: CallAuthMiddlewareRequest): Promise<CallAuthMiddlewareResponse> | CallAuthMiddlewareResponse;
3
+ export type AuthenticationPlugin = GetHttpAuthenticationResponse & {
4
+ onApply(ctx: Context, args: CallHttpAuthenticationRequest): Promise<CallHttpAuthenticationResponse> | CallHttpAuthenticationResponse;
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yaakapp/api",
3
- "version": "0.2.21",
3
+ "version": "0.2.24",
4
4
  "main": "lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "files": [
@@ -13,6 +13,7 @@
13
13
  "build:copy-types": "run-p build:copy-types:*",
14
14
  "build:copy-types:root": "cpy --flat ../../src-tauri/yaak-plugins/bindings/*.ts ./src/bindings",
15
15
  "build:copy-types:next": "cpy --flat ../../src-tauri/yaak-plugins/bindings/serde_json/*.ts ./src/bindings/serde_json",
16
+ "publish": "npm publish",
16
17
  "prepublishOnly": "npm run build"
17
18
  },
18
19
  "dependencies": {