@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":"interactions.js","sourceRoot":"","sources":["../../../src/operations/interactions.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,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAexC,4CAA4C;AAC5C,gDAAgD;AAChD,MAAM,OAAO,gBAAgB;IAG3B;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,iBAAyB,EACzB,OAAe,EACf,OAA6C;QAE7C,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,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AC,UAAU,CAAC;IACxC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;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,qBAAqB;SAC1C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IAC/D,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 { Interactions } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n InteractionResourceFormat,\n InteractionsListByHubNextOptionalParams,\n InteractionsListByHubOptionalParams,\n InteractionsListByHubResponse,\n InteractionsCreateOrUpdateOptionalParams,\n InteractionsCreateOrUpdateResponse,\n InteractionsGetOptionalParams,\n InteractionsGetResponse,\n InteractionsSuggestRelationshipLinksOptionalParams,\n InteractionsSuggestRelationshipLinksResponse,\n InteractionsListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Interactions operations. */\nexport class InteractionsImpl implements Interactions {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Interactions class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all interactions in the 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?: InteractionsListByHubOptionalParams\n ): PagedAsyncIterableIterator<InteractionResourceFormat> {\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?: InteractionsListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<InteractionResourceFormat[]> {\n let result: InteractionsListByHubResponse;\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?: InteractionsListByHubOptionalParams\n ): AsyncIterableIterator<InteractionResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates an interaction or updates an existing interaction within a hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n parameters: InteractionResourceFormat,\n options?: InteractionsCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<InteractionsCreateOrUpdateResponse>,\n InteractionsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<InteractionsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, interactionName, parameters, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates an interaction or updates an existing interaction within a hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n parameters: InteractionResourceFormat,\n options?: InteractionsCreateOrUpdateOptionalParams\n ): Promise<InteractionsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n hubName,\n interactionName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets information about the specified interaction.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n options?: InteractionsGetOptionalParams\n ): Promise<InteractionsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, interactionName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all interactions in the 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?: InteractionsListByHubOptionalParams\n ): Promise<InteractionsListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Suggests relationships to create relationship links.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param options The options parameters.\n */\n suggestRelationshipLinks(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n options?: InteractionsSuggestRelationshipLinksOptionalParams\n ): Promise<InteractionsSuggestRelationshipLinksResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, interactionName, options },\n suggestRelationshipLinksOperationSpec\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?: InteractionsListByHubNextOptionalParams\n ): Promise<InteractionsListByHubNextResponse> {\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.InteractionResourceFormat\n },\n 201: {\n bodyMapper: Mappers.InteractionResourceFormat\n },\n 202: {\n bodyMapper: Mappers.InteractionResourceFormat\n },\n 204: {\n bodyMapper: Mappers.InteractionResourceFormat\n }\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.interactionName\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}/interactions/{interactionName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.InteractionResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.localeCode],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.interactionName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.InteractionListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.localeCode],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst suggestRelationshipLinksOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}/suggestRelationshipLinks\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestRelationshipLinksResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.interactionName1\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.InteractionListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.localeCode],\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":"interactions.js","sourceRoot":"","sources":["../../../src/operations/interactions.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,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EA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,qCAAqC,GAA6B;IACtE,IAAI,EACF,gLAAgL;IAClL,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,gCAAgC;SACrD;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,gBAAgB;KAC5B;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,qBAAqB;SAC1C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,UAAU,CAAC;IAC/D,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 { Interactions } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n InteractionResourceFormat,\n InteractionsListByHubNextOptionalParams,\n InteractionsListByHubOptionalParams,\n InteractionsListByHubResponse,\n InteractionsCreateOrUpdateOptionalParams,\n InteractionsCreateOrUpdateResponse,\n InteractionsGetOptionalParams,\n InteractionsGetResponse,\n InteractionsSuggestRelationshipLinksOptionalParams,\n InteractionsSuggestRelationshipLinksResponse,\n InteractionsListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Interactions operations. */\nexport class InteractionsImpl implements Interactions {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Interactions class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all interactions in the 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?: InteractionsListByHubOptionalParams\n ): PagedAsyncIterableIterator<InteractionResourceFormat> {\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?: InteractionsListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<InteractionResourceFormat[]> {\n let result: InteractionsListByHubResponse;\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?: InteractionsListByHubOptionalParams\n ): AsyncIterableIterator<InteractionResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates an interaction or updates an existing interaction within a hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n parameters: InteractionResourceFormat,\n options?: InteractionsCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<InteractionsCreateOrUpdateResponse>,\n InteractionsCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<InteractionsCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, interactionName, parameters, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates an interaction or updates an existing interaction within a hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param parameters Parameters supplied to the CreateOrUpdate Interaction operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n parameters: InteractionResourceFormat,\n options?: InteractionsCreateOrUpdateOptionalParams\n ): Promise<InteractionsCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n hubName,\n interactionName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets information about the specified interaction.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n options?: InteractionsGetOptionalParams\n ): Promise<InteractionsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, interactionName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all interactions in the 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?: InteractionsListByHubOptionalParams\n ): Promise<InteractionsListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\n );\n }\n\n /**\n * Suggests relationships to create relationship links.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param interactionName The name of the interaction.\n * @param options The options parameters.\n */\n suggestRelationshipLinks(\n resourceGroupName: string,\n hubName: string,\n interactionName: string,\n options?: InteractionsSuggestRelationshipLinksOptionalParams\n ): Promise<InteractionsSuggestRelationshipLinksResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, interactionName, options },\n suggestRelationshipLinksOperationSpec\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?: InteractionsListByHubNextOptionalParams\n ): Promise<InteractionsListByHubNextResponse> {\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.InteractionResourceFormat\n },\n 201: {\n bodyMapper: Mappers.InteractionResourceFormat\n },\n 202: {\n bodyMapper: Mappers.InteractionResourceFormat\n },\n 204: {\n bodyMapper: Mappers.InteractionResourceFormat\n }\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.interactionName\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}/interactions/{interactionName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.InteractionResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.localeCode],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.interactionName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.InteractionListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.localeCode],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst suggestRelationshipLinksOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/interactions/{interactionName}/suggestRelationshipLinks\",\n httpMethod: \"POST\",\n responses: {\n 200: {\n bodyMapper: Mappers.SuggestRelationshipLinksResponse\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.interactionName1\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.InteractionListResult\n }\n },\n queryParameters: [Parameters.apiVersion, Parameters.localeCode],\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";
|
|
@@ -15,6 +14,7 @@ import { LroImpl } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing Kpi operations. */
|
|
17
16
|
export class KpiImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class Kpi class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class KpiImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listByHubPagingPage(resourceGroupName, hubName, options, settings);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._listByHub(resourceGroupName, hubName, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listByHubNext(resourceGroupName, hubName, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listByHubPagingPage(resourceGroupName, hubName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
67
|
+
for await (const page of this.listByHubPagingPage(resourceGroupName, hubName, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Creates a KPI or updates an existing KPI in the hub.
|
|
@@ -98,14 +81,19 @@ export class KpiImpl {
|
|
|
98
81
|
return this.client.sendOperationRequest(args, spec);
|
|
99
82
|
};
|
|
100
83
|
const sendOperation = async (args, spec) => {
|
|
101
|
-
var _a;
|
|
102
84
|
let currentRawResponse = undefined;
|
|
103
|
-
const providedCallback =
|
|
85
|
+
const providedCallback = args.options?.onResponse;
|
|
104
86
|
const callback = (rawResponse, flatResponse) => {
|
|
105
87
|
currentRawResponse = rawResponse;
|
|
106
|
-
providedCallback
|
|
88
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
89
|
+
};
|
|
90
|
+
const updatedArgs = {
|
|
91
|
+
...args,
|
|
92
|
+
options: {
|
|
93
|
+
...args.options,
|
|
94
|
+
onResponse: callback
|
|
95
|
+
}
|
|
107
96
|
};
|
|
108
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
109
97
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
110
98
|
return {
|
|
111
99
|
flatResponse,
|
|
@@ -118,8 +106,8 @@ export class KpiImpl {
|
|
|
118
106
|
};
|
|
119
107
|
const lro = new LroImpl(sendOperation, { resourceGroupName, hubName, kpiName, parameters, options }, createOrUpdateOperationSpec);
|
|
120
108
|
const poller = new LroEngine(lro, {
|
|
121
|
-
resumeFrom: options
|
|
122
|
-
intervalInMs: options
|
|
109
|
+
resumeFrom: options?.resumeFrom,
|
|
110
|
+
intervalInMs: options?.updateIntervalInMs
|
|
123
111
|
});
|
|
124
112
|
await poller.poll();
|
|
125
113
|
return poller;
|
|
@@ -158,14 +146,19 @@ export class KpiImpl {
|
|
|
158
146
|
return this.client.sendOperationRequest(args, spec);
|
|
159
147
|
};
|
|
160
148
|
const sendOperation = async (args, spec) => {
|
|
161
|
-
var _a;
|
|
162
149
|
let currentRawResponse = undefined;
|
|
163
|
-
const providedCallback =
|
|
150
|
+
const providedCallback = args.options?.onResponse;
|
|
164
151
|
const callback = (rawResponse, flatResponse) => {
|
|
165
152
|
currentRawResponse = rawResponse;
|
|
166
|
-
providedCallback
|
|
153
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
154
|
+
};
|
|
155
|
+
const updatedArgs = {
|
|
156
|
+
...args,
|
|
157
|
+
options: {
|
|
158
|
+
...args.options,
|
|
159
|
+
onResponse: callback
|
|
160
|
+
}
|
|
167
161
|
};
|
|
168
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
169
162
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
170
163
|
return {
|
|
171
164
|
flatResponse,
|
|
@@ -178,8 +171,8 @@ export class KpiImpl {
|
|
|
178
171
|
};
|
|
179
172
|
const lro = new LroImpl(sendOperation, { resourceGroupName, hubName, kpiName, options }, deleteOperationSpec);
|
|
180
173
|
const poller = new LroEngine(lro, {
|
|
181
|
-
resumeFrom: options
|
|
182
|
-
intervalInMs: options
|
|
174
|
+
resumeFrom: options?.resumeFrom,
|
|
175
|
+
intervalInMs: options?.updateIntervalInMs
|
|
183
176
|
});
|
|
184
177
|
await poller.poll();
|
|
185
178
|
return poller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kpi.js","sourceRoot":"","sources":["../../../src/operations/kpi.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,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAexC,4CAA4C;AAC5C,uCAAuC;AACvC,MAAM,OAAO,OAAO;IAGlB;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACI,SAAS,CACd,iBAAyB,EACzB,OAAe,EACf,OAAoC;QAEpC,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,OAA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c;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 { Kpi } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n KpiResourceFormat,\n KpiListByHubNextOptionalParams,\n KpiListByHubOptionalParams,\n KpiListByHubResponse,\n KpiCreateOrUpdateOptionalParams,\n KpiCreateOrUpdateResponse,\n KpiGetOptionalParams,\n KpiGetResponse,\n KpiDeleteOptionalParams,\n KpiReprocessOptionalParams,\n KpiListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Kpi operations. */\nexport class KpiImpl implements Kpi {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Kpi class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the KPIs 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?: KpiListByHubOptionalParams\n ): PagedAsyncIterableIterator<KpiResourceFormat> {\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?: KpiListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<KpiResourceFormat[]> {\n let result: KpiListByHubResponse;\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?: KpiListByHubOptionalParams\n ): AsyncIterableIterator<KpiResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates a KPI or updates an existing KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param parameters Parameters supplied to the create/update KPI operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n parameters: KpiResourceFormat,\n options?: KpiCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<KpiCreateOrUpdateResponse>,\n KpiCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<KpiCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, kpiName, parameters, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a KPI or updates an existing KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param parameters Parameters supplied to the create/update KPI operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n parameters: KpiResourceFormat,\n options?: KpiCreateOrUpdateOptionalParams\n ): Promise<KpiCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n hubName,\n kpiName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiGetOptionalParams\n ): Promise<KpiGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, kpiName, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiDeleteOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, kpiName, options },\n deleteOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiDeleteOptionalParams\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n hubName,\n kpiName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Reprocesses the Kpi values of the specified KPI.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n reprocess(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiReprocessOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, kpiName, options },\n reprocessOperationSpec\n );\n }\n\n /**\n * Gets all the KPIs 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?: KpiListByHubOptionalParams\n ): Promise<KpiListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\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?: KpiListByHubNextOptionalParams\n ): Promise<KpiListByHubNextResponse> {\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiResourceFormat\n },\n 201: {\n bodyMapper: Mappers.KpiResourceFormat\n },\n 202: {\n bodyMapper: Mappers.KpiResourceFormat\n },\n 204: {\n bodyMapper: Mappers.KpiResourceFormat\n }\n },\n requestBody: Parameters.parameters8,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName\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}/kpi/{kpiName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName1\n ],\n serializer\n};\nconst reprocessOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}/reprocess\",\n httpMethod: \"POST\",\n responses: { 202: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName1\n ],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiListResult\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 listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiListResult\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":"kpi.js","sourceRoot":"","sources":["../../../src/operations/kpi.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,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAexC,4CAA4C;AAC5C,uCAAuC;AACvC,MAAM,OAAO,OAAO;IACD,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,OAAoC;QAEpC,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,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IA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AAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,QAAQ;KACpB;IACD,UAAU;CACX,CAAC;AACF,MAAM,sBAAsB,GAA6B;IACvD,IAAI,EACF,4HAA4H;IAC9H,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;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;KACpB;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,aAAa;SAClC;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 { Kpi } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n KpiResourceFormat,\n KpiListByHubNextOptionalParams,\n KpiListByHubOptionalParams,\n KpiListByHubResponse,\n KpiCreateOrUpdateOptionalParams,\n KpiCreateOrUpdateResponse,\n KpiGetOptionalParams,\n KpiGetResponse,\n KpiDeleteOptionalParams,\n KpiReprocessOptionalParams,\n KpiListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Kpi operations. */\nexport class KpiImpl implements Kpi {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Kpi class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the KPIs 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?: KpiListByHubOptionalParams\n ): PagedAsyncIterableIterator<KpiResourceFormat> {\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?: KpiListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<KpiResourceFormat[]> {\n let result: KpiListByHubResponse;\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?: KpiListByHubOptionalParams\n ): AsyncIterableIterator<KpiResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates a KPI or updates an existing KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param parameters Parameters supplied to the create/update KPI operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n parameters: KpiResourceFormat,\n options?: KpiCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<KpiCreateOrUpdateResponse>,\n KpiCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<KpiCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, kpiName, parameters, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a KPI or updates an existing KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param parameters Parameters supplied to the create/update KPI operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n parameters: KpiResourceFormat,\n options?: KpiCreateOrUpdateOptionalParams\n ): Promise<KpiCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n hubName,\n kpiName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiGetOptionalParams\n ): Promise<KpiGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, kpiName, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiDeleteOptionalParams\n ): Promise<PollerLike<PollOperationState<void>, void>> {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<void> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, kpiName, options },\n deleteOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a KPI in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiDeleteOptionalParams\n ): Promise<void> {\n const poller = await this.beginDelete(\n resourceGroupName,\n hubName,\n kpiName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Reprocesses the Kpi values of the specified KPI.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param kpiName The name of the KPI.\n * @param options The options parameters.\n */\n reprocess(\n resourceGroupName: string,\n hubName: string,\n kpiName: string,\n options?: KpiReprocessOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, kpiName, options },\n reprocessOperationSpec\n );\n }\n\n /**\n * Gets all the KPIs 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?: KpiListByHubOptionalParams\n ): Promise<KpiListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\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?: KpiListByHubNextOptionalParams\n ): Promise<KpiListByHubNextResponse> {\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiResourceFormat\n },\n 201: {\n bodyMapper: Mappers.KpiResourceFormat\n },\n 202: {\n bodyMapper: Mappers.KpiResourceFormat\n },\n 204: {\n bodyMapper: Mappers.KpiResourceFormat\n }\n },\n requestBody: Parameters.parameters8,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName\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}/kpi/{kpiName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 201: {}, 202: {}, 204: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName1\n ],\n serializer\n};\nconst reprocessOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi/{kpiName}/reprocess\",\n httpMethod: \"POST\",\n responses: { 202: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.kpiName1\n ],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/kpi\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiListResult\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 listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.KpiListResult\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"]}
|
|
@@ -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";
|
|
@@ -15,6 +14,7 @@ import { LroImpl } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing Links operations. */
|
|
17
16
|
export class LinksImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class Links class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -38,52 +38,35 @@ export class LinksImpl {
|
|
|
38
38
|
return this;
|
|
39
39
|
},
|
|
40
40
|
byPage: (settings) => {
|
|
41
|
-
if (settings
|
|
41
|
+
if (settings?.maxPageSize) {
|
|
42
42
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
43
43
|
}
|
|
44
44
|
return this.listByHubPagingPage(resourceGroupName, hubName, options, settings);
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
|
-
listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
});
|
|
48
|
+
async *listByHubPagingPage(resourceGroupName, hubName, options, settings) {
|
|
49
|
+
let result;
|
|
50
|
+
let continuationToken = settings?.continuationToken;
|
|
51
|
+
if (!continuationToken) {
|
|
52
|
+
result = await this._listByHub(resourceGroupName, hubName, options);
|
|
53
|
+
let page = result.value || [];
|
|
54
|
+
continuationToken = result.nextLink;
|
|
55
|
+
setContinuationToken(page, continuationToken);
|
|
56
|
+
yield page;
|
|
57
|
+
}
|
|
58
|
+
while (continuationToken) {
|
|
59
|
+
result = await this._listByHubNext(resourceGroupName, hubName, continuationToken, options);
|
|
60
|
+
continuationToken = result.nextLink;
|
|
61
|
+
let page = result.value || [];
|
|
62
|
+
setContinuationToken(page, continuationToken);
|
|
63
|
+
yield page;
|
|
64
|
+
}
|
|
67
65
|
}
|
|
68
|
-
listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
for (var _d = true, _e = __asyncValues(this.listByHubPagingPage(resourceGroupName, hubName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
73
|
-
_c = _f.value;
|
|
74
|
-
_d = false;
|
|
75
|
-
const page = _c;
|
|
76
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
80
|
-
finally {
|
|
81
|
-
try {
|
|
82
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
83
|
-
}
|
|
84
|
-
finally { if (e_1) throw e_1.error; }
|
|
85
|
-
}
|
|
86
|
-
});
|
|
66
|
+
async *listByHubPagingAll(resourceGroupName, hubName, options) {
|
|
67
|
+
for await (const page of this.listByHubPagingPage(resourceGroupName, hubName, options)) {
|
|
68
|
+
yield* page;
|
|
69
|
+
}
|
|
87
70
|
}
|
|
88
71
|
/**
|
|
89
72
|
* Creates a link or updates an existing link in the hub.
|
|
@@ -98,14 +81,19 @@ export class LinksImpl {
|
|
|
98
81
|
return this.client.sendOperationRequest(args, spec);
|
|
99
82
|
};
|
|
100
83
|
const sendOperation = async (args, spec) => {
|
|
101
|
-
var _a;
|
|
102
84
|
let currentRawResponse = undefined;
|
|
103
|
-
const providedCallback =
|
|
85
|
+
const providedCallback = args.options?.onResponse;
|
|
104
86
|
const callback = (rawResponse, flatResponse) => {
|
|
105
87
|
currentRawResponse = rawResponse;
|
|
106
|
-
providedCallback
|
|
88
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
89
|
+
};
|
|
90
|
+
const updatedArgs = {
|
|
91
|
+
...args,
|
|
92
|
+
options: {
|
|
93
|
+
...args.options,
|
|
94
|
+
onResponse: callback
|
|
95
|
+
}
|
|
107
96
|
};
|
|
108
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
109
97
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
110
98
|
return {
|
|
111
99
|
flatResponse,
|
|
@@ -118,8 +106,8 @@ export class LinksImpl {
|
|
|
118
106
|
};
|
|
119
107
|
const lro = new LroImpl(sendOperation, { resourceGroupName, hubName, linkName, parameters, options }, createOrUpdateOperationSpec);
|
|
120
108
|
const poller = new LroEngine(lro, {
|
|
121
|
-
resumeFrom: options
|
|
122
|
-
intervalInMs: options
|
|
109
|
+
resumeFrom: options?.resumeFrom,
|
|
110
|
+
intervalInMs: options?.updateIntervalInMs
|
|
123
111
|
});
|
|
124
112
|
await poller.poll();
|
|
125
113
|
return poller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"links.js","sourceRoot":"","sources":["../../../src/operations/links.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,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAcxC,4CAA4C;AAC5C,yCAAyC;AACzC,MAAM,OAAO,SAAS;IAGpB;;;OAGG;IACH,YAAY,MAAwC;QAClD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OA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;IAChI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,cAAc;SACnC;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;KACpB;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,cAAc;SACnC;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 { Links } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n LinkResourceFormat,\n LinksListByHubNextOptionalParams,\n LinksListByHubOptionalParams,\n LinksListByHubResponse,\n LinksCreateOrUpdateOptionalParams,\n LinksCreateOrUpdateResponse,\n LinksGetOptionalParams,\n LinksGetResponse,\n LinksDeleteOptionalParams,\n LinksListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Links operations. */\nexport class LinksImpl implements Links {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Links class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the links 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?: LinksListByHubOptionalParams\n ): PagedAsyncIterableIterator<LinkResourceFormat> {\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?: LinksListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LinkResourceFormat[]> {\n let result: LinksListByHubResponse;\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?: LinksListByHubOptionalParams\n ): AsyncIterableIterator<LinkResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates a link or updates an existing link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param parameters Parameters supplied to the CreateOrUpdate Link operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n parameters: LinkResourceFormat,\n options?: LinksCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinksCreateOrUpdateResponse>,\n LinksCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinksCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, linkName, parameters, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a link or updates an existing link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param parameters Parameters supplied to the CreateOrUpdate Link operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n parameters: LinkResourceFormat,\n options?: LinksCreateOrUpdateOptionalParams\n ): Promise<LinksCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n hubName,\n linkName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n options?: LinksGetOptionalParams\n ): Promise<LinksGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, linkName, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n options?: LinksDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, linkName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all the links 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?: LinksListByHubOptionalParams\n ): Promise<LinksListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\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?: LinksListByHubNextOptionalParams\n ): Promise<LinksListByHubNextResponse> {\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkResourceFormat\n },\n 201: {\n bodyMapper: Mappers.LinkResourceFormat\n },\n 202: {\n bodyMapper: Mappers.LinkResourceFormat\n },\n 204: {\n bodyMapper: Mappers.LinkResourceFormat\n }\n },\n requestBody: Parameters.parameters10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.linkName\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}/links/{linkName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.linkName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 202: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.linkName1\n ],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkListResult\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 listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkListResult\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":"links.js","sourceRoot":"","sources":["../../../src/operations/links.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,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAcxC,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;;;;;OAKG;IACI,SAAS,CACd,iBAAyB,EACzB,OAAe,EACf,OAAsC;QAEtC,MAAM,IAAI,GAAG,IAAI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rC,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,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 { Links } 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 { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n LinkResourceFormat,\n LinksListByHubNextOptionalParams,\n LinksListByHubOptionalParams,\n LinksListByHubResponse,\n LinksCreateOrUpdateOptionalParams,\n LinksCreateOrUpdateResponse,\n LinksGetOptionalParams,\n LinksGetResponse,\n LinksDeleteOptionalParams,\n LinksListByHubNextResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing Links operations. */\nexport class LinksImpl implements Links {\n private readonly client: CustomerInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class Links class.\n * @param client Reference to the service client\n */\n constructor(client: CustomerInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all the links 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?: LinksListByHubOptionalParams\n ): PagedAsyncIterableIterator<LinkResourceFormat> {\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?: LinksListByHubOptionalParams,\n settings?: PageSettings\n ): AsyncIterableIterator<LinkResourceFormat[]> {\n let result: LinksListByHubResponse;\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?: LinksListByHubOptionalParams\n ): AsyncIterableIterator<LinkResourceFormat> {\n for await (const page of this.listByHubPagingPage(\n resourceGroupName,\n hubName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Creates a link or updates an existing link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param parameters Parameters supplied to the CreateOrUpdate Link operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n parameters: LinkResourceFormat,\n options?: LinksCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinksCreateOrUpdateResponse>,\n LinksCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinksCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, hubName, linkName, parameters, options },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Creates a link or updates an existing link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param parameters Parameters supplied to the CreateOrUpdate Link operation.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n parameters: LinkResourceFormat,\n options?: LinksCreateOrUpdateOptionalParams\n ): Promise<LinksCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n hubName,\n linkName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n options?: LinksGetOptionalParams\n ): Promise<LinksGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, linkName, options },\n getOperationSpec\n );\n }\n\n /**\n * Deletes a link in the hub.\n * @param resourceGroupName The name of the resource group.\n * @param hubName The name of the hub.\n * @param linkName The name of the link.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n hubName: string,\n linkName: string,\n options?: LinksDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, linkName, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all the links 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?: LinksListByHubOptionalParams\n ): Promise<LinksListByHubResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, hubName, options },\n listByHubOperationSpec\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?: LinksListByHubNextOptionalParams\n ): Promise<LinksListByHubNextResponse> {\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 createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkResourceFormat\n },\n 201: {\n bodyMapper: Mappers.LinkResourceFormat\n },\n 202: {\n bodyMapper: Mappers.LinkResourceFormat\n },\n 204: {\n bodyMapper: Mappers.LinkResourceFormat\n }\n },\n requestBody: Parameters.parameters10,\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.linkName\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}/links/{linkName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkResourceFormat\n }\n },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.linkName1\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links/{linkName}\",\n httpMethod: \"DELETE\",\n responses: { 200: {}, 202: {} },\n queryParameters: [Parameters.apiVersion],\n urlParameters: [\n Parameters.$host,\n Parameters.resourceGroupName,\n Parameters.subscriptionId,\n Parameters.hubName1,\n Parameters.linkName1\n ],\n serializer\n};\nconst listByHubOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CustomerInsights/hubs/{hubName}/links\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkListResult\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 listByHubNextOperationSpec: coreClient.OperationSpec = {\n path: \"{nextLink}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkListResult\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"]}
|