@headspace/protos-events 1.26.0 → 1.28.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
@@ -903,6 +903,102 @@ export namespace subscription {
903
903
  public toJSON(): { [k: string]: any };
904
904
  }
905
905
 
906
+ /** PaymentMethodStatus enum. */
907
+ enum PaymentMethodStatus {
908
+ ACTIVE = 0,
909
+ CLOSED = 1
910
+ }
911
+
912
+ /** Properties of a PaymentMethod. */
913
+ interface IPaymentMethod {
914
+
915
+ /** PaymentMethod paymentMethodStatus */
916
+ paymentMethodStatus?: (subscription.PaymentMethodStatus|null);
917
+ }
918
+
919
+ /** Represents a PaymentMethod. */
920
+ class PaymentMethod implements IPaymentMethod {
921
+
922
+ /**
923
+ * Constructs a new PaymentMethod.
924
+ * @param [properties] Properties to set
925
+ */
926
+ constructor(properties?: subscription.IPaymentMethod);
927
+
928
+ /** PaymentMethod paymentMethodStatus. */
929
+ public paymentMethodStatus: subscription.PaymentMethodStatus;
930
+
931
+ /**
932
+ * Creates a new PaymentMethod instance using the specified properties.
933
+ * @param [properties] Properties to set
934
+ * @returns PaymentMethod instance
935
+ */
936
+ public static create(properties?: subscription.IPaymentMethod): subscription.PaymentMethod;
937
+
938
+ /**
939
+ * Encodes the specified PaymentMethod message. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
940
+ * @param message PaymentMethod message or plain object to encode
941
+ * @param [writer] Writer to encode to
942
+ * @returns Writer
943
+ */
944
+ public static encode(message: subscription.IPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer;
945
+
946
+ /**
947
+ * Encodes the specified PaymentMethod message, length delimited. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
948
+ * @param message PaymentMethod message or plain object to encode
949
+ * @param [writer] Writer to encode to
950
+ * @returns Writer
951
+ */
952
+ public static encodeDelimited(message: subscription.IPaymentMethod, writer?: $protobuf.Writer): $protobuf.Writer;
953
+
954
+ /**
955
+ * Decodes a PaymentMethod message from the specified reader or buffer.
956
+ * @param reader Reader or buffer to decode from
957
+ * @param [length] Message length if known beforehand
958
+ * @returns PaymentMethod
959
+ * @throws {Error} If the payload is not a reader or valid buffer
960
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
961
+ */
962
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): subscription.PaymentMethod;
963
+
964
+ /**
965
+ * Decodes a PaymentMethod message from the specified reader or buffer, length delimited.
966
+ * @param reader Reader or buffer to decode from
967
+ * @returns PaymentMethod
968
+ * @throws {Error} If the payload is not a reader or valid buffer
969
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
970
+ */
971
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): subscription.PaymentMethod;
972
+
973
+ /**
974
+ * Verifies a PaymentMethod message.
975
+ * @param message Plain object to verify
976
+ * @returns `null` if valid, otherwise the reason why it is not
977
+ */
978
+ public static verify(message: { [k: string]: any }): (string|null);
979
+
980
+ /**
981
+ * Creates a PaymentMethod message from a plain object. Also converts values to their respective internal types.
982
+ * @param object Plain object
983
+ * @returns PaymentMethod
984
+ */
985
+ public static fromObject(object: { [k: string]: any }): subscription.PaymentMethod;
986
+
987
+ /**
988
+ * Creates a plain object from a PaymentMethod message. Also converts values to other types if specified.
989
+ * @param message PaymentMethod
990
+ * @param [options] Conversion options
991
+ * @returns Plain object
992
+ */
993
+ public static toObject(message: subscription.PaymentMethod, options?: $protobuf.IConversionOptions): { [k: string]: any };
994
+
995
+ /**
996
+ * Converts this PaymentMethod to JSON.
997
+ * @returns JSON object
998
+ */
999
+ public toJSON(): { [k: string]: any };
1000
+ }
1001
+
906
1002
  /** Properties of a Plan. */
907
1003
  interface IPlan {
908
1004
 
@@ -1811,6 +1907,102 @@ export class CheckInCompleted implements ICheckInCompleted {
1811
1907
  public toJSON(): { [k: string]: any };
1812
1908
  }
1813
1909
 
1910
+ /** Properties of a ReferralSignedUp. */
1911
+ export interface IReferralSignedUp {
1912
+
1913
+ /** ReferralSignedUp refereeName */
1914
+ refereeName?: (string|null);
1915
+
1916
+ /** ReferralSignedUp referrerId */
1917
+ referrerId?: (string|null);
1918
+ }
1919
+
1920
+ /** Represents a ReferralSignedUp. */
1921
+ export class ReferralSignedUp implements IReferralSignedUp {
1922
+
1923
+ /**
1924
+ * Constructs a new ReferralSignedUp.
1925
+ * @param [properties] Properties to set
1926
+ */
1927
+ constructor(properties?: IReferralSignedUp);
1928
+
1929
+ /** ReferralSignedUp refereeName. */
1930
+ public refereeName: string;
1931
+
1932
+ /** ReferralSignedUp referrerId. */
1933
+ public referrerId: string;
1934
+
1935
+ /**
1936
+ * Creates a new ReferralSignedUp instance using the specified properties.
1937
+ * @param [properties] Properties to set
1938
+ * @returns ReferralSignedUp instance
1939
+ */
1940
+ public static create(properties?: IReferralSignedUp): ReferralSignedUp;
1941
+
1942
+ /**
1943
+ * Encodes the specified ReferralSignedUp message. Does not implicitly {@link ReferralSignedUp.verify|verify} messages.
1944
+ * @param message ReferralSignedUp message or plain object to encode
1945
+ * @param [writer] Writer to encode to
1946
+ * @returns Writer
1947
+ */
1948
+ public static encode(message: IReferralSignedUp, writer?: $protobuf.Writer): $protobuf.Writer;
1949
+
1950
+ /**
1951
+ * Encodes the specified ReferralSignedUp message, length delimited. Does not implicitly {@link ReferralSignedUp.verify|verify} messages.
1952
+ * @param message ReferralSignedUp message or plain object to encode
1953
+ * @param [writer] Writer to encode to
1954
+ * @returns Writer
1955
+ */
1956
+ public static encodeDelimited(message: IReferralSignedUp, writer?: $protobuf.Writer): $protobuf.Writer;
1957
+
1958
+ /**
1959
+ * Decodes a ReferralSignedUp message from the specified reader or buffer.
1960
+ * @param reader Reader or buffer to decode from
1961
+ * @param [length] Message length if known beforehand
1962
+ * @returns ReferralSignedUp
1963
+ * @throws {Error} If the payload is not a reader or valid buffer
1964
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1965
+ */
1966
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ReferralSignedUp;
1967
+
1968
+ /**
1969
+ * Decodes a ReferralSignedUp message from the specified reader or buffer, length delimited.
1970
+ * @param reader Reader or buffer to decode from
1971
+ * @returns ReferralSignedUp
1972
+ * @throws {Error} If the payload is not a reader or valid buffer
1973
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
1974
+ */
1975
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ReferralSignedUp;
1976
+
1977
+ /**
1978
+ * Verifies a ReferralSignedUp message.
1979
+ * @param message Plain object to verify
1980
+ * @returns `null` if valid, otherwise the reason why it is not
1981
+ */
1982
+ public static verify(message: { [k: string]: any }): (string|null);
1983
+
1984
+ /**
1985
+ * Creates a ReferralSignedUp message from a plain object. Also converts values to their respective internal types.
1986
+ * @param object Plain object
1987
+ * @returns ReferralSignedUp
1988
+ */
1989
+ public static fromObject(object: { [k: string]: any }): ReferralSignedUp;
1990
+
1991
+ /**
1992
+ * Creates a plain object from a ReferralSignedUp message. Also converts values to other types if specified.
1993
+ * @param message ReferralSignedUp
1994
+ * @param [options] Conversion options
1995
+ * @returns Plain object
1996
+ */
1997
+ public static toObject(message: ReferralSignedUp, options?: $protobuf.IConversionOptions): { [k: string]: any };
1998
+
1999
+ /**
2000
+ * Converts this ReferralSignedUp to JSON.
2001
+ * @returns JSON object
2002
+ */
2003
+ public toJSON(): { [k: string]: any };
2004
+ }
2005
+
1814
2006
  /** Properties of a SleepcastEpisodeCompleted. */
1815
2007
  export interface ISleepcastEpisodeCompleted {
1816
2008
 
@@ -2230,6 +2422,9 @@ export interface ISubscriptionCancelled {
2230
2422
 
2231
2423
  /** SubscriptionCancelled userId */
2232
2424
  userId?: (string|null);
2425
+
2426
+ /** SubscriptionCancelled paymentMethod */
2427
+ paymentMethod?: (subscription.IPaymentMethod|null);
2233
2428
  }
2234
2429
 
2235
2430
  /** Represents a SubscriptionCancelled. */
@@ -2250,6 +2445,9 @@ export class SubscriptionCancelled implements ISubscriptionCancelled {
2250
2445
  /** SubscriptionCancelled userId. */
2251
2446
  public userId: string;
2252
2447
 
2448
+ /** SubscriptionCancelled paymentMethod. */
2449
+ public paymentMethod?: (subscription.IPaymentMethod|null);
2450
+
2253
2451
  /**
2254
2452
  * Creates a new SubscriptionCancelled instance using the specified properties.
2255
2453
  * @param [properties] Properties to set
@@ -2443,6 +2641,9 @@ export interface ISubscriptionUpcomingRenewal {
2443
2641
 
2444
2642
  /** SubscriptionUpcomingRenewal renewalDate */
2445
2643
  renewalDate?: (number|Long|null);
2644
+
2645
+ /** SubscriptionUpcomingRenewal paymentMethod */
2646
+ paymentMethod?: (subscription.IPaymentMethod|null);
2446
2647
  }
2447
2648
 
2448
2649
  /** Represents a SubscriptionUpcomingRenewal. */
@@ -2472,6 +2673,9 @@ export class SubscriptionUpcomingRenewal implements ISubscriptionUpcomingRenewal
2472
2673
  /** SubscriptionUpcomingRenewal renewalDate. */
2473
2674
  public renewalDate: (number|Long);
2474
2675
 
2676
+ /** SubscriptionUpcomingRenewal paymentMethod. */
2677
+ public paymentMethod?: (subscription.IPaymentMethod|null);
2678
+
2475
2679
  /**
2476
2680
  * Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
2477
2681
  * @param [properties] Properties to set
package/lib/index.js CHANGED
@@ -1995,6 +1995,220 @@ $root.subscription = (function() {
1995
1995
  return UserSubscriptionResponse;
1996
1996
  })();
1997
1997
 
1998
+ /**
1999
+ * PaymentMethodStatus enum.
2000
+ * @name subscription.PaymentMethodStatus
2001
+ * @enum {string}
2002
+ * @property {number} ACTIVE=0 ACTIVE value
2003
+ * @property {number} CLOSED=1 CLOSED value
2004
+ */
2005
+ subscription.PaymentMethodStatus = (function() {
2006
+ var valuesById = {}, values = Object.create(valuesById);
2007
+ values[valuesById[0] = "ACTIVE"] = 0;
2008
+ values[valuesById[1] = "CLOSED"] = 1;
2009
+ return values;
2010
+ })();
2011
+
2012
+ subscription.PaymentMethod = (function() {
2013
+
2014
+ /**
2015
+ * Properties of a PaymentMethod.
2016
+ * @memberof subscription
2017
+ * @interface IPaymentMethod
2018
+ * @property {subscription.PaymentMethodStatus|null} [paymentMethodStatus] PaymentMethod paymentMethodStatus
2019
+ */
2020
+
2021
+ /**
2022
+ * Constructs a new PaymentMethod.
2023
+ * @memberof subscription
2024
+ * @classdesc Represents a PaymentMethod.
2025
+ * @implements IPaymentMethod
2026
+ * @constructor
2027
+ * @param {subscription.IPaymentMethod=} [properties] Properties to set
2028
+ */
2029
+ function PaymentMethod(properties) {
2030
+ if (properties)
2031
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
2032
+ if (properties[keys[i]] != null)
2033
+ this[keys[i]] = properties[keys[i]];
2034
+ }
2035
+
2036
+ /**
2037
+ * PaymentMethod paymentMethodStatus.
2038
+ * @member {subscription.PaymentMethodStatus} paymentMethodStatus
2039
+ * @memberof subscription.PaymentMethod
2040
+ * @instance
2041
+ */
2042
+ PaymentMethod.prototype.paymentMethodStatus = 0;
2043
+
2044
+ /**
2045
+ * Creates a new PaymentMethod instance using the specified properties.
2046
+ * @function create
2047
+ * @memberof subscription.PaymentMethod
2048
+ * @static
2049
+ * @param {subscription.IPaymentMethod=} [properties] Properties to set
2050
+ * @returns {subscription.PaymentMethod} PaymentMethod instance
2051
+ */
2052
+ PaymentMethod.create = function create(properties) {
2053
+ return new PaymentMethod(properties);
2054
+ };
2055
+
2056
+ /**
2057
+ * Encodes the specified PaymentMethod message. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
2058
+ * @function encode
2059
+ * @memberof subscription.PaymentMethod
2060
+ * @static
2061
+ * @param {subscription.IPaymentMethod} message PaymentMethod message or plain object to encode
2062
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2063
+ * @returns {$protobuf.Writer} Writer
2064
+ */
2065
+ PaymentMethod.encode = function encode(message, writer) {
2066
+ if (!writer)
2067
+ writer = $Writer.create();
2068
+ if (message.paymentMethodStatus != null && message.hasOwnProperty("paymentMethodStatus"))
2069
+ writer.uint32(/* id 1, wireType 0 =*/8).int32(message.paymentMethodStatus);
2070
+ return writer;
2071
+ };
2072
+
2073
+ /**
2074
+ * Encodes the specified PaymentMethod message, length delimited. Does not implicitly {@link subscription.PaymentMethod.verify|verify} messages.
2075
+ * @function encodeDelimited
2076
+ * @memberof subscription.PaymentMethod
2077
+ * @static
2078
+ * @param {subscription.IPaymentMethod} message PaymentMethod message or plain object to encode
2079
+ * @param {$protobuf.Writer} [writer] Writer to encode to
2080
+ * @returns {$protobuf.Writer} Writer
2081
+ */
2082
+ PaymentMethod.encodeDelimited = function encodeDelimited(message, writer) {
2083
+ return this.encode(message, writer).ldelim();
2084
+ };
2085
+
2086
+ /**
2087
+ * Decodes a PaymentMethod message from the specified reader or buffer.
2088
+ * @function decode
2089
+ * @memberof subscription.PaymentMethod
2090
+ * @static
2091
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2092
+ * @param {number} [length] Message length if known beforehand
2093
+ * @returns {subscription.PaymentMethod} PaymentMethod
2094
+ * @throws {Error} If the payload is not a reader or valid buffer
2095
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2096
+ */
2097
+ PaymentMethod.decode = function decode(reader, length) {
2098
+ if (!(reader instanceof $Reader))
2099
+ reader = $Reader.create(reader);
2100
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.subscription.PaymentMethod();
2101
+ while (reader.pos < end) {
2102
+ var tag = reader.uint32();
2103
+ switch (tag >>> 3) {
2104
+ case 1:
2105
+ message.paymentMethodStatus = reader.int32();
2106
+ break;
2107
+ default:
2108
+ reader.skipType(tag & 7);
2109
+ break;
2110
+ }
2111
+ }
2112
+ return message;
2113
+ };
2114
+
2115
+ /**
2116
+ * Decodes a PaymentMethod message from the specified reader or buffer, length delimited.
2117
+ * @function decodeDelimited
2118
+ * @memberof subscription.PaymentMethod
2119
+ * @static
2120
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
2121
+ * @returns {subscription.PaymentMethod} PaymentMethod
2122
+ * @throws {Error} If the payload is not a reader or valid buffer
2123
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
2124
+ */
2125
+ PaymentMethod.decodeDelimited = function decodeDelimited(reader) {
2126
+ if (!(reader instanceof $Reader))
2127
+ reader = new $Reader(reader);
2128
+ return this.decode(reader, reader.uint32());
2129
+ };
2130
+
2131
+ /**
2132
+ * Verifies a PaymentMethod message.
2133
+ * @function verify
2134
+ * @memberof subscription.PaymentMethod
2135
+ * @static
2136
+ * @param {Object.<string,*>} message Plain object to verify
2137
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
2138
+ */
2139
+ PaymentMethod.verify = function verify(message) {
2140
+ if (typeof message !== "object" || message === null)
2141
+ return "object expected";
2142
+ if (message.paymentMethodStatus != null && message.hasOwnProperty("paymentMethodStatus"))
2143
+ switch (message.paymentMethodStatus) {
2144
+ default:
2145
+ return "paymentMethodStatus: enum value expected";
2146
+ case 0:
2147
+ case 1:
2148
+ break;
2149
+ }
2150
+ return null;
2151
+ };
2152
+
2153
+ /**
2154
+ * Creates a PaymentMethod message from a plain object. Also converts values to their respective internal types.
2155
+ * @function fromObject
2156
+ * @memberof subscription.PaymentMethod
2157
+ * @static
2158
+ * @param {Object.<string,*>} object Plain object
2159
+ * @returns {subscription.PaymentMethod} PaymentMethod
2160
+ */
2161
+ PaymentMethod.fromObject = function fromObject(object) {
2162
+ if (object instanceof $root.subscription.PaymentMethod)
2163
+ return object;
2164
+ var message = new $root.subscription.PaymentMethod();
2165
+ switch (object.paymentMethodStatus) {
2166
+ case "ACTIVE":
2167
+ case 0:
2168
+ message.paymentMethodStatus = 0;
2169
+ break;
2170
+ case "CLOSED":
2171
+ case 1:
2172
+ message.paymentMethodStatus = 1;
2173
+ break;
2174
+ }
2175
+ return message;
2176
+ };
2177
+
2178
+ /**
2179
+ * Creates a plain object from a PaymentMethod message. Also converts values to other types if specified.
2180
+ * @function toObject
2181
+ * @memberof subscription.PaymentMethod
2182
+ * @static
2183
+ * @param {subscription.PaymentMethod} message PaymentMethod
2184
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
2185
+ * @returns {Object.<string,*>} Plain object
2186
+ */
2187
+ PaymentMethod.toObject = function toObject(message, options) {
2188
+ if (!options)
2189
+ options = {};
2190
+ var object = {};
2191
+ if (options.defaults)
2192
+ object.paymentMethodStatus = options.enums === String ? "ACTIVE" : 0;
2193
+ if (message.paymentMethodStatus != null && message.hasOwnProperty("paymentMethodStatus"))
2194
+ object.paymentMethodStatus = options.enums === String ? $root.subscription.PaymentMethodStatus[message.paymentMethodStatus] : message.paymentMethodStatus;
2195
+ return object;
2196
+ };
2197
+
2198
+ /**
2199
+ * Converts this PaymentMethod to JSON.
2200
+ * @function toJSON
2201
+ * @memberof subscription.PaymentMethod
2202
+ * @instance
2203
+ * @returns {Object.<string,*>} JSON object
2204
+ */
2205
+ PaymentMethod.prototype.toJSON = function toJSON() {
2206
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
2207
+ };
2208
+
2209
+ return PaymentMethod;
2210
+ })();
2211
+
1998
2212
  subscription.Plan = (function() {
1999
2213
 
2000
2214
  /**
@@ -4276,6 +4490,216 @@ $root.CheckInCompleted = (function() {
4276
4490
  return CheckInCompleted;
4277
4491
  })();
4278
4492
 
4493
+ $root.ReferralSignedUp = (function() {
4494
+
4495
+ /**
4496
+ * Properties of a ReferralSignedUp.
4497
+ * @exports IReferralSignedUp
4498
+ * @interface IReferralSignedUp
4499
+ * @property {string|null} [refereeName] ReferralSignedUp refereeName
4500
+ * @property {string|null} [referrerId] ReferralSignedUp referrerId
4501
+ */
4502
+
4503
+ /**
4504
+ * Constructs a new ReferralSignedUp.
4505
+ * @exports ReferralSignedUp
4506
+ * @classdesc Represents a ReferralSignedUp.
4507
+ * @implements IReferralSignedUp
4508
+ * @constructor
4509
+ * @param {IReferralSignedUp=} [properties] Properties to set
4510
+ */
4511
+ function ReferralSignedUp(properties) {
4512
+ if (properties)
4513
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
4514
+ if (properties[keys[i]] != null)
4515
+ this[keys[i]] = properties[keys[i]];
4516
+ }
4517
+
4518
+ /**
4519
+ * ReferralSignedUp refereeName.
4520
+ * @member {string} refereeName
4521
+ * @memberof ReferralSignedUp
4522
+ * @instance
4523
+ */
4524
+ ReferralSignedUp.prototype.refereeName = "";
4525
+
4526
+ /**
4527
+ * ReferralSignedUp referrerId.
4528
+ * @member {string} referrerId
4529
+ * @memberof ReferralSignedUp
4530
+ * @instance
4531
+ */
4532
+ ReferralSignedUp.prototype.referrerId = "";
4533
+
4534
+ /**
4535
+ * Creates a new ReferralSignedUp instance using the specified properties.
4536
+ * @function create
4537
+ * @memberof ReferralSignedUp
4538
+ * @static
4539
+ * @param {IReferralSignedUp=} [properties] Properties to set
4540
+ * @returns {ReferralSignedUp} ReferralSignedUp instance
4541
+ */
4542
+ ReferralSignedUp.create = function create(properties) {
4543
+ return new ReferralSignedUp(properties);
4544
+ };
4545
+
4546
+ /**
4547
+ * Encodes the specified ReferralSignedUp message. Does not implicitly {@link ReferralSignedUp.verify|verify} messages.
4548
+ * @function encode
4549
+ * @memberof ReferralSignedUp
4550
+ * @static
4551
+ * @param {IReferralSignedUp} message ReferralSignedUp message or plain object to encode
4552
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4553
+ * @returns {$protobuf.Writer} Writer
4554
+ */
4555
+ ReferralSignedUp.encode = function encode(message, writer) {
4556
+ if (!writer)
4557
+ writer = $Writer.create();
4558
+ if (message.refereeName != null && message.hasOwnProperty("refereeName"))
4559
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.refereeName);
4560
+ if (message.referrerId != null && message.hasOwnProperty("referrerId"))
4561
+ writer.uint32(/* id 2, wireType 2 =*/18).string(message.referrerId);
4562
+ return writer;
4563
+ };
4564
+
4565
+ /**
4566
+ * Encodes the specified ReferralSignedUp message, length delimited. Does not implicitly {@link ReferralSignedUp.verify|verify} messages.
4567
+ * @function encodeDelimited
4568
+ * @memberof ReferralSignedUp
4569
+ * @static
4570
+ * @param {IReferralSignedUp} message ReferralSignedUp message or plain object to encode
4571
+ * @param {$protobuf.Writer} [writer] Writer to encode to
4572
+ * @returns {$protobuf.Writer} Writer
4573
+ */
4574
+ ReferralSignedUp.encodeDelimited = function encodeDelimited(message, writer) {
4575
+ return this.encode(message, writer).ldelim();
4576
+ };
4577
+
4578
+ /**
4579
+ * Decodes a ReferralSignedUp message from the specified reader or buffer.
4580
+ * @function decode
4581
+ * @memberof ReferralSignedUp
4582
+ * @static
4583
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4584
+ * @param {number} [length] Message length if known beforehand
4585
+ * @returns {ReferralSignedUp} ReferralSignedUp
4586
+ * @throws {Error} If the payload is not a reader or valid buffer
4587
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4588
+ */
4589
+ ReferralSignedUp.decode = function decode(reader, length) {
4590
+ if (!(reader instanceof $Reader))
4591
+ reader = $Reader.create(reader);
4592
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ReferralSignedUp();
4593
+ while (reader.pos < end) {
4594
+ var tag = reader.uint32();
4595
+ switch (tag >>> 3) {
4596
+ case 1:
4597
+ message.refereeName = reader.string();
4598
+ break;
4599
+ case 2:
4600
+ message.referrerId = reader.string();
4601
+ break;
4602
+ default:
4603
+ reader.skipType(tag & 7);
4604
+ break;
4605
+ }
4606
+ }
4607
+ return message;
4608
+ };
4609
+
4610
+ /**
4611
+ * Decodes a ReferralSignedUp message from the specified reader or buffer, length delimited.
4612
+ * @function decodeDelimited
4613
+ * @memberof ReferralSignedUp
4614
+ * @static
4615
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
4616
+ * @returns {ReferralSignedUp} ReferralSignedUp
4617
+ * @throws {Error} If the payload is not a reader or valid buffer
4618
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
4619
+ */
4620
+ ReferralSignedUp.decodeDelimited = function decodeDelimited(reader) {
4621
+ if (!(reader instanceof $Reader))
4622
+ reader = new $Reader(reader);
4623
+ return this.decode(reader, reader.uint32());
4624
+ };
4625
+
4626
+ /**
4627
+ * Verifies a ReferralSignedUp message.
4628
+ * @function verify
4629
+ * @memberof ReferralSignedUp
4630
+ * @static
4631
+ * @param {Object.<string,*>} message Plain object to verify
4632
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
4633
+ */
4634
+ ReferralSignedUp.verify = function verify(message) {
4635
+ if (typeof message !== "object" || message === null)
4636
+ return "object expected";
4637
+ if (message.refereeName != null && message.hasOwnProperty("refereeName"))
4638
+ if (!$util.isString(message.refereeName))
4639
+ return "refereeName: string expected";
4640
+ if (message.referrerId != null && message.hasOwnProperty("referrerId"))
4641
+ if (!$util.isString(message.referrerId))
4642
+ return "referrerId: string expected";
4643
+ return null;
4644
+ };
4645
+
4646
+ /**
4647
+ * Creates a ReferralSignedUp message from a plain object. Also converts values to their respective internal types.
4648
+ * @function fromObject
4649
+ * @memberof ReferralSignedUp
4650
+ * @static
4651
+ * @param {Object.<string,*>} object Plain object
4652
+ * @returns {ReferralSignedUp} ReferralSignedUp
4653
+ */
4654
+ ReferralSignedUp.fromObject = function fromObject(object) {
4655
+ if (object instanceof $root.ReferralSignedUp)
4656
+ return object;
4657
+ var message = new $root.ReferralSignedUp();
4658
+ if (object.refereeName != null)
4659
+ message.refereeName = String(object.refereeName);
4660
+ if (object.referrerId != null)
4661
+ message.referrerId = String(object.referrerId);
4662
+ return message;
4663
+ };
4664
+
4665
+ /**
4666
+ * Creates a plain object from a ReferralSignedUp message. Also converts values to other types if specified.
4667
+ * @function toObject
4668
+ * @memberof ReferralSignedUp
4669
+ * @static
4670
+ * @param {ReferralSignedUp} message ReferralSignedUp
4671
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
4672
+ * @returns {Object.<string,*>} Plain object
4673
+ */
4674
+ ReferralSignedUp.toObject = function toObject(message, options) {
4675
+ if (!options)
4676
+ options = {};
4677
+ var object = {};
4678
+ if (options.defaults) {
4679
+ object.refereeName = "";
4680
+ object.referrerId = "";
4681
+ }
4682
+ if (message.refereeName != null && message.hasOwnProperty("refereeName"))
4683
+ object.refereeName = message.refereeName;
4684
+ if (message.referrerId != null && message.hasOwnProperty("referrerId"))
4685
+ object.referrerId = message.referrerId;
4686
+ return object;
4687
+ };
4688
+
4689
+ /**
4690
+ * Converts this ReferralSignedUp to JSON.
4691
+ * @function toJSON
4692
+ * @memberof ReferralSignedUp
4693
+ * @instance
4694
+ * @returns {Object.<string,*>} JSON object
4695
+ */
4696
+ ReferralSignedUp.prototype.toJSON = function toJSON() {
4697
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
4698
+ };
4699
+
4700
+ return ReferralSignedUp;
4701
+ })();
4702
+
4279
4703
  $root.SleepcastEpisodeCompleted = (function() {
4280
4704
 
4281
4705
  /**
@@ -5283,6 +5707,7 @@ $root.SubscriptionCancelled = (function() {
5283
5707
  * @property {number|null} [id] SubscriptionCancelled id
5284
5708
  * @property {number|Long|null} [updatedOn] SubscriptionCancelled updatedOn
5285
5709
  * @property {string|null} [userId] SubscriptionCancelled userId
5710
+ * @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionCancelled paymentMethod
5286
5711
  */
5287
5712
 
5288
5713
  /**
@@ -5324,6 +5749,14 @@ $root.SubscriptionCancelled = (function() {
5324
5749
  */
5325
5750
  SubscriptionCancelled.prototype.userId = "";
5326
5751
 
5752
+ /**
5753
+ * SubscriptionCancelled paymentMethod.
5754
+ * @member {subscription.IPaymentMethod|null|undefined} paymentMethod
5755
+ * @memberof SubscriptionCancelled
5756
+ * @instance
5757
+ */
5758
+ SubscriptionCancelled.prototype.paymentMethod = null;
5759
+
5327
5760
  /**
5328
5761
  * Creates a new SubscriptionCancelled instance using the specified properties.
5329
5762
  * @function create
@@ -5354,6 +5787,8 @@ $root.SubscriptionCancelled = (function() {
5354
5787
  writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.updatedOn);
5355
5788
  if (message.userId != null && message.hasOwnProperty("userId"))
5356
5789
  writer.uint32(/* id 3, wireType 2 =*/26).string(message.userId);
5790
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
5791
+ $root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
5357
5792
  return writer;
5358
5793
  };
5359
5794
 
@@ -5397,6 +5832,9 @@ $root.SubscriptionCancelled = (function() {
5397
5832
  case 3:
5398
5833
  message.userId = reader.string();
5399
5834
  break;
5835
+ case 4:
5836
+ message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
5837
+ break;
5400
5838
  default:
5401
5839
  reader.skipType(tag & 7);
5402
5840
  break;
@@ -5441,6 +5879,11 @@ $root.SubscriptionCancelled = (function() {
5441
5879
  if (message.userId != null && message.hasOwnProperty("userId"))
5442
5880
  if (!$util.isString(message.userId))
5443
5881
  return "userId: string expected";
5882
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod")) {
5883
+ var error = $root.subscription.PaymentMethod.verify(message.paymentMethod);
5884
+ if (error)
5885
+ return "paymentMethod." + error;
5886
+ }
5444
5887
  return null;
5445
5888
  };
5446
5889
 
@@ -5469,6 +5912,11 @@ $root.SubscriptionCancelled = (function() {
5469
5912
  message.updatedOn = new $util.LongBits(object.updatedOn.low >>> 0, object.updatedOn.high >>> 0).toNumber(true);
5470
5913
  if (object.userId != null)
5471
5914
  message.userId = String(object.userId);
5915
+ if (object.paymentMethod != null) {
5916
+ if (typeof object.paymentMethod !== "object")
5917
+ throw TypeError(".SubscriptionCancelled.paymentMethod: object expected");
5918
+ message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
5919
+ }
5472
5920
  return message;
5473
5921
  };
5474
5922
 
@@ -5493,6 +5941,7 @@ $root.SubscriptionCancelled = (function() {
5493
5941
  } else
5494
5942
  object.updatedOn = options.longs === String ? "0" : 0;
5495
5943
  object.userId = "";
5944
+ object.paymentMethod = null;
5496
5945
  }
5497
5946
  if (message.id != null && message.hasOwnProperty("id"))
5498
5947
  object.id = message.id;
@@ -5503,6 +5952,8 @@ $root.SubscriptionCancelled = (function() {
5503
5952
  object.updatedOn = options.longs === String ? $util.Long.prototype.toString.call(message.updatedOn) : options.longs === Number ? new $util.LongBits(message.updatedOn.low >>> 0, message.updatedOn.high >>> 0).toNumber(true) : message.updatedOn;
5504
5953
  if (message.userId != null && message.hasOwnProperty("userId"))
5505
5954
  object.userId = message.userId;
5955
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
5956
+ object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
5506
5957
  return object;
5507
5958
  };
5508
5959
 
@@ -5778,6 +6229,7 @@ $root.SubscriptionUpcomingRenewal = (function() {
5778
6229
  * @property {subscription.SubscriptionMembership|null} [membership] SubscriptionUpcomingRenewal membership
5779
6230
  * @property {subscription.PlanAffiliation|null} [planAffiliation] SubscriptionUpcomingRenewal planAffiliation
5780
6231
  * @property {number|Long|null} [renewalDate] SubscriptionUpcomingRenewal renewalDate
6232
+ * @property {subscription.IPaymentMethod|null} [paymentMethod] SubscriptionUpcomingRenewal paymentMethod
5781
6233
  */
5782
6234
 
5783
6235
  /**
@@ -5843,6 +6295,14 @@ $root.SubscriptionUpcomingRenewal = (function() {
5843
6295
  */
5844
6296
  SubscriptionUpcomingRenewal.prototype.renewalDate = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
5845
6297
 
6298
+ /**
6299
+ * SubscriptionUpcomingRenewal paymentMethod.
6300
+ * @member {subscription.IPaymentMethod|null|undefined} paymentMethod
6301
+ * @memberof SubscriptionUpcomingRenewal
6302
+ * @instance
6303
+ */
6304
+ SubscriptionUpcomingRenewal.prototype.paymentMethod = null;
6305
+
5846
6306
  /**
5847
6307
  * Creates a new SubscriptionUpcomingRenewal instance using the specified properties.
5848
6308
  * @function create
@@ -5879,6 +6339,8 @@ $root.SubscriptionUpcomingRenewal = (function() {
5879
6339
  writer.uint32(/* id 5, wireType 0 =*/40).int32(message.planAffiliation);
5880
6340
  if (message.renewalDate != null && message.hasOwnProperty("renewalDate"))
5881
6341
  writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.renewalDate);
6342
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
6343
+ $root.subscription.PaymentMethod.encode(message.paymentMethod, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
5882
6344
  return writer;
5883
6345
  };
5884
6346
 
@@ -5931,6 +6393,9 @@ $root.SubscriptionUpcomingRenewal = (function() {
5931
6393
  case 6:
5932
6394
  message.renewalDate = reader.uint64();
5933
6395
  break;
6396
+ case 7:
6397
+ message.paymentMethod = $root.subscription.PaymentMethod.decode(reader, reader.uint32());
6398
+ break;
5934
6399
  default:
5935
6400
  reader.skipType(tag & 7);
5936
6401
  break;
@@ -5995,6 +6460,11 @@ $root.SubscriptionUpcomingRenewal = (function() {
5995
6460
  if (message.renewalDate != null && message.hasOwnProperty("renewalDate"))
5996
6461
  if (!$util.isInteger(message.renewalDate) && !(message.renewalDate && $util.isInteger(message.renewalDate.low) && $util.isInteger(message.renewalDate.high)))
5997
6462
  return "renewalDate: integer|Long expected";
6463
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod")) {
6464
+ var error = $root.subscription.PaymentMethod.verify(message.paymentMethod);
6465
+ if (error)
6466
+ return "paymentMethod." + error;
6467
+ }
5998
6468
  return null;
5999
6469
  };
6000
6470
 
@@ -6049,6 +6519,11 @@ $root.SubscriptionUpcomingRenewal = (function() {
6049
6519
  message.renewalDate = object.renewalDate;
6050
6520
  else if (typeof object.renewalDate === "object")
6051
6521
  message.renewalDate = new $util.LongBits(object.renewalDate.low >>> 0, object.renewalDate.high >>> 0).toNumber(true);
6522
+ if (object.paymentMethod != null) {
6523
+ if (typeof object.paymentMethod !== "object")
6524
+ throw TypeError(".SubscriptionUpcomingRenewal.paymentMethod: object expected");
6525
+ message.paymentMethod = $root.subscription.PaymentMethod.fromObject(object.paymentMethod);
6526
+ }
6052
6527
  return message;
6053
6528
  };
6054
6529
 
@@ -6076,6 +6551,7 @@ $root.SubscriptionUpcomingRenewal = (function() {
6076
6551
  object.renewalDate = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
6077
6552
  } else
6078
6553
  object.renewalDate = options.longs === String ? "0" : 0;
6554
+ object.paymentMethod = null;
6079
6555
  }
6080
6556
  if (message.id != null && message.hasOwnProperty("id"))
6081
6557
  object.id = message.id;
@@ -6092,6 +6568,8 @@ $root.SubscriptionUpcomingRenewal = (function() {
6092
6568
  object.renewalDate = options.longs === String ? String(message.renewalDate) : message.renewalDate;
6093
6569
  else
6094
6570
  object.renewalDate = options.longs === String ? $util.Long.prototype.toString.call(message.renewalDate) : options.longs === Number ? new $util.LongBits(message.renewalDate.low >>> 0, message.renewalDate.high >>> 0).toNumber(true) : message.renewalDate;
6571
+ if (message.paymentMethod != null && message.hasOwnProperty("paymentMethod"))
6572
+ object.paymentMethod = $root.subscription.PaymentMethod.toObject(message.paymentMethod, options);
6095
6573
  return object;
6096
6574
  };
6097
6575
 
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.26.0"
19
+ "version": "1.28.0"
20
20
  }