diff --git a/sdk/iothub/arm-iothub/README.md b/sdk/iothub/arm-iothub/README.md index e0119d94d701..2b1111bb8182 100644 --- a/sdk/iothub/arm-iothub/README.md +++ b/sdk/iothub/arm-iothub/README.md @@ -19,8 +19,9 @@ npm install @azure/arm-iothub ##### Install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. ```bash -npm install @azure/ms-rest-nodeauth +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code @@ -94,3 +95,5 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## Related projects - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/iothub/arm-iothub/README.png) diff --git a/sdk/iothub/arm-iothub/package.json b/sdk/iothub/arm-iothub/package.json index e3e5e78fe65f..24c367861684 100644 --- a/sdk/iothub/arm-iothub/package.json +++ b/sdk/iothub/arm-iothub/package.json @@ -4,9 +4,9 @@ "description": "IotHubClient Library with typescript type definitions for node.js and browser.", "version": "3.0.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.3.2", - "@azure/ms-rest-js": "^1.8.1", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,19 +20,19 @@ "module": "./esm/iotHubClient.js", "types": "./esm/iotHubClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-sourcemaps": "^0.4.2", - "uglify-js": "^3.4.9" + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/iothub/arm-iothub", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", diff --git a/sdk/iothub/arm-iothub/rollup.config.js b/sdk/iothub/arm-iothub/rollup.config.js index 8464171f6338..c38caace5654 100644 --- a/sdk/iothub/arm-iothub/rollup.config.js +++ b/sdk/iothub/arm-iothub/rollup.config.js @@ -29,7 +29,7 @@ const config = { */` }, plugins: [ - nodeResolve({ module: true }), + nodeResolve({ mainFields: ['module', 'main'] }), sourcemaps() ] }; diff --git a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts index a7ed3e93f0b7..81ff345fe634 100644 --- a/sdk/iothub/arm-iothub/src/iotHubClientContext.ts +++ b/sdk/iothub/arm-iothub/src/iotHubClientContext.ts @@ -44,7 +44,7 @@ export class IotHubClientContext extends msRestAzure.AzureServiceClient { super(credentials, options); - this.apiVersion = '2019-03-22-preview'; + this.apiVersion = '2019-07-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts b/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts index 1be3b19c89d5..c971b904ae91 100644 --- a/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/certificatesMappers.ts @@ -23,6 +23,7 @@ export { FallbackRouteProperties, FeedbackProperties, IotHubDescription, + IotHubLocationDescription, IotHubProperties, IotHubPropertiesDeviceStreams, IotHubSkuInfo, diff --git a/sdk/iothub/arm-iothub/src/models/index.ts b/sdk/iothub/arm-iothub/src/models/index.ts index d6d48dd3b916..216146be9017 100644 --- a/sdk/iothub/arm-iothub/src/models/index.ts +++ b/sdk/iothub/arm-iothub/src/models/index.ts @@ -427,7 +427,7 @@ export interface RouteProperties { /** * The source that the routing rule is to be applied to, such as DeviceMessages. Possible values * include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', 'DeviceLifecycleEvents', - * 'DeviceJobLifecycleEvents' + * 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' */ source: RoutingSource; /** @@ -607,6 +607,20 @@ export interface IotHubPropertiesDeviceStreams { streamingEndpoints?: string[]; } +/** + * Public representation of one of the locations where a resource is provisioned. + */ +export interface IotHubLocationDescription { + /** + * Azure Geo Regions + */ + location?: string; + /** + * Specific Role assigned to this location. Possible values include: 'primary', 'secondary' + */ + role?: IotHubReplicaRoleType; +} + /** * The properties of an IoT hub. */ @@ -670,6 +684,11 @@ export interface IotHubProperties { * 'DeviceManagement' */ features?: Capabilities; + /** + * Primary and secondary location for iot hub + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly locations?: IotHubLocationDescription[]; } /** @@ -1141,7 +1160,7 @@ export interface RoutingTwin { export interface TestAllRoutesInput { /** * Routing source. Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', - * 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents' + * 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' */ routingSource?: RoutingSource; /** @@ -1503,11 +1522,11 @@ export type IpFilterActionType = 'Accept' | 'Reject'; /** * Defines values for RoutingSource. * Possible values include: 'Invalid', 'DeviceMessages', 'TwinChangeEvents', - * 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents' + * 'DeviceLifecycleEvents', 'DeviceJobLifecycleEvents', 'DigitalTwinChangeEvents' * @readonly * @enum {string} */ -export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' | 'DeviceLifecycleEvents' | 'DeviceJobLifecycleEvents'; +export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' | 'DeviceLifecycleEvents' | 'DeviceJobLifecycleEvents' | 'DigitalTwinChangeEvents'; /** * Defines values for Capabilities. @@ -1517,6 +1536,14 @@ export type RoutingSource = 'Invalid' | 'DeviceMessages' | 'TwinChangeEvents' | */ export type Capabilities = 'None' | 'DeviceManagement'; +/** + * Defines values for IotHubReplicaRoleType. + * Possible values include: 'primary', 'secondary' + * @readonly + * @enum {string} + */ +export type IotHubReplicaRoleType = 'primary' | 'secondary'; + /** * Defines values for IotHubSku. * Possible values include: 'F1', 'S1', 'S2', 'S3', 'B1', 'B2', 'B3' diff --git a/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts b/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts index ab4c4252953b..235c2d3e08cc 100644 --- a/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts +++ b/sdk/iothub/arm-iothub/src/models/iotHubResourceMappers.ts @@ -28,6 +28,7 @@ export { IotHubCapacity, IotHubDescription, IotHubDescriptionListResult, + IotHubLocationDescription, IotHubNameAvailabilityInfo, IotHubProperties, IotHubPropertiesDeviceStreams, diff --git a/sdk/iothub/arm-iothub/src/models/mappers.ts b/sdk/iothub/arm-iothub/src/models/mappers.ts index 89d81a23b79e..dab1f893cd88 100644 --- a/sdk/iothub/arm-iothub/src/models/mappers.ts +++ b/sdk/iothub/arm-iothub/src/models/mappers.ts @@ -1014,6 +1014,28 @@ export const IotHubPropertiesDeviceStreams: msRest.CompositeMapper = { } }; +export const IotHubLocationDescription: msRest.CompositeMapper = { + serializedName: "IotHubLocationDescription", + type: { + name: "Composite", + className: "IotHubLocationDescription", + modelProperties: { + location: { + serializedName: "location", + type: { + name: "String" + } + }, + role: { + serializedName: "role", + type: { + name: "String" + } + } + } + } +}; + export const IotHubProperties: msRest.CompositeMapper = { serializedName: "IotHubProperties", type: { @@ -1139,6 +1161,19 @@ export const IotHubProperties: msRest.CompositeMapper = { type: { name: "String" } + }, + locations: { + readOnly: true, + serializedName: "locations", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IotHubLocationDescription" + } + } + } } } } diff --git a/sdk/iothub/arm-iothub/tsconfig.json b/sdk/iothub/arm-iothub/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/iothub/arm-iothub/tsconfig.json +++ b/sdk/iothub/arm-iothub/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true