mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 09:35:41 -05:00
* saving first draft * throw if no controllers * cleanup * bug fixes * bug fixes and caching controller access * pr comments and bug fixes. * fixes * fixes * comment fix * remove debug prints * comment fixes * remove debug logs * inputValueTransformer returns string|Promise * PR feedback * pr fixes * remove _ from protected fields * anonymous to full methods * small fixes
48 lines
1.5 KiB
TypeScript
48 lines
1.5 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
declare module 'arc' {
|
|
import * as vscode from 'vscode';
|
|
|
|
/**
|
|
* Covers defining what the arc extension exports to other extensions
|
|
*
|
|
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
|
* (const enums get evaluated when typescript -> javascript so those are fine)
|
|
*/
|
|
export const enum extension {
|
|
name = 'Microsoft.arc'
|
|
}
|
|
export const enum ResourceType {
|
|
dataControllers = 'dataControllers',
|
|
postgresInstances = 'postgresInstances',
|
|
sqlManagedInstances = 'sqlManagedInstances'
|
|
}
|
|
|
|
export type ResourceInfo = {
|
|
name: string,
|
|
resourceType: ResourceType | string,
|
|
connectionId?: string
|
|
};
|
|
|
|
export type ControllerInfo = {
|
|
id: string,
|
|
url: string,
|
|
name: string,
|
|
username: string,
|
|
rememberPassword: boolean,
|
|
resources: ResourceInfo[]
|
|
};
|
|
|
|
export interface DataController {
|
|
label: string,
|
|
info: ControllerInfo
|
|
}
|
|
export interface IExtension {
|
|
getRegisteredDataControllers(): Promise<DataController[]>;
|
|
getControllerPassword(controllerInfo: ControllerInfo): Promise<string>;
|
|
reacquireControllerPassword(controllerInfo: ControllerInfo, password: string, retryCount?: number): Promise<string>;
|
|
}
|
|
}
|