@sellout/models 0.0.364 → 0.0.366

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.
Files changed (93) hide show
  1. package/.dist/graphql/mutations/createEvent.mutation.js +5 -1
  2. package/.dist/graphql/mutations/createEvent.mutation.js.map +1 -1
  3. package/.dist/graphql/mutations/createSeason.mutation.js +5 -1
  4. package/.dist/graphql/mutations/createSeason.mutation.js.map +1 -1
  5. package/.dist/graphql/mutations/duplicateEvent.mutation.js +5 -1
  6. package/.dist/graphql/mutations/duplicateEvent.mutation.js.map +1 -1
  7. package/.dist/graphql/mutations/publishEvent.mutation.js +5 -1
  8. package/.dist/graphql/mutations/publishEvent.mutation.js.map +1 -1
  9. package/.dist/graphql/mutations/publishSeason.mutation.js +5 -1
  10. package/.dist/graphql/mutations/publishSeason.mutation.js.map +1 -1
  11. package/.dist/graphql/mutations/updateEvent.mutation.js +5 -1
  12. package/.dist/graphql/mutations/updateEvent.mutation.js.map +1 -1
  13. package/.dist/graphql/mutations/updateSeason.mutation.js +5 -1
  14. package/.dist/graphql/mutations/updateSeason.mutation.js.map +1 -1
  15. package/.dist/graphql/mutations/uploadFiles.mutation.js +2 -2
  16. package/.dist/graphql/queries/DuplicateUrlStubUniqueness.query.d.ts +2 -0
  17. package/.dist/graphql/queries/DuplicateUrlStubUniqueness.query.js +11 -0
  18. package/.dist/graphql/queries/DuplicateUrlStubUniqueness.query.js.map +1 -0
  19. package/.dist/graphql/queries/customerOrders.query.js +5 -1
  20. package/.dist/graphql/queries/customerOrders.query.js.map +1 -1
  21. package/.dist/graphql/queries/event.query.js +5 -1
  22. package/.dist/graphql/queries/event.query.js.map +1 -1
  23. package/.dist/graphql/queries/events.query.js +5 -1
  24. package/.dist/graphql/queries/events.query.js.map +1 -1
  25. package/.dist/graphql/queries/eventsAdminCalender.query.js +5 -1
  26. package/.dist/graphql/queries/eventsAdminCalender.query.js.map +1 -1
  27. package/.dist/graphql/queries/order.query.js +10 -2
  28. package/.dist/graphql/queries/order.query.js.map +1 -1
  29. package/.dist/graphql/queries/orders.query.js +10 -2
  30. package/.dist/graphql/queries/orders.query.js.map +1 -1
  31. package/.dist/graphql/queries/publicEvent.query.js +5 -1
  32. package/.dist/graphql/queries/publicEvent.query.js.map +1 -1
  33. package/.dist/graphql/queries/publicSeason.query.js +5 -1
  34. package/.dist/graphql/queries/publicSeason.query.js.map +1 -1
  35. package/.dist/graphql/queries/season.query.js +5 -1
  36. package/.dist/graphql/queries/season.query.js.map +1 -1
  37. package/.dist/graphql/queries/seasons.query.js +5 -1
  38. package/.dist/graphql/queries/seasons.query.js.map +1 -1
  39. package/.dist/graphql/queries/waitList.query.js +5 -1
  40. package/.dist/graphql/queries/waitList.query.js.map +1 -1
  41. package/.dist/interfaces/IEvent.d.ts +2 -1
  42. package/.dist/interfaces/IEvent.js.map +1 -1
  43. package/.dist/interfaces/IEventPosterUrl.d.ts +5 -0
  44. package/.dist/interfaces/IEventPosterUrl.js +3 -0
  45. package/.dist/interfaces/IEventPosterUrl.js.map +1 -0
  46. package/.dist/interfaces/ISeason.d.ts +2 -1
  47. package/.dist/interfaces/ISeason.js.map +1 -1
  48. package/.dist/interfaces/ISeasonPosterUrl.d.ts +5 -0
  49. package/.dist/interfaces/ISeasonPosterUrl.js +3 -0
  50. package/.dist/interfaces/ISeasonPosterUrl.js.map +1 -0
  51. package/.dist/schemas/Event.d.ts +12 -2
  52. package/.dist/schemas/Event.js +15 -4
  53. package/.dist/schemas/Event.js.map +1 -1
  54. package/.dist/schemas/Season.d.ts +12 -2
  55. package/.dist/schemas/Season.js +15 -4
  56. package/.dist/schemas/Season.js.map +1 -1
  57. package/.dist/sellout-proto.js +867 -48
  58. package/.dist/utils/EventUtil.js +16 -6
  59. package/.dist/utils/EventUtil.js.map +1 -1
  60. package/.dist/utils/SeasonUtil.js +15 -5
  61. package/.dist/utils/SeasonUtil.js.map +1 -1
  62. package/package.json +3 -3
  63. package/src/graphql/mutations/createEvent.mutation.ts +5 -1
  64. package/src/graphql/mutations/createSeason.mutation.ts +5 -1
  65. package/src/graphql/mutations/duplicateEvent.mutation.ts +5 -1
  66. package/src/graphql/mutations/publishEvent.mutation.ts +5 -1
  67. package/src/graphql/mutations/publishSeason.mutation.ts +5 -1
  68. package/src/graphql/mutations/updateEvent.mutation.ts +5 -1
  69. package/src/graphql/mutations/updateSeason.mutation.ts +5 -1
  70. package/src/graphql/mutations/uploadFiles.mutation.ts +2 -2
  71. package/src/graphql/queries/DuplicateUrlStubUniqueness.query.ts +10 -0
  72. package/src/graphql/queries/customerOrders.query.ts +5 -1
  73. package/src/graphql/queries/event.query.ts +5 -1
  74. package/src/graphql/queries/events.query.ts +5 -1
  75. package/src/graphql/queries/eventsAdminCalender.query.ts +5 -1
  76. package/src/graphql/queries/order.query.ts +10 -2
  77. package/src/graphql/queries/orders.query.ts +10 -2
  78. package/src/graphql/queries/publicEvent.query.ts +5 -1
  79. package/src/graphql/queries/publicSeason.query.ts +5 -1
  80. package/src/graphql/queries/season.query.ts +5 -1
  81. package/src/graphql/queries/seasons.query.ts +5 -1
  82. package/src/graphql/queries/waitList.query.ts +5 -1
  83. package/src/interfaces/IEvent.ts +2 -1
  84. package/src/interfaces/IEventPosterUrl.ts +5 -0
  85. package/src/interfaces/ISeason.ts +2 -2
  86. package/src/interfaces/ISeasonPosterUrl.ts +5 -0
  87. package/src/proto/event.proto +21 -3
  88. package/src/proto/file-upload.proto +1 -0
  89. package/src/proto/season.proto +2 -2
  90. package/src/schemas/Event.ts +16 -4
  91. package/src/schemas/Season.ts +15 -4
  92. package/src/utils/EventUtil.ts +16 -6
  93. package/src/utils/SeasonUtil.ts +16 -5
@@ -13,6 +13,7 @@ import IAnalytics from "./IAnalytics";
13
13
  import IFee from "./IFee";
14
14
  import IVenue from "./IVenue";
15
15
  import IEvent from "./IEvent";
16
+ import ISeasonPosterUrl from "./ISeasonPosterUrl";
16
17
 
17
18
  // export enum SeasonTypeEnum {
18
19
  // GeneralEvent = "General Event", // TODO // BACKFILL
@@ -47,11 +48,10 @@ export enum SeasonTypeEnum {
47
48
  export default interface ISeason {
48
49
  _id?: string;
49
50
  orgId: string;
50
- //type: SeasonTypeEnum;
51
51
  name?: string;
52
52
  subtitle?: string;
53
53
  description?: string;
54
- posterImageUrl?: string;
54
+ posterImageUrl?: ISeasonPosterUrl;
55
55
  venueId?: string;
56
56
  createdAt: number;
57
57
  publishable?: boolean;
@@ -0,0 +1,5 @@
1
+ export default interface ISeasonPosterUrl {
2
+ original: string;
3
+ medium: string;
4
+ small: string;
5
+ }
@@ -12,7 +12,7 @@ message Event {
12
12
  string name = 4;
13
13
  string subtitle = 5;
14
14
  string description = 6;
15
- string posterImageUrl = 7;
15
+ PosterImageUrl posterImageUrl = 7;
16
16
  string venueId = 8;
17
17
  int32 createdAt = 9;
18
18
  bool publishable = 10;
@@ -59,7 +59,7 @@ message PublicEvent {
59
59
  string name = 4;
60
60
  string subtitle = 5;
61
61
  string description = 6;
62
- string posterImageUrl = 7;
62
+ PosterImageUrl posterImageUrl = 7;
63
63
  string venueId = 8;
64
64
  int32 createdAt = 9;
65
65
  bool publishable = 10;
@@ -102,7 +102,7 @@ message PublicEventDetails {
102
102
  string name = 4;
103
103
  string subtitle = 5;
104
104
  string description = 6;
105
- string posterImageUrl = 7;
105
+ PosterImageUrl posterImageUrl = 7;
106
106
  string venueId = 8;
107
107
  int32 createdAt = 9;
108
108
  bool publishable = 10;
@@ -710,6 +710,23 @@ message ClearExpiredEventQrCodesResponse {
710
710
  int32 cleared = 3;
711
711
  }
712
712
 
713
+ message PosterImageUrl {
714
+ string original = 0;
715
+ string medium = 1;
716
+ string small = 2;
717
+ }
718
+
719
+ message CheckStubUniquenessRequest {
720
+ string spanContext = 1;
721
+ string stub = 2;
722
+ }
723
+
724
+ message CheckStubUniquenessResponse {
725
+ StatusCode status = 1;
726
+ repeated Error errors = 2;
727
+ bool isUnique = 3;
728
+ }
729
+
713
730
  service EventService {
714
731
  // Create
715
732
  rpc createEvent(CreateEventRequest) returns (CreateEventResponse) {}
@@ -765,4 +782,5 @@ service EventService {
765
782
  rpc clearExpiredEventQrCodes(ClearExpiredEventQrCodesRequest) returns (ClearExpiredEventQrCodesResponse) {}
766
783
  rpc generateEventQRCode(GenerateEventQRCodeRequest) returns (GenerateEventQRCodeResponse) {}
767
784
  rpc queryEventsAdmin(QueryEventsRequest) returns (QueryEventsResponse) {}
785
+ rpc checkStubUniqueness(CheckStubUniquenessRequest) returns (CheckStubUniquenessResponse) {}
768
786
  }
@@ -14,6 +14,7 @@ message UploadFileRequest {
14
14
  repeated File files = 2;
15
15
  string userId = 3;
16
16
  bool gzip = 4;
17
+ bool isMultiImage = 5;
17
18
  }
18
19
 
19
20
  message UploadFileResponse {
@@ -3,7 +3,7 @@ import "error.proto";
3
3
  import "common.proto";
4
4
  import "organization.proto";
5
5
  import "venue.proto";
6
-
6
+ import "event.proto";
7
7
 
8
8
  message CreateSeasonRequest {
9
9
  string spanContext = 0;
@@ -54,7 +54,7 @@ message FindSeasonDetailsResponse {
54
54
  string name = 4;
55
55
  string subtitle = 5;
56
56
  string description = 6;
57
- string posterImageUrl = 7;
57
+ PosterImageUrl posterImageUrl = 7;
58
58
  string venueId = 8;
59
59
  int32 createdAt = 9;
60
60
  bool publishable = 10;
@@ -502,6 +502,21 @@ const WaitList = {
502
502
  },
503
503
  };
504
504
 
505
+ const PosterImageUrl = {
506
+ original: {
507
+ type: String,
508
+ required: false,
509
+ },
510
+ medium: {
511
+ type: String,
512
+ required: false,
513
+ },
514
+ small: {
515
+ type: String,
516
+ required: false,
517
+ },
518
+ };
519
+
505
520
  export default {
506
521
  _id: {
507
522
  type: String,
@@ -527,10 +542,7 @@ export default {
527
542
  type: String,
528
543
  required: false
529
544
  },
530
- posterImageUrl: {
531
- type: String,
532
- required: false
533
- },
545
+ posterImageUrl: PosterImageUrl,
534
546
  venueId: {
535
547
  type: String,
536
548
  required: false
@@ -399,6 +399,20 @@ const TicketType = {
399
399
  ]
400
400
  };
401
401
 
402
+ const PosterImageUrl = {
403
+ original: {
404
+ type: String,
405
+ required: false,
406
+ },
407
+ medium: {
408
+ type: String,
409
+ required: false,
410
+ },
411
+ small: {
412
+ type: String,
413
+ required: false,
414
+ },
415
+ };
402
416
 
403
417
  export default {
404
418
  _id: {
@@ -425,10 +439,7 @@ export default {
425
439
  type: String,
426
440
  required: false
427
441
  },
428
- posterImageUrl: {
429
- type: String,
430
- required: false
431
- },
442
+ posterImageUrl: PosterImageUrl,
432
443
  venueId: {
433
444
  type: String,
434
445
  required: false
@@ -476,6 +476,20 @@ export default {
476
476
  ****************************************************************************************/
477
477
  validatePublish(event: IEvent): any {
478
478
  let eventSchema;
479
+ const posterImageUrlSchema = Joi.object({
480
+ original: Joi.string().required().messages({
481
+ "string.empty": '"Event image" is a required field',
482
+ "any.required": '"Event image" is a required field',
483
+ }),
484
+ medium: Joi.string().allow('', null).optional(),
485
+ small: Joi.string().allow('', null).optional(),
486
+ })
487
+ .unknown(true)
488
+ .required()
489
+ .messages({
490
+ "any.required": '"Event image" is a required field',
491
+ "object.base": '"Event image" is a required field', // handles case when it's not an object
492
+ });
479
493
 
480
494
  switch (event.type) {
481
495
  case EventTypeEnum.GeneralEvent:
@@ -488,9 +502,7 @@ export default {
488
502
  description: Joi.string().required().messages({
489
503
  "string.empty": '"Event description" is a required field',
490
504
  }),
491
- posterImageUrl: Joi.string().required().messages({
492
- "string.empty": '"Event image" is a required field',
493
- }),
505
+ posterImageUrl: posterImageUrlSchema,
494
506
  venueId: Joi.string()
495
507
  .required()
496
508
  .messages({ "string.empty": '"Venue" is required' }),
@@ -530,9 +542,7 @@ export default {
530
542
  description: Joi.string().required().messages({
531
543
  "string.empty": '"Event description" is a required field',
532
544
  }),
533
- posterImageUrl: Joi.string().required().messages({
534
- "string.empty": '"Event image" is a required field',
535
- }),
545
+ posterImageUrl: posterImageUrlSchema,
536
546
  venueId: Joi.string()
537
547
  .required()
538
548
  .messages({ "string.empty": '"Venue" is required' }),
@@ -168,8 +168,21 @@ export default {
168
168
  // ****************************************************************************************/
169
169
  validatePublish(season: ISeason): any {
170
170
  let seasonSchema;
171
- // switch (season.type) {
172
- // case SeasonTypeEnum.GeneralEvent:
171
+ const posterImageUrlSchema = Joi.object({
172
+ original: Joi.string().required().messages({
173
+ "string.empty": '"Season image" is a required field',
174
+ "any.required": '"Season image" is a required field',
175
+ }),
176
+ medium: Joi.string().allow('', null).optional(),
177
+ small: Joi.string().allow('', null).optional(),
178
+ })
179
+ .unknown(true)
180
+ .required()
181
+ .messages({
182
+ "any.required": '"Season image" is a required field',
183
+ "object.base": '"Season image" is a required field', // handles case when it's not an object
184
+ });
185
+
173
186
  seasonSchema = Joi.object()
174
187
  .options({ abortEarly: false })
175
188
  .keys({
@@ -179,9 +192,7 @@ export default {
179
192
  description: Joi.string().required().messages({
180
193
  "string.empty": '"Season description" is a required field',
181
194
  }),
182
- posterImageUrl: Joi.string().required().messages({
183
- "string.empty": '"Season image" is a required field',
184
- }),
195
+ posterImageUrl: posterImageUrlSchema,
185
196
  venueId: Joi.string()
186
197
  .required()
187
198
  .messages({ "string.empty": '"Venue" is required' }),