mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-29 09:35:38 -05:00
Promote some Azure account API typings (#20615)
This commit is contained in:
35
src/sql/azdata.d.ts
vendored
35
src/sql/azdata.d.ts
vendored
@@ -2341,6 +2341,11 @@ declare module 'azdata' {
|
||||
* What type of token this is (such as Bearer)
|
||||
*/
|
||||
tokenType?: string | undefined;
|
||||
|
||||
/**
|
||||
* Access token expiry timestamp
|
||||
*/
|
||||
expiresOn?: number | undefined
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2373,7 +2378,7 @@ declare module 'azdata' {
|
||||
accountType: string;
|
||||
|
||||
/**
|
||||
* A display name that identifies the account, such as "User Name".
|
||||
* A display name that identifies the account, such as "User Name". Will include the e-mail address if available.
|
||||
*/
|
||||
displayName: string;
|
||||
|
||||
@@ -2381,6 +2386,14 @@ declare module 'azdata' {
|
||||
* Unique user id that identifies the account.
|
||||
*/
|
||||
userId: string;
|
||||
/**
|
||||
* The e-mail address associated with this account
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* A display name that identifies the account, such as "User Name".
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2401,6 +2414,11 @@ declare module 'azdata' {
|
||||
* Identifier for the account, unique to the provider
|
||||
*/
|
||||
accountId: string;
|
||||
|
||||
/**
|
||||
* A version string for an account
|
||||
*/
|
||||
accountVersion?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2426,6 +2444,11 @@ declare module 'azdata' {
|
||||
* Indicates if the account needs refreshing
|
||||
*/
|
||||
isStale: boolean;
|
||||
|
||||
/**
|
||||
* Specifies if an account should be deleted
|
||||
*/
|
||||
delete?: boolean;
|
||||
}
|
||||
|
||||
export enum AzureResource {
|
||||
@@ -2540,10 +2563,18 @@ declare module 'azdata' {
|
||||
* @param account The account to generate a security token for
|
||||
* @param resource The resource to get the token for
|
||||
* @return Promise to return a security token object
|
||||
* @deprecated use getAccountSecurityToken
|
||||
* @deprecated use {@link AccountProvider.getAccountSecurityToken}
|
||||
*/
|
||||
getSecurityToken(account: Account, resource: AzureResource): Thenable<{} | undefined>;
|
||||
|
||||
/**
|
||||
* Generates a security token for the provided account and tenant
|
||||
* @param account The account to generate a security token for
|
||||
* @param resource The resource to get the token for
|
||||
* @return Promise to return a security token object
|
||||
*/
|
||||
getAccountSecurityToken(account: Account, tenant: string, resource: AzureResource): Thenable<accounts.AccountSecurityToken | undefined>;
|
||||
|
||||
/**
|
||||
* Prompts the user to enter account information.
|
||||
* Returns an error if the user canceled the operation.
|
||||
|
||||
38
src/sql/azdata.proposed.d.ts
vendored
38
src/sql/azdata.proposed.d.ts
vendored
@@ -477,35 +477,6 @@ declare module 'azdata' {
|
||||
type?: ExtensionNodeType;
|
||||
}
|
||||
|
||||
export interface AccountDisplayInfo {
|
||||
email?: string;
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export interface AccountProvider {
|
||||
/**
|
||||
* Generates a security token for the provided account and tenant
|
||||
* @param account The account to generate a security token for
|
||||
* @param resource The resource to get the token for
|
||||
* @return Promise to return a security token object
|
||||
*/
|
||||
getAccountSecurityToken(account: Account, tenant: string, resource: AzureResource): Thenable<accounts.AccountSecurityToken | undefined>;
|
||||
}
|
||||
|
||||
export interface AccountKey {
|
||||
/**
|
||||
* A version string for an account
|
||||
*/
|
||||
accountVersion?: string;
|
||||
}
|
||||
|
||||
export interface Account {
|
||||
/**
|
||||
* Specifies if an account should be deleted
|
||||
*/
|
||||
delete?: boolean;
|
||||
}
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
* Creates and enters a workspace at the specified location
|
||||
@@ -671,15 +642,6 @@ declare module 'azdata' {
|
||||
connectionUriChanged(newUri: string, oldUri: string): Thenable<void>;
|
||||
}
|
||||
|
||||
export namespace accounts {
|
||||
export interface AccountSecurityToken {
|
||||
/**
|
||||
* Access token expiry timestamp
|
||||
*/
|
||||
expiresOn?: number
|
||||
}
|
||||
}
|
||||
|
||||
export enum DataProviderType {
|
||||
TableDesignerProvider = 'TableDesignerProvider',
|
||||
ExecutionPlanProvider = 'ExecutionPlanProvider'
|
||||
|
||||
Reference in New Issue
Block a user