@aristid/leav-types 1.4.1-e7d4dc36 → 1.4.1-f425c84d
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,11 +1,24 @@
|
|
|
1
1
|
import WebSocket from 'ws';
|
|
2
2
|
import { type Client as GraphqlWsClient } from 'graphql-ws';
|
|
3
|
+
import { type AxiosResponse } from 'axios';
|
|
3
4
|
import type FormData from 'form-data';
|
|
4
5
|
import { type ActionsListConfig } from '_types/actionsList';
|
|
5
6
|
import { type ITreeElement } from '_types/tree';
|
|
6
7
|
import { AttributeFormats, type AttributeTypes, type IAttributeVersionsConf, type IEmbeddedAttribute } from '../../../_types/attribute';
|
|
8
|
+
interface IE2EUser {
|
|
9
|
+
getAuthToken: () => Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare const e2eAdminUser: () => IE2EUser;
|
|
12
|
+
export declare const e2eGuestUser: () => Promise<IE2EUser>;
|
|
7
13
|
export declare function getGraphQLUrl(): Promise<string>;
|
|
8
|
-
export declare
|
|
14
|
+
export declare class E2EGraphQLError extends Error {
|
|
15
|
+
readonly response: AxiosResponse;
|
|
16
|
+
constructor(message: string, response: AxiosResponse);
|
|
17
|
+
}
|
|
18
|
+
export interface IMakeGraphQlCallOptions {
|
|
19
|
+
user?: IE2EUser;
|
|
20
|
+
}
|
|
21
|
+
export declare function makeGraphQlCall(query: string | FormData, options?: IMakeGraphQlCallOptions): Promise<any>;
|
|
9
22
|
export declare function gqlSaveLibrary(id: string, label: string, additionalAttributes?: string[]): Promise<any>;
|
|
10
23
|
export declare function gqlSaveApplication(id: string, label: string, endpoint: string): Promise<any>;
|
|
11
24
|
export declare function gqlSaveAttribute(params: {
|
|
@@ -43,10 +56,13 @@ export declare function gqlSaveVersionProfile(profileId: string, label: string,
|
|
|
43
56
|
* Convert object to JSON, escaping quotes to be able to use it in a graphql query
|
|
44
57
|
**/
|
|
45
58
|
export declare function toCleanJSON(obj: {}): string;
|
|
46
|
-
export declare function makeWebSocketGraphQlCall(
|
|
59
|
+
export declare function makeWebSocketGraphQlCall(options?: {
|
|
60
|
+
user: IE2EUser;
|
|
61
|
+
}): Promise<GraphqlWsClient>;
|
|
47
62
|
export declare function waitGraphqlWebSocketMessage<T>(client: GraphqlWsClient, query: string, variables: Record<string, any>, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
|
|
48
63
|
timeoutMs: any;
|
|
49
64
|
}): Promise<T>;
|
|
50
65
|
export declare function waitWebSocketMessage<T>(webSocket: WebSocket, acceptMessage: (msg: T) => boolean, { timeoutMs }: {
|
|
51
66
|
timeoutMs: any;
|
|
52
67
|
}): Promise<T>;
|
|
68
|
+
export {};
|