diff --git a/node-azure/azure-tests.ts b/node-azure/azure-tests.ts index f699e411a..be81b8794 100644 --- a/node-azure/azure-tests.ts +++ b/node-azure/azure-tests.ts @@ -10,4 +10,13 @@ ts.createTable("babbsies", function (error, table) { function () { ts.deleteEntity(table.TableName, { PartitionKey: "Midwest", RowKey: "1" }); }); -}); \ No newline at end of file +}); + +Azure.RoleEnvironment.on('stopping', () => { +}); + +Azure.RoleEnvironment.getDeploymentId((error, id) => { +}); + +Azure.RoleEnvironment.isAvailable((error, available) => { +}); diff --git a/node-azure/azure.d.ts b/node-azure/azure.d.ts index 4a8276c03..2b235850c 100644 --- a/node-azure/azure.d.ts +++ b/node-azure/azure.d.ts @@ -1,6 +1,6 @@ // Type definitions for Azure SDK for Node - v0.6.10 // Project: https://github.com/WindowsAzure/azure-sdk-for-node -// Definitions by: Andrew Gaspar +// Definitions by: Andrew Gaspar and Anti Veeranna // Definitions: https://github.com/borisyankov/DefinitelyTyped /// @@ -139,11 +139,23 @@ declare module "azure" { export function createSqlManagementService(subscriptionId: string, authentication: string, hostOptions: string): SqlManagementService; //#endregion - - export module RoleEnvironment { + interface RoleEnvironmentInterface extends events.EventEmitter { + getCurrentRoleInstance(callback: (error, instance) => void): void; + getDeploymentId(callback: (error, id:string) => void): void; + isAvailable(callback: (error, available: boolean) => void): void; + isEmulated(callback: (error, emulated: boolean) => void): void; + getRoles(callback: (error, roles) => void): void; + getConfigurationSettings(callback: (error, settings) => void): void; + getLocalResources(callback: (error, resources) => void): void; + requestRecycle(callback: (error) => void): void; + setStatus(roleInstanceStatus, expirationUtc, callback: (error) => void): void; + clearStatus(callback: (error) => void): void; } + export var RoleEnvironment: RoleEnvironmentInterface; + + //#region Export of internal classes export class WebResource {