mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
use azurecore and azureresource as typings (#11892)
* use azurecore and azureresource as typings * Remove unrelated file
This commit is contained in:
139
extensions/azurecore/src/azurecore.d.ts
vendored
139
extensions/azurecore/src/azurecore.d.ts
vendored
@@ -3,75 +3,76 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
import { azureResource } from './azureResource/azure-resource';
|
||||
|
||||
/**
|
||||
* Covers defining what the azurecore 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.azurecore'
|
||||
}
|
||||
|
||||
/**
|
||||
* Enumeration of the Azure datacenter regions. See https://docs.microsoft.com/dotnet/api/microsoft.azure.management.resourcemanager.fluent.core.region
|
||||
*/
|
||||
export const enum AzureRegion {
|
||||
australiacentral = 'australiacentral',
|
||||
australiacentral2 = 'australiacentral2',
|
||||
australiaeast = 'australiaeast',
|
||||
australiasoutheast = 'australiasoutheast',
|
||||
brazilsouth = 'brazilsouth',
|
||||
canadacentral = 'canadacentral',
|
||||
canadaeast = 'canadaeast',
|
||||
centralindia = 'centralindia',
|
||||
centralus = 'centralus',
|
||||
eastasia = 'eastasia',
|
||||
eastus = 'eastus',
|
||||
eastus2 = 'eastus2',
|
||||
francecentral = 'francecentral',
|
||||
francesouth = 'francesouth',
|
||||
germanynorth = 'germanynorth',
|
||||
germanywestcentral = 'germanywestcentral',
|
||||
japaneast = 'japaneast',
|
||||
japanwest = 'japanwest',
|
||||
koreacentral = 'koreacentral',
|
||||
koreasouth = 'koreasouth',
|
||||
northcentralus = 'northcentralus',
|
||||
northeurope = 'northeurope',
|
||||
norwayeast = 'norwayeast',
|
||||
norwaywest = 'norwaywest',
|
||||
southafricanorth = 'southafricanorth',
|
||||
southafricawest = 'southafricawest',
|
||||
southcentralus = 'southcentralus',
|
||||
southeastasia = 'southeastasia',
|
||||
southindia = 'southindia',
|
||||
switzerlandnorth = 'switzerlandnorth',
|
||||
switzerlandwest = 'switzerlandwest',
|
||||
uaecentral = 'uaecentral',
|
||||
uaenorth = 'uaenorth',
|
||||
uksouth = 'uksouth',
|
||||
ukwest = 'ukwest',
|
||||
westcentralus = 'westcentralus',
|
||||
westeurope = 'westeurope',
|
||||
westindia = 'westindia',
|
||||
westus = 'westus',
|
||||
westus2 = 'westus2',
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
getSubscriptions(account?: azdata.Account, ignoreErrors?: boolean): Thenable<GetSubscriptionsResult>;
|
||||
getResourceGroups(account?: azdata.Account, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Thenable<GetResourceGroupsResult>;
|
||||
declare module 'azurecore' {
|
||||
import * as azdata from 'azdata';
|
||||
import { azureResource } from 'azureResource';
|
||||
/**
|
||||
* Converts a region value (@see AzureRegion) into the localized Display Name
|
||||
* @param region The region value
|
||||
* Covers defining what the azurecore 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)
|
||||
*/
|
||||
getRegionDisplayName(region?: string): string;
|
||||
provideResources(): azureResource.IAzureResourceProvider[];
|
||||
}
|
||||
export const enum extension {
|
||||
name = 'Microsoft.azurecore'
|
||||
}
|
||||
|
||||
export type GetSubscriptionsResult = { subscriptions: azureResource.AzureResourceSubscription[], errors: Error[] };
|
||||
export type GetResourceGroupsResult = { resourceGroups: azureResource.AzureResourceResourceGroup[], errors: Error[] };
|
||||
/**
|
||||
* Enumeration of the Azure datacenter regions. See https://docs.microsoft.com/dotnet/api/microsoft.azure.management.resourcemanager.fluent.core.region
|
||||
*/
|
||||
export const enum AzureRegion {
|
||||
australiacentral = 'australiacentral',
|
||||
australiacentral2 = 'australiacentral2',
|
||||
australiaeast = 'australiaeast',
|
||||
australiasoutheast = 'australiasoutheast',
|
||||
brazilsouth = 'brazilsouth',
|
||||
canadacentral = 'canadacentral',
|
||||
canadaeast = 'canadaeast',
|
||||
centralindia = 'centralindia',
|
||||
centralus = 'centralus',
|
||||
eastasia = 'eastasia',
|
||||
eastus = 'eastus',
|
||||
eastus2 = 'eastus2',
|
||||
francecentral = 'francecentral',
|
||||
francesouth = 'francesouth',
|
||||
germanynorth = 'germanynorth',
|
||||
germanywestcentral = 'germanywestcentral',
|
||||
japaneast = 'japaneast',
|
||||
japanwest = 'japanwest',
|
||||
koreacentral = 'koreacentral',
|
||||
koreasouth = 'koreasouth',
|
||||
northcentralus = 'northcentralus',
|
||||
northeurope = 'northeurope',
|
||||
norwayeast = 'norwayeast',
|
||||
norwaywest = 'norwaywest',
|
||||
southafricanorth = 'southafricanorth',
|
||||
southafricawest = 'southafricawest',
|
||||
southcentralus = 'southcentralus',
|
||||
southeastasia = 'southeastasia',
|
||||
southindia = 'southindia',
|
||||
switzerlandnorth = 'switzerlandnorth',
|
||||
switzerlandwest = 'switzerlandwest',
|
||||
uaecentral = 'uaecentral',
|
||||
uaenorth = 'uaenorth',
|
||||
uksouth = 'uksouth',
|
||||
ukwest = 'ukwest',
|
||||
westcentralus = 'westcentralus',
|
||||
westeurope = 'westeurope',
|
||||
westindia = 'westindia',
|
||||
westus = 'westus',
|
||||
westus2 = 'westus2',
|
||||
}
|
||||
|
||||
export interface IExtension {
|
||||
getSubscriptions(account?: azdata.Account, ignoreErrors?: boolean): Thenable<GetSubscriptionsResult>;
|
||||
getResourceGroups(account?: azdata.Account, subscription?: azureResource.AzureResourceSubscription, ignoreErrors?: boolean): Thenable<GetResourceGroupsResult>;
|
||||
/**
|
||||
* Converts a region value (@see AzureRegion) into the localized Display Name
|
||||
* @param region The region value
|
||||
*/
|
||||
getRegionDisplayName(region?: string): string;
|
||||
provideResources(): azureResource.IAzureResourceProvider[];
|
||||
}
|
||||
|
||||
export type GetSubscriptionsResult = { subscriptions: azureResource.AzureResourceSubscription[], errors: Error[] };
|
||||
export type GetResourceGroupsResult = { resourceGroups: azureResource.AzureResourceResourceGroup[], errors: Error[] };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user