@azure/arm-customerinsights 4.1.1-alpha.20250618.1 → 4.1.1-alpha.20250718.2
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.
- package/dist/browser/customerInsightsManagementClient.js +30 -5
- package/dist/browser/customerInsightsManagementClient.js.map +1 -1
- package/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +479 -230
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/authorizationPolicies.js +23 -40
- package/dist/browser/operations/authorizationPolicies.js.map +1 -1
- package/dist/browser/operations/connectorMappings.js +23 -40
- package/dist/browser/operations/connectorMappings.js.map +1 -1
- package/dist/browser/operations/connectors.js +45 -52
- package/dist/browser/operations/connectors.js.map +1 -1
- package/dist/browser/operations/hubs.js +56 -85
- package/dist/browser/operations/hubs.js.map +1 -1
- package/dist/browser/operations/images.js +1 -0
- package/dist/browser/operations/images.js.map +1 -1
- package/dist/browser/operations/interactions.js +34 -46
- package/dist/browser/operations/interactions.js.map +1 -1
- package/dist/browser/operations/kpi.js +45 -52
- package/dist/browser/operations/kpi.js.map +1 -1
- package/dist/browser/operations/links.js +34 -46
- package/dist/browser/operations/links.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/predictions.js +45 -52
- package/dist/browser/operations/predictions.js.map +1 -1
- package/dist/browser/operations/profiles.js +45 -52
- package/dist/browser/operations/profiles.js.map +1 -1
- package/dist/browser/operations/relationshipLinks.js +45 -52
- package/dist/browser/operations/relationshipLinks.js.map +1 -1
- package/dist/browser/operations/relationships.js +45 -52
- package/dist/browser/operations/relationships.js.map +1 -1
- package/dist/browser/operations/roleAssignments.js +34 -46
- package/dist/browser/operations/roleAssignments.js.map +1 -1
- package/dist/browser/operations/roles.js +23 -40
- package/dist/browser/operations/roles.js.map +1 -1
- package/dist/browser/operations/views.js +23 -40
- package/dist/browser/operations/views.js.map +1 -1
- package/dist/browser/operations/widgetTypes.js +23 -40
- package/dist/browser/operations/widgetTypes.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/customerInsightsManagementClient.js +30 -5
- package/dist/commonjs/customerInsightsManagementClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +479 -230
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/authorizationPolicies.js +23 -39
- package/dist/commonjs/operations/authorizationPolicies.js.map +1 -1
- package/dist/commonjs/operations/connectorMappings.js +23 -39
- package/dist/commonjs/operations/connectorMappings.js.map +1 -1
- package/dist/commonjs/operations/connectors.js +45 -51
- package/dist/commonjs/operations/connectors.js.map +1 -1
- package/dist/commonjs/operations/hubs.js +56 -84
- package/dist/commonjs/operations/hubs.js.map +1 -1
- package/dist/commonjs/operations/images.js +1 -0
- package/dist/commonjs/operations/images.js.map +1 -1
- package/dist/commonjs/operations/interactions.js +34 -45
- package/dist/commonjs/operations/interactions.js.map +1 -1
- package/dist/commonjs/operations/kpi.js +45 -51
- package/dist/commonjs/operations/kpi.js.map +1 -1
- package/dist/commonjs/operations/links.js +34 -45
- package/dist/commonjs/operations/links.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/predictions.js +45 -51
- package/dist/commonjs/operations/predictions.js.map +1 -1
- package/dist/commonjs/operations/profiles.js +45 -51
- package/dist/commonjs/operations/profiles.js.map +1 -1
- package/dist/commonjs/operations/relationshipLinks.js +45 -51
- package/dist/commonjs/operations/relationshipLinks.js.map +1 -1
- package/dist/commonjs/operations/relationships.js +45 -51
- package/dist/commonjs/operations/relationships.js.map +1 -1
- package/dist/commonjs/operations/roleAssignments.js +34 -45
- package/dist/commonjs/operations/roleAssignments.js.map +1 -1
- package/dist/commonjs/operations/roles.js +23 -39
- package/dist/commonjs/operations/roles.js.map +1 -1
- package/dist/commonjs/operations/views.js +23 -39
- package/dist/commonjs/operations/views.js.map +1 -1
- package/dist/commonjs/operations/widgetTypes.js +23 -39
- package/dist/commonjs/operations/widgetTypes.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/customerInsightsManagementClient.js +30 -5
- package/dist/esm/customerInsightsManagementClient.js.map +1 -1
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +479 -230
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/authorizationPolicies.js +23 -40
- package/dist/esm/operations/authorizationPolicies.js.map +1 -1
- package/dist/esm/operations/connectorMappings.js +23 -40
- package/dist/esm/operations/connectorMappings.js.map +1 -1
- package/dist/esm/operations/connectors.js +45 -52
- package/dist/esm/operations/connectors.js.map +1 -1
- package/dist/esm/operations/hubs.js +56 -85
- package/dist/esm/operations/hubs.js.map +1 -1
- package/dist/esm/operations/images.js +1 -0
- package/dist/esm/operations/images.js.map +1 -1
- package/dist/esm/operations/interactions.js +34 -46
- package/dist/esm/operations/interactions.js.map +1 -1
- package/dist/esm/operations/kpi.js +45 -52
- package/dist/esm/operations/kpi.js.map +1 -1
- package/dist/esm/operations/links.js +34 -46
- package/dist/esm/operations/links.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/predictions.js +45 -52
- package/dist/esm/operations/predictions.js.map +1 -1
- package/dist/esm/operations/profiles.js +45 -52
- package/dist/esm/operations/profiles.js.map +1 -1
- package/dist/esm/operations/relationshipLinks.js +45 -52
- package/dist/esm/operations/relationshipLinks.js.map +1 -1
- package/dist/esm/operations/relationships.js +45 -52
- package/dist/esm/operations/relationships.js.map +1 -1
- package/dist/esm/operations/roleAssignments.js +34 -46
- package/dist/esm/operations/roleAssignments.js.map +1 -1
- package/dist/esm/operations/roles.js +23 -40
- package/dist/esm/operations/roles.js.map +1 -1
- package/dist/esm/operations/views.js +23 -40
- package/dist/esm/operations/views.js.map +1 -1
- package/dist/esm/operations/widgetTypes.js +23 -40
- package/dist/esm/operations/widgetTypes.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/customerInsightsManagementClient.js +30 -5
- package/dist/react-native/customerInsightsManagementClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +479 -230
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/authorizationPolicies.js +23 -40
- package/dist/react-native/operations/authorizationPolicies.js.map +1 -1
- package/dist/react-native/operations/connectorMappings.js +23 -40
- package/dist/react-native/operations/connectorMappings.js.map +1 -1
- package/dist/react-native/operations/connectors.js +45 -52
- package/dist/react-native/operations/connectors.js.map +1 -1
- package/dist/react-native/operations/hubs.js +56 -85
- package/dist/react-native/operations/hubs.js.map +1 -1
- package/dist/react-native/operations/images.js +1 -0
- package/dist/react-native/operations/images.js.map +1 -1
- package/dist/react-native/operations/interactions.js +34 -46
- package/dist/react-native/operations/interactions.js.map +1 -1
- package/dist/react-native/operations/kpi.js +45 -52
- package/dist/react-native/operations/kpi.js.map +1 -1
- package/dist/react-native/operations/links.js +34 -46
- package/dist/react-native/operations/links.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/predictions.js +45 -52
- package/dist/react-native/operations/predictions.js.map +1 -1
- package/dist/react-native/operations/profiles.js +45 -52
- package/dist/react-native/operations/profiles.js.map +1 -1
- package/dist/react-native/operations/relationshipLinks.js +45 -52
- package/dist/react-native/operations/relationshipLinks.js.map +1 -1
- package/dist/react-native/operations/relationships.js +45 -52
- package/dist/react-native/operations/relationships.js.map +1 -1
- package/dist/react-native/operations/roleAssignments.js +34 -46
- package/dist/react-native/operations/roleAssignments.js.map +1 -1
- package/dist/react-native/operations/roles.js +23 -40
- package/dist/react-native/operations/roles.js.map +1 -1
- package/dist/react-native/operations/views.js +23 -40
- package/dist/react-native/operations/views.js.map +1 -1
- package/dist/react-native/operations/widgetTypes.js +23 -40
- package/dist/react-native/operations/widgetTypes.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- /package/review/{arm-customerinsights.api.md → arm-customerinsights-node.api.md} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetTypes.js","sourceRoot":"","sources":["../../../src/operations/widgetTypes.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAa,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,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AAiB;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"]}
|
|
1
|
+
{"version":3,"file":"widgetTypes.js","sourceRoot":"","sources":["../../../src/operations/widgetTypes.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;AAGH,wDAA0D;AAE1D,uEAAiD;AACjD,sEAAgD;AAChD,4EAAsD;AAYtD,4CAA4C;AAC5C,+CAA+C;AAC/C,MAAa,eAAe;IACT,MAAM,CAAmC;IAE1D;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,iBA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cesContent":["/*\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"]}
|
|
@@ -18,18 +18,16 @@ const pageMap = new WeakMap();
|
|
|
18
18
|
* @returns The continuation token that can be passed into byPage().
|
|
19
19
|
*/
|
|
20
20
|
function getContinuationToken(page) {
|
|
21
|
-
var _a;
|
|
22
21
|
if (typeof page !== "object" || page === null) {
|
|
23
22
|
return undefined;
|
|
24
23
|
}
|
|
25
|
-
return
|
|
24
|
+
return pageMap.get(page)?.continuationToken;
|
|
26
25
|
}
|
|
27
26
|
function setContinuationToken(page, continuationToken) {
|
|
28
|
-
var _a;
|
|
29
27
|
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
30
28
|
return;
|
|
31
29
|
}
|
|
32
|
-
const pageInfo =
|
|
30
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
33
31
|
pageInfo.continuationToken = continuationToken;
|
|
34
32
|
pageMap.set(page, pageInfo);
|
|
35
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,oBAAoB,CAAC,IAAa
|
|
1
|
+
{"version":3,"file":"pagingHelper.js","sourceRoot":"","sources":["../../src/pagingHelper.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAeH,oDAKC;AAED,oDAUC;AA1BD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAoB,CAAC;AAEhD;;;;;;GAMG;AACH,SAAgB,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,SAAgB,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"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.52.8"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.52.8"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -9,6 +9,9 @@ import * as coreClient from "@azure/core-client";
|
|
|
9
9
|
import * as coreRestPipeline from "@azure/core-rest-pipeline";
|
|
10
10
|
import { OperationsImpl, HubsImpl, ProfilesImpl, InteractionsImpl, RelationshipsImpl, RelationshipLinksImpl, AuthorizationPoliciesImpl, ConnectorsImpl, ConnectorMappingsImpl, KpiImpl, WidgetTypesImpl, ViewsImpl, LinksImpl, RolesImpl, RoleAssignmentsImpl, ImagesImpl, PredictionsImpl } from "./operations/index.js";
|
|
11
11
|
export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
|
|
12
|
+
$host;
|
|
13
|
+
apiVersion;
|
|
14
|
+
subscriptionId;
|
|
12
15
|
/**
|
|
13
16
|
* Initializes a new instance of the CustomerInsightsManagementClient class.
|
|
14
17
|
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
@@ -17,7 +20,6 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
|
|
|
17
20
|
* @param options The parameter options
|
|
18
21
|
*/
|
|
19
22
|
constructor(credentials, subscriptionId, options) {
|
|
20
|
-
var _a, _b, _c;
|
|
21
23
|
if (credentials === undefined) {
|
|
22
24
|
throw new Error("'credentials' cannot be null");
|
|
23
25
|
}
|
|
@@ -36,12 +38,17 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
|
|
|
36
38
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
37
39
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
38
40
|
: `${packageDetails}`;
|
|
39
|
-
const optionsWithDefaults =
|
|
41
|
+
const optionsWithDefaults = {
|
|
42
|
+
...defaults,
|
|
43
|
+
...options,
|
|
44
|
+
userAgentOptions: {
|
|
40
45
|
userAgentPrefix
|
|
41
|
-
},
|
|
46
|
+
},
|
|
47
|
+
endpoint: options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
48
|
+
};
|
|
42
49
|
super(optionsWithDefaults);
|
|
43
50
|
let bearerTokenAuthenticationPolicyFound = false;
|
|
44
|
-
if (
|
|
51
|
+
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
45
52
|
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
46
53
|
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
47
54
|
coreRestPipeline.bearerTokenAuthenticationPolicyName);
|
|
@@ -55,7 +62,8 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
|
|
|
55
62
|
});
|
|
56
63
|
this.pipeline.addPolicy(coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
57
64
|
credential: credentials,
|
|
58
|
-
scopes:
|
|
65
|
+
scopes: optionsWithDefaults.credentialScopes ??
|
|
66
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
59
67
|
challengeCallbacks: {
|
|
60
68
|
authorizeRequestOnChallenge: coreClient.authorizeRequestOnClaimChallenge
|
|
61
69
|
}
|
|
@@ -110,5 +118,22 @@ export class CustomerInsightsManagementClient extends coreClient.ServiceClient {
|
|
|
110
118
|
};
|
|
111
119
|
this.pipeline.addPolicy(apiVersionPolicy);
|
|
112
120
|
}
|
|
121
|
+
operations;
|
|
122
|
+
hubs;
|
|
123
|
+
profiles;
|
|
124
|
+
interactions;
|
|
125
|
+
relationships;
|
|
126
|
+
relationshipLinks;
|
|
127
|
+
authorizationPolicies;
|
|
128
|
+
connectors;
|
|
129
|
+
connectorMappings;
|
|
130
|
+
kpi;
|
|
131
|
+
widgetTypes;
|
|
132
|
+
views;
|
|
133
|
+
links;
|
|
134
|
+
roles;
|
|
135
|
+
roleAssignments;
|
|
136
|
+
images;
|
|
137
|
+
predictions;
|
|
113
138
|
}
|
|
114
139
|
//# sourceMappingURL=customerInsightsManagementClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customerInsightsManagementClient.js","sourceRoot":"","sources":["../../src/customerInsightsManagementClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,OAAO,EACP,eAAe,EACf,SAAS,EACT,SAAS,EACT,SAAS,EACT,mBAAmB,EACnB,UAAU,EACV,eAAe,EAChB,MAAM,uBAAuB,CAAC;AAsB/B,MAAM,OAAO,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;YAC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AI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,IAAI,eAAe,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,yBAAyB,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,CAAC;IAED,8GAA8G;IACtG,yBAAyB,CAAC,UAAmB;QACnD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QACD,MAAM,gBAAgB,GAAG;YACvB,IAAI,EAAE,wBAAwB;YAC9B,KAAK,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","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,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAC;AAO9D,OAAO,EACL,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,EACzB,cAAc,EACd,qBAAqB,EACrB,OAAO,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iB;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;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","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"]}
|
package/dist/esm/lroImpl.js
CHANGED
|
@@ -5,8 +5,12 @@
|
|
|
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 { __rest } from "tslib";
|
|
9
8
|
export class LroImpl {
|
|
9
|
+
sendOperationFn;
|
|
10
|
+
args;
|
|
11
|
+
spec;
|
|
12
|
+
requestPath;
|
|
13
|
+
requestMethod;
|
|
10
14
|
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
11
15
|
this.sendOperationFn = sendOperationFn;
|
|
12
16
|
this.args = args;
|
|
@@ -18,8 +22,12 @@ export class LroImpl {
|
|
|
18
22
|
return this.sendOperationFn(this.args, this.spec);
|
|
19
23
|
}
|
|
20
24
|
async sendPollRequest(path) {
|
|
21
|
-
const
|
|
22
|
-
return this.sendOperationFn(this.args,
|
|
25
|
+
const { requestBody, ...restSpec } = this.spec;
|
|
26
|
+
return this.sendOperationFn(this.args, {
|
|
27
|
+
...restSpec,
|
|
28
|
+
path,
|
|
29
|
+
httpMethod: "GET"
|
|
30
|
+
});
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
33
|
//# sourceMappingURL=lroImpl.js.map
|
package/dist/esm/lroImpl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"lroImpl.js","sourceRoot":"","sources":["../../src/lroImpl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,OAAO,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","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"]}
|