@darco2903/altv-web-api 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -342,6 +342,23 @@ declare const _default: {
342
342
  title: string;
343
343
  duration: number;
344
344
  }>>;
345
+ queue: z.ZodArray<z.ZodObject<{
346
+ videoId: z.ZodString;
347
+ title: z.ZodString;
348
+ duration: z.ZodNumber;
349
+ } & {
350
+ id: z.ZodString;
351
+ }, "strip", z.ZodTypeAny, {
352
+ videoId: string;
353
+ title: string;
354
+ duration: number;
355
+ id: string;
356
+ }, {
357
+ videoId: string;
358
+ title: string;
359
+ duration: number;
360
+ id: string;
361
+ }>, "many">;
345
362
  url: z.ZodNullable<z.ZodString>;
346
363
  paused: z.ZodBoolean;
347
364
  startTime: z.ZodNumber;
@@ -445,6 +462,12 @@ declare const _default: {
445
462
  title: string;
446
463
  duration: number;
447
464
  } | null;
465
+ queue: {
466
+ videoId: string;
467
+ title: string;
468
+ duration: number;
469
+ id: string;
470
+ }[];
448
471
  url: string | null;
449
472
  paused: boolean;
450
473
  startTime: number;
@@ -478,6 +501,12 @@ declare const _default: {
478
501
  title: string;
479
502
  duration: number;
480
503
  } | null;
504
+ queue: {
505
+ videoId: string;
506
+ title: string;
507
+ duration: number;
508
+ id: string;
509
+ }[];
481
510
  url: string | null;
482
511
  paused: boolean;
483
512
  startTime: number;
@@ -942,8 +971,878 @@ declare const _default: {
942
971
  }>]>;
943
972
  };
944
973
  };
974
+ queueAdd: {
975
+ description: "Add a YouTube video to the queue of a room, it plays right away if the room has nothing to play. Listeners get the queue through the roomQueue socket event";
976
+ method: "POST";
977
+ body: z.ZodObject<{
978
+ videoId: z.ZodString;
979
+ }, "strip", z.ZodTypeAny, {
980
+ videoId: string;
981
+ }, {
982
+ videoId: string;
983
+ }>;
984
+ path: "/room/:roomId/queue";
985
+ responses: {
986
+ 500: z.ZodObject<{
987
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
988
+ error: z.ZodType<string, z.ZodTypeDef, string>;
989
+ name: z.ZodLiteral<"APIError">;
990
+ }, "strip", z.ZodTypeAny, {
991
+ code: "INTERNAL_SERVER_ERROR";
992
+ error: string;
993
+ name: "APIError";
994
+ }, {
995
+ code: "INTERNAL_SERVER_ERROR";
996
+ error: string;
997
+ name: "APIError";
998
+ }>;
999
+ 409: z.ZodObject<{
1000
+ code: z.ZodType<"QUEUE_FULL", z.ZodTypeDef, "QUEUE_FULL">;
1001
+ error: z.ZodType<"The queue of this room is full", z.ZodTypeDef, "The queue of this room is full">;
1002
+ name: z.ZodLiteral<"APIError">;
1003
+ }, "strip", z.ZodTypeAny, {
1004
+ code: "QUEUE_FULL";
1005
+ error: "The queue of this room is full";
1006
+ name: "APIError";
1007
+ }, {
1008
+ code: "QUEUE_FULL";
1009
+ error: "The queue of this room is full";
1010
+ name: "APIError";
1011
+ }>;
1012
+ 404: z.ZodObject<{
1013
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1014
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1015
+ name: z.ZodLiteral<"APIError">;
1016
+ }, "strip", z.ZodTypeAny, {
1017
+ code: "ROOM_NOT_FOUND";
1018
+ error: "The requested room was not found";
1019
+ name: "APIError";
1020
+ }, {
1021
+ code: "ROOM_NOT_FOUND";
1022
+ error: "The requested room was not found";
1023
+ name: "APIError";
1024
+ }>;
1025
+ 401: z.ZodObject<{
1026
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1027
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1028
+ name: z.ZodLiteral<"APIError">;
1029
+ }, "strip", z.ZodTypeAny, {
1030
+ code: "UNAUTHORIZED";
1031
+ error: "Unauthorized";
1032
+ name: "APIError";
1033
+ }, {
1034
+ code: "UNAUTHORIZED";
1035
+ error: "Unauthorized";
1036
+ name: "APIError";
1037
+ }>;
1038
+ 403: z.ZodObject<{
1039
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1040
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1041
+ name: z.ZodLiteral<"APIError">;
1042
+ }, "strip", z.ZodTypeAny, {
1043
+ code: "FORBIDDEN";
1044
+ error: "Forbidden";
1045
+ name: "APIError";
1046
+ }, {
1047
+ code: "FORBIDDEN";
1048
+ error: "Forbidden";
1049
+ name: "APIError";
1050
+ }>;
1051
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1052
+ 400: z.ZodUnion<[z.ZodObject<{
1053
+ name: z.ZodLiteral<"ZodError">;
1054
+ issues: z.ZodArray<z.ZodObject<{
1055
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1056
+ message: z.ZodOptional<z.ZodString>;
1057
+ code: z.ZodNativeEnum<{
1058
+ invalid_type: "invalid_type";
1059
+ invalid_literal: "invalid_literal";
1060
+ custom: "custom";
1061
+ invalid_union: "invalid_union";
1062
+ invalid_union_discriminator: "invalid_union_discriminator";
1063
+ invalid_enum_value: "invalid_enum_value";
1064
+ unrecognized_keys: "unrecognized_keys";
1065
+ invalid_arguments: "invalid_arguments";
1066
+ invalid_return_type: "invalid_return_type";
1067
+ invalid_date: "invalid_date";
1068
+ invalid_string: "invalid_string";
1069
+ too_small: "too_small";
1070
+ too_big: "too_big";
1071
+ invalid_intersection_types: "invalid_intersection_types";
1072
+ not_multiple_of: "not_multiple_of";
1073
+ not_finite: "not_finite";
1074
+ }>;
1075
+ }, "strip", z.ZodAny, z.objectOutputType<{
1076
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1077
+ message: z.ZodOptional<z.ZodString>;
1078
+ code: z.ZodNativeEnum<{
1079
+ invalid_type: "invalid_type";
1080
+ invalid_literal: "invalid_literal";
1081
+ custom: "custom";
1082
+ invalid_union: "invalid_union";
1083
+ invalid_union_discriminator: "invalid_union_discriminator";
1084
+ invalid_enum_value: "invalid_enum_value";
1085
+ unrecognized_keys: "unrecognized_keys";
1086
+ invalid_arguments: "invalid_arguments";
1087
+ invalid_return_type: "invalid_return_type";
1088
+ invalid_date: "invalid_date";
1089
+ invalid_string: "invalid_string";
1090
+ too_small: "too_small";
1091
+ too_big: "too_big";
1092
+ invalid_intersection_types: "invalid_intersection_types";
1093
+ not_multiple_of: "not_multiple_of";
1094
+ not_finite: "not_finite";
1095
+ }>;
1096
+ }, z.ZodAny, "strip">, z.objectInputType<{
1097
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1098
+ message: z.ZodOptional<z.ZodString>;
1099
+ code: z.ZodNativeEnum<{
1100
+ invalid_type: "invalid_type";
1101
+ invalid_literal: "invalid_literal";
1102
+ custom: "custom";
1103
+ invalid_union: "invalid_union";
1104
+ invalid_union_discriminator: "invalid_union_discriminator";
1105
+ invalid_enum_value: "invalid_enum_value";
1106
+ unrecognized_keys: "unrecognized_keys";
1107
+ invalid_arguments: "invalid_arguments";
1108
+ invalid_return_type: "invalid_return_type";
1109
+ invalid_date: "invalid_date";
1110
+ invalid_string: "invalid_string";
1111
+ too_small: "too_small";
1112
+ too_big: "too_big";
1113
+ invalid_intersection_types: "invalid_intersection_types";
1114
+ not_multiple_of: "not_multiple_of";
1115
+ not_finite: "not_finite";
1116
+ }>;
1117
+ }, z.ZodAny, "strip">>, "many">;
1118
+ }, "strip", z.ZodTypeAny, {
1119
+ name: "ZodError";
1120
+ issues: z.objectOutputType<{
1121
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1122
+ message: z.ZodOptional<z.ZodString>;
1123
+ code: z.ZodNativeEnum<{
1124
+ invalid_type: "invalid_type";
1125
+ invalid_literal: "invalid_literal";
1126
+ custom: "custom";
1127
+ invalid_union: "invalid_union";
1128
+ invalid_union_discriminator: "invalid_union_discriminator";
1129
+ invalid_enum_value: "invalid_enum_value";
1130
+ unrecognized_keys: "unrecognized_keys";
1131
+ invalid_arguments: "invalid_arguments";
1132
+ invalid_return_type: "invalid_return_type";
1133
+ invalid_date: "invalid_date";
1134
+ invalid_string: "invalid_string";
1135
+ too_small: "too_small";
1136
+ too_big: "too_big";
1137
+ invalid_intersection_types: "invalid_intersection_types";
1138
+ not_multiple_of: "not_multiple_of";
1139
+ not_finite: "not_finite";
1140
+ }>;
1141
+ }, z.ZodAny, "strip">[];
1142
+ }, {
1143
+ name: "ZodError";
1144
+ issues: z.objectInputType<{
1145
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1146
+ message: z.ZodOptional<z.ZodString>;
1147
+ code: z.ZodNativeEnum<{
1148
+ invalid_type: "invalid_type";
1149
+ invalid_literal: "invalid_literal";
1150
+ custom: "custom";
1151
+ invalid_union: "invalid_union";
1152
+ invalid_union_discriminator: "invalid_union_discriminator";
1153
+ invalid_enum_value: "invalid_enum_value";
1154
+ unrecognized_keys: "unrecognized_keys";
1155
+ invalid_arguments: "invalid_arguments";
1156
+ invalid_return_type: "invalid_return_type";
1157
+ invalid_date: "invalid_date";
1158
+ invalid_string: "invalid_string";
1159
+ too_small: "too_small";
1160
+ too_big: "too_big";
1161
+ invalid_intersection_types: "invalid_intersection_types";
1162
+ not_multiple_of: "not_multiple_of";
1163
+ not_finite: "not_finite";
1164
+ }>;
1165
+ }, z.ZodAny, "strip">[];
1166
+ }>, z.ZodObject<{
1167
+ code: z.ZodType<"INVALID_VIDEO_ID", z.ZodTypeDef, "INVALID_VIDEO_ID">;
1168
+ error: z.ZodType<"The provided video ID is invalid", z.ZodTypeDef, "The provided video ID is invalid">;
1169
+ name: z.ZodLiteral<"APIError">;
1170
+ }, "strip", z.ZodTypeAny, {
1171
+ code: "INVALID_VIDEO_ID";
1172
+ error: "The provided video ID is invalid";
1173
+ name: "APIError";
1174
+ }, {
1175
+ code: "INVALID_VIDEO_ID";
1176
+ error: "The provided video ID is invalid";
1177
+ name: "APIError";
1178
+ }>]>;
1179
+ };
1180
+ };
1181
+ queuePlaylist: {
1182
+ description: "Add a YouTube playlist to the queue of a room, as many tracks as fit. It plays right away if the room has nothing to play. A Mix only exists around a video, it needs videoId";
1183
+ method: "POST";
1184
+ body: z.ZodObject<{
1185
+ playlistId: z.ZodString;
1186
+ videoId: z.ZodOptional<z.ZodString>;
1187
+ }, "strip", z.ZodTypeAny, {
1188
+ playlistId: string;
1189
+ videoId?: string | undefined;
1190
+ }, {
1191
+ playlistId: string;
1192
+ videoId?: string | undefined;
1193
+ }>;
1194
+ path: "/room/:roomId/queue/playlist";
1195
+ responses: {
1196
+ 500: z.ZodObject<{
1197
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1198
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1199
+ name: z.ZodLiteral<"APIError">;
1200
+ }, "strip", z.ZodTypeAny, {
1201
+ code: "INTERNAL_SERVER_ERROR";
1202
+ error: string;
1203
+ name: "APIError";
1204
+ }, {
1205
+ code: "INTERNAL_SERVER_ERROR";
1206
+ error: string;
1207
+ name: "APIError";
1208
+ }>;
1209
+ 404: z.ZodUnion<[z.ZodObject<{
1210
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1211
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1212
+ name: z.ZodLiteral<"APIError">;
1213
+ }, "strip", z.ZodTypeAny, {
1214
+ code: "ROOM_NOT_FOUND";
1215
+ error: "The requested room was not found";
1216
+ name: "APIError";
1217
+ }, {
1218
+ code: "ROOM_NOT_FOUND";
1219
+ error: "The requested room was not found";
1220
+ name: "APIError";
1221
+ }>, z.ZodObject<{
1222
+ code: z.ZodType<"PLAYLIST_UNAVAILABLE", z.ZodTypeDef, "PLAYLIST_UNAVAILABLE">;
1223
+ error: z.ZodType<"This playlist can't be read, it may be private", z.ZodTypeDef, "This playlist can't be read, it may be private">;
1224
+ name: z.ZodLiteral<"APIError">;
1225
+ }, "strip", z.ZodTypeAny, {
1226
+ code: "PLAYLIST_UNAVAILABLE";
1227
+ error: "This playlist can't be read, it may be private";
1228
+ name: "APIError";
1229
+ }, {
1230
+ code: "PLAYLIST_UNAVAILABLE";
1231
+ error: "This playlist can't be read, it may be private";
1232
+ name: "APIError";
1233
+ }>]>;
1234
+ 409: z.ZodObject<{
1235
+ code: z.ZodType<"QUEUE_FULL", z.ZodTypeDef, "QUEUE_FULL">;
1236
+ error: z.ZodType<"The queue of this room is full", z.ZodTypeDef, "The queue of this room is full">;
1237
+ name: z.ZodLiteral<"APIError">;
1238
+ }, "strip", z.ZodTypeAny, {
1239
+ code: "QUEUE_FULL";
1240
+ error: "The queue of this room is full";
1241
+ name: "APIError";
1242
+ }, {
1243
+ code: "QUEUE_FULL";
1244
+ error: "The queue of this room is full";
1245
+ name: "APIError";
1246
+ }>;
1247
+ 429: z.ZodObject<{
1248
+ code: z.ZodType<"TOO_MANY_SEARCHES", z.ZodTypeDef, "TOO_MANY_SEARCHES">;
1249
+ error: z.ZodType<"Too many searches are running", z.ZodTypeDef, "Too many searches are running">;
1250
+ name: z.ZodLiteral<"APIError">;
1251
+ }, "strip", z.ZodTypeAny, {
1252
+ code: "TOO_MANY_SEARCHES";
1253
+ error: "Too many searches are running";
1254
+ name: "APIError";
1255
+ }, {
1256
+ code: "TOO_MANY_SEARCHES";
1257
+ error: "Too many searches are running";
1258
+ name: "APIError";
1259
+ }>;
1260
+ 401: z.ZodObject<{
1261
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1262
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1263
+ name: z.ZodLiteral<"APIError">;
1264
+ }, "strip", z.ZodTypeAny, {
1265
+ code: "UNAUTHORIZED";
1266
+ error: "Unauthorized";
1267
+ name: "APIError";
1268
+ }, {
1269
+ code: "UNAUTHORIZED";
1270
+ error: "Unauthorized";
1271
+ name: "APIError";
1272
+ }>;
1273
+ 403: z.ZodObject<{
1274
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1275
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1276
+ name: z.ZodLiteral<"APIError">;
1277
+ }, "strip", z.ZodTypeAny, {
1278
+ code: "FORBIDDEN";
1279
+ error: "Forbidden";
1280
+ name: "APIError";
1281
+ }, {
1282
+ code: "FORBIDDEN";
1283
+ error: "Forbidden";
1284
+ name: "APIError";
1285
+ }>;
1286
+ 200: z.ZodObject<{
1287
+ added: z.ZodNumber;
1288
+ /** Can't be played: live, too long or without a duration */
1289
+ skipped: z.ZodNumber;
1290
+ /** Tracks of the playlist. A Mix has no end: added + skipped, it never looks cut */
1291
+ total: z.ZodNumber;
1292
+ }, "strip", z.ZodTypeAny, {
1293
+ added: number;
1294
+ skipped: number;
1295
+ total: number;
1296
+ }, {
1297
+ added: number;
1298
+ skipped: number;
1299
+ total: number;
1300
+ }>;
1301
+ 400: z.ZodUnion<[z.ZodObject<{
1302
+ name: z.ZodLiteral<"ZodError">;
1303
+ issues: z.ZodArray<z.ZodObject<{
1304
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1305
+ message: z.ZodOptional<z.ZodString>;
1306
+ code: z.ZodNativeEnum<{
1307
+ invalid_type: "invalid_type";
1308
+ invalid_literal: "invalid_literal";
1309
+ custom: "custom";
1310
+ invalid_union: "invalid_union";
1311
+ invalid_union_discriminator: "invalid_union_discriminator";
1312
+ invalid_enum_value: "invalid_enum_value";
1313
+ unrecognized_keys: "unrecognized_keys";
1314
+ invalid_arguments: "invalid_arguments";
1315
+ invalid_return_type: "invalid_return_type";
1316
+ invalid_date: "invalid_date";
1317
+ invalid_string: "invalid_string";
1318
+ too_small: "too_small";
1319
+ too_big: "too_big";
1320
+ invalid_intersection_types: "invalid_intersection_types";
1321
+ not_multiple_of: "not_multiple_of";
1322
+ not_finite: "not_finite";
1323
+ }>;
1324
+ }, "strip", z.ZodAny, z.objectOutputType<{
1325
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1326
+ message: z.ZodOptional<z.ZodString>;
1327
+ code: z.ZodNativeEnum<{
1328
+ invalid_type: "invalid_type";
1329
+ invalid_literal: "invalid_literal";
1330
+ custom: "custom";
1331
+ invalid_union: "invalid_union";
1332
+ invalid_union_discriminator: "invalid_union_discriminator";
1333
+ invalid_enum_value: "invalid_enum_value";
1334
+ unrecognized_keys: "unrecognized_keys";
1335
+ invalid_arguments: "invalid_arguments";
1336
+ invalid_return_type: "invalid_return_type";
1337
+ invalid_date: "invalid_date";
1338
+ invalid_string: "invalid_string";
1339
+ too_small: "too_small";
1340
+ too_big: "too_big";
1341
+ invalid_intersection_types: "invalid_intersection_types";
1342
+ not_multiple_of: "not_multiple_of";
1343
+ not_finite: "not_finite";
1344
+ }>;
1345
+ }, z.ZodAny, "strip">, z.objectInputType<{
1346
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1347
+ message: z.ZodOptional<z.ZodString>;
1348
+ code: z.ZodNativeEnum<{
1349
+ invalid_type: "invalid_type";
1350
+ invalid_literal: "invalid_literal";
1351
+ custom: "custom";
1352
+ invalid_union: "invalid_union";
1353
+ invalid_union_discriminator: "invalid_union_discriminator";
1354
+ invalid_enum_value: "invalid_enum_value";
1355
+ unrecognized_keys: "unrecognized_keys";
1356
+ invalid_arguments: "invalid_arguments";
1357
+ invalid_return_type: "invalid_return_type";
1358
+ invalid_date: "invalid_date";
1359
+ invalid_string: "invalid_string";
1360
+ too_small: "too_small";
1361
+ too_big: "too_big";
1362
+ invalid_intersection_types: "invalid_intersection_types";
1363
+ not_multiple_of: "not_multiple_of";
1364
+ not_finite: "not_finite";
1365
+ }>;
1366
+ }, z.ZodAny, "strip">>, "many">;
1367
+ }, "strip", z.ZodTypeAny, {
1368
+ name: "ZodError";
1369
+ issues: z.objectOutputType<{
1370
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1371
+ message: z.ZodOptional<z.ZodString>;
1372
+ code: z.ZodNativeEnum<{
1373
+ invalid_type: "invalid_type";
1374
+ invalid_literal: "invalid_literal";
1375
+ custom: "custom";
1376
+ invalid_union: "invalid_union";
1377
+ invalid_union_discriminator: "invalid_union_discriminator";
1378
+ invalid_enum_value: "invalid_enum_value";
1379
+ unrecognized_keys: "unrecognized_keys";
1380
+ invalid_arguments: "invalid_arguments";
1381
+ invalid_return_type: "invalid_return_type";
1382
+ invalid_date: "invalid_date";
1383
+ invalid_string: "invalid_string";
1384
+ too_small: "too_small";
1385
+ too_big: "too_big";
1386
+ invalid_intersection_types: "invalid_intersection_types";
1387
+ not_multiple_of: "not_multiple_of";
1388
+ not_finite: "not_finite";
1389
+ }>;
1390
+ }, z.ZodAny, "strip">[];
1391
+ }, {
1392
+ name: "ZodError";
1393
+ issues: z.objectInputType<{
1394
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1395
+ message: z.ZodOptional<z.ZodString>;
1396
+ code: z.ZodNativeEnum<{
1397
+ invalid_type: "invalid_type";
1398
+ invalid_literal: "invalid_literal";
1399
+ custom: "custom";
1400
+ invalid_union: "invalid_union";
1401
+ invalid_union_discriminator: "invalid_union_discriminator";
1402
+ invalid_enum_value: "invalid_enum_value";
1403
+ unrecognized_keys: "unrecognized_keys";
1404
+ invalid_arguments: "invalid_arguments";
1405
+ invalid_return_type: "invalid_return_type";
1406
+ invalid_date: "invalid_date";
1407
+ invalid_string: "invalid_string";
1408
+ too_small: "too_small";
1409
+ too_big: "too_big";
1410
+ invalid_intersection_types: "invalid_intersection_types";
1411
+ not_multiple_of: "not_multiple_of";
1412
+ not_finite: "not_finite";
1413
+ }>;
1414
+ }, z.ZodAny, "strip">[];
1415
+ }>, z.ZodObject<{
1416
+ code: z.ZodType<"INVALID_VIDEO_ID", z.ZodTypeDef, "INVALID_VIDEO_ID">;
1417
+ error: z.ZodType<"The provided video ID is invalid", z.ZodTypeDef, "The provided video ID is invalid">;
1418
+ name: z.ZodLiteral<"APIError">;
1419
+ }, "strip", z.ZodTypeAny, {
1420
+ code: "INVALID_VIDEO_ID";
1421
+ error: "The provided video ID is invalid";
1422
+ name: "APIError";
1423
+ }, {
1424
+ code: "INVALID_VIDEO_ID";
1425
+ error: "The provided video ID is invalid";
1426
+ name: "APIError";
1427
+ }>, z.ZodObject<{
1428
+ code: z.ZodType<"INVALID_PLAYLIST_ID", z.ZodTypeDef, "INVALID_PLAYLIST_ID">;
1429
+ error: z.ZodType<"The provided playlist ID is invalid", z.ZodTypeDef, "The provided playlist ID is invalid">;
1430
+ name: z.ZodLiteral<"APIError">;
1431
+ }, "strip", z.ZodTypeAny, {
1432
+ code: "INVALID_PLAYLIST_ID";
1433
+ error: "The provided playlist ID is invalid";
1434
+ name: "APIError";
1435
+ }, {
1436
+ code: "INVALID_PLAYLIST_ID";
1437
+ error: "The provided playlist ID is invalid";
1438
+ name: "APIError";
1439
+ }>]>;
1440
+ };
1441
+ };
1442
+ queueClear: {
1443
+ description: "Remove every track from the queue of a room";
1444
+ method: "DELETE";
1445
+ body: z.ZodUndefined;
1446
+ path: "/room/:roomId/queue";
1447
+ responses: {
1448
+ 500: z.ZodObject<{
1449
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1450
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1451
+ name: z.ZodLiteral<"APIError">;
1452
+ }, "strip", z.ZodTypeAny, {
1453
+ code: "INTERNAL_SERVER_ERROR";
1454
+ error: string;
1455
+ name: "APIError";
1456
+ }, {
1457
+ code: "INTERNAL_SERVER_ERROR";
1458
+ error: string;
1459
+ name: "APIError";
1460
+ }>;
1461
+ 404: z.ZodObject<{
1462
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1463
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1464
+ name: z.ZodLiteral<"APIError">;
1465
+ }, "strip", z.ZodTypeAny, {
1466
+ code: "ROOM_NOT_FOUND";
1467
+ error: "The requested room was not found";
1468
+ name: "APIError";
1469
+ }, {
1470
+ code: "ROOM_NOT_FOUND";
1471
+ error: "The requested room was not found";
1472
+ name: "APIError";
1473
+ }>;
1474
+ 401: z.ZodObject<{
1475
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1476
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1477
+ name: z.ZodLiteral<"APIError">;
1478
+ }, "strip", z.ZodTypeAny, {
1479
+ code: "UNAUTHORIZED";
1480
+ error: "Unauthorized";
1481
+ name: "APIError";
1482
+ }, {
1483
+ code: "UNAUTHORIZED";
1484
+ error: "Unauthorized";
1485
+ name: "APIError";
1486
+ }>;
1487
+ 403: z.ZodObject<{
1488
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1489
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1490
+ name: z.ZodLiteral<"APIError">;
1491
+ }, "strip", z.ZodTypeAny, {
1492
+ code: "FORBIDDEN";
1493
+ error: "Forbidden";
1494
+ name: "APIError";
1495
+ }, {
1496
+ code: "FORBIDDEN";
1497
+ error: "Forbidden";
1498
+ name: "APIError";
1499
+ }>;
1500
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1501
+ };
1502
+ };
1503
+ queueRemove: {
1504
+ description: "Remove a track from the queue of a room";
1505
+ method: "DELETE";
1506
+ body: z.ZodUndefined;
1507
+ path: "/room/:roomId/queue/:itemId";
1508
+ responses: {
1509
+ 500: z.ZodObject<{
1510
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1511
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1512
+ name: z.ZodLiteral<"APIError">;
1513
+ }, "strip", z.ZodTypeAny, {
1514
+ code: "INTERNAL_SERVER_ERROR";
1515
+ error: string;
1516
+ name: "APIError";
1517
+ }, {
1518
+ code: "INTERNAL_SERVER_ERROR";
1519
+ error: string;
1520
+ name: "APIError";
1521
+ }>;
1522
+ 404: z.ZodUnion<[z.ZodObject<{
1523
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1524
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1525
+ name: z.ZodLiteral<"APIError">;
1526
+ }, "strip", z.ZodTypeAny, {
1527
+ code: "ROOM_NOT_FOUND";
1528
+ error: "The requested room was not found";
1529
+ name: "APIError";
1530
+ }, {
1531
+ code: "ROOM_NOT_FOUND";
1532
+ error: "The requested room was not found";
1533
+ name: "APIError";
1534
+ }>, z.ZodObject<{
1535
+ code: z.ZodType<"QUEUE_ITEM_NOT_FOUND", z.ZodTypeDef, "QUEUE_ITEM_NOT_FOUND">;
1536
+ error: z.ZodType<"The queue doesn't have this track", z.ZodTypeDef, "The queue doesn't have this track">;
1537
+ name: z.ZodLiteral<"APIError">;
1538
+ }, "strip", z.ZodTypeAny, {
1539
+ code: "QUEUE_ITEM_NOT_FOUND";
1540
+ error: "The queue doesn't have this track";
1541
+ name: "APIError";
1542
+ }, {
1543
+ code: "QUEUE_ITEM_NOT_FOUND";
1544
+ error: "The queue doesn't have this track";
1545
+ name: "APIError";
1546
+ }>]>;
1547
+ 401: z.ZodObject<{
1548
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1549
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1550
+ name: z.ZodLiteral<"APIError">;
1551
+ }, "strip", z.ZodTypeAny, {
1552
+ code: "UNAUTHORIZED";
1553
+ error: "Unauthorized";
1554
+ name: "APIError";
1555
+ }, {
1556
+ code: "UNAUTHORIZED";
1557
+ error: "Unauthorized";
1558
+ name: "APIError";
1559
+ }>;
1560
+ 403: z.ZodObject<{
1561
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1562
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1563
+ name: z.ZodLiteral<"APIError">;
1564
+ }, "strip", z.ZodTypeAny, {
1565
+ code: "FORBIDDEN";
1566
+ error: "Forbidden";
1567
+ name: "APIError";
1568
+ }, {
1569
+ code: "FORBIDDEN";
1570
+ error: "Forbidden";
1571
+ name: "APIError";
1572
+ }>;
1573
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1574
+ };
1575
+ };
1576
+ queueMove: {
1577
+ description: "Move a track of the queue of a room to a new index";
1578
+ method: "POST";
1579
+ body: z.ZodObject<{
1580
+ index: z.ZodNumber;
1581
+ }, "strip", z.ZodTypeAny, {
1582
+ index: number;
1583
+ }, {
1584
+ index: number;
1585
+ }>;
1586
+ path: "/room/:roomId/queue/:itemId/move";
1587
+ responses: {
1588
+ 500: z.ZodObject<{
1589
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1590
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1591
+ name: z.ZodLiteral<"APIError">;
1592
+ }, "strip", z.ZodTypeAny, {
1593
+ code: "INTERNAL_SERVER_ERROR";
1594
+ error: string;
1595
+ name: "APIError";
1596
+ }, {
1597
+ code: "INTERNAL_SERVER_ERROR";
1598
+ error: string;
1599
+ name: "APIError";
1600
+ }>;
1601
+ 404: z.ZodUnion<[z.ZodObject<{
1602
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1603
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1604
+ name: z.ZodLiteral<"APIError">;
1605
+ }, "strip", z.ZodTypeAny, {
1606
+ code: "ROOM_NOT_FOUND";
1607
+ error: "The requested room was not found";
1608
+ name: "APIError";
1609
+ }, {
1610
+ code: "ROOM_NOT_FOUND";
1611
+ error: "The requested room was not found";
1612
+ name: "APIError";
1613
+ }>, z.ZodObject<{
1614
+ code: z.ZodType<"QUEUE_ITEM_NOT_FOUND", z.ZodTypeDef, "QUEUE_ITEM_NOT_FOUND">;
1615
+ error: z.ZodType<"The queue doesn't have this track", z.ZodTypeDef, "The queue doesn't have this track">;
1616
+ name: z.ZodLiteral<"APIError">;
1617
+ }, "strip", z.ZodTypeAny, {
1618
+ code: "QUEUE_ITEM_NOT_FOUND";
1619
+ error: "The queue doesn't have this track";
1620
+ name: "APIError";
1621
+ }, {
1622
+ code: "QUEUE_ITEM_NOT_FOUND";
1623
+ error: "The queue doesn't have this track";
1624
+ name: "APIError";
1625
+ }>]>;
1626
+ 401: z.ZodObject<{
1627
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1628
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1629
+ name: z.ZodLiteral<"APIError">;
1630
+ }, "strip", z.ZodTypeAny, {
1631
+ code: "UNAUTHORIZED";
1632
+ error: "Unauthorized";
1633
+ name: "APIError";
1634
+ }, {
1635
+ code: "UNAUTHORIZED";
1636
+ error: "Unauthorized";
1637
+ name: "APIError";
1638
+ }>;
1639
+ 403: z.ZodObject<{
1640
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1641
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1642
+ name: z.ZodLiteral<"APIError">;
1643
+ }, "strip", z.ZodTypeAny, {
1644
+ code: "FORBIDDEN";
1645
+ error: "Forbidden";
1646
+ name: "APIError";
1647
+ }, {
1648
+ code: "FORBIDDEN";
1649
+ error: "Forbidden";
1650
+ name: "APIError";
1651
+ }>;
1652
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1653
+ 400: z.ZodObject<{
1654
+ name: z.ZodLiteral<"ZodError">;
1655
+ issues: z.ZodArray<z.ZodObject<{
1656
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1657
+ message: z.ZodOptional<z.ZodString>;
1658
+ code: z.ZodNativeEnum<{
1659
+ invalid_type: "invalid_type";
1660
+ invalid_literal: "invalid_literal";
1661
+ custom: "custom";
1662
+ invalid_union: "invalid_union";
1663
+ invalid_union_discriminator: "invalid_union_discriminator";
1664
+ invalid_enum_value: "invalid_enum_value";
1665
+ unrecognized_keys: "unrecognized_keys";
1666
+ invalid_arguments: "invalid_arguments";
1667
+ invalid_return_type: "invalid_return_type";
1668
+ invalid_date: "invalid_date";
1669
+ invalid_string: "invalid_string";
1670
+ too_small: "too_small";
1671
+ too_big: "too_big";
1672
+ invalid_intersection_types: "invalid_intersection_types";
1673
+ not_multiple_of: "not_multiple_of";
1674
+ not_finite: "not_finite";
1675
+ }>;
1676
+ }, "strip", z.ZodAny, z.objectOutputType<{
1677
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1678
+ message: z.ZodOptional<z.ZodString>;
1679
+ code: z.ZodNativeEnum<{
1680
+ invalid_type: "invalid_type";
1681
+ invalid_literal: "invalid_literal";
1682
+ custom: "custom";
1683
+ invalid_union: "invalid_union";
1684
+ invalid_union_discriminator: "invalid_union_discriminator";
1685
+ invalid_enum_value: "invalid_enum_value";
1686
+ unrecognized_keys: "unrecognized_keys";
1687
+ invalid_arguments: "invalid_arguments";
1688
+ invalid_return_type: "invalid_return_type";
1689
+ invalid_date: "invalid_date";
1690
+ invalid_string: "invalid_string";
1691
+ too_small: "too_small";
1692
+ too_big: "too_big";
1693
+ invalid_intersection_types: "invalid_intersection_types";
1694
+ not_multiple_of: "not_multiple_of";
1695
+ not_finite: "not_finite";
1696
+ }>;
1697
+ }, z.ZodAny, "strip">, z.objectInputType<{
1698
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1699
+ message: z.ZodOptional<z.ZodString>;
1700
+ code: z.ZodNativeEnum<{
1701
+ invalid_type: "invalid_type";
1702
+ invalid_literal: "invalid_literal";
1703
+ custom: "custom";
1704
+ invalid_union: "invalid_union";
1705
+ invalid_union_discriminator: "invalid_union_discriminator";
1706
+ invalid_enum_value: "invalid_enum_value";
1707
+ unrecognized_keys: "unrecognized_keys";
1708
+ invalid_arguments: "invalid_arguments";
1709
+ invalid_return_type: "invalid_return_type";
1710
+ invalid_date: "invalid_date";
1711
+ invalid_string: "invalid_string";
1712
+ too_small: "too_small";
1713
+ too_big: "too_big";
1714
+ invalid_intersection_types: "invalid_intersection_types";
1715
+ not_multiple_of: "not_multiple_of";
1716
+ not_finite: "not_finite";
1717
+ }>;
1718
+ }, z.ZodAny, "strip">>, "many">;
1719
+ }, "strip", z.ZodTypeAny, {
1720
+ name: "ZodError";
1721
+ issues: z.objectOutputType<{
1722
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1723
+ message: z.ZodOptional<z.ZodString>;
1724
+ code: z.ZodNativeEnum<{
1725
+ invalid_type: "invalid_type";
1726
+ invalid_literal: "invalid_literal";
1727
+ custom: "custom";
1728
+ invalid_union: "invalid_union";
1729
+ invalid_union_discriminator: "invalid_union_discriminator";
1730
+ invalid_enum_value: "invalid_enum_value";
1731
+ unrecognized_keys: "unrecognized_keys";
1732
+ invalid_arguments: "invalid_arguments";
1733
+ invalid_return_type: "invalid_return_type";
1734
+ invalid_date: "invalid_date";
1735
+ invalid_string: "invalid_string";
1736
+ too_small: "too_small";
1737
+ too_big: "too_big";
1738
+ invalid_intersection_types: "invalid_intersection_types";
1739
+ not_multiple_of: "not_multiple_of";
1740
+ not_finite: "not_finite";
1741
+ }>;
1742
+ }, z.ZodAny, "strip">[];
1743
+ }, {
1744
+ name: "ZodError";
1745
+ issues: z.objectInputType<{
1746
+ path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
1747
+ message: z.ZodOptional<z.ZodString>;
1748
+ code: z.ZodNativeEnum<{
1749
+ invalid_type: "invalid_type";
1750
+ invalid_literal: "invalid_literal";
1751
+ custom: "custom";
1752
+ invalid_union: "invalid_union";
1753
+ invalid_union_discriminator: "invalid_union_discriminator";
1754
+ invalid_enum_value: "invalid_enum_value";
1755
+ unrecognized_keys: "unrecognized_keys";
1756
+ invalid_arguments: "invalid_arguments";
1757
+ invalid_return_type: "invalid_return_type";
1758
+ invalid_date: "invalid_date";
1759
+ invalid_string: "invalid_string";
1760
+ too_small: "too_small";
1761
+ too_big: "too_big";
1762
+ invalid_intersection_types: "invalid_intersection_types";
1763
+ not_multiple_of: "not_multiple_of";
1764
+ not_finite: "not_finite";
1765
+ }>;
1766
+ }, z.ZodAny, "strip">[];
1767
+ }>;
1768
+ };
1769
+ };
1770
+ next: {
1771
+ description: "Skip to the next track of the queue of a room";
1772
+ method: "POST";
1773
+ body: z.ZodUndefined;
1774
+ path: "/room/:roomId/next";
1775
+ responses: {
1776
+ 500: z.ZodObject<{
1777
+ code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
1778
+ error: z.ZodType<string, z.ZodTypeDef, string>;
1779
+ name: z.ZodLiteral<"APIError">;
1780
+ }, "strip", z.ZodTypeAny, {
1781
+ code: "INTERNAL_SERVER_ERROR";
1782
+ error: string;
1783
+ name: "APIError";
1784
+ }, {
1785
+ code: "INTERNAL_SERVER_ERROR";
1786
+ error: string;
1787
+ name: "APIError";
1788
+ }>;
1789
+ 404: z.ZodObject<{
1790
+ code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
1791
+ error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
1792
+ name: z.ZodLiteral<"APIError">;
1793
+ }, "strip", z.ZodTypeAny, {
1794
+ code: "ROOM_NOT_FOUND";
1795
+ error: "The requested room was not found";
1796
+ name: "APIError";
1797
+ }, {
1798
+ code: "ROOM_NOT_FOUND";
1799
+ error: "The requested room was not found";
1800
+ name: "APIError";
1801
+ }>;
1802
+ 401: z.ZodObject<{
1803
+ code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
1804
+ error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
1805
+ name: z.ZodLiteral<"APIError">;
1806
+ }, "strip", z.ZodTypeAny, {
1807
+ code: "UNAUTHORIZED";
1808
+ error: "Unauthorized";
1809
+ name: "APIError";
1810
+ }, {
1811
+ code: "UNAUTHORIZED";
1812
+ error: "Unauthorized";
1813
+ name: "APIError";
1814
+ }>;
1815
+ 403: z.ZodObject<{
1816
+ code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
1817
+ error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
1818
+ name: z.ZodLiteral<"APIError">;
1819
+ }, "strip", z.ZodTypeAny, {
1820
+ code: "FORBIDDEN";
1821
+ error: "Forbidden";
1822
+ name: "APIError";
1823
+ }, {
1824
+ code: "FORBIDDEN";
1825
+ error: "Forbidden";
1826
+ name: "APIError";
1827
+ }>;
1828
+ 200: typeof import("@ts-rest/core").ContractNoBody;
1829
+ 400: z.ZodObject<{
1830
+ code: z.ZodType<"QUEUE_EMPTY", z.ZodTypeDef, "QUEUE_EMPTY">;
1831
+ error: z.ZodType<"The queue of this room is empty", z.ZodTypeDef, "The queue of this room is empty">;
1832
+ name: z.ZodLiteral<"APIError">;
1833
+ }, "strip", z.ZodTypeAny, {
1834
+ code: "QUEUE_EMPTY";
1835
+ error: "The queue of this room is empty";
1836
+ name: "APIError";
1837
+ }, {
1838
+ code: "QUEUE_EMPTY";
1839
+ error: "The queue of this room is empty";
1840
+ name: "APIError";
1841
+ }>;
1842
+ };
1843
+ };
945
1844
  play: {
946
- description: "Play the track of a room, from its position. A room without a stream starts a new one";
1845
+ description: "Play the track of a room, from its position, or the next one of its queue if it has none. A room without a stream starts a new one";
947
1846
  method: "POST";
948
1847
  body: z.ZodUndefined;
949
1848
  path: "/room/:roomId/play";