@azure/eventgrid 4.8.1-alpha.20220401.1 → 4.10.0-alpha.20220412.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Release History
2
2
 
3
- ## 4.8.1 (Unreleased)
3
+ ## 4.10.0 (Unreleased)
4
4
 
5
5
  ### Features Added
6
6
 
@@ -10,6 +10,20 @@
10
10
 
11
11
  ### Other Changes
12
12
 
13
+ - Updated our `@azure/core-tracing` dependency to the latest version (1.0.0).
14
+ - Notable changes include Removal of `@opentelemetry/api` as a transitive dependency and ensuring that the active context is properly propagated.
15
+ - Customers who would like to continue using OpenTelemetry driven tracing should visit our [OpenTelemetry Instrumentation](https://www.npmjs.com/package/@azure/opentelemetry-instrumentation-azure-sdk) package for instructions.
16
+
17
+ ## 4.9.0 (2022-04-07)
18
+
19
+ ### Features Added
20
+
21
+ - Added new System Events:
22
+
23
+ - `Microsoft.HealthcareApis.FhirResourceCreated`
24
+ - `Microsoft.HealthcareApis.FhirUpdatedCreated`
25
+ - `Microsoft.HealthcareApis.FhirDeletedCreated`
26
+
13
27
  ## 4.8.0 (2022-03-08)
14
28
 
15
29
  ### Features Added
package/dist/index.js CHANGED
@@ -6605,6 +6605,114 @@ const ApiManagementApiReleaseDeletedEventData = {
6605
6605
  }
6606
6606
  }
6607
6607
  };
6608
+ const HealthcareFhirResourceCreatedEventData = {
6609
+ type: {
6610
+ name: "Composite",
6611
+ className: "HealthcareFhirResourceCreatedEventData",
6612
+ modelProperties: {
6613
+ resourceType: {
6614
+ serializedName: "resourceType",
6615
+ required: true,
6616
+ type: {
6617
+ name: "String"
6618
+ }
6619
+ },
6620
+ resourceFhirAccount: {
6621
+ serializedName: "resourceFhirAccount",
6622
+ required: true,
6623
+ type: {
6624
+ name: "String"
6625
+ }
6626
+ },
6627
+ resourceFhirId: {
6628
+ serializedName: "resourceFhirId",
6629
+ required: true,
6630
+ type: {
6631
+ name: "String"
6632
+ }
6633
+ },
6634
+ resourceVersionId: {
6635
+ serializedName: "resourceVersionId",
6636
+ required: true,
6637
+ type: {
6638
+ name: "Number"
6639
+ }
6640
+ }
6641
+ }
6642
+ }
6643
+ };
6644
+ const HealthcareFhirResourceUpdatedEventData = {
6645
+ type: {
6646
+ name: "Composite",
6647
+ className: "HealthcareFhirResourceUpdatedEventData",
6648
+ modelProperties: {
6649
+ resourceType: {
6650
+ serializedName: "resourceType",
6651
+ required: true,
6652
+ type: {
6653
+ name: "String"
6654
+ }
6655
+ },
6656
+ resourceFhirAccount: {
6657
+ serializedName: "resourceFhirAccount",
6658
+ required: true,
6659
+ type: {
6660
+ name: "String"
6661
+ }
6662
+ },
6663
+ resourceFhirId: {
6664
+ serializedName: "resourceFhirId",
6665
+ required: true,
6666
+ type: {
6667
+ name: "String"
6668
+ }
6669
+ },
6670
+ resourceVersionId: {
6671
+ serializedName: "resourceVersionId",
6672
+ required: true,
6673
+ type: {
6674
+ name: "Number"
6675
+ }
6676
+ }
6677
+ }
6678
+ }
6679
+ };
6680
+ const HealthcareFhirResourceDeletedEventData = {
6681
+ type: {
6682
+ name: "Composite",
6683
+ className: "HealthcareFhirResourceDeletedEventData",
6684
+ modelProperties: {
6685
+ resourceType: {
6686
+ serializedName: "resourceType",
6687
+ required: true,
6688
+ type: {
6689
+ name: "String"
6690
+ }
6691
+ },
6692
+ resourceFhirAccount: {
6693
+ serializedName: "resourceFhirAccount",
6694
+ required: true,
6695
+ type: {
6696
+ name: "String"
6697
+ }
6698
+ },
6699
+ resourceFhirId: {
6700
+ serializedName: "resourceFhirId",
6701
+ required: true,
6702
+ type: {
6703
+ name: "String"
6704
+ }
6705
+ },
6706
+ resourceVersionId: {
6707
+ serializedName: "resourceVersionId",
6708
+ required: true,
6709
+ type: {
6710
+ name: "Number"
6711
+ }
6712
+ }
6713
+ }
6714
+ }
6715
+ };
6608
6716
  const IotHubDeviceCreatedEventData = {
6609
6717
  type: {
6610
6718
  name: "Composite",
@@ -7552,6 +7660,9 @@ var Mappers = /*#__PURE__*/Object.freeze({
7552
7660
  ApiManagementApiReleaseCreatedEventData: ApiManagementApiReleaseCreatedEventData,
7553
7661
  ApiManagementApiReleaseUpdatedEventData: ApiManagementApiReleaseUpdatedEventData,
7554
7662
  ApiManagementApiReleaseDeletedEventData: ApiManagementApiReleaseDeletedEventData,
7663
+ HealthcareFhirResourceCreatedEventData: HealthcareFhirResourceCreatedEventData,
7664
+ HealthcareFhirResourceUpdatedEventData: HealthcareFhirResourceUpdatedEventData,
7665
+ HealthcareFhirResourceDeletedEventData: HealthcareFhirResourceDeletedEventData,
7555
7666
  IotHubDeviceCreatedEventData: IotHubDeviceCreatedEventData,
7556
7667
  IotHubDeviceDeletedEventData: IotHubDeviceDeletedEventData,
7557
7668
  IotHubDeviceConnectedEventData: IotHubDeviceConnectedEventData,
@@ -7623,7 +7734,7 @@ class GeneratedClientContext extends coreClient__namespace.ServiceClient {
7623
7734
  const defaults = {
7624
7735
  requestContentType: "application/json; charset=utf-8"
7625
7736
  };
7626
- const packageDetails = `azsdk-js-eventgrid/4.8.1`;
7737
+ const packageDetails = `azsdk-js-eventgrid/4.10.0`;
7627
7738
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
7628
7739
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
7629
7740
  : `${packageDetails}`;
@@ -7771,12 +7882,13 @@ function cloudEventDistributedTracingEnricherPolicy() {
7771
7882
 
7772
7883
  // Copyright (c) Microsoft Corporation.
7773
7884
  /**
7774
- * Creates a span using the global tracer.
7885
+ * A tracing client to handle spans.
7775
7886
  * @internal
7776
7887
  */
7777
- const createSpan = coreTracing.createSpanFunction({
7778
- packagePrefix: "Azure.Data.EventGrid",
7888
+ const tracingClient = coreTracing.createTracingClient({
7779
7889
  namespace: "Microsoft.Messaging.EventGrid",
7890
+ packageName: "@azure/event-grid",
7891
+ packageVersion: "4.9.0",
7780
7892
  });
7781
7893
 
7782
7894
  // Copyright (c) Microsoft Corporation.
@@ -7822,31 +7934,23 @@ class EventGridPublisherClient {
7822
7934
  * @param events - The events to send. The events should be in the schema used when constructing the client.
7823
7935
  * @param options - Options to control the underlying operation.
7824
7936
  */
7825
- async send(events, options) {
7826
- const { span, updatedOptions } = createSpan("EventGridPublisherClient-send", options || {});
7827
- try {
7937
+ send(events, options = {}) {
7938
+ return tracingClient.withSpan("EventGridPublisherClient.send", options, (updatedOptions) => {
7828
7939
  switch (this.inputSchema) {
7829
7940
  case "EventGrid": {
7830
- return await this.client.publishEvents(this.endpointUrl, events.map(convertEventGridEventToModelType), updatedOptions);
7941
+ return this.client.publishEvents(this.endpointUrl, events.map(convertEventGridEventToModelType), updatedOptions);
7831
7942
  }
7832
7943
  case "CloudEvent": {
7833
- return await this.client.publishCloudEventEvents(this.endpointUrl, events.map(convertCloudEventToModelType), updatedOptions);
7944
+ return this.client.publishCloudEventEvents(this.endpointUrl, events.map(convertCloudEventToModelType), updatedOptions);
7834
7945
  }
7835
7946
  case "Custom": {
7836
- return await this.client.publishCustomEventEvents(this.endpointUrl, events, updatedOptions);
7947
+ return this.client.publishCustomEventEvents(this.endpointUrl, events, updatedOptions);
7837
7948
  }
7838
7949
  default: {
7839
7950
  throw new Error(`Unknown input schema type '${this.inputSchema}'`);
7840
7951
  }
7841
7952
  }
7842
- }
7843
- catch (e) {
7844
- span.setStatus({ code: coreTracing.SpanStatusCode.ERROR, message: e.message });
7845
- throw e;
7846
- }
7847
- finally {
7848
- span.end();
7849
- }
7953
+ });
7850
7954
  }
7851
7955
  }
7852
7956
  /**