mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add mssql.proposed.d.ts (#23394)
* Add mssql.proposed.d.ts * Add proposed ref
This commit is contained in:
40
extensions/mssql/src/mssql.d.ts
vendored
40
extensions/mssql/src/mssql.d.ts
vendored
@@ -3,12 +3,15 @@
|
|||||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
*--------------------------------------------------------------------------------------------*/
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// This is the place for extensions to expose APIs.
|
|
||||||
declare module 'mssql' {
|
declare module 'mssql' {
|
||||||
import * as azdata from 'azdata';
|
import * as azdata from 'azdata';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Covers defining what the mssql extension exports to other extensions
|
* Covers defining what the mssql extension exports to other extensions.
|
||||||
|
*
|
||||||
|
* This file should only contain definitions which rely on STABLE azdata typings
|
||||||
|
* (from azdata.d.ts). Anything which relies on PROPOSED typings (from azdata.proposed.d.ts)
|
||||||
|
* should go in mssql.proposed.d.ts.
|
||||||
*
|
*
|
||||||
* IMPORTANT: THIS IS NOT A HARD DEFINITION unlike vscode; therefore no enums or classes should be defined here
|
* 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)
|
* (const enums get evaluated when typescript -> javascript so those are fine)
|
||||||
@@ -42,22 +45,9 @@ declare module 'mssql' {
|
|||||||
|
|
||||||
readonly sqlProjects: ISqlProjectsService;
|
readonly sqlProjects: ISqlProjectsService;
|
||||||
|
|
||||||
readonly sqlAssessment: ISqlAssessmentService;
|
|
||||||
|
|
||||||
readonly azureBlob: IAzureBlobService;
|
readonly azureBlob: IAzureBlobService;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* A browser supporting actions over the object explorer connections provided by this extension.
|
|
||||||
* Currently this is the
|
|
||||||
*/
|
|
||||||
export interface MssqlObjectExplorerBrowser {
|
|
||||||
/**
|
|
||||||
* Gets the matching node given a context object, e.g. one from a right-click on a node in Object Explorer
|
|
||||||
*/
|
|
||||||
getNode<T extends ITreeNode>(objectExplorerContext: azdata.ObjectExplorerContext): Thenable<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tree node in the object explorer tree
|
* A tree node in the object explorer tree
|
||||||
*/
|
*/
|
||||||
@@ -66,14 +56,6 @@ declare module 'mssql' {
|
|||||||
getChildren(refreshChildren: boolean): ITreeNode[] | Thenable<ITreeNode[]>;
|
getChildren(refreshChildren: boolean): ITreeNode[] | Thenable<ITreeNode[]>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* A HDFS file node. This is a leaf node in the object explorer tree, and its contents
|
|
||||||
* can be queried
|
|
||||||
*/
|
|
||||||
export interface IFileNode extends ITreeNode {
|
|
||||||
getFileContentsAsString(maxBytes?: number): Thenable<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
//#region --- schema compare
|
//#region --- schema compare
|
||||||
export interface SchemaCompareResult extends azdata.ResultStatus {
|
export interface SchemaCompareResult extends azdata.ResultStatus {
|
||||||
operationId: string;
|
operationId: string;
|
||||||
@@ -865,18 +847,6 @@ declare module 'mssql' {
|
|||||||
}
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
/**
|
|
||||||
* Sql Assessment
|
|
||||||
*/
|
|
||||||
|
|
||||||
// SqlAssessment interfaces -----------------------------------------------------------------------
|
|
||||||
|
|
||||||
export interface ISqlAssessmentService {
|
|
||||||
assessmentInvoke(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
|
||||||
getAssessmentItems(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
|
||||||
generateAssessmentScript(items: azdata.SqlAssessmentResultItem[], targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Promise<azdata.ResultStatus>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateSasResponse {
|
export interface CreateSasResponse {
|
||||||
sharedAccessSignature: string;
|
sharedAccessSignature: string;
|
||||||
}
|
}
|
||||||
|
|||||||
33
extensions/mssql/src/mssql.proposed.d.ts
vendored
Normal file
33
extensions/mssql/src/mssql.proposed.d.ts
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*---------------------------------------------------------------------------------------------
|
||||||
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||||
|
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||||
|
*--------------------------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
declare module 'mssql' {
|
||||||
|
import * as azdata from 'azdata';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Covers defining what the mssql extension exports to other extensions.
|
||||||
|
*
|
||||||
|
* This file should only contain definitions which rely on PROPOSED azdata typings
|
||||||
|
* (from azdata.proposed.d.ts). Anything which relies on STABLE typings (from azdata.d.ts)
|
||||||
|
* should go in mssql.d.ts.
|
||||||
|
*
|
||||||
|
* This is to make it easier for extensions that don't need these features to only import the ones
|
||||||
|
* that depend on stable features so they don't have to copy over the proposed typings themselves.
|
||||||
|
*
|
||||||
|
* 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 interface IExtension {
|
||||||
|
readonly sqlAssessment: ISqlAssessmentService;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ISqlAssessmentService {
|
||||||
|
assessmentInvoke(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
||||||
|
getAssessmentItems(ownerUri: string, targetType: azdata.sqlAssessment.SqlAssessmentTargetType): Promise<azdata.SqlAssessmentResult>;
|
||||||
|
generateAssessmentScript(items: azdata.SqlAssessmentResultItem[], targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Promise<azdata.ResultStatus>;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -7,4 +7,5 @@
|
|||||||
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.d.ts'/>
|
||||||
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
/// <reference path='../../../../src/sql/azdata.proposed.d.ts'/>
|
||||||
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
/// <reference path='../../../mssql/src/mssql.d.ts'/>
|
||||||
|
/// <reference path='../../../mssql/src/mssql.proposed.d.ts'/>
|
||||||
/// <reference types='@types/node'/>
|
/// <reference types='@types/node'/>
|
||||||
|
|||||||
Reference in New Issue
Block a user