@sellout/models 0.0.426 → 0.0.428

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 (45) hide show
  1. package/.dist/graphql/mutations/createTag.mutation.d.ts +2 -0
  2. package/.dist/graphql/mutations/createTag.mutation.js +15 -0
  3. package/.dist/graphql/mutations/createTag.mutation.js.map +1 -0
  4. package/.dist/graphql/mutations/deleteTag.mutation.d.ts +2 -0
  5. package/.dist/graphql/mutations/deleteTag.mutation.js +10 -0
  6. package/.dist/graphql/mutations/deleteTag.mutation.js.map +1 -0
  7. package/.dist/graphql/mutations/updateEvent.mutation.js +2 -0
  8. package/.dist/graphql/mutations/updateEvent.mutation.js.map +1 -1
  9. package/.dist/graphql/mutations/updateTag.mutation.d.ts +2 -0
  10. package/.dist/graphql/mutations/updateTag.mutation.js +15 -0
  11. package/.dist/graphql/mutations/updateTag.mutation.js.map +1 -0
  12. package/.dist/graphql/queries/event.query.js +2 -0
  13. package/.dist/graphql/queries/event.query.js.map +1 -1
  14. package/.dist/graphql/queries/events.query.js +1 -0
  15. package/.dist/graphql/queries/events.query.js.map +1 -1
  16. package/.dist/graphql/queries/eventsListOptimized.query.js +1 -0
  17. package/.dist/graphql/queries/eventsListOptimized.query.js.map +1 -1
  18. package/.dist/graphql/queries/tags.query.d.ts +2 -0
  19. package/.dist/graphql/queries/tags.query.js +15 -0
  20. package/.dist/graphql/queries/tags.query.js.map +1 -0
  21. package/.dist/interfaces/IEvent.d.ts +1 -0
  22. package/.dist/interfaces/ITag.d.ts +6 -0
  23. package/.dist/interfaces/ITag.js +3 -0
  24. package/.dist/interfaces/ITag.js.map +1 -0
  25. package/.dist/schemas/Event.d.ts +5 -0
  26. package/.dist/schemas/Event.js +5 -0
  27. package/.dist/schemas/Event.js.map +1 -1
  28. package/.dist/schemas/Tag.d.ts +20 -0
  29. package/.dist/schemas/Tag.js +26 -0
  30. package/.dist/schemas/Tag.js.map +1 -0
  31. package/.dist/sellout-proto.js +2825 -254
  32. package/package.json +3 -3
  33. package/src/graphql/mutations/createTag.mutation.ts +14 -0
  34. package/src/graphql/mutations/deleteTag.mutation.ts +9 -0
  35. package/src/graphql/mutations/updateEvent.mutation.ts +2 -0
  36. package/src/graphql/mutations/updateTag.mutation.ts +14 -0
  37. package/src/graphql/queries/event.query.ts +2 -0
  38. package/src/graphql/queries/events.query.ts +1 -0
  39. package/src/graphql/queries/eventsListOptimized.query.ts +1 -0
  40. package/src/graphql/queries/tags.query.ts +14 -0
  41. package/src/interfaces/IEvent.ts +1 -0
  42. package/src/interfaces/ITag.ts +6 -0
  43. package/src/proto/event.proto +59 -0
  44. package/src/schemas/Event.ts +5 -0
  45. package/src/schemas/Tag.ts +21 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/models",
3
- "version": "0.0.426",
3
+ "version": "0.0.428",
4
4
  "description": "Sellout.io models",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "@apollo/client": "^3.9.6",
20
20
  "@hapi/joi": "^17.1.1",
21
- "@sellout/utils": "^0.0.426",
21
+ "@sellout/utils": "^0.0.428",
22
22
  "@types/hapi__joi": "^16.0.1",
23
23
  "@types/shortid": "^0.0.29",
24
24
  "@types/zen-observable": "^0.8.7",
@@ -33,5 +33,5 @@
33
33
  "protobufjs": "^6.11.2",
34
34
  "typescript": "^4.9.5"
35
35
  },
36
- "gitHead": "b18d4f5bd2294d8ddec96fa059978b8af8c89fc8"
36
+ "gitHead": "87d220762b3a60a47737eb967c321a2cb5e50913"
37
37
  }
@@ -0,0 +1,14 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ const mutation = gql`
4
+ mutation createTag($tag: TagInput!) {
5
+ createTag(tag: $tag) {
6
+ _id
7
+ name
8
+ createdAt
9
+ updatedAt
10
+ }
11
+ }
12
+ `;
13
+
14
+ export default mutation;
@@ -0,0 +1,9 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ const mutation = gql`
4
+ mutation deleteTag($tagId: String!) {
5
+ deleteTag(tagId: $tagId)
6
+ }
7
+ `;
8
+
9
+ export default mutation;
@@ -18,6 +18,7 @@ const mutation = gql`
18
18
  medium
19
19
  small
20
20
  }
21
+ additionalPhotos
21
22
  venueId
22
23
  createdAt
23
24
  publishable
@@ -65,6 +66,7 @@ const mutation = gql`
65
66
  isGuestTicketSale
66
67
  guestTicketPerMember
67
68
  isEventTegIntegration
69
+ tagIds
68
70
  ...EventSchedule
69
71
  ...Location
70
72
  ...Performances
@@ -0,0 +1,14 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ const mutation = gql`
4
+ mutation updateTag($tag: TagInput!) {
5
+ updateTag(tag: $tag) {
6
+ _id
7
+ name
8
+ createdAt
9
+ updatedAt
10
+ }
11
+ }
12
+ `;
13
+
14
+ export default mutation;
@@ -18,6 +18,7 @@ const query = gql`
18
18
  medium
19
19
  small
20
20
  }
21
+ additionalPhotos
21
22
  venueId
22
23
  createdAt
23
24
  publishable
@@ -65,6 +66,7 @@ const query = gql`
65
66
  isGuestTicketSale
66
67
  guestTicketPerMember
67
68
  isEventTegIntegration
69
+ tagIds
68
70
  ...EventSchedule
69
71
  ...Location
70
72
  ...Performances
@@ -56,6 +56,7 @@ const query = gql`
56
56
  salesBeginImmediately
57
57
  isGuestTicketSale
58
58
  guestTicketPerMember
59
+ tagIds
59
60
  ...EventSchedule
60
61
  ...Location
61
62
  ...Performances
@@ -11,6 +11,7 @@ const query = gql`
11
11
  venueId
12
12
  type
13
13
  published
14
+ tagIds
14
15
  description
15
16
  posterImageUrl {
16
17
  original
@@ -0,0 +1,14 @@
1
+ import { gql } from "@apollo/client";
2
+
3
+ const query = gql`
4
+ query tags {
5
+ tags {
6
+ _id
7
+ name
8
+ createdAt
9
+ updatedAt
10
+ }
11
+ }
12
+ `;
13
+
14
+ export default query;
@@ -128,6 +128,7 @@ export default interface IEvent {
128
128
  web3Hash?: string;
129
129
  googleWalletClassId?: string; // Google Wallet Event Ticket Class ID
130
130
  isEventTegIntegration?: boolean;
131
+ tagIds?: string[];
131
132
  }
132
133
 
133
134
  export interface IEventGraphQL extends IEvent {
@@ -0,0 +1,6 @@
1
+ export default interface ITag {
2
+ _id?: string;
3
+ name: string;
4
+ createdAt?: number;
5
+ updatedAt?: number;
6
+ }
@@ -54,6 +54,7 @@ message Event {
54
54
  string googleWalletClassId = 46;
55
55
  bool isEventTegIntegration = 47;
56
56
  repeated string additionalPhotos = 48;
57
+ repeated string tagIds = 49;
57
58
  }
58
59
 
59
60
  message PublicEvent {
@@ -89,6 +90,7 @@ message PublicEvent {
89
90
  repeated EventTaskTypes ticketTypes = 30;
90
91
  bool isMultipleDays = 31;
91
92
  repeated Performance performances = 32;
93
+ repeated Tag tags = 33;
92
94
  }
93
95
 
94
96
  message EventTaskTypes{
@@ -134,6 +136,7 @@ message PublicEventDetails {
134
136
  int32 highestPrice = 30;
135
137
  repeated PublicTicketType ticketTypes = 31;
136
138
  bool isMultipleDays = 32;
139
+ repeated string additionalPhotos = 33;
137
140
  }
138
141
 
139
142
  message PublicTicketType {
@@ -761,6 +764,56 @@ message PosterImageUrl {
761
764
  string small = 2;
762
765
  }
763
766
 
767
+ message Tag {
768
+ string _id = 1;
769
+ string name = 2;
770
+ int32 createdAt = 3;
771
+ int32 updatedAt = 4;
772
+ }
773
+
774
+ message CreateTagRequest {
775
+ string spanContext = 0;
776
+ Tag tag = 1;
777
+ }
778
+
779
+ message CreateTagResponse {
780
+ StatusCode status = 0;
781
+ repeated Error errors = 1;
782
+ Tag tag = 2;
783
+ }
784
+
785
+ message UpdateTagRequest {
786
+ string spanContext = 0;
787
+ Tag tag = 1;
788
+ }
789
+
790
+ message UpdateTagResponse {
791
+ StatusCode status = 0;
792
+ repeated Error errors = 1;
793
+ Tag tag = 2;
794
+ }
795
+
796
+ message DeleteTagRequest {
797
+ string spanContext = 0;
798
+ string tagId = 1;
799
+ }
800
+
801
+ message DeleteTagResponse {
802
+ StatusCode status = 0;
803
+ repeated Error errors = 1;
804
+ bool success = 2;
805
+ }
806
+
807
+ message ListTagsRequest {
808
+ string spanContext = 0;
809
+ }
810
+
811
+ message ListTagsResponse {
812
+ StatusCode status = 0;
813
+ repeated Error errors = 1;
814
+ repeated Tag tags = 2;
815
+ }
816
+
764
817
  message CheckStubUniquenessRequest {
765
818
  string spanContext = 1;
766
819
  string stub = 2;
@@ -939,4 +992,10 @@ service EventService {
939
992
  rpc incrementEventTicketScanned(IncrementEventTicketScannedRequest) returns (IncrementEventTicketScannedResponse) {}
940
993
  // Change Event Date
941
994
  rpc changeEventDate(ChangeEventDateRequest) returns (ChangeEventDateResponse) {}
995
+
996
+ // Tags
997
+ rpc createTag(CreateTagRequest) returns (CreateTagResponse) {}
998
+ rpc updateTag(UpdateTagRequest) returns (UpdateTagResponse) {}
999
+ rpc deleteTag(DeleteTagRequest) returns (DeleteTagResponse) {}
1000
+ rpc listTags(ListTagsRequest) returns (ListTagsResponse) {}
942
1001
  }
@@ -677,4 +677,9 @@ export default {
677
677
  required: false,
678
678
  default: true
679
679
  },
680
+ tagIds: {
681
+ type: [String],
682
+ required: false,
683
+ default: [],
684
+ },
680
685
  };
@@ -0,0 +1,21 @@
1
+ import shortid from 'shortid';
2
+
3
+ export default {
4
+ _id: {
5
+ type: String,
6
+ default: shortid.generate,
7
+ },
8
+ name: {
9
+ type: String,
10
+ required: true,
11
+ trim: true,
12
+ },
13
+ createdAt: {
14
+ type: Number,
15
+ required: false,
16
+ },
17
+ updatedAt: {
18
+ type: Number,
19
+ required: false,
20
+ },
21
+ };