├── LICENSE ├── README.md ├── doc ├── OAuth & Authorization.md └── Websocket.md ├── index.ts ├── response ├── auth │ ├── AuthPublic.ts │ └── index.ts ├── blog │ ├── BlogPublic.ts │ └── index.ts ├── bohne │ ├── BohnePublic.ts │ └── index.ts ├── channel │ ├── ChannelPublic.ts │ └── index.ts ├── cms │ ├── CMSPublic.ts │ └── index.ts ├── donation │ ├── DonationPublic.ts │ └── index.ts ├── frontend │ ├── FrontendPublic.ts │ └── index.ts ├── generic │ ├── RedirectResponse.ts │ └── index.ts ├── index.ts ├── media │ ├── MediaPublic.ts │ └── index.ts ├── mediacenter │ ├── MediacenterPublic.ts │ └── index.ts ├── oauth │ ├── OAuthPublic.ts │ └── index.ts ├── playlist │ ├── PlaylistPublic.ts │ └── index.ts ├── poll │ ├── PollPublic.ts │ └── index.ts ├── schedule │ ├── ScheduleLegacyPublic.ts │ ├── SchedulePublic.ts │ └── index.ts ├── search │ ├── SearchPublic.ts │ └── index.ts ├── simpleshop │ ├── SimpleShopPublic.ts │ └── index.ts ├── subscription │ ├── SubscriptionPublic.ts │ └── index.ts ├── tags │ ├── TagsPublic.ts │ └── index.ts └── user │ ├── UserPublic.ts │ └── index.ts ├── shared ├── apifeature.ts ├── bohneportrait.ts ├── consts.ts ├── errorcodes.ts ├── image.ts ├── index.ts ├── link.ts ├── media.ts ├── notification.ts ├── raffle.ts ├── rbtvevent.ts ├── response.ts ├── stream.ts ├── subscription.ts ├── supporter.ts ├── terms.ts └── token.ts └── socket ├── index.ts ├── messageTypes.ts └── messages ├── apifeature ├── apiFeature.ts └── index.ts ├── auth ├── AuthPublic.ts └── index.ts ├── donation ├── DonationPublic.ts └── index.ts ├── index.ts ├── interaction ├── InteractionPublic.ts ├── index.ts ├── klixx │ ├── KlixxInteractionPublic.ts │ └── index.ts ├── textdisplay │ ├── TextDisplayInteractionPublic.ts │ └── index.ts ├── title │ ├── TitleInteractionPublic.ts │ └── index.ts ├── vote │ ├── VoteInteractionPublic.ts │ └── index.ts └── votese │ ├── VoteSEInteractionPublic.ts │ └── index.ts ├── media ├── MediaPublic.ts └── index.ts ├── misc ├── ConfettiPublic.ts ├── ContentChangedPublic.ts ├── HelloPublic.ts └── index.ts ├── notification ├── NotificationPublic.ts └── index.ts ├── rbtvevent ├── RBTVEventPublic.ts └── index.ts ├── stream ├── StreamPublic.ts └── index.ts ├── superchad ├── ChatMessage.ts ├── RocketMessage.ts └── index.ts └── user ├── UserDataChangedPublic.ts ├── UserPropertyChangedPublic.ts └── index.ts /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Rocket Beans TV 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # Rocket Beans TV API v1.0.0 3 | 4 | ![](https://rocketbeans.tv/assets/img/API_Logo.png) 5 | 6 | This is the official documentation for the [rocketbeans.tv](https://rocketbeans.tv)-API.
7 |
8 | 9 | ## Base URL 10 | 11 | Prepend this URL to each endpoint: 12 | 13 | https://api.rocketbeans.tv/v1 14 |
15 | 16 | ## Table of contents 17 | 18 | 19 | 20 | - [Blog](#blog) 21 | - [Get all Blog Posts](#get-all-blog-posts) 22 | - [Get all Blog Posts (Preview)](#get-all-blog-posts-preview) 23 | - [Get Single Blog Post](#get-single-blog-post) 24 | - [Get Single Blog Post (Preview)](#get-single-blog-post-preview) 25 | 26 | - [Bohne](#bohne) 27 | - [Get all Bohnen Portraits](#get-all-bohnen-portraits) 28 | - [Get Single Bohne](#get-single-bohne) 29 | - [Get Single Bohne Portrait](#get-single-bohne-portrait) 30 | 31 | - [CMS](#cms) 32 | - [Get All Routes](#get-all-routes) 33 | - [Get Single CMS Page](#get-single-cms-page) 34 | 35 | - [Frontend](#frontend) 36 | - [Frontend Initialization Information](#frontend-initialization-information) 37 | 38 | - [Mediathek Episode](#mediathek-episode) 39 | - [Get Episodes of Bohne](#get-episodes-of-bohne) 40 | - [Get Single Episode](#get-single-episode) 41 | - [Get all Episodes of Season](#get-all-episodes-of-season) 42 | - [Get all Episodes By Show](#get-all-episodes-by-show) 43 | - [Get the last published Episodes (Preview)](#get-the-last-published-episodes-preview) 44 | - [Get single random episode ID](#get-single-random-episode-id) 45 | - [Get Abobox Content for self](#get-abobox-content-for-self) 46 | - [Get all unsorted (no season set) Episodes By Show](#get-all-unsorted-no-season-set-episodes-by-show) 47 | - [Get Episodes of Bohne (Preview)](#get-episodes-of-bohne-preview) 48 | - [Get Single Episode (Preview)](#get-single-episode-preview) 49 | - [Get all Episodes of Season (Preview)](#get-all-episodes-of-season-preview) 50 | - [Get all Episodes By Show (Preview)](#get-all-episodes-by-show-preview) 51 | - [Get all unsorted Episodes By Show (Preview)](#get-all-unsorted-episodes-by-show-preview) 52 | 53 | - [Mediathek Show](#mediathek-show) 54 | - [Get all Shows](#get-all-shows) 55 | - [Get Single Show](#get-single-show) 56 | - [Get all featured Shows (Preview)](#get-all-featured-shows-preview) 57 | - [Get all Shows (Preview)](#get-all-shows-preview) 58 | - [Get Single Show (Preview)](#get-single-show-preview) 59 | - [Get all Shows (PreviewMini)](#get-all-shows-previewmini) 60 | 61 | - [Playlist](#playlist) 62 | - [Add playlist items to playlist](#add-playlist-items-to-playlist) 63 | - [Add playlist items to playlist by playlist type](#add-playlist-items-to-playlist-by-playlist-type) 64 | - [Create new playlist](#create-new-playlist) 65 | - [Delete playlist by id](#delete-playlist-by-id) 66 | - [Get all playlists](#get-all-playlists) 67 | - [Get playlist by playlist ID at certain playlist index](#get-playlist-by-playlist-id-at-certain-playlist-index) 68 | - [Get playlist by playlist type](#get-playlist-by-playlist-type) 69 | - [Get playlist by UUID](#get-playlist-by-uuid) 70 | - [Get playlist items by playlist id](#get-playlist-items-by-playlist-id) 71 | - [Move playlist items on playlist](#move-playlist-items-on-playlist) 72 | - [Remove all playlist items from playlist by id](#remove-all-playlist-items-from-playlist-by-id) 73 | - [Remove playlist items from playlist by id](#remove-playlist-items-from-playlist-by-id) 74 | - [Update playlist by id](#update-playlist-by-id) 75 | 76 | - [RBSCVideo](#rbscvideo) 77 | - [Exchange RBSC video token for signed URL token](#exchange-rbsc-video-token-for-signed-url-token) 78 | 79 | - [RBTVEvent](#rbtvevent) 80 | - [Get the current active RBTV Event](#get-the-current-active-rbtv-event) 81 | - [Get RBTV Event Team Information](#get-rbtv-event-team-information) 82 | - [Get joined RBTV Event Team](#get-joined-rbtv-event-team) 83 | - [Join a RBTV Event Team](#join-a-rbtv-event-team) 84 | 85 | - [Schedule](#schedule) 86 | - [Get by-day schedule](#get-by-day-schedule) 87 | - [Get by-day publish schedule](#get-by-day-publish-schedule) 88 | - [Get by-day page-ready schedule](#get-by-day-page-ready-schedule) 89 | 90 | - [ScheduleLegacy](#schedulelegacy) 91 | - [Get current running show](#get-current-running-show) 92 | - [Get current week schedule](#get-current-week-schedule) 93 | - [Get current week schedule grouped by day](#get-current-week-schedule-grouped-by-day) 94 | - [Get the next n scheduled shows](#get-the-next-n-scheduled-shows) 95 | 96 | - [Shop](#shop) 97 | - [Get All Products](#get-all-products) 98 | 99 | - [StreamCount](#streamcount) 100 | - [Get Current Viewer Count](#get-current-viewer-count) 101 | 102 | - [Tag](#tag) 103 | - [Add tag to existing media episode](#add-tag-to-existing-media-episode) 104 | - [Create new tag with name and optionally pin it to media episode](#create-new-tag-with-name-and-optionally-pin-it-to-media-episode) 105 | - [Delete tag](#delete-tag) 106 | - [Get all tags](#get-all-tags) 107 | - [Get tags by partial name / media episode](#get-tags-by-partial-name-/-media-episode) 108 | - [Hide tag on existing media episode](#hide-tag-on-existing-media-episode) 109 | - [Pin tag to existing media item](#pin-tag-to-existing-media-item) 110 | - [Remove tag from existing media episode](#remove-tag-from-existing-media-episode) 111 | - [Unhide tag on existing media episode](#unhide-tag-on-existing-media-episode) 112 | - [Unpin tag from existing media episode](#unpin-tag-from-existing-media-episode) 113 | - [Update tag](#update-tag) 114 | - [Vote for tag](#vote-for-tag) 115 | 116 | - [User](#user) 117 | - [Request own User Information](#request-own-user-information) 118 | 119 | 120 |
121 | 122 | # Blog 123 | 124 | ## Get all Blog Posts 125 | 126 | 127 |

Returns all blog posts for the given pagination parameters

128 | 129 | GET /blog/all 130 | 131 | 132 | 133 | 134 | ### Parameters 135 | 136 | | Name | Type | Default | Description | 137 | |---------|-----------|-----------|--------------------------------------| 138 | | offset | number | | (optional) Offset from the start | 139 | | limit | number | 4 | (optional) Limits the number of returned blog posts. Maximum is 50. | 140 | 141 | ### Returns 142 | Interface: **[blogResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/blog/BlogPublic.ts#L20)** 143 | 144 |
145 | 146 | ## Get all Blog Posts (Preview) 147 | 148 | 149 |

Returns all blog posts for the given pagination parameters

150 | 151 | GET /blog/preview/all 152 | 153 | 154 | 155 | 156 | ### Parameters 157 | 158 | | Name | Type | Default | Description | 159 | |---------|-----------|-----------|--------------------------------------| 160 | | offset | number | | (optional) Offset from the start | 161 | | limit | number | 4 | (optional) Limits the number of returned blog posts. Maximum is 50. | 162 | 163 | ### Returns 164 | Interface: **[blogPreviewResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/blog/BlogPublic.ts#L54)** 165 | 166 |
167 | 168 | ## Get Single Blog Post 169 | 170 | 171 | 172 | 173 | GET /blog/:id 174 | 175 | 176 | 177 | 178 | ### Parameters 179 | 180 | | Name | Type | Default | Description | 181 | |---------|-----------|-----------|--------------------------------------| 182 | | id | number | | The blog post ID | 183 | 184 | ### Returns 185 | Interface: **[blogResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/blog/BlogPublic.ts#L20)** 186 | 187 |
188 | 189 | ## Get Single Blog Post (Preview) 190 | 191 | 192 | 193 | 194 | GET /blog/preview/:id 195 | 196 | 197 | 198 | 199 | ### Parameters 200 | 201 | | Name | Type | Default | Description | 202 | |---------|-----------|-----------|--------------------------------------| 203 | | id | number | | The blog post ID | 204 | 205 | ### Returns 206 | Interface: **[blogPreviewResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/blog/BlogPublic.ts#L54)** 207 | 208 |
209 | 210 | 211 | [Back to top](#top)
212 | 213 | --- 214 |
215 | 216 | # Bohne 217 | 218 | ## Get all Bohnen Portraits 219 | 220 | 221 |

Returns reduced information about all team members.

222 | 223 | GET /bohne/portrait/all 224 | 225 | 226 | 227 | 228 | ### Returns 229 | Interface: **[bohnePortrait](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/bohneportrait.ts#L4)** 230 | 231 |
232 | 233 | ## Get Single Bohne 234 | 235 | 236 |

Returns information about a single team member.

237 | 238 | GET /bohne/:mgmtid 239 | 240 | 241 | 242 | 243 | ### Parameters 244 | 245 | | Name | Type | Default | Description | 246 | |---------|-----------|-----------|--------------------------------------| 247 | | mgmtid | number | | The RocketMGMT ID for this bohne | 248 | 249 | ### Returns 250 | Interface: **[bohneResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/bohne/BohnePublic.ts#L6)** 251 | 252 |
253 | 254 | ## Get Single Bohne Portrait 255 | 256 | 257 |

Returns reduced information about a given team member.

258 | 259 | GET /bohne/portrait/:mgmtid 260 | 261 | 262 | 263 | 264 | ### Parameters 265 | 266 | | Name | Type | Default | Description | 267 | |---------|-----------|-----------|--------------------------------------| 268 | | mgmtid | number | | The RocketMGMT ID for this bohne | 269 | 270 | ### Returns 271 | Interface: **[bohnePortrait](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/bohneportrait.ts#L4)** 272 | 273 |
274 | 275 | 276 | [Back to top](#top)
277 | 278 | --- 279 |
280 | 281 | # CMS 282 | 283 | ## Get All Routes 284 | 285 | 286 |

Returns all CMS routes (frontend paths which are connected to CMS pages)

287 | 288 | GET /cms/route/all 289 | 290 | 291 | 292 | 293 | ### Returns 294 | Interface: **[cmsRouteResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/cms/CMSPublic.ts#L12)** 295 | 296 |
297 | 298 | ## Get Single CMS Page 299 | 300 | 301 |

Returns the given CMS page

302 | 303 | GET /cms/:id 304 | 305 | 306 | 307 | 308 | ### Parameters 309 | 310 | | Name | Type | Default | Description | 311 | |---------|-----------|-----------|--------------------------------------| 312 | | id | string | | The Page ID | 313 | 314 | ### Returns 315 | Interface: **[cmsPageResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/cms/CMSPublic.ts#L2)** 316 | 317 |
318 | 319 | 320 | [Back to top](#top)
321 | 322 | --- 323 |
324 | 325 | # Frontend 326 | 327 | ## Frontend Initialization Information 328 | 329 | 330 |

Returns necessary information for frontend initialization, such as current stream details, cms routes etc.

331 | 332 | GET /frontend/init 333 | 334 | 335 | 336 | 337 | ### Returns 338 | Interface: **[frontendInitResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/frontend/FrontendPublic.ts#L8)** 339 | 340 |
341 | 342 | 343 | [Back to top](#top)
344 | 345 | --- 346 |
347 | 348 | # Mediathek Episode 349 | 350 | ## Get Episodes of Bohne 351 | 352 | 353 |

Returns information about all episodes for the given Bohne.

354 | 355 | GET /media/episode/bybohne/:id 356 | 357 | 358 | 359 | 360 | ### Parameters 361 | 362 | | Name | Type | Default | Description | 363 | |---------|-----------|-----------|--------------------------------------| 364 | | id | number | | RocketMGMT ID of the Bohne | 365 | | offset | number | | (optional) Offset from the start | 366 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 367 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 368 | 369 | ### Returns 370 | Interface: **[mediaEpisodeCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L134)** 371 | 372 |
373 | 374 | ## Get Single Episode 375 | 376 | 377 |

Returns information about a single episode.

378 | 379 | GET /media/episode/:id 380 | 381 | 382 | 383 | 384 | ### Parameters 385 | 386 | | Name | Type | Default | Description | 387 | |---------|-----------|-----------|--------------------------------------| 388 | | id | number | | Episode ID | 389 | 390 | ### Returns 391 | Interface: **[mediaEpisodeCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L134)** 392 | 393 |
394 | 395 | ## Get all Episodes of Season 396 | 397 | 398 |

Returns information about all episodes of a given season.

399 | 400 | GET /media/episode/byseason/:id 401 | 402 | 403 | 404 | 405 | ### Parameters 406 | 407 | | Name | Type | Default | Description | 408 | |---------|-----------|-----------|--------------------------------------| 409 | | id | number | | Season ID | 410 | | offset | number | | (optional) Offset from the start | 411 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 412 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 413 | 414 | ### Returns 415 | Interface: **[mediaEpisodeCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L134)** 416 | 417 |
418 | 419 | ## Get all Episodes By Show 420 | 421 | 422 |

Returns information about all episodes for the given show.

423 | 424 | GET /media/episode/byshow/:id 425 | 426 | 427 | 428 | 429 | ### Parameters 430 | 431 | | Name | Type | Default | Description | 432 | |---------|-----------|-----------|--------------------------------------| 433 | | id | number | | Show ID | 434 | | offset | number | | (optional) Offset from the start | 435 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 436 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 437 | 438 | ### Returns 439 | Interface: **[mediaEpisodeCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L134)** 440 | 441 |
442 | 443 | ## Get the last published Episodes (Preview) 444 | 445 | 446 | 447 | 448 | GET /media/episode/preview/newest 449 | 450 | 451 | 452 | 453 | ### Parameters 454 | 455 | | Name | Type | Default | Description | 456 | |---------|-----------|-----------|--------------------------------------| 457 | | offset | number | | (optional) Offset from the start | 458 | | limit | number | 8 | (optional) Number of items to return. Maximum is 50. | 459 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 460 | 461 | ### Returns 462 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 463 | 464 |
465 | 466 | ## Get single random episode ID 467 | 468 | 469 |

Returns random episode ID of all available media episodes

470 | 471 | GET /random 472 | 473 | 474 | 475 | 476 | ### Returns 477 | Interface: **[mediaEpisodeRandomVideoResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L140)** 478 | 479 |
480 | 481 | ## Get Abobox Content for self 482 | 483 | 484 |

Returns all episodes from subscribed shows and bohnen for the authorised user.

485 | 486 | GET /media/abobox/self 487 | 488 | 489 | 490 | 491 | ### Parameters 492 | 493 | | Name | Type | Default | Description | 494 | |---------|-----------|-----------|--------------------------------------| 495 | | offset | number | | (optional) Offset from the start | 496 | | limit | number | 8 | (optional) Number of items to return. Maximum is 50. | 497 | 498 | ### Returns 499 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 500 | 501 |
502 | 503 | ## Get all unsorted (no season set) Episodes By Show 504 | 505 | 506 |

Returns information about all unsorted (no season set) episodes for the given show.

507 | 508 | GET /media/episode/byshow/unsorted/:id 509 | 510 | 511 | 512 | 513 | ### Parameters 514 | 515 | | Name | Type | Default | Description | 516 | |---------|-----------|-----------|--------------------------------------| 517 | | id | number | | Show ID | 518 | | offset | number | | (optional) Offset from the start | 519 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 520 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 521 | 522 | ### Returns 523 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 524 | 525 |
526 | 527 | ## Get Episodes of Bohne (Preview) 528 | 529 | 530 |

Returns reduced information about all episodes for the given Bohne.

531 | 532 | GET /media/episode/bybohne/preview/:id 533 | 534 | 535 | 536 | 537 | ### Parameters 538 | 539 | | Name | Type | Default | Description | 540 | |---------|-----------|-----------|--------------------------------------| 541 | | id | number | | RocketMGMT ID of the Bohne | 542 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 543 | 544 | ### Returns 545 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 546 | 547 |
548 | 549 | ## Get Single Episode (Preview) 550 | 551 | 552 |

Returns reduced information about a single episode.

553 | 554 | GET /media/episode/preview/:id 555 | 556 | 557 | 558 | 559 | ### Parameters 560 | 561 | | Name | Type | Default | Description | 562 | |---------|-----------|-----------|--------------------------------------| 563 | | id | number | | Episode ID | 564 | 565 | ### Returns 566 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 567 | 568 |
569 | 570 | ## Get all Episodes of Season (Preview) 571 | 572 | 573 |

Returns reduced information about all episodes of a given season.

574 | 575 | GET /media/episode/byseason/preview/:id 576 | 577 | 578 | 579 | 580 | ### Parameters 581 | 582 | | Name | Type | Default | Description | 583 | |---------|-----------|-----------|--------------------------------------| 584 | | id | number | | Season ID | 585 | | offset | number | | (optional) Offset from the start | 586 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 587 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 588 | 589 | ### Returns 590 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 591 | 592 |
593 | 594 | ## Get all Episodes By Show (Preview) 595 | 596 | 597 |

Returns reduced information about all episodes for the given show.

598 | 599 | GET /media/episode/byshow/preview/:id 600 | 601 | 602 | 603 | 604 | ### Parameters 605 | 606 | | Name | Type | Default | Description | 607 | |---------|-----------|-----------|--------------------------------------| 608 | | id | number | | Show ID | 609 | | offset | number | | (optional) Offset from the start | 610 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 611 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 612 | 613 | ### Returns 614 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 615 | 616 |
617 | 618 | ## Get all unsorted Episodes By Show (Preview) 619 | 620 | 621 |

Returns reduced information about all unsorted (no season set) episodes for the given show.

622 | 623 | GET /media/episode/byshow/unsorted/preview/:id 624 | 625 | 626 | 627 | 628 | ### Parameters 629 | 630 | | Name | Type | Default | Description | 631 | |---------|-----------|-----------|--------------------------------------| 632 | | id | number | | Show ID | 633 | | offset | number | | (optional) Offset from the start | 634 | | limit | number | 10 | (optional) Number of items to return. Maximum is 50. | 635 | | order | string | ASC | (optional) Sort Order; ASC -> Oldest item First; DESC -> Newest item First | 636 | 637 | ### Returns 638 | Interface: **[mediaEpisodePreviewCombinedResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L128)** 639 | 640 |
641 | 642 | 643 | [Back to top](#top)
644 | 645 | --- 646 |
647 | 648 | # Mediathek Show 649 | 650 | ## Get all Shows 651 | 652 | 653 | 654 | 655 | GET /media/show/all 656 | 657 | 658 | 659 | 660 | ### Parameters 661 | 662 | | Name | Type | Default | Description | 663 | |---------|-----------|-----------|--------------------------------------| 664 | | offset | number | | (optional) Offset from the start | 665 | | limit | number | 8 | (optional) Number of items to return. Maximum is 50. | 666 | | sortby | string | LastEpisode | (optional) possible values: LastEpisode | Title | 667 | | only | string | | (optional) possible values: podcast | showcase | 668 | 669 | ### Returns 670 | Interface: **[mediaShowResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L15)** 671 | 672 |
673 | 674 | ## Get Single Show 675 | 676 | 677 |

Returns information about the given show.

678 | 679 | GET /media/show/:id 680 | 681 | 682 | 683 | 684 | ### Parameters 685 | 686 | | Name | Type | Default | Description | 687 | |---------|-----------|-----------|--------------------------------------| 688 | | id | number | | Show ID | 689 | 690 | ### Returns 691 | Interface: **[mediaShowResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L15)** 692 | 693 |
694 | 695 | ## Get all featured Shows (Preview) 696 | 697 | 698 | 699 | 700 | GET /media/show/preview/featured 701 | 702 | 703 | 704 | 705 | ### Parameters 706 | 707 | | Name | Type | Default | Description | 708 | |---------|-----------|-----------|--------------------------------------| 709 | | | | | | 710 | 711 | ### Returns 712 | Interface: **[mediaShowPreviewResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L37)** 713 | 714 |
715 | 716 | ## Get all Shows (Preview) 717 | 718 | 719 |

Returns paginated, reduced information about all shows.

720 | 721 | GET /media/show/preview/all 722 | 723 | 724 | 725 | 726 | ### Parameters 727 | 728 | | Name | Type | Default | Description | 729 | |---------|-----------|-----------|--------------------------------------| 730 | | offset | number | | (optional) Offset from the start | 731 | | limit | number | 8 | (optional) Number of items to return. Maximum is 50. | 732 | | sortby | string | LastEpisode | (optional) possible values: LastEpisode | Title | 733 | | only | string | | (optional) Filters by attribute. Possible values: podcast | showcase | 734 | 735 | ### Returns 736 | Interface: **[mediaShowPreviewResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L37)** 737 | 738 |
739 | 740 | ## Get Single Show (Preview) 741 | 742 | 743 |

Returns reduced information about the given show.

744 | 745 | GET /media/show/preview/:id 746 | 747 | 748 | 749 | 750 | ### Parameters 751 | 752 | | Name | Type | Default | Description | 753 | |---------|-----------|-----------|--------------------------------------| 754 | | id | number | | Show ID | 755 | 756 | ### Returns 757 | Interface: **[mediaShowPreviewResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L37)** 758 | 759 |
760 | 761 | ## Get all Shows (PreviewMini) 762 | 763 | 764 |

Returns minimal information about all shows.

765 | 766 | GET /media/show/preview/mini/all 767 | 768 | 769 | 770 | 771 | ### Parameters 772 | 773 | | Name | Type | Default | Description | 774 | |---------|-----------|-----------|--------------------------------------| 775 | | sortby | string | LastEpisode | (optional) possible values: LastEpisode | Title | 776 | | only | string | | (optional) Filters by attribute. Possible values: podcast | showcase | 777 | 778 | ### Returns 779 | Interface: **[mediaShowPreviewMiniResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L49)** 780 | 781 |
782 | 783 | 784 | [Back to top](#top)
785 | 786 | --- 787 |
788 | 789 | # Playlist 790 | 791 | ## Add playlist items to playlist 792 | 793 | 794 |

Add playlist items to playlist

795 | 796 | POST /playlist/:id/addPlaylistItems 797 | 798 | 799 | 800 | 801 | ### Returns 802 | Interface: **[PlaylistItem](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L35)** 803 | 804 |
805 | 806 | ## Add playlist items to playlist by playlist type 807 | 808 | 809 |

Add playlist items to playlist by playlist type

810 | 811 | POST /playlist/addToSystemPlaylist/:playlistType 812 | 813 | 814 | 815 | 816 | ### Returns 817 | Interface: **[PlaylistItem](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L35)** 818 | 819 |
820 | 821 | ## Create new playlist 822 | 823 | 824 |

Create new playlist

825 | 826 | POST /playlist 827 | 828 | 829 | 830 | 831 | ### Returns 832 | Interface: **[Playlist](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L12)** 833 | 834 |
835 | 836 | ## Delete playlist by id 837 | 838 | 839 |

Delete playlist by id

840 | 841 | DELETE /playlist/:id 842 | 843 | 844 | 845 | 846 |
847 | 848 | ## Get all playlists 849 | 850 | 851 |

Returns all playlists

852 | 853 | GET /playlist/all 854 | 855 | 856 | 857 | 858 | ### Returns 859 | Interface: **[Playlist](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L12)** 860 | 861 |
862 | 863 | ## Get playlist by playlist ID at certain playlist index 864 | 865 | 866 |

Returns playlist by playlist ID at certain playlist index

867 | 868 | GET /playlist/:uuid/at/:playlistItemId 869 | 870 | 871 | 872 | 873 | ### Returns 874 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 875 | 876 |
877 | 878 | ## Get playlist by playlist type 879 | 880 | 881 |

Returns playlist by playlist type

882 | 883 | GET /playlist/byType/:playlistType 884 | 885 | 886 | 887 | 888 | ### Returns 889 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 890 | 891 |
892 | 893 | ## Get playlist by UUID 894 | 895 | 896 |

Returns playlist by UUID

897 | 898 | GET /playlist/:uuid 899 | 900 | 901 | 902 | 903 | ### Returns 904 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 905 | 906 |
907 | 908 | ## Get playlist items by playlist id 909 | 910 | 911 |

Returns playlist items by playlist id

912 | 913 | GET /playlist/:uuid/items 914 | 915 | 916 | 917 | 918 | ### Returns 919 | Interface: **[PlaylistItem](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L35)** 920 | 921 |
922 | 923 | ## Move playlist items on playlist 924 | 925 | 926 |

Move playlist items on playlist

927 | 928 | POST /playlist/:id/movePlaylistItems 929 | 930 | 931 | 932 | 933 | ### Returns 934 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 935 | 936 |
937 | 938 | ## Remove all playlist items from playlist by id 939 | 940 | 941 |

Remove all playlist items from playlist by id

942 | 943 | POST /playlist/:id/removePlaylistItems/all 944 | 945 | 946 | 947 | 948 | ### Returns 949 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 950 | 951 |
952 | 953 | ## Remove playlist items from playlist by id 954 | 955 | 956 |

Remove playlist items from playlist by id

957 | 958 | POST /playlist/:id/removePlaylistItems 959 | 960 | 961 | 962 | 963 | ### Returns 964 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 965 | 966 |
967 | 968 | ## Update playlist by id 969 | 970 | 971 |

Update playlist by id

972 | 973 | PUT /playlist/:id 974 | 975 | 976 | 977 | 978 | ### Returns 979 | Interface: **[CombinedPlaylistResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/playlist/PlaylistPublic.ts#L43)** 980 | 981 |
982 | 983 | 984 | [Back to top](#top)
985 | 986 | --- 987 |
988 | 989 | # RBSCVideo 990 | 991 | ## Exchange RBSC video token for signed URL token 992 | 993 | 994 |

Returns sigend url to watch video token

995 | 996 | GET /rbsc/video/token/:videoId 997 | 998 | 999 | 1000 | 1001 | ### Parameters 1002 | 1003 | | Name | Type | Default | Description | 1004 | |---------|-----------|-----------|--------------------------------------| 1005 | | videoId | string | | (optional) RBSC Video ID | 1006 | 1007 | ### Returns 1008 | Interface: **[RBSCVideoToken](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/media/MediaPublic.ts#L163)** 1009 | 1010 |
1011 | 1012 | 1013 | [Back to top](#top)
1014 | 1015 | --- 1016 |
1017 | 1018 | # RBTVEvent 1019 | 1020 | ## Get the current active RBTV Event 1021 | 1022 | 1023 |

Returns Information about the current active RBTV Event

1024 | 1025 | GET /rbtvevent/active 1026 | 1027 | 1028 | 1029 | 1030 | ### Returns 1031 | Interface: **[IRBTVEvent](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/rbtvevent.ts#L23)** 1032 | 1033 |
1034 | 1035 | ## Get RBTV Event Team Information 1036 | 1037 | 1038 |

Returns RBTV Event Team Information, restricted to active Events.

1039 | 1040 | GET /rbtvevent/team/:id 1041 | 1042 | 1043 | 1044 | 1045 | ### Returns 1046 | Interface: **[IRBTVEventTeam](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/rbtvevent.ts#L12)** 1047 | 1048 |
1049 | 1050 | ## Get joined RBTV Event Team 1051 | 1052 | 1053 |

Gets the joined Team for the given RBTV Event (which must be active in order to request these information)

1054 | 1055 | GET /rbtvevent/:slug/team 1056 | 1057 | 1058 | #### Required OAuth Scopes: ```user.rbtvevent.read``` 1059 | 1060 | 1061 | 1062 | ### Returns 1063 | Interface: **[IRBTVEventTeam](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/rbtvevent.ts#L12)** 1064 | 1065 |
1066 | 1067 | ## Join a RBTV Event Team 1068 | 1069 | 1070 |

Joins the given Team for the given Event (the event must be active)

1071 | 1072 | POST /rbtvevent/:slug/team/:id/join 1073 | 1074 | 1075 | #### Required OAuth Scopes: ```user.rbtvevent.manage``` 1076 | 1077 | 1078 | 1079 | ### Returns 1080 | Interface: **[IRBTVEventTeam](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/rbtvevent.ts#L12)** 1081 | 1082 |
1083 | 1084 | 1085 | [Back to top](#top)
1086 | 1087 | --- 1088 |
1089 | 1090 | # Schedule 1091 | 1092 | ## Get by-day schedule 1093 | 1094 | 1095 |

Returns the channel schedules für given time range

1096 | 1097 | GET /schedule 1098 | 1099 | 1100 | 1101 | 1102 | ### Parameters 1103 | 1104 | | Name | Type | Default | Description | 1105 | |---------|-----------|-----------|--------------------------------------| 1106 | | startDay | number | | Unix Timestamp | 1107 | | endDay | number | | Unix Timestamp | 1108 | | filterChannels | string[] | | list of channelIds to filter for | 1109 | 1110 | ### Returns 1111 | Interface: **[ChannelGroupSchedule](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/SchedulePublic.ts#L52)** 1112 | 1113 |
1114 | 1115 | ## Get by-day publish schedule 1116 | 1117 | 1118 |

Returns the publish schedule.

1119 | 1120 | GET /schedule/publish 1121 | 1122 | 1123 | 1124 | 1125 | ### Parameters 1126 | 1127 | | Name | Type | Default | Description | 1128 | |---------|-----------|-----------|--------------------------------------| 1129 | | from | number | | Unix Timestamp - Start Time (will be normalized to day) | 1130 | 1131 | ### Returns 1132 | Interface: **[UploadSchedule](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/SchedulePublic.ts#L63)** 1133 | 1134 |
1135 | 1136 | ## Get by-day page-ready schedule 1137 | 1138 | 1139 |

Returns the program schedule. Each day starts with the first schedule item of type 'live' or 'premiere'. Most of the time this will be "MoinMoin" at 10:30 CEST, except on weekends or when there are 'live'/'premiere' items at 0:00 CEST.

1140 | 1141 | GET /schedule/normalized 1142 | 1143 | 1144 | 1145 | 1146 | ### Parameters 1147 | 1148 | | Name | Type | Default | Description | 1149 | |---------|-----------|-----------|--------------------------------------| 1150 | | startDay | number | | Unix Timestamp - Start Tim | 1151 | | endDay | number | startDay+(7*86400) | (optional) Unix timestamp - End Date | 1152 | 1153 | ### Returns 1154 | Interface: **[schedule](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/SchedulePublic.ts#L47)** 1155 | 1156 |
1157 | 1158 | 1159 | [Back to top](#top)
1160 | 1161 | --- 1162 |
1163 | 1164 | # ScheduleLegacy 1165 | 1166 | ## Get current running show 1167 | 1168 | 1169 |

Returns the current running/scheduled show
Drop-in replacement for http://api.rocketmgmt.de/[1.1/]schedule/current

1170 | 1171 | GET /schedule/legacy/current 1172 | 1173 | 1174 | 1175 | 1176 | ### Returns 1177 | Interface: **[ILegacyMGMTScheduleItem](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/ScheduleLegacyPublic.ts#L6)** 1178 | 1179 |
1180 | 1181 | ## Get current week schedule 1182 | 1183 | 1184 |

Returns the schedule of the current week, not grouped as Array
Drop-in replacement for http://api.rocketmgmt.de/[1.1/]schedule

1185 | 1186 | GET /schedule/legacy 1187 | 1188 | 1189 | 1190 | 1191 | ### Returns 1192 | Interface: **[LegacyMGMTScheduleListResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/ScheduleLegacyPublic.ts#L25)** 1193 | 1194 |
1195 | 1196 | ## Get current week schedule grouped by day 1197 | 1198 | 1199 |

Returns the schedule of the current week, grouped by day
Drop-in replacement for http://api.rocketmgmt.de/[1.1/]schedule/weekdays

1200 | 1201 | GET /schedule/legacy/weekdays 1202 | 1203 | 1204 | 1205 | 1206 | ### Returns 1207 | Interface: **[LegacyMGMTScheduleByDayResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/ScheduleLegacyPublic.ts#L26)** 1208 | 1209 |
1210 | 1211 | ## Get the next n scheduled shows 1212 | 1213 | 1214 |

Returns the next n scheduled shows, not grouped as Array
Drop-in replacement for http://api.rocketmgmt.de/[1.1/]schedule/next/:items

1215 | 1216 | GET /schedule/legacy/next/:items 1217 | 1218 | 1219 | 1220 | 1221 | ### Returns 1222 | Interface: **[LegacyMGMTScheduleListResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/schedule/ScheduleLegacyPublic.ts#L25)** 1223 | 1224 |
1225 | 1226 | 1227 | [Back to top](#top)
1228 | 1229 | --- 1230 |
1231 | 1232 | # Shop 1233 | 1234 | ## Get All Products 1235 | 1236 | 1237 |

Returns information about all shop products.

1238 | 1239 | GET /simpleshop/product/all 1240 | 1241 | 1242 | 1243 | 1244 | ### Parameters 1245 | 1246 | | Name | Type | Default | Description | 1247 | |---------|-----------|-----------|--------------------------------------| 1248 | | offset | number | | (optional) Offset from the start | 1249 | | limit | number | 8 | (optional) Number of items to return. Maximum is 50. | 1250 | 1251 | ### Returns 1252 | Interface: **[simpleShopItem](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/simpleshop/SimpleShopPublic.ts#L4)** 1253 | 1254 |
1255 | 1256 | 1257 | [Back to top](#top)
1258 | 1259 | --- 1260 |
1261 | 1262 | # StreamCount 1263 | 1264 | ## Get Current Viewer Count 1265 | 1266 | 1267 |

Returns information about the current viewers. Contains seperate numbers for Youtube, Twitch, and combined.

1268 | 1269 | GET /streamcount 1270 | 1271 | 1272 | 1273 | 1274 | ### Returns 1275 | Interface: **[streamCount](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/shared/stream.ts#L11)** 1276 | 1277 |
1278 | 1279 | 1280 | [Back to top](#top)
1281 | 1282 | --- 1283 |
1284 | 1285 | # Tag 1286 | 1287 | ## Add tag to existing media episode 1288 | 1289 | 1290 |

Add tag to existing media episode

1291 | 1292 | POST /tags/add/:tagId 1293 | 1294 | 1295 | 1296 | 1297 | ### Returns 1298 | Interface: **[AddTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L87)** 1299 | 1300 |
1301 | 1302 | ## Create new tag with name and optionally pin it to media episode 1303 | 1304 | 1305 |

Create new tag

1306 | 1307 | POST /tags 1308 | 1309 | 1310 | 1311 | 1312 | ### Returns 1313 | Interface: **[CreateTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L36)** 1314 | 1315 |
1316 | 1317 | ## Delete tag 1318 | 1319 | 1320 |

Deletes tag with given tag id

1321 | 1322 | DELETE /tags/:tagId 1323 | 1324 | 1325 | 1326 | 1327 | ### Returns 1328 | Interface: **[DeleteTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L114)** 1329 | 1330 |
1331 | 1332 | ## Get all tags 1333 | 1334 | 1335 |

Returns all tags

1336 | 1337 | GET /tags/all 1338 | 1339 | 1340 | 1341 | 1342 | ### Returns 1343 | Interface: **[GetAllTagsResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L50)** 1344 | 1345 |
1346 | 1347 | ## Get tags by partial name / media episode 1348 | 1349 | 1350 |

Searches for tag names starting with name parameter OR tags linked to media episode id parameter

1351 | 1352 | GET /tags 1353 | 1354 | 1355 | 1356 | 1357 | ### Returns 1358 | Interface: **[GetTagsResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L44)** 1359 | 1360 |
1361 | 1362 | ## Hide tag on existing media episode 1363 | 1364 | 1365 |

Hide tag on media episode

1366 | 1367 | POST /tags/hide/:tagId 1368 | 1369 | 1370 | 1371 | 1372 | ### Returns 1373 | Interface: **[HideTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L101)** 1374 | 1375 |
1376 | 1377 | ## Pin tag to existing media item 1378 | 1379 | 1380 |

Pins tag to existing media episode

1381 | 1382 | POST /tags/pin/:tagId 1383 | 1384 | 1385 | 1386 | 1387 | ### Returns 1388 | Interface: **[PinTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L73)** 1389 | 1390 |
1391 | 1392 | ## Remove tag from existing media episode 1393 | 1394 | 1395 |

Remove tag fromn media episode

1396 | 1397 | POST /tags/remove/:tagId 1398 | 1399 | 1400 | 1401 | 1402 | ### Returns 1403 | Interface: **[RemoveTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L94)** 1404 | 1405 |
1406 | 1407 | ## Unhide tag on existing media episode 1408 | 1409 | 1410 |

Un-hide tag on media item

1411 | 1412 | POST /tags/unhide/:tagId 1413 | 1414 | 1415 | 1416 | 1417 | ### Returns 1418 | Interface: **[UnhideTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L108)** 1419 | 1420 |
1421 | 1422 | ## Unpin tag from existing media episode 1423 | 1424 | 1425 |

Unpins tag from existing media episode

1426 | 1427 | POST /tags/unpin/:tagId 1428 | 1429 | 1430 | 1431 | 1432 | ### Returns 1433 | Interface: **[UnpinTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L80)** 1434 | 1435 |
1436 | 1437 | ## Update tag 1438 | 1439 | 1440 |

Update tag details

1441 | 1442 | PUT /tags/:tagId 1443 | 1444 | 1445 | 1446 | 1447 | ### Returns 1448 | Interface: **[UpdateTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L58)** 1449 | 1450 |
1451 | 1452 | ## Vote for tag 1453 | 1454 | 1455 |

Vote for tag

1456 | 1457 | PUT /tags/vote/:tagId 1458 | 1459 | 1460 | 1461 | 1462 | ### Returns 1463 | Interface: **[VoteTagResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/tags/TagsPublic.ts#L66)** 1464 | 1465 |
1466 | 1467 | 1468 | [Back to top](#top)
1469 | 1470 | --- 1471 |
1472 | 1473 | # User 1474 | 1475 | ## Request own User Information 1476 | 1477 | 1478 |

Returns information about the current user, amount of Information depends on requested Scopes.

1479 | 1480 | GET /user/self 1481 | 1482 | 1483 | #### Required OAuth Scopes: ```user.info``` 1484 | 1485 | 1486 | 1487 | ### Returns 1488 | Interface: **[entityUserResponse](https://github.com/rocketbeans/rbtv-apidoc/blob/a47ea4f388675d6d9c338be75396c4d19933030a/response/user/UserPublic.ts#L40)** 1489 | 1490 |
1491 | 1492 | 1493 | [Back to top](#top)
1494 | 1495 | --- 1496 |
1497 | -------------------------------------------------------------------------------- /doc/OAuth & Authorization.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketbeans/rbtv-apidoc/77aa4e56f2955c10ec87b4d2a1881fe39ec5a7f2/doc/OAuth & Authorization.md -------------------------------------------------------------------------------- /doc/Websocket.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rocketbeans/rbtv-apidoc/77aa4e56f2955c10ec87b4d2a1881fe39ec5a7f2/doc/Websocket.md -------------------------------------------------------------------------------- /index.ts: -------------------------------------------------------------------------------- 1 | export * from "./shared" 2 | export * from "./response" 3 | export * from "./socket" 4 | -------------------------------------------------------------------------------- /response/auth/AuthPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | import { token } from "../../shared/" 3 | import { UserExternalAuthProviderType } from ".."; 4 | 5 | export interface authSuccessResponse { 6 | token: token; 7 | refreshToken: token; 8 | }; 9 | 10 | export interface authRequestTokenResponse { 11 | token: token; 12 | }; 13 | 14 | export interface authVerifyRefreshTokenResponse { 15 | refreshToken: token; 16 | }; 17 | 18 | export interface authVerifyToken { 19 | token: token; 20 | }; 21 | 22 | export interface authProvider { 23 | name: string; 24 | publicName: string; 25 | available: boolean; 26 | type: UserExternalAuthProviderType; 27 | sortPrio: number; 28 | }; 29 | 30 | export const enum UserExternalAuthVerifyResult { 31 | FAIL = 0, 32 | SUCCESS = 1, // -> tokens 33 | SETUP_REQUIRED = 2, 34 | FAIL_BLOCKED = 3, // user blocked 35 | FAIL_OTHER = 4, 36 | SECONDFACTOR_REQ = 5, 37 | ATTACHED = 6, 38 | FAIL_ATTACHED_OTHER_ACC = 7, 39 | FAIL_PROVIDER_ERROR = 8, 40 | FAIL_NEED_REAUTH = 9 // needs re-authentication 41 | }; 42 | 43 | export interface UserExternalAuthVerifyFailNeedReauthResponse { 44 | result: UserExternalAuthVerifyResult; 45 | url: string; // target url 46 | }; 47 | 48 | export interface UserExternalAuthVerifyFailProviderErrorResponse { 49 | result: UserExternalAuthVerifyResult; 50 | reason: string; // Example: "access_denied" 51 | description: string | null; // OPTIONAL: Example: "The resource owner or authorization server denied the request" 52 | url: string | null; // OPTIONAL: A URI identifying a human-readable web page with information about the error 53 | }; 54 | 55 | export interface UserExternalAuthVerifyFailResponse { 56 | result: UserExternalAuthVerifyResult; 57 | }; 58 | 59 | export interface UserExternalAuthVerifySuccessResponse { 60 | result: UserExternalAuthVerifyResult; 61 | navigationTarget: string | null; 62 | token: token | null; 63 | refreshToken: token | null; 64 | }; 65 | 66 | export interface UserExternalAuthVerifySetupRequiredResponse { 67 | result: UserExternalAuthVerifyResult; 68 | displayName: string | null; 69 | email: string | null; 70 | }; 71 | 72 | export interface UserExternalAuthVerifyAttachedResponse { 73 | result: UserExternalAuthVerifyResult; 74 | navigationTarget: string | null; 75 | }; 76 | 77 | export interface UserExternalAuthRegistrationSuccessResponse { 78 | navigationTarget: string | null; 79 | token: token | null; 80 | refreshToken: token | null; 81 | }; -------------------------------------------------------------------------------- /response/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./AuthPublic" 2 | -------------------------------------------------------------------------------- /response/blog/BlogPublic.ts: -------------------------------------------------------------------------------- 1 | import { Image, link } from "../../shared"; 2 | import { bohnePortrait } from "../../shared"; 3 | import { IRaffleTeaser } from "../../shared"; 4 | 5 | export namespace ApiUrl { 6 | export const BlogAll = "/v1/blog/all"; 7 | export const BlogAllV1 = "/v1/blog/all"; 8 | } 9 | 10 | 11 | // Category Support: 12 | export interface blogCategory { 13 | id: string; 14 | visibleName: string; 15 | color: string; 16 | }; 17 | 18 | 19 | // Used In Admin (Full Response) 20 | export interface blogResponse { 21 | id: number; 22 | title: string; 23 | subtitle: string; 24 | contentMK?: string; 25 | contentHTML?: string; 26 | 27 | isDisabled: boolean; 28 | publishDate: Date; 29 | createDate: Date; 30 | lastChangeDate: Date; 31 | authors: bohnePortrait[] | number[]; 32 | titleImage: Array | string; // Type string is management only 33 | thumbImage: Array | string; // Type string is management only 34 | links: Array; 35 | 36 | // Promo Extension 37 | isVisibleInPromo: boolean; 38 | promoImage: Array | string; // Type string is management only 39 | 40 | // CI Extension 41 | ciIsVisible?: boolean; 42 | ciSubtitle?: string; 43 | 44 | // Sponsored Posts Flag Feature 45 | isSponsored: boolean; 46 | 47 | // Category 48 | category: blogCategory | string; // can be null, string incase of admin / post creation, must be category ID 49 | 50 | // Raffles 51 | raffles: Array | Array | null; // can be null, number incase of admin / post creation, must be raffleID 52 | }; 53 | 54 | export interface blogPreviewResponse { 55 | id: number; 56 | title: string; 57 | subtitle: string; 58 | publishDate: Date; 59 | authors: bohnePortrait[]; 60 | thumbImage: Array; 61 | promoImage: Array; 62 | isSponsored: boolean; 63 | category: blogCategory; // can be null 64 | }; 65 | 66 | export interface blogPostCreatedResponse { 67 | id: number; 68 | }; 69 | 70 | 71 | -------------------------------------------------------------------------------- /response/blog/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./BlogPublic" 2 | -------------------------------------------------------------------------------- /response/bohne/BohnePublic.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Staff Related Extended User info & Data 3 | // 4 | import { link, Image } from "../../shared"; 5 | 6 | export interface bohneResponse { 7 | mgmtid: number; 8 | nickname?: string; // DEPRECATED - DO NOT USE - WILL GET REMOVED IN THE FUTURE - USE shortName OR computedName INSTEAD 9 | firstname?: string; // DEPRECATED - DO NOT USE - WILL GET REMOVED IN THE FUTURE - USE shortName OR computedName INSTEAD 10 | lastname?: string; // DEPRECATED - DO NOT USE - WILL GET REMOVED IN THE FUTURE - USE shortName OR computedName INSTEAD 11 | shortName: string; 12 | computedName: string; 13 | contentMK?: string; 14 | contentHTML?: string; 15 | portraitImage: Array | string; // Type string is management only 16 | public: boolean; 17 | listed?: boolean; // Admin: false = will not be reported in /all endpoints 18 | showreelURL?: string; 19 | links: Array; 20 | role: string; 21 | episodeCount?: number; 22 | sortPrio?: number; 23 | isSubscribed?: boolean; 24 | userid?: number | null; // [admin only] - relating rocketbeans.tv user 25 | }; 26 | -------------------------------------------------------------------------------- /response/bohne/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./BohnePublic" 2 | -------------------------------------------------------------------------------- /response/channel/ChannelPublic.ts: -------------------------------------------------------------------------------- 1 | import { bohnePortrait, Image, streamInfoShow } from "../../shared"; 2 | 3 | export type ServiceType = 'twitch' | 'youtube'; 4 | export type ChannelGroupType = 'main' | 'talent' | 'guest'; 5 | 6 | export interface Channel { 7 | mgmtId: number; 8 | channelGroupId: number; // channel identifier, such as rocketbeanstv or bonjwa 9 | name: string; // channel name 10 | title: string; // public name, such as "Twitch" or "Bonjwa Twitch" 11 | url: string; // public url to service (suchas twitch channel url) 12 | serviceType: ServiceType; 13 | platformId: string; // Service-specific unique identifier, twitch = channelid 14 | platformIcon: string; // url to the plattform id 15 | platformThumbnail: string; // url to the plattform thumbnail 16 | ytToken?: string; // if service type youtube this is the stream token 17 | ytLiveChatId?: string; // if service type youtube this is the live chat id 18 | twitchChannel?: string; // if service type twitch this is the twitch channel name (e.g. rocketbeanstv) 19 | currentGame?: string; // name of the game currently played on the stream 20 | currentlyLive: boolean; // is the stream currently streaming 21 | viewers: number; // current number of viewers (updated every 20s) 22 | }; 23 | 24 | export interface ChannelGroupIcon { 25 | [dimensions: string]: string; 26 | }; 27 | 28 | export interface ChannelGroup { 29 | mgmtId: number; // channel group identifier, such as rocketbeanstv or bonjwa 30 | type: ChannelGroupType; 31 | name: string; 32 | description?: string; // channel description 33 | channelGroupIcon: Array; // custom channel icon (mgmt) 34 | channels?: Channel[]; 35 | bohnen?: Array; // list of bohnen participating in the stream 36 | currentlyInMainContext: boolean; 37 | priority: number; 38 | }; 39 | 40 | export interface ChannelGroupStream { 41 | channelGroup: ChannelGroup, 42 | streamInfoShow: streamInfoShow 43 | }; 44 | 45 | export type ChannelGroupInfo = Array; 46 | -------------------------------------------------------------------------------- /response/channel/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ChannelPublic' 2 | -------------------------------------------------------------------------------- /response/cms/CMSPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface cmsPageResponse { 3 | id: string; 4 | title: string; 5 | contentMK?: string; 6 | contentHTML?: string; 7 | isPublic?: boolean; 8 | createDate?: Date; 9 | lastChangeDate: Date; 10 | }; 11 | 12 | export interface cmsRouteResponse { 13 | route: string; 14 | page: string; 15 | isWildcard: boolean; 16 | isActive?: boolean; 17 | }; 18 | -------------------------------------------------------------------------------- /response/cms/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./CMSPublic" 2 | -------------------------------------------------------------------------------- /response/donation/DonationPublic.ts: -------------------------------------------------------------------------------- 1 | export enum UserDonationStatus { 2 | NEW, 3 | INCOMPLETE, 4 | COMPLETE 5 | }; 6 | 7 | export interface DonationCampaign { 8 | id: number; 9 | name: string; 10 | description?: string; 11 | returnURL?: string; 12 | stats?: DonationCampaignStats; 13 | }; 14 | 15 | export interface UserDonation { 16 | id: string; 17 | donationLink: string; 18 | donationCampaign: DonationCampaign; 19 | amount: number; 20 | message?: string; 21 | status: UserDonationStatus; 22 | created: Date; 23 | updated: Date; 24 | }; 25 | 26 | export interface DonationCampaignStats { 27 | campaignId: number; 28 | numDonations: number; 29 | total: number; 30 | }; 31 | -------------------------------------------------------------------------------- /response/donation/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./DonationPublic"; 2 | -------------------------------------------------------------------------------- /response/frontend/FrontendPublic.ts: -------------------------------------------------------------------------------- 1 | import { cmsRouteResponse, authProvider, ChannelGroupInfo } from "../"; 2 | 3 | export interface websocketParameters { 4 | url: string; 5 | path: string; 6 | }; 7 | 8 | export interface frontendInitResponse { 9 | routes: cmsRouteResponse[]; 10 | authProviders: authProvider[]; 11 | websocket: websocketParameters; 12 | channelGroupInfo: ChannelGroupInfo; 13 | recaptchaSiteKey: string; 14 | pageTheme: string; 15 | randomYoutubeApiKey: string; 16 | frontendVersion: number; // recommended frontend version 17 | vapidPublicKey?: string; 18 | applePushId?: string; 19 | videoProgressUpdateInterval: number; // time in ms between progress update messages 20 | }; 21 | -------------------------------------------------------------------------------- /response/frontend/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./FrontendPublic" 2 | -------------------------------------------------------------------------------- /response/generic/RedirectResponse.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export interface genericRedirectResponse { 4 | destUrl: string; 5 | } 6 | -------------------------------------------------------------------------------- /response/generic/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./RedirectResponse" 2 | -------------------------------------------------------------------------------- /response/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./auth" 3 | export * from "./user" 4 | export * from "./blog" 5 | export * from "./bohne" 6 | export * from "./schedule" 7 | export * from "./cms" 8 | export * from "./frontend" 9 | export * from "./media" 10 | export * from "./search" 11 | export * from "./subscription" 12 | export * from "./simpleshop" 13 | export * from "./generic" 14 | export * from "./oauth" 15 | export * from "./mediacenter" 16 | export * from "./tags" 17 | export * from "./playlist" 18 | export * from "./channel" 19 | export * from "./notification" 20 | export * from "./donation" 21 | -------------------------------------------------------------------------------- /response/media/MediaPublic.ts: -------------------------------------------------------------------------------- 1 | import { Image, link, bohnePortrait, tMediaType } from "../../shared"; 2 | 3 | // 4 | // Show 5 | // 6 | export interface mediaShowPodcastInfo { 7 | feedUrl: string; 8 | soundcloudId: string; 9 | itunesUrl: string; 10 | spotifyUrl: string; 11 | podigeeUrl: string; 12 | lastEpisodeDate: Date; 13 | }; 14 | 15 | export interface mediaShowResponse { 16 | id: number; 17 | title: string; 18 | description: string; 19 | genre: string; 20 | duration: number; 21 | isExternal: boolean; 22 | isTruePodcast: boolean; 23 | isPodcastHighlight: boolean; 24 | thumbnail: Array; 25 | backgroundImage?: Array; 26 | slideshowImages: Array>; 27 | links: Array; 28 | hosts?: Array; 29 | seasons: Array; 30 | hasUnsortedEpisodes: boolean; // true if the show has episodes that are not linked to a season :( 31 | lastEpisode: mediaEpisodeCombinedResponse; 32 | podcast: mediaShowPodcastInfo; 33 | statusPublicNote: string; 34 | isSubscribed?: boolean; 35 | }; 36 | 37 | export interface mediaShowPreviewResponse { 38 | id: number; 39 | title: string; 40 | genre: string; 41 | isExternal: boolean; 42 | isTruePodcast: boolean; 43 | isPodcastHighlight: boolean; 44 | thumbnail: Array; 45 | hasPodcast: boolean; 46 | isSubscribed?: boolean; 47 | }; 48 | 49 | export interface mediaShowPreviewMiniResponse { 50 | id: number; 51 | title: string; 52 | thumbnail: Array; 53 | }; 54 | 55 | // 56 | // Season 57 | // 58 | 59 | export interface mediaSeasonResponse { 60 | id: number; 61 | showId: number; 62 | name?: string; 63 | numeric: number; 64 | thumbnail: Array; 65 | podcastId: number; 66 | }; 67 | 68 | 69 | // 70 | // Episode 71 | // 72 | 73 | export interface videoToken { 74 | id: number; 75 | mediaEpisodeId: number; 76 | token: string; 77 | type: 'youtube' | 'twitch' | 'rbsc' | 'unknown'; 78 | length: number; 79 | } 80 | 81 | export interface mediaEpisode { 82 | id: number; 83 | showId: number; 84 | showName: string; 85 | seasonId?: number; 86 | episode?: number; 87 | title: string; 88 | description: string; 89 | thumbnail: Array; 90 | links: Array; 91 | hosts: Array; // Array of MGMTID 92 | tokens: Array; 93 | distributionPublishingDate: Date; 94 | firstBroadcastdate?: Date; 95 | duration: number; // seconds 96 | prev?: mediaEpisodePreview; 97 | next?: mediaEpisodePreview; 98 | isAvailable: boolean; // true if distributionPublishingDate < now() && tokens.length > 0 99 | }; 100 | 101 | export interface mediaEpisodePreview { 102 | id: number; 103 | title: string; 104 | showId: number; 105 | showName: string; 106 | thumbnail: Array; 107 | hosts: Array; // Array of MGMTID 108 | tokens: Array; 109 | distributionPublishingDate: Date; 110 | firstBroadcastdate?: Date; 111 | duration: number; 112 | isAvailable: boolean; // true if distributionPublishingDate < now() && tokens.length > 0 113 | } 114 | 115 | export interface TokenProgress { 116 | tokenId: number; 117 | progress: number; 118 | total: number; 119 | watched: boolean; 120 | } 121 | 122 | export interface mediaEpisodeProgress { 123 | lastSeenTokenId?: number; 124 | watched: boolean; 125 | tokenProgress: Array; 126 | } 127 | 128 | export interface mediaEpisodePreviewCombinedResponse { 129 | bohnen: { [mgmtid: number]: bohnePortrait }; 130 | episodes: Array; 131 | progress?: { [episodeid: number]: mediaEpisodeProgress }; // User Specific Episode Progress; Will be sent if authenticated 132 | } 133 | 134 | export interface mediaEpisodeCombinedResponse { 135 | bohnen: { [mgmtid: number]: bohnePortrait }; 136 | episodes: Array; 137 | progress?: { [episodeid: number]: mediaEpisodeProgress }; // User Specific Episode Progress; Will be sent if authenticated 138 | } 139 | 140 | export interface mediaEpisodeRandomVideoResponse { 141 | episodeId: number; 142 | } 143 | 144 | // 145 | // PromoBox 146 | // 147 | export interface mediaPromoBoxContent { 148 | id: number; 149 | set: number; 150 | date: Date; 151 | visibleUntil?: Date; 152 | image: Array | string; // Type string is management only 153 | title: string; 154 | subtitle: string; 155 | link: string; 156 | type: tMediaType; 157 | } 158 | 159 | export interface mediaCurrentPromoBoxResponse { 160 | content: mediaPromoBoxContent[]; 161 | } 162 | 163 | export interface RBSCVideoToken { 164 | signedToken: string; 165 | validUntil: Date; 166 | } 167 | -------------------------------------------------------------------------------- /response/media/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./MediaPublic" 2 | -------------------------------------------------------------------------------- /response/mediacenter/MediacenterPublic.ts: -------------------------------------------------------------------------------- 1 | import { ImageType, Image } from "../../"; 2 | 3 | export interface IMediacenterImage { 4 | id: string; 5 | alt: string | null; 6 | caption: string | null; 7 | type: ImageType; 8 | tags?: Array | null; // Management only, not exposed to public response 9 | image: Array; 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /response/mediacenter/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./MediacenterPublic" 2 | -------------------------------------------------------------------------------- /response/oauth/OAuthPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Image } from "../../shared/"; 3 | 4 | export const enum OAuthScopeSeverity { 5 | DONTCARE, 6 | WARN, 7 | CRITICAL 8 | }; 9 | 10 | export interface OAuthApp { 11 | id?: string; 12 | public: boolean; 13 | name: string; 14 | description: string; 15 | redirectURLs: Array; 16 | icon: Array | string | null; 17 | terms: string; 18 | scopes: Array; 19 | ownerid?: number; // Owner user id, admin only 20 | }; 21 | 22 | export interface OAuthAppPreview { 23 | id: string; 24 | name: string; 25 | description: string; 26 | public: boolean; 27 | }; 28 | 29 | 30 | export interface OAuthScope { 31 | name: string; 32 | publicName: string; 33 | description: string; 34 | severity: OAuthScopeSeverity; 35 | special: boolean; 36 | permissions?: Array; // Admin Only 37 | }; 38 | 39 | export const enum OAuthAuthResponseType { 40 | REDIRECT = 0, 41 | ERROR = 1, 42 | AUTHORIZATION = 2 43 | }; 44 | 45 | export interface OAuthAuthResponse { 46 | type: OAuthAuthResponseType; 47 | }; 48 | 49 | export interface OAuthAuthRedirectResponse extends OAuthAuthResponse { 50 | destination: string; // Destination URL, GET. 51 | }; 52 | 53 | export interface OAuthAuthErrorResponse extends OAuthAuthResponse { 54 | code: number; 55 | message: string; 56 | }; 57 | 58 | export interface OAuthAuthAppInfo { 59 | name: string; 60 | description: string; 61 | icon: Array; 62 | terms: string; 63 | }; 64 | 65 | export interface OAuthAuthScopeInfo { 66 | publicName: string; 67 | description: string; 68 | severity: OAuthScopeSeverity; 69 | }; 70 | 71 | export const enum OAuthAuthAuthorizationReason { 72 | NOAUTH = 0, // User has never granted permission 73 | TERMS_CHANGED = 1, // Terms changed 74 | SCOPES_CHANGED = 2 // App requests more scopes than the user has acknowledeged yet 75 | }; 76 | 77 | export interface OAuthAuthAuthorizationResponse extends OAuthAuthResponse { 78 | reason: OAuthAuthAuthorizationReason; 79 | app: OAuthAuthAppInfo; 80 | scopes: Array; 81 | }; 82 | 83 | export interface OAuthAuthorizationListItem { 84 | id: number; 85 | date: Date; 86 | app: OAuthAuthAppInfo; 87 | scopes: Array; 88 | }; 89 | 90 | export interface OAuthPendingVerificationRequestItem { 91 | date: Date; 92 | userId: number; 93 | displayName: string; 94 | numApps: number; 95 | }; 96 | 97 | export interface OAuthPendingVerificationRequestRejectRequest { 98 | reason: string; 99 | }; 100 | 101 | export interface OAuthPendingVerificationRequestAcknowledgeRequest { 102 | }; 103 | 104 | -------------------------------------------------------------------------------- /response/oauth/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./OAuthPublic" 2 | -------------------------------------------------------------------------------- /response/playlist/PlaylistPublic.ts: -------------------------------------------------------------------------------- 1 | import { Image } from "../../shared"; 2 | import { mediaEpisodePreview, mediaEpisodeProgress } from "../media"; 3 | 4 | export enum PlaylistType { 5 | CUSTOM = "custom" as any, // Von der User*in selbst erzeugte Playlist 6 | ABO_BOX = "abobox" as any, // Standard abo box Playlist, die für jede(n) User*in bei der Acc-Erstellung erzeugt wird 7 | WATCH_LATER = "watchlater" as any, // Standard watch later Playlist, die für jede(n) User*in bei der Acc-Erstellung erzeugt wird 8 | WATCH_HISTORY = "watchhistory" as any, // Standard watch history Playlist, die für jede(n) User*in bei der Acc-Erstellung erzeugt wird 9 | FILTER = "filter" as any // Playlist, die aus einem Suchfilter erzeugt wurde / wird 10 | } 11 | 12 | export interface Playlist { 13 | id?: number; 14 | uuid: string; 15 | name: string; // Name der Playlist: max 128 chars. 16 | description?: string; // Beschreibungstext: max 256 chars. 17 | thumbnailMediaId?: number; // ID der z.B. Episode, aus der die thumpnails stammen. 18 | thumbnail?: Array; // Thumbnails einer, aus der Playlist stammenden, z.B. Episode (siehe thumbnailMediaId). 19 | icon?: string; // CSS icon name for systemGenerated lists 20 | createDate: Date; // Datum/Uhrzeit wann die Playlist erstellt wurde. 21 | lastUpdated: Date; // Datum/Uhrzeit wann die Playlist zuletzt bearbeitet wurde. 22 | isPublic: boolean; // Ist die Playlist für jede User*in oder nur für die Owner*in selbst sichtbar? 23 | ownerName: string; // Username des Listenerstellers. 24 | insertItemAt: InsertItemAt; // Wo sollen neue Media Items in die Playlist eingefügt werden? 25 | sortType: SortType; // Gibt an, nach welchem Feld (z.B. Name) die Liste zuletzt sortiert wurde / in Zukunft sortiert werden soll. 26 | systemGenerated: boolean; // Liste ist vom System genereiert. 27 | playlistType: PlaylistType; // Typ der Playlist: custom (Eigene Playlist) | abobox | watchlater | watchhistory (Nutzerspezifische system Playlisten) 28 | editPlaylist: boolean; // User*in kann playlist selbst editieren. 29 | editPlaylistItem: boolean; // User*in kann playlist items editieren. 30 | deletePlaylistItem: boolean; // User*in kann playlist items entfernen. 31 | mediaEpisodeIncluded?: boolean; // Gibt an ob bei z.B. get /all die angegebene media id in der Playlist enthalten ist. 32 | muteNotifications: boolean; // Falls true, werden Notifications an den Nutzer bzgl. Listenänderungen unterdrückt. 33 | }; 34 | 35 | export interface PlaylistItem { 36 | id?: number; 37 | order: number; // Listenindex 38 | addedDate: Date; // Wann wurde das Item zur Liste hinzugefügt? 39 | mediaEpisode: mediaEpisodePreview; // Eigentliche Episode 40 | progress?: mediaEpisodeProgress; // Fortschritt, den die User*in bei diesem Video erreicht hat. 41 | }; 42 | 43 | export interface CombinedPlaylistResponse { // Nur bei GetPlaylistById type of Endpunkt 44 | found?: boolean; // Only when getting a playlist page by item at index 45 | playlist: Playlist; 46 | playlistItems: PlaylistItem[]; 47 | pagination: { // Pagination parameters der ersten Page 48 | limit: number; 49 | offset: number; 50 | total: number; 51 | }; 52 | }; 53 | 54 | export enum InsertItemAt { 55 | FRONT = 'front' as any, // Füge neue Mediaitems am Anfang der Liste ein 56 | BACK = 'back' as any // Füge neue Mediaitems am Endeder Liste ein 57 | }; 58 | 59 | export enum SortType { // Gibt an, nach welchem Feld (z.B. Name) die Liste zuletzt sortiert wurde / in Zukunft sortiert werden soll. 60 | // Neue PlaylistItems können so, korrekt in die Liste eingefügt werden. 61 | MANUAL = 'manual' as any, // Nutzer hat die Sortierung der Liste manuell angepasst. 62 | // Die aktuelle Sortierung nicht wird durch die API nicht verändert. 63 | EPISODE_ASC = 'episodeASC' as any, // Sortiert die Liste nach Episodennummer (S01E02, S01E03 ...) ASC 64 | EPISODE_DSC = 'episodeDSC' as any, // -- * -- Episodennummer (S01E02, S01E03 ...) DSC 65 | RELEASE_ASC = 'releaseASC' as any, // -- * -- Releasedatum ASC 66 | RELEASE_DSC = 'releaseDSC' as any, // -- * -- Releasedatum DSC 67 | ADDED_ASC = 'addedASC' as any, // -- * -- Datum an dem die jeweiligen Items zur Liste hinzugefügt ASC 68 | ADDED_DSC = 'addedDSC' as any // -- * -- Datum an dem die jeweiligen Items zur Liste hinzugefügt DSC 69 | }; 70 | 71 | export interface CreatePlaylistRequest { 72 | name: string; 73 | description?: string; 74 | thumbnailMediaId?: number; 75 | mediaEpisodeId?: number; 76 | isPublic: boolean; 77 | insertItemAt: InsertItemAt; 78 | sortType: SortType; 79 | systemGenerated: boolean; 80 | editPlaylist?: boolean; 81 | editPlaylistItem?: boolean; 82 | deletePlaylistItem?: boolean; 83 | muteNotifications: boolean; 84 | }; 85 | 86 | export interface GetPlaylistRequest { 87 | }; 88 | 89 | export enum SortPlaylistsBy { 90 | NAME_ASC = 'nameASC' as any, 91 | NAME_DESC = 'nameDESC' as any, 92 | CREATED_DATE_ASC = 'createDateASC' as any, 93 | CREATED_DATE_DESC = 'createDateDESC' as any, 94 | LAST_UPDATED_ASC = 'lastUpdatedASC' as any, 95 | LAST_UPDATED_DESC = 'lastUpdatedDESC' as any 96 | } 97 | 98 | export interface GetAllPlaylistsRequest { // Paginated 99 | includeGenerated?: boolean; // Falls true, werden zusätzlich system generierte Playlists ausgegeben. 100 | includeReadOnly?: boolean; // Falls true, werden zusätzlich Playlists ausgegeben, die die User*in nicht editieren kann. 101 | includesEpisode?: number; // Prüfe ebenfalls, ob angegebene Episode in der Playlist bereits vorhanden ist. 102 | orderBy?: SortPlaylistsBy; // Sortiere Playlisten nach SortPlaylistsBy 103 | }; 104 | 105 | export interface GetPlaylistItemsRequest { // Paginated 106 | sortType?: SortType; // Sortiert PlaylistItems (default zu sortType in Playlist) 107 | }; 108 | 109 | export interface UpdatePlaylistRequest { 110 | name?: string; 111 | description?: string; 112 | thumbnailMediaId?: number; 113 | isPublic?: boolean; 114 | insertItemAt?: InsertItemAt; 115 | sortType?: SortType; 116 | readOnly?: boolean; 117 | muteNotifications?: boolean; 118 | editPlaylist?: boolean; 119 | editPlaylistItem?: boolean; 120 | deletePlaylistItem?: boolean; 121 | }; 122 | 123 | export interface AddPlaylistItemsRequest { 124 | afterItemId?: number; // PlaylistItemId, nachdem die PlaylistItems eingefügt werden sollen. 125 | mediaEpisodes: number[]; // Liste der Episoden IDs, die zur Playlist hinzugefügt werden sollen. 126 | }; 127 | 128 | export interface MovePlaylistItemsRequest { 129 | afterItemId: number; // PlaylistItem ID, nachdem die PlaylistItems eingefügt werden sollen. 130 | playlistItemIds: number[]; // Liste der PlaylistItem IDs, die in der Playlist verschoben werden sollen. 131 | offset?: number; // Pagination parameter die angeben, welche seite nach der muatation zurückgegeben werden soll. 132 | limit?: number; // Pagination parameter die angeben, welche seite nach der muatation zurückgegeben werden soll. 133 | }; 134 | 135 | export interface RemoveAllPlaylistItemsRequest { 136 | }; 137 | 138 | export interface RemovePlaylistItemsRequest { 139 | playlistItemIds: number[]; // Liste der PlaylistItem IDs, die von der Playlist entfernt werden sollen. 140 | mediaEpisodeIds: number[]; // Liste der Episoden IDs, die von der Playlist entfernt werden sollen. (Alle items, die das Video enthalten, werden entfernt) 141 | offset?: number; // Pagination parameter die angeben, welche seite nach der muatation zurückgegeben werden soll. 142 | limit?: number; // Pagination parameter die angeben, welche seite nach der muatation zurückgegeben werden soll. 143 | }; 144 | 145 | export interface DeletePlaylistRequest { 146 | }; 147 | -------------------------------------------------------------------------------- /response/playlist/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./PlaylistPublic" 2 | -------------------------------------------------------------------------------- /response/poll/PollPublic.ts: -------------------------------------------------------------------------------- 1 | import { SupporterLevel } from "../../shared/supporter"; 2 | 3 | export interface Poll { 4 | id?: number; 5 | question: string; // Fragetext: max 256 chars 6 | isMultiselect: boolean; // Können ein oder mehrere Antworten ausgewählt werden? 7 | minSelect: number; // ...wenn ja, wie viele mindestens? 8 | maxSelect: number; // ...wenn ja, wie viele maximal? 9 | isPublic: boolean; // Können reguläre User*innen den Poll sehen? ("Planungsmodus") 10 | createDate: Date; // Datum/Uhrzeit wann der Poll erstellt wurde. 11 | startDate?: Date; // Ab wann können User*innen abstimmen. 12 | stopDate?: Date; // Bis wann können User*innen abstimmen. 13 | minSupporterLevel: SupporterLevel; // das benötigte RBSC Level, um teilzunehmen (angezeigt wird die Umfrage trotzdem) 14 | showResults: ShowPollResults; // Zu welchem Zeitpunkt wird den User*innen das aktuelle Umfrageergebnis angezeigt? 15 | options: Array; // Liste möglicher Antwortoptionen 16 | totalVotes?: number; // Gesamtzahl votes 17 | totalUsersVoted?: number; // Gesamtzahl voter 18 | voted?: boolean; // Hat die User*in, die den Poll abruft, für irgendeine Option des Polls gestimmt? 19 | }; 20 | 21 | export interface PollOption { 22 | id?: number; 23 | text: string; // Antworttext: max 128 chars 24 | votes?: number; // Anzahl Stimmen, die auf diese Option fallen 25 | voted?: boolean; // Hat die User*in, die den Poll abruft, für diese Option gestimmt? 26 | }; 27 | 28 | export enum ShowPollResults { 29 | ALWAYS = 'always', // Zeige das aktuelle Resultat immer an 30 | AFTER = 'after', // Zeige das Resultat erst nach ende der Abstimmphase an (currentData > stopDate) 31 | NEVER = 'never' // Zeige niemals das Resultat an (nur im Adminbereich. z.B. für geheime Umfragen) 32 | }; 33 | 34 | export interface GetPollRequest { 35 | }; 36 | 37 | export interface VotePollOptionsRequest { 38 | options?: Array; 39 | }; 40 | -------------------------------------------------------------------------------- /response/poll/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./PollPublic" 2 | -------------------------------------------------------------------------------- /response/schedule/ScheduleLegacyPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export type tLegacyMGMTMediaType = 'live' | 'premiere' | ''; 4 | 5 | 6 | export interface ILegacyMGMTScheduleItem { 7 | id: number; 8 | title: string; 9 | topic: string; 10 | show: string; 11 | timeStart: string; // format: 2019-05-13T14:45:00+02:00 12 | timeEnd: string; // format: 2019-05-13T14:45:00+02:00 13 | length: number; // seconds 14 | type: tLegacyMGMTMediaType; 15 | game: string; 16 | youtube: string; 17 | }; 18 | 19 | 20 | export interface ILegacyMGMTScheduleResponseContainer { 21 | schedule: T; 22 | }; 23 | 24 | export type LegacyMGMTScheduleCurrentResponse = ILegacyMGMTScheduleItem; 25 | export type LegacyMGMTScheduleListResponse = ILegacyMGMTScheduleResponseContainer>; 26 | export type LegacyMGMTScheduleByDayResponse = ILegacyMGMTScheduleResponseContainer<{ [day: string]: Array }>; 27 | 28 | -------------------------------------------------------------------------------- /response/schedule/SchedulePublic.ts: -------------------------------------------------------------------------------- 1 | import { ChannelGroup, videoToken } from ".."; 2 | import { bohnePortrait, tMediaType, Image, link } from "../../shared/"; 3 | 4 | export interface scheduleItem { 5 | id: number; 6 | title: string; 7 | topic: string; 8 | game: string; 9 | showId: number; 10 | 11 | episodeId: number; 12 | episodeImage: string; 13 | episodeImages: Array; 14 | 15 | bohnen: Array; 16 | 17 | timeStart: Date; 18 | timeEnd: Date; 19 | publishingDate: Date | null; 20 | duration: number; 21 | durationClass: number; 22 | 23 | // This item wont be available as VoD 24 | streamExclusive: boolean; 25 | 26 | // Filter Support 27 | isSubscribed?: boolean; 28 | 29 | type: tMediaType; 30 | 31 | // Links 32 | links: Array; 33 | 34 | channelGroups: Array; 35 | 36 | openEnd: boolean; 37 | }; 38 | 39 | export enum PublishingDelayState { 40 | ON_TIME = 0, 41 | PROBABLY_DELAYED, 42 | DELAYED 43 | }; 44 | 45 | // Note: 46 | // a schedule object always represents one day 47 | export interface schedule { 48 | date: Date; 49 | elements: scheduleItem[]; 50 | }; 51 | 52 | export interface ChannelGroupSchedule { 53 | channelGroup: ChannelGroup; 54 | schedule: schedule[]; 55 | }; 56 | 57 | export interface GetChannelGroupScheduleRequest { 58 | startDay: number; // Unix timestamp 59 | endDay: number; // Unix timestamp 60 | filterChannelGroups: Array; // List of channelGroupIds to get schedules for 61 | }; 62 | 63 | export interface UploadSchedule { 64 | date: Date; 65 | elements: UploadScheduleEntry[]; 66 | }; 67 | 68 | export interface UploadScheduleEntry { 69 | id: number; // === mediaEpisodeId 70 | tokens?: Array; // video tokens if present 71 | bohnen?: Array; // bohnen if present 72 | uploadDate: Date; // wann das Video hochgeladen wird/wurde 73 | publishingDate?: Date; // siehe Schedule; wenn das Video im Livestream lief, wann lief es? (OPTIONAL; wenn zu nervig, weglassen) 74 | title: string; // media Episode Title 75 | topic?: string; // media episode topic 76 | showId: number; // id der Show des Videos 77 | showTitle: string; // Showname 78 | showThumbnail: Image[]; // Show Poster Bilder 79 | publishingDelayState?: PublishingDelayState; 80 | publishingDelayComment?: string; 81 | }; 82 | -------------------------------------------------------------------------------- /response/schedule/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./SchedulePublic" 2 | export * from "./ScheduleLegacyPublic" 3 | -------------------------------------------------------------------------------- /response/search/SearchPublic.ts: -------------------------------------------------------------------------------- 1 | import { Image } from "../../shared/"; 2 | import { blogPreviewResponse } from "../blog"; 3 | import { mediaEpisodePreviewCombinedResponse, mediaShowPreviewResponse } from "../media"; 4 | 5 | 6 | export interface searchResultEpisode { 7 | id: number; 8 | title: string; 9 | showName: string; 10 | thumbnail: Array; 11 | distibutionPublishingDate: Date; 12 | firstBroadcastdate: Date; 13 | }; 14 | 15 | export interface searchResultShow { 16 | id: number; 17 | title: string; 18 | thumbnail: Array; 19 | }; 20 | 21 | export interface searchResultBlog { 22 | id: number; 23 | title: string; 24 | thumbnail: Array; 25 | publishDate: Date; 26 | }; 27 | 28 | export interface searchResultSeason { 29 | id: number; 30 | name?: string; 31 | numeric: number; 32 | showId: number; 33 | showTitle: string; 34 | thumbnail: Array; 35 | }; 36 | 37 | export interface searchResultResonse { 38 | shows: Array; 39 | episodes: Array; 40 | blog: Array; 41 | }; 42 | 43 | 44 | 45 | export type filterSearchResultBlog = blogPreviewResponse; 46 | export type filterSearchResultEpisode = mediaEpisodePreviewCombinedResponse; 47 | export type filterSearchResultShow = mediaShowPreviewResponse; 48 | export type filterSearchResultSeason = searchResultSeason; 49 | 50 | export type filterSearchResultData = Array | 51 | filterSearchResultEpisode | // already contains an Array of Data (Episodes), as filterSearchResultEpisode is equal to mediaEpisodePreviewCombinedResponse 52 | Array | 53 | Array; 54 | 55 | export const enum filterContentType { 56 | VIDEO = 1, 57 | SHOW = 2, 58 | SEASON = 3, 59 | BLOG = 4 60 | }; 61 | 62 | export interface filterSearchResultPaginationData { 63 | offset: number; 64 | limit: number; 65 | total: number; 66 | }; 67 | 68 | export interface filterSearchResult { 69 | paginationData: { [contentType: number /*filterContentType*/]: filterSearchResultPaginationData }; 70 | data: { [contentType: number /*filterContentType*/]: filterSearchResultData }; 71 | resultId: string; 72 | }; 73 | -------------------------------------------------------------------------------- /response/search/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./SearchPublic" 2 | -------------------------------------------------------------------------------- /response/simpleshop/SimpleShopPublic.ts: -------------------------------------------------------------------------------- 1 | import { Image } from "../../shared/"; 2 | 3 | 4 | export interface simpleShopItem { 5 | id: number; 6 | name: string; 7 | description: string; 8 | price: string; 9 | vat: string; 10 | link: string; 11 | image: Array | string; // Type string is management only 12 | sortPrio?: number; // only used in admin 13 | ciVisible?: boolean; // only used in admin 14 | ciDescription?: string; // only used in admin 15 | pageVisible?: boolean; // only used in admin 16 | }; 17 | 18 | -------------------------------------------------------------------------------- /response/simpleshop/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./SimpleShopPublic" 2 | -------------------------------------------------------------------------------- /response/subscription/SubscriptionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | import { SubscriptionType, SubscriptionFlags } from '../../shared/'; 3 | 4 | export interface subscriptionResponse { 5 | type: SubscriptionType; 6 | id: number; 7 | subscribed: boolean; 8 | flags?: SubscriptionFlags; // Used for GET and PATCH on /subscription/:type/:id 9 | }; 10 | 11 | export interface subscriptionBohneData { 12 | id: number; 13 | name: string; 14 | flags: SubscriptionFlags; 15 | } 16 | 17 | export interface subscriptionShowData { 18 | id: number; 19 | title: string; 20 | flags: SubscriptionFlags; 21 | }; 22 | 23 | export interface subscriptionBlogData { 24 | id: number; 25 | name: string; 26 | flags: SubscriptionFlags; 27 | }; 28 | 29 | export interface subscriptionListResponse { 30 | bohnen: Array; 31 | shows: Array; 32 | blog: Array; 33 | }; 34 | 35 | export interface subscriptionDefaultResponse { 36 | type: SubscriptionType; 37 | flags: SubscriptionFlags; 38 | }; 39 | 40 | // 41 | // V2 - Refactor Notificaiton 42 | // 43 | 44 | export interface subscriptionData { 45 | type: SubscriptionType; 46 | id: number; 47 | name: string; 48 | flags: SubscriptionFlags; 49 | isDefault: boolean; 50 | }; 51 | 52 | export type subscriptionListV2Response = Array; 53 | -------------------------------------------------------------------------------- /response/subscription/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./SubscriptionPublic" 2 | -------------------------------------------------------------------------------- /response/tags/TagsPublic.ts: -------------------------------------------------------------------------------- 1 | export const enum TagState { 2 | CREATED = 0, // Tag has been created, but not yet approved by admin/mod 3 | APPROVED, // Tag has been approved by admin/mod and is available for everyone 4 | BLOCKED // Tag has been blocked by admin/mod and is only visible to admins/mods 5 | }; 6 | 7 | export const enum Vote { 8 | UP = 1, // User voted tag up 9 | NO = 0, // User hasn't voted for this 10 | DOWN = -1 // User voted tag down 11 | }; 12 | 13 | export interface Tag { 14 | id: number; 15 | name: string; 16 | state: TagState; 17 | score?: number; 18 | pinned?: boolean; 19 | voted?: Vote; 20 | hidden?: boolean; 21 | }; 22 | 23 | export interface SingleTagResponse { 24 | tag: Tag; 25 | }; 26 | 27 | export interface MultipleTagsResponse { 28 | tags: Tag[]; 29 | }; 30 | 31 | export interface CreateTagRequest { 32 | name: string; 33 | mediaId?: number; 34 | }; 35 | 36 | export interface CreateTagResponse extends SingleTagResponse { 37 | }; 38 | 39 | export interface GetTagsRequest { 40 | name?: string; 41 | mediaId?: number; 42 | }; 43 | 44 | export interface GetTagsResponse extends MultipleTagsResponse { 45 | }; 46 | 47 | export interface GetAllTagsRequest { 48 | }; 49 | 50 | export interface GetAllTagsResponse extends MultipleTagsResponse { 51 | }; 52 | 53 | export interface UpdateTagRequest { 54 | name: string; 55 | state: TagState; 56 | }; 57 | 58 | export interface UpdateTagResponse extends SingleTagResponse { 59 | }; 60 | 61 | export interface VoteTagRequest { 62 | mediaId: number; 63 | vote: Vote; 64 | }; 65 | 66 | export interface VoteTagResponse { 67 | }; 68 | 69 | export interface PinTagRequest { 70 | mediaId: number; 71 | }; 72 | 73 | export interface PinTagResponse { 74 | }; 75 | 76 | export interface UnpinTagRequest { 77 | mediaId: number; 78 | }; 79 | 80 | export interface UnpinTagResponse { 81 | }; 82 | 83 | export interface AddTagRequest { 84 | mediaId: number; 85 | }; 86 | 87 | export interface AddTagResponse { 88 | }; 89 | 90 | export interface RemoveTagRequest { 91 | mediaId: number; 92 | }; 93 | 94 | export interface RemoveTagResponse { 95 | }; 96 | 97 | export interface HideTagRequest { 98 | mediaId: number; 99 | }; 100 | 101 | export interface HideTagResponse { 102 | }; 103 | 104 | export interface UnhideTagRequest { 105 | mediaId: number; 106 | }; 107 | 108 | export interface UnhideTagResponse { 109 | }; 110 | 111 | export interface DeleteTagRequest { 112 | }; 113 | 114 | export interface DeleteTagResponse extends SingleTagResponse { 115 | }; 116 | -------------------------------------------------------------------------------- /response/tags/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./TagsPublic" 2 | -------------------------------------------------------------------------------- /response/user/UserPublic.ts: -------------------------------------------------------------------------------- 1 | import { SupporterLevel } from "../../shared/"; 2 | import { Image } from '../../shared/image'; 3 | 4 | export const enum UserAccountState { 5 | BLOCKED = -1, 6 | ACTIVE = 0, 7 | VALIDATION = 1, 8 | OAUTH_PENDING = 2, 9 | } 10 | 11 | export const enum UserExternalAuthProviderType { 12 | AUTH_LOCAL = 0, 13 | AUTH_GOOGLE = 1, 14 | AUTH_TWITCH = 2, 15 | AUTH_STEAM = 3, 16 | AUTH_REDDIT = 4, 17 | AUTH_DISCORD = 5, 18 | AUTH_TWITTER = 6, 19 | AUTH_FACEBOOK = 7, 20 | //AUTH_RBTVHUB = 8, 21 | //AUTH_RBTVHUBADMIN = 9, 22 | AUTH_NUM 23 | } 24 | 25 | export const enum UserGoodiePoolItemAvailability { 26 | OUT_OF_STOCK = 0, 27 | IN_STOCK = 1, 28 | LOW_STOCK = 2, 29 | ALREADY_CLAIMED = 3 30 | } 31 | 32 | export const enum UserSecondFactorType { 33 | GTOTP = 0 // Google Auth / TOTP Based 34 | }; 35 | 36 | export interface permissionMap { 37 | [permissionName: string]: boolean; 38 | } 39 | 40 | export interface entityUserResponse { 41 | id: number; 42 | displayName: string; 43 | 44 | // The Following Fields are optional, only when requesting own user info and/or the neccessary authorization (scopes) is given. 45 | email?: string; // Requires scope: user.email.read, null if no email set, emailVerificationPending relates to the 'new - to verify' email address, the returned address is still valid 46 | emailVerificationPending?: boolean; // Requires scope: user.email.read, if true - there is an email verification pending 47 | registrationDate?: Date; // Requires scope: user.registrationdate.read 48 | noPasswordSet?: boolean; // Not possible via App 49 | secondFactorEnabled?: boolean; // Not possible via App 50 | supporterLevel?: SupporterLevel; // Requires scope: user.supporter.status.read 51 | permissions?: permissionMap; 52 | rbtvEventTeam?: number | null; // Requires scope: user.rbtvevent.read, only set during active rbtvevent; null if no team has been chosen (yet) 53 | }; 54 | 55 | 56 | // Used for Signup (Local Account Creation) 57 | export interface userRegistrationLocalRequest { 58 | displayName: string; 59 | email: string; 60 | password: string; 61 | acceptTerms: boolean; 62 | acceptPrivacyPolicy: boolean; 63 | recaptcha: string; 64 | }; 65 | 66 | export interface userRegistrationSuccessReponse { 67 | uid: number; 68 | displayName: string; 69 | verificationNeeded: boolean; 70 | }; 71 | 72 | // Used for Signup ( OAUTH Account Creation) 73 | export interface userRegistrationOAuthRequest { 74 | oauthToken: string; 75 | displayName: string; 76 | acceptTerms: boolean; 77 | acceptPrivacyPolicy: boolean; 78 | }; 79 | 80 | export interface userChangePasswordRequest { 81 | currentPassword?: string; // Optional if the user has no password set (when created by external auth provider) 82 | newPassword: string; 83 | }; 84 | 85 | export interface userChangeEMailRequest { 86 | currentPassword: string; 87 | newEMail: string; 88 | }; 89 | 90 | export interface userResetPasswordRequest { 91 | email: string; 92 | }; 93 | 94 | export interface userSetPasswordRequest { 95 | token: string; 96 | newPassword: string; 97 | }; 98 | 99 | export interface userChangeDisplayNameRequest { 100 | displayname: string; 101 | }; 102 | 103 | export interface connectedAccount { 104 | type: UserExternalAuthProviderType; 105 | displayName: string; 106 | connectTime: Date; 107 | isValid: boolean; 108 | }; 109 | 110 | export interface userConnectedAccountsResponse { 111 | id: number; 112 | linkedAccounts: Array; 113 | }; 114 | 115 | export interface userRemoveConnectedAccountRequest { 116 | type: UserExternalAuthProviderType; 117 | } 118 | 119 | export interface userSecondFactorBeginSetup { 120 | type: UserSecondFactorType; 121 | secret: string; 122 | url: string; 123 | }; 124 | 125 | export interface userSecondFactorSetup { 126 | recoveryCode: string; 127 | }; 128 | 129 | export const enum UserDigitalGoodieType { 130 | SUPPORTER = 0, 131 | CHEATCODE, 132 | GENERIC, 133 | NUM // Must be always the last element. 134 | }; 135 | 136 | export interface UserDigitalGoodie { 137 | type: UserDigitalGoodieType; 138 | title: string; 139 | description: string; 140 | key: string; 141 | linkDate: Date; 142 | thumbnail?: Image[]; 143 | expireDate?: Date; // when the given key will be no longer redeemable 144 | }; 145 | 146 | export interface UserGoodiePoolItem { 147 | id: number; 148 | type: UserDigitalGoodieType; 149 | title: string; 150 | description: string; 151 | status: UserGoodiePoolItemAvailability; 152 | minimumSupporterLevel: SupporterLevel; 153 | thumbnail?: Image[]; 154 | expireDate?: Date; // when this goodie pool item will be no longer claimable 155 | endDate?: Date; 156 | }; 157 | -------------------------------------------------------------------------------- /response/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./UserPublic" 2 | -------------------------------------------------------------------------------- /shared/apifeature.ts: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Enum of 'optional' / 'experimental' features 4 | // those may be available or unavailable (For Example: on a per - user account basis -, A/B Testing, Events, special Holiday .. etc ) 5 | // 6 | export const enum ApiFeature { 7 | RbtvHostedVideo = 'rbtvhostedvideo' 8 | }; 9 | -------------------------------------------------------------------------------- /shared/bohneportrait.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Image } from "."; 3 | 4 | export interface bohnePortrait { 5 | mgmtid: number; 6 | name: string; 7 | role: 'onair' | 'offair' | 'external'; 8 | episodeCount: number; 9 | images: Array; 10 | }; 11 | -------------------------------------------------------------------------------- /shared/consts.ts: -------------------------------------------------------------------------------- 1 | 2 | export namespace consts { 3 | 4 | // 5 | // Header Fieldname used for Authentication/Authorization 6 | // 7 | export const AUTH_HEADER = 'authorization'; 8 | 9 | // 10 | // Request Query Parameter name used for Authentication/Authorization (as alternative to header) 11 | // 12 | export const AUTH_QUERY = 'apiAuthKey'; 13 | 14 | // 15 | // Default Group any user gets assigned to 16 | // 17 | export const USER_DEFAULT_GROUP = 'user'; 18 | 19 | // 20 | // Default User Keep Alive Ping/Pong time. 21 | // 22 | export const KEEPALIVE_PING = 30; // Seconds 23 | 24 | // 25 | // OAUTH Maximum Length of Redirection URIs 26 | // 27 | export const OAUTH_REDIRECT_URI_LENGTH = 96; 28 | } 29 | 30 | -------------------------------------------------------------------------------- /shared/errorcodes.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | export const enum errorCode { 5 | ERR_NO_ERROR = 0, 6 | 7 | /** GENERIC ERRORS */ 8 | ERR_MISSING_PARAMETERS = 1000, // Missing Parameters for the specified api endpoint 9 | ERR_INVALID_BODYTYPE = 1001, // Invalid Body Type; used by put / post handlers for parameter verification 10 | ERR_WRONG_PARAMETER_TYPE = 1002, // Wrong Parameter type supplied, for example field must be array, string given. 11 | ERR_INVALID_SORT_TYPE = 1003, // Unsupported sortBy / sort parameters 12 | ERR_UNSUPPORTED_SORTING = 1004, 13 | ERR_UNEXPECTED_ARGUMENT = 1005, // Unexpected Range etc 14 | ERR_MISSING_FEATURE = 1006, // Missing Feature / Unimplemented Code Path 15 | ERR_UNEXPECTED = 1007, // Unexpected Error; such as race-conditions upon registration (email check/namecheck -> final insert conflict etc.. ) 16 | ERR_PAGINATION_NEEDED = 1008, // The requested action requires pagination parameters set (offset/limit) 17 | ERR_PAGINATION_LIMIT_EXCEEDED = 1009, // The Requested Limits exceeds the Actions maximum supported limit 18 | ERR_PAGINATION_NO_MORE_DATA = 1010, // The requested action cannot provide any more data for the requested offset. 19 | ERR_ACTION_REQUIRES_EMAIL_SET = 1011, // The requested action requires a valid email set 20 | ERR_RECAPTCHA_INVALID = 1012, // Used to refuse recaptcha challenge 21 | ERR_APICALL_REMOVED = 1013, // The requested api call has been removed & is no longer available 22 | ERR_INVALID_JSON = 1014, // Invalid JSON; Usually thrown when incomming json is invalid 23 | ERR_TERMS_NOT_ACCEPTED = 1015, // The requesting User needs to acknowledge our Terms of Service, see data for details (interface TermsErrorData) 24 | ERR_QUERY_PARAM_PROCESSING_FAILED = 1016, // Failed to Process the given query parameters, see errorMessage for details (missing parameter, wrong type, out of bounds) 25 | ERR_IP_RESTRICTED = 1017, // The requested route/action is ip-restricted 26 | 27 | /** External Api Proxy Errors */ 28 | ERR_EXTAPIPROXY_CALL_NOT_SUPPORTED = 1100, // The Requested method or context is not supported 29 | ERR_EXTAPIPROXY_UPSTREAM_API_ERROR = 1101, // Upstream API Returned an Error - contact rocket-beans with provided error id for details 30 | 31 | 32 | /** AUTH ERRORS */ 33 | ERR_AUTH_TOKEN_INVALID = 2001, // Invalid or expored token (can be refresh or normal token) 34 | ERR_AUTH_MISSING_HEADERS = 2002, // Missing Authentication header for permission check 35 | ERR_AUTH_NO_PERMISSION = 2003, // User does not has the required permission assigned 36 | ERR_AUTH_USER_INVALID = 2100, // Used by local authentification, username unknown or wrong password 37 | ERR_AUTH_USER_NOT_FOUND = 2101, // /user/:id, user not found (also used by account validation) 38 | ERR_AUTH_NOT_VERIFIED = 2102, // User account not activated or verified 39 | ERR_AUTH_BLOCKED = 2103, // User Blocked (account suspended, blocked) 40 | ERR_AUTH_OAUTH_ONETIMETOKEN_INVALID = 2104, // The Given One-Time-Token for login/valdiation is invalid (UserVerifyToken System, Auth/User Controller) 41 | ERR_AUTH_OAUTH_REG_INCOMPLETE = 2105, // OAuth Regstration incomplete (Displayname/terms not ste) 42 | ERR_AUTH_TERMS_NOT_ACCEPTED = 2106, // User needs to accept new terms. 43 | ERR_AUTH_DISCOURSESSO_VALIDATION_FAILED = 2107, // Failed to validate the Discourse SSO Request (malformed url?) 44 | ERR_AUTH_DISCOURSESSO_PAYLOAD_DECODE_FAILED = 2708, // Payload Decode Failed (invalid payload supplied / incompatible etc ..) 45 | ERR_AUTH_SECONDFACTOR_REQUIRED = 2709, // User Has secondFactor enabled (additional parameter required) 46 | ERR_AUTH_SECONDFACTOR_INVALID = 2710, // User provided secondfactor code is invalid 47 | ERR_AUTH_SECONDFACTOR_RECOVERY_INVALID = 2711, // User provided secondfactor recovery code is invalid 48 | ERR_AUTH_SECONDFACTOR_RECOVERY_DENIED = 2712, // User provided secondfactor recovery code is valid, but denid (account is maintainer of apps) 49 | ERR_AUTH_SECONDFACTOR_EXTERNALPROVIDERLOGIN_INVALID = 2713, // User provided secondfactor code is invalid (while trying to login via external provider like steam / google etc) 50 | ERR_AUTH_UNSUPPORTED_AUTHORIZATION_SCHEMA = 2714, // Unsupported Type for 'Authorization'-Header (not Bearer) 51 | ERR_AUTH_TOKEN_CREATION_FAILED = 2715, // Internal error, cannot create token 52 | ERR_AUTH_RESETPASS_OAUTH_REG_INCOMPLETE = 2716, // Password reset refused/failed as the user has not completed his/her external-auth-provider registration (setup of displayname/terms) 53 | ERR_AUTH_CAPTCHA_REQUIRED = 2717, // Authentication Requres Captcha being solved (usually happens after a specific amount of failed login-attempts) 54 | ERR_AUTH_CAPTCHA_FAIL = 2718, // Captcha could not be verified 55 | ERR_AUTH_EXTERNAL_TYPE_INVALID = 2719, // The Requested external provider type is invalid 56 | ERR_AUTH_EXTERNAL_TYPE_NOT_AVAILABLE = 2720, // The Requested external provider is (temporarily) not available 57 | ERR_AUTH_EXTERNAL_STATE_NOT_FOUND = 2721, // The given state does not exist 58 | ERR_AUTH_EXTERNAL_STATE_INVALID = 2722, // The given state is not in an acceptable state for the requested action 59 | ERR_AUTH_EXTERNAL_NAVTARGET_INVALID = 2723, // The given navigationTarget is invalid or exceeds length limits 60 | ERR_AUTH_EXTERNAL_MAC_VERIFY_FAILED = 2724, // Failed to verify request while creating external state 61 | ERR_AUTH_2FA_REQUIRED = 2725, // The Requested Route requires the user to have 2FA enabled 62 | ERR_AUTH_SPECIAL_PERMISSION_REQUIRED = 2726, // The Requested Route requires a special access-permission 63 | 64 | /** Bohne Erors (Staffinfo) */ 65 | ERR_BOHNE_NOT_FOUND = 2201, // Bohne Not found. 66 | ERR_BOHNE_INVALID_ROLE = 2202, // Unsupported Role. 67 | ERR_BOHNE_PORTAIT_INVALID = 2203, // The given image is unknown or invalid 68 | ERR_BOHNE_NO_USERACCOUNT_LINKED = 2204, // The given Bohne (mgmtid) has no page-user-account linked 69 | 70 | 71 | /** Image Uploader Errors */ 72 | ERR_IMAGEUPLOAD_INVALID_IMAGE = 2301, // Invalid or Missing Image 73 | ERR_IMAGEUPLOAD_INVALID_TYPE = 2302, // Invalid or unknown type 74 | ERR_IMAGEUPLOAD_TOOLARGE = 2303, // Uploaded file exceeds types maximum allowed filesize 75 | ERR_IMAGEUPLOAD_INVALID_DIMENSIONS = 2304, // Imagesize Invalid (min/max size) 76 | ERR_IMAGEUPLOAD_FAIL_TEMP = 2305, // Upload failed, failed to store entity (already pending temp images for this type) 77 | ERR_IMAGEUPLOAD_MISSING_PERMISSION = 2306, // Upload failed, the given image type requires a special permission, which the user-agent does not fulfil 78 | 79 | /** Blog Errors */ 80 | ERR_BLOG_AUTHOR_NOT_FOUND = 2401, // The given Author UserID is not found / not a bohne 81 | ERR_BLOG_POST_NOT_FOUND = 2402, // Blog Post not found 82 | ERR_BLOG_UNSUPPORTED_FEED_TYPE = 2403, // Unsupported Feed Type (RSS/ATOM ETC) 83 | ERR_BLOG_CATEGORY_NOT_FOUND = 2404, // Requested Blog Category not found 84 | ERR_BLOG_CATEGORY_INVALID = 2405, // Requested Blog Category does not match the requirements 85 | ERR_BLOG_CATEGORY_ALREADY_EXISTS = 2406, // Requested Blog Category already exists 86 | ERR_BLOG_CATEGORY_CONTAINS_POSTS = 2407, // Blog Category contains posts and cannot be deleted\ 87 | ERR_BLOG_INVALID_TITLE_IMAGE = 2408, // Unknown image id or invalid type - see message for details 88 | ERR_BLOG_INVALID_PROMO_IMAGE = 2409, // Unknown image id or invalid type - see message for details 89 | ERR_BLOG_INVALID_THUMB_IMAGE = 2410, // Unknown image id or invalid type - see message for details 90 | ERR_BLOG_RAFFLE_INVALID = 2411, // Requested Raffle does not exist / is uknown 91 | 92 | /** Streamcount Errors */ 93 | ERR_STREAMCOUNT_UNAVAILABLE = 2501, 94 | 95 | /** User Errors */ 96 | ERR_USER_UNKNOWN = 2601, // Unknown user / userid 97 | ERR_USER_DISPLAYNAME_TAKEN = 2602, // Displayname already in use 98 | ERR_USER_EMAIL_TAKEN = 2603, // Email Address used by another account 99 | ERR_USER_UNKNOWN_GROUP = 2604, // Unknown Group 100 | ERR_USER_DISPLAYNAME_INVALID = 2605, // Displayname Contains Invalid/Unallowed Characters 101 | ERR_USER_TERMS = 2606, // Terms Not Accepted 102 | ERR_USER_PRIVACYPOLICY = 2607, // Privacy Policy Not Accepted 103 | ERR_USER_SIGNUP_DISABLED = 2608, // Signup is disabled 104 | ERR_USER_PASSWORD_TOO_SHORT = 2609, // Password too short 105 | ERR_USER_VERIFYTOKEN_INVALID = 2610, // Invalid/Unknown Verification Token 106 | ERR_USER_VERIFYTOKEN_EMAILCHANGEDOK = 2611, // Indirect Error Code: Verify Token Was ok; email changed 107 | ERR_USER_VERIFYTOKEN_VALIDATEDOK = 2612, // Indirect Error Code: Verify Token Was ok; User Account Activated 108 | ERR_USER_VERIFYTOKEN_BLOCKED = 2613, // Token found & Valid; but user is blocked - cannot be applied 109 | ERR_USER_VERIFYTOKEN_INVALIDSTATE = 2614, // Token found & Valid, but user is not in verification state 110 | ERR_USER_VERIFYTOKEN_EMAILINUSE = 2615, // E-Mail Address is already in use (this can happen if the user has a pending change request while another user registers a new account this the requested addres while the change is pending) 111 | ERR_USER_REGISTER_OAUTH_INVALIDSTATE = 2616, // User is not in OAUTH_PENDING Account State or has displayname set && was trying to register 112 | ERR_USER_INVALID_PW = 2617, // Invalid/Incorrect Password 113 | ERR_USER_VERIFYTOKEN_PWCHANGEOK = 2618, // Indirect Error Code: Verify Token was ok; password changed 114 | ERR_USER_AUTHPROVIDER_NOTEXIST = 2619, // The given Auth Provideer (OAuth/External) does not exist for the given user 115 | ERR_USER_AUTHPROVIDER_ISLAST = 2620, // Used when the user tries to delete the last auth provider that's used to identify the account 116 | ERR_USER_VERIFYTOKEN_PAYPALOK = 2621, // Token found & valid, paypal address of the user has been verified 117 | ERR_USER_DELETE_FAIL = 2622, // Deletion failed 118 | ERR_USER_DELETE_PASS_INVALUD = 2623, // password invalid (deletion) 119 | ERR_USER_CHANGE_DISPLAYNAME_THROTTLED = 2624, // Display Name change Throttled. 120 | ERR_USER_VERIFYTOKEN_RAFFLEVALIDATE_OK = 2625, // Token found & Valid, raffle participation validated! 121 | ERR_USER_VERIFYTOKEN_RAFFLEVALIDATE_REG_OK = 2626, // Token foudn & Valid, raffle paritcipation validated, user account created! 122 | ERR_USER_SECONDFACTOR_ACC_NOT_SUITABLE = 2627, // User is not suitable to setup 2ndfactor, (User has no email/password set or 2ndfactor is already active) 123 | ERR_USER_SECONDFACTOR_REMOVE_INVALID_TOKEN = 2628, // Provided secondFactor Token is incorrect 124 | ERR_USER_SECONDFACTOR_REMOVE_FAIL = 2629, // User is not allowed to remove secondFactor (apps connected as developer?) 125 | ERR_USER_SECONDFACTOR_SETUP_TOKENFAIL = 2630, // User provided secondFactor token for completing the setup is invalid 126 | ERR_USER_DELETE_FAIL_HAS_OAUTH_APPS = 2631, // User can't be deleted, is owner of apps 127 | ERR_USER_AUTHPROVIDER_REMOVE_FAIL = 2632, // Failed to remove association of user<->externalAuthProvider, failed hard / internal error 128 | ERR_USER_ACCOUNT_DELETION_OK = 2633, // Token found & valid, account deleted. 129 | 130 | /** Group Errors */ 131 | ERR_GROUP_NOT_FOUND = 2701, // Unknown group (id) 132 | ERR_GROUP_PERM_UNASSIGNABLE = 2702, // Tried to assign an unassignable permission (see message for details) 133 | ERR_GROUP_NAME_IN_USE = 2703, // The given Name is already in use 134 | ERR_GROUP_NAME_IS_CONST = 2704, // Group name cannot be changed 135 | 136 | /** Schedule Errors */ 137 | ERR_SCHEDULE_INVALID_RANGE = 2801, // The given range between start & end is not supported 138 | ERR_SCHEDULE_LEGACY_LIMIT_EXCEEDED = 2802, // The given amount exceeds the supported maximum value 139 | ERR_SCHEDULE_LEGACY_NO_RUNNING_ITEM = 2803, // The current-running-item couldn't be determined 140 | 141 | /** CMS Errors */ 142 | ERR_CMS_PAGE_NOT_FOUND = 2901, // The requested identifier was not found 143 | ERR_CMS_PAGE_ID_INVALID = 2902, // The Requested identifier does not met the requirements 144 | ERR_CMS_PAGE_ID_IN_USE = 2903, // The Requested identifier is already in use 145 | ERR_CMS_ROUTE_NOT_FOUND = 2904, // The Requested route was not found 146 | ERR_CMS_ROUTE_INVALID = 2905, // The specified route identifier does not met the requirements 147 | ERR_CMS_ROUTE_IN_USE = 2906, // the Specified route is already in use / already exists 148 | 149 | /** EMAIL Errors */ 150 | ERR_EMAIL_INVALID = 3001, // Invalid Email Syntax 151 | ERR_EMAIL_PROVIDER_BLOCKED = 3002, // Mail Provider has been blocked 152 | ERR_EMAIL_TEMPLATE_TYPE_INVALID = 3003, // The given template type is unknown / invalid 153 | 154 | /** Media Errors */ 155 | ERR_MEDIA_SHOW_NOT_FOUND = 3101, // The requested show (by ID) does not exist 156 | ERR_MEDIA_SEASON_NOT_FOUND = 3102, // The requested season does not exist 157 | ERR_MEDIA_EPISODE_NOT_FOUND = 3103, // The request episode does not exist 158 | ERR_MEDIA_PROMOBOX_PROMO_NOT_FOUND = 3104, // The rquested promo does not exist 159 | ERR_MEDIA_PROMOBOX_INVALID_TYPE = 3105, // The given type is invalid 160 | ERR_MEDIA_PROMOBOX_IMAGE_INVALID = 3106, // The given image id is unknown or invalid 161 | 162 | /** Search Errors */ 163 | ERR_SEARCH_TERM_TOO_SHORT = 3201, // Search term was too short 164 | 165 | /** Subscription Errors */ 166 | ERR_SUBSCRIPTION_INVALID_TYPE = 3301, // Invalid type (in this context) 167 | ERR_SUBSCRIPTION_IMPOSSIBLE = 3302, // The given Entity can't be subscribed 168 | ERR_SUBSCRIPTION_FAILED = 3303, // Failed to get subscriptions 169 | ERR_SUBSCRIPTION_NOT_SUBSCRIBED = 3304, // The Requested type/id is not subscribed 170 | ERR_SUBSCRIPTION_WEBPUSH_SETUP_INVALID_ENDPOINT = 3305, // The provided endpoint does not met our specifications (Must be: http or https, non private ip range) 171 | ERR_SUBSCRIPTION_WEBPUSH_SETUP_MISSING_P256DH_KEY = 3306, // Parameter missing 172 | ERR_SUBSCRIPTION_WEBPUSH_SETUP_MISSING_AUTH_KEY = 3307, // Parameter missing 173 | ERR_SUBSCRIPTION_WEBPUSH_SETUP_FAILED = 3308, // Generic Failure while setting up the subscription 174 | ERR_SUBSCRIPTION_WEBPUSH_SETUP_LIMITREACHED = 3309, // The Requesting User has reached the configured limit of web-push subscriptions per-user 175 | ERR_SUBSCRIPTION_UPDATE_FAILED = 3310, // Failed to update the stored properties of an subscription 176 | ERR_SUBSCRIPTION_RESET_FAILED = 3311, // Failed to reset the given subscription (racing condition: unsubscribed while reset was pending OR this is an internal error) 177 | ERR_SUBSCRIPTION_MASS_RESET_FAILED = 3312, // Failed to mass-reset all subscriptions of a given type (this is an internal error) 178 | ERR_SUBSCRIPTION_MASS_UPDATE_FAILED = 3313, // Failed to mass-update all subscriptions of a given type (this is an internal error) 179 | ERR_SUBSCRIPTION_WEBPUSH_APPLE_VERSIONFAIL = 3314, // Unsupported API Version of Apple WebPush Actions requested 180 | ERR_SUBSCRIPTION_WEBPUSH_APPLE_UNHANDLED_WEBSITE = 3315, // Request for unhandled website 181 | ERR_SUBSCRIPTION_WEBPUSH_APPLE_INVALID_ACCESSTOKEN = 3316, // Invalid or expired accesstoken when requesting the package 182 | ERR_SUBSCRIPTION_WEBPUSH_APPLE_INVALID_AUTHHEADER = 3317, // Invalid or missing 'authorization' http-header 183 | ERR_SUBSCRIPTION_WEBPUSH_APPLE_INVALID_DEVICETOKEN = 3318, // Invalid/Malformed Device Token 184 | 185 | 186 | /** Simple Shop Errors */ 187 | ERR_SIMPLESHOP_ITEM_NOT_FOUND = 3401, // The requested Simple Shop Item does not exist 188 | ERR_SIMPLESHOP_ITEM_IMAGE_INVALID = 3402, // Invalid or unknown image supplied 189 | 190 | /** Supporters Club Errors */ 191 | ERR_SUPPORTER_IBAN_INVALID = 3501, // Invalid IBAN (Syntax Error) 192 | ERR_SUPPORTER_PAYPALMAIL_INVALID = 3502, // Invalid Paypal Email address (legacy paypal) 193 | ERR_SUPPORTER_PAYPAL_INVALID_VALUE = 3503, // invalid / unsupported subscription amount/value 194 | ERR_SUPPORTER_PAYPAL_ALREADY_SUBSCRIBED = 3504, // user already has a susbcription active and can't subscribe again 195 | ERR_SUPPORTER_PAYPAL_SUBSCRIBE_INTERNAL_ERROR = 3505, // Internal Paypal Error while creating the billing agreement 196 | ERR_SUPPORTER_PAYPAL_SUBSCRIBE_INVALID_TOKEN = 3506, // The provided payptoken is invalid / there was an error executing the agreement 197 | ERR_SUPPORTER_PAYPAL_SUBSCRIBE_CANCEL_FAIL = 3507, // Paypal Abo Cancellation failed 198 | ERR_SUPPORTER_PAYPAL_NOT_SUBSCRIBED = 3508, // No Subscription 199 | ERR_SUPPORTER_ADDRESS_TERMS_REQUIRED = 3509, // Must accept the shipping terms to set the address. 200 | ERR_SUPPORTER_ADDRESS_FIELD_VALIDATION_ERR = 3510, // Field validation Error 201 | ERR_SUPPORTER_JOINREASON_INVALID_TYPE = 3511, // The given type is unknown 202 | ERR_SUPPORTER_JOINREASON_INVALID_SHOW = 3512, // The Provided Show does not exist. 203 | ERR_SUPPORTER_UNKNOWN_SUBSCRIPTION = 3513, 204 | 205 | /** Interaction */ 206 | ERR_INTERACTION_UNSUPPORTED_TYPE = 3601, // tried to create an unsupported interaction 207 | ERR_INTERACTION_INVALID_TYPE_FOR_OPERATION = 3602, // tried to perform an action on an interaction which doesn't support the requested operation 208 | ERR_INTERACTION_UNKNOWN = 3603, // the given interaction id is unknown or does not match the requested type. 209 | ERR_INTERACITON_ACTIVE = 3604, // Tried to modify an active interaction 210 | ERR_INTERACTION_UNKNOWN_POLLOPTION = 3605, // tried to modify an unknown poll option 211 | 212 | /** Billing */ 213 | ERR_BILLING_CSV_INVALID = 3701, // Invalid or Missing CSV File for CSV Upload 214 | ERR_BILLING_COMMERZBANK_TRANSACTION_NOT_FOUND = 3702, // the given transaction id was not found 215 | 216 | /** Raffle */ 217 | ERR_RAFFLE_ADDRESS_TERMS_REQUIRED = 3801, 218 | ERR_RAFFLE_ADDRESS_FIELD_VALIDATION_ERR = 3802, 219 | ERR_RAFFLE_NOT_FOUND = 3803, // Raffle does not exists 220 | ERR_RAFFLE_PARTICIPATE_ALREADY_ENTERED = 3804, // The Given E-Mail Address Already Participates 221 | ERR_RAFFLE_PARTICIPATE_EMAIL_HAS_USER = 3805, // The given E-Mail Address for guest-participation already exists as a user account 222 | ERR_RAFFLE_PARTICIPATE_EMAIL_BLOCKED = 3806, // The given e-mail address is invalid/blocked provider 223 | ERR_RAFFLE_TERMS_REQUIRED = 3807, 224 | ERR_RAFFLE_GDPR_REQUIRED = 3808, 225 | ERR_RAFFLE_PARTICIPATE_USER_ADDRESS_REQ = 3809, // Participation with RBTV-Account requires raffleshippingaddress to be set. 226 | ERR_RAFFLE_PARTICIPATE_NOT_IN_TIME = 3810, // Participation not possible, startDate && endDate requirements have not been met 227 | ERR_RAFFLE_CHALLENGE_RESPONSE_FAILED = 3811, // Challenge Response Number Verification failed 228 | ERR_RAFFLE_PARTICIPATE_SUPPORTER_ONLY = 3812, // Cannot Participate as the requested Raffle requires a supporterlevel 229 | ERR_RAFFLE_SLUG_VALDATIONFAIL = 3813, // Invalid Slug 230 | ERR_RAFFLE_SLUG_INUSE = 3814, // Slug In use 231 | ERR_RAFFLE_FORM_VALIDATION_ERR = 3815, // Form Field Validation error; used in admin 232 | ERR_RAFFLE_DELETE_IMPOSSIBLE = 3816, // Cannot Delete Raffle because of .. reason 233 | ERR_RAFFLE_PARTICIPANT_NOT_FOUND = 3817, // Participant not found 234 | ERR_RAFFLE_WINNER_NOT_FOUND = 3818, // Requested winner num does not exist/not found 235 | ERR_RAFFLE_ADDRESS_DELETE_FAIL_PARTICIPATING = 3819, // User currently has participations pending, cannot delete address. 236 | ERR_RAFFLE_WINNER_PRIZE_ALREADY_SENT = 3820, // prize notification already sent, requires conrimation 237 | ERR_RAFFLE_TERMS_NO_EDIT_PERM = 3821, // no permission to edit terms 238 | 239 | /** CDKey */ 240 | ERR_CDKEY_TYPE_NOT_FOUND = 3901, // Requested CDKey Type(id) does not exist 241 | ERR_CDKEY_TYPE_INVALID = 3902, // Out of Range, invalid (NaN) etc 242 | ERR_CDKEY_TYPE_EXISTS = 3903, // The Given CDKeyType already exists 243 | ERR_CDKEY_TYPE_FORM_VALIDATION_ERR = 3904, // Form validation error, see message + data for details 244 | ERR_CDKEY_TYPE_HAS_KEYS = 3905, // Action cannot performed: Type has keys assigned (delete) 245 | ERR_CDKEY_PRODUCT_NOT_FOUND = 3906, // Requested Product id for given type not found 246 | ERR_CDKEY_PRODUCT_INVALID = 3907, // Out of Range / invalid (nan) etc 247 | ERR_CDKEY_PRODUCT_FORM_VALIDATION_ERR = 3908, // Form validation error, see message+data for details 248 | ERR_CDKEY_INVALID = 3909, // Key Validation Error 249 | ERR_CDKEY_TOKEN_INVALID = 3910, // Token invalid/expired 250 | ERR_CDKEY_TOOMANY_USES = 3911, // All Free Uses are used up. 251 | ERR_CDKEY_ALREADY_CLAIMED = 3912, // Cannot claim the key, alrady claimed 252 | ERR_CDKEY_ALREADY_CLAIMED_SAMEUSER = 3913, // The Key is already claimed by the requesting user 253 | ERR_CDKEY_CLAIM_FAIL = 3914, // Claim faled, this happens @ doublecheck, user may have tried to claim twice in parallel. 254 | ERR_CDKEY_CLAIMED = 3915, // CDKey is claimed, cannot get download links 255 | ERR_CDKEY_NO_LICENCE = 3916, // Requesting usre has no license (key) to access the given product 256 | ERR_CDKEY_ALREADY_OWNED = 3917, // Keytype already owned by user 257 | 258 | /** OAuth: Auth */ 259 | // Error Codes by RFC/Specification: 260 | ERR_OAUTH_SPEC_INVALID_REQUEST = 4001, 261 | ERR_OAUTH_SPEC_UNAUTHORIZED_CLIENT = 4002, 262 | ERR_OAUTH_SPEC_ACCESS_DENIED = 4003, 263 | ERR_OAUTH_SPEC_UNSUPPORTED_RESPONSE_TYPE = 4004, 264 | ERR_OAUTH_SPEC_INVALID_SCOPE = 4005, 265 | ERR_OAUTH_SPEC_SERVER_ERROR = 4006, 266 | ERR_OAUTH_SPEC_TEMPORARILY_UNAVAILABLE = 4007, 267 | 268 | 269 | /** OAuth: APPS */ 270 | ERR_OAUTH_APP_NOT_FOUND = 4101, // App Does not exist 271 | ERR_OAUTH_APP_NO_PERMISSION = 4102, // No Permission for the given app id 272 | ERR_OAUTH_APP_FORM_VALIDATION_ERR = 4103, // Form Validation Error (used upon app creation / edit) 273 | ERR_OAUTH_APP_CREATE_MISSING_SECONDFACTOR = 4104, // Requesting Apiuser has no secondfactor authorizaiton activated 274 | ERR_OAUTH_APP_CREATE_LIMIT_EXCEEDED = 4105, // Requesting Apiuser has exceeded his/her limit of apps per account 275 | ERR_OAUTH_APP_VERIFYDEV_TERMS_REQ = 4106, // Must accept terms regarding mail for dev-verification 276 | ERR_OAUTH_APP_VERIFYDEV_NOT_FOUND = 4107, // Given UserID has no pendning verification request 277 | 278 | /** OAuth: Scopes */ 279 | ERR_OAUTH_SCOPE_NOT_FOUND = 4201, 280 | ERR_OAUTH_SCOPE_ALREADY_EXIST = 4202, 281 | ERR_OAUTH_SCOPE_FORM_VALIDATION_ERR = 4203, 282 | 283 | /** OAuth: Authorizations */ 284 | ERR_OAUTH_AUTHORIZATION_NOT_FOUND = 4301, // Given Authorization id is unknown or does not relate to the requesitng apiuser 285 | 286 | /** Mediacenter */ 287 | ERR_MEDIACENTER_IMAGE_NOT_FOUND = 4401, // Given Image ID is invalid / not found 288 | ERR_MEDIACENTER_IMAGE_ALREADY_PROCESSED = 4402, // Given Image ID has been already processed 289 | ERR_MEDIACENTER_FORM_VALIDATION_ERR = 4403, // Parameter Validation Failed (string length etc, see data for more info) 290 | ERR_MEDIACENTER_IMAGE_PROCESSING_FAILED = 4404, // Image Processing (scaling, upload) failed 291 | ERR_MEDIACENTER_IMAGE_UNPROCESSED = 4405, // Image is unprocessed, action cannot be performed 292 | ERR_MEDIACENTER_UNSUPPORTED_IMAGETYPE = 4406, // Given Image Type is unknown / unsupported 293 | ERR_MEDIACENTER_DELETE_REJECT_IN_USE = 4407, // Given Image is still being used - cannot be deleted 294 | 295 | /** Cache Administration */ 296 | ERR_CACHE_INVALID_NAME = 4501, // Invalid or Unknown Cache Name 297 | 298 | /** RBTV Event */ 299 | ERR_RBTVEVENT_EVENT_NOT_FOUND = 4601, // No event found with the given slug, or the slug is invalid 300 | ERR_RBTVEVENT_EVENT_FORM_VALIDATION_ERR = 4602, // Form Validation Error -> invalid input (such as invalid characters etc) 301 | ERR_RBTVEVENT_EVENT_SLUG_IN_USE = 4603, // The given Event-Slug is already in use 302 | ERR_RBTVEVENT_EVENT_ENABLE_FAIL = 4604, // Enable Failed (another event still active?) 303 | ERR_RBTVEVENT_EVENT_DISABLE_FAIL = 4605, // Disable Failed (not active?) 304 | ERR_RBTVEVENT_EVENT_DELETE_FAIL = 4606, // Event deletion failed (is the event still active?) 305 | ERR_RBTVEVENT_TEAM_NOT_FOUND = 4607, // The given team does not exist 306 | ERR_RBTVEVENT_TEAM_FORM_VALIDATION_ERR = 4608, // Form Validation Error -> invalid input (such as invalid cahracters, length etc) 307 | ERR_RBTVEVENT_TEAM_DELETE_FAIL = 4607, // Deletion Failed (is the relating event still active?) 308 | ERR_RBTVEVENT_NO_ACTIVE_EVENT = 4608, // No Active Event found (generic error, the given action requires an event being active) 309 | ERR_RBTVEVENT_EVENT_INVALID = 4609, // The given Event is invalid for the requested action. 310 | ERR_RBTVEVENT_TEAM_INVALID = 4610, // The given Team is invalid for the requested action. 311 | ERR_RBTVEVENT_TEAM_NOT_JOINABLE = 4611, // The given Team is not in a joinable state. 312 | ERR_RBTVEVENT_TEAM_JOIN_FAILED = 4612, // Join Request failed (already joined another team?) 313 | ERR_RBTVEVENT_EVENT_NOT_JOINED_TEAM = 4613, // The requesing user has not joined any team for the given event 314 | ERR_RBTVEVENT_TEAM_DELETION_FAIL_RELINTERACTIONS = 4614, // Team deletion failed, the team has relating interactions 315 | ERR_RBTVEVENT_EVENT_DELETION_FAIL_RELINTERACTIONS = 4615, // Event deletion failed, the event has relating interactions 316 | 317 | /** Cheatcodes */ 318 | ERR_CHEATCODESET_NOT_FOUND = 4701, // The Requested Cheatcode Set does not exist 319 | ERR_CHEATCODESET_FORM_VALIDATION_ERR = 4702, // Form Validation Error -> invalid input (such as invalid characters etc) 320 | ERR_CHEATCODESET_ALREADY_IN_USE = 4703, // The requested name is already in use 321 | ERR_CHEATCODE_NOT_FOUND = 4711, // The requested cheatcode (id) does not exist 322 | ERR_CHEATCODE_FORM_VALIDATION_ERR = 4712, // Form Validation Error -> invalid input (such as invalid characters etc) 323 | ERR_CHEATCODE_DELETE_FAIL = 4713, // Deletion of cheatcode failed -> is the code still marked active? 324 | 325 | /** Instance Manager */ 326 | ERR_INSTANCES_UNKNOWN = 4801, // The Requested InstanceID is unknown 327 | 328 | /** Hypescore / Games */ 329 | ERR_HYPESCORE_GAME_NOT_FOUND = 4901, // The rqeuested Game (id) is unknown 330 | ERR_HYPESCORE_SEARCH_INVALIDQUERY = 4902, // The Given Search query was too short or too long 331 | ERR_HYPESCORE_INVALID_SCORE_VALUE = 4903, // The Given score/rating value is invalid (allowed: 1-10) 332 | ERR_HYPESCORE_GAME_SYNC_FAIL = 4904, // Updating Game Database failed (mgmt) 333 | ERR_HYPESCORE_GAME_OVER = 4905, // The Given game's voting is disabled (for example: Game released) 334 | 335 | 336 | /** Device / RBSC Wall */ 337 | ERR_DEVICE_NOT_FOUND = 5001, // The requested deveice (mac) does not exist 338 | ERR_DEVICE_DELETION_FAILED = 5002, // Deletion failed. 339 | ERR_DEVICE_FILE_NOT_FOUND = 5003, // File Id not found/invalid 340 | ERR_DEVICE_KEY_INVALID = 5004, // Preshare Key invalid 341 | ERR_RBSCWALL_SET_NOT_FOUND = 5011, // RBSC Wall Display set id invalid / display set not found 342 | ERR_RBSCWALL_DISPLAY_NOT_FOUND = 5021, // RBSC Wall Display invalid / display not found 343 | ERR_RBSCWALL_CREATE_DEVICE_ALREADY_IN_USE = 5022, // RBSC Wall Display Creation failed, the given Device (mac) is already assigned 344 | RRR_RBSCWALL_DISPLAY_INVALID_KEY = 5023, // RBSC Wall Display - invalid preshared key (init) 345 | 346 | ERR_RBSCWALL_QR_VERIFY_FAILED = 5031, // The Given QR Payload is invalid / expired 347 | ERR_RBSCWALL_REGISTER_FAILED_UNKNOWN_DISPLAY = 5032,// Register as visitor failed - the referenced display seems to be unknown? 348 | ERR_RBSCWALL_REGISTER_FAILED = 5033, // Registration failed internally 349 | ERR_RBSCWALL_ANIMATIONTOKEN_INVALID = 5034, // The given Animation token is invalid / unknown / expired 350 | ERR_RBSCWALL_DISPLAY_BUSY = 5035, // The given Animation token is valid, but the display is busy 351 | 352 | 353 | /** User Property */ 354 | ERR_USERPROP_NOT_FOUND = 5101, // The Requested User Propery does not exist / is known / not set 355 | ERR_USERPROP_INVALID_KEY = 5102, // The Requested Key is unknown or does not met the rquirements 356 | ERR_USERPROP_DELETE_FAIL = 5103, // Invalid Key or internal error 357 | ERR_USERPROP_TYPE_NOT_ALLOWED = 5104, // The given value data-type is not accepted by the specified property key 358 | ERR_USERPROP_STRLEN_EXCEEDS_LIMIT = 5105, // The given value exceeds the maximum length allowed for string contents 359 | ERR_USERPROP_OBJLEN_EXCEEDS_LIMIT = 5106, // The given value exceeds the maximum serialized object-length 360 | ERR_USERPROP_WRITE_RESTRICTED = 5107, // The given property cannot be changed, write restriction enabled 361 | ERR_USERPROP_INVALID_DEFAULT = 5108, // The supplied default-value configuration is invalid, see errormessage for details 362 | ERR_USERPROP_MASS_RESET_FAILED = 5109, 363 | ERR_USERPROP_MASS_INIT_FAILED = 5110, 364 | ERR_USERPROP_MASS_DELETE_FAILED = 5111, 365 | 366 | 367 | /** Superchad **/ 368 | ERR_SUPERCHAD_MESSAGE_NOT_FOUND = 5201, // The given Message identifier is unknown / not found (or may be already expired) 369 | 370 | 371 | /** GoodiePool **/ 372 | ERR_GOODIEPOOL_CLAIM_FAIL = 5301, // Generic failure, caused by an unexpected internal error 373 | ERR_GOODIEPOOL_CLAIM_FAIL_NOT_ELIGIBLE = 5302, // User does not met the requirements of the given Pool (such as SupporterLevel) 374 | ERR_GOODIEPOOL_CLAIM_FAIL_ALREADY_CLAIMED = 5303, // User has already claimed the given Pool 375 | ERR_GOODIEPOOL_CLAIM_FAIL_OUT_OF_STOCK = 5304, // The Pool is empty :( 376 | ERR_GOODIEPOOL_CLAIM_FAIL_EAGAIN = 5305, // Try Again - may be caused by an internal race condition .. 377 | ERR_GOODIEPOOL_CLAIM_FAIL_UNKNOWN_POOL = 5306, // The given Pool does not exist or may be expired. 378 | 379 | 380 | /** SupporterMassMail **/ 381 | ERR_SUPPORTERMASSMAIL_INVALID_TEMPLATE = 5401, // Unknown Template Id 382 | ERR_SUPPORTERMASSMAIL_PARAM_VALIDATION_ERROR = 5402, // Invalid parameters supplied. 383 | ERR_SUPPORTERMASSMAIL_SEND_VERSION_MISMATCH = 5403, // The given version does not match the stored Template version 384 | ERR_SUPPORTERMASSMAIL_BUSY = 5404, // The System is still busy/processing the last mass-mailing request. 385 | 386 | /** Suporter Shop Email **/ 387 | ERR_SHOP_MAIL_INVALID = 6000, 388 | 389 | /** Poll **/ 390 | ERR_POLL_UNKNOWN = 7000, 391 | ERR_POLL_QUESTION_TOO_LONG = 7010, 392 | ERR_POLL_OPTION_TOO_LONG = 7020, 393 | ERR_POLL_NOT_ENOUGH_OPTIONS = 7030, 394 | ERR_POLL_TOO_MANY_OPTIONS = 7035, 395 | ERR_POLL_NOT_FOUND = 7040, 396 | ERR_POLL_STOP_GREATER_START_DATE = 7050, 397 | ERR_POLL_MIN_GREATER_MAX_SELECT = 7060, 398 | ERR_POLL_CANT_SWITCH_MODE_WHEN_ACTIVE = 7070, 399 | ERR_POLL_VOTE_OPTION_UNKNOWN = 7080, 400 | ERR_POLL_CANT_CHANGE_VOTE = 7090, 401 | ERR_POLL_MIN_SELECT_NOT_GREATER_ZERO = 7100, 402 | ERR_POLL_MAX_SELECT_NOT_GREATER_ONE = 7110, 403 | ERR_POLL_CANT_VOTE_NOT_STARTED = 7120, 404 | ERR_POLL_CANT_VOTE_ENDED = 7125, 405 | ERR_POLL_CANT_VOTE_SUPPORTER_LEVEL_TOO_LOW = 7130, 406 | ERR_POLL_VOTE_FAILED = 7140, 407 | ERR_POLL_UPDATE_FAILED = 7150, 408 | ERR_POLL_DELETE_FAILED = 7160, 409 | 410 | /** Playlists **/ 411 | ERR_PLAYLIST_UNKNOWN = 8000, 412 | ERR_PLAYLIST_NOT_FOUND = 8010, 413 | ERR_PLAYLIST_NOT_ENOUGH_MEDIA_IDS = 8030, 414 | ERR_PLAYLIST_REBALANCE_FAILED = 8040, 415 | ERR_PLAYLIST_ADD_ITEMS_FAILED = 8050, 416 | ERR_PLAYLIST_MOVE_ITEMS_FAILED = 8060, 417 | ERR_PLAYLIST_DELETE_ITEMS_FAILED = 8070, 418 | ERR_PLAYLIST_UNKNOWN_INSERT_ITEM_AT = 8080, 419 | ERR_PLAYLIST_CALCULATE_INDEX_FAILED = 8090, 420 | ERR_PLAYLIST_NOT_ENTOUGH_PLAYLIST_ITEM_IDS = 8100, 421 | ERR_PLAYLIST_CREATE_FAILED = 8110, 422 | ERR_PLAYLIST_INVALID_NAME_LENGTH = 8120, 423 | ERR_PLAYLIST_INVALID_DESCRIPTIONS_LENGTH = 8130, 424 | ERR_PLAYLIST_TOO_MANY_PLAYLISTS = 8140, 425 | ERR_PLAYLIST_TOO_MANY_PLAYLISTITEMS = 8150, 426 | 427 | ERR_RBSC_VIDEO_TOKEN_VIDEO_NOT_FOUND = 9000, 428 | ERR_RBSC_VIDEO_TOKEN_VIDEO_NOT_AUTHORIZED = 9010, 429 | ERR_RBSC_VIDEO_TOKEN_API_RATE_LIMIT_HIT = 9020, 430 | ERR_RBSC_VIDEO_TOKEN_ACTIVE_LIMIT_HIT = 9030, 431 | 432 | ERR_USER_DONATION_UNKNOWN = 10000, 433 | ERR_USER_DONATION_CAMPAIGN_UNKNOWN = 10010, 434 | ERR_USER_DONATION_NOT_AUTHORIZED = 10020, 435 | ERR_USER_DONATION_BETTERPLACE_DONATION_UNKNOWN = 10030, 436 | 437 | // 438 | ERR_LAST 439 | }; 440 | -------------------------------------------------------------------------------- /shared/image.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface Image { 3 | url: string; 4 | name: string; 5 | width: number; 6 | height: number; 7 | }; 8 | 9 | export const enum ImageType { 10 | OAUTHAPPTHUMB = 0, // OAUTH App Thumbnail 11 | CONTENT = 1, // Used by markdown pages etc (blog, cms ..) 12 | BLOG_TITLEIMAGE, // Used by blog for Title (Header) 13 | BLOG_THUMBNAIL, // Used by blog as article image 14 | BLOG_PROMO, // used by blog for blog-promo-box 15 | MEDIA_PROMO, // Used by Mediathek - Promo Box 16 | CDKEY_DOWNLOADTHUMB, // Used by Key/CDKey for Download Item Thumbnail 17 | SIMPLESHOP_PRODUCT, // Used by SimpleShop - product image 18 | RAFFLE_PRIZE_IMAGE, // Used by Raffle (prize image) 19 | BOHNE_PORTRAIT, // Used by Bohne/StaffInfo 20 | RBTVEVENT_TEAMICON, // Used by RBTV-Event Team - icon 21 | DIGITALGOODIE_THUMB, // Used by Digital Goodie System (thumbnail) 22 | MAIL, // Used for Mailing in E-Mails. 23 | LAST 24 | }; 25 | 26 | export interface ImageTypeResolution { 27 | name: string; // if null, name will be autogenerated by its resolution (= WxH) 28 | width: number; 29 | height: number; 30 | }; 31 | 32 | export interface ImageTypeDefinition { 33 | maxFileSize: number; 34 | 35 | minWidth: number; 36 | maxWidth: number; 37 | minHeight: number; 38 | maxHeight: number; 39 | 40 | resolutions: Array; 41 | 42 | // Upload Via Public ImageController Allowed? 43 | uploadAllowed: boolean; 44 | 45 | // Required Permission to upload this image type (null=no special permission required) 46 | requiredPermission: string; 47 | 48 | // Browsable in Mediacenter? 49 | browsable: boolean; 50 | 51 | // Maxmium Pending per Owner for this type? 52 | uploadMaxPending: number; 53 | }; 54 | 55 | 56 | // Util Function to compare Array of Image 57 | // Returns: True if both arrays are equal 58 | // False if not. 59 | export function compareArrayofImage(a: Array, b: Array): boolean { 60 | if (a == null && b != null) 61 | return false; 62 | 63 | if (a == null && b == null) 64 | return true; 65 | 66 | if (a == undefined && b == undefined) 67 | return true; 68 | 69 | if (a.length != b.length) 70 | return false; // Obvious 71 | 72 | for (let ita of a) { 73 | let bFound = false; 74 | for (let itb of b) { 75 | if (ita.name == itb.name && 76 | ita.url == itb.url && 77 | ita.height == itb.height && 78 | ita.width == itb.width) { 79 | bFound = true; 80 | break; 81 | } 82 | } 83 | 84 | if (bFound == false) 85 | return false; // element of a is missing in b 86 | } 87 | 88 | 89 | 90 | return true; 91 | } 92 | -------------------------------------------------------------------------------- /shared/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./errorcodes" 3 | export * from "./token" 4 | export * from "./link" 5 | export * from "./image" 6 | export * from "./bohneportrait" 7 | export * from "./consts" 8 | export * from "./subscription" 9 | export * from "./notification" 10 | export * from "./stream" 11 | export * from "./subscription" 12 | export * from "./supporter" 13 | export * from "./raffle" 14 | export * from "./response" 15 | export * from "./media" 16 | export * from "./rbtvevent" 17 | export * from "./terms" 18 | export * from "./apifeature" 19 | -------------------------------------------------------------------------------- /shared/link.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Example usage: blog, staff 4 | export interface link { 5 | type: string; 6 | target: string; 7 | label?: string; 8 | }; 9 | 10 | -------------------------------------------------------------------------------- /shared/media.ts: -------------------------------------------------------------------------------- 1 | 2 | export type tMediaType = 'live' | 'premiere' | 'rerun'; 3 | -------------------------------------------------------------------------------- /shared/notification.ts: -------------------------------------------------------------------------------- 1 | import { Image } from "../"; 2 | 3 | export const enum NotificationType { 4 | NT_REGIE = 0, 5 | NT_HIGHLIGHT, 6 | NT_EPISODE_NEW, // New Episode for subscribed show 7 | NT_BOHNE_NEW_EPISODE, // New content with subscribed bohne 8 | NT_BOHNE_NEW_SHOW, // New content with subscribed bohne 9 | NT_SHOW_LIVE, // Subscribed show is live 10 | NT_BOHNE_LIVE, // Bohne is live 11 | NT_BLOGPOST, // New Blogpost 12 | NT_BOHNE_NEW_BLOGPOST, // Bohne posted a blogpost 13 | NT_RAFFLE_WININFO, // Raffle -> Winning Information 14 | NT_RAFFLE_SHIPPEDINFO, // Raffle -> Shipped! 15 | NT_NEW_DIGITAL_GOODIE, // New Digital goodie received. 16 | NT_NEW_CLAIMABLE_GOODIE, // New Digital goodie recieved that first needs to be claimed. 17 | NT_GENERIC_TEXT, // Custom text notification, sent via admin 18 | NT_NUM 19 | }; 20 | 21 | export interface WebPushNotificationPayload__Data { 22 | type: NotificationType; 23 | sub: string; // uuid of relating subscription 24 | id: number; // notification id 25 | url?: string; 26 | }; 27 | 28 | export interface WebPushNotificationAction { 29 | action: string; 30 | title: string; 31 | icon: string; 32 | }; 33 | 34 | export interface WebPushNotification { 35 | title: string; 36 | 37 | actions?: Array; 38 | badge?: string; // url 39 | body?: string; // url 40 | data?: WebPushNotificationPayload__Data; 41 | dir?: 'auto' | 'ltr' | 'rtr'; 42 | icon?: string; // url 43 | image?: string; // url 44 | lang?: string; // BCP47 lang tag, (de-de, en-us..) 45 | renotify?: boolean; 46 | requireInteraction?: boolean; 47 | silent?: boolean; 48 | tag?: string; 49 | timestamp?: number; // unix time high res (ms) 50 | vibrate?: Array; 51 | 52 | // used for apple notifications .. : 53 | urlparts?: Array | null; 54 | }; 55 | -------------------------------------------------------------------------------- /shared/raffle.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Image } from "./image"; 3 | import { SupporterLevel } from "./supporter"; 4 | 5 | export const enum RaffleTransactionLogAction { 6 | CREATE, 7 | MODIFY, 8 | 9 | DICEBEGIN, 10 | DICEEND, 11 | 12 | NOTIFY_WINNER, // Winning Information 13 | SEND_PRIZEINFO_WINNER, // Prize INFO 14 | 15 | PARTICIPATE, 16 | PARTICIPATE_GUEST, 17 | PARTICIPATE_GUEST_VALIDATE, 18 | PARTICIPATE_ADMIN_CHANGE_VALIDATION, 19 | 20 | WINNER_EDIT 21 | }; 22 | 23 | export interface IRaffleLogWinnerEditData_Info { 24 | num: number; 25 | winningPos: number; 26 | isPhyiscalPrize: boolean; 27 | digitalPrizeInfo: string; 28 | trackingInformation: string; 29 | prizeShipped: boolean; 30 | internalNote: string; 31 | externalNote: string; 32 | }; 33 | 34 | export interface IRaffleLogWinnerEditData { 35 | num: number; 36 | old: IRaffleLogWinnerEditData_Info, 37 | new: IRaffleLogWinnerEditData_Info 38 | }; 39 | 40 | export interface IRaffleLogParticipateAdminChangeValidation { 41 | id: number; 42 | old: boolean; 43 | new: boolean; 44 | }; 45 | 46 | export interface IRaffleLogParticipateData { 47 | supporterLevel: SupporterLevel, 48 | id: number; // Participation ID 49 | }; 50 | 51 | export interface IRaffleLogParticipateGuestData { 52 | createAccount: boolean; 53 | id: number; // Participation ID 54 | }; 55 | 56 | export interface IRaffleLogParticipateGuestValidateData { 57 | id: number; // Participation ID 58 | } 59 | 60 | export interface IRaffleLogNotifyWinnerData { 61 | num: number; // winning number/position 62 | winningPos: number; 63 | isLocalUser: boolean; 64 | userId: number; 65 | email: string; 66 | prizeTitle: string; 67 | prizeImage: Array; 68 | }; 69 | 70 | export interface IRaffleLogSendPrizeInfo { 71 | num: number; // winning number/position 72 | winningPos: number; 73 | isLocalUser: boolean; 74 | userId: number; 75 | email: string; 76 | prizeTitle: string; 77 | prizeImage: Array; 78 | 79 | isPhyiscalPrize: boolean; 80 | digitalPrizeInfo: string; 81 | trackingInformation: string; 82 | 83 | addressVersion: number; 84 | addressData: string; 85 | prizeShipped: boolean; 86 | 87 | externalNote: string; 88 | internalNote: string; 89 | }; 90 | 91 | export interface IRaffleLogCreateData { 92 | title: string; 93 | descriptionMD: string; 94 | cidescriptionMD: string; 95 | prizeImage: Array; 96 | partnerLogo: Array; 97 | productLogo: Array; 98 | manufacturerLogo: Array; 99 | 100 | prizeDescription: string; 101 | prizeTitle: string; 102 | 103 | publishDate: Date; 104 | startDate: Date; 105 | endDate: Date; 106 | 107 | autoDetermineWinner: boolean; 108 | participationState: RaffleParticipationState; 109 | 110 | numWinners: number; 111 | minimumSupporterLevel: SupporterLevel; 112 | termsMD: string; 113 | slug: string; 114 | frontendTheme: string; 115 | }; 116 | 117 | export interface IRaffleLogModifyData { 118 | old: IRaffleLogCreateData, 119 | new: IRaffleLogCreateData 120 | }; 121 | 122 | 123 | export const enum RaffleDiceMethod { 124 | NONE = 0, // When winners already picked 125 | SHUFFLE, 126 | PICK, 127 | }; 128 | 129 | export interface IRaffleLogDiceEnd { 130 | type: RaffleDiceMethod, 131 | winnerids: Array; // participation ids 132 | }; 133 | 134 | 135 | 136 | export const enum RaffleParticipationState { 137 | NOT_SET, 138 | ENABLED, 139 | DISABLED, 140 | }; 141 | 142 | export interface IRaffle { 143 | id: number; 144 | 145 | title: string; 146 | 147 | groupTag?: string | null; // ADMIN 148 | 149 | descriptionHTML: string; 150 | descriptionMD?: string; // ADMIN 151 | 152 | cidescriptionHTML?: string; // NULL, ADMIN/INTERNAL 153 | cidescriptionMD?: string; // NULL, ADMIN 154 | 155 | partnerLogo: Array; // NULL 156 | manufacturerLogo: Array; // NULL 157 | productLogo: Array; // NULL 158 | 159 | priceImage: Array | string; // Type string is management only 160 | priceDescriptionHTML: string; // NULL 161 | priceDescriptionMD?: string; // ADMIN 162 | 163 | prizeTitle: string; 164 | 165 | publishDate?: Date; // ADMIN 166 | startDate: Date; // NULL 167 | endDate: Date; // NULL 168 | 169 | participationAvailable?: boolean; // Public Frontend Only 170 | participationState?: RaffleParticipationState; // ADMIN Only 171 | 172 | autoDetermineWiner?: boolean; // ADMIN 173 | numWinners?: number; // ADMIN 174 | minimumSupporterLevel: SupporterLevel; 175 | 176 | frontendTheme: string; 177 | slug: string; 178 | 179 | termsHTML: string; 180 | termsMD?: string; // ADMIN 181 | 182 | raffleWinner?: Array; // Frontend Only, null 183 | 184 | restrictToGroups?: Array; // ADMIN 185 | }; 186 | 187 | 188 | export interface IRaffleTeaser { // To be used in blog etc 189 | id: number; 190 | slug: string; 191 | 192 | title: string; 193 | descriptionHTML: string; 194 | 195 | startDate: Date; 196 | endDate: Date; 197 | 198 | participationAvailable?: boolean; // Pbulic Frontend Only 199 | 200 | frontendTheme: string; 201 | 202 | priceImage: Array; 203 | 204 | raffleWinner?: Array; // Frontend Only, null 205 | }; 206 | 207 | 208 | export interface IRaffleShippingAddress { // VERSION 1 209 | firstName: string; 210 | lastName: string; 211 | address: Array; 212 | zip: string; 213 | city: string; 214 | state: string; 215 | country: string; 216 | email?: string; // only used in some cases, example: guest participation 217 | allowance: boolean; 218 | }; 219 | 220 | 221 | export interface IRaffleUserParticipation { 222 | date: Date; 223 | title: string; 224 | slug: string; 225 | priceTitle: string; 226 | }; 227 | 228 | export interface IRaffleUserWinEntry { 229 | winningPos: number; 230 | date: Date; 231 | title: string; 232 | prizeTitle: string; 233 | prizeImage: Array; 234 | 235 | digitalPriceInformation: string; // null 236 | prizeShipped: boolean; 237 | externalNote: string; // null 238 | trackingInformation: string; //null 239 | }; 240 | 241 | export interface IRaffleParticipantsStats { 242 | registered: number; // User Participations 243 | guest: number; // Validated Guest Participations 244 | pending: number; // Validation Required 245 | total: number; // Total 246 | }; 247 | 248 | export interface IRaffleAdminListEntry { 249 | id: number; 250 | title: string; 251 | groupTag: string | null; 252 | publishDate: Date; 253 | isRunning: boolean; 254 | isFinished: boolean; 255 | hasPendingShipments: boolean; // TRUE when not all winners prizes are shipped 256 | numParticipants: IRaffleParticipantsStats; 257 | }; 258 | 259 | export interface IRaffleAdminParticipationUserInfo { 260 | id: number; // userId 261 | displayName: string; 262 | }; 263 | 264 | export interface IRaffleAdminParticipationListEntry { 265 | id: number; 266 | ip: string; // HASH 56 Byte 267 | date: Date; 268 | user: IRaffleAdminParticipationUserInfo; // NULL if Guest 269 | shippingAddress: IRaffleShippingAddress; // NULL if no GDPR permission 270 | email: string; 271 | validated: boolean; 272 | }; 273 | 274 | export interface IRaffleAdminWinnerListEntry { 275 | num: number; 276 | winningPos: number; 277 | date: Date; 278 | 279 | isPhysicalPrize: boolean; 280 | digitalPrizeInformation: string; 281 | 282 | prizeTitle: string; 283 | 284 | userId: number; 285 | 286 | shippingAddress: IRaffleShippingAddress; 287 | email: string; 288 | 289 | prizeShipped: boolean; 290 | internalNote: string; 291 | externalNote: string; 292 | trackingInformation: string; 293 | 294 | prizeShippingNotificationSent: boolean; 295 | }; 296 | 297 | export interface IRaffleParticipation { 298 | id: number; 299 | date: Date; 300 | ip: string; 301 | userId: number; // userId NULL 302 | shippingAddress: IRaffleShippingAddress; // NULL 303 | email: string; 304 | validated: boolean; 305 | }; 306 | 307 | export interface IRaffleTransactionLogEntryUserInfo { 308 | id: number; // userId 309 | displayName: string; 310 | }; 311 | 312 | export interface IRaffleTransactionLogEntry { 313 | id: number; 314 | date: Date; 315 | ip: string; // can ben null 316 | user: IRaffleTransactionLogEntryUserInfo; // can be null 317 | action: RaffleTransactionLogAction; 318 | data: any; // null || object -> type specific 319 | }; 320 | -------------------------------------------------------------------------------- /shared/rbtvevent.ts: -------------------------------------------------------------------------------- 1 | 2 | import { Image } from "./image"; 3 | import { link } from "./link"; 4 | 5 | export const enum RBTVEventTeamJoinStrategy { 6 | DISABLED = 0, 7 | JOINABLE, 8 | AUTOASSIGN_ODD, 9 | AUTOASSIGN_EVEN 10 | }; 11 | 12 | export interface IRBTVEventTeam { 13 | id: number; // system-wide unique identifier 14 | name: string; // userfriendly, visible name, up to 32 chars 15 | description: string | null; // optional description 16 | color: string; // rgb, hex format (#AABBCC) allowed: [#A-Fa-f0-9] 17 | icon: Array | string; // string is management only 18 | joinStrategy: RBTVEventTeamJoinStrategy; 19 | eventSlug?: string; 20 | internalSlug?: string; // Used for Team Identification against external components 21 | }; 22 | 23 | export interface IRBTVEvent { 24 | slug: string; // unique identifier, up to 24 chars, [a-z0-9-_] 25 | name: string; // userfriendly, visible name 26 | descriptionHTML: string; // event description (html) 27 | descriptionMD?: string; // event description (markdown, admin only) 28 | active: boolean; // active flag 29 | teams?: Array; 30 | cmspage: string | null; // id of cms page with more content 31 | subLinks: Array | null; // subnavigation links (client implementation should provide a navigation containing those links) 32 | }; 33 | 34 | 35 | 36 | export interface IRBTVEventTeamStatsTeam { 37 | id: number; // team identifier 38 | activeUsers: number; 39 | totalUsers: number; 40 | }; 41 | 42 | export interface IRBTVEventTeamStats { 43 | [teamId: number] : IRBTVEventTeamStatsTeam 44 | }; 45 | -------------------------------------------------------------------------------- /shared/response.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface genericApiResponse { 3 | success: boolean; 4 | data: T; 5 | }; 6 | -------------------------------------------------------------------------------- /shared/stream.ts: -------------------------------------------------------------------------------- 1 | import { tMediaType, link } from "."; 2 | import { ServiceType } from "../response"; 3 | 4 | export interface streamCountChannelInfo { 5 | name: string; 6 | serviceType: ServiceType; 7 | url: string; 8 | count: number; 9 | }; 10 | 11 | export interface streamCount { 12 | youtube: number; 13 | twitch: number; 14 | total: number; 15 | external?: Array; // only for legacy API user 16 | }; 17 | 18 | export interface streamInfoShow { 19 | title: string; 20 | topic: string; 21 | game: string; 22 | type: tMediaType; 23 | showId: number; 24 | timeStart: Date; 25 | timeEnd: Date; 26 | progress: number; 27 | viewers: streamCount; 28 | links: Array; 29 | }; 30 | -------------------------------------------------------------------------------- /shared/subscription.ts: -------------------------------------------------------------------------------- 1 | // 2 | // Types Related to Subscriptions & Notifications 3 | // 4 | export const enum SubscriptionType { 5 | ST_BOHNE = 0, 6 | ST_SHOW, 7 | ST_HIGHLIGHT, 8 | ST_REGIE, 9 | ST_BLOG, 10 | ST_SEASON, 11 | 12 | ST_NUM 13 | }; 14 | 15 | export enum AheadOfLiveNotifyTime { 16 | NONE = 0, 17 | MINUTE_5 = 0x1, 18 | MINUTE_15 = 0x2, 19 | MINUTE_30 = 0x4, 20 | HOUR_1 = 0x8, 21 | HOUR_3 = 0x10, 22 | HOUR_6 = 0x20, 23 | HOUR_12 = 0x40, 24 | HOUR_24 = 0x80, 25 | ALL = 0xff 26 | }; 27 | 28 | export const AheadOfLiveNotifyIndex2Time = [5, 15, 30, 60, 180, 360, 720, 1440]; // unit: minutes 29 | 30 | export type AheadOfLiveNotifyTimeConfig = Array; /* ArrayIndex2Time? See: AheadOfLiveNotifyIndex2Time 31 | Note: array index 0 => flag for '5 min', 32 | array index 1 => flag for '15 min', 33 | ... 34 | array index 7 => flag for '1440 min' 35 | 36 | As specified in AheadOfLiveNotifyIndex2Time 37 | */ 38 | 39 | export interface Subscription { 40 | type: SubscriptionType; 41 | id: number; 42 | name?: string; // Will be only set when fetching data from API (resolved in time), ignored on PUT/POST/etc requests 43 | flags?: SubscriptionFlags; 44 | filterSettings?: SubscriptionFilterSettings; 45 | filter?: Array; 46 | }; 47 | 48 | export interface SubscriptionFlags { 49 | notifyEmail: boolean; 50 | notifyBrowser: boolean; 51 | notifyWhatsapp?: boolean; 52 | }; 53 | 54 | export interface SubscriptionFilter { 55 | type: SubscriptionType; 56 | id: number; 57 | }; 58 | 59 | // Per Subscription Filter Settings: 60 | export interface SubscriptionFilterSettings { 61 | isBlacklist: boolean; // Are the specified filters treated as black or whitelist? 62 | newEpisode?: boolean; // [applies to: Show, Bohne] Generate Notifications when new Episode will be released? 63 | newShow?: boolean; // [applies to: Bohne] Generate Notifications when new Show will be published? 64 | newBlogPost?: boolean; // [applies to: Bohne] Generate Notifications when Subscribed item is author of new Blogpost? 65 | aheadOfLive: boolean; // [applies to: Show, Bohne] Generate Ahead Of Live Notifacitons if the subscribed item is about to be shown @ live-stream? 66 | aheadOfLiveTimes: AheadOfLiveNotifyTimeConfig | null; // [Applies to: Show, Bohne] if not null overrrides the per-user-subscription settings for the subscribed item 67 | }; 68 | -------------------------------------------------------------------------------- /shared/supporter.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export const enum SupporterPaymentProvider { 4 | PAYPAL = 0, 5 | PAYPAL_OLD = 1, 6 | BANKTRANSFER = 2, 7 | MANUAL_POSTING = 3, 8 | YOUTUBE_SUBSCRIPTION = 4, 9 | // Needs to be always the last item: 10 | NUM_PROVIDERS 11 | }; 12 | 13 | export const enum SupporterLevel { 14 | NONE = 0, 15 | TIER1 = 1, 16 | TIER2 = 2, 17 | TIER3 = 3, 18 | SUPPORTER = SupporterLevel.TIER1, // deprecated, kept for legacy systems. use TIER1 instead 19 | CLUBMEMBER = SupporterLevel.TIER2 // deprecated, kept for legacy systems. use TIER2 instead 20 | }; 21 | 22 | export interface ISupporterInfo { 23 | displayName: string; 24 | subscriptionDate: Date; 25 | level: SupporterLevel; 26 | }; 27 | 28 | export interface ISupporterBillingTransaction { 29 | id: number; 30 | date: Date; 31 | provider: SupporterPaymentProvider; 32 | reference: string; 33 | details: string | null; 34 | value: number; 35 | }; 36 | 37 | export enum SupporterSubscriptionTerminationReason { 38 | SST_NONE = 0, 39 | SST_OPTION_A = 0x1, 40 | SST_OPTION_B = 0x2, 41 | SST_OPTION_C = 0x4, 42 | SST_OPTION_D = 0x8, 43 | SST_OPTION_E = 0x10, 44 | SST_OPTION_F = 0x20, 45 | SST_OWN_MESSAGE = 0x2000, 46 | SST_HIDDEN = 0x4000, 47 | SST_ALL = ( SST_OPTION_A | SST_OPTION_B | SST_OPTION_C | SST_OPTION_D | SST_OPTION_E | SST_OPTION_F | SST_OWN_MESSAGE | SST_HIDDEN ) 48 | }; 49 | 50 | type tSupporterReadableSubscriptionTerminationReasonDict = { [type: number]: string }; 51 | 52 | export let SupporterReadableSubscriptionTerminationReason: tSupporterReadableSubscriptionTerminationReasonDict = { 53 | [SupporterSubscriptionTerminationReason.SST_NONE]: 'Keinen Grund angeben', 54 | [SupporterSubscriptionTerminationReason.SST_OPTION_A]: 'Ich kann mir eine Mitgliedschaft finanziell nicht mehr leisten', 55 | [SupporterSubscriptionTerminationReason.SST_OPTION_B]: 'Das Programm von RBTV spiegelt meine Interessen nicht (mehr) wider', 56 | [SupporterSubscriptionTerminationReason.SST_OPTION_C]: 'Mir fehlt Transparenz im Hinblick auf die Verwendung der RBSC-Einnahmen', 57 | [SupporterSubscriptionTerminationReason.SST_OPTION_D]: 'Mir fehlen exklusive Features', 58 | [SupporterSubscriptionTerminationReason.SST_OPTION_E]: 'Mir fehlen physische Goodies', 59 | [SupporterSubscriptionTerminationReason.SST_OPTION_F]: 'Mir gefällt/gefallen eine oder mehrere Werbeintegration/en bzw. ein oder mehrere Werbepartner nicht (gerne unter “Anderer Grund” ausführen)', 60 | [SupporterSubscriptionTerminationReason.SST_OWN_MESSAGE]: 'Anderer Grund', 61 | [SupporterSubscriptionTerminationReason.SST_HIDDEN]: 'Versteckter Grund' 62 | }; 63 | -------------------------------------------------------------------------------- /shared/terms.ts: -------------------------------------------------------------------------------- 1 | 2 | // Data for Error ERR_TERMS_NOT_ACCEPTED 3 | export interface TermsErrorData { 4 | needsSignPrivacyPolicy: boolean; // if set true, the requesting user needs to sign our new Privacy Policy ( => https://rocketbeans.tv/datenschutz ) 5 | needsSignTerms: boolean; // if set true, the requesting user needs to sign our new Terms of Service ( => https://rocketbeans.tv/agb ) 6 | }; 7 | 8 | 9 | export interface ITermsVersion { 10 | terms: Date; 11 | privacyPolicy: Date; 12 | }; 13 | -------------------------------------------------------------------------------- /shared/token.ts: -------------------------------------------------------------------------------- 1 | 2 | export const enum userAuthTokenType { 3 | TOKEN_NORMAL = 0, 4 | TOKEN_REFRESH = 1, 5 | NUM = 2 6 | }; 7 | 8 | 9 | export interface token { 10 | type: userAuthTokenType; 11 | uid: number; 12 | token: string; 13 | validUntil: Date; 14 | }; 15 | 16 | 17 | -------------------------------------------------------------------------------- /socket/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./messageTypes" 2 | 3 | export * from "./messages" 4 | 5 | -------------------------------------------------------------------------------- /socket/messageTypes.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Sides: A => Api 4 | // C => Client 5 | // R => Regietool 6 | // W => RBSC Wall 7 | // 8 | export enum socketMessageTypes { 9 | // Info 10 | AC_HELLO, 11 | 12 | // Ping, Pong! 13 | AC_PING, // See: XX_PING 14 | CA_PONG, // See: XX_PING 15 | 16 | // Auth 17 | AC_AUTHENTICATION_REQ, 18 | CA_AUTHENTICATION, 19 | AC_AUTHENTICATION_RESULT, 20 | AC_AUTHENTICATION_RENEW_TOKEN_REQ, 21 | 22 | // Notifications 23 | AC_NOTIFICATION, 24 | CA_NOTIFICATION_READ, 25 | CA_NOTIFICATION_DELETE, 26 | CA_NOTIFICATION_DELETE_ALL, 27 | AC_NOTIFICATION_READ, 28 | AC_NOTIFICATION_DELETE, 29 | AC_NOTIFICAITON_DELETE_ALL, 30 | 31 | // 32 | AC_STREAM_INFO, 33 | 34 | 35 | // Episode Progress Related 36 | CA_MEDIA_EPISODEPROGRESS_UPDATE, 37 | 38 | // Interaction, Management; Regietool 39 | RA_INTERACTION_CREATE, 40 | AR_INTERACTION_CREATED, 41 | RA_INTERACTION_LIST_ACTIVE, 42 | AR_INTERACTION_LIST, 43 | RA_INTERACTION_ACTIVATE, 44 | RA_INTERACTION_DEACTIVATE, 45 | RA_INTERACTION_EVENT, 46 | RA_INTERACTION_EVENT2, // uses socket-io native parameters for passing data between regietool && api 47 | AR_INTERACTION_EVENT, 48 | RA_INTERACTION_PROPERTY_UPDATE, 49 | AR_INTERACTION_DEACTIVATED, 50 | 51 | // Regietool generic event 52 | RA_EVENT, 53 | 54 | // Interaction, Client Side / Frontend 55 | AC_DYNINTERACTION_START, 56 | AC_DYNINTERACTION_END, 57 | AC_DYNINTERACTION_PROPERTY_UPDATE, 58 | AC_DYNINTERACTION_EVENT, 59 | CA_DYNINTERACTION_EVENT, 60 | AC_DYNINTERACTION_LIST, 61 | CA_DYNINTERACTION_REQSTART, 62 | AC_DYNINTERACTION_FRONTENDDATA, 63 | 64 | // RBTV Event 65 | AC_RBTVEVENT_ACTIVATED, // RBTVEvent Active/Activated 66 | AC_RBTVEVENT_DEACTIVATED, // RBTVEvent Stopped 67 | AC_RBTVEVENT_CHANGED, // RBTVEvent Active event changed (name, description, teams..) 68 | AC_RBTVEVENT_TEAM_JOINED, // RBTVEvent Joined Team 69 | AC_RBTVEVENT_EVENT, // RBTVEvent Event (backend -> frontend: related information) 70 | 71 | // Cheatcodes 72 | AC_CHEATCODE_WINNING_NOTIFICATION, 73 | 74 | // Notification Queue 75 | RA_NOTIFICATIONQUEUE_RECV, 76 | RA_NOTIFICATIONQUEUE_ACK, 77 | 78 | // RBSC Wall 79 | WA_HELLO, 80 | AW_HELLO_ACK, 81 | 82 | WA_NAMES_REQ, // Requests Names (see: AW_NAMES) 83 | AW_NAMES, // Full set of names 84 | AW_NAMES_CYCLE_RESET, // Flushes the current name animation (current names should fade out, screen should start filling again from local namepool) 85 | AW_NAMES_CYCLE_START, // Starts the animation 86 | AW_NAMES_CYCLE_STOP, // Stops the animation 87 | AW_NAME_ADD_PRIO, // Add a single name (PRIORITY) (should be added at beginning of the list) 88 | 89 | AW_GREETING, // Play greeting animation (thanks for your visit/support..) 90 | WA_GREETING_BEGIN, // Wall Display notifies api about 'greeting screen started' 91 | WA_GREETING_END, // Wall Display notifies api about 'greeting screen finished' 92 | 93 | AW_QRCODE, // New QR Code Data, screen should generate a new qr-code using the received parameters 94 | 95 | 96 | // Notify client about something changed, see interfaces - type dependend 97 | AC_CONTENT_CHANGED, 98 | 99 | // Notify client about property changed 100 | AC_USERPROPERTY_CHANGED, 101 | 102 | // Notify client about own user object or user related data changed 103 | AC_USERDATA_CHANGED, 104 | 105 | // 106 | AC_CONFETTI, 107 | 108 | AC_CHAT_MESSAGE, // Superchad chat message (backwards compatible string) 109 | AC_ROCKETMESSAGE_STARTED, // Signals all listeners that a rocket message event was started (continue with ints after special string fields) 110 | AC_ROCKETMESSAGE_STOPPED, // Signals all listeners that a rocket message event was stoppen 111 | AC_ROCKETMESSAGE_BLOCKED, // Signals all listeners that a rocket message event was blocked (e.g. by mod) 112 | AC_ROCKETMESSAGE_UNBLOCKED, // Signals all listeners that a rocket message event was started (e.g. unblocked by time or mod) 113 | AC_ROCKETMESSAGE_UPDATE, // Signals all listeners that a rocket message event was started (tick every second with current rocket message state) 114 | 115 | // Content update messages 116 | AC_NEW_BLOG_POST, // Signals that there has been a new blog post 117 | AC_NEW_VIDEO, // Signals that there has been a new video 118 | AC_NEW_SHOW, // Signals that there has been a new show 119 | AC_NEW_BOHNE, // Signals that there has been a new bohne 120 | AC_NEW_PODCAST, // Signals that there has been a new podcast 121 | AC_BLOG_POST_CHANGED, // Signals that a blog post has been changed 122 | AC_VIDEO_CHANGED, // Signals that a video has been changed 123 | AC_SHOW_CHANGED, // Signals that a show has been changed 124 | AC_BOHNE_CHANGED, // Signals that a bohne has been changed 125 | AC_PODCAST_CHANGED, // Signals that a podcast has been changed 126 | 127 | CA_PASSWORD_AUTHENTICATION, 128 | CA_REFRESH_TOKEN, 129 | AC_PASSWORD_AUTHENTICATION_RESULT, 130 | AC_REFRESH_TOKEN_RESULT, 131 | 132 | // Will let the client know about enabled or disabled features (for use with A/B Tests, Experimental features, Paid features, etc.. ) 133 | // Note: 134 | // Typically enable messages are being sent after websocket connect and also after authentication (as the given account may have access to special features) 135 | // your user interface implementation should be able to handle 'disable' messages at any given time 136 | // 137 | AC_APIFEATURE_ENABLE, // Tells the user interface implementation about an enabled feature 138 | AC_APIFEATURES_ENABLE, // Tells the user interface implementation about multiple enabled features (you should implement both, AC_APIFEATURES_ENABLE aswell as AC_APIFEATURE_ENABLE) 139 | AC_APIFEATURE_DISABLE, // Tells the user interface implementation about a feature being disabled / unavailable 140 | AC_APIFEATURES_DISABLE, // Tells the user interface implementation about multiple features being disabled / unavailable (you should implement both, AC_APIFEATURES_DISABLE as well as AC_APIFEATURE_DISABLE) 141 | 142 | AC_DONATION_CAMPAIGN_UPDATE // Used to fan out donation campaign updates 143 | }; 144 | -------------------------------------------------------------------------------- /socket/messages/apifeature/apiFeature.ts: -------------------------------------------------------------------------------- 1 | 2 | import { ApiFeature } from "../../../shared/apifeature"; 3 | 4 | export interface AC_APIFEATURE_ENABLE { 5 | feature: ApiFeature; 6 | data?: T; 7 | }; 8 | 9 | export interface AC_APIFEATURES_ENABLE { 10 | features: Array>; 11 | }; 12 | 13 | export interface AC_APIFEATURE_DISABLE { 14 | feature: ApiFeature; 15 | data?: T 16 | }; 17 | 18 | export interface AC_APIFEATURES_DISABLE { 19 | features: Array>; 20 | }; -------------------------------------------------------------------------------- /socket/messages/apifeature/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./apiFeature" -------------------------------------------------------------------------------- /socket/messages/auth/AuthPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | import { token } from "../../../shared"; 3 | 4 | export interface AC_AUTHENTICATION_REQ { }; 5 | 6 | export interface CA_AUTHENTICATION { 7 | token: string; 8 | appName: string; 9 | }; 10 | 11 | export interface CA_PASSWORD_AUTHENTICATION { 12 | email: string; 13 | password: string; 14 | secondFactorToken: string; 15 | secondFactorRecoveryCode: string; 16 | }; 17 | 18 | export interface AC_AUTHENTICATION_RESULT { 19 | result: boolean; 20 | }; 21 | 22 | export interface AC_PASSWORD_AUTHENTICATION_RESULT extends AC_AUTHENTICATION_RESULT { 23 | accessToken?: token; 24 | refreshToken?: token; 25 | } 26 | 27 | export interface AC_AUTHENTICATION_RENEW_TOKEN_REQ { }; 28 | 29 | export interface CA_REFRESH_TOKEN { 30 | refreshToken: string; 31 | appId?: string; 32 | } 33 | 34 | export interface AC_REFRESH_TOKEN_RESULT extends AC_AUTHENTICATION_RESULT { 35 | accessToken?: token; 36 | } 37 | -------------------------------------------------------------------------------- /socket/messages/auth/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./AuthPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/donation/DonationPublic.ts: -------------------------------------------------------------------------------- 1 | import { DonationCampaignStats } from "../../../"; 2 | 3 | export interface AC_DONATION_CAMPAIGN_STATS extends DonationCampaignStats {}; 4 | -------------------------------------------------------------------------------- /socket/messages/donation/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./DonationPublic"; 2 | -------------------------------------------------------------------------------- /socket/messages/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./notification" 2 | export * from "./auth"; 3 | export * from "./stream"; 4 | export * from "./interaction"; 5 | export * from "./media"; 6 | export * from "./misc"; 7 | export * from "./rbtvevent"; 8 | export * from "./user"; 9 | export * from "./superchad"; 10 | export * from "./apifeature"; 11 | export * from "./donation"; 12 | -------------------------------------------------------------------------------- /socket/messages/interaction/InteractionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Known Interaction Types: 4 | // 5 | export const cVoteInteraction = 'vote'; 6 | export const cVoteSEInteraction = 'votese'; 7 | export const cKlixxInteraction = 'klixx'; 8 | export const cClickerInteraction = 'clicker'; 9 | export const cGamepadInteraction = 'gamepad'; 10 | export const cTitleInteraction = 'title'; 11 | export const cTeamSelectInteraction = 'teamselect'; // Has no Frontenddata, the interaction should provide an rbtvevent team chooser 12 | export const cTextDisplayInteraction = 'textdisplay'; 13 | export const cHypescoreRatingInteraction = 'hypescorerating'; 14 | export const cInteractiveIframeInteraction = 'interactiveiframe'; 15 | export const cBattleShipsInteraction = 'battleships'; 16 | 17 | export type tInteractionType = 'vote' | 'votese' | 'klixx' | 'clicker' | 'gamepad' | 'title' | 'teamselect' | 'textdisplay' | 'hypescorerating' | 'interactiveiframe' | 'battleships'; 18 | 19 | // 20 | // Frontend, Dyninteraction 21 | // 22 | export interface AC_DYNINTERACTION_START { 23 | type: tInteractionType; 24 | id: string; 25 | showTitle: boolean; 26 | sortPrio: number; // 0 first 27 | timeLeft: number | null; // Unit: milliseconds, the client implementtion is allowed to hide but not to destroy the interaction after reaching the timeout, api will provide a proper AC_DYNINTERACTION_END Event (also it is possible to update timeleft after it reached 0) 28 | eventSlug: string | null; // If set, this interaction requires to be attending to the given event (by joining a team) - the client implementation should prohibit interacting + show a proper notification prompting the user to join a team. 29 | data: any; // Type Specific 30 | }; 31 | 32 | export interface AC_DYNINTERACTION_END { 33 | id: string; 34 | }; 35 | 36 | export type tUpdatableInteractionProperty = 'showTitle' | 'sortPrio' | 'timeLeft'; 37 | 38 | export interface AC_DYNINTERACTION_PROPERTY_UPDATE { 39 | id: string; 40 | property: tUpdatableInteractionProperty; 41 | value: any; 42 | }; 43 | 44 | export interface AC_DYNINTERACTION_EVENT { 45 | id: string; 46 | event: string; 47 | data: any; 48 | }; 49 | 50 | export interface CA_DYNINTERACTION_EVENT { 51 | id: string; 52 | event: string; 53 | data: any; 54 | }; 55 | 56 | export interface AC_DYNINTERACTION_LIST { // List of running interactions (unique identifier) 57 | ids: Array; 58 | }; 59 | 60 | export interface CA_DYNINTERACTION_REQSTART { // requests 'start' event for the given interaction to be sent to the requesting client 61 | id: string; 62 | }; 63 | 64 | // client implemetation should update the UI / reinit the UI; data will contain the same information/structure as AC_DYNINTERACTION_START::data 65 | export interface AC_DYNINTERACTION_FRONTENDDATA { 66 | id: string; 67 | data: any; 68 | }; 69 | -------------------------------------------------------------------------------- /socket/messages/interaction/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./InteractionPublic" 2 | export * from "./klixx" 3 | export * from "./vote" 4 | export * from "./title" 5 | export * from "./votese" 6 | export * from "./textdisplay" 7 | -------------------------------------------------------------------------------- /socket/messages/interaction/klixx/KlixxInteractionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Klix Interaction Specific 4 | // 5 | export interface KlixxFrontendData { 6 | player: { 7 | points: number, 8 | fishcardUsedRound: number; // Round 0 == Not used, // available 9 | lastVotedRound: number; 10 | lastVotedViews: number; 11 | hostVoteOption: 'lars' | 'florentin'; // null if not voted. 12 | }; 13 | 14 | votingEnabled: boolean; 15 | hostVoteEnabled: boolean; 16 | 17 | round: { 18 | round: number; 19 | 20 | modifiers: { 21 | german: boolean; 22 | timecode: boolean; 23 | phonenumber: boolean; 24 | }; 25 | 26 | timeLeft: number; // ms, only relevant if countdownRunning=true 27 | countdownRunning: boolean; 28 | }; 29 | }; 30 | 31 | export interface KlixxBetData { 32 | views: number; 33 | fishcard: boolean; 34 | } 35 | 36 | export interface KlixxKingVoteData { 37 | option: 'lars' | 'florentin'; 38 | } 39 | 40 | -------------------------------------------------------------------------------- /socket/messages/interaction/klixx/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./KlixxInteractionPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/interaction/textdisplay/TextDisplayInteractionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface TextDisplayFrontendData { 3 | title: string | null; 4 | content: string | null; 5 | }; 6 | -------------------------------------------------------------------------------- /socket/messages/interaction/textdisplay/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./TextDisplayInteractionPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/interaction/title/TitleInteractionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface TitleFrontendData { 3 | title: string; 4 | }; 5 | -------------------------------------------------------------------------------- /socket/messages/interaction/title/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./TitleInteractionPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/interaction/vote/VoteInteractionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // Vote Interaction Specific 4 | // 5 | export interface VoteFrontendData { 6 | question: string; 7 | theme: string; // null when default. 8 | options: Array; 9 | votedOption: number; // represents to offset in options array, 10 | // null when not votd 11 | }; 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /socket/messages/interaction/vote/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./VoteInteractionPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/interaction/votese/VoteSEInteractionPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | export interface VoteSEVoteOption { 4 | color: string; // #rrggbb 5 | icon: string | null; // URI ( https://static.rocketbeans.tv/img/...png ) 6 | label: string; // Answer Label 7 | disabled: boolean; // If flagged disabled: the client-implementation should show the option as non-clickable (disabled) button 8 | }; 9 | 10 | 11 | export interface VoteSEFrontendData { 12 | title: string; 13 | question: string | null; 14 | theme: string | null; 15 | options: Array; 16 | votedOption: number; 17 | }; 18 | -------------------------------------------------------------------------------- /socket/messages/interaction/votese/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./VoteSEInteractionPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/media/MediaPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface CA_MEDIA_EPISODEPROGRESS_UPDATE { 3 | episodeId: number; 4 | tokenId: number; 5 | progress: number; // seconds, seek time 6 | }; 7 | -------------------------------------------------------------------------------- /socket/messages/media/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./MediaPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/misc/ConfettiPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | // Confetti! 3 | export interface AC_CONFETTI { }; 4 | -------------------------------------------------------------------------------- /socket/messages/misc/ContentChangedPublic.ts: -------------------------------------------------------------------------------- 1 | import { IHypescoreGameScores } from "../../../response/hypescore"; 2 | 3 | export type tContentChangedType = 'hypescore' | 'frontendtheme'; 4 | 5 | export interface AC_CONTENT_CHANGED { 6 | type: tContentChangedType; 7 | data?: T; 8 | }; 9 | 10 | export interface IHypescoreChangedEvent { 11 | id: number; // gameid 12 | scores: IHypescoreGameScores 13 | }; 14 | 15 | export interface IFrontendThemeChangedEvent { 16 | pageTheme: string | null; // new page theme 17 | }; 18 | -------------------------------------------------------------------------------- /socket/messages/misc/HelloPublic.ts: -------------------------------------------------------------------------------- 1 | 2 | export interface AC_HELLO { 3 | version: number; 4 | frontendVersion: number; // The recommended frontend version 5 | }; 6 | 7 | export interface XX_PING { 8 | id: number; 9 | tick: number; 10 | }; 11 | 12 | -------------------------------------------------------------------------------- /socket/messages/misc/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ConfettiPublic" 2 | export * from "./HelloPublic" 3 | export * from "./ContentChangedPublic" 4 | -------------------------------------------------------------------------------- /socket/messages/notification/NotificationPublic.ts: -------------------------------------------------------------------------------- 1 | import { NotificationType, Image } from "../../../shared/" 2 | import { UserDigitalGoodieType } from "../../../response"; 3 | 4 | export interface CA_NOTIFICATION_READ { 5 | id: number; 6 | }; 7 | 8 | export interface CA_NOTIFICATION_DELETE { 9 | id: number; 10 | }; 11 | 12 | export interface AC_NOTIFICATION_DELETE { 13 | id: number; 14 | }; 15 | 16 | export interface AC_NOTIFICATION_READ { 17 | id: number; 18 | date: Date; 19 | }; 20 | 21 | export interface CA_NOTIFICATION_DELETE_ALL {}; 22 | export interface AC_NOTIFICATION_DELETE_ALL {}; 23 | 24 | 25 | export interface AC_NOTIFICATION { 26 | id: number; 27 | type: NotificationType; 28 | date: Date; 29 | status: 'unread' | 'read'; 30 | data: T; 31 | }; 32 | 33 | export interface GenericNotification { 34 | title: string; 35 | text: string; 36 | url?: string; 37 | }; 38 | 39 | export interface NotificationDataRegie { 40 | title: string; 41 | message: string; 42 | }; 43 | 44 | export const enum NotificationDataHighlightType { 45 | HT_NONE = 0, 46 | HT_SHOW, 47 | HT_SEASON, 48 | HT_EPISODE, 49 | HT_BLOG, 50 | HT_NUM 51 | }; 52 | 53 | export interface NotificationDataHighlight { 54 | title: string; 55 | message: string; 56 | type: NotificationDataHighlightType; 57 | id: number; 58 | }; 59 | 60 | export interface NotificationDataNewEpisode { 61 | show: string; 62 | title: string; 63 | id: number; 64 | thumbnail: Array; 65 | }; 66 | 67 | export interface NotificationDataBohneNewEpisode { 68 | mgmtid: number; 69 | name: string; 70 | // 71 | show: string; 72 | title: string; 73 | id: number; 74 | thumbnail: Array; 75 | }; 76 | 77 | export interface NotificationDataBohneNewShow { 78 | mgmtid: number; 79 | name: string; 80 | // 81 | show: string; 82 | id: number; 83 | thumbnail: Array; 84 | }; 85 | 86 | export interface NotificationDataShowLive { 87 | title: string; 88 | id: number; 89 | date: Date; // Date when the show is live 90 | aheadStep: number; // ahead-of-live step that has generated this notification, in Minutes (Example: if its 60 this means the item will be live in 60 mintes) 91 | thumbnail: string; // Schedule has own thumbnails which were not available in multiple sizes, yet 92 | channelGroups: Array; 93 | }; 94 | 95 | export interface NotificationDataBohneLive { 96 | mgmtid: number; 97 | name: string; 98 | // 99 | title: string; 100 | show: string; 101 | id: number; 102 | date: Date; // Date when the bohne is live 103 | aheadStep: number; // ahead-of-live step that has generated this notification, in Minutes (Example: if its 60 this means the item will be live in 60 mintes) 104 | thumbnail: string; // Schedule has own thumbnails which were not available in multiple sizes, yet 105 | channelGroups: Array; 106 | }; 107 | 108 | export interface NotificationDataNewBlogPost { 109 | title: string; 110 | subtitle: string; 111 | id: number; 112 | thumbnail: Array; 113 | }; 114 | 115 | export interface NotificationDataBohneNewBlogPost { 116 | mgmtid: number; 117 | name: string; 118 | // 119 | title: string; 120 | subtitle: string; 121 | id: number; 122 | thumbnail: Array; 123 | }; 124 | 125 | export interface NotificationDataRaffleWinInfo { 126 | title: string; // Name of Raffle 127 | slug: string; // Slug 128 | prizeTitle: string; // Title of Prize 129 | prizeImage: Array; 130 | }; 131 | 132 | export interface NotificationDataRaffleShippedInfo { 133 | title: string; // Name of Raffle 134 | slug: string; // Slug 135 | prizeTitle: string; // Title of Prize 136 | prizeImage: Array; 137 | }; 138 | 139 | export interface NotificationDataUserNewDigitalGoodie { 140 | title: string; 141 | goodieType: UserDigitalGoodieType; 142 | }; 143 | 144 | export interface NotificationDataUserNewClaimableGoodie { 145 | customTitle: string | null; // if set, this should be the title displayed by your application 146 | customBody: string | null; // if set, this should be the body displayed by your application 147 | title: string; 148 | goodieType: UserDigitalGoodieType; 149 | }; 150 | 151 | 152 | export interface NotificationDataGenericText { 153 | title: string; // title entered by admin user 154 | body: string; // text entered by admin user 155 | url?: string; // url to go to when clicking on notification, as set by admin user 156 | }; -------------------------------------------------------------------------------- /socket/messages/notification/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./NotificationPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/rbtvevent/RBTVEventPublic.ts: -------------------------------------------------------------------------------- 1 | import { IRBTVEvent } from "../../../shared"; 2 | 3 | export interface AC_RBTVEVENT_ACTIVATED { 4 | slug: string; 5 | data: IRBTVEvent; // Will also Include Team Information 6 | }; 7 | 8 | export interface AC_RBTVEVENT_DEACTIVATED { 9 | slug: string; 10 | }; 11 | 12 | export interface AC_RBTVEVENT_CHANGED { 13 | slug: string; 14 | data: IRBTVEvent; // Will also Include Team Information 15 | }; 16 | 17 | // Notifies the client about joining a team 18 | export interface AC_RBTVEVENT_TEAM_JOINED { 19 | slug: string; 20 | teamId: number; 21 | }; 22 | 23 | export interface AC_RBTVEVENT_EVENT { 24 | slug: string; 25 | event: string; 26 | data: any; 27 | }; 28 | 29 | export const cEventHAHUpdatePoints = 'HaHUpdatePoints'; 30 | export interface IHaHTeamPoints { 31 | vp: number; 32 | sp: number; 33 | }; 34 | export interface IHaHUpdatePoints { 35 | [teamId: number]: IHaHTeamPoints; 36 | }; 37 | -------------------------------------------------------------------------------- /socket/messages/rbtvevent/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./RBTVEventPublic" 2 | -------------------------------------------------------------------------------- /socket/messages/stream/StreamPublic.ts: -------------------------------------------------------------------------------- 1 | import { ChannelGroupInfo } from "../../../"; 2 | 3 | export interface AC_STREAM_INFO { 4 | info: ChannelGroupInfo; 5 | }; 6 | -------------------------------------------------------------------------------- /socket/messages/stream/index.ts: -------------------------------------------------------------------------------- 1 | 2 | export * from "./StreamPublic" 3 | -------------------------------------------------------------------------------- /socket/messages/superchad/ChatMessage.ts: -------------------------------------------------------------------------------- 1 | import { SupporterLevel } from "../../../shared/supporter"; 2 | 3 | export enum ChatMessageSource { 4 | TWITCH, 5 | YOUTUBE 6 | }; 7 | 8 | export interface ChatChannelInfo { 9 | iconUrl: string; 10 | name: string; 11 | displayName: string; 12 | }; 13 | 14 | export interface TwitchSpecialPayload { 15 | emotes: string, 16 | uuid: string, 17 | mod: boolean, 18 | subscriber: boolean 19 | }; 20 | 21 | export interface YoutubeSpecialPayload { 22 | uuid: string; 23 | mod: boolean; 24 | }; 25 | 26 | export interface AC_CHAT_MESSAGE { 27 | uuid: string; 28 | platformId: string; 29 | source: ChatMessageSource; 30 | sourceInfo: ChatChannelInfo | null; // null if RBTV 31 | dateFrom: Date; 32 | message: string; 33 | user: string; 34 | userIdentifier: string; 35 | userPlatformIdentifier: string; // unique user id 36 | specialPayload: TwitchSpecialPayload | YoutubeSpecialPayload; 37 | supporterLevel?: SupporterLevel; // supporter level (only set if user has agreed to show it publicly) 38 | }; 39 | 40 | export interface AC_PUBLIC_CHAT_MESSAGE { 41 | uuid: string; 42 | source: ChatMessageSource; 43 | sourceInfo: ChatChannelInfo | null; 44 | dateFrom: Date; 45 | message: string; 46 | user: string; 47 | userIdentifier: string; 48 | specialPayload: TwitchSpecialPayload | YoutubeSpecialPayload; 49 | supporterLevel?: SupporterLevel; // supporter level (only set if user has aggreed to show it publicly) 50 | }; 51 | -------------------------------------------------------------------------------- /socket/messages/superchad/RocketMessage.ts: -------------------------------------------------------------------------------- 1 | export interface AC_ROCKET_MESSAGE { 2 | command: string; 3 | description?: string; 4 | startVotes: number; 5 | targetVotes: number; 6 | runTime: number; 7 | cooldown: number; 8 | startDate?: Date; 9 | currentVotes?: number; 10 | } 11 | -------------------------------------------------------------------------------- /socket/messages/superchad/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./ChatMessage" 2 | export * from "./RocketMessage" 3 | -------------------------------------------------------------------------------- /socket/messages/user/UserDataChangedPublic.ts: -------------------------------------------------------------------------------- 1 | export type tChangedUserDataType = 'email' | // Own E-Mail address changed, value contains new email address 2 | 'dummy'; // Dummy - not in use - test type 3 | 4 | export interface AC_USERDATA_CHANGED { 5 | type: tChangedUserDataType; 6 | value: any | null; // may be null depending on type 7 | }; -------------------------------------------------------------------------------- /socket/messages/user/UserPropertyChangedPublic.ts: -------------------------------------------------------------------------------- 1 | export interface AC_USERPROPERTY_CHANGED { 2 | key: string; 3 | value: any | null; // null value will be pushed upon deletion 4 | }; -------------------------------------------------------------------------------- /socket/messages/user/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./UserPropertyChangedPublic" 2 | export * from "./UserDataChangedPublic" 3 | --------------------------------------------------------------------------------