@sellout/models 0.0.1

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 (113) hide show
  1. package/.dist/interfaces/IAddress.d.ts +13 -0
  2. package/.dist/interfaces/IAddress.js +3 -0
  3. package/.dist/interfaces/IAddress.js.map +1 -0
  4. package/.dist/interfaces/IMetrics.d.ts +29 -0
  5. package/.dist/interfaces/IMetrics.js +3 -0
  6. package/.dist/interfaces/IMetrics.js.map +1 -0
  7. package/.dist/interfaces/IPagination.d.ts +4 -0
  8. package/.dist/interfaces/IPagination.js +3 -0
  9. package/.dist/interfaces/IPagination.js.map +1 -0
  10. package/.dist/interfaces/IQuery.d.ts +15 -0
  11. package/.dist/interfaces/IQuery.js +20 -0
  12. package/.dist/interfaces/IQuery.js.map +1 -0
  13. package/.dist/mongo/Address.d.ts +58 -0
  14. package/.dist/mongo/Address.js +60 -0
  15. package/.dist/mongo/Address.js.map +1 -0
  16. package/.dist/mongo/Metrics.d.ts +131 -0
  17. package/.dist/mongo/Metrics.js +137 -0
  18. package/.dist/mongo/Metrics.js.map +1 -0
  19. package/.dist/schemas/Address.d.ts +58 -0
  20. package/.dist/schemas/Address.js +60 -0
  21. package/.dist/schemas/Address.js.map +1 -0
  22. package/.dist/schemas/Metrics.d.ts +131 -0
  23. package/.dist/schemas/Metrics.js +137 -0
  24. package/.dist/schemas/Metrics.js.map +1 -0
  25. package/.dist/sellout-proto.js +92266 -0
  26. package/.dist/utils/EventUtil.d.ts +38 -0
  27. package/.dist/utils/EventUtil.js +188 -0
  28. package/.dist/utils/EventUtil.js.map +1 -0
  29. package/.dist/utils/FeeUtil.d.ts +7 -0
  30. package/.dist/utils/FeeUtil.js +37 -0
  31. package/.dist/utils/FeeUtil.js.map +1 -0
  32. package/.dist/utils/OrderUtil.d.ts +29 -0
  33. package/.dist/utils/OrderUtil.js +216 -0
  34. package/.dist/utils/OrderUtil.js.map +1 -0
  35. package/.dist/utils/WebFlowUtil.d.ts +7 -0
  36. package/.dist/utils/WebFlowUtil.js +10 -0
  37. package/.dist/utils/WebFlowUtil.js.map +1 -0
  38. package/package.json +29 -0
  39. package/src/interfaces/IAddress.ts +13 -0
  40. package/src/interfaces/IArtist.ts +14 -0
  41. package/src/interfaces/IArtistContact.ts +8 -0
  42. package/src/interfaces/IArtistPressKit.ts +8 -0
  43. package/src/interfaces/IEvent.ts +62 -0
  44. package/src/interfaces/IEventCustomField.ts +16 -0
  45. package/src/interfaces/IEventPromotion.ts +15 -0
  46. package/src/interfaces/IEventSchedule.ts +7 -0
  47. package/src/interfaces/IEventUpgrade.ts +13 -0
  48. package/src/interfaces/IFee.ts +46 -0
  49. package/src/interfaces/IFile.ts +7 -0
  50. package/src/interfaces/IMetrics.ts +33 -0
  51. package/src/interfaces/IOrder.ts +32 -0
  52. package/src/interfaces/IOrderCustomField.ts +7 -0
  53. package/src/interfaces/IOrderState.ts +19 -0
  54. package/src/interfaces/IOrderSummary.ts +37 -0
  55. package/src/interfaces/IOrderTicket.ts +15 -0
  56. package/src/interfaces/IOrderType.ts +5 -0
  57. package/src/interfaces/IOrderUpgrade.ts +14 -0
  58. package/src/interfaces/IOrganization.ts +19 -0
  59. package/src/interfaces/IPagination.ts +4 -0
  60. package/src/interfaces/IPerformance.ts +18 -0
  61. package/src/interfaces/IQuery.ts +30 -0
  62. package/src/interfaces/IRefund.ts +6 -0
  63. package/src/interfaces/IRole.ts +17 -0
  64. package/src/interfaces/IScan.ts +5 -0
  65. package/src/interfaces/ISeating.ts +9 -0
  66. package/src/interfaces/ISocialAccountLink.ts +14 -0
  67. package/src/interfaces/ITask.ts +22 -0
  68. package/src/interfaces/ITicketExchange.ts +11 -0
  69. package/src/interfaces/ITicketHold.ts +6 -0
  70. package/src/interfaces/ITicketTier.ts +9 -0
  71. package/src/interfaces/ITicketType.ts +12 -0
  72. package/src/interfaces/IUser.ts +26 -0
  73. package/src/interfaces/IUserProfile.ts +20 -0
  74. package/src/interfaces/IVenue.ts +17 -0
  75. package/src/interfaces/IWebFlow.ts +55 -0
  76. package/src/proto/artist.proto +156 -0
  77. package/src/proto/broadcast.proto +157 -0
  78. package/src/proto/common.proto +59 -0
  79. package/src/proto/email.proto +179 -0
  80. package/src/proto/error.proto +31 -0
  81. package/src/proto/event.proto +270 -0
  82. package/src/proto/fee.proto +196 -0
  83. package/src/proto/file-upload.proto +27 -0
  84. package/src/proto/order.proto +272 -0
  85. package/src/proto/organization.proto +107 -0
  86. package/src/proto/role.proto +136 -0
  87. package/src/proto/seating.proto +64 -0
  88. package/src/proto/stripe.proto +181 -0
  89. package/src/proto/task.proto +39 -0
  90. package/src/proto/twilio.proto +43 -0
  91. package/src/proto/user-profile.proto +124 -0
  92. package/src/proto/user.proto +284 -0
  93. package/src/proto/venue.proto +120 -0
  94. package/src/proto/web-flow.proto +315 -0
  95. package/src/schemas/Address.ts +57 -0
  96. package/src/schemas/Artist.ts +104 -0
  97. package/src/schemas/Event.ts +400 -0
  98. package/src/schemas/Fee.ts +74 -0
  99. package/src/schemas/Metrics.ts +134 -0
  100. package/src/schemas/Order.ts +200 -0
  101. package/src/schemas/Organization.ts +108 -0
  102. package/src/schemas/Role.ts +37 -0
  103. package/src/schemas/Seating.ts +34 -0
  104. package/src/schemas/User.ts +95 -0
  105. package/src/schemas/UserProfile.ts +67 -0
  106. package/src/schemas/Venue.ts +58 -0
  107. package/src/schemas/WebFlow.ts +132 -0
  108. package/src/utils/EventUtil.ts +186 -0
  109. package/src/utils/FeeUtil.ts +34 -0
  110. package/src/utils/OrderUtil.ts +226 -0
  111. package/src/utils/WebFlowUtil.ts +8 -0
  112. package/tsconfig.json +27 -0
  113. package/tslint.json +21 -0
@@ -0,0 +1,156 @@
1
+ syntax = "proto3";
2
+
3
+ import "error.proto";
4
+ import "common.proto";
5
+
6
+ message Artist {
7
+ string _id = 1;
8
+ string name = 2;
9
+ repeated string genres = 3;
10
+ repeated SocialAccountLink socialAccounts = 4;
11
+ repeated ArtistPressKit pressKits = 5;
12
+ repeated ArtistContact contacts = 6;
13
+ string artistGlobalId = 7;
14
+ string orgId = 8;
15
+ Metrics metrics = 9;
16
+ }
17
+
18
+ message SocialAccountLink {
19
+ string _id = 0;
20
+ string platform = 1;
21
+ string link = 2;
22
+ }
23
+
24
+ message ArtistPressKit {
25
+ string _id = 0;
26
+ string title = 1;
27
+ string description = 2;
28
+ repeated string posterImageUrls = 3;
29
+ repeated SocialAccountLink links = 4;
30
+ }
31
+
32
+ message ArtistContact {
33
+ string _id = 0;
34
+ string firstName = 1;
35
+ string lastName = 2;
36
+ string title = 3;
37
+ string company = 4;
38
+ string email = 5;
39
+ string phoneNumber = 6;
40
+ }
41
+
42
+
43
+ // Create Artist
44
+ message CreateArtistRequest {
45
+ string spanContext = 0;
46
+ Artist artist = 1;
47
+ string orgId = 2;
48
+ }
49
+
50
+ message CreateArtistResponse {
51
+ StatusCode status = 1;
52
+ repeated Error errors = 2;
53
+ Artist artist = 3;
54
+ }
55
+
56
+ // Update Artist
57
+ message UpdateArtistRequest {
58
+ string spanContext = 1;
59
+ Artist artist = 2;
60
+ string orgId = 3;
61
+
62
+ }
63
+
64
+ message UpdateArtistResponse {
65
+ StatusCode status = 1;
66
+ repeated Error errors = 2;
67
+ Artist artist = 3;
68
+ }
69
+
70
+ /****************************************************************************************
71
+ Find Artist
72
+ ****************************************************************************************/
73
+
74
+ message ArtistQuery {
75
+ string name = 0;
76
+ repeated string artistIds = 1;
77
+ bool any = 2;
78
+ }
79
+
80
+ message QueryArtistsRequest {
81
+ string spanContext = 0;
82
+ string orgId = 1;
83
+ ArtistQuery query = 2;
84
+ Pagination pagination = 3;
85
+ }
86
+
87
+ message QueryArtistsResponse {
88
+ StatusCode status = 0;
89
+ repeated Error errors = 1;
90
+ repeated Artist artists = 2;
91
+ }
92
+
93
+ // Find Artist
94
+
95
+ message FindArtistByIdRequest {
96
+ string spanContext = 0;
97
+ string orgId = 1;
98
+ string artistId = 2;
99
+ }
100
+
101
+ message FindArtistByIdResponse {
102
+ StatusCode status = 1;
103
+ repeated Error errors = 2;
104
+ Artist artist = 3;
105
+ }
106
+
107
+ // List Artists By Id
108
+ message ListArtistsByIdRequest {
109
+ string spanContext = 0;
110
+ string orgId = 1;
111
+ repeated string artistIds = 2;
112
+ }
113
+
114
+ message ListArtistsByIdResponse {
115
+ StatusCode status = 1;
116
+ repeated Error errors = 2;
117
+ repeated Artist artists = 3;
118
+ }
119
+
120
+ // List Artists
121
+ message ListArtistsRequest {
122
+ string spanContext = 0;
123
+ string orgId = 1;
124
+ }
125
+
126
+ message ListArtistsResponse {
127
+ StatusCode status = 1;
128
+ repeated Error errors = 2;
129
+ repeated Artist artists = 3;
130
+ }
131
+
132
+ message QueryGlobalArtistsRequest {
133
+ string spanContext = 0;
134
+ repeated Query query = 1;
135
+ Pagination pagination = 2;
136
+ }
137
+
138
+ message QueryGlobalArtistsResponse {
139
+ StatusCode status = 1;
140
+ repeated Error errors = 2;
141
+ repeated Artist artists = 3;
142
+ }
143
+
144
+ service ArtistService {
145
+ // Create
146
+ rpc createArtist(CreateArtistRequest) returns (CreateArtistResponse) {}
147
+ // Update
148
+ rpc updateArtist(UpdateArtistRequest) returns (UpdateArtistResponse) {}
149
+ // Find
150
+ rpc findArtistById(FindArtistByIdRequest) returns (FindArtistByIdResponse) {}
151
+ // List
152
+ rpc queryArtists(QueryArtistsRequest) returns (QueryArtistsResponse) {}
153
+ rpc listArtists(ListArtistsRequest) returns (ListArtistsResponse) {}
154
+ rpc listArtistsById(ListArtistsByIdRequest) returns (ListArtistsByIdResponse) {}
155
+ rpc queryGlobalArtists(QueryGlobalArtistsRequest) returns (QueryGlobalArtistsResponse) {}
156
+ }
@@ -0,0 +1,157 @@
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/empty.proto";
4
+ import "order.proto";
5
+
6
+ package Broadcast;
7
+
8
+ /****************************************************************************************
9
+ * Order
10
+ *****************************************************************************************/
11
+
12
+ message OrderCreatedNotification {
13
+ string spanContext = 0;
14
+ Order order = 1;
15
+ string orderId = 2;
16
+ string userId = 3;
17
+ string eventId = 4;
18
+ string orgId = 5;
19
+ repeated string venueIds = 6;
20
+ repeated string artistIds = 7;
21
+ int32 orderTotal = 8;
22
+ int32 transferAmount = 9;
23
+ int32 feeAmount = 10;
24
+ repeated Ticket tickets = 11;
25
+ repeated Upgrade upgrades = 12;
26
+ repeated TicketType ticketTypes = 13;
27
+ repeated UpgradeType upgradeTypes = 14;
28
+ }
29
+
30
+ message OrderRefundedNotification {
31
+ string spanContext = 0;
32
+ Order order = 1;
33
+ string orgId = 2;
34
+ string userId = 3;
35
+ string orderId = 4;
36
+ string eventId = 5;
37
+ repeated string venueIds = 6;
38
+ repeated string artistIds = 7;
39
+ int32 refundAmount = 8;
40
+ int32 totalRefundedAmount = 9;
41
+ bool isFullyRefunded = 10;
42
+ bool isFullyCanceled = 11;
43
+ repeated string refundedTickets = 12;
44
+ repeated string refundedUpgrades = 13;
45
+ }
46
+
47
+ message Ticket {
48
+ string ticketId = 0;
49
+ int32 qty = 1;
50
+ }
51
+
52
+ message Upgrade {
53
+ string upgradeId = 0;
54
+ int32 qty = 1;
55
+ }
56
+
57
+ message TicketType {
58
+ string ticketTypeId = 0;
59
+ string ticketTierId = 1;
60
+ int32 qty = 2;
61
+ }
62
+
63
+ message UpgradeType {
64
+ string upgradeTypeId = 0;
65
+ int32 qty = 1;
66
+ }
67
+
68
+
69
+ /****************************************************************************************
70
+ * Event
71
+ *****************************************************************************************/
72
+
73
+ message EventCreatedNotification {
74
+ string spanContext = 0;
75
+ string orgId = 1;
76
+ string eventId = 2;
77
+ }
78
+
79
+ message EventPublishedNotification {
80
+ string spanContext = 0;
81
+ string orgId = 1;
82
+ string eventId = 2;
83
+ }
84
+
85
+ message EventUpdatedNotification {
86
+ string spanContext = 0;
87
+ string orgId = 1;
88
+ string eventId = 2;
89
+ }
90
+
91
+ /****************************************************************************************
92
+ * Organization
93
+ *****************************************************************************************/
94
+
95
+ message OrganizationCreatedNotification {
96
+ string spanContext = 0;
97
+ string orgId = 1;
98
+ }
99
+
100
+ message OrganizationUpdatedNotification {
101
+ string spanContext = 0;
102
+ string orgId = 1;
103
+ }
104
+
105
+ /****************************************************************************************
106
+ * Venue
107
+ *****************************************************************************************/
108
+
109
+ message VenueCreatedNotification {
110
+ string spanContext = 0;
111
+ string orgId = 1;
112
+ string venueId = 2;
113
+ }
114
+
115
+ message VenueUpdatedNotification {
116
+ string spanContext = 0;
117
+ string orgId = 1;
118
+ string venueId = 2;
119
+ }
120
+
121
+
122
+
123
+ /****************************************************************************************
124
+ * Artist
125
+ *****************************************************************************************/
126
+
127
+ message ArtistCreatedNotification {
128
+ string spanContext = 0;
129
+ string orgId = 1;
130
+ string artistId = 2;
131
+ }
132
+
133
+ message ArtistUpdatedNotification {
134
+ string spanContext = 0;
135
+ string orgId = 1;
136
+ string artistId = 2;
137
+ }
138
+
139
+ service Publisher {
140
+ // Order
141
+ rpc orderCreated(OrderCreatedNotification) returns (google.protobuf.Empty) {}
142
+ rpc orderRefunded(OrderRefundedNotification) returns (google.protobuf.Empty) {}
143
+ // Event
144
+ rpc eventCreated(EventCreatedNotification) returns (google.protobuf.Empty) {}
145
+ rpc eventPublished(EventPublishedNotification) returns (google.protobuf.Empty) {}
146
+ rpc eventUpdated(EventUpdatedNotification) returns (google.protobuf.Empty) {}
147
+ // Organization
148
+ rpc organizationCreated(OrganizationCreatedNotification) returns (google.protobuf.Empty) {}
149
+ rpc organizationUpdated(OrganizationUpdatedNotification) returns (google.protobuf.Empty) {}
150
+ // Venue
151
+ rpc venueCreated(VenueCreatedNotification) returns (google.protobuf.Empty) {}
152
+ rpc venueUpdated(VenueUpdatedNotification) returns (google.protobuf.Empty) {}
153
+ // Artist
154
+ rpc artistCreated(ArtistCreatedNotification) returns (google.protobuf.Empty) {}
155
+ rpc artistUpdated(ArtistUpdatedNotification) returns (google.protobuf.Empty) {}
156
+
157
+ }
@@ -0,0 +1,59 @@
1
+ syntax = "proto3";
2
+
3
+ message Address {
4
+ string address1 = 1;
5
+ string address2 = 2;
6
+ string city = 3;
7
+ string state = 4;
8
+ string zip = 5;
9
+ string country = 6;
10
+ string phone = 7;
11
+ double lat = 8;
12
+ double lng = 9;
13
+ string placeId = 10;
14
+ string timezone = 11;
15
+ }
16
+
17
+ message Query {
18
+ string key = 1;
19
+ string value = 2;
20
+ }
21
+
22
+ message Pagination {
23
+ int32 pageSize = 1;
24
+ int32 pageNumber = 2;
25
+ }
26
+
27
+ message Metrics {
28
+ string _id = 1;
29
+ string orgId = 2;
30
+ int32 createdAt = 3;
31
+ // Value
32
+ int32 lifeTimeValue = 4;
33
+ int32 yearToDateValue = 5;
34
+ int32 lifeTimeValueRefunded = 6;
35
+ int32 yearToDateValueRefunded = 7;
36
+ int32 lifeTimeValueComped = 8;
37
+ int32 yearToDateValueComped = 9;
38
+ // Tickets
39
+ int32 lifeTimeTicketsPurchased = 10;
40
+ int32 yearToDateTicketsPurchased = 11;
41
+ int32 lifeTimeTicketsRefunded = 12;
42
+ int32 yearToDateTicketsRefunded = 13;
43
+ int32 lifeTimeTicketsComped = 14;
44
+ int32 yearToDateTicketsComped = 15;
45
+ // Upgrades
46
+ int32 lifeTimeUpgradesPurchased = 16;
47
+ int32 yearToDateUpgradesPurchased = 17;
48
+ int32 lifeTimeUpgradesRefunded = 18;
49
+ int32 yearToDateUpgradesRefunded = 19;
50
+ int32 lifeTimeUpgradesComped = 20;
51
+ int32 yearToDateUpgradesComped = 21;
52
+ // Orders
53
+ int32 lifeTimeOrdersPurchased = 22;
54
+ int32 yearToDateOrdersPurchased = 23;
55
+ int32 lifeTimeOrdersRefunded = 24;
56
+ int32 yearToDateOrdersRefunded = 25;
57
+ int32 lifeTimeOrdersComped = 26;
58
+ int32 yearToDateOrdersComped = 27;
59
+ }
@@ -0,0 +1,179 @@
1
+ syntax = "proto3";
2
+
3
+ import "google/protobuf/empty.proto";
4
+
5
+ /****************************************************************************************
6
+ * User
7
+ ****************************************************************************************/
8
+
9
+ message QueueUserWelcomeEmailRequest {
10
+ string spanContext = 0;
11
+ string toAddress = 1;
12
+ string firstName = 2;
13
+ string lastName = 3;
14
+ string verificationCode = 4;
15
+ }
16
+
17
+ message QueueUserResetPasswordEmailRequest {
18
+ string spanContext = 0;
19
+ string toAddress = 1;
20
+ string resetPasswordUrl = 4;
21
+ }
22
+
23
+ message QueueInviteToOrganizationEmailRequest {
24
+ string spanContext = 0;
25
+ string toAddress = 1;
26
+ string orgName = 2;
27
+ string redirectUrl = 3;
28
+ string orgLogo = 4;
29
+ string roleName = 5;
30
+ }
31
+
32
+ /****************************************************************************************
33
+ * Order
34
+ ****************************************************************************************/
35
+
36
+ message OrderSummaryItem {
37
+ string name = 0;
38
+ string price = 1;
39
+ string fee = 2;
40
+ string seats = 3;
41
+ }
42
+
43
+ message OrderRefundItem {
44
+ string name = 0;
45
+ string refundedAmount = 1;
46
+ }
47
+
48
+ message QueueOrderReceiptEmailRequest {
49
+ string spanContext = 0;
50
+ string toAddress = 1;
51
+ string firstName = 2;
52
+ string eventName = 3;
53
+ string orgName = 4;
54
+ string eventSubtitle = 5;
55
+ string eventDate = 6;
56
+ string venueName = 7;
57
+ string doorsAt = 8;
58
+ string showAt = 9;
59
+ string qrCodeAt = 10;
60
+ string confirmationCode = 11;
61
+ string orgEmail = 12;
62
+ string orgPhoneNumber = 13;
63
+ string orgAddress1 = 14;
64
+ string orgAddress2 = 15;
65
+ string eventPosterImageUrl = 16;
66
+ string cityState = 17;
67
+ string orgLogoUrl = 18;
68
+ repeated OrderSummaryItem orderItems = 19;
69
+ string orderTotal = 20;
70
+ string venueAddress1 = 21;
71
+ string venueAddress2 = 22;
72
+ string orderFees = 23;
73
+ string orderSubtotal = 24;
74
+ string venuePosterImageUrl = 25;
75
+ bool isRSVP = 26;
76
+ }
77
+
78
+ message QueueOrderQRCodeEmailRequest {
79
+ string spanContext = 0;
80
+ string toAddress = 1;
81
+ string firstName = 2;
82
+ string eventName = 3;
83
+ string orgName = 4;
84
+ string eventSubtitle = 5;
85
+ string eventDate = 6;
86
+ string venueName = 7;
87
+ string doorsAt = 8;
88
+ string showAt = 9;
89
+ string qrCodeAt = 10;
90
+ string confirmationCode = 11;
91
+ string orgEmail = 12;
92
+ string orgPhoneNumber = 13;
93
+ string orgAddress1 = 14;
94
+ string orgAddress2 = 15;
95
+ string eventPosterImageUrl = 16;
96
+ string cityState = 17;
97
+ string orgLogoUrl = 18;
98
+ repeated OrderSummaryItem orderItems = 19;
99
+ string orderTotal = 20;
100
+ string qrCodeUrl = 21;
101
+ string venueAddress1 = 22;
102
+ string venueAddress2 = 23;
103
+ string orderFees = 24;
104
+ string orderSubtotal = 25;
105
+ string venuePosterImageUrl = 26;
106
+ bool isRSVP = 27;
107
+ }
108
+
109
+ message QueueOrderRefundEmailRequest {
110
+ string spanContext = 0;
111
+ string toAddress = 1;
112
+ string firstName = 2;
113
+ string eventName = 3;
114
+ string orgName = 4;
115
+ string eventSubtitle = 5;
116
+ string eventDate = 6;
117
+ string venueName = 7;
118
+ string doorsAt = 8;
119
+ string showAt = 9;
120
+ string qrCodeAt = 10;
121
+ string confirmationCode = 11;
122
+ string orgEmail = 12;
123
+ string orgPhoneNumber = 13;
124
+ string orgAddress1 = 14;
125
+ string orgAddress2 = 15;
126
+ string eventPosterImageUrl = 16;
127
+ string cityState = 17;
128
+ string orgLogoUrl = 18;
129
+ string venueAddress1 = 19;
130
+ string venueAddress2 = 20;
131
+ string venuePosterImageUrl = 21;
132
+ bool isRSVP = 22;
133
+ repeated OrderRefundItem orderRefundItems = 23;
134
+ string orderSubtotalRefunded = 24;
135
+ string orderFeesRefunded = 25;
136
+ string orderTotalRefunded = 26;
137
+ }
138
+
139
+ message QueueOrderCanceledEmailRequest {
140
+ string spanContext = 0;
141
+ string toAddress = 1;
142
+ string firstName = 2;
143
+ string eventName = 3;
144
+ string orgName = 4;
145
+ string eventSubtitle = 5;
146
+ string eventDate = 6;
147
+ string venueName = 7;
148
+ string doorsAt = 8;
149
+ string showAt = 9;
150
+ string qrCodeAt = 10;
151
+ string confirmationCode = 11;
152
+ string orgEmail = 12;
153
+ string orgPhoneNumber = 13;
154
+ string orgAddress1 = 14;
155
+ string orgAddress2 = 15;
156
+ string eventPosterImageUrl = 16;
157
+ string cityState = 17;
158
+ string orgLogoUrl = 18;
159
+ string venueAddress1 = 19;
160
+ string venueAddress2 = 20;
161
+ string venuePosterImageUrl = 21;
162
+ bool isRSVP = 22;
163
+ repeated OrderRefundItem orderRefundItems = 23;
164
+ string orderSubtotalRefunded = 24;
165
+ string orderFeesRefunded = 25;
166
+ string orderTotalRefunded = 26;
167
+ }
168
+
169
+ service EmailService {
170
+ // User
171
+ rpc queueUserWelcomeEmail (QueueUserWelcomeEmailRequest) returns (google.protobuf.Empty) {}
172
+ rpc queueUserResetPasswordEmail (QueueUserResetPasswordEmailRequest) returns (google.protobuf.Empty) {}
173
+ rpc queueInviteToOrganizationEmailRequest (QueueInviteToOrganizationEmailRequest) returns (google.protobuf.Empty) {}
174
+ // Order
175
+ rpc queueOrderReceiptEmail (QueueOrderReceiptEmailRequest) returns (google.protobuf.Empty) {}
176
+ rpc queueOrderQRCodeEmail (QueueOrderQRCodeEmailRequest) returns (google.protobuf.Empty) {}
177
+ rpc queueOrderRefundEmail (QueueOrderRefundEmailRequest) returns (google.protobuf.Empty) {}
178
+ rpc queueOrderCanceledEmail (QueueOrderCanceledEmailRequest) returns (google.protobuf.Empty) {}
179
+ }
@@ -0,0 +1,31 @@
1
+ syntax = "proto3";
2
+
3
+ /*
4
+ * We leverage well-understood HTTP status codes to define the types of errors,
5
+ * which can occur across our upstream services. These should be localized and translated
6
+ * before being displayed to end users.
7
+ *
8
+ */
9
+ enum StatusCode {
10
+ UNKNOWN_CODE = 0;
11
+
12
+ OK = 200;
13
+
14
+ BAD_REQUEST = 400;
15
+ UNAUTHORIZED = 401;
16
+ FORBIDDEN = 403;
17
+ UNPROCESSABLE_ENTITY = 422;
18
+
19
+ INTERNAL_SERVER_ERROR = 500;
20
+ GATEWAY_TIMEOUT = 504;
21
+ }
22
+
23
+ /*
24
+ * Field-level error responses, i.e. { key: 'firstName', message: '"firstName" is required' }.
25
+ * Note, these messages eventually need to be symbolic, and also localized/translated.
26
+ * Right now, we're mainly using the English strings returned by the Joi validators.
27
+ */
28
+ message Error {
29
+ string key = 1;
30
+ string message = 2;
31
+ }