@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 CHANGED
@@ -89,6 +89,90 @@ export declare function createClient(origin: string): {
89
89
  body: unknown;
90
90
  headers: Headers;
91
91
  }>;
92
+ searchPlaylists: (args: {
93
+ query: {
94
+ q: string;
95
+ };
96
+ cache?: RequestCache | undefined;
97
+ extraHeaders?: Record<string, string | undefined> | undefined;
98
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
99
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
100
+ }) => Promise<{
101
+ status: 500;
102
+ body: {
103
+ code: "INTERNAL_SERVER_ERROR";
104
+ error: string;
105
+ name: "APIError";
106
+ };
107
+ headers: Headers;
108
+ } | {
109
+ status: 401;
110
+ body: {
111
+ code: "UNAUTHORIZED";
112
+ error: "Unauthorized";
113
+ name: "APIError";
114
+ };
115
+ headers: Headers;
116
+ } | {
117
+ status: 403;
118
+ body: {
119
+ code: "FORBIDDEN";
120
+ error: "Forbidden";
121
+ name: "APIError";
122
+ };
123
+ headers: Headers;
124
+ } | {
125
+ status: 200;
126
+ body: {
127
+ results: {
128
+ title: string;
129
+ channel: string | null;
130
+ thumbnail: string | null;
131
+ playlistId: string;
132
+ }[];
133
+ };
134
+ headers: Headers;
135
+ } | {
136
+ status: 400;
137
+ body: {
138
+ name: "ZodError";
139
+ issues: import("zod").objectOutputType<{
140
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
141
+ message: import("zod").ZodOptional<import("zod").ZodString>;
142
+ code: import("zod").ZodNativeEnum<{
143
+ invalid_type: "invalid_type";
144
+ invalid_literal: "invalid_literal";
145
+ custom: "custom";
146
+ invalid_union: "invalid_union";
147
+ invalid_union_discriminator: "invalid_union_discriminator";
148
+ invalid_enum_value: "invalid_enum_value";
149
+ unrecognized_keys: "unrecognized_keys";
150
+ invalid_arguments: "invalid_arguments";
151
+ invalid_return_type: "invalid_return_type";
152
+ invalid_date: "invalid_date";
153
+ invalid_string: "invalid_string";
154
+ too_small: "too_small";
155
+ too_big: "too_big";
156
+ invalid_intersection_types: "invalid_intersection_types";
157
+ not_multiple_of: "not_multiple_of";
158
+ not_finite: "not_finite";
159
+ }>;
160
+ }, import("zod").ZodAny, "strip">[];
161
+ };
162
+ headers: Headers;
163
+ } | {
164
+ status: 429;
165
+ body: {
166
+ code: "TOO_MANY_SEARCHES";
167
+ error: "Too many searches are running";
168
+ name: "APIError";
169
+ };
170
+ headers: Headers;
171
+ } | {
172
+ status: 404 | 100 | 409 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
173
+ body: unknown;
174
+ headers: Headers;
175
+ }>;
92
176
  suggest: (args: {
93
177
  query: {
94
178
  q: string;
@@ -823,6 +907,217 @@ export declare function createClient(origin: string): {
823
907
  body: unknown;
824
908
  headers: Headers;
825
909
  }>;
910
+ queuePlaylist: (args: {
911
+ params: {
912
+ roomId: string;
913
+ };
914
+ body: {
915
+ playlistId: string;
916
+ videoId?: string | undefined;
917
+ };
918
+ cache?: RequestCache | undefined;
919
+ extraHeaders?: Record<string, string | undefined> | undefined;
920
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
921
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
922
+ }) => Promise<{
923
+ status: 500;
924
+ body: {
925
+ code: "INTERNAL_SERVER_ERROR";
926
+ error: string;
927
+ name: "APIError";
928
+ };
929
+ headers: Headers;
930
+ } | {
931
+ status: 401;
932
+ body: {
933
+ code: "UNAUTHORIZED";
934
+ error: "Unauthorized";
935
+ name: "APIError";
936
+ };
937
+ headers: Headers;
938
+ } | {
939
+ status: 403;
940
+ body: {
941
+ code: "FORBIDDEN";
942
+ error: "Forbidden";
943
+ name: "APIError";
944
+ };
945
+ headers: Headers;
946
+ } | {
947
+ status: 200;
948
+ body: {
949
+ added: number;
950
+ skipped: number;
951
+ total: number;
952
+ };
953
+ headers: Headers;
954
+ } | {
955
+ status: 400;
956
+ body: {
957
+ code: "INVALID_VIDEO_ID";
958
+ error: "The provided video ID is invalid";
959
+ name: "APIError";
960
+ } | {
961
+ name: "ZodError";
962
+ issues: import("zod").objectOutputType<{
963
+ path: import("zod").ZodArray<import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodNumber]>, "many">;
964
+ message: import("zod").ZodOptional<import("zod").ZodString>;
965
+ code: import("zod").ZodNativeEnum<{
966
+ invalid_type: "invalid_type";
967
+ invalid_literal: "invalid_literal";
968
+ custom: "custom";
969
+ invalid_union: "invalid_union";
970
+ invalid_union_discriminator: "invalid_union_discriminator";
971
+ invalid_enum_value: "invalid_enum_value";
972
+ unrecognized_keys: "unrecognized_keys";
973
+ invalid_arguments: "invalid_arguments";
974
+ invalid_return_type: "invalid_return_type";
975
+ invalid_date: "invalid_date";
976
+ invalid_string: "invalid_string";
977
+ too_small: "too_small";
978
+ too_big: "too_big";
979
+ invalid_intersection_types: "invalid_intersection_types";
980
+ not_multiple_of: "not_multiple_of";
981
+ not_finite: "not_finite";
982
+ }>;
983
+ }, import("zod").ZodAny, "strip">[];
984
+ } | {
985
+ code: "INVALID_PLAYLIST_ID";
986
+ error: "The provided playlist ID is invalid";
987
+ name: "APIError";
988
+ };
989
+ headers: Headers;
990
+ } | {
991
+ status: 404;
992
+ body: {
993
+ code: "ROOM_NOT_FOUND";
994
+ error: "The requested room was not found";
995
+ name: "APIError";
996
+ } | {
997
+ code: "PLAYLIST_UNAVAILABLE";
998
+ error: "This playlist can't be read, it may be private";
999
+ name: "APIError";
1000
+ };
1001
+ headers: Headers;
1002
+ } | {
1003
+ status: 409;
1004
+ body: {
1005
+ code: "QUEUE_FULL";
1006
+ error: "The queue of this room is full";
1007
+ name: "APIError";
1008
+ };
1009
+ headers: Headers;
1010
+ } | {
1011
+ status: 429;
1012
+ body: {
1013
+ code: "TOO_MANY_SEARCHES";
1014
+ error: "Too many searches are running";
1015
+ name: "APIError";
1016
+ };
1017
+ headers: Headers;
1018
+ } | {
1019
+ status: 100 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1020
+ body: unknown;
1021
+ headers: Headers;
1022
+ }>;
1023
+ queueClear: (args: {
1024
+ params: {
1025
+ roomId: string;
1026
+ };
1027
+ cache?: RequestCache | undefined;
1028
+ extraHeaders?: Record<string, string | undefined> | undefined;
1029
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1030
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1031
+ }) => Promise<{
1032
+ status: 500;
1033
+ body: {
1034
+ code: "INTERNAL_SERVER_ERROR";
1035
+ error: string;
1036
+ name: "APIError";
1037
+ };
1038
+ headers: Headers;
1039
+ } | {
1040
+ status: 401;
1041
+ body: {
1042
+ code: "UNAUTHORIZED";
1043
+ error: "Unauthorized";
1044
+ name: "APIError";
1045
+ };
1046
+ headers: Headers;
1047
+ } | {
1048
+ status: 403;
1049
+ body: {
1050
+ code: "FORBIDDEN";
1051
+ error: "Forbidden";
1052
+ name: "APIError";
1053
+ };
1054
+ headers: Headers;
1055
+ } | {
1056
+ status: 200;
1057
+ body: undefined;
1058
+ headers: Headers;
1059
+ } | {
1060
+ status: 404;
1061
+ body: {
1062
+ code: "ROOM_NOT_FOUND";
1063
+ error: "The requested room was not found";
1064
+ name: "APIError";
1065
+ };
1066
+ headers: Headers;
1067
+ } | {
1068
+ status: 400 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1069
+ body: unknown;
1070
+ headers: Headers;
1071
+ }>;
1072
+ queueShuffle: (args: {
1073
+ params: {
1074
+ roomId: string;
1075
+ };
1076
+ cache?: RequestCache | undefined;
1077
+ extraHeaders?: Record<string, string | undefined> | undefined;
1078
+ fetchOptions?: import("@ts-rest/core").FetchOptions | undefined;
1079
+ overrideClientOptions?: Partial<import("@ts-rest/core").OverrideableClientArgs> | undefined;
1080
+ }) => Promise<{
1081
+ status: 500;
1082
+ body: {
1083
+ code: "INTERNAL_SERVER_ERROR";
1084
+ error: string;
1085
+ name: "APIError";
1086
+ };
1087
+ headers: Headers;
1088
+ } | {
1089
+ status: 401;
1090
+ body: {
1091
+ code: "UNAUTHORIZED";
1092
+ error: "Unauthorized";
1093
+ name: "APIError";
1094
+ };
1095
+ headers: Headers;
1096
+ } | {
1097
+ status: 403;
1098
+ body: {
1099
+ code: "FORBIDDEN";
1100
+ error: "Forbidden";
1101
+ name: "APIError";
1102
+ };
1103
+ headers: Headers;
1104
+ } | {
1105
+ status: 200;
1106
+ body: undefined;
1107
+ headers: Headers;
1108
+ } | {
1109
+ status: 404;
1110
+ body: {
1111
+ code: "ROOM_NOT_FOUND";
1112
+ error: "The requested room was not found";
1113
+ name: "APIError";
1114
+ };
1115
+ headers: Headers;
1116
+ } | {
1117
+ status: 400 | 100 | 409 | 429 | 101 | 102 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 300 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 402 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 428 | 431 | 451 | 501 | 502 | 503 | 504 | 505 | 507 | 511;
1118
+ body: unknown;
1119
+ headers: Headers;
1120
+ }>;
826
1121
  queueRemove: (args: {
827
1122
  params: {
828
1123
  roomId: string;