mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 09:35:36 -05:00
Public api changes to namespace accounts & connection. (#2383)
* 1.Added following functions to namespace accounts
function getAllAccounts(): Thenable<AccountWithProviderHandle[]>;
function getSecurityToken(account: AccountWithProviderHandle): Thenable<{}>;
2.Added class AccountWithProviderHandle as the wrapper for Account
3.Changed function openConnectionDialog of namespace connection to allow connection dialog initialized with specified parameters, i.e., server name, database name, etc.
function openConnectionDialog(provider?: string[], initialConnectionProfile?: IConnectionProfile): Thenable<connection.Connection>;
* Added unit tests for ExtHostAccountManagement.$getAllAccounts
This commit is contained in:
28
src/sql/sqlops.d.ts
vendored
28
src/sql/sqlops.d.ts
vendored
@@ -1848,6 +1848,19 @@ declare module 'sqlops' {
|
||||
* @param {Account} updatedAccount Account object with updated properties
|
||||
*/
|
||||
export function accountUpdated(updatedAccount: Account): void;
|
||||
|
||||
/**
|
||||
* Gets all added accounts.
|
||||
* @returns {Thenable<Account>} Promise to return the accounts
|
||||
*/
|
||||
export function getAllAccounts(): Thenable<AccountWithProviderHandle[]>;
|
||||
|
||||
/**
|
||||
* Generates a security token by asking the account's provider
|
||||
* @param {Account} account Account to generate security token for
|
||||
* @return {Thenable<{}>} Promise to return the security token
|
||||
*/
|
||||
export function getSecurityToken(account: AccountWithProviderHandle): Thenable<{}>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1915,6 +1928,21 @@ declare module 'sqlops' {
|
||||
isStale: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents an account with account provider's handle
|
||||
*/
|
||||
export interface AccountWithProviderHandle {
|
||||
/**
|
||||
* Account
|
||||
*/
|
||||
account: Account;
|
||||
|
||||
/**
|
||||
* Account's provider handle
|
||||
*/
|
||||
providerHandle: number;
|
||||
}
|
||||
|
||||
// - ACCOUNT PROVIDER //////////////////////////////////////////////////
|
||||
/**
|
||||
* Error to be used when the user has cancelled the prompt or refresh methods. When
|
||||
|
||||
Reference in New Issue
Block a user