declare namespace MsftSme {
    interface MsftSmeInit {
        entryPointType?: string;
        entryPointName?: string;
        mode: number;
        moduleName?: string;
        moduleVersion?: string;
        shellOrigin?: string;
        isProduction?: boolean;
        sessionId?: string;
        logLevel?: number;
        powerShellModuleName?: string;
        websocket?: boolean;
        sshWebsocket?: boolean;
        powerShellEndpoint?: string;
        powerShellPrefix?: string;
        sessionExpiration: number;
        performanceProfile: boolean;
        experiments?: string[];
        developerGuide: boolean;
        connectivityLevel: string;
        isShell: boolean;
        shellVersion: string;
        gatewayApiVersion: string;
        gatewayPlatform: string;
    }
    interface MsftSmeEnvironment {
        name: string;
        displayName: string;
        origin: string;
        signature: string;
        shell: {
            name: string;
            origin: string;
        };
        resources: any[];
        entryPoints: any[];
        modules: any[];
        configuration: EnvironmentConfiguration;
        version: string;
        loadPath?: string;
        gatewayApiVersion: string;
        gatewayPlatform: string;
    }
    interface MsftSmeAssets {
        css: string[];
        cssV2: string[];
        js: string[];
    }
    interface MsftSmeExternalLibraries {
        monaco: {
            '0.17.1': string;
            '0.36.1': string;
        };
        jsll: {
            '4.2.18': string;
        };
    }
    /**
     * Defines a mapping of an assets versions to its relative module paths
     */
    interface MsftSmeVersionedAsset extends MsftSme.StringMap<string> {
    }
    /**
     * Defines a mapping of an asset name to its versioned paths
     */
    interface MsftSmeModuleAssets extends MsftSme.StringMap<MsftSmeVersionedAsset> {
    }
    /**
     * Defines a mapping of an modules names to its shared asset collection
     */
    interface MsftSmeSharedAssets extends MsftSme.StringMap<MsftSmeModuleAssets> {
    }
    interface MsftSmeResources {
        localeId: string;
        localeRegionalId: string;
        strings: any;
        theme: string;
        assets: MsftSmeAssets;
        moduleAssets: MsftSmeSharedAssets;
        accessibilityMode: boolean;
        lib: MsftSmeExternalLibraries;
    }
    interface EnvironmentConfiguration {
        gateway?: {
            disabled?: boolean;
        };
        signOn?: {
            signedHttpRequestToken?: {
                jwt: string;
                username: string;
            };
        };
        application?: {
            theme?: 'light' | 'dark';
            locale?: string;
        };
        nodes?: {
            defaultCredentials?: {
                username: string;
                password: string;
                encryptedWith?: 'jwk' | string;
            };
        };
        notifications?: {
            redirectToHostWindow?: boolean;
        };
        tools?: {
            hide?: boolean;
        };
        connections?: {
            type?: 'standard' | 'server' | 'cluster';
            name?: string;
            nodeFqdns?: string[];
            header?: {
                hide?: boolean;
            };
        };
        telemetry?: {
            sourceLibraryCdnLink?: string;
            sourceLibraryCdnIntegrityHash?: string;
        };
        extensionsAutoUpdate?: {
            enable?: boolean;
            showAlert?: boolean;
        };
        gatewayAutoUpdate?: {
            enable?: boolean;
        };
        whatsNew?: {
            showDialog?: boolean;
        };
        appBar?: {
            hide?: boolean;
            title?: {
                hide?: boolean;
                value?: string;
                disableNavigation?: boolean;
            };
            solution?: {
                default?: string;
                hide: boolean;
                hideDropdown: boolean;
            };
            navigation?: {
                allowHistory: boolean;
                allowRefresh: boolean;
                allowUrlInput: boolean;
                allowHome: boolean;
            };
            urlField?: {
                hideSolutionUrl: boolean;
            };
            rightMenu?: {
                showScripts: boolean;
                showSettings: boolean;
                showAbout: boolean;
                showWindowControls: boolean;
                showShareLink: boolean;
            };
            aboutDialog?: {
                showFeedback: boolean;
                feedbackLink: string;
                showDocumentation: boolean;
                documentationLink: string;
                releaseNotesLink: string;
                seeMoreReleaseDetailsLink: string;
                showLicense: boolean;
                showScriptsUseRights: boolean;
                showLicenseExtensions: boolean;
                showPrivacyStatement: boolean;
                privacyLink: string;
                showSupportPolicy: boolean;
                supportLink: string;
                showThirdPartyNotice: boolean;
                showShortcuts: boolean;
                openLinkWithoutHref: boolean;
                showAccessibilityCompliance: boolean;
                accessibilityComplianceLink: string;
                extensionLicenseLink: string;
                eulaLicenseLink: string;
            };
            overview?: {
                gatewayStatusUpdateLink: string;
                updateLearnMoreLink: string;
            };
        };
        settings?: {
            account?: {
                show: boolean;
            };
            personalization?: {
                show: boolean;
            };
            diagnostic?: {
                show: boolean;
            };
            language?: {
                show: boolean;
            };
            notification?: {
                show: boolean;
            };
            extension?: {
                show: boolean;
            };
            azure?: {
                show: boolean;
            };
            access?: {
                show: boolean;
            };
            sharedConnections?: {
                show: boolean;
            };
            connectivity?: {
                show: boolean;
            };
            general?: {
                show: boolean;
            };
            updates?: {
                show: boolean;
            };
            extensionUpdates?: {
                show: boolean;
            };
            performance?: {
                show: boolean;
            };
            advanced?: {
                show: boolean;
            };
            proxy?: {
                show: boolean;
            };
        };
    }
    /**
     * Electron Renderer
     * @see http://electron.atom.io/docs/api/ipc-renderer
     */
    interface MsftSmeElectronIpcRenderer {
        on(channel: string, listener: Function): this;
        once(channel: string, listener: Function): this;
        removeAllListeners(channel: string): this;
        removeListener(channel: string, listener: Function): this;
        send(channel: string, ...args: any[]): void;
        sendSync(channel: string, ...args: any[]): any;
        sendTo(webContentsId: number, channel: string, ...args: any[]): void;
        sendToHost(channel: string, ...args: any[]): void;
    }
    /**
     * Electron Remote
     * @see http://electron.atom.io/docs/api/remote
     */
    interface MsftSmeElectronRemote {
        getCurrentWindow(): {
            close(): void;
            minimize(): void;
            maximize(): void;
            unmaximize(): void;
            isMaximized(): boolean;
        };
    }
    interface MsftSmeElectron {
        ipcRenderer: MsftSmeElectronIpcRenderer;
        remote: MsftSmeElectronRemote;
    }
    interface MsftSmeHost {
        isElectron: boolean;
        isWeb: boolean;
        electron?: MsftSmeElectron;
    }
    interface MsftSmeWindowContext {
        Init: MsftSmeInit;
        Environment: MsftSmeEnvironment;
        Resources: MsftSmeResources;
        Host: MsftSmeHost;
    }
    interface SMEWindow extends Window {
        MsftSme: MsftSmeWindowContext;
    }
    interface MessageEventListener extends EventListener {
        (evt: MessageEvent): void;
    }
    interface Element {
        focus(): void;
    }
    interface StringMap<T> {
        [key: string]: T;
    }
    interface NumberMap<T> {
        [key: number]: T;
        length?: number;
    }
    interface NameValue<N, T> {
        name: N;
        value: T;
    }
    type Action = () => void;
    type Action1<T> = (arg: T) => void;
    type Action2<T1, T2> = (arg1: T1, arg2: T2) => void;
    type Action3<T1, T2, T3> = (arg1: T1, arg2: T2, arg3: T3) => void;
    type Func<R> = () => R;
    type Func1<T, R> = (arg: T) => R;
    type Func2<T1, T2, R> = (arg1: T1, arg2: T2) => R;
    type Primitive = number | string | Date | boolean;
    interface StringMapPrimitive extends StringMap<StringMapRecursive | Primitive | Array<Primitive | StringMapRecursive>> {
    }
    type StringMapRecursive = StringMapPrimitive;
    interface Obsolete {
    }
    interface CollatorOptions extends Intl.CollatorOptions {
    }
    interface Map<K, V> {
        delete(key: K): boolean;
        get(key: K): V;
        has(key: K): boolean;
        set(key: K, value: V): void;
        clear(): void;
        forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
    }
    interface RandomSource {
        getRandomValues(array: ArrayBufferView): ArrayBufferView;
    }
}
