diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index d6c5bdb090f4..52bb676a33c8 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -12,6 +12,7 @@ specifiers: '@rush-temp/ai-metrics-advisor': file:./projects/ai-metrics-advisor.tgz '@rush-temp/ai-personalizer': file:./projects/ai-personalizer.tgz '@rush-temp/ai-text-analytics': file:./projects/ai-text-analytics.tgz + '@rush-temp/ai-translation-text': file:./projects/ai-translation-text.tgz '@rush-temp/api-management-custom-widgets-scaffolder': file:./projects/api-management-custom-widgets-scaffolder.tgz '@rush-temp/api-management-custom-widgets-tools': file:./projects/api-management-custom-widgets-tools.tgz '@rush-temp/app-configuration': file:./projects/app-configuration.tgz @@ -217,7 +218,6 @@ specifiers: '@rush-temp/arm-workloads': file:./projects/arm-workloads.tgz '@rush-temp/arm-workspaces': file:./projects/arm-workspaces.tgz '@rush-temp/attestation': file:./projects/attestation.tgz - '@rush-temp/ai-translation-text': file:./projects/ai-translation-text.tgz '@rush-temp/communication-alpha-ids': file:./projects/communication-alpha-ids.tgz '@rush-temp/communication-call-automation': file:./projects/communication-call-automation.tgz '@rush-temp/communication-chat': file:./projects/communication-chat.tgz @@ -350,6 +350,7 @@ dependencies: '@rush-temp/ai-metrics-advisor': file:projects/ai-metrics-advisor.tgz '@rush-temp/ai-personalizer': file:projects/ai-personalizer.tgz '@rush-temp/ai-text-analytics': file:projects/ai-text-analytics.tgz + '@rush-temp/ai-translation-text': file:projects/ai-translation-text.tgz '@rush-temp/api-management-custom-widgets-scaffolder': file:projects/api-management-custom-widgets-scaffolder.tgz '@rush-temp/api-management-custom-widgets-tools': file:projects/api-management-custom-widgets-tools.tgz '@rush-temp/app-configuration': file:projects/app-configuration.tgz @@ -555,7 +556,6 @@ dependencies: '@rush-temp/arm-workloads': file:projects/arm-workloads.tgz '@rush-temp/arm-workspaces': file:projects/arm-workspaces.tgz '@rush-temp/attestation': file:projects/attestation.tgz - '@rush-temp/ai-translation-text': file:projects/ai-translation-text.tgz '@rush-temp/communication-alpha-ids': file:projects/communication-alpha-ids.tgz '@rush-temp/communication-call-automation': file:projects/communication-call-automation.tgz '@rush-temp/communication-chat': file:projects/communication-chat.tgz @@ -738,6 +738,7 @@ packages: /@azure/ai-form-recognizer/3.1.0-beta.3: resolution: {integrity: sha512-+4QtFKNyxAmdqpcYjuAtmWKm/MuOe9kZsbpS9jA9h0YHzngNj5gc67AA4egV9BXOq9x+1phjYTNC/rxiOUr1uQ==} engines: {node: '>=8.0.0'} + deprecated: Please migrate to a supported (non-beta) version of this package dependencies: '@azure/core-auth': 1.4.0 '@azure/core-http': 1.2.6 @@ -4002,7 +4003,7 @@ packages: dependencies: semver: 7.3.8 shelljs: 0.8.5 - typescript: 5.1.0-dev.20230412 + typescript: 5.1.0-dev.20230414 dev: false /ecdsa-sig-formatter/1.0.11: @@ -8865,8 +8866,8 @@ packages: hasBin: true dev: false - /typescript/5.1.0-dev.20230412: - resolution: {integrity: sha512-O7UY8wd8wEa6pd6CpVFbS9u+DArm73B4rRz8dwm6SDORvEF7rbuNzJ6GTTnBvGavlVkWT5/cYstySs5uhj0vPg==} + /typescript/5.1.0-dev.20230414: + resolution: {integrity: sha512-Rpd/wloN/Coy34PDLmFIQ8jleaTSqBlZZszwFjJVjKDpiLQt+5/UgedPoax42GHt5+9qCXrvDQZ3JA7bi4qH5g==} engines: {node: '>=12.20'} hasBin: true dev: false @@ -9866,6 +9867,47 @@ packages: - utf-8-validate dev: false + file:projects/ai-translation-text.tgz: + resolution: {integrity: sha512-+LZrnKC6WEXktJx5OM7vSu4A3EwsBCcnX3xS4R5x1MYKUzTkgXoC1xDrXPfX/fX/98de+6s5yKkX+bWeFoOt8Q==, tarball: file:projects/ai-translation-text.tgz} + name: '@rush-temp/ai-translation-text' + version: 0.0.0 + dependencies: + '@azure/identity': 2.1.0 + '@microsoft/api-extractor': 7.34.4_@types+node@14.18.42 + '@types/chai': 4.3.4 + '@types/mocha': 7.0.2 + '@types/node': 14.18.42 + autorest: 3.6.3 + chai: 4.3.7 + cross-env: 7.0.3 + dotenv: 16.0.3 + eslint: 8.37.0 + karma: 6.4.1 + karma-chrome-launcher: 3.1.1 + karma-coverage: 2.2.0 + karma-env-preprocessor: 0.1.1 + karma-firefox-launcher: 1.3.0 + karma-junit-reporter: 2.0.1_karma@6.4.1 + karma-mocha: 2.0.1 + karma-mocha-reporter: 2.2.5_karma@6.4.1 + karma-source-map-support: 1.4.0 + karma-sourcemap-loader: 0.3.8 + mkdirp: 2.1.6 + mocha: 7.2.0 + mocha-junit-reporter: 1.23.3_mocha@7.2.0 + nyc: 15.1.0 + prettier: 2.8.7 + rimraf: 3.0.2 + source-map-support: 0.5.21 + tslib: 2.5.0 + typescript: 4.8.4 + transitivePeerDependencies: + - bufferutil + - debug + - supports-color + - utf-8-validate + dev: false + file:projects/api-management-custom-widgets-scaffolder.tgz: resolution: {integrity: sha512-QNlFQJsk/3ET4caCJxXBWooRMGlyglbYaCmZDQL28eE8fjHX62lkGweUlMvBZKspVE6UaaDrl3ddDJVJeybv8g==, tarball: file:projects/api-management-custom-widgets-scaffolder.tgz} name: '@rush-temp/api-management-custom-widgets-scaffolder' @@ -12112,7 +12154,7 @@ packages: dev: false file:projects/arm-eventgrid.tgz: - resolution: {integrity: sha512-qAQP1Og7zuaQ82o1e9XeeMNBQ+Y1pnt5hNMrFWWktOOmKOoPNHXWaj6oEwh6VjGyXRqB6AneJWtYteuNxCQC6g==, tarball: file:projects/arm-eventgrid.tgz} + resolution: {integrity: sha512-0FgK7fuVb5DylI9LkhlaxoPBR5AvLFeAUCHsG/EOB2P6z0NhmG75Ts6gIEPaAZJb33TWli37Bk2MNobSYxCd/w==, tarball: file:projects/arm-eventgrid.tgz} name: '@rush-temp/arm-eventgrid' version: 0.0.0 dependencies: @@ -12127,7 +12169,7 @@ packages: chai: 4.3.7 cross-env: 7.0.3 dotenv: 16.0.3 - mkdirp: 1.0.4 + mkdirp: 2.1.6 mocha: 7.2.0 rimraf: 3.0.2 rollup: 2.79.1 @@ -15674,47 +15716,6 @@ packages: - utf-8-validate dev: false - file:projects/ai-translation-text.tgz: - resolution: {integrity: sha512-t1vY6CnSsEovNxSSUxRia/62S0MvizhtA8sqFxpbQYqmk369JA3RcADZgFIJybT0nlOybtuI8IK7XjF33LGYdQ==, tarball: file:projects/ai-translation-text.tgz} - name: '@rush-temp/ai-translation-text' - version: 0.0.0 - dependencies: - '@azure/identity': 2.1.0 - '@microsoft/api-extractor': 7.34.3_@types+node@14.18.36 - '@types/chai': 4.3.4 - '@types/mocha': 7.0.2 - '@types/node': 14.18.36 - autorest: 3.6.3 - chai: 4.3.7 - cross-env: 7.0.3 - dotenv: 16.0.3 - eslint: 8.33.0 - karma: 6.4.1 - karma-chrome-launcher: 3.1.1 - karma-coverage: 2.2.0 - karma-env-preprocessor: 0.1.1 - karma-firefox-launcher: 1.3.0 - karma-junit-reporter: 2.0.1_karma@6.4.1 - karma-mocha: 2.0.1 - karma-mocha-reporter: 2.2.5_karma@6.4.1 - karma-source-map-support: 1.4.0 - karma-sourcemap-loader: 0.3.8 - mkdirp: 2.1.3 - mocha: 7.2.0 - mocha-junit-reporter: 1.23.3_mocha@7.2.0 - nyc: 15.1.0 - prettier: 2.8.3 - rimraf: 3.0.2 - source-map-support: 0.5.21 - tslib: 2.5.0 - typescript: 4.8.4 - transitivePeerDependencies: - - bufferutil - - debug - - supports-color - - utf-8-validate - dev: false - file:projects/communication-alpha-ids.tgz: resolution: {integrity: sha512-gFfNaey5SYHtam8H0afb4emCX5xnhR6Ox3K+kzSJUVtrNC4fakIPOWaks0YtFd96toLk6vqIafa+cGdqdRrPPQ==, tarball: file:projects/communication-alpha-ids.tgz} name: '@rush-temp/communication-alpha-ids' @@ -16374,7 +16375,7 @@ packages: dev: false file:projects/container-registry.tgz: - resolution: {integrity: sha512-pWipLCUwNNpKjqh/MmLBG9lS3mgIXHq09E0+XAfodzcWd4Y1qcNqryKbK+qFLSs9objuHa9HO6t0k8x3CI7okA==, tarball: file:projects/container-registry.tgz} + resolution: {integrity: sha512-iW6S5CQK5+wHaxT4yGBXFzEkOkPQ4dS23kw1n3B+MZOltDDVe7oZXlv2Y9r0KA780hKzZ9+yVyJNIyHR+luZQA==, tarball: file:projects/container-registry.tgz} name: '@rush-temp/container-registry' version: 0.0.0 dependencies: diff --git a/sdk/eventgrid/arm-eventgrid/CHANGELOG.md b/sdk/eventgrid/arm-eventgrid/CHANGELOG.md index ebecbab34765..3ee17baa295b 100644 --- a/sdk/eventgrid/arm-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/arm-eventgrid/CHANGELOG.md @@ -1,15 +1,20 @@ # Release History + +## 15.0.0 (2023-04-14) + +**Breaking Changes** -## 14.1.1 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes - + - Operation PrivateEndpointConnections.beginDelete has a new signature + - Operation PrivateEndpointConnections.beginDeleteAndWait has a new signature + - Operation PrivateEndpointConnections.beginUpdate has a new signature + - Operation PrivateEndpointConnections.beginUpdateAndWait has a new signature + - Operation PrivateEndpointConnections.get has a new signature + - Operation PrivateEndpointConnections.listByResource has a new signature + - Operation PrivateLinkResources.get has a new signature + - Operation PrivateLinkResources.listByResource has a new signature + - Class EventGridManagementClient has a new signature + + ## 14.1.0 (2023-01-10) **Features** diff --git a/sdk/eventgrid/arm-eventgrid/_meta.json b/sdk/eventgrid/arm-eventgrid/_meta.json index 375984882970..e8f822649b55 100644 --- a/sdk/eventgrid/arm-eventgrid/_meta.json +++ b/sdk/eventgrid/arm-eventgrid/_meta.json @@ -1,8 +1,8 @@ { - "commit": "cc8796418bed73e7e3755d8a6a2d84abcb3ec7f4", - "readme": "specification\\eventgrid\\resource-manager\\readme.md", - "autorest_command": "autorest --version=3.9.3 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=F:\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\eventgrid\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-rc.6.20221226.1 --generate-sample=true", + "commit": "400280d8f4f366e68468f44d0a3deae8fc8d8828", + "readme": "specification/eventgrid/resource-manager/readme.md", + "autorest_command": "autorest --version=3.9.3 --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/eventgrid/resource-manager/readme.md --use=@autorest/typescript@6.0.0-rc.10", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.5.4", - "use": "@autorest/typescript@6.0.0-rc.6.20221226.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.0", + "use": "@autorest/typescript@6.0.0-rc.10" } \ No newline at end of file diff --git a/sdk/eventgrid/arm-eventgrid/package.json b/sdk/eventgrid/arm-eventgrid/package.json index b638f3dc97dd..835212d54c59 100644 --- a/sdk/eventgrid/arm-eventgrid/package.json +++ b/sdk/eventgrid/arm-eventgrid/package.json @@ -3,15 +3,15 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventGridManagementClient.", - "version": "14.1.1", + "version": "15.0.0", "engines": { "node": ">=14.0.0" }, "dependencies": { - "@azure/core-lro": "^2.2.0", + "@azure/core-lro": "^2.5.0", "@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", "tslib": "^2.2.0" @@ -33,7 +33,7 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-multi-entry": "^6.0.0", "@rollup/plugin-node-resolve": "^13.1.3", - "mkdirp": "^1.0.4", + "mkdirp": "^2.1.2", "rollup": "^2.66.1", "rollup-plugin-sourcemaps": "^0.6.3", "typescript": "~4.8.0", @@ -111,13 +111,5 @@ ] }, "autoPublish": true, - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/arm-eventgrid", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" - ], - "disableDocsMs": true, - "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-eventgrid?view=azure-node-preview" - } -} + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/arm-eventgrid" +} \ No newline at end of file diff --git a/sdk/eventgrid/arm-eventgrid/review/arm-eventgrid.api.md b/sdk/eventgrid/arm-eventgrid/review/arm-eventgrid.api.md index b31374601cd4..db41cb0bec58 100644 --- a/sdk/eventgrid/arm-eventgrid/review/arm-eventgrid.api.md +++ b/sdk/eventgrid/arm-eventgrid/review/arm-eventgrid.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 interface AdvancedFilter { @@ -53,7 +53,7 @@ export type ChannelProvisioningState = string; // @public export interface Channels { - beginDelete(resourceGroupName: string, partnerNamespaceName: string, channelName: string, options?: ChannelsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, partnerNamespaceName: string, channelName: string, options?: ChannelsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, partnerNamespaceName: string, channelName: string, options?: ChannelsDeleteOptionalParams): Promise; createOrUpdate(resourceGroupName: string, partnerNamespaceName: string, channelName: string, channelInfo: Channel, options?: ChannelsCreateOrUpdateOptionalParams): Promise; get(resourceGroupName: string, partnerNamespaceName: string, channelName: string, options?: ChannelsGetOptionalParams): Promise; @@ -197,11 +197,11 @@ export interface Domain extends TrackedResource { // @public export interface DomainEventSubscriptions { - beginCreateOrUpdate(resourceGroupName: string, domainName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: DomainEventSubscriptionsCreateOrUpdateOptionalParams): Promise, DomainEventSubscriptionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: DomainEventSubscriptionsCreateOrUpdateOptionalParams): Promise, DomainEventSubscriptionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, domainName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: DomainEventSubscriptionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, domainName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainEventSubscriptionsUpdateOptionalParams): Promise, DomainEventSubscriptionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, domainName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainEventSubscriptionsUpdateOptionalParams): Promise, DomainEventSubscriptionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, domainName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainEventSubscriptionsUpdateOptionalParams): Promise; get(resourceGroupName: string, domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsGetOptionalParams): Promise; getDeliveryAttributes(resourceGroupName: string, domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsGetDeliveryAttributesOptionalParams): Promise; @@ -280,11 +280,11 @@ export interface DomainRegenerateKeyRequest { // @public export interface Domains { - beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: Domain, options?: DomainsCreateOrUpdateOptionalParams): Promise, DomainsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainInfo: Domain, options?: DomainsCreateOrUpdateOptionalParams): Promise, DomainsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, domainName: string, domainInfo: Domain, options?: DomainsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, domainName: string, options?: DomainsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, domainName: string, options?: DomainsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, domainName: string, options?: DomainsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: DomainUpdateParameters, options?: DomainsUpdateOptionalParams): Promise, void>>; + beginUpdate(resourceGroupName: string, domainName: string, domainUpdateParameters: DomainUpdateParameters, options?: DomainsUpdateOptionalParams): Promise, void>>; beginUpdateAndWait(resourceGroupName: string, domainName: string, domainUpdateParameters: DomainUpdateParameters, options?: DomainsUpdateOptionalParams): Promise; get(resourceGroupName: string, domainName: string, options?: DomainsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: DomainsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -387,11 +387,11 @@ export interface DomainTopic extends Resource { // @public export interface DomainTopicEventSubscriptions { - beginCreateOrUpdate(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: DomainTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, DomainTopicEventSubscriptionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: DomainTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, DomainTopicEventSubscriptionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: DomainTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainTopicEventSubscriptionsUpdateOptionalParams): Promise, DomainTopicEventSubscriptionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainTopicEventSubscriptionsUpdateOptionalParams): Promise, DomainTopicEventSubscriptionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainTopicEventSubscriptionsUpdateOptionalParams): Promise; get(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsGetOptionalParams): Promise; getDeliveryAttributes(resourceGroupName: string, domainName: string, topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsGetDeliveryAttributesOptionalParams): Promise; @@ -465,9 +465,9 @@ export type DomainTopicProvisioningState = string; // @public export interface DomainTopics { - beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsCreateOrUpdateOptionalParams): Promise, DomainTopicsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsCreateOrUpdateOptionalParams): Promise, DomainTopicsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsDeleteOptionalParams): Promise; get(resourceGroupName: string, domainName: string, domainTopicName: string, options?: DomainTopicsGetOptionalParams): Promise; listByDomain(resourceGroupName: string, domainName: string, options?: DomainTopicsListByDomainOptionalParams): PagedAsyncIterableIterator; @@ -550,7 +550,7 @@ export type EventDeliverySchema = string; export class EventGridManagementClient extends coreClient.ServiceClient { // (undocumented) $host: string; - constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: EventGridManagementClientOptionalParams); + constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, parentType: PrivateEndpointConnectionsParentType, options?: EventGridManagementClientOptionalParams); // (undocumented) apiVersion: string; // (undocumented) @@ -570,6 +570,8 @@ export class EventGridManagementClient extends coreClient.ServiceClient { // (undocumented) operations: Operations; // (undocumented) + parentType: PrivateEndpointConnectionsParentType; + // (undocumented) partnerConfigurations: PartnerConfigurations; // (undocumented) partnerNamespaces: PartnerNamespaces; @@ -666,11 +668,11 @@ export type EventSubscriptionProvisioningState = string; // @public export interface EventSubscriptions { - beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: EventSubscriptionsCreateOrUpdateOptionalParams): Promise, EventSubscriptionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: EventSubscriptionsCreateOrUpdateOptionalParams): Promise, EventSubscriptionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(scope: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: EventSubscriptionsCreateOrUpdateOptionalParams): Promise; - beginDelete(scope: string, eventSubscriptionName: string, options?: EventSubscriptionsDeleteOptionalParams): Promise, void>>; + beginDelete(scope: string, eventSubscriptionName: string, options?: EventSubscriptionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(scope: string, eventSubscriptionName: string, options?: EventSubscriptionsDeleteOptionalParams): Promise; - beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: EventSubscriptionsUpdateOptionalParams): Promise, EventSubscriptionsUpdateResponse>>; + beginUpdate(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: EventSubscriptionsUpdateOptionalParams): Promise, EventSubscriptionsUpdateResponse>>; beginUpdateAndWait(scope: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: EventSubscriptionsUpdateOptionalParams): Promise; get(scope: string, eventSubscriptionName: string, options?: EventSubscriptionsGetOptionalParams): Promise; getDeliveryAttributes(scope: string, eventSubscriptionName: string, options?: EventSubscriptionsGetDeliveryAttributesOptionalParams): Promise; @@ -1433,11 +1435,11 @@ export type PartnerConfigurationProvisioningState = string; // @public export interface PartnerConfigurations { authorizePartner(resourceGroupName: string, partnerInfo: Partner, options?: PartnerConfigurationsAuthorizePartnerOptionalParams): Promise; - beginCreateOrUpdate(resourceGroupName: string, partnerConfigurationInfo: PartnerConfiguration, options?: PartnerConfigurationsCreateOrUpdateOptionalParams): Promise, PartnerConfigurationsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, partnerConfigurationInfo: PartnerConfiguration, options?: PartnerConfigurationsCreateOrUpdateOptionalParams): Promise, PartnerConfigurationsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, partnerConfigurationInfo: PartnerConfiguration, options?: PartnerConfigurationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, options?: PartnerConfigurationsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, options?: PartnerConfigurationsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, options?: PartnerConfigurationsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, partnerConfigurationUpdateParameters: PartnerConfigurationUpdateParameters, options?: PartnerConfigurationsUpdateOptionalParams): Promise, PartnerConfigurationsUpdateResponse>>; + beginUpdate(resourceGroupName: string, partnerConfigurationUpdateParameters: PartnerConfigurationUpdateParameters, options?: PartnerConfigurationsUpdateOptionalParams): Promise, PartnerConfigurationsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, partnerConfigurationUpdateParameters: PartnerConfigurationUpdateParameters, options?: PartnerConfigurationsUpdateOptionalParams): Promise; get(resourceGroupName: string, options?: PartnerConfigurationsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: PartnerConfigurationsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1557,11 +1559,11 @@ export interface PartnerNamespaceRegenerateKeyRequest { // @public export interface PartnerNamespaces { - beginCreateOrUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceInfo: PartnerNamespace, options?: PartnerNamespacesCreateOrUpdateOptionalParams): Promise, PartnerNamespacesCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceInfo: PartnerNamespace, options?: PartnerNamespacesCreateOrUpdateOptionalParams): Promise, PartnerNamespacesCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceInfo: PartnerNamespace, options?: PartnerNamespacesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, partnerNamespaceName: string, options?: PartnerNamespacesDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, partnerNamespaceName: string, options?: PartnerNamespacesDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, partnerNamespaceName: string, options?: PartnerNamespacesDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceUpdateParameters: PartnerNamespaceUpdateParameters, options?: PartnerNamespacesUpdateOptionalParams): Promise, void>>; + beginUpdate(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceUpdateParameters: PartnerNamespaceUpdateParameters, options?: PartnerNamespacesUpdateOptionalParams): Promise, void>>; beginUpdateAndWait(resourceGroupName: string, partnerNamespaceName: string, partnerNamespaceUpdateParameters: PartnerNamespaceUpdateParameters, options?: PartnerNamespacesUpdateOptionalParams): Promise; get(resourceGroupName: string, partnerNamespaceName: string, options?: PartnerNamespacesGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: PartnerNamespacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1678,11 +1680,11 @@ export type PartnerRegistrationProvisioningState = string; // @public export interface PartnerRegistrations { - beginCreateOrUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: PartnerRegistration, options?: PartnerRegistrationsCreateOrUpdateOptionalParams): Promise, PartnerRegistrationsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: PartnerRegistration, options?: PartnerRegistrationsCreateOrUpdateOptionalParams): Promise, PartnerRegistrationsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationInfo: PartnerRegistration, options?: PartnerRegistrationsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, partnerRegistrationName: string, options?: PartnerRegistrationsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, partnerRegistrationName: string, options?: PartnerRegistrationsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, partnerRegistrationName: string, options?: PartnerRegistrationsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: PartnerRegistrationUpdateParameters, options?: PartnerRegistrationsUpdateOptionalParams): Promise, void>>; + beginUpdate(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: PartnerRegistrationUpdateParameters, options?: PartnerRegistrationsUpdateOptionalParams): Promise, void>>; beginUpdateAndWait(resourceGroupName: string, partnerRegistrationName: string, partnerRegistrationUpdateParameters: PartnerRegistrationUpdateParameters, options?: PartnerRegistrationsUpdateOptionalParams): Promise; get(resourceGroupName: string, partnerRegistrationName: string, options?: PartnerRegistrationsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: PartnerRegistrationsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -1781,11 +1783,11 @@ export type PartnerTopicActivationState = string; // @public export interface PartnerTopicEventSubscriptions { - beginCreateOrUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: PartnerTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, PartnerTopicEventSubscriptionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: PartnerTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, PartnerTopicEventSubscriptionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: PartnerTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: PartnerTopicEventSubscriptionsUpdateOptionalParams): Promise, PartnerTopicEventSubscriptionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: PartnerTopicEventSubscriptionsUpdateOptionalParams): Promise, PartnerTopicEventSubscriptionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: PartnerTopicEventSubscriptionsUpdateOptionalParams): Promise; get(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsGetOptionalParams): Promise; getDeliveryAttributes(resourceGroupName: string, partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsGetDeliveryAttributesOptionalParams): Promise; @@ -1872,7 +1874,7 @@ export type PartnerTopicRoutingMode = string; // @public export interface PartnerTopics { activate(resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsActivateOptionalParams): Promise; - beginDelete(resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsDeleteOptionalParams): Promise; createOrUpdate(resourceGroupName: string, partnerTopicName: string, partnerTopicInfo: PartnerTopic, options?: PartnerTopicsCreateOrUpdateOptionalParams): Promise; deactivate(resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsDeactivateOptionalParams): Promise; @@ -1998,12 +2000,12 @@ export interface PrivateEndpointConnectionListResult { // @public export interface PrivateEndpointConnections { - beginDelete(resourceGroupName: string, parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateOptionalParams): Promise, PrivateEndpointConnectionsUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateOptionalParams): Promise; - get(resourceGroupName: string, parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; - listByResource(resourceGroupName: string, parentType: PrivateEndpointConnectionsParentType, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams): PagedAsyncIterableIterator; + beginDelete(resourceGroupName: string, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateOptionalParams): Promise, PrivateEndpointConnectionsUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateOptionalParams): Promise; + get(resourceGroupName: string, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise; + listByResource(resourceGroupName: string, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams): PagedAsyncIterableIterator; } // @public @@ -2064,8 +2066,8 @@ export interface PrivateLinkResource { // @public export interface PrivateLinkResources { - get(resourceGroupName: string, parentType: string, parentName: string, privateLinkResourceName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; - listByResource(resourceGroupName: string, parentType: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams): PagedAsyncIterableIterator; + get(resourceGroupName: string, parentName: string, privateLinkResourceName: string, options?: PrivateLinkResourcesGetOptionalParams): Promise; + listByResource(resourceGroupName: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams): PagedAsyncIterableIterator; } // @public @@ -2228,11 +2230,11 @@ export interface SystemTopic extends TrackedResource { // @public export interface SystemTopicEventSubscriptions { - beginCreateOrUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: SystemTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, SystemTopicEventSubscriptionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: SystemTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, SystemTopicEventSubscriptionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: SystemTopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: SystemTopicEventSubscriptionsUpdateOptionalParams): Promise, SystemTopicEventSubscriptionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: SystemTopicEventSubscriptionsUpdateOptionalParams): Promise, SystemTopicEventSubscriptionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: SystemTopicEventSubscriptionsUpdateOptionalParams): Promise; get(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsGetOptionalParams): Promise; getDeliveryAttributes(resourceGroupName: string, systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsGetDeliveryAttributesOptionalParams): Promise; @@ -2303,11 +2305,11 @@ export type SystemTopicEventSubscriptionsUpdateResponse = EventSubscription; // @public export interface SystemTopics { - beginCreateOrUpdate(resourceGroupName: string, systemTopicName: string, systemTopicInfo: SystemTopic, options?: SystemTopicsCreateOrUpdateOptionalParams): Promise, SystemTopicsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, systemTopicName: string, systemTopicInfo: SystemTopic, options?: SystemTopicsCreateOrUpdateOptionalParams): Promise, SystemTopicsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, systemTopicName: string, systemTopicInfo: SystemTopic, options?: SystemTopicsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, systemTopicName: string, options?: SystemTopicsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, systemTopicName: string, options?: SystemTopicsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, systemTopicName: string, options?: SystemTopicsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, systemTopicName: string, systemTopicUpdateParameters: SystemTopicUpdateParameters, options?: SystemTopicsUpdateOptionalParams): Promise, SystemTopicsUpdateResponse>>; + beginUpdate(resourceGroupName: string, systemTopicName: string, systemTopicUpdateParameters: SystemTopicUpdateParameters, options?: SystemTopicsUpdateOptionalParams): Promise, SystemTopicsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, systemTopicName: string, systemTopicUpdateParameters: SystemTopicUpdateParameters, options?: SystemTopicsUpdateOptionalParams): Promise; get(resourceGroupName: string, systemTopicName: string, options?: SystemTopicsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: SystemTopicsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; @@ -2409,11 +2411,11 @@ export interface Topic extends TrackedResource { // @public export interface TopicEventSubscriptions { - beginCreateOrUpdate(resourceGroupName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: TopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, TopicEventSubscriptionsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: TopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise, TopicEventSubscriptionsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionInfo: EventSubscription, options?: TopicEventSubscriptionsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: TopicEventSubscriptionsUpdateOptionalParams): Promise, TopicEventSubscriptionsUpdateResponse>>; + beginUpdate(resourceGroupName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: TopicEventSubscriptionsUpdateOptionalParams): Promise, TopicEventSubscriptionsUpdateResponse>>; beginUpdateAndWait(resourceGroupName: string, topicName: string, eventSubscriptionName: string, eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: TopicEventSubscriptionsUpdateOptionalParams): Promise; get(resourceGroupName: string, topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsGetOptionalParams): Promise; getDeliveryAttributes(resourceGroupName: string, topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsGetDeliveryAttributesOptionalParams): Promise; @@ -2492,13 +2494,13 @@ export interface TopicRegenerateKeyRequest { // @public export interface Topics { - beginCreateOrUpdate(resourceGroupName: string, topicName: string, topicInfo: Topic, options?: TopicsCreateOrUpdateOptionalParams): Promise, TopicsCreateOrUpdateResponse>>; + beginCreateOrUpdate(resourceGroupName: string, topicName: string, topicInfo: Topic, options?: TopicsCreateOrUpdateOptionalParams): Promise, TopicsCreateOrUpdateResponse>>; beginCreateOrUpdateAndWait(resourceGroupName: string, topicName: string, topicInfo: Topic, options?: TopicsCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, topicName: string, options?: TopicsDeleteOptionalParams): Promise, void>>; + beginDelete(resourceGroupName: string, topicName: string, options?: TopicsDeleteOptionalParams): Promise, void>>; beginDeleteAndWait(resourceGroupName: string, topicName: string, options?: TopicsDeleteOptionalParams): Promise; - beginRegenerateKey(resourceGroupName: string, topicName: string, regenerateKeyRequest: TopicRegenerateKeyRequest, options?: TopicsRegenerateKeyOptionalParams): Promise, TopicsRegenerateKeyResponse>>; + beginRegenerateKey(resourceGroupName: string, topicName: string, regenerateKeyRequest: TopicRegenerateKeyRequest, options?: TopicsRegenerateKeyOptionalParams): Promise, TopicsRegenerateKeyResponse>>; beginRegenerateKeyAndWait(resourceGroupName: string, topicName: string, regenerateKeyRequest: TopicRegenerateKeyRequest, options?: TopicsRegenerateKeyOptionalParams): Promise; - beginUpdate(resourceGroupName: string, topicName: string, topicUpdateParameters: TopicUpdateParameters, options?: TopicsUpdateOptionalParams): Promise, void>>; + beginUpdate(resourceGroupName: string, topicName: string, topicUpdateParameters: TopicUpdateParameters, options?: TopicsUpdateOptionalParams): Promise, void>>; beginUpdateAndWait(resourceGroupName: string, topicName: string, topicUpdateParameters: TopicUpdateParameters, options?: TopicsUpdateOptionalParams): Promise; get(resourceGroupName: string, topicName: string, options?: TopicsGetOptionalParams): Promise; listByResourceGroup(resourceGroupName: string, options?: TopicsListByResourceGroupOptionalParams): PagedAsyncIterableIterator; diff --git a/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts b/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts index b977dd8537d8..d09d28427fb1 100644 --- a/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts +++ b/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts @@ -60,23 +60,30 @@ import { TopicTypes, VerifiedPartners } from "./operationsInterfaces"; -import { EventGridManagementClientOptionalParams } from "./models"; +import { + PrivateEndpointConnectionsParentType, + EventGridManagementClientOptionalParams +} from "./models"; export class EventGridManagementClient extends coreClient.ServiceClient { $host: string; subscriptionId: string; apiVersion: string; + parentType: PrivateEndpointConnectionsParentType; /** * Initializes a new instance of the EventGridManagementClient class. * @param credentials Subscription credentials which uniquely identify client subscription. * @param subscriptionId Subscription credentials that uniquely identify a Microsoft Azure * subscription. The subscription ID forms part of the URI for every service call. + * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or + * \'partnerNamespaces\'. * @param options The parameter options */ constructor( credentials: coreAuth.TokenCredential, subscriptionId: string, + parentType: PrivateEndpointConnectionsParentType, options?: EventGridManagementClientOptionalParams ) { if (credentials === undefined) { @@ -85,6 +92,9 @@ export class EventGridManagementClient extends coreClient.ServiceClient { if (subscriptionId === undefined) { throw new Error("'subscriptionId' cannot be null"); } + if (parentType === undefined) { + throw new Error("'parentType' cannot be null"); + } // Initializing default values for options if (!options) { @@ -95,7 +105,7 @@ export class EventGridManagementClient extends coreClient.ServiceClient { credential: credentials }; - const packageDetails = `azsdk-js-arm-eventgrid/14.1.1`; + const packageDetails = `azsdk-js-arm-eventgrid/15.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -145,6 +155,7 @@ export class EventGridManagementClient extends coreClient.ServiceClient { } // Parameter assignments this.subscriptionId = subscriptionId; + this.parentType = parentType; // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; diff --git a/sdk/eventgrid/arm-eventgrid/src/lroImpl.ts b/sdk/eventgrid/arm-eventgrid/src/lroImpl.ts index 518d5f053b4e..dd803cd5e28c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/lroImpl.ts +++ b/sdk/eventgrid/arm-eventgrid/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/eventgrid/arm-eventgrid/src/models/parameters.ts b/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts index e6cee1f05527..d91f9c4bfbbc 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts @@ -443,17 +443,6 @@ export const privateEndpointConnection: OperationParameter = { mapper: PrivateEndpointConnectionMapper }; -export const parentType1: OperationURLParameter = { - parameterPath: "parentType", - mapper: { - serializedName: "parentType", - required: true, - type: { - name: "String" - } - } -}; - export const privateLinkResourceName: OperationURLParameter = { parameterPath: "privateLinkResourceName", mapper: { diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts b/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts index a3b368322421..5225106eb061 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/channels.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { Channel, ChannelsListByPartnerNamespaceNextOptionalParams, @@ -187,14 +191,14 @@ export class ChannelsImpl implements Channels { partnerNamespaceName: string, channelName: string, options?: ChannelsDeleteOptionalParams - ): 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,13 +231,13 @@ export class ChannelsImpl implements Channels { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerNamespaceName, channelName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerNamespaceName, channelName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts index f70636abe54d..9111752b3a03 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { EventSubscription, DomainEventSubscriptionsListNextOptionalParams, @@ -180,8 +184,8 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: DomainEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainEventSubscriptionsCreateOrUpdateResponse > > { @@ -191,7 +195,7 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -224,19 +228,22 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DomainEventSubscriptionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -283,14 +290,14 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsDeleteOptionalParams - ): 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 ) => { @@ -323,13 +330,13 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, domainName, eventSubscriptionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, eventSubscriptionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -374,8 +381,8 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainEventSubscriptionsUpdateResponse > > { @@ -385,7 +392,7 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -418,19 +425,22 @@ export class DomainEventSubscriptionsImpl implements DomainEventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, eventSubscriptionName, eventSubscriptionUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DomainEventSubscriptionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts index faac7fa34c56..c2f5c772c610 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { EventSubscription, DomainTopicEventSubscriptionsListNextOptionalParams, @@ -188,8 +192,8 @@ export class DomainTopicEventSubscriptionsImpl eventSubscriptionInfo: EventSubscription, options?: DomainTopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainTopicEventSubscriptionsCreateOrUpdateResponse > > { @@ -199,7 +203,7 @@ export class DomainTopicEventSubscriptionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -232,9 +236,9 @@ export class DomainTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, topicName, @@ -242,10 +246,13 @@ export class DomainTopicEventSubscriptionsImpl eventSubscriptionInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DomainTopicEventSubscriptionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -297,14 +304,14 @@ export class DomainTopicEventSubscriptionsImpl topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsDeleteOptionalParams - ): 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 ) => { @@ -337,19 +344,19 @@ export class DomainTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, topicName, eventSubscriptionName, 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(); @@ -399,8 +406,8 @@ export class DomainTopicEventSubscriptionsImpl eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainTopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainTopicEventSubscriptionsUpdateResponse > > { @@ -410,7 +417,7 @@ export class DomainTopicEventSubscriptionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -443,9 +450,9 @@ export class DomainTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, topicName, @@ -453,10 +460,13 @@ export class DomainTopicEventSubscriptionsImpl eventSubscriptionUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + DomainTopicEventSubscriptionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts index faf10172e192..fca3f0f9c763 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { DomainTopic, DomainTopicsListByDomainNextOptionalParams, @@ -153,8 +157,8 @@ export class DomainTopicsImpl implements DomainTopics { domainTopicName: string, options?: DomainTopicsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainTopicsCreateOrUpdateResponse > > { @@ -164,7 +168,7 @@ export class DomainTopicsImpl implements DomainTopics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -197,13 +201,16 @@ export class DomainTopicsImpl implements DomainTopics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, domainName, domainTopicName, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, domainTopicName, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DomainTopicsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -244,14 +251,14 @@ export class DomainTopicsImpl implements DomainTopics { domainName: string, domainTopicName: string, options?: DomainTopicsDeleteOptionalParams - ): 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 ) => { @@ -284,13 +291,13 @@ export class DomainTopicsImpl implements DomainTopics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, domainName, domainTopicName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, domainTopicName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts index 8daef25fd49f..35eb61a6ef34 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domains.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { Domain, DomainsListBySubscriptionNextOptionalParams, @@ -205,8 +209,8 @@ export class DomainsImpl implements Domains { domainInfo: Domain, options?: DomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainsCreateOrUpdateResponse > > { @@ -216,7 +220,7 @@ export class DomainsImpl implements Domains { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -249,13 +253,16 @@ export class DomainsImpl implements Domains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, domainName, domainInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, domainInfo, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + DomainsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -294,14 +301,14 @@ export class DomainsImpl implements Domains { resourceGroupName: string, domainName: string, options?: DomainsDeleteOptionalParams - ): 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 ) => { @@ -334,13 +341,13 @@ export class DomainsImpl implements Domains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, domainName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -378,14 +385,14 @@ export class DomainsImpl implements Domains { domainName: string, domainUpdateParameters: DomainUpdateParameters, options?: DomainsUpdateOptionalParams - ): 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 ) => { @@ -418,13 +425,13 @@ export class DomainsImpl implements Domains { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, domainName, domainUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, domainName, domainUpdateParameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts index 80829b33361e..8e0aca4a772d 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { EventSubscription, EventSubscriptionsListGlobalBySubscriptionNextOptionalParams, @@ -951,8 +955,8 @@ export class EventSubscriptionsImpl implements EventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: EventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EventSubscriptionsCreateOrUpdateResponse > > { @@ -962,7 +966,7 @@ export class EventSubscriptionsImpl implements EventSubscriptions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -995,13 +999,16 @@ export class EventSubscriptionsImpl implements EventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { scope, eventSubscriptionName, eventSubscriptionInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { scope, eventSubscriptionName, eventSubscriptionInfo, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + EventSubscriptionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1058,14 +1065,14 @@ export class EventSubscriptionsImpl implements EventSubscriptions { scope: string, eventSubscriptionName: string, options?: EventSubscriptionsDeleteOptionalParams - ): 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 ) => { @@ -1098,13 +1105,13 @@ export class EventSubscriptionsImpl implements EventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { scope, eventSubscriptionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { scope, eventSubscriptionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -1157,8 +1164,8 @@ export class EventSubscriptionsImpl implements EventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: EventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EventSubscriptionsUpdateResponse > > { @@ -1168,7 +1175,7 @@ export class EventSubscriptionsImpl implements EventSubscriptions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -1201,18 +1208,21 @@ export class EventSubscriptionsImpl implements EventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { scope, eventSubscriptionName, eventSubscriptionUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + EventSubscriptionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts index 4b88ac1b06be..e59bba5a6b17 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { PartnerConfiguration, PartnerConfigurationsListByResourceGroupOptionalParams, @@ -183,8 +187,8 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { partnerConfigurationInfo: PartnerConfiguration, options?: PartnerConfigurationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerConfigurationsCreateOrUpdateResponse > > { @@ -194,7 +198,7 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -227,13 +231,16 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerConfigurationInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerConfigurationInfo, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PartnerConfigurationsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -267,14 +274,14 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { async beginDelete( resourceGroupName: string, options?: PartnerConfigurationsDeleteOptionalParams - ): 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,13 +314,13 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -344,8 +351,8 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { partnerConfigurationUpdateParameters: PartnerConfigurationUpdateParameters, options?: PartnerConfigurationsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerConfigurationsUpdateResponse > > { @@ -355,7 +362,7 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -388,13 +395,20 @@ export class PartnerConfigurationsImpl implements PartnerConfigurations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerConfigurationUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + partnerConfigurationUpdateParameters, + options + }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PartnerConfigurationsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts index 6ef37ceadb2b..77d3e7bffbfe 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { PartnerNamespace, PartnerNamespacesListBySubscriptionNextOptionalParams, @@ -205,8 +209,8 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { partnerNamespaceInfo: PartnerNamespace, options?: PartnerNamespacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerNamespacesCreateOrUpdateResponse > > { @@ -216,7 +220,7 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -249,18 +253,21 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerNamespaceName, partnerNamespaceInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PartnerNamespacesCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -299,14 +306,14 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { resourceGroupName: string, partnerNamespaceName: string, options?: PartnerNamespacesDeleteOptionalParams - ): 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 ) => { @@ -339,13 +346,13 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerNamespaceName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerNamespaceName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -383,14 +390,14 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { partnerNamespaceName: string, partnerNamespaceUpdateParameters: PartnerNamespaceUpdateParameters, options?: PartnerNamespacesUpdateOptionalParams - ): 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 ) => { @@ -423,18 +430,18 @@ export class PartnerNamespacesImpl implements PartnerNamespaces { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerNamespaceName, partnerNamespaceUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts index b91a021c24c8..5b843e4358e9 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { PartnerRegistration, PartnerRegistrationsListBySubscriptionNextOptionalParams, @@ -200,8 +204,8 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { partnerRegistrationInfo: PartnerRegistration, options?: PartnerRegistrationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerRegistrationsCreateOrUpdateResponse > > { @@ -211,7 +215,7 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -244,18 +248,21 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerRegistrationName, partnerRegistrationInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PartnerRegistrationsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -294,14 +301,14 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { resourceGroupName: string, partnerRegistrationName: string, options?: PartnerRegistrationsDeleteOptionalParams - ): 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 ) => { @@ -334,13 +341,13 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerRegistrationName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerRegistrationName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -378,14 +385,14 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { partnerRegistrationName: string, partnerRegistrationUpdateParameters: PartnerRegistrationUpdateParameters, options?: PartnerRegistrationsUpdateOptionalParams - ): 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 ) => { @@ -418,18 +425,18 @@ export class PartnerRegistrationsImpl implements PartnerRegistrations { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerRegistrationName, partnerRegistrationUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts index 5cfe2903df4e..275bf936ec5c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { EventSubscription, PartnerTopicEventSubscriptionsListByPartnerTopicNextOptionalParams, @@ -171,8 +175,8 @@ export class PartnerTopicEventSubscriptionsImpl eventSubscriptionInfo: EventSubscription, options?: PartnerTopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerTopicEventSubscriptionsCreateOrUpdateResponse > > { @@ -182,7 +186,7 @@ export class PartnerTopicEventSubscriptionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -215,19 +219,22 @@ export class PartnerTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + PartnerTopicEventSubscriptionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -275,14 +282,14 @@ export class PartnerTopicEventSubscriptionsImpl partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsDeleteOptionalParams - ): 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 ) => { @@ -315,13 +322,18 @@ export class PartnerTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerTopicName, eventSubscriptionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + partnerTopicName, + eventSubscriptionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -367,8 +379,8 @@ export class PartnerTopicEventSubscriptionsImpl eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: PartnerTopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerTopicEventSubscriptionsUpdateResponse > > { @@ -378,7 +390,7 @@ export class PartnerTopicEventSubscriptionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -411,19 +423,22 @@ export class PartnerTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PartnerTopicEventSubscriptionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts index ae7794c9688b..0b1d53792bc5 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { PartnerTopic, PartnerTopicsListBySubscriptionNextOptionalParams, @@ -221,14 +225,14 @@ export class PartnerTopicsImpl implements PartnerTopics { resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsDeleteOptionalParams - ): 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 ) => { @@ -261,13 +265,13 @@ export class PartnerTopicsImpl implements PartnerTopics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, partnerTopicName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, partnerTopicName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts b/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts index 6907a13c4454..6f04af86e42b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts @@ -13,11 +13,14 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { EventGridManagementClient } from "../eventGridManagementClient"; -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 { PrivateEndpointConnection, - PrivateEndpointConnectionsParentType, PrivateEndpointConnectionsListByResourceNextOptionalParams, PrivateEndpointConnectionsListByResourceOptionalParams, PrivateEndpointConnectionsListByResourceResponse, @@ -46,21 +49,17 @@ export class PrivateEndpointConnectionsImpl /** * Get all private endpoint connections under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param options The options parameters. */ public listByResource( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams ): PagedAsyncIterableIterator { const iter = this.listByResourcePagingAll( resourceGroupName, - parentType, parentName, options ); @@ -77,7 +76,6 @@ export class PrivateEndpointConnectionsImpl } return this.listByResourcePagingPage( resourceGroupName, - parentType, parentName, options, settings @@ -88,7 +86,6 @@ export class PrivateEndpointConnectionsImpl private async *listByResourcePagingPage( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams, settings?: PageSettings @@ -98,7 +95,6 @@ export class PrivateEndpointConnectionsImpl if (!continuationToken) { result = await this._listByResource( resourceGroupName, - parentType, parentName, options ); @@ -110,7 +106,6 @@ export class PrivateEndpointConnectionsImpl while (continuationToken) { result = await this._listByResourceNext( resourceGroupName, - parentType, parentName, continuationToken, options @@ -124,13 +119,11 @@ export class PrivateEndpointConnectionsImpl private async *listByResourcePagingAll( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams ): AsyncIterableIterator { for await (const page of this.listByResourcePagingPage( resourceGroupName, - parentType, parentName, options )) { @@ -141,8 +134,6 @@ export class PrivateEndpointConnectionsImpl /** * Get a specific private endpoint connection under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -150,19 +141,12 @@ export class PrivateEndpointConnectionsImpl */ get( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - parentType, - parentName, - privateEndpointConnectionName, - options - }, + { resourceGroupName, parentName, privateEndpointConnectionName, options }, getOperationSpec ); } @@ -170,8 +154,6 @@ export class PrivateEndpointConnectionsImpl /** * Update a specific private endpoint connection under a topic, domain or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -180,14 +162,13 @@ export class PrivateEndpointConnectionsImpl */ async beginUpdate( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsUpdateResponse > > { @@ -197,7 +178,7 @@ export class PrivateEndpointConnectionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -230,20 +211,22 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, - parentType, parentName, privateEndpointConnectionName, privateEndpointConnection, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + PrivateEndpointConnectionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -253,8 +236,6 @@ export class PrivateEndpointConnectionsImpl /** * Update a specific private endpoint connection under a topic, domain or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -263,7 +244,6 @@ export class PrivateEndpointConnectionsImpl */ async beginUpdateAndWait( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, @@ -271,7 +251,6 @@ export class PrivateEndpointConnectionsImpl ): Promise { const poller = await this.beginUpdate( resourceGroupName, - parentType, parentName, privateEndpointConnectionName, privateEndpointConnection, @@ -283,8 +262,6 @@ export class PrivateEndpointConnectionsImpl /** * Delete a specific private endpoint connection under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -292,18 +269,17 @@ export class PrivateEndpointConnectionsImpl */ async beginDelete( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: 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 ) => { @@ -336,19 +312,18 @@ export class PrivateEndpointConnectionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, - parentType, parentName, 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(); @@ -358,8 +333,6 @@ export class PrivateEndpointConnectionsImpl /** * Delete a specific private endpoint connection under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -367,14 +340,12 @@ export class PrivateEndpointConnectionsImpl */ async beginDeleteAndWait( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams ): Promise { const poller = await this.beginDelete( resourceGroupName, - parentType, parentName, privateEndpointConnectionName, options @@ -385,20 +356,17 @@ export class PrivateEndpointConnectionsImpl /** * Get all private endpoint connections under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param options The options parameters. */ private _listByResource( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, parentType, parentName, options }, + { resourceGroupName, parentName, options }, listByResourceOperationSpec ); } @@ -406,8 +374,6 @@ export class PrivateEndpointConnectionsImpl /** * ListByResourceNext * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param nextLink The nextLink from the previous successful call to the ListByResource method. @@ -415,13 +381,12 @@ export class PrivateEndpointConnectionsImpl */ private _listByResourceNext( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, nextLink: string, options?: PrivateEndpointConnectionsListByResourceNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, parentType, parentName, nextLink, options }, + { resourceGroupName, parentName, nextLink, options }, listByResourceNextOperationSpec ); } diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts b/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts index eb272c4902a9..cbd7665d89ed 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts @@ -39,21 +39,17 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * List all the private link resources under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param options The options parameters. */ public listByResource( resourceGroupName: string, - parentType: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams ): PagedAsyncIterableIterator { const iter = this.listByResourcePagingAll( resourceGroupName, - parentType, parentName, options ); @@ -70,7 +66,6 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { } return this.listByResourcePagingPage( resourceGroupName, - parentType, parentName, options, settings @@ -81,7 +76,6 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private async *listByResourcePagingPage( resourceGroupName: string, - parentType: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams, settings?: PageSettings @@ -91,7 +85,6 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { if (!continuationToken) { result = await this._listByResource( resourceGroupName, - parentType, parentName, options ); @@ -103,7 +96,6 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { while (continuationToken) { result = await this._listByResourceNext( resourceGroupName, - parentType, parentName, continuationToken, options @@ -117,13 +109,11 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { private async *listByResourcePagingAll( resourceGroupName: string, - parentType: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams ): AsyncIterableIterator { for await (const page of this.listByResourcePagingPage( resourceGroupName, - parentType, parentName, options )) { @@ -134,8 +124,6 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * Get properties of a private link resource. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateLinkResourceName The name of private link resource. @@ -143,19 +131,12 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { */ get( resourceGroupName: string, - parentType: string, parentName: string, privateLinkResourceName: string, options?: PrivateLinkResourcesGetOptionalParams ): Promise { return this.client.sendOperationRequest( - { - resourceGroupName, - parentType, - parentName, - privateLinkResourceName, - options - }, + { resourceGroupName, parentName, privateLinkResourceName, options }, getOperationSpec ); } @@ -163,20 +144,17 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * List all the private link resources under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param options The options parameters. */ private _listByResource( resourceGroupName: string, - parentType: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, parentType, parentName, options }, + { resourceGroupName, parentName, options }, listByResourceOperationSpec ); } @@ -184,8 +162,6 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { /** * ListByResourceNext * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param nextLink The nextLink from the previous successful call to the ListByResource method. @@ -193,13 +169,12 @@ export class PrivateLinkResourcesImpl implements PrivateLinkResources { */ private _listByResourceNext( resourceGroupName: string, - parentType: string, parentName: string, nextLink: string, options?: PrivateLinkResourcesListByResourceNextOptionalParams ): Promise { return this.client.sendOperationRequest( - { resourceGroupName, parentType, parentName, nextLink, options }, + { resourceGroupName, parentName, nextLink, options }, listByResourceNextOperationSpec ); } @@ -222,8 +197,8 @@ const getOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, + Parameters.parentType, Parameters.parentName, - Parameters.parentType1, Parameters.privateLinkResourceName ], headerParameters: [Parameters.accept], @@ -244,8 +219,8 @@ const listByResourceOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.parentName, - Parameters.parentType1 + Parameters.parentType, + Parameters.parentName ], headerParameters: [Parameters.accept], serializer @@ -264,8 +239,8 @@ const listByResourceNextOperationSpec: coreClient.OperationSpec = { Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.nextLink, - Parameters.parentName, - Parameters.parentType1 + Parameters.parentType, + Parameters.parentName ], headerParameters: [Parameters.accept], serializer diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts index 5292bacb9813..1696076613f8 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { EventSubscription, SystemTopicEventSubscriptionsListBySystemTopicNextOptionalParams, @@ -171,8 +175,8 @@ export class SystemTopicEventSubscriptionsImpl eventSubscriptionInfo: EventSubscription, options?: SystemTopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicEventSubscriptionsCreateOrUpdateResponse > > { @@ -182,7 +186,7 @@ export class SystemTopicEventSubscriptionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -215,19 +219,22 @@ export class SystemTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SystemTopicEventSubscriptionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -275,14 +282,14 @@ export class SystemTopicEventSubscriptionsImpl systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsDeleteOptionalParams - ): 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 ) => { @@ -315,13 +322,18 @@ export class SystemTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, systemTopicName, eventSubscriptionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { + resourceGroupName, + systemTopicName, + eventSubscriptionName, + options + }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -367,8 +379,8 @@ export class SystemTopicEventSubscriptionsImpl eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: SystemTopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicEventSubscriptionsUpdateResponse > > { @@ -378,7 +390,7 @@ export class SystemTopicEventSubscriptionsImpl ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -411,19 +423,22 @@ export class SystemTopicEventSubscriptionsImpl }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, systemTopicName, eventSubscriptionName, eventSubscriptionUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + SystemTopicEventSubscriptionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts index d0039d035b5b..5c9e96ea31ea 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { SystemTopic, SystemTopicsListBySubscriptionNextOptionalParams, @@ -201,8 +205,8 @@ export class SystemTopicsImpl implements SystemTopics { systemTopicInfo: SystemTopic, options?: SystemTopicsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicsCreateOrUpdateResponse > > { @@ -212,7 +216,7 @@ export class SystemTopicsImpl implements SystemTopics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -245,13 +249,16 @@ export class SystemTopicsImpl implements SystemTopics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, systemTopicName, systemTopicInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, systemTopicName, systemTopicInfo, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + SystemTopicsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -290,14 +297,14 @@ export class SystemTopicsImpl implements SystemTopics { resourceGroupName: string, systemTopicName: string, options?: SystemTopicsDeleteOptionalParams - ): 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 ) => { @@ -330,13 +337,13 @@ export class SystemTopicsImpl implements SystemTopics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, systemTopicName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, systemTopicName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -375,8 +382,8 @@ export class SystemTopicsImpl implements SystemTopics { systemTopicUpdateParameters: SystemTopicUpdateParameters, options?: SystemTopicsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicsUpdateResponse > > { @@ -386,7 +393,7 @@ export class SystemTopicsImpl implements SystemTopics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -419,18 +426,21 @@ export class SystemTopicsImpl implements SystemTopics { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, systemTopicName, systemTopicUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + SystemTopicsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts index ef97a187a48c..2c49d55bdc6f 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { EventSubscription, TopicEventSubscriptionsListNextOptionalParams, @@ -180,8 +184,8 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: TopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicEventSubscriptionsCreateOrUpdateResponse > > { @@ -191,7 +195,7 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -224,19 +228,22 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + TopicEventSubscriptionsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -283,14 +290,14 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsDeleteOptionalParams - ): 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 ) => { @@ -323,13 +330,13 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, topicName, eventSubscriptionName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, eventSubscriptionName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -374,8 +381,8 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: TopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicEventSubscriptionsUpdateResponse > > { @@ -385,7 +392,7 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -418,19 +425,22 @@ export class TopicEventSubscriptionsImpl implements TopicEventSubscriptions { }; }; - const lro = new LroImpl( - sendOperation, - { + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, eventSubscriptionName, eventSubscriptionUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + spec: updateOperationSpec + }); + const poller = await createHttpPoller< + TopicEventSubscriptionsUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts index c88f468d5d87..30b107f4e689 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/topics.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 { EventGridManagementClient } from "../eventGridManagementClient"; -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 { Topic, TopicsListBySubscriptionNextOptionalParams, @@ -290,8 +294,8 @@ export class TopicsImpl implements Topics { topicInfo: Topic, options?: TopicsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicsCreateOrUpdateResponse > > { @@ -301,7 +305,7 @@ export class TopicsImpl implements Topics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -334,13 +338,16 @@ export class TopicsImpl implements Topics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, topicName, topicInfo, options }, - createOrUpdateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, topicInfo, options }, + spec: createOrUpdateOperationSpec + }); + const poller = await createHttpPoller< + TopicsCreateOrUpdateResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -379,14 +386,14 @@ export class TopicsImpl implements Topics { resourceGroupName: string, topicName: string, options?: TopicsDeleteOptionalParams - ): 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 ) => { @@ -419,13 +426,13 @@ export class TopicsImpl implements Topics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, topicName, options }, - deleteOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, options }, + spec: deleteOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -463,14 +470,14 @@ export class TopicsImpl implements Topics { topicName: string, topicUpdateParameters: TopicUpdateParameters, options?: TopicsUpdateOptionalParams - ): 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 ) => { @@ -503,13 +510,13 @@ export class TopicsImpl implements Topics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, topicName, topicUpdateParameters, options }, - updateOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, topicUpdateParameters, options }, + spec: updateOperationSpec + }); + const poller = await createHttpPoller>(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); @@ -596,8 +603,8 @@ export class TopicsImpl implements Topics { regenerateKeyRequest: TopicRegenerateKeyRequest, options?: TopicsRegenerateKeyOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicsRegenerateKeyResponse > > { @@ -607,7 +614,7 @@ export class TopicsImpl implements Topics { ): Promise => { return this.client.sendOperationRequest(args, spec); }; - const sendOperation = async ( + const sendOperationFn = async ( args: coreClient.OperationArguments, spec: coreClient.OperationSpec ) => { @@ -640,13 +647,16 @@ export class TopicsImpl implements Topics { }; }; - const lro = new LroImpl( - sendOperation, - { resourceGroupName, topicName, regenerateKeyRequest, options }, - regenerateKeyOperationSpec - ); - const poller = new LroEngine(lro, { - resumeFrom: options?.resumeFrom, + const lro = createLroSpec({ + sendOperationFn, + args: { resourceGroupName, topicName, regenerateKeyRequest, options }, + spec: regenerateKeyOperationSpec + }); + const poller = await createHttpPoller< + TopicsRegenerateKeyResponse, + OperationState + >(lro, { + restoreFrom: options?.resumeFrom, intervalInMs: options?.updateIntervalInMs }); await poller.poll(); diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts index 4b3bf09768d7..18fb35009463 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.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 { Channel, ChannelsListByPartnerNamespaceOptionalParams, @@ -76,7 +76,7 @@ export interface Channels { partnerNamespaceName: string, channelName: string, options?: ChannelsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an existing channel. * @param resourceGroupName The name of the resource group within the partners subscription. diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts index 3dd9b59bf007..309e1a99c4b5 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.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 { EventSubscription, DomainEventSubscriptionsListOptionalParams, @@ -83,8 +83,8 @@ export interface DomainEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: DomainEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainEventSubscriptionsCreateOrUpdateResponse > >; @@ -118,7 +118,7 @@ export interface DomainEventSubscriptions { domainName: string, eventSubscriptionName: string, options?: DomainEventSubscriptionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an existing event subscription for a domain. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -148,8 +148,8 @@ export interface DomainEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainEventSubscriptionsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts index 015214376b5c..8c4ff8254b66 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.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 { EventSubscription, DomainTopicEventSubscriptionsListOptionalParams, @@ -75,8 +75,8 @@ export interface DomainTopicEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: DomainTopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainTopicEventSubscriptionsCreateOrUpdateResponse > >; @@ -114,7 +114,7 @@ export interface DomainTopicEventSubscriptions { topicName: string, eventSubscriptionName: string, options?: DomainTopicEventSubscriptionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a nested existing event subscription for a domain topic. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -148,8 +148,8 @@ export interface DomainTopicEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: DomainTopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainTopicEventSubscriptionsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts index 60db5b6edf41..d92082c06086 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.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 { DomainTopic, DomainTopicsListByDomainOptionalParams, @@ -58,8 +58,8 @@ export interface DomainTopics { domainTopicName: string, options?: DomainTopicsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainTopicsCreateOrUpdateResponse > >; @@ -88,7 +88,7 @@ export interface DomainTopics { domainName: string, domainTopicName: string, options?: DomainTopicsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing domain topic. * @param resourceGroupName The name of the resource group within the user's subscription. diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts index a7574bfb2c4e..24fb58d5f549 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.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 { Domain, DomainsListBySubscriptionOptionalParams, @@ -69,8 +69,8 @@ export interface Domains { domainInfo: Domain, options?: DomainsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, DomainsCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface Domains { resourceGroupName: string, domainName: string, options?: DomainsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing domain. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -121,7 +121,7 @@ export interface Domains { domainName: string, domainUpdateParameters: DomainUpdateParameters, options?: DomainsUpdateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Asynchronously updates a domain with the specified parameters. * @param resourceGroupName The name of the resource group within the user's subscription. diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts index ae1498644e13..b018b9b6a3d6 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.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 { EventSubscription, EventSubscriptionsListGlobalBySubscriptionOptionalParams, @@ -190,8 +190,8 @@ export interface EventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: EventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EventSubscriptionsCreateOrUpdateResponse > >; @@ -236,7 +236,7 @@ export interface EventSubscriptions { scope: string, eventSubscriptionName: string, options?: EventSubscriptionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an existing event subscription. * @param scope The scope of the event subscription. The scope can be a subscription, or a resource @@ -275,8 +275,8 @@ export interface EventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: EventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, EventSubscriptionsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts index 83b59d0d34c8..0be309dc189e 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.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 { PartnerConfiguration, PartnerConfigurationsListByResourceGroupOptionalParams, @@ -66,8 +66,8 @@ export interface PartnerConfigurations { partnerConfigurationInfo: PartnerConfiguration, options?: PartnerConfigurationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerConfigurationsCreateOrUpdateResponse > >; @@ -90,7 +90,7 @@ export interface PartnerConfigurations { beginDelete( resourceGroupName: string, options?: PartnerConfigurationsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing partner configuration. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -111,8 +111,8 @@ export interface PartnerConfigurations { partnerConfigurationUpdateParameters: PartnerConfigurationUpdateParameters, options?: PartnerConfigurationsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerConfigurationsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts index 4efeaa866667..e794639db862 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.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 { PartnerNamespace, PartnerNamespacesListBySubscriptionOptionalParams, @@ -69,8 +69,8 @@ export interface PartnerNamespaces { partnerNamespaceInfo: PartnerNamespace, options?: PartnerNamespacesCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerNamespacesCreateOrUpdateResponse > >; @@ -97,7 +97,7 @@ export interface PartnerNamespaces { resourceGroupName: string, partnerNamespaceName: string, options?: PartnerNamespacesDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -121,7 +121,7 @@ export interface PartnerNamespaces { partnerNamespaceName: string, partnerNamespaceUpdateParameters: PartnerNamespaceUpdateParameters, options?: PartnerNamespacesUpdateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Asynchronously updates a partner namespace with the specified parameters. * @param resourceGroupName The name of the resource group within the user's subscription. diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts index f981cf0489df..327f9040462f 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.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 { PartnerRegistration, PartnerRegistrationsListBySubscriptionOptionalParams, @@ -64,8 +64,8 @@ export interface PartnerRegistrations { partnerRegistrationInfo: PartnerRegistration, options?: PartnerRegistrationsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerRegistrationsCreateOrUpdateResponse > >; @@ -92,7 +92,7 @@ export interface PartnerRegistrations { resourceGroupName: string, partnerRegistrationName: string, options?: PartnerRegistrationsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Deletes a partner registration with the specified parameters. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -116,7 +116,7 @@ export interface PartnerRegistrations { partnerRegistrationName: string, partnerRegistrationUpdateParameters: PartnerRegistrationUpdateParameters, options?: PartnerRegistrationsUpdateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Updates a partner registration with the specified parameters. * @param resourceGroupName The name of the resource group within the user's subscription. diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts index dce9c3d932a0..6a18b39bae26 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.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 { EventSubscription, PartnerTopicEventSubscriptionsListByPartnerTopicOptionalParams, @@ -71,8 +71,8 @@ export interface PartnerTopicEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: PartnerTopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerTopicEventSubscriptionsCreateOrUpdateResponse > >; @@ -107,7 +107,7 @@ export interface PartnerTopicEventSubscriptions { partnerTopicName: string, eventSubscriptionName: string, options?: PartnerTopicEventSubscriptionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an existing event subscription of a partner topic. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -138,8 +138,8 @@ export interface PartnerTopicEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: PartnerTopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PartnerTopicEventSubscriptionsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts index a62fe27710fe..a37c52a9f2bd 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.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 { PartnerTopic, PartnerTopicsListBySubscriptionOptionalParams, @@ -79,7 +79,7 @@ export interface PartnerTopics { resourceGroupName: string, partnerTopicName: string, options?: PartnerTopicsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing partner topic. * @param resourceGroupName The name of the resource group within the user's subscription. diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts index eb0e3b865a8b..a525a3bc3a57 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts @@ -7,10 +7,9 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; +import { SimplePollerLike, OperationState } from "@azure/core-lro"; import { PrivateEndpointConnection, - PrivateEndpointConnectionsParentType, PrivateEndpointConnectionsListByResourceOptionalParams, PrivateEndpointConnectionsGetOptionalParams, PrivateEndpointConnectionsGetResponse, @@ -25,23 +24,18 @@ export interface PrivateEndpointConnections { /** * Get all private endpoint connections under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param options The options parameters. */ listByResource( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, options?: PrivateEndpointConnectionsListByResourceOptionalParams ): PagedAsyncIterableIterator; /** * Get a specific private endpoint connection under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -49,7 +43,6 @@ export interface PrivateEndpointConnections { */ get( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams @@ -57,8 +50,6 @@ export interface PrivateEndpointConnections { /** * Update a specific private endpoint connection under a topic, domain or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -67,22 +58,19 @@ export interface PrivateEndpointConnections { */ beginUpdate( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, PrivateEndpointConnectionsUpdateResponse > >; /** * Update a specific private endpoint connection under a topic, domain or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -91,7 +79,6 @@ export interface PrivateEndpointConnections { */ beginUpdateAndWait( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, @@ -100,8 +87,6 @@ export interface PrivateEndpointConnections { /** * Delete a specific private endpoint connection under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -109,16 +94,13 @@ export interface PrivateEndpointConnections { */ beginDelete( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete a specific private endpoint connection under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateEndpointConnectionName The name of the private endpoint connection connection. @@ -126,7 +108,6 @@ export interface PrivateEndpointConnections { */ beginDeleteAndWait( resourceGroupName: string, - parentType: PrivateEndpointConnectionsParentType, parentName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts index 63a9ba89ceae..3b8a47adf040 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts @@ -20,23 +20,18 @@ export interface PrivateLinkResources { /** * List all the private link resources under a topic, domain, or partner namespace. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param options The options parameters. */ listByResource( resourceGroupName: string, - parentType: string, parentName: string, options?: PrivateLinkResourcesListByResourceOptionalParams ): PagedAsyncIterableIterator; /** * Get properties of a private link resource. * @param resourceGroupName The name of the resource group within the user's subscription. - * @param parentType The type of the parent resource. This can be either \'topics\', \'domains\', or - * \'partnerNamespaces\'. * @param parentName The name of the parent resource (namely, either, the topic name, domain name, or * partner namespace name). * @param privateLinkResourceName The name of private link resource. @@ -44,7 +39,6 @@ export interface PrivateLinkResources { */ get( resourceGroupName: string, - parentType: string, parentName: string, privateLinkResourceName: string, options?: PrivateLinkResourcesGetOptionalParams diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts index 2ab7cee8c02b..2fa0cb8d9a9b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.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 { EventSubscription, SystemTopicEventSubscriptionsListBySystemTopicOptionalParams, @@ -71,8 +71,8 @@ export interface SystemTopicEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: SystemTopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicEventSubscriptionsCreateOrUpdateResponse > >; @@ -107,7 +107,7 @@ export interface SystemTopicEventSubscriptions { systemTopicName: string, eventSubscriptionName: string, options?: SystemTopicEventSubscriptionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an existing event subscription of a system topic. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -138,8 +138,8 @@ export interface SystemTopicEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: SystemTopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicEventSubscriptionsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts index 10d9df45428a..19895c1fbe8a 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.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 { SystemTopic, SystemTopicsListBySubscriptionOptionalParams, @@ -65,8 +65,8 @@ export interface SystemTopics { systemTopicInfo: SystemTopic, options?: SystemTopicsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicsCreateOrUpdateResponse > >; @@ -93,7 +93,7 @@ export interface SystemTopics { resourceGroupName: string, systemTopicName: string, options?: SystemTopicsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing system topic. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -118,8 +118,8 @@ export interface SystemTopics { systemTopicUpdateParameters: SystemTopicUpdateParameters, options?: SystemTopicsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, SystemTopicsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts index 14261ff2963c..37289c7d16ad 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.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 { EventSubscription, TopicEventSubscriptionsListOptionalParams, @@ -83,8 +83,8 @@ export interface TopicEventSubscriptions { eventSubscriptionInfo: EventSubscription, options?: TopicEventSubscriptionsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicEventSubscriptionsCreateOrUpdateResponse > >; @@ -118,7 +118,7 @@ export interface TopicEventSubscriptions { topicName: string, eventSubscriptionName: string, options?: TopicEventSubscriptionsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete an existing event subscription for a topic. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -148,8 +148,8 @@ export interface TopicEventSubscriptions { eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters, options?: TopicEventSubscriptionsUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicEventSubscriptionsUpdateResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts index 631a23953ef5..b2d4d678b4f0 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.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 { Topic, TopicsListBySubscriptionOptionalParams, @@ -86,8 +86,8 @@ export interface Topics { topicInfo: Topic, options?: TopicsCreateOrUpdateOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicsCreateOrUpdateResponse > >; @@ -114,7 +114,7 @@ export interface Topics { resourceGroupName: string, topicName: string, options?: TopicsDeleteOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Delete existing topic. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -138,7 +138,7 @@ export interface Topics { topicName: string, topicUpdateParameters: TopicUpdateParameters, options?: TopicsUpdateOptionalParams - ): Promise, void>>; + ): Promise, void>>; /** * Asynchronously updates a topic with the specified parameters. * @param resourceGroupName The name of the resource group within the user's subscription. @@ -176,8 +176,8 @@ export interface Topics { regenerateKeyRequest: TopicRegenerateKeyRequest, options?: TopicsRegenerateKeyOptionalParams ): Promise< - PollerLike< - PollOperationState, + SimplePollerLike< + OperationState, TopicsRegenerateKeyResponse > >; diff --git a/sdk/eventgrid/arm-eventgrid/test/sampleTest.ts b/sdk/eventgrid/arm-eventgrid/test/sampleTest.ts new file mode 100644 index 000000000000..25aeb3ebcc36 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/test/sampleTest.ts @@ -0,0 +1,43 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +import { + Recorder, + RecorderStartOptions, + env +} from "@azure-tools/test-recorder"; +import { assert } from "chai"; +import { Context } from "mocha"; + +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables +}; + +describe("My test", () => { + let recorder: Recorder; + + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); + }); + + afterEach(async function() { + await recorder.stop(); + }); + + it("sample test", async function() { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/eventgrid/arm-eventgrid/tsconfig.json b/sdk/eventgrid/arm-eventgrid/tsconfig.json index bf7a2cee2deb..3e6ae96443f3 100644 --- a/sdk/eventgrid/arm-eventgrid/tsconfig.json +++ b/sdk/eventgrid/arm-eventgrid/tsconfig.json @@ -15,17 +15,11 @@ ], "declaration": true, "outDir": "./dist-esm", - "importHelpers": true, - "paths": { - "@azure/arm-eventgrid": [ - "./src/index" - ] - } + "importHelpers": true }, "include": [ "./src/**/*.ts", - "./test/**/*.ts", - "samples-dev/**/*.ts" + "./test/**/*.ts" ], "exclude": [ "node_modules"