@azure/arm-healthbot 1.0.0 → 2.0.1-alpha.20220113.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +70 -74
  4. package/dist/index.js +1301 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/healthbotClient.d.ts +19 -0
  9. package/dist-esm/src/healthbotClient.d.ts.map +1 -0
  10. package/dist-esm/src/healthbotClient.js +52 -0
  11. package/dist-esm/src/healthbotClient.js.map +1 -0
  12. package/dist-esm/src/index.d.ts +5 -0
  13. package/dist-esm/src/index.d.ts.map +1 -0
  14. package/dist-esm/src/index.js +12 -0
  15. package/dist-esm/src/index.js.map +1 -0
  16. package/dist-esm/src/lroImpl.d.ts +16 -0
  17. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  18. package/dist-esm/src/lroImpl.js +29 -0
  19. package/dist-esm/src/lroImpl.js.map +1 -0
  20. package/dist-esm/src/models/index.d.ts +309 -0
  21. package/dist-esm/src/models/index.d.ts.map +1 -0
  22. package/dist-esm/src/models/index.js +16 -0
  23. package/dist-esm/src/models/index.js.map +1 -0
  24. package/dist-esm/src/models/mappers.d.ts +19 -0
  25. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/mappers.js +252 -199
  27. package/dist-esm/src/models/mappers.js.map +1 -0
  28. package/dist-esm/src/models/parameters.d.ts +12 -0
  29. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  30. package/dist-esm/src/models/parameters.js +112 -0
  31. package/dist-esm/src/models/parameters.js.map +1 -0
  32. package/dist-esm/src/operations/bots.d.ts +99 -0
  33. package/dist-esm/src/operations/bots.d.ts.map +1 -0
  34. package/dist-esm/src/operations/bots.js +454 -0
  35. package/dist-esm/src/operations/bots.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +1 -2
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +32 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +120 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operationsInterfaces/bots.d.ts +63 -0
  45. package/dist-esm/src/operationsInterfaces/bots.d.ts.map +1 -0
  46. package/{esm/models/index.js → dist-esm/src/operationsInterfaces/bots.js} +2 -1
  47. package/dist-esm/src/operationsInterfaces/bots.js.map +1 -0
  48. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -0
  49. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  50. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/index.js} +3 -2
  51. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  52. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  53. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  54. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  55. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  56. package/dist-esm/test/sampleTest.d.ts +2 -0
  57. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  58. package/dist-esm/test/sampleTest.js +40 -0
  59. package/dist-esm/test/sampleTest.js.map +1 -0
  60. package/package.json +65 -21
  61. package/review/arm-healthbot.api.md +271 -0
  62. package/rollup.config.js +181 -30
  63. package/src/healthbotClient.ts +62 -28
  64. package/src/index.ts +12 -0
  65. package/src/lroImpl.ts +34 -0
  66. package/src/models/index.ts +239 -394
  67. package/src/models/mappers.ts +260 -204
  68. package/src/models/parameters.ts +81 -33
  69. package/src/operations/bots.ts +424 -322
  70. package/src/operations/index.ts +1 -2
  71. package/src/operations/operations.ts +87 -75
  72. package/src/operationsInterfaces/bots.ts +116 -0
  73. package/src/{models/operationsMappers.ts → operationsInterfaces/index.ts} +2 -8
  74. package/src/operationsInterfaces/operations.ts +22 -0
  75. package/tsconfig.json +3 -3
  76. package/types/arm-healthbot.d.ts +439 -0
  77. package/types/tsdoc-metadata.json +11 -0
  78. package/dist/arm-healthbot.js +0 -1133
  79. package/dist/arm-healthbot.js.map +0 -1
  80. package/dist/arm-healthbot.min.js +0 -1
  81. package/dist/arm-healthbot.min.js.map +0 -1
  82. package/esm/healthbotClient.d.ts +0 -19
  83. package/esm/healthbotClient.d.ts.map +0 -1
  84. package/esm/healthbotClient.js +0 -33
  85. package/esm/healthbotClient.js.map +0 -1
  86. package/esm/healthbotClientContext.d.ts +0 -16
  87. package/esm/healthbotClientContext.d.ts.map +0 -1
  88. package/esm/healthbotClientContext.js +0 -55
  89. package/esm/healthbotClientContext.js.map +0 -1
  90. package/esm/models/botsMappers.d.ts +0 -2
  91. package/esm/models/botsMappers.d.ts.map +0 -1
  92. package/esm/models/botsMappers.js +0 -9
  93. package/esm/models/botsMappers.js.map +0 -1
  94. package/esm/models/index.d.ts +0 -464
  95. package/esm/models/index.d.ts.map +0 -1
  96. package/esm/models/index.js.map +0 -1
  97. package/esm/models/mappers.d.ts +0 -19
  98. package/esm/models/mappers.d.ts.map +0 -1
  99. package/esm/models/mappers.js.map +0 -1
  100. package/esm/models/operationsMappers.d.ts +0 -2
  101. package/esm/models/operationsMappers.d.ts.map +0 -1
  102. package/esm/models/operationsMappers.js.map +0 -1
  103. package/esm/models/parameters.d.ts +0 -8
  104. package/esm/models/parameters.d.ts.map +0 -1
  105. package/esm/models/parameters.js +0 -80
  106. package/esm/models/parameters.js.map +0 -1
  107. package/esm/operations/bots.d.ts +0 -162
  108. package/esm/operations/bots.d.ts.map +0 -1
  109. package/esm/operations/bots.js +0 -319
  110. package/esm/operations/bots.js.map +0 -1
  111. package/esm/operations/index.d.ts.map +0 -1
  112. package/esm/operations/index.js.map +0 -1
  113. package/esm/operations/operations.d.ts +0 -46
  114. package/esm/operations/operations.d.ts.map +0 -1
  115. package/esm/operations/operations.js +0 -79
  116. package/esm/operations/operations.js.map +0 -1
  117. package/src/healthbotClientContext.ts +0 -61
  118. package/src/models/botsMappers.ts +0 -22
@@ -3,8 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
9
  export * from "./bots";
@@ -3,92 +3,109 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as Models from "../models";
12
- import * as Mappers from "../models/operationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { HealthbotClientContext } from "../healthbotClientContext";
14
+ import { HealthbotClient } from "../healthbotClient";
15
+ import {
16
+ OperationDetail,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
15
22
 
16
- /** Class representing a Operations. */
17
- export class Operations {
18
- private readonly client: HealthbotClientContext;
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
26
+ private readonly client: HealthbotClient;
19
27
 
20
28
  /**
21
- * Create a Operations.
22
- * @param {HealthbotClientContext} client Reference to the service client.
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
23
31
  */
24
- constructor(client: HealthbotClientContext) {
32
+ constructor(client: HealthbotClient) {
25
33
  this.client = client;
26
34
  }
27
35
 
28
36
  /**
29
- * Lists all the available HealthBot operations.
30
- * @param [options] The optional parameters
31
- * @returns Promise<Models.OperationsListResponse>
37
+ * Lists all the available Azure Health Bot operations.
38
+ * @param options The options parameters.
32
39
  */
33
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
34
- /**
35
- * @param callback The callback
36
- */
37
- list(callback: msRest.ServiceCallback<Models.AvailableOperations>): void;
38
- /**
39
- * @param options The optional parameters
40
- * @param callback The callback
41
- */
42
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AvailableOperations>): void;
43
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AvailableOperations>, callback?: msRest.ServiceCallback<Models.AvailableOperations>): Promise<Models.OperationsListResponse> {
44
- return this.client.sendOperationRequest(
45
- {
46
- options
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<OperationDetail> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
47
50
  },
48
- listOperationSpec,
49
- callback) as Promise<Models.OperationsListResponse>;
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<OperationDetail[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<OperationDetail> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
50
76
  }
51
77
 
52
78
  /**
53
- * Lists all the available HealthBot operations.
54
- * @param nextPageLink The NextLink from the previous successful call to List operation.
55
- * @param [options] The optional parameters
56
- * @returns Promise<Models.OperationsListNextResponse>
57
- */
58
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
59
- /**
60
- * @param nextPageLink The NextLink from the previous successful call to List operation.
61
- * @param callback The callback
79
+ * Lists all the available Azure Health Bot operations.
80
+ * @param options The options parameters.
62
81
  */
63
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.AvailableOperations>): void;
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
64
88
  /**
65
- * @param nextPageLink The NextLink from the previous successful call to List operation.
66
- * @param options The optional parameters
67
- * @param callback The callback
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
68
92
  */
69
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.AvailableOperations>): void;
70
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.AvailableOperations>, callback?: msRest.ServiceCallback<Models.AvailableOperations>): Promise<Models.OperationsListNextResponse> {
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
71
97
  return this.client.sendOperationRequest(
72
- {
73
- nextPageLink,
74
- options
75
- },
76
- listNextOperationSpec,
77
- callback) as Promise<Models.OperationsListNextResponse>;
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
78
101
  }
79
102
  }
80
-
81
103
  // Operation Specifications
82
- const serializer = new msRest.Serializer(Mappers);
83
- const listOperationSpec: msRest.OperationSpec = {
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.HealthBot/operations",
84
108
  httpMethod: "GET",
85
- path: "providers/Microsoft.HealthBot/operations",
86
- queryParameters: [
87
- Parameters.apiVersion
88
- ],
89
- headerParameters: [
90
- Parameters.acceptLanguage
91
- ],
92
109
  responses: {
93
110
  200: {
94
111
  bodyMapper: Mappers.AvailableOperations
@@ -97,22 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
97
114
  bodyMapper: Mappers.ErrorModel
98
115
  }
99
116
  },
117
+ queryParameters: [Parameters.apiVersion],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
100
120
  serializer
101
121
  };
102
-
103
- const listNextOperationSpec: msRest.OperationSpec = {
104
- httpMethod: "GET",
105
- baseUrl: "https://management.azure.com",
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
106
123
  path: "{nextLink}",
107
- urlParameters: [
108
- Parameters.nextPageLink
109
- ],
110
- queryParameters: [
111
- Parameters.apiVersion
112
- ],
113
- headerParameters: [
114
- Parameters.acceptLanguage
115
- ],
124
+ httpMethod: "GET",
116
125
  responses: {
117
126
  200: {
118
127
  bodyMapper: Mappers.AvailableOperations
@@ -121,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
121
130
  bodyMapper: Mappers.ErrorModel
122
131
  }
123
132
  },
133
+ queryParameters: [Parameters.apiVersion],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
124
136
  serializer
125
137
  };
@@ -0,0 +1,116 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
11
+ import {
12
+ HealthBot,
13
+ BotsListByResourceGroupOptionalParams,
14
+ BotsListOptionalParams,
15
+ BotsCreateOptionalParams,
16
+ BotsCreateResponse,
17
+ BotsGetOptionalParams,
18
+ BotsGetResponse,
19
+ HealthBotUpdateParameters,
20
+ BotsUpdateOptionalParams,
21
+ BotsUpdateResponse,
22
+ BotsDeleteOptionalParams
23
+ } from "../models";
24
+
25
+ /// <reference lib="esnext.asynciterable" />
26
+ /** Interface representing a Bots. */
27
+ export interface Bots {
28
+ /**
29
+ * Returns all the resources of a particular type belonging to a resource group
30
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
31
+ * @param options The options parameters.
32
+ */
33
+ listByResourceGroup(
34
+ resourceGroupName: string,
35
+ options?: BotsListByResourceGroupOptionalParams
36
+ ): PagedAsyncIterableIterator<HealthBot>;
37
+ /**
38
+ * Returns all the resources of a particular type belonging to a subscription.
39
+ * @param options The options parameters.
40
+ */
41
+ list(options?: BotsListOptionalParams): PagedAsyncIterableIterator<HealthBot>;
42
+ /**
43
+ * Create a new Azure Health Bot.
44
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
45
+ * @param botName The name of the Bot resource.
46
+ * @param parameters The parameters to provide for the created Azure Health Bot.
47
+ * @param options The options parameters.
48
+ */
49
+ beginCreate(
50
+ resourceGroupName: string,
51
+ botName: string,
52
+ parameters: HealthBot,
53
+ options?: BotsCreateOptionalParams
54
+ ): Promise<
55
+ PollerLike<PollOperationState<BotsCreateResponse>, BotsCreateResponse>
56
+ >;
57
+ /**
58
+ * Create a new Azure Health Bot.
59
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
60
+ * @param botName The name of the Bot resource.
61
+ * @param parameters The parameters to provide for the created Azure Health Bot.
62
+ * @param options The options parameters.
63
+ */
64
+ beginCreateAndWait(
65
+ resourceGroupName: string,
66
+ botName: string,
67
+ parameters: HealthBot,
68
+ options?: BotsCreateOptionalParams
69
+ ): Promise<BotsCreateResponse>;
70
+ /**
71
+ * Get a HealthBot.
72
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
73
+ * @param botName The name of the Bot resource.
74
+ * @param options The options parameters.
75
+ */
76
+ get(
77
+ resourceGroupName: string,
78
+ botName: string,
79
+ options?: BotsGetOptionalParams
80
+ ): Promise<BotsGetResponse>;
81
+ /**
82
+ * Patch a HealthBot.
83
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
84
+ * @param botName The name of the Bot resource.
85
+ * @param parameters The parameters to provide for the required Azure Health Bot.
86
+ * @param options The options parameters.
87
+ */
88
+ update(
89
+ resourceGroupName: string,
90
+ botName: string,
91
+ parameters: HealthBotUpdateParameters,
92
+ options?: BotsUpdateOptionalParams
93
+ ): Promise<BotsUpdateResponse>;
94
+ /**
95
+ * Delete a HealthBot.
96
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
97
+ * @param botName The name of the Bot resource.
98
+ * @param options The options parameters.
99
+ */
100
+ beginDelete(
101
+ resourceGroupName: string,
102
+ botName: string,
103
+ options?: BotsDeleteOptionalParams
104
+ ): Promise<PollerLike<PollOperationState<void>, void>>;
105
+ /**
106
+ * Delete a HealthBot.
107
+ * @param resourceGroupName The name of the Bot resource group in the user subscription.
108
+ * @param botName The name of the Bot resource.
109
+ * @param options The options parameters.
110
+ */
111
+ beginDeleteAndWait(
112
+ resourceGroupName: string,
113
+ botName: string,
114
+ options?: BotsDeleteOptionalParams
115
+ ): Promise<void>;
116
+ }
@@ -6,11 +6,5 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- export {
10
- AvailableOperations,
11
- ErrorAdditionalInfo,
12
- ErrorError,
13
- ErrorModel,
14
- OperationDetail,
15
- OperationDisplay
16
- } from "../models/mappers";
9
+ export * from "./bots";
10
+ export * from "./operations";
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { OperationDetail, OperationsListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Operations. */
14
+ export interface Operations {
15
+ /**
16
+ * Lists all the available Azure Health Bot operations.
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: OperationsListOptionalParams
21
+ ): PagedAsyncIterableIterator<OperationDetail>;
22
+ }
package/tsconfig.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "module": "es6",
4
4
  "moduleResolution": "node",
5
5
  "strict": true,
6
- "target": "es5",
6
+ "target": "es6",
7
7
  "sourceMap": true,
8
8
  "declarationMap": true,
9
9
  "esModuleInterop": true,
@@ -11,9 +11,9 @@
11
11
  "forceConsistentCasingInFileNames": true,
12
12
  "lib": ["es6", "dom"],
13
13
  "declaration": true,
14
- "outDir": "./esm",
14
+ "outDir": "./dist-esm",
15
15
  "importHelpers": true
16
16
  },
17
- "include": ["./src/**/*.ts"],
17
+ "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
18
  "exclude": ["node_modules"]
19
19
  }