// Generated by dts-bundle-generator v6.12.0 export function getAltairHtml(): string; export type IDictionary = Record; declare const SUBSCRIPTION_PROVIDER_IDS: { readonly WEBSOCKET: "websocket"; readonly GRAPHQL_WS: "graphql-ws"; readonly APP_SYNC: "app-sync"; readonly ACTION_CABLE: "action-cable"; readonly GRAPHQL_SSE: "graphql-sse"; }; export type SubscriptionProviderIds = typeof SUBSCRIPTION_PROVIDER_IDS[keyof typeof SUBSCRIPTION_PROVIDER_IDS]; export interface InitialEnvironmentState { id?: string; title?: string; variables?: IDictionary; } export interface IInitialEnvironments { base?: InitialEnvironmentState; subEnvironments?: InitialEnvironmentState[]; } declare const HTTP_VERBS: readonly [ "POST", "GET", "PUT", "DELETE" ]; export type HttpVerb = (typeof HTTP_VERBS)[number]; declare const theme: { easing: string; colors: { black: string; darkGray: string; gray: string; lightGray: string; white: string; green: string; blue: string; rose: string; cerise: string; red: string; orange: string; yellow: string; lightRed: string; darkPurple: string; }; type: { fontSize: { base: number; remBase: number; body: number; bodySmaller: number; }; fontFamily: { default: string; }; }; } & { isSystem: boolean; colors: { primary: string; secondary: string; tertiary: string; bg: string; offBg: string; font: string; offFont: string; border: string; offBorder: string; headerBg: string; }; shadow: { color: string; opacity: number; }; editor: { fontFamily: { default: string; }; fontSize: number; colors: { comment: string; string: string; number: string; variable: string; keyword: string; atom: string; attribute: string; property: string; punctuation: string; definition: string; builtin: string; cursor: string; }; }; }; export type RecursivePartial = { [P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial[] : T[P] extends object ? RecursivePartial : T[P]; }; export type ITheme = typeof theme; export type ICustomTheme = RecursivePartial; declare const config: AltairConfig; export type SettingsLanguage = keyof typeof config.languages; export interface SettingsState { /** * Theme */ theme: string; /** * Theme for dark mode */ "theme.dark"?: string; /** * Set language */ language: SettingsLanguage; /** * 'Add query' functionality depth */ addQueryDepthLimit: number; /** * Editor tab size */ tabSize: number; /** * Enable experimental features. * Note: Might be unstable */ enableExperimental?: boolean; /** * Base Font Size * (Default - 24) */ "theme.fontsize"?: number; /** * Editor Font Family */ "theme.editorFontFamily"?: string; /** * Editor Font Size */ "theme.editorFontSize"?: number; /** * Disable push notifications */ disablePushNotification?: boolean; /** * Enabled plugins */ "plugin.list"?: string[]; /** * Send requests with credentials (cookies) */ "request.withCredentials"?: boolean; /** * Reload schema on app start */ "schema.reloadOnStart"?: boolean; /** * Disable update notification */ "alert.disableUpdateNotification"?: boolean; /** * Disable warning alerts */ "alert.disableWarnings"?: boolean; /** * Number of items allowed in history pane */ historyDepth?: number; /** * Disable line numbers */ disableLineNumbers?: boolean; /** * Theme config object */ themeConfig?: ICustomTheme; /** * Theme config object for dark mode */ "themeConfig.dark"?: ICustomTheme; /** * Hides extensions object */ "response.hideExtensions"?: boolean; /** * Contains shortcut to action mapping */ "editor.shortcuts"?: Record; /** * Disable new editor beta */ "beta.disable.newEditor"?: boolean; /** * Disable new script beta */ "beta.disable.newScript"?: boolean; /** * List of cookies to be accessible in the pre-request script * @example ['cookie1', 'cookie2'] * @default [] */ "script.allowedCookies"?: string[]; /** * Enable the scrollbar in the tab list */ enableTablistScrollbar?: boolean; } export interface AltairWindowOptions { /** * Initial name of the window */ initialName?: string; /** * URL to set as the server endpoint */ endpointURL?: string; /** * URL to set as the subscription endpoint. This can be relative or absolute. */ subscriptionsEndpoint?: string; /** * URL protocol for the subscription endpoint. This is used if the specified subscriptions endpoint is relative. * e.g. wss */ subscriptionsProtocol?: string; /** * Initial query to be added */ initialQuery?: string; /** * Initial variables to be added */ initialVariables?: string; /** * Initial pre-request script to be added */ initialPreRequestScript?: string; /** * Initial post-request script to be added */ initialPostRequestScript?: string; /** * Initial headers object to be added * @example * { * 'X-GraphQL-Token': 'asd7-237s-2bdk-nsdk4' * } */ initialHeaders?: IDictionary; /** * Initial subscriptions provider * * @default "websocket" */ initialSubscriptionsProvider?: SubscriptionProviderIds; /** * Initial subscriptions connection params */ initialSubscriptionsPayload?: IDictionary; /** * HTTP method to use for making requests */ initialHttpMethod?: HttpVerb; } export interface AltairConfigOptions extends AltairWindowOptions { /** * Initial Environments to be added * @example * { * base: { * title: 'Environment', * variables: {} * }, * subEnvironments: [ * { * title: 'sub-1', * variables: {} * } * ] * } */ initialEnvironments?: IInitialEnvironments; /** * Namespace for storing the data for the altair instance. * Use this when you have multiple altair instances running on the same domain. * @example * instanceStorageNamespace: 'altair_dev_' */ instanceStorageNamespace?: string; /** * Initial app settings to use */ initialSettings?: Partial; /** * Indicates if the state should be preserved for subsequent app loads * * @default true */ preserveState?: boolean; /** * List of options for windows to be loaded */ initialWindows?: AltairWindowOptions[]; /** * Persisted settings for the app. The settings will be merged with the app settings. */ persistedSettings?: Partial; /** * Disable the account and remote syncing functionality */ disableAccount?: boolean; } declare class AltairConfig { donation: { url: string; action_count_threshold: number; }; ga: string; add_query_depth_limit: number; tab_size: number; max_windows: number; default_language: string; languages: { "en-US": string; "fr-FR": string; "es-ES": string; "cs-CZ": string; "de-DE": string; "pt-BR": string; "ru-RU": string; "uk-UA": string; "zh-CN": string; "ja-JP": string; "sr-SP": string; "it-IT": string; "pl-PL": string; "ko-KR": string; "ro-RO": string; "vi-VN": string; }; query_history_depth: number; disableLineNumbers: boolean; defaultTheme: string; themes: string[]; isTranslateMode: any; isWebApp: any; initialData: { url: string; subscriptionsEndpoint: string; subscriptionsProtocol: string; query: string; variables: string; headers: IDictionary; environments: IInitialEnvironments; preRequestScript: string; postRequestScript: string; instanceStorageNamespace: string; settings: Partial | undefined; persistedSettings: Partial | undefined; initialSubscriptionsProvider: SubscriptionProviderIds | undefined; initialSubscriptionsPayload: IDictionary; initialHttpMethod: "POST" | "GET" | "PUT" | "DELETE"; preserveState: boolean; windows: AltairWindowOptions[]; disableAccount: boolean; }; constructor({ endpointURL, subscriptionsEndpoint, subscriptionsProtocol, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript, instanceStorageNamespace, initialSettings, persistedSettings, initialSubscriptionsProvider, initialSubscriptionsPayload, initialHttpMethod, preserveState, initialWindows, disableAccount, }?: AltairConfigOptions); } /** * Returns the path to Altair assets, for resolving the assets when rendering Altair */ export declare const getDistDirectory: () => string; export interface RenderOptions extends AltairConfigOptions { /** * URL to be used as a base for relative URLs */ baseURL?: string; /** * Whether to render the initial options in a seperate javascript file or not. * Use this to be able to enforce strict CSP rules. * @default false */ serveInitialOptionsInSeperateRequest?: boolean; } /** * Render Altair Initial options as a string using the provided renderOptions * @param renderOptions */ export declare const renderInitialOptions: (options?: RenderOptions) => string; /** * Render Altair as a string using the provided renderOptions * @param renderOptions */ export declare const renderAltair: (options?: RenderOptions) => string; export { renderAltair as default, }; export {};