@azure/arm-customerinsights 4.1.1-alpha.20250619.1 → 4.1.1-alpha.20250729.1

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 (171) hide show
  1. package/dist/browser/customerInsightsManagementClient.js +30 -5
  2. package/dist/browser/customerInsightsManagementClient.js.map +1 -1
  3. package/dist/browser/lroImpl.js +11 -3
  4. package/dist/browser/lroImpl.js.map +1 -1
  5. package/dist/browser/models/mappers.js +479 -230
  6. package/dist/browser/models/mappers.js.map +1 -1
  7. package/dist/browser/operations/authorizationPolicies.js +23 -40
  8. package/dist/browser/operations/authorizationPolicies.js.map +1 -1
  9. package/dist/browser/operations/connectorMappings.js +23 -40
  10. package/dist/browser/operations/connectorMappings.js.map +1 -1
  11. package/dist/browser/operations/connectors.js +45 -52
  12. package/dist/browser/operations/connectors.js.map +1 -1
  13. package/dist/browser/operations/hubs.js +56 -85
  14. package/dist/browser/operations/hubs.js.map +1 -1
  15. package/dist/browser/operations/images.js +1 -0
  16. package/dist/browser/operations/images.js.map +1 -1
  17. package/dist/browser/operations/interactions.js +34 -46
  18. package/dist/browser/operations/interactions.js.map +1 -1
  19. package/dist/browser/operations/kpi.js +45 -52
  20. package/dist/browser/operations/kpi.js.map +1 -1
  21. package/dist/browser/operations/links.js +34 -46
  22. package/dist/browser/operations/links.js.map +1 -1
  23. package/dist/browser/operations/operations.js +23 -40
  24. package/dist/browser/operations/operations.js.map +1 -1
  25. package/dist/browser/operations/predictions.js +45 -52
  26. package/dist/browser/operations/predictions.js.map +1 -1
  27. package/dist/browser/operations/profiles.js +45 -52
  28. package/dist/browser/operations/profiles.js.map +1 -1
  29. package/dist/browser/operations/relationshipLinks.js +45 -52
  30. package/dist/browser/operations/relationshipLinks.js.map +1 -1
  31. package/dist/browser/operations/relationships.js +45 -52
  32. package/dist/browser/operations/relationships.js.map +1 -1
  33. package/dist/browser/operations/roleAssignments.js +34 -46
  34. package/dist/browser/operations/roleAssignments.js.map +1 -1
  35. package/dist/browser/operations/roles.js +23 -40
  36. package/dist/browser/operations/roles.js.map +1 -1
  37. package/dist/browser/operations/views.js +23 -40
  38. package/dist/browser/operations/views.js.map +1 -1
  39. package/dist/browser/operations/widgetTypes.js +23 -40
  40. package/dist/browser/operations/widgetTypes.js.map +1 -1
  41. package/dist/browser/pagingHelper.js +2 -4
  42. package/dist/browser/pagingHelper.js.map +1 -1
  43. package/dist/commonjs/customerInsightsManagementClient.js +30 -5
  44. package/dist/commonjs/customerInsightsManagementClient.js.map +1 -1
  45. package/dist/commonjs/lroImpl.js +11 -3
  46. package/dist/commonjs/lroImpl.js.map +1 -1
  47. package/dist/commonjs/models/mappers.js +479 -230
  48. package/dist/commonjs/models/mappers.js.map +1 -1
  49. package/dist/commonjs/operations/authorizationPolicies.js +23 -39
  50. package/dist/commonjs/operations/authorizationPolicies.js.map +1 -1
  51. package/dist/commonjs/operations/connectorMappings.js +23 -39
  52. package/dist/commonjs/operations/connectorMappings.js.map +1 -1
  53. package/dist/commonjs/operations/connectors.js +45 -51
  54. package/dist/commonjs/operations/connectors.js.map +1 -1
  55. package/dist/commonjs/operations/hubs.js +56 -84
  56. package/dist/commonjs/operations/hubs.js.map +1 -1
  57. package/dist/commonjs/operations/images.js +1 -0
  58. package/dist/commonjs/operations/images.js.map +1 -1
  59. package/dist/commonjs/operations/interactions.js +34 -45
  60. package/dist/commonjs/operations/interactions.js.map +1 -1
  61. package/dist/commonjs/operations/kpi.js +45 -51
  62. package/dist/commonjs/operations/kpi.js.map +1 -1
  63. package/dist/commonjs/operations/links.js +34 -45
  64. package/dist/commonjs/operations/links.js.map +1 -1
  65. package/dist/commonjs/operations/operations.js +23 -39
  66. package/dist/commonjs/operations/operations.js.map +1 -1
  67. package/dist/commonjs/operations/predictions.js +45 -51
  68. package/dist/commonjs/operations/predictions.js.map +1 -1
  69. package/dist/commonjs/operations/profiles.js +45 -51
  70. package/dist/commonjs/operations/profiles.js.map +1 -1
  71. package/dist/commonjs/operations/relationshipLinks.js +45 -51
  72. package/dist/commonjs/operations/relationshipLinks.js.map +1 -1
  73. package/dist/commonjs/operations/relationships.js +45 -51
  74. package/dist/commonjs/operations/relationships.js.map +1 -1
  75. package/dist/commonjs/operations/roleAssignments.js +34 -45
  76. package/dist/commonjs/operations/roleAssignments.js.map +1 -1
  77. package/dist/commonjs/operations/roles.js +23 -39
  78. package/dist/commonjs/operations/roles.js.map +1 -1
  79. package/dist/commonjs/operations/views.js +23 -39
  80. package/dist/commonjs/operations/views.js.map +1 -1
  81. package/dist/commonjs/operations/widgetTypes.js +23 -39
  82. package/dist/commonjs/operations/widgetTypes.js.map +1 -1
  83. package/dist/commonjs/pagingHelper.js +2 -4
  84. package/dist/commonjs/pagingHelper.js.map +1 -1
  85. package/dist/commonjs/tsdoc-metadata.json +11 -11
  86. package/dist/esm/customerInsightsManagementClient.js +30 -5
  87. package/dist/esm/customerInsightsManagementClient.js.map +1 -1
  88. package/dist/esm/lroImpl.js +11 -3
  89. package/dist/esm/lroImpl.js.map +1 -1
  90. package/dist/esm/models/mappers.js +479 -230
  91. package/dist/esm/models/mappers.js.map +1 -1
  92. package/dist/esm/operations/authorizationPolicies.js +23 -40
  93. package/dist/esm/operations/authorizationPolicies.js.map +1 -1
  94. package/dist/esm/operations/connectorMappings.js +23 -40
  95. package/dist/esm/operations/connectorMappings.js.map +1 -1
  96. package/dist/esm/operations/connectors.js +45 -52
  97. package/dist/esm/operations/connectors.js.map +1 -1
  98. package/dist/esm/operations/hubs.js +56 -85
  99. package/dist/esm/operations/hubs.js.map +1 -1
  100. package/dist/esm/operations/images.js +1 -0
  101. package/dist/esm/operations/images.js.map +1 -1
  102. package/dist/esm/operations/interactions.js +34 -46
  103. package/dist/esm/operations/interactions.js.map +1 -1
  104. package/dist/esm/operations/kpi.js +45 -52
  105. package/dist/esm/operations/kpi.js.map +1 -1
  106. package/dist/esm/operations/links.js +34 -46
  107. package/dist/esm/operations/links.js.map +1 -1
  108. package/dist/esm/operations/operations.js +23 -40
  109. package/dist/esm/operations/operations.js.map +1 -1
  110. package/dist/esm/operations/predictions.js +45 -52
  111. package/dist/esm/operations/predictions.js.map +1 -1
  112. package/dist/esm/operations/profiles.js +45 -52
  113. package/dist/esm/operations/profiles.js.map +1 -1
  114. package/dist/esm/operations/relationshipLinks.js +45 -52
  115. package/dist/esm/operations/relationshipLinks.js.map +1 -1
  116. package/dist/esm/operations/relationships.js +45 -52
  117. package/dist/esm/operations/relationships.js.map +1 -1
  118. package/dist/esm/operations/roleAssignments.js +34 -46
  119. package/dist/esm/operations/roleAssignments.js.map +1 -1
  120. package/dist/esm/operations/roles.js +23 -40
  121. package/dist/esm/operations/roles.js.map +1 -1
  122. package/dist/esm/operations/views.js +23 -40
  123. package/dist/esm/operations/views.js.map +1 -1
  124. package/dist/esm/operations/widgetTypes.js +23 -40
  125. package/dist/esm/operations/widgetTypes.js.map +1 -1
  126. package/dist/esm/pagingHelper.js +2 -4
  127. package/dist/esm/pagingHelper.js.map +1 -1
  128. package/dist/react-native/customerInsightsManagementClient.js +30 -5
  129. package/dist/react-native/customerInsightsManagementClient.js.map +1 -1
  130. package/dist/react-native/lroImpl.js +11 -3
  131. package/dist/react-native/lroImpl.js.map +1 -1
  132. package/dist/react-native/models/mappers.js +479 -230
  133. package/dist/react-native/models/mappers.js.map +1 -1
  134. package/dist/react-native/operations/authorizationPolicies.js +23 -40
  135. package/dist/react-native/operations/authorizationPolicies.js.map +1 -1
  136. package/dist/react-native/operations/connectorMappings.js +23 -40
  137. package/dist/react-native/operations/connectorMappings.js.map +1 -1
  138. package/dist/react-native/operations/connectors.js +45 -52
  139. package/dist/react-native/operations/connectors.js.map +1 -1
  140. package/dist/react-native/operations/hubs.js +56 -85
  141. package/dist/react-native/operations/hubs.js.map +1 -1
  142. package/dist/react-native/operations/images.js +1 -0
  143. package/dist/react-native/operations/images.js.map +1 -1
  144. package/dist/react-native/operations/interactions.js +34 -46
  145. package/dist/react-native/operations/interactions.js.map +1 -1
  146. package/dist/react-native/operations/kpi.js +45 -52
  147. package/dist/react-native/operations/kpi.js.map +1 -1
  148. package/dist/react-native/operations/links.js +34 -46
  149. package/dist/react-native/operations/links.js.map +1 -1
  150. package/dist/react-native/operations/operations.js +23 -40
  151. package/dist/react-native/operations/operations.js.map +1 -1
  152. package/dist/react-native/operations/predictions.js +45 -52
  153. package/dist/react-native/operations/predictions.js.map +1 -1
  154. package/dist/react-native/operations/profiles.js +45 -52
  155. package/dist/react-native/operations/profiles.js.map +1 -1
  156. package/dist/react-native/operations/relationshipLinks.js +45 -52
  157. package/dist/react-native/operations/relationshipLinks.js.map +1 -1
  158. package/dist/react-native/operations/relationships.js +45 -52
  159. package/dist/react-native/operations/relationships.js.map +1 -1
  160. package/dist/react-native/operations/roleAssignments.js +34 -46
  161. package/dist/react-native/operations/roleAssignments.js.map +1 -1
  162. package/dist/react-native/operations/roles.js +23 -40
  163. package/dist/react-native/operations/roles.js.map +1 -1
  164. package/dist/react-native/operations/views.js +23 -40
  165. package/dist/react-native/operations/views.js.map +1 -1
  166. package/dist/react-native/operations/widgetTypes.js +23 -40
  167. package/dist/react-native/operations/widgetTypes.js.map +1 -1
  168. package/dist/react-native/pagingHelper.js +2 -4
  169. package/dist/react-native/pagingHelper.js.map +1 -1
  170. package/package.json +2 -2
  171. /package/review/{arm-customerinsights.api.md → arm-customerinsights-node.api.md} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../src/operations/views.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,yCAAyC;AACzC,MAAM,OAAO,SAAS;IAGpB;;;OAGG;IACH,YAAY,MA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C,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,SAAS;KACrB;IACD,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Views } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n ViewResourceFormat,\n ViewsListByHubNextOptionalParams,\n ViewsListByHubOptionalParams,\n ViewsListByHubResponse,\n ViewsCreateOrUpdateOptionalParams,\n ViewsCreateOrUpdateResponse,\n ViewsGetOptionalParams,\n ViewsGetResponse,\n ViewsDeleteOptionalParams,\n ViewsListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Views operations. */\nexport class ViewsImpl implements Views {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Views class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all available views for given user in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param userId The user ID. Use * to retrieve hub level views.\n * @param options The options parameters.\n */\n public listByHub(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams\n ): PagedAsyncIterableIterator<ViewResourceFormat> {\n const iter = this.listByHubPagingAll(\n resourceGroupName,\n hubName,\n userId,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n userId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByHubPagingPage(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ViewResourceFormat[]> {\n let result: ViewsListByHubResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByHub(\n resourceGroupName,\n hubName,\n userId,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByHubNext(\n resourceGroupName,\n hubName,\n userId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByHubPagingAll(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams\n ): AsyncIterableIterator<ViewResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n userId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all available views for given user in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param userId The user ID. Use * to retrieve hub level views.\n * @param options The options parameters.\n */\n private _listByHub(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams\n ): Promise<ViewsListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, userId, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Creates a view or updates an existing view in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param viewName The name of the view.\n * @param parameters Parameters supplied to the CreateOrUpdate View operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n hubName: string,\n viewName: string,\n parameters: ViewResourceFormat,\n options?: ViewsCreateOrUpdateOptionalParams\n ): Promise<ViewsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, viewName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Gets a view in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param viewName The name of the view.\n * @param userId The user ID. Use * to retrieve hub level view.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n viewName: string,\n userId: string,\n options?: ViewsGetOptionalParams\n ): Promise<ViewsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, viewName, userId, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a view in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param viewName The name of the view.\n * @param userId The user ID. Use * to retrieve hub level view.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n hubName: string,\n viewName: string,\n userId: string,\n options?: ViewsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, viewName, userId, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListByHubNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param userId The user ID. Use * to retrieve hub level views.\n * @param nextLink The nextLink from the previous successful call to the ListByHub method.\n * @param options The options parameters.\n */\n private _listByHubNext(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n nextLink: string,\n options?: ViewsListByHubNextOptionalParams\n ): Promise<ViewsListByHubNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, userId, nextLink, options },\n listByHubNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewResourceFormat\n }\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.viewName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.viewName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.viewName1\n ],\n serializer\n};\nconst listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"views.js","sourceRoot":"","sources":["../../../src/operations/views.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAetD,4CAA4C;AAC5C,yCAAyC;AACzC,MAAM,OAAO,SAAS;IACH,MAAM,CAAmC;IAE1D;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,SAAS,CACd,iB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,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC;IAC3D,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { Views } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n ViewResourceFormat,\n ViewsListByHubNextOptionalParams,\n ViewsListByHubOptionalParams,\n ViewsListByHubResponse,\n ViewsCreateOrUpdateOptionalParams,\n ViewsCreateOrUpdateResponse,\n ViewsGetOptionalParams,\n ViewsGetResponse,\n ViewsDeleteOptionalParams,\n ViewsListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Views operations. */\nexport class ViewsImpl implements Views {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Views class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all available views for given user in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param userId The user ID. Use * to retrieve hub level views.\n * @param options The options parameters.\n */\n public listByHub(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams\n ): PagedAsyncIterableIterator<ViewResourceFormat> {\n const iter = this.listByHubPagingAll(\n resourceGroupName,\n hubName,\n userId,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n userId,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByHubPagingPage(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<ViewResourceFormat[]> {\n let result: ViewsListByHubResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByHub(\n resourceGroupName,\n hubName,\n userId,\n options\n );\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByHubNext(\n resourceGroupName,\n hubName,\n userId,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByHubPagingAll(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams\n ): AsyncIterableIterator<ViewResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n userId,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all available views for given user in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param userId The user ID. Use * to retrieve hub level views.\n * @param options The options parameters.\n */\n private _listByHub(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n options?: ViewsListByHubOptionalParams\n ): Promise<ViewsListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, userId, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Creates a view or updates an existing view in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param viewName The name of the view.\n * @param parameters Parameters supplied to the CreateOrUpdate View operation.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n hubName: string,\n viewName: string,\n parameters: ViewResourceFormat,\n options?: ViewsCreateOrUpdateOptionalParams\n ): Promise<ViewsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, viewName, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Gets a view in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param viewName The name of the view.\n * @param userId The user ID. Use * to retrieve hub level view.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n viewName: string,\n userId: string,\n options?: ViewsGetOptionalParams\n ): Promise<ViewsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, viewName, userId, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a view in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param viewName The name of the view.\n * @param userId The user ID. Use * to retrieve hub level view.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n hubName: string,\n viewName: string,\n userId: string,\n options?: ViewsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, viewName, userId, options },\n deleteOperationSpec\n );\n }\n\n /**\n * ListByHubNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param userId The user ID. Use * to retrieve hub level views.\n * @param nextLink The nextLink from the previous successful call to the ListByHub method.\n * @param options The options parameters.\n */\n private _listByHubNext(\n resourceGroupName: string,\n hubName: string,\n userId: string,\n nextLink: string,\n options?: ViewsListByHubNextOptionalParams\n ): Promise<ViewsListByHubNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, userId, nextLink, options },\n listByHubNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewResourceFormat\n }\n },\n requestBody: Parameters.parameters9,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.viewName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.viewName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/views/{viewName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.viewName1\n ],\n serializer\n};\nconst listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.ViewListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.userId],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -5,7 +5,6 @@
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
- import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
9
8
  import { setContinuationToken } from "../pagingHelper.js";
10
9
  import * as coreClient from "@azure/core-client";
11
10
  import * as Mappers from "../models/mappers.js";
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
13
12
  /// <reference lib="esnext.asynciterable" />
14
13
  /** Class containing WidgetTypes operations. */
15
14
  export class WidgetTypesImpl {
15
+ client;
16
16
  /**
17
17
  * Initialize a new instance of the class WidgetTypes class.
18
18
  * @param client Reference to the service client
@@ -36,52 +36,35 @@ export class WidgetTypesImpl {
36
36
  return this;
37
37
  },
38
38
  byPage: (settings) => {
39
- if (settings === null || settings === void 0 ? void 0 : settings.maxPageSize) {
39
+ if (settings?.maxPageSize) {
40
40
  throw new Error("maxPageSize is not supported by this operation.");
41
41
  }
42
42
  return this.listByHubPagingPage(resourceGroupName, hubName, options, settings);
43
43
  }
44
44
  };
45
45
  }
46
- listByHubPagingPage(resourceGroupName, hubName, options, settings) {
47
- return __asyncGenerator(this, arguments, function* listByHubPagingPage_1() {
48
- let result;
49
- let continuationToken = settings === null || settings === void 0 ? void 0 : settings.continuationToken;
50
- if (!continuationToken) {
51
- result = yield __await(this._listByHub(resourceGroupName, hubName, options));
52
- let page = result.value || [];
53
- continuationToken = result.nextLink;
54
- setContinuationToken(page, continuationToken);
55
- yield yield __await(page);
56
- }
57
- while (continuationToken) {
58
- result = yield __await(this._listByHubNext(resourceGroupName, hubName, continuationToken, options));
59
- continuationToken = result.nextLink;
60
- let page = result.value || [];
61
- setContinuationToken(page, continuationToken);
62
- yield yield __await(page);
63
- }
64
- });
46
+ async *listByHubPagingPage(resourceGroupName, hubName, options, settings) {
47
+ let result;
48
+ let continuationToken = settings?.continuationToken;
49
+ if (!continuationToken) {
50
+ result = await this._listByHub(resourceGroupName, hubName, options);
51
+ let page = result.value || [];
52
+ continuationToken = result.nextLink;
53
+ setContinuationToken(page, continuationToken);
54
+ yield page;
55
+ }
56
+ while (continuationToken) {
57
+ result = await this._listByHubNext(resourceGroupName, hubName, continuationToken, options);
58
+ continuationToken = result.nextLink;
59
+ let page = result.value || [];
60
+ setContinuationToken(page, continuationToken);
61
+ yield page;
62
+ }
65
63
  }
66
- listByHubPagingAll(resourceGroupName, hubName, options) {
67
- return __asyncGenerator(this, arguments, function* listByHubPagingAll_1() {
68
- var _a, e_1, _b, _c;
69
- try {
70
- for (var _d = true, _e = __asyncValues(this.listByHubPagingPage(resourceGroupName, hubName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
71
- _c = _f.value;
72
- _d = false;
73
- const page = _c;
74
- yield __await(yield* __asyncDelegator(__asyncValues(page)));
75
- }
76
- }
77
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
78
- finally {
79
- try {
80
- if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
81
- }
82
- finally { if (e_1) throw e_1.error; }
83
- }
84
- });
64
+ async *listByHubPagingAll(resourceGroupName, hubName, options) {
65
+ for await (const page of this.listByHubPagingPage(resourceGroupName, hubName, options)) {
66
+ yield* page;
67
+ }
85
68
  }
86
69
  /**
87
70
  * Gets all available widget types in the specified hub.
@@ -1 +1 @@
1
- {"version":3,"file":"widgetTypes.js","sourceRoot":"","sources":["../../../src/operations/widgetTypes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IAG1B;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,iBAAyB,EACzB,OAAe,EACf,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1E,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,mBAAmB,CAC7B,iBAAiB,EACjB,OAAO,EACP,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAEc,mBAAmB,CAChC,iBAAyB,EACzB,OAAe,EACf,OAA4C,EAC5C,QAAuB;;YAEvB,IAAI,MAAoC,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CAAC,wBAAwB;SAC7C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { WidgetTypes } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n WidgetTypeResourceFormat,\n WidgetTypesListByHubNextOptionalParams,\n WidgetTypesListByHubOptionalParams,\n WidgetTypesListByHubResponse,\n WidgetTypesGetOptionalParams,\n WidgetTypesGetResponse,\n WidgetTypesListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing WidgetTypes operations. */\nexport class WidgetTypesImpl implements WidgetTypes {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class WidgetTypes class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all available widget types in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n public listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams\n ): PagedAsyncIterableIterator<WidgetTypeResourceFormat> {\n const iter = this.listByHubPagingAll(resourceGroupName, hubName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByHubPagingPage(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<WidgetTypeResourceFormat[]> {\n let result: WidgetTypesListByHubResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByHub(resourceGroupName, hubName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByHubNext(\n resourceGroupName,\n hubName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByHubPagingAll(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams\n ): AsyncIterableIterator<WidgetTypeResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all available widget types in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n private _listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams\n ): Promise<WidgetTypesListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Gets a widget type in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param widgetTypeName The name of the widget type.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n widgetTypeName: string,\n options?: WidgetTypesGetOptionalParams\n ): Promise<WidgetTypesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, widgetTypeName, options },\n getOperationSpec\n );\n }\n\n /**\n * ListByHubNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param nextLink The nextLink from the previous successful call to the ListByHub method.\n * @param options The options parameters.\n */\n private _listByHubNext(\n resourceGroupName: string,\n hubName: string,\n nextLink: string,\n options?: WidgetTypesListByHubNextOptionalParams\n ): Promise<WidgetTypesListByHubNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, nextLink, options },\n listByHubNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/widgetTypes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WidgetTypeListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/widgetTypes/{widgetTypeName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WidgetTypeResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.widgetTypeName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WidgetTypeListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
1
+ {"version":3,"file":"widgetTypes.js","sourceRoot":"","sources":["../../../src/operations/widgetTypes.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAYtD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAM,OAAO,eAAe;IACT,MAAM,CAAmC;IAE1D;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,iBAAyB,EACzB,OAAe,EACf,OAA4C;QAE5C,MAAM,IAAI,GAAG,IAAI,CAAC,kBAAkB,CAAC,iBAAiB,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;QAC1E,OAAO;YACL,IAA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;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,qJAAqJ;IACvJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,wBAAwB;SAC7C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,0BAA0B,GAA6B;IAC3D,IAAI,EAAE,YAAY;IAClB,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,oBAAoB;SACzC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;KACpB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { setContinuationToken } from \"../pagingHelper.js\";\nimport { WidgetTypes } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { CustomerInsightsManagementClient } from \"../customerInsightsManagementClient.js\";\nimport {\n WidgetTypeResourceFormat,\n WidgetTypesListByHubNextOptionalParams,\n WidgetTypesListByHubOptionalParams,\n WidgetTypesListByHubResponse,\n WidgetTypesGetOptionalParams,\n WidgetTypesGetResponse,\n WidgetTypesListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing WidgetTypes operations. */\nexport class WidgetTypesImpl implements WidgetTypes {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class WidgetTypes class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all available widget types in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n public listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams\n ): PagedAsyncIterableIterator<WidgetTypeResourceFormat> {\n const iter = this.listByHubPagingAll(resourceGroupName, hubName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByHubPagingPage(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<WidgetTypeResourceFormat[]> {\n let result: WidgetTypesListByHubResponse;\n let continuationToken = settings?.continuationToken;\n if (!continuationToken) {\n result = await this._listByHub(resourceGroupName, hubName, options);\n let page = result.value || [];\n continuationToken = result.nextLink;\n setContinuationToken(page, continuationToken);\n yield page;\n }\n while (continuationToken) {\n result = await this._listByHubNext(\n resourceGroupName,\n hubName,\n continuationToken,\n options\n );\n continuationToken = result.nextLink;\n let page = result.value || [];\n setContinuationToken(page, continuationToken);\n yield page;\n }\n }\n\n private async *listByHubPagingAll(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams\n ): AsyncIterableIterator<WidgetTypeResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets all available widget types in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param options The options parameters.\n */\n private _listByHub(\n resourceGroupName: string,\n hubName: string,\n options?: WidgetTypesListByHubOptionalParams\n ): Promise<WidgetTypesListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Gets a widget type in the specified hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param widgetTypeName The name of the widget type.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n widgetTypeName: string,\n options?: WidgetTypesGetOptionalParams\n ): Promise<WidgetTypesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, widgetTypeName, options },\n getOperationSpec\n );\n }\n\n /**\n * ListByHubNext\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param nextLink The nextLink from the previous successful call to the ListByHub method.\n * @param options The options parameters.\n */\n private _listByHubNext(\n resourceGroupName: string,\n hubName: string,\n nextLink: string,\n options?: WidgetTypesListByHubNextOptionalParams\n ): Promise<WidgetTypesListByHubNextResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, nextLink, options },\n listByHubNextOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/widgetTypes\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WidgetTypeListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/widgetTypes/{widgetTypeName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WidgetTypeResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.widgetTypeName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WidgetTypeListResult\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.nextLink,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
@@ -14,18 +14,16 @@ const pageMap = new WeakMap();
14
14
  * @returns The continuation token that can be passed into byPage().
15
15
  */
16
16
  export function getContinuationToken(page) {
17
- var _a;
18
17
  if (typeof page !== "object" || page === null) {
19
18
  return undefined;
20
19
  }
21
- return (_a = pageMap.get(page)) === null || _a === void 0 ? void 0 : _a.continuationToken;
20
+ return pageMap.get(page)?.continuationToken;
22
21
  }
23
22
  export function setContinuationToken(page, continuationToken) {
24
- var _a;
25
23
  if (typeof page !== "object" || page === null || !continuationToken) {
26
24
  return;
27
25
  }
28
- const pageInfo = (_a = pageMap.get(page)) !== null && _a !== void 0 ? _a : {};
26
+ const pageInfo = pageMap.get(page) ?? {};
29
27
  pageInfo.continuationToken = continuationToken;
30
28
  pageMap.set(page, pageInfo);
31
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,mCAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
1
+ {"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAa;IAChD,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,IAAa,EACb,iBAAqC;IAErC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACpE,OAAO;IACT,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACzC,QAAQ,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC/C,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nexport interface PageInfo {\n continuationToken?: string;\n}\n\nconst pageMap = new WeakMap<object, PageInfo>();\n\n/**\n * Given a result page from a pageable operation, returns a\n * continuation token that can be used to begin paging from\n * that point later.\n * @param page A result object from calling .byPage() on a paged operation.\n * @returns The continuation token that can be passed into byPage().\n */\nexport function getContinuationToken(page: unknown): string | undefined {\n if (typeof page !== \"object\" || page === null) {\n return undefined;\n }\n return pageMap.get(page)?.continuationToken;\n}\n\nexport function setContinuationToken(\n page: unknown,\n continuationToken: string | undefined\n): void {\n if (typeof page !== \"object\" || page === null || !continuationToken) {\n return;\n }\n const pageInfo = pageMap.get(page) ?? {};\n pageInfo.continuationToken = continuationToken;\n pageMap.set(page, pageInfo);\n}\n"]}
@@ -13,6 +13,9 @@ const coreClient = tslib_1.__importStar(require("@azure/core-client"));
13
13
  const coreRestPipeline = tslib_1.__importStar(require("@azure/core-rest-pipeline"));
14
14
  const index_js_1 = require("./operations/index.js");
15
15
  class CustomerInsightsManagementClient extends coreClient.ServiceClient {
16
+ $host;
17
+ apiVersion;
18
+ subscriptionId;
16
19
  /**
17
20
  * Initializes a new instance of the CustomerInsightsManagementClient class.
18
21
  * @param credentials Subscription credentials which uniquely identify client subscription.
@@ -21,7 +24,6 @@ class CustomerInsightsManagementClient extends coreClient.ServiceClient {
21
24
  * @param options The parameter options
22
25
  */
23
26
  constructor(credentials, subscriptionId, options) {
24
- var _a, _b, _c;
25
27
  if (credentials === undefined) {
26
28
  throw new Error("'credentials' cannot be null");
27
29
  }
@@ -40,12 +42,17 @@ class CustomerInsightsManagementClient extends coreClient.ServiceClient {
40
42
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
41
43
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
42
44
  : `${packageDetails}`;
43
- const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
45
+ const optionsWithDefaults = {
46
+ ...defaults,
47
+ ...options,
48
+ userAgentOptions: {
44
49
  userAgentPrefix
45
- }, endpoint: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
50
+ },
51
+ endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
52
+ };
46
53
  super(optionsWithDefaults);
47
54
  let bearerTokenAuthenticationPolicyFound = false;
48
- if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
55
+ if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
49
56
  const pipelinePolicies = options.pipeline.getOrderedPolicies();
50
57
  bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
51
58
  coreRestPipeline.bearerTokenAuthenticationPolicyName);
@@ -59,7 +66,8 @@ class CustomerInsightsManagementClient extends coreClient.ServiceClient {
59
66
  });
60
67
  this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
61
68
  credential: credentials,
62
- scopes: (_c = optionsWithDefaults.credentialScopes) !== null && _c !== void 0 ? _c : `${optionsWithDefaults.endpoint}/.default`,
69
+ scopes: optionsWithDefaults.credentialScopes ??
70
+ `${optionsWithDefaults.endpoint}/.default`,
63
71
  challengeCallbacks: {
64
72
  authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
65
73
  }
@@ -114,6 +122,23 @@ class CustomerInsightsManagementClient extends coreClient.ServiceClient {
114
122
  };
115
123
  this.pipeline.addPolicy(apiVersionPolicy);
116
124
  }
125
+ operations;
126
+ hubs;
127
+ profiles;
128
+ interactions;
129
+ relationships;
130
+ relationshipLinks;
131
+ authorizationPolicies;
132
+ connectors;
133
+ connectorMappings;
134
+ kpi;
135
+ widgetTypes;
136
+ views;
137
+ links;
138
+ roles;
139
+ roleAssignments;
140
+ images;
141
+ predictions;
117
142
  }
118
143
  exports.CustomerInsightsManagementClient = CustomerInsightsManagementClient;
119
144
  //# sourceMappingURL=customerInsightsManagementClient.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customerInsightsManagementClient.js","sourceRoot":"","sources":["../../src/customerInsightsManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAkB+B;AAsB/B,MAAa,gCAAiC,SAAQ,UAAU,CAAC,aAAa;IAK5E;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAwD;;QAExD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmD;YAC/D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,qCAAqC,CAAC;QAC7D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ,EACN,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,8BAA8B,GACxE,CAAC;QACF,KAAK,CAAC,mBAAmB,CAAC,CAAC;QAE3B,IAAI,oCAAoC,GAAY,KAAK,CAAC;QAC1D,IAAI,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,KAAI,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AAK,CAAC,WAAW,CACf,OAAwB,EACxB,IAAiB;gBAEjB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAmBF;AAxJD,4EAwJC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n HubsImpl,\n ProfilesImpl,\n InteractionsImpl,\n RelationshipsImpl,\n RelationshipLinksImpl,\n AuthorizationPoliciesImpl,\n ConnectorsImpl,\n ConnectorMappingsImpl,\n KpiImpl,\n WidgetTypesImpl,\n ViewsImpl,\n LinksImpl,\n RolesImpl,\n RoleAssignmentsImpl,\n ImagesImpl,\n PredictionsImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n Hubs,\n Profiles,\n Interactions,\n Relationships,\n RelationshipLinks,\n AuthorizationPolicies,\n Connectors,\n ConnectorMappings,\n Kpi,\n WidgetTypes,\n Views,\n Links,\n Roles,\n RoleAssignments,\n Images,\n Predictions\n} from \"./operationsInterfaces/index.js\";\nimport { CustomerInsightsManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class CustomerInsightsManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CustomerInsightsManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure\n * subscription. The subscription ID forms part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CustomerInsightsManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CustomerInsightsManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-customerinsights/4.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2017-04-26\";\n this.operations = new OperationsImpl(this);\n this.hubs = new HubsImpl(this);\n this.profiles = new ProfilesImpl(this);\n this.interactions = new InteractionsImpl(this);\n this.relationships = new RelationshipsImpl(this);\n this.relationshipLinks = new RelationshipLinksImpl(this);\n this.authorizationPolicies = new AuthorizationPoliciesImpl(this);\n this.connectors = new ConnectorsImpl(this);\n this.connectorMappings = new ConnectorMappingsImpl(this);\n this.kpi = new KpiImpl(this);\n this.widgetTypes = new WidgetTypesImpl(this);\n this.views = new ViewsImpl(this);\n this.links = new LinksImpl(this);\n this.roles = new RolesImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.images = new ImagesImpl(this);\n this.predictions = new PredictionsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n operations: Operations;\n hubs: Hubs;\n profiles: Profiles;\n interactions: Interactions;\n relationships: Relationships;\n relationshipLinks: RelationshipLinks;\n authorizationPolicies: AuthorizationPolicies;\n connectors: Connectors;\n connectorMappings: ConnectorMappings;\n kpi: Kpi;\n widgetTypes: WidgetTypes;\n views: Views;\n links: Links;\n roles: Roles;\n roleAssignments: RoleAssignments;\n images: Images;\n predictions: Predictions;\n}\n"]}
1
+ {"version":3,"file":"customerInsightsManagementClient.js","sourceRoot":"","sources":["../../src/customerInsightsManagementClient.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAEH,uEAAiD;AACjD,oFAA8D;AAO9D,oDAkB+B;AAsB/B,MAAa,gCAAiC,SAAQ,UAAU,CAAC,aAAa;IAC5E,KAAK,CAAS;IACd,UAAU,CAAS;IACnB,cAAc,CAAS;IAEvB;;;;;;OAMG;IACH,YACE,WAAqC,EACrC,cAAsB,EACtB,OAAwD;QAExD,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;QAClD,CAAC;QACD,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;QACrD,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAAmD;YAC/D,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAA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YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU,CAAa;IACvB,IAAI,CAAO;IACX,QAAQ,CAAW;IACnB,YAAY,CAAe;IAC3B,aAAa,CAAgB;IAC7B,iBAAiB,CAAoB;IACrC,qBAAqB,CAAwB;IAC7C,UAAU,CAAa;IACvB,iBAAiB,CAAoB;IACrC,GAAG,CAAM;IACT,WAAW,CAAc;IACzB,KAAK,CAAQ;IACb,KAAK,CAAQ;IACb,KAAK,CAAQ;IACb,eAAe,CAAkB;IACjC,MAAM,CAAS;IACf,WAAW,CAAc;CAC1B;AAxJD,4EAwJC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport * as coreRestPipeline from \"@azure/core-rest-pipeline\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest\n} from \"@azure/core-rest-pipeline\";\nimport * as coreAuth from \"@azure/core-auth\";\nimport {\n OperationsImpl,\n HubsImpl,\n ProfilesImpl,\n InteractionsImpl,\n RelationshipsImpl,\n RelationshipLinksImpl,\n AuthorizationPoliciesImpl,\n ConnectorsImpl,\n ConnectorMappingsImpl,\n KpiImpl,\n WidgetTypesImpl,\n ViewsImpl,\n LinksImpl,\n RolesImpl,\n RoleAssignmentsImpl,\n ImagesImpl,\n PredictionsImpl\n} from \"./operations/index.js\";\nimport {\n Operations,\n Hubs,\n Profiles,\n Interactions,\n Relationships,\n RelationshipLinks,\n AuthorizationPolicies,\n Connectors,\n ConnectorMappings,\n Kpi,\n WidgetTypes,\n Views,\n Links,\n Roles,\n RoleAssignments,\n Images,\n Predictions\n} from \"./operationsInterfaces/index.js\";\nimport { CustomerInsightsManagementClientOptionalParams } from \"./models/index.js\";\n\nexport class CustomerInsightsManagementClient extends coreClient.ServiceClient {\n $host: string;\n apiVersion: string;\n subscriptionId: string;\n\n /**\n * Initializes a new instance of the CustomerInsightsManagementClient class.\n * @param credentials Subscription credentials which uniquely identify client subscription.\n * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure\n * subscription. The subscription ID forms part of the URI for every service call.\n * @param options The parameter options\n */\n constructor(\n credentials: coreAuth.TokenCredential,\n subscriptionId: string,\n options?: CustomerInsightsManagementClientOptionalParams\n ) {\n if (credentials === undefined) {\n throw new Error(\"'credentials' cannot be null\");\n }\n if (subscriptionId === undefined) {\n throw new Error(\"'subscriptionId' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: CustomerInsightsManagementClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n credential: credentials\n };\n\n const packageDetails = `azsdk-js-arm-customerinsights/4.1.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix\n },\n endpoint:\n options.endpoint ?? options.baseUri ?? \"https://management.azure.com\"\n };\n super(optionsWithDefaults);\n\n let bearerTokenAuthenticationPolicyFound: boolean = false;\n if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {\n const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();\n bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(\n (pipelinePolicy) =>\n pipelinePolicy.name ===\n coreRestPipeline.bearerTokenAuthenticationPolicyName\n );\n }\n if (\n !options ||\n !options.pipeline ||\n options.pipeline.getOrderedPolicies().length == 0 ||\n !bearerTokenAuthenticationPolicyFound\n ) {\n this.pipeline.removePolicy({\n name: coreRestPipeline.bearerTokenAuthenticationPolicyName\n });\n this.pipeline.addPolicy(\n coreRestPipeline.bearerTokenAuthenticationPolicy({\n credential: credentials,\n scopes:\n optionsWithDefaults.credentialScopes ??\n `${optionsWithDefaults.endpoint}/.default`,\n challengeCallbacks: {\n authorizeRequestOnChallenge:\n coreClient.authorizeRequestOnClaimChallenge\n }\n })\n );\n }\n // Parameter assignments\n this.subscriptionId = subscriptionId;\n\n // Assigning values to Constant parameters\n this.$host = options.$host || \"https://management.azure.com\";\n this.apiVersion = options.apiVersion || \"2017-04-26\";\n this.operations = new OperationsImpl(this);\n this.hubs = new HubsImpl(this);\n this.profiles = new ProfilesImpl(this);\n this.interactions = new InteractionsImpl(this);\n this.relationships = new RelationshipsImpl(this);\n this.relationshipLinks = new RelationshipLinksImpl(this);\n this.authorizationPolicies = new AuthorizationPoliciesImpl(this);\n this.connectors = new ConnectorsImpl(this);\n this.connectorMappings = new ConnectorMappingsImpl(this);\n this.kpi = new KpiImpl(this);\n this.widgetTypes = new WidgetTypesImpl(this);\n this.views = new ViewsImpl(this);\n this.links = new LinksImpl(this);\n this.roles = new RolesImpl(this);\n this.roleAssignments = new RoleAssignmentsImpl(this);\n this.images = new ImagesImpl(this);\n this.predictions = new PredictionsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n }\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n operations: Operations;\n hubs: Hubs;\n profiles: Profiles;\n interactions: Interactions;\n relationships: Relationships;\n relationshipLinks: RelationshipLinks;\n authorizationPolicies: AuthorizationPolicies;\n connectors: Connectors;\n connectorMappings: ConnectorMappings;\n kpi: Kpi;\n widgetTypes: WidgetTypes;\n views: Views;\n links: Links;\n roles: Roles;\n roleAssignments: RoleAssignments;\n images: Images;\n predictions: Predictions;\n}\n"]}
@@ -8,8 +8,12 @@
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
10
  exports.LroImpl = void 0;
11
- const tslib_1 = require("tslib");
12
11
  class LroImpl {
12
+ sendOperationFn;
13
+ args;
14
+ spec;
15
+ requestPath;
16
+ requestMethod;
13
17
  constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
14
18
  this.sendOperationFn = sendOperationFn;
15
19
  this.args = args;
@@ -21,8 +25,12 @@ class LroImpl {
21
25
  return this.sendOperationFn(this.args, this.spec);
22
26
  }
23
27
  async sendPollRequest(path) {
24
- const _a = this.spec, { requestBody } = _a, restSpec = tslib_1.__rest(_a, ["requestBody"]);
25
- return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
28
+ const { requestBody, ...restSpec } = this.spec;
29
+ return this.sendOperationFn(this.args, {
30
+ ...restSpec,
31
+ path,
32
+ httpMethod: "GET"
33
+ });
26
34
  }
27
35
  }
28
36
  exports.LroImpl = LroImpl;
@@ -1 +1 @@
1
- {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAIH,MAAa,OAAO;IAClB,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,KAA+B,IAAI,CAAC,IAAI,EAAxC,EAAE,WAAW,OAA2B,EAAtB,QAAQ,sBAA1B,eAA4B,CAAY,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,kCAChC,QAAQ,KACX,IAAI,EACJ,UAAU,EAAE,KAAK,IACjB,CAAC;IACL,CAAC;CACF;AAvBD,0BAuBC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}
1
+ {"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH,MAAa,OAAO;IAER;IACA;IACA;IAKD;IACA;IATT,YACU,eAAkE,EAClE,IAA6B,EAC7B,IAIe,EAChB,cAAsB,IAAI,CAAC,IAAK,EAChC,gBAAwB,IAAI,CAAC,UAAU;QARtC,oBAAe,GAAf,eAAe,CAAmD;QAClE,SAAI,GAAJ,IAAI,CAAyB;QAC7B,SAAI,GAAJ,IAAI,CAIW;QAChB,gBAAW,GAAX,WAAW,CAAqB;QAChC,kBAAa,GAAb,aAAa,CAA0B;IAC7C,CAAC;IACG,KAAK,CAAC,kBAAkB;QAC7B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IACM,KAAK,CAAC,eAAe,CAAC,IAAY;QACvC,MAAM,EAAE,WAAW,EAAE,GAAG,QAAQ,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC;QAC/C,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE;YACrC,GAAG,QAAQ;YACX,IAAI;YACJ,UAAU,EAAE,KAAK;SAClB,CAAC,CAAC;IACL,CAAC;CACF;AAvBD,0BAuBC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { LongRunningOperation, LroResponse } from \"@azure/core-lro\";\n\nexport class LroImpl<T> implements LongRunningOperation<T> {\n constructor(\n private sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>,\n private args: Record<string, unknown>,\n private spec: {\n readonly requestBody?: unknown;\n readonly path?: string;\n readonly httpMethod: string;\n } & Record<string, any>,\n public requestPath: string = spec.path!,\n public requestMethod: string = spec.httpMethod\n ) {}\n public async sendInitialRequest(): Promise<LroResponse<T>> {\n return this.sendOperationFn(this.args, this.spec);\n }\n public async sendPollRequest(path: string): Promise<LroResponse<T>> {\n const { requestBody, ...restSpec } = this.spec;\n return this.sendOperationFn(this.args, {\n ...restSpec,\n path,\n httpMethod: \"GET\"\n });\n }\n}\n"]}