@headspace/protos-events 1.398.0 → 1.399.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
@@ -10340,6 +10340,13 @@ export namespace b2b {
10340
10340
  CONNECTION_SET = 1,
10341
10341
  CONNECTION_UNSET = 2
10342
10342
  }
10343
+
10344
+ /** SubscriptionOffering enum. */
10345
+ enum SubscriptionOffering {
10346
+ SUBSCRIPTION_OFFERING_UNKNOWN = 0,
10347
+ SUBSCRIPTION_OFFERING_HEADSPACE = 1,
10348
+ SUBSCRIPTION_OFFERING_GINGER = 2
10349
+ }
10343
10350
  }
10344
10351
 
10345
10352
  /** Namespace community. */
@@ -32132,6 +32139,9 @@ export interface IElfRecordPresent {
32132
32139
  /** ElfRecordPresent customFields */
32133
32140
  customFields?: (string|null);
32134
32141
 
32142
+ /** ElfRecordPresent offerings */
32143
+ offerings?: (b2b.SubscriptionOffering[]|null);
32144
+
32135
32145
  /** ElfRecordPresent isDryRun */
32136
32146
  isDryRun?: (boolean|null);
32137
32147
 
@@ -32205,6 +32215,9 @@ export class ElfRecordPresent implements IElfRecordPresent {
32205
32215
  /** ElfRecordPresent customFields. */
32206
32216
  public customFields: string;
32207
32217
 
32218
+ /** ElfRecordPresent offerings. */
32219
+ public offerings: b2b.SubscriptionOffering[];
32220
+
32208
32221
  /** ElfRecordPresent isDryRun. */
32209
32222
  public isDryRun: boolean;
32210
32223
 
package/lib/index.js CHANGED
@@ -24989,6 +24989,22 @@ $root.b2b = (function() {
24989
24989
  return values;
24990
24990
  })();
24991
24991
 
24992
+ /**
24993
+ * SubscriptionOffering enum.
24994
+ * @name b2b.SubscriptionOffering
24995
+ * @enum {string}
24996
+ * @property {number} SUBSCRIPTION_OFFERING_UNKNOWN=0 SUBSCRIPTION_OFFERING_UNKNOWN value
24997
+ * @property {number} SUBSCRIPTION_OFFERING_HEADSPACE=1 SUBSCRIPTION_OFFERING_HEADSPACE value
24998
+ * @property {number} SUBSCRIPTION_OFFERING_GINGER=2 SUBSCRIPTION_OFFERING_GINGER value
24999
+ */
25000
+ b2b.SubscriptionOffering = (function() {
25001
+ var valuesById = {}, values = Object.create(valuesById);
25002
+ values[valuesById[0] = "SUBSCRIPTION_OFFERING_UNKNOWN"] = 0;
25003
+ values[valuesById[1] = "SUBSCRIPTION_OFFERING_HEADSPACE"] = 1;
25004
+ values[valuesById[2] = "SUBSCRIPTION_OFFERING_GINGER"] = 2;
25005
+ return values;
25006
+ })();
25007
+
24992
25008
  return b2b;
24993
25009
  })();
24994
25010
 
@@ -89086,6 +89102,7 @@ $root.ElfRecordPresent = (function() {
89086
89102
  * @property {string|null} [department] ElfRecordPresent department
89087
89103
  * @property {string|null} [language] ElfRecordPresent language
89088
89104
  * @property {string|null} [customFields] ElfRecordPresent customFields
89105
+ * @property {Array.<b2b.SubscriptionOffering>|null} [offerings] ElfRecordPresent offerings
89089
89106
  * @property {boolean|null} [isDryRun] ElfRecordPresent isDryRun
89090
89107
  * @property {boolean|null} [gingerShouldProcess] ElfRecordPresent gingerShouldProcess
89091
89108
  * @property {boolean|null} [headspaceShouldProcess] ElfRecordPresent headspaceShouldProcess
@@ -89100,6 +89117,7 @@ $root.ElfRecordPresent = (function() {
89100
89117
  * @param {IElfRecordPresent=} [properties] Properties to set
89101
89118
  */
89102
89119
  function ElfRecordPresent(properties) {
89120
+ this.offerings = [];
89103
89121
  if (properties)
89104
89122
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
89105
89123
  if (properties[keys[i]] != null)
@@ -89250,6 +89268,14 @@ $root.ElfRecordPresent = (function() {
89250
89268
  */
89251
89269
  ElfRecordPresent.prototype.customFields = "";
89252
89270
 
89271
+ /**
89272
+ * ElfRecordPresent offerings.
89273
+ * @member {Array.<b2b.SubscriptionOffering>} offerings
89274
+ * @memberof ElfRecordPresent
89275
+ * @instance
89276
+ */
89277
+ ElfRecordPresent.prototype.offerings = $util.emptyArray;
89278
+
89253
89279
  /**
89254
89280
  * ElfRecordPresent isDryRun.
89255
89281
  * @member {boolean} isDryRun
@@ -89340,6 +89366,12 @@ $root.ElfRecordPresent = (function() {
89340
89366
  writer.uint32(/* id 20, wireType 0 =*/160).bool(message.headspaceShouldProcess);
89341
89367
  if (message.customFields != null && message.hasOwnProperty("customFields"))
89342
89368
  writer.uint32(/* id 21, wireType 2 =*/170).string(message.customFields);
89369
+ if (message.offerings != null && message.offerings.length) {
89370
+ writer.uint32(/* id 22, wireType 2 =*/178).fork();
89371
+ for (var i = 0; i < message.offerings.length; ++i)
89372
+ writer.int32(message.offerings[i]);
89373
+ writer.ldelim();
89374
+ }
89343
89375
  return writer;
89344
89376
  };
89345
89377
 
@@ -89428,6 +89460,16 @@ $root.ElfRecordPresent = (function() {
89428
89460
  case 21:
89429
89461
  message.customFields = reader.string();
89430
89462
  break;
89463
+ case 22:
89464
+ if (!(message.offerings && message.offerings.length))
89465
+ message.offerings = [];
89466
+ if ((tag & 7) === 2) {
89467
+ var end2 = reader.uint32() + reader.pos;
89468
+ while (reader.pos < end2)
89469
+ message.offerings.push(reader.int32());
89470
+ } else
89471
+ message.offerings.push(reader.int32());
89472
+ break;
89431
89473
  case 18:
89432
89474
  message.isDryRun = reader.bool();
89433
89475
  break;
@@ -89531,6 +89573,19 @@ $root.ElfRecordPresent = (function() {
89531
89573
  if (message.customFields != null && message.hasOwnProperty("customFields"))
89532
89574
  if (!$util.isString(message.customFields))
89533
89575
  return "customFields: string expected";
89576
+ if (message.offerings != null && message.hasOwnProperty("offerings")) {
89577
+ if (!Array.isArray(message.offerings))
89578
+ return "offerings: array expected";
89579
+ for (var i = 0; i < message.offerings.length; ++i)
89580
+ switch (message.offerings[i]) {
89581
+ default:
89582
+ return "offerings: enum value[] expected";
89583
+ case 0:
89584
+ case 1:
89585
+ case 2:
89586
+ break;
89587
+ }
89588
+ }
89534
89589
  if (message.isDryRun != null && message.hasOwnProperty("isDryRun"))
89535
89590
  if (typeof message.isDryRun !== "boolean")
89536
89591
  return "isDryRun: boolean expected";
@@ -89606,6 +89661,27 @@ $root.ElfRecordPresent = (function() {
89606
89661
  message.language = String(object.language);
89607
89662
  if (object.customFields != null)
89608
89663
  message.customFields = String(object.customFields);
89664
+ if (object.offerings) {
89665
+ if (!Array.isArray(object.offerings))
89666
+ throw TypeError(".ElfRecordPresent.offerings: array expected");
89667
+ message.offerings = [];
89668
+ for (var i = 0; i < object.offerings.length; ++i)
89669
+ switch (object.offerings[i]) {
89670
+ default:
89671
+ case "SUBSCRIPTION_OFFERING_UNKNOWN":
89672
+ case 0:
89673
+ message.offerings[i] = 0;
89674
+ break;
89675
+ case "SUBSCRIPTION_OFFERING_HEADSPACE":
89676
+ case 1:
89677
+ message.offerings[i] = 1;
89678
+ break;
89679
+ case "SUBSCRIPTION_OFFERING_GINGER":
89680
+ case 2:
89681
+ message.offerings[i] = 2;
89682
+ break;
89683
+ }
89684
+ }
89609
89685
  if (object.isDryRun != null)
89610
89686
  message.isDryRun = Boolean(object.isDryRun);
89611
89687
  if (object.gingerShouldProcess != null)
@@ -89628,6 +89704,8 @@ $root.ElfRecordPresent = (function() {
89628
89704
  if (!options)
89629
89705
  options = {};
89630
89706
  var object = {};
89707
+ if (options.arrays || options.defaults)
89708
+ object.offerings = [];
89631
89709
  if (options.defaults) {
89632
89710
  object.headspaceHealthOrgId = "";
89633
89711
  object.b2bOrgId = "";
@@ -89700,6 +89778,11 @@ $root.ElfRecordPresent = (function() {
89700
89778
  object.headspaceShouldProcess = message.headspaceShouldProcess;
89701
89779
  if (message.customFields != null && message.hasOwnProperty("customFields"))
89702
89780
  object.customFields = message.customFields;
89781
+ if (message.offerings && message.offerings.length) {
89782
+ object.offerings = [];
89783
+ for (var j = 0; j < message.offerings.length; ++j)
89784
+ object.offerings[j] = options.enums === String ? $root.b2b.SubscriptionOffering[message.offerings[j]] : message.offerings[j];
89785
+ }
89703
89786
  return object;
89704
89787
  };
89705
89788
 
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.398.0"
19
+ "version": "1.399.0"
20
20
  }