@azure/eventgrid 4.6.0-alpha.20220110.2 → 4.7.0-alpha.20220207.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,11 +1,20 @@
1
1
  # Release History
2
2
 
3
+ ## 4.7.0 (2022-02-08)
4
+
5
+ ### Key Bug Fixes
6
+
7
+ - The TypeScript typings for two events have had small changes to accurately reflect the data sent by Azure.
8
+ - `Microsoft.EventHub.CaptureFileCreated`'s `fileurl` property is now correctly cased as `fileUrl`
9
+ - `Microsoft.Storage.DirectoryDeleted`'s `recursive` property has been changed from `boolean` to `string`. The service sets this property to the string `"true"` or `"false"`.
10
+
3
11
  ## 4.6.0 (2022-01-11)
4
12
 
5
13
  ### Features Added
6
14
 
7
15
  - Added a new property to `AcsRecordingChunkInfo` (for the `Microsoft.Communication.RecordingFileStatusUpdated` system event):
8
- - `deleteLocation`
16
+
17
+ - `deleteLocation`
9
18
 
10
19
  - Added new properties to `ContainerRegistryArtifactEventData` and `ContainerRegistryEventData` (for the `Microsoft.ContainerRegistry.{ChartDeleted|ChartPushed|ImagePushed|ImageDeleted}` system events):
11
20
 
package/dist/index.js CHANGED
@@ -9,6 +9,26 @@ var uuid = require('uuid');
9
9
  var coreRestPipeline = require('@azure/core-rest-pipeline');
10
10
  var crypto = require('crypto');
11
11
 
12
+ function _interopNamespace(e) {
13
+ if (e && e.__esModule) return e;
14
+ var n = Object.create(null);
15
+ if (e) {
16
+ Object.keys(e).forEach(function (k) {
17
+ if (k !== 'default') {
18
+ var d = Object.getOwnPropertyDescriptor(e, k);
19
+ Object.defineProperty(n, k, d.get ? d : {
20
+ enumerable: true,
21
+ get: function () { return e[k]; }
22
+ });
23
+ }
24
+ });
25
+ }
26
+ n["default"] = e;
27
+ return Object.freeze(n);
28
+ }
29
+
30
+ var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
31
+
12
32
  // Copyright (c) Microsoft Corporation.
13
33
  // Licensed under the MIT license.
14
34
  /**
@@ -678,7 +698,7 @@ const StorageDirectoryDeletedEventData = {
678
698
  serializedName: "recursive",
679
699
  required: true,
680
700
  type: {
681
- name: "Boolean"
701
+ name: "String"
682
702
  }
683
703
  },
684
704
  sequencer: {
@@ -1116,8 +1136,8 @@ const EventHubCaptureFileCreatedEventData = {
1116
1136
  name: "Composite",
1117
1137
  className: "EventHubCaptureFileCreatedEventData",
1118
1138
  modelProperties: {
1119
- fileurl: {
1120
- serializedName: "fileurl",
1139
+ fileUrl: {
1140
+ serializedName: "fileUrl",
1121
1141
  required: true,
1122
1142
  type: {
1123
1143
  name: "String"
@@ -7579,7 +7599,7 @@ var Mappers = /*#__PURE__*/Object.freeze({
7579
7599
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7580
7600
  */
7581
7601
  /** @internal */
7582
- class GeneratedClientContext extends coreClient.ServiceClient {
7602
+ class GeneratedClientContext extends coreClient__namespace.ServiceClient {
7583
7603
  /**
7584
7604
  * Initializes a new instance of the GeneratedClientContext class.
7585
7605
  * @param options The parameter options
@@ -7592,7 +7612,7 @@ class GeneratedClientContext extends coreClient.ServiceClient {
7592
7612
  const defaults = {
7593
7613
  requestContentType: "application/json; charset=utf-8"
7594
7614
  };
7595
- const packageDetails = `azsdk-js-eventgrid/4.6.0`;
7615
+ const packageDetails = `azsdk-js-eventgrid/4.7.0`;
7596
7616
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
7597
7617
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
7598
7618
  : `${packageDetails}`;
@@ -7650,7 +7670,7 @@ class GeneratedClient extends GeneratedClientContext {
7650
7670
  }
7651
7671
  }
7652
7672
  // Operation Specifications
7653
- const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
7673
+ const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
7654
7674
  const publishEventsOperationSpec = {
7655
7675
  path: "",
7656
7676
  httpMethod: "POST",
@@ -7660,7 +7680,7 @@ const publishEventsOperationSpec = {
7660
7680
  urlParameters: [topicHostname],
7661
7681
  headerParameters: [contentType],
7662
7682
  mediaType: "json",
7663
- serializer
7683
+ serializer: serializer$1
7664
7684
  };
7665
7685
  const publishCloudEventEventsOperationSpec = {
7666
7686
  path: "",
@@ -7671,7 +7691,7 @@ const publishCloudEventEventsOperationSpec = {
7671
7691
  urlParameters: [topicHostname],
7672
7692
  headerParameters: [contentType1],
7673
7693
  mediaType: "json",
7674
- serializer
7694
+ serializer: serializer$1
7675
7695
  };
7676
7696
  const publishCustomEventEventsOperationSpec = {
7677
7697
  path: "",
@@ -7682,7 +7702,7 @@ const publishCustomEventEventsOperationSpec = {
7682
7702
  urlParameters: [topicHostname],
7683
7703
  headerParameters: [contentType],
7684
7704
  mediaType: "json",
7685
- serializer
7705
+ serializer: serializer$1
7686
7706
  };
7687
7707
 
7688
7708
  // Copyright (c) Microsoft Corporation.
@@ -7889,7 +7909,7 @@ async function generateSharedAccessSignature(endpointUrl, credential, expiresOnU
7889
7909
  }
7890
7910
 
7891
7911
  // Copyright (c) Microsoft Corporation.
7892
- const serializer$1 = coreClient.createSerializer();
7912
+ const serializer = coreClient.createSerializer();
7893
7913
  /**
7894
7914
  * EventGridDeserializer is used to aid in processing events delivered by EventGrid. It can deserialize a JSON encoded payload
7895
7915
  * of either a single event or batch of events as well as be used to convert the result of `JSON.parse` into an
@@ -7907,7 +7927,7 @@ class EventGridDeserializer {
7907
7927
  const events = [];
7908
7928
  for (const o of decodedArray) {
7909
7929
  validateEventGridEvent(o);
7910
- const deserialized = serializer$1.deserialize(EventGridEvent, o, "");
7930
+ const deserialized = serializer.deserialize(EventGridEvent, o, "");
7911
7931
  events.push(deserialized);
7912
7932
  }
7913
7933
  return events;
@@ -7919,7 +7939,7 @@ class EventGridDeserializer {
7919
7939
  validateCloudEventEvent(o);
7920
7940
  // Check that the required fields are present and of the correct type and the optional fields are missing
7921
7941
  // or of the correct type.
7922
- const deserialized = serializer$1.deserialize(CloudEvent, o, "");
7942
+ const deserialized = serializer.deserialize(CloudEvent, o, "");
7923
7943
  const modelEvent = {
7924
7944
  specversion: deserialized.specversion,
7925
7945
  id: deserialized.id,
@@ -7988,15 +8008,11 @@ function isSystemEvent(eventType, event) {
7988
8008
 
7989
8009
  Object.defineProperty(exports, 'AzureKeyCredential', {
7990
8010
  enumerable: true,
7991
- get: function () {
7992
- return coreAuth.AzureKeyCredential;
7993
- }
8011
+ get: function () { return coreAuth.AzureKeyCredential; }
7994
8012
  });
7995
8013
  Object.defineProperty(exports, 'AzureSASCredential', {
7996
8014
  enumerable: true,
7997
- get: function () {
7998
- return coreAuth.AzureSASCredential;
7999
- }
8015
+ get: function () { return coreAuth.AzureSASCredential; }
8000
8016
  });
8001
8017
  exports.EventGridDeserializer = EventGridDeserializer;
8002
8018
  exports.EventGridPublisherClient = EventGridPublisherClient;