altair-graphql-core 4.2.1 → 4.3.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.
- package/build/config.d.ts +42 -30
- package/build/config.js +3 -1
- package/build/index.d.ts +1 -0
- package/build/plugin/base.d.ts +1 -0
- package/build/plugin/context/context.interface.d.ts +1 -0
- package/build/plugin/event/event.interfaces.d.ts +1 -0
- package/build/plugin/panel.d.ts +1 -0
- package/build/plugin/plugin.interfaces.d.ts +1 -0
- package/build/plugin/ui-action.d.ts +1 -0
- package/build/subscriptions/index.d.ts +1 -0
- package/build/subscriptions/providers/action-cable.d.ts +1 -0
- package/build/subscriptions/providers/app-sync.d.ts +1 -0
- package/build/subscriptions/providers/graphql-ws.d.ts +1 -0
- package/build/subscriptions/providers/ws.d.ts +1 -0
- package/build/subscriptions/subscription-provider.d.ts +1 -0
- package/build/theme/defaults/dark.d.ts +1 -0
- package/build/theme/defaults/dracula.d.ts +1 -0
- package/build/theme/defaults/light.d.ts +1 -0
- package/build/theme/index.d.ts +1 -0
- package/build/theme/theme.d.ts +1 -0
- package/build/types/shared.d.ts +1 -0
- package/build/types/state/collection.interfaces.d.ts +12 -3
- package/build/types/state/dialog.interfaces.d.ts +1 -0
- package/build/types/state/docs.interfaces.d.ts +1 -0
- package/build/types/state/donation.interfaces.d.ts +1 -0
- package/build/types/state/environments.interfaces.d.ts +1 -0
- package/build/types/state/gql-schema.interfaces.d.ts +1 -0
- package/build/types/state/header.interfaces.d.ts +1 -0
- package/build/types/state/history.interfaces.d.ts +1 -0
- package/build/types/state/layout.interfaces.d.ts +1 -0
- package/build/types/state/local.interfaces.d.ts +1 -0
- package/build/types/state/per-window.interfaces.d.ts +1 -0
- package/build/types/state/postrequest.interfaces.d.ts +1 -0
- package/build/types/state/prerequest.interfaces.d.ts +1 -0
- package/build/types/state/query.interfaces.d.ts +1 -0
- package/build/types/state/settings.interfaces.d.ts +5 -0
- package/build/types/state/state.interfaces.d.ts +1 -0
- package/build/types/state/stream.interfaces.d.ts +1 -0
- package/build/types/state/variable.interfaces.d.ts +1 -0
- package/build/types/state/window.interfaces.d.ts +3 -0
- package/build/types/state/windows-meta.interfaces.d.ts +1 -0
- package/build/utils/is_electron.d.ts +1 -0
- package/build/utils/logger.d.ts +1 -0
- package/package.json +2 -2
- package/tsconfig.json +1 -0
package/build/config.d.ts
CHANGED
|
@@ -3,39 +3,59 @@ import { IDictionary } from './types/shared';
|
|
|
3
3
|
import { IInitialEnvironments } from './types/state/environments.interfaces';
|
|
4
4
|
import { HttpVerb } from './types/state/query.interfaces';
|
|
5
5
|
import { SettingsState } from './types/state/settings.interfaces';
|
|
6
|
-
export interface
|
|
6
|
+
export interface AltairWindowOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Initial name of the window
|
|
9
|
+
*/
|
|
10
|
+
initialName?: string;
|
|
7
11
|
/**
|
|
8
12
|
* URL to set as the server endpoint
|
|
9
13
|
*/
|
|
10
14
|
endpointURL?: string;
|
|
11
15
|
/**
|
|
12
|
-
|
|
13
|
-
|
|
16
|
+
* URL to set as the subscription endpoint
|
|
17
|
+
*/
|
|
14
18
|
subscriptionsEndpoint?: string;
|
|
15
19
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
* Initial query to be added
|
|
21
|
+
*/
|
|
18
22
|
initialQuery?: string;
|
|
19
23
|
/**
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
* Initial variables to be added
|
|
25
|
+
*/
|
|
22
26
|
initialVariables?: string;
|
|
23
27
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
* Initial pre-request script to be added
|
|
29
|
+
*/
|
|
26
30
|
initialPreRequestScript?: string;
|
|
27
31
|
/**
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
* Initial post-request script to be added
|
|
33
|
+
*/
|
|
30
34
|
initialPostRequestScript?: string;
|
|
31
35
|
/**
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
* Initial headers object to be added
|
|
37
|
+
* @example
|
|
38
|
+
* {
|
|
39
|
+
* 'X-GraphQL-Token': 'asd7-237s-2bdk-nsdk4'
|
|
40
|
+
* }
|
|
41
|
+
*/
|
|
38
42
|
initialHeaders?: IDictionary;
|
|
43
|
+
/**
|
|
44
|
+
* Initial subscriptions provider
|
|
45
|
+
*
|
|
46
|
+
* @default "websocket"
|
|
47
|
+
*/
|
|
48
|
+
initialSubscriptionsProvider?: SubscriptionProviderIds;
|
|
49
|
+
/**
|
|
50
|
+
* Initial subscriptions connection params
|
|
51
|
+
*/
|
|
52
|
+
initialSubscriptionsPayload?: IDictionary;
|
|
53
|
+
/**
|
|
54
|
+
* HTTP method to use for making requests
|
|
55
|
+
*/
|
|
56
|
+
initialHttpMethod?: HttpVerb;
|
|
57
|
+
}
|
|
58
|
+
export interface AltairConfigOptions extends AltairWindowOptions {
|
|
39
59
|
/**
|
|
40
60
|
* Initial Environments to be added
|
|
41
61
|
* @example
|
|
@@ -64,16 +84,6 @@ export interface AltairConfigOptions {
|
|
|
64
84
|
* Initial app settings to use
|
|
65
85
|
*/
|
|
66
86
|
initialSettings?: Partial<SettingsState>;
|
|
67
|
-
/**
|
|
68
|
-
* Initial subscriptions provider
|
|
69
|
-
*
|
|
70
|
-
* @default "websocket"
|
|
71
|
-
*/
|
|
72
|
-
initialSubscriptionsProvider?: SubscriptionProviderIds;
|
|
73
|
-
/**
|
|
74
|
-
* Initial subscriptions connection params
|
|
75
|
-
*/
|
|
76
|
-
initialSubscriptionsPayload?: IDictionary;
|
|
77
87
|
/**
|
|
78
88
|
* Indicates if the state should be preserved for subsequent app loads
|
|
79
89
|
*
|
|
@@ -81,9 +91,9 @@ export interface AltairConfigOptions {
|
|
|
81
91
|
*/
|
|
82
92
|
preserveState?: boolean;
|
|
83
93
|
/**
|
|
84
|
-
*
|
|
94
|
+
* List of options for windows to be loaded
|
|
85
95
|
*/
|
|
86
|
-
|
|
96
|
+
initialWindows?: AltairWindowOptions[];
|
|
87
97
|
}
|
|
88
98
|
export declare class AltairConfig {
|
|
89
99
|
donation: {
|
|
@@ -133,8 +143,10 @@ export declare class AltairConfig {
|
|
|
133
143
|
initialSubscriptionsPayload: IDictionary<any>;
|
|
134
144
|
initialHttpMethod: "POST" | "GET" | "PUT" | "DELETE";
|
|
135
145
|
preserveState: boolean;
|
|
146
|
+
windows: AltairWindowOptions[];
|
|
136
147
|
};
|
|
137
|
-
constructor({ endpointURL, subscriptionsEndpoint, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript, instanceStorageNamespace, initialSettings, initialSubscriptionsProvider, initialSubscriptionsPayload, initialHttpMethod, preserveState, }?: AltairConfigOptions);
|
|
148
|
+
constructor({ endpointURL, subscriptionsEndpoint, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript, instanceStorageNamespace, initialSettings, initialSubscriptionsProvider, initialSubscriptionsPayload, initialHttpMethod, preserveState, initialWindows, }?: AltairConfigOptions);
|
|
138
149
|
}
|
|
139
150
|
export declare const setAltairConfig: (_config: AltairConfig) => void;
|
|
140
151
|
export declare const getAltairConfig: () => AltairConfig;
|
|
152
|
+
//# sourceMappingURL=config.d.ts.map
|
package/build/config.js
CHANGED
|
@@ -8,7 +8,7 @@ const subscriptions_1 = require("./subscriptions");
|
|
|
8
8
|
const is_electron_1 = __importDefault(require("./utils/is_electron"));
|
|
9
9
|
const isTranslateMode = window.__ALTAIR_TRANSLATE__;
|
|
10
10
|
class AltairConfig {
|
|
11
|
-
constructor({ endpointURL, subscriptionsEndpoint, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript = '', instanceStorageNamespace, initialSettings, initialSubscriptionsProvider = subscriptions_1.WEBSOCKET_PROVIDER_ID, initialSubscriptionsPayload = {}, initialHttpMethod = 'POST', preserveState = true, } = {}) {
|
|
11
|
+
constructor({ endpointURL, subscriptionsEndpoint, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript = '', instanceStorageNamespace, initialSettings, initialSubscriptionsProvider = subscriptions_1.WEBSOCKET_PROVIDER_ID, initialSubscriptionsPayload = {}, initialHttpMethod = 'POST', preserveState = true, initialWindows = [], } = {}) {
|
|
12
12
|
this.donation = {
|
|
13
13
|
url: 'https://opencollective.com/altair/donate',
|
|
14
14
|
action_count_threshold: 50
|
|
@@ -57,6 +57,7 @@ class AltairConfig {
|
|
|
57
57
|
initialSubscriptionsPayload: {},
|
|
58
58
|
initialHttpMethod: 'POST',
|
|
59
59
|
preserveState: true,
|
|
60
|
+
windows: [],
|
|
60
61
|
};
|
|
61
62
|
this.initialData.url = window.__ALTAIR_ENDPOINT_URL__ || endpointURL || '';
|
|
62
63
|
this.initialData.subscriptionsEndpoint = window.__ALTAIR_SUBSCRIPTIONS_ENDPOINT__ || subscriptionsEndpoint || '';
|
|
@@ -72,6 +73,7 @@ class AltairConfig {
|
|
|
72
73
|
this.initialData.initialSubscriptionsPayload = initialSubscriptionsPayload;
|
|
73
74
|
this.initialData.initialHttpMethod = initialHttpMethod;
|
|
74
75
|
this.initialData.preserveState = preserveState;
|
|
76
|
+
this.initialData.windows = initialWindows;
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
exports.AltairConfig = AltairConfig;
|
package/build/index.d.ts
CHANGED
package/build/plugin/base.d.ts
CHANGED
|
@@ -27,3 +27,4 @@ export interface PluginEventPayloadMap {
|
|
|
27
27
|
}
|
|
28
28
|
export declare type PluginEvent = keyof PluginEventPayloadMap;
|
|
29
29
|
export declare type PluginEventCallback<T extends PluginEvent> = (payload: PluginEventPayloadMap[T]) => void;
|
|
30
|
+
//# sourceMappingURL=event.interfaces.d.ts.map
|
package/build/plugin/panel.d.ts
CHANGED
package/build/theme/index.d.ts
CHANGED
package/build/theme/theme.d.ts
CHANGED
|
@@ -102,3 +102,4 @@ export declare const hexToRgbStr: (hex: string) => string;
|
|
|
102
102
|
export declare const mergeThemes: (...customThemes: ICustomTheme[]) => ICustomTheme;
|
|
103
103
|
export declare const createTheme: (customTheme: ICustomTheme, extraTheme?: ICustomTheme) => ITheme;
|
|
104
104
|
export {};
|
|
105
|
+
//# sourceMappingURL=theme.d.ts.map
|
package/build/types/shared.d.ts
CHANGED
|
@@ -13,13 +13,22 @@ export interface IQuery extends ExportWindowState {
|
|
|
13
13
|
export interface IQueryCollection {
|
|
14
14
|
id?: number;
|
|
15
15
|
title: string;
|
|
16
|
-
description?: string;
|
|
17
16
|
queries: any[];
|
|
18
|
-
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* path of the collection in the collection tree
|
|
20
|
+
* e.g. '/123/456'
|
|
21
|
+
*/
|
|
22
|
+
parentPath?: string;
|
|
19
23
|
created_at?: number;
|
|
20
24
|
updated_at?: number;
|
|
21
25
|
}
|
|
22
|
-
export interface
|
|
26
|
+
export interface IQueryCollectionTree extends IQueryCollection {
|
|
27
|
+
id: number;
|
|
28
|
+
collections: IQueryCollectionTree[];
|
|
29
|
+
}
|
|
30
|
+
export interface ExportCollectionState extends IQueryCollectionTree {
|
|
23
31
|
version: 1;
|
|
24
32
|
type: 'collection';
|
|
25
33
|
}
|
|
34
|
+
//# sourceMappingURL=collection.interfaces.d.ts.map
|
|
@@ -56,6 +56,10 @@ export interface SettingsState {
|
|
|
56
56
|
* Reload schema on app start
|
|
57
57
|
*/
|
|
58
58
|
'schema.reloadOnStart'?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Disable update notification
|
|
61
|
+
*/
|
|
62
|
+
'alert.disableUpdateNotification'?: boolean;
|
|
59
63
|
/**
|
|
60
64
|
* Disable warning alerts
|
|
61
65
|
*/
|
|
@@ -82,3 +86,4 @@ export interface SettingsState {
|
|
|
82
86
|
'editor.shortcuts'?: Record<string, string>;
|
|
83
87
|
}
|
|
84
88
|
export {};
|
|
89
|
+
//# sourceMappingURL=settings.interfaces.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GraphQLSchema } from 'graphql';
|
|
2
|
+
import { SubscriptionProviderIds } from '../../subscriptions';
|
|
2
3
|
import { PerWindowState } from './per-window.interfaces';
|
|
3
4
|
export interface WindowState {
|
|
4
5
|
[id: string]: PerWindowState;
|
|
@@ -19,6 +20,7 @@ export interface ExportWindowState {
|
|
|
19
20
|
variables: string;
|
|
20
21
|
subscriptionUrl: string;
|
|
21
22
|
subscriptionConnectionParams?: string;
|
|
23
|
+
subscriptionProvider?: SubscriptionProviderIds;
|
|
22
24
|
preRequestScript?: string;
|
|
23
25
|
preRequestScriptEnabled?: boolean;
|
|
24
26
|
postRequestScript?: string;
|
|
@@ -33,3 +35,4 @@ export interface ExportWindowState {
|
|
|
33
35
|
windowIdInCollection?: string;
|
|
34
36
|
gqlSchema?: GraphQLSchema;
|
|
35
37
|
}
|
|
38
|
+
//# sourceMappingURL=window.interfaces.d.ts.map
|
package/build/utils/logger.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "altair-graphql-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Several of the core logic for altair graphql client",
|
|
5
5
|
"main": "./build/index.js",
|
|
6
6
|
"types": "./build/index.d.ts",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"util": "^0.12.4",
|
|
62
62
|
"uuid": "^8.3.2"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "b4858d081932d9c79f221a13d34bcc0dc858aa0f"
|
|
65
65
|
}
|