@darco2903/altv-web-api 2.0.0 → 2.1.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.
- package/dist/client.d.ts +309 -15
- package/dist/contract/index.d.ts +578 -1
- package/dist/contract/room.d.ts +578 -1
- package/dist/contract/room.js +58 -1
- package/dist/socket/room.d.ts +5 -1
- package/dist/types/room.d.ts +51 -0
- package/dist/types/room.js +6 -0
- package/package.json +1 -1
package/dist/contract/room.d.ts
CHANGED
|
@@ -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,556 @@ 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
|
+
queueRemove: {
|
|
1182
|
+
description: "Remove a track from the queue of a room";
|
|
1183
|
+
method: "DELETE";
|
|
1184
|
+
body: z.ZodUndefined;
|
|
1185
|
+
path: "/room/:roomId/queue/:itemId";
|
|
1186
|
+
responses: {
|
|
1187
|
+
500: z.ZodObject<{
|
|
1188
|
+
code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
1189
|
+
error: z.ZodType<string, z.ZodTypeDef, string>;
|
|
1190
|
+
name: z.ZodLiteral<"APIError">;
|
|
1191
|
+
}, "strip", z.ZodTypeAny, {
|
|
1192
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1193
|
+
error: string;
|
|
1194
|
+
name: "APIError";
|
|
1195
|
+
}, {
|
|
1196
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1197
|
+
error: string;
|
|
1198
|
+
name: "APIError";
|
|
1199
|
+
}>;
|
|
1200
|
+
404: z.ZodUnion<[z.ZodObject<{
|
|
1201
|
+
code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
|
|
1202
|
+
error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
|
|
1203
|
+
name: z.ZodLiteral<"APIError">;
|
|
1204
|
+
}, "strip", z.ZodTypeAny, {
|
|
1205
|
+
code: "ROOM_NOT_FOUND";
|
|
1206
|
+
error: "The requested room was not found";
|
|
1207
|
+
name: "APIError";
|
|
1208
|
+
}, {
|
|
1209
|
+
code: "ROOM_NOT_FOUND";
|
|
1210
|
+
error: "The requested room was not found";
|
|
1211
|
+
name: "APIError";
|
|
1212
|
+
}>, z.ZodObject<{
|
|
1213
|
+
code: z.ZodType<"QUEUE_ITEM_NOT_FOUND", z.ZodTypeDef, "QUEUE_ITEM_NOT_FOUND">;
|
|
1214
|
+
error: z.ZodType<"The queue doesn't have this track", z.ZodTypeDef, "The queue doesn't have this track">;
|
|
1215
|
+
name: z.ZodLiteral<"APIError">;
|
|
1216
|
+
}, "strip", z.ZodTypeAny, {
|
|
1217
|
+
code: "QUEUE_ITEM_NOT_FOUND";
|
|
1218
|
+
error: "The queue doesn't have this track";
|
|
1219
|
+
name: "APIError";
|
|
1220
|
+
}, {
|
|
1221
|
+
code: "QUEUE_ITEM_NOT_FOUND";
|
|
1222
|
+
error: "The queue doesn't have this track";
|
|
1223
|
+
name: "APIError";
|
|
1224
|
+
}>]>;
|
|
1225
|
+
401: z.ZodObject<{
|
|
1226
|
+
code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
|
|
1227
|
+
error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
|
|
1228
|
+
name: z.ZodLiteral<"APIError">;
|
|
1229
|
+
}, "strip", z.ZodTypeAny, {
|
|
1230
|
+
code: "UNAUTHORIZED";
|
|
1231
|
+
error: "Unauthorized";
|
|
1232
|
+
name: "APIError";
|
|
1233
|
+
}, {
|
|
1234
|
+
code: "UNAUTHORIZED";
|
|
1235
|
+
error: "Unauthorized";
|
|
1236
|
+
name: "APIError";
|
|
1237
|
+
}>;
|
|
1238
|
+
403: z.ZodObject<{
|
|
1239
|
+
code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
|
|
1240
|
+
error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
|
|
1241
|
+
name: z.ZodLiteral<"APIError">;
|
|
1242
|
+
}, "strip", z.ZodTypeAny, {
|
|
1243
|
+
code: "FORBIDDEN";
|
|
1244
|
+
error: "Forbidden";
|
|
1245
|
+
name: "APIError";
|
|
1246
|
+
}, {
|
|
1247
|
+
code: "FORBIDDEN";
|
|
1248
|
+
error: "Forbidden";
|
|
1249
|
+
name: "APIError";
|
|
1250
|
+
}>;
|
|
1251
|
+
200: typeof import("@ts-rest/core").ContractNoBody;
|
|
1252
|
+
};
|
|
1253
|
+
};
|
|
1254
|
+
queueMove: {
|
|
1255
|
+
description: "Move a track of the queue of a room to a new index";
|
|
1256
|
+
method: "POST";
|
|
1257
|
+
body: z.ZodObject<{
|
|
1258
|
+
index: z.ZodNumber;
|
|
1259
|
+
}, "strip", z.ZodTypeAny, {
|
|
1260
|
+
index: number;
|
|
1261
|
+
}, {
|
|
1262
|
+
index: number;
|
|
1263
|
+
}>;
|
|
1264
|
+
path: "/room/:roomId/queue/:itemId/move";
|
|
1265
|
+
responses: {
|
|
1266
|
+
500: z.ZodObject<{
|
|
1267
|
+
code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
1268
|
+
error: z.ZodType<string, z.ZodTypeDef, string>;
|
|
1269
|
+
name: z.ZodLiteral<"APIError">;
|
|
1270
|
+
}, "strip", z.ZodTypeAny, {
|
|
1271
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1272
|
+
error: string;
|
|
1273
|
+
name: "APIError";
|
|
1274
|
+
}, {
|
|
1275
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1276
|
+
error: string;
|
|
1277
|
+
name: "APIError";
|
|
1278
|
+
}>;
|
|
1279
|
+
404: z.ZodUnion<[z.ZodObject<{
|
|
1280
|
+
code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
|
|
1281
|
+
error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
|
|
1282
|
+
name: z.ZodLiteral<"APIError">;
|
|
1283
|
+
}, "strip", z.ZodTypeAny, {
|
|
1284
|
+
code: "ROOM_NOT_FOUND";
|
|
1285
|
+
error: "The requested room was not found";
|
|
1286
|
+
name: "APIError";
|
|
1287
|
+
}, {
|
|
1288
|
+
code: "ROOM_NOT_FOUND";
|
|
1289
|
+
error: "The requested room was not found";
|
|
1290
|
+
name: "APIError";
|
|
1291
|
+
}>, z.ZodObject<{
|
|
1292
|
+
code: z.ZodType<"QUEUE_ITEM_NOT_FOUND", z.ZodTypeDef, "QUEUE_ITEM_NOT_FOUND">;
|
|
1293
|
+
error: z.ZodType<"The queue doesn't have this track", z.ZodTypeDef, "The queue doesn't have this track">;
|
|
1294
|
+
name: z.ZodLiteral<"APIError">;
|
|
1295
|
+
}, "strip", z.ZodTypeAny, {
|
|
1296
|
+
code: "QUEUE_ITEM_NOT_FOUND";
|
|
1297
|
+
error: "The queue doesn't have this track";
|
|
1298
|
+
name: "APIError";
|
|
1299
|
+
}, {
|
|
1300
|
+
code: "QUEUE_ITEM_NOT_FOUND";
|
|
1301
|
+
error: "The queue doesn't have this track";
|
|
1302
|
+
name: "APIError";
|
|
1303
|
+
}>]>;
|
|
1304
|
+
401: z.ZodObject<{
|
|
1305
|
+
code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
|
|
1306
|
+
error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
|
|
1307
|
+
name: z.ZodLiteral<"APIError">;
|
|
1308
|
+
}, "strip", z.ZodTypeAny, {
|
|
1309
|
+
code: "UNAUTHORIZED";
|
|
1310
|
+
error: "Unauthorized";
|
|
1311
|
+
name: "APIError";
|
|
1312
|
+
}, {
|
|
1313
|
+
code: "UNAUTHORIZED";
|
|
1314
|
+
error: "Unauthorized";
|
|
1315
|
+
name: "APIError";
|
|
1316
|
+
}>;
|
|
1317
|
+
403: z.ZodObject<{
|
|
1318
|
+
code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
|
|
1319
|
+
error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
|
|
1320
|
+
name: z.ZodLiteral<"APIError">;
|
|
1321
|
+
}, "strip", z.ZodTypeAny, {
|
|
1322
|
+
code: "FORBIDDEN";
|
|
1323
|
+
error: "Forbidden";
|
|
1324
|
+
name: "APIError";
|
|
1325
|
+
}, {
|
|
1326
|
+
code: "FORBIDDEN";
|
|
1327
|
+
error: "Forbidden";
|
|
1328
|
+
name: "APIError";
|
|
1329
|
+
}>;
|
|
1330
|
+
200: typeof import("@ts-rest/core").ContractNoBody;
|
|
1331
|
+
400: z.ZodObject<{
|
|
1332
|
+
name: z.ZodLiteral<"ZodError">;
|
|
1333
|
+
issues: z.ZodArray<z.ZodObject<{
|
|
1334
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
1335
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1336
|
+
code: z.ZodNativeEnum<{
|
|
1337
|
+
invalid_type: "invalid_type";
|
|
1338
|
+
invalid_literal: "invalid_literal";
|
|
1339
|
+
custom: "custom";
|
|
1340
|
+
invalid_union: "invalid_union";
|
|
1341
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1342
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1343
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1344
|
+
invalid_arguments: "invalid_arguments";
|
|
1345
|
+
invalid_return_type: "invalid_return_type";
|
|
1346
|
+
invalid_date: "invalid_date";
|
|
1347
|
+
invalid_string: "invalid_string";
|
|
1348
|
+
too_small: "too_small";
|
|
1349
|
+
too_big: "too_big";
|
|
1350
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1351
|
+
not_multiple_of: "not_multiple_of";
|
|
1352
|
+
not_finite: "not_finite";
|
|
1353
|
+
}>;
|
|
1354
|
+
}, "strip", z.ZodAny, z.objectOutputType<{
|
|
1355
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
1356
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1357
|
+
code: z.ZodNativeEnum<{
|
|
1358
|
+
invalid_type: "invalid_type";
|
|
1359
|
+
invalid_literal: "invalid_literal";
|
|
1360
|
+
custom: "custom";
|
|
1361
|
+
invalid_union: "invalid_union";
|
|
1362
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1363
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1364
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1365
|
+
invalid_arguments: "invalid_arguments";
|
|
1366
|
+
invalid_return_type: "invalid_return_type";
|
|
1367
|
+
invalid_date: "invalid_date";
|
|
1368
|
+
invalid_string: "invalid_string";
|
|
1369
|
+
too_small: "too_small";
|
|
1370
|
+
too_big: "too_big";
|
|
1371
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1372
|
+
not_multiple_of: "not_multiple_of";
|
|
1373
|
+
not_finite: "not_finite";
|
|
1374
|
+
}>;
|
|
1375
|
+
}, z.ZodAny, "strip">, z.objectInputType<{
|
|
1376
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
1377
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1378
|
+
code: z.ZodNativeEnum<{
|
|
1379
|
+
invalid_type: "invalid_type";
|
|
1380
|
+
invalid_literal: "invalid_literal";
|
|
1381
|
+
custom: "custom";
|
|
1382
|
+
invalid_union: "invalid_union";
|
|
1383
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1384
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1385
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1386
|
+
invalid_arguments: "invalid_arguments";
|
|
1387
|
+
invalid_return_type: "invalid_return_type";
|
|
1388
|
+
invalid_date: "invalid_date";
|
|
1389
|
+
invalid_string: "invalid_string";
|
|
1390
|
+
too_small: "too_small";
|
|
1391
|
+
too_big: "too_big";
|
|
1392
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1393
|
+
not_multiple_of: "not_multiple_of";
|
|
1394
|
+
not_finite: "not_finite";
|
|
1395
|
+
}>;
|
|
1396
|
+
}, z.ZodAny, "strip">>, "many">;
|
|
1397
|
+
}, "strip", z.ZodTypeAny, {
|
|
1398
|
+
name: "ZodError";
|
|
1399
|
+
issues: z.objectOutputType<{
|
|
1400
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
1401
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1402
|
+
code: z.ZodNativeEnum<{
|
|
1403
|
+
invalid_type: "invalid_type";
|
|
1404
|
+
invalid_literal: "invalid_literal";
|
|
1405
|
+
custom: "custom";
|
|
1406
|
+
invalid_union: "invalid_union";
|
|
1407
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1408
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1409
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1410
|
+
invalid_arguments: "invalid_arguments";
|
|
1411
|
+
invalid_return_type: "invalid_return_type";
|
|
1412
|
+
invalid_date: "invalid_date";
|
|
1413
|
+
invalid_string: "invalid_string";
|
|
1414
|
+
too_small: "too_small";
|
|
1415
|
+
too_big: "too_big";
|
|
1416
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1417
|
+
not_multiple_of: "not_multiple_of";
|
|
1418
|
+
not_finite: "not_finite";
|
|
1419
|
+
}>;
|
|
1420
|
+
}, z.ZodAny, "strip">[];
|
|
1421
|
+
}, {
|
|
1422
|
+
name: "ZodError";
|
|
1423
|
+
issues: z.objectInputType<{
|
|
1424
|
+
path: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
1425
|
+
message: z.ZodOptional<z.ZodString>;
|
|
1426
|
+
code: z.ZodNativeEnum<{
|
|
1427
|
+
invalid_type: "invalid_type";
|
|
1428
|
+
invalid_literal: "invalid_literal";
|
|
1429
|
+
custom: "custom";
|
|
1430
|
+
invalid_union: "invalid_union";
|
|
1431
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
1432
|
+
invalid_enum_value: "invalid_enum_value";
|
|
1433
|
+
unrecognized_keys: "unrecognized_keys";
|
|
1434
|
+
invalid_arguments: "invalid_arguments";
|
|
1435
|
+
invalid_return_type: "invalid_return_type";
|
|
1436
|
+
invalid_date: "invalid_date";
|
|
1437
|
+
invalid_string: "invalid_string";
|
|
1438
|
+
too_small: "too_small";
|
|
1439
|
+
too_big: "too_big";
|
|
1440
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
1441
|
+
not_multiple_of: "not_multiple_of";
|
|
1442
|
+
not_finite: "not_finite";
|
|
1443
|
+
}>;
|
|
1444
|
+
}, z.ZodAny, "strip">[];
|
|
1445
|
+
}>;
|
|
1446
|
+
};
|
|
1447
|
+
};
|
|
1448
|
+
next: {
|
|
1449
|
+
description: "Skip to the next track of the queue of a room";
|
|
1450
|
+
method: "POST";
|
|
1451
|
+
body: z.ZodUndefined;
|
|
1452
|
+
path: "/room/:roomId/next";
|
|
1453
|
+
responses: {
|
|
1454
|
+
500: z.ZodObject<{
|
|
1455
|
+
code: z.ZodType<"INTERNAL_SERVER_ERROR", z.ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
1456
|
+
error: z.ZodType<string, z.ZodTypeDef, string>;
|
|
1457
|
+
name: z.ZodLiteral<"APIError">;
|
|
1458
|
+
}, "strip", z.ZodTypeAny, {
|
|
1459
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1460
|
+
error: string;
|
|
1461
|
+
name: "APIError";
|
|
1462
|
+
}, {
|
|
1463
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
1464
|
+
error: string;
|
|
1465
|
+
name: "APIError";
|
|
1466
|
+
}>;
|
|
1467
|
+
404: z.ZodObject<{
|
|
1468
|
+
code: z.ZodType<"ROOM_NOT_FOUND", z.ZodTypeDef, "ROOM_NOT_FOUND">;
|
|
1469
|
+
error: z.ZodType<"The requested room was not found", z.ZodTypeDef, "The requested room was not found">;
|
|
1470
|
+
name: z.ZodLiteral<"APIError">;
|
|
1471
|
+
}, "strip", z.ZodTypeAny, {
|
|
1472
|
+
code: "ROOM_NOT_FOUND";
|
|
1473
|
+
error: "The requested room was not found";
|
|
1474
|
+
name: "APIError";
|
|
1475
|
+
}, {
|
|
1476
|
+
code: "ROOM_NOT_FOUND";
|
|
1477
|
+
error: "The requested room was not found";
|
|
1478
|
+
name: "APIError";
|
|
1479
|
+
}>;
|
|
1480
|
+
401: z.ZodObject<{
|
|
1481
|
+
code: z.ZodType<"UNAUTHORIZED", z.ZodTypeDef, "UNAUTHORIZED">;
|
|
1482
|
+
error: z.ZodType<"Unauthorized", z.ZodTypeDef, "Unauthorized">;
|
|
1483
|
+
name: z.ZodLiteral<"APIError">;
|
|
1484
|
+
}, "strip", z.ZodTypeAny, {
|
|
1485
|
+
code: "UNAUTHORIZED";
|
|
1486
|
+
error: "Unauthorized";
|
|
1487
|
+
name: "APIError";
|
|
1488
|
+
}, {
|
|
1489
|
+
code: "UNAUTHORIZED";
|
|
1490
|
+
error: "Unauthorized";
|
|
1491
|
+
name: "APIError";
|
|
1492
|
+
}>;
|
|
1493
|
+
403: z.ZodObject<{
|
|
1494
|
+
code: z.ZodType<"FORBIDDEN", z.ZodTypeDef, "FORBIDDEN">;
|
|
1495
|
+
error: z.ZodType<"Forbidden", z.ZodTypeDef, "Forbidden">;
|
|
1496
|
+
name: z.ZodLiteral<"APIError">;
|
|
1497
|
+
}, "strip", z.ZodTypeAny, {
|
|
1498
|
+
code: "FORBIDDEN";
|
|
1499
|
+
error: "Forbidden";
|
|
1500
|
+
name: "APIError";
|
|
1501
|
+
}, {
|
|
1502
|
+
code: "FORBIDDEN";
|
|
1503
|
+
error: "Forbidden";
|
|
1504
|
+
name: "APIError";
|
|
1505
|
+
}>;
|
|
1506
|
+
200: typeof import("@ts-rest/core").ContractNoBody;
|
|
1507
|
+
400: z.ZodObject<{
|
|
1508
|
+
code: z.ZodType<"QUEUE_EMPTY", z.ZodTypeDef, "QUEUE_EMPTY">;
|
|
1509
|
+
error: z.ZodType<"The queue of this room is empty", z.ZodTypeDef, "The queue of this room is empty">;
|
|
1510
|
+
name: z.ZodLiteral<"APIError">;
|
|
1511
|
+
}, "strip", z.ZodTypeAny, {
|
|
1512
|
+
code: "QUEUE_EMPTY";
|
|
1513
|
+
error: "The queue of this room is empty";
|
|
1514
|
+
name: "APIError";
|
|
1515
|
+
}, {
|
|
1516
|
+
code: "QUEUE_EMPTY";
|
|
1517
|
+
error: "The queue of this room is empty";
|
|
1518
|
+
name: "APIError";
|
|
1519
|
+
}>;
|
|
1520
|
+
};
|
|
1521
|
+
};
|
|
945
1522
|
play: {
|
|
946
|
-
description: "Play the track of a room, from its position. A room without a stream starts a new one";
|
|
1523
|
+
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
1524
|
method: "POST";
|
|
948
1525
|
body: z.ZodUndefined;
|
|
949
1526
|
path: "/room/:roomId/play";
|