diff --git a/packages/@azure/arm-iotcentral/LICENSE.txt b/packages/@azure/arm-iotcentral/LICENSE.txt
index a70e8cf66038..8f3d856145c5 100644
--- a/packages/@azure/arm-iotcentral/LICENSE.txt
+++ b/packages/@azure/arm-iotcentral/LICENSE.txt
@@ -1,21 +1,21 @@
-The MIT License (MIT)
-
-Copyright (c) 2018 Microsoft
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
+The MIT License (MIT)
+
+Copyright (c) 2019 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/packages/@azure/arm-iotcentral/README.md b/packages/@azure/arm-iotcentral/README.md
index 0c0bf65eb45f..853497781966 100644
--- a/packages/@azure/arm-iotcentral/README.md
+++ b/packages/@azure/arm-iotcentral/README.md
@@ -1,103 +1,100 @@
-## Azure IotCentralClient SDK for JavaScript
-
-This package contains an isomorphic SDK for IotCentralClient.
-
-### Currently supported environments
-
-- Node.js version 6.x.x or higher
-- Browser JavaScript
-
-### How to Install
-
-```
-npm install @azure/arm-iotcentral
-```
-
-### How to use
-
-#### nodejs - Authentication, client creation and get apps as an example written in TypeScript.
-
-##### Install @azure/ms-rest-nodeauth
-
-```
-npm install @azure/ms-rest-nodeauth
-```
-
-##### Sample code
-
-```ts
-import * as msRest from "@azure/ms-rest-js";
-import * as msRestAzure from "@azure/ms-rest-azure-js";
-import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
-import { IotCentralClient, IotCentralModels, IotCentralMappers } from "@azure/arm-iotcentral";
-const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
-
-msRestNodeAuth.interactiveLogin().then((creds) => {
- const client = new IotCentralClient(creds, subscriptionId);
- const resourceGroupName = "testresourceGroupName";
- const resourceName = "testresourceName";
- client.apps.get(resourceGroupName, resourceName).then((result) => {
- console.log("The result is:");
- console.log(result);
- });
-}).catch((err) => {
- console.error(err);
-});
-```
-
-#### browser - Authentication, client creation and get apps as an example written in JavaScript.
-
-##### Install @azure/ms-rest-browserauth
-
-```
-npm install @azure/ms-rest-browserauth
-```
-
-##### Sample code
-
-See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
-
-- index.html
-```html
-
-
-
- @azure/arm-iotcentral sample
-
-
-
-
-
-
-
-
-```
-
-## 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%2Fpackages%2F%40azure%2Farm-iotcentral%2FREADME.png)
+## Azure IotCentralClient SDK for JavaScript
+
+This package contains an isomorphic SDK for IotCentralClient.
+
+### Currently supported environments
+
+- Node.js version 6.x.x or higher
+- Browser JavaScript
+
+### How to Install
+
+```bash
+npm install @azure/arm-iotcentral
+```
+
+### How to use
+
+#### nodejs - Authentication, client creation and get apps as an example written in TypeScript.
+
+##### Install @azure/ms-rest-nodeauth
+
+```bash
+npm install @azure/ms-rest-nodeauth
+```
+
+##### Sample code
+
+```typescript
+import * as msRest from "@azure/ms-rest-js";
+import * as msRestAzure from "@azure/ms-rest-azure-js";
+import * as msRestNodeAuth from "@azure/ms-rest-nodeauth";
+import { IotCentralClient, IotCentralModels, IotCentralMappers } from "@azure/arm-iotcentral";
+const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"];
+
+msRestNodeAuth.interactiveLogin().then((creds) => {
+ const client = new IotCentralClient(creds, subscriptionId);
+ const resourceGroupName = "testresourceGroupName";
+ const resourceName = "testresourceName";
+ client.apps.get(resourceGroupName, resourceName).then((result) => {
+ console.log("The result is:");
+ console.log(result);
+ });
+}).catch((err) => {
+ console.error(err);
+});
+```
+
+#### browser - Authentication, client creation and get apps as an example written in JavaScript.
+
+##### Install @azure/ms-rest-browserauth
+
+```bash
+npm install @azure/ms-rest-browserauth
+```
+
+##### Sample code
+
+See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.
+
+- index.html
+```html
+
+
+
+ @azure/arm-iotcentral sample
+
+
+
+
+
+
+
+
+```
+
+## Related projects
+
+- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)
diff --git a/packages/@azure/arm-iotcentral/lib/iotCentralClientContext.ts b/packages/@azure/arm-iotcentral/lib/iotCentralClientContext.ts
index 5f37b9da45dd..2fd9d4e530e7 100644
--- a/packages/@azure/arm-iotcentral/lib/iotCentralClientContext.ts
+++ b/packages/@azure/arm-iotcentral/lib/iotCentralClientContext.ts
@@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js";
import * as msRestAzure from "@azure/ms-rest-azure-js";
const packageName = "@azure/arm-iotcentral";
-const packageVersion = "0.1.0";
+const packageVersion = "2.1.0";
export class IotCentralClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
diff --git a/packages/@azure/arm-iotcentral/lib/models/appsMappers.ts b/packages/@azure/arm-iotcentral/lib/models/appsMappers.ts
index 5f2f87479734..fa60e8406dd1 100644
--- a/packages/@azure/arm-iotcentral/lib/models/appsMappers.ts
+++ b/packages/@azure/arm-iotcentral/lib/models/appsMappers.ts
@@ -18,6 +18,8 @@ export {
AppPatch,
AppListResult,
OperationInputs,
- AppAvailabilityInfo
+ AppAvailabilityInfo,
+ AppTemplatesResult,
+ AppTemplate
} from "../models/mappers";
diff --git a/packages/@azure/arm-iotcentral/lib/models/index.ts b/packages/@azure/arm-iotcentral/lib/models/index.ts
index 4430cc8c4dc4..6cdd8b3f33e9 100644
--- a/packages/@azure/arm-iotcentral/lib/models/index.ts
+++ b/packages/@azure/arm-iotcentral/lib/models/index.ts
@@ -299,6 +299,51 @@ export interface AppAvailabilityInfo {
readonly message?: string;
}
+/**
+ * @interface
+ * An interface representing AppTemplate.
+ * IoT Central Application Template.
+ *
+ */
+export interface AppTemplate {
+ /**
+ * @member {string} [manifestId] The ID of the template.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly manifestId?: string;
+ /**
+ * @member {string} [manifestVersion] The version of the template.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly manifestVersion?: string;
+ /**
+ * @member {string} [name] The name of the template.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly name?: string;
+ /**
+ * @member {string} [title] The title of the template.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly title?: string;
+ /**
+ * @member {number} [order] The order of the template in the templates list.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly order?: number;
+ /**
+ * @member {string} [description] The description of the template.
+ * **NOTE: This property will not be serialized. It can only be populated by
+ * the server.**
+ */
+ readonly description?: string;
+}
+
/**
* @interface
* An interface representing IotCentralClientOptions.
@@ -327,6 +372,21 @@ export interface AppListResult extends Array {
nextLink?: string;
}
+/**
+ * @interface
+ * An interface representing the AppTemplatesResult.
+ * A list of IoT Central Application Templates with a next link.
+ *
+ * @extends Array
+ */
+export interface AppTemplatesResult extends Array {
+ /**
+ * @member {string} [nextLink] The link used to get the next page of IoT
+ * Central description objects.
+ */
+ nextLink?: string;
+}
+
/**
* @interface
* An interface representing the OperationListResult.
@@ -484,6 +544,25 @@ export type AppsCheckSubdomainAvailabilityResponse = AppAvailabilityInfo & {
};
};
+/**
+ * Contains response data for the listTemplates operation.
+ */
+export type AppsListTemplatesResponse = AppTemplatesResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: AppTemplatesResult;
+ };
+};
+
/**
* Contains response data for the beginCreateOrUpdate operation.
*/
@@ -560,6 +639,25 @@ export type AppsListByResourceGroupNextResponse = AppListResult & {
};
};
+/**
+ * Contains response data for the listTemplatesNext operation.
+ */
+export type AppsListTemplatesNextResponse = AppTemplatesResult & {
+ /**
+ * The underlying HTTP response.
+ */
+ _response: msRest.HttpResponse & {
+ /**
+ * The response body as text (string format)
+ */
+ bodyAsText: string;
+ /**
+ * The response body as parsed JSON or XML
+ */
+ parsedBody: AppTemplatesResult;
+ };
+};
+
/**
* Contains response data for the list operation.
*/
diff --git a/packages/@azure/arm-iotcentral/lib/models/mappers.ts b/packages/@azure/arm-iotcentral/lib/models/mappers.ts
index 18603c7057d8..69f6f25f2f71 100644
--- a/packages/@azure/arm-iotcentral/lib/models/mappers.ts
+++ b/packages/@azure/arm-iotcentral/lib/models/mappers.ts
@@ -391,6 +391,58 @@ export const AppAvailabilityInfo: msRest.CompositeMapper = {
}
};
+export const AppTemplate: msRest.CompositeMapper = {
+ serializedName: "AppTemplate",
+ type: {
+ name: "Composite",
+ className: "AppTemplate",
+ modelProperties: {
+ manifestId: {
+ readOnly: true,
+ serializedName: "manifestId",
+ type: {
+ name: "String"
+ }
+ },
+ manifestVersion: {
+ readOnly: true,
+ serializedName: "manifestVersion",
+ type: {
+ name: "String"
+ }
+ },
+ name: {
+ readOnly: true,
+ serializedName: "name",
+ type: {
+ name: "String"
+ }
+ },
+ title: {
+ readOnly: true,
+ serializedName: "title",
+ type: {
+ name: "String"
+ }
+ },
+ order: {
+ readOnly: true,
+ serializedName: "order",
+ type: {
+ name: "Number"
+ }
+ },
+ description: {
+ readOnly: true,
+ serializedName: "description",
+ type: {
+ name: "String"
+ }
+ }
+ }
+ }
+};
+
export const AppListResult: msRest.CompositeMapper = {
serializedName: "AppListResult",
type: {
@@ -419,6 +471,35 @@ export const AppListResult: msRest.CompositeMapper = {
}
};
+export const AppTemplatesResult: msRest.CompositeMapper = {
+ serializedName: "AppTemplatesResult",
+ type: {
+ name: "Composite",
+ className: "AppTemplatesResult",
+ modelProperties: {
+ nextLink: {
+ serializedName: "nextLink",
+ type: {
+ name: "String"
+ }
+ },
+ value: {
+ readOnly: true,
+ serializedName: "",
+ type: {
+ name: "Sequence",
+ element: {
+ type: {
+ name: "Composite",
+ className: "AppTemplate"
+ }
+ }
+ }
+ }
+ }
+ }
+};
+
export const OperationListResult: msRest.CompositeMapper = {
serializedName: "OperationListResult",
type: {
diff --git a/packages/@azure/arm-iotcentral/lib/operations/apps.ts b/packages/@azure/arm-iotcentral/lib/operations/apps.ts
index c5d2ed7934eb..fa46dc4c7003 100644
--- a/packages/@azure/arm-iotcentral/lib/operations/apps.ts
+++ b/packages/@azure/arm-iotcentral/lib/operations/apps.ts
@@ -222,6 +222,30 @@ export class Apps {
callback) as Promise;
}
+ /**
+ * Get all available application templates.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listTemplates(options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param callback The callback
+ */
+ listTemplates(callback: msRest.ServiceCallback): void;
+ /**
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listTemplates(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listTemplates(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ options
+ },
+ listTemplatesOperationSpec,
+ callback) as Promise;
+ }
+
/**
* Create or update the metadata of an IoT Central application. The usual pattern to modify a
* property is to retrieve the IoT Central application metadata and security metadata, and then
@@ -340,6 +364,34 @@ export class Apps {
listByResourceGroupNextOperationSpec,
callback) as Promise;
}
+
+ /**
+ * Get all available application templates.
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param [options] The optional parameters
+ * @returns Promise
+ */
+ listTemplatesNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param callback The callback
+ */
+ listTemplatesNext(nextPageLink: string, callback: msRest.ServiceCallback): void;
+ /**
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param options The optional parameters
+ * @param callback The callback
+ */
+ listTemplatesNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void;
+ listTemplatesNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise {
+ return this.client.sendOperationRequest(
+ {
+ nextPageLink,
+ options
+ },
+ listTemplatesNextOperationSpec,
+ callback) as Promise;
+ }
}
// Operation Specifications
@@ -476,6 +528,29 @@ const checkSubdomainAvailabilityOperationSpec: msRest.OperationSpec = {
serializer
};
+const listTemplatesOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ path: "subscriptions/{subscriptionId}/providers/Microsoft.IoTCentral/appTemplates",
+ urlParameters: [
+ Parameters.subscriptionId
+ ],
+ queryParameters: [
+ Parameters.apiVersion
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AppTemplatesResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorDetails
+ }
+ },
+ serializer
+};
+
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
httpMethod: "PUT",
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTCentral/IoTApps/{resourceName}",
@@ -611,3 +686,24 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = {
},
serializer
};
+
+const listTemplatesNextOperationSpec: msRest.OperationSpec = {
+ httpMethod: "GET",
+ baseUrl: "https://management.azure.com",
+ path: "{nextLink}",
+ urlParameters: [
+ Parameters.nextPageLink
+ ],
+ headerParameters: [
+ Parameters.acceptLanguage
+ ],
+ responses: {
+ 200: {
+ bodyMapper: Mappers.AppTemplatesResult
+ },
+ default: {
+ bodyMapper: Mappers.ErrorDetails
+ }
+ },
+ serializer
+};
diff --git a/packages/@azure/arm-iotcentral/package.json b/packages/@azure/arm-iotcentral/package.json
index 3cae75fe764b..907f4e676c50 100644
--- a/packages/@azure/arm-iotcentral/package.json
+++ b/packages/@azure/arm-iotcentral/package.json
@@ -4,8 +4,8 @@
"description": "IotCentralClient Library with typescript type definitions for node.js and browser.",
"version": "2.1.0",
"dependencies": {
- "@azure/ms-rest-azure-js": "^1.1.0",
- "@azure/ms-rest-js": "^1.1.0",
+ "@azure/ms-rest-azure-js": "^1.2.0",
+ "@azure/ms-rest-js": "^1.2.0",
"tslib": "^1.9.3"
},
"keywords": [
@@ -23,6 +23,7 @@
"typescript": "^3.1.1",
"rollup": "^0.66.2",
"rollup-plugin-node-resolve": "^3.4.0",
+ "rollup-plugin-sourcemaps": "^0.4.2",
"uglify-js": "^3.4.9"
},
"homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-iotcentral",
@@ -51,6 +52,5 @@
"minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-iotcentral.js.map'\" -o ./dist/arm-iotcentral.min.js ./dist/arm-iotcentral.js",
"prepack": "npm install && npm run build"
},
- "sideEffects": false,
- "authPublish": true
+ "sideEffects": false
}
diff --git a/packages/@azure/arm-iotcentral/rollup.config.js b/packages/@azure/arm-iotcentral/rollup.config.js
index c2695e9d6fa1..5867cd5ab746 100644
--- a/packages/@azure/arm-iotcentral/rollup.config.js
+++ b/packages/@azure/arm-iotcentral/rollup.config.js
@@ -1,10 +1,16 @@
+import rollup from "rollup";
import nodeResolve from "rollup-plugin-node-resolve";
+import sourcemaps from "rollup-plugin-sourcemaps";
+
/**
- * @type {import('rollup').RollupFileOptions}
+ * @type {rollup.RollupFileOptions}
*/
const config = {
- input: './esm/iotCentralClient.js',
- external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"],
+ input: "./esm/iotCentralClient.js",
+ external: [
+ "@azure/ms-rest-js",
+ "@azure/ms-rest-azure-js"
+ ],
output: {
file: "./dist/arm-iotcentral.js",
format: "umd",
@@ -16,16 +22,16 @@ const config = {
},
banner: `/*
* Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
+ * Licensed under the MIT License. See License.txt in the project root for license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
- * Changes may cause incorrect behavior and will be lost if the code is
- * regenerated.
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
*/`
},
plugins: [
- nodeResolve({ module: true })
+ nodeResolve({ module: true }),
+ sourcemaps()
]
};
+
export default config;