@headspace/protos-events 1.125.0 → 1.126.0

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/lib/index.d.ts CHANGED
@@ -4484,7 +4484,7 @@ export interface IContentfulCategoryCreated {
4484
4484
  slug?: (string|null);
4485
4485
 
4486
4486
  /** ContentfulCategoryCreated topic */
4487
- topic?: ({ [k: string]: contentful.ISlugReference }|null);
4487
+ topic?: (contentful.ISlugReference|null);
4488
4488
 
4489
4489
  /** ContentfulCategoryCreated type */
4490
4490
  type?: (string|null);
@@ -4512,7 +4512,7 @@ export class ContentfulCategoryCreated implements IContentfulCategoryCreated {
4512
4512
  public slug: string;
4513
4513
 
4514
4514
  /** ContentfulCategoryCreated topic. */
4515
- public topic: { [k: string]: contentful.ISlugReference };
4515
+ public topic?: (contentful.ISlugReference|null);
4516
4516
 
4517
4517
  /** ContentfulCategoryCreated type. */
4518
4518
  public type: string;
@@ -4604,7 +4604,7 @@ export interface IContentfulCategoryUpdated {
4604
4604
  slug?: (string|null);
4605
4605
 
4606
4606
  /** ContentfulCategoryUpdated topic */
4607
- topic?: ({ [k: string]: contentful.ISlugReference }|null);
4607
+ topic?: (contentful.ISlugReference|null);
4608
4608
 
4609
4609
  /** ContentfulCategoryUpdated type */
4610
4610
  type?: (string|null);
@@ -4632,7 +4632,7 @@ export class ContentfulCategoryUpdated implements IContentfulCategoryUpdated {
4632
4632
  public slug: string;
4633
4633
 
4634
4634
  /** ContentfulCategoryUpdated topic. */
4635
- public topic: { [k: string]: contentful.ISlugReference };
4635
+ public topic?: (contentful.ISlugReference|null);
4636
4636
 
4637
4637
  /** ContentfulCategoryUpdated type. */
4638
4638
  public type: string;
package/lib/index.js CHANGED
@@ -11505,7 +11505,7 @@ $root.ContentfulCategoryCreated = (function() {
11505
11505
  * @interface IContentfulCategoryCreated
11506
11506
  * @property {string|null} [name] ContentfulCategoryCreated name
11507
11507
  * @property {string|null} [slug] ContentfulCategoryCreated slug
11508
- * @property {Object.<string,contentful.ISlugReference>|null} [topic] ContentfulCategoryCreated topic
11508
+ * @property {contentful.ISlugReference|null} [topic] ContentfulCategoryCreated topic
11509
11509
  * @property {string|null} [type] ContentfulCategoryCreated type
11510
11510
  * @property {Array.<contentful.ISlugReference>|null} [content] ContentfulCategoryCreated content
11511
11511
  * @property {number|Long|null} [createdAt] ContentfulCategoryCreated createdAt
@@ -11520,7 +11520,6 @@ $root.ContentfulCategoryCreated = (function() {
11520
11520
  * @param {IContentfulCategoryCreated=} [properties] Properties to set
11521
11521
  */
11522
11522
  function ContentfulCategoryCreated(properties) {
11523
- this.topic = {};
11524
11523
  this.content = [];
11525
11524
  if (properties)
11526
11525
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -11546,11 +11545,11 @@ $root.ContentfulCategoryCreated = (function() {
11546
11545
 
11547
11546
  /**
11548
11547
  * ContentfulCategoryCreated topic.
11549
- * @member {Object.<string,contentful.ISlugReference>} topic
11548
+ * @member {contentful.ISlugReference|null|undefined} topic
11550
11549
  * @memberof ContentfulCategoryCreated
11551
11550
  * @instance
11552
11551
  */
11553
- ContentfulCategoryCreated.prototype.topic = $util.emptyObject;
11552
+ ContentfulCategoryCreated.prototype.topic = null;
11554
11553
 
11555
11554
  /**
11556
11555
  * ContentfulCategoryCreated type.
@@ -11605,10 +11604,7 @@ $root.ContentfulCategoryCreated = (function() {
11605
11604
  if (message.slug != null && message.hasOwnProperty("slug"))
11606
11605
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.slug);
11607
11606
  if (message.topic != null && message.hasOwnProperty("topic"))
11608
- for (var keys = Object.keys(message.topic), i = 0; i < keys.length; ++i) {
11609
- writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
11610
- $root.contentful.SlugReference.encode(message.topic[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
11611
- }
11607
+ $root.contentful.SlugReference.encode(message.topic, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
11612
11608
  if (message.type != null && message.hasOwnProperty("type"))
11613
11609
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.type);
11614
11610
  if (message.content != null && message.content.length)
@@ -11646,7 +11642,7 @@ $root.ContentfulCategoryCreated = (function() {
11646
11642
  ContentfulCategoryCreated.decode = function decode(reader, length) {
11647
11643
  if (!(reader instanceof $Reader))
11648
11644
  reader = $Reader.create(reader);
11649
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulCategoryCreated(), key;
11645
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulCategoryCreated();
11650
11646
  while (reader.pos < end) {
11651
11647
  var tag = reader.uint32();
11652
11648
  switch (tag >>> 3) {
@@ -11657,12 +11653,7 @@ $root.ContentfulCategoryCreated = (function() {
11657
11653
  message.slug = reader.string();
11658
11654
  break;
11659
11655
  case 3:
11660
- reader.skip().pos++;
11661
- if (message.topic === $util.emptyObject)
11662
- message.topic = {};
11663
- key = reader.string();
11664
- reader.pos++;
11665
- message.topic[key] = $root.contentful.SlugReference.decode(reader, reader.uint32());
11656
+ message.topic = $root.contentful.SlugReference.decode(reader, reader.uint32());
11666
11657
  break;
11667
11658
  case 4:
11668
11659
  message.type = reader.string();
@@ -11717,14 +11708,9 @@ $root.ContentfulCategoryCreated = (function() {
11717
11708
  if (!$util.isString(message.slug))
11718
11709
  return "slug: string expected";
11719
11710
  if (message.topic != null && message.hasOwnProperty("topic")) {
11720
- if (!$util.isObject(message.topic))
11721
- return "topic: object expected";
11722
- var key = Object.keys(message.topic);
11723
- for (var i = 0; i < key.length; ++i) {
11724
- var error = $root.contentful.SlugReference.verify(message.topic[key[i]]);
11725
- if (error)
11726
- return "topic." + error;
11727
- }
11711
+ var error = $root.contentful.SlugReference.verify(message.topic);
11712
+ if (error)
11713
+ return "topic." + error;
11728
11714
  }
11729
11715
  if (message.type != null && message.hasOwnProperty("type"))
11730
11716
  if (!$util.isString(message.type))
@@ -11760,15 +11746,10 @@ $root.ContentfulCategoryCreated = (function() {
11760
11746
  message.name = String(object.name);
11761
11747
  if (object.slug != null)
11762
11748
  message.slug = String(object.slug);
11763
- if (object.topic) {
11749
+ if (object.topic != null) {
11764
11750
  if (typeof object.topic !== "object")
11765
11751
  throw TypeError(".ContentfulCategoryCreated.topic: object expected");
11766
- message.topic = {};
11767
- for (var keys = Object.keys(object.topic), i = 0; i < keys.length; ++i) {
11768
- if (typeof object.topic[keys[i]] !== "object")
11769
- throw TypeError(".ContentfulCategoryCreated.topic: object expected");
11770
- message.topic[keys[i]] = $root.contentful.SlugReference.fromObject(object.topic[keys[i]]);
11771
- }
11752
+ message.topic = $root.contentful.SlugReference.fromObject(object.topic);
11772
11753
  }
11773
11754
  if (object.type != null)
11774
11755
  message.type = String(object.type);
@@ -11809,11 +11790,10 @@ $root.ContentfulCategoryCreated = (function() {
11809
11790
  var object = {};
11810
11791
  if (options.arrays || options.defaults)
11811
11792
  object.content = [];
11812
- if (options.objects || options.defaults)
11813
- object.topic = {};
11814
11793
  if (options.defaults) {
11815
11794
  object.name = "";
11816
11795
  object.slug = "";
11796
+ object.topic = null;
11817
11797
  object.type = "";
11818
11798
  if ($util.Long) {
11819
11799
  var long = new $util.Long(0, 0, true);
@@ -11825,12 +11805,8 @@ $root.ContentfulCategoryCreated = (function() {
11825
11805
  object.name = message.name;
11826
11806
  if (message.slug != null && message.hasOwnProperty("slug"))
11827
11807
  object.slug = message.slug;
11828
- var keys2;
11829
- if (message.topic && (keys2 = Object.keys(message.topic)).length) {
11830
- object.topic = {};
11831
- for (var j = 0; j < keys2.length; ++j)
11832
- object.topic[keys2[j]] = $root.contentful.SlugReference.toObject(message.topic[keys2[j]], options);
11833
- }
11808
+ if (message.topic != null && message.hasOwnProperty("topic"))
11809
+ object.topic = $root.contentful.SlugReference.toObject(message.topic, options);
11834
11810
  if (message.type != null && message.hasOwnProperty("type"))
11835
11811
  object.type = message.type;
11836
11812
  if (message.content && message.content.length) {
@@ -11868,7 +11844,7 @@ $root.ContentfulCategoryUpdated = (function() {
11868
11844
  * @interface IContentfulCategoryUpdated
11869
11845
  * @property {string|null} [name] ContentfulCategoryUpdated name
11870
11846
  * @property {string|null} [slug] ContentfulCategoryUpdated slug
11871
- * @property {Object.<string,contentful.ISlugReference>|null} [topic] ContentfulCategoryUpdated topic
11847
+ * @property {contentful.ISlugReference|null} [topic] ContentfulCategoryUpdated topic
11872
11848
  * @property {string|null} [type] ContentfulCategoryUpdated type
11873
11849
  * @property {Array.<contentful.ISlugReference>|null} [content] ContentfulCategoryUpdated content
11874
11850
  * @property {number|Long|null} [updatedAt] ContentfulCategoryUpdated updatedAt
@@ -11883,7 +11859,6 @@ $root.ContentfulCategoryUpdated = (function() {
11883
11859
  * @param {IContentfulCategoryUpdated=} [properties] Properties to set
11884
11860
  */
11885
11861
  function ContentfulCategoryUpdated(properties) {
11886
- this.topic = {};
11887
11862
  this.content = [];
11888
11863
  if (properties)
11889
11864
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
@@ -11909,11 +11884,11 @@ $root.ContentfulCategoryUpdated = (function() {
11909
11884
 
11910
11885
  /**
11911
11886
  * ContentfulCategoryUpdated topic.
11912
- * @member {Object.<string,contentful.ISlugReference>} topic
11887
+ * @member {contentful.ISlugReference|null|undefined} topic
11913
11888
  * @memberof ContentfulCategoryUpdated
11914
11889
  * @instance
11915
11890
  */
11916
- ContentfulCategoryUpdated.prototype.topic = $util.emptyObject;
11891
+ ContentfulCategoryUpdated.prototype.topic = null;
11917
11892
 
11918
11893
  /**
11919
11894
  * ContentfulCategoryUpdated type.
@@ -11968,10 +11943,7 @@ $root.ContentfulCategoryUpdated = (function() {
11968
11943
  if (message.slug != null && message.hasOwnProperty("slug"))
11969
11944
  writer.uint32(/* id 2, wireType 2 =*/18).string(message.slug);
11970
11945
  if (message.topic != null && message.hasOwnProperty("topic"))
11971
- for (var keys = Object.keys(message.topic), i = 0; i < keys.length; ++i) {
11972
- writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
11973
- $root.contentful.SlugReference.encode(message.topic[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
11974
- }
11946
+ $root.contentful.SlugReference.encode(message.topic, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
11975
11947
  if (message.type != null && message.hasOwnProperty("type"))
11976
11948
  writer.uint32(/* id 4, wireType 2 =*/34).string(message.type);
11977
11949
  if (message.content != null && message.content.length)
@@ -12009,7 +11981,7 @@ $root.ContentfulCategoryUpdated = (function() {
12009
11981
  ContentfulCategoryUpdated.decode = function decode(reader, length) {
12010
11982
  if (!(reader instanceof $Reader))
12011
11983
  reader = $Reader.create(reader);
12012
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulCategoryUpdated(), key;
11984
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ContentfulCategoryUpdated();
12013
11985
  while (reader.pos < end) {
12014
11986
  var tag = reader.uint32();
12015
11987
  switch (tag >>> 3) {
@@ -12020,12 +11992,7 @@ $root.ContentfulCategoryUpdated = (function() {
12020
11992
  message.slug = reader.string();
12021
11993
  break;
12022
11994
  case 3:
12023
- reader.skip().pos++;
12024
- if (message.topic === $util.emptyObject)
12025
- message.topic = {};
12026
- key = reader.string();
12027
- reader.pos++;
12028
- message.topic[key] = $root.contentful.SlugReference.decode(reader, reader.uint32());
11995
+ message.topic = $root.contentful.SlugReference.decode(reader, reader.uint32());
12029
11996
  break;
12030
11997
  case 4:
12031
11998
  message.type = reader.string();
@@ -12080,14 +12047,9 @@ $root.ContentfulCategoryUpdated = (function() {
12080
12047
  if (!$util.isString(message.slug))
12081
12048
  return "slug: string expected";
12082
12049
  if (message.topic != null && message.hasOwnProperty("topic")) {
12083
- if (!$util.isObject(message.topic))
12084
- return "topic: object expected";
12085
- var key = Object.keys(message.topic);
12086
- for (var i = 0; i < key.length; ++i) {
12087
- var error = $root.contentful.SlugReference.verify(message.topic[key[i]]);
12088
- if (error)
12089
- return "topic." + error;
12090
- }
12050
+ var error = $root.contentful.SlugReference.verify(message.topic);
12051
+ if (error)
12052
+ return "topic." + error;
12091
12053
  }
12092
12054
  if (message.type != null && message.hasOwnProperty("type"))
12093
12055
  if (!$util.isString(message.type))
@@ -12123,15 +12085,10 @@ $root.ContentfulCategoryUpdated = (function() {
12123
12085
  message.name = String(object.name);
12124
12086
  if (object.slug != null)
12125
12087
  message.slug = String(object.slug);
12126
- if (object.topic) {
12088
+ if (object.topic != null) {
12127
12089
  if (typeof object.topic !== "object")
12128
12090
  throw TypeError(".ContentfulCategoryUpdated.topic: object expected");
12129
- message.topic = {};
12130
- for (var keys = Object.keys(object.topic), i = 0; i < keys.length; ++i) {
12131
- if (typeof object.topic[keys[i]] !== "object")
12132
- throw TypeError(".ContentfulCategoryUpdated.topic: object expected");
12133
- message.topic[keys[i]] = $root.contentful.SlugReference.fromObject(object.topic[keys[i]]);
12134
- }
12091
+ message.topic = $root.contentful.SlugReference.fromObject(object.topic);
12135
12092
  }
12136
12093
  if (object.type != null)
12137
12094
  message.type = String(object.type);
@@ -12172,11 +12129,10 @@ $root.ContentfulCategoryUpdated = (function() {
12172
12129
  var object = {};
12173
12130
  if (options.arrays || options.defaults)
12174
12131
  object.content = [];
12175
- if (options.objects || options.defaults)
12176
- object.topic = {};
12177
12132
  if (options.defaults) {
12178
12133
  object.name = "";
12179
12134
  object.slug = "";
12135
+ object.topic = null;
12180
12136
  object.type = "";
12181
12137
  if ($util.Long) {
12182
12138
  var long = new $util.Long(0, 0, true);
@@ -12188,12 +12144,8 @@ $root.ContentfulCategoryUpdated = (function() {
12188
12144
  object.name = message.name;
12189
12145
  if (message.slug != null && message.hasOwnProperty("slug"))
12190
12146
  object.slug = message.slug;
12191
- var keys2;
12192
- if (message.topic && (keys2 = Object.keys(message.topic)).length) {
12193
- object.topic = {};
12194
- for (var j = 0; j < keys2.length; ++j)
12195
- object.topic[keys2[j]] = $root.contentful.SlugReference.toObject(message.topic[keys2[j]], options);
12196
- }
12147
+ if (message.topic != null && message.hasOwnProperty("topic"))
12148
+ object.topic = $root.contentful.SlugReference.toObject(message.topic, options);
12197
12149
  if (message.type != null && message.hasOwnProperty("type"))
12198
12150
  object.type = message.type;
12199
12151
  if (message.content && message.content.length) {
package/package.json CHANGED
@@ -16,5 +16,5 @@
16
16
  "main": "lib/index.js",
17
17
  "name": "@headspace/protos-events",
18
18
  "typings": "lib/index.d.ts",
19
- "version": "1.125.0"
19
+ "version": "1.126.0"
20
20
  }