@headspace/protos-events 1.626.0 → 1.627.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
@@ -30656,6 +30656,306 @@ export class ContentCourseCompleted implements IContentCourseCompleted {
30656
30656
  public toJSON(): { [k: string]: any };
30657
30657
  }
30658
30658
 
30659
+ /** Properties of an ItemCreated. */
30660
+ export interface IItemCreated {
30661
+
30662
+ /** ItemCreated slug */
30663
+ slug?: (string|null);
30664
+
30665
+ /** ItemCreated accessGroups */
30666
+ accessGroups?: (contentful.ISlugReference[]|null);
30667
+
30668
+ /** ItemCreated createdAt */
30669
+ createdAt?: (number|Long|null);
30670
+ }
30671
+
30672
+ /** Represents an ItemCreated. */
30673
+ export class ItemCreated implements IItemCreated {
30674
+
30675
+ /**
30676
+ * Constructs a new ItemCreated.
30677
+ * @param [properties] Properties to set
30678
+ */
30679
+ constructor(properties?: IItemCreated);
30680
+
30681
+ /** ItemCreated slug. */
30682
+ public slug: string;
30683
+
30684
+ /** ItemCreated accessGroups. */
30685
+ public accessGroups: contentful.ISlugReference[];
30686
+
30687
+ /** ItemCreated createdAt. */
30688
+ public createdAt: (number|Long);
30689
+
30690
+ /**
30691
+ * Creates a new ItemCreated instance using the specified properties.
30692
+ * @param [properties] Properties to set
30693
+ * @returns ItemCreated instance
30694
+ */
30695
+ public static create(properties?: IItemCreated): ItemCreated;
30696
+
30697
+ /**
30698
+ * Encodes the specified ItemCreated message. Does not implicitly {@link ItemCreated.verify|verify} messages.
30699
+ * @param message ItemCreated message or plain object to encode
30700
+ * @param [writer] Writer to encode to
30701
+ * @returns Writer
30702
+ */
30703
+ public static encode(message: IItemCreated, writer?: $protobuf.Writer): $protobuf.Writer;
30704
+
30705
+ /**
30706
+ * Encodes the specified ItemCreated message, length delimited. Does not implicitly {@link ItemCreated.verify|verify} messages.
30707
+ * @param message ItemCreated message or plain object to encode
30708
+ * @param [writer] Writer to encode to
30709
+ * @returns Writer
30710
+ */
30711
+ public static encodeDelimited(message: IItemCreated, writer?: $protobuf.Writer): $protobuf.Writer;
30712
+
30713
+ /**
30714
+ * Decodes an ItemCreated message from the specified reader or buffer.
30715
+ * @param reader Reader or buffer to decode from
30716
+ * @param [length] Message length if known beforehand
30717
+ * @returns ItemCreated
30718
+ * @throws {Error} If the payload is not a reader or valid buffer
30719
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30720
+ */
30721
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ItemCreated;
30722
+
30723
+ /**
30724
+ * Decodes an ItemCreated message from the specified reader or buffer, length delimited.
30725
+ * @param reader Reader or buffer to decode from
30726
+ * @returns ItemCreated
30727
+ * @throws {Error} If the payload is not a reader or valid buffer
30728
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30729
+ */
30730
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ItemCreated;
30731
+
30732
+ /**
30733
+ * Verifies an ItemCreated message.
30734
+ * @param message Plain object to verify
30735
+ * @returns `null` if valid, otherwise the reason why it is not
30736
+ */
30737
+ public static verify(message: { [k: string]: any }): (string|null);
30738
+
30739
+ /**
30740
+ * Creates an ItemCreated message from a plain object. Also converts values to their respective internal types.
30741
+ * @param object Plain object
30742
+ * @returns ItemCreated
30743
+ */
30744
+ public static fromObject(object: { [k: string]: any }): ItemCreated;
30745
+
30746
+ /**
30747
+ * Creates a plain object from an ItemCreated message. Also converts values to other types if specified.
30748
+ * @param message ItemCreated
30749
+ * @param [options] Conversion options
30750
+ * @returns Plain object
30751
+ */
30752
+ public static toObject(message: ItemCreated, options?: $protobuf.IConversionOptions): { [k: string]: any };
30753
+
30754
+ /**
30755
+ * Converts this ItemCreated to JSON.
30756
+ * @returns JSON object
30757
+ */
30758
+ public toJSON(): { [k: string]: any };
30759
+ }
30760
+
30761
+ /** Properties of an ItemUpdated. */
30762
+ export interface IItemUpdated {
30763
+
30764
+ /** ItemUpdated slug */
30765
+ slug?: (string|null);
30766
+
30767
+ /** ItemUpdated accessGroups */
30768
+ accessGroups?: (contentful.ISlugReference[]|null);
30769
+
30770
+ /** ItemUpdated updatedAt */
30771
+ updatedAt?: (number|Long|null);
30772
+ }
30773
+
30774
+ /** Represents an ItemUpdated. */
30775
+ export class ItemUpdated implements IItemUpdated {
30776
+
30777
+ /**
30778
+ * Constructs a new ItemUpdated.
30779
+ * @param [properties] Properties to set
30780
+ */
30781
+ constructor(properties?: IItemUpdated);
30782
+
30783
+ /** ItemUpdated slug. */
30784
+ public slug: string;
30785
+
30786
+ /** ItemUpdated accessGroups. */
30787
+ public accessGroups: contentful.ISlugReference[];
30788
+
30789
+ /** ItemUpdated updatedAt. */
30790
+ public updatedAt: (number|Long);
30791
+
30792
+ /**
30793
+ * Creates a new ItemUpdated instance using the specified properties.
30794
+ * @param [properties] Properties to set
30795
+ * @returns ItemUpdated instance
30796
+ */
30797
+ public static create(properties?: IItemUpdated): ItemUpdated;
30798
+
30799
+ /**
30800
+ * Encodes the specified ItemUpdated message. Does not implicitly {@link ItemUpdated.verify|verify} messages.
30801
+ * @param message ItemUpdated message or plain object to encode
30802
+ * @param [writer] Writer to encode to
30803
+ * @returns Writer
30804
+ */
30805
+ public static encode(message: IItemUpdated, writer?: $protobuf.Writer): $protobuf.Writer;
30806
+
30807
+ /**
30808
+ * Encodes the specified ItemUpdated message, length delimited. Does not implicitly {@link ItemUpdated.verify|verify} messages.
30809
+ * @param message ItemUpdated message or plain object to encode
30810
+ * @param [writer] Writer to encode to
30811
+ * @returns Writer
30812
+ */
30813
+ public static encodeDelimited(message: IItemUpdated, writer?: $protobuf.Writer): $protobuf.Writer;
30814
+
30815
+ /**
30816
+ * Decodes an ItemUpdated message from the specified reader or buffer.
30817
+ * @param reader Reader or buffer to decode from
30818
+ * @param [length] Message length if known beforehand
30819
+ * @returns ItemUpdated
30820
+ * @throws {Error} If the payload is not a reader or valid buffer
30821
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30822
+ */
30823
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ItemUpdated;
30824
+
30825
+ /**
30826
+ * Decodes an ItemUpdated message from the specified reader or buffer, length delimited.
30827
+ * @param reader Reader or buffer to decode from
30828
+ * @returns ItemUpdated
30829
+ * @throws {Error} If the payload is not a reader or valid buffer
30830
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30831
+ */
30832
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ItemUpdated;
30833
+
30834
+ /**
30835
+ * Verifies an ItemUpdated message.
30836
+ * @param message Plain object to verify
30837
+ * @returns `null` if valid, otherwise the reason why it is not
30838
+ */
30839
+ public static verify(message: { [k: string]: any }): (string|null);
30840
+
30841
+ /**
30842
+ * Creates an ItemUpdated message from a plain object. Also converts values to their respective internal types.
30843
+ * @param object Plain object
30844
+ * @returns ItemUpdated
30845
+ */
30846
+ public static fromObject(object: { [k: string]: any }): ItemUpdated;
30847
+
30848
+ /**
30849
+ * Creates a plain object from an ItemUpdated message. Also converts values to other types if specified.
30850
+ * @param message ItemUpdated
30851
+ * @param [options] Conversion options
30852
+ * @returns Plain object
30853
+ */
30854
+ public static toObject(message: ItemUpdated, options?: $protobuf.IConversionOptions): { [k: string]: any };
30855
+
30856
+ /**
30857
+ * Converts this ItemUpdated to JSON.
30858
+ * @returns JSON object
30859
+ */
30860
+ public toJSON(): { [k: string]: any };
30861
+ }
30862
+
30863
+ /** Properties of an ItemDeleted. */
30864
+ export interface IItemDeleted {
30865
+
30866
+ /** ItemDeleted slug */
30867
+ slug?: (string|null);
30868
+
30869
+ /** ItemDeleted deletedAt */
30870
+ deletedAt?: (number|Long|null);
30871
+ }
30872
+
30873
+ /** Represents an ItemDeleted. */
30874
+ export class ItemDeleted implements IItemDeleted {
30875
+
30876
+ /**
30877
+ * Constructs a new ItemDeleted.
30878
+ * @param [properties] Properties to set
30879
+ */
30880
+ constructor(properties?: IItemDeleted);
30881
+
30882
+ /** ItemDeleted slug. */
30883
+ public slug: string;
30884
+
30885
+ /** ItemDeleted deletedAt. */
30886
+ public deletedAt: (number|Long);
30887
+
30888
+ /**
30889
+ * Creates a new ItemDeleted instance using the specified properties.
30890
+ * @param [properties] Properties to set
30891
+ * @returns ItemDeleted instance
30892
+ */
30893
+ public static create(properties?: IItemDeleted): ItemDeleted;
30894
+
30895
+ /**
30896
+ * Encodes the specified ItemDeleted message. Does not implicitly {@link ItemDeleted.verify|verify} messages.
30897
+ * @param message ItemDeleted message or plain object to encode
30898
+ * @param [writer] Writer to encode to
30899
+ * @returns Writer
30900
+ */
30901
+ public static encode(message: IItemDeleted, writer?: $protobuf.Writer): $protobuf.Writer;
30902
+
30903
+ /**
30904
+ * Encodes the specified ItemDeleted message, length delimited. Does not implicitly {@link ItemDeleted.verify|verify} messages.
30905
+ * @param message ItemDeleted message or plain object to encode
30906
+ * @param [writer] Writer to encode to
30907
+ * @returns Writer
30908
+ */
30909
+ public static encodeDelimited(message: IItemDeleted, writer?: $protobuf.Writer): $protobuf.Writer;
30910
+
30911
+ /**
30912
+ * Decodes an ItemDeleted message from the specified reader or buffer.
30913
+ * @param reader Reader or buffer to decode from
30914
+ * @param [length] Message length if known beforehand
30915
+ * @returns ItemDeleted
30916
+ * @throws {Error} If the payload is not a reader or valid buffer
30917
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30918
+ */
30919
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ItemDeleted;
30920
+
30921
+ /**
30922
+ * Decodes an ItemDeleted message from the specified reader or buffer, length delimited.
30923
+ * @param reader Reader or buffer to decode from
30924
+ * @returns ItemDeleted
30925
+ * @throws {Error} If the payload is not a reader or valid buffer
30926
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
30927
+ */
30928
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ItemDeleted;
30929
+
30930
+ /**
30931
+ * Verifies an ItemDeleted message.
30932
+ * @param message Plain object to verify
30933
+ * @returns `null` if valid, otherwise the reason why it is not
30934
+ */
30935
+ public static verify(message: { [k: string]: any }): (string|null);
30936
+
30937
+ /**
30938
+ * Creates an ItemDeleted message from a plain object. Also converts values to their respective internal types.
30939
+ * @param object Plain object
30940
+ * @returns ItemDeleted
30941
+ */
30942
+ public static fromObject(object: { [k: string]: any }): ItemDeleted;
30943
+
30944
+ /**
30945
+ * Creates a plain object from an ItemDeleted message. Also converts values to other types if specified.
30946
+ * @param message ItemDeleted
30947
+ * @param [options] Conversion options
30948
+ * @returns Plain object
30949
+ */
30950
+ public static toObject(message: ItemDeleted, options?: $protobuf.IConversionOptions): { [k: string]: any };
30951
+
30952
+ /**
30953
+ * Converts this ItemDeleted to JSON.
30954
+ * @returns JSON object
30955
+ */
30956
+ public toJSON(): { [k: string]: any };
30957
+ }
30958
+
30659
30959
  /** Properties of a TopicCreated. */
30660
30960
  export interface ITopicCreated {
30661
30961
 
package/lib/index.js CHANGED
@@ -87585,6 +87585,766 @@ $root.ContentCourseCompleted = (function() {
87585
87585
  return ContentCourseCompleted;
87586
87586
  })();
87587
87587
 
87588
+ $root.ItemCreated = (function() {
87589
+
87590
+ /**
87591
+ * Properties of an ItemCreated.
87592
+ * @name IItemCreated
87593
+ * @interface IItemCreated
87594
+ * @property {string|null} [slug] ItemCreated slug
87595
+ * @property {Array.<contentful.ISlugReference>|null} [accessGroups] ItemCreated accessGroups
87596
+ * @property {number|Long|null} [createdAt] ItemCreated createdAt
87597
+ */
87598
+
87599
+ /**
87600
+ * Constructs a new ItemCreated.
87601
+ * @name ItemCreated
87602
+ * @classdesc Represents an ItemCreated.
87603
+ * @implements IItemCreated
87604
+ * @constructor
87605
+ * @param {IItemCreated=} [properties] Properties to set
87606
+ */
87607
+ function ItemCreated(properties) {
87608
+ this.accessGroups = [];
87609
+ if (properties)
87610
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
87611
+ if (properties[keys[i]] != null)
87612
+ this[keys[i]] = properties[keys[i]];
87613
+ }
87614
+
87615
+ /**
87616
+ * ItemCreated slug.
87617
+ * @member {string} slug
87618
+ * @memberof ItemCreated
87619
+ * @instance
87620
+ */
87621
+ ItemCreated.prototype.slug = "";
87622
+
87623
+ /**
87624
+ * ItemCreated accessGroups.
87625
+ * @member {Array.<contentful.ISlugReference>} accessGroups
87626
+ * @memberof ItemCreated
87627
+ * @instance
87628
+ */
87629
+ ItemCreated.prototype.accessGroups = $util.emptyArray;
87630
+
87631
+ /**
87632
+ * ItemCreated createdAt.
87633
+ * @member {number|Long} createdAt
87634
+ * @memberof ItemCreated
87635
+ * @instance
87636
+ */
87637
+ ItemCreated.prototype.createdAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
87638
+
87639
+ /**
87640
+ * Creates a new ItemCreated instance using the specified properties.
87641
+ * @function create
87642
+ * @memberof ItemCreated
87643
+ * @static
87644
+ * @param {IItemCreated=} [properties] Properties to set
87645
+ * @returns {ItemCreated} ItemCreated instance
87646
+ */
87647
+ ItemCreated.create = function create(properties) {
87648
+ return new ItemCreated(properties);
87649
+ };
87650
+
87651
+ /**
87652
+ * Encodes the specified ItemCreated message. Does not implicitly {@link ItemCreated.verify|verify} messages.
87653
+ * @function encode
87654
+ * @memberof ItemCreated
87655
+ * @static
87656
+ * @param {IItemCreated} message ItemCreated message or plain object to encode
87657
+ * @param {$protobuf.Writer} [writer] Writer to encode to
87658
+ * @returns {$protobuf.Writer} Writer
87659
+ */
87660
+ ItemCreated.encode = function encode(message, writer) {
87661
+ if (!writer)
87662
+ writer = $Writer.create();
87663
+ if (message.slug != null && message.hasOwnProperty("slug"))
87664
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
87665
+ if (message.accessGroups != null && message.accessGroups.length)
87666
+ for (var i = 0; i < message.accessGroups.length; ++i)
87667
+ $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
87668
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
87669
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.createdAt);
87670
+ return writer;
87671
+ };
87672
+
87673
+ /**
87674
+ * Encodes the specified ItemCreated message, length delimited. Does not implicitly {@link ItemCreated.verify|verify} messages.
87675
+ * @function encodeDelimited
87676
+ * @memberof ItemCreated
87677
+ * @static
87678
+ * @param {IItemCreated} message ItemCreated message or plain object to encode
87679
+ * @param {$protobuf.Writer} [writer] Writer to encode to
87680
+ * @returns {$protobuf.Writer} Writer
87681
+ */
87682
+ ItemCreated.encodeDelimited = function encodeDelimited(message, writer) {
87683
+ return this.encode(message, writer).ldelim();
87684
+ };
87685
+
87686
+ /**
87687
+ * Decodes an ItemCreated message from the specified reader or buffer.
87688
+ * @function decode
87689
+ * @memberof ItemCreated
87690
+ * @static
87691
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
87692
+ * @param {number} [length] Message length if known beforehand
87693
+ * @returns {ItemCreated} ItemCreated
87694
+ * @throws {Error} If the payload is not a reader or valid buffer
87695
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
87696
+ */
87697
+ ItemCreated.decode = function decode(reader, length) {
87698
+ if (!(reader instanceof $Reader))
87699
+ reader = $Reader.create(reader);
87700
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ItemCreated();
87701
+ while (reader.pos < end) {
87702
+ var tag = reader.uint32();
87703
+ switch (tag >>> 3) {
87704
+ case 1:
87705
+ message.slug = reader.string();
87706
+ break;
87707
+ case 2:
87708
+ if (!(message.accessGroups && message.accessGroups.length))
87709
+ message.accessGroups = [];
87710
+ message.accessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
87711
+ break;
87712
+ case 3:
87713
+ message.createdAt = reader.uint64();
87714
+ break;
87715
+ default:
87716
+ reader.skipType(tag & 7);
87717
+ break;
87718
+ }
87719
+ }
87720
+ return message;
87721
+ };
87722
+
87723
+ /**
87724
+ * Decodes an ItemCreated message from the specified reader or buffer, length delimited.
87725
+ * @function decodeDelimited
87726
+ * @memberof ItemCreated
87727
+ * @static
87728
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
87729
+ * @returns {ItemCreated} ItemCreated
87730
+ * @throws {Error} If the payload is not a reader or valid buffer
87731
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
87732
+ */
87733
+ ItemCreated.decodeDelimited = function decodeDelimited(reader) {
87734
+ if (!(reader instanceof $Reader))
87735
+ reader = new $Reader(reader);
87736
+ return this.decode(reader, reader.uint32());
87737
+ };
87738
+
87739
+ /**
87740
+ * Verifies an ItemCreated message.
87741
+ * @function verify
87742
+ * @memberof ItemCreated
87743
+ * @static
87744
+ * @param {Object.<string,*>} message Plain object to verify
87745
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
87746
+ */
87747
+ ItemCreated.verify = function verify(message) {
87748
+ if (typeof message !== "object" || message === null)
87749
+ return "object expected";
87750
+ if (message.slug != null && message.hasOwnProperty("slug"))
87751
+ if (!$util.isString(message.slug))
87752
+ return "slug: string expected";
87753
+ if (message.accessGroups != null && message.hasOwnProperty("accessGroups")) {
87754
+ if (!Array.isArray(message.accessGroups))
87755
+ return "accessGroups: array expected";
87756
+ for (var i = 0; i < message.accessGroups.length; ++i) {
87757
+ var error = $root.contentful.SlugReference.verify(message.accessGroups[i]);
87758
+ if (error)
87759
+ return "accessGroups." + error;
87760
+ }
87761
+ }
87762
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
87763
+ if (!$util.isInteger(message.createdAt) && !(message.createdAt && $util.isInteger(message.createdAt.low) && $util.isInteger(message.createdAt.high)))
87764
+ return "createdAt: integer|Long expected";
87765
+ return null;
87766
+ };
87767
+
87768
+ /**
87769
+ * Creates an ItemCreated message from a plain object. Also converts values to their respective internal types.
87770
+ * @function fromObject
87771
+ * @memberof ItemCreated
87772
+ * @static
87773
+ * @param {Object.<string,*>} object Plain object
87774
+ * @returns {ItemCreated} ItemCreated
87775
+ */
87776
+ ItemCreated.fromObject = function fromObject(object) {
87777
+ if (object instanceof $root.ItemCreated)
87778
+ return object;
87779
+ var message = new $root.ItemCreated();
87780
+ if (object.slug != null)
87781
+ message.slug = String(object.slug);
87782
+ if (object.accessGroups) {
87783
+ if (!Array.isArray(object.accessGroups))
87784
+ throw TypeError(".ItemCreated.accessGroups: array expected");
87785
+ message.accessGroups = [];
87786
+ for (var i = 0; i < object.accessGroups.length; ++i) {
87787
+ if (typeof object.accessGroups[i] !== "object")
87788
+ throw TypeError(".ItemCreated.accessGroups: object expected");
87789
+ message.accessGroups[i] = $root.contentful.SlugReference.fromObject(object.accessGroups[i]);
87790
+ }
87791
+ }
87792
+ if (object.createdAt != null)
87793
+ if ($util.Long)
87794
+ (message.createdAt = $util.Long.fromValue(object.createdAt)).unsigned = true;
87795
+ else if (typeof object.createdAt === "string")
87796
+ message.createdAt = parseInt(object.createdAt, 10);
87797
+ else if (typeof object.createdAt === "number")
87798
+ message.createdAt = object.createdAt;
87799
+ else if (typeof object.createdAt === "object")
87800
+ message.createdAt = new $util.LongBits(object.createdAt.low >>> 0, object.createdAt.high >>> 0).toNumber(true);
87801
+ return message;
87802
+ };
87803
+
87804
+ /**
87805
+ * Creates a plain object from an ItemCreated message. Also converts values to other types if specified.
87806
+ * @function toObject
87807
+ * @memberof ItemCreated
87808
+ * @static
87809
+ * @param {ItemCreated} message ItemCreated
87810
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
87811
+ * @returns {Object.<string,*>} Plain object
87812
+ */
87813
+ ItemCreated.toObject = function toObject(message, options) {
87814
+ if (!options)
87815
+ options = {};
87816
+ var object = {};
87817
+ if (options.arrays || options.defaults)
87818
+ object.accessGroups = [];
87819
+ if (options.defaults) {
87820
+ object.slug = "";
87821
+ if ($util.Long) {
87822
+ var long = new $util.Long(0, 0, true);
87823
+ object.createdAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
87824
+ } else
87825
+ object.createdAt = options.longs === String ? "0" : 0;
87826
+ }
87827
+ if (message.slug != null && message.hasOwnProperty("slug"))
87828
+ object.slug = message.slug;
87829
+ if (message.accessGroups && message.accessGroups.length) {
87830
+ object.accessGroups = [];
87831
+ for (var j = 0; j < message.accessGroups.length; ++j)
87832
+ object.accessGroups[j] = $root.contentful.SlugReference.toObject(message.accessGroups[j], options);
87833
+ }
87834
+ if (message.createdAt != null && message.hasOwnProperty("createdAt"))
87835
+ if (typeof message.createdAt === "number")
87836
+ object.createdAt = options.longs === String ? String(message.createdAt) : message.createdAt;
87837
+ else
87838
+ object.createdAt = options.longs === String ? $util.Long.prototype.toString.call(message.createdAt) : options.longs === Number ? new $util.LongBits(message.createdAt.low >>> 0, message.createdAt.high >>> 0).toNumber(true) : message.createdAt;
87839
+ return object;
87840
+ };
87841
+
87842
+ /**
87843
+ * Converts this ItemCreated to JSON.
87844
+ * @function toJSON
87845
+ * @memberof ItemCreated
87846
+ * @instance
87847
+ * @returns {Object.<string,*>} JSON object
87848
+ */
87849
+ ItemCreated.prototype.toJSON = function toJSON() {
87850
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
87851
+ };
87852
+
87853
+ return ItemCreated;
87854
+ })();
87855
+
87856
+ $root.ItemUpdated = (function() {
87857
+
87858
+ /**
87859
+ * Properties of an ItemUpdated.
87860
+ * @name IItemUpdated
87861
+ * @interface IItemUpdated
87862
+ * @property {string|null} [slug] ItemUpdated slug
87863
+ * @property {Array.<contentful.ISlugReference>|null} [accessGroups] ItemUpdated accessGroups
87864
+ * @property {number|Long|null} [updatedAt] ItemUpdated updatedAt
87865
+ */
87866
+
87867
+ /**
87868
+ * Constructs a new ItemUpdated.
87869
+ * @name ItemUpdated
87870
+ * @classdesc Represents an ItemUpdated.
87871
+ * @implements IItemUpdated
87872
+ * @constructor
87873
+ * @param {IItemUpdated=} [properties] Properties to set
87874
+ */
87875
+ function ItemUpdated(properties) {
87876
+ this.accessGroups = [];
87877
+ if (properties)
87878
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
87879
+ if (properties[keys[i]] != null)
87880
+ this[keys[i]] = properties[keys[i]];
87881
+ }
87882
+
87883
+ /**
87884
+ * ItemUpdated slug.
87885
+ * @member {string} slug
87886
+ * @memberof ItemUpdated
87887
+ * @instance
87888
+ */
87889
+ ItemUpdated.prototype.slug = "";
87890
+
87891
+ /**
87892
+ * ItemUpdated accessGroups.
87893
+ * @member {Array.<contentful.ISlugReference>} accessGroups
87894
+ * @memberof ItemUpdated
87895
+ * @instance
87896
+ */
87897
+ ItemUpdated.prototype.accessGroups = $util.emptyArray;
87898
+
87899
+ /**
87900
+ * ItemUpdated updatedAt.
87901
+ * @member {number|Long} updatedAt
87902
+ * @memberof ItemUpdated
87903
+ * @instance
87904
+ */
87905
+ ItemUpdated.prototype.updatedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
87906
+
87907
+ /**
87908
+ * Creates a new ItemUpdated instance using the specified properties.
87909
+ * @function create
87910
+ * @memberof ItemUpdated
87911
+ * @static
87912
+ * @param {IItemUpdated=} [properties] Properties to set
87913
+ * @returns {ItemUpdated} ItemUpdated instance
87914
+ */
87915
+ ItemUpdated.create = function create(properties) {
87916
+ return new ItemUpdated(properties);
87917
+ };
87918
+
87919
+ /**
87920
+ * Encodes the specified ItemUpdated message. Does not implicitly {@link ItemUpdated.verify|verify} messages.
87921
+ * @function encode
87922
+ * @memberof ItemUpdated
87923
+ * @static
87924
+ * @param {IItemUpdated} message ItemUpdated message or plain object to encode
87925
+ * @param {$protobuf.Writer} [writer] Writer to encode to
87926
+ * @returns {$protobuf.Writer} Writer
87927
+ */
87928
+ ItemUpdated.encode = function encode(message, writer) {
87929
+ if (!writer)
87930
+ writer = $Writer.create();
87931
+ if (message.slug != null && message.hasOwnProperty("slug"))
87932
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
87933
+ if (message.accessGroups != null && message.accessGroups.length)
87934
+ for (var i = 0; i < message.accessGroups.length; ++i)
87935
+ $root.contentful.SlugReference.encode(message.accessGroups[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
87936
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
87937
+ writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.updatedAt);
87938
+ return writer;
87939
+ };
87940
+
87941
+ /**
87942
+ * Encodes the specified ItemUpdated message, length delimited. Does not implicitly {@link ItemUpdated.verify|verify} messages.
87943
+ * @function encodeDelimited
87944
+ * @memberof ItemUpdated
87945
+ * @static
87946
+ * @param {IItemUpdated} message ItemUpdated message or plain object to encode
87947
+ * @param {$protobuf.Writer} [writer] Writer to encode to
87948
+ * @returns {$protobuf.Writer} Writer
87949
+ */
87950
+ ItemUpdated.encodeDelimited = function encodeDelimited(message, writer) {
87951
+ return this.encode(message, writer).ldelim();
87952
+ };
87953
+
87954
+ /**
87955
+ * Decodes an ItemUpdated message from the specified reader or buffer.
87956
+ * @function decode
87957
+ * @memberof ItemUpdated
87958
+ * @static
87959
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
87960
+ * @param {number} [length] Message length if known beforehand
87961
+ * @returns {ItemUpdated} ItemUpdated
87962
+ * @throws {Error} If the payload is not a reader or valid buffer
87963
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
87964
+ */
87965
+ ItemUpdated.decode = function decode(reader, length) {
87966
+ if (!(reader instanceof $Reader))
87967
+ reader = $Reader.create(reader);
87968
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ItemUpdated();
87969
+ while (reader.pos < end) {
87970
+ var tag = reader.uint32();
87971
+ switch (tag >>> 3) {
87972
+ case 1:
87973
+ message.slug = reader.string();
87974
+ break;
87975
+ case 2:
87976
+ if (!(message.accessGroups && message.accessGroups.length))
87977
+ message.accessGroups = [];
87978
+ message.accessGroups.push($root.contentful.SlugReference.decode(reader, reader.uint32()));
87979
+ break;
87980
+ case 3:
87981
+ message.updatedAt = reader.uint64();
87982
+ break;
87983
+ default:
87984
+ reader.skipType(tag & 7);
87985
+ break;
87986
+ }
87987
+ }
87988
+ return message;
87989
+ };
87990
+
87991
+ /**
87992
+ * Decodes an ItemUpdated message from the specified reader or buffer, length delimited.
87993
+ * @function decodeDelimited
87994
+ * @memberof ItemUpdated
87995
+ * @static
87996
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
87997
+ * @returns {ItemUpdated} ItemUpdated
87998
+ * @throws {Error} If the payload is not a reader or valid buffer
87999
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
88000
+ */
88001
+ ItemUpdated.decodeDelimited = function decodeDelimited(reader) {
88002
+ if (!(reader instanceof $Reader))
88003
+ reader = new $Reader(reader);
88004
+ return this.decode(reader, reader.uint32());
88005
+ };
88006
+
88007
+ /**
88008
+ * Verifies an ItemUpdated message.
88009
+ * @function verify
88010
+ * @memberof ItemUpdated
88011
+ * @static
88012
+ * @param {Object.<string,*>} message Plain object to verify
88013
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
88014
+ */
88015
+ ItemUpdated.verify = function verify(message) {
88016
+ if (typeof message !== "object" || message === null)
88017
+ return "object expected";
88018
+ if (message.slug != null && message.hasOwnProperty("slug"))
88019
+ if (!$util.isString(message.slug))
88020
+ return "slug: string expected";
88021
+ if (message.accessGroups != null && message.hasOwnProperty("accessGroups")) {
88022
+ if (!Array.isArray(message.accessGroups))
88023
+ return "accessGroups: array expected";
88024
+ for (var i = 0; i < message.accessGroups.length; ++i) {
88025
+ var error = $root.contentful.SlugReference.verify(message.accessGroups[i]);
88026
+ if (error)
88027
+ return "accessGroups." + error;
88028
+ }
88029
+ }
88030
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
88031
+ if (!$util.isInteger(message.updatedAt) && !(message.updatedAt && $util.isInteger(message.updatedAt.low) && $util.isInteger(message.updatedAt.high)))
88032
+ return "updatedAt: integer|Long expected";
88033
+ return null;
88034
+ };
88035
+
88036
+ /**
88037
+ * Creates an ItemUpdated message from a plain object. Also converts values to their respective internal types.
88038
+ * @function fromObject
88039
+ * @memberof ItemUpdated
88040
+ * @static
88041
+ * @param {Object.<string,*>} object Plain object
88042
+ * @returns {ItemUpdated} ItemUpdated
88043
+ */
88044
+ ItemUpdated.fromObject = function fromObject(object) {
88045
+ if (object instanceof $root.ItemUpdated)
88046
+ return object;
88047
+ var message = new $root.ItemUpdated();
88048
+ if (object.slug != null)
88049
+ message.slug = String(object.slug);
88050
+ if (object.accessGroups) {
88051
+ if (!Array.isArray(object.accessGroups))
88052
+ throw TypeError(".ItemUpdated.accessGroups: array expected");
88053
+ message.accessGroups = [];
88054
+ for (var i = 0; i < object.accessGroups.length; ++i) {
88055
+ if (typeof object.accessGroups[i] !== "object")
88056
+ throw TypeError(".ItemUpdated.accessGroups: object expected");
88057
+ message.accessGroups[i] = $root.contentful.SlugReference.fromObject(object.accessGroups[i]);
88058
+ }
88059
+ }
88060
+ if (object.updatedAt != null)
88061
+ if ($util.Long)
88062
+ (message.updatedAt = $util.Long.fromValue(object.updatedAt)).unsigned = true;
88063
+ else if (typeof object.updatedAt === "string")
88064
+ message.updatedAt = parseInt(object.updatedAt, 10);
88065
+ else if (typeof object.updatedAt === "number")
88066
+ message.updatedAt = object.updatedAt;
88067
+ else if (typeof object.updatedAt === "object")
88068
+ message.updatedAt = new $util.LongBits(object.updatedAt.low >>> 0, object.updatedAt.high >>> 0).toNumber(true);
88069
+ return message;
88070
+ };
88071
+
88072
+ /**
88073
+ * Creates a plain object from an ItemUpdated message. Also converts values to other types if specified.
88074
+ * @function toObject
88075
+ * @memberof ItemUpdated
88076
+ * @static
88077
+ * @param {ItemUpdated} message ItemUpdated
88078
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
88079
+ * @returns {Object.<string,*>} Plain object
88080
+ */
88081
+ ItemUpdated.toObject = function toObject(message, options) {
88082
+ if (!options)
88083
+ options = {};
88084
+ var object = {};
88085
+ if (options.arrays || options.defaults)
88086
+ object.accessGroups = [];
88087
+ if (options.defaults) {
88088
+ object.slug = "";
88089
+ if ($util.Long) {
88090
+ var long = new $util.Long(0, 0, true);
88091
+ object.updatedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
88092
+ } else
88093
+ object.updatedAt = options.longs === String ? "0" : 0;
88094
+ }
88095
+ if (message.slug != null && message.hasOwnProperty("slug"))
88096
+ object.slug = message.slug;
88097
+ if (message.accessGroups && message.accessGroups.length) {
88098
+ object.accessGroups = [];
88099
+ for (var j = 0; j < message.accessGroups.length; ++j)
88100
+ object.accessGroups[j] = $root.contentful.SlugReference.toObject(message.accessGroups[j], options);
88101
+ }
88102
+ if (message.updatedAt != null && message.hasOwnProperty("updatedAt"))
88103
+ if (typeof message.updatedAt === "number")
88104
+ object.updatedAt = options.longs === String ? String(message.updatedAt) : message.updatedAt;
88105
+ else
88106
+ object.updatedAt = options.longs === String ? $util.Long.prototype.toString.call(message.updatedAt) : options.longs === Number ? new $util.LongBits(message.updatedAt.low >>> 0, message.updatedAt.high >>> 0).toNumber(true) : message.updatedAt;
88107
+ return object;
88108
+ };
88109
+
88110
+ /**
88111
+ * Converts this ItemUpdated to JSON.
88112
+ * @function toJSON
88113
+ * @memberof ItemUpdated
88114
+ * @instance
88115
+ * @returns {Object.<string,*>} JSON object
88116
+ */
88117
+ ItemUpdated.prototype.toJSON = function toJSON() {
88118
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
88119
+ };
88120
+
88121
+ return ItemUpdated;
88122
+ })();
88123
+
88124
+ $root.ItemDeleted = (function() {
88125
+
88126
+ /**
88127
+ * Properties of an ItemDeleted.
88128
+ * @name IItemDeleted
88129
+ * @interface IItemDeleted
88130
+ * @property {string|null} [slug] ItemDeleted slug
88131
+ * @property {number|Long|null} [deletedAt] ItemDeleted deletedAt
88132
+ */
88133
+
88134
+ /**
88135
+ * Constructs a new ItemDeleted.
88136
+ * @name ItemDeleted
88137
+ * @classdesc Represents an ItemDeleted.
88138
+ * @implements IItemDeleted
88139
+ * @constructor
88140
+ * @param {IItemDeleted=} [properties] Properties to set
88141
+ */
88142
+ function ItemDeleted(properties) {
88143
+ if (properties)
88144
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
88145
+ if (properties[keys[i]] != null)
88146
+ this[keys[i]] = properties[keys[i]];
88147
+ }
88148
+
88149
+ /**
88150
+ * ItemDeleted slug.
88151
+ * @member {string} slug
88152
+ * @memberof ItemDeleted
88153
+ * @instance
88154
+ */
88155
+ ItemDeleted.prototype.slug = "";
88156
+
88157
+ /**
88158
+ * ItemDeleted deletedAt.
88159
+ * @member {number|Long} deletedAt
88160
+ * @memberof ItemDeleted
88161
+ * @instance
88162
+ */
88163
+ ItemDeleted.prototype.deletedAt = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
88164
+
88165
+ /**
88166
+ * Creates a new ItemDeleted instance using the specified properties.
88167
+ * @function create
88168
+ * @memberof ItemDeleted
88169
+ * @static
88170
+ * @param {IItemDeleted=} [properties] Properties to set
88171
+ * @returns {ItemDeleted} ItemDeleted instance
88172
+ */
88173
+ ItemDeleted.create = function create(properties) {
88174
+ return new ItemDeleted(properties);
88175
+ };
88176
+
88177
+ /**
88178
+ * Encodes the specified ItemDeleted message. Does not implicitly {@link ItemDeleted.verify|verify} messages.
88179
+ * @function encode
88180
+ * @memberof ItemDeleted
88181
+ * @static
88182
+ * @param {IItemDeleted} message ItemDeleted message or plain object to encode
88183
+ * @param {$protobuf.Writer} [writer] Writer to encode to
88184
+ * @returns {$protobuf.Writer} Writer
88185
+ */
88186
+ ItemDeleted.encode = function encode(message, writer) {
88187
+ if (!writer)
88188
+ writer = $Writer.create();
88189
+ if (message.slug != null && message.hasOwnProperty("slug"))
88190
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.slug);
88191
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
88192
+ writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.deletedAt);
88193
+ return writer;
88194
+ };
88195
+
88196
+ /**
88197
+ * Encodes the specified ItemDeleted message, length delimited. Does not implicitly {@link ItemDeleted.verify|verify} messages.
88198
+ * @function encodeDelimited
88199
+ * @memberof ItemDeleted
88200
+ * @static
88201
+ * @param {IItemDeleted} message ItemDeleted message or plain object to encode
88202
+ * @param {$protobuf.Writer} [writer] Writer to encode to
88203
+ * @returns {$protobuf.Writer} Writer
88204
+ */
88205
+ ItemDeleted.encodeDelimited = function encodeDelimited(message, writer) {
88206
+ return this.encode(message, writer).ldelim();
88207
+ };
88208
+
88209
+ /**
88210
+ * Decodes an ItemDeleted message from the specified reader or buffer.
88211
+ * @function decode
88212
+ * @memberof ItemDeleted
88213
+ * @static
88214
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
88215
+ * @param {number} [length] Message length if known beforehand
88216
+ * @returns {ItemDeleted} ItemDeleted
88217
+ * @throws {Error} If the payload is not a reader or valid buffer
88218
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
88219
+ */
88220
+ ItemDeleted.decode = function decode(reader, length) {
88221
+ if (!(reader instanceof $Reader))
88222
+ reader = $Reader.create(reader);
88223
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ItemDeleted();
88224
+ while (reader.pos < end) {
88225
+ var tag = reader.uint32();
88226
+ switch (tag >>> 3) {
88227
+ case 1:
88228
+ message.slug = reader.string();
88229
+ break;
88230
+ case 2:
88231
+ message.deletedAt = reader.uint64();
88232
+ break;
88233
+ default:
88234
+ reader.skipType(tag & 7);
88235
+ break;
88236
+ }
88237
+ }
88238
+ return message;
88239
+ };
88240
+
88241
+ /**
88242
+ * Decodes an ItemDeleted message from the specified reader or buffer, length delimited.
88243
+ * @function decodeDelimited
88244
+ * @memberof ItemDeleted
88245
+ * @static
88246
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
88247
+ * @returns {ItemDeleted} ItemDeleted
88248
+ * @throws {Error} If the payload is not a reader or valid buffer
88249
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
88250
+ */
88251
+ ItemDeleted.decodeDelimited = function decodeDelimited(reader) {
88252
+ if (!(reader instanceof $Reader))
88253
+ reader = new $Reader(reader);
88254
+ return this.decode(reader, reader.uint32());
88255
+ };
88256
+
88257
+ /**
88258
+ * Verifies an ItemDeleted message.
88259
+ * @function verify
88260
+ * @memberof ItemDeleted
88261
+ * @static
88262
+ * @param {Object.<string,*>} message Plain object to verify
88263
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
88264
+ */
88265
+ ItemDeleted.verify = function verify(message) {
88266
+ if (typeof message !== "object" || message === null)
88267
+ return "object expected";
88268
+ if (message.slug != null && message.hasOwnProperty("slug"))
88269
+ if (!$util.isString(message.slug))
88270
+ return "slug: string expected";
88271
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
88272
+ if (!$util.isInteger(message.deletedAt) && !(message.deletedAt && $util.isInteger(message.deletedAt.low) && $util.isInteger(message.deletedAt.high)))
88273
+ return "deletedAt: integer|Long expected";
88274
+ return null;
88275
+ };
88276
+
88277
+ /**
88278
+ * Creates an ItemDeleted message from a plain object. Also converts values to their respective internal types.
88279
+ * @function fromObject
88280
+ * @memberof ItemDeleted
88281
+ * @static
88282
+ * @param {Object.<string,*>} object Plain object
88283
+ * @returns {ItemDeleted} ItemDeleted
88284
+ */
88285
+ ItemDeleted.fromObject = function fromObject(object) {
88286
+ if (object instanceof $root.ItemDeleted)
88287
+ return object;
88288
+ var message = new $root.ItemDeleted();
88289
+ if (object.slug != null)
88290
+ message.slug = String(object.slug);
88291
+ if (object.deletedAt != null)
88292
+ if ($util.Long)
88293
+ (message.deletedAt = $util.Long.fromValue(object.deletedAt)).unsigned = true;
88294
+ else if (typeof object.deletedAt === "string")
88295
+ message.deletedAt = parseInt(object.deletedAt, 10);
88296
+ else if (typeof object.deletedAt === "number")
88297
+ message.deletedAt = object.deletedAt;
88298
+ else if (typeof object.deletedAt === "object")
88299
+ message.deletedAt = new $util.LongBits(object.deletedAt.low >>> 0, object.deletedAt.high >>> 0).toNumber(true);
88300
+ return message;
88301
+ };
88302
+
88303
+ /**
88304
+ * Creates a plain object from an ItemDeleted message. Also converts values to other types if specified.
88305
+ * @function toObject
88306
+ * @memberof ItemDeleted
88307
+ * @static
88308
+ * @param {ItemDeleted} message ItemDeleted
88309
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
88310
+ * @returns {Object.<string,*>} Plain object
88311
+ */
88312
+ ItemDeleted.toObject = function toObject(message, options) {
88313
+ if (!options)
88314
+ options = {};
88315
+ var object = {};
88316
+ if (options.defaults) {
88317
+ object.slug = "";
88318
+ if ($util.Long) {
88319
+ var long = new $util.Long(0, 0, true);
88320
+ object.deletedAt = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
88321
+ } else
88322
+ object.deletedAt = options.longs === String ? "0" : 0;
88323
+ }
88324
+ if (message.slug != null && message.hasOwnProperty("slug"))
88325
+ object.slug = message.slug;
88326
+ if (message.deletedAt != null && message.hasOwnProperty("deletedAt"))
88327
+ if (typeof message.deletedAt === "number")
88328
+ object.deletedAt = options.longs === String ? String(message.deletedAt) : message.deletedAt;
88329
+ else
88330
+ object.deletedAt = options.longs === String ? $util.Long.prototype.toString.call(message.deletedAt) : options.longs === Number ? new $util.LongBits(message.deletedAt.low >>> 0, message.deletedAt.high >>> 0).toNumber(true) : message.deletedAt;
88331
+ return object;
88332
+ };
88333
+
88334
+ /**
88335
+ * Converts this ItemDeleted to JSON.
88336
+ * @function toJSON
88337
+ * @memberof ItemDeleted
88338
+ * @instance
88339
+ * @returns {Object.<string,*>} JSON object
88340
+ */
88341
+ ItemDeleted.prototype.toJSON = function toJSON() {
88342
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
88343
+ };
88344
+
88345
+ return ItemDeleted;
88346
+ })();
88347
+
87588
88348
  $root.TopicCreated = (function() {
87589
88349
 
87590
88350
  /**
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.626.0"
19
+ "version": "1.627.0"
20
20
  }