@sellout/models 0.0.227 → 0.0.230

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.
@@ -46593,6 +46593,8 @@ $root.PublicEvent = (function() {
46593
46593
  * @property {string|null} [venueTimezone] PublicEvent venueTimezone
46594
46594
  * @property {number|null} [announceAt] PublicEvent announceAt
46595
46595
  * @property {string|null} [stub] PublicEvent stub
46596
+ * @property {IEventSchedule|null} [schedule] PublicEvent schedule
46597
+ * @property {Array.<IEventTaskTypes>|null} [ticketTypes] PublicEvent ticketTypes
46596
46598
  */
46597
46599
 
46598
46600
  /**
@@ -46604,6 +46606,7 @@ $root.PublicEvent = (function() {
46604
46606
  * @param {IPublicEvent=} [properties] Properties to set
46605
46607
  */
46606
46608
  function PublicEvent(properties) {
46609
+ this.ticketTypes = [];
46607
46610
  if (properties)
46608
46611
  for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
46609
46612
  if (properties[keys[i]] != null)
@@ -46834,6 +46837,22 @@ $root.PublicEvent = (function() {
46834
46837
  */
46835
46838
  PublicEvent.prototype.stub = "";
46836
46839
 
46840
+ /**
46841
+ * PublicEvent schedule.
46842
+ * @member {IEventSchedule|null|undefined} schedule
46843
+ * @memberof PublicEvent
46844
+ * @instance
46845
+ */
46846
+ PublicEvent.prototype.schedule = null;
46847
+
46848
+ /**
46849
+ * PublicEvent ticketTypes.
46850
+ * @member {Array.<IEventTaskTypes>} ticketTypes
46851
+ * @memberof PublicEvent
46852
+ * @instance
46853
+ */
46854
+ PublicEvent.prototype.ticketTypes = $util.emptyArray;
46855
+
46837
46856
  /**
46838
46857
  * Creates a new PublicEvent instance using the specified properties.
46839
46858
  * @function create
@@ -46914,6 +46933,11 @@ $root.PublicEvent = (function() {
46914
46933
  writer.uint32(/* id 27, wireType 0 =*/216).int32(message.announceAt);
46915
46934
  if (message.stub != null && Object.hasOwnProperty.call(message, "stub"))
46916
46935
  writer.uint32(/* id 28, wireType 2 =*/226).string(message.stub);
46936
+ if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule"))
46937
+ $root.EventSchedule.encode(message.schedule, writer.uint32(/* id 29, wireType 2 =*/234).fork()).ldelim();
46938
+ if (message.ticketTypes != null && message.ticketTypes.length)
46939
+ for (var i = 0; i < message.ticketTypes.length; ++i)
46940
+ $root.EventTaskTypes.encode(message.ticketTypes[i], writer.uint32(/* id 30, wireType 2 =*/242).fork()).ldelim();
46917
46941
  return writer;
46918
46942
  };
46919
46943
 
@@ -47032,6 +47056,14 @@ $root.PublicEvent = (function() {
47032
47056
  case 28:
47033
47057
  message.stub = reader.string();
47034
47058
  break;
47059
+ case 29:
47060
+ message.schedule = $root.EventSchedule.decode(reader, reader.uint32());
47061
+ break;
47062
+ case 30:
47063
+ if (!(message.ticketTypes && message.ticketTypes.length))
47064
+ message.ticketTypes = [];
47065
+ message.ticketTypes.push($root.EventTaskTypes.decode(reader, reader.uint32()));
47066
+ break;
47035
47067
  default:
47036
47068
  reader.skipType(tag & 7);
47037
47069
  break;
@@ -47153,6 +47185,20 @@ $root.PublicEvent = (function() {
47153
47185
  if (message.stub != null && message.hasOwnProperty("stub"))
47154
47186
  if (!$util.isString(message.stub))
47155
47187
  return "stub: string expected";
47188
+ if (message.schedule != null && message.hasOwnProperty("schedule")) {
47189
+ var error = $root.EventSchedule.verify(message.schedule);
47190
+ if (error)
47191
+ return "schedule." + error;
47192
+ }
47193
+ if (message.ticketTypes != null && message.hasOwnProperty("ticketTypes")) {
47194
+ if (!Array.isArray(message.ticketTypes))
47195
+ return "ticketTypes: array expected";
47196
+ for (var i = 0; i < message.ticketTypes.length; ++i) {
47197
+ var error = $root.EventTaskTypes.verify(message.ticketTypes[i]);
47198
+ if (error)
47199
+ return "ticketTypes." + error;
47200
+ }
47201
+ }
47156
47202
  return null;
47157
47203
  };
47158
47204
 
@@ -47227,6 +47273,21 @@ $root.PublicEvent = (function() {
47227
47273
  message.announceAt = object.announceAt | 0;
47228
47274
  if (object.stub != null)
47229
47275
  message.stub = String(object.stub);
47276
+ if (object.schedule != null) {
47277
+ if (typeof object.schedule !== "object")
47278
+ throw TypeError(".PublicEvent.schedule: object expected");
47279
+ message.schedule = $root.EventSchedule.fromObject(object.schedule);
47280
+ }
47281
+ if (object.ticketTypes) {
47282
+ if (!Array.isArray(object.ticketTypes))
47283
+ throw TypeError(".PublicEvent.ticketTypes: array expected");
47284
+ message.ticketTypes = [];
47285
+ for (var i = 0; i < object.ticketTypes.length; ++i) {
47286
+ if (typeof object.ticketTypes[i] !== "object")
47287
+ throw TypeError(".PublicEvent.ticketTypes: object expected");
47288
+ message.ticketTypes[i] = $root.EventTaskTypes.fromObject(object.ticketTypes[i]);
47289
+ }
47290
+ }
47230
47291
  return message;
47231
47292
  };
47232
47293
 
@@ -47243,6 +47304,8 @@ $root.PublicEvent = (function() {
47243
47304
  if (!options)
47244
47305
  options = {};
47245
47306
  var object = {};
47307
+ if (options.arrays || options.defaults)
47308
+ object.ticketTypes = [];
47246
47309
  if (options.defaults) {
47247
47310
  object._id = "";
47248
47311
  object.orgId = "";
@@ -47272,6 +47335,7 @@ $root.PublicEvent = (function() {
47272
47335
  object.venueTimezone = "";
47273
47336
  object.announceAt = 0;
47274
47337
  object.stub = "";
47338
+ object.schedule = null;
47275
47339
  }
47276
47340
  if (message._id != null && message.hasOwnProperty("_id"))
47277
47341
  object._id = message._id;
@@ -47329,6 +47393,13 @@ $root.PublicEvent = (function() {
47329
47393
  object.announceAt = message.announceAt;
47330
47394
  if (message.stub != null && message.hasOwnProperty("stub"))
47331
47395
  object.stub = message.stub;
47396
+ if (message.schedule != null && message.hasOwnProperty("schedule"))
47397
+ object.schedule = $root.EventSchedule.toObject(message.schedule, options);
47398
+ if (message.ticketTypes && message.ticketTypes.length) {
47399
+ object.ticketTypes = [];
47400
+ for (var j = 0; j < message.ticketTypes.length; ++j)
47401
+ object.ticketTypes[j] = $root.EventTaskTypes.toObject(message.ticketTypes[j], options);
47402
+ }
47332
47403
  return object;
47333
47404
  };
47334
47405
 
@@ -47346,6 +47417,282 @@ $root.PublicEvent = (function() {
47346
47417
  return PublicEvent;
47347
47418
  })();
47348
47419
 
47420
+ $root.EventTaskTypes = (function() {
47421
+
47422
+ /**
47423
+ * Properties of an EventTaskTypes.
47424
+ * @exports IEventTaskTypes
47425
+ * @interface IEventTaskTypes
47426
+ * @property {string|null} [name] EventTaskTypes name
47427
+ * @property {number|null} [purchaseLimit] EventTaskTypes purchaseLimit
47428
+ * @property {number|null} [value] EventTaskTypes value
47429
+ * @property {number|null} [price] EventTaskTypes price
47430
+ * @property {boolean|null} [ticketsAvailable] EventTaskTypes ticketsAvailable
47431
+ */
47432
+
47433
+ /**
47434
+ * Constructs a new EventTaskTypes.
47435
+ * @exports EventTaskTypes
47436
+ * @classdesc Represents an EventTaskTypes.
47437
+ * @implements IEventTaskTypes
47438
+ * @constructor
47439
+ * @param {IEventTaskTypes=} [properties] Properties to set
47440
+ */
47441
+ function EventTaskTypes(properties) {
47442
+ if (properties)
47443
+ for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
47444
+ if (properties[keys[i]] != null)
47445
+ this[keys[i]] = properties[keys[i]];
47446
+ }
47447
+
47448
+ /**
47449
+ * EventTaskTypes name.
47450
+ * @member {string} name
47451
+ * @memberof EventTaskTypes
47452
+ * @instance
47453
+ */
47454
+ EventTaskTypes.prototype.name = "";
47455
+
47456
+ /**
47457
+ * EventTaskTypes purchaseLimit.
47458
+ * @member {number} purchaseLimit
47459
+ * @memberof EventTaskTypes
47460
+ * @instance
47461
+ */
47462
+ EventTaskTypes.prototype.purchaseLimit = 0;
47463
+
47464
+ /**
47465
+ * EventTaskTypes value.
47466
+ * @member {number} value
47467
+ * @memberof EventTaskTypes
47468
+ * @instance
47469
+ */
47470
+ EventTaskTypes.prototype.value = 0;
47471
+
47472
+ /**
47473
+ * EventTaskTypes price.
47474
+ * @member {number} price
47475
+ * @memberof EventTaskTypes
47476
+ * @instance
47477
+ */
47478
+ EventTaskTypes.prototype.price = 0;
47479
+
47480
+ /**
47481
+ * EventTaskTypes ticketsAvailable.
47482
+ * @member {boolean} ticketsAvailable
47483
+ * @memberof EventTaskTypes
47484
+ * @instance
47485
+ */
47486
+ EventTaskTypes.prototype.ticketsAvailable = false;
47487
+
47488
+ /**
47489
+ * Creates a new EventTaskTypes instance using the specified properties.
47490
+ * @function create
47491
+ * @memberof EventTaskTypes
47492
+ * @static
47493
+ * @param {IEventTaskTypes=} [properties] Properties to set
47494
+ * @returns {EventTaskTypes} EventTaskTypes instance
47495
+ */
47496
+ EventTaskTypes.create = function create(properties) {
47497
+ return new EventTaskTypes(properties);
47498
+ };
47499
+
47500
+ /**
47501
+ * Encodes the specified EventTaskTypes message. Does not implicitly {@link EventTaskTypes.verify|verify} messages.
47502
+ * @function encode
47503
+ * @memberof EventTaskTypes
47504
+ * @static
47505
+ * @param {IEventTaskTypes} message EventTaskTypes message or plain object to encode
47506
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47507
+ * @returns {$protobuf.Writer} Writer
47508
+ */
47509
+ EventTaskTypes.encode = function encode(message, writer) {
47510
+ if (!writer)
47511
+ writer = $Writer.create();
47512
+ if (message.name != null && Object.hasOwnProperty.call(message, "name"))
47513
+ writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
47514
+ if (message.purchaseLimit != null && Object.hasOwnProperty.call(message, "purchaseLimit"))
47515
+ writer.uint32(/* id 2, wireType 0 =*/16).int32(message.purchaseLimit);
47516
+ if (message.value != null && Object.hasOwnProperty.call(message, "value"))
47517
+ writer.uint32(/* id 3, wireType 0 =*/24).int32(message.value);
47518
+ if (message.price != null && Object.hasOwnProperty.call(message, "price"))
47519
+ writer.uint32(/* id 4, wireType 0 =*/32).int32(message.price);
47520
+ if (message.ticketsAvailable != null && Object.hasOwnProperty.call(message, "ticketsAvailable"))
47521
+ writer.uint32(/* id 5, wireType 0 =*/40).bool(message.ticketsAvailable);
47522
+ return writer;
47523
+ };
47524
+
47525
+ /**
47526
+ * Encodes the specified EventTaskTypes message, length delimited. Does not implicitly {@link EventTaskTypes.verify|verify} messages.
47527
+ * @function encodeDelimited
47528
+ * @memberof EventTaskTypes
47529
+ * @static
47530
+ * @param {IEventTaskTypes} message EventTaskTypes message or plain object to encode
47531
+ * @param {$protobuf.Writer} [writer] Writer to encode to
47532
+ * @returns {$protobuf.Writer} Writer
47533
+ */
47534
+ EventTaskTypes.encodeDelimited = function encodeDelimited(message, writer) {
47535
+ return this.encode(message, writer).ldelim();
47536
+ };
47537
+
47538
+ /**
47539
+ * Decodes an EventTaskTypes message from the specified reader or buffer.
47540
+ * @function decode
47541
+ * @memberof EventTaskTypes
47542
+ * @static
47543
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47544
+ * @param {number} [length] Message length if known beforehand
47545
+ * @returns {EventTaskTypes} EventTaskTypes
47546
+ * @throws {Error} If the payload is not a reader or valid buffer
47547
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47548
+ */
47549
+ EventTaskTypes.decode = function decode(reader, length) {
47550
+ if (!(reader instanceof $Reader))
47551
+ reader = $Reader.create(reader);
47552
+ var end = length === undefined ? reader.len : reader.pos + length, message = new $root.EventTaskTypes();
47553
+ while (reader.pos < end) {
47554
+ var tag = reader.uint32();
47555
+ switch (tag >>> 3) {
47556
+ case 1:
47557
+ message.name = reader.string();
47558
+ break;
47559
+ case 2:
47560
+ message.purchaseLimit = reader.int32();
47561
+ break;
47562
+ case 3:
47563
+ message.value = reader.int32();
47564
+ break;
47565
+ case 4:
47566
+ message.price = reader.int32();
47567
+ break;
47568
+ case 5:
47569
+ message.ticketsAvailable = reader.bool();
47570
+ break;
47571
+ default:
47572
+ reader.skipType(tag & 7);
47573
+ break;
47574
+ }
47575
+ }
47576
+ return message;
47577
+ };
47578
+
47579
+ /**
47580
+ * Decodes an EventTaskTypes message from the specified reader or buffer, length delimited.
47581
+ * @function decodeDelimited
47582
+ * @memberof EventTaskTypes
47583
+ * @static
47584
+ * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
47585
+ * @returns {EventTaskTypes} EventTaskTypes
47586
+ * @throws {Error} If the payload is not a reader or valid buffer
47587
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
47588
+ */
47589
+ EventTaskTypes.decodeDelimited = function decodeDelimited(reader) {
47590
+ if (!(reader instanceof $Reader))
47591
+ reader = new $Reader(reader);
47592
+ return this.decode(reader, reader.uint32());
47593
+ };
47594
+
47595
+ /**
47596
+ * Verifies an EventTaskTypes message.
47597
+ * @function verify
47598
+ * @memberof EventTaskTypes
47599
+ * @static
47600
+ * @param {Object.<string,*>} message Plain object to verify
47601
+ * @returns {string|null} `null` if valid, otherwise the reason why it is not
47602
+ */
47603
+ EventTaskTypes.verify = function verify(message) {
47604
+ if (typeof message !== "object" || message === null)
47605
+ return "object expected";
47606
+ if (message.name != null && message.hasOwnProperty("name"))
47607
+ if (!$util.isString(message.name))
47608
+ return "name: string expected";
47609
+ if (message.purchaseLimit != null && message.hasOwnProperty("purchaseLimit"))
47610
+ if (!$util.isInteger(message.purchaseLimit))
47611
+ return "purchaseLimit: integer expected";
47612
+ if (message.value != null && message.hasOwnProperty("value"))
47613
+ if (!$util.isInteger(message.value))
47614
+ return "value: integer expected";
47615
+ if (message.price != null && message.hasOwnProperty("price"))
47616
+ if (!$util.isInteger(message.price))
47617
+ return "price: integer expected";
47618
+ if (message.ticketsAvailable != null && message.hasOwnProperty("ticketsAvailable"))
47619
+ if (typeof message.ticketsAvailable !== "boolean")
47620
+ return "ticketsAvailable: boolean expected";
47621
+ return null;
47622
+ };
47623
+
47624
+ /**
47625
+ * Creates an EventTaskTypes message from a plain object. Also converts values to their respective internal types.
47626
+ * @function fromObject
47627
+ * @memberof EventTaskTypes
47628
+ * @static
47629
+ * @param {Object.<string,*>} object Plain object
47630
+ * @returns {EventTaskTypes} EventTaskTypes
47631
+ */
47632
+ EventTaskTypes.fromObject = function fromObject(object) {
47633
+ if (object instanceof $root.EventTaskTypes)
47634
+ return object;
47635
+ var message = new $root.EventTaskTypes();
47636
+ if (object.name != null)
47637
+ message.name = String(object.name);
47638
+ if (object.purchaseLimit != null)
47639
+ message.purchaseLimit = object.purchaseLimit | 0;
47640
+ if (object.value != null)
47641
+ message.value = object.value | 0;
47642
+ if (object.price != null)
47643
+ message.price = object.price | 0;
47644
+ if (object.ticketsAvailable != null)
47645
+ message.ticketsAvailable = Boolean(object.ticketsAvailable);
47646
+ return message;
47647
+ };
47648
+
47649
+ /**
47650
+ * Creates a plain object from an EventTaskTypes message. Also converts values to other types if specified.
47651
+ * @function toObject
47652
+ * @memberof EventTaskTypes
47653
+ * @static
47654
+ * @param {EventTaskTypes} message EventTaskTypes
47655
+ * @param {$protobuf.IConversionOptions} [options] Conversion options
47656
+ * @returns {Object.<string,*>} Plain object
47657
+ */
47658
+ EventTaskTypes.toObject = function toObject(message, options) {
47659
+ if (!options)
47660
+ options = {};
47661
+ var object = {};
47662
+ if (options.defaults) {
47663
+ object.name = "";
47664
+ object.purchaseLimit = 0;
47665
+ object.value = 0;
47666
+ object.price = 0;
47667
+ object.ticketsAvailable = false;
47668
+ }
47669
+ if (message.name != null && message.hasOwnProperty("name"))
47670
+ object.name = message.name;
47671
+ if (message.purchaseLimit != null && message.hasOwnProperty("purchaseLimit"))
47672
+ object.purchaseLimit = message.purchaseLimit;
47673
+ if (message.value != null && message.hasOwnProperty("value"))
47674
+ object.value = message.value;
47675
+ if (message.price != null && message.hasOwnProperty("price"))
47676
+ object.price = message.price;
47677
+ if (message.ticketsAvailable != null && message.hasOwnProperty("ticketsAvailable"))
47678
+ object.ticketsAvailable = message.ticketsAvailable;
47679
+ return object;
47680
+ };
47681
+
47682
+ /**
47683
+ * Converts this EventTaskTypes to JSON.
47684
+ * @function toJSON
47685
+ * @memberof EventTaskTypes
47686
+ * @instance
47687
+ * @returns {Object.<string,*>} JSON object
47688
+ */
47689
+ EventTaskTypes.prototype.toJSON = function toJSON() {
47690
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
47691
+ };
47692
+
47693
+ return EventTaskTypes;
47694
+ })();
47695
+
47349
47696
  $root.PublicEventDetails = (function() {
47350
47697
 
47351
47698
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/models",
3
- "version": "0.0.227",
3
+ "version": "0.0.230",
4
4
  "description": "Sellout.io models",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "dependencies": {
19
19
  "@hapi/joi": "^16.1.7",
20
- "@sellout/utils": "^0.0.227",
20
+ "@sellout/utils": "^0.0.230",
21
21
  "@types/hapi__joi": "^16.0.1",
22
22
  "@types/shortid": "^0.0.29",
23
23
  "apollo-link-debounce": "^2.1.0",
@@ -31,5 +31,5 @@
31
31
  "protobufjs": "^6.11.2",
32
32
  "typescript": "^4.4.2"
33
33
  },
34
- "gitHead": "bf5bb644dc046e028164af0680701c2d1dee2d44"
34
+ "gitHead": "a324ae6f08d0c2fa4f6b9e1347ee5eada18ac8a9"
35
35
  }
@@ -77,6 +77,16 @@ message PublicEvent {
77
77
  string venueTimezone = 26;
78
78
  int32 announceAt = 27;
79
79
  string stub = 28;
80
+ EventSchedule schedule = 29;
81
+ repeated EventTaskTypes ticketTypes = 30;
82
+ }
83
+
84
+ message EventTaskTypes{
85
+ string name = 1;
86
+ int32 purchaseLimit = 2;
87
+ int32 value = 3;
88
+ int32 price = 4;
89
+ bool ticketsAvailable = 5;
80
90
  }
81
91
 
82
92
  message PublicEventDetails {