altair-graphql-core
Version:
Several of the core logic for altair graphql client
643 lines • 29.1 kB
TypeScript
import { input } from 'zod/v4';
import { altairConfigOptionsSchema } from './options.schema';
export type AltairConfigOptions = input<typeof altairConfigOptionsSchema>;
export declare function getOptions(opts: AltairConfigOptions): {
initialName?: string | undefined;
endpointURL?: string | undefined;
subscriptionsEndpoint?: string | undefined;
subscriptionsProtocol?: string | undefined;
initialQuery?: string | undefined;
initialVariables?: string | undefined;
initialPreRequestScript?: string | undefined;
initialPostRequestScript: string;
initialHeaders?: Record<string, unknown> | undefined;
initialSubscriptionRequestHandlerId: "http" | "websocket" | "graphql-ws" | "app-sync" | "action-cable" | "graphql-sse";
initialSubscriptionsPayload?: Record<string, unknown> | null | undefined;
initialRequestHandlerId: "http" | "websocket" | "graphql-ws" | "app-sync" | "action-cable" | "graphql-sse";
initialRequestHandlerAdditionalParams: {};
initialHttpMethod: "POST" | "GET" | "PUT" | "DELETE";
initialAuthorization?: {
type: "api-key";
data: {
headerName: string;
headerValue: string;
};
} | {
type: "basic";
data: {
username: string;
password: string;
};
} | {
type: "bearer";
data: {
token: string;
};
} | {
type: "oauth2";
data: {
accessTokenResponse: {
access_token: string;
token_type: string;
state: string;
expires_in?: number | undefined;
refresh_token?: string | undefined;
id_token?: string | undefined;
scope?: string | undefined;
};
};
} | {
type: "none";
data: undefined;
} | undefined;
initialEnvironments?: {
activeSubEnvironment?: string | undefined;
base?: {
id?: string | undefined;
title?: string | undefined;
variables?: Record<string, unknown> | undefined;
} | undefined;
subEnvironments?: {
id?: string | undefined;
title?: string | undefined;
variables?: Record<string, unknown> | undefined;
}[] | undefined;
} | undefined;
instanceStorageNamespace: string;
initialSettings?: {
theme?: string | undefined;
'theme.dark'?: string | undefined;
language?: "ach-UG" | "en-US" | "fr-FR" | "es-ES" | "cs-CZ" | "de-DE" | "pt-BR" | "ru-RU" | "uk-UA" | "zh-CN" | "ja-JP" | "sr-SP" | "it-IT" | "pl-PL" | "ko-KR" | "ro-RO" | "vi-VN" | undefined;
addQueryDepthLimit?: number | undefined;
tabSize?: number | undefined;
enableExperimental?: boolean | undefined;
'theme.fontsize'?: number | undefined;
'theme.editorFontFamily'?: string | undefined;
'theme.editorFontSize'?: number | undefined;
disablePushNotification?: boolean | undefined;
'plugin.list'?: string[] | undefined;
'request.withCredentials'?: boolean | undefined;
'schema.reloadOnStart'?: boolean | undefined;
'schema.reload.onEnvChange'?: boolean | undefined;
'alert.disableUpdateNotification'?: boolean | undefined;
'alert.disableWarnings'?: boolean | undefined;
'banners.disable'?: boolean | undefined;
historyDepth?: number | undefined;
disableLineNumbers?: boolean | undefined;
'doc.hideDeprecatedItems'?: boolean | undefined;
themeConfig?: {
easing?: string | undefined;
colors?: {
black?: string | undefined;
darkGray?: string | undefined;
gray?: string | undefined;
lightGray?: string | undefined;
white?: string | undefined;
green?: string | undefined;
blue?: string | undefined;
rose?: string | undefined;
cerise?: string | undefined;
red?: string | undefined;
orange?: string | undefined;
yellow?: string | undefined;
lightRed?: string | undefined;
darkPurple?: string | undefined;
primary?: string | undefined;
secondary?: string | undefined;
tertiary?: string | undefined;
bg?: string | undefined;
offBg?: string | undefined;
font?: string | undefined;
offFont?: string | undefined;
border?: string | undefined;
offBorder?: string | undefined;
headerBg?: string | undefined;
} | undefined;
type?: {
fontSize: {
base?: number | undefined;
remBase?: number | undefined;
body?: number | undefined;
bodySmaller?: number | undefined;
};
fontFamily?: {
default?: string | undefined;
} | undefined;
} | undefined;
isSystem?: boolean | undefined;
shadow?: {
color?: string | undefined;
opacity?: number | undefined;
} | undefined;
editor?: {
fontFamily?: {
default?: string | undefined;
} | undefined;
fontSize?: number | undefined;
colors?: {
comment?: string | undefined;
string?: string | undefined;
number?: string | undefined;
variable?: string | undefined;
keyword?: string | undefined;
atom?: string | undefined;
attribute?: string | undefined;
property?: string | undefined;
punctuation?: string | undefined;
definition?: string | undefined;
builtin?: string | undefined;
cursor?: string | undefined;
} | undefined;
} | undefined;
} | {
easing?: string | undefined;
isSystem?: boolean | undefined;
'color.black'?: string | undefined;
'color.darkGray'?: string | undefined;
'color.gray'?: string | undefined;
'color.lightGray'?: string | undefined;
'color.white'?: string | undefined;
'color.green'?: string | undefined;
'color.blue'?: string | undefined;
'color.rose'?: string | undefined;
'color.cerise'?: string | undefined;
'color.red'?: string | undefined;
'color.orange'?: string | undefined;
'color.yellow'?: string | undefined;
'color.lightRed'?: string | undefined;
'color.darkPurple'?: string | undefined;
'color.primary'?: string | undefined;
'color.secondary'?: string | undefined;
'color.tertiary'?: string | undefined;
'color.bg'?: string | undefined;
'color.offBg'?: string | undefined;
'color.font'?: string | undefined;
'color.offFont'?: string | undefined;
'color.border'?: string | undefined;
'color.offBorder'?: string | undefined;
'color.headerBg'?: string | undefined;
'fontSize.base'?: number | undefined;
'fontSize.remBase'?: number | undefined;
'fontSize.body'?: number | undefined;
'fontSize.bodySmaller'?: number | undefined;
'fontSize.code'?: number | undefined;
'fontFamily.default'?: string | undefined;
'fontFamily.code'?: string | undefined;
'shadow.color'?: string | undefined;
'shadow.opacity'?: number | undefined;
'color.editor.comment'?: string | undefined;
'color.editor.string'?: string | undefined;
'color.editor.number'?: string | undefined;
'color.editor.variable'?: string | undefined;
'color.editor.keyword'?: string | undefined;
'color.editor.atom'?: string | undefined;
'color.editor.attribute'?: string | undefined;
'color.editor.property'?: string | undefined;
'color.editor.punctuation'?: string | undefined;
'color.editor.definition'?: string | undefined;
'color.editor.builtin'?: string | undefined;
'color.editor.cursor'?: string | undefined;
} | undefined;
'themeConfig.dark'?: {
easing?: string | undefined;
colors?: {
black?: string | undefined;
darkGray?: string | undefined;
gray?: string | undefined;
lightGray?: string | undefined;
white?: string | undefined;
green?: string | undefined;
blue?: string | undefined;
rose?: string | undefined;
cerise?: string | undefined;
red?: string | undefined;
orange?: string | undefined;
yellow?: string | undefined;
lightRed?: string | undefined;
darkPurple?: string | undefined;
primary?: string | undefined;
secondary?: string | undefined;
tertiary?: string | undefined;
bg?: string | undefined;
offBg?: string | undefined;
font?: string | undefined;
offFont?: string | undefined;
border?: string | undefined;
offBorder?: string | undefined;
headerBg?: string | undefined;
} | undefined;
type?: {
fontSize: {
base?: number | undefined;
remBase?: number | undefined;
body?: number | undefined;
bodySmaller?: number | undefined;
};
fontFamily?: {
default?: string | undefined;
} | undefined;
} | undefined;
isSystem?: boolean | undefined;
shadow?: {
color?: string | undefined;
opacity?: number | undefined;
} | undefined;
editor?: {
fontFamily?: {
default?: string | undefined;
} | undefined;
fontSize?: number | undefined;
colors?: {
comment?: string | undefined;
string?: string | undefined;
number?: string | undefined;
variable?: string | undefined;
keyword?: string | undefined;
atom?: string | undefined;
attribute?: string | undefined;
property?: string | undefined;
punctuation?: string | undefined;
definition?: string | undefined;
builtin?: string | undefined;
cursor?: string | undefined;
} | undefined;
} | undefined;
} | {
easing?: string | undefined;
isSystem?: boolean | undefined;
'color.black'?: string | undefined;
'color.darkGray'?: string | undefined;
'color.gray'?: string | undefined;
'color.lightGray'?: string | undefined;
'color.white'?: string | undefined;
'color.green'?: string | undefined;
'color.blue'?: string | undefined;
'color.rose'?: string | undefined;
'color.cerise'?: string | undefined;
'color.red'?: string | undefined;
'color.orange'?: string | undefined;
'color.yellow'?: string | undefined;
'color.lightRed'?: string | undefined;
'color.darkPurple'?: string | undefined;
'color.primary'?: string | undefined;
'color.secondary'?: string | undefined;
'color.tertiary'?: string | undefined;
'color.bg'?: string | undefined;
'color.offBg'?: string | undefined;
'color.font'?: string | undefined;
'color.offFont'?: string | undefined;
'color.border'?: string | undefined;
'color.offBorder'?: string | undefined;
'color.headerBg'?: string | undefined;
'fontSize.base'?: number | undefined;
'fontSize.remBase'?: number | undefined;
'fontSize.body'?: number | undefined;
'fontSize.bodySmaller'?: number | undefined;
'fontSize.code'?: number | undefined;
'fontFamily.default'?: string | undefined;
'fontFamily.code'?: string | undefined;
'shadow.color'?: string | undefined;
'shadow.opacity'?: number | undefined;
'color.editor.comment'?: string | undefined;
'color.editor.string'?: string | undefined;
'color.editor.number'?: string | undefined;
'color.editor.variable'?: string | undefined;
'color.editor.keyword'?: string | undefined;
'color.editor.atom'?: string | undefined;
'color.editor.attribute'?: string | undefined;
'color.editor.property'?: string | undefined;
'color.editor.punctuation'?: string | undefined;
'color.editor.definition'?: string | undefined;
'color.editor.builtin'?: string | undefined;
'color.editor.cursor'?: string | undefined;
} | undefined;
'response.hideExtensions'?: boolean | undefined;
'response.stream.strategy'?: import("../request/schemas").MultiResponseStrategy | undefined;
'editor.shortcuts'?: Record<string, string> | undefined;
'beta.disable.newEditor'?: boolean | undefined;
'beta.disable.newScript'?: boolean | undefined;
'script.allowedCookies'?: string[] | undefined;
'script.allowedLocalStorageKeys'?: string[] | undefined;
enableTablistScrollbar?: boolean | undefined;
'introspection.options.description'?: boolean | undefined;
'introspection.options.specifiedByUrl'?: boolean | undefined;
'introspection.options.directiveIsRepeatable'?: boolean | undefined;
'introspection.options.schemaDescription'?: boolean | undefined;
'introspection.options.inputValueDeprecation'?: boolean | undefined;
} | null | undefined;
preserveState: boolean;
initialWindows: {
initialName?: string | undefined;
endpointURL?: string | undefined;
subscriptionsEndpoint?: string | undefined;
subscriptionsProtocol?: string | undefined;
initialQuery?: string | undefined;
initialVariables?: string | undefined;
initialPreRequestScript?: string | undefined;
initialPostRequestScript?: string | undefined;
initialHeaders?: Record<string, unknown> | undefined;
initialSubscriptionRequestHandlerId?: "http" | "websocket" | "graphql-ws" | "app-sync" | "action-cable" | "graphql-sse" | undefined;
initialSubscriptionsPayload?: Record<string, unknown> | null | undefined;
initialRequestHandlerId?: "http" | "websocket" | "graphql-ws" | "app-sync" | "action-cable" | "graphql-sse" | undefined;
initialRequestHandlerAdditionalParams?: Record<string, unknown> | undefined;
initialHttpMethod?: "POST" | "GET" | "PUT" | "DELETE" | undefined;
initialAuthorization?: {
type: "api-key";
data: {
headerName: string;
headerValue: string;
};
} | {
type: "basic";
data: {
username: string;
password: string;
};
} | {
type: "bearer";
data: {
token: string;
};
} | {
type: "oauth2";
data: {
accessTokenResponse: {
access_token: string;
token_type: string;
state: string;
expires_in?: number | undefined;
refresh_token?: string | undefined;
id_token?: string | undefined;
scope?: string | undefined;
};
};
} | {
type: "none";
data: undefined;
} | undefined;
}[];
persistedSettings?: {
theme?: string | undefined;
'theme.dark'?: string | undefined;
language?: "ach-UG" | "en-US" | "fr-FR" | "es-ES" | "cs-CZ" | "de-DE" | "pt-BR" | "ru-RU" | "uk-UA" | "zh-CN" | "ja-JP" | "sr-SP" | "it-IT" | "pl-PL" | "ko-KR" | "ro-RO" | "vi-VN" | undefined;
addQueryDepthLimit?: number | undefined;
tabSize?: number | undefined;
enableExperimental?: boolean | undefined;
'theme.fontsize'?: number | undefined;
'theme.editorFontFamily'?: string | undefined;
'theme.editorFontSize'?: number | undefined;
disablePushNotification?: boolean | undefined;
'plugin.list'?: string[] | undefined;
'request.withCredentials'?: boolean | undefined;
'schema.reloadOnStart'?: boolean | undefined;
'schema.reload.onEnvChange'?: boolean | undefined;
'alert.disableUpdateNotification'?: boolean | undefined;
'alert.disableWarnings'?: boolean | undefined;
'banners.disable'?: boolean | undefined;
historyDepth?: number | undefined;
disableLineNumbers?: boolean | undefined;
'doc.hideDeprecatedItems'?: boolean | undefined;
themeConfig?: {
easing?: string | undefined;
colors?: {
black?: string | undefined;
darkGray?: string | undefined;
gray?: string | undefined;
lightGray?: string | undefined;
white?: string | undefined;
green?: string | undefined;
blue?: string | undefined;
rose?: string | undefined;
cerise?: string | undefined;
red?: string | undefined;
orange?: string | undefined;
yellow?: string | undefined;
lightRed?: string | undefined;
darkPurple?: string | undefined;
primary?: string | undefined;
secondary?: string | undefined;
tertiary?: string | undefined;
bg?: string | undefined;
offBg?: string | undefined;
font?: string | undefined;
offFont?: string | undefined;
border?: string | undefined;
offBorder?: string | undefined;
headerBg?: string | undefined;
} | undefined;
type?: {
fontSize: {
base?: number | undefined;
remBase?: number | undefined;
body?: number | undefined;
bodySmaller?: number | undefined;
};
fontFamily?: {
default?: string | undefined;
} | undefined;
} | undefined;
isSystem?: boolean | undefined;
shadow?: {
color?: string | undefined;
opacity?: number | undefined;
} | undefined;
editor?: {
fontFamily?: {
default?: string | undefined;
} | undefined;
fontSize?: number | undefined;
colors?: {
comment?: string | undefined;
string?: string | undefined;
number?: string | undefined;
variable?: string | undefined;
keyword?: string | undefined;
atom?: string | undefined;
attribute?: string | undefined;
property?: string | undefined;
punctuation?: string | undefined;
definition?: string | undefined;
builtin?: string | undefined;
cursor?: string | undefined;
} | undefined;
} | undefined;
} | {
easing?: string | undefined;
isSystem?: boolean | undefined;
'color.black'?: string | undefined;
'color.darkGray'?: string | undefined;
'color.gray'?: string | undefined;
'color.lightGray'?: string | undefined;
'color.white'?: string | undefined;
'color.green'?: string | undefined;
'color.blue'?: string | undefined;
'color.rose'?: string | undefined;
'color.cerise'?: string | undefined;
'color.red'?: string | undefined;
'color.orange'?: string | undefined;
'color.yellow'?: string | undefined;
'color.lightRed'?: string | undefined;
'color.darkPurple'?: string | undefined;
'color.primary'?: string | undefined;
'color.secondary'?: string | undefined;
'color.tertiary'?: string | undefined;
'color.bg'?: string | undefined;
'color.offBg'?: string | undefined;
'color.font'?: string | undefined;
'color.offFont'?: string | undefined;
'color.border'?: string | undefined;
'color.offBorder'?: string | undefined;
'color.headerBg'?: string | undefined;
'fontSize.base'?: number | undefined;
'fontSize.remBase'?: number | undefined;
'fontSize.body'?: number | undefined;
'fontSize.bodySmaller'?: number | undefined;
'fontSize.code'?: number | undefined;
'fontFamily.default'?: string | undefined;
'fontFamily.code'?: string | undefined;
'shadow.color'?: string | undefined;
'shadow.opacity'?: number | undefined;
'color.editor.comment'?: string | undefined;
'color.editor.string'?: string | undefined;
'color.editor.number'?: string | undefined;
'color.editor.variable'?: string | undefined;
'color.editor.keyword'?: string | undefined;
'color.editor.atom'?: string | undefined;
'color.editor.attribute'?: string | undefined;
'color.editor.property'?: string | undefined;
'color.editor.punctuation'?: string | undefined;
'color.editor.definition'?: string | undefined;
'color.editor.builtin'?: string | undefined;
'color.editor.cursor'?: string | undefined;
} | undefined;
'themeConfig.dark'?: {
easing?: string | undefined;
colors?: {
black?: string | undefined;
darkGray?: string | undefined;
gray?: string | undefined;
lightGray?: string | undefined;
white?: string | undefined;
green?: string | undefined;
blue?: string | undefined;
rose?: string | undefined;
cerise?: string | undefined;
red?: string | undefined;
orange?: string | undefined;
yellow?: string | undefined;
lightRed?: string | undefined;
darkPurple?: string | undefined;
primary?: string | undefined;
secondary?: string | undefined;
tertiary?: string | undefined;
bg?: string | undefined;
offBg?: string | undefined;
font?: string | undefined;
offFont?: string | undefined;
border?: string | undefined;
offBorder?: string | undefined;
headerBg?: string | undefined;
} | undefined;
type?: {
fontSize: {
base?: number | undefined;
remBase?: number | undefined;
body?: number | undefined;
bodySmaller?: number | undefined;
};
fontFamily?: {
default?: string | undefined;
} | undefined;
} | undefined;
isSystem?: boolean | undefined;
shadow?: {
color?: string | undefined;
opacity?: number | undefined;
} | undefined;
editor?: {
fontFamily?: {
default?: string | undefined;
} | undefined;
fontSize?: number | undefined;
colors?: {
comment?: string | undefined;
string?: string | undefined;
number?: string | undefined;
variable?: string | undefined;
keyword?: string | undefined;
atom?: string | undefined;
attribute?: string | undefined;
property?: string | undefined;
punctuation?: string | undefined;
definition?: string | undefined;
builtin?: string | undefined;
cursor?: string | undefined;
} | undefined;
} | undefined;
} | {
easing?: string | undefined;
isSystem?: boolean | undefined;
'color.black'?: string | undefined;
'color.darkGray'?: string | undefined;
'color.gray'?: string | undefined;
'color.lightGray'?: string | undefined;
'color.white'?: string | undefined;
'color.green'?: string | undefined;
'color.blue'?: string | undefined;
'color.rose'?: string | undefined;
'color.cerise'?: string | undefined;
'color.red'?: string | undefined;
'color.orange'?: string | undefined;
'color.yellow'?: string | undefined;
'color.lightRed'?: string | undefined;
'color.darkPurple'?: string | undefined;
'color.primary'?: string | undefined;
'color.secondary'?: string | undefined;
'color.tertiary'?: string | undefined;
'color.bg'?: string | undefined;
'color.offBg'?: string | undefined;
'color.font'?: string | undefined;
'color.offFont'?: string | undefined;
'color.border'?: string | undefined;
'color.offBorder'?: string | undefined;
'color.headerBg'?: string | undefined;
'fontSize.base'?: number | undefined;
'fontSize.remBase'?: number | undefined;
'fontSize.body'?: number | undefined;
'fontSize.bodySmaller'?: number | undefined;
'fontSize.code'?: number | undefined;
'fontFamily.default'?: string | undefined;
'fontFamily.code'?: string | undefined;
'shadow.color'?: string | undefined;
'shadow.opacity'?: number | undefined;
'color.editor.comment'?: string | undefined;
'color.editor.string'?: string | undefined;
'color.editor.number'?: string | undefined;
'color.editor.variable'?: string | undefined;
'color.editor.keyword'?: string | undefined;
'color.editor.atom'?: string | undefined;
'color.editor.attribute'?: string | undefined;
'color.editor.property'?: string | undefined;
'color.editor.punctuation'?: string | undefined;
'color.editor.definition'?: string | undefined;
'color.editor.builtin'?: string | undefined;
'color.editor.cursor'?: string | undefined;
} | undefined;
'response.hideExtensions'?: boolean | undefined;
'response.stream.strategy'?: import("../request/schemas").MultiResponseStrategy | undefined;
'editor.shortcuts'?: Record<string, string> | undefined;
'beta.disable.newEditor'?: boolean | undefined;
'beta.disable.newScript'?: boolean | undefined;
'script.allowedCookies'?: string[] | undefined;
'script.allowedLocalStorageKeys'?: string[] | undefined;
enableTablistScrollbar?: boolean | undefined;
'introspection.options.description'?: boolean | undefined;
'introspection.options.specifiedByUrl'?: boolean | undefined;
'introspection.options.directiveIsRepeatable'?: boolean | undefined;
'introspection.options.schemaDescription'?: boolean | undefined;
'introspection.options.inputValueDeprecation'?: boolean | undefined;
} | undefined;
disableAccount: boolean;
cspNonce: string;
};
//# sourceMappingURL=options.d.ts.map