@azure/eventgrid 5.8.1-alpha.20241125.1 → 5.8.1-alpha.20241127.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/cloudEventDistrubtedTracingEnricherPolicy.d.ts +23 -0
- package/dist/browser/cloudEventDistrubtedTracingEnricherPolicy.d.ts.map +1 -0
- package/dist/browser/constants.d.ts +3 -0
- package/dist/browser/constants.d.ts.map +1 -0
- package/dist/browser/consumer.d.ts +41 -0
- package/dist/browser/consumer.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/consumer.js +3 -3
- package/dist/browser/consumer.js.map +1 -0
- package/dist/browser/cryptoHelpers-browser.d.mts.map +1 -0
- package/dist/browser/cryptoHelpers-browser.mjs.map +1 -0
- package/dist/browser/cryptoHelpers.d.ts +5 -0
- package/{dist-esm/src/cryptoHelpers.browser.js → dist/browser/cryptoHelpers.js} +3 -3
- package/dist/browser/eventGridAuthenticationPolicy.d.ts +12 -0
- package/dist/browser/eventGridAuthenticationPolicy.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventGridAuthenticationPolicy.js +1 -1
- package/dist/browser/eventGridAuthenticationPolicy.js.map +1 -0
- package/dist/browser/eventGridClient.d.ts +117 -0
- package/dist/browser/eventGridClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/eventGridClient.js +9 -9
- package/dist/browser/eventGridClient.js.map +1 -0
- package/dist/browser/generateSharedAccessSignature.d.ts +19 -0
- package/dist/browser/generateSharedAccessSignature.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generateSharedAccessSignature.js +3 -3
- package/dist/browser/generateSharedAccessSignature.js.map +1 -0
- package/dist/browser/generated/generatedClient.d.ts +32 -0
- package/dist/browser/generated/generatedClient.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/generatedClient.js +3 -3
- package/dist/browser/generated/generatedClient.js.map +1 -0
- package/dist/browser/generated/generatedClientContext.d.ts +12 -0
- package/dist/browser/generated/generatedClientContext.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/generatedClientContext.js.map +1 -1
- package/dist/browser/generated/index.d.ts +4 -0
- package/dist/browser/generated/index.d.ts.map +1 -0
- package/{dist-esm/src → dist/browser}/generated/index.js +3 -3
- package/dist/browser/generated/index.js.map +1 -0
- package/{types/eventgrid.d.ts → dist/browser/generated/models/index.d.ts} +4330 -5282
- package/dist/browser/generated/models/index.d.ts.map +1 -0
- package/dist/browser/generated/models/mappers.d.ts +302 -0
- package/dist/browser/generated/models/mappers.d.ts.map +1 -0
- package/dist/browser/generated/models/parameters.d.ts +10 -0
- package/dist/browser/generated/models/parameters.d.ts.map +1 -0
- package/dist/browser/index.d.ts +8 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +8 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/logger.d.ts +5 -0
- package/dist/browser/logger.d.ts.map +1 -0
- package/dist/browser/models.d.ts +159 -0
- package/dist/browser/models.d.ts.map +1 -0
- package/dist/browser/package.json +3 -0
- package/dist/browser/predicates.d.ts +451 -0
- package/dist/browser/predicates.d.ts.map +1 -0
- package/dist/browser/predicates.js.map +1 -0
- package/dist/browser/tracing.d.ts +6 -0
- package/dist/browser/tracing.d.ts.map +1 -0
- package/dist/browser/util.d.ts +26 -0
- package/dist/browser/util.d.ts.map +1 -0
- package/dist/commonjs/cloudEventDistrubtedTracingEnricherPolicy.d.ts +23 -0
- package/dist/commonjs/cloudEventDistrubtedTracingEnricherPolicy.d.ts.map +1 -0
- package/dist/commonjs/cloudEventDistrubtedTracingEnricherPolicy.js +57 -0
- package/dist/commonjs/cloudEventDistrubtedTracingEnricherPolicy.js.map +1 -0
- package/dist/commonjs/constants.d.ts +3 -0
- package/dist/commonjs/constants.d.ts.map +1 -0
- package/dist/commonjs/constants.js +8 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/consumer.d.ts +41 -0
- package/dist/commonjs/consumer.d.ts.map +1 -0
- package/dist/commonjs/consumer.js +88 -0
- package/dist/commonjs/consumer.js.map +1 -0
- package/dist/commonjs/cryptoHelpers.d.ts +5 -0
- package/dist/commonjs/cryptoHelpers.d.ts.map +1 -0
- package/dist/commonjs/cryptoHelpers.js +14 -0
- package/dist/commonjs/cryptoHelpers.js.map +1 -0
- package/dist/commonjs/eventGridAuthenticationPolicy.d.ts +12 -0
- package/dist/commonjs/eventGridAuthenticationPolicy.d.ts.map +1 -0
- package/dist/commonjs/eventGridAuthenticationPolicy.js +38 -0
- package/dist/commonjs/eventGridAuthenticationPolicy.js.map +1 -0
- package/dist/commonjs/eventGridClient.d.ts +117 -0
- package/dist/commonjs/eventGridClient.d.ts.map +1 -0
- package/dist/commonjs/eventGridClient.js +131 -0
- package/dist/commonjs/eventGridClient.js.map +1 -0
- package/dist/commonjs/generateSharedAccessSignature.d.ts +19 -0
- package/dist/commonjs/generateSharedAccessSignature.d.ts.map +1 -0
- package/dist/commonjs/generateSharedAccessSignature.js +23 -0
- package/dist/commonjs/generateSharedAccessSignature.js.map +1 -0
- package/dist/commonjs/generated/generatedClient.d.ts +32 -0
- package/dist/commonjs/generated/generatedClient.d.ts.map +1 -0
- package/dist/commonjs/generated/generatedClient.js +89 -0
- package/dist/commonjs/generated/generatedClient.js.map +1 -0
- package/dist/commonjs/generated/generatedClientContext.d.ts +12 -0
- package/dist/commonjs/generated/generatedClientContext.d.ts.map +1 -0
- package/dist/commonjs/generated/generatedClientContext.js +40 -0
- package/dist/commonjs/generated/generatedClientContext.js.map +1 -0
- package/dist/commonjs/generated/index.d.ts +4 -0
- package/dist/commonjs/generated/index.d.ts.map +1 -0
- package/dist/commonjs/generated/index.js +17 -0
- package/dist/commonjs/generated/index.js.map +1 -0
- package/dist/commonjs/generated/models/index.d.ts +4330 -0
- package/dist/commonjs/generated/models/index.d.ts.map +1 -0
- package/dist/commonjs/generated/models/index.js +10 -0
- package/dist/commonjs/generated/models/index.js.map +1 -0
- package/dist/commonjs/generated/models/mappers.d.ts +302 -0
- package/dist/commonjs/generated/models/mappers.d.ts.map +1 -0
- package/dist/commonjs/generated/models/mappers.js +9949 -0
- package/dist/commonjs/generated/models/mappers.js.map +1 -0
- package/dist/commonjs/generated/models/parameters.d.ts +10 -0
- package/dist/commonjs/generated/models/parameters.d.ts.map +1 -0
- package/dist/commonjs/generated/models/parameters.js +111 -0
- package/dist/commonjs/generated/models/parameters.js.map +1 -0
- package/dist/commonjs/index.d.ts +8 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +17 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/logger.d.ts +5 -0
- package/dist/commonjs/logger.d.ts.map +1 -0
- package/dist/commonjs/logger.js +11 -0
- package/dist/commonjs/logger.js.map +1 -0
- package/dist/commonjs/models.d.ts +159 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +20 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/predicates.d.ts +451 -0
- package/dist/commonjs/predicates.d.ts.map +1 -0
- package/dist/commonjs/predicates.js +22 -0
- package/dist/commonjs/predicates.js.map +1 -0
- package/dist/commonjs/tracing.d.ts +6 -0
- package/dist/commonjs/tracing.d.ts.map +1 -0
- package/dist/commonjs/tracing.js +16 -0
- package/dist/commonjs/tracing.js.map +1 -0
- package/dist/commonjs/tsdoc-metadata.json +11 -0
- package/dist/commonjs/util.d.ts +26 -0
- package/dist/commonjs/util.d.ts.map +1 -0
- package/dist/commonjs/util.js +116 -0
- package/dist/commonjs/util.js.map +1 -0
- package/dist/esm/cloudEventDistrubtedTracingEnricherPolicy.d.ts +23 -0
- package/dist/esm/cloudEventDistrubtedTracingEnricherPolicy.d.ts.map +1 -0
- package/dist/esm/cloudEventDistrubtedTracingEnricherPolicy.js +53 -0
- package/dist/esm/cloudEventDistrubtedTracingEnricherPolicy.js.map +1 -0
- package/dist/esm/constants.d.ts +3 -0
- package/dist/esm/constants.d.ts.map +1 -0
- package/dist/esm/constants.js +5 -0
- package/dist/esm/constants.js.map +1 -0
- package/dist/esm/consumer.d.ts +41 -0
- package/dist/esm/consumer.d.ts.map +1 -0
- package/dist/esm/consumer.js +84 -0
- package/dist/esm/consumer.js.map +1 -0
- package/dist/esm/cryptoHelpers.d.ts +5 -0
- package/dist/esm/cryptoHelpers.d.ts.map +1 -0
- package/{dist-esm/src → dist/esm}/cryptoHelpers.js +1 -1
- package/{dist-esm/src → dist/esm}/cryptoHelpers.js.map +1 -1
- package/dist/esm/eventGridAuthenticationPolicy.d.ts +12 -0
- package/dist/esm/eventGridAuthenticationPolicy.d.ts.map +1 -0
- package/dist/esm/eventGridAuthenticationPolicy.js +34 -0
- package/dist/esm/eventGridAuthenticationPolicy.js.map +1 -0
- package/dist/esm/eventGridClient.d.ts +117 -0
- package/dist/esm/eventGridClient.d.ts.map +1 -0
- package/dist/esm/eventGridClient.js +125 -0
- package/dist/esm/eventGridClient.js.map +1 -0
- package/dist/esm/generateSharedAccessSignature.d.ts +19 -0
- package/dist/esm/generateSharedAccessSignature.d.ts.map +1 -0
- package/dist/esm/generateSharedAccessSignature.js +20 -0
- package/dist/esm/generateSharedAccessSignature.js.map +1 -0
- package/dist/esm/generated/generatedClient.d.ts +32 -0
- package/dist/esm/generated/generatedClient.d.ts.map +1 -0
- package/dist/esm/generated/generatedClient.js +84 -0
- package/dist/esm/generated/generatedClient.js.map +1 -0
- package/dist/esm/generated/generatedClientContext.d.ts +12 -0
- package/dist/esm/generated/generatedClientContext.d.ts.map +1 -0
- package/dist/esm/generated/generatedClientContext.js +35 -0
- package/dist/esm/generated/generatedClientContext.js.map +1 -0
- package/dist/esm/generated/index.d.ts +4 -0
- package/dist/esm/generated/index.d.ts.map +1 -0
- package/dist/esm/generated/index.js +11 -0
- package/dist/esm/generated/index.js.map +1 -0
- package/dist/esm/generated/models/index.d.ts +4330 -0
- package/dist/esm/generated/models/index.d.ts.map +1 -0
- package/dist/esm/generated/models/index.js +9 -0
- package/dist/esm/generated/models/index.js.map +1 -0
- package/dist/esm/generated/models/mappers.d.ts +302 -0
- package/dist/esm/generated/models/mappers.d.ts.map +1 -0
- package/dist/{index.js → esm/generated/models/mappers.js} +298 -1335
- package/dist/esm/generated/models/mappers.js.map +1 -0
- package/dist/esm/generated/models/parameters.d.ts +10 -0
- package/dist/esm/generated/models/parameters.d.ts.map +1 -0
- package/dist/esm/generated/models/parameters.js +108 -0
- package/dist/esm/generated/models/parameters.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/logger.d.ts +5 -0
- package/dist/esm/logger.d.ts.map +1 -0
- package/dist/esm/logger.js +8 -0
- package/dist/esm/logger.js.map +1 -0
- package/dist/esm/models.d.ts +159 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +17 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/predicates.d.ts +451 -0
- package/dist/esm/predicates.d.ts.map +1 -0
- package/dist/esm/predicates.js +19 -0
- package/dist/esm/predicates.js.map +1 -0
- package/dist/esm/tracing.d.ts +6 -0
- package/dist/esm/tracing.d.ts.map +1 -0
- package/dist/esm/tracing.js +13 -0
- package/dist/esm/tracing.js.map +1 -0
- package/dist/esm/util.d.ts +26 -0
- package/dist/esm/util.d.ts.map +1 -0
- package/dist/esm/util.js +109 -0
- package/dist/esm/util.js.map +1 -0
- package/dist/react-native/cloudEventDistrubtedTracingEnricherPolicy.d.ts +23 -0
- package/dist/react-native/cloudEventDistrubtedTracingEnricherPolicy.d.ts.map +1 -0
- package/dist/react-native/cloudEventDistrubtedTracingEnricherPolicy.js +53 -0
- package/dist/react-native/cloudEventDistrubtedTracingEnricherPolicy.js.map +1 -0
- package/dist/react-native/constants.d.ts +3 -0
- package/dist/react-native/constants.d.ts.map +1 -0
- package/dist/react-native/constants.js +5 -0
- package/dist/react-native/constants.js.map +1 -0
- package/dist/react-native/consumer.d.ts +41 -0
- package/dist/react-native/consumer.d.ts.map +1 -0
- package/dist/react-native/consumer.js +84 -0
- package/dist/react-native/consumer.js.map +1 -0
- package/dist/react-native/cryptoHelpers.d.ts +5 -0
- package/dist/react-native/cryptoHelpers.d.ts.map +1 -0
- package/dist/react-native/cryptoHelpers.js +11 -0
- package/dist/react-native/cryptoHelpers.js.map +1 -0
- package/dist/react-native/eventGridAuthenticationPolicy.d.ts +12 -0
- package/dist/react-native/eventGridAuthenticationPolicy.d.ts.map +1 -0
- package/dist/react-native/eventGridAuthenticationPolicy.js +34 -0
- package/dist/react-native/eventGridAuthenticationPolicy.js.map +1 -0
- package/dist/react-native/eventGridClient.d.ts +117 -0
- package/dist/react-native/eventGridClient.d.ts.map +1 -0
- package/dist/react-native/eventGridClient.js +125 -0
- package/dist/react-native/eventGridClient.js.map +1 -0
- package/dist/react-native/generateSharedAccessSignature.d.ts +19 -0
- package/dist/react-native/generateSharedAccessSignature.d.ts.map +1 -0
- package/dist/react-native/generateSharedAccessSignature.js +20 -0
- package/dist/react-native/generateSharedAccessSignature.js.map +1 -0
- package/dist/react-native/generated/generatedClient.d.ts +32 -0
- package/dist/react-native/generated/generatedClient.d.ts.map +1 -0
- package/dist/react-native/generated/generatedClient.js +84 -0
- package/dist/react-native/generated/generatedClient.js.map +1 -0
- package/dist/react-native/generated/generatedClientContext.d.ts +12 -0
- package/dist/react-native/generated/generatedClientContext.d.ts.map +1 -0
- package/dist/react-native/generated/generatedClientContext.js +35 -0
- package/dist/react-native/generated/generatedClientContext.js.map +1 -0
- package/dist/react-native/generated/index.d.ts +4 -0
- package/dist/react-native/generated/index.d.ts.map +1 -0
- package/dist/react-native/generated/index.js +11 -0
- package/dist/react-native/generated/index.js.map +1 -0
- package/dist/react-native/generated/models/index.d.ts +4330 -0
- package/dist/react-native/generated/models/index.d.ts.map +1 -0
- package/dist/react-native/generated/models/index.js +9 -0
- package/dist/react-native/generated/models/index.js.map +1 -0
- package/dist/react-native/generated/models/mappers.d.ts +302 -0
- package/dist/react-native/generated/models/mappers.d.ts.map +1 -0
- package/dist/react-native/generated/models/mappers.js +9941 -0
- package/dist/react-native/generated/models/mappers.js.map +1 -0
- package/dist/react-native/generated/models/parameters.d.ts +10 -0
- package/dist/react-native/generated/models/parameters.d.ts.map +1 -0
- package/dist/react-native/generated/models/parameters.js +108 -0
- package/dist/react-native/generated/models/parameters.js.map +1 -0
- package/dist/react-native/index.d.ts +8 -0
- package/dist/react-native/index.d.ts.map +1 -0
- package/dist/react-native/index.js +8 -0
- package/dist/react-native/index.js.map +1 -0
- package/dist/react-native/logger.d.ts +5 -0
- package/dist/react-native/logger.d.ts.map +1 -0
- package/dist/react-native/logger.js +8 -0
- package/dist/react-native/logger.js.map +1 -0
- package/dist/react-native/models.d.ts +159 -0
- package/dist/react-native/models.d.ts.map +1 -0
- package/dist/react-native/models.js +17 -0
- package/dist/react-native/models.js.map +1 -0
- package/dist/react-native/package.json +3 -0
- package/dist/react-native/predicates.d.ts +451 -0
- package/dist/react-native/predicates.d.ts.map +1 -0
- package/dist/react-native/predicates.js +19 -0
- package/dist/react-native/predicates.js.map +1 -0
- package/dist/react-native/tracing.d.ts +6 -0
- package/dist/react-native/tracing.d.ts.map +1 -0
- package/dist/react-native/tracing.js +13 -0
- package/dist/react-native/tracing.js.map +1 -0
- package/dist/react-native/util.d.ts +26 -0
- package/dist/react-native/util.d.ts.map +1 -0
- package/dist/react-native/util.js +109 -0
- package/dist/react-native/util.js.map +1 -0
- package/package.json +65 -52
- package/dist/index.js.map +0 -1
- package/dist-esm/src/consumer.js.map +0 -1
- package/dist-esm/src/cryptoHelpers.browser.js.map +0 -1
- package/dist-esm/src/eventGridAuthenticationPolicy.js.map +0 -1
- package/dist-esm/src/eventGridClient.js.map +0 -1
- package/dist-esm/src/generateSharedAccessSignature.js.map +0 -1
- package/dist-esm/src/generated/generatedClient.js.map +0 -1
- package/dist-esm/src/generated/index.js.map +0 -1
- package/dist-esm/src/index.js +0 -8
- package/dist-esm/src/index.js.map +0 -1
- package/dist-esm/src/predicates.js.map +0 -1
- /package/{dist-esm/src → dist/browser}/cloudEventDistrubtedTracingEnricherPolicy.js +0 -0
- /package/{dist-esm/src → dist/browser}/cloudEventDistrubtedTracingEnricherPolicy.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js +0 -0
- /package/{dist-esm/src → dist/browser}/constants.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/generatedClientContext.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/index.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/index.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/mappers.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/mappers.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/parameters.js +0 -0
- /package/{dist-esm/src → dist/browser}/generated/models/parameters.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js +0 -0
- /package/{dist-esm/src → dist/browser}/logger.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/models.js +0 -0
- /package/{dist-esm/src → dist/browser}/models.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/predicates.js +0 -0
- /package/{dist-esm/src → dist/browser}/tracing.js +0 -0
- /package/{dist-esm/src → dist/browser}/tracing.js.map +0 -0
- /package/{dist-esm/src → dist/browser}/util.js +0 -0
- /package/{dist-esm/src → dist/browser}/util.js.map +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"predicates.js","sourceRoot":"","sources":["../../src/predicates.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAyoBlC;;;;GAIG;AACH,SAAS,gBAAgB,CACvB,CAAgD;IAEhD,OAAQ,CAAS,CAAC,MAAM,KAAK,SAAS,CAAC;AACzC,CAAC;AA4BD,MAAM,UAAU,aAAa,CAC3B,SAAY,EACZ,KAAoD;IAIpD,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO,KAAK,CAAC,IAAI,KAAK,SAAS,CAAC;IAClC,CAAC;SAAM,CAAC;QACN,OAAO,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC;IACvC,CAAC;AACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n AcsChatMessageDeletedEventData,\n AcsChatMessageDeletedInThreadEventData,\n AcsChatMessageEditedEventData,\n AcsChatMessageEditedInThreadEventData,\n AcsChatMessageReceivedEventData,\n AcsChatMessageReceivedInThreadEventData,\n AcsChatParticipantAddedToThreadEventData,\n AcsChatParticipantAddedToThreadWithUserEventData,\n AcsChatParticipantRemovedFromThreadEventData,\n AcsChatParticipantRemovedFromThreadWithUserEventData,\n AcsChatThreadCreatedWithUserEventData,\n AcsChatThreadPropertiesUpdatedPerUserEventData,\n AcsChatThreadWithUserDeletedEventData,\n AcsRecordingFileStatusUpdatedEventData,\n AcsSmsDeliveryReportReceivedEventData,\n AcsSmsReceivedEventData,\n AcsUserDisconnectedEventData,\n ApiManagementApiCreatedEventData,\n ApiManagementApiDeletedEventData,\n ApiManagementApiReleaseCreatedEventData,\n ApiManagementApiReleaseDeletedEventData,\n ApiManagementApiReleaseUpdatedEventData,\n ApiManagementApiUpdatedEventData,\n ApiManagementProductCreatedEventData,\n ApiManagementProductDeletedEventData,\n ApiManagementProductUpdatedEventData,\n ApiManagementSubscriptionCreatedEventData,\n ApiManagementSubscriptionDeletedEventData,\n ApiManagementSubscriptionUpdatedEventData,\n ApiManagementUserCreatedEventData,\n ApiManagementUserDeletedEventData,\n ApiManagementUserUpdatedEventData,\n AppConfigurationKeyValueDeletedEventData,\n AppConfigurationKeyValueModifiedEventData,\n ContainerRegistryChartDeletedEventData,\n ContainerRegistryChartPushedEventData,\n ContainerRegistryImageDeletedEventData,\n ContainerRegistryImagePushedEventData,\n ContainerServiceNewKubernetesVersionAvailableEventData,\n EventHubCaptureFileCreatedEventData,\n HealthcareDicomImageCreatedEventData,\n HealthcareDicomImageDeletedEventData,\n HealthcareFhirResourceCreatedEventData,\n HealthcareFhirResourceDeletedEventData,\n HealthcareFhirResourceUpdatedEventData,\n IotHubDeviceConnectedEventData,\n IotHubDeviceCreatedEventData,\n IotHubDeviceDeletedEventData,\n IotHubDeviceDisconnectedEventData,\n IotHubDeviceTelemetryEventData,\n KeyVaultAccessPolicyChangedEventData,\n KeyVaultCertificateExpiredEventData,\n KeyVaultCertificateNearExpiryEventData,\n KeyVaultCertificateNewVersionCreatedEventData,\n KeyVaultKeyExpiredEventData,\n KeyVaultKeyNearExpiryEventData,\n KeyVaultKeyNewVersionCreatedEventData,\n KeyVaultSecretExpiredEventData,\n KeyVaultSecretNearExpiryEventData,\n KeyVaultSecretNewVersionCreatedEventData,\n MachineLearningServicesDatasetDriftDetectedEventData,\n MachineLearningServicesModelDeployedEventData,\n MachineLearningServicesModelRegisteredEventData,\n MachineLearningServicesRunCompletedEventData,\n MachineLearningServicesRunStatusChangedEventData,\n MapsGeofenceEnteredEventData,\n MapsGeofenceExitedEventData,\n MapsGeofenceResultEventData,\n MediaJobCanceledEventData,\n MediaJobCancelingEventData,\n MediaJobErroredEventData,\n MediaJobFinishedEventData,\n MediaJobOutputCanceledEventData,\n MediaJobOutputCancelingEventData,\n MediaJobOutputErroredEventData,\n MediaJobOutputFinishedEventData,\n MediaJobOutputProcessingEventData,\n MediaJobOutputProgressEventData,\n MediaJobOutputScheduledEventData,\n MediaJobOutputStateChangeEventData,\n MediaJobProcessingEventData,\n MediaJobScheduledEventData,\n MediaJobStateChangeEventData,\n MediaLiveEventChannelArchiveHeartbeatEventData,\n MediaLiveEventConnectionRejectedEventData,\n MediaLiveEventEncoderConnectedEventData,\n MediaLiveEventEncoderDisconnectedEventData,\n MediaLiveEventIncomingDataChunkDroppedEventData,\n MediaLiveEventIncomingStreamReceivedEventData,\n MediaLiveEventIncomingStreamsOutOfSyncEventData,\n MediaLiveEventIncomingVideoStreamsOutOfSyncEventData,\n MediaLiveEventIngestHeartbeatEventData,\n MediaLiveEventTrackDiscontinuityDetectedEventData,\n PolicyInsightsPolicyStateChangedEventData,\n PolicyInsightsPolicyStateCreatedEventData,\n PolicyInsightsPolicyStateDeletedEventData,\n ResourceActionCancelEventData,\n ResourceActionFailureEventData,\n ResourceActionSuccessEventData,\n ResourceDeleteCancelEventData,\n ResourceDeleteFailureEventData,\n ResourceDeleteSuccessEventData,\n ResourceWriteCancelEventData,\n ResourceWriteFailureEventData,\n ResourceWriteSuccessEventData,\n ServiceBusActiveMessagesAvailableWithNoListenersEventData,\n ServiceBusDeadletterMessagesAvailableWithNoListenersEventData,\n StorageAsyncOperationInitiatedEventData,\n StorageBlobCreatedEventData,\n StorageBlobDeletedEventData,\n StorageBlobInventoryPolicyCompletedEventData,\n StorageBlobRenamedEventData,\n StorageBlobTierChangedEventData,\n StorageDirectoryCreatedEventData,\n StorageDirectoryDeletedEventData,\n StorageDirectoryRenamedEventData,\n StorageLifecyclePolicyCompletedEventData,\n SubscriptionDeletedEventData,\n SubscriptionValidationEventData,\n WebAppServicePlanUpdatedEventData,\n WebAppUpdatedEventData,\n WebBackupOperationCompletedEventData,\n WebBackupOperationFailedEventData,\n WebBackupOperationStartedEventData,\n WebRestoreOperationCompletedEventData,\n WebRestoreOperationFailedEventData,\n WebRestoreOperationStartedEventData,\n WebSlotSwapCompletedEventData,\n WebSlotSwapFailedEventData,\n WebSlotSwapStartedEventData,\n WebSlotSwapWithPreviewCancelledEventData,\n WebSlotSwapWithPreviewStartedEventData,\n StorageTaskQueuedEventData,\n StorageTaskCompletedEventData,\n DataBoxCopyStartedEventData,\n DataBoxCopyCompletedEventData,\n DataBoxOrderCompletedEventData,\n AcsIncomingCallEventData,\n AcsEmailDeliveryReportReceivedEventData,\n AcsEmailEngagementTrackingReportReceivedEventData,\n ApiManagementGatewayCreatedEventData,\n ApiManagementGatewayUpdatedEventData,\n ApiManagementGatewayDeletedEventData,\n ApiManagementGatewayHostnameConfigurationCreatedEventData,\n ApiManagementGatewayHostnameConfigurationUpdatedEventData,\n ApiManagementGatewayHostnameConfigurationDeletedEventData,\n ApiManagementGatewayCertificateAuthorityCreatedEventData,\n ApiManagementGatewayCertificateAuthorityUpdatedEventData,\n ApiManagementGatewayCertificateAuthorityDeletedEventData,\n ApiManagementGatewayApiAddedEventData,\n ApiManagementGatewayApiRemovedEventData,\n HealthcareDicomImageUpdatedEventData,\n ContainerServiceClusterSupportEndedEventData,\n ContainerServiceClusterSupportEndingEventData,\n ContainerServiceNodePoolRollingStartedEventData,\n ContainerServiceNodePoolRollingSucceededEventData,\n ContainerServiceNodePoolRollingFailedEventData,\n EventGridMqttClientCreatedOrUpdatedEventData,\n EventGridMqttClientDeletedEventData,\n EventGridMqttClientSessionConnectedEventData,\n EventGridMqttClientSessionDisconnectedEventData,\n AppConfigurationSnapshotCreatedEventData,\n AppConfigurationSnapshotModifiedEventData,\n ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData,\n ResourceNotificationsHealthResourcesAnnotatedEventData,\n AcsRouterWorkerDeregisteredEventData,\n AcsRouterWorkerRegisteredEventData,\n AcsRouterJobCancelledEventData,\n AcsRouterJobClassificationFailedEventData,\n AcsRouterJobClassifiedEventData,\n AcsRouterJobClosedEventData,\n AcsRouterJobCompletedEventData,\n AcsRouterJobDeletedEventData,\n AcsRouterJobExceptionTriggeredEventData,\n AcsRouterJobQueuedEventData,\n AcsRouterJobReceivedEventData,\n AcsRouterJobSchedulingFailedEventData,\n AcsRouterJobUnassignedEventData,\n AcsRouterJobWaitingForActivationEventData,\n AcsRouterJobWorkerSelectorsExpiredEventData,\n AcsRouterWorkerDeletedEventData,\n AcsRouterWorkerOfferAcceptedEventData,\n AcsRouterWorkerOfferDeclinedEventData,\n AcsRouterWorkerOfferExpiredEventData,\n AcsRouterWorkerOfferIssuedEventData,\n AcsRouterWorkerOfferRevokedEventData,\n ResourceNotificationsResourceManagementCreatedOrUpdatedEventData,\n ResourceNotificationsResourceManagementDeletedEventData,\n StorageTaskAssignmentQueuedEventData,\n AvsScriptExecutionStartedEventData,\n AvsScriptExecutionCancelledEventData,\n AvsClusterCreatedEventData,\n AvsPrivateCloudFailedEventData,\n AvsPrivateCloudUpdatingEventData,\n AvsPrivateCloudUpdatedEventData,\n AvsClusterUpdatingEventData,\n AvsClusterDeletedEventData,\n AvsScriptExecutionFailedEventData,\n AvsScriptExecutionFinishedEventData,\n StorageTaskAssignmentCompletedEventData,\n AvsClusterUpdatedEventData,\n AvsClusterFailedEventData,\n ApiCenterApiDefinitionAddedEventData,\n ApiCenterApiDefinitionUpdatedEventData,\n AcsMessageDeliveryStatusUpdatedEventData,\n AcsMessageReceivedEventData,\n AcsRouterWorkerUpdatedEventData,\n AcsChatThreadDeletedEventData,\n AcsChatThreadCreatedEventData,\n AcsChatThreadPropertiesUpdatedEventData,\n} from \"./generated/models/index.js\";\n\nimport type { CloudEvent, EventGridEvent } from \"./models.js\";\n\n/**\n * The Event Types for all System Events. These may be used with `isSystemEvent` to determine if an\n * event is a system event of a given type.\n */\nexport type KnownSystemEventTypes = keyof SystemEventNameToEventData;\n\n/**\n * A mapping of event type names to event data type interfaces.\n */\nexport interface SystemEventNameToEventData {\n /** An interface for the event data of a \"Microsoft.ApiManagement.UserCreated\" event. */\n \"Microsoft.ApiManagement.UserCreated\": ApiManagementUserCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.UserUpdated\" event. */\n \"Microsoft.ApiManagement.UserUpdated\": ApiManagementUserUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.UserDeleted\" event. */\n \"Microsoft.ApiManagement.UserDeleted\": ApiManagementUserDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.SubscriptionCreated\" event. */\n \"Microsoft.ApiManagement.SubscriptionCreated\": ApiManagementSubscriptionCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.SubscriptionUpdated\" event. */\n \"Microsoft.ApiManagement.SubscriptionUpdated\": ApiManagementSubscriptionUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.SubscriptionDeleted\" event. */\n \"Microsoft.ApiManagement.SubscriptionDeleted\": ApiManagementSubscriptionDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.ProductCreated\" event. */\n \"Microsoft.ApiManagement.ProductCreated\": ApiManagementProductCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.ProductUpdated\" event. */\n \"Microsoft.ApiManagement.ProductUpdated\": ApiManagementProductUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.ProductDeleted\" event. */\n \"Microsoft.ApiManagement.ProductDeleted\": ApiManagementProductDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.APICreated\" event. */\n \"Microsoft.ApiManagement.APICreated\": ApiManagementApiCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.APIUpdated\" event. */\n \"Microsoft.ApiManagement.APIUpdated\": ApiManagementApiUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.APIDeleted\" event. */\n \"Microsoft.ApiManagement.APIDeleted\": ApiManagementApiDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.APIReleaseCreated\" event. */\n \"Microsoft.ApiManagement.APIReleaseCreated\": ApiManagementApiReleaseCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.APIReleaseUpdated\" event. */\n \"Microsoft.ApiManagement.APIReleaseUpdated\": ApiManagementApiReleaseUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.APIReleaseDeleted\" event. */\n \"Microsoft.ApiManagement.APIReleaseDeleted\": ApiManagementApiReleaseDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatMessageReceived\" event. */\n \"Microsoft.Communication.ChatMessageReceived\": AcsChatMessageReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatMessageReceivedInThread\" event. */\n \"Microsoft.Communication.ChatMessageReceivedInThread\": AcsChatMessageReceivedInThreadEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatMessageEdited\" event. */\n \"Microsoft.Communication.ChatMessageEdited\": AcsChatMessageEditedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatMessageEditedInThread\" event. */\n \"Microsoft.Communication.ChatMessageEditedInThread\": AcsChatMessageEditedInThreadEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatMessageDeleted\" event. */\n \"Microsoft.Communication.ChatMessageDeleted\": AcsChatMessageDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatMessageDeletedInThread\" event. */\n \"Microsoft.Communication.ChatMessageDeletedInThread\": AcsChatMessageDeletedInThreadEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadCreatedWithUser\" event. */\n \"Microsoft.Communication.ChatThreadCreatedWithUser\": AcsChatThreadCreatedWithUserEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadWithUserDeleted\" event. */\n \"Microsoft.Communication.ChatThreadWithUserDeleted\": AcsChatThreadWithUserDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser\" event. */\n \"Microsoft.Communication.ChatThreadPropertiesUpdatedPerUser\": AcsChatThreadPropertiesUpdatedPerUserEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadParticipantAdded\" event. */\n \"Microsoft.Communication.ChatThreadParticipantAdded\": AcsChatParticipantAddedToThreadEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatParticipantAddedToThreadWithUser\" event. */\n \"Microsoft.Communication.ChatParticipantAddedToThreadWithUser\": AcsChatParticipantAddedToThreadWithUserEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadParticipantRemoved\" event. */\n \"Microsoft.Communication.ChatThreadParticipantRemoved\": AcsChatParticipantRemovedFromThreadEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser\" event. */\n \"Microsoft.Communication.ChatParticipantRemovedFromThreadWithUser\": AcsChatParticipantRemovedFromThreadWithUserEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RecordingFileStatusUpdated\" event. */\n \"Microsoft.Communication.RecordingFileStatusUpdated\": AcsRecordingFileStatusUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.SMSDeliveryReportReceived\" event. */\n \"Microsoft.Communication.SMSDeliveryReportReceived\": AcsSmsDeliveryReportReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.SMSReceived\" event. */\n \"Microsoft.Communication.SMSReceived\": AcsSmsReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.UserDisconnected\" event. */\n \"Microsoft.Communication.UserDisconnected\": AcsUserDisconnectedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerService.NewKubernetesVersionAvailable\" event. */\n \"Microsoft.ContainerService.NewKubernetesVersionAvailable\": ContainerServiceNewKubernetesVersionAvailableEventData;\n /** An interface for the event data of a \"Microsoft.AppConfiguration.KeyValueDeleted\" event. */\n \"Microsoft.AppConfiguration.KeyValueDeleted\": AppConfigurationKeyValueDeletedEventData;\n /** An interface for the event data of a \"Microsoft.AppConfiguration.KeyValueModified\" event. */\n \"Microsoft.AppConfiguration.KeyValueModified\": AppConfigurationKeyValueModifiedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerRegistry.ImagePushed\" event. */\n \"Microsoft.ContainerRegistry.ImagePushed\": ContainerRegistryImagePushedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerRegistry.ImageDeleted\" event. */\n \"Microsoft.ContainerRegistry.ImageDeleted\": ContainerRegistryImageDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerRegistry.ChartDeleted\" event. */\n \"Microsoft.ContainerRegistry.ChartDeleted\": ContainerRegistryChartDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerRegistry.ChartPushed\" event. */\n \"Microsoft.ContainerRegistry.ChartPushed\": ContainerRegistryChartPushedEventData;\n /** An interface for the event data of a \"Microsoft.Devices.DeviceCreated\" event. */\n \"Microsoft.Devices.DeviceCreated\": IotHubDeviceCreatedEventData;\n /** An interface for the event data of a \"Microsoft.Devices.DeviceDeleted\" event. */\n \"Microsoft.Devices.DeviceDeleted\": IotHubDeviceDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Devices.DeviceConnected\" event. */\n \"Microsoft.Devices.DeviceConnected\": IotHubDeviceConnectedEventData;\n /** An interface for the event data of a \"Microsoft.Devices.DeviceDisconnected\" event. */\n \"Microsoft.Devices.DeviceDisconnected\": IotHubDeviceDisconnectedEventData;\n /** An interface for the event data of a \"Microsoft.Devices.DeviceTelemetry\" event. */\n \"Microsoft.Devices.DeviceTelemetry\": IotHubDeviceTelemetryEventData;\n /** An interface for the event data of a \"Microsoft.EventGrid.SubscriptionValidationEvent\" event. */\n \"Microsoft.EventGrid.SubscriptionValidationEvent\": SubscriptionValidationEventData;\n /** An interface for the event data of a \"Microsoft.EventGrid.SubscriptionDeletedEvent\" event. */\n \"Microsoft.EventGrid.SubscriptionDeletedEvent\": SubscriptionDeletedEventData;\n /** An interface for the event data of a \"Microsoft.EventHub.CaptureFileCreated\" event. */\n \"Microsoft.EventHub.CaptureFileCreated\": EventHubCaptureFileCreatedEventData;\n /** An interface for the event data of a \"Microsoft.HealthcareApis.DicomImageCreated\" event. */\n \"Microsoft.HealthcareApis.DicomImageCreated\": HealthcareDicomImageCreatedEventData;\n /** An interface for the event data of a \"Microsoft.HealthcareApis.DicomImageDeleted\" event. */\n \"Microsoft.HealthcareApis.DicomImageDeleted\": HealthcareDicomImageDeletedEventData;\n /** An interface for the event data of a \"Microsoft.HealthcareApis.FhirResourceCreated\" event. */\n \"Microsoft.HealthcareApis.FhirResourceCreated\": HealthcareFhirResourceCreatedEventData;\n /** An interface for the event data of a \"Microsoft.HealthcareApis.FhirUpdatedCreated\" event. */\n \"Microsoft.HealthcareApis.FhirUpdatedCreated\": HealthcareFhirResourceUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.HealthcareApis.FhirDeletedCreated\" event. */\n \"Microsoft.HealthcareApis.FhirDeletedCreated\": HealthcareFhirResourceDeletedEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.CertificateNewVersionCreated\" event. */\n \"Microsoft.KeyVault.CertificateNewVersionCreated\": KeyVaultCertificateNewVersionCreatedEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.CertificateNearExpiry\" event. */\n \"Microsoft.KeyVault.CertificateNearExpiry\": KeyVaultCertificateNearExpiryEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.CertificateExpired\" event. */\n \"Microsoft.KeyVault.CertificateExpired\": KeyVaultCertificateExpiredEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.KeyNewVersionCreated\" event. */\n \"Microsoft.KeyVault.KeyNewVersionCreated\": KeyVaultKeyNewVersionCreatedEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.KeyNearExpiry\" event. */\n \"Microsoft.KeyVault.KeyNearExpiry\": KeyVaultKeyNearExpiryEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.KeyExpired\" event. */\n \"Microsoft.KeyVault.KeyExpired\": KeyVaultKeyExpiredEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.SecretNewVersionCreated\" event. */\n \"Microsoft.KeyVault.SecretNewVersionCreated\": KeyVaultSecretNewVersionCreatedEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.SecretNearExpiry\" event. */\n \"Microsoft.KeyVault.SecretNearExpiry\": KeyVaultSecretNearExpiryEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.SecretExpired\" event. */\n \"Microsoft.KeyVault.SecretExpired\": KeyVaultSecretExpiredEventData;\n /** An interface for the event data of a \"Microsoft.KeyVault.VaultAccessPolicyChanged\" event. */\n \"Microsoft.KeyVault.VaultAccessPolicyChanged\": KeyVaultAccessPolicyChangedEventData;\n /** An interface for the event data of a \"Microsoft.MachineLearningServices.DatasetDriftDetected\" event. */\n \"Microsoft.MachineLearningServices.DatasetDriftDetected\": MachineLearningServicesDatasetDriftDetectedEventData;\n /** An interface for the event data of a \"Microsoft.MachineLearningServices.ModelDeployed\" event. */\n \"Microsoft.MachineLearningServices.ModelDeployed\": MachineLearningServicesModelDeployedEventData;\n /** An interface for the event data of a \"Microsoft.MachineLearningServices.ModelRegistered\" event. */\n \"Microsoft.MachineLearningServices.ModelRegistered\": MachineLearningServicesModelRegisteredEventData;\n /** An interface for the event data of a \"Microsoft.MachineLearningServices.RunCompleted\" event. */\n \"Microsoft.MachineLearningServices.RunCompleted\": MachineLearningServicesRunCompletedEventData;\n /** An interface for the event data of a \"Microsoft.MachineLearningServices.RunStatusChanged\" event. */\n \"Microsoft.MachineLearningServices.RunStatusChanged\": MachineLearningServicesRunStatusChangedEventData;\n /** An interface for the event data of a \"Microsoft.Maps.GeofenceEntered\" event. */\n \"Microsoft.Maps.GeofenceEntered\": MapsGeofenceEnteredEventData;\n /** An interface for the event data of a \"Microsoft.Maps.GeofenceExited\" event. */\n \"Microsoft.Maps.GeofenceExited\": MapsGeofenceExitedEventData;\n /** An interface for the event data of a \"Microsoft.Maps.GeofenceResult\" event. */\n \"Microsoft.Maps.GeofenceResult\": MapsGeofenceResultEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobStateChange\" event. */\n \"Microsoft.Media.JobStateChange\": MediaJobStateChangeEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputStateChange\" event. */\n \"Microsoft.Media.JobOutputStateChange\": MediaJobOutputStateChangeEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobScheduled\" event. */\n \"Microsoft.Media.JobScheduled\": MediaJobScheduledEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobProcessing\" event. */\n \"Microsoft.Media.JobProcessing\": MediaJobProcessingEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobCanceling\" event. */\n \"Microsoft.Media.JobCanceling\": MediaJobCancelingEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobFinished\" event. */\n \"Microsoft.Media.JobFinished\": MediaJobFinishedEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobCanceled\" event. */\n \"Microsoft.Media.JobCanceled\": MediaJobCanceledEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobErrored\" event. */\n \"Microsoft.Media.JobErrored\": MediaJobErroredEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputCanceled\" event. */\n \"Microsoft.Media.JobOutputCanceled\": MediaJobOutputCanceledEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputCanceling\" event. */\n \"Microsoft.Media.JobOutputCanceling\": MediaJobOutputCancelingEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputErrored\" event. */\n \"Microsoft.Media.JobOutputErrored\": MediaJobOutputErroredEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputFinished\" event. */\n \"Microsoft.Media.JobOutputFinished\": MediaJobOutputFinishedEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputProcessing\" event. */\n \"Microsoft.Media.JobOutputProcessing\": MediaJobOutputProcessingEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputScheduled\" event. */\n \"Microsoft.Media.JobOutputScheduled\": MediaJobOutputScheduledEventData;\n /** An interface for the event data of a \"Microsoft.Media.JobOutputProgress\" event. */\n \"Microsoft.Media.JobOutputProgress\": MediaJobOutputProgressEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventEncoderConnected\" event. */\n \"Microsoft.Media.LiveEventEncoderConnected\": MediaLiveEventEncoderConnectedEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventChannelArchiveHeartbeat\" event. */\n \"Microsoft.Media.LiveEventChannelArchiveHeartbeat\": MediaLiveEventChannelArchiveHeartbeatEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventConnectionRejected\" event. */\n \"Microsoft.Media.LiveEventConnectionRejected\": MediaLiveEventConnectionRejectedEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventEncoderDisconnected\" event. */\n \"Microsoft.Media.LiveEventEncoderDisconnected\": MediaLiveEventEncoderDisconnectedEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventIncomingStreamReceived\" event. */\n \"Microsoft.Media.LiveEventIncomingStreamReceived\": MediaLiveEventIncomingStreamReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventIncomingStreamsOutOfSync\" event. */\n \"Microsoft.Media.LiveEventIncomingStreamsOutOfSync\": MediaLiveEventIncomingStreamsOutOfSyncEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync\" event. */\n \"Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync\": MediaLiveEventIncomingVideoStreamsOutOfSyncEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventIncomingDataChunkDropped\" event. */\n \"Microsoft.Media.LiveEventIncomingDataChunkDropped\": MediaLiveEventIncomingDataChunkDroppedEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventIngestHeartbeat\" event. */\n \"Microsoft.Media.LiveEventIngestHeartbeat\": MediaLiveEventIngestHeartbeatEventData;\n /** An interface for the event data of a \"Microsoft.Media.LiveEventTrackDiscontinuityDetected\" event. */\n \"Microsoft.Media.LiveEventTrackDiscontinuityDetected\": MediaLiveEventTrackDiscontinuityDetectedEventData;\n /** An interface for the event data of a \"Microsoft.PolicyInsights.PolicyStateChanged\" event. */\n \"Microsoft.PolicyInsights.PolicyStateChanged \": PolicyInsightsPolicyStateChangedEventData;\n /** An interface for the event data of a \" Microsoft.PolicyInsights.PolicyStateCreated\" event. */\n \"Microsoft.PolicyInsights.PolicyStateCreated\": PolicyInsightsPolicyStateCreatedEventData;\n /** An interface for the event data of a \"Microsoft.PolicyInsights.PolicyStateDeleted\" event. */\n \"Microsoft.PolicyInsights.PolicyStateDeleted\": PolicyInsightsPolicyStateDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceDeleteSuccess\" event. */\n \"Microsoft.Resources.ResourceWriteSuccess\": ResourceWriteSuccessEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceWriteFailure\" event. */\n \"Microsoft.Resources.ResourceWriteFailure\": ResourceWriteFailureEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceWriteCancel\" event. */\n \"Microsoft.Resources.ResourceWriteCancel\": ResourceWriteCancelEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceDeleteSuccess\" event. */\n \"Microsoft.Resources.ResourceDeleteSuccess\": ResourceDeleteSuccessEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceDeleteFailure\" event. */\n \"Microsoft.Resources.ResourceDeleteFailure\": ResourceDeleteFailureEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceDeleteCancel\" event. */\n \"Microsoft.Resources.ResourceDeleteCancel\": ResourceDeleteCancelEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceActionSuccess\" event. */\n \"Microsoft.Resources.ResourceActionSuccess\": ResourceActionSuccessEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceActionFailure\" event. */\n \"Microsoft.Resources.ResourceActionFailure\": ResourceActionFailureEventData;\n /** An interface for the event data of a \"Microsoft.Resources.ResourceActionCancel\" event. */\n \"Microsoft.Resources.ResourceActionCancel\": ResourceActionCancelEventData;\n /** An interface for the event data of a \"Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners\" event. */\n \"Microsoft.ServiceBus.ActiveMessagesAvailableWithNoListeners\": ServiceBusActiveMessagesAvailableWithNoListenersEventData;\n /** An interface for the event data of a \"Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners\" event. */\n \"Microsoft.ServiceBus.DeadletterMessagesAvailableWithNoListeners\": ServiceBusDeadletterMessagesAvailableWithNoListenersEventData;\n /** An interface for the event data of a \"Microsoft.Storage.AsyncOperationInitiated\" event. */\n \"Microsoft.Storage.AsyncOperationInitiated\": StorageAsyncOperationInitiatedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.BlobCreated\" event. */\n \"Microsoft.Storage.BlobCreated\": StorageBlobCreatedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.BlobDeleted\" event. */\n \"Microsoft.Storage.BlobDeleted\": StorageBlobDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.BlobInventoryPolicyCompleted\" event. */\n \"Microsoft.Storage.BlobInventoryPolicyCompleted\": StorageBlobInventoryPolicyCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.BlobTierChanged\" event. */\n \"Microsoft.Storage.BlobTierChanged\": StorageBlobTierChangedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.BlobRenamed\" event. */\n \"Microsoft.Storage.BlobRenamed\": StorageBlobRenamedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.DirectoryCreated\" event. */\n \"Microsoft.Storage.DirectoryCreated\": StorageDirectoryCreatedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.DirectoryDeleted\" event. */\n \"Microsoft.Storage.DirectoryDeleted\": StorageDirectoryDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.DirectoryRenamed\" event. */\n \"Microsoft.Storage.DirectoryRenamed\": StorageDirectoryRenamedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.LifecyclePolicyCompleted\" event. */\n \"Microsoft.Storage.LifecyclePolicyCompleted\": StorageLifecyclePolicyCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Web.AppUpdated\" event. */\n \"Microsoft.Web.AppUpdated\": WebAppUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.Web.BackupOperationStarted\" event. */\n \"Microsoft.Web.BackupOperationStarted\": WebBackupOperationStartedEventData;\n /** An interface for the event data of a \"Microsoft.Web.BackupOperationCompleted\" event. */\n \"Microsoft.Web.BackupOperationCompleted\": WebBackupOperationCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Web.BackupOperationFailed\" event. */\n \"Microsoft.Web.BackupOperationFailed\": WebBackupOperationFailedEventData;\n /** An interface for the event data of a \"Microsoft.Web.RestoreOperationStarted\" event. */\n \"Microsoft.Web.RestoreOperationStarted\": WebRestoreOperationStartedEventData;\n /** An interface for the event data of a \"Microsoft.Web.RestoreOperationCompleted\" event. */\n \"Microsoft.Web.RestoreOperationCompleted\": WebRestoreOperationCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Web.RestoreOperationFailed\" event. */\n \"Microsoft.Web.RestoreOperationFailed\": WebRestoreOperationFailedEventData;\n /** An interface for the event data of a \"Microsoft.Web.SlotSwapStarted\" event. */\n \"Microsoft.Web.SlotSwapStarted\": WebSlotSwapStartedEventData;\n /** An interface for the event data of a \"Microsoft.Web.SlotSwapCompleted\" event. */\n \"Microsoft.Web.SlotSwapCompleted\": WebSlotSwapCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Web.SlotSwapFailed\" event. */\n \"Microsoft.Web.SlotSwapFailed\": WebSlotSwapFailedEventData;\n /** An interface for the event data of a \"Microsoft.Web.SlotSwapWithPreviewStarted\" event. */\n \"Microsoft.Web.SlotSwapWithPreviewStarted\": WebSlotSwapWithPreviewStartedEventData;\n /** An interface for the event data of a \"Microsoft.Web.SlotSwapWithPreviewCancelled\" event. */\n \"Microsoft.Web.SlotSwapWithPreviewCancelled\": WebSlotSwapWithPreviewCancelledEventData;\n /** An interface for the event data of a \"Microsoft.Web.AppServicePlanUpdated\" event. */\n \"Microsoft.Web.AppServicePlanUpdated\": WebAppServicePlanUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.StorageTaskQueued\" event. */\n \"Microsoft.Storage.StorageTaskQueued\": StorageTaskQueuedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.StorageTaskCompleted\" event. */\n \"Microsoft.Storage.StorageTaskCompleted\": StorageTaskCompletedEventData;\n /** An interface for the event data of a \"Microsoft.DataBox.CopyStarted\" event. */\n \"Microsoft.DataBox.CopyStarted\": DataBoxCopyStartedEventData;\n /** An interface for the event data of a \"Microsoft.DataBox.CopyCompleted\" event. */\n \"Microsoft.DataBox.CopyCompleted\": DataBoxCopyCompletedEventData;\n /** An interface for the event data of a \"Microsoft.DataBox.OrderCompleted\" event. */\n \"Microsoft.DataBox.OrderCompleted\": DataBoxOrderCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.IncomingCall\" event. */\n \"Microsoft.Communication.IncomingCall\": AcsIncomingCallEventData;\n /** An interface for the event data of a \"Microsoft.Communication.EmailDeliveryReportReceived\" event. */\n \"Microsoft.Communication.EmailDeliveryReportReceived\": AcsEmailDeliveryReportReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.EmailEngagementTrackingReportReceived\" event. */\n \"Microsoft.Communication.EmailEngagementTrackingReportReceived\": AcsEmailEngagementTrackingReportReceivedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayCreated\" event. */\n \"Microsoft.ApiManagement.GatewayCreated\": ApiManagementGatewayCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayUpdated\" event. */\n \"Microsoft.ApiManagement.GatewayUpdated\": ApiManagementGatewayUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayDeleted\" event. */\n \"Microsoft.ApiManagement.GatewayDeleted\": ApiManagementGatewayDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayHostnameConfigurationCreated\" event. */\n \"Microsoft.ApiManagement.GatewayHostnameConfigurationCreated\": ApiManagementGatewayHostnameConfigurationCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated\" event. */\n \"Microsoft.ApiManagement.GatewayHostnameConfigurationUpdated\": ApiManagementGatewayHostnameConfigurationUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted\" event. */\n \"Microsoft.ApiManagement.GatewayHostnameConfigurationDeleted\": ApiManagementGatewayHostnameConfigurationDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayCertificateAuthorityCreated\" event. */\n \"Microsoft.ApiManagement.GatewayCertificateAuthorityCreated\": ApiManagementGatewayCertificateAuthorityCreatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated\" event. */\n \"Microsoft.ApiManagement.GatewayCertificateAuthorityUpdated\": ApiManagementGatewayCertificateAuthorityUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted\" event. */\n \"Microsoft.ApiManagement.GatewayCertificateAuthorityDeleted\": ApiManagementGatewayCertificateAuthorityDeletedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayAPIAdded\" event. */\n \"Microsoft.ApiManagement.GatewayAPIAdded\": ApiManagementGatewayApiAddedEventData;\n /** An interface for the event data of a \"Microsoft.ApiManagement.GatewayAPIRemoved\" event. */\n \"Microsoft.ApiManagement.GatewayAPIRemoved\": ApiManagementGatewayApiRemovedEventData;\n /** An interface for the event data of a \"Microsoft.HealthcareApis.DicomImageUpdated\" event. */\n \"Microsoft.HealthcareApis.DicomImageUpdated\": HealthcareDicomImageUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerService.ClusterSupportEnded\" event. */\n \"Microsoft.ContainerService.ClusterSupportEnded\": ContainerServiceClusterSupportEndedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerService.ClusterSupportEnding\" event. */\n \"Microsoft.ContainerService.ClusterSupportEnding\": ContainerServiceClusterSupportEndingEventData;\n /** An interface for the event data of a \"Microsoft.ContainerService.NodePoolRollingStarted\" event. */\n \"Microsoft.ContainerService.NodePoolRollingStarted\": ContainerServiceNodePoolRollingStartedEventData;\n /** An interface for the event data of a \"Microsoft.ContainerService.NodePoolRollingSucceeded\" event. */\n \"Microsoft.ContainerService.NodePoolRollingSucceeded\": ContainerServiceNodePoolRollingSucceededEventData;\n /** An interface for the event data of a \"Microsoft.ContainerService.NodePoolRollingFailed\" event. */\n \"Microsoft.ContainerService.NodePoolRollingFailed\": ContainerServiceNodePoolRollingFailedEventData;\n /** An interface for the event data of a \"Microsoft.EventGrid.MQTTClientCreatedOrUpdated\" event. */\n \"Microsoft.EventGrid.MQTTClientCreatedOrUpdated\": EventGridMqttClientCreatedOrUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.EventGrid.MQTTClientDeleted\" event. */\n \"Microsoft.EventGrid.MQTTClientDeleted\": EventGridMqttClientDeletedEventData;\n /** An interface for the event data of a \"Microsoft.EventGrid.MQTTClientSessionConnected\" event. */\n \"Microsoft.EventGrid.MQTTClientSessionConnected\": EventGridMqttClientSessionConnectedEventData;\n /** An interface for the event data of a \"Microsoft.EventGrid.MQTTClientSessionDisconnected\" event. */\n \"Microsoft.EventGrid.MQTTClientSessionDisconnected\": EventGridMqttClientSessionDisconnectedEventData;\n /** An interface for the event data of a \"Microsoft.AppConfiguration.SnapshotCreated\" event. */\n \"Microsoft.AppConfiguration.SnapshotCreated\": AppConfigurationSnapshotCreatedEventData;\n /** An interface for the event data of a \"Microsoft.AppConfiguration.SnapshotModified\" event. */\n \"Microsoft.AppConfiguration.SnapshotModified\": AppConfigurationSnapshotModifiedEventData;\n /** An interface for the event data of a \"Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged\" event. */\n \"Microsoft.ResourceNotifications.HealthResources.AvailabilityStatusChanged\": ResourceNotificationsHealthResourcesAvailabilityStatusChangedEventData;\n /** An interface for the event data of a \"Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated\" event. */\n \"Microsoft.ResourceNotifications.HealthResources.ResourceAnnotated\": ResourceNotificationsHealthResourcesAnnotatedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerDeregistered\" event. */\n \"Microsoft.Communication.RouterWorkerDeregistered\": AcsRouterWorkerDeregisteredEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerRegistered\" event. */\n \"Microsoft.Communication.RouterWorkerRegistered\": AcsRouterWorkerRegisteredEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobCancelled\" event. */\n \"Microsoft.Communication.RouterJobCancelled\": AcsRouterJobCancelledEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobClassificationFailed\" event. */\n \"Microsoft.Communication.RouterJobClassificationFailed\": AcsRouterJobClassificationFailedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobClassified\" event. */\n \"Microsoft.Communication.RouterJobClassified\": AcsRouterJobClassifiedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobClosed\" event. */\n \"Microsoft.Communication.RouterJobClosed\": AcsRouterJobClosedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobCompleted\" event. */\n \"Microsoft.Communication.RouterJobCompleted\": AcsRouterJobCompletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobDeleted\" event. */\n \"Microsoft.Communication.RouterJobDeleted\": AcsRouterJobDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobExceptionTriggered\" event. */\n \"Microsoft.Communication.RouterJobExceptionTriggered\": AcsRouterJobExceptionTriggeredEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobQueued\" event. */\n \"Microsoft.Communication.RouterJobQueued\": AcsRouterJobQueuedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobReceived\" event. */\n \"Microsoft.Communication.RouterJobReceived\": AcsRouterJobReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobSchedulingFailed\" event. */\n \"Microsoft.Communication.RouterJobSchedulingFailed\": AcsRouterJobSchedulingFailedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobUnassigned\" event. */\n \"Microsoft.Communication.RouterJobUnassigned\": AcsRouterJobUnassignedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobWaitingForActivation\" event. */\n \"Microsoft.Communication.RouterJobWaitingForActivation\": AcsRouterJobWaitingForActivationEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterJobWorkerSelectorsExpire\" event. */\n \"Microsoft.Communication.RouterJobWorkerSelectorsExpire\": AcsRouterJobWorkerSelectorsExpiredEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerDeleted\" event. */\n \"Microsoft.Communication.RouterWorkerDeleted\": AcsRouterWorkerDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerOfferAccepted\" event. */\n \"Microsoft.Communication.RouterWorkerOfferAccepted\": AcsRouterWorkerOfferAcceptedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerOfferDeclined\" event. */\n \"Microsoft.Communication.RouterWorkerOfferDeclined\": AcsRouterWorkerOfferDeclinedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerOfferExpired\" event. */\n \"Microsoft.Communication.RouterWorkerOfferExpired\": AcsRouterWorkerOfferExpiredEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerOfferIssued\" event. */\n \"Microsoft.Communication.RouterWorkerOfferIssued\": AcsRouterWorkerOfferIssuedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerOfferRevoked\" event. */\n \"Microsoft.Communication.RouterWorkerOfferRevoked\": AcsRouterWorkerOfferRevokedEventData;\n /** An interface for the event data of a \"Microsoft.ResourceNotifications.Resources.CreatedOrUpdated\" event. */\n \"Microsoft.ResourceNotifications.Resources.CreatedOrUpdated\": ResourceNotificationsResourceManagementCreatedOrUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.ResourceNotifications.Resources.Deleted\" event. */\n \"Microsoft.ResourceNotifications.Resources.Deleted\": ResourceNotificationsResourceManagementDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.StorageTaskAssignmentQueued\" event. */\n \"Microsoft.Storage.StorageTaskAssignmentQueued\": StorageTaskAssignmentQueuedEventData;\n /** An interface for the event data of a \"Microsoft.Storage.StorageTaskAssignmentCompleted\" event. */\n \"Microsoft.Storage.StorageTaskAssignmentCompleted\": StorageTaskAssignmentCompletedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ScriptExecutionStarted\" event. */\n \"Microsoft.AVS.ScriptExecutionStarted\": AvsScriptExecutionStartedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ScriptExecutionFinished\" event. */\n \"Microsoft.AVS.ScriptExecutionFinished\": AvsScriptExecutionFinishedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ScriptExecutionCancelled\" event. */\n \"Microsoft.AVS.ScriptExecutionCancelled\": AvsScriptExecutionCancelledEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ScriptExecutionFailed\" event. */\n \"Microsoft.AVS.ScriptExecutionFailed\": AvsScriptExecutionFailedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.PrivateCloudUpdating\" event. */\n \"Microsoft.AVS.PrivateCloudUpdating\": AvsPrivateCloudUpdatingEventData;\n /** An interface for the event data of a \"Microsoft.AVS.PrivateCloudUpdated\" event. */\n \"Microsoft.AVS.PrivateCloudUpdated\": AvsPrivateCloudUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.PrivateCloudFailed\" event. */\n \"Microsoft.AVS.PrivateCloudFailed\": AvsPrivateCloudFailedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ClusterCreated\" event. */\n \"Microsoft.AVS.ClusterCreated\": AvsClusterCreatedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ClusterDeleted\" event. */\n \"Microsoft.AVS.ClusterDeleted\": AvsClusterDeletedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ClusterUpdating\" event. */\n \"Microsoft.AVS.ClusterUpdating\": AvsClusterUpdatingEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ClusterUpdated\" event. */\n \"Microsoft.AVS.ClusterUpdated\": AvsClusterUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.AVS.ClusterFailed\" event. */\n \"Microsoft.AVS.ClusterFailed\": AvsClusterFailedEventData;\n /** An interface for the event data of a \"Microsoft.ApiCenter.ApiDefinitionAdded\" event. */\n \"Microsoft.ApiCenter.ApiDefinitionAdded\": ApiCenterApiDefinitionAddedEventData;\n /** An interface for the event data of a \"Microsoft.ApiCenter.ApiDefinitionUpdated\" event. */\n \"Microsoft.ApiCenter.ApiDefinitionUpdated\": ApiCenterApiDefinitionUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated\" event. */\n \"Microsoft.Communication.AdvancedMessageDeliveryStatusUpdated\": AcsMessageDeliveryStatusUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.AdvancedMessageReceived\" event. */\n \"Microsoft.Communication.AdvancedMessageReceived\": AcsMessageReceivedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.RouterWorkerUpdated\" event. */\n \"Microsoft.Communication.RouterWorkerUpdated\": AcsRouterWorkerUpdatedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadCreated\" event. */\n \"Microsoft.Communication.ChatThreadCreated\": AcsChatThreadCreatedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadDeleted\" event. */\n \"Microsoft.Communication.ChatThreadDeleted\": AcsChatThreadDeletedEventData;\n /** An interface for the event data of a \"Microsoft.Communication.ChatThreadPropertiesUpdated\" event. */\n \"Microsoft.Communication.ChatThreadPropertiesUpdated\": AcsChatThreadPropertiesUpdatedEventData;\n}\n\n/**\n * isCloudEventLike returns \"true\" when the event is a CloudEvent\n *\n * @param o - Either an EventGrid our CloudEvent event.\n */\nfunction isCloudEventLike(\n o: EventGridEvent<unknown> | CloudEvent<unknown>,\n): o is CloudEvent<unknown> {\n return (o as any).source !== undefined;\n}\n\n/**\n * iSystemEvent returns \"true\" when a given event is a system event of a given type. When using\n * TypeScript, this function acts as a custom type guard and allows the TypeScript compiler to\n * identify the underlying data\n *\n * @param eventType - The type of system event to check for, e.g., \"Microsoft.AppConfiguration.KeyValueDeleted\"\n * @param event - The event to test.\n */\nexport function isSystemEvent<T extends KnownSystemEventTypes>(\n eventType: T,\n event: EventGridEvent<unknown>,\n): event is EventGridEvent<SystemEventNameToEventData[T]>;\n\n/**\n * iSystemEvent returns \"true\" when a given event is a system event of a given type. When using\n * TypeScript, this function acts as a custom type guard and allows the TypeScript compiler to\n * identify the underlying data\n *\n * @param eventType - The type of system event to check for, e.g., \"Microsoft.AppConfiguration.KeyValueDeleted\"\n * @param event - The event to test.\n */\nexport function isSystemEvent<T extends KnownSystemEventTypes>(\n eventType: T,\n event: CloudEvent<unknown>,\n): event is CloudEvent<SystemEventNameToEventData[T]>;\n\nexport function isSystemEvent<T extends KnownSystemEventTypes>(\n eventType: T,\n event: EventGridEvent<unknown> | CloudEvent<unknown>,\n): event is\n | EventGridEvent<SystemEventNameToEventData[T]>\n | CloudEvent<SystemEventNameToEventData[T]> {\n if (isCloudEventLike(event)) {\n return event.type === eventType;\n } else {\n return event.eventType === eventType;\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[],"mappings":"AAKA;;;GAGG;AACH,eAAO,MAAM,aAAa,6CAIxB,CAAC"}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
import type { KeyCredential } from "@azure/core-auth";
|
2
|
+
/**
|
3
|
+
* Stringifies a Date object in the format expected by the Event Grid service, for use in a Shared Access Signiture.
|
4
|
+
*
|
5
|
+
* The service expects this time string to be in the same format as what is returned by the .NET DateTime.ToString
|
6
|
+
* method, using the "en-US" culture.
|
7
|
+
*
|
8
|
+
* This corresponds to the .NET format string: "M/d/yyyy h:mm:ss tt". For example, the date "June 5th, 2020, 12:09:03 PM"
|
9
|
+
* is represented as the string "6/5/2020 12:09:03 PM"
|
10
|
+
*
|
11
|
+
* The service expects a UTC time, so this method returns a string based on the UTC time of the provided Date.
|
12
|
+
*
|
13
|
+
* @param d - The Date object to convert to a string.
|
14
|
+
*/
|
15
|
+
export declare function dateToServiceTimeString(d: Date): string;
|
16
|
+
/**
|
17
|
+
* Returns `true` if the credential object is like the KeyCredential interface (i.e. it has a
|
18
|
+
* key property).
|
19
|
+
*
|
20
|
+
* @param credential - The object to test
|
21
|
+
*/
|
22
|
+
export declare function isKeyCredentialLike(o: unknown): o is KeyCredential;
|
23
|
+
export declare function parseAndWrap(jsonStringOrObject: string | Record<string, unknown>): any[];
|
24
|
+
export declare function validateEventGridEvent(o: unknown): void;
|
25
|
+
export declare function validateCloudEventEvent(o: unknown): void;
|
26
|
+
//# sourceMappingURL=util.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/util.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAWvD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,IAAI,aAAa,CAKlE;AAED,wBAAgB,YAAY,CAAC,kBAAkB,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,GAAG,EAAE,CAexF;AAID,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAuBvD;AAID,wBAAgB,uBAAuB,CAAC,CAAC,EAAE,OAAO,GAAG,IAAI,CAexD"}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
2
|
+
export declare const CloudEventBatchContentType = "application/cloudevents-batch+json; charset=utf-8";
|
3
|
+
export declare const TraceParentHeaderName = "traceparent";
|
4
|
+
export declare const TraceStateHeaderName = "tracestate";
|
5
|
+
export declare const ContentTypeHeaderName = "Content-Type";
|
6
|
+
/**
|
7
|
+
* The programmatic identifier of the cloudEventDistributedTracingEnricherPolicy.
|
8
|
+
*/
|
9
|
+
export declare const cloudEventDistributedTracingEnricherPolicyName = "cloudEventDistributedTracingEnricherPolicy";
|
10
|
+
/**
|
11
|
+
* cloudEventDistributedTracingEnricherPolicy is a policy which adds distributed tracing information
|
12
|
+
* to a batch of cloud events. It does so by copying the `traceparent` and `tracestate` properties
|
13
|
+
* from the HTTP request into the individual events as extension properties.
|
14
|
+
*
|
15
|
+
* This will only happen in the case where an event does not have a `traceparent` defined already. This
|
16
|
+
* allows events to explicitly set a traceparent and tracestate which would be respected during "multi-hop
|
17
|
+
* transmition".
|
18
|
+
*
|
19
|
+
* See https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md
|
20
|
+
* for more information on distributed tracing and cloud events.
|
21
|
+
*/
|
22
|
+
export declare function cloudEventDistributedTracingEnricherPolicy(): PipelinePolicy;
|
23
|
+
//# sourceMappingURL=cloudEventDistrubtedTracingEnricherPolicy.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cloudEventDistrubtedTracingEnricherPolicy.d.ts","sourceRoot":"","sources":["../../src/cloudEventDistrubtedTracingEnricherPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,2BAA2B,CAAC;AAEnC,eAAO,MAAM,0BAA0B,sDAAsD,CAAC;AAC9F,eAAO,MAAM,qBAAqB,gBAAgB,CAAC;AACnD,eAAO,MAAM,oBAAoB,eAAe,CAAC;AACjD,eAAO,MAAM,qBAAqB,iBAAiB,CAAC;AAEpD;;GAEG;AACH,eAAO,MAAM,8CAA8C,+CACb,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,wBAAgB,0CAA0C,IAAI,cAAc,CAoC3E"}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.cloudEventDistributedTracingEnricherPolicyName = exports.ContentTypeHeaderName = exports.TraceStateHeaderName = exports.TraceParentHeaderName = exports.CloudEventBatchContentType = void 0;
|
6
|
+
exports.cloudEventDistributedTracingEnricherPolicy = cloudEventDistributedTracingEnricherPolicy;
|
7
|
+
exports.CloudEventBatchContentType = "application/cloudevents-batch+json; charset=utf-8";
|
8
|
+
exports.TraceParentHeaderName = "traceparent";
|
9
|
+
exports.TraceStateHeaderName = "tracestate";
|
10
|
+
exports.ContentTypeHeaderName = "Content-Type";
|
11
|
+
/**
|
12
|
+
* The programmatic identifier of the cloudEventDistributedTracingEnricherPolicy.
|
13
|
+
*/
|
14
|
+
exports.cloudEventDistributedTracingEnricherPolicyName = "cloudEventDistributedTracingEnricherPolicy";
|
15
|
+
/**
|
16
|
+
* cloudEventDistributedTracingEnricherPolicy is a policy which adds distributed tracing information
|
17
|
+
* to a batch of cloud events. It does so by copying the `traceparent` and `tracestate` properties
|
18
|
+
* from the HTTP request into the individual events as extension properties.
|
19
|
+
*
|
20
|
+
* This will only happen in the case where an event does not have a `traceparent` defined already. This
|
21
|
+
* allows events to explicitly set a traceparent and tracestate which would be respected during "multi-hop
|
22
|
+
* transmition".
|
23
|
+
*
|
24
|
+
* See https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md
|
25
|
+
* for more information on distributed tracing and cloud events.
|
26
|
+
*/
|
27
|
+
function cloudEventDistributedTracingEnricherPolicy() {
|
28
|
+
return {
|
29
|
+
name: exports.cloudEventDistributedTracingEnricherPolicyName,
|
30
|
+
async sendRequest(request, next) {
|
31
|
+
const traceparent = request.headers.get(exports.TraceParentHeaderName);
|
32
|
+
const tracestate = request.headers.get(exports.TraceStateHeaderName);
|
33
|
+
if (request.headers.get(exports.ContentTypeHeaderName) === exports.CloudEventBatchContentType &&
|
34
|
+
typeof request.body === "string" &&
|
35
|
+
traceparent) {
|
36
|
+
// per the cloud event batched content type we know the body is an array encoded in JSON.
|
37
|
+
const parsedBody = JSON.parse(request.body);
|
38
|
+
for (const item of parsedBody) {
|
39
|
+
// When using the distributed tracing extension, the "traceparent" is a required property
|
40
|
+
// and "tracestate" is optional. This means if an item already has a "traceparent" property
|
41
|
+
// we should not stomp over it. Well formed events will not have a "tracestate" without
|
42
|
+
// also having a "traceparent" so there's no need to guard against that case.
|
43
|
+
if (typeof item !== "object" || item.traceparent) {
|
44
|
+
continue;
|
45
|
+
}
|
46
|
+
item.traceparent = traceparent;
|
47
|
+
if (tracestate) {
|
48
|
+
item.tracestate = tracestate;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
request.body = JSON.stringify(parsedBody);
|
52
|
+
}
|
53
|
+
return next(request);
|
54
|
+
},
|
55
|
+
};
|
56
|
+
}
|
57
|
+
//# sourceMappingURL=cloudEventDistrubtedTracingEnricherPolicy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cloudEventDistrubtedTracingEnricherPolicy.js","sourceRoot":"","sources":["../../src/cloudEventDistrubtedTracingEnricherPolicy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAgClC,gGAoCC;AA3DY,QAAA,0BAA0B,GAAG,mDAAmD,CAAC;AACjF,QAAA,qBAAqB,GAAG,aAAa,CAAC;AACtC,QAAA,oBAAoB,GAAG,YAAY,CAAC;AACpC,QAAA,qBAAqB,GAAG,cAAc,CAAC;AAEpD;;GAEG;AACU,QAAA,8CAA8C,GACzD,4CAA4C,CAAC;AAE/C;;;;;;;;;;;GAWG;AACH,SAAgB,0CAA0C;IACxD,OAAO;QACL,IAAI,EAAE,sDAA8C;QACpD,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,6BAAqB,CAAC,CAAC;YAC/D,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,4BAAoB,CAAC,CAAC;YAE7D,IACE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,6BAAqB,CAAC,KAAK,kCAA0B;gBACzE,OAAO,OAAO,CAAC,IAAI,KAAK,QAAQ;gBAChC,WAAW,EACX,CAAC;gBACD,yFAAyF;gBACzF,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAU,CAAC;gBAErD,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;oBAC9B,yFAAyF;oBACzF,2FAA2F;oBAC3F,uFAAuF;oBACvF,6EAA6E;oBAC7E,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;wBACjD,SAAS;oBACX,CAAC;oBAED,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;oBAC/B,IAAI,UAAU,EAAE,CAAC;wBACf,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;oBAC/B,CAAC;gBACH,CAAC;gBAED,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;YAC5C,CAAC;YAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n PipelineResponse,\n PipelineRequest,\n SendRequest,\n PipelinePolicy,\n} from \"@azure/core-rest-pipeline\";\n\nexport const CloudEventBatchContentType = \"application/cloudevents-batch+json; charset=utf-8\";\nexport const TraceParentHeaderName = \"traceparent\";\nexport const TraceStateHeaderName = \"tracestate\";\nexport const ContentTypeHeaderName = \"Content-Type\";\n\n/**\n * The programmatic identifier of the cloudEventDistributedTracingEnricherPolicy.\n */\nexport const cloudEventDistributedTracingEnricherPolicyName =\n \"cloudEventDistributedTracingEnricherPolicy\";\n\n/**\n * cloudEventDistributedTracingEnricherPolicy is a policy which adds distributed tracing information\n * to a batch of cloud events. It does so by copying the `traceparent` and `tracestate` properties\n * from the HTTP request into the individual events as extension properties.\n *\n * This will only happen in the case where an event does not have a `traceparent` defined already. This\n * allows events to explicitly set a traceparent and tracestate which would be respected during \"multi-hop\n * transmition\".\n *\n * See https://github.com/cloudevents/spec/blob/master/extensions/distributed-tracing.md\n * for more information on distributed tracing and cloud events.\n */\nexport function cloudEventDistributedTracingEnricherPolicy(): PipelinePolicy {\n return {\n name: cloudEventDistributedTracingEnricherPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n const traceparent = request.headers.get(TraceParentHeaderName);\n const tracestate = request.headers.get(TraceStateHeaderName);\n\n if (\n request.headers.get(ContentTypeHeaderName) === CloudEventBatchContentType &&\n typeof request.body === \"string\" &&\n traceparent\n ) {\n // per the cloud event batched content type we know the body is an array encoded in JSON.\n const parsedBody = JSON.parse(request.body) as any[];\n\n for (const item of parsedBody) {\n // When using the distributed tracing extension, the \"traceparent\" is a required property\n // and \"tracestate\" is optional. This means if an item already has a \"traceparent\" property\n // we should not stomp over it. Well formed events will not have a \"tracestate\" without\n // also having a \"traceparent\" so there's no need to guard against that case.\n if (typeof item !== \"object\" || item.traceparent) {\n continue;\n }\n\n item.traceparent = traceparent;\n if (tracestate) {\n item.tracestate = tracestate;\n }\n }\n\n request.body = JSON.stringify(parsedBody);\n }\n\n return next(request);\n },\n };\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,mBAAmB,eAAe,CAAC;AAChD,eAAO,MAAM,uBAAuB,yCAAyC,CAAC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.DEFAULT_EVENTGRID_SCOPE = exports.DEFAULT_API_VERSION = void 0;
|
6
|
+
exports.DEFAULT_API_VERSION = "2018-01-01";
|
7
|
+
exports.DEFAULT_EVENTGRID_SCOPE = "https://eventgrid.azure.net/.default";
|
8
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAErB,QAAA,mBAAmB,GAAG,YAAY,CAAC;AACnC,QAAA,uBAAuB,GAAG,sCAAsC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nexport const DEFAULT_API_VERSION = \"2018-01-01\";\nexport const DEFAULT_EVENTGRID_SCOPE = \"https://eventgrid.azure.net/.default\";\n"]}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
import type { CloudEvent, EventGridEvent } from "./models.js";
|
2
|
+
/**
|
3
|
+
* EventGridDeserializer is used to aid in processing events delivered by EventGrid. It can deserialize a JSON encoded payload
|
4
|
+
* of either a single event or batch of events as well as be used to convert the result of `JSON.parse` into an
|
5
|
+
* `EventGridEvent` or `CloudEvent` like object.
|
6
|
+
*
|
7
|
+
* Unlike normal JSON deseralization, EventGridDeserializer does some additional conversions:
|
8
|
+
*
|
9
|
+
* - The consumer parses the event time property into a `Date` object, for ease of use.
|
10
|
+
* - When deserializing an event in the CloudEvent schema, if the event contains binary data, it is base64 decoded
|
11
|
+
* and returned as an instance of the `Uint8Array` type.
|
12
|
+
*/
|
13
|
+
export declare class EventGridDeserializer {
|
14
|
+
/**
|
15
|
+
* Deserializes events encoded in the Event Grid schema.
|
16
|
+
*
|
17
|
+
* @param encodedEvents - the JSON encoded representation of either a single event or an array of
|
18
|
+
* events, encoded in the Event Grid Schema.
|
19
|
+
*/
|
20
|
+
deserializeEventGridEvents(encodedEvents: string): Promise<EventGridEvent<unknown>[]>;
|
21
|
+
/**
|
22
|
+
* Deserializes events encoded in the Event Grid schema.
|
23
|
+
*
|
24
|
+
* @param encodedEvents - an object representing a single event, encoded in the Event Grid schema.
|
25
|
+
*/
|
26
|
+
deserializeEventGridEvents(encodedEvents: Record<string, unknown>): Promise<EventGridEvent<unknown>[]>;
|
27
|
+
/**
|
28
|
+
* Deserializes events encoded in the Cloud Events 1.0 schema.
|
29
|
+
*
|
30
|
+
* @param encodedEvents - the JSON encoded representation of either a single event or an array of
|
31
|
+
* events, encoded in the Cloud Events 1.0 Schema.
|
32
|
+
*/
|
33
|
+
deserializeCloudEvents(encodedEvents: string): Promise<CloudEvent<unknown>[]>;
|
34
|
+
/**
|
35
|
+
* Deserializes events encoded in the Cloud Events 1.0 schema.
|
36
|
+
*
|
37
|
+
* @param encodedEvents - an object representing a single event, encoded in the Cloud Events 1.0 schema.
|
38
|
+
*/
|
39
|
+
deserializeCloudEvents(encodedEvents: Record<string, unknown>): Promise<CloudEvent<unknown>[]>;
|
40
|
+
}
|
41
|
+
//# sourceMappingURL=consumer.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"consumer.d.ts","sourceRoot":"","sources":["../../src/consumer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAU9D;;;;;;;;;;GAUG;AACH,qBAAa,qBAAqB;IAChC;;;;;OAKG;IACU,0BAA0B,CACrC,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;IAErC;;;;OAIG;IACU,0BAA0B,CACrC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;IAmBrC;;;;;OAKG;IACU,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;IAE1F;;;;OAIG;IACU,sBAAsB,CACjC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;CAwElC"}
|
@@ -0,0 +1,88 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.EventGridDeserializer = void 0;
|
6
|
+
const core_client_1 = require("@azure/core-client");
|
7
|
+
const models_js_1 = require("./models.js");
|
8
|
+
const mappers_js_1 = require("./generated/models/mappers.js");
|
9
|
+
const util_js_1 = require("./util.js");
|
10
|
+
const serializer = (0, core_client_1.createSerializer)();
|
11
|
+
/**
|
12
|
+
* EventGridDeserializer is used to aid in processing events delivered by EventGrid. It can deserialize a JSON encoded payload
|
13
|
+
* of either a single event or batch of events as well as be used to convert the result of `JSON.parse` into an
|
14
|
+
* `EventGridEvent` or `CloudEvent` like object.
|
15
|
+
*
|
16
|
+
* Unlike normal JSON deseralization, EventGridDeserializer does some additional conversions:
|
17
|
+
*
|
18
|
+
* - The consumer parses the event time property into a `Date` object, for ease of use.
|
19
|
+
* - When deserializing an event in the CloudEvent schema, if the event contains binary data, it is base64 decoded
|
20
|
+
* and returned as an instance of the `Uint8Array` type.
|
21
|
+
*/
|
22
|
+
class EventGridDeserializer {
|
23
|
+
async deserializeEventGridEvents(encodedEvents) {
|
24
|
+
const decodedArray = (0, util_js_1.parseAndWrap)(encodedEvents);
|
25
|
+
const events = [];
|
26
|
+
for (const o of decodedArray) {
|
27
|
+
(0, util_js_1.validateEventGridEvent)(o);
|
28
|
+
const deserialized = serializer.deserialize(mappers_js_1.EventGridEvent, o, "");
|
29
|
+
events.push(deserialized);
|
30
|
+
}
|
31
|
+
return events;
|
32
|
+
}
|
33
|
+
async deserializeCloudEvents(encodedEvents) {
|
34
|
+
const decodedArray = (0, util_js_1.parseAndWrap)(encodedEvents);
|
35
|
+
const events = [];
|
36
|
+
for (const o of decodedArray) {
|
37
|
+
(0, util_js_1.validateCloudEventEvent)(o);
|
38
|
+
// Check that the required fields are present and of the correct type and the optional fields are missing
|
39
|
+
// or of the correct type.
|
40
|
+
const deserialized = serializer.deserialize(mappers_js_1.CloudEvent, o, "");
|
41
|
+
const modelEvent = {
|
42
|
+
specversion: deserialized.specversion,
|
43
|
+
id: deserialized.id,
|
44
|
+
source: deserialized.source,
|
45
|
+
type: deserialized.type,
|
46
|
+
};
|
47
|
+
if (deserialized.datacontenttype !== undefined) {
|
48
|
+
modelEvent.datacontenttype = deserialized.datacontenttype;
|
49
|
+
}
|
50
|
+
if (deserialized.dataschema !== undefined) {
|
51
|
+
modelEvent.dataschema = deserialized.dataschema;
|
52
|
+
}
|
53
|
+
if (deserialized.subject !== undefined) {
|
54
|
+
modelEvent.subject = deserialized.subject;
|
55
|
+
}
|
56
|
+
if (deserialized.time !== undefined) {
|
57
|
+
modelEvent.time = deserialized.time;
|
58
|
+
}
|
59
|
+
if (deserialized.data !== undefined) {
|
60
|
+
modelEvent.data = deserialized.data;
|
61
|
+
}
|
62
|
+
// If the data the event represents binary, it is encoded as base64 text in a different property on the event and we need to transform it.
|
63
|
+
if (deserialized.dataBase64 !== undefined) {
|
64
|
+
if (deserialized.data !== undefined) {
|
65
|
+
throw new TypeError("event contains both a data and data_base64 field");
|
66
|
+
}
|
67
|
+
if (!(deserialized.dataBase64 instanceof Uint8Array)) {
|
68
|
+
throw new TypeError("event data_base64 property is not an instance of Uint8Array");
|
69
|
+
}
|
70
|
+
modelEvent.data = deserialized.dataBase64;
|
71
|
+
}
|
72
|
+
// Build the "extensionsAttributes" property bag by removing all known top level properties.
|
73
|
+
const extensionAttributes = Object.assign({}, deserialized);
|
74
|
+
for (const propName of models_js_1.cloudEventReservedPropertyNames) {
|
75
|
+
delete extensionAttributes[propName];
|
76
|
+
}
|
77
|
+
delete extensionAttributes.dataBase64;
|
78
|
+
// If any properties remain, copy them to the model.
|
79
|
+
if (Object.keys(extensionAttributes).length > 0) {
|
80
|
+
modelEvent.extensionAttributes = extensionAttributes;
|
81
|
+
}
|
82
|
+
events.push(modelEvent);
|
83
|
+
}
|
84
|
+
return events;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
exports.EventGridDeserializer = EventGridDeserializer;
|
88
|
+
//# sourceMappingURL=consumer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"consumer.js","sourceRoot":"","sources":["../../src/consumer.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AAElC,oDAAsD;AAGtD,2CAA8D;AAC9D,8DAGuC;AACvC,uCAA0F;AAE1F,MAAM,UAAU,GAAG,IAAA,8BAAgB,GAAE,CAAC;AAEtC;;;;;;;;;;GAUG;AACH,MAAa,qBAAqB;IAmBzB,KAAK,CAAC,0BAA0B,CACrC,aAA+C;QAE/C,MAAM,YAAY,GAAG,IAAA,sBAAY,EAAC,aAAa,CAAC,CAAC;QAEjD,MAAM,MAAM,GAA8B,EAAE,CAAC;QAE7C,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;YAC7B,IAAA,gCAAsB,EAAC,CAAC,CAAC,CAAC;YAE1B,MAAM,YAAY,GAAwB,UAAU,CAAC,WAAW,CAAC,2BAAoB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YAE9F,MAAM,CAAC,IAAI,CAAC,YAAuC,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAkBM,KAAK,CAAC,sBAAsB,CACjC,aAA+C;QAE/C,MAAM,YAAY,GAAG,IAAA,sBAAY,EAAC,aAAa,CAAC,CAAC;QAEjD,MAAM,MAAM,GAA0B,EAAE,CAAC;QAEzC,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;YAC7B,IAAA,iCAAuB,EAAC,CAAC,CAAC,CAAC;YAE3B,yGAAyG;YACzG,0BAA0B;YAE1B,MAAM,YAAY,GAAmB,UAAU,CAAC,WAAW,CAAC,uBAAgB,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;YACrF,MAAM,UAAU,GAAwB;gBACtC,WAAW,EAAE,YAAY,CAAC,WAAW;gBACrC,EAAE,EAAE,YAAY,CAAC,EAAE;gBACnB,MAAM,EAAE,YAAY,CAAC,MAAM;gBAC3B,IAAI,EAAE,YAAY,CAAC,IAAI;aACxB,CAAC;YAEF,IAAI,YAAY,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;gBAC/C,UAAU,CAAC,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC;YAC5D,CAAC;YAED,IAAI,YAAY,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC1C,UAAU,CAAC,UAAU,GAAG,YAAY,CAAC,UAAU,CAAC;YAClD,CAAC;YAED,IAAI,YAAY,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;gBACvC,UAAU,CAAC,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC;YAC5C,CAAC;YAED,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACpC,UAAU,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YACtC,CAAC;YAED,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACpC,UAAU,CAAC,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;YACtC,CAAC;YAED,0IAA0I;YAC1I,IAAI,YAAY,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC1C,IAAI,YAAY,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;oBACpC,MAAM,IAAI,SAAS,CAAC,kDAAkD,CAAC,CAAC;gBAC1E,CAAC;gBAED,IAAI,CAAC,CAAC,YAAY,CAAC,UAAU,YAAY,UAAU,CAAC,EAAE,CAAC;oBACrD,MAAM,IAAI,SAAS,CAAC,6DAA6D,CAAC,CAAC;gBACrF,CAAC;gBAED,UAAU,CAAC,IAAI,GAAG,YAAY,CAAC,UAAU,CAAC;YAC5C,CAAC;YAED,4FAA4F;YAC5F,MAAM,mBAAmB,qBAAQ,YAAY,CAAE,CAAC;YAChD,KAAK,MAAM,QAAQ,IAAI,2CAA+B,EAAE,CAAC;gBACvD,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;YACvC,CAAC;YACD,OAAO,mBAAmB,CAAC,UAAU,CAAC;YAEtC,oDAAoD;YACpD,IAAI,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAChD,UAAU,CAAC,mBAAmB,GAAG,mBAAmB,CAAC;YACvD,CAAC;YAED,MAAM,CAAC,IAAI,CAAC,UAAiC,CAAC,CAAC;QACjD,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA5HD,sDA4HC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createSerializer } from \"@azure/core-client\";\nimport type { CloudEvent as WireCloudEvent } from \"./generated/models/index.js\";\nimport type { CloudEvent, EventGridEvent } from \"./models.js\";\nimport { cloudEventReservedPropertyNames } from \"./models.js\";\nimport {\n EventGridEvent as EventGridEventMapper,\n CloudEvent as CloudEventMapper,\n} from \"./generated/models/mappers.js\";\nimport { parseAndWrap, validateEventGridEvent, validateCloudEventEvent } from \"./util.js\";\n\nconst serializer = createSerializer();\n\n/**\n * EventGridDeserializer is used to aid in processing events delivered by EventGrid. It can deserialize a JSON encoded payload\n * of either a single event or batch of events as well as be used to convert the result of `JSON.parse` into an\n * `EventGridEvent` or `CloudEvent` like object.\n *\n * Unlike normal JSON deseralization, EventGridDeserializer does some additional conversions:\n *\n * - The consumer parses the event time property into a `Date` object, for ease of use.\n * - When deserializing an event in the CloudEvent schema, if the event contains binary data, it is base64 decoded\n * and returned as an instance of the `Uint8Array` type.\n */\nexport class EventGridDeserializer {\n /**\n * Deserializes events encoded in the Event Grid schema.\n *\n * @param encodedEvents - the JSON encoded representation of either a single event or an array of\n * events, encoded in the Event Grid Schema.\n */\n public async deserializeEventGridEvents(\n encodedEvents: string,\n ): Promise<EventGridEvent<unknown>[]>;\n\n /**\n * Deserializes events encoded in the Event Grid schema.\n *\n * @param encodedEvents - an object representing a single event, encoded in the Event Grid schema.\n */\n public async deserializeEventGridEvents(\n encodedEvents: Record<string, unknown>,\n ): Promise<EventGridEvent<unknown>[]>;\n public async deserializeEventGridEvents(\n encodedEvents: string | Record<string, unknown>,\n ): Promise<EventGridEvent<unknown>[]> {\n const decodedArray = parseAndWrap(encodedEvents);\n\n const events: EventGridEvent<unknown>[] = [];\n\n for (const o of decodedArray) {\n validateEventGridEvent(o);\n\n const deserialized: EventGridEvent<any> = serializer.deserialize(EventGridEventMapper, o, \"\");\n\n events.push(deserialized as EventGridEvent<unknown>);\n }\n\n return events;\n }\n\n /**\n * Deserializes events encoded in the Cloud Events 1.0 schema.\n *\n * @param encodedEvents - the JSON encoded representation of either a single event or an array of\n * events, encoded in the Cloud Events 1.0 Schema.\n */\n public async deserializeCloudEvents(encodedEvents: string): Promise<CloudEvent<unknown>[]>;\n\n /**\n * Deserializes events encoded in the Cloud Events 1.0 schema.\n *\n * @param encodedEvents - an object representing a single event, encoded in the Cloud Events 1.0 schema.\n */\n public async deserializeCloudEvents(\n encodedEvents: Record<string, unknown>,\n ): Promise<CloudEvent<unknown>[]>;\n public async deserializeCloudEvents(\n encodedEvents: string | Record<string, unknown>,\n ): Promise<CloudEvent<unknown>[]> {\n const decodedArray = parseAndWrap(encodedEvents);\n\n const events: CloudEvent<unknown>[] = [];\n\n for (const o of decodedArray) {\n validateCloudEventEvent(o);\n\n // Check that the required fields are present and of the correct type and the optional fields are missing\n // or of the correct type.\n\n const deserialized: WireCloudEvent = serializer.deserialize(CloudEventMapper, o, \"\");\n const modelEvent: Record<string, any> = {\n specversion: deserialized.specversion,\n id: deserialized.id,\n source: deserialized.source,\n type: deserialized.type,\n };\n\n if (deserialized.datacontenttype !== undefined) {\n modelEvent.datacontenttype = deserialized.datacontenttype;\n }\n\n if (deserialized.dataschema !== undefined) {\n modelEvent.dataschema = deserialized.dataschema;\n }\n\n if (deserialized.subject !== undefined) {\n modelEvent.subject = deserialized.subject;\n }\n\n if (deserialized.time !== undefined) {\n modelEvent.time = deserialized.time;\n }\n\n if (deserialized.data !== undefined) {\n modelEvent.data = deserialized.data;\n }\n\n // If the data the event represents binary, it is encoded as base64 text in a different property on the event and we need to transform it.\n if (deserialized.dataBase64 !== undefined) {\n if (deserialized.data !== undefined) {\n throw new TypeError(\"event contains both a data and data_base64 field\");\n }\n\n if (!(deserialized.dataBase64 instanceof Uint8Array)) {\n throw new TypeError(\"event data_base64 property is not an instance of Uint8Array\");\n }\n\n modelEvent.data = deserialized.dataBase64;\n }\n\n // Build the \"extensionsAttributes\" property bag by removing all known top level properties.\n const extensionAttributes = { ...deserialized };\n for (const propName of cloudEventReservedPropertyNames) {\n delete extensionAttributes[propName];\n }\n delete extensionAttributes.dataBase64;\n\n // If any properties remain, copy them to the model.\n if (Object.keys(extensionAttributes).length > 0) {\n modelEvent.extensionAttributes = extensionAttributes;\n }\n\n events.push(modelEvent as CloudEvent<unknown>);\n }\n\n return events;\n }\n}\n"]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cryptoHelpers.d.ts","sourceRoot":"","sources":["../../src/cryptoHelpers.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAItF"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.sha256Hmac = sha256Hmac;
|
6
|
+
const node_crypto_1 = require("node:crypto");
|
7
|
+
/**
|
8
|
+
* @internal
|
9
|
+
*/
|
10
|
+
async function sha256Hmac(secret, stringToSign) {
|
11
|
+
const decodedSecret = Buffer.from(secret, "base64");
|
12
|
+
return (0, node_crypto_1.createHmac)("sha256", decodedSecret).update(stringToSign).digest("base64");
|
13
|
+
}
|
14
|
+
//# sourceMappingURL=cryptoHelpers.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cryptoHelpers.js","sourceRoot":"","sources":["../../src/cryptoHelpers.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,gCAIC;AATD,6CAAyC;AAEzC;;GAEG;AACI,KAAK,UAAU,UAAU,CAAC,MAAc,EAAE,YAAoB;IACnE,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAEpD,OAAO,IAAA,wBAAU,EAAC,QAAQ,EAAE,aAAa,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AACnF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { createHmac } from \"node:crypto\";\n\n/**\n * @internal\n */\nexport async function sha256Hmac(secret: string, stringToSign: string): Promise<string> {\n const decodedSecret = Buffer.from(secret, \"base64\");\n\n return createHmac(\"sha256\", decodedSecret).update(stringToSign).digest(\"base64\");\n}\n"]}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import type { KeyCredential, SASCredential } from "@azure/core-auth";
|
2
|
+
import type { PipelinePolicy } from "@azure/core-rest-pipeline";
|
3
|
+
/**
|
4
|
+
* The programmatic identifier of the eventGridCredentialPolicy.
|
5
|
+
*/
|
6
|
+
export declare const eventGridCredentialPolicyName = "eventGridCredentialPolicy";
|
7
|
+
/**
|
8
|
+
* A concrete implementation of an AzureKeyCredential policy
|
9
|
+
* using the appropriate header for Event Grid
|
10
|
+
*/
|
11
|
+
export declare function eventGridCredentialPolicy(credential: KeyCredential | SASCredential): PipelinePolicy;
|
12
|
+
//# sourceMappingURL=eventGridAuthenticationPolicy.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGridAuthenticationPolicy.d.ts","sourceRoot":"","sources":["../../src/eventGridAuthenticationPolicy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,2BAA2B,CAAC;AAcnC;;GAEG;AACH,eAAO,MAAM,6BAA6B,8BAA8B,CAAC;AAEzE;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,aAAa,GAAG,aAAa,GACxC,cAAc,CAahB"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
"use strict";
|
2
|
+
// Copyright (c) Microsoft Corporation.
|
3
|
+
// Licensed under the MIT License.
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
5
|
+
exports.eventGridCredentialPolicyName = void 0;
|
6
|
+
exports.eventGridCredentialPolicy = eventGridCredentialPolicy;
|
7
|
+
const util_js_1 = require("./util.js");
|
8
|
+
/**
|
9
|
+
* The name of the header to include when a Shared Key is used for authentication.
|
10
|
+
*/
|
11
|
+
const API_KEY_HEADER_NAME = "aeg-sas-key";
|
12
|
+
/**
|
13
|
+
* The name of the header to include when Shared Access Signature is used for authentication.
|
14
|
+
*/
|
15
|
+
const SAS_TOKEN_HEADER_NAME = "aeg-sas-token";
|
16
|
+
/**
|
17
|
+
* The programmatic identifier of the eventGridCredentialPolicy.
|
18
|
+
*/
|
19
|
+
exports.eventGridCredentialPolicyName = "eventGridCredentialPolicy";
|
20
|
+
/**
|
21
|
+
* A concrete implementation of an AzureKeyCredential policy
|
22
|
+
* using the appropriate header for Event Grid
|
23
|
+
*/
|
24
|
+
function eventGridCredentialPolicy(credential) {
|
25
|
+
return {
|
26
|
+
name: exports.eventGridCredentialPolicyName,
|
27
|
+
async sendRequest(request, next) {
|
28
|
+
if ((0, util_js_1.isKeyCredentialLike)(credential)) {
|
29
|
+
request.headers.set(API_KEY_HEADER_NAME, credential.key);
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
request.headers.set(SAS_TOKEN_HEADER_NAME, credential.signature);
|
33
|
+
}
|
34
|
+
return next(request);
|
35
|
+
},
|
36
|
+
};
|
37
|
+
}
|
38
|
+
//# sourceMappingURL=eventGridAuthenticationPolicy.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventGridAuthenticationPolicy.js","sourceRoot":"","sources":["../../src/eventGridAuthenticationPolicy.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;;AA+BlC,8DAeC;AApCD,uCAAgD;AAEhD;;GAEG;AACH,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAE1C;;GAEG;AACH,MAAM,qBAAqB,GAAG,eAAe,CAAC;AAE9C;;GAEG;AACU,QAAA,6BAA6B,GAAG,2BAA2B,CAAC;AAEzE;;;GAGG;AACH,SAAgB,yBAAyB,CACvC,UAAyC;IAEzC,OAAO;QACL,IAAI,EAAE,qCAA6B;QACnC,KAAK,CAAC,WAAW,CAAC,OAAwB,EAAE,IAAiB;YAC3D,IAAI,IAAA,6BAAmB,EAAC,UAAU,CAAC,EAAE,CAAC;gBACpC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC;YAC3D,CAAC;iBAAM,CAAC;gBACN,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,UAAU,CAAC,SAAS,CAAC,CAAC;YACnE,CAAC;YAED,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { KeyCredential, SASCredential } from \"@azure/core-auth\";\nimport type {\n PipelineResponse,\n PipelineRequest,\n SendRequest,\n PipelinePolicy,\n} from \"@azure/core-rest-pipeline\";\n\nimport { isKeyCredentialLike } from \"./util.js\";\n\n/**\n * The name of the header to include when a Shared Key is used for authentication.\n */\nconst API_KEY_HEADER_NAME = \"aeg-sas-key\";\n\n/**\n * The name of the header to include when Shared Access Signature is used for authentication.\n */\nconst SAS_TOKEN_HEADER_NAME = \"aeg-sas-token\";\n\n/**\n * The programmatic identifier of the eventGridCredentialPolicy.\n */\nexport const eventGridCredentialPolicyName = \"eventGridCredentialPolicy\";\n\n/**\n * A concrete implementation of an AzureKeyCredential policy\n * using the appropriate header for Event Grid\n */\nexport function eventGridCredentialPolicy(\n credential: KeyCredential | SASCredential,\n): PipelinePolicy {\n return {\n name: eventGridCredentialPolicyName,\n async sendRequest(request: PipelineRequest, next: SendRequest): Promise<PipelineResponse> {\n if (isKeyCredentialLike(credential)) {\n request.headers.set(API_KEY_HEADER_NAME, credential.key);\n } else {\n request.headers.set(SAS_TOKEN_HEADER_NAME, credential.signature);\n }\n\n return next(request);\n },\n };\n}\n"]}
|