@yaakapp/api 0.5.1 → 0.6.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.
|
@@ -171,6 +171,10 @@ export type FormInputBase = {
|
|
|
171
171
|
*/
|
|
172
172
|
defaultValue?: string;
|
|
173
173
|
disabled?: boolean;
|
|
174
|
+
/**
|
|
175
|
+
* Longer description of the input, likely shown in a tooltip
|
|
176
|
+
*/
|
|
177
|
+
description?: string;
|
|
174
178
|
};
|
|
175
179
|
export type FormInputCheckbox = {
|
|
176
180
|
/**
|
|
@@ -199,6 +203,10 @@ export type FormInputCheckbox = {
|
|
|
199
203
|
*/
|
|
200
204
|
defaultValue?: string;
|
|
201
205
|
disabled?: boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Longer description of the input, likely shown in a tooltip
|
|
208
|
+
*/
|
|
209
|
+
description?: string;
|
|
202
210
|
};
|
|
203
211
|
export type FormInputEditor = {
|
|
204
212
|
/**
|
|
@@ -241,6 +249,10 @@ export type FormInputEditor = {
|
|
|
241
249
|
*/
|
|
242
250
|
defaultValue?: string;
|
|
243
251
|
disabled?: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* Longer description of the input, likely shown in a tooltip
|
|
254
|
+
*/
|
|
255
|
+
description?: string;
|
|
244
256
|
};
|
|
245
257
|
export type FormInputFile = {
|
|
246
258
|
/**
|
|
@@ -280,6 +292,10 @@ export type FormInputFile = {
|
|
|
280
292
|
*/
|
|
281
293
|
defaultValue?: string;
|
|
282
294
|
disabled?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Longer description of the input, likely shown in a tooltip
|
|
297
|
+
*/
|
|
298
|
+
description?: string;
|
|
283
299
|
};
|
|
284
300
|
export type FormInputHttpRequest = {
|
|
285
301
|
/**
|
|
@@ -308,6 +324,10 @@ export type FormInputHttpRequest = {
|
|
|
308
324
|
*/
|
|
309
325
|
defaultValue?: string;
|
|
310
326
|
disabled?: boolean;
|
|
327
|
+
/**
|
|
328
|
+
* Longer description of the input, likely shown in a tooltip
|
|
329
|
+
*/
|
|
330
|
+
description?: string;
|
|
311
331
|
};
|
|
312
332
|
export type FormInputMarkdown = {
|
|
313
333
|
content: string;
|
|
@@ -344,6 +364,10 @@ export type FormInputSelect = {
|
|
|
344
364
|
*/
|
|
345
365
|
defaultValue?: string;
|
|
346
366
|
disabled?: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Longer description of the input, likely shown in a tooltip
|
|
369
|
+
*/
|
|
370
|
+
description?: string;
|
|
347
371
|
};
|
|
348
372
|
export type FormInputSelectOption = {
|
|
349
373
|
label: string;
|
|
@@ -389,6 +413,10 @@ export type FormInputText = {
|
|
|
389
413
|
*/
|
|
390
414
|
defaultValue?: string;
|
|
391
415
|
disabled?: boolean;
|
|
416
|
+
/**
|
|
417
|
+
* Longer description of the input, likely shown in a tooltip
|
|
418
|
+
*/
|
|
419
|
+
description?: string;
|
|
392
420
|
};
|
|
393
421
|
export type GenericCompletionOption = {
|
|
394
422
|
label: string;
|
|
@@ -397,6 +425,12 @@ export type GenericCompletionOption = {
|
|
|
397
425
|
type?: CompletionOptionType;
|
|
398
426
|
boost?: number;
|
|
399
427
|
};
|
|
428
|
+
export type GetCookieValueRequest = {
|
|
429
|
+
name: string;
|
|
430
|
+
};
|
|
431
|
+
export type GetCookieValueResponse = {
|
|
432
|
+
value: string | null;
|
|
433
|
+
};
|
|
400
434
|
export type GetHttpAuthenticationConfigRequest = {
|
|
401
435
|
contextId: string;
|
|
402
436
|
values: {
|
|
@@ -498,6 +532,14 @@ export type InternalEventPayload = {
|
|
|
498
532
|
} & SendHttpRequestRequest | {
|
|
499
533
|
"type": "send_http_request_response";
|
|
500
534
|
} & SendHttpRequestResponse | {
|
|
535
|
+
"type": "list_cookie_names_request";
|
|
536
|
+
} & ListCookieNamesRequest | {
|
|
537
|
+
"type": "list_cookie_names_response";
|
|
538
|
+
} & ListCookieNamesResponse | {
|
|
539
|
+
"type": "get_cookie_value_request";
|
|
540
|
+
} & GetCookieValueRequest | {
|
|
541
|
+
"type": "get_cookie_value_response";
|
|
542
|
+
} & GetCookieValueResponse | {
|
|
501
543
|
"type": "get_http_request_actions_request";
|
|
502
544
|
} & EmptyPayload | {
|
|
503
545
|
"type": "get_http_request_actions_response";
|
|
@@ -581,6 +623,10 @@ export type InternalEventPayload = {
|
|
|
581
623
|
"type": "error_response";
|
|
582
624
|
} & ErrorResponse;
|
|
583
625
|
export type JsonPrimitive = string | number | boolean | null;
|
|
626
|
+
export type ListCookieNamesRequest = {};
|
|
627
|
+
export type ListCookieNamesResponse = {
|
|
628
|
+
names: Array<string>;
|
|
629
|
+
};
|
|
584
630
|
export type OpenWindowRequest = {
|
|
585
631
|
url: string;
|
|
586
632
|
/**
|
|
@@ -22,15 +22,12 @@ export type Folder = {
|
|
|
22
22
|
updatedAt: string;
|
|
23
23
|
workspaceId: string;
|
|
24
24
|
folderId: string | null;
|
|
25
|
-
|
|
25
|
+
authentication: Record<string, any>;
|
|
26
|
+
authenticationType: string | null;
|
|
26
27
|
description: string;
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
export type GrpcMetadataEntry = {
|
|
30
|
-
enabled?: boolean;
|
|
28
|
+
headers: Array<HttpRequestHeader>;
|
|
31
29
|
name: string;
|
|
32
|
-
|
|
33
|
-
id?: string;
|
|
30
|
+
sortPriority: number;
|
|
34
31
|
};
|
|
35
32
|
export type GrpcRequest = {
|
|
36
33
|
model: "grpc_request";
|
|
@@ -43,7 +40,7 @@ export type GrpcRequest = {
|
|
|
43
40
|
authentication: Record<string, any>;
|
|
44
41
|
description: string;
|
|
45
42
|
message: string;
|
|
46
|
-
metadata: Array<
|
|
43
|
+
metadata: Array<HttpRequestHeader>;
|
|
47
44
|
method: string | null;
|
|
48
45
|
name: string;
|
|
49
46
|
service: string | null;
|
|
@@ -128,8 +125,11 @@ export type Workspace = {
|
|
|
128
125
|
id: string;
|
|
129
126
|
createdAt: string;
|
|
130
127
|
updatedAt: string;
|
|
131
|
-
|
|
128
|
+
authentication: Record<string, any>;
|
|
129
|
+
authenticationType: string | null;
|
|
132
130
|
description: string;
|
|
131
|
+
headers: Array<HttpRequestHeader>;
|
|
132
|
+
name: string;
|
|
133
133
|
encryptionKeyChallenge: string | null;
|
|
134
134
|
settingValidateCertificates: boolean;
|
|
135
135
|
settingFollowRedirects: boolean;
|
package/lib/index.d.ts
CHANGED
package/lib/plugins/Context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FindHttpResponsesRequest, FindHttpResponsesResponse, GetHttpRequestByIdRequest, GetHttpRequestByIdResponse, OpenWindowRequest, PromptTextRequest, PromptTextResponse, RenderHttpRequestRequest, RenderHttpRequestResponse, SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest, TemplateRenderRequest, TemplateRenderResponse } from '../bindings/gen_events.ts';
|
|
1
|
+
import type { FindHttpResponsesRequest, FindHttpResponsesResponse, GetCookieValueRequest, GetCookieValueResponse, GetHttpRequestByIdRequest, GetHttpRequestByIdResponse, ListCookieNamesResponse, OpenWindowRequest, PromptTextRequest, PromptTextResponse, RenderHttpRequestRequest, RenderHttpRequestResponse, SendHttpRequestRequest, SendHttpRequestResponse, ShowToastRequest, TemplateRenderRequest, TemplateRenderResponse } from '../bindings/gen_events.ts';
|
|
2
2
|
export interface Context {
|
|
3
3
|
clipboard: {
|
|
4
4
|
copyText(text: string): Promise<void>;
|
|
@@ -19,11 +19,15 @@ export interface Context {
|
|
|
19
19
|
onNavigate?: (args: {
|
|
20
20
|
url: string;
|
|
21
21
|
}) => void;
|
|
22
|
-
onClose
|
|
22
|
+
onClose?: () => void;
|
|
23
23
|
}): Promise<{
|
|
24
24
|
close: () => void;
|
|
25
25
|
}>;
|
|
26
26
|
};
|
|
27
|
+
cookies: {
|
|
28
|
+
listNames(): Promise<ListCookieNamesResponse['names']>;
|
|
29
|
+
getValue(args: GetCookieValueRequest): Promise<GetCookieValueResponse['value']>;
|
|
30
|
+
};
|
|
27
31
|
httpRequest: {
|
|
28
32
|
send(args: SendHttpRequestRequest): Promise<SendHttpRequestResponse['httpResponse']>;
|
|
29
33
|
getById(args: GetHttpRequestByIdRequest): Promise<GetHttpRequestByIdResponse['httpRequest']>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Context } from './Context';
|
|
2
|
-
|
|
2
|
+
type FilterPluginResponse = {
|
|
3
3
|
filtered: string;
|
|
4
4
|
};
|
|
5
5
|
export type FilterPlugin = {
|
|
@@ -11,3 +11,4 @@ export type FilterPlugin = {
|
|
|
11
11
|
mimeType: string;
|
|
12
12
|
}): Promise<FilterPluginResponse> | FilterPluginResponse;
|
|
13
13
|
};
|
|
14
|
+
export {};
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { ImportResources } from '../bindings/gen_events';
|
|
2
|
+
import { AtLeast } from '../helpers';
|
|
3
3
|
import type { Context } from './Context';
|
|
4
|
-
type
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
type RootFields = 'name' | 'id' | 'model';
|
|
5
|
+
type CommonFields = RootFields | 'workspaceId';
|
|
6
|
+
export type PartialImportResources = {
|
|
7
|
+
workspaces: Array<AtLeast<ImportResources['workspaces'][0], RootFields>>;
|
|
8
|
+
environments: Array<AtLeast<ImportResources['environments'][0], CommonFields>>;
|
|
9
|
+
folders: Array<AtLeast<ImportResources['folders'][0], CommonFields>>;
|
|
10
|
+
httpRequests: Array<AtLeast<ImportResources['httpRequests'][0], CommonFields>>;
|
|
11
|
+
grpcRequests: Array<AtLeast<ImportResources['grpcRequests'][0], CommonFields>>;
|
|
12
|
+
websocketRequests: Array<AtLeast<ImportResources['websocketRequests'][0], CommonFields>>;
|
|
13
|
+
};
|
|
14
|
+
export type ImportPluginResponse = null | {
|
|
15
|
+
resources: PartialImportResources;
|
|
12
16
|
};
|
|
13
17
|
export type ImporterPlugin = {
|
|
14
18
|
name: string;
|