@darco2903/altv-web-api 2.1.0 → 2.3.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 +295 -0
- package/dist/contract/index.d.ts +594 -0
- package/dist/contract/room.d.ts +383 -0
- package/dist/contract/room.js +57 -1
- package/dist/contract/youtube.d.ts +213 -0
- package/dist/contract/youtube.js +18 -2
- package/dist/types/youtube.d.ts +17 -0
- package/dist/types/youtube.js +6 -0
- package/package.json +1 -1
package/dist/contract/index.d.ts
CHANGED
|
@@ -223,6 +223,219 @@ declare const _default: {
|
|
|
223
223
|
}>;
|
|
224
224
|
};
|
|
225
225
|
};
|
|
226
|
+
searchPlaylists: {
|
|
227
|
+
query: import("zod").ZodObject<{
|
|
228
|
+
q: import("zod").ZodString;
|
|
229
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
230
|
+
q: string;
|
|
231
|
+
}, {
|
|
232
|
+
q: string;
|
|
233
|
+
}>;
|
|
234
|
+
description: "Search YouTube playlists";
|
|
235
|
+
method: "GET";
|
|
236
|
+
path: "/api/v2/youtube/search/playlists";
|
|
237
|
+
responses: {
|
|
238
|
+
429: import("zod").ZodObject<{
|
|
239
|
+
code: import("zod").ZodType<"TOO_MANY_SEARCHES", import("zod").ZodTypeDef, "TOO_MANY_SEARCHES">;
|
|
240
|
+
error: import("zod").ZodType<"Too many searches are running", import("zod").ZodTypeDef, "Too many searches are running">;
|
|
241
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
242
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
243
|
+
code: "TOO_MANY_SEARCHES";
|
|
244
|
+
error: "Too many searches are running";
|
|
245
|
+
name: "APIError";
|
|
246
|
+
}, {
|
|
247
|
+
code: "TOO_MANY_SEARCHES";
|
|
248
|
+
error: "Too many searches are running";
|
|
249
|
+
name: "APIError";
|
|
250
|
+
}>;
|
|
251
|
+
500: import("zod").ZodObject<{
|
|
252
|
+
code: import("zod").ZodType<"INTERNAL_SERVER_ERROR", import("zod").ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
253
|
+
error: import("zod").ZodType<string, import("zod").ZodTypeDef, string>;
|
|
254
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
255
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
256
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
257
|
+
error: string;
|
|
258
|
+
name: "APIError";
|
|
259
|
+
}, {
|
|
260
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
261
|
+
error: string;
|
|
262
|
+
name: "APIError";
|
|
263
|
+
}>;
|
|
264
|
+
401: import("zod").ZodObject<{
|
|
265
|
+
code: import("zod").ZodType<"UNAUTHORIZED", import("zod").ZodTypeDef, "UNAUTHORIZED">;
|
|
266
|
+
error: import("zod").ZodType<"Unauthorized", import("zod").ZodTypeDef, "Unauthorized">;
|
|
267
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
268
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
269
|
+
code: "UNAUTHORIZED";
|
|
270
|
+
error: "Unauthorized";
|
|
271
|
+
name: "APIError";
|
|
272
|
+
}, {
|
|
273
|
+
code: "UNAUTHORIZED";
|
|
274
|
+
error: "Unauthorized";
|
|
275
|
+
name: "APIError";
|
|
276
|
+
}>;
|
|
277
|
+
403: import("zod").ZodObject<{
|
|
278
|
+
code: import("zod").ZodType<"FORBIDDEN", import("zod").ZodTypeDef, "FORBIDDEN">;
|
|
279
|
+
error: import("zod").ZodType<"Forbidden", import("zod").ZodTypeDef, "Forbidden">;
|
|
280
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
281
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
282
|
+
code: "FORBIDDEN";
|
|
283
|
+
error: "Forbidden";
|
|
284
|
+
name: "APIError";
|
|
285
|
+
}, {
|
|
286
|
+
code: "FORBIDDEN";
|
|
287
|
+
error: "Forbidden";
|
|
288
|
+
name: "APIError";
|
|
289
|
+
}>;
|
|
290
|
+
200: import("zod").ZodObject<{
|
|
291
|
+
results: import("zod").ZodArray<import("zod").ZodObject<{
|
|
292
|
+
playlistId: import("zod").ZodString;
|
|
293
|
+
title: import("zod").ZodString;
|
|
294
|
+
channel: import("zod").ZodNullable<import("zod").ZodString>;
|
|
295
|
+
thumbnail: import("zod").ZodNullable<import("zod").ZodString>;
|
|
296
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
297
|
+
title: string;
|
|
298
|
+
channel: string | null;
|
|
299
|
+
thumbnail: string | null;
|
|
300
|
+
playlistId: string;
|
|
301
|
+
}, {
|
|
302
|
+
title: string;
|
|
303
|
+
channel: string | null;
|
|
304
|
+
thumbnail: string | null;
|
|
305
|
+
playlistId: string;
|
|
306
|
+
}>, "many">;
|
|
307
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
308
|
+
results: {
|
|
309
|
+
title: string;
|
|
310
|
+
channel: string | null;
|
|
311
|
+
thumbnail: string | null;
|
|
312
|
+
playlistId: string;
|
|
313
|
+
}[];
|
|
314
|
+
}, {
|
|
315
|
+
results: {
|
|
316
|
+
title: string;
|
|
317
|
+
channel: string | null;
|
|
318
|
+
thumbnail: string | null;
|
|
319
|
+
playlistId: string;
|
|
320
|
+
}[];
|
|
321
|
+
}>;
|
|
322
|
+
400: import("zod").ZodObject<{
|
|
323
|
+
name: import("zod").ZodLiteral<"ZodError">;
|
|
324
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
325
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
326
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
327
|
+
code: import("zod").ZodNativeEnum<{
|
|
328
|
+
invalid_type: "invalid_type";
|
|
329
|
+
invalid_literal: "invalid_literal";
|
|
330
|
+
custom: "custom";
|
|
331
|
+
invalid_union: "invalid_union";
|
|
332
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
333
|
+
invalid_enum_value: "invalid_enum_value";
|
|
334
|
+
unrecognized_keys: "unrecognized_keys";
|
|
335
|
+
invalid_arguments: "invalid_arguments";
|
|
336
|
+
invalid_return_type: "invalid_return_type";
|
|
337
|
+
invalid_date: "invalid_date";
|
|
338
|
+
invalid_string: "invalid_string";
|
|
339
|
+
too_small: "too_small";
|
|
340
|
+
too_big: "too_big";
|
|
341
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
342
|
+
not_multiple_of: "not_multiple_of";
|
|
343
|
+
not_finite: "not_finite";
|
|
344
|
+
}>;
|
|
345
|
+
}, "strip", import("zod").ZodAny, import("zod").objectOutputType<{
|
|
346
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
347
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
348
|
+
code: import("zod").ZodNativeEnum<{
|
|
349
|
+
invalid_type: "invalid_type";
|
|
350
|
+
invalid_literal: "invalid_literal";
|
|
351
|
+
custom: "custom";
|
|
352
|
+
invalid_union: "invalid_union";
|
|
353
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
354
|
+
invalid_enum_value: "invalid_enum_value";
|
|
355
|
+
unrecognized_keys: "unrecognized_keys";
|
|
356
|
+
invalid_arguments: "invalid_arguments";
|
|
357
|
+
invalid_return_type: "invalid_return_type";
|
|
358
|
+
invalid_date: "invalid_date";
|
|
359
|
+
invalid_string: "invalid_string";
|
|
360
|
+
too_small: "too_small";
|
|
361
|
+
too_big: "too_big";
|
|
362
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
363
|
+
not_multiple_of: "not_multiple_of";
|
|
364
|
+
not_finite: "not_finite";
|
|
365
|
+
}>;
|
|
366
|
+
}, import("zod").ZodAny, "strip">, import("zod").objectInputType<{
|
|
367
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
368
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
369
|
+
code: import("zod").ZodNativeEnum<{
|
|
370
|
+
invalid_type: "invalid_type";
|
|
371
|
+
invalid_literal: "invalid_literal";
|
|
372
|
+
custom: "custom";
|
|
373
|
+
invalid_union: "invalid_union";
|
|
374
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
375
|
+
invalid_enum_value: "invalid_enum_value";
|
|
376
|
+
unrecognized_keys: "unrecognized_keys";
|
|
377
|
+
invalid_arguments: "invalid_arguments";
|
|
378
|
+
invalid_return_type: "invalid_return_type";
|
|
379
|
+
invalid_date: "invalid_date";
|
|
380
|
+
invalid_string: "invalid_string";
|
|
381
|
+
too_small: "too_small";
|
|
382
|
+
too_big: "too_big";
|
|
383
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
384
|
+
not_multiple_of: "not_multiple_of";
|
|
385
|
+
not_finite: "not_finite";
|
|
386
|
+
}>;
|
|
387
|
+
}, import("zod").ZodAny, "strip">>, "many">;
|
|
388
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
389
|
+
name: "ZodError";
|
|
390
|
+
issues: import("zod").objectOutputType<{
|
|
391
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
392
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
393
|
+
code: import("zod").ZodNativeEnum<{
|
|
394
|
+
invalid_type: "invalid_type";
|
|
395
|
+
invalid_literal: "invalid_literal";
|
|
396
|
+
custom: "custom";
|
|
397
|
+
invalid_union: "invalid_union";
|
|
398
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
399
|
+
invalid_enum_value: "invalid_enum_value";
|
|
400
|
+
unrecognized_keys: "unrecognized_keys";
|
|
401
|
+
invalid_arguments: "invalid_arguments";
|
|
402
|
+
invalid_return_type: "invalid_return_type";
|
|
403
|
+
invalid_date: "invalid_date";
|
|
404
|
+
invalid_string: "invalid_string";
|
|
405
|
+
too_small: "too_small";
|
|
406
|
+
too_big: "too_big";
|
|
407
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
408
|
+
not_multiple_of: "not_multiple_of";
|
|
409
|
+
not_finite: "not_finite";
|
|
410
|
+
}>;
|
|
411
|
+
}, import("zod").ZodAny, "strip">[];
|
|
412
|
+
}, {
|
|
413
|
+
name: "ZodError";
|
|
414
|
+
issues: import("zod").objectInputType<{
|
|
415
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
416
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
417
|
+
code: import("zod").ZodNativeEnum<{
|
|
418
|
+
invalid_type: "invalid_type";
|
|
419
|
+
invalid_literal: "invalid_literal";
|
|
420
|
+
custom: "custom";
|
|
421
|
+
invalid_union: "invalid_union";
|
|
422
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
423
|
+
invalid_enum_value: "invalid_enum_value";
|
|
424
|
+
unrecognized_keys: "unrecognized_keys";
|
|
425
|
+
invalid_arguments: "invalid_arguments";
|
|
426
|
+
invalid_return_type: "invalid_return_type";
|
|
427
|
+
invalid_date: "invalid_date";
|
|
428
|
+
invalid_string: "invalid_string";
|
|
429
|
+
too_small: "too_small";
|
|
430
|
+
too_big: "too_big";
|
|
431
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
432
|
+
not_multiple_of: "not_multiple_of";
|
|
433
|
+
not_finite: "not_finite";
|
|
434
|
+
}>;
|
|
435
|
+
}, import("zod").ZodAny, "strip">[];
|
|
436
|
+
}>;
|
|
437
|
+
};
|
|
438
|
+
};
|
|
226
439
|
suggest: {
|
|
227
440
|
query: import("zod").ZodObject<{
|
|
228
441
|
q: import("zod").ZodString;
|
|
@@ -1870,6 +2083,387 @@ declare const _default: {
|
|
|
1870
2083
|
}>]>;
|
|
1871
2084
|
};
|
|
1872
2085
|
};
|
|
2086
|
+
queuePlaylist: {
|
|
2087
|
+
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";
|
|
2088
|
+
method: "POST";
|
|
2089
|
+
body: import("zod").ZodObject<{
|
|
2090
|
+
playlistId: import("zod").ZodString;
|
|
2091
|
+
videoId: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2092
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2093
|
+
playlistId: string;
|
|
2094
|
+
videoId?: string | undefined;
|
|
2095
|
+
}, {
|
|
2096
|
+
playlistId: string;
|
|
2097
|
+
videoId?: string | undefined;
|
|
2098
|
+
}>;
|
|
2099
|
+
path: "/api/v2/room/:roomId/queue/playlist";
|
|
2100
|
+
responses: {
|
|
2101
|
+
500: import("zod").ZodObject<{
|
|
2102
|
+
code: import("zod").ZodType<"INTERNAL_SERVER_ERROR", import("zod").ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
2103
|
+
error: import("zod").ZodType<string, import("zod").ZodTypeDef, string>;
|
|
2104
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2105
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2106
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
2107
|
+
error: string;
|
|
2108
|
+
name: "APIError";
|
|
2109
|
+
}, {
|
|
2110
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
2111
|
+
error: string;
|
|
2112
|
+
name: "APIError";
|
|
2113
|
+
}>;
|
|
2114
|
+
404: import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
2115
|
+
code: import("zod").ZodType<"ROOM_NOT_FOUND", import("zod").ZodTypeDef, "ROOM_NOT_FOUND">;
|
|
2116
|
+
error: import("zod").ZodType<"The requested room was not found", import("zod").ZodTypeDef, "The requested room was not found">;
|
|
2117
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2118
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2119
|
+
code: "ROOM_NOT_FOUND";
|
|
2120
|
+
error: "The requested room was not found";
|
|
2121
|
+
name: "APIError";
|
|
2122
|
+
}, {
|
|
2123
|
+
code: "ROOM_NOT_FOUND";
|
|
2124
|
+
error: "The requested room was not found";
|
|
2125
|
+
name: "APIError";
|
|
2126
|
+
}>, import("zod").ZodObject<{
|
|
2127
|
+
code: import("zod").ZodType<"PLAYLIST_UNAVAILABLE", import("zod").ZodTypeDef, "PLAYLIST_UNAVAILABLE">;
|
|
2128
|
+
error: import("zod").ZodType<"This playlist can't be read, it may be private", import("zod").ZodTypeDef, "This playlist can't be read, it may be private">;
|
|
2129
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2130
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2131
|
+
code: "PLAYLIST_UNAVAILABLE";
|
|
2132
|
+
error: "This playlist can't be read, it may be private";
|
|
2133
|
+
name: "APIError";
|
|
2134
|
+
}, {
|
|
2135
|
+
code: "PLAYLIST_UNAVAILABLE";
|
|
2136
|
+
error: "This playlist can't be read, it may be private";
|
|
2137
|
+
name: "APIError";
|
|
2138
|
+
}>]>;
|
|
2139
|
+
409: import("zod").ZodObject<{
|
|
2140
|
+
code: import("zod").ZodType<"QUEUE_FULL", import("zod").ZodTypeDef, "QUEUE_FULL">;
|
|
2141
|
+
error: import("zod").ZodType<"The queue of this room is full", import("zod").ZodTypeDef, "The queue of this room is full">;
|
|
2142
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2143
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2144
|
+
code: "QUEUE_FULL";
|
|
2145
|
+
error: "The queue of this room is full";
|
|
2146
|
+
name: "APIError";
|
|
2147
|
+
}, {
|
|
2148
|
+
code: "QUEUE_FULL";
|
|
2149
|
+
error: "The queue of this room is full";
|
|
2150
|
+
name: "APIError";
|
|
2151
|
+
}>;
|
|
2152
|
+
429: import("zod").ZodObject<{
|
|
2153
|
+
code: import("zod").ZodType<"TOO_MANY_SEARCHES", import("zod").ZodTypeDef, "TOO_MANY_SEARCHES">;
|
|
2154
|
+
error: import("zod").ZodType<"Too many searches are running", import("zod").ZodTypeDef, "Too many searches are running">;
|
|
2155
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2156
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2157
|
+
code: "TOO_MANY_SEARCHES";
|
|
2158
|
+
error: "Too many searches are running";
|
|
2159
|
+
name: "APIError";
|
|
2160
|
+
}, {
|
|
2161
|
+
code: "TOO_MANY_SEARCHES";
|
|
2162
|
+
error: "Too many searches are running";
|
|
2163
|
+
name: "APIError";
|
|
2164
|
+
}>;
|
|
2165
|
+
401: import("zod").ZodObject<{
|
|
2166
|
+
code: import("zod").ZodType<"UNAUTHORIZED", import("zod").ZodTypeDef, "UNAUTHORIZED">;
|
|
2167
|
+
error: import("zod").ZodType<"Unauthorized", import("zod").ZodTypeDef, "Unauthorized">;
|
|
2168
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2169
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2170
|
+
code: "UNAUTHORIZED";
|
|
2171
|
+
error: "Unauthorized";
|
|
2172
|
+
name: "APIError";
|
|
2173
|
+
}, {
|
|
2174
|
+
code: "UNAUTHORIZED";
|
|
2175
|
+
error: "Unauthorized";
|
|
2176
|
+
name: "APIError";
|
|
2177
|
+
}>;
|
|
2178
|
+
403: import("zod").ZodObject<{
|
|
2179
|
+
code: import("zod").ZodType<"FORBIDDEN", import("zod").ZodTypeDef, "FORBIDDEN">;
|
|
2180
|
+
error: import("zod").ZodType<"Forbidden", import("zod").ZodTypeDef, "Forbidden">;
|
|
2181
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2182
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2183
|
+
code: "FORBIDDEN";
|
|
2184
|
+
error: "Forbidden";
|
|
2185
|
+
name: "APIError";
|
|
2186
|
+
}, {
|
|
2187
|
+
code: "FORBIDDEN";
|
|
2188
|
+
error: "Forbidden";
|
|
2189
|
+
name: "APIError";
|
|
2190
|
+
}>;
|
|
2191
|
+
200: import("zod").ZodObject<{
|
|
2192
|
+
added: import("zod").ZodNumber;
|
|
2193
|
+
skipped: import("zod").ZodNumber;
|
|
2194
|
+
total: import("zod").ZodNumber;
|
|
2195
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2196
|
+
added: number;
|
|
2197
|
+
skipped: number;
|
|
2198
|
+
total: number;
|
|
2199
|
+
}, {
|
|
2200
|
+
added: number;
|
|
2201
|
+
skipped: number;
|
|
2202
|
+
total: number;
|
|
2203
|
+
}>;
|
|
2204
|
+
400: import("zod").ZodUnion<[import("zod").ZodObject<{
|
|
2205
|
+
name: import("zod").ZodLiteral<"ZodError">;
|
|
2206
|
+
issues: import("zod").ZodArray<import("zod").ZodObject<{
|
|
2207
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
2208
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2209
|
+
code: import("zod").ZodNativeEnum<{
|
|
2210
|
+
invalid_type: "invalid_type";
|
|
2211
|
+
invalid_literal: "invalid_literal";
|
|
2212
|
+
custom: "custom";
|
|
2213
|
+
invalid_union: "invalid_union";
|
|
2214
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
2215
|
+
invalid_enum_value: "invalid_enum_value";
|
|
2216
|
+
unrecognized_keys: "unrecognized_keys";
|
|
2217
|
+
invalid_arguments: "invalid_arguments";
|
|
2218
|
+
invalid_return_type: "invalid_return_type";
|
|
2219
|
+
invalid_date: "invalid_date";
|
|
2220
|
+
invalid_string: "invalid_string";
|
|
2221
|
+
too_small: "too_small";
|
|
2222
|
+
too_big: "too_big";
|
|
2223
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
2224
|
+
not_multiple_of: "not_multiple_of";
|
|
2225
|
+
not_finite: "not_finite";
|
|
2226
|
+
}>;
|
|
2227
|
+
}, "strip", import("zod").ZodAny, import("zod").objectOutputType<{
|
|
2228
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
2229
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2230
|
+
code: import("zod").ZodNativeEnum<{
|
|
2231
|
+
invalid_type: "invalid_type";
|
|
2232
|
+
invalid_literal: "invalid_literal";
|
|
2233
|
+
custom: "custom";
|
|
2234
|
+
invalid_union: "invalid_union";
|
|
2235
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
2236
|
+
invalid_enum_value: "invalid_enum_value";
|
|
2237
|
+
unrecognized_keys: "unrecognized_keys";
|
|
2238
|
+
invalid_arguments: "invalid_arguments";
|
|
2239
|
+
invalid_return_type: "invalid_return_type";
|
|
2240
|
+
invalid_date: "invalid_date";
|
|
2241
|
+
invalid_string: "invalid_string";
|
|
2242
|
+
too_small: "too_small";
|
|
2243
|
+
too_big: "too_big";
|
|
2244
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
2245
|
+
not_multiple_of: "not_multiple_of";
|
|
2246
|
+
not_finite: "not_finite";
|
|
2247
|
+
}>;
|
|
2248
|
+
}, import("zod").ZodAny, "strip">, import("zod").objectInputType<{
|
|
2249
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
2250
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2251
|
+
code: import("zod").ZodNativeEnum<{
|
|
2252
|
+
invalid_type: "invalid_type";
|
|
2253
|
+
invalid_literal: "invalid_literal";
|
|
2254
|
+
custom: "custom";
|
|
2255
|
+
invalid_union: "invalid_union";
|
|
2256
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
2257
|
+
invalid_enum_value: "invalid_enum_value";
|
|
2258
|
+
unrecognized_keys: "unrecognized_keys";
|
|
2259
|
+
invalid_arguments: "invalid_arguments";
|
|
2260
|
+
invalid_return_type: "invalid_return_type";
|
|
2261
|
+
invalid_date: "invalid_date";
|
|
2262
|
+
invalid_string: "invalid_string";
|
|
2263
|
+
too_small: "too_small";
|
|
2264
|
+
too_big: "too_big";
|
|
2265
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
2266
|
+
not_multiple_of: "not_multiple_of";
|
|
2267
|
+
not_finite: "not_finite";
|
|
2268
|
+
}>;
|
|
2269
|
+
}, import("zod").ZodAny, "strip">>, "many">;
|
|
2270
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2271
|
+
name: "ZodError";
|
|
2272
|
+
issues: import("zod").objectOutputType<{
|
|
2273
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
2274
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2275
|
+
code: import("zod").ZodNativeEnum<{
|
|
2276
|
+
invalid_type: "invalid_type";
|
|
2277
|
+
invalid_literal: "invalid_literal";
|
|
2278
|
+
custom: "custom";
|
|
2279
|
+
invalid_union: "invalid_union";
|
|
2280
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
2281
|
+
invalid_enum_value: "invalid_enum_value";
|
|
2282
|
+
unrecognized_keys: "unrecognized_keys";
|
|
2283
|
+
invalid_arguments: "invalid_arguments";
|
|
2284
|
+
invalid_return_type: "invalid_return_type";
|
|
2285
|
+
invalid_date: "invalid_date";
|
|
2286
|
+
invalid_string: "invalid_string";
|
|
2287
|
+
too_small: "too_small";
|
|
2288
|
+
too_big: "too_big";
|
|
2289
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
2290
|
+
not_multiple_of: "not_multiple_of";
|
|
2291
|
+
not_finite: "not_finite";
|
|
2292
|
+
}>;
|
|
2293
|
+
}, import("zod").ZodAny, "strip">[];
|
|
2294
|
+
}, {
|
|
2295
|
+
name: "ZodError";
|
|
2296
|
+
issues: import("zod").objectInputType<{
|
|
2297
|
+
path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
|
|
2298
|
+
message: import("zod").ZodOptional<import("zod").ZodString>;
|
|
2299
|
+
code: import("zod").ZodNativeEnum<{
|
|
2300
|
+
invalid_type: "invalid_type";
|
|
2301
|
+
invalid_literal: "invalid_literal";
|
|
2302
|
+
custom: "custom";
|
|
2303
|
+
invalid_union: "invalid_union";
|
|
2304
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
2305
|
+
invalid_enum_value: "invalid_enum_value";
|
|
2306
|
+
unrecognized_keys: "unrecognized_keys";
|
|
2307
|
+
invalid_arguments: "invalid_arguments";
|
|
2308
|
+
invalid_return_type: "invalid_return_type";
|
|
2309
|
+
invalid_date: "invalid_date";
|
|
2310
|
+
invalid_string: "invalid_string";
|
|
2311
|
+
too_small: "too_small";
|
|
2312
|
+
too_big: "too_big";
|
|
2313
|
+
invalid_intersection_types: "invalid_intersection_types";
|
|
2314
|
+
not_multiple_of: "not_multiple_of";
|
|
2315
|
+
not_finite: "not_finite";
|
|
2316
|
+
}>;
|
|
2317
|
+
}, import("zod").ZodAny, "strip">[];
|
|
2318
|
+
}>, import("zod").ZodObject<{
|
|
2319
|
+
code: import("zod").ZodType<"INVALID_VIDEO_ID", import("zod").ZodTypeDef, "INVALID_VIDEO_ID">;
|
|
2320
|
+
error: import("zod").ZodType<"The provided video ID is invalid", import("zod").ZodTypeDef, "The provided video ID is invalid">;
|
|
2321
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2322
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2323
|
+
code: "INVALID_VIDEO_ID";
|
|
2324
|
+
error: "The provided video ID is invalid";
|
|
2325
|
+
name: "APIError";
|
|
2326
|
+
}, {
|
|
2327
|
+
code: "INVALID_VIDEO_ID";
|
|
2328
|
+
error: "The provided video ID is invalid";
|
|
2329
|
+
name: "APIError";
|
|
2330
|
+
}>, import("zod").ZodObject<{
|
|
2331
|
+
code: import("zod").ZodType<"INVALID_PLAYLIST_ID", import("zod").ZodTypeDef, "INVALID_PLAYLIST_ID">;
|
|
2332
|
+
error: import("zod").ZodType<"The provided playlist ID is invalid", import("zod").ZodTypeDef, "The provided playlist ID is invalid">;
|
|
2333
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2334
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2335
|
+
code: "INVALID_PLAYLIST_ID";
|
|
2336
|
+
error: "The provided playlist ID is invalid";
|
|
2337
|
+
name: "APIError";
|
|
2338
|
+
}, {
|
|
2339
|
+
code: "INVALID_PLAYLIST_ID";
|
|
2340
|
+
error: "The provided playlist ID is invalid";
|
|
2341
|
+
name: "APIError";
|
|
2342
|
+
}>]>;
|
|
2343
|
+
};
|
|
2344
|
+
};
|
|
2345
|
+
queueClear: {
|
|
2346
|
+
description: "Remove every track from the queue of a room";
|
|
2347
|
+
method: "DELETE";
|
|
2348
|
+
body: import("zod").ZodUndefined;
|
|
2349
|
+
path: "/api/v2/room/:roomId/queue";
|
|
2350
|
+
responses: {
|
|
2351
|
+
500: import("zod").ZodObject<{
|
|
2352
|
+
code: import("zod").ZodType<"INTERNAL_SERVER_ERROR", import("zod").ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
2353
|
+
error: import("zod").ZodType<string, import("zod").ZodTypeDef, string>;
|
|
2354
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2355
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2356
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
2357
|
+
error: string;
|
|
2358
|
+
name: "APIError";
|
|
2359
|
+
}, {
|
|
2360
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
2361
|
+
error: string;
|
|
2362
|
+
name: "APIError";
|
|
2363
|
+
}>;
|
|
2364
|
+
404: import("zod").ZodObject<{
|
|
2365
|
+
code: import("zod").ZodType<"ROOM_NOT_FOUND", import("zod").ZodTypeDef, "ROOM_NOT_FOUND">;
|
|
2366
|
+
error: import("zod").ZodType<"The requested room was not found", import("zod").ZodTypeDef, "The requested room was not found">;
|
|
2367
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2368
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2369
|
+
code: "ROOM_NOT_FOUND";
|
|
2370
|
+
error: "The requested room was not found";
|
|
2371
|
+
name: "APIError";
|
|
2372
|
+
}, {
|
|
2373
|
+
code: "ROOM_NOT_FOUND";
|
|
2374
|
+
error: "The requested room was not found";
|
|
2375
|
+
name: "APIError";
|
|
2376
|
+
}>;
|
|
2377
|
+
401: import("zod").ZodObject<{
|
|
2378
|
+
code: import("zod").ZodType<"UNAUTHORIZED", import("zod").ZodTypeDef, "UNAUTHORIZED">;
|
|
2379
|
+
error: import("zod").ZodType<"Unauthorized", import("zod").ZodTypeDef, "Unauthorized">;
|
|
2380
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2381
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2382
|
+
code: "UNAUTHORIZED";
|
|
2383
|
+
error: "Unauthorized";
|
|
2384
|
+
name: "APIError";
|
|
2385
|
+
}, {
|
|
2386
|
+
code: "UNAUTHORIZED";
|
|
2387
|
+
error: "Unauthorized";
|
|
2388
|
+
name: "APIError";
|
|
2389
|
+
}>;
|
|
2390
|
+
403: import("zod").ZodObject<{
|
|
2391
|
+
code: import("zod").ZodType<"FORBIDDEN", import("zod").ZodTypeDef, "FORBIDDEN">;
|
|
2392
|
+
error: import("zod").ZodType<"Forbidden", import("zod").ZodTypeDef, "Forbidden">;
|
|
2393
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2394
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2395
|
+
code: "FORBIDDEN";
|
|
2396
|
+
error: "Forbidden";
|
|
2397
|
+
name: "APIError";
|
|
2398
|
+
}, {
|
|
2399
|
+
code: "FORBIDDEN";
|
|
2400
|
+
error: "Forbidden";
|
|
2401
|
+
name: "APIError";
|
|
2402
|
+
}>;
|
|
2403
|
+
200: typeof import("@ts-rest/core").ContractNoBody;
|
|
2404
|
+
};
|
|
2405
|
+
};
|
|
2406
|
+
queueShuffle: {
|
|
2407
|
+
description: "Put the queue of a room in a new random order, listeners get it through the roomQueue socket event";
|
|
2408
|
+
method: "POST";
|
|
2409
|
+
body: import("zod").ZodUndefined;
|
|
2410
|
+
path: "/api/v2/room/:roomId/queue/shuffle";
|
|
2411
|
+
responses: {
|
|
2412
|
+
500: import("zod").ZodObject<{
|
|
2413
|
+
code: import("zod").ZodType<"INTERNAL_SERVER_ERROR", import("zod").ZodTypeDef, "INTERNAL_SERVER_ERROR">;
|
|
2414
|
+
error: import("zod").ZodType<string, import("zod").ZodTypeDef, string>;
|
|
2415
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2416
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2417
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
2418
|
+
error: string;
|
|
2419
|
+
name: "APIError";
|
|
2420
|
+
}, {
|
|
2421
|
+
code: "INTERNAL_SERVER_ERROR";
|
|
2422
|
+
error: string;
|
|
2423
|
+
name: "APIError";
|
|
2424
|
+
}>;
|
|
2425
|
+
404: import("zod").ZodObject<{
|
|
2426
|
+
code: import("zod").ZodType<"ROOM_NOT_FOUND", import("zod").ZodTypeDef, "ROOM_NOT_FOUND">;
|
|
2427
|
+
error: import("zod").ZodType<"The requested room was not found", import("zod").ZodTypeDef, "The requested room was not found">;
|
|
2428
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2429
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2430
|
+
code: "ROOM_NOT_FOUND";
|
|
2431
|
+
error: "The requested room was not found";
|
|
2432
|
+
name: "APIError";
|
|
2433
|
+
}, {
|
|
2434
|
+
code: "ROOM_NOT_FOUND";
|
|
2435
|
+
error: "The requested room was not found";
|
|
2436
|
+
name: "APIError";
|
|
2437
|
+
}>;
|
|
2438
|
+
401: import("zod").ZodObject<{
|
|
2439
|
+
code: import("zod").ZodType<"UNAUTHORIZED", import("zod").ZodTypeDef, "UNAUTHORIZED">;
|
|
2440
|
+
error: import("zod").ZodType<"Unauthorized", import("zod").ZodTypeDef, "Unauthorized">;
|
|
2441
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2442
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2443
|
+
code: "UNAUTHORIZED";
|
|
2444
|
+
error: "Unauthorized";
|
|
2445
|
+
name: "APIError";
|
|
2446
|
+
}, {
|
|
2447
|
+
code: "UNAUTHORIZED";
|
|
2448
|
+
error: "Unauthorized";
|
|
2449
|
+
name: "APIError";
|
|
2450
|
+
}>;
|
|
2451
|
+
403: import("zod").ZodObject<{
|
|
2452
|
+
code: import("zod").ZodType<"FORBIDDEN", import("zod").ZodTypeDef, "FORBIDDEN">;
|
|
2453
|
+
error: import("zod").ZodType<"Forbidden", import("zod").ZodTypeDef, "Forbidden">;
|
|
2454
|
+
name: import("zod").ZodLiteral<"APIError">;
|
|
2455
|
+
}, "strip", import("zod").ZodTypeAny, {
|
|
2456
|
+
code: "FORBIDDEN";
|
|
2457
|
+
error: "Forbidden";
|
|
2458
|
+
name: "APIError";
|
|
2459
|
+
}, {
|
|
2460
|
+
code: "FORBIDDEN";
|
|
2461
|
+
error: "Forbidden";
|
|
2462
|
+
name: "APIError";
|
|
2463
|
+
}>;
|
|
2464
|
+
200: typeof import("@ts-rest/core").ContractNoBody;
|
|
2465
|
+
};
|
|
2466
|
+
};
|
|
1873
2467
|
queueRemove: {
|
|
1874
2468
|
description: "Remove a track from the queue of a room";
|
|
1875
2469
|
method: "DELETE";
|