From 1d6d40cee95799bd524264bbf4c899ae2c95d17d Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 7 Nov 2023 13:02:36 +0000 Subject: [PATCH] CodeGen from PR 26371 in Azure/azure-rest-api-specs Merge 10dcdc69bad243a84a524f248512e456d501bb05 into dc52fde497fba9bf5c142ba17ec39be243460e80 --- common/config/rush/pnpm-lock.yaml | 15 +- .../arm-healthcareapis/CHANGELOG.md | 33 ++- sdk/healthcareapis/arm-healthcareapis/LICENSE | 2 +- .../arm-healthcareapis/_meta.json | 8 +- .../arm-healthcareapis/package.json | 31 +-- .../review/arm-healthcareapis.api.md | 91 ++++--- .../src/healthcareApisManagementClient.ts | 6 +- .../arm-healthcareapis/src/lroImpl.ts | 54 ++-- .../arm-healthcareapis/src/models/index.ts | 117 ++++++--- .../arm-healthcareapis/src/models/mappers.ts | 241 +++++++++++++++--- .../src/models/parameters.ts | 5 +- .../src/operations/dicomServices.ts | 73 +++--- .../src/operations/fhirDestinations.ts | 1 - .../src/operations/fhirServices.ts | 73 +++--- .../operations/iotConnectorFhirDestination.ts | 49 ++-- .../src/operations/iotConnectors.ts | 73 +++--- .../src/operations/operations.ts | 1 - .../operations/privateEndpointConnections.ts | 49 ++-- .../src/operations/services.ts | 79 +++--- .../workspacePrivateEndpointConnections.ts | 51 ++-- .../src/operations/workspaces.ts | 79 +++--- .../src/operationsInterfaces/dicomServices.ts | 12 +- .../src/operationsInterfaces/fhirServices.ts | 12 +- .../iotConnectorFhirDestination.ts | 8 +- .../src/operationsInterfaces/iotConnectors.ts | 12 +- .../privateEndpointConnections.ts | 8 +- .../src/operationsInterfaces/services.ts | 12 +- .../workspacePrivateEndpointConnections.ts | 10 +- .../src/operationsInterfaces/workspaces.ts | 12 +- .../arm-healthcareapis/src/pagingHelper.ts | 8 +- .../arm-healthcareapis/tsconfig.json | 10 +- 31 files changed, 793 insertions(+), 442 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 29c35dff55ba..545e69f8467c 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -4495,7 +4495,7 @@ packages: dependencies: semver: 7.5.4 shelljs: 0.8.5 - typescript: 5.4.0-dev.20231106 + typescript: 5.4.0-dev.20231107 dev: false /eastasianwidth@0.2.0: @@ -9272,8 +9272,8 @@ packages: hasBin: true dev: false - /typescript@5.4.0-dev.20231106: - resolution: {integrity: sha512-Uxjjt7meOHOSXpQJkiObTPUXfQKqSkdcMQOV+ZAjo3U1w/D/1Qah5Pdg0x/jt/fIA6laCNWLogS+QiaT5HOohw==} + /typescript@5.4.0-dev.20231107: + resolution: {integrity: sha512-4bQlfsyFjzZMo1bSLEkFJEcvuQ64pgE0S/BpdWu16lYsQOfJZtntZIyWdED3h+e96IMtVgrC6sxzfPZhj4J/dw==} engines: {node: '>=14.17'} hasBin: true dev: false @@ -12904,19 +12904,22 @@ packages: dev: false file:projects/arm-healthcareapis.tgz: - resolution: {integrity: sha512-39Z3FnRxvLIxyM2OL3tvvzcGGG9GRDUFkqaddU6PG2Edbr8FZp7lMRMDV1ysLaKycrgV+jY+NUXggWEqJqyaHw==, tarball: file:projects/arm-healthcareapis.tgz} + resolution: {integrity: sha512-pUu5Tv9upKVg3XZlTGb2bM45MZ8ZX3TAZOCUoSfdKRDzphalIONbpW2hn3NQzuP4SWr1QCM10h9susneu/Hg7Q==, tarball: file:projects/arm-healthcareapis.tgz} name: '@rush-temp/arm-healthcareapis' version: 0.0.0 dependencies: '@azure/identity': 3.3.2 '@microsoft/api-extractor': 7.38.2(@types/node@18.18.8) '@types/chai': 4.3.9 + '@types/mocha': 10.0.3 '@types/node': 18.18.8 chai: 4.3.10 cross-env: 7.0.3 - mkdirp: 1.0.4 + dotenv: 16.3.1 + esm: 3.2.25 + mkdirp: 2.1.6 mocha: 10.2.0 - rimraf: 3.0.2 + rimraf: 5.0.5 ts-node: 10.9.1(@types/node@18.18.8)(typescript@5.2.2) tslib: 2.6.2 typescript: 5.2.2 diff --git a/sdk/healthcareapis/arm-healthcareapis/CHANGELOG.md b/sdk/healthcareapis/arm-healthcareapis/CHANGELOG.md index 466521e898fb..11660d770c7e 100644 --- a/sdk/healthcareapis/arm-healthcareapis/CHANGELOG.md +++ b/sdk/healthcareapis/arm-healthcareapis/CHANGELOG.md @@ -1,15 +1,30 @@ # Release History + +## 3.0.0 (2023-11-07) + +**Features** -## 2.2.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - Added Interface CorsConfiguration + - Added Interface FhirServiceImportConfiguration + - Added Interface ImplementationGuidesConfiguration + - Added Interface ServiceImportConfigurationInfo + - Interface DicomService has a new optional parameter corsConfiguration + - Interface DicomService has a new optional parameter eventState + - Interface FhirService has a new optional parameter implementationGuidesConfiguration + - Interface FhirService has a new optional parameter importConfiguration + - Interface MetricSpecification has a new optional parameter enableRegionalMdmAccount + - Interface MetricSpecification has a new optional parameter isInternal + - Interface MetricSpecification has a new optional parameter metricFilterPattern + - Interface MetricSpecification has a new optional parameter resourceIdDimensionNameOverride + - Interface MetricSpecification has a new optional parameter sourceMdmAccount + - Interface ServiceCosmosDbConfigurationInfo has a new optional parameter crossTenantCmkApplicationId + - Interface ServicesProperties has a new optional parameter importConfiguration -### Other Changes +**Breaking Changes** + - Interface FhirService no longer has parameter accessPolicies + + ## 2.2.0 (2022-11-25) **Features** @@ -197,4 +212,4 @@ To understand the detail of the change, please refer to [Changelog](https://aka. To migrate the existing applications to the latest version, please refer to [Migration Guide](https://aka.ms/js-track2-migration-guide). -To learn more, please refer to our documentation [Quick Start](https://aka.ms/azsdk/js/mgmt/quickstart ). +To learn more, please refer to our documentation [Quick Start](https://aka.ms/js-track2-quickstart). diff --git a/sdk/healthcareapis/arm-healthcareapis/LICENSE b/sdk/healthcareapis/arm-healthcareapis/LICENSE index 5d1d36e0af80..3a1d9b6f24f7 100644 --- a/sdk/healthcareapis/arm-healthcareapis/LICENSE +++ b/sdk/healthcareapis/arm-healthcareapis/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2022 Microsoft +Copyright (c) 2023 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/healthcareapis/arm-healthcareapis/_meta.json b/sdk/healthcareapis/arm-healthcareapis/_meta.json index a03927738859..3ab51eac773a 100644 --- a/sdk/healthcareapis/arm-healthcareapis/_meta.json +++ b/sdk/healthcareapis/arm-healthcareapis/_meta.json @@ -1,8 +1,8 @@ { - "commit": "c583b05741fadfdca116be3b9ccb1c4be8a73258", + "commit": "a231973a4fd49f699621dd74cb1b47d9d6fdcd13", "readme": "specification/healthcareapis/resource-manager/readme.md", - "autorest_command": "autorest --version=3.8.4 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\healthcareapis\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.3.20221108.1 --generate-sample=true", + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/healthcareapis/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.4.2", - "use": "@autorest/typescript@6.0.0-rc.3.20221108.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.4", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/healthcareapis/arm-healthcareapis/package.json b/sdk/healthcareapis/arm-healthcareapis/package.json index 9049bfe258e9..f0e53ddf0305 100644 --- a/sdk/healthcareapis/arm-healthcareapis/package.json +++ b/sdk/healthcareapis/arm-healthcareapis/package.json @@ -3,17 +3,17 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for HealthcareApisManagementClient.", - "version": "2.2.1", + "version": "3.0.0", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.4", "@azure/abort-controller": "^1.0.0", "@azure/core-paging": "^1.2.0", - "@azure/core-client": "^1.6.1", + "@azure/core-client": "^1.7.0", "@azure/core-auth": "^1.3.0", - "@azure/core-rest-pipeline": "^1.8.0", + "@azure/core-rest-pipeline": "^1.12.0", "tslib": "^2.2.0" }, "keywords": [ @@ -29,22 +29,24 @@ "types": "./types/arm-healthcareapis.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.31.1", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "typescript": "~5.2.0", "uglify-js": "^3.4.9", - "rimraf": "^3.0.0", + "rimraf": "^5.0.0", + "dotenv": "^16.0.0", + "@azure/dev-tool": "^1.0.0", "@azure/identity": "^3.3.0", "@azure-tools/test-recorder": "^3.0.0", "@azure-tools/test-credential": "^1.0.0", "mocha": "^10.0.0", + "@types/mocha": "^10.0.0", + "esm": "^3.2.18", "@types/chai": "^4.2.8", "chai": "^4.2.0", "cross-env": "^7.0.2", "@types/node": "^18.0.0", - "@azure/dev-tool": "^1.0.0", "ts-node": "^10.0.0" }, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthcareapis/arm-healthcareapis", "repository": { "type": "git", "url": "https://github.com/Azure/azure-sdk-for-js.git" @@ -77,7 +79,7 @@ "extract-api": "api-extractor run --local", "lint": "echo skipped", "audit": "echo skipped", - "clean": "rimraf dist dist-browser dist-esm test-dist temp types *.tgz *.log", + "clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log", "build:node": "echo skipped", "build:browser": "echo skipped", "build:test": "echo skipped", @@ -105,12 +107,5 @@ ] }, "autoPublish": true, - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-healthcareapis?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/healthcareapis/arm-healthcareapis" +} \ No newline at end of file diff --git a/sdk/healthcareapis/arm-healthcareapis/review/arm-healthcareapis.api.md b/sdk/healthcareapis/arm-healthcareapis/review/arm-healthcareapis.api.md index 2c2e6499644d..812a822c3d77 100644 --- a/sdk/healthcareapis/arm-healthcareapis/review/arm-healthcareapis.api.md +++ b/sdk/healthcareapis/arm-healthcareapis/review/arm-healthcareapis.api.md @@ -6,9 +6,9 @@ import * as coreAuth from '@azure/core-auth'; import * as coreClient from '@azure/core-client'; +import { OperationState } from '@azure/core-lro'; import { PagedAsyncIterableIterator } from '@azure/core-paging'; -import { PollerLike } from '@azure/core-lro'; -import { PollOperationState } from '@azure/core-lro'; +import { SimplePollerLike } from '@azure/core-lro'; // @public export type ActionType = string; @@ -19,12 +19,23 @@ export interface CheckNameAvailabilityParameters { type: string; } +// @public +export interface CorsConfiguration { + allowCredentials?: boolean; + headers?: string[]; + maxAge?: number; + methods?: string[]; + origins?: string[]; +} + // @public export type CreatedByType = string; // @public export interface DicomService extends TaggedResource, ServiceManagedIdentity { authenticationConfiguration?: DicomServiceAuthenticationConfiguration; + corsConfiguration?: CorsConfiguration; + readonly eventState?: ServiceEventState; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; @@ -50,11 +61,11 @@ export interface DicomServicePatchResource extends ResourceTags, ServiceManagedI // @public export interface DicomServices { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, dicomServiceName: string, dicomservice: DicomService, options?: DicomServicesCreateOrUpdateOptionalParams): Promise, DicomServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, dicomServiceName: string, dicomservice: DicomService, options?: DicomServicesCreateOrUpdateOptionalParams): Promise, DicomServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, dicomServiceName: string, dicomservice: DicomService, options?: DicomServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, dicomServiceName: string, workspaceName: string, options?: DicomServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, dicomServiceName: string, workspaceName: string, options?: DicomServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, dicomServiceName: string, workspaceName: string, options?: DicomServicesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, dicomServiceName: string, workspaceName: string, dicomservicePatchResource: DicomServicePatchResource, options?: DicomServicesUpdateOptionalParams): Promise, DicomServicesUpdateResponse>>; + beginUpdate(resourceGroupName: string, dicomServiceName: string, workspaceName: string, dicomservicePatchResource: DicomServicePatchResource, options?: DicomServicesUpdateOptionalParams): Promise, DicomServicesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, dicomServiceName: string, workspaceName: string, dicomservicePatchResource: DicomServicePatchResource, options?: DicomServicesUpdateOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, dicomServiceName: string, options?: DicomServicesGetOptionalParams): Promise; listByWorkspace(resourceGroupName: string, workspaceName: string, options?: DicomServicesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; @@ -146,12 +157,13 @@ export type FhirResourceVersionPolicy = string; // @public export interface FhirService extends TaggedResource, ServiceManagedIdentity { - accessPolicies?: FhirServiceAccessPolicyEntry[]; acrConfiguration?: FhirServiceAcrConfiguration; authenticationConfiguration?: FhirServiceAuthenticationConfiguration; corsConfiguration?: FhirServiceCorsConfiguration; readonly eventState?: ServiceEventState; exportConfiguration?: FhirServiceExportConfiguration; + implementationGuidesConfiguration?: ImplementationGuidesConfiguration; + importConfiguration?: FhirServiceImportConfiguration; kind?: FhirServiceKind; readonly privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; @@ -160,11 +172,6 @@ export interface FhirService extends TaggedResource, ServiceManagedIdentity { readonly systemData?: SystemData; } -// @public -export interface FhirServiceAccessPolicyEntry { - objectId: string; -} - // @public export interface FhirServiceAcrConfiguration { loginServers?: string[]; @@ -198,6 +205,13 @@ export interface FhirServiceExportConfiguration { storageAccountName?: string; } +// @public +export interface FhirServiceImportConfiguration { + enabled?: boolean; + initialImportMode?: boolean; + integrationDataStore?: string; +} + // @public export type FhirServiceKind = string; @@ -207,11 +221,11 @@ export interface FhirServicePatchResource extends ResourceTags, ServiceManagedId // @public export interface FhirServices { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, fhirServiceName: string, fhirservice: FhirService, options?: FhirServicesCreateOrUpdateOptionalParams): Promise, FhirServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, fhirServiceName: string, fhirservice: FhirService, options?: FhirServicesCreateOrUpdateOptionalParams): Promise, FhirServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, fhirServiceName: string, fhirservice: FhirService, options?: FhirServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, fhirServiceName: string, workspaceName: string, options?: FhirServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, fhirServiceName: string, workspaceName: string, options?: FhirServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, fhirServiceName: string, workspaceName: string, options?: FhirServicesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, fhirServiceName: string, workspaceName: string, fhirservicePatchResource: FhirServicePatchResource, options?: FhirServicesUpdateOptionalParams): Promise, FhirServicesUpdateResponse>>; + beginUpdate(resourceGroupName: string, fhirServiceName: string, workspaceName: string, fhirservicePatchResource: FhirServicePatchResource, options?: FhirServicesUpdateOptionalParams): Promise, FhirServicesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, fhirServiceName: string, workspaceName: string, fhirservicePatchResource: FhirServicePatchResource, options?: FhirServicesUpdateOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, fhirServiceName: string, options?: FhirServicesGetOptionalParams): Promise; listByWorkspace(resourceGroupName: string, workspaceName: string, options?: FhirServicesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; @@ -309,6 +323,11 @@ export interface HealthcareApisManagementClientOptionalParams extends coreClient endpoint?: string; } +// @public +export interface ImplementationGuidesConfiguration { + usCoreMissingData?: boolean; +} + // @public export interface IotConnector extends TaggedResource, ServiceManagedIdentity { deviceMapping?: IotMappingProperties; @@ -325,9 +344,9 @@ export interface IotConnectorCollection { // @public export interface IotConnectorFhirDestination { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, iotFhirDestination: IotFhirDestination, options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams): Promise, IotConnectorFhirDestinationCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, iotFhirDestination: IotFhirDestination, options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams): Promise, IotConnectorFhirDestinationCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, iotFhirDestination: IotFhirDestination, options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, options?: IotConnectorFhirDestinationDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, options?: IotConnectorFhirDestinationDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, options?: IotConnectorFhirDestinationDeleteOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, iotConnectorName: string, fhirDestinationName: string, options?: IotConnectorFhirDestinationGetOptionalParams): Promise; } @@ -360,11 +379,11 @@ export interface IotConnectorPatchResource extends ResourceTags, ServiceManagedI // @public export interface IotConnectors { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, iotConnectorName: string, iotConnector: IotConnector, options?: IotConnectorsCreateOrUpdateOptionalParams): Promise, IotConnectorsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, iotConnectorName: string, iotConnector: IotConnector, options?: IotConnectorsCreateOrUpdateOptionalParams): Promise, IotConnectorsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, iotConnectorName: string, iotConnector: IotConnector, options?: IotConnectorsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, iotConnectorName: string, workspaceName: string, options?: IotConnectorsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, iotConnectorName: string, workspaceName: string, options?: IotConnectorsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, iotConnectorName: string, workspaceName: string, options?: IotConnectorsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, iotConnectorName: string, workspaceName: string, iotConnectorPatchResource: IotConnectorPatchResource, options?: IotConnectorsUpdateOptionalParams): Promise, IotConnectorsUpdateResponse>>; + beginUpdate(resourceGroupName: string, iotConnectorName: string, workspaceName: string, iotConnectorPatchResource: IotConnectorPatchResource, options?: IotConnectorsUpdateOptionalParams): Promise, IotConnectorsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, iotConnectorName: string, workspaceName: string, iotConnectorPatchResource: IotConnectorPatchResource, options?: IotConnectorsUpdateOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, iotConnectorName: string, options?: IotConnectorsGetOptionalParams): Promise; listByWorkspace(resourceGroupName: string, workspaceName: string, options?: IotConnectorsListByWorkspaceOptionalParams): PagedAsyncIterableIterator; @@ -595,8 +614,13 @@ export interface MetricSpecification { dimensions?: MetricDimension[]; displayDescription?: string; displayName?: string; + enableRegionalMdmAccount?: boolean; fillGapWithZero?: boolean; + isInternal?: boolean; + metricFilterPattern?: string; name?: string; + resourceIdDimensionNameOverride?: string; + sourceMdmAccount?: string; sourceMdmNamespace?: string; supportedAggregationTypes?: string[]; supportedTimeGrainTypes?: string[]; @@ -702,9 +726,9 @@ export type PrivateEndpointConnectionProvisioningState = string; // @public export interface PrivateEndpointConnections { - beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, PrivateEndpointConnectionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; listByService(resourceGroupName: string, resourceName: string, options?: PrivateEndpointConnectionsListByServiceOptionalParams): PagedAsyncIterableIterator; @@ -851,6 +875,7 @@ export interface ServiceCorsConfigurationInfo { // @public export interface ServiceCosmosDbConfigurationInfo { + crossTenantCmkApplicationId?: string; keyVaultKeyUri?: string; offerThroughput?: number; } @@ -863,6 +888,13 @@ export interface ServiceExportConfigurationInfo { storageAccountName?: string; } +// @public +export interface ServiceImportConfigurationInfo { + enabled?: boolean; + initialImportMode?: boolean; + integrationDataStore?: string; +} + // @public export interface ServiceManagedIdentity { identity?: ServiceManagedIdentityIdentity; @@ -893,11 +925,11 @@ export interface ServiceOciArtifactEntry { // @public export interface Services { - beginCreateOrUpdate(resourceGroupName: string, resourceName: string, serviceDescription: ServicesDescription, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, resourceName: string, serviceDescription: ServicesDescription, options?: ServicesCreateOrUpdateOptionalParams): Promise, ServicesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, resourceName: string, serviceDescription: ServicesDescription, options?: ServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: ServicesUpdateOptionalParams): Promise, ServicesUpdateResponse>>; + beginUpdate(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: ServicesUpdateOptionalParams): Promise, ServicesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, resourceName: string, servicePatchDescription: ServicesPatchDescription, options?: ServicesUpdateOptionalParams): Promise; checkNameAvailability(checkNameAvailabilityInputs: CheckNameAvailabilityParameters, options?: ServicesCheckNameAvailabilityOptionalParams): Promise; get(resourceGroupName: string, resourceName: string, options?: ServicesGetOptionalParams): Promise; @@ -1003,6 +1035,7 @@ export interface ServicesProperties { corsConfiguration?: ServiceCorsConfigurationInfo; cosmosDbConfiguration?: ServiceCosmosDbConfigurationInfo; exportConfiguration?: ServiceExportConfigurationInfo; + importConfiguration?: ServiceImportConfigurationInfo; privateEndpointConnections?: PrivateEndpointConnection[]; readonly provisioningState?: ProvisioningState; publicNetworkAccess?: PublicNetworkAccess; @@ -1076,9 +1109,9 @@ export interface WorkspacePatchResource extends ResourceTags { // @public export interface WorkspacePrivateEndpointConnections { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnectionDescription, options?: WorkspacePrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnectionDescription, options?: WorkspacePrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise, WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, properties: PrivateEndpointConnectionDescription, options?: WorkspacePrivateEndpointConnectionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: WorkspacePrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: WorkspacePrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: WorkspacePrivateEndpointConnectionsDeleteOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: WorkspacePrivateEndpointConnectionsGetOptionalParams): Promise; listByWorkspace(resourceGroupName: string, workspaceName: string, options?: WorkspacePrivateEndpointConnectionsListByWorkspaceOptionalParams): PagedAsyncIterableIterator; @@ -1142,11 +1175,11 @@ export interface WorkspaceProperties { // @public export interface Workspaces { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, workspace: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise, WorkspacesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, workspace: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise, WorkspacesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, workspace: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, workspaceName: string, workspacePatchResource: WorkspacePatchResource, options?: WorkspacesUpdateOptionalParams): Promise, WorkspacesUpdateResponse>>; + beginUpdate(resourceGroupName: string, workspaceName: string, workspacePatchResource: WorkspacePatchResource, options?: WorkspacesUpdateOptionalParams): Promise, WorkspacesUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, workspaceName: string, workspacePatchResource: WorkspacePatchResource, options?: WorkspacesUpdateOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, options?: WorkspacesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: WorkspacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts b/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts index bb4d3344229e..189a057c0c2b 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/healthcareApisManagementClient.ts @@ -54,7 +54,7 @@ export class HealthcareApisManagementClient extends coreClient.ServiceClient { /** * Initializes a new instance of the HealthcareApisManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. - * @param subscriptionId The subscription identifier. + * @param subscriptionId The ID of the target subscription. * @param options The parameter options */ constructor( @@ -78,7 +78,7 @@ export class HealthcareApisManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-healthcareapis/2.2.1`; + const packageDetails = `azsdk-js-arm-healthcareapis/3.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -131,7 +131,7 @@ export class HealthcareApisManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2021-11-01"; + this.apiVersion = options.apiVersion || "2023-09-06"; this.services = new ServicesImpl(this); this.privateEndpointConnections = new PrivateEndpointConnectionsImpl(this); this.privateLinkResources = new PrivateLinkResourcesImpl(this); diff --git a/sdk/healthcareapis/arm-healthcareapis/src/lroImpl.ts b/sdk/healthcareapis/arm-healthcareapis/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/lroImpl.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/lroImpl.ts @@ -6,29 +6,37 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT license. + +import { AbortSignalLike } from "@azure/abort-controller"; import { LongRunningOperation, LroResponse } from "@azure/core-lro"; -export class LroImpl implements LongRunningOperation { - constructor( - private sendOperationFn: (args: any, spec: any) => Promise>, - private args: Record, - private spec: { - readonly requestBody?: unknown; - readonly path?: string; - readonly httpMethod: string; - } & Record, - public requestPath: string = spec.path!, - public requestMethod: string = spec.httpMethod - ) {} - public async sendInitialRequest(): Promise> { - return this.sendOperationFn(this.args, this.spec); - } - public async sendPollRequest(path: string): Promise> { - const { requestBody, ...restSpec } = this.spec; - return this.sendOperationFn(this.args, { - ...restSpec, - path, - httpMethod: "GET" - }); - } +export function createLroSpec(inputs: { + sendOperationFn: (args: any, spec: any) => Promise>; + args: Record; + spec: { + readonly requestBody?: unknown; + readonly path?: string; + readonly httpMethod: string; + } & Record; +}): LongRunningOperation { + const { args, spec, sendOperationFn } = inputs; + return { + requestMethod: spec.httpMethod, + requestPath: spec.path!, + sendInitialRequest: () => sendOperationFn(args, spec), + sendPollRequest: ( + path: string, + options?: { abortSignal?: AbortSignalLike } + ) => { + const { requestBody, ...restSpec } = spec; + return sendOperationFn(args, { + ...restSpec, + httpMethod: "GET", + path, + abortSignal: options?.abortSignal + }); + } + }; } diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/index.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/index.ts index ad5104818263..8cfc38010719 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/models/index.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/index.ts @@ -31,6 +31,8 @@ export interface ServicesProperties { publicNetworkAccess?: PublicNetworkAccess; /** The azure container registry settings used for convert data operation of the service instance. */ acrConfiguration?: ServiceAcrConfigurationInfo; + /** The settings for the import operation of the service instance. */ + importConfiguration?: ServiceImportConfigurationInfo; } /** An access policy entry. */ @@ -45,6 +47,8 @@ export interface ServiceCosmosDbConfigurationInfo { offerThroughput?: number; /** The URI of the customer-managed key for the backing database. */ keyVaultKeyUri?: string; + /** The multi-tenant application id used to enable CMK access for services in a data sovereign region. */ + crossTenantCmkApplicationId?: string; } /** Authentication configuration information */ @@ -133,6 +137,16 @@ export interface ServiceOciArtifactEntry { digest?: string; } +/** Import operation configuration information */ +export interface ServiceImportConfigurationInfo { + /** The name of the default integration storage account. */ + integrationDataStore?: string; + /** If the FHIR service is in InitialImportMode. */ + initialImportMode?: boolean; + /** If the import operation is enabled. */ + enabled?: boolean; +} + /** Metadata pertaining to creation and last modification of the resource. */ export interface SystemData { /** The identity that created the resource. */ @@ -350,6 +364,20 @@ export interface DicomServiceAuthenticationConfiguration { readonly audiences?: string[]; } +/** The settings for the CORS configuration of the service instance. */ +export interface CorsConfiguration { + /** The origins to be allowed via CORS. */ + origins?: string[]; + /** The headers to be allowed via CORS. */ + headers?: string[]; + /** The methods to be allowed via CORS. */ + methods?: string[]; + /** The max age to be allowed via CORS. */ + maxAge?: number; + /** If credentials are allowed via CORS. */ + allowCredentials?: boolean; +} + /** Managed service identity (system assigned and/or user assigned identities) */ export interface ServiceManagedIdentity { /** Setting indicating whether the service has a managed identity associated with it. */ @@ -437,12 +465,6 @@ export interface FhirServiceCollection { value?: FhirService[]; } -/** An access policy entry. */ -export interface FhirServiceAccessPolicyEntry { - /** An Azure AD object ID (User or Apps) that is allowed access to the FHIR service. */ - objectId: string; -} - /** Azure container registry configuration information */ export interface FhirServiceAcrConfiguration { /** The list of the Azure container registry login servers. */ @@ -489,6 +511,22 @@ export interface ResourceVersionPolicyConfiguration { resourceTypeOverrides?: { [propertyName: string]: FhirResourceVersionPolicy }; } +/** Import operation configuration information */ +export interface FhirServiceImportConfiguration { + /** The name of the default integration storage account. */ + integrationDataStore?: string; + /** If the FHIR service is in InitialImportMode. */ + initialImportMode?: boolean; + /** If the import operation is enabled. */ + enabled?: boolean; +} + +/** The settings for Implementation Guides - defining capabilities for national standards, vendor consortiums, clinical societies, etc. */ +export interface ImplementationGuidesConfiguration { + /** If US Core Missing Data requirement is enabled. */ + usCoreMissingData?: boolean; +} + /** Available operations of the service */ export interface ListOperations { /** @@ -599,10 +637,20 @@ export interface MetricSpecification { supportedTimeGrainTypes?: string[]; /** Optional. If set to true, then zero will be returned for time duration where no metric is emitted/published. */ fillGapWithZero?: boolean; + /** Pattern for the filter of the metric. */ + metricFilterPattern?: string; /** Dimensions of the metric */ dimensions?: MetricDimension[]; - /** Name of the MDM namespace. Optional. */ + /** Whether the metric is internal. */ + isInternal?: boolean; + /** The source MDM account. */ + sourceMdmAccount?: string; + /** The source MDM namespace. */ sourceMdmNamespace?: string; + /** Whether regional MDM account enabled. */ + enableRegionalMdmAccount?: boolean; + /** The resource Id dimension name override. */ + resourceIdDimensionNameOverride?: string; } /** Specifications of the Dimension of metrics */ @@ -733,6 +781,8 @@ export interface DicomService extends TaggedResource, ServiceManagedIdentity { readonly provisioningState?: ProvisioningState; /** Dicom Service authentication configuration. */ authenticationConfiguration?: DicomServiceAuthenticationConfiguration; + /** Dicom Service Cors configuration. */ + corsConfiguration?: CorsConfiguration; /** * The url of the Dicom Services. * NOTE: This property will not be serialized. It can only be populated by the server. @@ -745,6 +795,11 @@ export interface DicomService extends TaggedResource, ServiceManagedIdentity { readonly privateEndpointConnections?: PrivateEndpointConnection[]; /** Control permission for data plane traffic coming from public networks while private endpoint is enabled. */ publicNetworkAccess?: PublicNetworkAccess; + /** + * DICOM Service event support status. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly eventState?: ServiceEventState; } /** IoT Connector definition. */ @@ -779,8 +834,6 @@ export interface FhirService extends TaggedResource, ServiceManagedIdentity { * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly provisioningState?: ProvisioningState; - /** Fhir Service access policies. */ - accessPolicies?: FhirServiceAccessPolicyEntry[]; /** Fhir Service Azure container registry configuration. */ acrConfiguration?: FhirServiceAcrConfiguration; /** Fhir Service authentication configuration. */ @@ -803,6 +856,10 @@ export interface FhirService extends TaggedResource, ServiceManagedIdentity { readonly eventState?: ServiceEventState; /** Determines tracking of history for resources. */ resourceVersionPolicyConfiguration?: ResourceVersionPolicyConfiguration; + /** Fhir Service import configuration. */ + importConfiguration?: FhirServiceImportConfiguration; + /** Implementation Guides configuration. */ + implementationGuidesConfiguration?: ImplementationGuidesConfiguration; } /** IoT Connector destination properties for an Azure FHIR service. */ @@ -1021,6 +1078,27 @@ export enum KnownManagedServiceIdentityType { */ export type ManagedServiceIdentityType = string; +/** Known values of {@link ServiceEventState} that the service accepts. */ +export enum KnownServiceEventState { + /** Disabled */ + Disabled = "Disabled", + /** Enabled */ + Enabled = "Enabled", + /** Updating */ + Updating = "Updating" +} + +/** + * Defines values for ServiceEventState. \ + * {@link KnownServiceEventState} can be used interchangeably with ServiceEventState, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **Disabled** \ + * **Enabled** \ + * **Updating** + */ +export type ServiceEventState = string; + /** Known values of {@link ServiceManagedIdentityType} that the service accepts. */ export enum KnownServiceManagedIdentityType { /** None */ @@ -1081,27 +1159,6 @@ export enum KnownFhirServiceKind { */ export type FhirServiceKind = string; -/** Known values of {@link ServiceEventState} that the service accepts. */ -export enum KnownServiceEventState { - /** Disabled */ - Disabled = "Disabled", - /** Enabled */ - Enabled = "Enabled", - /** Updating */ - Updating = "Updating" -} - -/** - * Defines values for ServiceEventState. \ - * {@link KnownServiceEventState} can be used interchangeably with ServiceEventState, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **Disabled** \ - * **Enabled** \ - * **Updating** - */ -export type ServiceEventState = string; - /** Known values of {@link FhirResourceVersionPolicy} that the service accepts. */ export enum KnownFhirResourceVersionPolicy { /** NoVersion */ diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts index 4766cbd62843..490e1eb7bb04 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/mappers.ts @@ -84,6 +84,13 @@ export const ServicesProperties: coreClient.CompositeMapper = { name: "Composite", className: "ServiceAcrConfigurationInfo" } + }, + importConfiguration: { + serializedName: "importConfiguration", + type: { + name: "Composite", + className: "ServiceImportConfigurationInfo" + } } } } @@ -129,6 +136,17 @@ export const ServiceCosmosDbConfigurationInfo: coreClient.CompositeMapper = { type: { name: "String" } + }, + crossTenantCmkApplicationId: { + constraints: { + Pattern: new RegExp( + "^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$" + ) + }, + serializedName: "crossTenantCmkApplicationId", + type: { + name: "String" + } } } } @@ -371,6 +389,33 @@ export const ServiceOciArtifactEntry: coreClient.CompositeMapper = { } }; +export const ServiceImportConfigurationInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ServiceImportConfigurationInfo", + modelProperties: { + integrationDataStore: { + serializedName: "integrationDataStore", + type: { + name: "String" + } + }, + initialImportMode: { + serializedName: "initialImportMode", + type: { + name: "Boolean" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", @@ -891,6 +936,69 @@ export const DicomServiceAuthenticationConfiguration: coreClient.CompositeMapper } }; +export const CorsConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "CorsConfiguration", + modelProperties: { + origins: { + serializedName: "origins", + type: { + name: "Sequence", + element: { + constraints: { + Pattern: new RegExp( + "^(?:(?:(?:[hH][tT][tT][pP](?:[sS]|))\\:\\/\\/(?:[a-zA-Z0-9-]+[.]?)+(?:\\:[0-9]{1,5})?|[*]))$" + ) + }, + type: { + name: "String" + } + } + } + }, + headers: { + serializedName: "headers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + methods: { + serializedName: "methods", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + maxAge: { + constraints: { + InclusiveMaximum: 99999, + InclusiveMinimum: 0 + }, + serializedName: "maxAge", + type: { + name: "Number" + } + }, + allowCredentials: { + serializedName: "allowCredentials", + type: { + name: "Boolean" + } + } + } + } +}; + export const ServiceManagedIdentity: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1109,27 +1217,6 @@ export const FhirServiceCollection: coreClient.CompositeMapper = { } }; -export const FhirServiceAccessPolicyEntry: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "FhirServiceAccessPolicyEntry", - modelProperties: { - objectId: { - constraints: { - Pattern: new RegExp( - "^(([0-9A-Fa-f]{8}[-]?(?:[0-9A-Fa-f]{4}[-]?){3}[0-9A-Fa-f]{12}){1})+$" - ) - }, - serializedName: "objectId", - required: true, - type: { - name: "String" - } - } - } - } -}; - export const FhirServiceAcrConfiguration: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1289,6 +1376,48 @@ export const ResourceVersionPolicyConfiguration: coreClient.CompositeMapper = { } }; +export const FhirServiceImportConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FhirServiceImportConfiguration", + modelProperties: { + integrationDataStore: { + serializedName: "integrationDataStore", + type: { + name: "String" + } + }, + initialImportMode: { + serializedName: "initialImportMode", + type: { + name: "Boolean" + } + }, + enabled: { + serializedName: "enabled", + type: { + name: "Boolean" + } + } + } + } +}; + +export const ImplementationGuidesConfiguration: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ImplementationGuidesConfiguration", + modelProperties: { + usCoreMissingData: { + serializedName: "usCoreMissingData", + type: { + name: "Boolean" + } + } + } + } +}; + export const ListOperations: coreClient.CompositeMapper = { type: { name: "Composite", @@ -1550,6 +1679,12 @@ export const MetricSpecification: coreClient.CompositeMapper = { name: "Boolean" } }, + metricFilterPattern: { + serializedName: "metricFilterPattern", + type: { + name: "String" + } + }, dimensions: { serializedName: "dimensions", type: { @@ -1562,11 +1697,35 @@ export const MetricSpecification: coreClient.CompositeMapper = { } } }, + isInternal: { + serializedName: "isInternal", + type: { + name: "Boolean" + } + }, + sourceMdmAccount: { + serializedName: "sourceMdmAccount", + type: { + name: "String" + } + }, sourceMdmNamespace: { serializedName: "sourceMdmNamespace", type: { name: "String" } + }, + enableRegionalMdmAccount: { + serializedName: "enableRegionalMdmAccount", + type: { + name: "Boolean" + } + }, + resourceIdDimensionNameOverride: { + serializedName: "resourceIdDimensionNameOverride", + type: { + name: "String" + } } } } @@ -1864,6 +2023,13 @@ export const DicomService: coreClient.CompositeMapper = { className: "DicomServiceAuthenticationConfiguration" } }, + corsConfiguration: { + serializedName: "properties.corsConfiguration", + type: { + name: "Composite", + className: "CorsConfiguration" + } + }, serviceUrl: { serializedName: "properties.serviceUrl", readOnly: true, @@ -1889,6 +2055,13 @@ export const DicomService: coreClient.CompositeMapper = { type: { name: "String" } + }, + eventState: { + serializedName: "properties.eventState", + readOnly: true, + type: { + name: "String" + } } } } @@ -1960,18 +2133,6 @@ export const FhirService: coreClient.CompositeMapper = { name: "String" } }, - accessPolicies: { - serializedName: "properties.accessPolicies", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "FhirServiceAccessPolicyEntry" - } - } - } - }, acrConfiguration: { serializedName: "properties.acrConfiguration", type: { @@ -2032,6 +2193,20 @@ export const FhirService: coreClient.CompositeMapper = { name: "Composite", className: "ResourceVersionPolicyConfiguration" } + }, + importConfiguration: { + serializedName: "properties.importConfiguration", + type: { + name: "Composite", + className: "FhirServiceImportConfiguration" + } + }, + implementationGuidesConfiguration: { + serializedName: "properties.implementationGuidesConfiguration", + type: { + name: "Composite", + className: "ImplementationGuidesConfiguration" + } } } } diff --git a/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts b/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts index a4cc731cb932..af18224ca957 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/models/parameters.ts @@ -55,7 +55,7 @@ export const $host: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2021-11-01", + defaultValue: "2023-09-06", isConstant: true, serializedName: "api-version", type: { @@ -67,6 +67,9 @@ export const apiVersion: OperationQueryParameter = { export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { + constraints: { + MinLength: 1 + }, serializedName: "subscriptionId", required: true, type: { diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/dicomServices.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/dicomServices.ts index dec26f51d1c3..3d08ca68a3c2 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/dicomServices.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/dicomServices.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { DicomService, DicomServicesListByWorkspaceNextOptionalParams, @@ -179,8 +183,8 @@ export class DicomServicesImpl implements DicomServices { dicomservice: DicomService, options?: DicomServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DicomServicesCreateOrUpdateResponse > > { @@ -190,7 +194,7 @@ export class DicomServicesImpl implements DicomServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -223,19 +227,22 @@ export class DicomServicesImpl implements DicomServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, dicomServiceName, dicomservice, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DicomServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -282,8 +289,8 @@ export class DicomServicesImpl implements DicomServices { dicomservicePatchResource: DicomServicePatchResource, options?: DicomServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DicomServicesUpdateResponse > > { @@ -293,7 +300,7 @@ export class DicomServicesImpl implements DicomServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -326,19 +333,22 @@ export class DicomServicesImpl implements DicomServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, dicomServiceName, workspaceName, dicomservicePatchResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DicomServicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -382,14 +392,14 @@ export class DicomServicesImpl implements DicomServices { dicomServiceName: string, workspaceName: string, options?: DicomServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -422,13 +432,13 @@ export class DicomServicesImpl implements DicomServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, dicomServiceName, workspaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, dicomServiceName, workspaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -627,7 +637,6 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirDestinations.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirDestinations.ts index 63c0b5e0fb82..aa8d90d41675 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirDestinations.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirDestinations.ts @@ -204,7 +204,6 @@ const listByIotConnectorNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirServices.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirServices.ts index 7eff04ee0291..0bb626f59e29 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirServices.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/fhirServices.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { FhirService, FhirServicesListByWorkspaceNextOptionalParams, @@ -179,8 +183,8 @@ export class FhirServicesImpl implements FhirServices { fhirservice: FhirService, options?: FhirServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, FhirServicesCreateOrUpdateResponse > > { @@ -190,7 +194,7 @@ export class FhirServicesImpl implements FhirServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -223,19 +227,22 @@ export class FhirServicesImpl implements FhirServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, fhirServiceName, fhirservice, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + FhirServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -282,8 +289,8 @@ export class FhirServicesImpl implements FhirServices { fhirservicePatchResource: FhirServicePatchResource, options?: FhirServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, FhirServicesUpdateResponse > > { @@ -293,7 +300,7 @@ export class FhirServicesImpl implements FhirServices { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -326,19 +333,22 @@ export class FhirServicesImpl implements FhirServices { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fhirServiceName, workspaceName, fhirservicePatchResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + FhirServicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -382,14 +392,14 @@ export class FhirServicesImpl implements FhirServices { fhirServiceName: string, workspaceName: string, options?: FhirServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -422,13 +432,13 @@ export class FhirServicesImpl implements FhirServices { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, fhirServiceName, workspaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, fhirServiceName, workspaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -627,7 +637,6 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectorFhirDestination.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectorFhirDestination.ts index 064029281ade..42f84128d843 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectorFhirDestination.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectorFhirDestination.ts @@ -11,8 +11,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { IotConnectorFhirDestinationGetOptionalParams, IotConnectorFhirDestinationGetResponse, @@ -80,8 +84,8 @@ export class IotConnectorFhirDestinationImpl iotFhirDestination: IotFhirDestination, options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, IotConnectorFhirDestinationCreateOrUpdateResponse > > { @@ -91,7 +95,7 @@ export class IotConnectorFhirDestinationImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -124,9 +128,9 @@ export class IotConnectorFhirDestinationImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, iotConnectorName, @@ -134,10 +138,13 @@ export class IotConnectorFhirDestinationImpl iotFhirDestination, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + IotConnectorFhirDestinationCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -187,14 +194,14 @@ export class IotConnectorFhirDestinationImpl iotConnectorName: string, fhirDestinationName: string, options?: IotConnectorFhirDestinationDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -227,19 +234,19 @@ export class IotConnectorFhirDestinationImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, iotConnectorName, fhirDestinationName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectors.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectors.ts index 0b8892cda774..45a44eb984d4 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectors.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/iotConnectors.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { IotConnector, IotConnectorsListByWorkspaceNextOptionalParams, @@ -179,8 +183,8 @@ export class IotConnectorsImpl implements IotConnectors { iotConnector: IotConnector, options?: IotConnectorsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, IotConnectorsCreateOrUpdateResponse > > { @@ -190,7 +194,7 @@ export class IotConnectorsImpl implements IotConnectors { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -223,19 +227,22 @@ export class IotConnectorsImpl implements IotConnectors { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, iotConnectorName, iotConnector, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + IotConnectorsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -282,8 +289,8 @@ export class IotConnectorsImpl implements IotConnectors { iotConnectorPatchResource: IotConnectorPatchResource, options?: IotConnectorsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, IotConnectorsUpdateResponse > > { @@ -293,7 +300,7 @@ export class IotConnectorsImpl implements IotConnectors { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -326,19 +333,22 @@ export class IotConnectorsImpl implements IotConnectors { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, iotConnectorName, workspaceName, iotConnectorPatchResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + IotConnectorsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -382,14 +392,14 @@ export class IotConnectorsImpl implements IotConnectors { iotConnectorName: string, workspaceName: string, options?: IotConnectorsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -422,13 +432,13 @@ export class IotConnectorsImpl implements IotConnectors { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, iotConnectorName, workspaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, iotConnectorName, workspaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -627,7 +637,6 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts index 34179c53088d..79db4cda9a7f 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/operations.ts @@ -143,7 +143,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts index 692847d3d3c6..37062af0c043 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/privateEndpointConnections.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnectionDescription, PrivateEndpointConnectionsListByServiceOptionalParams, @@ -164,8 +168,8 @@ export class PrivateEndpointConnectionsImpl properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > > { @@ -175,7 +179,7 @@ export class PrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -208,19 +212,22 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, privateEndpointConnectionName, properties, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -266,14 +273,14 @@ export class PrivateEndpointConnectionsImpl resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -306,18 +313,18 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts index 8e7c16f195ad..66bf5c86b16f 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/services.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { ServicesDescription, ServicesListNextOptionalParams, @@ -204,8 +208,8 @@ export class ServicesImpl implements Services { serviceDescription: ServicesDescription, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > > { @@ -215,7 +219,7 @@ export class ServicesImpl implements Services { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -248,13 +252,16 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourceName, serviceDescription, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, serviceDescription, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + ServicesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -296,8 +303,8 @@ export class ServicesImpl implements Services { servicePatchDescription: ServicesPatchDescription, options?: ServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesUpdateResponse > > { @@ -307,7 +314,7 @@ export class ServicesImpl implements Services { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -340,13 +347,21 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourceName, servicePatchDescription, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + resourceName, + servicePatchDescription, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + ServicesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -385,14 +400,14 @@ export class ServicesImpl implements Services { resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -425,13 +440,13 @@ export class ServicesImpl implements Services { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, resourceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, resourceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -712,7 +727,6 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -732,7 +746,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/workspacePrivateEndpointConnections.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/workspacePrivateEndpointConnections.ts index 317c46096e8f..081392f517d2 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/workspacePrivateEndpointConnections.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/workspacePrivateEndpointConnections.ts @@ -12,8 +12,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { PrivateEndpointConnectionDescription, WorkspacePrivateEndpointConnectionsListByWorkspaceOptionalParams, @@ -163,10 +167,8 @@ export class WorkspacePrivateEndpointConnectionsImpl properties: PrivateEndpointConnectionDescription, options?: WorkspacePrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse > > { @@ -176,7 +178,7 @@ export class WorkspacePrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -209,19 +211,22 @@ export class WorkspacePrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, privateEndpointConnectionName, properties, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -267,14 +272,14 @@ export class WorkspacePrivateEndpointConnectionsImpl workspaceName: string, privateEndpointConnectionName: string, options?: WorkspacePrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -307,18 +312,18 @@ export class WorkspacePrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, privateEndpointConnectionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operations/workspaces.ts b/sdk/healthcareapis/arm-healthcareapis/src/operations/workspaces.ts index 3047fa1bcd3c..262808bdfa14 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operations/workspaces.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operations/workspaces.ts @@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { HealthcareApisManagementClient } from "../healthcareApisManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; +import { + SimplePollerLike, + OperationState, + createHttpPoller +} from "@azure/core-lro"; +import { createLroSpec } from "../lroImpl"; import { Workspace, WorkspacesListBySubscriptionNextOptionalParams, @@ -229,8 +233,8 @@ export class WorkspacesImpl implements Workspaces { workspace: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, WorkspacesCreateOrUpdateResponse > > { @@ -240,7 +244,7 @@ export class WorkspacesImpl implements Workspaces { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -273,13 +277,16 @@ export class WorkspacesImpl implements Workspaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, workspace, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, workspace, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + WorkspacesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -321,8 +328,8 @@ export class WorkspacesImpl implements Workspaces { workspacePatchResource: WorkspacePatchResource, options?: WorkspacesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, WorkspacesUpdateResponse > > { @@ -332,7 +339,7 @@ export class WorkspacesImpl implements Workspaces { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -365,13 +372,21 @@ export class WorkspacesImpl implements Workspaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, workspacePatchResource, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + workspaceName, + workspacePatchResource, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + WorkspacesUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -410,14 +425,14 @@ export class WorkspacesImpl implements Workspaces { resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams - ): Promise, void>> { + ): Promise, void>> { const directSendOperation = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -450,13 +465,13 @@ export class WorkspacesImpl implements Workspaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, workspaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -677,7 +692,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -697,7 +711,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorDetails } }, - queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/dicomServices.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/dicomServices.ts index 08f12dd77986..75fe0382695e 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/dicomServices.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/dicomServices.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { DicomService, DicomServicesListByWorkspaceOptionalParams, @@ -63,8 +63,8 @@ export interface DicomServices { dicomservice: DicomService, options?: DicomServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DicomServicesCreateOrUpdateResponse > >; @@ -98,8 +98,8 @@ export interface DicomServices { dicomservicePatchResource: DicomServicePatchResource, options?: DicomServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DicomServicesUpdateResponse > >; @@ -130,7 +130,7 @@ export interface DicomServices { dicomServiceName: string, workspaceName: string, options?: DicomServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a DICOM Service. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/fhirServices.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/fhirServices.ts index c186f2b8894a..64eff70901dd 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/fhirServices.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/fhirServices.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { FhirService, FhirServicesListByWorkspaceOptionalParams, @@ -63,8 +63,8 @@ export interface FhirServices { fhirservice: FhirService, options?: FhirServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, FhirServicesCreateOrUpdateResponse > >; @@ -98,8 +98,8 @@ export interface FhirServices { fhirservicePatchResource: FhirServicePatchResource, options?: FhirServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, FhirServicesUpdateResponse > >; @@ -130,7 +130,7 @@ export interface FhirServices { fhirServiceName: string, workspaceName: string, options?: FhirServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a FHIR Service. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectorFhirDestination.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectorFhirDestination.ts index 5c31da35e2f2..33754973f1cf 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectorFhirDestination.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectorFhirDestination.ts @@ -6,7 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { IotConnectorFhirDestinationGetOptionalParams, IotConnectorFhirDestinationGetResponse, @@ -51,8 +51,8 @@ export interface IotConnectorFhirDestination { iotFhirDestination: IotFhirDestination, options?: IotConnectorFhirDestinationCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, IotConnectorFhirDestinationCreateOrUpdateResponse > >; @@ -88,7 +88,7 @@ export interface IotConnectorFhirDestination { iotConnectorName: string, fhirDestinationName: string, options?: IotConnectorFhirDestinationDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an IoT Connector FHIR destination. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectors.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectors.ts index 795077e37e01..83ae3e480f05 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectors.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/iotConnectors.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { IotConnector, IotConnectorsListByWorkspaceOptionalParams, @@ -63,8 +63,8 @@ export interface IotConnectors { iotConnector: IotConnector, options?: IotConnectorsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, IotConnectorsCreateOrUpdateResponse > >; @@ -98,8 +98,8 @@ export interface IotConnectors { iotConnectorPatchResource: IotConnectorPatchResource, options?: IotConnectorsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, IotConnectorsUpdateResponse > >; @@ -130,7 +130,7 @@ export interface IotConnectors { iotConnectorName: string, workspaceName: string, options?: IotConnectorsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes an IoT Connector. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/privateEndpointConnections.ts index ad3e5efa7278..1b8b8df38b65 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/privateEndpointConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnectionDescription, PrivateEndpointConnectionsListByServiceOptionalParams, @@ -63,8 +63,8 @@ export interface PrivateEndpointConnections { properties: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface PrivateEndpointConnections { resourceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a private endpoint connection. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/services.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/services.ts index f2ca5889449f..390424547b9f 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/services.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/services.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { ServicesDescription, ServicesListOptionalParams, @@ -68,8 +68,8 @@ export interface Services { serviceDescription: ServicesDescription, options?: ServicesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesCreateOrUpdateResponse > >; @@ -99,8 +99,8 @@ export interface Services { servicePatchDescription: ServicesPatchDescription, options?: ServicesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, ServicesUpdateResponse > >; @@ -127,7 +127,7 @@ export interface Services { resourceGroupName: string, resourceName: string, options?: ServicesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a service instance. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspacePrivateEndpointConnections.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspacePrivateEndpointConnections.ts index 13f9eb989946..dc76d487dc5b 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspacePrivateEndpointConnections.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspacePrivateEndpointConnections.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnectionDescription, WorkspacePrivateEndpointConnectionsListByWorkspaceOptionalParams, @@ -62,10 +62,8 @@ export interface WorkspacePrivateEndpointConnections { properties: PrivateEndpointConnectionDescription, options?: WorkspacePrivateEndpointConnectionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState< - WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse - >, + SimplePollerLike< + OperationState, WorkspacePrivateEndpointConnectionsCreateOrUpdateResponse > >; @@ -98,7 +96,7 @@ export interface WorkspacePrivateEndpointConnections { workspaceName: string, privateEndpointConnectionName: string, options?: WorkspacePrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a private endpoint connection. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspaces.ts b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspaces.ts index 21d99bf84579..90fa8db087fb 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspaces.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/operationsInterfaces/workspaces.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { Workspace, WorkspacesListBySubscriptionOptionalParams, @@ -65,8 +65,8 @@ export interface Workspaces { workspace: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, WorkspacesCreateOrUpdateResponse > >; @@ -96,8 +96,8 @@ export interface Workspaces { workspacePatchResource: WorkspacePatchResource, options?: WorkspacesUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, WorkspacesUpdateResponse > >; @@ -124,7 +124,7 @@ export interface Workspaces { resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a specified workspace. * @param resourceGroupName The name of the resource group that contains the service instance. diff --git a/sdk/healthcareapis/arm-healthcareapis/src/pagingHelper.ts b/sdk/healthcareapis/arm-healthcareapis/src/pagingHelper.ts index d85fc13bce1e..269a2b9814b5 100644 --- a/sdk/healthcareapis/arm-healthcareapis/src/pagingHelper.ts +++ b/sdk/healthcareapis/arm-healthcareapis/src/pagingHelper.ts @@ -13,11 +13,11 @@ export interface PageInfo { const pageMap = new WeakMap(); /** - * Given a result page from a pageable operation, returns a - * continuation token that can be used to begin paging from + * Given the last `.value` produced by the `byPage` iterator, + * returns a continuation token that can be used to begin paging from * that point later. - * @param page A result object from calling .byPage() on a paged operation. - * @returns The continuation token that can be passed into byPage(). + * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator. + * @returns The continuation token that can be passed into byPage() during future calls. */ export function getContinuationToken(page: unknown): string | undefined { if (typeof page !== "object" || page === null) { diff --git a/sdk/healthcareapis/arm-healthcareapis/tsconfig.json b/sdk/healthcareapis/arm-healthcareapis/tsconfig.json index c8e6903ace68..3e6ae96443f3 100644 --- a/sdk/healthcareapis/arm-healthcareapis/tsconfig.json +++ b/sdk/healthcareapis/arm-healthcareapis/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-healthcareapis": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"