From da34e042e3a4953b9d846bbed9f4e5f7d52aafb9 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 24 Jan 2025 06:48:28 +0000 Subject: [PATCH] CodeGen from PR 3608 in test-repo-billy/azure-rest-api-specs Merge af1810e3995c778065e4d36f22bc026eb8f9f7b2 into f39c04630cbd7b70c5a369f83f5485484cf1683d --- common/config/rush/pnpm-lock.yaml | 39 +- sdk/eventgrid/arm-eventgrid/CHANGELOG.md | 386 +++++++++++++++++- sdk/eventgrid/arm-eventgrid/LICENSE | 2 +- sdk/eventgrid/arm-eventgrid/README.md | 5 +- sdk/eventgrid/arm-eventgrid/_meta.json | 10 +- sdk/eventgrid/arm-eventgrid/package.json | 104 +++-- .../arm-eventgrid/review/arm-eventgrid.api.md | 19 + sdk/eventgrid/arm-eventgrid/sample.env | 5 +- .../caCertificatesCreateOrUpdateSample.ts | 8 +- .../samples-dev/caCertificatesDeleteSample.ts | 8 +- .../samples-dev/caCertificatesGetSample.ts | 8 +- .../caCertificatesListByNamespaceSample.ts | 8 +- .../channelsCreateOrUpdateSample.ts | 8 +- .../samples-dev/channelsDeleteSample.ts | 8 +- .../samples-dev/channelsGetFullUrlSample.ts | 8 +- .../samples-dev/channelsGetSample.ts | 8 +- .../channelsListByPartnerNamespaceSample.ts | 8 +- .../samples-dev/channelsUpdateSample.ts | 8 +- .../clientGroupsCreateOrUpdateSample.ts | 8 +- .../samples-dev/clientGroupsDeleteSample.ts | 8 +- .../samples-dev/clientGroupsGetSample.ts | 8 +- .../clientGroupsListByNamespaceSample.ts | 8 +- .../clientsCreateOrUpdateSample.ts | 8 +- .../samples-dev/clientsDeleteSample.ts | 8 +- .../samples-dev/clientsGetSample.ts | 8 +- .../clientsListByNamespaceSample.ts | 8 +- ...nEventSubscriptionsCreateOrUpdateSample.ts | 8 +- .../domainEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...omainEventSubscriptionsGetFullUrlSample.ts | 8 +- .../domainEventSubscriptionsGetSample.ts | 8 +- .../domainEventSubscriptionsListSample.ts | 8 +- .../domainEventSubscriptionsUpdateSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...mainTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- .../domainTopicEventSubscriptionsGetSample.ts | 8 +- ...domainTopicEventSubscriptionsListSample.ts | 8 +- ...mainTopicEventSubscriptionsUpdateSample.ts | 8 +- .../domainTopicsCreateOrUpdateSample.ts | 8 +- .../samples-dev/domainTopicsDeleteSample.ts | 8 +- .../samples-dev/domainTopicsGetSample.ts | 8 +- .../domainTopicsListByDomainSample.ts | 8 +- .../domainsCreateOrUpdateSample.ts | 8 +- .../samples-dev/domainsDeleteSample.ts | 8 +- .../samples-dev/domainsGetSample.ts | 8 +- .../domainsListByResourceGroupSample.ts | 8 +- .../domainsListBySubscriptionSample.ts | 8 +- .../domainsListSharedAccessKeysSample.ts | 8 +- .../samples-dev/domainsRegenerateKeySample.ts | 8 +- .../samples-dev/domainsUpdateSample.ts | 8 +- .../eventSubscriptionsCreateOrUpdateSample.ts | 28 +- .../eventSubscriptionsDeleteSample.ts | 14 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- .../eventSubscriptionsGetFullUrlSample.ts | 14 +- .../eventSubscriptionsGetSample.ts | 28 +- ...entSubscriptionsListByDomainTopicSample.ts | 8 +- .../eventSubscriptionsListByResourceSample.ts | 8 +- ...GlobalByResourceGroupForTopicTypeSample.ts | 8 +- ...riptionsListGlobalByResourceGroupSample.ts | 8 +- ...tGlobalBySubscriptionForTopicTypeSample.ts | 8 +- ...criptionsListGlobalBySubscriptionSample.ts | 8 +- ...gionalByResourceGroupForTopicTypeSample.ts | 8 +- ...ptionsListRegionalByResourceGroupSample.ts | 8 +- ...egionalBySubscriptionForTopicTypeSample.ts | 8 +- ...iptionsListRegionalBySubscriptionSample.ts | 8 +- .../eventSubscriptionsUpdateSample.ts | 28 +- .../samples-dev/extensionTopicsGetSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...paceTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- ...mespaceTopicEventSubscriptionsGetSample.ts | 8 +- ...SubscriptionsListByNamespaceTopicSample.ts | 8 +- ...paceTopicEventSubscriptionsUpdateSample.ts | 8 +- .../namespaceTopicsCreateOrUpdateSample.ts | 8 +- .../namespaceTopicsDeleteSample.ts | 8 +- .../samples-dev/namespaceTopicsGetSample.ts | 8 +- .../namespaceTopicsListByNamespaceSample.ts | 8 +- ...mespaceTopicsListSharedAccessKeysSample.ts | 8 +- .../namespaceTopicsRegenerateKeySample.ts | 8 +- .../namespaceTopicsUpdateSample.ts | 8 +- .../namespacesCreateOrUpdateSample.ts | 8 +- .../samples-dev/namespacesDeleteSample.ts | 8 +- .../samples-dev/namespacesGetSample.ts | 8 +- .../namespacesListByResourceGroupSample.ts | 8 +- .../namespacesListBySubscriptionSample.ts | 8 +- .../namespacesListSharedAccessKeysSample.ts | 8 +- .../namespacesRegenerateKeySample.ts | 8 +- .../samples-dev/namespacesUpdateSample.ts | 8 +- ...acesValidateCustomDomainOwnershipSample.ts | 8 +- ...ecurityPerimeterConfigurationsGetSample.ts | 8 +- ...curityPerimeterConfigurationsListSample.ts | 8 +- ...yPerimeterConfigurationsReconcileSample.ts | 8 +- .../samples-dev/operationsListSample.ts | 8 +- ...nerConfigurationsAuthorizePartnerSample.ts | 8 +- ...rtnerConfigurationsCreateOrUpdateSample.ts | 8 +- .../partnerConfigurationsDeleteSample.ts | 8 +- .../partnerConfigurationsGetSample.ts | 8 +- ...ConfigurationsListByResourceGroupSample.ts | 8 +- ...rConfigurationsListBySubscriptionSample.ts | 8 +- ...rConfigurationsUnauthorizePartnerSample.ts | 8 +- .../partnerConfigurationsUpdateSample.ts | 8 +- .../partnerDestinationsActivateSample.ts | 8 +- ...partnerDestinationsCreateOrUpdateSample.ts | 8 +- .../partnerDestinationsDeleteSample.ts | 8 +- .../partnerDestinationsGetSample.ts | 8 +- ...erDestinationsListByResourceGroupSample.ts | 8 +- ...nerDestinationsListBySubscriptionSample.ts | 8 +- .../partnerDestinationsUpdateSample.ts | 8 +- .../partnerNamespacesCreateOrUpdateSample.ts | 8 +- .../partnerNamespacesDeleteSample.ts | 8 +- .../samples-dev/partnerNamespacesGetSample.ts | 8 +- ...tnerNamespacesListByResourceGroupSample.ts | 8 +- ...rtnerNamespacesListBySubscriptionSample.ts | 8 +- ...nerNamespacesListSharedAccessKeysSample.ts | 8 +- .../partnerNamespacesRegenerateKeySample.ts | 8 +- .../partnerNamespacesUpdateSample.ts | 8 +- ...artnerRegistrationsCreateOrUpdateSample.ts | 8 +- .../partnerRegistrationsDeleteSample.ts | 8 +- .../partnerRegistrationsGetSample.ts | 8 +- ...rRegistrationsListByResourceGroupSample.ts | 8 +- ...erRegistrationsListBySubscriptionSample.ts | 8 +- .../partnerRegistrationsUpdateSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...tnerTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- ...partnerTopicEventSubscriptionsGetSample.ts | 8 +- ...ntSubscriptionsListByPartnerTopicSample.ts | 8 +- ...tnerTopicEventSubscriptionsUpdateSample.ts | 8 +- .../partnerTopicsActivateSample.ts | 8 +- .../partnerTopicsCreateOrUpdateSample.ts | 8 +- .../partnerTopicsDeactivateSample.ts | 8 +- .../samples-dev/partnerTopicsDeleteSample.ts | 8 +- .../samples-dev/partnerTopicsGetSample.ts | 8 +- .../partnerTopicsListByResourceGroupSample.ts | 8 +- .../partnerTopicsListBySubscriptionSample.ts | 8 +- .../samples-dev/partnerTopicsUpdateSample.ts | 8 +- .../permissionBindingsCreateOrUpdateSample.ts | 8 +- .../permissionBindingsDeleteSample.ts | 8 +- .../permissionBindingsGetSample.ts | 8 +- ...permissionBindingsListByNamespaceSample.ts | 8 +- .../privateEndpointConnectionsDeleteSample.ts | 8 +- .../privateEndpointConnectionsGetSample.ts | 8 +- ...EndpointConnectionsListByResourceSample.ts | 8 +- .../privateEndpointConnectionsUpdateSample.ts | 8 +- .../privateLinkResourcesGetSample.ts | 8 +- ...rivateLinkResourcesListByResourceSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...stemTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- .../systemTopicEventSubscriptionsGetSample.ts | 8 +- ...entSubscriptionsListBySystemTopicSample.ts | 8 +- ...stemTopicEventSubscriptionsUpdateSample.ts | 8 +- .../systemTopicsCreateOrUpdateSample.ts | 8 +- .../samples-dev/systemTopicsDeleteSample.ts | 8 +- .../samples-dev/systemTopicsGetSample.ts | 8 +- .../systemTopicsListByResourceGroupSample.ts | 8 +- .../systemTopicsListBySubscriptionSample.ts | 8 +- .../samples-dev/systemTopicsUpdateSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- .../topicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...topicEventSubscriptionsGetFullUrlSample.ts | 8 +- .../topicEventSubscriptionsGetSample.ts | 8 +- .../topicEventSubscriptionsListSample.ts | 8 +- .../topicEventSubscriptionsUpdateSample.ts | 8 +- .../topicSpacesCreateOrUpdateSample.ts | 8 +- .../samples-dev/topicSpacesDeleteSample.ts | 8 +- .../samples-dev/topicSpacesGetSample.ts | 8 +- .../topicSpacesListByNamespaceSample.ts | 8 +- .../samples-dev/topicTypesGetSample.ts | 8 +- .../topicTypesListEventTypesSample.ts | 8 +- .../samples-dev/topicTypesListSample.ts | 8 +- .../samples-dev/topicsCreateOrUpdateSample.ts | 10 +- .../samples-dev/topicsDeleteSample.ts | 8 +- .../samples-dev/topicsGetSample.ts | 8 +- .../topicsListByResourceGroupSample.ts | 8 +- .../topicsListBySubscriptionSample.ts | 8 +- .../samples-dev/topicsListEventTypesSample.ts | 8 +- .../topicsListSharedAccessKeysSample.ts | 8 +- .../samples-dev/topicsRegenerateKeySample.ts | 8 +- .../samples-dev/topicsUpdateSample.ts | 8 +- .../samples-dev/verifiedPartnersGetSample.ts | 8 +- .../samples-dev/verifiedPartnersListSample.ts | 8 +- .../src/caCertificatesCreateOrUpdateSample.ts | 8 +- .../src/caCertificatesDeleteSample.ts | 8 +- .../typescript/src/caCertificatesGetSample.ts | 8 +- .../caCertificatesListByNamespaceSample.ts | 8 +- .../src/channelsCreateOrUpdateSample.ts | 8 +- .../typescript/src/channelsDeleteSample.ts | 8 +- .../src/channelsGetFullUrlSample.ts | 8 +- .../typescript/src/channelsGetSample.ts | 8 +- .../channelsListByPartnerNamespaceSample.ts | 8 +- .../typescript/src/channelsUpdateSample.ts | 8 +- .../src/clientGroupsCreateOrUpdateSample.ts | 8 +- .../src/clientGroupsDeleteSample.ts | 8 +- .../typescript/src/clientGroupsGetSample.ts | 8 +- .../src/clientGroupsListByNamespaceSample.ts | 8 +- .../src/clientsCreateOrUpdateSample.ts | 8 +- .../typescript/src/clientsDeleteSample.ts | 8 +- .../typescript/src/clientsGetSample.ts | 8 +- .../src/clientsListByNamespaceSample.ts | 8 +- ...nEventSubscriptionsCreateOrUpdateSample.ts | 8 +- .../domainEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...omainEventSubscriptionsGetFullUrlSample.ts | 8 +- .../src/domainEventSubscriptionsGetSample.ts | 8 +- .../src/domainEventSubscriptionsListSample.ts | 8 +- .../domainEventSubscriptionsUpdateSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...mainTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- .../domainTopicEventSubscriptionsGetSample.ts | 8 +- ...domainTopicEventSubscriptionsListSample.ts | 8 +- ...mainTopicEventSubscriptionsUpdateSample.ts | 8 +- .../src/domainTopicsCreateOrUpdateSample.ts | 8 +- .../src/domainTopicsDeleteSample.ts | 8 +- .../typescript/src/domainTopicsGetSample.ts | 8 +- .../src/domainTopicsListByDomainSample.ts | 8 +- .../src/domainsCreateOrUpdateSample.ts | 8 +- .../typescript/src/domainsDeleteSample.ts | 8 +- .../typescript/src/domainsGetSample.ts | 8 +- .../src/domainsListByResourceGroupSample.ts | 8 +- .../src/domainsListBySubscriptionSample.ts | 8 +- .../src/domainsListSharedAccessKeysSample.ts | 8 +- .../src/domainsRegenerateKeySample.ts | 8 +- .../typescript/src/domainsUpdateSample.ts | 8 +- .../eventSubscriptionsCreateOrUpdateSample.ts | 28 +- .../src/eventSubscriptionsDeleteSample.ts | 14 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- .../src/eventSubscriptionsGetFullUrlSample.ts | 14 +- .../src/eventSubscriptionsGetSample.ts | 28 +- ...entSubscriptionsListByDomainTopicSample.ts | 8 +- .../eventSubscriptionsListByResourceSample.ts | 8 +- ...GlobalByResourceGroupForTopicTypeSample.ts | 8 +- ...riptionsListGlobalByResourceGroupSample.ts | 8 +- ...tGlobalBySubscriptionForTopicTypeSample.ts | 8 +- ...criptionsListGlobalBySubscriptionSample.ts | 8 +- ...gionalByResourceGroupForTopicTypeSample.ts | 8 +- ...ptionsListRegionalByResourceGroupSample.ts | 8 +- ...egionalBySubscriptionForTopicTypeSample.ts | 8 +- ...iptionsListRegionalBySubscriptionSample.ts | 8 +- .../src/eventSubscriptionsUpdateSample.ts | 28 +- .../src/extensionTopicsGetSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...paceTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- ...mespaceTopicEventSubscriptionsGetSample.ts | 8 +- ...SubscriptionsListByNamespaceTopicSample.ts | 8 +- ...paceTopicEventSubscriptionsUpdateSample.ts | 8 +- .../namespaceTopicsCreateOrUpdateSample.ts | 8 +- .../src/namespaceTopicsDeleteSample.ts | 8 +- .../src/namespaceTopicsGetSample.ts | 8 +- .../namespaceTopicsListByNamespaceSample.ts | 8 +- ...mespaceTopicsListSharedAccessKeysSample.ts | 8 +- .../src/namespaceTopicsRegenerateKeySample.ts | 8 +- .../src/namespaceTopicsUpdateSample.ts | 8 +- .../src/namespacesCreateOrUpdateSample.ts | 8 +- .../typescript/src/namespacesDeleteSample.ts | 8 +- .../typescript/src/namespacesGetSample.ts | 8 +- .../namespacesListByResourceGroupSample.ts | 8 +- .../src/namespacesListBySubscriptionSample.ts | 8 +- .../namespacesListSharedAccessKeysSample.ts | 8 +- .../src/namespacesRegenerateKeySample.ts | 8 +- .../typescript/src/namespacesUpdateSample.ts | 8 +- ...acesValidateCustomDomainOwnershipSample.ts | 8 +- ...ecurityPerimeterConfigurationsGetSample.ts | 8 +- ...curityPerimeterConfigurationsListSample.ts | 8 +- ...yPerimeterConfigurationsReconcileSample.ts | 8 +- .../typescript/src/operationsListSample.ts | 8 +- ...nerConfigurationsAuthorizePartnerSample.ts | 8 +- ...rtnerConfigurationsCreateOrUpdateSample.ts | 8 +- .../src/partnerConfigurationsDeleteSample.ts | 8 +- .../src/partnerConfigurationsGetSample.ts | 8 +- ...ConfigurationsListByResourceGroupSample.ts | 8 +- ...rConfigurationsListBySubscriptionSample.ts | 8 +- ...rConfigurationsUnauthorizePartnerSample.ts | 8 +- .../src/partnerConfigurationsUpdateSample.ts | 8 +- .../src/partnerDestinationsActivateSample.ts | 8 +- ...partnerDestinationsCreateOrUpdateSample.ts | 8 +- .../src/partnerDestinationsDeleteSample.ts | 8 +- .../src/partnerDestinationsGetSample.ts | 8 +- ...erDestinationsListByResourceGroupSample.ts | 8 +- ...nerDestinationsListBySubscriptionSample.ts | 8 +- .../src/partnerDestinationsUpdateSample.ts | 8 +- .../partnerNamespacesCreateOrUpdateSample.ts | 8 +- .../src/partnerNamespacesDeleteSample.ts | 8 +- .../src/partnerNamespacesGetSample.ts | 8 +- ...tnerNamespacesListByResourceGroupSample.ts | 8 +- ...rtnerNamespacesListBySubscriptionSample.ts | 8 +- ...nerNamespacesListSharedAccessKeysSample.ts | 8 +- .../partnerNamespacesRegenerateKeySample.ts | 8 +- .../src/partnerNamespacesUpdateSample.ts | 8 +- ...artnerRegistrationsCreateOrUpdateSample.ts | 8 +- .../src/partnerRegistrationsDeleteSample.ts | 8 +- .../src/partnerRegistrationsGetSample.ts | 8 +- ...rRegistrationsListByResourceGroupSample.ts | 8 +- ...erRegistrationsListBySubscriptionSample.ts | 8 +- .../src/partnerRegistrationsUpdateSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...tnerTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- ...partnerTopicEventSubscriptionsGetSample.ts | 8 +- ...ntSubscriptionsListByPartnerTopicSample.ts | 8 +- ...tnerTopicEventSubscriptionsUpdateSample.ts | 8 +- .../src/partnerTopicsActivateSample.ts | 8 +- .../src/partnerTopicsCreateOrUpdateSample.ts | 8 +- .../src/partnerTopicsDeactivateSample.ts | 8 +- .../src/partnerTopicsDeleteSample.ts | 8 +- .../typescript/src/partnerTopicsGetSample.ts | 8 +- .../partnerTopicsListByResourceGroupSample.ts | 8 +- .../partnerTopicsListBySubscriptionSample.ts | 8 +- .../src/partnerTopicsUpdateSample.ts | 8 +- .../permissionBindingsCreateOrUpdateSample.ts | 8 +- .../src/permissionBindingsDeleteSample.ts | 8 +- .../src/permissionBindingsGetSample.ts | 8 +- ...permissionBindingsListByNamespaceSample.ts | 8 +- .../privateEndpointConnectionsDeleteSample.ts | 8 +- .../privateEndpointConnectionsGetSample.ts | 8 +- ...EndpointConnectionsListByResourceSample.ts | 8 +- .../privateEndpointConnectionsUpdateSample.ts | 8 +- .../src/privateLinkResourcesGetSample.ts | 8 +- ...rivateLinkResourcesListByResourceSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- ...stemTopicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...TopicEventSubscriptionsGetFullUrlSample.ts | 8 +- .../systemTopicEventSubscriptionsGetSample.ts | 8 +- ...entSubscriptionsListBySystemTopicSample.ts | 8 +- ...stemTopicEventSubscriptionsUpdateSample.ts | 8 +- .../src/systemTopicsCreateOrUpdateSample.ts | 8 +- .../src/systemTopicsDeleteSample.ts | 8 +- .../typescript/src/systemTopicsGetSample.ts | 8 +- .../systemTopicsListByResourceGroupSample.ts | 8 +- .../systemTopicsListBySubscriptionSample.ts | 8 +- .../src/systemTopicsUpdateSample.ts | 8 +- ...cEventSubscriptionsCreateOrUpdateSample.ts | 8 +- .../topicEventSubscriptionsDeleteSample.ts | 8 +- ...ubscriptionsGetDeliveryAttributesSample.ts | 8 +- ...topicEventSubscriptionsGetFullUrlSample.ts | 8 +- .../src/topicEventSubscriptionsGetSample.ts | 8 +- .../src/topicEventSubscriptionsListSample.ts | 8 +- .../topicEventSubscriptionsUpdateSample.ts | 8 +- .../src/topicSpacesCreateOrUpdateSample.ts | 8 +- .../typescript/src/topicSpacesDeleteSample.ts | 8 +- .../typescript/src/topicSpacesGetSample.ts | 8 +- .../src/topicSpacesListByNamespaceSample.ts | 8 +- .../typescript/src/topicTypesGetSample.ts | 8 +- .../src/topicTypesListEventTypesSample.ts | 8 +- .../typescript/src/topicTypesListSample.ts | 8 +- .../src/topicsCreateOrUpdateSample.ts | 10 +- .../typescript/src/topicsDeleteSample.ts | 8 +- .../typescript/src/topicsGetSample.ts | 8 +- .../src/topicsListByResourceGroupSample.ts | 8 +- .../src/topicsListBySubscriptionSample.ts | 8 +- .../src/topicsListEventTypesSample.ts | 8 +- .../src/topicsListSharedAccessKeysSample.ts | 8 +- .../src/topicsRegenerateKeySample.ts | 8 +- .../typescript/src/topicsUpdateSample.ts | 8 +- .../src/verifiedPartnersGetSample.ts | 8 +- .../src/verifiedPartnersListSample.ts | 8 +- .../src/eventGridManagementClient.ts | 10 +- sdk/eventgrid/arm-eventgrid/src/index.ts | 8 +- .../arm-eventgrid/src/models/index.ts | 80 ++-- .../arm-eventgrid/src/models/mappers.ts | 72 ++++ .../arm-eventgrid/src/models/parameters.ts | 4 +- .../src/operations/caCertificates.ts | 14 +- .../arm-eventgrid/src/operations/channels.ts | 14 +- .../src/operations/clientGroups.ts | 14 +- .../arm-eventgrid/src/operations/clients.ts | 14 +- .../operations/domainEventSubscriptions.ts | 14 +- .../domainTopicEventSubscriptions.ts | 14 +- .../src/operations/domainTopics.ts | 14 +- .../arm-eventgrid/src/operations/domains.ts | 14 +- .../src/operations/eventSubscriptions.ts | 14 +- .../src/operations/extensionTopics.ts | 10 +- .../arm-eventgrid/src/operations/index.ts | 62 +-- .../namespaceTopicEventSubscriptions.ts | 14 +- .../src/operations/namespaceTopics.ts | 14 +- .../src/operations/namespaces.ts | 14 +- .../networkSecurityPerimeterConfigurations.ts | 12 +- .../src/operations/operations.ts | 10 +- .../src/operations/partnerConfigurations.ts | 14 +- .../src/operations/partnerDestinations.ts | 14 +- .../src/operations/partnerNamespaces.ts | 14 +- .../src/operations/partnerRegistrations.ts | 14 +- .../partnerTopicEventSubscriptions.ts | 14 +- .../src/operations/partnerTopics.ts | 14 +- .../src/operations/permissionBindings.ts | 14 +- .../operations/privateEndpointConnections.ts | 14 +- .../src/operations/privateLinkResources.ts | 12 +- .../systemTopicEventSubscriptions.ts | 14 +- .../src/operations/systemTopics.ts | 14 +- .../src/operations/topicEventSubscriptions.ts | 14 +- .../src/operations/topicSpaces.ts | 14 +- .../src/operations/topicTypes.ts | 10 +- .../arm-eventgrid/src/operations/topics.ts | 14 +- .../src/operations/verifiedPartners.ts | 12 +- .../operationsInterfaces/caCertificates.ts | 2 +- .../src/operationsInterfaces/channels.ts | 2 +- .../src/operationsInterfaces/clientGroups.ts | 2 +- .../src/operationsInterfaces/clients.ts | 2 +- .../domainEventSubscriptions.ts | 2 +- .../domainTopicEventSubscriptions.ts | 2 +- .../src/operationsInterfaces/domainTopics.ts | 2 +- .../src/operationsInterfaces/domains.ts | 2 +- .../eventSubscriptions.ts | 2 +- .../operationsInterfaces/extensionTopics.ts | 2 +- .../src/operationsInterfaces/index.ts | 62 +-- .../namespaceTopicEventSubscriptions.ts | 2 +- .../operationsInterfaces/namespaceTopics.ts | 2 +- .../src/operationsInterfaces/namespaces.ts | 2 +- .../networkSecurityPerimeterConfigurations.ts | 2 +- .../src/operationsInterfaces/operations.ts | 2 +- .../partnerConfigurations.ts | 2 +- .../partnerDestinations.ts | 2 +- .../operationsInterfaces/partnerNamespaces.ts | 2 +- .../partnerRegistrations.ts | 2 +- .../partnerTopicEventSubscriptions.ts | 2 +- .../src/operationsInterfaces/partnerTopics.ts | 2 +- .../permissionBindings.ts | 2 +- .../privateEndpointConnections.ts | 2 +- .../privateLinkResources.ts | 2 +- .../systemTopicEventSubscriptions.ts | 2 +- .../src/operationsInterfaces/systemTopics.ts | 2 +- .../topicEventSubscriptions.ts | 2 +- .../src/operationsInterfaces/topicSpaces.ts | 2 +- .../src/operationsInterfaces/topicTypes.ts | 2 +- .../src/operationsInterfaces/topics.ts | 2 +- .../operationsInterfaces/verifiedPartners.ts | 2 +- .../arm-eventgrid/test/eventgrid_examples.ts | 89 ++-- .../arm-eventgrid/test/sampleTest.ts | 40 ++ .../tsconfig.browser.config.json | 6 + sdk/eventgrid/arm-eventgrid/tsconfig.json | 12 +- .../arm-eventgrid/tsconfig.samples.json | 10 + sdk/eventgrid/arm-eventgrid/tsconfig.src.json | 3 + .../arm-eventgrid/tsconfig.test.json | 6 + .../arm-eventgrid/vitest.browser.config.ts | 17 + sdk/eventgrid/arm-eventgrid/vitest.config.ts | 16 + .../arm-eventgrid/vitest.esm.config.ts | 12 + 447 files changed, 2221 insertions(+), 2364 deletions(-) create mode 100644 sdk/eventgrid/arm-eventgrid/test/sampleTest.ts create mode 100644 sdk/eventgrid/arm-eventgrid/tsconfig.browser.config.json create mode 100644 sdk/eventgrid/arm-eventgrid/tsconfig.samples.json create mode 100644 sdk/eventgrid/arm-eventgrid/tsconfig.src.json create mode 100644 sdk/eventgrid/arm-eventgrid/tsconfig.test.json create mode 100644 sdk/eventgrid/arm-eventgrid/vitest.browser.config.ts create mode 100644 sdk/eventgrid/arm-eventgrid/vitest.config.ts create mode 100644 sdk/eventgrid/arm-eventgrid/vitest.esm.config.ts diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 4c20b1414bac..bff9ea18626b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -345,7 +345,7 @@ importers: version: file:projects/arm-elasticsan.tgz '@rush-temp/arm-eventgrid': specifier: file:./projects/arm-eventgrid.tgz - version: file:projects/arm-eventgrid.tgz + version: file:projects/arm-eventgrid.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.12(@types/node@22.7.9)) '@rush-temp/arm-eventhub': specifier: file:./projects/arm-eventhub.tgz version: file:projects/arm-eventhub.tgz @@ -2918,7 +2918,7 @@ packages: version: 0.0.0 '@rush-temp/arm-eventgrid@file:projects/arm-eventgrid.tgz': - resolution: {integrity: sha512-XrBQvYOCJPcgRwmh+OfSW6RriM1kEJgvdHN7v7YKv7CxC1GTHPeydXjDkXdJGPytQCM/mhkXhU51BjBNBlEmJw==, tarball: file:projects/arm-eventgrid.tgz} + resolution: {integrity: sha512-Fc6ss8GsUyL07gHhl/7My08SC2qm0BvnX4Z2sUb8eNR1AGHQrJ2XOQqGPd1IzAVGywUnHOQ0ATa1wtOEwkmCPg==, tarball: file:projects/arm-eventgrid.tgz} version: 0.0.0 '@rush-temp/arm-eventhub-profile-2020-09-01-hybrid@file:projects/arm-eventhub-profile-2020-09-01-hybrid.tgz': @@ -13144,25 +13144,36 @@ snapshots: - '@swc/wasm' - supports-color - '@rush-temp/arm-eventgrid@file:projects/arm-eventgrid.tgz': + '@rush-temp/arm-eventgrid@file:projects/arm-eventgrid.tgz(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3))(vite@5.4.12(@types/node@22.7.9))': dependencies: - '@azure-tools/test-credential': 1.3.1 - '@azure-tools/test-recorder': 3.5.2 - '@azure/abort-controller': 1.1.0 '@azure/core-lro': 2.7.2 - '@types/chai': 4.3.20 - '@types/mocha': 10.0.10 '@types/node': 18.19.71 - chai: 4.5.0 + '@vitest/browser': 3.0.3(@types/node@18.19.71)(playwright@1.50.0)(typescript@5.6.3)(vite@5.4.12(@types/node@22.7.9))(vitest@3.0.3) + '@vitest/coverage-istanbul': 3.0.3(vitest@3.0.3) dotenv: 16.4.7 - mocha: 11.1.0 - ts-node: 10.9.2(@types/node@18.19.71)(typescript@5.7.3) + playwright: 1.50.0 tslib: 2.8.1 - typescript: 5.7.3 + typescript: 5.6.3 + vitest: 3.0.3(@types/node@18.19.71)(@vitest/browser@3.0.3)(msw@2.7.0(@types/node@22.7.9)(typescript@5.7.3)) transitivePeerDependencies: - - '@swc/core' - - '@swc/wasm' + - '@edge-runtime/vm' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - msw + - safaridriver + - sass + - sass-embedded + - stylus + - sugarss - supports-color + - terser + - utf-8-validate + - vite + - webdriverio '@rush-temp/arm-eventhub-profile-2020-09-01-hybrid@file:projects/arm-eventhub-profile-2020-09-01-hybrid.tgz': dependencies: diff --git a/sdk/eventgrid/arm-eventgrid/CHANGELOG.md b/sdk/eventgrid/arm-eventgrid/CHANGELOG.md index d5f8bdc0ddd8..605901f9ab7c 100644 --- a/sdk/eventgrid/arm-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/arm-eventgrid/CHANGELOG.md @@ -1,15 +1,387 @@ # Release History - -## 14.2.0-beta.5 (Unreleased) - + +## 15.0.0-beta.1 (2025-01-24) +Compared with version 14.1.0 + ### Features Added -### Breaking Changes - -### Bugs Fixed + - Added operation group CaCertificates + - Added operation group ClientGroups + - Added operation group Clients + - Added operation group Namespaces + - Added operation group NamespaceTopicEventSubscriptions + - Added operation group NamespaceTopics + - Added operation group NetworkSecurityPerimeterConfigurations + - Added operation group PartnerDestinations + - Added operation group PermissionBindings + - Added operation group TopicSpaces + - Added Interface AzureADPartnerClientAuthentication + - Added Interface BoolEqualsFilter + - Added Interface CaCertificate + - Added Interface CaCertificatesCreateOrUpdateOptionalParams + - Added Interface CaCertificatesDeleteHeaders + - Added Interface CaCertificatesDeleteOptionalParams + - Added Interface CaCertificatesGetOptionalParams + - Added Interface CaCertificatesListByNamespaceNextOptionalParams + - Added Interface CaCertificatesListByNamespaceOptionalParams + - Added Interface CaCertificatesListResult + - Added Interface ChannelsDeleteHeaders + - Added Interface Client + - Added Interface ClientAuthenticationSettings + - Added Interface ClientCertificateAuthentication + - Added Interface ClientGroup + - Added Interface ClientGroupsCreateOrUpdateOptionalParams + - Added Interface ClientGroupsDeleteHeaders + - Added Interface ClientGroupsDeleteOptionalParams + - Added Interface ClientGroupsGetOptionalParams + - Added Interface ClientGroupsListByNamespaceNextOptionalParams + - Added Interface ClientGroupsListByNamespaceOptionalParams + - Added Interface ClientGroupsListResult + - Added Interface ClientsCreateOrUpdateOptionalParams + - Added Interface ClientsDeleteHeaders + - Added Interface ClientsDeleteOptionalParams + - Added Interface ClientsGetOptionalParams + - Added Interface ClientsListByNamespaceNextOptionalParams + - Added Interface ClientsListByNamespaceOptionalParams + - Added Interface ClientsListResult + - Added Interface CustomDomainConfiguration + - Added Interface CustomDomainIdentity + - Added Interface CustomDomainOwnershipValidationResult + - Added Interface CustomJwtAuthenticationManagedIdentity + - Added Interface CustomJwtAuthenticationSettings + - Added Interface DeliveryConfiguration + - Added Interface DomainEventSubscriptionsDeleteHeaders + - Added Interface DomainsDeleteHeaders + - Added Interface DomainTopicEventSubscriptionsDeleteHeaders + - Added Interface DomainTopicsDeleteHeaders + - Added Interface DynamicRoutingEnrichment + - Added Interface EncodedIssuerCertificateInfo + - Added Interface ErrorAdditionalInfo + - Added Interface ErrorDetail + - Added Interface ErrorResponse + - Added Interface EventSubscriptionsDeleteHeaders + - Added Interface ExtendedLocation + - Added Interface FederatedIdentityCredentialInfo + - Added Interface Filter + - Added Interface FiltersConfiguration + - Added Interface IsNotNullFilter + - Added Interface IsNullOrUndefinedFilter + - Added Interface IssuerCertificateInfo + - Added Interface MonitorAlertEventSubscriptionDestination + - Added Interface Namespace + - Added Interface NamespaceRegenerateKeyRequest + - Added Interface NamespacesCreateOrUpdateOptionalParams + - Added Interface NamespacesDeleteHeaders + - Added Interface NamespacesDeleteOptionalParams + - Added Interface NamespacesGetOptionalParams + - Added Interface NamespaceSharedAccessKeys + - Added Interface NamespaceSku + - Added Interface NamespacesListByResourceGroupNextOptionalParams + - Added Interface NamespacesListByResourceGroupOptionalParams + - Added Interface NamespacesListBySubscriptionNextOptionalParams + - Added Interface NamespacesListBySubscriptionOptionalParams + - Added Interface NamespacesListResult + - Added Interface NamespacesListSharedAccessKeysOptionalParams + - Added Interface NamespacesRegenerateKeyHeaders + - Added Interface NamespacesRegenerateKeyOptionalParams + - Added Interface NamespacesUpdateHeaders + - Added Interface NamespacesUpdateOptionalParams + - Added Interface NamespacesValidateCustomDomainOwnershipHeaders + - Added Interface NamespacesValidateCustomDomainOwnershipOptionalParams + - Added Interface NamespaceTopic + - Added Interface NamespaceTopicEventSubscriptionDestination + - Added Interface NamespaceTopicEventSubscriptionsCreateOrUpdateOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsDeleteHeaders + - Added Interface NamespaceTopicEventSubscriptionsDeleteOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsGetDeliveryAttributesOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsGetFullUrlOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsGetOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsListByNamespaceTopicNextOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsListByNamespaceTopicOptionalParams + - Added Interface NamespaceTopicEventSubscriptionsUpdateHeaders + - Added Interface NamespaceTopicEventSubscriptionsUpdateOptionalParams + - Added Interface NamespaceTopicsCreateOrUpdateOptionalParams + - Added Interface NamespaceTopicsDeleteHeaders + - Added Interface NamespaceTopicsDeleteOptionalParams + - Added Interface NamespaceTopicsGetOptionalParams + - Added Interface NamespaceTopicsListByNamespaceNextOptionalParams + - Added Interface NamespaceTopicsListByNamespaceOptionalParams + - Added Interface NamespaceTopicsListResult + - Added Interface NamespaceTopicsListSharedAccessKeysOptionalParams + - Added Interface NamespaceTopicsRegenerateKeyHeaders + - Added Interface NamespaceTopicsRegenerateKeyOptionalParams + - Added Interface NamespaceTopicsUpdateHeaders + - Added Interface NamespaceTopicsUpdateOptionalParams + - Added Interface NamespaceTopicUpdateParameters + - Added Interface NamespaceUpdateParameters + - Added Interface NetworkSecurityPerimeterConfiguration + - Added Interface NetworkSecurityPerimeterConfigurationIssues + - Added Interface NetworkSecurityPerimeterConfigurationList + - Added Interface NetworkSecurityPerimeterConfigurationProfile + - Added Interface NetworkSecurityPerimeterConfigurationsGetOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsListOptionalParams + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileHeaders + - Added Interface NetworkSecurityPerimeterConfigurationsReconcileOptionalParams + - Added Interface NetworkSecurityPerimeterInfo + - Added Interface NetworkSecurityPerimeterProfileAccessRule + - Added Interface NetworkSecurityPerimeterSubscription + - Added Interface NumberGreaterThanFilter + - Added Interface NumberGreaterThanOrEqualsFilter + - Added Interface NumberInFilter + - Added Interface NumberInRangeFilter + - Added Interface NumberLessThanFilter + - Added Interface NumberLessThanOrEqualsFilter + - Added Interface NumberNotInFilter + - Added Interface NumberNotInRangeFilter + - Added Interface PartnerClientAuthentication + - Added Interface PartnerConfigurationsDeleteHeaders + - Added Interface PartnerDestination + - Added Interface PartnerDestinationInfo + - Added Interface PartnerDestinationsActivateOptionalParams + - Added Interface PartnerDestinationsCreateOrUpdateOptionalParams + - Added Interface PartnerDestinationsDeleteHeaders + - Added Interface PartnerDestinationsDeleteOptionalParams + - Added Interface PartnerDestinationsGetOptionalParams + - Added Interface PartnerDestinationsListByResourceGroupNextOptionalParams + - Added Interface PartnerDestinationsListByResourceGroupOptionalParams + - Added Interface PartnerDestinationsListBySubscriptionNextOptionalParams + - Added Interface PartnerDestinationsListBySubscriptionOptionalParams + - Added Interface PartnerDestinationsListResult + - Added Interface PartnerDestinationsUpdateHeaders + - Added Interface PartnerDestinationsUpdateOptionalParams + - Added Interface PartnerDestinationUpdateParameters + - Added Interface PartnerEventSubscriptionDestination + - Added Interface PartnerNamespacesDeleteHeaders + - Added Interface PartnerRegistrationsCreateOrUpdateHeaders + - Added Interface PartnerRegistrationsDeleteHeaders + - Added Interface PartnerTopicEventSubscriptionsDeleteHeaders + - Added Interface PartnerTopicsDeleteHeaders + - Added Interface PartnerUpdateDestinationInfo + - Added Interface PermissionBinding + - Added Interface PermissionBindingsCreateOrUpdateOptionalParams + - Added Interface PermissionBindingsDeleteHeaders + - Added Interface PermissionBindingsDeleteOptionalParams + - Added Interface PermissionBindingsGetOptionalParams + - Added Interface PermissionBindingsListByNamespaceNextOptionalParams + - Added Interface PermissionBindingsListByNamespaceOptionalParams + - Added Interface PermissionBindingsListResult + - Added Interface PrivateEndpointConnectionsDeleteHeaders + - Added Interface PushInfo + - Added Interface QueueInfo + - Added Interface ResourceAssociation + - Added Interface ResourceMoveChangeHistory + - Added Interface ResourceSku + - Added Interface RoutingEnrichments + - Added Interface RoutingIdentityInfo + - Added Interface StaticRoutingEnrichment + - Added Interface StaticStringRoutingEnrichment + - Added Interface StringBeginsWithFilter + - Added Interface StringContainsFilter + - Added Interface StringEndsWithFilter + - Added Interface StringInFilter + - Added Interface StringNotBeginsWithFilter + - Added Interface StringNotContainsFilter + - Added Interface StringNotEndsWithFilter + - Added Interface StringNotInFilter + - Added Interface Subscription + - Added Interface SubscriptionFullUrl + - Added Interface SubscriptionsListResult + - Added Interface SubscriptionUpdateParameters + - Added Interface SystemTopicEventSubscriptionsDeleteHeaders + - Added Interface SystemTopicsDeleteHeaders + - Added Interface TopicEventSubscriptionsDeleteHeaders + - Added Interface TopicsConfiguration + - Added Interface TopicsDeleteHeaders + - Added Interface TopicSpace + - Added Interface TopicSpacesConfiguration + - Added Interface TopicSpacesCreateOrUpdateOptionalParams + - Added Interface TopicSpacesDeleteHeaders + - Added Interface TopicSpacesDeleteOptionalParams + - Added Interface TopicSpacesGetOptionalParams + - Added Interface TopicSpacesListByNamespaceNextOptionalParams + - Added Interface TopicSpacesListByNamespaceOptionalParams + - Added Interface TopicSpacesListResult + - Added Interface TopicsRegenerateKeyHeaders + - Added Interface TopicTypeAdditionalEnforcedPermission + - Added Interface UpdateTopicsConfigurationInfo + - Added Interface UpdateTopicSpacesConfigurationInfo + - Added Interface WebhookPartnerDestinationInfo + - Added Interface WebhookUpdatePartnerDestinationInfo + - Added Type Alias AlternativeAuthenticationNameSource + - Added Type Alias CaCertificateProvisioningState + - Added Type Alias CaCertificatesCreateOrUpdateResponse + - Added Type Alias CaCertificatesGetResponse + - Added Type Alias CaCertificatesListByNamespaceNextResponse + - Added Type Alias CaCertificatesListByNamespaceResponse + - Added Type Alias ClientCertificateValidationScheme + - Added Type Alias ClientGroupProvisioningState + - Added Type Alias ClientGroupsCreateOrUpdateResponse + - Added Type Alias ClientGroupsGetResponse + - Added Type Alias ClientGroupsListByNamespaceNextResponse + - Added Type Alias ClientGroupsListByNamespaceResponse + - Added Type Alias ClientProvisioningState + - Added Type Alias ClientsCreateOrUpdateResponse + - Added Type Alias ClientsGetResponse + - Added Type Alias ClientsListByNamespaceNextResponse + - Added Type Alias ClientsListByNamespaceResponse + - Added Type Alias ClientState + - Added Type Alias CustomDomainIdentityType + - Added Type Alias CustomDomainValidationState + - Added Type Alias CustomJwtAuthenticationManagedIdentityType + - Added Type Alias DeliveryMode + - Added Type Alias DeliverySchema + - Added Type Alias EventInputSchema + - Added Type Alias FilterOperatorType + - Added Type Alias FilterUnion + - Added Type Alias MonitorAlertSeverity + - Added Type Alias NamespaceProvisioningState + - Added Type Alias NamespacesCreateOrUpdateResponse + - Added Type Alias NamespacesGetResponse + - Added Type Alias NamespacesListByResourceGroupNextResponse + - Added Type Alias NamespacesListByResourceGroupResponse + - Added Type Alias NamespacesListBySubscriptionNextResponse + - Added Type Alias NamespacesListBySubscriptionResponse + - Added Type Alias NamespacesListSharedAccessKeysResponse + - Added Type Alias NamespacesRegenerateKeyResponse + - Added Type Alias NamespacesUpdateResponse + - Added Type Alias NamespacesValidateCustomDomainOwnershipResponse + - Added Type Alias NamespaceTopicEventSubscriptionsCreateOrUpdateResponse + - Added Type Alias NamespaceTopicEventSubscriptionsGetDeliveryAttributesResponse + - Added Type Alias NamespaceTopicEventSubscriptionsGetFullUrlResponse + - Added Type Alias NamespaceTopicEventSubscriptionsGetResponse + - Added Type Alias NamespaceTopicEventSubscriptionsListByNamespaceTopicNextResponse + - Added Type Alias NamespaceTopicEventSubscriptionsListByNamespaceTopicResponse + - Added Type Alias NamespaceTopicEventSubscriptionsUpdateResponse + - Added Type Alias NamespaceTopicProvisioningState + - Added Type Alias NamespaceTopicsCreateOrUpdateResponse + - Added Type Alias NamespaceTopicsGetResponse + - Added Type Alias NamespaceTopicsListByNamespaceNextResponse + - Added Type Alias NamespaceTopicsListByNamespaceResponse + - Added Type Alias NamespaceTopicsListSharedAccessKeysResponse + - Added Type Alias NamespaceTopicsRegenerateKeyResponse + - Added Type Alias NamespaceTopicsUpdateResponse + - Added Type Alias NetworkSecurityPerimeterAssociationAccessMode + - Added Type Alias NetworkSecurityPerimeterConfigProvisioningState + - Added Type Alias NetworkSecurityPerimeterConfigurationIssueSeverity + - Added Type Alias NetworkSecurityPerimeterConfigurationIssueType + - Added Type Alias NetworkSecurityPerimeterConfigurationsGetResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsListResponse + - Added Type Alias NetworkSecurityPerimeterConfigurationsReconcileResponse + - Added Type Alias NetworkSecurityPerimeterProfileAccessRuleDirection + - Added Type Alias NetworkSecurityPerimeterResourceType + - Added Type Alias PartnerClientAuthenticationType + - Added Type Alias PartnerClientAuthenticationUnion + - Added Type Alias PartnerDestinationActivationState + - Added Type Alias PartnerDestinationInfoUnion + - Added Type Alias PartnerDestinationProvisioningState + - Added Type Alias PartnerDestinationsActivateResponse + - Added Type Alias PartnerDestinationsCreateOrUpdateResponse + - Added Type Alias PartnerDestinationsGetResponse + - Added Type Alias PartnerDestinationsListByResourceGroupNextResponse + - Added Type Alias PartnerDestinationsListByResourceGroupResponse + - Added Type Alias PartnerDestinationsListBySubscriptionNextResponse + - Added Type Alias PartnerDestinationsListBySubscriptionResponse + - Added Type Alias PartnerDestinationsUpdateResponse + - Added Type Alias PartnerEndpointType + - Added Type Alias PartnerUpdateDestinationInfoUnion + - Added Type Alias PermissionBindingProvisioningState + - Added Type Alias PermissionBindingsCreateOrUpdateResponse + - Added Type Alias PermissionBindingsGetResponse + - Added Type Alias PermissionBindingsListByNamespaceNextResponse + - Added Type Alias PermissionBindingsListByNamespaceResponse + - Added Type Alias PermissionType + - Added Type Alias PrivateEndpointConnectionsDeleteResponse + - Added Type Alias PublisherType + - Added Type Alias ResourceKind + - Added Type Alias RoutingIdentityType + - Added Type Alias Sku + - Added Type Alias SkuName + - Added Type Alias StaticRoutingEnrichmentType + - Added Type Alias StaticRoutingEnrichmentUnion + - Added Type Alias SubscriptionProvisioningState + - Added Type Alias TlsVersion + - Added Type Alias TopicsDeleteResponse + - Added Type Alias TopicSpaceProvisioningState + - Added Type Alias TopicSpacesConfigurationState + - Added Type Alias TopicSpacesCreateOrUpdateResponse + - Added Type Alias TopicSpacesGetResponse + - Added Type Alias TopicSpacesListByNamespaceNextResponse + - Added Type Alias TopicSpacesListByNamespaceResponse + - Interface Channel has a new optional parameter partnerDestinationInfo + - Interface ChannelUpdateParameters has a new optional parameter partnerDestinationInfo + - Interface Domain has a new optional parameter eventTypeInfo + - Interface Domain has a new optional parameter minimumTlsVersionAllowed + - Interface Domain has a new optional parameter sku + - Interface DomainUpdateParameters has a new optional parameter eventTypeInfo + - Interface DomainUpdateParameters has a new optional parameter minimumTlsVersionAllowed + - Interface DomainUpdateParameters has a new optional parameter sku + - Interface EventSubscriptionIdentity has a new optional parameter federatedIdentityCredentialInfo + - Interface PartnerNamespace has a new optional parameter minimumTlsVersionAllowed + - Interface PartnerNamespaceUpdateParameters has a new optional parameter minimumTlsVersionAllowed + - Interface Topic has a new optional parameter eventTypeInfo + - Interface Topic has a new optional parameter extendedLocation + - Interface Topic has a new optional parameter kind + - Interface Topic has a new optional parameter minimumTlsVersionAllowed + - Interface Topic has a new optional parameter sku + - Interface TopicTypeInfo has a new optional parameter additionalEnforcedPermissions + - Interface TopicTypeInfo has a new optional parameter areRegionalAndGlobalSourcesSupported + - Interface TopicUpdateParameters has a new optional parameter eventTypeInfo + - Interface TopicUpdateParameters has a new optional parameter minimumTlsVersionAllowed + - Interface TopicUpdateParameters has a new optional parameter sku + - Interface VerifiedPartner has a new optional parameter partnerDestinationDetails + - Interface WebHookEventSubscriptionDestination has a new optional parameter minimumTlsVersionAllowed + - Type of parameter endpointType of interface EventSubscriptionDestination is changed from "WebHook" | "EventHub" | "StorageQueue" | "HybridConnection" | "ServiceBusQueue" | "ServiceBusTopic" | "AzureFunction" to "WebHook" | "EventHub" | "StorageQueue" | "HybridConnection" | "ServiceBusQueue" | "ServiceBusTopic" | "AzureFunction" | "PartnerDestination" | "MonitorAlert" | "NamespaceTopic" + - Added Enum KnownAlternativeAuthenticationNameSource + - Added Enum KnownCaCertificateProvisioningState + - Added Enum KnownClientCertificateValidationScheme + - Added Enum KnownClientGroupProvisioningState + - Added Enum KnownClientProvisioningState + - Added Enum KnownClientState + - Added Enum KnownCustomDomainIdentityType + - Added Enum KnownCustomDomainValidationState + - Added Enum KnownCustomJwtAuthenticationManagedIdentityType + - Added Enum KnownDeliveryMode + - Added Enum KnownDeliverySchema + - Added Enum KnownEventInputSchema + - Added Enum KnownFilterOperatorType + - Added Enum KnownMonitorAlertSeverity + - Added Enum KnownNamespaceProvisioningState + - Added Enum KnownNamespaceTopicProvisioningState + - Added Enum KnownNetworkSecurityPerimeterAssociationAccessMode + - Added Enum KnownNetworkSecurityPerimeterConfigProvisioningState + - Added Enum KnownNetworkSecurityPerimeterConfigurationIssueSeverity + - Added Enum KnownNetworkSecurityPerimeterConfigurationIssueType + - Added Enum KnownNetworkSecurityPerimeterProfileAccessRuleDirection + - Added Enum KnownNetworkSecurityPerimeterResourceType + - Added Enum KnownPartnerClientAuthenticationType + - Added Enum KnownPartnerDestinationActivationState + - Added Enum KnownPartnerDestinationProvisioningState + - Added Enum KnownPartnerEndpointType + - Added Enum KnownPermissionBindingProvisioningState + - Added Enum KnownPermissionType + - Added Enum KnownPublisherType + - Added Enum KnownResourceKind + - Added Enum KnownRoutingIdentityType + - Added Enum KnownSku + - Added Enum KnownSkuName + - Added Enum KnownStaticRoutingEnrichmentType + - Added Enum KnownSubscriptionProvisioningState + - Added Enum KnownTlsVersion + - Added Enum KnownTopicSpaceProvisioningState + - Added Enum KnownTopicSpacesConfigurationState + - Enum KnownChannelProvisioningState has a new value IdleDueToMirroredPartnerDestinationDeletion + - Enum KnownChannelType has a new value PartnerDestination + - Enum KnownEndpointType has a new value MonitorAlert + - Enum KnownEndpointType has a new value NamespaceTopic + - Enum KnownEndpointType has a new value PartnerDestination + - Enum KnownPrivateEndpointConnectionsParentType has a new value Namespaces + - Enum KnownPublicNetworkAccess has a new value SecuredByPerimeter -### Other Changes +### Breaking Changes + - Class EventGridManagementClient has a new signature + + ## 14.2.0-beta.4 (2024-04-29) ### Features Added diff --git a/sdk/eventgrid/arm-eventgrid/LICENSE b/sdk/eventgrid/arm-eventgrid/LICENSE index 7d5934740965..2ad4de7b17f0 100644 --- a/sdk/eventgrid/arm-eventgrid/LICENSE +++ b/sdk/eventgrid/arm-eventgrid/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2024 Microsoft +Copyright (c) 2025 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/eventgrid/arm-eventgrid/README.md b/sdk/eventgrid/arm-eventgrid/README.md index 24c71a75ce57..843f39465f58 100644 --- a/sdk/eventgrid/arm-eventgrid/README.md +++ b/sdk/eventgrid/arm-eventgrid/README.md @@ -2,7 +2,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) for Azure EventGridManagement client. -Azure EventGrid Management Client +Azure EventGrid Management Client test [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/arm-eventgrid) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-eventgrid) | @@ -44,7 +44,6 @@ npm install @azure/identity ``` You will also need to **register a new AAD application and grant access to Azure EventGridManagement** by assigning the suitable role to your service principal (note: roles such as `"Owner"` will not grant the necessary permissions). -Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: `AZURE_CLIENT_ID`, `AZURE_TENANT_ID`, `AZURE_CLIENT_SECRET`. For more information about how to create an Azure AD Application check out [this guide](https://learn.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal). @@ -64,8 +63,8 @@ const client = new EventGridManagementClient(new DefaultAzureCredential(), subsc // const client = new EventGridManagementClient(credential, subscriptionId); ``` -### JavaScript Bundle +### JavaScript Bundle To use this client library in the browser, first you need to use a bundler. For details on how to do this, please refer to our [bundling documentation](https://aka.ms/AzureSDKBundling). ## Key concepts diff --git a/sdk/eventgrid/arm-eventgrid/_meta.json b/sdk/eventgrid/arm-eventgrid/_meta.json index 265aee4d255a..1b2e02c5bdb2 100644 --- a/sdk/eventgrid/arm-eventgrid/_meta.json +++ b/sdk/eventgrid/arm-eventgrid/_meta.json @@ -1,8 +1,8 @@ { - "commit": "b8691fbfca8fcdc5a241a0b501c32fd4a76bb0cd", + "commit": "ac25e876360fd307a78193b046042064e76e2683", "readme": "specification/eventgrid/resource-manager/readme.md", - "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\eventgrid\\resource-manager\\readme.md --use=@autorest/typescript@6.0.21 --generate-sample=true", - "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.7.7", - "use": "@autorest/typescript@6.0.21" + "autorest_command": "autorest --version=3.9.7 --typescript --modelerfour.lenient-model-deduplication --azure-arm --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/eventgrid/resource-manager/readme.md --use=@autorest/typescript@^6.0.12", + "repository_url": "https://github.com/test-repo-billy/azure-rest-api-specs.git", + "release_tool": "@azure-tools/js-sdk-release-tools@2.7.18", + "use": "@autorest/typescript@^6.0.12" } \ No newline at end of file diff --git a/sdk/eventgrid/arm-eventgrid/package.json b/sdk/eventgrid/arm-eventgrid/package.json index d9e1af4147b7..8c462fa2dd14 100644 --- a/sdk/eventgrid/arm-eventgrid/package.json +++ b/sdk/eventgrid/arm-eventgrid/package.json @@ -3,18 +3,18 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for EventGridManagementClient.", - "version": "14.2.0-beta.5", + "version": "15.0.0-beta.1", "engines": { "node": ">=18.0.0" }, "dependencies": { - "@azure/abort-controller": "^1.0.0", - "@azure/core-auth": "^1.6.0", - "@azure/core-client": "^1.7.0", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-client": "^1.9.2", "@azure/core-lro": "^2.5.4", - "@azure/core-paging": "^1.2.0", - "@azure/core-rest-pipeline": "^1.14.0", - "tslib": "^2.2.0" + "@azure/core-paging": "^1.6.2", + "@azure/core-rest-pipeline": "^1.18.2", + "tslib": "^2.8.1" }, "keywords": [ "node", @@ -24,22 +24,22 @@ "isomorphic" ], "license": "MIT", - "main": "./dist/index.js", + "main": "./dist/commonjs/index.js", "module": "./dist-esm/src/index.js", - "types": "./types/arm-eventgrid.d.ts", + "types": "./dist/commonjs/index.d.ts", "devDependencies": { - "@azure-tools/test-credential": "^1.0.0", - "@azure-tools/test-recorder": "^3.0.0", + "@azure-tools/test-credential": "^2.0.0", + "@azure-tools/test-recorder": "^4.1.0", + "@azure-tools/test-utils-vitest": "^1.0.0", "@azure/dev-tool": "^1.0.0", - "@azure/identity": "^4.0.1", - "@types/chai": "^4.2.8", - "@types/mocha": "^10.0.0", + "@azure/identity": "^4.6.0", "@types/node": "^18.0.0", - "chai": "^4.2.0", + "@vitest/browser": "^3.0.3", + "@vitest/coverage-istanbul": "^3.0.3", "dotenv": "^16.0.0", - "mocha": "^11.0.2", - "ts-node": "^10.0.0", - "typescript": "~5.7.2" + "playwright": "^1.50.0", + "typescript": "~5.6.2", + "vitest": "^3.0.3" }, "repository": { "type": "git", @@ -49,24 +49,14 @@ "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "dist/**/*.d.ts", - "dist/**/*.d.ts.map", - "dist-esm/**/*.js", - "dist-esm/**/*.js.map", - "dist-esm/**/*.d.ts", - "dist-esm/**/*.d.ts.map", - "src/**/*.ts", + "dist/", "README.md", "LICENSE", - "tsconfig.json", - "review/*", - "CHANGELOG.md", - "types/*" + "review/", + "CHANGELOG.md" ], "scripts": { - "build": "npm run clean && tsc && dev-tool run bundle && npm run minify && npm run extract-api", + "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api", "build:browser": "echo skipped", "build:node": "echo skipped", "build:samples": "echo skipped.", @@ -78,7 +68,7 @@ "format": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", "integration-test:browser": "echo skipped", - "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", + "integration-test:node": "dev-tool run test:vitest --esm", "lint": "echo skipped", "minify": "dev-tool run vendored uglifyjs -c -m --comments --source-map \"content='./dist/index.js.map'\" -o ./dist/index.min.js ./dist/index.js", "pack": "npm pack 2>&1", @@ -88,7 +78,7 @@ "test:node": "echo skipped", "unit-test": "npm run unit-test:node && npm run unit-test:browser", "unit-test:browser": "echo skipped", - "unit-test:node": "dev-tool run vendored cross-env TEST_MODE=playback npm run integration-test:node", + "unit-test:node": "dev-tool run test:vitest", "update-snippets": "echo skipped" }, "sideEffects": false, @@ -102,12 +92,44 @@ }, "autoPublish": true, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/eventgrid/arm-eventgrid", - "//sampleConfiguration": { - "productName": "", - "productSlugs": [ - "azure" + "type": "module", + "tshy": { + "project": "./tsconfig.src.json", + "exports": { + "./package.json": "./package.json", + ".": "./src/index.ts" + }, + "dialects": [ + "esm", + "commonjs" ], - "disableDocsMs": true, - "apiRefLink": "https://learn.microsoft.com/javascript/api/@azure/arm-eventgrid?view=azure-node-preview" + "esmDialects": [ + "browser", + "react-native" + ], + "selfLink": false + }, + "browser": "./dist/browser/index.js", + "react-native": "./dist/react-native/index.js", + "exports": { + "./package.json": "./package.json", + ".": { + "browser": { + "types": "./dist/browser/index.d.ts", + "default": "./dist/browser/index.js" + }, + "react-native": { + "types": "./dist/react-native/index.d.ts", + "default": "./dist/react-native/index.js" + }, + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + } } -} +} \ 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 2e3ad3a6487a..9f8959230dfc 100644 --- a/sdk/eventgrid/arm-eventgrid/review/arm-eventgrid.api.md +++ b/sdk/eventgrid/arm-eventgrid/review/arm-eventgrid.api.md @@ -435,6 +435,7 @@ export type CustomJwtAuthenticationManagedIdentityType = string; // @public export interface CustomJwtAuthenticationSettings { + encodedIssuerCertificates?: EncodedIssuerCertificateInfo[]; issuerCertificates?: IssuerCertificateInfo[]; tokenIssuer?: string; } @@ -891,6 +892,12 @@ export interface DynamicRoutingEnrichment { value?: string; } +// @public +export interface EncodedIssuerCertificateInfo { + encodedCertificate: string; + kid: string; +} + // @public export type EndpointType = string; @@ -1052,6 +1059,7 @@ export interface EventSubscriptionFullUrl { // @public export interface EventSubscriptionIdentity { + federatedIdentityCredentialInfo?: FederatedIdentityCredentialInfo; type?: EventSubscriptionIdentityType; userAssignedIdentity?: string; } @@ -1361,6 +1369,11 @@ export interface ExtensionTopicsGetOptionalParams extends coreClient.OperationOp // @public export type ExtensionTopicsGetResponse = ExtensionTopic; +// @public +export interface FederatedIdentityCredentialInfo { + federatedClientId: string; +} + // @public export interface Filter { key?: string; @@ -3972,6 +3985,9 @@ export interface Subscription extends Resource { filtersConfiguration?: FiltersConfiguration; readonly provisioningState?: SubscriptionProvisioningState; readonly systemData?: SystemData; + tags?: { + [propertyName: string]: string; + }; } // @public @@ -3994,6 +4010,9 @@ export interface SubscriptionUpdateParameters { eventDeliverySchema?: DeliverySchema; expirationTimeUtc?: Date; filtersConfiguration?: FiltersConfiguration; + tags?: { + [propertyName: string]: string; + }; } // @public diff --git a/sdk/eventgrid/arm-eventgrid/sample.env b/sdk/eventgrid/arm-eventgrid/sample.env index 672847a3fea0..508439fc7d62 100644 --- a/sdk/eventgrid/arm-eventgrid/sample.env +++ b/sdk/eventgrid/arm-eventgrid/sample.env @@ -1,4 +1 @@ -# App registration secret for AAD authentication -AZURE_CLIENT_SECRET= -AZURE_CLIENT_ID= -AZURE_TENANT_ID= \ No newline at end of file +# Feel free to add your own environment variables. \ No newline at end of file diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesCreateOrUpdateSample.ts index 0184f41ae87b..ef14ab0a859f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CaCertificate, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a CA certificate with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a CA certificate with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_CreateOrUpdate.json */ -async function caCertificatesCreateOrUpdate() { +async function caCertificatesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function caCertificatesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await caCertificatesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesDeleteSample.ts index 163fca9b46aa..3deb1bc9e802 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing CA certificate. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing CA certificate. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_Delete.json */ -async function caCertificatesDelete() { +async function caCertificatesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function caCertificatesDelete() { console.log(result); } -async function main() { +async function main(): Promise { await caCertificatesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesGetSample.ts index 79034bed334e..a1abd1c59780 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a CA certificate. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a CA certificate. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_Get.json */ -async function caCertificatesGet() { +async function caCertificatesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function caCertificatesGet() { console.log(result); } -async function main() { +async function main(): Promise { await caCertificatesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesListByNamespaceSample.ts index bbb626904001..db0f60b3aa55 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/caCertificatesListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the CA certificates under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the CA certificates under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_ListByNamespace.json */ -async function caCertificatesListByNamespace() { +async function caCertificatesListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function caCertificatesListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await caCertificatesListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsCreateOrUpdateSample.ts index b12cd0ede953..60554eb4c4a0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Channel, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously creates or updates a new channel with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Synchronously creates or updates a new channel with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_CreateOrUpdate.json */ -async function channelsCreateOrUpdate() { +async function channelsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -50,7 +48,7 @@ async function channelsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await channelsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsDeleteSample.ts index 6800c7883af1..8986b0c54791 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing channel. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing channel. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Delete.json */ -async function channelsDelete() { +async function channelsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function channelsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await channelsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetFullUrlSample.ts index 638c346f6291..66c0c00dd1f6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL of a partner destination channel. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL of a partner destination channel. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_GetFullUrl.json */ -async function channelsGetFullUrl() { +async function channelsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function channelsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await channelsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetSample.ts index 97cbe373816a..9624c433f849 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a channel. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a channel. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Get.json */ -async function channelsGet() { +async function channelsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function channelsGet() { console.log(result); } -async function main() { +async function main(): Promise { await channelsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsListByPartnerNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsListByPartnerNamespaceSample.ts index d1e60c714bc8..93a87c0a76ef 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsListByPartnerNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsListByPartnerNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the channels in a partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the channels in a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_ListByPartnerNamespace.json */ -async function channelsListByPartnerNamespace() { +async function channelsListByPartnerNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function channelsListByPartnerNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await channelsListByPartnerNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsUpdateSample.ts index 1c7a3d542f3b..e26b91ebf1d2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/channelsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/channelsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously updates a channel with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Synchronously updates a channel with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Update.json */ -async function channelsUpdate() { +async function channelsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -45,7 +43,7 @@ async function channelsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await channelsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsCreateOrUpdateSample.ts index eea24f8db7da..472dd37feea2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ClientGroup, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a client group with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a client group with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_CreateOrUpdate.json */ -async function clientGroupsCreateOrUpdate() { +async function clientGroupsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function clientGroupsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await clientGroupsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsDeleteSample.ts index 8a09aeb5ff48..f5889c82d87c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing client group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing client group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Delete.json */ -async function clientGroupsDelete() { +async function clientGroupsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientGroupsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await clientGroupsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsGetSample.ts index 21acf88200b0..fcfcce6e4ad2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a client group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a client group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Get.json */ -async function clientGroupsGet() { +async function clientGroupsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientGroupsGet() { console.log(result); } -async function main() { +async function main(): Promise { await clientGroupsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsListByNamespaceSample.ts index 58a0d440fa7c..964397073d38 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientGroupsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the client groups under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the client groups under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_ListByNamespace.json */ -async function clientGroupsListByNamespace() { +async function clientGroupsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function clientGroupsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await clientGroupsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsCreateOrUpdateSample.ts index bf03b6a09c77..250f54482ceb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Client, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a client with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a client with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_CreateOrUpdate.json */ -async function clientsCreateOrUpdate() { +async function clientsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -47,7 +45,7 @@ async function clientsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await clientsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsDeleteSample.ts index 7bd1ec6ddc22..610b7523aa95 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing client. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing client. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Delete.json */ -async function clientsDelete() { +async function clientsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await clientsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsGetSample.ts index c5aa5f698803..57c76e81d740 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a client. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a client. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Get.json */ -async function clientsGet() { +async function clientsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientsGet() { console.log(result); } -async function main() { +async function main(): Promise { await clientsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsListByNamespaceSample.ts index 597ac501553e..a168944587d7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/clientsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/clientsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the permission bindings under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the permission bindings under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_ListByNamespace.json */ -async function clientsListByNamespace() { +async function clientsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function clientsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await clientsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsCreateOrUpdateSample.ts index c702b0f1c4f4..b0b64d79f94a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_CreateOrUpdate.json */ -async function domainEventSubscriptionsCreateOrUpdate() { +async function domainEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function domainEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsDeleteSample.ts index beda2335ec85..7337b9041721 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription for a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription for a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Delete.json */ -async function domainEventSubscriptionsDelete() { +async function domainEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetDeliveryAttributesSample.ts index a0d1b6c3a0ff..8761a093ced0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription for domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription for domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json */ -async function domainEventSubscriptionsGetDeliveryAttributes() { +async function domainEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetFullUrlSample.ts index 4fe0574dd09f..21ff8b6878a8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription for domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription for domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json */ -async function domainEventSubscriptionsGetFullUrl() { +async function domainEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetSample.ts index 47675cad6196..ee979baee8d5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Get.json */ -async function domainEventSubscriptionsGet() { +async function domainEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsListSample.ts index a6bff1c98421..19885e1f5e1a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_List.json */ -async function domainEventSubscriptionsList() { +async function domainEventSubscriptionsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function domainEventSubscriptionsList() { console.log(resArray); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsUpdateSample.ts index bb91da5e0db2..dbc12e2b79e6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription for a topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Update.json */ -async function domainEventSubscriptionsUpdate() { +async function domainEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function domainEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsCreateOrUpdateSample.ts index bb4b0655d622..9ea5489dfef9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json */ -async function domainTopicEventSubscriptionsCreateOrUpdate() { +async function domainTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -56,7 +54,7 @@ async function domainTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsDeleteSample.ts index ca0f760e8e87..a95613d8eb7c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a nested existing event subscription for a domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete a nested existing event subscription for a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Delete.json */ -async function domainTopicEventSubscriptionsDelete() { +async function domainTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function domainTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts index ddd2ced641f5..88de760b06b0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription for domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription for domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function domainTopicEventSubscriptionsGetDeliveryAttributes() { +async function domainTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function domainTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetFullUrlSample.ts index 3932d89eb3e1..049265d09387 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for a nested event subscription for domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for a nested event subscription for domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json */ -async function domainTopicEventSubscriptionsGetFullUrl() { +async function domainTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function domainTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetSample.ts index 5aa0d05803e3..200d07579543 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a nested event subscription for a domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a nested event subscription for a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Get.json */ -async function domainTopicEventSubscriptionsGet() { +async function domainTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function domainTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsListSample.ts index 6ecfef3c4016..90fba13d52f7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_List.json */ -async function domainTopicEventSubscriptionsList() { +async function domainTopicEventSubscriptionsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function domainTopicEventSubscriptionsList() { console.log(resArray); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsUpdateSample.ts index e2c07dae197b..43d8b5a0cf8f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription for a domain topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription for a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Update.json */ -async function domainTopicEventSubscriptionsUpdate() { +async function domainTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -56,7 +54,7 @@ async function domainTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsCreateOrUpdateSample.ts index bb1e6a2b8794..f036fdf6b108 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates a new domain topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates a new domain topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_CreateOrUpdate.json */ -async function domainTopicsCreateOrUpdate() { +async function domainTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsDeleteSample.ts index 542ccab3ce3c..84ffa92d1289 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Delete.json */ -async function domainTopicsDelete() { +async function domainTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsGetSample.ts index dd807c16edd3..c20d7d9c112a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Get.json */ -async function domainTopicsGet() { +async function domainTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { await domainTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsListByDomainSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsListByDomainSample.ts index 6fa95a02caf3..ecde936a60e0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsListByDomainSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainTopicsListByDomainSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the topics in a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the topics in a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_ListByDomain.json */ -async function domainTopicsListByDomain() { +async function domainTopicsListByDomain(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function domainTopicsListByDomain() { console.log(resArray); } -async function main() { +async function main(): Promise { await domainTopicsListByDomain(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsCreateOrUpdateSample.ts index 75eb0216c018..794a85728fec 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Domain, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates a new domain with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates a new domain with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_CreateOrUpdate.json */ -async function domainsCreateOrUpdate() { +async function domainsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -46,7 +44,7 @@ async function domainsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsDeleteSample.ts index 52ba8004c948..e9ef21f6b2a3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Delete.json */ -async function domainsDelete() { +async function domainsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function domainsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await domainsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsGetSample.ts index 18271b220b76..8636f9c55134 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Get.json */ -async function domainsGet() { +async function domainsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function domainsGet() { console.log(result); } -async function main() { +async function main(): Promise { await domainsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListByResourceGroupSample.ts index 2a886355b212..996842ff1a2d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the domains under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the domains under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListByResourceGroup.json */ -async function domainsListByResourceGroup() { +async function domainsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function domainsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await domainsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListBySubscriptionSample.ts index 2063a8e16060..5a69525781b1 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the domains under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the domains under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListBySubscription.json */ -async function domainsListBySubscription() { +async function domainsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function domainsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await domainsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListSharedAccessKeysSample.ts index 4372173c5a44..9ca2ab3a8d46 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListSharedAccessKeys.json */ -async function domainsListSharedAccessKeys() { +async function domainsListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function domainsListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { await domainsListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsRegenerateKeySample.ts index a13e6eabe4fd..5218a6e14cae 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a domain. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_RegenerateKey.json */ -async function domainsRegenerateKey() { +async function domainsRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function domainsRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { await domainsRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsUpdateSample.ts index 530103bccd0e..f3a6c9c35575 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/domainsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/domainsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a domain with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a domain with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Update.json */ -async function domainsUpdate() { +async function domainsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -48,7 +46,7 @@ async function domainsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await domainsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsCreateOrUpdateSample.ts index 55a75eebe778..b54d4d9ccbc7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopic() { +async function eventSubscriptionsCreateOrUpdateForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -55,7 +53,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopic() { * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -93,7 +91,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestin * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -131,7 +129,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -169,7 +167,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDes * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -207,7 +205,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDest * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -245,7 +243,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDest * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -285,7 +283,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestina * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -317,7 +315,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination( * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json */ -async function eventSubscriptionsCreateOrUpdateForResource() { +async function eventSubscriptionsCreateOrUpdateForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription10"; @@ -348,7 +346,7 @@ async function eventSubscriptionsCreateOrUpdateForResource() { * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json */ -async function eventSubscriptionsCreateOrUpdateForResourceGroup() { +async function eventSubscriptionsCreateOrUpdateForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -379,7 +377,7 @@ async function eventSubscriptionsCreateOrUpdateForResourceGroup() { * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json */ -async function eventSubscriptionsCreateOrUpdateForSubscription() { +async function eventSubscriptionsCreateOrUpdateForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const eventSubscriptionInfo: EventSubscription = { @@ -399,7 +397,7 @@ async function eventSubscriptionsCreateOrUpdateForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { await eventSubscriptionsCreateOrUpdateForCustomTopic(); await eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination(); await eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination(); diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsDeleteSample.ts index a480dba8274c..ef69569d4563 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json */ -async function eventSubscriptionsDeleteForCustomTopic() { +async function eventSubscriptionsDeleteForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -39,7 +37,7 @@ async function eventSubscriptionsDeleteForCustomTopic() { * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResource.json */ -async function eventSubscriptionsDeleteForResource() { +async function eventSubscriptionsDeleteForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription10"; @@ -58,7 +56,7 @@ async function eventSubscriptionsDeleteForResource() { * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json */ -async function eventSubscriptionsDeleteForResourceGroup() { +async function eventSubscriptionsDeleteForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -77,7 +75,7 @@ async function eventSubscriptionsDeleteForResourceGroup() { * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForSubscription.json */ -async function eventSubscriptionsDeleteForSubscription() { +async function eventSubscriptionsDeleteForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const credential = new DefaultAzureCredential(); @@ -89,7 +87,7 @@ async function eventSubscriptionsDeleteForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { await eventSubscriptionsDeleteForCustomTopic(); await eventSubscriptionsDeleteForResource(); await eventSubscriptionsDeleteForResourceGroup(); diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetDeliveryAttributesSample.ts index 65a928745078..55c56e538aa3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json */ -async function eventSubscriptionsGetDeliveryAttributes() { +async function eventSubscriptionsGetDeliveryAttributes(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -33,7 +31,7 @@ async function eventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await eventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetFullUrlSample.ts index c2e0d514c21c..07cde061ea95 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json */ -async function eventSubscriptionsGetFullUrlForCustomTopic() { +async function eventSubscriptionsGetFullUrlForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -39,7 +37,7 @@ async function eventSubscriptionsGetFullUrlForCustomTopic() { * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json */ -async function eventSubscriptionsGetFullUrlForResource() { +async function eventSubscriptionsGetFullUrlForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription1"; @@ -58,7 +56,7 @@ async function eventSubscriptionsGetFullUrlForResource() { * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json */ -async function eventSubscriptionsGetFullUrlForResourceGroup() { +async function eventSubscriptionsGetFullUrlForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -77,7 +75,7 @@ async function eventSubscriptionsGetFullUrlForResourceGroup() { * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json */ -async function eventSubscriptionsGetFullUrlForSubscription() { +async function eventSubscriptionsGetFullUrlForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const credential = new DefaultAzureCredential(); @@ -89,7 +87,7 @@ async function eventSubscriptionsGetFullUrlForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { await eventSubscriptionsGetFullUrlForCustomTopic(); await eventSubscriptionsGetFullUrlForResource(); await eventSubscriptionsGetFullUrlForResourceGroup(); diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetSample.ts index 4f9dbd059984..9731c5d351cf 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic.json */ -async function eventSubscriptionsGetForCustomTopic() { +async function eventSubscriptionsGetForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -39,7 +37,7 @@ async function eventSubscriptionsGetForCustomTopic() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ -async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination() { +async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -58,7 +56,7 @@ async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ -async function eventSubscriptionsGetForCustomTopicEventHubDestination() { +async function eventSubscriptionsGetForCustomTopicEventHubDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -77,7 +75,7 @@ async function eventSubscriptionsGetForCustomTopicEventHubDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ -async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination() { +async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -96,7 +94,7 @@ async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination() * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ -async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { +async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -115,7 +113,7 @@ async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ -async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { +async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -134,7 +132,7 @@ async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ -async function eventSubscriptionsGetForCustomTopicStorageQueueDestination() { +async function eventSubscriptionsGetForCustomTopicStorageQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -153,7 +151,7 @@ async function eventSubscriptionsGetForCustomTopicStorageQueueDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ -async function eventSubscriptionsGetForCustomTopicWebhookDestination() { +async function eventSubscriptionsGetForCustomTopicWebhookDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -172,7 +170,7 @@ async function eventSubscriptionsGetForCustomTopicWebhookDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResource.json */ -async function eventSubscriptionsGetForResource() { +async function eventSubscriptionsGetForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription1"; @@ -191,7 +189,7 @@ async function eventSubscriptionsGetForResource() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResourceGroup.json */ -async function eventSubscriptionsGetForResourceGroup() { +async function eventSubscriptionsGetForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -210,7 +208,7 @@ async function eventSubscriptionsGetForResourceGroup() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForSubscription.json */ -async function eventSubscriptionsGetForSubscription() { +async function eventSubscriptionsGetForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const credential = new DefaultAzureCredential(); @@ -222,7 +220,7 @@ async function eventSubscriptionsGetForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { await eventSubscriptionsGetForCustomTopic(); await eventSubscriptionsGetForCustomTopicAzureFunctionDestination(); await eventSubscriptionsGetForCustomTopicEventHubDestination(); diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByDomainTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByDomainTopicSample.ts index 517ee714e145..76afd792a09a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByDomainTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByDomainTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByDomainTopic.json */ -async function eventSubscriptionsListByDomainTopic() { +async function eventSubscriptionsListByDomainTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function eventSubscriptionsListByDomainTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListByDomainTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByResourceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByResourceSample.ts index 70f356af6f8b..54cc54881ad9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByResourceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListByResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific resource. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific resource. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByResource.json */ -async function eventSubscriptionsListByResource() { +async function eventSubscriptionsListByResource(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function eventSubscriptionsListByResource() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListByResource(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts index 073ac89f46e1..2c5a0e77b8c0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all global event subscriptions under a resource group for a specific topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all global event subscriptions under a resource group for a specific topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ -async function eventSubscriptionsListGlobalByResourceGroupForTopicType() { +async function eventSubscriptionsListGlobalByResourceGroupForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function eventSubscriptionsListGlobalByResourceGroupForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListGlobalByResourceGroupForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupSample.ts index c9d502996b7c..d39269759177 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all global event subscriptions under a specific Azure subscription and resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all global event subscriptions under a specific Azure subscription and resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json */ -async function eventSubscriptionsListGlobalByResourceGroup() { +async function eventSubscriptionsListGlobalByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function eventSubscriptionsListGlobalByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListGlobalByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts index 9a44058f0642..770a7cdc9b86 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all global event subscriptions under an Azure subscription for a topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all global event subscriptions under an Azure subscription for a topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ -async function eventSubscriptionsListGlobalBySubscriptionForTopicType() { +async function eventSubscriptionsListGlobalBySubscriptionForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function eventSubscriptionsListGlobalBySubscriptionForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListGlobalBySubscriptionForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionSample.ts index 961425063c08..11edea3eaafa 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListGlobalBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all aggregated global event subscriptions under a specific Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all aggregated global event subscriptions under a specific Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json */ -async function eventSubscriptionsListGlobalBySubscription() { +async function eventSubscriptionsListGlobalBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function eventSubscriptionsListGlobalBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListGlobalBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts index cceab97e4a59..8060a371cae5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ -async function eventSubscriptionsListRegionalByResourceGroupForTopicType() { +async function eventSubscriptionsListRegionalByResourceGroupForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function eventSubscriptionsListRegionalByResourceGroupForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListRegionalByResourceGroupForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupSample.ts index e2bcac137941..1270f422cb99 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription and resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription and resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroup.json */ -async function eventSubscriptionsListRegionalByResourceGroup() { +async function eventSubscriptionsListRegionalByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function eventSubscriptionsListRegionalByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListRegionalByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts index 0645f4be20e2..1c1af97d6660 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription and topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription and topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ -async function eventSubscriptionsListRegionalBySubscriptionForTopicType() { +async function eventSubscriptionsListRegionalBySubscriptionForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function eventSubscriptionsListRegionalBySubscriptionForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListRegionalBySubscriptionForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionSample.ts index 4bb52ce17f8d..684a81706064 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsListRegionalBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscription.json */ -async function eventSubscriptionsListRegionalBySubscription() { +async function eventSubscriptionsListRegionalBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function eventSubscriptionsListRegionalBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await eventSubscriptionsListRegionalBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsUpdateSample.ts index 1aa7ee7b4a51..44a79bc4de63 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/eventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json */ -async function eventSubscriptionsUpdateForCustomTopic() { +async function eventSubscriptionsUpdateForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -55,7 +53,7 @@ async function eventSubscriptionsUpdateForCustomTopic() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination() { +async function eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -93,7 +91,7 @@ async function eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination() * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicEventHubDestination() { +async function eventSubscriptionsUpdateForCustomTopicEventHubDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -126,7 +124,7 @@ async function eventSubscriptionsUpdateForCustomTopicEventHubDestination() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicHybridConnectionDestination() { +async function eventSubscriptionsUpdateForCustomTopicHybridConnectionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -159,7 +157,7 @@ async function eventSubscriptionsUpdateForCustomTopicHybridConnectionDestination * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination() { +async function eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -197,7 +195,7 @@ async function eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination( * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination() { +async function eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -230,7 +228,7 @@ async function eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination( * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicStorageQueueDestination() { +async function eventSubscriptionsUpdateForCustomTopicStorageQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -270,7 +268,7 @@ async function eventSubscriptionsUpdateForCustomTopicStorageQueueDestination() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicWebhookDestination() { +async function eventSubscriptionsUpdateForCustomTopicWebhookDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -302,7 +300,7 @@ async function eventSubscriptionsUpdateForCustomTopicWebhookDestination() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResource.json */ -async function eventSubscriptionsUpdateForResource() { +async function eventSubscriptionsUpdateForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription1"; @@ -334,7 +332,7 @@ async function eventSubscriptionsUpdateForResource() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json */ -async function eventSubscriptionsUpdateForResourceGroup() { +async function eventSubscriptionsUpdateForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -367,7 +365,7 @@ async function eventSubscriptionsUpdateForResourceGroup() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForSubscription.json */ -async function eventSubscriptionsUpdateForSubscription() { +async function eventSubscriptionsUpdateForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters = { @@ -392,7 +390,7 @@ async function eventSubscriptionsUpdateForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { await eventSubscriptionsUpdateForCustomTopic(); await eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination(); await eventSubscriptionsUpdateForCustomTopicEventHubDestination(); diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/extensionTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/extensionTopicsGetSample.ts index dc031871edef..f7a8099e241d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/extensionTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/extensionTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of an extension topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the properties of an extension topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ExtensionTopics_Get.json */ -async function extensionTopicsGet() { +async function extensionTopicsGet(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default"; const credential = new DefaultAzureCredential(); @@ -29,7 +27,7 @@ async function extensionTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { await extensionTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts index f4120ddb7e99..c81cba2117c4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Subscription, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. Existing event subscriptions will be updated with this API. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. Existing event subscriptions will be updated with this API. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ -async function namespaceTopicEventSubscriptionsCreateOrUpdate() { +async function namespaceTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -53,7 +51,7 @@ async function namespaceTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsDeleteSample.ts index 2b9387895ebf..53c81500629a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json */ -async function namespaceTopicEventSubscriptionsDelete() { +async function namespaceTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function namespaceTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts index 424159bfac97..edb1087c6bed 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function namespaceTopicEventSubscriptionsGetDeliveryAttributes() { +async function namespaceTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function namespaceTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetFullUrlSample.ts index efe85c0da2c5..3896c031e7bb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetFullUrl.json */ -async function namespaceTopicEventSubscriptionsGetFullUrl() { +async function namespaceTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function namespaceTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetSample.ts index 4f3ad9b0352a..a3df0a121b78 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json */ -async function namespaceTopicEventSubscriptionsGet() { +async function namespaceTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function namespaceTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts index 132892f4084b..695943915b26 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event subscriptions that belong to a specific namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event subscriptions that belong to a specific namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ -async function namespaceTopicEventSubscriptionsListByNamespaceTopic() { +async function namespaceTopicEventSubscriptionsListByNamespaceTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function namespaceTopicEventSubscriptionsListByNamespaceTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsListByNamespaceTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsUpdateSample.ts index 106664248faa..39a2d50e7474 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription of a namespace topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json */ -async function namespaceTopicEventSubscriptionsUpdate() { +async function namespaceTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -56,7 +54,7 @@ async function namespaceTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsCreateOrUpdateSample.ts index b1c8223fed77..a56f333f053b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new namespace topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new namespace topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_CreateOrUpdate.json */ -async function namespaceTopicsCreateOrUpdate() { +async function namespaceTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -47,7 +45,7 @@ async function namespaceTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsDeleteSample.ts index d6b8d8b32035..f430d5585eba 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Delete.json */ -async function namespaceTopicsDelete() { +async function namespaceTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function namespaceTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsGetSample.ts index 7fe03d3c126f..debba3e5b570 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Get.json */ -async function namespaceTopicsGet() { +async function namespaceTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e41"; @@ -38,7 +36,7 @@ async function namespaceTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListByNamespaceSample.ts index e35c12270e8b..5c5d03a74c38 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the namespace topics under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the namespace topics under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListByNamespace.json */ -async function namespaceTopicsListByNamespace() { +async function namespaceTopicsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function namespaceTopicsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await namespaceTopicsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListSharedAccessKeysSample.ts index cb93fd64f1cb..097ae7febbfe 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json */ -async function namespaceTopicsListSharedAccessKeys() { +async function namespaceTopicsListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function namespaceTopicsListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicsListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsRegenerateKeySample.ts index aa6bd3591eff..e9e56a85c03e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a namespace topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_RegenerateKey.json */ -async function namespaceTopicsRegenerateKey() { +async function namespaceTopicsRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function namespaceTopicsRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicsRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsUpdateSample.ts index 3f5b3230dfd2..bd5a6e13b0e4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespaceTopicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a namespace topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a namespace topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Update.json */ -async function namespaceTopicsUpdate() { +async function namespaceTopicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -45,7 +43,7 @@ async function namespaceTopicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await namespaceTopicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesCreateOrUpdateSample.ts index 13fe5a9e1031..bd981fcaec04 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Namespace, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates a new namespace with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates a new namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_CreateOrUpdate.json */ -async function namespacesCreateOrUpdate() { +async function namespacesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -46,7 +44,7 @@ async function namespacesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesDeleteSample.ts index 39e0376517c7..43390e6c9dfb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Delete.json */ -async function namespacesDelete() { +async function namespacesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function namespacesDelete() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesGetSample.ts index 476e76c3b2c8..e6986a377429 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Get.json */ -async function namespacesGet() { +async function namespacesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function namespacesGet() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListByResourceGroupSample.ts index c4f81a473fa4..2c35aee76491 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the namespaces under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the namespaces under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListByResourceGroup.json */ -async function namespacesListByResourceGroup() { +async function namespacesListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function namespacesListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await namespacesListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListBySubscriptionSample.ts index 1dd44af4bbaf..04bf7341af32 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the namespaces under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the namespaces under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListBySubscription.json */ -async function namespacesListBySubscription() { +async function namespacesListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function namespacesListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await namespacesListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListSharedAccessKeysSample.ts index e23f785fc4a7..c09de36aa48e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListSharedAccessKeys.json */ -async function namespacesListSharedAccessKeys() { +async function namespacesListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function namespacesListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesRegenerateKeySample.ts index 6f635f42344d..b427b1275fa4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a namespace. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_RegenerateKey.json */ -async function namespacesRegenerateKey() { +async function namespacesRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function namespacesRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesUpdateSample.ts index d4b729d7aaf2..3a80dee4bff8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a namespace with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Update.json */ -async function namespacesUpdate() { +async function namespacesUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function namespacesUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesValidateCustomDomainOwnershipSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesValidateCustomDomainOwnershipSample.ts index 22deb9e9125a..137e2ad9b840 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesValidateCustomDomainOwnershipSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/namespacesValidateCustomDomainOwnershipSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Performs ownership validation via checking TXT records for all custom domains in a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Performs ownership validation via checking TXT records for all custom domains in a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ValidateCustomDomainOwnership.json */ -async function namespacesValidateCustomDomainOwnership() { +async function namespacesValidateCustomDomainOwnership(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function namespacesValidateCustomDomainOwnership() { console.log(result); } -async function main() { +async function main(): Promise { await namespacesValidateCustomDomainOwnership(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts index c2564247786a..137584e0e94c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a specific network security perimeter configuration with a topic or domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get a specific network security perimeter configuration with a topic or domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json */ -async function networkSecurityPerimeterConfigurationsGet() { +async function networkSecurityPerimeterConfigurationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -42,7 +40,7 @@ async function networkSecurityPerimeterConfigurationsGet() { console.log(result); } -async function main() { +async function main(): Promise { await networkSecurityPerimeterConfigurationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts index 35743d472e48..24cc16ecf9a4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all network security perimeter configurations associated with a topic or domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all network security perimeter configurations associated with a topic or domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_List.json */ -async function networkSecurityPerimeterConfigurationsList() { +async function networkSecurityPerimeterConfigurationsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function networkSecurityPerimeterConfigurationsList() { console.log(resArray); } -async function main() { +async function main(): Promise { await networkSecurityPerimeterConfigurationsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts index f4c7b3e11f00..58f764acd87c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Reconcile.json */ -async function networkSecurityPerimeterConfigurationsReconcile() { +async function networkSecurityPerimeterConfigurationsReconcile(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function networkSecurityPerimeterConfigurationsReconcile() { console.log(result); } -async function main() { +async function main(): Promise { await networkSecurityPerimeterConfigurationsReconcile(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/operationsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/operationsListSample.ts index 1bc0341b1a8b..5f3563aee007 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/operationsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the available operations supported by the Microsoft.EventGrid resource provider. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the available operations supported by the Microsoft.EventGrid resource provider. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Operations_List.json */ -async function operationsList() { +async function operationsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -33,7 +31,7 @@ async function operationsList() { console.log(resArray); } -async function main() { +async function main(): Promise { await operationsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsAuthorizePartnerSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsAuthorizePartnerSample.ts index d5c296e1d59d..abb502e58922 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsAuthorizePartnerSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsAuthorizePartnerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Partner, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Authorize a single partner either by partner registration immutable Id or by partner name. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Authorize a single partner either by partner registration immutable Id or by partner name. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_AuthorizePartner.json */ -async function partnerConfigurationsAuthorizePartner() { +async function partnerConfigurationsAuthorizePartner(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function partnerConfigurationsAuthorizePartner() { console.log(result); } -async function main() { +async function main(): Promise { await partnerConfigurationsAuthorizePartner(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsCreateOrUpdateSample.ts index 0d2a4194936a..8968253805fc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously creates or updates a partner configuration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Synchronously creates or updates a partner configuration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json */ -async function partnerConfigurationsCreateOrUpdate() { +async function partnerConfigurationsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -61,7 +59,7 @@ async function partnerConfigurationsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerConfigurationsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsDeleteSample.ts index d0d9c7435a02..980d1ad33f33 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner configuration. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner configuration. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Delete.json */ -async function partnerConfigurationsDelete() { +async function partnerConfigurationsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerConfigurationsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await partnerConfigurationsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsGetSample.ts index ca668ced2a74..fbee0e94e423 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner configuration. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner configuration. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Get.json */ -async function partnerConfigurationsGet() { +async function partnerConfigurationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -32,7 +30,7 @@ async function partnerConfigurationsGet() { console.log(result); } -async function main() { +async function main(): Promise { await partnerConfigurationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListByResourceGroupSample.ts index 94670b554513..f12f0d85d67c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner configurations under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner configurations under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListByResourceGroup.json */ -async function partnerConfigurationsListByResourceGroup() { +async function partnerConfigurationsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerConfigurationsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerConfigurationsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListBySubscriptionSample.ts index 5906e539c9b6..774bca5967b5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner configurations under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner configurations under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListBySubscription.json */ -async function partnerConfigurationsListBySubscription() { +async function partnerConfigurationsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerConfigurationsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerConfigurationsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUnauthorizePartnerSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUnauthorizePartnerSample.ts index 8fd488239ed6..df092f643219 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUnauthorizePartnerSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUnauthorizePartnerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Partner, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Unauthorize a single partner either by partner registration immutable Id or by partner name. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Unauthorize a single partner either by partner registration immutable Id or by partner name. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json */ -async function partnerConfigurationsUnauthorizePartner() { +async function partnerConfigurationsUnauthorizePartner(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function partnerConfigurationsUnauthorizePartner() { console.log(result); } -async function main() { +async function main(): Promise { await partnerConfigurationsUnauthorizePartner(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUpdateSample.ts index 223086afd76c..0241fcdb7f9c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerConfigurationsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously updates a partner configuration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Synchronously updates a partner configuration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Update.json */ -async function partnerConfigurationsUpdate() { +async function partnerConfigurationsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerConfigurationsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerConfigurationsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsActivateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsActivateSample.ts index 553948c036b1..cceb9dbf3abd 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsActivateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsActivateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Activate a newly created partner destination. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Activate a newly created partner destination. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Activate.json */ -async function partnerDestinationsActivate() { +async function partnerDestinationsActivate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerDestinationsActivate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerDestinationsActivate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsCreateOrUpdateSample.ts index 1facce2aa090..5e5663cdf27e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new partner destination with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new partner destination with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_CreateOrUpdate.json */ -async function partnerDestinationsCreateOrUpdate() { +async function partnerDestinationsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -48,7 +46,7 @@ async function partnerDestinationsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerDestinationsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsDeleteSample.ts index 17262da6bf5a..b98b693f9707 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner destination. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner destination. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Delete.json */ -async function partnerDestinationsDelete() { +async function partnerDestinationsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerDestinationsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await partnerDestinationsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsGetSample.ts index bac63fc55575..0d79a03659ee 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner destination. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner destination. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Get.json */ -async function partnerDestinationsGet() { +async function partnerDestinationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerDestinationsGet() { console.log(result); } -async function main() { +async function main(): Promise { await partnerDestinationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListByResourceGroupSample.ts index 3103fc3a6b80..fe59f679e66a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner destinations under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner destinations under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListByResourceGroup.json */ -async function partnerDestinationsListByResourceGroup() { +async function partnerDestinationsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerDestinationsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerDestinationsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListBySubscriptionSample.ts index 0d8259a2e350..d9de25fbcf9e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner destinations under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner destinations under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListBySubscription.json */ -async function partnerDestinationsListBySubscription() { +async function partnerDestinationsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerDestinationsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerDestinationsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsUpdateSample.ts index 3f9d04e80232..a3251f071c66 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerDestinationsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a partner destination with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a partner destination with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Update.json */ -async function partnerDestinationsUpdate() { +async function partnerDestinationsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -42,7 +40,7 @@ async function partnerDestinationsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerDestinationsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesCreateOrUpdateSample.ts index ea86dd14f896..d491a2868318 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new partner namespace with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new partner namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json */ -async function partnerNamespacesCreateOrUpdate() { +async function partnerNamespacesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -46,7 +44,7 @@ async function partnerNamespacesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerNamespacesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesDeleteSample.ts index 4279dd9a3997..1e9e264978b9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Delete.json */ -async function partnerNamespacesDelete() { +async function partnerNamespacesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerNamespacesDelete() { console.log(result); } -async function main() { +async function main(): Promise { await partnerNamespacesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesGetSample.ts index 0936686a5ee7..95e3fa019800 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Get.json */ -async function partnerNamespacesGet() { +async function partnerNamespacesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerNamespacesGet() { console.log(result); } -async function main() { +async function main(): Promise { await partnerNamespacesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListByResourceGroupSample.ts index 3537e2d7a6fe..4962842abddd 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner namespaces under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner namespaces under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json */ -async function partnerNamespacesListByResourceGroup() { +async function partnerNamespacesListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerNamespacesListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerNamespacesListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListBySubscriptionSample.ts index 73741e25869f..79e5cd0bfd68 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner namespaces under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner namespaces under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListBySubscription.json */ -async function partnerNamespacesListBySubscription() { +async function partnerNamespacesListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerNamespacesListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerNamespacesListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListSharedAccessKeysSample.ts index c079f5ff90ad..af6b201ed7a3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json */ -async function partnerNamespacesListSharedAccessKeys() { +async function partnerNamespacesListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerNamespacesListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { await partnerNamespacesListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesRegenerateKeySample.ts index abd0e555506f..43abfb5e7ac9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a partner namespace. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_RegenerateKey.json */ -async function partnerNamespacesRegenerateKey() { +async function partnerNamespacesRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerNamespacesRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { await partnerNamespacesRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesUpdateSample.ts index 8a68e51e2bdf..378a92d5c449 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerNamespacesUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a partner namespace with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a partner namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Update.json */ -async function partnerNamespacesUpdate() { +async function partnerNamespacesUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerNamespacesUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerNamespacesUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsCreateOrUpdateSample.ts index 2497ac733d2d..92ef25852ef9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new partner registration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Creates a new partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json */ -async function partnerRegistrationsCreateOrUpdate() { +async function partnerRegistrationsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -44,7 +42,7 @@ async function partnerRegistrationsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerRegistrationsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsDeleteSample.ts index 50dbda601613..11b027e09839 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a partner registration with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Deletes a partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Delete.json */ -async function partnerRegistrationsDelete() { +async function partnerRegistrationsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerRegistrationsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await partnerRegistrationsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsGetSample.ts index 5b6d1a7ee314..f63c04e0a05f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a partner registration with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Gets a partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Get.json */ -async function partnerRegistrationsGet() { +async function partnerRegistrationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerRegistrationsGet() { console.log(result); } -async function main() { +async function main(): Promise { await partnerRegistrationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListByResourceGroupSample.ts index a60e814336de..ae9caae4a54f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner registrations under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner registrations under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json */ -async function partnerRegistrationsListByResourceGroup() { +async function partnerRegistrationsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerRegistrationsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerRegistrationsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListBySubscriptionSample.ts index 7daa1acafad2..0788a058dfac 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner registrations under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner registrations under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListBySubscription.json */ -async function partnerRegistrationsListBySubscription() { +async function partnerRegistrationsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerRegistrationsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerRegistrationsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsUpdateSample.ts index 9d9eb493988c..d90c7cb4c043 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerRegistrationsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates a partner registration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Updates a partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Update.json */ -async function partnerRegistrationsUpdate() { +async function partnerRegistrationsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -42,7 +40,7 @@ async function partnerRegistrationsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerRegistrationsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts index ce5be4a4bb0d..b57691a5c1bc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json */ -async function partnerTopicEventSubscriptionsCreateOrUpdate() { +async function partnerTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function partnerTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsDeleteSample.ts index 321ee8bebd2f..e9edaa5858c3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json */ -async function partnerTopicEventSubscriptionsDelete() { +async function partnerTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function partnerTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts index a5cd0cd6ff35..98ff873a94fc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function partnerTopicEventSubscriptionsGetDeliveryAttributes() { +async function partnerTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function partnerTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetFullUrlSample.ts index a630bbbc6275..015062f4b1c8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json */ -async function partnerTopicEventSubscriptionsGetFullUrl() { +async function partnerTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function partnerTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetSample.ts index d14b193ca752..d62abf258e9e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Get.json */ -async function partnerTopicEventSubscriptionsGet() { +async function partnerTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function partnerTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts index 6f808b516e5e..6d7bf8960a1f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event subscriptions that belong to a specific partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event subscriptions that belong to a specific partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ -async function partnerTopicEventSubscriptionsListByPartnerTopic() { +async function partnerTopicEventSubscriptionsListByPartnerTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function partnerTopicEventSubscriptionsListByPartnerTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsListByPartnerTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsUpdateSample.ts index 8e97badc421b..4367e60c120c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription of a partner topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Update.json */ -async function partnerTopicEventSubscriptionsUpdate() { +async function partnerTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function partnerTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsActivateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsActivateSample.ts index 493c6ba922c6..9bf3fb1ca195 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsActivateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsActivateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Activate a newly created partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Activate a newly created partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Activate.json */ -async function partnerTopicsActivate() { +async function partnerTopicsActivate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsActivate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicsActivate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsCreateOrUpdateSample.ts index 29324245982f..0c9dc8ff66eb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { PartnerTopic, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new partner topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates a new partner topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_CreateOrUpdate.json */ -async function partnerTopicsCreateOrUpdate() { +async function partnerTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -45,7 +43,7 @@ async function partnerTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeactivateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeactivateSample.ts index a50c336b7339..282fe3bb0230 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeactivateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeactivateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deactivate specific partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Deactivate specific partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Deactivate.json */ -async function partnerTopicsDeactivate() { +async function partnerTopicsDeactivate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsDeactivate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicsDeactivate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeleteSample.ts index acb7fef6a1fd..15f21eeb6c26 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Delete.json */ -async function partnerTopicsDelete() { +async function partnerTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsGetSample.ts index dd6c4ae4aea9..fd752aa91e65 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Get.json */ -async function partnerTopicsGet() { +async function partnerTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListByResourceGroupSample.ts index c97f968d8863..231adfcde4be 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner topics under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner topics under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListByResourceGroup.json */ -async function partnerTopicsListByResourceGroup() { +async function partnerTopicsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerTopicsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerTopicsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListBySubscriptionSample.ts index 1a89b8cb981a..2c67e01dc737 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner topics under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner topics under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListBySubscription.json */ -async function partnerTopicsListBySubscription() { +async function partnerTopicsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerTopicsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await partnerTopicsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsUpdateSample.ts index 0e12ad0c9948..25b61e3fcb68 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/partnerTopicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a partner topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a partner topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Update.json */ -async function partnerTopicsUpdate() { +async function partnerTopicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerTopicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await partnerTopicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsCreateOrUpdateSample.ts index bab1c73cab95..e0809dc419a8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a permission binding with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Create or update a permission binding with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_CreateOrUpdate.json */ -async function permissionBindingsCreateOrUpdate() { +async function permissionBindingsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -47,7 +45,7 @@ async function permissionBindingsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await permissionBindingsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsDeleteSample.ts index 9c4f2b6e04a4..b43ec590a9a4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing permission binding. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing permission binding. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_Delete.json */ -async function permissionBindingsDelete() { +async function permissionBindingsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function permissionBindingsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await permissionBindingsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsGetSample.ts index aeab5197c0fd..d9fa059a583d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a permission binding. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a permission binding. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_Get.json */ -async function permissionBindingsGet() { +async function permissionBindingsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function permissionBindingsGet() { console.log(result); } -async function main() { +async function main(): Promise { await permissionBindingsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsListByNamespaceSample.ts index bc5aaa2c8aaa..96bec6742032 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/permissionBindingsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the permission bindings under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the permission bindings under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_ListByNamespace.json */ -async function permissionBindingsListByNamespace() { +async function permissionBindingsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function permissionBindingsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await permissionBindingsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsDeleteSample.ts index e0abcb7b172f..91902da92b46 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete.json */ -async function privateEndpointConnectionsDelete() { +async function privateEndpointConnectionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateEndpointConnectionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await privateEndpointConnectionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsGetSample.ts index fd2e0d76e3b6..1b683d273e8d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get.json */ -async function privateEndpointConnectionsGet() { +async function privateEndpointConnectionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateEndpointConnectionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await privateEndpointConnectionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsListByResourceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsListByResourceSample.ts index 0f17f51fa14a..437ffbfa085a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsListByResourceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsListByResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all private endpoint connections under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_ListByResource.json */ -async function privateEndpointConnectionsListByResource() { +async function privateEndpointConnectionsListByResource(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateEndpointConnectionsListByResource() { console.log(resArray); } -async function main() { +async function main(): Promise { await privateEndpointConnectionsListByResource(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsUpdateSample.ts index 94f245a976e2..2cd2e266579c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/privateEndpointConnectionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update a specific private endpoint connection under a topic, domain or partner namespace. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update a specific private endpoint connection under a topic, domain or partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Update.json */ -async function privateEndpointConnectionsUpdate() { +async function privateEndpointConnectionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -52,7 +50,7 @@ async function privateEndpointConnectionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await privateEndpointConnectionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesGetSample.ts index 3c71a7c135cf..6d2161e3ff16 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a private link resource. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a private link resource. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_Get.json */ -async function privateLinkResourcesGet() { +async function privateLinkResourcesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function privateLinkResourcesGet() { console.log(result); } -async function main() { +async function main(): Promise { await privateLinkResourcesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesListByResourceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesListByResourceSample.ts index b3b961dabb0b..58c2e25b44ab 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesListByResourceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/privateLinkResourcesListByResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the private link resources under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the private link resources under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByResource.json */ -async function privateLinkResourcesListByResource() { +async function privateLinkResourcesListByResource(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateLinkResourcesListByResource() { console.log(resArray); } -async function main() { +async function main(): Promise { await privateLinkResourcesListByResource(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsCreateOrUpdateSample.ts index b9c761f54482..f97c18e02d15 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates an event subscription with the specified parameters. Existing event subscriptions will be updated with this API. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates or updates an event subscription with the specified parameters. Existing event subscriptions will be updated with this API. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json */ -async function systemTopicEventSubscriptionsCreateOrUpdate() { +async function systemTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function systemTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsDeleteSample.ts index 16617bc86ad5..c7ffb416a5ec 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription of a system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Delete.json */ -async function systemTopicEventSubscriptionsDelete() { +async function systemTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function systemTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts index a89b8b9044c5..ca3d8f01297c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function systemTopicEventSubscriptionsGetDeliveryAttributes() { +async function systemTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function systemTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetFullUrlSample.ts index 90affc21b6ef..f359572198a5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription of a system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json */ -async function systemTopicEventSubscriptionsGetFullUrl() { +async function systemTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function systemTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetSample.ts index 30b5a141f288..7b6f54a26b3e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Get.json */ -async function systemTopicEventSubscriptionsGet() { +async function systemTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function systemTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsListBySystemTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsListBySystemTopicSample.ts index b86c27ac985a..88eb3f0eceec 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsListBySystemTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsListBySystemTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event subscriptions that belong to a specific system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event subscriptions that belong to a specific system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json */ -async function systemTopicEventSubscriptionsListBySystemTopic() { +async function systemTopicEventSubscriptionsListBySystemTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function systemTopicEventSubscriptionsListBySystemTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsListBySystemTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsUpdateSample.ts index b450537eab35..90377edaf22b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription of a system topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Update.json */ -async function systemTopicEventSubscriptionsUpdate() { +async function systemTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function systemTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsCreateOrUpdateSample.ts index fe3e5b2e36ec..f3f85f88ddbc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { SystemTopic, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new system topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates a new system topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_CreateOrUpdate.json */ -async function systemTopicsCreateOrUpdate() { +async function systemTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -44,7 +42,7 @@ async function systemTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsDeleteSample.ts index 70549e02e868..e9d20a30cbb5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Delete.json */ -async function systemTopicsDelete() { +async function systemTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function systemTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsGetSample.ts index 144c74e9fad9..9e85d208181d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Get.json */ -async function systemTopicsGet() { +async function systemTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function systemTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListByResourceGroupSample.ts index c99a423c9b29..742de727fdb3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the system topics under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the system topics under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListByResourceGroup.json */ -async function systemTopicsListByResourceGroup() { +async function systemTopicsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function systemTopicsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await systemTopicsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListBySubscriptionSample.ts index 79d258fcd091..1cb9c0d458db 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the system topics under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the system topics under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListBySubscription.json */ -async function systemTopicsListBySubscription() { +async function systemTopicsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function systemTopicsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await systemTopicsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsUpdateSample.ts index 9a8149cbb7a0..728660bd6662 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/systemTopicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a system topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a system topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Update.json */ -async function systemTopicsUpdate() { +async function systemTopicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function systemTopicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await systemTopicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsCreateOrUpdateSample.ts index f4a0079dd7dc..8528258bce11 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_CreateOrUpdate.json */ -async function topicEventSubscriptionsCreateOrUpdate() { +async function topicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function topicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsDeleteSample.ts index 216c05114b86..17c47cfedfdc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription for a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Delete.json */ -async function topicEventSubscriptionsDelete() { +async function topicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetDeliveryAttributesSample.ts index 6eabe734333c..1ee5fe1c404f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription for topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription for topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json */ -async function topicEventSubscriptionsGetDeliveryAttributes() { +async function topicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetFullUrlSample.ts index 44e72272cdc1..971a6a222e26 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription for topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription for topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json */ -async function topicEventSubscriptionsGetFullUrl() { +async function topicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetSample.ts index 61872838562c..b09e5412278c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Get.json */ -async function topicEventSubscriptionsGet() { +async function topicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsListSample.ts index 013efb480c23..c57f40f38472 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_List.json */ -async function topicEventSubscriptionsList() { +async function topicEventSubscriptionsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function topicEventSubscriptionsList() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsUpdateSample.ts index faf824f8f258..219b184a80c5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription for a topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Update.json */ -async function topicEventSubscriptionsUpdate() { +async function topicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function topicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await topicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesCreateOrUpdateSample.ts index 0bd53a8cf2b9..77b7690c13b2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { TopicSpace, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a topic space with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a topic space with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json */ -async function topicSpacesCreateOrUpdate() { +async function topicSpacesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function topicSpacesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await topicSpacesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesDeleteSample.ts index 93f92c9403c5..dc1d3befddb7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing topic space. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing topic space. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Delete.json */ -async function topicSpacesDelete() { +async function topicSpacesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicSpacesDelete() { console.log(result); } -async function main() { +async function main(): Promise { await topicSpacesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesGetSample.ts index 3cb27878ac8d..3db6a1682468 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a topic space. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a topic space. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Get.json */ -async function topicSpacesGet() { +async function topicSpacesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicSpacesGet() { console.log(result); } -async function main() { +async function main(): Promise { await topicSpacesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesListByNamespaceSample.ts index 27f39eda7f1c..48f219d19a80 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicSpacesListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the topic spaces under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the topic spaces under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_ListByNamespace.json */ -async function topicSpacesListByNamespace() { +async function topicSpacesListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function topicSpacesListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicSpacesListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesGetSample.ts index b251421859c7..7e293a7ff98a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get information about a topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get information about a topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_Get.json */ -async function topicTypesGet() { +async function topicTypesGet(): Promise { const topicTypeName = "Microsoft.Storage.StorageAccounts"; const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); @@ -28,7 +26,7 @@ async function topicTypesGet() { console.log(result); } -async function main() { +async function main(): Promise { await topicTypesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListEventTypesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListEventTypesSample.ts index ab366b8cc548..cb461619029b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListEventTypesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListEventTypesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event types for a topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event types for a topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_ListEventTypes.json */ -async function topicTypesListEventTypes() { +async function topicTypesListEventTypes(): Promise { const topicTypeName = "Microsoft.Storage.StorageAccounts"; const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); @@ -31,7 +29,7 @@ async function topicTypesListEventTypes() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicTypesListEventTypes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListSample.ts index bb765d798840..9da023eaf53f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicTypesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all registered topic types. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all registered topic types. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_List.json */ -async function topicTypesList() { +async function topicTypesList(): Promise { const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); const resArray = new Array(); @@ -30,7 +28,7 @@ async function topicTypesList() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicTypesList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsCreateOrUpdateSample.ts index 44f2f7fcb6ad..6fb5df969d24 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Topic, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates a new topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdate.json */ -async function topicsCreateOrUpdate() { +async function topicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -52,7 +50,7 @@ async function topicsCreateOrUpdate() { * @summary Asynchronously creates a new topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json */ -async function topicsCreateOrUpdateForAzureArc() { +async function topicsCreateOrUpdateForAzureArc(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -79,7 +77,7 @@ async function topicsCreateOrUpdateForAzureArc() { console.log(result); } -async function main() { +async function main(): Promise { await topicsCreateOrUpdate(); await topicsCreateOrUpdateForAzureArc(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsDeleteSample.ts index 7d62b6e499fe..d769acd5a11f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Delete.json */ -async function topicsDelete() { +async function topicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function topicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { await topicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsGetSample.ts index 6007c8da9600..838cbd820e8d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Get.json */ -async function topicsGet() { +async function topicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function topicsGet() { console.log(result); } -async function main() { +async function main(): Promise { await topicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListByResourceGroupSample.ts index 716e01cdc307..0e5ccb610603 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the topics under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the topics under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListByResourceGroup.json */ -async function topicsListByResourceGroup() { +async function topicsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -35,7 +33,7 @@ async function topicsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListBySubscriptionSample.ts index 10717caeb04a..97ffa760bbf6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the topics under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the topics under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListBySubscription.json */ -async function topicsListBySubscription() { +async function topicsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function topicsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListEventTypesSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListEventTypesSample.ts index 3799511654b7..7171bbb492d8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListEventTypesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListEventTypesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event types for a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event types for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListEventTypes.json */ -async function topicsListEventTypes() { +async function topicsListEventTypes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function topicsListEventTypes() { console.log(resArray); } -async function main() { +async function main(): Promise { await topicsListEventTypes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListSharedAccessKeysSample.ts index 4339b35a9ca9..ef6f85bd024c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListSharedAccessKeys.json */ -async function topicsListSharedAccessKeys() { +async function topicsListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function topicsListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { await topicsListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsRegenerateKeySample.ts index 543767eb7215..6227198057ba 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_RegenerateKey.json */ -async function topicsRegenerateKey() { +async function topicsRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function topicsRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { await topicsRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsUpdateSample.ts index 231fbd44cc88..9e2c8e217b27 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/topicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/topicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Update.json */ -async function topicsUpdate() { +async function topicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -48,7 +46,7 @@ async function topicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { await topicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersGetSample.ts index 5ce55b4ddfa1..8dc54f848177 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a verified partner. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a verified partner. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/VerifiedPartners_Get.json */ -async function verifiedPartnersGet() { +async function verifiedPartnersGet(): Promise { const verifiedPartnerName = "Contoso.Finance"; const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); @@ -28,7 +26,7 @@ async function verifiedPartnersGet() { console.log(result); } -async function main() { +async function main(): Promise { await verifiedPartnersGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersListSample.ts b/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersListSample.ts index eb2ba923f612..0fe754f3ee98 100644 --- a/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples-dev/verifiedPartnersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of all verified partners. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get a list of all verified partners. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/VerifiedPartners_List.json */ -async function verifiedPartnersList() { +async function verifiedPartnersList(): Promise { const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); const resArray = new Array(); @@ -30,7 +28,7 @@ async function verifiedPartnersList() { console.log(resArray); } -async function main() { +async function main(): Promise { await verifiedPartnersList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesCreateOrUpdateSample.ts index 22a723d65654..d753bb0606a6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { CaCertificate, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a CA certificate with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a CA certificate with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_CreateOrUpdate.json */ -async function caCertificatesCreateOrUpdate() { +async function caCertificatesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function caCertificatesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { caCertificatesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesDeleteSample.ts index add655935400..8626e14ca9a0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing CA certificate. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing CA certificate. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_Delete.json */ -async function caCertificatesDelete() { +async function caCertificatesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function caCertificatesDelete() { console.log(result); } -async function main() { +async function main(): Promise { caCertificatesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesGetSample.ts index 251eae96e143..7f1d71d30837 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a CA certificate. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a CA certificate. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_Get.json */ -async function caCertificatesGet() { +async function caCertificatesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function caCertificatesGet() { console.log(result); } -async function main() { +async function main(): Promise { caCertificatesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesListByNamespaceSample.ts index e2e74abfaea0..df67c24d36b7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/caCertificatesListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the CA certificates under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the CA certificates under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/CaCertificates_ListByNamespace.json */ -async function caCertificatesListByNamespace() { +async function caCertificatesListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function caCertificatesListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { caCertificatesListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsCreateOrUpdateSample.ts index 9f224697a60d..fb6c75ebbed7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Channel, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously creates or updates a new channel with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Synchronously creates or updates a new channel with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_CreateOrUpdate.json */ -async function channelsCreateOrUpdate() { +async function channelsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -50,7 +48,7 @@ async function channelsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { channelsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsDeleteSample.ts index d7d4ee880c0c..1525f6e0c648 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing channel. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing channel. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Delete.json */ -async function channelsDelete() { +async function channelsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function channelsDelete() { console.log(result); } -async function main() { +async function main(): Promise { channelsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetFullUrlSample.ts index 9224ad11c896..e2a3bf44c0c5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL of a partner destination channel. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL of a partner destination channel. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_GetFullUrl.json */ -async function channelsGetFullUrl() { +async function channelsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function channelsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { channelsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetSample.ts index ed64cedae0d6..af206378c324 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a channel. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a channel. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Get.json */ -async function channelsGet() { +async function channelsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function channelsGet() { console.log(result); } -async function main() { +async function main(): Promise { channelsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsListByPartnerNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsListByPartnerNamespaceSample.ts index cbb6c685af79..294426dfb7b2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsListByPartnerNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsListByPartnerNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the channels in a partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the channels in a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_ListByPartnerNamespace.json */ -async function channelsListByPartnerNamespace() { +async function channelsListByPartnerNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function channelsListByPartnerNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { channelsListByPartnerNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsUpdateSample.ts index 721dd13ec839..e05d771d9a6f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/channelsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously updates a channel with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Synchronously updates a channel with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Channels_Update.json */ -async function channelsUpdate() { +async function channelsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -45,7 +43,7 @@ async function channelsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { channelsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsCreateOrUpdateSample.ts index c79217dc58d2..45c8bb4dd287 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { ClientGroup, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a client group with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a client group with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_CreateOrUpdate.json */ -async function clientGroupsCreateOrUpdate() { +async function clientGroupsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function clientGroupsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { clientGroupsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsDeleteSample.ts index e0b68fddfcc3..89a685ffb9d1 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing client group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing client group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Delete.json */ -async function clientGroupsDelete() { +async function clientGroupsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientGroupsDelete() { console.log(result); } -async function main() { +async function main(): Promise { clientGroupsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsGetSample.ts index 5307f0e44740..fc36375d6217 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a client group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a client group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_Get.json */ -async function clientGroupsGet() { +async function clientGroupsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientGroupsGet() { console.log(result); } -async function main() { +async function main(): Promise { clientGroupsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsListByNamespaceSample.ts index 7587d368751e..31613932c6b3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientGroupsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the client groups under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the client groups under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ClientGroups_ListByNamespace.json */ -async function clientGroupsListByNamespace() { +async function clientGroupsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function clientGroupsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { clientGroupsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsCreateOrUpdateSample.ts index f66dc8f57a41..d41c10439b4d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Client, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a client with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a client with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_CreateOrUpdate.json */ -async function clientsCreateOrUpdate() { +async function clientsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -47,7 +45,7 @@ async function clientsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { clientsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsDeleteSample.ts index 729e9aa285ca..1042a07ebbae 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing client. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing client. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Delete.json */ -async function clientsDelete() { +async function clientsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientsDelete() { console.log(result); } -async function main() { +async function main(): Promise { clientsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsGetSample.ts index 45dcafef775d..bd82698c443a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a client. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a client. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_Get.json */ -async function clientsGet() { +async function clientsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function clientsGet() { console.log(result); } -async function main() { +async function main(): Promise { clientsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsListByNamespaceSample.ts index be285b63b1d0..6a94e857aab4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/clientsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the permission bindings under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the permission bindings under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Clients_ListByNamespace.json */ -async function clientsListByNamespace() { +async function clientsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function clientsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { clientsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsCreateOrUpdateSample.ts index a7d34f448f35..95f004470795 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_CreateOrUpdate.json */ -async function domainEventSubscriptionsCreateOrUpdate() { +async function domainEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function domainEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsDeleteSample.ts index d0aca889ca64..fe833236aad9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription for a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription for a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Delete.json */ -async function domainEventSubscriptionsDelete() { +async function domainEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { domainEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetDeliveryAttributesSample.ts index 9786314319ce..eb3561615bbe 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription for domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription for domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetDeliveryAttributes.json */ -async function domainEventSubscriptionsGetDeliveryAttributes() { +async function domainEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { domainEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetFullUrlSample.ts index 2662d845247d..deaeeaab328b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription for domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription for domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_GetFullUrl.json */ -async function domainEventSubscriptionsGetFullUrl() { +async function domainEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { domainEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetSample.ts index 543310d85356..311abb0ed193 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Get.json */ -async function domainEventSubscriptionsGet() { +async function domainEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { domainEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsListSample.ts index 0c8be85b608a..fa8e1ddd1ff7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_List.json */ -async function domainEventSubscriptionsList() { +async function domainEventSubscriptionsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function domainEventSubscriptionsList() { console.log(resArray); } -async function main() { +async function main(): Promise { domainEventSubscriptionsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsUpdateSample.ts index 660aefdbf380..3646f1b8645b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription for a topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainEventSubscriptions_Update.json */ -async function domainEventSubscriptionsUpdate() { +async function domainEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function domainEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsCreateOrUpdateSample.ts index 3937941728ce..1e8055ebf1c8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_CreateOrUpdate.json */ -async function domainTopicEventSubscriptionsCreateOrUpdate() { +async function domainTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -56,7 +54,7 @@ async function domainTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsDeleteSample.ts index 66699e440664..54c02918c0f3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a nested existing event subscription for a domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete a nested existing event subscription for a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Delete.json */ -async function domainTopicEventSubscriptionsDelete() { +async function domainTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function domainTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts index 10410c3c8ec2..01225a596d6d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription for domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription for domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function domainTopicEventSubscriptionsGetDeliveryAttributes() { +async function domainTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function domainTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetFullUrlSample.ts index bf1031b9ce16..ab85142b988a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for a nested event subscription for domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for a nested event subscription for domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_GetFullUrl.json */ -async function domainTopicEventSubscriptionsGetFullUrl() { +async function domainTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function domainTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetSample.ts index 710a9abf0a31..9423c57a6e89 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a nested event subscription for a domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a nested event subscription for a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Get.json */ -async function domainTopicEventSubscriptionsGet() { +async function domainTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function domainTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsListSample.ts index 10d307c7b0d3..17fb1f6cdefb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_List.json */ -async function domainTopicEventSubscriptionsList() { +async function domainTopicEventSubscriptionsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function domainTopicEventSubscriptionsList() { console.log(resArray); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsUpdateSample.ts index 9e135fe694dc..5ba40d5541d7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription for a domain topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription for a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopicEventSubscriptions_Update.json */ -async function domainTopicEventSubscriptionsUpdate() { +async function domainTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -56,7 +54,7 @@ async function domainTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsCreateOrUpdateSample.ts index 6df75abcc622..c3ae6227768e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates a new domain topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates a new domain topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_CreateOrUpdate.json */ -async function domainTopicsCreateOrUpdate() { +async function domainTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsDeleteSample.ts index 48d74ea463a5..aa124826f035 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Delete.json */ -async function domainTopicsDelete() { +async function domainTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsGetSample.ts index 2963efda5092..00c6a917aa2b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_Get.json */ -async function domainTopicsGet() { +async function domainTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function domainTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { domainTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsListByDomainSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsListByDomainSample.ts index 7308d2882386..1b06a7ce1622 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsListByDomainSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainTopicsListByDomainSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the topics in a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the topics in a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/DomainTopics_ListByDomain.json */ -async function domainTopicsListByDomain() { +async function domainTopicsListByDomain(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function domainTopicsListByDomain() { console.log(resArray); } -async function main() { +async function main(): Promise { domainTopicsListByDomain(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsCreateOrUpdateSample.ts index b4b2925fc6b1..7d2a9466dd69 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Domain, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates a new domain with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates a new domain with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_CreateOrUpdate.json */ -async function domainsCreateOrUpdate() { +async function domainsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -46,7 +44,7 @@ async function domainsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsDeleteSample.ts index 2bae0862bf7f..db252e2b0fa7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Delete.json */ -async function domainsDelete() { +async function domainsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function domainsDelete() { console.log(result); } -async function main() { +async function main(): Promise { domainsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsGetSample.ts index fdf1891d42ef..7accfa3770ce 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Get.json */ -async function domainsGet() { +async function domainsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function domainsGet() { console.log(result); } -async function main() { +async function main(): Promise { domainsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListByResourceGroupSample.ts index 01aa1e56aa45..c489a81fbc68 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the domains under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the domains under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListByResourceGroup.json */ -async function domainsListByResourceGroup() { +async function domainsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function domainsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { domainsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListBySubscriptionSample.ts index 9c2fccf2e306..3766ab488fbd 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the domains under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the domains under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListBySubscription.json */ -async function domainsListBySubscription() { +async function domainsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function domainsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { domainsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListSharedAccessKeysSample.ts index 72f3b1046aa2..debd65318809 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_ListSharedAccessKeys.json */ -async function domainsListSharedAccessKeys() { +async function domainsListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function domainsListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { domainsListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsRegenerateKeySample.ts index c3f152cd8507..01fff87b21cf 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a domain. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_RegenerateKey.json */ -async function domainsRegenerateKey() { +async function domainsRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function domainsRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { domainsRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsUpdateSample.ts index 3ae875a3ee23..be01e2c0cb7d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/domainsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a domain with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a domain with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Domains_Update.json */ -async function domainsUpdate() { +async function domainsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -48,7 +46,7 @@ async function domainsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { domainsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsCreateOrUpdateSample.ts index caf12fe977ad..dc791691f2a5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopic() { +async function eventSubscriptionsCreateOrUpdateForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -55,7 +53,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopic() { * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_AzureFunctionDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -93,7 +91,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestin * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_EventHubDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -131,7 +129,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_HybridConnectionDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -169,7 +167,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicHybridConnectionDes * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusQueueDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -207,7 +205,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusQueueDest * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_ServiceBusTopicDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -245,7 +243,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicServiceBusTopicDest * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_StorageQueueDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -285,7 +283,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicStorageQueueDestina * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForCustomTopic_WebhookDestination.json */ -async function eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination() { +async function eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -317,7 +315,7 @@ async function eventSubscriptionsCreateOrUpdateForCustomTopicWebhookDestination( * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResource.json */ -async function eventSubscriptionsCreateOrUpdateForResource() { +async function eventSubscriptionsCreateOrUpdateForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription10"; @@ -348,7 +346,7 @@ async function eventSubscriptionsCreateOrUpdateForResource() { * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForResourceGroup.json */ -async function eventSubscriptionsCreateOrUpdateForResourceGroup() { +async function eventSubscriptionsCreateOrUpdateForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -379,7 +377,7 @@ async function eventSubscriptionsCreateOrUpdateForResourceGroup() { * @summary Asynchronously creates a new event subscription or updates an existing event subscription based on the specified scope. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_CreateOrUpdateForSubscription.json */ -async function eventSubscriptionsCreateOrUpdateForSubscription() { +async function eventSubscriptionsCreateOrUpdateForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const eventSubscriptionInfo: EventSubscription = { @@ -399,7 +397,7 @@ async function eventSubscriptionsCreateOrUpdateForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { eventSubscriptionsCreateOrUpdateForCustomTopic(); eventSubscriptionsCreateOrUpdateForCustomTopicAzureFunctionDestination(); eventSubscriptionsCreateOrUpdateForCustomTopicEventHubDestination(); diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsDeleteSample.ts index 354ee74ccb9b..7a4b0c1f05dd 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForCustomTopic.json */ -async function eventSubscriptionsDeleteForCustomTopic() { +async function eventSubscriptionsDeleteForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -39,7 +37,7 @@ async function eventSubscriptionsDeleteForCustomTopic() { * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResource.json */ -async function eventSubscriptionsDeleteForResource() { +async function eventSubscriptionsDeleteForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription10"; @@ -58,7 +56,7 @@ async function eventSubscriptionsDeleteForResource() { * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForResourceGroup.json */ -async function eventSubscriptionsDeleteForResourceGroup() { +async function eventSubscriptionsDeleteForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -77,7 +75,7 @@ async function eventSubscriptionsDeleteForResourceGroup() { * @summary Delete an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_DeleteForSubscription.json */ -async function eventSubscriptionsDeleteForSubscription() { +async function eventSubscriptionsDeleteForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const credential = new DefaultAzureCredential(); @@ -89,7 +87,7 @@ async function eventSubscriptionsDeleteForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { eventSubscriptionsDeleteForCustomTopic(); eventSubscriptionsDeleteForResource(); eventSubscriptionsDeleteForResourceGroup(); diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetDeliveryAttributesSample.ts index 0419e28efb68..3f276bf15ad5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetDeliveryAttributes.json */ -async function eventSubscriptionsGetDeliveryAttributes() { +async function eventSubscriptionsGetDeliveryAttributes(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -33,7 +31,7 @@ async function eventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { eventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetFullUrlSample.ts index 53143fd74e01..c370703b266f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForCustomTopic.json */ -async function eventSubscriptionsGetFullUrlForCustomTopic() { +async function eventSubscriptionsGetFullUrlForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -39,7 +37,7 @@ async function eventSubscriptionsGetFullUrlForCustomTopic() { * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResource.json */ -async function eventSubscriptionsGetFullUrlForResource() { +async function eventSubscriptionsGetFullUrlForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription1"; @@ -58,7 +56,7 @@ async function eventSubscriptionsGetFullUrlForResource() { * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForResourceGroup.json */ -async function eventSubscriptionsGetFullUrlForResourceGroup() { +async function eventSubscriptionsGetFullUrlForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -77,7 +75,7 @@ async function eventSubscriptionsGetFullUrlForResourceGroup() { * @summary Get the full endpoint URL for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetFullUrlForSubscription.json */ -async function eventSubscriptionsGetFullUrlForSubscription() { +async function eventSubscriptionsGetFullUrlForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const credential = new DefaultAzureCredential(); @@ -89,7 +87,7 @@ async function eventSubscriptionsGetFullUrlForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { eventSubscriptionsGetFullUrlForCustomTopic(); eventSubscriptionsGetFullUrlForResource(); eventSubscriptionsGetFullUrlForResourceGroup(); diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetSample.ts index d57d12ca62d8..ba60c9e71e3b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic.json */ -async function eventSubscriptionsGetForCustomTopic() { +async function eventSubscriptionsGetForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -39,7 +37,7 @@ async function eventSubscriptionsGetForCustomTopic() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_AzureFunctionDestination.json */ -async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination() { +async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -58,7 +56,7 @@ async function eventSubscriptionsGetForCustomTopicAzureFunctionDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_EventHubDestination.json */ -async function eventSubscriptionsGetForCustomTopicEventHubDestination() { +async function eventSubscriptionsGetForCustomTopicEventHubDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -77,7 +75,7 @@ async function eventSubscriptionsGetForCustomTopicEventHubDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_HybridConnectionDestination.json */ -async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination() { +async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -96,7 +94,7 @@ async function eventSubscriptionsGetForCustomTopicHybridConnectionDestination() * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusQueueDestination.json */ -async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { +async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -115,7 +113,7 @@ async function eventSubscriptionsGetForCustomTopicServiceBusQueueDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_ServiceBusTopicDestination.json */ -async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { +async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -134,7 +132,7 @@ async function eventSubscriptionsGetForCustomTopicServiceBusTopicDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_StorageQueueDestination.json */ -async function eventSubscriptionsGetForCustomTopicStorageQueueDestination() { +async function eventSubscriptionsGetForCustomTopicStorageQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -153,7 +151,7 @@ async function eventSubscriptionsGetForCustomTopicStorageQueueDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForCustomTopic_WebhookDestination.json */ -async function eventSubscriptionsGetForCustomTopicWebhookDestination() { +async function eventSubscriptionsGetForCustomTopicWebhookDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -172,7 +170,7 @@ async function eventSubscriptionsGetForCustomTopicWebhookDestination() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResource.json */ -async function eventSubscriptionsGetForResource() { +async function eventSubscriptionsGetForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription1"; @@ -191,7 +189,7 @@ async function eventSubscriptionsGetForResource() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForResourceGroup.json */ -async function eventSubscriptionsGetForResourceGroup() { +async function eventSubscriptionsGetForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -210,7 +208,7 @@ async function eventSubscriptionsGetForResourceGroup() { * @summary Get properties of an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_GetForSubscription.json */ -async function eventSubscriptionsGetForSubscription() { +async function eventSubscriptionsGetForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const credential = new DefaultAzureCredential(); @@ -222,7 +220,7 @@ async function eventSubscriptionsGetForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { eventSubscriptionsGetForCustomTopic(); eventSubscriptionsGetForCustomTopicAzureFunctionDestination(); eventSubscriptionsGetForCustomTopicEventHubDestination(); diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByDomainTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByDomainTopicSample.ts index 54ac860449eb..307484845f0b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByDomainTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByDomainTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific domain topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific domain topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByDomainTopic.json */ -async function eventSubscriptionsListByDomainTopic() { +async function eventSubscriptionsListByDomainTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function eventSubscriptionsListByDomainTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListByDomainTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByResourceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByResourceSample.ts index e7ce5c890b6b..6b406ebbee57 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByResourceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListByResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific resource. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific resource. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListByResource.json */ -async function eventSubscriptionsListByResource() { +async function eventSubscriptionsListByResource(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function eventSubscriptionsListByResource() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListByResource(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts index 3ff610367f76..83bbad901807 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all global event subscriptions under a resource group for a specific topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all global event subscriptions under a resource group for a specific topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroupForTopicType.json */ -async function eventSubscriptionsListGlobalByResourceGroupForTopicType() { +async function eventSubscriptionsListGlobalByResourceGroupForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function eventSubscriptionsListGlobalByResourceGroupForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListGlobalByResourceGroupForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupSample.ts index 199389409bf6..a5cab80ae389 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all global event subscriptions under a specific Azure subscription and resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all global event subscriptions under a specific Azure subscription and resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalByResourceGroup.json */ -async function eventSubscriptionsListGlobalByResourceGroup() { +async function eventSubscriptionsListGlobalByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function eventSubscriptionsListGlobalByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListGlobalByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts index 7390a33817d8..02298961c1ef 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all global event subscriptions under an Azure subscription for a topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all global event subscriptions under an Azure subscription for a topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscriptionForTopicType.json */ -async function eventSubscriptionsListGlobalBySubscriptionForTopicType() { +async function eventSubscriptionsListGlobalBySubscriptionForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function eventSubscriptionsListGlobalBySubscriptionForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListGlobalBySubscriptionForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionSample.ts index a60d0f958a4c..29785501a896 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListGlobalBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all aggregated global event subscriptions under a specific Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all aggregated global event subscriptions under a specific Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListGlobalBySubscription.json */ -async function eventSubscriptionsListGlobalBySubscription() { +async function eventSubscriptionsListGlobalBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function eventSubscriptionsListGlobalBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListGlobalBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts index 602c433d3365..987bb3ce2494 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription and resource group and topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroupForTopicType.json */ -async function eventSubscriptionsListRegionalByResourceGroupForTopicType() { +async function eventSubscriptionsListRegionalByResourceGroupForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function eventSubscriptionsListRegionalByResourceGroupForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListRegionalByResourceGroupForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupSample.ts index c91e0cca9d88..6fa159fd9fa2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription and resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription and resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalByResourceGroup.json */ -async function eventSubscriptionsListRegionalByResourceGroup() { +async function eventSubscriptionsListRegionalByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function eventSubscriptionsListRegionalByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListRegionalByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts index eff53859464b..17e6128b2357 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionForTopicTypeSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription and topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription and topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscriptionForTopicType.json */ -async function eventSubscriptionsListRegionalBySubscriptionForTopicType() { +async function eventSubscriptionsListRegionalBySubscriptionForTopicType(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function eventSubscriptionsListRegionalBySubscriptionForTopicType() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListRegionalBySubscriptionForTopicType(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionSample.ts index ced57670a2d8..c0f661913669 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsListRegionalBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions from the given location under a specific Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions from the given location under a specific Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_ListRegionalBySubscription.json */ -async function eventSubscriptionsListRegionalBySubscription() { +async function eventSubscriptionsListRegionalBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function eventSubscriptionsListRegionalBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { eventSubscriptionsListRegionalBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsUpdateSample.ts index 5016494d2b59..1fbb0d6242ac 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/eventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic.json */ -async function eventSubscriptionsUpdateForCustomTopic() { +async function eventSubscriptionsUpdateForCustomTopic(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -55,7 +53,7 @@ async function eventSubscriptionsUpdateForCustomTopic() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_AzureFunctionDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination() { +async function eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -93,7 +91,7 @@ async function eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination() * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_EventHubDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicEventHubDestination() { +async function eventSubscriptionsUpdateForCustomTopicEventHubDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -126,7 +124,7 @@ async function eventSubscriptionsUpdateForCustomTopicEventHubDestination() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_HybridConnectionDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicHybridConnectionDestination() { +async function eventSubscriptionsUpdateForCustomTopicHybridConnectionDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -159,7 +157,7 @@ async function eventSubscriptionsUpdateForCustomTopicHybridConnectionDestination * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusQueueDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination() { +async function eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -197,7 +195,7 @@ async function eventSubscriptionsUpdateForCustomTopicServiceBusQueueDestination( * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_ServiceBusTopicDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination() { +async function eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -230,7 +228,7 @@ async function eventSubscriptionsUpdateForCustomTopicServiceBusTopicDestination( * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_StorageQueueDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicStorageQueueDestination() { +async function eventSubscriptionsUpdateForCustomTopicStorageQueueDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic1"; const eventSubscriptionName = "examplesubscription1"; @@ -270,7 +268,7 @@ async function eventSubscriptionsUpdateForCustomTopicStorageQueueDestination() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForCustomTopic_WebhookDestination.json */ -async function eventSubscriptionsUpdateForCustomTopicWebhookDestination() { +async function eventSubscriptionsUpdateForCustomTopicWebhookDestination(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventGrid/topics/exampletopic2"; const eventSubscriptionName = "examplesubscription1"; @@ -302,7 +300,7 @@ async function eventSubscriptionsUpdateForCustomTopicWebhookDestination() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResource.json */ -async function eventSubscriptionsUpdateForResource() { +async function eventSubscriptionsUpdateForResource(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/Microsoft.EventHub/namespaces/examplenamespace1"; const eventSubscriptionName = "examplesubscription1"; @@ -334,7 +332,7 @@ async function eventSubscriptionsUpdateForResource() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForResourceGroup.json */ -async function eventSubscriptionsUpdateForResourceGroup() { +async function eventSubscriptionsUpdateForResourceGroup(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg"; const eventSubscriptionName = "examplesubscription2"; @@ -367,7 +365,7 @@ async function eventSubscriptionsUpdateForResourceGroup() { * @summary Asynchronously updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/EventSubscriptions_UpdateForSubscription.json */ -async function eventSubscriptionsUpdateForSubscription() { +async function eventSubscriptionsUpdateForSubscription(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40"; const eventSubscriptionName = "examplesubscription3"; const eventSubscriptionUpdateParameters: EventSubscriptionUpdateParameters = { @@ -392,7 +390,7 @@ async function eventSubscriptionsUpdateForSubscription() { console.log(result); } -async function main() { +async function main(): Promise { eventSubscriptionsUpdateForCustomTopic(); eventSubscriptionsUpdateForCustomTopicAzureFunctionDestination(); eventSubscriptionsUpdateForCustomTopicEventHubDestination(); diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/extensionTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/extensionTopicsGetSample.ts index 2c126910e3b0..cc6fd1dc0e11 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/extensionTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/extensionTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the properties of an extension topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the properties of an extension topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/ExtensionTopics_Get.json */ -async function extensionTopicsGet() { +async function extensionTopicsGet(): Promise { const scope = "subscriptions/8f6b6269-84f2-4d09-9e31-1127efcd1e40/resourceGroups/examplerg/providers/microsoft.storage/storageaccounts/exampleResourceName/providers/Microsoft.eventgrid/extensionTopics/default"; const credential = new DefaultAzureCredential(); @@ -29,7 +27,7 @@ async function extensionTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { extensionTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts index ef541d66477a..2d308daf0740 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Subscription, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. Existing event subscriptions will be updated with this API. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates an event subscription of a namespace topic with the specified parameters. Existing event subscriptions will be updated with this API. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_CreateOrUpdate.json */ -async function namespaceTopicEventSubscriptionsCreateOrUpdate() { +async function namespaceTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -53,7 +51,7 @@ async function namespaceTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsDeleteSample.ts index e7ffed626da2..16e485f0a697 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Delete.json */ -async function namespaceTopicEventSubscriptionsDelete() { +async function namespaceTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function namespaceTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts index ed9e9b7d55fa..0456c9ed5b0c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function namespaceTopicEventSubscriptionsGetDeliveryAttributes() { +async function namespaceTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function namespaceTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetFullUrlSample.ts index b86a0a151e73..3bf577daa0fb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_GetFullUrl.json */ -async function namespaceTopicEventSubscriptionsGetFullUrl() { +async function namespaceTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function namespaceTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetSample.ts index d9aee29fc899..22c00712fbf3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Get.json */ -async function namespaceTopicEventSubscriptionsGet() { +async function namespaceTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function namespaceTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts index 1a3fb1ab3b1b..194384a36948 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsListByNamespaceTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event subscriptions that belong to a specific namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event subscriptions that belong to a specific namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_ListByNamespaceTopic.json */ -async function namespaceTopicEventSubscriptionsListByNamespaceTopic() { +async function namespaceTopicEventSubscriptionsListByNamespaceTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function namespaceTopicEventSubscriptionsListByNamespaceTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsListByNamespaceTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsUpdateSample.ts index 9bca58604542..f21946704631 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription of a namespace topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopicEventSubscriptions_Update.json */ -async function namespaceTopicEventSubscriptionsUpdate() { +async function namespaceTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -56,7 +54,7 @@ async function namespaceTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsCreateOrUpdateSample.ts index b705bcf2c044..8ef9b3c6858a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new namespace topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new namespace topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_CreateOrUpdate.json */ -async function namespaceTopicsCreateOrUpdate() { +async function namespaceTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -47,7 +45,7 @@ async function namespaceTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsDeleteSample.ts index 674827f33843..dc621bde91bc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Delete.json */ -async function namespaceTopicsDelete() { +async function namespaceTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function namespaceTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsGetSample.ts index 6554ac1bc431..439218e10b51 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Get.json */ -async function namespaceTopicsGet() { +async function namespaceTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e41"; @@ -38,7 +36,7 @@ async function namespaceTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListByNamespaceSample.ts index 74e261152888..28a390147570 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the namespace topics under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the namespace topics under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListByNamespace.json */ -async function namespaceTopicsListByNamespace() { +async function namespaceTopicsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function namespaceTopicsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { namespaceTopicsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListSharedAccessKeysSample.ts index 46d84aefa51d..11cd84854079 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a namespace topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_ListSharedAccessKeys.json */ -async function namespaceTopicsListSharedAccessKeys() { +async function namespaceTopicsListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function namespaceTopicsListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicsListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsRegenerateKeySample.ts index 80d63029fcc8..b9f1b1114353 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a namespace topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a namespace topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_RegenerateKey.json */ -async function namespaceTopicsRegenerateKey() { +async function namespaceTopicsRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function namespaceTopicsRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicsRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsUpdateSample.ts index c1c187476f22..1e2e84a2d28a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespaceTopicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a namespace topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a namespace topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NamespaceTopics_Update.json */ -async function namespaceTopicsUpdate() { +async function namespaceTopicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -45,7 +43,7 @@ async function namespaceTopicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { namespaceTopicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesCreateOrUpdateSample.ts index 1f928c27a15e..cc97c360779e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Namespace, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates a new namespace with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates or updates a new namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_CreateOrUpdate.json */ -async function namespacesCreateOrUpdate() { +async function namespacesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -46,7 +44,7 @@ async function namespacesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { namespacesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesDeleteSample.ts index 06321a60055a..684a9dfdd05b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Delete.json */ -async function namespacesDelete() { +async function namespacesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function namespacesDelete() { console.log(result); } -async function main() { +async function main(): Promise { namespacesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesGetSample.ts index 59120f18778b..ab087e4dd01a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Get.json */ -async function namespacesGet() { +async function namespacesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function namespacesGet() { console.log(result); } -async function main() { +async function main(): Promise { namespacesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListByResourceGroupSample.ts index d20c1e8cc58c..8880a14b0547 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the namespaces under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the namespaces under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListByResourceGroup.json */ -async function namespacesListByResourceGroup() { +async function namespacesListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function namespacesListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { namespacesListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListBySubscriptionSample.ts index 21461297fa26..f2053359bc21 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the namespaces under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the namespaces under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListBySubscription.json */ -async function namespacesListBySubscription() { +async function namespacesListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function namespacesListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { namespacesListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListSharedAccessKeysSample.ts index 38f0dbca73c9..d9e5589ea85c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ListSharedAccessKeys.json */ -async function namespacesListSharedAccessKeys() { +async function namespacesListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function namespacesListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { namespacesListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesRegenerateKeySample.ts index 227a9782abfe..35a282f22a73 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a namespace. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_RegenerateKey.json */ -async function namespacesRegenerateKey() { +async function namespacesRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function namespacesRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { namespacesRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesUpdateSample.ts index 2799a17d18c3..c37154ae4731 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a namespace with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_Update.json */ -async function namespacesUpdate() { +async function namespacesUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function namespacesUpdate() { console.log(result); } -async function main() { +async function main(): Promise { namespacesUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesValidateCustomDomainOwnershipSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesValidateCustomDomainOwnershipSample.ts index 4771da724f8a..757139c84450 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesValidateCustomDomainOwnershipSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/namespacesValidateCustomDomainOwnershipSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Performs ownership validation via checking TXT records for all custom domains in a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Performs ownership validation via checking TXT records for all custom domains in a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Namespaces_ValidateCustomDomainOwnership.json */ -async function namespacesValidateCustomDomainOwnership() { +async function namespacesValidateCustomDomainOwnership(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function namespacesValidateCustomDomainOwnership() { console.log(result); } -async function main() { +async function main(): Promise { namespacesValidateCustomDomainOwnership(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts index 9f15915a4a1b..317a374b5a34 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a specific network security perimeter configuration with a topic or domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get a specific network security perimeter configuration with a topic or domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Get.json */ -async function networkSecurityPerimeterConfigurationsGet() { +async function networkSecurityPerimeterConfigurationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -42,7 +40,7 @@ async function networkSecurityPerimeterConfigurationsGet() { console.log(result); } -async function main() { +async function main(): Promise { networkSecurityPerimeterConfigurationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts index 418e640f17ce..232d44627ac5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all network security perimeter configurations associated with a topic or domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all network security perimeter configurations associated with a topic or domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_List.json */ -async function networkSecurityPerimeterConfigurationsList() { +async function networkSecurityPerimeterConfigurationsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function networkSecurityPerimeterConfigurationsList() { console.log(resArray); } -async function main() { +async function main(): Promise { networkSecurityPerimeterConfigurationsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts index 634c6d3806e3..df46744462d6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/networkSecurityPerimeterConfigurationsReconcileSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Reconcile a specific network security perimeter configuration for a given network security perimeter association with a topic or domain. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/NetworkSecurityPerimeterConfigurations_Reconcile.json */ -async function networkSecurityPerimeterConfigurationsReconcile() { +async function networkSecurityPerimeterConfigurationsReconcile(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function networkSecurityPerimeterConfigurationsReconcile() { console.log(result); } -async function main() { +async function main(): Promise { networkSecurityPerimeterConfigurationsReconcile(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/operationsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/operationsListSample.ts index 1e9a5e7da0a2..aed3fedce85f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/operationsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/operationsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the available operations supported by the Microsoft.EventGrid resource provider. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the available operations supported by the Microsoft.EventGrid resource provider. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Operations_List.json */ -async function operationsList() { +async function operationsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "00000000-0000-0000-0000-000000000000"; @@ -33,7 +31,7 @@ async function operationsList() { console.log(resArray); } -async function main() { +async function main(): Promise { operationsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsAuthorizePartnerSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsAuthorizePartnerSample.ts index 68b8dc522028..9de69fd84c4d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsAuthorizePartnerSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsAuthorizePartnerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Partner, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Authorize a single partner either by partner registration immutable Id or by partner name. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Authorize a single partner either by partner registration immutable Id or by partner name. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_AuthorizePartner.json */ -async function partnerConfigurationsAuthorizePartner() { +async function partnerConfigurationsAuthorizePartner(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function partnerConfigurationsAuthorizePartner() { console.log(result); } -async function main() { +async function main(): Promise { partnerConfigurationsAuthorizePartner(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsCreateOrUpdateSample.ts index 31befa1a2fb0..5d1b132bac16 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously creates or updates a partner configuration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Synchronously creates or updates a partner configuration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_CreateOrUpdate.json */ -async function partnerConfigurationsCreateOrUpdate() { +async function partnerConfigurationsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -61,7 +59,7 @@ async function partnerConfigurationsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerConfigurationsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsDeleteSample.ts index 8f3c942d1920..4d9bbfc49af4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner configuration. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner configuration. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Delete.json */ -async function partnerConfigurationsDelete() { +async function partnerConfigurationsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerConfigurationsDelete() { console.log(result); } -async function main() { +async function main(): Promise { partnerConfigurationsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsGetSample.ts index d22e325f336c..4471de366ff3 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner configuration. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner configuration. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Get.json */ -async function partnerConfigurationsGet() { +async function partnerConfigurationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -32,7 +30,7 @@ async function partnerConfigurationsGet() { console.log(result); } -async function main() { +async function main(): Promise { partnerConfigurationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListByResourceGroupSample.ts index 06f3621b0b96..cb955be518aa 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner configurations under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner configurations under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListByResourceGroup.json */ -async function partnerConfigurationsListByResourceGroup() { +async function partnerConfigurationsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerConfigurationsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerConfigurationsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListBySubscriptionSample.ts index dc14d1dda69a..9ce659965102 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner configurations under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner configurations under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_ListBySubscription.json */ -async function partnerConfigurationsListBySubscription() { +async function partnerConfigurationsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerConfigurationsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerConfigurationsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUnauthorizePartnerSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUnauthorizePartnerSample.ts index eb0d87d378b0..eae1aa53d2fa 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUnauthorizePartnerSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUnauthorizePartnerSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Partner, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Unauthorize a single partner either by partner registration immutable Id or by partner name. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Unauthorize a single partner either by partner registration immutable Id or by partner name. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_UnauthorizePartner.json */ -async function partnerConfigurationsUnauthorizePartner() { +async function partnerConfigurationsUnauthorizePartner(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function partnerConfigurationsUnauthorizePartner() { console.log(result); } -async function main() { +async function main(): Promise { partnerConfigurationsUnauthorizePartner(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUpdateSample.ts index 0f50b830fdc0..e332dab00b22 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerConfigurationsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Synchronously updates a partner configuration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Synchronously updates a partner configuration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerConfigurations_Update.json */ -async function partnerConfigurationsUpdate() { +async function partnerConfigurationsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerConfigurationsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerConfigurationsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsActivateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsActivateSample.ts index c9ec54d6ad3e..3f65058344b8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsActivateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsActivateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Activate a newly created partner destination. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Activate a newly created partner destination. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Activate.json */ -async function partnerDestinationsActivate() { +async function partnerDestinationsActivate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerDestinationsActivate() { console.log(result); } -async function main() { +async function main(): Promise { partnerDestinationsActivate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsCreateOrUpdateSample.ts index 5b14681e7a76..d8a713254421 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new partner destination with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new partner destination with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_CreateOrUpdate.json */ -async function partnerDestinationsCreateOrUpdate() { +async function partnerDestinationsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -48,7 +46,7 @@ async function partnerDestinationsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerDestinationsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsDeleteSample.ts index 13a7ad9ea47f..e2f2461ba2a4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner destination. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner destination. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Delete.json */ -async function partnerDestinationsDelete() { +async function partnerDestinationsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerDestinationsDelete() { console.log(result); } -async function main() { +async function main(): Promise { partnerDestinationsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsGetSample.ts index 63a10e5315be..56a5711b08d6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner destination. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner destination. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Get.json */ -async function partnerDestinationsGet() { +async function partnerDestinationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerDestinationsGet() { console.log(result); } -async function main() { +async function main(): Promise { partnerDestinationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListByResourceGroupSample.ts index 5f77e65a5467..198cd6090ac7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner destinations under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner destinations under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListByResourceGroup.json */ -async function partnerDestinationsListByResourceGroup() { +async function partnerDestinationsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerDestinationsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerDestinationsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListBySubscriptionSample.ts index f2ed502f77f8..15c3c78de19a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner destinations under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner destinations under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_ListBySubscription.json */ -async function partnerDestinationsListBySubscription() { +async function partnerDestinationsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerDestinationsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerDestinationsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsUpdateSample.ts index 0f0597058027..fd63d93ff9f2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerDestinationsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a partner destination with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a partner destination with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerDestinations_Update.json */ -async function partnerDestinationsUpdate() { +async function partnerDestinationsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -42,7 +40,7 @@ async function partnerDestinationsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerDestinationsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesCreateOrUpdateSample.ts index 1eb3122f2fd5..7eba3b4eb2f6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new partner namespace with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new partner namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_CreateOrUpdate.json */ -async function partnerNamespacesCreateOrUpdate() { +async function partnerNamespacesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -46,7 +44,7 @@ async function partnerNamespacesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerNamespacesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesDeleteSample.ts index f7111589a3e5..220f16b88291 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Delete.json */ -async function partnerNamespacesDelete() { +async function partnerNamespacesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerNamespacesDelete() { console.log(result); } -async function main() { +async function main(): Promise { partnerNamespacesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesGetSample.ts index 6e9f847e66da..1fc7065f6cbc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Get.json */ -async function partnerNamespacesGet() { +async function partnerNamespacesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerNamespacesGet() { console.log(result); } -async function main() { +async function main(): Promise { partnerNamespacesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListByResourceGroupSample.ts index 680fa652348d..b55e2c2a4e8c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner namespaces under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner namespaces under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListByResourceGroup.json */ -async function partnerNamespacesListByResourceGroup() { +async function partnerNamespacesListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerNamespacesListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerNamespacesListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListBySubscriptionSample.ts index fc4809ab9a2b..c6a75c4faaec 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner namespaces under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner namespaces under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListBySubscription.json */ -async function partnerNamespacesListBySubscription() { +async function partnerNamespacesListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerNamespacesListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerNamespacesListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListSharedAccessKeysSample.ts index 6bd9163072bb..3a6c76f8321c 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a partner namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_ListSharedAccessKeys.json */ -async function partnerNamespacesListSharedAccessKeys() { +async function partnerNamespacesListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerNamespacesListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { partnerNamespacesListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesRegenerateKeySample.ts index 47f43b38734d..44b0c62c2224 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a partner namespace. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_RegenerateKey.json */ -async function partnerNamespacesRegenerateKey() { +async function partnerNamespacesRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerNamespacesRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { partnerNamespacesRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesUpdateSample.ts index 44596bc49690..51fd1ef1dbcc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerNamespacesUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a partner namespace with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a partner namespace with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerNamespaces_Update.json */ -async function partnerNamespacesUpdate() { +async function partnerNamespacesUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerNamespacesUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerNamespacesUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsCreateOrUpdateSample.ts index e0738c73ecc5..16a0cdadf607 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Creates a new partner registration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Creates a new partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_CreateOrUpdate.json */ -async function partnerRegistrationsCreateOrUpdate() { +async function partnerRegistrationsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -44,7 +42,7 @@ async function partnerRegistrationsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerRegistrationsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsDeleteSample.ts index f881698c60bc..ff1a64dd3fae 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deletes a partner registration with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Deletes a partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Delete.json */ -async function partnerRegistrationsDelete() { +async function partnerRegistrationsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerRegistrationsDelete() { console.log(result); } -async function main() { +async function main(): Promise { partnerRegistrationsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsGetSample.ts index cf9067b7e697..4dd3bbceab27 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Gets a partner registration with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Gets a partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Get.json */ -async function partnerRegistrationsGet() { +async function partnerRegistrationsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerRegistrationsGet() { console.log(result); } -async function main() { +async function main(): Promise { partnerRegistrationsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListByResourceGroupSample.ts index 809174416d7d..186bd0137f6d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner registrations under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner registrations under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListByResourceGroup.json */ -async function partnerRegistrationsListByResourceGroup() { +async function partnerRegistrationsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerRegistrationsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerRegistrationsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListBySubscriptionSample.ts index 84652e8d4915..fbbfb8e094cc 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner registrations under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner registrations under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_ListBySubscription.json */ -async function partnerRegistrationsListBySubscription() { +async function partnerRegistrationsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerRegistrationsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerRegistrationsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsUpdateSample.ts index 0cafb3ecf2b8..c552b108cb76 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerRegistrationsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Updates a partner registration with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Updates a partner registration with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerRegistrations_Update.json */ -async function partnerRegistrationsUpdate() { +async function partnerRegistrationsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -42,7 +40,7 @@ async function partnerRegistrationsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerRegistrationsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts index 5a33762455d7..15acd01d731a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates or updates an event subscription of a partner topic with the specified parameters. Existing event subscriptions will be updated with this API. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_CreateOrUpdate.json */ -async function partnerTopicEventSubscriptionsCreateOrUpdate() { +async function partnerTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function partnerTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsDeleteSample.ts index 8e553e463806..0eead84dab71 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Delete.json */ -async function partnerTopicEventSubscriptionsDelete() { +async function partnerTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function partnerTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts index b0cc80474556..31ccf01cd3b8 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function partnerTopicEventSubscriptionsGetDeliveryAttributes() { +async function partnerTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function partnerTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetFullUrlSample.ts index e7cf0339d686..4b967306bd52 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_GetFullUrl.json */ -async function partnerTopicEventSubscriptionsGetFullUrl() { +async function partnerTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function partnerTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetSample.ts index 9755bf750b5a..18d53a273a27 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Get.json */ -async function partnerTopicEventSubscriptionsGet() { +async function partnerTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function partnerTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts index cf7132cb65fc..64434c4ad9c7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsListByPartnerTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event subscriptions that belong to a specific partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event subscriptions that belong to a specific partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_ListByPartnerTopic.json */ -async function partnerTopicEventSubscriptionsListByPartnerTopic() { +async function partnerTopicEventSubscriptionsListByPartnerTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function partnerTopicEventSubscriptionsListByPartnerTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsListByPartnerTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsUpdateSample.ts index f916416bec35..ebccd294b75f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription of a partner topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopicEventSubscriptions_Update.json */ -async function partnerTopicEventSubscriptionsUpdate() { +async function partnerTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function partnerTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsActivateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsActivateSample.ts index f702858ba123..4dc2a0042a6f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsActivateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsActivateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Activate a newly created partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Activate a newly created partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Activate.json */ -async function partnerTopicsActivate() { +async function partnerTopicsActivate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsActivate() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicsActivate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsCreateOrUpdateSample.ts index 00e03b92f600..b92e2eae911e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { PartnerTopic, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new partner topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates a new partner topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_CreateOrUpdate.json */ -async function partnerTopicsCreateOrUpdate() { +async function partnerTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -45,7 +43,7 @@ async function partnerTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeactivateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeactivateSample.ts index 9499e169fe32..342dba7f3220 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeactivateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeactivateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Deactivate specific partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Deactivate specific partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Deactivate.json */ -async function partnerTopicsDeactivate() { +async function partnerTopicsDeactivate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsDeactivate() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicsDeactivate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeleteSample.ts index ff7ab6f1acea..06d850322dd0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Delete.json */ -async function partnerTopicsDelete() { +async function partnerTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsGetSample.ts index d4bb63626947..f1fc87039156 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a partner topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a partner topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Get.json */ -async function partnerTopicsGet() { +async function partnerTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function partnerTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListByResourceGroupSample.ts index 3ab50f0f19c5..a9159db3abab 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner topics under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner topics under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListByResourceGroup.json */ -async function partnerTopicsListByResourceGroup() { +async function partnerTopicsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function partnerTopicsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerTopicsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListBySubscriptionSample.ts index 104caf3daab3..1d83b9c70546 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the partner topics under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the partner topics under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_ListBySubscription.json */ -async function partnerTopicsListBySubscription() { +async function partnerTopicsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function partnerTopicsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { partnerTopicsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsUpdateSample.ts index c3ab6753cfbc..64d045f782fd 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/partnerTopicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a partner topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a partner topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PartnerTopics_Update.json */ -async function partnerTopicsUpdate() { +async function partnerTopicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function partnerTopicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { partnerTopicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsCreateOrUpdateSample.ts index ab88353bf8e4..bdce4bb35e4f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a permission binding with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Create or update a permission binding with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_CreateOrUpdate.json */ -async function permissionBindingsCreateOrUpdate() { +async function permissionBindingsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -47,7 +45,7 @@ async function permissionBindingsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { permissionBindingsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsDeleteSample.ts index 9473f43d9fab..331a0de86499 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing permission binding. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing permission binding. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_Delete.json */ -async function permissionBindingsDelete() { +async function permissionBindingsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function permissionBindingsDelete() { console.log(result); } -async function main() { +async function main(): Promise { permissionBindingsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsGetSample.ts index 30c8381c63ed..3992661250bb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a permission binding. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a permission binding. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_Get.json */ -async function permissionBindingsGet() { +async function permissionBindingsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function permissionBindingsGet() { console.log(result); } -async function main() { +async function main(): Promise { permissionBindingsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsListByNamespaceSample.ts index 9ecf27ffee18..bd4162e653a0 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/permissionBindingsListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the permission bindings under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the permission bindings under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PermissionBindings_ListByNamespace.json */ -async function permissionBindingsListByNamespace() { +async function permissionBindingsListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function permissionBindingsListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { permissionBindingsListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts index 66e0308dcfbd..0d6ff9ce6300 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Delete.json */ -async function privateEndpointConnectionsDelete() { +async function privateEndpointConnectionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateEndpointConnectionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { privateEndpointConnectionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsGetSample.ts index 3f2ed08c0121..58d1b909fbc9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get a specific private endpoint connection under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Get.json */ -async function privateEndpointConnectionsGet() { +async function privateEndpointConnectionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateEndpointConnectionsGet() { console.log(result); } -async function main() { +async function main(): Promise { privateEndpointConnectionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsListByResourceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsListByResourceSample.ts index f23815a6f02c..f68b2ad56eea 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsListByResourceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsListByResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all private endpoint connections under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all private endpoint connections under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_ListByResource.json */ -async function privateEndpointConnectionsListByResource() { +async function privateEndpointConnectionsListByResource(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateEndpointConnectionsListByResource() { console.log(resArray); } -async function main() { +async function main(): Promise { privateEndpointConnectionsListByResource(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts index 263ae1a64516..bb8f0dee2081 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateEndpointConnectionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update a specific private endpoint connection under a topic, domain or partner namespace. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update a specific private endpoint connection under a topic, domain or partner namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateEndpointConnections_Update.json */ -async function privateEndpointConnectionsUpdate() { +async function privateEndpointConnectionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -52,7 +50,7 @@ async function privateEndpointConnectionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { privateEndpointConnectionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesGetSample.ts index 504b335fb7f5..0c5d937a2406 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a private link resource. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a private link resource. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_Get.json */ -async function privateLinkResourcesGet() { +async function privateLinkResourcesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function privateLinkResourcesGet() { console.log(result); } -async function main() { +async function main(): Promise { privateLinkResourcesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesListByResourceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesListByResourceSample.ts index d2f21d23d787..2e5684b6884b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesListByResourceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/privateLinkResourcesListByResourceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the private link resources under a topic, domain, or partner namespace or namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the private link resources under a topic, domain, or partner namespace or namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/PrivateLinkResources_ListByResource.json */ -async function privateLinkResourcesListByResource() { +async function privateLinkResourcesListByResource(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function privateLinkResourcesListByResource() { console.log(resArray); } -async function main() { +async function main(): Promise { privateLinkResourcesListByResource(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsCreateOrUpdateSample.ts index a60c56504c1d..733ffa4d0990 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates or updates an event subscription with the specified parameters. Existing event subscriptions will be updated with this API. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates or updates an event subscription with the specified parameters. Existing event subscriptions will be updated with this API. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_CreateOrUpdate.json */ -async function systemTopicEventSubscriptionsCreateOrUpdate() { +async function systemTopicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function systemTopicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsDeleteSample.ts index 654509e0533d..76997a854b4b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription of a system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Delete.json */ -async function systemTopicEventSubscriptionsDelete() { +async function systemTopicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function systemTopicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts index 0bd09c4dd890..08a9ea470c96 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetDeliveryAttributes.json */ -async function systemTopicEventSubscriptionsGetDeliveryAttributes() { +async function systemTopicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function systemTopicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetFullUrlSample.ts index 91b0c20fb3ba..ff0b78520915 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription of a system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_GetFullUrl.json */ -async function systemTopicEventSubscriptionsGetFullUrl() { +async function systemTopicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function systemTopicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetSample.ts index 6e604126ef93..6b1d561726ac 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get an event subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get an event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Get.json */ -async function systemTopicEventSubscriptionsGet() { +async function systemTopicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function systemTopicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsListBySystemTopicSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsListBySystemTopicSample.ts index 368733cd2f96..2227bd4cca6d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsListBySystemTopicSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsListBySystemTopicSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event subscriptions that belong to a specific system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event subscriptions that belong to a specific system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_ListBySystemTopic.json */ -async function systemTopicEventSubscriptionsListBySystemTopic() { +async function systemTopicEventSubscriptionsListBySystemTopic(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function systemTopicEventSubscriptionsListBySystemTopic() { console.log(resArray); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsListBySystemTopic(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsUpdateSample.ts index 6cd4d3e4299c..f8afaf3b031b 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription of a system topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopicEventSubscriptions_Update.json */ -async function systemTopicEventSubscriptionsUpdate() { +async function systemTopicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function systemTopicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsCreateOrUpdateSample.ts index ad4100f4b4cb..61444dfc1fb7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { SystemTopic, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new system topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates a new system topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_CreateOrUpdate.json */ -async function systemTopicsCreateOrUpdate() { +async function systemTopicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -44,7 +42,7 @@ async function systemTopicsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsDeleteSample.ts index ffb77560c86d..f37e94bf9d53 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Delete.json */ -async function systemTopicsDelete() { +async function systemTopicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function systemTopicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsGetSample.ts index 964aabd7d466..939b93fa012e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a system topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a system topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Get.json */ -async function systemTopicsGet() { +async function systemTopicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function systemTopicsGet() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListByResourceGroupSample.ts index c3be9422dac3..00a892e769fb 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the system topics under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the system topics under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListByResourceGroup.json */ -async function systemTopicsListByResourceGroup() { +async function systemTopicsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -37,7 +35,7 @@ async function systemTopicsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { systemTopicsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListBySubscriptionSample.ts index 53acc227553c..c14c86963b15 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the system topics under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the system topics under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_ListBySubscription.json */ -async function systemTopicsListBySubscription() { +async function systemTopicsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function systemTopicsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { systemTopicsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsUpdateSample.ts index 659a16c2c050..afd6dde2b1c7 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/systemTopicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a system topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a system topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/SystemTopics_Update.json */ -async function systemTopicsUpdate() { +async function systemTopicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function systemTopicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { systemTopicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsCreateOrUpdateSample.ts index a69047f86069..c8c5c4695042 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsCreateOrUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new event subscription or updates an existing event subscription. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously creates a new event subscription or updates an existing event subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_CreateOrUpdate.json */ -async function topicEventSubscriptionsCreateOrUpdate() { +async function topicEventSubscriptionsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function topicEventSubscriptionsCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { topicEventSubscriptionsCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsDeleteSample.ts index fe0b89dcc96b..0ba8fbae3a9f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing event subscription for a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing event subscription for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Delete.json */ -async function topicEventSubscriptionsDelete() { +async function topicEventSubscriptionsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsDelete() { console.log(result); } -async function main() { +async function main(): Promise { topicEventSubscriptionsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetDeliveryAttributesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetDeliveryAttributesSample.ts index a79ad6ad8730..0af747b39825 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetDeliveryAttributesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetDeliveryAttributesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all delivery attributes for an event subscription for topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all delivery attributes for an event subscription for topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetDeliveryAttributes.json */ -async function topicEventSubscriptionsGetDeliveryAttributes() { +async function topicEventSubscriptionsGetDeliveryAttributes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsGetDeliveryAttributes() { console.log(result); } -async function main() { +async function main(): Promise { topicEventSubscriptionsGetDeliveryAttributes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetFullUrlSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetFullUrlSample.ts index d0e3b695c36b..17b059c5f6b6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetFullUrlSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetFullUrlSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get the full endpoint URL for an event subscription for topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get the full endpoint URL for an event subscription for topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_GetFullUrl.json */ -async function topicEventSubscriptionsGetFullUrl() { +async function topicEventSubscriptionsGetFullUrl(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsGetFullUrl() { console.log(result); } -async function main() { +async function main(): Promise { topicEventSubscriptionsGetFullUrl(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetSample.ts index 22921b2a3933..6647d01d92a6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of an event subscription of a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of an event subscription of a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Get.json */ -async function topicEventSubscriptionsGet() { +async function topicEventSubscriptionsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicEventSubscriptionsGet() { console.log(result); } -async function main() { +async function main(): Promise { topicEventSubscriptionsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsListSample.ts index 9e9185b40338..d51ce82b44f4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all event subscriptions that have been created for a specific topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all event subscriptions that have been created for a specific topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_List.json */ -async function topicEventSubscriptionsList() { +async function topicEventSubscriptionsList(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function topicEventSubscriptionsList() { console.log(resArray); } -async function main() { +async function main(): Promise { topicEventSubscriptionsList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsUpdateSample.ts index 89239207b42e..1eb0568fd09e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicEventSubscriptionsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Update an existing event subscription for a topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Update an existing event subscription for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicEventSubscriptions_Update.json */ -async function topicEventSubscriptionsUpdate() { +async function topicEventSubscriptionsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -54,7 +52,7 @@ async function topicEventSubscriptionsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { topicEventSubscriptionsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesCreateOrUpdateSample.ts index 81677c993380..a4934d3389a9 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { TopicSpace, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Create or update a topic space with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Create or update a topic space with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_CreateOrUpdate.json */ -async function topicSpacesCreateOrUpdate() { +async function topicSpacesCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -40,7 +38,7 @@ async function topicSpacesCreateOrUpdate() { console.log(result); } -async function main() { +async function main(): Promise { topicSpacesCreateOrUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesDeleteSample.ts index abd36e39c2de..abfdfb3cfb71 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete an existing topic space. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete an existing topic space. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Delete.json */ -async function topicSpacesDelete() { +async function topicSpacesDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicSpacesDelete() { console.log(result); } -async function main() { +async function main(): Promise { topicSpacesDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesGetSample.ts index cade6ec2de26..dcfb0f3f3c30 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a topic space. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a topic space. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_Get.json */ -async function topicSpacesGet() { +async function topicSpacesGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -38,7 +36,7 @@ async function topicSpacesGet() { console.log(result); } -async function main() { +async function main(): Promise { topicSpacesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesListByNamespaceSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesListByNamespaceSample.ts index 480187668991..1ee14840716a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesListByNamespaceSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicSpacesListByNamespaceSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get all the topic spaces under a namespace. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get all the topic spaces under a namespace. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicSpaces_ListByNamespace.json */ -async function topicSpacesListByNamespace() { +async function topicSpacesListByNamespace(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -39,7 +37,7 @@ async function topicSpacesListByNamespace() { console.log(resArray); } -async function main() { +async function main(): Promise { topicSpacesListByNamespace(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesGetSample.ts index 94f430aa553e..03079815b41d 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get information about a topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get information about a topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_Get.json */ -async function topicTypesGet() { +async function topicTypesGet(): Promise { const topicTypeName = "Microsoft.Storage.StorageAccounts"; const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); @@ -28,7 +26,7 @@ async function topicTypesGet() { console.log(result); } -async function main() { +async function main(): Promise { topicTypesGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListEventTypesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListEventTypesSample.ts index 108aa1dc0d8b..27f9503f8305 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListEventTypesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListEventTypesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event types for a topic type. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event types for a topic type. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_ListEventTypes.json */ -async function topicTypesListEventTypes() { +async function topicTypesListEventTypes(): Promise { const topicTypeName = "Microsoft.Storage.StorageAccounts"; const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); @@ -31,7 +29,7 @@ async function topicTypesListEventTypes() { console.log(resArray); } -async function main() { +async function main(): Promise { topicTypesListEventTypes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListSample.ts index 65870d7b6cfe..ea8bfdbb6d85 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicTypesListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all registered topic types. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all registered topic types. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/TopicTypes_List.json */ -async function topicTypesList() { +async function topicTypesList(): Promise { const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); const resArray = new Array(); @@ -30,7 +28,7 @@ async function topicTypesList() { console.log(resArray); } -async function main() { +async function main(): Promise { topicTypesList(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsCreateOrUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsCreateOrUpdateSample.ts index 11cf80035e1e..c7529a43711e 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsCreateOrUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsCreateOrUpdateSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { Topic, EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously creates a new topic with the specified parameters. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Asynchronously creates a new topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdate.json */ -async function topicsCreateOrUpdate() { +async function topicsCreateOrUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -52,7 +50,7 @@ async function topicsCreateOrUpdate() { * @summary Asynchronously creates a new topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_CreateOrUpdateForAzureArc.json */ -async function topicsCreateOrUpdateForAzureArc() { +async function topicsCreateOrUpdateForAzureArc(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -79,7 +77,7 @@ async function topicsCreateOrUpdateForAzureArc() { console.log(result); } -async function main() { +async function main(): Promise { topicsCreateOrUpdate(); topicsCreateOrUpdateForAzureArc(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsDeleteSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsDeleteSample.ts index d8f17483c6e2..b05a4fdaf9db 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsDeleteSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsDeleteSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Delete existing topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Delete existing topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Delete.json */ -async function topicsDelete() { +async function topicsDelete(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function topicsDelete() { console.log(result); } -async function main() { +async function main(): Promise { topicsDelete(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsGetSample.ts index 78d293481455..5174d38a8ad4 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Get.json */ -async function topicsGet() { +async function topicsGet(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function topicsGet() { console.log(result); } -async function main() { +async function main(): Promise { topicsGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListByResourceGroupSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListByResourceGroupSample.ts index 9998f7160ac8..9e4a9c73c10a 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListByResourceGroupSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListByResourceGroupSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the topics under a resource group. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the topics under a resource group. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListByResourceGroup.json */ -async function topicsListByResourceGroup() { +async function topicsListByResourceGroup(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -35,7 +33,7 @@ async function topicsListByResourceGroup() { console.log(resArray); } -async function main() { +async function main(): Promise { topicsListByResourceGroup(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListBySubscriptionSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListBySubscriptionSample.ts index 30b3aad9a6c2..673818f95d0f 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListBySubscriptionSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListBySubscriptionSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List all the topics under an Azure subscription. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List all the topics under an Azure subscription. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListBySubscription.json */ -async function topicsListBySubscription() { +async function topicsListBySubscription(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -33,7 +31,7 @@ async function topicsListBySubscription() { console.log(resArray); } -async function main() { +async function main(): Promise { topicsListBySubscription(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListEventTypesSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListEventTypesSample.ts index 6d65ad45b717..964fb30a7a21 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListEventTypesSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListEventTypesSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List event types for a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List event types for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListEventTypes.json */ -async function topicsListEventTypes() { +async function topicsListEventTypes(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -43,7 +41,7 @@ async function topicsListEventTypes() { console.log(resArray); } -async function main() { +async function main(): Promise { topicsListEventTypes(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListSharedAccessKeysSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListSharedAccessKeysSample.ts index f33d7eef19b0..ee1a83d369c2 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListSharedAccessKeysSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsListSharedAccessKeysSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to List the two keys used to publish to a topic. @@ -20,7 +18,7 @@ dotenv.config(); * @summary List the two keys used to publish to a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_ListSharedAccessKeys.json */ -async function topicsListSharedAccessKeys() { +async function topicsListSharedAccessKeys(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -36,7 +34,7 @@ async function topicsListSharedAccessKeys() { console.log(result); } -async function main() { +async function main(): Promise { topicsListSharedAccessKeys(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsRegenerateKeySample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsRegenerateKeySample.ts index 86aef2497cb4..c0a8aae651b6 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsRegenerateKeySample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsRegenerateKeySample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Regenerate a shared access key for a topic. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Regenerate a shared access key for a topic. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_RegenerateKey.json */ -async function topicsRegenerateKey() { +async function topicsRegenerateKey(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -41,7 +39,7 @@ async function topicsRegenerateKey() { console.log(result); } -async function main() { +async function main(): Promise { topicsRegenerateKey(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsUpdateSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsUpdateSample.ts index a81d9a43d05b..f60a28b428dd 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsUpdateSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/topicsUpdateSample.ts @@ -13,9 +13,7 @@ import { EventGridManagementClient, } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Asynchronously updates a topic with the specified parameters. @@ -23,7 +21,7 @@ dotenv.config(); * @summary Asynchronously updates a topic with the specified parameters. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/Topics_Update.json */ -async function topicsUpdate() { +async function topicsUpdate(): Promise { const subscriptionId = process.env["EVENTGRID_SUBSCRIPTION_ID"] || "8f6b6269-84f2-4d09-9e31-1127efcd1e40"; @@ -48,7 +46,7 @@ async function topicsUpdate() { console.log(result); } -async function main() { +async function main(): Promise { topicsUpdate(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersGetSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersGetSample.ts index 9e1d53fe0879..2fc5f38d1c46 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersGetSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersGetSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get properties of a verified partner. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get properties of a verified partner. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/VerifiedPartners_Get.json */ -async function verifiedPartnersGet() { +async function verifiedPartnersGet(): Promise { const verifiedPartnerName = "Contoso.Finance"; const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); @@ -28,7 +26,7 @@ async function verifiedPartnersGet() { console.log(result); } -async function main() { +async function main(): Promise { verifiedPartnersGet(); } diff --git a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersListSample.ts b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersListSample.ts index 42f1e7a1a5bc..191349b0e9f5 100644 --- a/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersListSample.ts +++ b/sdk/eventgrid/arm-eventgrid/samples/v14-beta/typescript/src/verifiedPartnersListSample.ts @@ -10,9 +10,7 @@ // Licensed under the MIT License. import { EventGridManagementClient } from "@azure/arm-eventgrid"; import { DefaultAzureCredential } from "@azure/identity"; -import * as dotenv from "dotenv"; - -dotenv.config(); +import "dotenv/config"; /** * This sample demonstrates how to Get a list of all verified partners. @@ -20,7 +18,7 @@ dotenv.config(); * @summary Get a list of all verified partners. * x-ms-original-file: specification/eventgrid/resource-manager/Microsoft.EventGrid/preview/2024-06-01-preview/examples/VerifiedPartners_List.json */ -async function verifiedPartnersList() { +async function verifiedPartnersList(): Promise { const credential = new DefaultAzureCredential(); const client = new EventGridManagementClient(credential); const resArray = new Array(); @@ -30,7 +28,7 @@ async function verifiedPartnersList() { console.log(resArray); } -async function main() { +async function main(): Promise { verifiedPartnersList(); } diff --git a/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts b/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts index 312bf97609cc..ac2aff394527 100644 --- a/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts +++ b/sdk/eventgrid/arm-eventgrid/src/eventGridManagementClient.ts @@ -46,7 +46,7 @@ import { TopicSpacesImpl, TopicTypesImpl, VerifiedPartnersImpl, -} from "./operations"; +} from "./operations/index.js"; import { CaCertificates, Channels, @@ -79,8 +79,8 @@ import { TopicSpaces, TopicTypes, VerifiedPartners, -} from "./operationsInterfaces"; -import { EventGridManagementClientOptionalParams } from "./models"; +} from "./operationsInterfaces/index.js"; +import { EventGridManagementClientOptionalParams } from "./models/index.js"; export class EventGridManagementClient extends coreClient.ServiceClient { $host: string; @@ -129,7 +129,7 @@ export class EventGridManagementClient extends coreClient.ServiceClient { credential: credentials, }; - const packageDetails = `azsdk-js-arm-eventgrid/14.2.0-beta.5`; + const packageDetails = `azsdk-js-arm-eventgrid/15.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -183,7 +183,7 @@ export class EventGridManagementClient extends coreClient.ServiceClient { // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.apiVersion = options.apiVersion || "2024-06-01-preview"; + this.apiVersion = options.apiVersion || "2024-12-15-preview"; this.caCertificates = new CaCertificatesImpl(this); this.channels = new ChannelsImpl(this); this.clientGroups = new ClientGroupsImpl(this); diff --git a/sdk/eventgrid/arm-eventgrid/src/index.ts b/sdk/eventgrid/arm-eventgrid/src/index.ts index 81079fb5f80c..378201aaca10 100644 --- a/sdk/eventgrid/arm-eventgrid/src/index.ts +++ b/sdk/eventgrid/arm-eventgrid/src/index.ts @@ -7,7 +7,7 @@ */ /// -export { getContinuationToken } from "./pagingHelper"; -export * from "./models"; -export { EventGridManagementClient } from "./eventGridManagementClient"; -export * from "./operationsInterfaces"; +export { getContinuationToken } from "./pagingHelper.js"; +export * from "./models/index.js"; +export { EventGridManagementClient } from "./eventGridManagementClient.js"; +export * from "./operationsInterfaces/index.js"; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/index.ts b/sdk/eventgrid/arm-eventgrid/src/models/index.ts index 2654dbd9edc5..cfd542d20fb0 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/index.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/index.ts @@ -534,6 +534,14 @@ export interface EventSubscriptionIdentity { type?: EventSubscriptionIdentityType; /** The user identity associated with the resource. */ userAssignedIdentity?: string; + /** The details of the Federated Identity Credential (FIC) used with the resource delivery. */ + federatedIdentityCredentialInfo?: FederatedIdentityCredentialInfo; +} + +/** The details of the Federated Identity Credential (FIC) used with the resource. */ +export interface FederatedIdentityCredentialInfo { + /** The Multi-Tenant AAD Application where the Federated Identity Credential (FIC) is associated with. */ + federatedClientId: string; } /** Information about the dead letter destination for an event subscription. To configure a deadletter destination, do not directly instantiate an object of this class. Instead, instantiate an object of a derived class. Currently, StorageBlobDeadLetterDestination is the only class that derives from this class. */ @@ -619,7 +627,7 @@ export interface FiltersConfiguration { /** * This is the base type that represents a filter. To configure a filter, do not directly instantiate an object of this class. Instead, instantiate - * an object of a derived class such as BoolEqualsFilter, NumberInFilter, StringEqualsFilter etc depending on the type of the key based on + * an object of a derived class such as BoolEqualsFilter, NumberInFilter etc depending on the type of the key based on * which you want to filter. */ export interface Filter { @@ -658,6 +666,8 @@ export interface SubscriptionUpdateParameters { filtersConfiguration?: FiltersConfiguration; /** Expiration time of the event subscription. */ expirationTimeUtc?: Date; + /** Tags relating to Event Subscription resource. */ + tags?: { [propertyName: string]: string }; } /** Result of the List event subscriptions operation. */ @@ -880,8 +890,10 @@ export interface ClientAuthenticationSettings { export interface CustomJwtAuthenticationSettings { /** Expected JWT token issuer. */ tokenIssuer?: string; - /** Information about the certificate that is used for token validation. We currently support maximum 2 certificates. */ + /** Information about the certificates that are used for token validation. We currently support maximum 2 certificates. */ issuerCertificates?: IssuerCertificateInfo[]; + /** Information about the encoded public certificates that are used for custom authentication. */ + encodedIssuerCertificates?: EncodedIssuerCertificateInfo[]; } /** Information about the certificate that is used for token validation. */ @@ -900,6 +912,14 @@ export interface CustomJwtAuthenticationManagedIdentity { userAssignedIdentity?: string; } +/** Information about the public certificate that is used for custom authentication. */ +export interface EncodedIssuerCertificateInfo { + /** Identifier for the certificate. */ + kid: string; + /** Certificate in pem format. */ + encodedCertificate: string; +} + /** Routing identity info for topic spaces configuration. */ export interface RoutingIdentityInfo { /** Routing identity type for topic spaces configuration. */ @@ -1450,7 +1470,7 @@ export interface JsonFieldWithDefault { /** The CA Certificate resource. */ export interface CaCertificate extends Resource { /** - * The system metadata relating to the CaCertificate resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1478,7 +1498,7 @@ export interface CaCertificate extends Resource { /** Channel info. */ export interface Channel extends Resource { /** - * The system metadata relating to Channel resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1504,7 +1524,7 @@ export interface Channel extends Resource { /** The Client group resource. */ export interface ClientGroup extends Resource { /** - * The system metadata relating to the ClientGroup resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1525,7 +1545,7 @@ export interface ClientGroup extends Resource { /** The Client resource. */ export interface Client extends Resource { /** - * The system metadata relating to the Client resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1572,7 +1592,7 @@ export interface TrackedResource extends Resource { /** Domain Topic. */ export interface DomainTopic extends Resource { /** - * The system metadata relating to Domain Topic resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1586,7 +1606,7 @@ export interface DomainTopic extends Resource { /** Event Subscription. */ export interface Subscription extends Resource { /** - * The system metadata relating to Event Subscription resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1603,12 +1623,14 @@ export interface Subscription extends Resource { filtersConfiguration?: FiltersConfiguration; /** Expiration time of the event subscription. */ expirationTimeUtc?: Date; + /** Tags relating to Event Subscription resource. */ + tags?: { [propertyName: string]: string }; } /** Event Subscription. */ export interface EventSubscription extends Resource { /** - * The system metadata relating to Event Subscription resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1657,7 +1679,7 @@ export interface EventSubscription extends Resource { /** Namespace topic details. */ export interface NamespaceTopic extends Resource { /** - * The system metadata relating to namespace topic resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1680,7 +1702,7 @@ export interface NamespaceTopic extends Resource { /** Partner configuration information */ export interface PartnerConfiguration extends Resource { /** - * The system metadata relating to partner configuration resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1711,7 +1733,7 @@ export interface NetworkSecurityPerimeterConfiguration extends Resource { /** The Permission binding resource. */ export interface PermissionBinding extends Resource { /** - * The system metadata relating to the PermissionBinding resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1742,7 +1764,7 @@ export interface EventType extends Resource { displayName?: string; /** Description of the event type. */ description?: string; - /** Url of the schema for this event type. */ + /** URL of the schema for this event type. */ schemaUrl?: string; /** IsInDefaultSet flag of the event type. */ isInDefaultSet?: boolean; @@ -1751,7 +1773,7 @@ export interface EventType extends Resource { /** Event grid Extension Topic. This is used for getting Event Grid related metrics for Azure resources. */ export interface ExtensionTopic extends Resource { /** - * The system metadata relating to Extension Topic resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1764,7 +1786,7 @@ export interface ExtensionTopic extends Resource { /** The Topic space resource. */ export interface TopicSpace extends Resource { /** - * The system metadata relating to the TopicSpace resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -1773,9 +1795,9 @@ export interface TopicSpace extends Resource { /** * The topic filters in the topic space. * Example: "topicTemplates": [ - * "devices/foo/bar", - * "devices/topic1/+", - * "devices/${principal.name}/${principal.attributes.keyName}" ]. + * "devices/foo/bar", + * "devices/topic1/+", + * "devices/${principal.name}/${principal.attributes.keyName}" ]. */ topicTemplates?: string[]; /** @@ -1812,7 +1834,7 @@ export interface TopicTypeInfo extends Resource { /** Verified partner information */ export interface VerifiedPartner extends Resource { /** - * The system metadata relating to Verified Partner resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2364,7 +2386,7 @@ export interface Domain extends TrackedResource { /** Identity information for the Event Grid Domain resource. */ identity?: IdentityInfo; /** - * The system metadata relating to the Event Grid Domain resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2439,7 +2461,7 @@ export interface Namespace extends TrackedResource { /** Identity information for the Namespace resource. */ identity?: IdentityInfo; /** - * The system metadata relating to the namespace resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2457,8 +2479,8 @@ export interface Namespace extends TrackedResource { /** * This is an optional property and it allows the user to specify if the namespace resource supports zone-redundancy capability or not. If this * property is not specified explicitly by the user, its default value depends on the following conditions: - * a. For Availability Zones enabled regions - The default property value would be true. - * b. For non-Availability Zones enabled regions - The default property value would be false. + * a. For Availability Zones enabled regions - The default property value would be true. + * b. For non-Availability Zones enabled regions - The default property value would be false. * Once specified, this property cannot be updated. */ isZoneRedundant?: boolean; @@ -2476,7 +2498,7 @@ export interface Namespace extends TrackedResource { /** Event Grid Partner Destination. */ export interface PartnerDestination extends TrackedResource { /** - * The system metadata relating to Partner Destination resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2505,7 +2527,7 @@ export interface PartnerDestination extends TrackedResource { /** EventGrid Partner Namespace. */ export interface PartnerNamespace extends TrackedResource { /** - * The system metadata relating to Partner Namespace resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2550,7 +2572,7 @@ export interface PartnerNamespace extends TrackedResource { /** Information about a partner registration. */ export interface PartnerRegistration extends TrackedResource { /** - * The system metadata relating to Partner Registration resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2569,7 +2591,7 @@ export interface PartnerRegistration extends TrackedResource { /** Event Grid Partner Topic. */ export interface PartnerTopic extends TrackedResource { /** - * The system metadata relating to Partner Topic resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2605,7 +2627,7 @@ export interface PartnerTopic extends TrackedResource { /** EventGrid System Topic. */ export interface SystemTopic extends TrackedResource { /** - * The system metadata relating to System Topic resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; @@ -2638,7 +2660,7 @@ export interface Topic extends TrackedResource { /** Extended location of the resource. */ extendedLocation?: ExtendedLocation; /** - * The system metadata relating to Topic resource. + * The system metadata relating to the Event Grid resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly systemData?: SystemData; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts b/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts index d7d61ce61b5c..cb5439dc5114 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/mappers.ts @@ -1059,6 +1059,29 @@ export const EventSubscriptionIdentity: coreClient.CompositeMapper = { name: "String", }, }, + federatedIdentityCredentialInfo: { + serializedName: "federatedIdentityCredentialInfo", + type: { + name: "Composite", + className: "FederatedIdentityCredentialInfo", + }, + }, + }, + }, +}; + +export const FederatedIdentityCredentialInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "FederatedIdentityCredentialInfo", + modelProperties: { + federatedClientId: { + serializedName: "federatedClientId", + required: true, + type: { + name: "Uuid", + }, + }, }, }, }; @@ -1260,6 +1283,13 @@ export const SubscriptionUpdateParameters: coreClient.CompositeMapper = { name: "DateTime", }, }, + tags: { + serializedName: "properties.tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, }, }, }; @@ -1799,6 +1829,18 @@ export const CustomJwtAuthenticationSettings: coreClient.CompositeMapper = { }, }, }, + encodedIssuerCertificates: { + serializedName: "encodedIssuerCertificates", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "EncodedIssuerCertificateInfo", + }, + }, + }, + }, }, }, }; @@ -1849,6 +1891,29 @@ export const CustomJwtAuthenticationManagedIdentity: coreClient.CompositeMapper }, }; +export const EncodedIssuerCertificateInfo: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "EncodedIssuerCertificateInfo", + modelProperties: { + kid: { + serializedName: "kid", + required: true, + type: { + name: "String", + }, + }, + encodedCertificate: { + serializedName: "encodedCertificate", + required: true, + type: { + name: "String", + }, + }, + }, + }, +}; + export const RoutingIdentityInfo: coreClient.CompositeMapper = { type: { name: "Composite", @@ -3834,6 +3899,13 @@ export const Subscription: coreClient.CompositeMapper = { name: "DateTime", }, }, + tags: { + serializedName: "properties.tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } }, + }, + }, }, }, }; diff --git a/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts b/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts index 17a0fccc5a78..c71b76805deb 100644 --- a/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts +++ b/sdk/eventgrid/arm-eventgrid/src/models/parameters.ts @@ -49,7 +49,7 @@ import { Topic as TopicMapper, TopicUpdateParameters as TopicUpdateParametersMapper, TopicSpace as TopicSpaceMapper, -} from "../models/mappers"; +} from "../models/mappers.js"; export const accept: OperationParameter = { parameterPath: "accept", @@ -132,7 +132,7 @@ export const caCertificateName: OperationURLParameter = { export const apiVersion: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { - defaultValue: "2024-06-01-preview", + defaultValue: "2024-12-15-preview", isConstant: true, serializedName: "api-version", type: { diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/caCertificates.ts b/sdk/eventgrid/arm-eventgrid/src/operations/caCertificates.ts index 7012995e29c0..4f83ccf15604 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/caCertificates.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/caCertificates.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { CaCertificates } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { CaCertificates } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { CaCertificate, CaCertificatesListByNamespaceNextOptionalParams, @@ -30,7 +30,7 @@ import { CaCertificatesCreateOrUpdateResponse, CaCertificatesDeleteOptionalParams, CaCertificatesListByNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing CaCertificates operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts b/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts index 7e0ae028f9b1..ac63b7fe3c61 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/channels.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Channels } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Channels } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Channel, ChannelsListByPartnerNamespaceNextOptionalParams, @@ -34,7 +34,7 @@ import { ChannelsGetFullUrlOptionalParams, ChannelsGetFullUrlResponse, ChannelsListByPartnerNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Channels operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/clientGroups.ts b/sdk/eventgrid/arm-eventgrid/src/operations/clientGroups.ts index 13d876528a06..d49a84f9fc9b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/clientGroups.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/clientGroups.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { ClientGroups } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { ClientGroups } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { ClientGroup, ClientGroupsListByNamespaceNextOptionalParams, @@ -30,7 +30,7 @@ import { ClientGroupsCreateOrUpdateResponse, ClientGroupsDeleteOptionalParams, ClientGroupsListByNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing ClientGroups operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/clients.ts b/sdk/eventgrid/arm-eventgrid/src/operations/clients.ts index 2df39dd15e45..b3aab4695df7 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/clients.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/clients.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Clients } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Clients } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Client, ClientsListByNamespaceNextOptionalParams, @@ -30,7 +30,7 @@ import { ClientsCreateOrUpdateResponse, ClientsDeleteOptionalParams, ClientsListByNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Clients operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts index ddffcfadb5f2..e1828b468e8c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domainEventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DomainEventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { DomainEventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EventSubscription, DomainEventSubscriptionsListNextOptionalParams, @@ -37,7 +37,7 @@ import { DomainEventSubscriptionsGetFullUrlOptionalParams, DomainEventSubscriptionsGetFullUrlResponse, DomainEventSubscriptionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DomainEventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts index 296935a0de38..3e449282f17b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopicEventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DomainTopicEventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { DomainTopicEventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EventSubscription, DomainTopicEventSubscriptionsListNextOptionalParams, @@ -37,7 +37,7 @@ import { DomainTopicEventSubscriptionsGetFullUrlOptionalParams, DomainTopicEventSubscriptionsGetFullUrlResponse, DomainTopicEventSubscriptionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DomainTopicEventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts index 716119fa6d1a..72510edbce84 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domainTopics.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { DomainTopics } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { DomainTopics } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { DomainTopic, DomainTopicsListByDomainNextOptionalParams, @@ -30,7 +30,7 @@ import { DomainTopicsCreateOrUpdateResponse, DomainTopicsDeleteOptionalParams, DomainTopicsListByDomainNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing DomainTopics operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts b/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts index 825f81bfb1a7..f04e7e133946 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/domains.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Domains } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Domains } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Domain, DomainsListBySubscriptionNextOptionalParams, @@ -41,7 +41,7 @@ import { DomainsRegenerateKeyResponse, DomainsListBySubscriptionNextResponse, DomainsListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Domains operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts index b242854a782c..a7f582b92c85 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/eventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { EventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { EventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EventSubscription, EventSubscriptionsListGlobalBySubscriptionNextOptionalParams, @@ -73,7 +73,7 @@ import { EventSubscriptionsListRegionalByResourceGroupForTopicTypeNextResponse, EventSubscriptionsListByResourceNextResponse, EventSubscriptionsListByDomainTopicNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing EventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts index 577cbc07aac5..5a32b571c148 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/extensionTopics.ts @@ -6,15 +6,15 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { ExtensionTopics } from "../operationsInterfaces"; +import { ExtensionTopics } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { ExtensionTopicsGetOptionalParams, ExtensionTopicsGetResponse, -} from "../models"; +} from "../models/index.js"; /** Class containing ExtensionTopics operations. */ export class ExtensionTopicsImpl implements ExtensionTopics { diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/index.ts b/sdk/eventgrid/arm-eventgrid/src/operations/index.ts index 01ae297e1662..9bf5f2309869 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/index.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/index.ts @@ -6,34 +6,34 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./caCertificates"; -export * from "./channels"; -export * from "./clientGroups"; -export * from "./clients"; -export * from "./domains"; -export * from "./domainTopics"; -export * from "./domainTopicEventSubscriptions"; -export * from "./topicEventSubscriptions"; -export * from "./domainEventSubscriptions"; -export * from "./eventSubscriptions"; -export * from "./systemTopicEventSubscriptions"; -export * from "./namespaceTopicEventSubscriptions"; -export * from "./partnerTopicEventSubscriptions"; -export * from "./namespaces"; -export * from "./namespaceTopics"; -export * from "./operations"; -export * from "./partnerConfigurations"; -export * from "./partnerDestinations"; -export * from "./partnerNamespaces"; -export * from "./partnerRegistrations"; -export * from "./partnerTopics"; -export * from "./networkSecurityPerimeterConfigurations"; -export * from "./permissionBindings"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./systemTopics"; -export * from "./topics"; -export * from "./extensionTopics"; -export * from "./topicSpaces"; -export * from "./topicTypes"; -export * from "./verifiedPartners"; +export * from "./caCertificates.js"; +export * from "./channels.js"; +export * from "./clientGroups.js"; +export * from "./clients.js"; +export * from "./domains.js"; +export * from "./domainTopics.js"; +export * from "./domainTopicEventSubscriptions.js"; +export * from "./topicEventSubscriptions.js"; +export * from "./domainEventSubscriptions.js"; +export * from "./eventSubscriptions.js"; +export * from "./systemTopicEventSubscriptions.js"; +export * from "./namespaceTopicEventSubscriptions.js"; +export * from "./partnerTopicEventSubscriptions.js"; +export * from "./namespaces.js"; +export * from "./namespaceTopics.js"; +export * from "./operations.js"; +export * from "./partnerConfigurations.js"; +export * from "./partnerDestinations.js"; +export * from "./partnerNamespaces.js"; +export * from "./partnerRegistrations.js"; +export * from "./partnerTopics.js"; +export * from "./networkSecurityPerimeterConfigurations.js"; +export * from "./permissionBindings.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./systemTopics.js"; +export * from "./topics.js"; +export * from "./extensionTopics.js"; +export * from "./topicSpaces.js"; +export * from "./topicTypes.js"; +export * from "./verifiedPartners.js"; diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopicEventSubscriptions.ts index 912141f8fc1c..62bae72c220b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopicEventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { NamespaceTopicEventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { NamespaceTopicEventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Subscription, NamespaceTopicEventSubscriptionsListByNamespaceTopicNextOptionalParams, @@ -37,7 +37,7 @@ import { NamespaceTopicEventSubscriptionsGetFullUrlOptionalParams, NamespaceTopicEventSubscriptionsGetFullUrlResponse, NamespaceTopicEventSubscriptionsListByNamespaceTopicNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing NamespaceTopicEventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopics.ts index 42c4e31f327d..0e897e61722a 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/namespaceTopics.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { NamespaceTopics } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { NamespaceTopics } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { NamespaceTopic, NamespaceTopicsListByNamespaceNextOptionalParams, @@ -38,7 +38,7 @@ import { NamespaceTopicsRegenerateKeyOptionalParams, NamespaceTopicsRegenerateKeyResponse, NamespaceTopicsListByNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing NamespaceTopics operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/namespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operations/namespaces.ts index 121376edaae5..d7fc6991198c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/namespaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/namespaces.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Namespaces } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Namespaces } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Namespace, NamespacesListBySubscriptionNextOptionalParams, @@ -44,7 +44,7 @@ import { NamespacesValidateCustomDomainOwnershipResponse, NamespacesListBySubscriptionNextResponse, NamespacesListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Namespaces operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/networkSecurityPerimeterConfigurations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/networkSecurityPerimeterConfigurations.ts index c4e8ff3d237d..9a9d381c7c57 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/networkSecurityPerimeterConfigurations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/networkSecurityPerimeterConfigurations.ts @@ -7,17 +7,17 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces"; +import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { NetworkSecurityPerimeterConfiguration, NetworkSecurityPerimeterResourceType, @@ -27,7 +27,7 @@ import { NetworkSecurityPerimeterConfigurationsGetResponse, NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, NetworkSecurityPerimeterConfigurationsReconcileResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing NetworkSecurityPerimeterConfigurations operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/operations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/operations.ts index 735e99e91d61..b9fd53329916 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/operations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/operations.ts @@ -7,16 +7,16 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { Operations } from "../operationsInterfaces"; +import { Operations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { Operation, OperationsListOptionalParams, OperationsListResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Operations operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts index 8208eeacec57..e94e146f479e 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerConfigurations.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PartnerConfigurations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PartnerConfigurations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PartnerConfiguration, PartnerConfigurationsListByResourceGroupOptionalParams, @@ -40,7 +40,7 @@ import { PartnerConfigurationsUnauthorizePartnerOptionalParams, PartnerConfigurationsUnauthorizePartnerResponse, PartnerConfigurationsListBySubscriptionNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartnerConfigurations operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerDestinations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerDestinations.ts index eac27a8fed64..3243b694170c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerDestinations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerDestinations.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PartnerDestinations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PartnerDestinations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PartnerDestination, PartnerDestinationsListBySubscriptionNextOptionalParams, @@ -39,7 +39,7 @@ import { PartnerDestinationsActivateResponse, PartnerDestinationsListBySubscriptionNextResponse, PartnerDestinationsListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartnerDestinations operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts index b5717063af13..74e1e67ac146 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerNamespaces.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PartnerNamespaces } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PartnerNamespaces } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PartnerNamespace, PartnerNamespacesListBySubscriptionNextOptionalParams, @@ -41,7 +41,7 @@ import { PartnerNamespacesRegenerateKeyResponse, PartnerNamespacesListBySubscriptionNextResponse, PartnerNamespacesListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartnerNamespaces operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts index 0782aed897f2..20d0b282aa5c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerRegistrations.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PartnerRegistrations } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PartnerRegistrations } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PartnerRegistration, PartnerRegistrationsListBySubscriptionNextOptionalParams, @@ -36,7 +36,7 @@ import { PartnerRegistrationsUpdateOptionalParams, PartnerRegistrationsListBySubscriptionNextResponse, PartnerRegistrationsListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartnerRegistrations operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts index e9c7e0951a25..e8a9ff4af3dc 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopicEventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PartnerTopicEventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PartnerTopicEventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EventSubscription, PartnerTopicEventSubscriptionsListByPartnerTopicNextOptionalParams, @@ -37,7 +37,7 @@ import { PartnerTopicEventSubscriptionsGetDeliveryAttributesOptionalParams, PartnerTopicEventSubscriptionsGetDeliveryAttributesResponse, PartnerTopicEventSubscriptionsListByPartnerTopicNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartnerTopicEventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts index 7e1705c96844..385962c28a3b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/partnerTopics.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PartnerTopics } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PartnerTopics } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PartnerTopic, PartnerTopicsListBySubscriptionNextOptionalParams, @@ -41,7 +41,7 @@ import { PartnerTopicsDeactivateResponse, PartnerTopicsListBySubscriptionNextResponse, PartnerTopicsListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PartnerTopics operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/permissionBindings.ts b/sdk/eventgrid/arm-eventgrid/src/operations/permissionBindings.ts index b2bcda71c100..62de08804e2f 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/permissionBindings.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/permissionBindings.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PermissionBindings } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PermissionBindings } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PermissionBinding, PermissionBindingsListByNamespaceNextOptionalParams, @@ -30,7 +30,7 @@ import { PermissionBindingsCreateOrUpdateResponse, PermissionBindingsDeleteOptionalParams, PermissionBindingsListByNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PermissionBindings operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts b/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts index f510eacb9c6d..6edcad360315 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/privateEndpointConnections.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateEndpointConnections } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PrivateEndpointConnections } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { PrivateEndpointConnection, PrivateEndpointConnectionsParentType, @@ -32,7 +32,7 @@ import { PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse, PrivateEndpointConnectionsListByResourceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateEndpointConnections operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts b/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts index a549284aaf36..0e3cccefd6ba 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/privateLinkResources.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { PrivateLinkResources } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { PrivateLinkResources } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { PrivateLinkResource, PrivateLinkResourcesListByResourceNextOptionalParams, @@ -21,7 +21,7 @@ import { PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, PrivateLinkResourcesListByResourceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing PrivateLinkResources operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts index 8ad45d55e39e..b12cfe6b0e64 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopicEventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { SystemTopicEventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { SystemTopicEventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EventSubscription, SystemTopicEventSubscriptionsListBySystemTopicNextOptionalParams, @@ -37,7 +37,7 @@ import { SystemTopicEventSubscriptionsGetFullUrlOptionalParams, SystemTopicEventSubscriptionsGetFullUrlResponse, SystemTopicEventSubscriptionsListBySystemTopicNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing SystemTopicEventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts index b2c755f327cb..0e62f2606997 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/systemTopics.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { SystemTopics } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { SystemTopics } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { SystemTopic, SystemTopicsListBySubscriptionNextOptionalParams, @@ -37,7 +37,7 @@ import { SystemTopicsUpdateResponse, SystemTopicsListBySubscriptionNextResponse, SystemTopicsListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing SystemTopics operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts index 02d0ecfc97a9..7f88603d83c6 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/topicEventSubscriptions.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TopicEventSubscriptions } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { TopicEventSubscriptions } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { EventSubscription, TopicEventSubscriptionsListNextOptionalParams, @@ -37,7 +37,7 @@ import { TopicEventSubscriptionsGetFullUrlOptionalParams, TopicEventSubscriptionsGetFullUrlResponse, TopicEventSubscriptionsListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing TopicEventSubscriptions operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/topicSpaces.ts b/sdk/eventgrid/arm-eventgrid/src/operations/topicSpaces.ts index 6903c586a988..caa721ef506f 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/topicSpaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/topicSpaces.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { TopicSpaces } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { TopicSpaces } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { TopicSpace, TopicSpacesListByNamespaceNextOptionalParams, @@ -30,7 +30,7 @@ import { TopicSpacesCreateOrUpdateResponse, TopicSpacesDeleteOptionalParams, TopicSpacesListByNamespaceNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing TopicSpaces operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/topicTypes.ts b/sdk/eventgrid/arm-eventgrid/src/operations/topicTypes.ts index dde1da7b649e..4de8fcb765a0 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/topicTypes.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/topicTypes.ts @@ -7,11 +7,11 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { TopicTypes } from "../operationsInterfaces"; +import { TopicTypes } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { TopicTypeInfo, TopicTypesListOptionalParams, @@ -21,7 +21,7 @@ import { TopicTypesListEventTypesResponse, TopicTypesGetOptionalParams, TopicTypesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing TopicTypes operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts b/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts index 81008ffd6f2e..c57b5d529798 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/topics.ts @@ -7,18 +7,18 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { Topics } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { Topics } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { SimplePollerLike, OperationState, createHttpPoller, } from "@azure/core-lro"; -import { createLroSpec } from "../lroImpl"; +import { createLroSpec } from "../lroImpl.js"; import { Topic, TopicsListBySubscriptionNextOptionalParams, @@ -45,7 +45,7 @@ import { TopicsRegenerateKeyResponse, TopicsListBySubscriptionNextResponse, TopicsListByResourceGroupNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing Topics operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operations/verifiedPartners.ts b/sdk/eventgrid/arm-eventgrid/src/operations/verifiedPartners.ts index ade2e22aa240..02cd29555756 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operations/verifiedPartners.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operations/verifiedPartners.ts @@ -7,12 +7,12 @@ */ import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging"; -import { setContinuationToken } from "../pagingHelper"; -import { VerifiedPartners } from "../operationsInterfaces"; +import { setContinuationToken } from "../pagingHelper.js"; +import { VerifiedPartners } from "../operationsInterfaces/index.js"; import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { EventGridManagementClient } from "../eventGridManagementClient"; +import * as Mappers from "../models/mappers.js"; +import * as Parameters from "../models/parameters.js"; +import { EventGridManagementClient } from "../eventGridManagementClient.js"; import { VerifiedPartner, VerifiedPartnersListNextOptionalParams, @@ -21,7 +21,7 @@ import { VerifiedPartnersGetOptionalParams, VerifiedPartnersGetResponse, VerifiedPartnersListNextResponse, -} from "../models"; +} from "../models/index.js"; /// /** Class containing VerifiedPartners operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/caCertificates.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/caCertificates.ts index f49e0ad08cee..75cc78cd50c6 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/caCertificates.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/caCertificates.ts @@ -16,7 +16,7 @@ import { CaCertificatesCreateOrUpdateOptionalParams, CaCertificatesCreateOrUpdateResponse, CaCertificatesDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a CaCertificates. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts index 10f654657743..3a073d85cfb0 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/channels.ts @@ -20,7 +20,7 @@ import { ChannelsUpdateOptionalParams, ChannelsGetFullUrlOptionalParams, ChannelsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Channels. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clientGroups.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clientGroups.ts index 190be81a7f18..8eaf2ce2b01d 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clientGroups.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clientGroups.ts @@ -16,7 +16,7 @@ import { ClientGroupsCreateOrUpdateOptionalParams, ClientGroupsCreateOrUpdateResponse, ClientGroupsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a ClientGroups. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clients.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clients.ts index 8ce11fd681c8..357547918e03 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clients.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/clients.ts @@ -16,7 +16,7 @@ import { ClientsCreateOrUpdateOptionalParams, ClientsCreateOrUpdateResponse, ClientsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Clients. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts index 40fd75365094..d63f579844ee 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainEventSubscriptions.ts @@ -23,7 +23,7 @@ import { DomainEventSubscriptionsUpdateResponse, DomainEventSubscriptionsGetFullUrlOptionalParams, DomainEventSubscriptionsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DomainEventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts index d3bd54cca8d8..0b277d7d5fe1 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopicEventSubscriptions.ts @@ -23,7 +23,7 @@ import { DomainTopicEventSubscriptionsUpdateResponse, DomainTopicEventSubscriptionsGetFullUrlOptionalParams, DomainTopicEventSubscriptionsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DomainTopicEventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts index b6e7de2f89e5..f31c986dbb3f 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domainTopics.ts @@ -16,7 +16,7 @@ import { DomainTopicsCreateOrUpdateOptionalParams, DomainTopicsCreateOrUpdateResponse, DomainTopicsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a DomainTopics. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts index a97125fd77e6..9d7042b5c45d 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/domains.ts @@ -24,7 +24,7 @@ import { DomainRegenerateKeyRequest, DomainsRegenerateKeyOptionalParams, DomainsRegenerateKeyResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Domains. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts index da14b12f0517..1e82c7be8ee5 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/eventSubscriptions.ts @@ -32,7 +32,7 @@ import { EventSubscriptionsUpdateResponse, EventSubscriptionsGetFullUrlOptionalParams, EventSubscriptionsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a EventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/extensionTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/extensionTopics.ts index 7aadfccce5b8..2d939cf7ef0b 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/extensionTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/extensionTopics.ts @@ -9,7 +9,7 @@ import { ExtensionTopicsGetOptionalParams, ExtensionTopicsGetResponse, -} from "../models"; +} from "../models/index.js"; /** Interface representing a ExtensionTopics. */ export interface ExtensionTopics { diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/index.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/index.ts index 01ae297e1662..9bf5f2309869 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/index.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/index.ts @@ -6,34 +6,34 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./caCertificates"; -export * from "./channels"; -export * from "./clientGroups"; -export * from "./clients"; -export * from "./domains"; -export * from "./domainTopics"; -export * from "./domainTopicEventSubscriptions"; -export * from "./topicEventSubscriptions"; -export * from "./domainEventSubscriptions"; -export * from "./eventSubscriptions"; -export * from "./systemTopicEventSubscriptions"; -export * from "./namespaceTopicEventSubscriptions"; -export * from "./partnerTopicEventSubscriptions"; -export * from "./namespaces"; -export * from "./namespaceTopics"; -export * from "./operations"; -export * from "./partnerConfigurations"; -export * from "./partnerDestinations"; -export * from "./partnerNamespaces"; -export * from "./partnerRegistrations"; -export * from "./partnerTopics"; -export * from "./networkSecurityPerimeterConfigurations"; -export * from "./permissionBindings"; -export * from "./privateEndpointConnections"; -export * from "./privateLinkResources"; -export * from "./systemTopics"; -export * from "./topics"; -export * from "./extensionTopics"; -export * from "./topicSpaces"; -export * from "./topicTypes"; -export * from "./verifiedPartners"; +export * from "./caCertificates.js"; +export * from "./channels.js"; +export * from "./clientGroups.js"; +export * from "./clients.js"; +export * from "./domains.js"; +export * from "./domainTopics.js"; +export * from "./domainTopicEventSubscriptions.js"; +export * from "./topicEventSubscriptions.js"; +export * from "./domainEventSubscriptions.js"; +export * from "./eventSubscriptions.js"; +export * from "./systemTopicEventSubscriptions.js"; +export * from "./namespaceTopicEventSubscriptions.js"; +export * from "./partnerTopicEventSubscriptions.js"; +export * from "./namespaces.js"; +export * from "./namespaceTopics.js"; +export * from "./operations.js"; +export * from "./partnerConfigurations.js"; +export * from "./partnerDestinations.js"; +export * from "./partnerNamespaces.js"; +export * from "./partnerRegistrations.js"; +export * from "./partnerTopics.js"; +export * from "./networkSecurityPerimeterConfigurations.js"; +export * from "./permissionBindings.js"; +export * from "./privateEndpointConnections.js"; +export * from "./privateLinkResources.js"; +export * from "./systemTopics.js"; +export * from "./topics.js"; +export * from "./extensionTopics.js"; +export * from "./topicSpaces.js"; +export * from "./topicTypes.js"; +export * from "./verifiedPartners.js"; diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopicEventSubscriptions.ts index 3a4d1a0e750b..4a5a66c903c6 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopicEventSubscriptions.ts @@ -23,7 +23,7 @@ import { NamespaceTopicEventSubscriptionsGetDeliveryAttributesResponse, NamespaceTopicEventSubscriptionsGetFullUrlOptionalParams, NamespaceTopicEventSubscriptionsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a NamespaceTopicEventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopics.ts index 5d94820f204c..0ba35645a51a 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaceTopics.ts @@ -24,7 +24,7 @@ import { TopicRegenerateKeyRequest, NamespaceTopicsRegenerateKeyOptionalParams, NamespaceTopicsRegenerateKeyResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a NamespaceTopics. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaces.ts index cb8061e3507b..5492a32cd1a6 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/namespaces.ts @@ -27,7 +27,7 @@ import { NamespacesRegenerateKeyResponse, NamespacesValidateCustomDomainOwnershipOptionalParams, NamespacesValidateCustomDomainOwnershipResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Namespaces. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts index f4ec389bf34d..b0beb13aa89c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts @@ -16,7 +16,7 @@ import { NetworkSecurityPerimeterConfigurationsGetResponse, NetworkSecurityPerimeterConfigurationsReconcileOptionalParams, NetworkSecurityPerimeterConfigurationsReconcileResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a NetworkSecurityPerimeterConfigurations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/operations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/operations.ts index 9fa01395561f..d85941a08768 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/operations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/operations.ts @@ -7,7 +7,7 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Operation, OperationsListOptionalParams } from "../models"; +import { Operation, OperationsListOptionalParams } from "../models/index.js"; /// /** Interface representing a Operations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts index 562958ac7dd7..8428447c12e8 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerConfigurations.ts @@ -25,7 +25,7 @@ import { PartnerConfigurationsAuthorizePartnerResponse, PartnerConfigurationsUnauthorizePartnerOptionalParams, PartnerConfigurationsUnauthorizePartnerResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartnerConfigurations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerDestinations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerDestinations.ts index 2875c7c62620..60c315827e86 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerDestinations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerDestinations.ts @@ -22,7 +22,7 @@ import { PartnerDestinationsUpdateResponse, PartnerDestinationsActivateOptionalParams, PartnerDestinationsActivateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartnerDestinations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts index d1153eebde8d..b0d4d4043c09 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerNamespaces.ts @@ -24,7 +24,7 @@ import { PartnerNamespaceRegenerateKeyRequest, PartnerNamespacesRegenerateKeyOptionalParams, PartnerNamespacesRegenerateKeyResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartnerNamespaces. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts index 988db53524b9..7f5b62aade13 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerRegistrations.ts @@ -19,7 +19,7 @@ import { PartnerRegistrationsDeleteOptionalParams, PartnerRegistrationUpdateParameters, PartnerRegistrationsUpdateOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartnerRegistrations. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts index e90a368a032e..967ee89ec5ed 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopicEventSubscriptions.ts @@ -23,7 +23,7 @@ import { PartnerTopicEventSubscriptionsGetFullUrlResponse, PartnerTopicEventSubscriptionsGetDeliveryAttributesOptionalParams, PartnerTopicEventSubscriptionsGetDeliveryAttributesResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartnerTopicEventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts index 1747ae1c4e60..db098654561d 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/partnerTopics.ts @@ -24,7 +24,7 @@ import { PartnerTopicsActivateResponse, PartnerTopicsDeactivateOptionalParams, PartnerTopicsDeactivateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PartnerTopics. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/permissionBindings.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/permissionBindings.ts index 7c0a66c64ee8..d705a6104843 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/permissionBindings.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/permissionBindings.ts @@ -16,7 +16,7 @@ import { PermissionBindingsCreateOrUpdateOptionalParams, PermissionBindingsCreateOrUpdateResponse, PermissionBindingsDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PermissionBindings. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts index ed4a66ed4c58..439f98f1a33c 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateEndpointConnections.ts @@ -18,7 +18,7 @@ import { PrivateEndpointConnectionsUpdateResponse, PrivateEndpointConnectionsDeleteOptionalParams, PrivateEndpointConnectionsDeleteResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateEndpointConnections. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts index e118bdd68070..219fc07a6207 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/privateLinkResources.ts @@ -12,7 +12,7 @@ import { PrivateLinkResourcesListByResourceOptionalParams, PrivateLinkResourcesGetOptionalParams, PrivateLinkResourcesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a PrivateLinkResources. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts index 355d531c5fe9..cec3eb498bf5 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopicEventSubscriptions.ts @@ -23,7 +23,7 @@ import { SystemTopicEventSubscriptionsUpdateResponse, SystemTopicEventSubscriptionsGetFullUrlOptionalParams, SystemTopicEventSubscriptionsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a SystemTopicEventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts index 1515f8bdb309..6bbb427df314 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/systemTopics.ts @@ -20,7 +20,7 @@ import { SystemTopicUpdateParameters, SystemTopicsUpdateOptionalParams, SystemTopicsUpdateResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a SystemTopics. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts index 03a5d531c8c0..64d15c2ae426 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicEventSubscriptions.ts @@ -23,7 +23,7 @@ import { TopicEventSubscriptionsUpdateResponse, TopicEventSubscriptionsGetFullUrlOptionalParams, TopicEventSubscriptionsGetFullUrlResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a TopicEventSubscriptions. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicSpaces.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicSpaces.ts index 1335bdaa46d4..2839c10158ac 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicSpaces.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicSpaces.ts @@ -16,7 +16,7 @@ import { TopicSpacesCreateOrUpdateOptionalParams, TopicSpacesCreateOrUpdateResponse, TopicSpacesDeleteOptionalParams, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a TopicSpaces. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicTypes.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicTypes.ts index 481f14f61156..d599b519eee5 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicTypes.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topicTypes.ts @@ -14,7 +14,7 @@ import { TopicTypesListEventTypesOptionalParams, TopicTypesGetOptionalParams, TopicTypesGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a TopicTypes. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts index 21e7b7985f44..ff88f7339e41 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/topics.ts @@ -27,7 +27,7 @@ import { TopicRegenerateKeyRequest, TopicsRegenerateKeyOptionalParams, TopicsRegenerateKeyResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a Topics. */ diff --git a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/verifiedPartners.ts b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/verifiedPartners.ts index 4a4631a0102d..2fd611cfbe86 100644 --- a/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/verifiedPartners.ts +++ b/sdk/eventgrid/arm-eventgrid/src/operationsInterfaces/verifiedPartners.ts @@ -12,7 +12,7 @@ import { VerifiedPartnersListOptionalParams, VerifiedPartnersGetOptionalParams, VerifiedPartnersGetResponse, -} from "../models"; +} from "../models/index.js"; /// /** Interface representing a VerifiedPartners. */ diff --git a/sdk/eventgrid/arm-eventgrid/test/eventgrid_examples.ts b/sdk/eventgrid/arm-eventgrid/test/eventgrid_examples.ts index 841ec0954df0..36962f565e7b 100644 --- a/sdk/eventgrid/arm-eventgrid/test/eventgrid_examples.ts +++ b/sdk/eventgrid/arm-eventgrid/test/eventgrid_examples.ts @@ -10,14 +10,12 @@ import { env, Recorder, RecorderStartOptions, - delay, isPlaybackMode, } from "@azure-tools/test-recorder"; import { NoOpCredential } from "@azure-tools/test-credential"; -import { assert } from "chai"; -import { Context } from "mocha"; -import { EventGridManagementClient } from "../src/eventGridManagementClient"; +import { EventGridManagementClient } from "../src/eventGridManagementClient.js"; import { DefaultAzureCredential } from "@azure/identity"; +import { assert } from "vitest"; const replaceableVariables: Record = { AZURE_CLIENT_ID: "azure_client_id", @@ -52,28 +50,28 @@ describe("Eventgrid test", () => { let eventSubscriptionName: string; let domaintopicName: string; - beforeEach(async function (this: Context) { - recorder = new Recorder(this.currentTest); - await recorder.start(recorderOptions); - subscriptionId = env.SUBSCRIPTION_ID || ""; - // This is an example of how the environment variables are used - const credential = createTestCredential(); - client = new EventGridManagementClient( - credential, - subscriptionId, - recorder.configureClientOptions({}), - ); - location = "east us2 euap"; - resourceGroupName = "myjstest"; - topicName = "mytopicxxx"; - domainName = "mydomainxxx"; - domaintopicName = "mydomaintopicxxx"; - eventSubscriptionName = "myeventSubscription"; - }); - - afterEach(async function () { - await recorder.stop(); - }); + beforeEach(async (ctx) => { + recorder = new Recorder(ctx); + await recorder.start(recorderOptions); + subscriptionId = env.SUBSCRIPTION_ID || ""; + // This is an example of how the environment variables are used + const credential = createTestCredential(); + client = new EventGridManagementClient( + credential, + subscriptionId, + recorder.configureClientOptions({}), + ); + location = "east us2 euap"; + resourceGroupName = "myjstest"; + topicName = "mytopicxxx"; + domainName = "mydomainxxx"; + domaintopicName = "mydomaintopicxxx"; + eventSubscriptionName = "myeventSubscription"; + }); + + afterEach(async () => { + await recorder.stop(); + }); it("topics create test", async function () { const res = await client.topics.beginCreateOrUpdateAndWait( @@ -104,17 +102,6 @@ describe("Eventgrid test", () => { }); it("domains update test", async function () { - const res = await client.domains.beginUpdateAndWait( - resourceGroupName, - domainName, - { - tags: { - tag1: "value1", - tag2: "value2", - }, - }, - testPollingOptions, - ); //It's void response }); @@ -222,13 +209,6 @@ describe("Eventgrid test", () => { }); it("domainTopicEventSubscriptions delete test", async function () { - const res = await client.domainTopicEventSubscriptions.beginDeleteAndWait( - resourceGroupName, - domainName, - topicName, - eventSubscriptionName, - testPollingOptions, - ); const resArray = new Array(); for await (let item of client.domainTopicEventSubscriptions.list( resourceGroupName, @@ -241,12 +221,6 @@ describe("Eventgrid test", () => { }); it("domaintopics delete test", async function () { - const res = await client.domainTopics.beginDeleteAndWait( - resourceGroupName, - domainName, - domaintopicName, - testPollingOptions, - ); const resArray = new Array(); for await (let item of client.domainTopics.listByDomain(resourceGroupName, domainName)) { resArray.push(item); @@ -255,16 +229,6 @@ describe("Eventgrid test", () => { }); it("topics delete test", async function () { - const res = await client.topics.beginDeleteAndWait( - resourceGroupName, - topicName, - testPollingOptions, - ); - const res1 = await client.topics.beginDeleteAndWait( - resourceGroupName, - domaintopicName, - testPollingOptions, - ); // when create a domaintopic, it will create a topic with the same name, so we also need to delete that resource to make test pass. const resArray = new Array(); for await (let item of client.topics.listByResourceGroup(resourceGroupName)) { resArray.push(item); @@ -273,11 +237,6 @@ describe("Eventgrid test", () => { }); it("domains delete test", async function () { - const res = await client.domains.beginDeleteAndWait( - resourceGroupName, - domainName, - testPollingOptions, - ); const resArray = new Array(); for await (let item of client.domains.listByResourceGroup(resourceGroupName)) { resArray.push(item); diff --git a/sdk/eventgrid/arm-eventgrid/test/sampleTest.ts b/sdk/eventgrid/arm-eventgrid/test/sampleTest.ts new file mode 100644 index 000000000000..a1cf7c25afd2 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/test/sampleTest.ts @@ -0,0 +1,40 @@ +/* + * 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, +} from "@azure-tools/test-recorder"; + +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 (ctx) => { + recorder = new Recorder(ctx); + await recorder.start(recorderOptions); + }); + + afterEach(async () => { + await recorder.stop(); + }); + + it("sample test", async function () { + console.log("Hi, I'm a test!"); + }); +}); diff --git a/sdk/eventgrid/arm-eventgrid/tsconfig.browser.config.json b/sdk/eventgrid/arm-eventgrid/tsconfig.browser.config.json new file mode 100644 index 000000000000..0c8bafa97126 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/tsconfig.browser.config.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.test.json", + "../../../tsconfig.browser.base.json" + ] +} diff --git a/sdk/eventgrid/arm-eventgrid/tsconfig.json b/sdk/eventgrid/arm-eventgrid/tsconfig.json index bf7a2cee2deb..b35d05ad6e9d 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" + "src/**/*.ts", + "test/**/*.ts" ], "exclude": [ "node_modules" diff --git a/sdk/eventgrid/arm-eventgrid/tsconfig.samples.json b/sdk/eventgrid/arm-eventgrid/tsconfig.samples.json new file mode 100644 index 000000000000..6d83ae6cdaf5 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/tsconfig.samples.json @@ -0,0 +1,10 @@ +{ + "extends": "../../../tsconfig.samples.base.json", + "compilerOptions": { + "paths": { + "@azure/arm-eventgrid": [ + "./dist/esm" + ] + } + } +} diff --git a/sdk/eventgrid/arm-eventgrid/tsconfig.src.json b/sdk/eventgrid/arm-eventgrid/tsconfig.src.json new file mode 100644 index 000000000000..bae70752dd38 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/tsconfig.src.json @@ -0,0 +1,3 @@ +{ + "extends": "../../../tsconfig.lib.json" +} diff --git a/sdk/eventgrid/arm-eventgrid/tsconfig.test.json b/sdk/eventgrid/arm-eventgrid/tsconfig.test.json new file mode 100644 index 000000000000..3c2b783a8c1b --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/tsconfig.test.json @@ -0,0 +1,6 @@ +{ + "extends": [ + "./tsconfig.src.json", + "../../../tsconfig.test.base.json" + ] +} diff --git a/sdk/eventgrid/arm-eventgrid/vitest.browser.config.ts b/sdk/eventgrid/arm-eventgrid/vitest.browser.config.ts new file mode 100644 index 000000000000..182729ab5ce9 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/vitest.browser.config.ts @@ -0,0 +1,17 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.browser.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + include: ["dist-test/browser/test/**/*.spec.js",], + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/eventgrid/arm-eventgrid/vitest.config.ts b/sdk/eventgrid/arm-eventgrid/vitest.config.ts new file mode 100644 index 000000000000..40e031385dd8 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/vitest.config.ts @@ -0,0 +1,16 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { defineConfig, mergeConfig } from "vitest/config"; +import viteConfig from "../../../vitest.shared.config.ts"; + +export default mergeConfig( + viteConfig, + defineConfig({ + test: { + testTimeout: 1200000, + hookTimeout: 1200000, + }, + }), +); diff --git a/sdk/eventgrid/arm-eventgrid/vitest.esm.config.ts b/sdk/eventgrid/arm-eventgrid/vitest.esm.config.ts new file mode 100644 index 000000000000..a70127279fc9 --- /dev/null +++ b/sdk/eventgrid/arm-eventgrid/vitest.esm.config.ts @@ -0,0 +1,12 @@ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +import { mergeConfig } from "vitest/config"; +import vitestConfig from "./vitest.config.ts"; +import vitestEsmConfig from "../../../vitest.esm.shared.config.ts"; + +export default mergeConfig( + vitestConfig, + vitestEsmConfig +);