mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Promote some proposed typings (#22508)
This commit is contained in:
100
src/sql/azdata.d.ts
vendored
100
src/sql/azdata.d.ts
vendored
@@ -11,6 +11,22 @@ declare module 'azdata' {
|
|||||||
*/
|
*/
|
||||||
export const version: string;
|
export const version: string;
|
||||||
|
|
||||||
|
export namespace env {
|
||||||
|
/**
|
||||||
|
* Well-known app quality values
|
||||||
|
*/
|
||||||
|
export enum AppQuality {
|
||||||
|
stable = 'stable',
|
||||||
|
insider = 'insider',
|
||||||
|
dev = 'dev'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The version of Azure Data Studio this is currently running as - such as `stable`, or `insider`
|
||||||
|
*/
|
||||||
|
export const quality: AppQuality | string | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
// EXPORTED NAMESPACES /////////////////////////////////////////////////
|
// EXPORTED NAMESPACES /////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
* Namespace for Data Management Protocol global methods
|
* Namespace for Data Management Protocol global methods
|
||||||
@@ -92,6 +108,37 @@ declare module 'azdata' {
|
|||||||
* Namespace for connection management
|
* Namespace for connection management
|
||||||
*/
|
*/
|
||||||
export namespace connection {
|
export namespace connection {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Well-known Authentication types commonly supported by connection providers.
|
||||||
|
*/
|
||||||
|
export enum AuthenticationType {
|
||||||
|
/**
|
||||||
|
* Username and password
|
||||||
|
*/
|
||||||
|
SqlLogin = 'SqlLogin',
|
||||||
|
/**
|
||||||
|
* Windows Authentication
|
||||||
|
*/
|
||||||
|
Integrated = 'Integrated',
|
||||||
|
/**
|
||||||
|
* Azure Active Directory - Universal with MFA support
|
||||||
|
*/
|
||||||
|
AzureMFA = 'AzureMFA',
|
||||||
|
/**
|
||||||
|
* Azure Active Directory - Password
|
||||||
|
*/
|
||||||
|
AzureMFAAndUser = 'AzureMFAAndUser',
|
||||||
|
/**
|
||||||
|
* Datacenter Security Token Service Authentication
|
||||||
|
*/
|
||||||
|
DSTSAuth = 'dstsAuth',
|
||||||
|
/**
|
||||||
|
* No authentication required
|
||||||
|
*/
|
||||||
|
None = 'None'
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connection profile primary class
|
* Connection profile primary class
|
||||||
*/
|
*/
|
||||||
@@ -103,7 +150,7 @@ declare module 'azdata' {
|
|||||||
databaseName: string;
|
databaseName: string;
|
||||||
userName: string;
|
userName: string;
|
||||||
password: string;
|
password: string;
|
||||||
authenticationType: string;
|
authenticationType: string | AuthenticationType;
|
||||||
savePassword: boolean;
|
savePassword: boolean;
|
||||||
groupFullName: string;
|
groupFullName: string;
|
||||||
groupId: string;
|
groupId: string;
|
||||||
@@ -370,7 +417,10 @@ declare module 'azdata' {
|
|||||||
databaseName?: string | undefined;
|
databaseName?: string | undefined;
|
||||||
userName: string;
|
userName: string;
|
||||||
password: string;
|
password: string;
|
||||||
authenticationType: string;
|
/**
|
||||||
|
* The type of authentication to use when connecting
|
||||||
|
*/
|
||||||
|
authenticationType: string | connection.AuthenticationType;
|
||||||
savePassword: boolean;
|
savePassword: boolean;
|
||||||
groupFullName?: string | undefined;
|
groupFullName?: string | undefined;
|
||||||
groupId?: string | undefined;
|
groupId?: string | undefined;
|
||||||
@@ -2985,6 +3035,11 @@ declare module 'azdata' {
|
|||||||
export interface ContainerBuilder<TComponent extends Component, TLayout, TItemLayout, TPropertyBag extends ContainerProperties> extends ComponentBuilder<TComponent, TPropertyBag> {
|
export interface ContainerBuilder<TComponent extends Component, TLayout, TItemLayout, TPropertyBag extends ContainerProperties> extends ComponentBuilder<TComponent, TPropertyBag> {
|
||||||
withLayout(layout: TLayout): ContainerBuilder<TComponent, TLayout, TItemLayout, TPropertyBag>;
|
withLayout(layout: TLayout): ContainerBuilder<TComponent, TLayout, TItemLayout, TPropertyBag>;
|
||||||
withItems(components: Array<Component>, itemLayout?: TItemLayout): ContainerBuilder<TComponent, TLayout, TItemLayout, TPropertyBag>;
|
withItems(components: Array<Component>, itemLayout?: TItemLayout): ContainerBuilder<TComponent, TLayout, TItemLayout, TPropertyBag>;
|
||||||
|
/**
|
||||||
|
* Sets the initial set of properties for the container being created
|
||||||
|
* @param properties The properties to apply to the container
|
||||||
|
*/
|
||||||
|
withProps(properties: TPropertyBag): ContainerBuilder<TComponent, TLayout, TItemLayout, TPropertyBag>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FlexBuilder extends ContainerBuilder<FlexContainer, FlexLayout, FlexItemLayout, ContainerProperties> {
|
export interface FlexBuilder extends ContainerBuilder<FlexContainer, FlexLayout, FlexItemLayout, ContainerProperties> {
|
||||||
@@ -4166,6 +4221,10 @@ declare module 'azdata' {
|
|||||||
export interface TableComponent extends Component, TableComponentProperties {
|
export interface TableComponent extends Component, TableComponentProperties {
|
||||||
onRowSelected: vscode.Event<any>;
|
onRowSelected: vscode.Event<any>;
|
||||||
onCellAction?: vscode.Event<ICellActionEventArgs> | undefined;
|
onCellAction?: vscode.Event<ICellActionEventArgs> | undefined;
|
||||||
|
/**
|
||||||
|
* Append data to the existing table data.
|
||||||
|
*/
|
||||||
|
appendData(data: any[][]): Thenable<void>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface FileBrowserTreeComponent extends Component, FileBrowserTreeProperties {
|
export interface FileBrowserTreeComponent extends Component, FileBrowserTreeProperties {
|
||||||
@@ -5225,9 +5284,41 @@ declare module 'azdata' {
|
|||||||
| 'executionPlan'
|
| 'executionPlan'
|
||||||
| 'visualize';
|
| 'visualize';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A message sent during the execution of a query
|
||||||
|
*/
|
||||||
|
export interface QueryMessage {
|
||||||
|
/**
|
||||||
|
* The message string
|
||||||
|
*/
|
||||||
|
message: string;
|
||||||
|
/**
|
||||||
|
* Whether this message is an error message or not
|
||||||
|
*/
|
||||||
|
isError: boolean;
|
||||||
|
/**
|
||||||
|
* The timestamp for when this message was sent
|
||||||
|
*/
|
||||||
|
time?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Information about a query that was executed
|
||||||
|
*/
|
||||||
|
export interface QueryInfo {
|
||||||
|
/**
|
||||||
|
* Any messages that have been received from the query provider
|
||||||
|
*/
|
||||||
|
messages: QueryMessage[];
|
||||||
|
/**
|
||||||
|
* The ranges for each batch that has executed so far
|
||||||
|
*/
|
||||||
|
batchRanges: vscode.Range[];
|
||||||
|
}
|
||||||
|
|
||||||
export interface QueryEventListener {
|
export interface QueryEventListener {
|
||||||
/**
|
/**
|
||||||
* A callback that is called whenever a query event occurs
|
* An event that is fired for query events
|
||||||
* @param type The type of query event
|
* @param type The type of query event
|
||||||
* @param document The document this event was sent by
|
* @param document The document this event was sent by
|
||||||
* @param args The extra information for the event, if any
|
* @param args The extra information for the event, if any
|
||||||
@@ -5236,8 +5327,9 @@ declare module 'azdata' {
|
|||||||
* queryStop: undefined
|
* queryStop: undefined
|
||||||
* executionPlan: string (the plan itself)
|
* executionPlan: string (the plan itself)
|
||||||
* visualize: ResultSetSummary (the result set to be visualized)
|
* visualize: ResultSetSummary (the result set to be visualized)
|
||||||
|
* @param queryInfo The information about the query that triggered this event
|
||||||
*/
|
*/
|
||||||
onQueryEvent(type: QueryEventType, document: QueryDocument, args: ResultSetSummary | string | undefined): void;
|
onQueryEvent(type: QueryEventType, document: QueryDocument, args: ResultSetSummary | string | undefined, queryInfo: QueryInfo): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface QueryDocument {
|
export interface QueryDocument {
|
||||||
|
|||||||
111
src/sql/azdata.proposed.d.ts
vendored
111
src/sql/azdata.proposed.d.ts
vendored
@@ -9,22 +9,6 @@ import * as vscode from 'vscode';
|
|||||||
|
|
||||||
declare module 'azdata' {
|
declare module 'azdata' {
|
||||||
|
|
||||||
export namespace env {
|
|
||||||
/**
|
|
||||||
* Well-known app quality values
|
|
||||||
*/
|
|
||||||
export enum AppQuality {
|
|
||||||
stable = 'stable',
|
|
||||||
insider = 'insider',
|
|
||||||
dev = 'dev'
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The version of Azure Data Studio this is currently running as - such as `stable`, or `insider`
|
|
||||||
*/
|
|
||||||
export const quality: AppQuality | string | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
export namespace nb {
|
export namespace nb {
|
||||||
export interface NotebookDocument {
|
export interface NotebookDocument {
|
||||||
/**
|
/**
|
||||||
@@ -423,10 +407,6 @@ declare module 'azdata' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface IConnectionProfile extends ConnectionInfo {
|
export interface IConnectionProfile extends ConnectionInfo {
|
||||||
/**
|
|
||||||
* The type of authentication to use when connecting
|
|
||||||
*/
|
|
||||||
authenticationType: string | connection.AuthenticationType;
|
|
||||||
azureAccount?: string;
|
azureAccount?: string;
|
||||||
azureResourceId?: string;
|
azureResourceId?: string;
|
||||||
azurePortalEndpoint?: string;
|
azurePortalEndpoint?: string;
|
||||||
@@ -521,35 +501,6 @@ declare module 'azdata' {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export namespace connection {
|
export namespace connection {
|
||||||
/**
|
|
||||||
* Well-known Authentication types commonly supported by connection providers.
|
|
||||||
*/
|
|
||||||
export enum AuthenticationType {
|
|
||||||
/**
|
|
||||||
* Username and password
|
|
||||||
*/
|
|
||||||
SqlLogin = 'SqlLogin',
|
|
||||||
/**
|
|
||||||
* Windows Authentication
|
|
||||||
*/
|
|
||||||
Integrated = 'Integrated',
|
|
||||||
/**
|
|
||||||
* Azure Active Directory - Universal with MFA support
|
|
||||||
*/
|
|
||||||
AzureMFA = 'AzureMFA',
|
|
||||||
/**
|
|
||||||
* Azure Active Directory - Password
|
|
||||||
*/
|
|
||||||
AzureMFAAndUser = 'AzureMFAAndUser',
|
|
||||||
/**
|
|
||||||
* Datacenter Security Token Service Authentication
|
|
||||||
*/
|
|
||||||
DSTSAuth = 'dstsAuth',
|
|
||||||
/**
|
|
||||||
* No authentication required
|
|
||||||
*/
|
|
||||||
None = 'None'
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens the change password dialog.
|
* Opens the change password dialog.
|
||||||
@@ -728,13 +679,6 @@ declare module 'azdata' {
|
|||||||
headerFilter?: boolean,
|
headerFilter?: boolean,
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TableComponent {
|
|
||||||
/**
|
|
||||||
* Append data to an existing table data.
|
|
||||||
*/
|
|
||||||
appendData(data: any[][]): Thenable<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ListViewOption {
|
export interface ListViewOption {
|
||||||
/**
|
/**
|
||||||
* The optional accessibility label for the column. Default is the label for the list view option.
|
* The optional accessibility label for the column. Default is the label for the list view option.
|
||||||
@@ -1819,67 +1763,12 @@ declare module 'azdata' {
|
|||||||
*/
|
*/
|
||||||
export type AriaLiveValue = 'polite' | 'assertive' | 'off';
|
export type AriaLiveValue = 'polite' | 'assertive' | 'off';
|
||||||
|
|
||||||
export interface ContainerBuilder<TComponent extends Component, TLayout, TItemLayout, TPropertyBag extends ContainerProperties> extends ComponentBuilder<TComponent, TPropertyBag> {
|
|
||||||
/**
|
|
||||||
* Sets the initial set of properties for the container being created
|
|
||||||
* @param properties The properties to apply to the container
|
|
||||||
*/
|
|
||||||
withProps(properties: TPropertyBag): ContainerBuilder<TComponent, TLayout, TItemLayout, TPropertyBag>;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ContainerProperties extends ComponentProperties {
|
export interface ContainerProperties extends ComponentProperties {
|
||||||
/**
|
/**
|
||||||
* Corresponds to the aria-live accessibility attribute for this component
|
* Corresponds to the aria-live accessibility attribute for this component
|
||||||
*/
|
*/
|
||||||
ariaLive?: AriaLiveValue
|
ariaLive?: AriaLiveValue
|
||||||
}
|
}
|
||||||
export namespace queryeditor {
|
|
||||||
|
|
||||||
export interface QueryMessage {
|
|
||||||
/**
|
|
||||||
* The message string
|
|
||||||
*/
|
|
||||||
message: string;
|
|
||||||
/**
|
|
||||||
* Whether this message is an error message or not
|
|
||||||
*/
|
|
||||||
isError: boolean;
|
|
||||||
/**
|
|
||||||
* The timestamp for when this message was sent
|
|
||||||
*/
|
|
||||||
time?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Information about a query that was executed
|
|
||||||
*/
|
|
||||||
export interface QueryInfo {
|
|
||||||
/**
|
|
||||||
* Any messages that have been received from the query provider
|
|
||||||
*/
|
|
||||||
messages: QueryMessage[];
|
|
||||||
/**
|
|
||||||
* The ranges for each batch that has executed so far
|
|
||||||
*/
|
|
||||||
batchRanges: vscode.Range[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface QueryEventListener {
|
|
||||||
/**
|
|
||||||
* An event that is fired for query events
|
|
||||||
* @param type The type of query event
|
|
||||||
* @param document The document this event was sent by
|
|
||||||
* @param args The extra information for the event, if any
|
|
||||||
* The args sent depend on the type of event :
|
|
||||||
* queryStart: undefined
|
|
||||||
* queryStop: undefined
|
|
||||||
* executionPlan: string (the plan itself)
|
|
||||||
* visualize: ResultSetSummary (the result set to be visualized)
|
|
||||||
* @param queryInfo The information about the query that triggered this event
|
|
||||||
*/
|
|
||||||
onQueryEvent(type: QueryEventType, document: QueryDocument, args: ResultSetSummary | string | undefined, queryInfo: QueryInfo): void;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeInfo {
|
export interface NodeInfo {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user