defining arc api (#12153)

* defining arcApi

* pr feedback

* activate arc extension in test

* skip failing test temporarily

* remove arcService test file
This commit is contained in:
Arvind Ranasaria
2020-09-05 10:09:15 -07:00
committed by GitHub
parent 3d7d1b23cb
commit c5d0c6f623
22 changed files with 137 additions and 75 deletions

41
extensions/arc/src/typings/arc.d.ts vendored Normal file
View File

@@ -0,0 +1,41 @@
/*---------------------------------------------------------------------------------------------
* 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 IExtension {
getRegisteredDataControllers(): Promise<ControllerInfo[]>;
}
}