anilink-api-wrapper 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/README.md +32 -484
- package/dist/AniLink.d.ts +1656 -724
- package/dist/AniLink.mjs +1005 -371
- package/dist/mal.d.ts +1 -0
- package/dist/mal.mjs +5 -0
- package/package.json +28 -18
package/dist/AniLink.d.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* {@link AniLinkErrorCodes} is the stable code map returned by the AniLink transport boundary.
|
|
3
3
|
*
|
|
4
|
-
* These codes let consumers classify failures without depending on Axios
|
|
5
|
-
*
|
|
4
|
+
* These codes let consumers classify failures without depending on Axios implementation details or matching human-readable messages. Use {@link AniLinkErrorCode} to type the code and {@link AniLinkError} to branch on it.
|
|
5
|
+
*
|
|
6
|
+
* @see {@link AniLinkErrorCode}
|
|
7
|
+
* @example
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { AniLinkErrorCodes } from "./base/AniLinkError";
|
|
10
|
+
* if (error.code === AniLinkErrorCodes.AUTH) {
|
|
11
|
+
* console.error("Missing token");
|
|
12
|
+
* }
|
|
13
|
+
* ```
|
|
6
14
|
*/
|
|
7
15
|
declare const AniLinkErrorCodes: {
|
|
8
16
|
readonly API: "API_ERROR";
|
|
@@ -15,11 +23,24 @@ declare const AniLinkErrorCodes: {
|
|
|
15
23
|
readonly VALIDATION: "VALIDATION_ERROR";
|
|
16
24
|
readonly UNKNOWN: "UNKNOWN_ERROR";
|
|
17
25
|
};
|
|
18
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Union of stable error codes exposed by the AniLink transport boundary.
|
|
28
|
+
*
|
|
29
|
+
* @see {@link AniLinkErrorCodes}
|
|
30
|
+
*/
|
|
19
31
|
type AniLinkErrorCode = (typeof AniLinkErrorCodes)[keyof typeof AniLinkErrorCodes];
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Base error for failures normalized by AniLink.
|
|
34
|
+
*
|
|
35
|
+
* Consumers can branch on {@link AniLinkError.code} without depending on the
|
|
36
|
+
* underlying Axios error or a provider's human-readable message.
|
|
37
|
+
*
|
|
38
|
+
* @see {@link AniLinkErrorCodes}
|
|
39
|
+
*/
|
|
21
40
|
declare class AniLinkError extends Error {
|
|
41
|
+
/** Stable code used to classify the failure. */
|
|
22
42
|
code: AniLinkErrorCode;
|
|
43
|
+
/** Original Axios or transport error when raw diagnostics were enabled. */
|
|
23
44
|
readonly rawAxiosError?: unknown;
|
|
24
45
|
/**
|
|
25
46
|
* Creates a sanitized AniLink error.
|
|
@@ -36,6 +57,8 @@ declare class AniLinkError extends Error {
|
|
|
36
57
|
* Populated from the `x-ratelimit-*` header family (AniList) or the
|
|
37
58
|
* `X-RateLimit-*` / `Retry-After` family used by REST providers such as
|
|
38
59
|
* MyAnimeList, whenever the upstream includes the required headers.
|
|
60
|
+
*
|
|
61
|
+
* @see {@link AniLinkApiError.rateLimit}
|
|
39
62
|
*/
|
|
40
63
|
interface RateLimitInfo {
|
|
41
64
|
/** The maximum number of requests allowed in the current window. */
|
|
@@ -54,7 +77,9 @@ interface RateLimitInfo {
|
|
|
54
77
|
* through it directly.
|
|
55
78
|
*/
|
|
56
79
|
declare class AniLinkApiError extends AniLinkError {
|
|
80
|
+
/** HTTP status returned by the upstream API. For GraphQL failures this is the upstream GraphQL error status when available, and the HTTP envelope status (`200`) otherwise. */
|
|
57
81
|
readonly status: number;
|
|
82
|
+
/** Response body returned by the upstream API, preserved verbatim. */
|
|
58
83
|
readonly data: unknown;
|
|
59
84
|
/**
|
|
60
85
|
* Rate-limit accounting parsed from the `x-ratelimit-limit`,
|
|
@@ -85,6 +110,8 @@ declare class AniLinkApiError extends AniLinkError {
|
|
|
85
110
|
* includes them. Any additional upstream fields are preserved verbatim via the
|
|
86
111
|
* index signature so consumers never need to string-match messages to
|
|
87
112
|
* classify a failure.
|
|
113
|
+
*
|
|
114
|
+
* @see {@link AniLinkGraphQLError.graphqlErrors}
|
|
88
115
|
*/
|
|
89
116
|
interface GraphQLUpstreamError {
|
|
90
117
|
/** The human-readable error message returned by AniList. */
|
|
@@ -98,7 +125,18 @@ interface GraphQLUpstreamError {
|
|
|
98
125
|
/** Any additional upstream fields, preserved verbatim. */
|
|
99
126
|
[key: string]: unknown;
|
|
100
127
|
}
|
|
101
|
-
/**
|
|
128
|
+
/**
|
|
129
|
+
* GraphQL-level failure returned inside an HTTP 200 envelope.
|
|
130
|
+
*
|
|
131
|
+
* The inherited {@link AniLinkApiError.status} reflects the upstream GraphQL
|
|
132
|
+
* error status when an entry in {@link AniLinkGraphQLError.graphqlErrors}
|
|
133
|
+
* carries one (for example `404` or `429`), and the HTTP `200` envelope status
|
|
134
|
+
* otherwise. This makes `status` a meaningful classification field for
|
|
135
|
+
* GraphQL failures and lets status-based branching and retry policies treat a
|
|
136
|
+
* GraphQL-level `429`/`5xx` like its HTTP-level counterpart.
|
|
137
|
+
*
|
|
138
|
+
* @see {@link GraphQLUpstreamError}
|
|
139
|
+
*/
|
|
102
140
|
declare class AniLinkGraphQLError extends AniLinkApiError {
|
|
103
141
|
/**
|
|
104
142
|
* The upstream GraphQL `errors` array carried by the envelope, preserved
|
|
@@ -124,7 +162,11 @@ declare class AniLinkGraphQLError extends AniLinkApiError {
|
|
|
124
162
|
*/
|
|
125
163
|
constructor(errors: ReadonlyArray<GraphQLUpstreamError>, data?: unknown, rawAxiosError?: unknown);
|
|
126
164
|
}
|
|
127
|
-
/**
|
|
165
|
+
/**
|
|
166
|
+
* Failure caused by a missing authentication token on a protected operation.
|
|
167
|
+
*
|
|
168
|
+
* @see {@link AniLinkErrorCodes.AUTH}
|
|
169
|
+
*/
|
|
128
170
|
declare class AniLinkAuthError extends AniLinkError {
|
|
129
171
|
/**
|
|
130
172
|
* Creates an authentication error for a token-required operation.
|
|
@@ -133,9 +175,13 @@ declare class AniLinkAuthError extends AniLinkError {
|
|
|
133
175
|
*/
|
|
134
176
|
constructor(operation?: string);
|
|
135
177
|
}
|
|
136
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* Failure caused by operation variables that fail validation.
|
|
180
|
+
*
|
|
181
|
+
* @see {@link AniLinkErrorCodes.VALIDATION}
|
|
182
|
+
*/
|
|
137
183
|
declare class AniLinkValidationError extends AniLinkError {
|
|
138
|
-
/**
|
|
184
|
+
/** Individual validation problems, one per entry. */
|
|
139
185
|
readonly details: readonly string[];
|
|
140
186
|
/**
|
|
141
187
|
* Creates a validation error for invalid operation variables.
|
|
@@ -152,15 +198,37 @@ declare class AniLinkValidationError extends AniLinkError {
|
|
|
152
198
|
* consumers a stable type to branch on without inspecting status codes. It
|
|
153
199
|
* carries no additional fields beyond {@link AniLinkApiError}; its value is
|
|
154
200
|
* the named type itself.
|
|
201
|
+
*
|
|
202
|
+
* @see {@link AniLinkApiError}
|
|
155
203
|
*/
|
|
156
204
|
declare class AniLinkRestError extends AniLinkApiError {
|
|
205
|
+
/**
|
|
206
|
+
* Creates a REST error carrying the upstream HTTP status and body.
|
|
207
|
+
*
|
|
208
|
+
* @param status - The HTTP status returned by the upstream REST API.
|
|
209
|
+
* @param data - The response body returned by the upstream REST API.
|
|
210
|
+
* @param rawAxiosError - The original Axios error when raw diagnostics are enabled.
|
|
211
|
+
* @param options - Additional error metadata such as rate-limit headers.
|
|
212
|
+
*/
|
|
213
|
+
constructor(status: number, data: unknown, rawAxiosError?: unknown, options?: {
|
|
214
|
+
rateLimit?: RateLimitInfo;
|
|
215
|
+
});
|
|
157
216
|
}
|
|
158
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* Additional metadata attached to a transport failure.
|
|
219
|
+
*
|
|
220
|
+
* @see {@link AniLinkNetworkError.timeoutMs}
|
|
221
|
+
*/
|
|
159
222
|
interface AniLinkNetworkErrorOptions {
|
|
160
223
|
/** The effective per-attempt timeout in milliseconds, when a timeout was configured and enforced. */
|
|
161
224
|
timeoutMs?: number;
|
|
162
225
|
}
|
|
163
|
-
/**
|
|
226
|
+
/**
|
|
227
|
+
* Network, timeout, cancellation, or circuit-breaker failure.
|
|
228
|
+
*
|
|
229
|
+
* @see {@link AniLinkErrorCodes.NETWORK}
|
|
230
|
+
* @see {@link AniLinkErrorCodes.TIMEOUT}
|
|
231
|
+
*/
|
|
164
232
|
declare class AniLinkNetworkError extends AniLinkError {
|
|
165
233
|
/**
|
|
166
234
|
* The effective timeout duration in milliseconds when this failure was a
|
|
@@ -180,6 +248,24 @@ declare class AniLinkNetworkError extends AniLinkError {
|
|
|
180
248
|
constructor(code: typeof AniLinkErrorCodes.NETWORK | typeof AniLinkErrorCodes.TIMEOUT | typeof AniLinkErrorCodes.ABORTED | typeof AniLinkErrorCodes.CIRCUIT, message: string, rawAxiosError?: unknown, options?: AniLinkNetworkErrorOptions);
|
|
181
249
|
}
|
|
182
250
|
|
|
251
|
+
/**
|
|
252
|
+
* Per-window cap on retries across requests sharing the same transport
|
|
253
|
+
* settings object.
|
|
254
|
+
*
|
|
255
|
+
* The per-request `maxRetries` bounds retries for one call, but a workload
|
|
256
|
+
* issuing thousands of requests during a sustained upstream outage would
|
|
257
|
+
* still multiply API call volume by up to `maxRetries + 1` indefinitely.
|
|
258
|
+
* This budget bounds the *total* retry spend per rolling window; when it is
|
|
259
|
+
* exhausted, failures surface without retries until the window elapses.
|
|
260
|
+
*
|
|
261
|
+
* @see {@link RequestOptions.retryBudget}
|
|
262
|
+
*/
|
|
263
|
+
interface RetryBudget {
|
|
264
|
+
/** The maximum number of retries allowed across the window. */
|
|
265
|
+
maxRetriesPerWindow: number;
|
|
266
|
+
/** The rolling window length in milliseconds. */
|
|
267
|
+
windowMs: number;
|
|
268
|
+
}
|
|
183
269
|
/**
|
|
184
270
|
* Retry policy for transient transport failures.
|
|
185
271
|
*
|
|
@@ -187,6 +273,8 @@ declare class AniLinkNetworkError extends AniLinkError {
|
|
|
187
273
|
* each wait is a random value between `0` and the computed exponential cap so
|
|
188
274
|
* concurrent clients do not synchronize their retries (thundering herd).
|
|
189
275
|
* Server-dictated `Retry-After` delays are never jittered.
|
|
276
|
+
*
|
|
277
|
+
* @see {@link RequestOptions.retry}
|
|
190
278
|
*/
|
|
191
279
|
interface RetryPolicy {
|
|
192
280
|
/** The maximum number of retries after the initial attempt. */
|
|
@@ -208,9 +296,32 @@ interface RetryPolicy {
|
|
|
208
296
|
* GraphQL providers use `POST` only; REST providers additionally use `GET`,
|
|
209
297
|
* `PUT`, and `DELETE`. The union is shared so hooks and error contexts stay
|
|
210
298
|
* provider-agnostic.
|
|
299
|
+
*
|
|
300
|
+
* @see {@link sendRequest}
|
|
211
301
|
*/
|
|
212
302
|
type HttpMethod = "GET" | "POST" | "PUT" | "DELETE";
|
|
213
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* Authentication material a provider can apply to an HTTP request.
|
|
305
|
+
*
|
|
306
|
+
* @see {@link RequestAuthInput}
|
|
307
|
+
*/
|
|
308
|
+
interface RequestAuth {
|
|
309
|
+
/** A bearer token, when the provider uses bearer authentication. */
|
|
310
|
+
readonly token?: string;
|
|
311
|
+
/** Explicit headers for schemes such as Basic auth or provider API keys. */
|
|
312
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Legacy string tokens and structured provider authentication accepted by transport.
|
|
316
|
+
*
|
|
317
|
+
* @see {@link RequestAuth}
|
|
318
|
+
*/
|
|
319
|
+
type RequestAuthInput = string | RequestAuth;
|
|
320
|
+
/**
|
|
321
|
+
* Context passed to the request lifecycle hooks for a single failed attempt.
|
|
322
|
+
*
|
|
323
|
+
* @see {@link OnErrorHandler}
|
|
324
|
+
*/
|
|
214
325
|
interface RequestErrorContext {
|
|
215
326
|
/** The URL the request was sent to. */
|
|
216
327
|
url: string;
|
|
@@ -218,16 +329,25 @@ interface RequestErrorContext {
|
|
|
218
329
|
method: HttpMethod;
|
|
219
330
|
/** The 1-based attempt that failed. */
|
|
220
331
|
attempt: number;
|
|
221
|
-
/** The stable code of the normalized failure. */
|
|
332
|
+
/** The stable code of the normalized failure; see {@link AniLinkErrorCode}. */
|
|
222
333
|
code: AniLinkErrorCode;
|
|
223
334
|
/** The HTTP status when the failure came from an API response. */
|
|
224
335
|
status?: number;
|
|
225
336
|
/** The delay before the next retry, when the failure will be retried. */
|
|
226
337
|
nextDelayMs?: number;
|
|
227
338
|
}
|
|
228
|
-
/**
|
|
339
|
+
/**
|
|
340
|
+
* Callback invoked when an attempt fails, before each retry wait and once more when retries are exhausted.
|
|
341
|
+
*
|
|
342
|
+
* @see {@link RequestOptions.onError}
|
|
343
|
+
* @see {@link RequestOptions.onRetry}
|
|
344
|
+
*/
|
|
229
345
|
type OnErrorHandler = (error: AniLinkError, context: RequestErrorContext) => void;
|
|
230
|
-
/**
|
|
346
|
+
/**
|
|
347
|
+
* Context passed to the `onRequestStart` hook just before an attempt is sent.
|
|
348
|
+
*
|
|
349
|
+
* @see {@link OnRequestStartHandler}
|
|
350
|
+
*/
|
|
231
351
|
interface RequestContext {
|
|
232
352
|
/** The URL the request is being sent to. */
|
|
233
353
|
url: string;
|
|
@@ -239,12 +359,16 @@ interface RequestContext {
|
|
|
239
359
|
/**
|
|
240
360
|
* A callback invoked immediately before each request attempt is sent. Use it
|
|
241
361
|
* to count request volume or correlate logs with outgoing attempts.
|
|
362
|
+
*
|
|
363
|
+
* @see {@link RequestOptions.onRequestStart}
|
|
242
364
|
*/
|
|
243
365
|
type OnRequestStartHandler = (context: RequestContext) => void;
|
|
244
366
|
/**
|
|
245
367
|
* A callback invoked after each attempt completes, whether it succeeded or
|
|
246
368
|
* failed. The elapsed wall-clock time of the attempt is reported as
|
|
247
369
|
* `durationMs`, making this the natural point for latency metrics.
|
|
370
|
+
*
|
|
371
|
+
* @see {@link RequestOptions.onResponse}
|
|
248
372
|
*/
|
|
249
373
|
type OnResponseHandler = (context: RequestContext & {
|
|
250
374
|
durationMs: number;
|
|
@@ -252,11 +376,13 @@ type OnResponseHandler = (context: RequestContext & {
|
|
|
252
376
|
/**
|
|
253
377
|
* Transport settings shared by the AniLink request operations.
|
|
254
378
|
*
|
|
255
|
-
* Pass these as the second argument of the
|
|
379
|
+
* Pass these as the second argument of the {@link AniLink} constructor; they apply
|
|
256
380
|
* per instance and never leak across clients.
|
|
381
|
+
*
|
|
382
|
+
* @see {@link sendRequest}
|
|
257
383
|
*/
|
|
258
384
|
interface RequestOptions {
|
|
259
|
-
/** Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to
|
|
385
|
+
/** Milliseconds before a request is aborted. `0` disables the Axios timeout. Defaults to {@link DEFAULT_REQUEST_TIMEOUT}; timeout errors carry the effective duration as {@link AniLinkNetworkError.timeoutMs}. */
|
|
260
386
|
timeout?: number;
|
|
261
387
|
/** Signal used to cancel in-flight requests. */
|
|
262
388
|
signal?: AbortSignal;
|
|
@@ -278,7 +404,9 @@ interface RequestOptions {
|
|
|
278
404
|
* Opt into proactive request pacing driven by the `x-ratelimit-*` headers
|
|
279
405
|
* of every successful response: when the reported remaining quota drops
|
|
280
406
|
* below `rateLimitFloor` (default 1), the next attempt waits until the
|
|
281
|
-
* window resets instead of discovering the limit via a `429`.
|
|
407
|
+
* window resets instead of discovering the limit via a `429`. On by
|
|
408
|
+
* default; pass `false` to disable it and discover the limit reactively
|
|
409
|
+
* (each `429` then costs a wasted request plus a retry wait).
|
|
282
410
|
*/
|
|
283
411
|
paceWithRateLimit?: boolean;
|
|
284
412
|
/**
|
|
@@ -298,7 +426,30 @@ interface RequestOptions {
|
|
|
298
426
|
threshold: number;
|
|
299
427
|
cooldownMs: number;
|
|
300
428
|
};
|
|
301
|
-
/**
|
|
429
|
+
/**
|
|
430
|
+
* Optional per-window cap on total retry attempts, complementing the
|
|
431
|
+
* per-request `maxRetries` and the opt-in `circuitBreaker`: the retry
|
|
432
|
+
* policy bounds one request's retries, the breaker handles sustained
|
|
433
|
+
* outages after consecutive failures, and this budget bounds the total
|
|
434
|
+
* retry spend across many requests in a rolling window (which handles
|
|
435
|
+
* chronic intermittent failures even when the breaker never trips).
|
|
436
|
+
* When the budget for the current window is exhausted, failures surface
|
|
437
|
+
* without retries until the window elapses. Off by default.
|
|
438
|
+
*/
|
|
439
|
+
retryBudget?: RetryBudget;
|
|
440
|
+
/**
|
|
441
|
+
* Upper bound on concurrent keep-alive sockets for this request.
|
|
442
|
+
* Defaults to {@link MAX_SOCKETS} (20). Supplying this or
|
|
443
|
+
* `maxFreeSockets` constructs dedicated per-request agents instead of
|
|
444
|
+
* reusing the shared module-level pool, isolating this caller's socket
|
|
445
|
+
* pressure from other {@link AniLink} instances and providers.
|
|
446
|
+
*/
|
|
447
|
+
maxSockets?: number;
|
|
448
|
+
/**
|
|
449
|
+
* Upper bound on retained idle keep-alive sockets for this request.
|
|
450
|
+
* Defaults to {@link MAX_FREE_SOCKETS} (5); see {@link RequestOptions.maxSockets}.
|
|
451
|
+
*/
|
|
452
|
+
maxFreeSockets?: number;
|
|
302
453
|
onError?: OnErrorHandler;
|
|
303
454
|
/** Invoked before each retry wait with the scheduled delay in `nextDelayMs`. Falls back to per-attempt `onError` calls when unset. */
|
|
304
455
|
onRetry?: OnErrorHandler;
|
|
@@ -309,16 +460,21 @@ interface RequestOptions {
|
|
|
309
460
|
}
|
|
310
461
|
|
|
311
462
|
/**
|
|
312
|
-
* The `custom` member of the `AniListApi` type.
|
|
463
|
+
* The `custom` member group of the `AniListApi` type.
|
|
464
|
+
*
|
|
465
|
+
* @see https://docs.anilist.co/reference/query
|
|
313
466
|
*/
|
|
314
|
-
|
|
315
467
|
type AniListCustom = {
|
|
316
468
|
/**
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
* @
|
|
321
|
-
*
|
|
469
|
+
* {@link AniListCustom.custom} runs an arbitrary GraphQL query or mutation against AniList, returning the
|
|
470
|
+
* raw response. Use it as an escape hatch when no typed operation fits: the `query`
|
|
471
|
+
* string is sent verbatim and the `variables` argument is forwarded as-is.
|
|
472
|
+
* @param query - The GraphQL query or mutation string to send verbatim.
|
|
473
|
+
* @param variables - The variables to forward with the request. Optional.
|
|
474
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
475
|
+
* @returns {Promise<T>} A promise that resolves to the raw response, typed as `T` (defaults to `unknown`).
|
|
476
|
+
* @throws {AniLinkError} When the request fails. When AniList returns partial success (some fields resolve while others fail inside an HTTP 200 envelope), the thrown `AniLinkGraphQLError` exposes the resolved portion via its `partialData` field, so the fields that did resolve remain recoverable from the error.
|
|
477
|
+
* @see https://docs.anilist.co/reference/query
|
|
322
478
|
* @example
|
|
323
479
|
* ```typescript
|
|
324
480
|
* const viewer = await aniLink.anilist.custom('query {Viewer {id}}');
|
|
@@ -796,9 +952,13 @@ interface MediaTagCollectionResponse {
|
|
|
796
952
|
}
|
|
797
953
|
|
|
798
954
|
/**
|
|
799
|
-
*
|
|
800
|
-
*
|
|
801
|
-
* @
|
|
955
|
+
* {@link MediaTagCollectionVariables} contains variables for the {@link MediaTagCollectionQuery} operation.
|
|
956
|
+
*
|
|
957
|
+
* See {@link MediaTagCollectionQuery} and {@link MediaTagCollectionResponse} for the operation and response shape.
|
|
958
|
+
*
|
|
959
|
+
* Values are validated with `MediaTagCollectionMappings` before dispatch.
|
|
960
|
+
*
|
|
961
|
+
* @see https://docs.anilist.co/reference/object/mediatag
|
|
802
962
|
*/
|
|
803
963
|
interface MediaTagCollectionVariables {
|
|
804
964
|
/**
|
|
@@ -925,94 +1085,98 @@ interface SiteStatisticsResponse {
|
|
|
925
1085
|
}
|
|
926
1086
|
|
|
927
1087
|
/**
|
|
928
|
-
*
|
|
1088
|
+
* {@link MediaSort} is a type that represents the sorting options for the `Media` query.
|
|
929
1089
|
* It can be one of the following: 'ID', 'ID_DESC', 'TITLE_ROMAJI', 'TITLE_ROMAJI_DESC', 'TITLE_ENGLISH', 'TITLE_ENGLISH_DESC', 'TITLE_NATIVE', 'TITLE_NATIVE_DESC', 'TYPE', 'TYPE_DESC', 'FORMAT', 'FORMAT_DESC', 'START_DATE', 'START_DATE_DESC', 'END_DATE', 'END_DATE_DESC', 'SCORE', 'SCORE_DESC', 'POPULARITY', 'POPULARITY_DESC', 'TRENDING', 'TRENDING_DESC', 'EPISODES', 'EPISODES_DESC', 'DURATION', 'DURATION_DESC', 'STATUS', 'STATUS_DESC', 'CHAPTERS', 'CHAPTERS_DESC', 'VOLUMES', 'VOLUMES_DESC', 'UPDATED_AT', 'UPDATED_AT_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC'
|
|
930
1090
|
* @see https://docs.anilist.co/reference/enum/mediasort
|
|
931
1091
|
*/
|
|
932
1092
|
type MediaSort = "ID" | "ID_DESC" | "TITLE_ROMAJI" | "TITLE_ROMAJI_DESC" | "TITLE_ENGLISH" | "TITLE_ENGLISH_DESC" | "TITLE_NATIVE" | "TITLE_NATIVE_DESC" | "TYPE" | "TYPE_DESC" | "FORMAT" | "FORMAT_DESC" | "START_DATE" | "START_DATE_DESC" | "END_DATE" | "END_DATE_DESC" | "SCORE" | "SCORE_DESC" | "POPULARITY" | "POPULARITY_DESC" | "TRENDING" | "TRENDING_DESC" | "EPISODES" | "EPISODES_DESC" | "DURATION" | "DURATION_DESC" | "STATUS" | "STATUS_DESC" | "CHAPTERS" | "CHAPTERS_DESC" | "VOLUMES" | "VOLUMES_DESC" | "UPDATED_AT" | "UPDATED_AT_DESC" | "SEARCH_MATCH" | "FAVOURITES" | "FAVOURITES_DESC";
|
|
933
1093
|
/**
|
|
934
|
-
*
|
|
1094
|
+
* {@link MediaListSort} is a type that represents the sorting options for the `MediaList` query.
|
|
935
1095
|
* It can be one of the following: 'MEDIA_ID', 'MEDIA_ID_DESC', 'SCORE', 'SCORE_DESC', 'STATUS', 'STATUS_DESC', 'PROGRESS', 'PROGRESS_DESC', 'PROGRESS_VOLUMES', 'PROGRESS_VOLUMES_DESC', 'REPEAT', 'REPEAT_DESC', 'PRIORITY', 'PRIORITY_DESC', 'STARTED_ON', 'STARTED_ON_DESC', 'FINISHED_ON', 'FINISHED_ON_DESC', 'ADDED_TIME', 'ADDED_TIME_DESC', 'UPDATED_TIME', 'UPDATED_TIME_DESC', 'MEDIA_TITLE_ROMAJI', 'MEDIA_TITLE_ROMAJI_DESC', 'MEDIA_TITLE_ENGLISH', 'MEDIA_TITLE_ENGLISH_DESC', 'MEDIA_TITLE_NATIVE', 'MEDIA_TITLE_NATIVE_DESC', 'MEDIA_POPULARITY', 'MEDIA_POPULARITY_DESC'
|
|
936
1096
|
* @see https://docs.anilist.co/reference/enum/medialistsort
|
|
937
1097
|
*/
|
|
938
1098
|
type MediaListSort = "MEDIA_ID" | "MEDIA_ID_DESC" | "SCORE" | "SCORE_DESC" | "STATUS" | "STATUS_DESC" | "PROGRESS" | "PROGRESS_DESC" | "PROGRESS_VOLUMES" | "PROGRESS_VOLUMES_DESC" | "REPEAT" | "REPEAT_DESC" | "PRIORITY" | "PRIORITY_DESC" | "STARTED_ON" | "STARTED_ON_DESC" | "FINISHED_ON" | "FINISHED_ON_DESC" | "ADDED_TIME" | "ADDED_TIME_DESC" | "UPDATED_TIME" | "UPDATED_TIME_DESC" | "MEDIA_TITLE_ROMAJI" | "MEDIA_TITLE_ROMAJI_DESC" | "MEDIA_TITLE_ENGLISH" | "MEDIA_TITLE_ENGLISH_DESC" | "MEDIA_TITLE_NATIVE" | "MEDIA_TITLE_NATIVE_DESC" | "MEDIA_POPULARITY" | "MEDIA_POPULARITY_DESC";
|
|
939
1099
|
/**
|
|
940
|
-
*
|
|
1100
|
+
* {@link MediaTrendSort} is a type that represents the sorting options for the `MediaTrend` query.
|
|
941
1101
|
* It can be one of the following: 'ID', 'ID_DESC', 'MEDIA_ID', 'MEDIA_ID_DESC', 'DATE', 'DATE_DESC', 'SCORE', 'SCORE_DESC', 'POPULARITY', 'POPULARITY_DESC', 'TRENDING', 'TRENDING_DESC', 'EPISODE', 'EPISODE_DESC'.
|
|
942
1102
|
* @see https://docs.anilist.co/reference/enum/mediatrendsort
|
|
943
1103
|
*/
|
|
944
1104
|
type MediaTrendSort = "ID" | "ID_DESC" | "MEDIA_ID" | "MEDIA_ID_DESC" | "DATE" | "DATE_DESC" | "SCORE" | "SCORE_DESC" | "POPULARITY" | "POPULARITY_DESC" | "TRENDING" | "TRENDING_DESC" | "EPISODE" | "EPISODE_DESC";
|
|
945
1105
|
/**
|
|
946
|
-
*
|
|
1106
|
+
* {@link UserSort} is a type that represents the sorting options for the `User` query.
|
|
947
1107
|
* It can be one of the following: 'ID', 'ID_DESC', 'USERNAME', 'USERNAME_DESC', 'WATCHED_TIME', 'WATCHED_TIME_DESC', 'CHAPTERS_READ', 'CHAPTERS_READ_DESC', 'SEARCH_MATCH'.
|
|
948
1108
|
* @see https://docs.anilist.co/reference/enum/usersort
|
|
949
1109
|
*/
|
|
950
1110
|
type UserSort = "ID" | "ID_DESC" | "USERNAME" | "USERNAME_DESC" | "WATCHED_TIME" | "WATCHED_TIME_DESC" | "CHAPTERS_READ" | "CHAPTERS_READ_DESC" | "SEARCH_MATCH";
|
|
951
1111
|
/**
|
|
952
|
-
*
|
|
1112
|
+
* {@link UserStatisticSort} is a type that represents the sorting options for the `UserStatistic` query.
|
|
953
1113
|
* It can be one of the following: 'ID', 'ID_DESC', 'COUNT', 'COUNT_DESC', 'PROGRESS', 'PROGRESS_DESC', 'MEAN_SCORE', 'MEAN_SCORE_DESC'.
|
|
954
1114
|
* @see https://docs.anilist.co/reference/enum/userstatisticssort
|
|
955
1115
|
*/
|
|
956
1116
|
type UserStatisticSort = "ID" | "ID_DESC" | "COUNT" | "COUNT_DESC" | "PROGRESS" | "PROGRESS_DESC" | "MEAN_SCORE" | "MEAN_SCORE_DESC";
|
|
957
1117
|
/**
|
|
958
|
-
*
|
|
1118
|
+
* {@link ActivitySort} is a type that represents the sorting options for the `Activity` query.
|
|
959
1119
|
* It can be one of the following: 'ID', 'ID_DESC', 'PINNED'.
|
|
960
1120
|
* @see https://docs.anilist.co/reference/enum/activitysort
|
|
961
1121
|
*/
|
|
962
1122
|
type ActivitySort = "ID" | "ID_DESC" | "PINNED";
|
|
963
1123
|
/**
|
|
964
|
-
*
|
|
1124
|
+
* {@link AiringSort} is a type that represents the sorting options for the `MediaTrend` query.
|
|
965
1125
|
* It can be one of the following: 'ID', 'ID_DESC', 'MEDIA_ID', 'MEDIA_ID_DESC', 'TIME', 'TIME_DESC', 'EPISODE', 'EPISODE_DESC'.
|
|
966
1126
|
* @see https://docs.anilist.co/reference/enum/airingsort
|
|
967
1127
|
*/
|
|
968
1128
|
type AiringSort = "ID" | "ID_DESC" | "MEDIA_ID" | "MEDIA_ID_DESC" | "TIME" | "TIME_DESC" | "EPISODE" | "EPISODE_DESC";
|
|
969
1129
|
/**
|
|
970
|
-
*
|
|
1130
|
+
* {@link CharacterSort} is a type that represents the sorting options for the `Character` query.
|
|
971
1131
|
* It can be one of the following: 'ID', 'ID_DESC', 'ROLE', 'ROLE_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC', 'RELEVANCE'.
|
|
972
1132
|
* @see https://docs.anilist.co/reference/enum/charactersort
|
|
973
1133
|
*/
|
|
974
1134
|
type CharacterSort = "ID" | "ID_DESC" | "ROLE" | "ROLE_DESC" | "SEARCH_MATCH" | "FAVOURITES" | "FAVOURITES_DESC" | "RELEVANCE";
|
|
975
1135
|
/**
|
|
976
|
-
*
|
|
1136
|
+
* {@link RecommendationSort} is a type that represents the sorting options for the `Recommendation` query.
|
|
977
1137
|
* It can be one of the following: 'ID', 'ID_DESC', 'RATING', 'RATING_DESC'.
|
|
978
1138
|
* @see https://docs.anilist.co/reference/enum/recommendationsort
|
|
979
1139
|
*/
|
|
980
1140
|
type RecommendationSort = "ID" | "ID_DESC" | "RATING" | "RATING_DESC";
|
|
981
1141
|
/**
|
|
982
|
-
*
|
|
1142
|
+
* {@link ReviewSort} is a type that represents the sorting options for the `Review` query.
|
|
983
1143
|
* It can be one of the following: 'ID', 'ID_DESC', 'MEDIA_ID', 'MEDIA_ID_DESC', 'SCORE', 'SCORE_DESC', 'RATING', 'RATING_DESC', 'CREATED_AT', 'CREATED_AT_DESC', 'UPDATED_AT', 'UPDATED_AT_DESC'.
|
|
984
1144
|
* @see https://docs.anilist.co/reference/enum/reviewsort
|
|
985
1145
|
*/
|
|
986
1146
|
type ReviewSort = "ID" | "ID_DESC" | "MEDIA_ID" | "MEDIA_ID_DESC" | "SCORE" | "SCORE_DESC" | "RATING" | "RATING_DESC" | "CREATED_AT" | "CREATED_AT_DESC" | "UPDATED_AT" | "UPDATED_AT_DESC";
|
|
987
1147
|
/**
|
|
988
|
-
*
|
|
1148
|
+
* {@link SiteTrendSort} is a type that represents the sorting options for the `SiteTrend` query.
|
|
989
1149
|
* It can be one of the following: 'DATE', 'DATE_DESC', 'COUNT', 'COUNT_DESC', 'CHANGE', 'CHANGE_DESC'.
|
|
990
1150
|
* @see https://docs.anilist.co/reference/enum/sitetrendsort
|
|
991
1151
|
*/
|
|
992
1152
|
type SiteTrendSort = "DATE" | "DATE_DESC" | "COUNT" | "COUNT_DESC" | "CHANGE" | "CHANGE_DESC";
|
|
993
1153
|
/**
|
|
994
|
-
*
|
|
1154
|
+
* {@link StaffSort} is a type that represents the sorting options for the `Staff` query.
|
|
995
1155
|
* It can be one of the following: 'ID', 'ID_DESC', 'ROLE', 'ROLE_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC', 'RELEVANCE'.
|
|
996
1156
|
* @see https://docs.anilist.co/reference/enum/staffsort
|
|
997
1157
|
*/
|
|
998
1158
|
type StaffSort = "ID" | "ID_DESC" | "ROLE" | "ROLE_DESC" | "SEARCH_MATCH" | "FAVOURITES" | "FAVOURITES_DESC" | "RELEVANCE";
|
|
999
1159
|
/**
|
|
1000
|
-
*
|
|
1160
|
+
* {@link StudioSort} is a type that represents the sorting options for the `Studio` query.
|
|
1001
1161
|
* It can be one of the following: 'ID', 'ID_DESC', 'NAME', 'NAME_DESC', 'SEARCH_MATCH', 'FAVOURITES', 'FAVOURITES_DESC'.
|
|
1002
1162
|
* @see https://docs.anilist.co/reference/enum/studiosort
|
|
1003
1163
|
*/
|
|
1004
1164
|
type StudioSort = "ID" | "ID_DESC" | "NAME" | "NAME_DESC" | "SEARCH_MATCH" | "FAVOURITES" | "FAVOURITES_DESC";
|
|
1005
1165
|
/**
|
|
1006
|
-
*
|
|
1166
|
+
* {@link ThreadSort} is a type that represents the sorting options for the `Thread` query.
|
|
1007
1167
|
* It can be one of the following: 'ID', 'ID_DESC', 'TITLE', 'TITLE_DESC', 'CREATED_AT', 'CREATED_AT_DESC', 'UPDATED_AT', 'UPDATED_AT_DESC', 'REPLIED_AT', 'REPLIED_AT_DESC', 'REPLY_COUNT', 'REPLY_COUNT_DESC', 'VIEW_COUNT', 'VIEW_COUNT_DESC', 'IS_STICKY', 'SEARCH_MATCH'.
|
|
1008
1168
|
* @see https://docs.anilist.co/reference/enum/threadsort
|
|
1009
1169
|
*/
|
|
1010
1170
|
type ThreadSort = "ID" | "ID_DESC" | "TITLE" | "TITLE_DESC" | "CREATED_AT" | "CREATED_AT_DESC" | "UPDATED_AT" | "UPDATED_AT_DESC" | "REPLIED_AT" | "REPLIED_AT_DESC" | "REPLY_COUNT" | "REPLY_COUNT_DESC" | "VIEW_COUNT" | "VIEW_COUNT_DESC" | "IS_STICKY" | "SEARCH_MATCH";
|
|
1011
1171
|
|
|
1012
1172
|
/**
|
|
1013
|
-
*
|
|
1014
|
-
*
|
|
1015
|
-
* @
|
|
1173
|
+
* {@link SiteStatisticsVariables} contains variables for the {@link SiteStatisticsQuery} operation.
|
|
1174
|
+
*
|
|
1175
|
+
* See {@link SiteStatisticsQuery} and {@link SiteStatisticsResponse} for the operation and response shape.
|
|
1176
|
+
*
|
|
1177
|
+
* Values are validated before dispatch.
|
|
1178
|
+
*
|
|
1179
|
+
* @see https://docs.anilist.co/reference/object/sitestatistics
|
|
1016
1180
|
*/
|
|
1017
1181
|
interface SiteStatisticsVariables {
|
|
1018
1182
|
/**
|
|
@@ -1157,27 +1321,31 @@ interface ExternalLinkSourceCollectionResponse {
|
|
|
1157
1321
|
}
|
|
1158
1322
|
|
|
1159
1323
|
/**
|
|
1160
|
-
*
|
|
1324
|
+
* {@link MediaType} is a type that represents the type of media.
|
|
1161
1325
|
* It can be one of the following: 'ANIME', 'MANGA'.
|
|
1162
1326
|
* @see https://docs.anilist.co/reference/enum/mediatype
|
|
1163
1327
|
*/
|
|
1164
1328
|
type MediaType = "ANIME" | "MANGA";
|
|
1165
1329
|
/**
|
|
1166
|
-
*
|
|
1330
|
+
* {@link NotificationType} is a type that represents the type of notification.
|
|
1167
1331
|
* It can be one of the following: 'ACTIVITY_MESSAGE', 'ACTIVITY_REPLY', 'FOLLOWING', 'ACTIVITY_MENTION', 'THREAD_COMMENT_MENTION', 'THREAD_SUBSCRIBED', 'THREAD_COMMENT_REPLY', 'AIRING', 'ACTIVITY_LIKE', 'ACTIVITY_REPLY_LIKE', 'THREAD_LIKE', 'THREAD_COMMENT_LIKE', 'ACTIVITY_REPLY_SUBSCRIBED', 'RELATED_MEDIA_ADDITION', 'MEDIA_DATA_CHANGE', 'MEDIA_MERGE', 'MEDIA_DELETION'.
|
|
1168
1332
|
* @see https://docs.anilist.co/reference/enum/notificationtype
|
|
1169
1333
|
*/
|
|
1170
1334
|
type NotificationType = "ACTIVITY_MESSAGE" | "ACTIVITY_REPLY" | "FOLLOWING" | "ACTIVITY_MENTION" | "THREAD_COMMENT_MENTION" | "THREAD_SUBSCRIBED" | "THREAD_COMMENT_REPLY" | "AIRING" | "ACTIVITY_LIKE" | "ACTIVITY_REPLY_LIKE" | "THREAD_LIKE" | "THREAD_COMMENT_LIKE" | "ACTIVITY_REPLY_SUBSCRIBED" | "RELATED_MEDIA_ADDITION" | "MEDIA_DATA_CHANGE" | "MEDIA_MERGE" | "MEDIA_DELETION";
|
|
1171
1335
|
/**
|
|
1172
|
-
*
|
|
1336
|
+
* {@link LikeableType} is a type that represents the type of likeable item.
|
|
1173
1337
|
* It can be one of the following: 'THREAD', 'THREAD_COMMENT', 'ACTIVITY', 'ACTIVITY_REPLY'.
|
|
1174
1338
|
* @see https://docs.anilist.co/reference/enum/likeabletype
|
|
1175
1339
|
*/
|
|
1176
1340
|
type LikeableType = "THREAD" | "THREAD_COMMENT" | "ACTIVITY" | "ACTIVITY_REPLY";
|
|
1177
1341
|
|
|
1178
1342
|
/**
|
|
1179
|
-
*
|
|
1180
|
-
*
|
|
1343
|
+
* {@link ExternalLinkSourceCollectionVariables} contains variables for the {@link ExternalLinkSourceCollectionQuery} operation.
|
|
1344
|
+
*
|
|
1345
|
+
* See {@link ExternalLinkSourceCollectionQuery} and {@link ExternalLinkSourceCollectionResponse} for the operation and response shape.
|
|
1346
|
+
*
|
|
1347
|
+
* Values are validated before dispatch.
|
|
1348
|
+
*
|
|
1181
1349
|
* @see https://docs.anilist.co/reference/query
|
|
1182
1350
|
*/
|
|
1183
1351
|
interface ExternalLinkSourceCollectionVariables {
|
|
@@ -1196,16 +1364,20 @@ interface ExternalLinkSourceCollectionVariables {
|
|
|
1196
1364
|
}
|
|
1197
1365
|
|
|
1198
1366
|
/**
|
|
1199
|
-
*
|
|
1367
|
+
* {@link ActivityType} is a type that represents the type of activity.
|
|
1200
1368
|
* It can be one of the following: 'TEXT', 'ANIME_LIST', 'MANGA_LIST', 'MESSAGE', 'MEDIA_LIST'.
|
|
1201
1369
|
* @see https://docs.anilist.co/reference/enum/activitytype
|
|
1202
1370
|
*/
|
|
1203
1371
|
type ActivityType = "TEXT" | "ANIME_LIST" | "MANGA_LIST" | "MESSAGE" | "MEDIA_LIST";
|
|
1204
1372
|
|
|
1205
1373
|
/**
|
|
1206
|
-
*
|
|
1207
|
-
*
|
|
1208
|
-
* @
|
|
1374
|
+
* {@link ActivityVariables} contains variables for the {@link ActivityQuery} operation.
|
|
1375
|
+
*
|
|
1376
|
+
* See {@link ActivityQuery} and {@link Activity} for the operation and response shape.
|
|
1377
|
+
*
|
|
1378
|
+
* Values are validated before dispatch.
|
|
1379
|
+
*
|
|
1380
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
1209
1381
|
*/
|
|
1210
1382
|
interface ActivityVariables {
|
|
1211
1383
|
/**
|
|
@@ -1319,9 +1491,13 @@ interface ActivityVariables {
|
|
|
1319
1491
|
}
|
|
1320
1492
|
|
|
1321
1493
|
/**
|
|
1322
|
-
*
|
|
1323
|
-
*
|
|
1324
|
-
* @
|
|
1494
|
+
* {@link ActivityReplyVariables} contains variables for the {@link ActivityReplyQuery} operation.
|
|
1495
|
+
*
|
|
1496
|
+
* See {@link ActivityReplyQuery} and {@link ActivityReply} for the operation and response shape.
|
|
1497
|
+
*
|
|
1498
|
+
* Values are validated before dispatch.
|
|
1499
|
+
*
|
|
1500
|
+
* @see https://docs.anilist.co/reference/object/activityreply
|
|
1325
1501
|
*/
|
|
1326
1502
|
interface ActivityReplyVariables {
|
|
1327
1503
|
/**
|
|
@@ -1398,9 +1574,13 @@ interface ActivityRepliesPageResponse {
|
|
|
1398
1574
|
}
|
|
1399
1575
|
|
|
1400
1576
|
/**
|
|
1401
|
-
*
|
|
1402
|
-
*
|
|
1403
|
-
* @
|
|
1577
|
+
* {@link ActivityRepliesVariables} contains variables for the {@link ActivityRepliesQuery} operation.
|
|
1578
|
+
*
|
|
1579
|
+
* See {@link ActivityRepliesQuery} and {@link ActivityRepliesPageResponse} for the operation and response shape.
|
|
1580
|
+
*
|
|
1581
|
+
* Values are validated before dispatch.
|
|
1582
|
+
*
|
|
1583
|
+
* @see https://docs.anilist.co/reference/object/activityreply
|
|
1404
1584
|
*/
|
|
1405
1585
|
interface ActivityRepliesVariables {
|
|
1406
1586
|
/**
|
|
@@ -1450,9 +1630,13 @@ interface ActivitiesPageResponse {
|
|
|
1450
1630
|
}
|
|
1451
1631
|
|
|
1452
1632
|
/**
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1455
|
-
* @
|
|
1633
|
+
* {@link ActivitiesVariables} contains variables for the {@link ActivitiesQuery} operation.
|
|
1634
|
+
*
|
|
1635
|
+
* See {@link ActivitiesQuery} and {@link ActivitiesPageResponse} for the operation and response shape.
|
|
1636
|
+
*
|
|
1637
|
+
* Values are validated before dispatch.
|
|
1638
|
+
*
|
|
1639
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
1456
1640
|
*/
|
|
1457
1641
|
interface ActivitiesVariables {
|
|
1458
1642
|
/**
|
|
@@ -2188,9 +2372,13 @@ interface AiringScheduleResponse {
|
|
|
2188
2372
|
}
|
|
2189
2373
|
|
|
2190
2374
|
/**
|
|
2191
|
-
*
|
|
2192
|
-
*
|
|
2193
|
-
* @
|
|
2375
|
+
* {@link AiringScheduleVariables} contains variables for the {@link AiringScheduleQuery} operation.
|
|
2376
|
+
*
|
|
2377
|
+
* See {@link AiringScheduleQuery} and {@link AiringScheduleResponse} for the operation and response shape.
|
|
2378
|
+
*
|
|
2379
|
+
* Values are validated before dispatch.
|
|
2380
|
+
*
|
|
2381
|
+
* @see https://docs.anilist.co/reference/object/airingschedule
|
|
2194
2382
|
*/
|
|
2195
2383
|
interface AiringScheduleVariables {
|
|
2196
2384
|
/**
|
|
@@ -2300,9 +2488,13 @@ interface AiringSchedulesPageResponse {
|
|
|
2300
2488
|
}
|
|
2301
2489
|
|
|
2302
2490
|
/**
|
|
2303
|
-
*
|
|
2304
|
-
*
|
|
2305
|
-
* @
|
|
2491
|
+
* {@link AiringSchedulesVariables} contains variables for the {@link AiringSchedulesQuery} operation.
|
|
2492
|
+
*
|
|
2493
|
+
* See {@link AiringSchedulesQuery} and {@link AiringSchedulesPageResponse} for the operation and response shape.
|
|
2494
|
+
*
|
|
2495
|
+
* Values are validated before dispatch.
|
|
2496
|
+
*
|
|
2497
|
+
* @see https://docs.anilist.co/reference/object/airingschedule
|
|
2306
2498
|
*/
|
|
2307
2499
|
interface AiringSchedulesVariables {
|
|
2308
2500
|
/**
|
|
@@ -2581,9 +2773,13 @@ interface CharacterResponse {
|
|
|
2581
2773
|
}
|
|
2582
2774
|
|
|
2583
2775
|
/**
|
|
2584
|
-
*
|
|
2585
|
-
*
|
|
2586
|
-
* @
|
|
2776
|
+
* {@link CharacterVariables} contains variables for the {@link CharacterQuery} operation.
|
|
2777
|
+
*
|
|
2778
|
+
* See {@link CharacterQuery} and {@link CharacterResponse} for the operation and response shape.
|
|
2779
|
+
*
|
|
2780
|
+
* Values are validated before dispatch.
|
|
2781
|
+
*
|
|
2782
|
+
* @see https://docs.anilist.co/reference/object/character
|
|
2587
2783
|
*/
|
|
2588
2784
|
interface CharacterVariables {
|
|
2589
2785
|
/**
|
|
@@ -2661,9 +2857,13 @@ interface CharactersPageResponse {
|
|
|
2661
2857
|
}
|
|
2662
2858
|
|
|
2663
2859
|
/**
|
|
2664
|
-
*
|
|
2665
|
-
*
|
|
2666
|
-
* @
|
|
2860
|
+
* {@link CharactersVariables} contains variables for the {@link CharactersQuery} operation.
|
|
2861
|
+
*
|
|
2862
|
+
* See {@link CharactersQuery} and {@link CharactersPageResponse} for the operation and response shape.
|
|
2863
|
+
*
|
|
2864
|
+
* Values are validated before dispatch.
|
|
2865
|
+
*
|
|
2866
|
+
* @see https://docs.anilist.co/reference/object/character
|
|
2667
2867
|
*/
|
|
2668
2868
|
interface CharactersVariables {
|
|
2669
2869
|
/**
|
|
@@ -2725,34 +2925,34 @@ interface CharactersVariables {
|
|
|
2725
2925
|
}
|
|
2726
2926
|
|
|
2727
2927
|
/**
|
|
2728
|
-
*
|
|
2928
|
+
* {@link MediaFormat} is a type that represents the format of a media.
|
|
2729
2929
|
* It can be one of the following: 'TV', 'TV_SHORT', 'MOVIE', 'SPECIAL', 'OVA', 'ONA', 'MUSIC', 'MANGA', 'NOVEL', 'ONE_SHOT'.
|
|
2730
2930
|
* @see https://docs.anilist.co/reference/enum/mediaformat
|
|
2731
2931
|
*/
|
|
2732
2932
|
type MediaFormat = "TV" | "TV_SHORT" | "MOVIE" | "SPECIAL" | "OVA" | "ONA" | "MUSIC" | "MANGA" | "NOVEL" | "ONE_SHOT";
|
|
2733
2933
|
/**
|
|
2734
|
-
*
|
|
2934
|
+
* {@link ScoreFormat} is a type representing the scoring format for a media list.
|
|
2735
2935
|
* It can be one of the following: 'POINT_100', 'POINT_10_DECIMAL', 'POINT_10', 'POINT_5', 'POINT_3'.
|
|
2736
2936
|
* @see https://docs.anilist.co/reference/enum/scoreformat
|
|
2737
2937
|
*/
|
|
2738
2938
|
type ScoreFormat = "POINT_100" | "POINT_10_DECIMAL" | "POINT_10" | "POINT_5" | "POINT_3";
|
|
2739
2939
|
|
|
2740
2940
|
/**
|
|
2741
|
-
*
|
|
2941
|
+
* {@link UserStaffNameLanguage} is a type representing the language of a user's staff name.
|
|
2742
2942
|
* It can be one of the following: 'ROMAJI', 'ENGLISH', 'NATIVE', 'ROMAJI_STYLISED', 'ENGLISH_STYLISED', 'NATIVE_STYLISED'.
|
|
2743
2943
|
* @see https://docs.anilist.co/reference/enum/userstaffnamelanguage
|
|
2744
2944
|
*/
|
|
2745
2945
|
type UserStaffNameLanguage = "ROMAJI" | "ENGLISH" | "NATIVE" | "ROMAJI_STYLISED" | "ENGLISH_STYLISED" | "NATIVE_STYLISED";
|
|
2746
2946
|
|
|
2747
2947
|
/**
|
|
2748
|
-
*
|
|
2948
|
+
* {@link UserTitleLanguage} is a type representing the language of a user's title.
|
|
2749
2949
|
* It can be one of the following: 'ROMAJI', 'ENGLISH', 'NATIVE', 'ROMAJI_STYLISED', 'ENGLISH_STYLISED', 'NATIVE_STYLISED'.
|
|
2750
2950
|
* @see https://docs.anilist.co/reference/enum/usertitlelanguage
|
|
2751
2951
|
*/
|
|
2752
2952
|
type UserTitleLanguage = "ROMAJI" | "ENGLISH" | "NATIVE" | "ROMAJI_STYLISED" | "ENGLISH_STYLISED" | "NATIVE_STYLISED";
|
|
2753
2953
|
|
|
2754
2954
|
/**
|
|
2755
|
-
*
|
|
2955
|
+
* {@link Staff} is an interface representing a staff member.
|
|
2756
2956
|
* It includes the id and name each having their own properties.
|
|
2757
2957
|
* @see https://docs.anilist.co/reference/object/staff
|
|
2758
2958
|
*/
|
|
@@ -2762,13 +2962,13 @@ interface Staff {
|
|
|
2762
2962
|
*/
|
|
2763
2963
|
id: number;
|
|
2764
2964
|
/**
|
|
2765
|
-
* `name` is an instance of
|
|
2965
|
+
* `name` is an instance of {@link Name} representing the name of the staff member.
|
|
2766
2966
|
*/
|
|
2767
2967
|
name: Name;
|
|
2768
2968
|
}
|
|
2769
2969
|
|
|
2770
2970
|
/**
|
|
2771
|
-
*
|
|
2971
|
+
* {@link Studio} is an interface representing a studio.
|
|
2772
2972
|
* It includes the id and name each having their own properties.
|
|
2773
2973
|
* @see https://docs.anilist.co/reference/object/studio
|
|
2774
2974
|
*/
|
|
@@ -2784,7 +2984,7 @@ interface Studio {
|
|
|
2784
2984
|
}
|
|
2785
2985
|
|
|
2786
2986
|
/**
|
|
2787
|
-
*
|
|
2987
|
+
* {@link Stat} is an interface representing the statistics of a media.
|
|
2788
2988
|
* It includes the count, mean score, minutes watched, chapters read, media ids, format, status, score, length, release year, start year, genre, tag, country, voice actor, character ids, staff, and studio each having their own properties.
|
|
2789
2989
|
* @see https://docs.anilist.co/reference/object/userstatistictypes
|
|
2790
2990
|
*/
|
|
@@ -2838,7 +3038,7 @@ interface Stat {
|
|
|
2838
3038
|
*/
|
|
2839
3039
|
genre?: string;
|
|
2840
3040
|
/**
|
|
2841
|
-
* `tag` is an instance of
|
|
3041
|
+
* `tag` is an instance of {@link Tag} representing the tag of the media.
|
|
2842
3042
|
*/
|
|
2843
3043
|
tag?: Tag;
|
|
2844
3044
|
/**
|
|
@@ -2846,7 +3046,7 @@ interface Stat {
|
|
|
2846
3046
|
*/
|
|
2847
3047
|
country?: string;
|
|
2848
3048
|
/**
|
|
2849
|
-
* `voiceActor` is an instance of
|
|
3049
|
+
* `voiceActor` is an instance of {@link Staff} representing the voice actor of the media.
|
|
2850
3050
|
*/
|
|
2851
3051
|
voiceActor?: Staff;
|
|
2852
3052
|
/**
|
|
@@ -2854,11 +3054,11 @@ interface Stat {
|
|
|
2854
3054
|
*/
|
|
2855
3055
|
characterIds?: number[];
|
|
2856
3056
|
/**
|
|
2857
|
-
* `staff` is an instance of
|
|
3057
|
+
* `staff` is an instance of {@link Staff} representing the staff of the media.
|
|
2858
3058
|
*/
|
|
2859
3059
|
staff?: Staff;
|
|
2860
3060
|
/**
|
|
2861
|
-
* `studio` is an instance of
|
|
3061
|
+
* `studio` is an instance of {@link Studio} representing the studio of the media.
|
|
2862
3062
|
*/
|
|
2863
3063
|
studio?: Studio;
|
|
2864
3064
|
}
|
|
@@ -3007,7 +3207,7 @@ interface ActivityHistory {
|
|
|
3007
3207
|
}
|
|
3008
3208
|
|
|
3009
3209
|
/**
|
|
3010
|
-
*
|
|
3210
|
+
* {@link Favoured} is an interface representing a favoured entity.
|
|
3011
3211
|
* It includes the genre, amount, meanScore, timeWatched, tag, staff, studio, year, and format each having their own properties.
|
|
3012
3212
|
* @see https://docs.anilist.co/reference/object/favourites
|
|
3013
3213
|
*/
|
|
@@ -3029,15 +3229,15 @@ interface Favoured {
|
|
|
3029
3229
|
*/
|
|
3030
3230
|
timeWatched: number;
|
|
3031
3231
|
/**
|
|
3032
|
-
* `tag` is an object of type
|
|
3232
|
+
* `tag` is an object of type {@link Tag} representing the tag of the favoured entity.
|
|
3033
3233
|
*/
|
|
3034
3234
|
tag?: Tag;
|
|
3035
3235
|
/**
|
|
3036
|
-
* `staff` is an object of type
|
|
3236
|
+
* `staff` is an object of type {@link Staff} representing the staff of the favoured entity.
|
|
3037
3237
|
*/
|
|
3038
3238
|
staff?: Staff;
|
|
3039
3239
|
/**
|
|
3040
|
-
* `studio` is an object of type
|
|
3240
|
+
* `studio` is an object of type {@link Studio} representing the studio of the favoured entity.
|
|
3041
3241
|
*/
|
|
3042
3242
|
studio?: Studio;
|
|
3043
3243
|
/**
|
|
@@ -3555,9 +3755,13 @@ interface UserResponse {
|
|
|
3555
3755
|
}
|
|
3556
3756
|
|
|
3557
3757
|
/**
|
|
3558
|
-
*
|
|
3559
|
-
*
|
|
3560
|
-
* @
|
|
3758
|
+
* {@link FollowerVariables} contains variables for the {@link FollowerQuery} operation.
|
|
3759
|
+
*
|
|
3760
|
+
* See {@link FollowerQuery} and {@link UserResponse} for the operation and response shape.
|
|
3761
|
+
*
|
|
3762
|
+
* Values are validated before dispatch.
|
|
3763
|
+
*
|
|
3764
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
3561
3765
|
*/
|
|
3562
3766
|
interface FollowerVariables {
|
|
3563
3767
|
/**
|
|
@@ -3615,9 +3819,13 @@ interface FollowersPageResponse {
|
|
|
3615
3819
|
}
|
|
3616
3820
|
|
|
3617
3821
|
/**
|
|
3618
|
-
*
|
|
3619
|
-
*
|
|
3620
|
-
* @
|
|
3822
|
+
* {@link FollowersVariables} contains variables for the {@link FollowersQuery} operation.
|
|
3823
|
+
*
|
|
3824
|
+
* See {@link FollowersQuery} and {@link FollowersPageResponse} for the operation and response shape.
|
|
3825
|
+
*
|
|
3826
|
+
* Values are validated before dispatch.
|
|
3827
|
+
*
|
|
3828
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
3621
3829
|
*/
|
|
3622
3830
|
interface FollowersVariables {
|
|
3623
3831
|
/**
|
|
@@ -3659,9 +3867,13 @@ interface FollowersVariables {
|
|
|
3659
3867
|
}
|
|
3660
3868
|
|
|
3661
3869
|
/**
|
|
3662
|
-
*
|
|
3663
|
-
*
|
|
3664
|
-
* @
|
|
3870
|
+
* {@link FollowingVariables} contains variables for the {@link FollowingQuery} operation.
|
|
3871
|
+
*
|
|
3872
|
+
* See {@link FollowingQuery} and {@link UserResponse} for the operation and response shape.
|
|
3873
|
+
*
|
|
3874
|
+
* Values are validated before dispatch.
|
|
3875
|
+
*
|
|
3876
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
3665
3877
|
*/
|
|
3666
3878
|
interface FollowingVariables {
|
|
3667
3879
|
/**
|
|
@@ -3719,9 +3931,13 @@ interface FollowingsPageResponse {
|
|
|
3719
3931
|
}
|
|
3720
3932
|
|
|
3721
3933
|
/**
|
|
3722
|
-
*
|
|
3723
|
-
*
|
|
3724
|
-
* @
|
|
3934
|
+
* {@link FollowingsVariables} contains variables for the {@link FollowingsQuery} operation.
|
|
3935
|
+
*
|
|
3936
|
+
* See {@link FollowingsQuery} and {@link FollowingsPageResponse} for the operation and response shape.
|
|
3937
|
+
*
|
|
3938
|
+
* Values are validated before dispatch.
|
|
3939
|
+
*
|
|
3940
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
3725
3941
|
*/
|
|
3726
3942
|
interface FollowingsVariables {
|
|
3727
3943
|
/**
|
|
@@ -3787,9 +4003,13 @@ interface LikesPageResponse {
|
|
|
3787
4003
|
}
|
|
3788
4004
|
|
|
3789
4005
|
/**
|
|
3790
|
-
*
|
|
3791
|
-
*
|
|
3792
|
-
* @
|
|
4006
|
+
* {@link LikesVariables} contains variables for the {@link LikesQuery} operation.
|
|
4007
|
+
*
|
|
4008
|
+
* See {@link LikesQuery} and {@link LikesPageResponse} for the operation and response shape.
|
|
4009
|
+
*
|
|
4010
|
+
* Values are validated before dispatch.
|
|
4011
|
+
*
|
|
4012
|
+
* @see https://docs.anilist.co/reference/union/likeableunion
|
|
3793
4013
|
*/
|
|
3794
4014
|
interface LikesVariables {
|
|
3795
4015
|
/**
|
|
@@ -3811,9 +4031,11 @@ interface LikesVariables {
|
|
|
3811
4031
|
}
|
|
3812
4032
|
|
|
3813
4033
|
/**
|
|
3814
|
-
*
|
|
3815
|
-
*
|
|
3816
|
-
* @
|
|
4034
|
+
* {@link MarkdownVariables} contains variables for the {@link MarkdownQuery} operation.
|
|
4035
|
+
*
|
|
4036
|
+
* See {@link MarkdownQuery}; it returns the converted HTML string.
|
|
4037
|
+
*
|
|
4038
|
+
* @see https://docs.anilist.co/reference/object/parsedmarkdown
|
|
3817
4039
|
*/
|
|
3818
4040
|
interface MarkdownVariables {
|
|
3819
4041
|
/**
|
|
@@ -3945,20 +4167,20 @@ interface MediaListCollectionResponse {
|
|
|
3945
4167
|
}
|
|
3946
4168
|
|
|
3947
4169
|
/**
|
|
3948
|
-
*
|
|
4170
|
+
* {@link MediaStatus} is a type that represents the status of a media.
|
|
3949
4171
|
* It can be one of the following: 'FINISHED', 'RELEASING', 'NOT_YET_RELEASED', 'CANCELLED', 'HIATUS'.
|
|
3950
4172
|
* @see https://docs.anilist.co/reference/enum/mediastatus
|
|
3951
4173
|
*/
|
|
3952
4174
|
type MediaStatus = "FINISHED" | "RELEASING" | "NOT_YET_RELEASED" | "CANCELLED" | "HIATUS";
|
|
3953
4175
|
/**
|
|
3954
|
-
*
|
|
4176
|
+
* {@link MediaListStatus} is a type that represents the status of a media list.
|
|
3955
4177
|
* It can be one of the following: 'CURRENT', 'PLANNING', 'COMPLETED', 'DROPPED', 'PAUSED', 'REPEATING'.
|
|
3956
4178
|
* @see https://docs.anilist.co/reference/enum/medialiststatus
|
|
3957
4179
|
*/
|
|
3958
4180
|
type MediaListStatus = "CURRENT" | "PLANNING" | "COMPLETED" | "DROPPED" | "PAUSED" | "REPEATING";
|
|
3959
4181
|
|
|
3960
4182
|
/**
|
|
3961
|
-
*
|
|
4183
|
+
* {@link FuzzyDateInput} is a type representing a fuzzy date input.
|
|
3962
4184
|
* It includes the year, month, and day each having their own optional properties.
|
|
3963
4185
|
* @see https://docs.anilist.co/reference/input/fuzzydateinput
|
|
3964
4186
|
*/
|
|
@@ -3978,9 +4200,13 @@ type FuzzyDateInput = {
|
|
|
3978
4200
|
};
|
|
3979
4201
|
|
|
3980
4202
|
/**
|
|
3981
|
-
*
|
|
3982
|
-
*
|
|
3983
|
-
* @
|
|
4203
|
+
* {@link MediaListCollectionVariables} contains variables for the {@link MediaListCollectionQuery} operation.
|
|
4204
|
+
*
|
|
4205
|
+
* See {@link MediaListCollectionQuery} and {@link MediaListCollectionResponse} for the operation and response shape.
|
|
4206
|
+
*
|
|
4207
|
+
* Values are validated with `MediaListCollectionMappings` before dispatch.
|
|
4208
|
+
*
|
|
4209
|
+
* @see https://docs.anilist.co/reference/object/medialistcollection
|
|
3984
4210
|
*/
|
|
3985
4211
|
interface MediaListCollectionVariables {
|
|
3986
4212
|
/**
|
|
@@ -4176,9 +4402,13 @@ interface MediaListResponse {
|
|
|
4176
4402
|
}
|
|
4177
4403
|
|
|
4178
4404
|
/**
|
|
4179
|
-
*
|
|
4180
|
-
*
|
|
4181
|
-
* @
|
|
4405
|
+
* {@link MediaListVariables} contains variables for the {@link MediaListQuery} operation.
|
|
4406
|
+
*
|
|
4407
|
+
* See {@link MediaListQuery} and {@link MediaListResponse} for the operation and response shape.
|
|
4408
|
+
*
|
|
4409
|
+
* Values are validated with `MediaListMappings` before dispatch.
|
|
4410
|
+
*
|
|
4411
|
+
* @see https://docs.anilist.co/reference/object/medialist
|
|
4182
4412
|
*/
|
|
4183
4413
|
interface MediaListVariables {
|
|
4184
4414
|
/**
|
|
@@ -4320,9 +4550,13 @@ interface MediaListsPageResponse {
|
|
|
4320
4550
|
}
|
|
4321
4551
|
|
|
4322
4552
|
/**
|
|
4323
|
-
*
|
|
4324
|
-
*
|
|
4325
|
-
* @
|
|
4553
|
+
* {@link MediaListsVariables} contains variables for the {@link MediaListsQuery} operation.
|
|
4554
|
+
*
|
|
4555
|
+
* See {@link MediaListsQuery} and {@link MediaListsPageResponse} for the operation and response shape.
|
|
4556
|
+
*
|
|
4557
|
+
* Values are validated before dispatch.
|
|
4558
|
+
*
|
|
4559
|
+
* @see https://docs.anilist.co/reference/object/medialist
|
|
4326
4560
|
*/
|
|
4327
4561
|
interface MediaListsVariables {
|
|
4328
4562
|
/**
|
|
@@ -4448,14 +4682,14 @@ interface MediaListsVariables {
|
|
|
4448
4682
|
}
|
|
4449
4683
|
|
|
4450
4684
|
/**
|
|
4451
|
-
*
|
|
4685
|
+
* {@link MediaSeason} is a type that represents the season of a media.
|
|
4452
4686
|
* It can be one of the following: 'WINTER', 'SPRING', 'SUMMER', 'FALL'.
|
|
4453
4687
|
* @see https://docs.anilist.co/reference/enum/mediaseason
|
|
4454
4688
|
*/
|
|
4455
4689
|
type MediaSeason = "WINTER" | "SPRING" | "SUMMER" | "FALL";
|
|
4456
4690
|
|
|
4457
4691
|
/**
|
|
4458
|
-
*
|
|
4692
|
+
* {@link MediaSource} is a type that represents the source of a media.
|
|
4459
4693
|
* It can be one of the following: 'ORIGINAL', 'MANGA', 'LIGHT_NOVEL', 'VISUAL_NOVEL', 'VIDEO_GAME', 'OTHER', 'NOVEL', 'DOUJINSHI', 'ANIME', 'WEB_NOVEL', 'LIVE_ACTION', 'GAME', 'BOOK', 'MUSIC', 'MULTIMEDIA_PROJECT', 'PICTURE_BOOK'.
|
|
4460
4694
|
* @see https://docs.anilist.co/reference/enum/mediasource
|
|
4461
4695
|
*/
|
|
@@ -5084,9 +5318,13 @@ interface MediaResponse {
|
|
|
5084
5318
|
}
|
|
5085
5319
|
|
|
5086
5320
|
/**
|
|
5087
|
-
*
|
|
5088
|
-
*
|
|
5089
|
-
* @
|
|
5321
|
+
* {@link MediaVariables} contains variables for the {@link MediaQuery} operation.
|
|
5322
|
+
*
|
|
5323
|
+
* See {@link MediaQuery} and {@link MediaResponse} for the operation and response shape.
|
|
5324
|
+
*
|
|
5325
|
+
* Values are validated before dispatch.
|
|
5326
|
+
*
|
|
5327
|
+
* @see https://docs.anilist.co/reference/object/media
|
|
5090
5328
|
*/
|
|
5091
5329
|
interface MediaVariables {
|
|
5092
5330
|
/**
|
|
@@ -5424,9 +5662,13 @@ interface MediaTrendResponse {
|
|
|
5424
5662
|
}
|
|
5425
5663
|
|
|
5426
5664
|
/**
|
|
5427
|
-
*
|
|
5428
|
-
*
|
|
5429
|
-
* @
|
|
5665
|
+
* {@link MediaTrendVariables} contains variables for the {@link MediaTrendQuery} operation.
|
|
5666
|
+
*
|
|
5667
|
+
* See {@link MediaTrendQuery} and {@link MediaTrendResponse} for the operation and response shape.
|
|
5668
|
+
*
|
|
5669
|
+
* Values are validated with `MediaTrendMappings` before dispatch.
|
|
5670
|
+
*
|
|
5671
|
+
* @see https://docs.anilist.co/reference/object/mediatrend
|
|
5430
5672
|
*/
|
|
5431
5673
|
interface MediaTrendVariables {
|
|
5432
5674
|
/**
|
|
@@ -5560,9 +5802,13 @@ interface MediaTrendsPageResponse {
|
|
|
5560
5802
|
}
|
|
5561
5803
|
|
|
5562
5804
|
/**
|
|
5563
|
-
*
|
|
5564
|
-
*
|
|
5565
|
-
* @
|
|
5805
|
+
* {@link MediaTrendsVariables} contains variables for the {@link MediaTrendsQuery} operation.
|
|
5806
|
+
*
|
|
5807
|
+
* See {@link MediaTrendsQuery} and {@link MediaTrendsPageResponse} for the operation and response shape.
|
|
5808
|
+
*
|
|
5809
|
+
* Values are validated before dispatch.
|
|
5810
|
+
*
|
|
5811
|
+
* @see https://docs.anilist.co/reference/object/mediatrend
|
|
5566
5812
|
*/
|
|
5567
5813
|
interface MediaTrendsVariables {
|
|
5568
5814
|
/**
|
|
@@ -5704,9 +5950,13 @@ interface MediasPageResponse {
|
|
|
5704
5950
|
}
|
|
5705
5951
|
|
|
5706
5952
|
/**
|
|
5707
|
-
*
|
|
5708
|
-
*
|
|
5709
|
-
* @
|
|
5953
|
+
* {@link MediasVariables} contains variables for the {@link MediasQuery} operation.
|
|
5954
|
+
*
|
|
5955
|
+
* See {@link MediasQuery} and {@link MediasPageResponse} for the operation and response shape.
|
|
5956
|
+
*
|
|
5957
|
+
* Values are validated before dispatch.
|
|
5958
|
+
*
|
|
5959
|
+
* @see https://docs.anilist.co/reference/object/media
|
|
5710
5960
|
*/
|
|
5711
5961
|
interface MediasVariables {
|
|
5712
5962
|
/**
|
|
@@ -6557,9 +6807,13 @@ interface MediaDeletionNotification {
|
|
|
6557
6807
|
type NotificationResponse = AiringNotification | FollowingNotification | ActivityMessageNotification | ActivityNotification | ThreadNotification | ThreadLikeNotification | RelatedMediaAdditionNotification | MediaDataChangeNotification | MediaMergeNotification | MediaDeletionNotification;
|
|
6558
6808
|
|
|
6559
6809
|
/**
|
|
6560
|
-
*
|
|
6561
|
-
*
|
|
6562
|
-
* @
|
|
6810
|
+
* {@link NotificationVariables} contains variables for the {@link NotificationQuery} operation.
|
|
6811
|
+
*
|
|
6812
|
+
* See {@link NotificationQuery} and {@link NotificationResponse} for the operation and response shape.
|
|
6813
|
+
*
|
|
6814
|
+
* Values are validated with `NotificationMappings` before dispatch.
|
|
6815
|
+
*
|
|
6816
|
+
* @see https://docs.anilist.co/reference/union/notificationunion
|
|
6563
6817
|
*/
|
|
6564
6818
|
interface NotificationVariables {
|
|
6565
6819
|
/**
|
|
@@ -6605,9 +6859,13 @@ interface NotificationsPageResponse {
|
|
|
6605
6859
|
}
|
|
6606
6860
|
|
|
6607
6861
|
/**
|
|
6608
|
-
*
|
|
6609
|
-
*
|
|
6610
|
-
* @
|
|
6862
|
+
* {@link NotificationsVariables} contains variables for the {@link NotificationsQuery} operation.
|
|
6863
|
+
*
|
|
6864
|
+
* See {@link NotificationsQuery} and {@link NotificationsPageResponse} for the operation and response shape.
|
|
6865
|
+
*
|
|
6866
|
+
* Values are validated before dispatch.
|
|
6867
|
+
*
|
|
6868
|
+
* @see https://docs.anilist.co/reference/union/notificationunion
|
|
6611
6869
|
*/
|
|
6612
6870
|
interface NotificationsVariables {
|
|
6613
6871
|
/**
|
|
@@ -6677,9 +6935,13 @@ interface RecommendationResponse {
|
|
|
6677
6935
|
}
|
|
6678
6936
|
|
|
6679
6937
|
/**
|
|
6680
|
-
*
|
|
6681
|
-
*
|
|
6682
|
-
* @
|
|
6938
|
+
* {@link RecommendationVariables} contains variables for the {@link RecommendationQuery} operation.
|
|
6939
|
+
*
|
|
6940
|
+
* See {@link RecommendationQuery} and {@link RecommendationResponse} for the operation and response shape.
|
|
6941
|
+
*
|
|
6942
|
+
* Values are validated before dispatch.
|
|
6943
|
+
*
|
|
6944
|
+
* @see https://docs.anilist.co/reference/object/recommendation
|
|
6683
6945
|
*/
|
|
6684
6946
|
interface RecommendationVariables {
|
|
6685
6947
|
/**
|
|
@@ -6749,9 +7011,13 @@ interface RecommendationsPageResponse {
|
|
|
6749
7011
|
}
|
|
6750
7012
|
|
|
6751
7013
|
/**
|
|
6752
|
-
*
|
|
6753
|
-
*
|
|
6754
|
-
* @
|
|
7014
|
+
* {@link RecommendationsVariables} contains variables for the {@link RecommendationsQuery} operation.
|
|
7015
|
+
*
|
|
7016
|
+
* See {@link RecommendationsQuery} and {@link RecommendationsPageResponse} for the operation and response shape.
|
|
7017
|
+
*
|
|
7018
|
+
* Values are validated before dispatch.
|
|
7019
|
+
*
|
|
7020
|
+
* @see https://docs.anilist.co/reference/object/recommendation
|
|
6755
7021
|
*/
|
|
6756
7022
|
interface RecommendationsVariables {
|
|
6757
7023
|
/**
|
|
@@ -6881,9 +7147,13 @@ interface ReviewResponse {
|
|
|
6881
7147
|
}
|
|
6882
7148
|
|
|
6883
7149
|
/**
|
|
6884
|
-
*
|
|
6885
|
-
*
|
|
6886
|
-
* @
|
|
7150
|
+
* {@link ReviewVariables} contains variables for the {@link ReviewQuery} operation.
|
|
7151
|
+
*
|
|
7152
|
+
* See {@link ReviewQuery} and {@link ReviewResponse} for the operation and response shape.
|
|
7153
|
+
*
|
|
7154
|
+
* Values are validated before dispatch.
|
|
7155
|
+
*
|
|
7156
|
+
* @see https://docs.anilist.co/reference/object/review
|
|
6887
7157
|
*/
|
|
6888
7158
|
interface ReviewVariables {
|
|
6889
7159
|
/**
|
|
@@ -6937,9 +7207,13 @@ interface ReviewsPageResponse {
|
|
|
6937
7207
|
}
|
|
6938
7208
|
|
|
6939
7209
|
/**
|
|
6940
|
-
*
|
|
6941
|
-
*
|
|
6942
|
-
* @
|
|
7210
|
+
* {@link ReviewsVariables} contains variables for the {@link ReviewsQuery} operation.
|
|
7211
|
+
*
|
|
7212
|
+
* See {@link ReviewsQuery} and {@link ReviewsPageResponse} for the operation and response shape.
|
|
7213
|
+
*
|
|
7214
|
+
* Values are validated before dispatch.
|
|
7215
|
+
*
|
|
7216
|
+
* @see https://docs.anilist.co/reference/object/review
|
|
6943
7217
|
*/
|
|
6944
7218
|
interface ReviewsVariables {
|
|
6945
7219
|
/**
|
|
@@ -7191,9 +7465,13 @@ interface StaffResponse {
|
|
|
7191
7465
|
}
|
|
7192
7466
|
|
|
7193
7467
|
/**
|
|
7194
|
-
*
|
|
7195
|
-
*
|
|
7196
|
-
* @
|
|
7468
|
+
* {@link StaffVariables} contains variables for the {@link StaffQuery} operation.
|
|
7469
|
+
*
|
|
7470
|
+
* See {@link StaffQuery} and {@link StaffResponse} for the operation and response shape.
|
|
7471
|
+
*
|
|
7472
|
+
* Values are validated before dispatch.
|
|
7473
|
+
*
|
|
7474
|
+
* @see https://docs.anilist.co/reference/object/staff
|
|
7197
7475
|
*/
|
|
7198
7476
|
interface StaffVariables {
|
|
7199
7477
|
/**
|
|
@@ -7303,9 +7581,13 @@ interface StaffsPageResponse {
|
|
|
7303
7581
|
}
|
|
7304
7582
|
|
|
7305
7583
|
/**
|
|
7306
|
-
*
|
|
7307
|
-
*
|
|
7308
|
-
* @
|
|
7584
|
+
* {@link StaffsVariables} contains variables for the {@link StaffsQuery} operation.
|
|
7585
|
+
*
|
|
7586
|
+
* See {@link StaffsQuery} and {@link StaffsPageResponse} for the operation and response shape.
|
|
7587
|
+
*
|
|
7588
|
+
* Values are validated before dispatch.
|
|
7589
|
+
*
|
|
7590
|
+
* @see https://docs.anilist.co/reference/object/staff
|
|
7309
7591
|
*/
|
|
7310
7592
|
interface StaffsVariables {
|
|
7311
7593
|
/**
|
|
@@ -7578,9 +7860,13 @@ interface StudioResponse {
|
|
|
7578
7860
|
}
|
|
7579
7861
|
|
|
7580
7862
|
/**
|
|
7581
|
-
*
|
|
7582
|
-
*
|
|
7583
|
-
* @
|
|
7863
|
+
* {@link StudioVariables} contains variables for the {@link StudioQuery} operation.
|
|
7864
|
+
*
|
|
7865
|
+
* See {@link StudioQuery} and {@link StudioResponse} for the operation and response shape.
|
|
7866
|
+
*
|
|
7867
|
+
* Values are validated before dispatch.
|
|
7868
|
+
*
|
|
7869
|
+
* @see https://docs.anilist.co/reference/object/studio
|
|
7584
7870
|
*/
|
|
7585
7871
|
interface StudioVariables {
|
|
7586
7872
|
/**
|
|
@@ -7706,9 +7992,13 @@ interface StudiosPageResponse {
|
|
|
7706
7992
|
}
|
|
7707
7993
|
|
|
7708
7994
|
/**
|
|
7709
|
-
*
|
|
7710
|
-
*
|
|
7711
|
-
* @
|
|
7995
|
+
* {@link StudiosVariables} contains variables for the {@link StudiosQuery} operation.
|
|
7996
|
+
*
|
|
7997
|
+
* See {@link StudiosQuery} and {@link StudiosPageResponse} for the operation and response shape.
|
|
7998
|
+
*
|
|
7999
|
+
* Values are validated before dispatch.
|
|
8000
|
+
*
|
|
8001
|
+
* @see https://docs.anilist.co/reference/object/studio
|
|
7712
8002
|
*/
|
|
7713
8003
|
interface StudiosVariables {
|
|
7714
8004
|
/**
|
|
@@ -8003,9 +8293,13 @@ interface ThreadCommentResponse {
|
|
|
8003
8293
|
}
|
|
8004
8294
|
|
|
8005
8295
|
/**
|
|
8006
|
-
*
|
|
8007
|
-
*
|
|
8008
|
-
* @
|
|
8296
|
+
* {@link ThreadCommentVariables} contains variables for the {@link ThreadCommentQuery} operation.
|
|
8297
|
+
*
|
|
8298
|
+
* See {@link ThreadCommentQuery} and {@link ThreadCommentResponse} for the operation and response shape.
|
|
8299
|
+
*
|
|
8300
|
+
* Values are validated before dispatch.
|
|
8301
|
+
*
|
|
8302
|
+
* @see https://docs.anilist.co/reference/object/threadcomment
|
|
8009
8303
|
*/
|
|
8010
8304
|
interface ThreadCommentVariables {
|
|
8011
8305
|
/**
|
|
@@ -8055,9 +8349,13 @@ interface ThreadCommentsPageResponse {
|
|
|
8055
8349
|
}
|
|
8056
8350
|
|
|
8057
8351
|
/**
|
|
8058
|
-
*
|
|
8059
|
-
*
|
|
8060
|
-
* @
|
|
8352
|
+
* {@link ThreadCommentsVariables} contains variables for the {@link ThreadCommentsQuery} operation.
|
|
8353
|
+
*
|
|
8354
|
+
* See {@link ThreadCommentsQuery} and {@link ThreadCommentsPageResponse} for the operation and response shape.
|
|
8355
|
+
*
|
|
8356
|
+
* Values are validated before dispatch.
|
|
8357
|
+
*
|
|
8358
|
+
* @see https://docs.anilist.co/reference/object/threadcomment
|
|
8061
8359
|
*/
|
|
8062
8360
|
interface ThreadCommentsVariables {
|
|
8063
8361
|
/**
|
|
@@ -8091,9 +8389,13 @@ interface ThreadCommentsVariables {
|
|
|
8091
8389
|
}
|
|
8092
8390
|
|
|
8093
8391
|
/**
|
|
8094
|
-
*
|
|
8095
|
-
*
|
|
8096
|
-
* @
|
|
8392
|
+
* {@link ThreadVariables} contains variables for the {@link ThreadQuery} operation.
|
|
8393
|
+
*
|
|
8394
|
+
* See {@link ThreadQuery} and {@link ThreadResponse} for the operation and response shape.
|
|
8395
|
+
*
|
|
8396
|
+
* Values are validated before dispatch.
|
|
8397
|
+
*
|
|
8398
|
+
* @see https://docs.anilist.co/reference/object/thread
|
|
8097
8399
|
*/
|
|
8098
8400
|
interface ThreadVariables {
|
|
8099
8401
|
/**
|
|
@@ -8163,10 +8465,14 @@ interface ThreadsPageResponse {
|
|
|
8163
8465
|
}
|
|
8164
8466
|
|
|
8165
8467
|
/**
|
|
8166
|
-
*
|
|
8167
|
-
*
|
|
8168
|
-
* @
|
|
8169
|
-
|
|
8468
|
+
* {@link ThreadsVariables} contains variables for the {@link ThreadsQuery} operation.
|
|
8469
|
+
*
|
|
8470
|
+
* See {@link ThreadsQuery} and {@link ThreadsPageResponse} for the operation and response shape.
|
|
8471
|
+
*
|
|
8472
|
+
* Values are validated before dispatch.
|
|
8473
|
+
*
|
|
8474
|
+
* @see https://docs.anilist.co/reference/object/thread
|
|
8475
|
+
*/
|
|
8170
8476
|
interface ThreadsVariables {
|
|
8171
8477
|
/**
|
|
8172
8478
|
* `page` is a number representing the page number.
|
|
@@ -8219,9 +8525,13 @@ interface ThreadsVariables {
|
|
|
8219
8525
|
}
|
|
8220
8526
|
|
|
8221
8527
|
/**
|
|
8222
|
-
*
|
|
8223
|
-
*
|
|
8224
|
-
* @
|
|
8528
|
+
* {@link UserVariables} contains variables for the {@link UserQuery} operation.
|
|
8529
|
+
*
|
|
8530
|
+
* See {@link UserQuery} and {@link UserResponse} for the operation and response shape.
|
|
8531
|
+
*
|
|
8532
|
+
* Values are validated before dispatch.
|
|
8533
|
+
*
|
|
8534
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
8225
8535
|
*/
|
|
8226
8536
|
interface UserVariables {
|
|
8227
8537
|
/**
|
|
@@ -8291,9 +8601,13 @@ interface UsersPageResponse {
|
|
|
8291
8601
|
}
|
|
8292
8602
|
|
|
8293
8603
|
/**
|
|
8294
|
-
*
|
|
8295
|
-
*
|
|
8296
|
-
* @
|
|
8604
|
+
* {@link UsersVariables} contains variables for the {@link UsersQuery} operation.
|
|
8605
|
+
*
|
|
8606
|
+
* See {@link UsersQuery} and {@link UsersPageResponse} for the operation and response shape.
|
|
8607
|
+
*
|
|
8608
|
+
* Values are validated before dispatch.
|
|
8609
|
+
*
|
|
8610
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
8297
8611
|
*/
|
|
8298
8612
|
interface UsersVariables {
|
|
8299
8613
|
/**
|
|
@@ -8350,97 +8664,104 @@ interface UsersVariables {
|
|
|
8350
8664
|
* The `query` member (query + page operations) of the `AniListApi` type.
|
|
8351
8665
|
*/
|
|
8352
8666
|
|
|
8667
|
+
/**
|
|
8668
|
+
* Typed AniList query operations exposed by `AniListApi`.
|
|
8669
|
+
*
|
|
8670
|
+
* @see https://docs.anilist.co/reference/query
|
|
8671
|
+
*/
|
|
8353
8672
|
type AniListQueries = {
|
|
8354
8673
|
/**
|
|
8355
|
-
* Query methods for fetching data from the
|
|
8674
|
+
* Query methods for fetching data from the AniList API.
|
|
8356
8675
|
* @public
|
|
8357
8676
|
* @type {Object}
|
|
8358
|
-
* @property {Function} user - Fetches user data from the
|
|
8359
|
-
* @property {Function} media - Fetches media data from the
|
|
8360
|
-
* @property {Function} mediaTrend - Fetches media trend data from the
|
|
8361
|
-
* @property {Function} airingSchedule - Fetches airing schedule data from the
|
|
8362
|
-
* @property {Function} character - Fetches character data from the
|
|
8363
|
-
* @property {Function} staff - Fetches staff data from the
|
|
8364
|
-
* @property {Function} mediaList - Fetches media list data from the
|
|
8365
|
-
* @property {Function} mediaListCollection - Fetches media list collection data from the
|
|
8366
|
-
* @property {Function} like - Fetches users who liked a model from the
|
|
8367
|
-
* @property {Function} genreCollection - Fetches genre collection data from the
|
|
8368
|
-
* @property {Function} mediaTagCollection - Fetches media tag collection data from the
|
|
8369
|
-
* @property {Function} viewer - Fetches viewer data from the
|
|
8370
|
-
* @property {Function} notification - Fetches notification data from the
|
|
8371
|
-
* @property {Function} studio - Fetches studio data from the
|
|
8372
|
-
* @property {Function} review - Fetches review data from the
|
|
8373
|
-
* @property {Function} activity - Fetches activity data from the
|
|
8374
|
-
* @property {Function} activityReply - Fetches activity reply data from the
|
|
8375
|
-
* @property {Function} following - Fetches following data from the
|
|
8376
|
-
* @property {Function} follower - Fetches follower data from the
|
|
8377
|
-
* @property {Function} thread - Fetches thread data from the
|
|
8378
|
-
* @property {Function} threadComment - Fetches thread comment data from the
|
|
8379
|
-
* @property {Function} recommendation - Fetches recommendation data from the
|
|
8380
|
-
* @property {Function} markdown - Fetches markdown data from the
|
|
8381
|
-
* @property {Function} aniChartUser - Fetches
|
|
8382
|
-
* @property {Function} siteStatistics - Fetches site statistics data from the
|
|
8383
|
-
* @property {Function} externalLinkSourceCollection - Fetches external link source collection data from the
|
|
8384
|
-
* @property {Object} page - Fetches pages of data from the
|
|
8677
|
+
* @property {Function} user - Fetches user data from the AniList API.
|
|
8678
|
+
* @property {Function} media - Fetches media data from the AniList API.
|
|
8679
|
+
* @property {Function} mediaTrend - Fetches media trend data from the AniList API.
|
|
8680
|
+
* @property {Function} airingSchedule - Fetches airing schedule data from the AniList API.
|
|
8681
|
+
* @property {Function} character - Fetches character data from the AniList API.
|
|
8682
|
+
* @property {Function} staff - Fetches staff data from the AniList API.
|
|
8683
|
+
* @property {Function} mediaList - Fetches media list data from the AniList API.
|
|
8684
|
+
* @property {Function} mediaListCollection - Fetches media list collection data from the AniList API.
|
|
8685
|
+
* @property {Function} like - Fetches users who liked a model from the AniList API.
|
|
8686
|
+
* @property {Function} genreCollection - Fetches genre collection data from the AniList API.
|
|
8687
|
+
* @property {Function} mediaTagCollection - Fetches media tag collection data from the AniList API.
|
|
8688
|
+
* @property {Function} viewer - Fetches viewer data from the AniList API.
|
|
8689
|
+
* @property {Function} notification - Fetches notification data from the AniList API.
|
|
8690
|
+
* @property {Function} studio - Fetches studio data from the AniList API.
|
|
8691
|
+
* @property {Function} review - Fetches review data from the AniList API.
|
|
8692
|
+
* @property {Function} activity - Fetches activity data from the AniList API.
|
|
8693
|
+
* @property {Function} activityReply - Fetches activity reply data from the AniList API.
|
|
8694
|
+
* @property {Function} following - Fetches following data from the AniList API.
|
|
8695
|
+
* @property {Function} follower - Fetches follower data from the AniList API.
|
|
8696
|
+
* @property {Function} thread - Fetches thread data from the AniList API.
|
|
8697
|
+
* @property {Function} threadComment - Fetches thread comment data from the AniList API.
|
|
8698
|
+
* @property {Function} recommendation - Fetches recommendation data from the AniList API.
|
|
8699
|
+
* @property {Function} markdown - Fetches markdown data from the AniList API.
|
|
8700
|
+
* @property {Function} aniChartUser - Fetches AniChart user data from the AniList API.
|
|
8701
|
+
* @property {Function} siteStatistics - Fetches site statistics data from the AniList API.
|
|
8702
|
+
* @property {Function} externalLinkSourceCollection - Fetches external link source collection data from the AniList API.
|
|
8703
|
+
* @property {Object} page - Fetches pages of data from the AniList API.
|
|
8704
|
+
* @see https://docs.anilist.co/reference/query
|
|
8385
8705
|
*/
|
|
8386
8706
|
query: {
|
|
8387
8707
|
/**
|
|
8388
|
-
*
|
|
8389
|
-
* @param {UserVariables} variables - The
|
|
8390
|
-
* @
|
|
8708
|
+
* `UserQuery` fetches a single user by `id` or `userName`. Returns a {@link UserResponse}.
|
|
8709
|
+
* @param {UserVariables} variables - The {@link UserVariables} for the query.
|
|
8710
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8711
|
+
* @returns {Promise<UserResponse>} A promise that resolves to the user's {@link UserResponse} data.
|
|
8391
8712
|
*
|
|
8392
8713
|
* @example
|
|
8393
8714
|
* ```typescript
|
|
8394
8715
|
* await aniLink.anilist.query.user({id: 542244, asHtml: true});
|
|
8395
8716
|
* ```
|
|
8396
8717
|
* @see https://docs.anilist.co/reference/object/user
|
|
8397
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8398
8718
|
*/
|
|
8399
8719
|
user: (variables: UserVariables, options?: RequestOptions) => Promise<UserResponse>;
|
|
8400
8720
|
/**
|
|
8401
|
-
*
|
|
8402
|
-
* @param {MediaVariables} variables - The
|
|
8403
|
-
* @
|
|
8721
|
+
* `MediaQuery` fetches the media data for a single anime or manga by `id` or `idMal`. Returns a {@link MediaResponse}.
|
|
8722
|
+
* @param {MediaVariables} variables - The {@link MediaVariables} for the query.
|
|
8723
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8724
|
+
* @returns {Promise<MediaResponse>} A promise that resolves to the {@link MediaResponse} data.
|
|
8404
8725
|
*
|
|
8405
8726
|
* @example
|
|
8406
8727
|
* ```typescript
|
|
8407
8728
|
* await aniLink.anilist.query.media({id: 1, type: 'ANIME'});
|
|
8408
8729
|
* ```
|
|
8409
8730
|
* @see https://docs.anilist.co/reference/object/media
|
|
8410
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8411
8731
|
*/
|
|
8412
8732
|
media: (variables: MediaVariables, options?: RequestOptions) => Promise<MediaResponse>;
|
|
8413
8733
|
/**
|
|
8414
|
-
*
|
|
8415
|
-
* @param {MediaTrendVariables} variables - The
|
|
8416
|
-
* @
|
|
8734
|
+
* `MediaTrendQuery` fetches the trend entry for a single airing media. Returns a {@link MediaTrendResponse}.
|
|
8735
|
+
* @param {MediaTrendVariables} variables - The {@link MediaTrendVariables} for the query.
|
|
8736
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8737
|
+
* @returns {Promise<MediaTrendResponse>} A promise that resolves to the {@link MediaTrendResponse} data.
|
|
8417
8738
|
*
|
|
8418
8739
|
* @example
|
|
8419
8740
|
* ```typescript
|
|
8420
8741
|
* await aniLink.anilist.query.mediaTrend({mediaId: 1, type: 'ANIME'});
|
|
8421
8742
|
* ```
|
|
8422
8743
|
* @see https://docs.anilist.co/reference/object/mediatrend
|
|
8423
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8424
8744
|
*/
|
|
8425
8745
|
mediaTrend: (variables: MediaTrendVariables, options?: RequestOptions) => Promise<MediaTrendResponse>;
|
|
8426
8746
|
/**
|
|
8427
|
-
*
|
|
8428
|
-
* @param {AiringScheduleVariables} variables - The
|
|
8429
|
-
* @
|
|
8747
|
+
* `AiringScheduleQuery` fetches a single airing schedule entry by `id` or `mediaId`. Returns an {@link AiringScheduleResponse}.
|
|
8748
|
+
* @param {AiringScheduleVariables} variables - The {@link AiringScheduleVariables} for the query.
|
|
8749
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8750
|
+
* @returns {Promise<AiringScheduleResponse>} A promise that resolves to the {@link AiringScheduleResponse} data.
|
|
8430
8751
|
*
|
|
8431
8752
|
* @example
|
|
8432
8753
|
* ```typescript
|
|
8433
8754
|
* await aniLink.anilist.query.airingSchedule({mediaId: 130590});
|
|
8434
8755
|
* ```
|
|
8435
|
-
* Must be
|
|
8756
|
+
* Must be querying an airing anime. Returns error if not.
|
|
8436
8757
|
* @see https://docs.anilist.co/reference/object/airingschedule
|
|
8437
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8438
8758
|
*/
|
|
8439
8759
|
airingSchedule: (variables: AiringScheduleVariables, options?: RequestOptions) => Promise<AiringScheduleResponse>;
|
|
8440
8760
|
/**
|
|
8441
|
-
*
|
|
8442
|
-
* @param {CharacterVariables} variables - The
|
|
8443
|
-
* @
|
|
8761
|
+
* `CharacterQuery` fetches a single character by `id`. Returns a {@link CharacterResponse}.
|
|
8762
|
+
* @param {CharacterVariables} variables - The {@link CharacterVariables} for the query.
|
|
8763
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8764
|
+
* @returns {Promise<CharacterResponse>} A promise that resolves to the {@link CharacterResponse} data.
|
|
8444
8765
|
*
|
|
8445
8766
|
* @example
|
|
8446
8767
|
* ```typescript
|
|
@@ -8455,13 +8776,13 @@ type AniListQueries = {
|
|
|
8455
8776
|
* });
|
|
8456
8777
|
* ```
|
|
8457
8778
|
* @see https://docs.anilist.co/reference/object/character
|
|
8458
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8459
8779
|
*/
|
|
8460
8780
|
character: (variables: CharacterVariables, options?: RequestOptions) => Promise<CharacterResponse>;
|
|
8461
8781
|
/**
|
|
8462
|
-
*
|
|
8463
|
-
* @param {StaffVariables} variables - The
|
|
8464
|
-
* @
|
|
8782
|
+
* `StaffQuery` fetches a single staff member by `id`. Returns a {@link StaffResponse}.
|
|
8783
|
+
* @param {StaffVariables} variables - The {@link StaffVariables} for the query.
|
|
8784
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8785
|
+
* @returns {Promise<StaffResponse>} A promise that resolves to the {@link StaffResponse} data.
|
|
8465
8786
|
*
|
|
8466
8787
|
* @example
|
|
8467
8788
|
* ```typescript
|
|
@@ -8483,26 +8804,26 @@ type AniListQueries = {
|
|
|
8483
8804
|
* });
|
|
8484
8805
|
* ```
|
|
8485
8806
|
* @see https://docs.anilist.co/reference/object/staff
|
|
8486
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8487
8807
|
*/
|
|
8488
8808
|
staff: (variables: StaffVariables, options?: RequestOptions) => Promise<StaffResponse>;
|
|
8489
8809
|
/**
|
|
8490
|
-
*
|
|
8491
|
-
* @param {MediaListVariables} variables - The
|
|
8492
|
-
* @
|
|
8810
|
+
* `MediaListQuery` fetches a single media list entry by `id`, or by `userName`/`userId` plus `mediaId`. Returns a {@link MediaListResponse}.
|
|
8811
|
+
* @param {MediaListVariables} variables - The {@link MediaListVariables} for the query.
|
|
8812
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8813
|
+
* @returns {Promise<MediaListResponse>} A promise that resolves to the {@link MediaListResponse} data.
|
|
8493
8814
|
*
|
|
8494
8815
|
* @example
|
|
8495
8816
|
* ```typescript
|
|
8496
8817
|
* await aniLink.anilist.query.mediaList({userId: 542244});
|
|
8497
8818
|
* ```
|
|
8498
8819
|
* @see https://docs.anilist.co/reference/object/medialist
|
|
8499
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8500
8820
|
*/
|
|
8501
8821
|
mediaList: (variables: MediaListVariables, options?: RequestOptions) => Promise<MediaListResponse>;
|
|
8502
8822
|
/**
|
|
8503
|
-
*
|
|
8504
|
-
* @param {MediaListCollectionVariables} variables - The
|
|
8505
|
-
* @
|
|
8823
|
+
* `MediaListCollectionQuery` fetches a user's full list collection, chunked via `chunk`/`perChunk`. Returns a {@link MediaListCollectionResponse}; flatten it with `AniListHelpers.flattenMediaListCollection`.
|
|
8824
|
+
* @param {MediaListCollectionVariables} variables - The {@link MediaListCollectionVariables} for the query.
|
|
8825
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8826
|
+
* @returns {Promise<MediaListCollectionResponse>} A promise that resolves to the {@link MediaListCollectionResponse} data.
|
|
8506
8827
|
*
|
|
8507
8828
|
* @example
|
|
8508
8829
|
* ```typescript
|
|
@@ -8515,37 +8836,38 @@ type AniListQueries = {
|
|
|
8515
8836
|
* });
|
|
8516
8837
|
* ```
|
|
8517
8838
|
* @see https://docs.anilist.co/reference/object/medialistcollection
|
|
8518
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8519
8839
|
*/
|
|
8520
8840
|
mediaListCollection: (variables: MediaListCollectionVariables, options?: RequestOptions) => Promise<MediaListCollectionResponse>;
|
|
8521
8841
|
/**
|
|
8522
|
-
*
|
|
8523
|
-
* @
|
|
8842
|
+
* `GenreCollectionQuery` returns the list of all genres recognized by AniList. No variables are required.
|
|
8843
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8844
|
+
* @returns {Promise<string>} A promise that resolves to the genre collection data.
|
|
8524
8845
|
*
|
|
8525
8846
|
* @example
|
|
8526
8847
|
* ```typescript
|
|
8527
8848
|
* await aniLink.anilist.query.genreCollection()
|
|
8528
8849
|
* ```
|
|
8529
8850
|
* @see https://docs.anilist.co/reference/query
|
|
8530
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8531
8851
|
*/
|
|
8532
8852
|
genreCollection: (options?: RequestOptions) => Promise<string>;
|
|
8533
8853
|
/**
|
|
8534
|
-
*
|
|
8535
|
-
* @
|
|
8854
|
+
* `MediaTagCollectionQuery` returns all media tags recognized by AniList, optionally filtered by `variables`. Returns a {@link MediaTagCollectionResponse}.
|
|
8855
|
+
* @param {MediaTagCollectionVariables} variables - Optional {@link MediaTagCollectionVariables} filters for the query.
|
|
8856
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8857
|
+
* @returns {Promise<MediaTagCollectionResponse>} A promise that resolves to the {@link MediaTagCollectionResponse} data.
|
|
8536
8858
|
*
|
|
8537
8859
|
* @example
|
|
8538
8860
|
* ```typescript
|
|
8539
8861
|
* await aniLink.anilist.query.mediaTagCollection()
|
|
8540
8862
|
* ```
|
|
8541
8863
|
* @see https://docs.anilist.co/reference/object/mediatag
|
|
8542
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8543
8864
|
*/
|
|
8544
8865
|
mediaTagCollection: (variables?: MediaTagCollectionVariables, options?: RequestOptions) => Promise<MediaTagCollectionResponse>;
|
|
8545
8866
|
/**
|
|
8546
|
-
*
|
|
8547
|
-
* @param {UserVariables} variables - The
|
|
8548
|
-
* @
|
|
8867
|
+
* `ViewerQuery` fetches the currently authenticated user. Returns a {@link UserResponse}.
|
|
8868
|
+
* @param {UserVariables} variables - The {@link UserVariables} for the query.
|
|
8869
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8870
|
+
* @returns {Promise<UserResponse>} A promise that resolves to the {@link UserResponse} data.
|
|
8549
8871
|
*
|
|
8550
8872
|
* @example
|
|
8551
8873
|
* ```typescript
|
|
@@ -8553,13 +8875,13 @@ type AniListQueries = {
|
|
|
8553
8875
|
* ```
|
|
8554
8876
|
* Must be authenticated.
|
|
8555
8877
|
* @see https://docs.anilist.co/reference/object/user
|
|
8556
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8557
8878
|
*/
|
|
8558
8879
|
viewer: (variables: UserVariables, options?: RequestOptions) => Promise<UserResponse>;
|
|
8559
8880
|
/**
|
|
8560
|
-
*
|
|
8561
|
-
* @param {NotificationVariables} variables - The
|
|
8562
|
-
* @
|
|
8881
|
+
* `NotificationQuery` fetches a single notification by `id`. Returns a {@link NotificationResponse}. Must be authenticated.
|
|
8882
|
+
* @param {NotificationVariables} variables - The {@link NotificationVariables} for the query.
|
|
8883
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8884
|
+
* @returns {Promise<NotificationResponse>} A promise that resolves to the {@link NotificationResponse} data.
|
|
8563
8885
|
*
|
|
8564
8886
|
* @example
|
|
8565
8887
|
* ```typescript
|
|
@@ -8567,129 +8889,129 @@ type AniListQueries = {
|
|
|
8567
8889
|
* ```
|
|
8568
8890
|
* Must be authenticated.
|
|
8569
8891
|
* @see https://docs.anilist.co/reference/union/notificationunion
|
|
8570
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8571
8892
|
*/
|
|
8572
8893
|
notification: (variables: NotificationVariables, options?: RequestOptions) => Promise<NotificationResponse>;
|
|
8573
8894
|
/**
|
|
8574
|
-
*
|
|
8575
|
-
* @param {StudioVariables} variables - The
|
|
8576
|
-
* @
|
|
8895
|
+
* `StudioQuery` fetches a single studio by `id`. Returns a {@link StudioResponse}.
|
|
8896
|
+
* @param {StudioVariables} variables - The {@link StudioVariables} for the query.
|
|
8897
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8898
|
+
* @returns {Promise<StudioResponse>} A promise that resolves to the {@link StudioResponse} data.
|
|
8577
8899
|
*
|
|
8578
8900
|
* @example
|
|
8579
8901
|
* ```typescript
|
|
8580
8902
|
* await aniLink.anilist.query.studio({id: 561, asHtml: true});
|
|
8581
8903
|
* ```
|
|
8582
8904
|
* @see https://docs.anilist.co/reference/object/studio
|
|
8583
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8584
8905
|
*/
|
|
8585
8906
|
studio: (variables: StudioVariables, options?: RequestOptions) => Promise<StudioResponse>;
|
|
8586
8907
|
/**
|
|
8587
|
-
*
|
|
8588
|
-
* @param {ReviewVariables} variables - The
|
|
8589
|
-
* @
|
|
8908
|
+
* `ReviewQuery` fetches a single review by `id`. Returns a {@link ReviewResponse}.
|
|
8909
|
+
* @param {ReviewVariables} variables - The {@link ReviewVariables} for the query.
|
|
8910
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8911
|
+
* @returns {Promise<ReviewResponse>} A promise that resolves to the {@link ReviewResponse} data.
|
|
8590
8912
|
*
|
|
8591
8913
|
* @example
|
|
8592
8914
|
* ```typescript
|
|
8593
8915
|
* await aniLink.anilist.query.review({id: 8008, asHtml: true});
|
|
8594
8916
|
* ```
|
|
8595
8917
|
* @see https://docs.anilist.co/reference/object/review
|
|
8596
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8597
8918
|
*/
|
|
8598
8919
|
review: (variables: ReviewVariables, options?: RequestOptions) => Promise<ReviewResponse>;
|
|
8599
8920
|
/**
|
|
8600
|
-
*
|
|
8601
|
-
* @param {ActivityVariables} variables - The
|
|
8602
|
-
* @
|
|
8921
|
+
* `ActivityQuery` fetches a single activity by `id`. Returns an {@link Activity} (a union of text, message, and list activities).
|
|
8922
|
+
* @param {ActivityVariables} variables - The {@link ActivityVariables} for the query.
|
|
8923
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8924
|
+
* @returns {Promise<Activity>} A promise that resolves to the {@link Activity} data.
|
|
8603
8925
|
*
|
|
8604
8926
|
* @example
|
|
8605
8927
|
* ```typescript
|
|
8606
8928
|
* await aniLink.anilist.query.activity({id: 723235883, asHtml: true});
|
|
8607
8929
|
* ```
|
|
8608
8930
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
8609
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8610
8931
|
*/
|
|
8611
8932
|
activity: (variables: ActivityVariables, options?: RequestOptions) => Promise<Activity>;
|
|
8612
8933
|
/**
|
|
8613
|
-
*
|
|
8614
|
-
* @param {ActivityReplyVariables} variables - The
|
|
8615
|
-
* @
|
|
8934
|
+
* `ActivityReplyQuery` fetches a single activity reply by `id`. Returns an {@link ActivityReply}.
|
|
8935
|
+
* @param {ActivityReplyVariables} variables - The {@link ActivityReplyVariables} for the query.
|
|
8936
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8937
|
+
* @returns {Promise<ActivityReply>} A promise that resolves to the {@link ActivityReply} data.
|
|
8616
8938
|
*
|
|
8617
8939
|
* @example
|
|
8618
8940
|
* ```typescript
|
|
8619
8941
|
* await aniLink.anilist.query.activityReply({id: 12191046, asHtml: true});
|
|
8620
8942
|
* ```
|
|
8621
8943
|
* @see https://docs.anilist.co/reference/object/activityreply
|
|
8622
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8623
8944
|
*/
|
|
8624
8945
|
activityReply: (variables: ActivityReplyVariables, options?: RequestOptions) => Promise<ActivityReply>;
|
|
8625
8946
|
/**
|
|
8626
|
-
*
|
|
8627
|
-
* @param {FollowingVariables} variables - The
|
|
8628
|
-
* @
|
|
8947
|
+
* `FollowingQuery` fetches a single user that the given `userId` follows. Returns a {@link UserResponse}.
|
|
8948
|
+
* @param {FollowingVariables} variables - The {@link FollowingVariables} for the query.
|
|
8949
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8950
|
+
* @returns {Promise<UserResponse>} A promise that resolves to the {@link UserResponse} data.
|
|
8629
8951
|
*
|
|
8630
8952
|
* @example
|
|
8631
8953
|
* ```typescript
|
|
8632
8954
|
* await aniLink.anilist.query.following({userId: 542244});
|
|
8633
8955
|
* ```
|
|
8634
8956
|
* @see https://docs.anilist.co/reference/object/user
|
|
8635
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8636
8957
|
*/
|
|
8637
8958
|
following: (variables: FollowingVariables, options?: RequestOptions) => Promise<UserResponse>;
|
|
8638
8959
|
/**
|
|
8639
|
-
*
|
|
8640
|
-
* @param {FollowerVariables} variables - The
|
|
8641
|
-
* @
|
|
8960
|
+
* `FollowerQuery` fetches a single follower of the given `userId`. Returns a {@link UserResponse}.
|
|
8961
|
+
* @param {FollowerVariables} variables - The {@link FollowerVariables} for the query.
|
|
8962
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8963
|
+
* @returns {Promise<UserResponse>} A promise that resolves to the {@link UserResponse} data.
|
|
8642
8964
|
*
|
|
8643
8965
|
* @example
|
|
8644
8966
|
* ```typescript
|
|
8645
8967
|
* await aniLink.anilist.query.follower({userId: 542244});
|
|
8646
8968
|
* ```
|
|
8647
8969
|
* @see https://docs.anilist.co/reference/object/user
|
|
8648
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8649
8970
|
*/
|
|
8650
8971
|
follower: (variables: FollowerVariables, options?: RequestOptions) => Promise<UserResponse>;
|
|
8651
8972
|
/**
|
|
8652
|
-
*
|
|
8653
|
-
* @param {ThreadVariables} variables - The
|
|
8654
|
-
* @
|
|
8973
|
+
* `ThreadQuery` fetches a single forum thread by `id`. Returns a {@link ThreadResponse}.
|
|
8974
|
+
* @param {ThreadVariables} variables - The {@link ThreadVariables} for the query.
|
|
8975
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8976
|
+
* @returns {Promise<ThreadResponse>} A promise that resolves to the {@link ThreadResponse} data.
|
|
8655
8977
|
*
|
|
8656
8978
|
* @example
|
|
8657
8979
|
* ```typescript
|
|
8658
8980
|
* await aniLink.anilist.query.thread({id: 71881, asHtml: true});
|
|
8659
8981
|
* ```
|
|
8660
8982
|
* @see https://docs.anilist.co/reference/object/thread
|
|
8661
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8662
8983
|
*/
|
|
8663
8984
|
thread: (variables: ThreadVariables, options?: RequestOptions) => Promise<ThreadResponse>;
|
|
8664
8985
|
/**
|
|
8665
|
-
*
|
|
8666
|
-
* @param {ThreadCommentVariables} variables - The
|
|
8667
|
-
* @
|
|
8986
|
+
* `ThreadCommentQuery` fetches a single thread comment by `id`. Returns a {@link ThreadCommentResponse}.
|
|
8987
|
+
* @param {ThreadCommentVariables} variables - The {@link ThreadCommentVariables} for the query.
|
|
8988
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8989
|
+
* @returns {Promise<ThreadCommentResponse>} A promise that resolves to the {@link ThreadCommentResponse} data.
|
|
8668
8990
|
*
|
|
8669
8991
|
* @example
|
|
8670
8992
|
* ```typescript
|
|
8671
8993
|
* await aniLink.anilist.query.threadComment({id: 2555166, asHtml: true});
|
|
8672
8994
|
* ```
|
|
8673
8995
|
* @see https://docs.anilist.co/reference/object/threadcomment
|
|
8674
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8675
8996
|
*/
|
|
8676
8997
|
threadComment: (variables: ThreadCommentVariables, options?: RequestOptions) => Promise<ThreadCommentResponse>;
|
|
8677
8998
|
/**
|
|
8678
|
-
*
|
|
8679
|
-
* @param {RecommendationVariables} variables - The
|
|
8680
|
-
* @
|
|
8999
|
+
* `RecommendationQuery` fetches a single recommendation by `id` or `mediaId`. Returns a {@link RecommendationResponse}.
|
|
9000
|
+
* @param {RecommendationVariables} variables - The {@link RecommendationVariables} for the query.
|
|
9001
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9002
|
+
* @returns {Promise<RecommendationResponse>} A promise that resolves to the {@link RecommendationResponse} data.
|
|
8681
9003
|
*
|
|
8682
9004
|
* @example
|
|
8683
9005
|
* ```typescript
|
|
8684
9006
|
* await aniLink.anilist.query.recommendation({mediaId: 156822, asHtml: true});
|
|
8685
9007
|
* ```
|
|
8686
9008
|
* @see https://docs.anilist.co/reference/object/recommendation
|
|
8687
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8688
9009
|
*/
|
|
8689
9010
|
recommendation: (variables: RecommendationVariables, options?: RequestOptions) => Promise<RecommendationResponse>;
|
|
8690
9011
|
/**
|
|
8691
|
-
*
|
|
8692
|
-
* @param {MarkdownVariables} variables - The
|
|
9012
|
+
* `MarkdownQuery` parses AniList markdown into HTML. Returns the rendered HTML string.
|
|
9013
|
+
* @param {MarkdownVariables} variables - The {@link MarkdownVariables} for the query.
|
|
9014
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
8693
9015
|
* @returns {Promise<string>} A promise that resolves to the markdown data.
|
|
8694
9016
|
*
|
|
8695
9017
|
* @example
|
|
@@ -8697,12 +9019,12 @@ type AniListQueries = {
|
|
|
8697
9019
|
* await aniLink.anilist.query.markdown({markdown: 'Hello, world!'});
|
|
8698
9020
|
* ```
|
|
8699
9021
|
* @see https://docs.anilist.co/reference/object/parsedmarkdown
|
|
8700
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8701
9022
|
*/
|
|
8702
9023
|
markdown: (variables: MarkdownVariables, options?: RequestOptions) => Promise<string>;
|
|
8703
9024
|
/**
|
|
8704
|
-
*
|
|
8705
|
-
* @
|
|
9025
|
+
* `AniChartUserQuery` fetches the AniChart settings for the authenticated user. Returns an {@link AniChartUserResponse}. Must be authenticated.
|
|
9026
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9027
|
+
* @returns {Promise<AniChartUserResponse>} A promise that resolves to the {@link AniChartUserResponse} data.
|
|
8706
9028
|
*
|
|
8707
9029
|
* @example
|
|
8708
9030
|
* ```typescript
|
|
@@ -8710,291 +9032,295 @@ type AniListQueries = {
|
|
|
8710
9032
|
* ```
|
|
8711
9033
|
* Must be authenticated.
|
|
8712
9034
|
* @see https://docs.anilist.co/reference/object/anichartuser
|
|
8713
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8714
9035
|
*/
|
|
8715
9036
|
aniChartUser: (options?: RequestOptions) => Promise<AniChartUserResponse>;
|
|
8716
9037
|
/**
|
|
8717
|
-
*
|
|
8718
|
-
* @
|
|
9038
|
+
* `SiteStatisticsQuery` fetches aggregate AniList site statistics, optionally filtered by `variables`. Returns a {@link SiteStatisticsResponse}.
|
|
9039
|
+
* @param {SiteStatisticsVariables} variables - Optional {@link SiteStatisticsVariables} filters for the query.
|
|
9040
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9041
|
+
* @returns {Promise<SiteStatisticsResponse>} A promise that resolves to the {@link SiteStatisticsResponse} data.
|
|
8719
9042
|
*
|
|
8720
9043
|
* @example
|
|
8721
9044
|
* ```typescript
|
|
8722
9045
|
* await aniLink.anilist.query.siteStatistics();
|
|
8723
9046
|
* ```
|
|
8724
9047
|
* @see https://docs.anilist.co/reference/object/sitestatistics
|
|
8725
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8726
9048
|
*/
|
|
8727
9049
|
siteStatistics: (variables?: SiteStatisticsVariables, options?: RequestOptions) => Promise<SiteStatisticsResponse>;
|
|
8728
9050
|
/**
|
|
8729
|
-
*
|
|
8730
|
-
* @
|
|
9051
|
+
* `ExternalLinkSourceCollectionQuery` returns the available external link sources, optionally filtered by `variables`. Returns an {@link ExternalLinkSourceCollectionResponse}.
|
|
9052
|
+
* @param {ExternalLinkSourceCollectionVariables} variables - Optional {@link ExternalLinkSourceCollectionVariables} filters for the query.
|
|
9053
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9054
|
+
* @returns {Promise<ExternalLinkSourceCollectionResponse>} A promise that resolves to the {@link ExternalLinkSourceCollectionResponse} data.
|
|
8731
9055
|
*
|
|
8732
9056
|
* @example
|
|
8733
9057
|
* ```typescript
|
|
8734
9058
|
* await aniLink.anilist.query.externalLinkSourceCollection();
|
|
8735
9059
|
* ```
|
|
8736
9060
|
* @see https://docs.anilist.co/reference/query
|
|
8737
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8738
9061
|
*/
|
|
8739
9062
|
externalLinkSourceCollection: (variables?: ExternalLinkSourceCollectionVariables, options?: RequestOptions) => Promise<ExternalLinkSourceCollectionResponse>;
|
|
8740
9063
|
/**
|
|
8741
|
-
*
|
|
8742
|
-
*
|
|
9064
|
+
* {@link AniListQueries} groups the paginated query operations. All page queries mirror the single-object queries above
|
|
9065
|
+
* with the addition of `page` and `perPage` variables, and return a `*PageResponse` carrying the items
|
|
9066
|
+
* plus `PageInfo` pagination metadata. Drive them with `paginate` or
|
|
9067
|
+
* `paginatePages` to walk all pages automatically.
|
|
8743
9068
|
*
|
|
8744
9069
|
* @public
|
|
8745
9070
|
* @type {Object}
|
|
8746
|
-
* @property {Function} users - Fetches users data from the
|
|
8747
|
-
* @property {Function} medias - Fetches medias data from the
|
|
8748
|
-
* @property {Function} characters - Fetches characters data from the
|
|
8749
|
-
* @property {Function} staffs - Fetches staffs data from the
|
|
8750
|
-
* @property {Function} studios - Fetches studios data from the
|
|
8751
|
-
* @property {Function} mediaLists - Fetches media lists data from the
|
|
8752
|
-
* @property {Function} airingSchedules - Fetches airing schedules data from the
|
|
8753
|
-
* @property {Function} mediaTrends - Fetches media trends data from the
|
|
8754
|
-
* @property {Function} notifications - Fetches notifications data from the
|
|
8755
|
-
* @property {Function} followers - Fetches followers data from the
|
|
8756
|
-
* @property {Function} following - Fetches following data from the
|
|
8757
|
-
* @property {Function} activities - Fetches activities data from the
|
|
8758
|
-
* @property {Function} activityReplies - Fetches activity replies data from the
|
|
8759
|
-
* @property {Function} threads - Fetches threads data from the
|
|
8760
|
-
* @property {Function} threadComments - Fetches thread comments data from the
|
|
8761
|
-
* @property {Function} reviews - Fetches reviews data from the
|
|
8762
|
-
* @property {Function} recommendations - Fetches recommendations data from the
|
|
8763
|
-
* @property {Function} likes - Fetches likes data from the
|
|
9071
|
+
* @property {Function} users - Fetches users data from the AniList API.
|
|
9072
|
+
* @property {Function} medias - Fetches medias data from the AniList API.
|
|
9073
|
+
* @property {Function} characters - Fetches characters data from the AniList API.
|
|
9074
|
+
* @property {Function} staffs - Fetches staffs data from the AniList API.
|
|
9075
|
+
* @property {Function} studios - Fetches studios data from the AniList API.
|
|
9076
|
+
* @property {Function} mediaLists - Fetches media lists data from the AniList API.
|
|
9077
|
+
* @property {Function} airingSchedules - Fetches airing schedules data from the AniList API.
|
|
9078
|
+
* @property {Function} mediaTrends - Fetches media trends data from the AniList API.
|
|
9079
|
+
* @property {Function} notifications - Fetches notifications data from the AniList API.
|
|
9080
|
+
* @property {Function} followers - Fetches followers data from the AniList API.
|
|
9081
|
+
* @property {Function} following - Fetches following data from the AniList API.
|
|
9082
|
+
* @property {Function} activities - Fetches activities data from the AniList API.
|
|
9083
|
+
* @property {Function} activityReplies - Fetches activity replies data from the AniList API.
|
|
9084
|
+
* @property {Function} threads - Fetches threads data from the AniList API.
|
|
9085
|
+
* @property {Function} threadComments - Fetches thread comments data from the AniList API.
|
|
9086
|
+
* @property {Function} reviews - Fetches reviews data from the AniList API.
|
|
9087
|
+
* @property {Function} recommendations - Fetches recommendations data from the AniList API.
|
|
9088
|
+
* @property {Function} likes - Fetches likes data from the AniList API.
|
|
8764
9089
|
*/
|
|
8765
9090
|
page: {
|
|
8766
9091
|
/**
|
|
8767
|
-
*
|
|
8768
|
-
* @param {UsersVariables} variables - The
|
|
8769
|
-
* @
|
|
9092
|
+
* `UsersQuery` fetches a page of users. Returns a {@link UsersPageResponse} with the items and `PageInfo`.
|
|
9093
|
+
* @param {UsersVariables} variables - The {@link UsersVariables} for the query.
|
|
9094
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9095
|
+
* @returns {Promise<UsersPageResponse>} A promise that resolves to the {@link UsersPageResponse} data and pagination metadata.
|
|
8770
9096
|
*
|
|
8771
9097
|
* @example
|
|
8772
9098
|
* ```typescript
|
|
8773
9099
|
* await aniLink.anilist.query.page.users({page: 1, perPage: 10});
|
|
8774
9100
|
* ```
|
|
8775
9101
|
* @see https://docs.anilist.co/reference/object/user
|
|
8776
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8777
9102
|
*/
|
|
8778
9103
|
users: (variables: UsersVariables, options?: RequestOptions) => Promise<UsersPageResponse>;
|
|
8779
9104
|
/**
|
|
8780
|
-
*
|
|
8781
|
-
* @param {MediasVariables} variables - The
|
|
8782
|
-
* @
|
|
9105
|
+
* `MediasQuery` fetches a page of anime/manga. Returns a {@link MediasPageResponse} with the items and `PageInfo`.
|
|
9106
|
+
* @param {MediasVariables} variables - The {@link MediasVariables} for the query.
|
|
9107
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9108
|
+
* @returns {Promise<MediasPageResponse>} A promise that resolves to the {@link MediasPageResponse} data and pagination metadata.
|
|
8783
9109
|
*
|
|
8784
9110
|
* @example
|
|
8785
9111
|
* ```typescript
|
|
8786
9112
|
* await aniLink.anilist.query.page.medias({page: 1, perPage: 10, type: 'ANIME'});
|
|
8787
9113
|
* ```
|
|
8788
9114
|
* @see https://docs.anilist.co/reference/object/media
|
|
8789
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8790
9115
|
*/
|
|
8791
9116
|
medias: (variables: MediasVariables, options?: RequestOptions) => Promise<MediasPageResponse>;
|
|
8792
9117
|
/**
|
|
8793
|
-
*
|
|
8794
|
-
* @param {CharactersVariables} variables - The
|
|
8795
|
-
* @
|
|
9118
|
+
* `CharactersQuery` fetches a page of characters. Returns a {@link CharactersPageResponse} with the items and `PageInfo`.
|
|
9119
|
+
* @param {CharactersVariables} variables - The {@link CharactersVariables} for the query.
|
|
9120
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9121
|
+
* @returns {Promise<CharactersPageResponse>} A promise that resolves to the {@link CharactersPageResponse} data and pagination metadata.
|
|
8796
9122
|
*
|
|
8797
9123
|
* @example
|
|
8798
9124
|
* ```typescript
|
|
8799
9125
|
* await aniLink.anilist.query.page.characters({page: 1, perPage: 10});
|
|
8800
9126
|
* ```
|
|
8801
9127
|
* @see https://docs.anilist.co/reference/object/character
|
|
8802
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8803
9128
|
*/
|
|
8804
9129
|
characters: (variables: CharactersVariables, options?: RequestOptions) => Promise<CharactersPageResponse>;
|
|
8805
9130
|
/**
|
|
8806
|
-
*
|
|
8807
|
-
* @param {StaffsVariables} variables - The
|
|
8808
|
-
* @
|
|
9131
|
+
* `StaffsQuery` fetches a page of staff members. Returns a {@link StaffsPageResponse} with the items and `PageInfo`.
|
|
9132
|
+
* @param {StaffsVariables} variables - The {@link StaffsVariables} for the query.
|
|
9133
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9134
|
+
* @returns {Promise<StaffsPageResponse>} A promise that resolves to the {@link StaffsPageResponse} data and pagination metadata.
|
|
8809
9135
|
*
|
|
8810
9136
|
* @example
|
|
8811
9137
|
* ```typescript
|
|
8812
9138
|
* await aniLink.anilist.query.page.staffs({page: 1, perPage: 10});
|
|
8813
9139
|
* ```
|
|
8814
9140
|
* @see https://docs.anilist.co/reference/object/staff
|
|
8815
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8816
9141
|
*/
|
|
8817
9142
|
staffs: (variables: StaffsVariables, options?: RequestOptions) => Promise<StaffsPageResponse>;
|
|
8818
9143
|
/**
|
|
8819
|
-
*
|
|
8820
|
-
* @param {StudiosVariables} variables - The
|
|
8821
|
-
* @
|
|
9144
|
+
* `StudiosQuery` fetches a page of studios. Returns a {@link StudiosPageResponse} with the items and `PageInfo`.
|
|
9145
|
+
* @param {StudiosVariables} variables - The {@link StudiosVariables} for the query.
|
|
9146
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9147
|
+
* @returns {Promise<StudiosPageResponse>} A promise that resolves to the {@link StudiosPageResponse} data and pagination metadata.
|
|
8822
9148
|
*
|
|
8823
9149
|
* @example
|
|
8824
9150
|
* ```typescript
|
|
8825
9151
|
* await aniLink.anilist.query.page.studios({page: 1, perPage: 10});
|
|
8826
9152
|
* ```
|
|
8827
9153
|
* @see https://docs.anilist.co/reference/object/studio
|
|
8828
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8829
9154
|
*/
|
|
8830
9155
|
studios: (variables: StudiosVariables, options?: RequestOptions) => Promise<StudiosPageResponse>;
|
|
8831
9156
|
/**
|
|
8832
|
-
*
|
|
8833
|
-
* @param {MediaListsVariables} variables - The
|
|
8834
|
-
* @
|
|
9157
|
+
* `MediaListsQuery` fetches a page of media list entries. Returns a {@link MediaListsPageResponse} with the items and `PageInfo`.
|
|
9158
|
+
* @param {MediaListsVariables} variables - The {@link MediaListsVariables} for the query.
|
|
9159
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9160
|
+
* @returns {Promise<MediaListsPageResponse>} A promise that resolves to the {@link MediaListsPageResponse} data and pagination metadata.
|
|
8835
9161
|
*
|
|
8836
9162
|
* @example
|
|
8837
9163
|
* ```typescript
|
|
8838
9164
|
* await aniLink.anilist.query.page.mediaLists({page: 1, perPage: 10, userId: 542244});
|
|
8839
9165
|
* ```
|
|
8840
9166
|
* @see https://docs.anilist.co/reference/object/medialist
|
|
8841
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8842
9167
|
*/
|
|
8843
9168
|
mediaLists: (variables: MediaListsVariables, options?: RequestOptions) => Promise<MediaListsPageResponse>;
|
|
8844
9169
|
/**
|
|
8845
|
-
*
|
|
8846
|
-
* @param {AiringSchedulesVariables} variables - The
|
|
8847
|
-
* @
|
|
9170
|
+
* `AiringSchedulesQuery` fetches a page of airing schedule entries. Returns an {@link AiringSchedulesPageResponse} with the items and `PageInfo`.
|
|
9171
|
+
* @param {AiringSchedulesVariables} variables - The {@link AiringSchedulesVariables} for the query.
|
|
9172
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9173
|
+
* @returns {Promise<AiringSchedulesPageResponse>} A promise that resolves to the {@link AiringSchedulesPageResponse} data and pagination metadata.
|
|
8848
9174
|
*
|
|
8849
9175
|
* @example
|
|
8850
9176
|
* ```typescript
|
|
8851
9177
|
* await aniLink.anilist.query.page.airingSchedules({page: 1, perPage: 10});
|
|
8852
9178
|
* ```
|
|
8853
9179
|
* @see https://docs.anilist.co/reference/object/airingschedule
|
|
8854
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8855
9180
|
*/
|
|
8856
9181
|
airingSchedules: (variables: AiringSchedulesVariables, options?: RequestOptions) => Promise<AiringSchedulesPageResponse>;
|
|
8857
9182
|
/**
|
|
8858
|
-
*
|
|
8859
|
-
* @param {MediaTrendsVariables} variables - The
|
|
8860
|
-
* @
|
|
9183
|
+
* `MediaTrendsQuery` fetches a page of media trend entries. Returns a {@link MediaTrendsPageResponse} with the items and `PageInfo`.
|
|
9184
|
+
* @param {MediaTrendsVariables} variables - The {@link MediaTrendsVariables} for the query.
|
|
9185
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9186
|
+
* @returns {Promise<MediaTrendsPageResponse>} A promise that resolves to the {@link MediaTrendsPageResponse} data and pagination metadata.
|
|
8861
9187
|
*
|
|
8862
9188
|
* @example
|
|
8863
9189
|
* ```typescript
|
|
8864
9190
|
* await aniLink.anilist.query.page.mediaTrends({page: 1, perPage: 10, type: 'ANIME'});
|
|
8865
9191
|
* ```
|
|
8866
|
-
* Must be
|
|
9192
|
+
* Must be querying an airing anime. Returns error if not.
|
|
8867
9193
|
* @see https://docs.anilist.co/reference/object/mediatrend
|
|
8868
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8869
9194
|
*/
|
|
8870
9195
|
mediaTrends: (variables: MediaTrendsVariables, options?: RequestOptions) => Promise<MediaTrendsPageResponse>;
|
|
8871
9196
|
/**
|
|
8872
|
-
*
|
|
8873
|
-
* @param {NotificationsVariables} variables - The
|
|
8874
|
-
* @
|
|
9197
|
+
* `NotificationsQuery` fetches a page of the authenticated user's notifications. Returns a {@link NotificationsPageResponse} with the items and `PageInfo`. Must be authenticated.
|
|
9198
|
+
* @param {NotificationsVariables} variables - The {@link NotificationsVariables} for the query.
|
|
9199
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9200
|
+
* @returns {Promise<NotificationsPageResponse>} A promise that resolves to the {@link NotificationsPageResponse} data and pagination metadata.
|
|
8875
9201
|
*
|
|
8876
9202
|
* @example
|
|
8877
9203
|
* ```typescript
|
|
8878
9204
|
* await aniLink.anilist.query.page.notifications({page: 1, perPage: 10});
|
|
8879
9205
|
* ```
|
|
8880
9206
|
* @see https://docs.anilist.co/reference/union/notificationunion
|
|
8881
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8882
9207
|
*/
|
|
8883
9208
|
notifications: (variables: NotificationsVariables, options?: RequestOptions) => Promise<NotificationsPageResponse>;
|
|
8884
9209
|
/**
|
|
8885
|
-
*
|
|
8886
|
-
* @param {FollowersVariables} variables - The
|
|
8887
|
-
* @
|
|
9210
|
+
* `FollowersQuery` fetches a page of a user's followers. Returns a {@link FollowersPageResponse} with the items and `PageInfo`.
|
|
9211
|
+
* @param {FollowersVariables} variables - The {@link FollowersVariables} for the query.
|
|
9212
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9213
|
+
* @returns {Promise<FollowersPageResponse>} A promise that resolves to the {@link FollowersPageResponse} data and pagination metadata.
|
|
8888
9214
|
*
|
|
8889
9215
|
* @example
|
|
8890
9216
|
* ```typescript
|
|
8891
9217
|
* await aniLink.anilist.query.page.followers({page: 1, perPage: 10, userId: 542244});
|
|
8892
9218
|
* ```
|
|
8893
9219
|
* @see https://docs.anilist.co/reference/object/user
|
|
8894
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8895
9220
|
*/
|
|
8896
9221
|
followers: (variables: FollowersVariables, options?: RequestOptions) => Promise<FollowersPageResponse>;
|
|
8897
9222
|
/**
|
|
8898
|
-
*
|
|
8899
|
-
* @param {FollowingsVariables} variables - The
|
|
8900
|
-
* @
|
|
9223
|
+
* `FollowingsQuery` fetches a page of users that the given `userId` follows. Returns a {@link FollowingsPageResponse} with the items and `PageInfo`.
|
|
9224
|
+
* @param {FollowingsVariables} variables - The {@link FollowingsVariables} for the query.
|
|
9225
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9226
|
+
* @returns {Promise<FollowingsPageResponse>} A promise that resolves to the {@link FollowingsPageResponse} data and pagination metadata.
|
|
8901
9227
|
*
|
|
8902
9228
|
* @example
|
|
8903
9229
|
* ```typescript
|
|
8904
9230
|
* await aniLink.anilist.query.page.following({page: 1, perPage: 10, userId: 542244});
|
|
8905
9231
|
* ```
|
|
8906
9232
|
* @see https://docs.anilist.co/reference/object/user
|
|
8907
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8908
9233
|
*/
|
|
8909
9234
|
following: (variables: FollowingsVariables, options?: RequestOptions) => Promise<FollowingsPageResponse>;
|
|
8910
9235
|
/**
|
|
8911
|
-
*
|
|
8912
|
-
* @param {ActivitiesVariables} variables - The
|
|
8913
|
-
* @
|
|
9236
|
+
* `ActivitiesQuery` fetches a page of activities. Returns an {@link ActivitiesPageResponse} with the items and `PageInfo`.
|
|
9237
|
+
* @param {ActivitiesVariables} variables - The {@link ActivitiesVariables} for the query.
|
|
9238
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9239
|
+
* @returns {Promise<ActivitiesPageResponse>} A promise that resolves to the {@link ActivitiesPageResponse} data and pagination metadata.
|
|
8914
9240
|
*
|
|
8915
9241
|
* @example
|
|
8916
9242
|
* ```typescript
|
|
8917
9243
|
* await aniLink.anilist.query.page.activities({page: 1, perPage: 10, userId: 542244});
|
|
8918
9244
|
* ```
|
|
8919
9245
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
8920
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8921
9246
|
*/
|
|
8922
9247
|
activities: (variables: ActivitiesVariables, options?: RequestOptions) => Promise<ActivitiesPageResponse>;
|
|
8923
9248
|
/**
|
|
8924
|
-
*
|
|
8925
|
-
* @param {ActivityRepliesVariables} variables - The
|
|
8926
|
-
* @
|
|
9249
|
+
* `ActivityRepliesQuery` fetches a page of replies for an activity. Returns an {@link ActivityRepliesPageResponse} with the items and `PageInfo`.
|
|
9250
|
+
* @param {ActivityRepliesVariables} variables - The {@link ActivityRepliesVariables} for the query.
|
|
9251
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9252
|
+
* @returns {Promise<ActivityRepliesPageResponse>} A promise that resolves to the {@link ActivityRepliesPageResponse} data and pagination metadata.
|
|
8927
9253
|
*
|
|
8928
9254
|
* @example
|
|
8929
9255
|
* ```typescript
|
|
8930
9256
|
* await aniLink.anilist.query.page.activityReplies({page: 1, perPage: 10, activityId: 723235883});
|
|
8931
9257
|
* ```
|
|
8932
9258
|
* @see https://docs.anilist.co/reference/object/activityreply
|
|
8933
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8934
9259
|
*/
|
|
8935
9260
|
activityReplies: (variables: ActivityRepliesVariables, options?: RequestOptions) => Promise<ActivityRepliesPageResponse>;
|
|
8936
9261
|
/**
|
|
8937
|
-
*
|
|
8938
|
-
* @param {ThreadsVariables} variables - The
|
|
8939
|
-
* @
|
|
9262
|
+
* `ThreadsQuery` fetches a page of forum threads. Returns a {@link ThreadsPageResponse} with the items and `PageInfo`.
|
|
9263
|
+
* @param {ThreadsVariables} variables - The {@link ThreadsVariables} for the query.
|
|
9264
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9265
|
+
* @returns {Promise<ThreadsPageResponse>} A promise that resolves to the {@link ThreadsPageResponse} data and pagination metadata.
|
|
8940
9266
|
*
|
|
8941
9267
|
* @example
|
|
8942
9268
|
* ```typescript
|
|
8943
9269
|
* await aniLink.anilist.query.page.threads({page: 1, perPage: 10});
|
|
8944
9270
|
* ```
|
|
8945
9271
|
* @see https://docs.anilist.co/reference/object/thread
|
|
8946
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8947
9272
|
*/
|
|
8948
9273
|
threads: (variables: ThreadsVariables, options?: RequestOptions) => Promise<ThreadsPageResponse>;
|
|
8949
9274
|
/**
|
|
8950
|
-
*
|
|
8951
|
-
* @param {ThreadCommentsVariables} variables - The
|
|
8952
|
-
* @
|
|
9275
|
+
* `ThreadCommentsQuery` fetches a page of comments for a thread. Returns a {@link ThreadCommentsPageResponse} with the items and `PageInfo`.
|
|
9276
|
+
* @param {ThreadCommentsVariables} variables - The {@link ThreadCommentsVariables} for the query.
|
|
9277
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9278
|
+
* @returns {Promise<ThreadCommentsPageResponse>} A promise that resolves to the {@link ThreadCommentsPageResponse} data and pagination metadata.
|
|
8953
9279
|
*
|
|
8954
9280
|
* @example
|
|
8955
9281
|
* ```typescript
|
|
8956
9282
|
* await aniLink.anilist.query.page.threadComments({page: 1, perPage: 10, threadId: 71881});
|
|
8957
9283
|
* ```
|
|
8958
9284
|
* @see https://docs.anilist.co/reference/object/threadcomment
|
|
8959
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8960
9285
|
*/
|
|
8961
9286
|
threadComments: (variables: ThreadCommentsVariables, options?: RequestOptions) => Promise<ThreadCommentsPageResponse>;
|
|
8962
9287
|
/**
|
|
8963
|
-
*
|
|
8964
|
-
* @param {ReviewsVariables} variables - The
|
|
8965
|
-
* @
|
|
9288
|
+
* `ReviewsQuery` fetches a page of reviews. Returns a {@link ReviewsPageResponse} with the items and `PageInfo`.
|
|
9289
|
+
* @param {ReviewsVariables} variables - The {@link ReviewsVariables} for the query.
|
|
9290
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9291
|
+
* @returns {Promise<ReviewsPageResponse>} A promise that resolves to the {@link ReviewsPageResponse} data and pagination metadata.
|
|
8966
9292
|
*
|
|
8967
9293
|
* @example
|
|
8968
9294
|
* ```typescript
|
|
8969
9295
|
* await aniLink.anilist.query.page.reviews({page: 1, perPage: 10, mediaId: 1});
|
|
8970
9296
|
* ```
|
|
8971
9297
|
* @see https://docs.anilist.co/reference/object/review
|
|
8972
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8973
9298
|
*/
|
|
8974
9299
|
reviews: (variables: ReviewsVariables, options?: RequestOptions) => Promise<ReviewsPageResponse>;
|
|
8975
9300
|
/**
|
|
8976
|
-
*
|
|
8977
|
-
* @param {RecommendationsVariables} variables - The
|
|
8978
|
-
* @
|
|
9301
|
+
* `RecommendationsQuery` fetches a page of recommendations. Returns a {@link RecommendationsPageResponse} with the items and `PageInfo`.
|
|
9302
|
+
* @param {RecommendationsVariables} variables - The {@link RecommendationsVariables} for the query.
|
|
9303
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9304
|
+
* @returns {Promise<RecommendationsPageResponse>} A promise that resolves to the {@link RecommendationsPageResponse} data and pagination metadata.
|
|
8979
9305
|
*
|
|
8980
9306
|
* @example
|
|
8981
9307
|
* ```typescript
|
|
8982
9308
|
* await aniLink.anilist.query.page.recommendations({page: 1, perPage: 10, mediaId: 1});
|
|
8983
9309
|
* ```
|
|
8984
9310
|
* @see https://docs.anilist.co/reference/object/recommendation
|
|
8985
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8986
9311
|
*/
|
|
8987
9312
|
recommendations: (variables: RecommendationsVariables, options?: RequestOptions) => Promise<RecommendationsPageResponse>;
|
|
8988
9313
|
/**
|
|
8989
|
-
*
|
|
8990
|
-
* @param {LikesVariables} variables - The
|
|
8991
|
-
* @
|
|
9314
|
+
* `LikesQuery` fetches a page of users who liked a likeable entity. Returns a {@link LikesPageResponse} with the items and `PageInfo`.
|
|
9315
|
+
* @param {LikesVariables} variables - The {@link LikesVariables} for the query.
|
|
9316
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
9317
|
+
* @returns {Promise<LikesPageResponse>} A promise that resolves to the {@link LikesPageResponse} data and pagination metadata.
|
|
8992
9318
|
*
|
|
8993
9319
|
* @example
|
|
8994
9320
|
* ```typescript
|
|
8995
9321
|
* await aniLink.anilist.query.page.likes({page: 1, perPage: 10, likeAbleId: 1});
|
|
9322
|
+
* ```
|
|
8996
9323
|
* @see https://docs.anilist.co/reference/union/likeableunion
|
|
8997
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
8998
9324
|
*/
|
|
8999
9325
|
likes: (variables: LikesVariables, options?: RequestOptions) => Promise<LikesPageResponse>;
|
|
9000
9326
|
};
|
|
@@ -9039,9 +9365,13 @@ type ThreadComment = ThreadCommentResponse;
|
|
|
9039
9365
|
type Likeable = Activity | ActivityReply | Thread | ThreadComment;
|
|
9040
9366
|
|
|
9041
9367
|
/**
|
|
9042
|
-
*
|
|
9043
|
-
*
|
|
9044
|
-
* @
|
|
9368
|
+
* {@link SaveMediaListEntryVariables} contains variables for the {@link SaveMediaListEntryMutation} operation.
|
|
9369
|
+
*
|
|
9370
|
+
* See the {@link SaveMediaListEntryMutation} operation and {@link MediaListResponse} for the response shape.
|
|
9371
|
+
*
|
|
9372
|
+
* Values are validated before dispatch.
|
|
9373
|
+
*
|
|
9374
|
+
* @see https://docs.anilist.co/reference/object/medialist
|
|
9045
9375
|
*/
|
|
9046
9376
|
interface SaveMediaListEntryVariables {
|
|
9047
9377
|
/**
|
|
@@ -9053,7 +9383,7 @@ interface SaveMediaListEntryVariables {
|
|
|
9053
9383
|
*/
|
|
9054
9384
|
mediaId: number;
|
|
9055
9385
|
/**
|
|
9056
|
-
* `status` is a
|
|
9386
|
+
* `status` is a {@link MediaListStatus} representing the status of the media list entry.
|
|
9057
9387
|
*/
|
|
9058
9388
|
status?: MediaListStatus;
|
|
9059
9389
|
/**
|
|
@@ -9101,23 +9431,25 @@ interface SaveMediaListEntryVariables {
|
|
|
9101
9431
|
*/
|
|
9102
9432
|
advancedScores?: number[];
|
|
9103
9433
|
/**
|
|
9104
|
-
* `startedAt` is a
|
|
9434
|
+
* `startedAt` is a {@link FuzzyDateInput} representing when the media list entry started.
|
|
9105
9435
|
*/
|
|
9106
9436
|
startedAt?: FuzzyDateInput;
|
|
9107
9437
|
/**
|
|
9108
|
-
* `completedAt` is a
|
|
9438
|
+
* `completedAt` is a {@link FuzzyDateInput} representing when the media list entry was completed.
|
|
9109
9439
|
*/
|
|
9110
9440
|
completedAt?: FuzzyDateInput;
|
|
9111
9441
|
}
|
|
9112
9442
|
|
|
9113
9443
|
/**
|
|
9114
|
-
*
|
|
9115
|
-
*
|
|
9116
|
-
* @
|
|
9444
|
+
* {@link UpdateMediaListEntriesVariables} contains variables for the {@link UpdateMediaListEntriesMutation} operation.
|
|
9445
|
+
*
|
|
9446
|
+
* See {@link UpdateMediaListEntriesMutation} and {@link MediaListResponse} for the operation and response shape.
|
|
9447
|
+
*
|
|
9448
|
+
* @see https://docs.anilist.co/reference/object/medialist
|
|
9117
9449
|
*/
|
|
9118
9450
|
interface UpdateMediaListEntriesVariables {
|
|
9119
9451
|
/**
|
|
9120
|
-
* `status` is a
|
|
9452
|
+
* `status` is a {@link MediaListStatus} representing the status of the media list entries.
|
|
9121
9453
|
*/
|
|
9122
9454
|
status?: MediaListStatus;
|
|
9123
9455
|
/**
|
|
@@ -9175,7 +9507,7 @@ interface UpdateMediaListEntriesVariables {
|
|
|
9175
9507
|
}
|
|
9176
9508
|
|
|
9177
9509
|
/**
|
|
9178
|
-
*
|
|
9510
|
+
* {@link NotificationOptions} is a type representing the notification options for a user.
|
|
9179
9511
|
* It includes a `type` field which is a string representing the type of notification,
|
|
9180
9512
|
* and an `enabled` field which is a boolean indicating whether the notification is enabled or not.
|
|
9181
9513
|
* @see https://docs.anilist.co/reference/object/notificationoption
|
|
@@ -9192,7 +9524,7 @@ type NotificationOptions = {
|
|
|
9192
9524
|
};
|
|
9193
9525
|
|
|
9194
9526
|
/**
|
|
9195
|
-
*
|
|
9527
|
+
* {@link MediaListOptions} is a type representing the media list options for a user.
|
|
9196
9528
|
* It includes fields for section order, split completed section by format, custom lists, advanced scoring,
|
|
9197
9529
|
* advanced scoring enabled, and theme.
|
|
9198
9530
|
* @see https://docs.anilist.co/reference/object/medialistoptions
|
|
@@ -9225,7 +9557,7 @@ type MediaListOptions = {
|
|
|
9225
9557
|
};
|
|
9226
9558
|
|
|
9227
9559
|
/**
|
|
9228
|
-
*
|
|
9560
|
+
* {@link DisabledListActivity} is a type representing the disabled list activity options for a user.
|
|
9229
9561
|
* It includes a `disabled` field which is a boolean indicating whether the activity is disabled or not,
|
|
9230
9562
|
* and a `type` field which is a string representing the type of the activity.
|
|
9231
9563
|
* @see https://docs.anilist.co/reference/object/medialisttypeoptions
|
|
@@ -9242,9 +9574,13 @@ type DisabledListActivity = {
|
|
|
9242
9574
|
};
|
|
9243
9575
|
|
|
9244
9576
|
/**
|
|
9245
|
-
*
|
|
9246
|
-
*
|
|
9247
|
-
* @
|
|
9577
|
+
* {@link UpdateUserVariables} contains variables for the {@link UpdateUserMutation} operation.
|
|
9578
|
+
*
|
|
9579
|
+
* See {@link UpdateUserMutation} and {@link UpdateUserResponse} for the operation and response shape.
|
|
9580
|
+
*
|
|
9581
|
+
* Values are validated before dispatch.
|
|
9582
|
+
*
|
|
9583
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
9248
9584
|
*/
|
|
9249
9585
|
interface UpdateUserVariables {
|
|
9250
9586
|
/**
|
|
@@ -9252,7 +9588,7 @@ interface UpdateUserVariables {
|
|
|
9252
9588
|
*/
|
|
9253
9589
|
about?: string;
|
|
9254
9590
|
/**
|
|
9255
|
-
* `titleLanguage` is a
|
|
9591
|
+
* `titleLanguage` is a {@link UserTitleLanguage} representing the updated title language preference of the user.
|
|
9256
9592
|
*/
|
|
9257
9593
|
titleLanguage?: UserTitleLanguage;
|
|
9258
9594
|
/**
|
|
@@ -9264,7 +9600,7 @@ interface UpdateUserVariables {
|
|
|
9264
9600
|
*/
|
|
9265
9601
|
airingNotifications?: boolean;
|
|
9266
9602
|
/**
|
|
9267
|
-
* `scoreFormat` is a
|
|
9603
|
+
* `scoreFormat` is a {@link ScoreFormat} representing the updated score format preference of the user.
|
|
9268
9604
|
*/
|
|
9269
9605
|
scoreFormat?: ScoreFormat;
|
|
9270
9606
|
/**
|
|
@@ -9280,7 +9616,7 @@ interface UpdateUserVariables {
|
|
|
9280
9616
|
*/
|
|
9281
9617
|
donatorBadge?: string;
|
|
9282
9618
|
/**
|
|
9283
|
-
* `notificationOptions` is an array of
|
|
9619
|
+
* `notificationOptions` is an array of {@link NotificationOptions} representing the updated notification options of the user.
|
|
9284
9620
|
*/
|
|
9285
9621
|
notificationOptions?: NotificationOptions[];
|
|
9286
9622
|
/**
|
|
@@ -9292,15 +9628,15 @@ interface UpdateUserVariables {
|
|
|
9292
9628
|
*/
|
|
9293
9629
|
activityMergeTime?: number;
|
|
9294
9630
|
/**
|
|
9295
|
-
* `animeListOptions` is a
|
|
9631
|
+
* `animeListOptions` is a {@link MediaListOptions} representing the updated anime list options of the user.
|
|
9296
9632
|
*/
|
|
9297
9633
|
animeListOptions?: MediaListOptions;
|
|
9298
9634
|
/**
|
|
9299
|
-
* `mangaListOptions` is a
|
|
9635
|
+
* `mangaListOptions` is a {@link MediaListOptions} representing the updated manga list options of the user.
|
|
9300
9636
|
*/
|
|
9301
9637
|
mangaListOptions?: MediaListOptions;
|
|
9302
9638
|
/**
|
|
9303
|
-
* `staffNameLanguage` is a
|
|
9639
|
+
* `staffNameLanguage` is a {@link UserStaffNameLanguage} representing the updated staff name language preference of the user.
|
|
9304
9640
|
*/
|
|
9305
9641
|
staffNameLanguage?: UserStaffNameLanguage;
|
|
9306
9642
|
/**
|
|
@@ -9308,12 +9644,12 @@ interface UpdateUserVariables {
|
|
|
9308
9644
|
*/
|
|
9309
9645
|
restrictMessagesToFollowing?: boolean;
|
|
9310
9646
|
/**
|
|
9311
|
-
* `disabledListActivity` is an array of
|
|
9647
|
+
* `disabledListActivity` is an array of {@link DisabledListActivity} representing the updated disabled list activity preferences of the user.
|
|
9312
9648
|
*/
|
|
9313
9649
|
disabledListActivity?: DisabledListActivity[];
|
|
9314
9650
|
}
|
|
9315
9651
|
/**
|
|
9316
|
-
*
|
|
9652
|
+
* {@link UpdateUserResponse} describes the user returned by {@link UpdateUserMutation}.
|
|
9317
9653
|
* It includes the id, name, about, avatar, banner image, is following, is follower, is blocked, bans, options, media list options, unread notification count, site url, donator tier, donator badge, moderator roles, created at, and updated at.
|
|
9318
9654
|
* @see https://docs.anilist.co/reference/object/user
|
|
9319
9655
|
*/
|
|
@@ -9518,9 +9854,13 @@ interface DeleteMediaListEntryResponse {
|
|
|
9518
9854
|
}
|
|
9519
9855
|
|
|
9520
9856
|
/**
|
|
9521
|
-
*
|
|
9522
|
-
*
|
|
9523
|
-
* @
|
|
9857
|
+
* {@link DeleteMediaListEntryVariables} contains variables for the {@link DeleteMediaListEntryMutation} operation.
|
|
9858
|
+
*
|
|
9859
|
+
* See the {@link DeleteMediaListEntryMutation} operation and {@link DeleteMediaListEntryResponse} for the response shape.
|
|
9860
|
+
*
|
|
9861
|
+
* Values are validated before dispatch.
|
|
9862
|
+
*
|
|
9863
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
9524
9864
|
*/
|
|
9525
9865
|
interface DeleteMediaListEntryVariables {
|
|
9526
9866
|
/**
|
|
@@ -9530,10 +9870,10 @@ interface DeleteMediaListEntryVariables {
|
|
|
9530
9870
|
}
|
|
9531
9871
|
|
|
9532
9872
|
/**
|
|
9533
|
-
*
|
|
9873
|
+
* {@link DeleteResult} is the response shape returned by the AniList delete mutations.
|
|
9534
9874
|
* `deleted` is `true` when the target was deleted by this call and `false` when it was
|
|
9535
9875
|
* already absent, which makes these mutations safe to retry after a partial failure.
|
|
9536
|
-
* @see https://docs.anilist.co/reference/
|
|
9876
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
9537
9877
|
*/
|
|
9538
9878
|
type DeleteResult = {
|
|
9539
9879
|
/**
|
|
@@ -9543,9 +9883,13 @@ type DeleteResult = {
|
|
|
9543
9883
|
};
|
|
9544
9884
|
|
|
9545
9885
|
/**
|
|
9546
|
-
*
|
|
9547
|
-
*
|
|
9548
|
-
* @
|
|
9886
|
+
* {@link DeleteCustomListVariables} contains variables for the {@link DeleteCustomListMutation} operation.
|
|
9887
|
+
*
|
|
9888
|
+
* See the {@link DeleteCustomListMutation} operation and {@link DeleteResult} for the response shape.
|
|
9889
|
+
*
|
|
9890
|
+
* Values are validated before dispatch.
|
|
9891
|
+
*
|
|
9892
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
9549
9893
|
*/
|
|
9550
9894
|
interface DeleteCustomListVariables {
|
|
9551
9895
|
/**
|
|
@@ -9559,9 +9903,13 @@ interface DeleteCustomListVariables {
|
|
|
9559
9903
|
}
|
|
9560
9904
|
|
|
9561
9905
|
/**
|
|
9562
|
-
*
|
|
9563
|
-
*
|
|
9564
|
-
* @
|
|
9906
|
+
* {@link SaveTextActivityVariables} contains variables for the {@link SaveTextActivityMutation} operation.
|
|
9907
|
+
*
|
|
9908
|
+
* See the {@link SaveTextActivityMutation} operation and {@link Activity} for the response shape.
|
|
9909
|
+
*
|
|
9910
|
+
* Values are validated before dispatch.
|
|
9911
|
+
*
|
|
9912
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
9565
9913
|
*/
|
|
9566
9914
|
interface SaveTextActivityVariables {
|
|
9567
9915
|
/**
|
|
@@ -9583,9 +9931,13 @@ interface SaveTextActivityVariables {
|
|
|
9583
9931
|
}
|
|
9584
9932
|
|
|
9585
9933
|
/**
|
|
9586
|
-
*
|
|
9587
|
-
*
|
|
9588
|
-
* @
|
|
9934
|
+
* {@link SaveMessageActivityVariables} contains variables for the {@link SaveMessageActivityMutation} operation.
|
|
9935
|
+
*
|
|
9936
|
+
* See the {@link SaveMessageActivityMutation} operation and {@link Activity} for the response shape.
|
|
9937
|
+
*
|
|
9938
|
+
* Values are validated before dispatch.
|
|
9939
|
+
*
|
|
9940
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
9589
9941
|
*/
|
|
9590
9942
|
interface SaveMessageActivityVariables {
|
|
9591
9943
|
/**
|
|
@@ -9619,9 +9971,13 @@ interface SaveMessageActivityVariables {
|
|
|
9619
9971
|
}
|
|
9620
9972
|
|
|
9621
9973
|
/**
|
|
9622
|
-
*
|
|
9623
|
-
*
|
|
9624
|
-
* @
|
|
9974
|
+
* {@link SaveListActivityVariables} contains variables for the {@link SaveListActivityMutation} operation.
|
|
9975
|
+
*
|
|
9976
|
+
* See the {@link SaveListActivityMutation} operation and {@link Activity} for the response shape.
|
|
9977
|
+
*
|
|
9978
|
+
* Values are validated before dispatch.
|
|
9979
|
+
*
|
|
9980
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
9625
9981
|
*/
|
|
9626
9982
|
interface SaveListActivityVariables {
|
|
9627
9983
|
/**
|
|
@@ -9639,9 +9995,12 @@ interface SaveListActivityVariables {
|
|
|
9639
9995
|
}
|
|
9640
9996
|
|
|
9641
9997
|
/**
|
|
9642
|
-
*
|
|
9643
|
-
*
|
|
9644
|
-
* @
|
|
9998
|
+
* {@link DeleteActivityVariables} contains variables for the {@link DeleteActivityMutation} operation.
|
|
9999
|
+
*
|
|
10000
|
+
* Holds the `id` of the activity to delete. Use with the {@link DeleteActivityMutation} operation to obtain {@link DeleteResult}.
|
|
10001
|
+
* Values are validated before dispatch.
|
|
10002
|
+
*
|
|
10003
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
9645
10004
|
*/
|
|
9646
10005
|
interface DeleteActivityVariables {
|
|
9647
10006
|
/**
|
|
@@ -9651,9 +10010,13 @@ interface DeleteActivityVariables {
|
|
|
9651
10010
|
}
|
|
9652
10011
|
|
|
9653
10012
|
/**
|
|
9654
|
-
*
|
|
9655
|
-
*
|
|
9656
|
-
* @
|
|
10013
|
+
* {@link ToggleActivitySubscriptionVariables} contains variables for the {@link ToggleActivitySubscriptionMutation} operation.
|
|
10014
|
+
*
|
|
10015
|
+
* See the {@link ToggleActivitySubscriptionMutation} operation and {@link Activity} for the response shape.
|
|
10016
|
+
*
|
|
10017
|
+
* Values are validated before dispatch.
|
|
10018
|
+
*
|
|
10019
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
9657
10020
|
*/
|
|
9658
10021
|
interface ToggleActivitySubscriptionVariables {
|
|
9659
10022
|
/**
|
|
@@ -9671,9 +10034,13 @@ interface ToggleActivitySubscriptionVariables {
|
|
|
9671
10034
|
}
|
|
9672
10035
|
|
|
9673
10036
|
/**
|
|
9674
|
-
*
|
|
9675
|
-
*
|
|
9676
|
-
* @
|
|
10037
|
+
* {@link ToggleActivityPinVariables} contains variables for the {@link ToggleActivityPinMutation} operation.
|
|
10038
|
+
*
|
|
10039
|
+
* See the {@link ToggleActivityPinMutation} operation and {@link Activity} for the response shape.
|
|
10040
|
+
*
|
|
10041
|
+
* Values are validated before dispatch.
|
|
10042
|
+
*
|
|
10043
|
+
* @see https://docs.anilist.co/reference/union/activityunion
|
|
9677
10044
|
*/
|
|
9678
10045
|
interface ToggleActivityPinVariables {
|
|
9679
10046
|
/**
|
|
@@ -9691,9 +10058,13 @@ interface ToggleActivityPinVariables {
|
|
|
9691
10058
|
}
|
|
9692
10059
|
|
|
9693
10060
|
/**
|
|
9694
|
-
*
|
|
9695
|
-
*
|
|
9696
|
-
* @
|
|
10061
|
+
* {@link SaveActivityReplyVariables} contains variables for the {@link SaveActivityReplyMutation} operation.
|
|
10062
|
+
*
|
|
10063
|
+
* See the {@link SaveActivityReplyMutation} operation and {@link ActivityReply} for the response shape.
|
|
10064
|
+
*
|
|
10065
|
+
* Values are validated before dispatch.
|
|
10066
|
+
*
|
|
10067
|
+
* @see https://docs.anilist.co/reference/object/activityreply
|
|
9697
10068
|
*/
|
|
9698
10069
|
interface SaveActivityReplyVariables {
|
|
9699
10070
|
/**
|
|
@@ -9719,9 +10090,13 @@ interface SaveActivityReplyVariables {
|
|
|
9719
10090
|
}
|
|
9720
10091
|
|
|
9721
10092
|
/**
|
|
9722
|
-
*
|
|
9723
|
-
*
|
|
9724
|
-
* @
|
|
10093
|
+
* {@link DeleteActivityReplyVariables} contains variables for the {@link DeleteActivityReplyMutation} operation.
|
|
10094
|
+
*
|
|
10095
|
+
* See the {@link DeleteActivityReplyMutation} operation and {@link DeleteResult} for the response shape.
|
|
10096
|
+
*
|
|
10097
|
+
* Values are validated before dispatch.
|
|
10098
|
+
*
|
|
10099
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
9725
10100
|
*/
|
|
9726
10101
|
interface DeleteActivityReplyVariables {
|
|
9727
10102
|
/**
|
|
@@ -9731,9 +10106,13 @@ interface DeleteActivityReplyVariables {
|
|
|
9731
10106
|
}
|
|
9732
10107
|
|
|
9733
10108
|
/**
|
|
9734
|
-
*
|
|
9735
|
-
*
|
|
9736
|
-
* @
|
|
10109
|
+
* {@link ToggleLikeVariables} contains variables for the {@link ToggleLikeMutation} operation.
|
|
10110
|
+
*
|
|
10111
|
+
* See {@link ToggleLikeMutation} and {@link BasicUser} for the operation and response shape.
|
|
10112
|
+
*
|
|
10113
|
+
* Values are validated before dispatch.
|
|
10114
|
+
*
|
|
10115
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
9737
10116
|
*/
|
|
9738
10117
|
interface ToggleLikeVariables {
|
|
9739
10118
|
/**
|
|
@@ -9747,9 +10126,13 @@ interface ToggleLikeVariables {
|
|
|
9747
10126
|
}
|
|
9748
10127
|
|
|
9749
10128
|
/**
|
|
9750
|
-
*
|
|
9751
|
-
*
|
|
9752
|
-
* @
|
|
10129
|
+
* {@link ToggleFollowVariables} contains variables for the {@link ToggleFollowMutation} operation.
|
|
10130
|
+
*
|
|
10131
|
+
* See the {@link ToggleFollowMutation} operation and {@link UserResponse} for the response shape.
|
|
10132
|
+
*
|
|
10133
|
+
* Values are validated before dispatch.
|
|
10134
|
+
*
|
|
10135
|
+
* @see https://docs.anilist.co/reference/object/user
|
|
9753
10136
|
*/
|
|
9754
10137
|
interface ToggleFollowVariables {
|
|
9755
10138
|
/**
|
|
@@ -10062,9 +10445,13 @@ interface Favourites {
|
|
|
10062
10445
|
}
|
|
10063
10446
|
|
|
10064
10447
|
/**
|
|
10065
|
-
*
|
|
10066
|
-
*
|
|
10067
|
-
* @
|
|
10448
|
+
* {@link ToggleFavouriteVariables} contains variables for the {@link ToggleFavouriteMutation} operation.
|
|
10449
|
+
*
|
|
10450
|
+
* See the {@link ToggleFavouriteMutation} operation and {@link Favourites} for the response shape.
|
|
10451
|
+
*
|
|
10452
|
+
* Values are validated before dispatch.
|
|
10453
|
+
*
|
|
10454
|
+
* @see https://docs.anilist.co/reference/object/favourites
|
|
10068
10455
|
*/
|
|
10069
10456
|
interface ToggleFavouriteVariables {
|
|
10070
10457
|
/**
|
|
@@ -10090,8 +10477,13 @@ interface ToggleFavouriteVariables {
|
|
|
10090
10477
|
}
|
|
10091
10478
|
|
|
10092
10479
|
/**
|
|
10093
|
-
*
|
|
10094
|
-
*
|
|
10480
|
+
* {@link UpdateFavouriteOrderVariables} contains variables for the {@link UpdateFavouriteOrderMutation} operation.
|
|
10481
|
+
*
|
|
10482
|
+
* See {@link UpdateFavouriteOrderMutation} and {@link Favourites} for the operation and response shape.
|
|
10483
|
+
*
|
|
10484
|
+
* Values are validated before dispatch.
|
|
10485
|
+
*
|
|
10486
|
+
* @see https://docs.anilist.co/reference/object/favourites
|
|
10095
10487
|
*/
|
|
10096
10488
|
interface UpdateFavouriteOrderVariables {
|
|
10097
10489
|
/**
|
|
@@ -10137,9 +10529,13 @@ interface UpdateFavouriteOrderVariables {
|
|
|
10137
10529
|
}
|
|
10138
10530
|
|
|
10139
10531
|
/**
|
|
10140
|
-
*
|
|
10141
|
-
*
|
|
10142
|
-
* @
|
|
10532
|
+
* {@link SaveReviewVariables} contains variables for the {@link SaveReviewMutation} operation.
|
|
10533
|
+
*
|
|
10534
|
+
* See the {@link SaveReviewMutation} operation and {@link ReviewResponse} for the response shape.
|
|
10535
|
+
*
|
|
10536
|
+
* Values are validated before dispatch.
|
|
10537
|
+
*
|
|
10538
|
+
* @see https://docs.anilist.co/reference/object/review
|
|
10143
10539
|
*/
|
|
10144
10540
|
interface SaveReviewVariables {
|
|
10145
10541
|
/**
|
|
@@ -10173,16 +10569,20 @@ interface SaveReviewVariables {
|
|
|
10173
10569
|
}
|
|
10174
10570
|
|
|
10175
10571
|
/**
|
|
10176
|
-
*
|
|
10572
|
+
* {@link ReviewRating} is a type representing the rating of a review.
|
|
10177
10573
|
* It can be one of the following: 'NO_VOTE', 'UP_VOTE', 'DOWN_VOTE'.
|
|
10178
10574
|
* @see https://docs.anilist.co/reference/enum/reviewrating
|
|
10179
10575
|
*/
|
|
10180
10576
|
type ReviewRating = "NO_VOTE" | "UP_VOTE" | "DOWN_VOTE";
|
|
10181
10577
|
|
|
10182
10578
|
/**
|
|
10183
|
-
*
|
|
10184
|
-
*
|
|
10185
|
-
* @
|
|
10579
|
+
* {@link RateReviewVariables} contains variables for the {@link RateReviewMutation} operation.
|
|
10580
|
+
*
|
|
10581
|
+
* See the {@link RateReviewMutation} operation and {@link ReviewResponse} for the response shape.
|
|
10582
|
+
*
|
|
10583
|
+
* Values are validated before dispatch.
|
|
10584
|
+
*
|
|
10585
|
+
* @see https://docs.anilist.co/reference/object/review
|
|
10186
10586
|
*/
|
|
10187
10587
|
interface RateReviewVariables {
|
|
10188
10588
|
/**
|
|
@@ -10190,15 +10590,19 @@ interface RateReviewVariables {
|
|
|
10190
10590
|
*/
|
|
10191
10591
|
reviewId: number;
|
|
10192
10592
|
/**
|
|
10193
|
-
* `rating` is a
|
|
10593
|
+
* `rating` is a {@link ReviewRating} representing the vote to apply to the review.
|
|
10194
10594
|
*/
|
|
10195
10595
|
rating: ReviewRating;
|
|
10196
10596
|
}
|
|
10197
10597
|
|
|
10198
10598
|
/**
|
|
10199
|
-
*
|
|
10200
|
-
*
|
|
10201
|
-
* @
|
|
10599
|
+
* {@link DeleteReviewVariables} contains variables for the {@link DeleteReviewMutation} operation.
|
|
10600
|
+
*
|
|
10601
|
+
* See the {@link DeleteReviewMutation} operation and {@link DeleteResult} for the response shape.
|
|
10602
|
+
*
|
|
10603
|
+
* Values are validated before dispatch.
|
|
10604
|
+
*
|
|
10605
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
10202
10606
|
*/
|
|
10203
10607
|
interface DeleteReviewVariables {
|
|
10204
10608
|
/**
|
|
@@ -10208,16 +10612,20 @@ interface DeleteReviewVariables {
|
|
|
10208
10612
|
}
|
|
10209
10613
|
|
|
10210
10614
|
/**
|
|
10211
|
-
*
|
|
10615
|
+
* {@link RecommendationRating} is a type representing the rating of a recommendation.
|
|
10212
10616
|
* It can be one of the following: 'NO_RATING', 'RATE_UP', 'RATE_DOWN'.
|
|
10213
10617
|
* @see https://docs.anilist.co/reference/enum/recommendationrating
|
|
10214
10618
|
*/
|
|
10215
10619
|
type RecommendationRating = "NO_RATING" | "RATE_UP" | "RATE_DOWN";
|
|
10216
10620
|
|
|
10217
10621
|
/**
|
|
10218
|
-
*
|
|
10219
|
-
*
|
|
10220
|
-
* @
|
|
10622
|
+
* {@link SaveRecommendationVariables} contains variables for the {@link SaveRecommendationMutation} operation.
|
|
10623
|
+
*
|
|
10624
|
+
* See the {@link SaveRecommendationMutation} operation and {@link RecommendationResponse} for the response shape.
|
|
10625
|
+
*
|
|
10626
|
+
* Values are validated before dispatch.
|
|
10627
|
+
*
|
|
10628
|
+
* @see https://docs.anilist.co/reference/object/recommendation
|
|
10221
10629
|
*/
|
|
10222
10630
|
interface SaveRecommendationVariables {
|
|
10223
10631
|
/**
|
|
@@ -10239,9 +10647,13 @@ interface SaveRecommendationVariables {
|
|
|
10239
10647
|
}
|
|
10240
10648
|
|
|
10241
10649
|
/**
|
|
10242
|
-
*
|
|
10243
|
-
*
|
|
10244
|
-
* @
|
|
10650
|
+
* {@link SaveThreadVariables} contains variables for the {@link SaveThreadMutation} operation.
|
|
10651
|
+
*
|
|
10652
|
+
* See the {@link SaveThreadMutation} operation and {@link ThreadResponse} for the response shape.
|
|
10653
|
+
*
|
|
10654
|
+
* Values are validated before dispatch.
|
|
10655
|
+
*
|
|
10656
|
+
* @see https://docs.anilist.co/reference/object/thread
|
|
10245
10657
|
*/
|
|
10246
10658
|
interface SaveThreadVariables {
|
|
10247
10659
|
/**
|
|
@@ -10279,9 +10691,13 @@ interface SaveThreadVariables {
|
|
|
10279
10691
|
}
|
|
10280
10692
|
|
|
10281
10693
|
/**
|
|
10282
|
-
*
|
|
10283
|
-
*
|
|
10284
|
-
* @
|
|
10694
|
+
* {@link DeleteThreadVariables} contains variables for the {@link DeleteThreadMutation} operation.
|
|
10695
|
+
*
|
|
10696
|
+
* See the {@link DeleteThreadMutation} operation and {@link DeleteResult} for the response shape.
|
|
10697
|
+
*
|
|
10698
|
+
* Values are validated before dispatch.
|
|
10699
|
+
*
|
|
10700
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
10285
10701
|
*/
|
|
10286
10702
|
interface DeleteThreadVariables {
|
|
10287
10703
|
/**
|
|
@@ -10291,9 +10707,13 @@ interface DeleteThreadVariables {
|
|
|
10291
10707
|
}
|
|
10292
10708
|
|
|
10293
10709
|
/**
|
|
10294
|
-
*
|
|
10295
|
-
*
|
|
10296
|
-
* @
|
|
10710
|
+
* {@link ToggleThreadSubscriptionVariables} contains variables for the {@link ToggleThreadSubscriptionMutation} operation.
|
|
10711
|
+
*
|
|
10712
|
+
* See {@link ToggleThreadSubscriptionMutation} and {@link ThreadResponse} for the operation and response shape.
|
|
10713
|
+
*
|
|
10714
|
+
* Values are validated before dispatch.
|
|
10715
|
+
*
|
|
10716
|
+
* @see https://docs.anilist.co/reference/object/thread
|
|
10297
10717
|
*/
|
|
10298
10718
|
interface ToggleThreadSubscriptionVariables {
|
|
10299
10719
|
/**
|
|
@@ -10311,9 +10731,13 @@ interface ToggleThreadSubscriptionVariables {
|
|
|
10311
10731
|
}
|
|
10312
10732
|
|
|
10313
10733
|
/**
|
|
10314
|
-
*
|
|
10315
|
-
*
|
|
10316
|
-
* @
|
|
10734
|
+
* {@link SaveThreadCommentVariables} contains variables for the {@link SaveThreadCommentMutation} operation.
|
|
10735
|
+
*
|
|
10736
|
+
* See the {@link SaveThreadCommentMutation} operation and {@link ThreadCommentResponse} for the response shape.
|
|
10737
|
+
*
|
|
10738
|
+
* Values are validated before dispatch.
|
|
10739
|
+
*
|
|
10740
|
+
* @see https://docs.anilist.co/reference/object/threadcomment
|
|
10317
10741
|
*/
|
|
10318
10742
|
interface SaveThreadCommentVariables {
|
|
10319
10743
|
/**
|
|
@@ -10343,9 +10767,13 @@ interface SaveThreadCommentVariables {
|
|
|
10343
10767
|
}
|
|
10344
10768
|
|
|
10345
10769
|
/**
|
|
10346
|
-
*
|
|
10347
|
-
*
|
|
10348
|
-
* @
|
|
10770
|
+
* {@link DeleteThreadCommentVariables} contains variables for the {@link DeleteThreadCommentMutation} operation.
|
|
10771
|
+
*
|
|
10772
|
+
* See the {@link DeleteThreadCommentMutation} operation and {@link DeleteResult} for the response shape.
|
|
10773
|
+
*
|
|
10774
|
+
* Values are validated before dispatch.
|
|
10775
|
+
*
|
|
10776
|
+
* @see https://docs.anilist.co/reference/object/deleted
|
|
10349
10777
|
*/
|
|
10350
10778
|
interface DeleteThreadCommentVariables {
|
|
10351
10779
|
/**
|
|
@@ -10355,8 +10783,11 @@ interface DeleteThreadCommentVariables {
|
|
|
10355
10783
|
}
|
|
10356
10784
|
|
|
10357
10785
|
/**
|
|
10358
|
-
*
|
|
10359
|
-
*
|
|
10786
|
+
* {@link UpdateAniChartSettingsVariables} contains variables for the {@link UpdateAniChartSettingsMutation} operation.
|
|
10787
|
+
*
|
|
10788
|
+
* See {@link UpdateAniChartSettingsMutation} for the operation. The mutation returns the updated AniChart settings string.
|
|
10789
|
+
*
|
|
10790
|
+
* @see https://docs.anilist.co/reference/object/anichartuser
|
|
10360
10791
|
*/
|
|
10361
10792
|
interface UpdateAniChartSettingsVariables {
|
|
10362
10793
|
/**
|
|
@@ -10378,8 +10809,11 @@ interface UpdateAniChartSettingsVariables {
|
|
|
10378
10809
|
}
|
|
10379
10810
|
|
|
10380
10811
|
/**
|
|
10381
|
-
*
|
|
10382
|
-
*
|
|
10812
|
+
* {@link UpdateAniChartHighlightsVariables} contains variables for the {@link UpdateAniChartHighlightsMutation} operation.
|
|
10813
|
+
*
|
|
10814
|
+
* See {@link UpdateAniChartHighlightsMutation} for the operation. The mutation returns the updated AniChart highlights string.
|
|
10815
|
+
*
|
|
10816
|
+
* @see https://docs.anilist.co/reference/object/anichartuser
|
|
10383
10817
|
*/
|
|
10384
10818
|
interface UpdateAniChartHighlightsVariables {
|
|
10385
10819
|
/**
|
|
@@ -10401,48 +10835,55 @@ interface UpdateAniChartHighlightsVariables {
|
|
|
10401
10835
|
* The `mutation` member of the `AniListApi` type.
|
|
10402
10836
|
*/
|
|
10403
10837
|
|
|
10838
|
+
/**
|
|
10839
|
+
* Typed AniList mutation operations exposed by `AniListApi`.
|
|
10840
|
+
*
|
|
10841
|
+
* @see https://docs.anilist.co/reference/mutation
|
|
10842
|
+
*/
|
|
10404
10843
|
type AniListMutations = {
|
|
10405
10844
|
/**
|
|
10406
|
-
* Mutation methods for updating data on the
|
|
10845
|
+
* Mutation methods for updating data on the AniList API.
|
|
10407
10846
|
* @public
|
|
10408
10847
|
* @type {Object}
|
|
10409
|
-
* @property {Function} updateUser - Updates a user on the
|
|
10410
|
-
* @property {Function} saveMediaListEntry - Saves a media list entry on the
|
|
10411
|
-
* @property {Function} updateMediaListEntries - Updates media list entries on the
|
|
10412
|
-
* @property {Function} deleteMediaListEntry - Deletes a media list entry on the
|
|
10413
|
-
* @property {Function} deleteCustomList - Deletes a custom list on the
|
|
10414
|
-
* @property {Function} saveTextActivity - Saves a text activity on the
|
|
10415
|
-
* @property {Function} saveMessageActivity - Saves a message activity on the
|
|
10416
|
-
* @property {Function} saveListActivity - Saves a list activity on the
|
|
10417
|
-
* @property {Function} deleteActivity - Deletes an activity on the
|
|
10418
|
-
* @property {Function} toggleActivityPin - Toggles an activity's pin status on the
|
|
10419
|
-
* @property {Function} toggleActivitySubscription - Toggles an activity's subscription status on the
|
|
10420
|
-
* @property {Function} saveActivityReply - Saves an activity reply on the
|
|
10421
|
-
* @property {Function} deleteActivityReply - Deletes an activity reply on the
|
|
10422
|
-
* @property {Function} toggleLike - Toggles a like on the
|
|
10423
|
-
* @property {Function} toggleLikeV2 - Toggles a like on the
|
|
10424
|
-
* @property {Function} toggleFollow - Toggles a follow on the
|
|
10425
|
-
* @property {Function} toggleFavourite - Toggles a
|
|
10426
|
-
* @property {Function} updateFavouriteOrder - Updates a
|
|
10427
|
-
* @property {Function} saveReview - Saves a review on the
|
|
10428
|
-
* @property {Function} rateReview - Rates a review on the
|
|
10429
|
-
* @property {Function} deleteReview - Deletes a review on the
|
|
10430
|
-
* @property {Function} saveRecommendation - Saves a recommendation on the
|
|
10431
|
-
* @property {Function} saveThread - Saves a thread on the
|
|
10432
|
-
* @property {Function} deleteThread - Deletes a thread on the
|
|
10433
|
-
* @property {Function} toggleThreadSubscription - Toggles a thread's subscription status on the
|
|
10434
|
-
* @property {Function} saveThreadComment - Saves a thread comment on the
|
|
10435
|
-
* @property {Function} deleteThreadComment - Deletes a thread comment on the
|
|
10436
|
-
* @property {Function} updateAniChartSettings - Updates
|
|
10437
|
-
* @property {Function} updateAniChartHighlights - Updates
|
|
10848
|
+
* @property {Function} updateUser - Updates a user on the AniList API.
|
|
10849
|
+
* @property {Function} saveMediaListEntry - Saves a media list entry on the AniList API.
|
|
10850
|
+
* @property {Function} updateMediaListEntries - Updates media list entries on the AniList API.
|
|
10851
|
+
* @property {Function} deleteMediaListEntry - Deletes a media list entry on the AniList API.
|
|
10852
|
+
* @property {Function} deleteCustomList - Deletes a custom list on the AniList API.
|
|
10853
|
+
* @property {Function} saveTextActivity - Saves a text activity on the AniList API.
|
|
10854
|
+
* @property {Function} saveMessageActivity - Saves a message activity on the AniList API.
|
|
10855
|
+
* @property {Function} saveListActivity - Saves a list activity on the AniList API.
|
|
10856
|
+
* @property {Function} deleteActivity - Deletes an activity on the AniList API.
|
|
10857
|
+
* @property {Function} toggleActivityPin - Toggles an activity's pin status on the AniList API.
|
|
10858
|
+
* @property {Function} toggleActivitySubscription - Toggles an activity's subscription status on the AniList API.
|
|
10859
|
+
* @property {Function} saveActivityReply - Saves an activity reply on the AniList API.
|
|
10860
|
+
* @property {Function} deleteActivityReply - Deletes an activity reply on the AniList API.
|
|
10861
|
+
* @property {Function} toggleLike - Toggles a like on the AniList API.
|
|
10862
|
+
* @property {Function} toggleLikeV2 - Toggles a like on the AniList API.
|
|
10863
|
+
* @property {Function} toggleFollow - Toggles a follow on the AniList API.
|
|
10864
|
+
* @property {Function} toggleFavourite - Toggles a favourite on the AniList API.
|
|
10865
|
+
* @property {Function} updateFavouriteOrder - Updates a favourite order on the AniList API.
|
|
10866
|
+
* @property {Function} saveReview - Saves a review on the AniList API.
|
|
10867
|
+
* @property {Function} rateReview - Rates a review on the AniList API.
|
|
10868
|
+
* @property {Function} deleteReview - Deletes a review on the AniList API.
|
|
10869
|
+
* @property {Function} saveRecommendation - Saves a recommendation on the AniList API.
|
|
10870
|
+
* @property {Function} saveThread - Saves a thread on the AniList API.
|
|
10871
|
+
* @property {Function} deleteThread - Deletes a thread on the AniList API.
|
|
10872
|
+
* @property {Function} toggleThreadSubscription - Toggles a thread's subscription status on the AniList API.
|
|
10873
|
+
* @property {Function} saveThreadComment - Saves a thread comment on the AniList API.
|
|
10874
|
+
* @property {Function} deleteThreadComment - Deletes a thread comment on the AniList API.
|
|
10875
|
+
* @property {Function} updateAniChartSettings - Updates AniChart settings on the AniList API.
|
|
10876
|
+
* @property {Function} updateAniChartHighlights - Updates AniChart highlights on the AniList API.
|
|
10438
10877
|
*
|
|
10439
10878
|
* Must be authenticated for all mutations.
|
|
10440
10879
|
*/
|
|
10441
10880
|
mutation: {
|
|
10442
10881
|
/**
|
|
10443
|
-
*
|
|
10444
|
-
* @param {UpdateUserVariables} variables - The
|
|
10445
|
-
* @
|
|
10882
|
+
* `UpdateUserMutation` updates a user on the AniList API.
|
|
10883
|
+
* @param {UpdateUserVariables} variables - The {@link UpdateUserVariables} for the mutation.
|
|
10884
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10885
|
+
* @returns {Promise<UpdateUserResponse>} A promise that resolves to the {@link UpdateUserResponse} data.
|
|
10886
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10446
10887
|
*
|
|
10447
10888
|
* @example
|
|
10448
10889
|
* ```typescript
|
|
@@ -10466,26 +10907,28 @@ type AniListMutations = {
|
|
|
10466
10907
|
* });
|
|
10467
10908
|
* ```
|
|
10468
10909
|
* @see https://docs.anilist.co/reference/object/user
|
|
10469
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10470
10910
|
*/
|
|
10471
10911
|
updateUser: (variables: UpdateUserVariables, options?: RequestOptions) => Promise<UpdateUserResponse>;
|
|
10472
10912
|
/**
|
|
10473
|
-
*
|
|
10474
|
-
* @param {SaveMediaListEntryVariables} variables - The
|
|
10475
|
-
* @
|
|
10913
|
+
* `SaveMediaListEntryMutation` saves a media list entry on the AniList API.
|
|
10914
|
+
* @param {SaveMediaListEntryVariables} variables - The {@link SaveMediaListEntryVariables} for the mutation.
|
|
10915
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10916
|
+
* @returns {Promise<MediaListResponse>} A promise that resolves to the {@link MediaListResponse} data.
|
|
10917
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10476
10918
|
*
|
|
10477
10919
|
* @example
|
|
10478
10920
|
* ```typescript
|
|
10479
10921
|
* await aniLink.anilist.mutation.saveMediaListEntry({mediaId: 1, status: 'COMPLETED'});
|
|
10480
10922
|
* ```
|
|
10481
10923
|
* @see https://docs.anilist.co/reference/object/medialist
|
|
10482
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10483
10924
|
*/
|
|
10484
10925
|
saveMediaListEntry: (variables: SaveMediaListEntryVariables, options?: RequestOptions) => Promise<MediaListResponse>;
|
|
10485
10926
|
/**
|
|
10486
|
-
*
|
|
10487
|
-
* @param {UpdateMediaListEntriesVariables} variables - The
|
|
10488
|
-
* @
|
|
10927
|
+
* `UpdateMediaListEntriesMutation` updates media list entries on the AniList API.
|
|
10928
|
+
* @param {UpdateMediaListEntriesVariables} variables - The {@link UpdateMediaListEntriesVariables} for the mutation.
|
|
10929
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10930
|
+
* @returns {Promise<MediaListResponse[]>} A promise that resolves to the {@link MediaListResponse} entries.
|
|
10931
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10489
10932
|
*
|
|
10490
10933
|
* @example
|
|
10491
10934
|
* ```typescript
|
|
@@ -10497,13 +10940,14 @@ type AniListMutations = {
|
|
|
10497
10940
|
* });
|
|
10498
10941
|
* ```
|
|
10499
10942
|
* @see https://docs.anilist.co/reference/object/medialist
|
|
10500
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10501
10943
|
*/
|
|
10502
10944
|
updateMediaListEntries: (variables: UpdateMediaListEntriesVariables, options?: RequestOptions) => Promise<MediaListResponse[]>;
|
|
10503
10945
|
/**
|
|
10504
|
-
*
|
|
10505
|
-
* @param {DeleteMediaListEntryVariables} variables - The
|
|
10506
|
-
* @
|
|
10946
|
+
* `DeleteMediaListEntryMutation` deletes a media list entry on the AniList API.
|
|
10947
|
+
* @param {DeleteMediaListEntryVariables} variables - The {@link DeleteMediaListEntryVariables} for the mutation.
|
|
10948
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10949
|
+
* @returns {Promise<DeleteMediaListEntryResponse>} A promise that resolves to the {@link DeleteMediaListEntryResponse} result.
|
|
10950
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10507
10951
|
*
|
|
10508
10952
|
* @example
|
|
10509
10953
|
* You cannot delete a media list entry without first fetching the entry's id. The entry's id is not the same as the mediaId. It is specific to each user and media.
|
|
@@ -10511,344 +10955,409 @@ type AniListMutations = {
|
|
|
10511
10955
|
* await aniLink.anilist.mutation.deleteMediaListEntry({id: 1});
|
|
10512
10956
|
* ```
|
|
10513
10957
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10514
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10515
10958
|
*/
|
|
10516
10959
|
deleteMediaListEntry: (variables: DeleteMediaListEntryVariables, options?: RequestOptions) => Promise<DeleteMediaListEntryResponse>;
|
|
10517
10960
|
/**
|
|
10518
|
-
*
|
|
10519
|
-
* @param {DeleteCustomListVariables} variables - The
|
|
10520
|
-
* @
|
|
10961
|
+
* `DeleteCustomListMutation` deletes a custom list on the AniList API. There is no mutation specifically for creating a custom list; create one through `UpdateUserMutation` under the `animeListOptions` or `mangaListOptions` variables.
|
|
10962
|
+
* @param {DeleteCustomListVariables} variables - The {@link DeleteCustomListVariables} for the mutation.
|
|
10963
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10964
|
+
* @returns {Promise<DeleteResult>} A promise that resolves to `{ deleted }`, where `deleted` is `true` when the custom list was deleted by this call and `false` when it was already absent.
|
|
10965
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10521
10966
|
*
|
|
10522
10967
|
* @example
|
|
10523
10968
|
* ```typescript
|
|
10524
|
-
* await aniLink.anilist.mutation.
|
|
10969
|
+
* await aniLink.anilist.mutation.deleteCustomList({customList: 'test', type: 'ANIME'});
|
|
10525
10970
|
* ```
|
|
10526
10971
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10527
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10528
10972
|
*/
|
|
10529
10973
|
deleteCustomList: (variables: DeleteCustomListVariables, options?: RequestOptions) => Promise<DeleteResult>;
|
|
10530
10974
|
/**
|
|
10531
|
-
*
|
|
10532
|
-
* @param {SaveTextActivityVariables} variables - The
|
|
10533
|
-
* @
|
|
10975
|
+
* `SaveTextActivityMutation` saves a text activity on the AniList API.
|
|
10976
|
+
* @param {SaveTextActivityVariables} variables - The {@link SaveTextActivityVariables} for the mutation.
|
|
10977
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10978
|
+
* @returns {Promise<Activity>} A promise that resolves to the saved {@link Activity}.
|
|
10979
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10534
10980
|
*
|
|
10535
10981
|
* @example
|
|
10536
10982
|
* ```typescript
|
|
10537
|
-
* await aniLink.anilist.mutation.saveTextActivity({text: 'Hello, world!'});
|
|
10983
|
+
* await aniLink.anilist.mutation.saveTextActivity({id: 1, text: 'Hello, world!'});
|
|
10538
10984
|
* ```
|
|
10539
10985
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
10540
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10541
10986
|
*/
|
|
10542
10987
|
saveTextActivity: (variables: SaveTextActivityVariables, options?: RequestOptions) => Promise<Activity>;
|
|
10543
10988
|
/**
|
|
10544
|
-
*
|
|
10545
|
-
* @param {SaveMessageActivityVariables} variables - The
|
|
10546
|
-
* @
|
|
10989
|
+
* `SaveMessageActivityMutation` saves a message activity on the AniList API.
|
|
10990
|
+
* @param {SaveMessageActivityVariables} variables - The {@link SaveMessageActivityVariables} for the mutation.
|
|
10991
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10992
|
+
* @returns {Promise<Activity>} A promise that resolves to the saved {@link Activity}.
|
|
10993
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10547
10994
|
*
|
|
10548
10995
|
* @example
|
|
10549
10996
|
* ```typescript
|
|
10550
|
-
* await aniLink.anilist.mutation.saveMessageActivity({
|
|
10997
|
+
* await aniLink.anilist.mutation.saveMessageActivity({id: 1, message: 'Hello, world!'});
|
|
10551
10998
|
* ```
|
|
10552
10999
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
10553
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10554
11000
|
*/
|
|
10555
11001
|
saveMessageActivity: (variables: SaveMessageActivityVariables, options?: RequestOptions) => Promise<Activity>;
|
|
10556
11002
|
/**
|
|
10557
|
-
*
|
|
11003
|
+
* `SaveListActivityMutation` saves a list activity on the AniList API.
|
|
10558
11004
|
* Mod Only
|
|
10559
|
-
* @param {SaveListActivityVariables} variables - The
|
|
10560
|
-
* @
|
|
11005
|
+
* @param {SaveListActivityVariables} variables - The {@link SaveListActivityVariables} for the mutation.
|
|
11006
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11007
|
+
* @returns {Promise<Activity>} A promise that resolves to the saved {@link Activity}.
|
|
11008
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10561
11009
|
*
|
|
10562
11010
|
* @example
|
|
10563
11011
|
* ```typescript
|
|
10564
11012
|
* await aniLink.anilist.mutation.saveListActivity({id: 1});
|
|
10565
11013
|
* ```
|
|
10566
11014
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
10567
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10568
11015
|
*/
|
|
10569
11016
|
saveListActivity: (variables: SaveListActivityVariables, options?: RequestOptions) => Promise<Activity>;
|
|
10570
11017
|
/**
|
|
10571
|
-
*
|
|
11018
|
+
* `DeleteActivityMutation` deletes an activity on the AniList API.
|
|
10572
11019
|
* Mod Only
|
|
10573
|
-
* @param {DeleteActivityVariables} variables - The
|
|
10574
|
-
* @
|
|
11020
|
+
* @param {DeleteActivityVariables} variables - The {@link DeleteActivityVariables} for the mutation.
|
|
11021
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11022
|
+
* @returns {Promise<DeleteResult>} A promise that resolves to `{ deleted }`, where `deleted` is `true` when the activity was deleted by this call and `false` when it was already absent.
|
|
11023
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10575
11024
|
*
|
|
10576
11025
|
* @example
|
|
10577
11026
|
* ```typescript
|
|
10578
11027
|
* await aniLink.anilist.mutation.deleteActivity({id: 1});
|
|
10579
11028
|
* ```
|
|
10580
11029
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10581
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10582
11030
|
*/
|
|
10583
11031
|
deleteActivity: (variables: DeleteActivityVariables, options?: RequestOptions) => Promise<DeleteResult>;
|
|
10584
11032
|
/**
|
|
10585
|
-
*
|
|
11033
|
+
* `ToggleActivityPinMutation` toggles the pin status of an activity on the AniList API.
|
|
10586
11034
|
*
|
|
10587
|
-
* @param {ToggleActivityPinVariables} variables - The
|
|
10588
|
-
* @
|
|
11035
|
+
* @param {ToggleActivityPinVariables} variables - The {@link ToggleActivityPinVariables} for the mutation.
|
|
11036
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11037
|
+
* @returns {Promise<Activity>} A promise that resolves to the updated {@link Activity}.
|
|
11038
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10589
11039
|
*
|
|
10590
11040
|
* @example
|
|
10591
11041
|
* ```typescript
|
|
10592
11042
|
* await aniLink.anilist.mutation.toggleActivityPin({id: 1, pinned: true});
|
|
10593
11043
|
* ```
|
|
10594
11044
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
10595
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10596
11045
|
*/
|
|
10597
11046
|
toggleActivityPin: (variables: ToggleActivityPinVariables, options?: RequestOptions) => Promise<Activity>;
|
|
10598
11047
|
/**
|
|
10599
|
-
*
|
|
11048
|
+
* `ToggleActivitySubscriptionMutation` toggles the subscription status of an activity on the AniList API.
|
|
10600
11049
|
*
|
|
10601
|
-
* @param {ToggleActivitySubscriptionVariables} variables - The
|
|
10602
|
-
* @
|
|
11050
|
+
* @param {ToggleActivitySubscriptionVariables} variables - The {@link ToggleActivitySubscriptionVariables} for the mutation.
|
|
11051
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11052
|
+
* @returns {Promise<Activity>} A promise that resolves to the updated {@link Activity}.
|
|
11053
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10603
11054
|
*
|
|
10604
11055
|
* @example
|
|
10605
11056
|
* ```typescript
|
|
10606
11057
|
* await aniLink.anilist.mutation.toggleActivitySubscription({activityId: 1, subscribe: true});
|
|
10607
11058
|
* ```
|
|
10608
11059
|
* @see https://docs.anilist.co/reference/union/activityunion
|
|
10609
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10610
11060
|
*/
|
|
10611
11061
|
toggleActivitySubscription: (variables: ToggleActivitySubscriptionVariables, options?: RequestOptions) => Promise<Activity>;
|
|
10612
11062
|
/**
|
|
10613
|
-
*
|
|
10614
|
-
* @param {SaveActivityReplyVariables} variables - The
|
|
10615
|
-
* @
|
|
11063
|
+
* `SaveActivityReplyMutation` saves an activity reply on the AniList API.
|
|
11064
|
+
* @param {SaveActivityReplyVariables} variables - The {@link SaveActivityReplyVariables} for the mutation.
|
|
11065
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11066
|
+
* @returns {Promise<ActivityReply>} A promise that resolves to the saved {@link ActivityReply}.
|
|
11067
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10616
11068
|
*
|
|
10617
11069
|
* @example
|
|
10618
11070
|
* ```typescript
|
|
10619
|
-
* await aniLink.anilist.mutation.saveActivityReply({
|
|
11071
|
+
* await aniLink.anilist.mutation.saveActivityReply({id: 1, activityId: 2, text: 'Hello, world!'});
|
|
10620
11072
|
* ```
|
|
10621
11073
|
* @see https://docs.anilist.co/reference/object/activityreply
|
|
10622
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10623
11074
|
*/
|
|
10624
11075
|
saveActivityReply: (variables: SaveActivityReplyVariables, options?: RequestOptions) => Promise<ActivityReply>;
|
|
10625
11076
|
/**
|
|
10626
|
-
*
|
|
10627
|
-
* @param {DeleteActivityReplyVariables} variables - The
|
|
11077
|
+
* `DeleteActivityReplyMutation` deletes an activity reply on the AniList API.
|
|
11078
|
+
* @param {DeleteActivityReplyVariables} variables - The {@link DeleteActivityReplyVariables} for the mutation.
|
|
11079
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10628
11080
|
* @returns {Promise<DeleteResult>} A promise that resolves to `{ deleted }`, where `deleted` is `true` when the reply was deleted by this call and `false` when it was already absent.
|
|
11081
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10629
11082
|
*
|
|
10630
11083
|
* @example
|
|
10631
11084
|
* ```typescript
|
|
10632
11085
|
* await aniLink.anilist.mutation.deleteActivityReply({id: 1});
|
|
10633
11086
|
* ```
|
|
10634
11087
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10635
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10636
11088
|
*/
|
|
10637
11089
|
deleteActivityReply: (variables: DeleteActivityReplyVariables, options?: RequestOptions) => Promise<DeleteResult>;
|
|
10638
11090
|
/**
|
|
10639
|
-
*
|
|
10640
|
-
* @param {ToggleLikeVariables} variables - The
|
|
10641
|
-
* @
|
|
11091
|
+
* `ToggleLikeMutation` toggles a like on the AniList API.
|
|
11092
|
+
* @param {ToggleLikeVariables} variables - The {@link ToggleLikeVariables} for the mutation.
|
|
11093
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11094
|
+
* @returns {Promise<BasicUser>} A promise that resolves to the {@link BasicUser} who performed the like toggle.
|
|
11095
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
11096
|
+
* @deprecated Use `toggleLikeV2` instead, which returns the richer {@link Likeable} union (activity, activity reply, thread, or thread comment) instead of a bare user.
|
|
10642
11097
|
*
|
|
10643
11098
|
* @example
|
|
10644
11099
|
* ```typescript
|
|
10645
11100
|
* await aniLink.anilist.mutation.toggleLike({id: 1, type: 'ACTIVITY'});
|
|
10646
11101
|
* ```
|
|
10647
11102
|
* @see https://docs.anilist.co/reference/object/user
|
|
10648
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10649
11103
|
*/
|
|
10650
11104
|
toggleLike: (variables: ToggleLikeVariables, options?: RequestOptions) => Promise<BasicUser>;
|
|
10651
11105
|
/**
|
|
10652
|
-
*
|
|
11106
|
+
* `ToggleLikeV2Mutation` toggles a like on the AniList API.
|
|
10653
11107
|
* Returns a different response than the `toggleLike` mutation.
|
|
10654
|
-
* @param {ToggleLikeVariables} variables - The
|
|
10655
|
-
* @
|
|
11108
|
+
* @param {ToggleLikeVariables} variables - The {@link ToggleLikeVariables} for the mutation.
|
|
11109
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11110
|
+
* @returns {Promise<Likeable>} A promise that resolves to the liked {@link Likeable} entity: an activity,
|
|
10656
11111
|
* activity reply, thread, or thread comment depending on the likeable type.
|
|
11112
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10657
11113
|
*
|
|
10658
11114
|
* @example
|
|
10659
11115
|
* ```typescript
|
|
10660
11116
|
* await aniLink.anilist.mutation.toggleLikeV2({id: 1, type: 'ACTIVITY'});
|
|
10661
11117
|
* ```
|
|
10662
11118
|
* @see https://docs.anilist.co/reference/union/likeableunion
|
|
10663
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10664
11119
|
*/
|
|
10665
11120
|
toggleLikeV2: (variables: ToggleLikeVariables, options?: RequestOptions) => Promise<Likeable>;
|
|
10666
11121
|
/**
|
|
10667
|
-
*
|
|
10668
|
-
* @param {ToggleFollowVariables} variables - The
|
|
10669
|
-
* @
|
|
11122
|
+
* `ToggleFollowMutation` toggles a follow on the AniList API.
|
|
11123
|
+
* @param {ToggleFollowVariables} variables - The {@link ToggleFollowVariables} for the mutation.
|
|
11124
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11125
|
+
* @returns {Promise<UserResponse>} A promise that resolves to the updated {@link UserResponse}.
|
|
11126
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10670
11127
|
*
|
|
10671
11128
|
* @example
|
|
10672
11129
|
* ```typescript
|
|
10673
11130
|
* await aniLink.anilist.mutation.toggleFollow({userId: 542244});
|
|
10674
11131
|
* ```
|
|
10675
11132
|
* @see https://docs.anilist.co/reference/object/user
|
|
10676
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10677
11133
|
*/
|
|
10678
11134
|
toggleFollow: (variables: ToggleFollowVariables, options?: RequestOptions) => Promise<UserResponse>;
|
|
10679
11135
|
/**
|
|
10680
|
-
*
|
|
10681
|
-
* @param {ToggleFavouriteVariables} variables - The
|
|
10682
|
-
* @
|
|
11136
|
+
* `ToggleFavouriteMutation` toggles a favourite on the AniList API.
|
|
11137
|
+
* @param {ToggleFavouriteVariables} variables - The {@link ToggleFavouriteVariables} for the mutation.
|
|
11138
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11139
|
+
* @returns {Promise<Favourites>} A promise that resolves to the updated {@link Favourites}.
|
|
11140
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10683
11141
|
*
|
|
10684
11142
|
* @example
|
|
10685
11143
|
* ```typescript
|
|
10686
|
-
* await aniLink.anilist.mutation.
|
|
11144
|
+
* await aniLink.anilist.mutation.toggleFavourite({studioId: 561});
|
|
10687
11145
|
* ```
|
|
10688
11146
|
* @see https://docs.anilist.co/reference/object/favourites
|
|
10689
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10690
11147
|
*/
|
|
10691
11148
|
toggleFavourite: (variables: ToggleFavouriteVariables, options?: RequestOptions) => Promise<Favourites>;
|
|
10692
11149
|
/**
|
|
10693
|
-
*
|
|
10694
|
-
* @param {UpdateFavouriteOrderVariables} variables - The
|
|
10695
|
-
* @
|
|
11150
|
+
* `UpdateFavouriteOrderMutation` updates the order of favourites on the AniList API.
|
|
11151
|
+
* @param {UpdateFavouriteOrderVariables} variables - The {@link UpdateFavouriteOrderVariables} for the mutation.
|
|
11152
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11153
|
+
* @returns {Promise<Favourites>} A promise that resolves to the updated {@link Favourites}.
|
|
11154
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10696
11155
|
*
|
|
10697
11156
|
* @example
|
|
10698
11157
|
* ```typescript
|
|
10699
|
-
* await aniLink.anilist.mutation.updateFavouriteOrder({
|
|
11158
|
+
* await aniLink.anilist.mutation.updateFavouriteOrder({
|
|
11159
|
+
* animeIds: [1],
|
|
11160
|
+
* mangaIds: [],
|
|
11161
|
+
* characterIds: [],
|
|
11162
|
+
* staffIds: [],
|
|
11163
|
+
* studioIds: [],
|
|
11164
|
+
* animeOrder: [1],
|
|
11165
|
+
* mangaOrder: [],
|
|
11166
|
+
* characterOrder: [],
|
|
11167
|
+
* staffOrder: [],
|
|
11168
|
+
* studioOrder: [],
|
|
11169
|
+
* });
|
|
10700
11170
|
* ```
|
|
10701
11171
|
* @see https://docs.anilist.co/reference/object/favourites
|
|
10702
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10703
11172
|
*/
|
|
10704
11173
|
updateFavouriteOrder: (variables: UpdateFavouriteOrderVariables, options?: RequestOptions) => Promise<Favourites>;
|
|
10705
11174
|
/**
|
|
10706
|
-
*
|
|
10707
|
-
* @param {SaveReviewVariables} variables - The
|
|
10708
|
-
* @
|
|
11175
|
+
* `SaveReviewMutation` saves a review on the AniList API.
|
|
11176
|
+
* @param {SaveReviewVariables} variables - The {@link SaveReviewVariables} for the mutation.
|
|
11177
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11178
|
+
* @returns {Promise<ReviewResponse>} A promise that resolves to the saved {@link ReviewResponse}.
|
|
11179
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10709
11180
|
*
|
|
10710
11181
|
* @example
|
|
10711
11182
|
* ```typescript
|
|
10712
|
-
* await aniLink.anilist.mutation.saveReview({mediaId: 1, body: 'testing', summary: 'testing', score: 8, private: true});
|
|
11183
|
+
* await aniLink.anilist.mutation.saveReview({id: 1, mediaId: 1, body: 'testing', summary: 'testing', score: 8, private: true});
|
|
10713
11184
|
* ```
|
|
10714
11185
|
* @see https://docs.anilist.co/reference/object/review
|
|
10715
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10716
11186
|
*/
|
|
10717
11187
|
saveReview: (variables: SaveReviewVariables, options?: RequestOptions) => Promise<ReviewResponse>;
|
|
10718
11188
|
/**
|
|
10719
|
-
*
|
|
10720
|
-
* @param {RateReviewVariables} variables - The
|
|
10721
|
-
* @
|
|
11189
|
+
* `RateReviewMutation` rates a review on the AniList API.
|
|
11190
|
+
* @param {RateReviewVariables} variables - The {@link RateReviewVariables} for the mutation.
|
|
11191
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11192
|
+
* @returns {Promise<ReviewResponse>} A promise that resolves to the rated {@link ReviewResponse}.
|
|
11193
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10722
11194
|
*
|
|
10723
11195
|
* @example
|
|
10724
11196
|
* ```typescript
|
|
10725
11197
|
* await aniLink.anilist.mutation.rateReview({reviewId: 8008, rating: 'UP_VOTE'});
|
|
10726
11198
|
* ```
|
|
10727
11199
|
* @see https://docs.anilist.co/reference/object/review
|
|
10728
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10729
11200
|
*/
|
|
10730
11201
|
rateReview: (variables: RateReviewVariables, options?: RequestOptions) => Promise<ReviewResponse>;
|
|
10731
11202
|
/**
|
|
10732
|
-
*
|
|
10733
|
-
* @param {DeleteReviewVariables} variables - The
|
|
11203
|
+
* `DeleteReviewMutation` deletes a review on the AniList API.
|
|
11204
|
+
* @param {DeleteReviewVariables} variables - The {@link DeleteReviewVariables} for the mutation.
|
|
11205
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10734
11206
|
* @returns {Promise<DeleteResult>} A promise that resolves to `{ deleted }`, where `deleted` is `true` when the review was deleted by this call and `false` when it was already absent.
|
|
11207
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10735
11208
|
*
|
|
10736
11209
|
* @example
|
|
10737
11210
|
* ```typescript
|
|
10738
11211
|
* await aniLink.anilist.mutation.deleteReview({id: 1});
|
|
10739
11212
|
* ```
|
|
10740
11213
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10741
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10742
11214
|
*/
|
|
10743
11215
|
deleteReview: (variables: DeleteReviewVariables, options?: RequestOptions) => Promise<DeleteResult>;
|
|
10744
11216
|
/**
|
|
10745
|
-
*
|
|
10746
|
-
* @param {SaveRecommendationVariables} variables - The
|
|
10747
|
-
* @
|
|
11217
|
+
* `SaveRecommendationMutation` saves a recommendation on the AniList API.
|
|
11218
|
+
* @param {SaveRecommendationVariables} variables - The {@link SaveRecommendationVariables} for the mutation.
|
|
11219
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11220
|
+
* @returns {Promise<RecommendationResponse>} A promise that resolves to the saved {@link RecommendationResponse}.
|
|
11221
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10748
11222
|
*
|
|
10749
11223
|
* @example
|
|
10750
11224
|
* ```typescript
|
|
10751
|
-
* await aniLink.anilist.mutation.saveRecommendation({mediaId: 1, mediaRecommendationId: 2, rating:
|
|
11225
|
+
* await aniLink.anilist.mutation.saveRecommendation({mediaId: 1, mediaRecommendationId: 2, rating: 'RATE_UP'});
|
|
10752
11226
|
* ```
|
|
10753
11227
|
* @see https://docs.anilist.co/reference/object/recommendation
|
|
10754
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10755
11228
|
*/
|
|
10756
11229
|
saveRecommendation: (variables: SaveRecommendationVariables, options?: RequestOptions) => Promise<RecommendationResponse>;
|
|
10757
11230
|
/**
|
|
10758
|
-
*
|
|
10759
|
-
* @param {SaveThreadVariables} variables - The
|
|
10760
|
-
* @
|
|
11231
|
+
* `SaveThreadMutation` saves a thread on the AniList API.
|
|
11232
|
+
* @param {SaveThreadVariables} variables - The {@link SaveThreadVariables} for the mutation.
|
|
11233
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11234
|
+
* @returns {Promise<ThreadResponse>} A promise that resolves to the saved {@link ThreadResponse}.
|
|
11235
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10761
11236
|
*
|
|
10762
11237
|
* @example
|
|
10763
11238
|
* ```typescript
|
|
10764
|
-
* await aniLink.anilist.mutation.saveThread({
|
|
11239
|
+
* await aniLink.anilist.mutation.saveThread({
|
|
11240
|
+
* id: 1,
|
|
11241
|
+
* title: 'Hello, world!',
|
|
11242
|
+
* body: 'Hello, world!',
|
|
11243
|
+
* categories: [],
|
|
11244
|
+
* mediaCategories: [],
|
|
11245
|
+
* sticky: false,
|
|
11246
|
+
* locked: false,
|
|
11247
|
+
* asHtml: true,
|
|
11248
|
+
* });
|
|
10765
11249
|
* ```
|
|
10766
11250
|
* @see https://docs.anilist.co/reference/object/thread
|
|
10767
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10768
11251
|
*/
|
|
10769
11252
|
saveThread: (variables: SaveThreadVariables, options?: RequestOptions) => Promise<ThreadResponse>;
|
|
10770
11253
|
/**
|
|
10771
|
-
*
|
|
10772
|
-
* @param {DeleteThreadVariables} variables - The
|
|
11254
|
+
* `DeleteThreadMutation` deletes a thread on the AniList API.
|
|
11255
|
+
* @param {DeleteThreadVariables} variables - The {@link DeleteThreadVariables} for the mutation.
|
|
11256
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10773
11257
|
* @returns {Promise<DeleteResult>} A promise that resolves to `{ deleted }`, where `deleted` is `true` when the thread was deleted by this call and `false` when it was already absent.
|
|
11258
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10774
11259
|
*
|
|
10775
11260
|
* @example
|
|
10776
11261
|
* ```typescript
|
|
10777
11262
|
* await aniLink.anilist.mutation.deleteThread({id: 1});
|
|
10778
11263
|
* ```
|
|
10779
11264
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10780
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10781
11265
|
*/
|
|
10782
11266
|
deleteThread: (variables: DeleteThreadVariables, options?: RequestOptions) => Promise<DeleteResult>;
|
|
10783
11267
|
/**
|
|
10784
|
-
*
|
|
10785
|
-
* @param {ToggleThreadSubscriptionVariables} variables - The
|
|
10786
|
-
* @
|
|
11268
|
+
* `ToggleThreadSubscriptionMutation` toggles a thread subscription on the AniList API.
|
|
11269
|
+
* @param {ToggleThreadSubscriptionVariables} variables - The {@link ToggleThreadSubscriptionVariables} for the mutation.
|
|
11270
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11271
|
+
* @returns {Promise<ThreadResponse>} A promise that resolves to the updated {@link ThreadResponse}.
|
|
11272
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10787
11273
|
*
|
|
10788
11274
|
* @example
|
|
10789
11275
|
* ```typescript
|
|
10790
11276
|
* await aniLink.anilist.mutation.toggleThreadSubscription({threadId: 1, subscribe: true});
|
|
10791
11277
|
* ```
|
|
10792
11278
|
* @see https://docs.anilist.co/reference/object/thread
|
|
10793
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10794
11279
|
*/
|
|
10795
11280
|
toggleThreadSubscription: (variables: ToggleThreadSubscriptionVariables, options?: RequestOptions) => Promise<ThreadResponse>;
|
|
10796
11281
|
/**
|
|
10797
|
-
*
|
|
10798
|
-
* @param {SaveThreadCommentVariables} variables - The
|
|
10799
|
-
* @
|
|
11282
|
+
* `SaveThreadCommentMutation` saves a thread comment on the AniList API.
|
|
11283
|
+
* @param {SaveThreadCommentVariables} variables - The {@link SaveThreadCommentVariables} for the mutation.
|
|
11284
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
11285
|
+
* @returns {Promise<ThreadCommentResponse>} A promise that resolves to the saved {@link ThreadCommentResponse}.
|
|
11286
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10800
11287
|
*
|
|
10801
11288
|
* @example
|
|
10802
11289
|
* ```typescript
|
|
10803
|
-
* await aniLink.anilist.mutation.saveThreadComment({
|
|
11290
|
+
* await aniLink.anilist.mutation.saveThreadComment({
|
|
11291
|
+
* id: 1,
|
|
11292
|
+
* threadId: 1,
|
|
11293
|
+
* parentCommentId: 0,
|
|
11294
|
+
* comment: 'Hello, world!',
|
|
11295
|
+
* locked: false,
|
|
11296
|
+
* asHtml: true,
|
|
11297
|
+
* });
|
|
10804
11298
|
* ```
|
|
10805
11299
|
* @see https://docs.anilist.co/reference/object/threadcomment
|
|
10806
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10807
11300
|
*/
|
|
10808
11301
|
saveThreadComment: (variables: SaveThreadCommentVariables, options?: RequestOptions) => Promise<ThreadCommentResponse>;
|
|
10809
11302
|
/**
|
|
10810
|
-
*
|
|
10811
|
-
* @param {DeleteThreadCommentVariables} variables - The
|
|
11303
|
+
* `DeleteThreadCommentMutation` deletes a thread comment on the AniList API.
|
|
11304
|
+
* @param {DeleteThreadCommentVariables} variables - The {@link DeleteThreadCommentVariables} for the mutation.
|
|
11305
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10812
11306
|
* @returns {Promise<DeleteResult>} A promise that resolves to `{ deleted }`, where `deleted` is `true` when the comment was deleted by this call and `false` when it was already absent.
|
|
11307
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10813
11308
|
*
|
|
10814
11309
|
* @example
|
|
10815
11310
|
* ```typescript
|
|
10816
11311
|
* await aniLink.anilist.mutation.deleteThreadComment({id: 1});
|
|
10817
11312
|
* ```
|
|
10818
11313
|
* @see https://docs.anilist.co/reference/object/deleted
|
|
10819
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10820
11314
|
*/
|
|
10821
11315
|
deleteThreadComment: (variables: DeleteThreadCommentVariables, options?: RequestOptions) => Promise<DeleteResult>;
|
|
10822
11316
|
/**
|
|
10823
|
-
*
|
|
10824
|
-
* @param {UpdateAniChartSettingsVariables} variables - The
|
|
11317
|
+
* `UpdateAniChartSettingsMutation` updates the AniChart settings for a user on the AniList API.
|
|
11318
|
+
* @param {UpdateAniChartSettingsVariables} variables - The {@link UpdateAniChartSettingsVariables} for the mutation.
|
|
11319
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10825
11320
|
* @returns {Promise<string>} A promise that resolves to the updated AniChart settings string.
|
|
11321
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10826
11322
|
*
|
|
10827
11323
|
* @example
|
|
10828
11324
|
* ```typescript
|
|
10829
|
-
* await aniLink.anilist.mutation.updateAniChartSettings({
|
|
11325
|
+
* await aniLink.anilist.mutation.updateAniChartSettings({
|
|
11326
|
+
* titleLanguage: 'romaji',
|
|
11327
|
+
* outgoingLinkProvider: 'ANILIST',
|
|
11328
|
+
* theme: 'dark',
|
|
11329
|
+
* sort: 'POPULARITY',
|
|
11330
|
+
* });
|
|
10830
11331
|
* ```
|
|
10831
11332
|
* @see https://docs.anilist.co/reference/object/anichartuser
|
|
10832
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10833
11333
|
*/
|
|
10834
11334
|
updateAniChartSettings: (variables: UpdateAniChartSettingsVariables, options?: RequestOptions) => Promise<string>;
|
|
10835
11335
|
/**
|
|
10836
|
-
*
|
|
10837
|
-
* @param {UpdateAniChartHighlightsVariables} variables - The
|
|
11336
|
+
* `UpdateAniChartHighlightsMutation` updates the AniChart highlights for a user on the AniList API.
|
|
11337
|
+
* @param {UpdateAniChartHighlightsVariables} variables - The {@link UpdateAniChartHighlightsVariables} for the mutation.
|
|
11338
|
+
* @param options - Optional per-request transport settings ({@link RequestOptions}) merged over the instance-level ones for this call only.
|
|
10838
11339
|
* @returns {Promise<string>} A promise that resolves to the updated AniChart highlights string.
|
|
11340
|
+
* @throws If the client is unauthenticated, variables fail validation, or the request fails.
|
|
10839
11341
|
*
|
|
10840
11342
|
* @example
|
|
10841
11343
|
* ```typescript
|
|
10842
|
-
* await aniLink.anilist.mutation.updateAniChartHighlights({
|
|
11344
|
+
* await aniLink.anilist.mutation.updateAniChartHighlights({
|
|
11345
|
+
* highlights: {mediaId: 1, highlight: true},
|
|
11346
|
+
* });
|
|
10843
11347
|
* ```
|
|
10844
11348
|
* @see https://docs.anilist.co/reference/object/anichartuser
|
|
10845
|
-
* @param options - Optional per-request transport settings merged over the instance-level ones for this call only.
|
|
10846
11349
|
*/
|
|
10847
11350
|
updateAniChartHighlights: (variables: UpdateAniChartHighlightsVariables, options?: RequestOptions) => Promise<string>;
|
|
10848
11351
|
};
|
|
10849
11352
|
};
|
|
10850
11353
|
|
|
10851
|
-
/**
|
|
11354
|
+
/**
|
|
11355
|
+
* Options for building a partial {@link FuzzyDateInput} with {@link fuzzyDate}.
|
|
11356
|
+
*
|
|
11357
|
+
* Omitted fields retain the zero-value representation required by AniList's fuzzy-date input.
|
|
11358
|
+
*
|
|
11359
|
+
* @see https://docs.anilist.co/reference/input/fuzzydateinput
|
|
11360
|
+
*/
|
|
10852
11361
|
interface FuzzyDateOptions {
|
|
10853
11362
|
/** The year, e.g. `2024`. */
|
|
10854
11363
|
year?: number;
|
|
@@ -10858,7 +11367,13 @@ interface FuzzyDateOptions {
|
|
|
10858
11367
|
day?: number;
|
|
10859
11368
|
}
|
|
10860
11369
|
|
|
10861
|
-
/**
|
|
11370
|
+
/**
|
|
11371
|
+
* A media-list entry flattened from {@link MediaListCollectionResponse}, retaining every list group that contains it.
|
|
11372
|
+
*
|
|
11373
|
+
* This local representation makes duplicate membership explicit through `listNames` and the custom-list flags.
|
|
11374
|
+
*
|
|
11375
|
+
* @see https://docs.anilist.co/reference/object/medialistcollection
|
|
11376
|
+
*/
|
|
10862
11377
|
interface FlattenedMediaListEntry {
|
|
10863
11378
|
/** The id of the media list entry. */
|
|
10864
11379
|
id: number;
|
|
@@ -10882,7 +11397,7 @@ interface FlattenedMediaListEntry {
|
|
|
10882
11397
|
|
|
10883
11398
|
/**
|
|
10884
11399
|
* Keys of `T` whose value is a readonly array — the items field of a page or
|
|
10885
|
-
* chunk response.
|
|
11400
|
+
* chunk response. {@link PageInfo} and `hasNextChunk` are never arrays, so they are
|
|
10886
11401
|
* excluded automatically.
|
|
10887
11402
|
*/
|
|
10888
11403
|
type ArrayKeys<T> = {
|
|
@@ -10890,7 +11405,7 @@ type ArrayKeys<T> = {
|
|
|
10890
11405
|
}[keyof T];
|
|
10891
11406
|
/** Extract the element type of the array stored at key `K` of `T`. */
|
|
10892
11407
|
type ArrayElement<T, K extends keyof T> = T[K] extends readonly (infer U)[] ? U : never;
|
|
10893
|
-
/** Options controlling a
|
|
11408
|
+
/** Options controlling a {@link paginate} traversal over {@link PageInfo}-based pages. */
|
|
10894
11409
|
interface PaginateOptions {
|
|
10895
11410
|
/**
|
|
10896
11411
|
* Items requested per page. AniList caps this at 50; values above 50 are
|
|
@@ -10911,7 +11426,7 @@ interface PaginateOptions {
|
|
|
10911
11426
|
*/
|
|
10912
11427
|
concurrency?: number;
|
|
10913
11428
|
}
|
|
10914
|
-
/** Options controlling a
|
|
11429
|
+
/** Options controlling a {@link paginateChunks} traversal over `hasNextChunk`-based chunks. */
|
|
10915
11430
|
interface ChunkPaginateOptions {
|
|
10916
11431
|
/**
|
|
10917
11432
|
* Entries requested per chunk. Values above the documented maximum of 500
|
|
@@ -10932,7 +11447,7 @@ interface ChunkPaginateOptions {
|
|
|
10932
11447
|
*/
|
|
10933
11448
|
concurrency?: number;
|
|
10934
11449
|
}
|
|
10935
|
-
/** The outcome of a
|
|
11450
|
+
/** The outcome of a {@link paginate} traversal. */
|
|
10936
11451
|
interface PaginateResult<TItem> {
|
|
10937
11452
|
/** Every item collected across all fetched pages, in page order. */
|
|
10938
11453
|
items: TItem[];
|
|
@@ -10946,7 +11461,7 @@ interface PaginateResult<TItem> {
|
|
|
10946
11461
|
/** `true` when the traversal stopped at `maxPages` before `hasNextPage` was false. */
|
|
10947
11462
|
truncated: boolean;
|
|
10948
11463
|
}
|
|
10949
|
-
/** The outcome of a
|
|
11464
|
+
/** The outcome of a {@link paginateChunks} traversal. */
|
|
10950
11465
|
interface ChunkPaginateResult<TItem> {
|
|
10951
11466
|
/** Every item collected across all fetched chunks, in chunk order. */
|
|
10952
11467
|
items: TItem[];
|
|
@@ -10961,7 +11476,7 @@ interface ChunkPaginateResult<TItem> {
|
|
|
10961
11476
|
truncated: boolean;
|
|
10962
11477
|
}
|
|
10963
11478
|
/**
|
|
10964
|
-
* Iterate
|
|
11479
|
+
* Iterate {@link PageInfo}-based pages until `hasNextPage` is false or `maxPages` is reached.
|
|
10965
11480
|
*
|
|
10966
11481
|
* The helper calls `fetchPage(page, perPage)` for each page, extracts the items
|
|
10967
11482
|
* array at `itemsKey`, and stops when AniList reports no further pages or when the
|
|
@@ -10990,7 +11505,7 @@ declare function paginate<TPage extends {
|
|
|
10990
11505
|
pageInfo: PageInfo;
|
|
10991
11506
|
}, K extends ArrayKeys<TPage> & keyof TPage>(fetchPage: (page: number, perPage: number) => Promise<TPage>, itemsKey: K, options?: PaginateOptions): Promise<PaginateResult<ArrayElement<TPage, K>>>;
|
|
10992
11507
|
/**
|
|
10993
|
-
* Async generator that yields each
|
|
11508
|
+
* Async generator that yields each {@link PageInfo}-based page response until
|
|
10994
11509
|
* `hasNextPage` is false or `maxPages` is reached.
|
|
10995
11510
|
*
|
|
10996
11511
|
* Use this for streaming or early-exit workflows where collecting every item
|
|
@@ -11051,7 +11566,7 @@ declare function paginateChunks<TChunk extends {
|
|
|
11051
11566
|
* The pagination and pure-helper members of the `AniListApi` type.
|
|
11052
11567
|
*/
|
|
11053
11568
|
|
|
11054
|
-
/** Callback that fetches a single
|
|
11569
|
+
/** Callback that fetches a single {@link PageInfo}-based page. */
|
|
11055
11570
|
type PageFetcher<TPage extends {
|
|
11056
11571
|
pageInfo: PageInfo;
|
|
11057
11572
|
}> = (page: number, perPage: number) => Promise<TPage>;
|
|
@@ -11059,13 +11574,19 @@ type PageFetcher<TPage extends {
|
|
|
11059
11574
|
type ChunkFetcher<TChunk extends {
|
|
11060
11575
|
hasNextChunk: boolean;
|
|
11061
11576
|
}> = (chunk: number, perChunk: number) => Promise<TChunk>;
|
|
11577
|
+
/**
|
|
11578
|
+
* Pagination and transformation helpers exposed by `AniListApi`.
|
|
11579
|
+
*
|
|
11580
|
+
* @see https://docs.anilist.co/reference/object/pageinfo
|
|
11581
|
+
*/
|
|
11062
11582
|
type AniListHelpers = {
|
|
11063
11583
|
/**
|
|
11064
|
-
*
|
|
11584
|
+
* {@link paginate} walks {@link PageInfo}-based pages until `hasNextPage` is false or `maxPages` is
|
|
11585
|
+
* reached, collecting every item across pages.
|
|
11065
11586
|
* @param fetchPage - Callback that fetches a single page given its 1-based number and `perPage`.
|
|
11066
11587
|
* @param itemsKey - The key of the items array on the page response (e.g. `"media"`, `"users"`).
|
|
11067
|
-
* @param options - Optional `perPage`, `startPage`, and `maxPages` controls.
|
|
11068
|
-
* @returns The collected items, per-page snapshots, page count, and whether the guard truncated the run.
|
|
11588
|
+
* @param options - Optional `perPage`, `startPage`, and `maxPages` controls; a {@link PaginateOptions}.
|
|
11589
|
+
* @returns The collected items, per-page snapshots, page count, and whether the guard truncated the run; a {@link PaginateResult}.
|
|
11069
11590
|
* @see https://docs.anilist.co/reference/object/pageinfo
|
|
11070
11591
|
* @example
|
|
11071
11592
|
* ```typescript
|
|
@@ -11082,9 +11603,10 @@ type AniListHelpers = {
|
|
|
11082
11603
|
[P in keyof TPage]: TPage[P] extends readonly unknown[] ? P : never;
|
|
11083
11604
|
}[keyof TPage] & keyof TPage>(fetchPage: PageFetcher<TPage>, itemsKey: K, options?: PaginateOptions) => Promise<PaginateResult<TPage[K] extends readonly (infer U)[] ? U : never>>;
|
|
11084
11605
|
/**
|
|
11085
|
-
*
|
|
11606
|
+
* `paginatePages` is an async generator yielding each {@link PageInfo}-based page until
|
|
11607
|
+
* `hasNextPage` is false or `maxPages` is reached.
|
|
11086
11608
|
* @param fetchPage - Callback that fetches a single page given its 1-based number and `perPage`.
|
|
11087
|
-
* @param options - Optional `perPage`, `startPage`, and `maxPages` controls.
|
|
11609
|
+
* @param options - Optional `perPage`, `startPage`, and `maxPages` controls; a {@link PaginateOptions}.
|
|
11088
11610
|
* @returns An async generator yielding each raw page response in turn.
|
|
11089
11611
|
* @see https://docs.anilist.co/reference/object/pageinfo
|
|
11090
11612
|
* @example
|
|
@@ -11100,11 +11622,12 @@ type AniListHelpers = {
|
|
|
11100
11622
|
pageInfo: PageInfo;
|
|
11101
11623
|
}>(fetchPage: PageFetcher<TPage>, options?: PaginateOptions) => AsyncGenerator<TPage>;
|
|
11102
11624
|
/**
|
|
11103
|
-
*
|
|
11625
|
+
* {@link paginateChunks} iterates {@link MediaListCollectionResponse} chunks until `hasNextChunk` is
|
|
11626
|
+
* false or `maxChunks` is reached, collecting every item across chunks.
|
|
11104
11627
|
* @param fetchChunk - Callback that fetches a single chunk given its 1-based number and `perChunk`.
|
|
11105
11628
|
* @param itemsKey - The key of the items array on the chunk response (e.g. `"lists"`).
|
|
11106
|
-
* @param options - Optional `perChunk`, `startChunk`, and `maxChunks` controls.
|
|
11107
|
-
* @returns The collected items, per-chunk snapshots, chunk count, and whether the guard truncated the run.
|
|
11629
|
+
* @param options - Optional `perChunk`, `startChunk`, and `maxChunks` controls; a {@link ChunkPaginateOptions}.
|
|
11630
|
+
* @returns The collected items, per-chunk snapshots, chunk count, and whether the guard truncated the run; a {@link ChunkPaginateResult}.
|
|
11108
11631
|
* @see https://docs.anilist.co/reference/object/medialistcollection
|
|
11109
11632
|
* @example
|
|
11110
11633
|
* ```typescript
|
|
@@ -11123,9 +11646,9 @@ type AniListHelpers = {
|
|
|
11123
11646
|
[P in keyof TChunk]: TChunk[P] extends readonly unknown[] ? P : never;
|
|
11124
11647
|
}[keyof TChunk] & keyof TChunk>(fetchChunk: ChunkFetcher<TChunk>, itemsKey: K, options?: ChunkPaginateOptions) => Promise<ChunkPaginateResult<TChunk[K] extends readonly (infer U)[] ? U : never>>;
|
|
11125
11648
|
/**
|
|
11126
|
-
*
|
|
11127
|
-
* @param options - The year, month, and day to include. All fields are optional.
|
|
11128
|
-
* @returns A
|
|
11649
|
+
* {@link fuzzyDate} builds an AniList {@link FuzzyDateInput} from optional year, month, and day parts.
|
|
11650
|
+
* @param options - The year, month, and day to include; a {@link FuzzyDateOptions}. All fields are optional.
|
|
11651
|
+
* @returns A {@link FuzzyDateInput} object containing only the provided parts.
|
|
11129
11652
|
* @see https://docs.anilist.co/reference/input/fuzzydateinput
|
|
11130
11653
|
* @example
|
|
11131
11654
|
* ```typescript
|
|
@@ -11134,9 +11657,10 @@ type AniListHelpers = {
|
|
|
11134
11657
|
*/
|
|
11135
11658
|
fuzzyDate: (options?: FuzzyDateOptions) => FuzzyDateInput;
|
|
11136
11659
|
/**
|
|
11137
|
-
*
|
|
11138
|
-
*
|
|
11139
|
-
* @
|
|
11660
|
+
* {@link flattenMediaListCollection} flattens a {@link MediaListCollectionResponse} into a single array of
|
|
11661
|
+
* entries tagged with their list group.
|
|
11662
|
+
* @param response - The {@link MediaListCollectionResponse} returned by `mediaListCollection`.
|
|
11663
|
+
* @returns A flat array of {@link FlattenedMediaListEntry} across all list groups.
|
|
11140
11664
|
* @see https://docs.anilist.co/reference/object/medialistcollection
|
|
11141
11665
|
* @example
|
|
11142
11666
|
* ```typescript
|
|
@@ -11153,12 +11677,12 @@ type AniListHelpers = {
|
|
|
11153
11677
|
*
|
|
11154
11678
|
* Adding an operation touches four sites: the operation class under `query/`
|
|
11155
11679
|
* or `mutation/`, its declaration on one of the group types under `facade/`
|
|
11156
|
-
* (composed into
|
|
11680
|
+
* (composed into {@link AniListApi} below), and its instance wiring in
|
|
11157
11681
|
* `wiring.ts`.
|
|
11158
11682
|
*/
|
|
11159
11683
|
|
|
11160
11684
|
/**
|
|
11161
|
-
* Transport settings accepted by an
|
|
11685
|
+
* Transport settings accepted by an {@link AniLink} client: `timeout`, `signal`,
|
|
11162
11686
|
* automatic retries under the default policy (`retry: false` opts out), opt-in
|
|
11163
11687
|
* `paceWithRateLimit` pacing and `circuitBreaker` fast-fail, lifecycle hooks,
|
|
11164
11688
|
* and `exposeRawAxiosError`.
|
|
@@ -11184,68 +11708,246 @@ type AniListHelpers = {
|
|
|
11184
11708
|
type AniLinkOptions = RequestOptions;
|
|
11185
11709
|
/**
|
|
11186
11710
|
* The AniList API surface exposed at `aniLink.anilist`, composed from the
|
|
11187
|
-
*
|
|
11711
|
+
* {@link AniListCustom}, {@link AniListQueries}, {@link AniListMutations}, and
|
|
11712
|
+
* {@link AniListHelpers} group types under `facade/`.
|
|
11188
11713
|
*/
|
|
11189
11714
|
type AniListApi = AniListCustom & AniListQueries & AniListMutations & AniListHelpers;
|
|
11190
11715
|
|
|
11191
11716
|
/**
|
|
11192
|
-
*
|
|
11717
|
+
* {@link MalPicture} is the image variants returned by MyAnimeList for an anime entity.
|
|
11718
|
+
*
|
|
11719
|
+
* It is the `main_picture` shape inside {@link MalAnime} and is selected via {@link MalRequestOptions.fields} through `MalAnimeOperation.get` and `MyAnimeListAnimeApi.get`.
|
|
11720
|
+
*
|
|
11721
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/anime/operation/anime_anime_id_get
|
|
11722
|
+
*/
|
|
11723
|
+
interface MalPicture {
|
|
11724
|
+
/** The large image URL, when MyAnimeList provides one. */
|
|
11725
|
+
large?: string;
|
|
11726
|
+
/** The medium image URL, when MyAnimeList provides one. */
|
|
11727
|
+
medium?: string;
|
|
11728
|
+
}
|
|
11729
|
+
/**
|
|
11730
|
+
* {@link MalAnime} is the typed portion of a MyAnimeList anime response returned by `MalAnimeOperation.get` and `MyAnimeListAnimeApi.get`.
|
|
11731
|
+
*
|
|
11732
|
+
* It always carries `id` and `title`; additional fields appear when requested via {@link MalRequestOptions.fields} and are exposed through the index signature without narrowing.
|
|
11733
|
+
*
|
|
11734
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/anime/operation/anime_anime_id_get
|
|
11735
|
+
*/
|
|
11736
|
+
interface MalAnime {
|
|
11737
|
+
/** The MyAnimeList numeric identifier. */
|
|
11738
|
+
id: number;
|
|
11739
|
+
/** The canonical MyAnimeList title. */
|
|
11740
|
+
title: string;
|
|
11741
|
+
/** Optional image variants requested through the `fields` query parameter. */
|
|
11742
|
+
main_picture?: MalPicture;
|
|
11743
|
+
/** The synopsis, when requested via the `fields` query parameter. */
|
|
11744
|
+
synopsis?: string;
|
|
11745
|
+
/** The publication/airing status, when requested (one of MAL's status values such as `finished_airing`). */
|
|
11746
|
+
status?: string;
|
|
11747
|
+
/** The average score out of 10, when requested via the `fields` query parameter. */
|
|
11748
|
+
mean?: number;
|
|
11749
|
+
/** The total number of episodes, when requested via the `fields` query parameter. */
|
|
11750
|
+
num_episodes?: number;
|
|
11751
|
+
/** The media type, when requested (for example `tv`, `movie`, or `ova`). */
|
|
11752
|
+
media_type?: string;
|
|
11753
|
+
/** The first air/start date in ISO 8601 format, when requested via the `fields` query parameter. */
|
|
11754
|
+
start_date?: string;
|
|
11755
|
+
/** The broadcast schedule, when requested via the `fields` query parameter. */
|
|
11756
|
+
broadcast?: string;
|
|
11757
|
+
/** The 24-hour broadcast start time (JST) in `HHMM` form, when requested via the `fields` query parameter. */
|
|
11758
|
+
start_time?: string;
|
|
11759
|
+
/** The average episode duration in seconds, when requested via the `fields` query parameter. */
|
|
11760
|
+
average_episode_duration?: number;
|
|
11761
|
+
/** Any additional fields requested by a caller remain available without narrowing. */
|
|
11762
|
+
[field: string]: unknown;
|
|
11763
|
+
}
|
|
11764
|
+
/**
|
|
11765
|
+
* {@link MalUser} is the typed portion of the authenticated MyAnimeList user response returned by `MalUserOperation.me` and `MyAnimeListUserApi.me`.
|
|
11766
|
+
*
|
|
11767
|
+
* It always carries `id` and `name`; additional fields appear when requested via {@link MalRequestOptions.fields} and are exposed through the index signature without narrowing.
|
|
11768
|
+
*
|
|
11769
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/users/operation/users_user_id_get
|
|
11770
|
+
*/
|
|
11771
|
+
interface MalUser {
|
|
11772
|
+
/** The MyAnimeList numeric user identifier. */
|
|
11773
|
+
id: number;
|
|
11774
|
+
/** The user's MyAnimeList name. */
|
|
11775
|
+
name: string;
|
|
11776
|
+
/** Optional profile location. */
|
|
11777
|
+
location?: string;
|
|
11778
|
+
/** Optional account creation timestamp. */
|
|
11779
|
+
joined_at?: string;
|
|
11780
|
+
/** The user's profile picture variants, when requested via the `fields` query parameter. */
|
|
11781
|
+
picture?: MalPicture;
|
|
11782
|
+
/** The user's gender, when requested via the `fields` query parameter. */
|
|
11783
|
+
gender?: string;
|
|
11784
|
+
/** The user's birthday in ISO 8601 format, when requested via the `fields` query parameter. */
|
|
11785
|
+
birthday?: string;
|
|
11786
|
+
/** Any additional fields requested by a caller remain available without narrowing. */
|
|
11787
|
+
[field: string]: unknown;
|
|
11788
|
+
}
|
|
11789
|
+
/**
|
|
11790
|
+
* {@link MalRequestOptions} is the public request options shared by MAL endpoint methods.
|
|
11791
|
+
*
|
|
11792
|
+
* It extends {@link RequestOptions} with the MyAnimeList `fields` selector consumed by `MalAnimeOperation.get` and `MalUserOperation.me` through `MyAnimeListApi`. Transport settings are merged over the instance defaults from `MalCredentials` via `buildMyAnimeListApi`.
|
|
11793
|
+
*
|
|
11794
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/anime/operation/anime_anime_id_get
|
|
11795
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/users/operation/users_user_id_get
|
|
11796
|
+
*/
|
|
11797
|
+
interface MalRequestOptions extends RequestOptions {
|
|
11798
|
+
/** A comma-separated field selector, or the same selector as an array. */
|
|
11799
|
+
fields?: string | readonly string[];
|
|
11800
|
+
}
|
|
11801
|
+
|
|
11802
|
+
/**
|
|
11803
|
+
* {@link MyAnimeListAnimeApi} is the anime group exposed by {@link MyAnimeListApi} under `aniLink.mal.anime`.
|
|
11804
|
+
*
|
|
11805
|
+
* It is the facade boundary for MyAnimeList anime reads; the single `MalAnimeOperation.get | get` method delegates to `MalAnimeOperation` and returns a {@link MalAnime} shaped by {@link MalRequestOptions.fields}.
|
|
11806
|
+
*
|
|
11807
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/anime/operation/anime_anime_id_get
|
|
11808
|
+
*/
|
|
11809
|
+
interface MyAnimeListAnimeApi {
|
|
11810
|
+
/**
|
|
11811
|
+
* {@link MyAnimeListAnimeApi.get} gets one anime by its MyAnimeList ID through `MalAnimeOperation.get`.
|
|
11812
|
+
*
|
|
11813
|
+
* It is the public facade for the `GET /anime/{id}` endpoint; use {@link MalRequestOptions.fields} to select the response shape and {@link MalRequestOptions} transport settings to override per call.
|
|
11814
|
+
*
|
|
11815
|
+
* @param id - The MyAnimeList anime ID.
|
|
11816
|
+
* @param options - Optional field selection and transport settings; a {@link MalRequestOptions} merged over the instance defaults.
|
|
11817
|
+
* @returns The requested {@link MalAnime}.
|
|
11818
|
+
* @throws `AniLinkRestError` for a non-success MyAnimeList response.
|
|
11819
|
+
* @throws `AniLinkNetworkError` for timeout, cancellation, or other transport failures.
|
|
11820
|
+
* @example
|
|
11821
|
+
* ```typescript
|
|
11822
|
+
* const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
|
|
11823
|
+
* const anime = await api.anime.get(21, { fields: ["id", "title", "main_picture"] });
|
|
11824
|
+
* ```
|
|
11825
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/anime/operation/anime_anime_id_get
|
|
11826
|
+
*/
|
|
11827
|
+
get: (id: number, options?: MalRequestOptions) => Promise<MalAnime>;
|
|
11828
|
+
}
|
|
11829
|
+
/**
|
|
11830
|
+
* {@link MyAnimeListUserApi} is the user group exposed by {@link MyAnimeListApi} under `aniLink.mal.user`.
|
|
11831
|
+
*
|
|
11832
|
+
* It is the facade boundary for the authenticated MyAnimeList user read; the single `MalUserOperation.me | me` method delegates to `MalUserOperation` and returns a {@link MalUser} shaped by {@link MalRequestOptions.fields}.
|
|
11833
|
+
*
|
|
11834
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/users/operation/users_user_id_get
|
|
11835
|
+
*/
|
|
11836
|
+
interface MyAnimeListUserApi {
|
|
11837
|
+
/**
|
|
11838
|
+
* {@link MyAnimeListUserApi.me} gets the currently authenticated MyAnimeList user through `MalUserOperation.me`.
|
|
11839
|
+
*
|
|
11840
|
+
* It is the public facade for `GET /users/@me` and requires a MAL access token from `MalCredentials.accessToken` via `buildMyAnimeListApi`; use {@link MalRequestOptions.fields} to select the response shape.
|
|
11841
|
+
*
|
|
11842
|
+
* @param options - Optional field selection and transport settings; a {@link MalRequestOptions} merged over the instance defaults.
|
|
11843
|
+
* @returns The authenticated {@link MalUser}.
|
|
11844
|
+
* @throws `AniLinkAuthError` when no MAL access token is configured.
|
|
11845
|
+
* @throws `AniLinkRestError` for a non-success MyAnimeList response.
|
|
11846
|
+
* @throws `AniLinkNetworkError` for timeout, cancellation, or other transport failures.
|
|
11847
|
+
* @example
|
|
11848
|
+
* ```typescript
|
|
11849
|
+
* const api = new AniLink({ mal: { accessToken: "mal-token" } }).mal;
|
|
11850
|
+
* const user = await api.user.me({ fields: ["id", "name"] });
|
|
11851
|
+
* ```
|
|
11852
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2#tag/users/operation/users_user_id_get
|
|
11853
|
+
*/
|
|
11854
|
+
me: (options?: MalRequestOptions) => Promise<MalUser>;
|
|
11855
|
+
}
|
|
11856
|
+
/**
|
|
11857
|
+
* {@link MyAnimeListApi} is the typed MyAnimeList REST surface exposed by `aniLink.mal`.
|
|
11858
|
+
*
|
|
11859
|
+
* It composes {@link MyAnimeListAnimeApi} and {@link MyAnimeListUserApi} from `MalAnimeOperation` and `MalUserOperation` via `buildMyAnimeListApi`. Every method accepts {@link MalRequestOptions} and returns {@link MalAnime} or {@link MalUser}; OAuth helpers `buildMalAuthorizationUrl`, `getMalAccessToken`, and `refreshMalAccessToken` supply the token for `MalCredentials`.
|
|
11860
|
+
*
|
|
11861
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2
|
|
11862
|
+
*/
|
|
11863
|
+
interface MyAnimeListApi {
|
|
11864
|
+
/** Anime operations via {@link MyAnimeListAnimeApi} and `MalAnimeOperation`. */
|
|
11865
|
+
anime: MyAnimeListAnimeApi;
|
|
11866
|
+
/** User operations via {@link MyAnimeListUserApi} and `MalUserOperation`. */
|
|
11867
|
+
user: MyAnimeListUserApi;
|
|
11868
|
+
}
|
|
11869
|
+
|
|
11870
|
+
/**
|
|
11871
|
+
* Per-provider credential shapes accepted by the {@link AniLink} constructor.
|
|
11193
11872
|
*
|
|
11194
11873
|
* Every provider owns its own credentials: AniList authenticates with a
|
|
11195
11874
|
* bearer token, while REST providers such as MyAnimeList carry their own
|
|
11196
|
-
* access-token
|
|
11197
|
-
*
|
|
11198
|
-
* providers.
|
|
11875
|
+
* access-token and PKCE fields. All shapes extend {@link ProviderCredentials}
|
|
11876
|
+
* so transport settings stay uniform across providers.
|
|
11199
11877
|
*/
|
|
11200
11878
|
|
|
11201
11879
|
/**
|
|
11202
|
-
*
|
|
11203
|
-
* {@link AniLinkCredentials} object.
|
|
11204
|
-
*
|
|
11205
|
-
* to that provider's operations only.
|
|
11880
|
+
* Transport settings shared by every provider's slot in an
|
|
11881
|
+
* {@link AniLinkCredentials} object. Provider-specific credential types
|
|
11882
|
+
* extend this with their own authentication fields; the settings always
|
|
11883
|
+
* apply to that provider's operations only.
|
|
11884
|
+
*
|
|
11885
|
+
* @see {@link AniLinkCredentials}
|
|
11206
11886
|
*/
|
|
11207
11887
|
interface ProviderCredentials extends RequestOptions {
|
|
11208
|
-
/**
|
|
11209
|
-
|
|
11210
|
-
* requests for this provider. Optional: omit it to use only public
|
|
11211
|
-
* endpoints.
|
|
11212
|
-
*/
|
|
11213
|
-
authToken?: string;
|
|
11888
|
+
/** Provider-specific credentials are defined by the provider implementation. */
|
|
11889
|
+
readonly [credential: string]: unknown;
|
|
11214
11890
|
}
|
|
11215
11891
|
/**
|
|
11216
11892
|
* AniList-specific credentials. Currently a bearer token plus transport
|
|
11217
11893
|
* settings; OAuth helper functions live in `apis/graphql/anilist/auth`.
|
|
11894
|
+
*
|
|
11895
|
+
* @see {@link resolveAniListCredentials}
|
|
11218
11896
|
*/
|
|
11219
|
-
|
|
11897
|
+
interface AniListCredentials extends ProviderCredentials {
|
|
11898
|
+
/** The bearer token sent on authenticated AniList requests. */
|
|
11899
|
+
authToken?: string;
|
|
11900
|
+
}
|
|
11220
11901
|
/**
|
|
11221
|
-
* MyAnimeList-specific credentials
|
|
11902
|
+
* MyAnimeList-specific credentials consumed by the REST provider.
|
|
11222
11903
|
*
|
|
11223
11904
|
* MAL authenticates with an OAuth2 access token obtained through its PKCE
|
|
11224
|
-
* flow; `accessToken`
|
|
11225
|
-
*
|
|
11226
|
-
*
|
|
11905
|
+
* flow; `accessToken` and `clientId` are translated into the provider-neutral
|
|
11906
|
+
* request-auth value without leaking either field into other providers'
|
|
11907
|
+
* requests.
|
|
11908
|
+
*
|
|
11909
|
+
* @see {@link resolveMalCredentials}
|
|
11227
11910
|
*/
|
|
11228
11911
|
interface MalCredentials extends ProviderCredentials {
|
|
11229
|
-
/**
|
|
11230
|
-
* The MAL OAuth2 access token. Distinct from {@link ProviderCredentials.authToken}
|
|
11231
|
-
* so each provider's token is stored under its own name until the MAL
|
|
11232
|
-
* provider module consumes it.
|
|
11233
|
-
*/
|
|
11912
|
+
/** The MAL OAuth2 access token, kept in this provider's credential slot. */
|
|
11234
11913
|
accessToken?: string;
|
|
11914
|
+
/** The MAL OAuth2 refresh token used to obtain a new access token. */
|
|
11915
|
+
refreshToken?: string;
|
|
11916
|
+
/** The MAL application client ID used by OAuth helpers. */
|
|
11917
|
+
clientId?: string;
|
|
11918
|
+
/** The MAL application secret, when the application requires one. */
|
|
11919
|
+
clientSecret?: string;
|
|
11235
11920
|
}
|
|
11236
11921
|
/**
|
|
11237
|
-
* The per-provider credentials object accepted by the
|
|
11922
|
+
* The per-provider credentials object accepted by the {@link AniLink} constructor.
|
|
11238
11923
|
*
|
|
11239
11924
|
* Each key targets exactly one provider namespace (`aniLink.anilist`,
|
|
11240
11925
|
* `aniLink.mal`, …); credentials given under one key are never applied to
|
|
11241
11926
|
* another provider's requests.
|
|
11927
|
+
*
|
|
11928
|
+
* @see {@link ProviderCredentials}
|
|
11242
11929
|
*/
|
|
11243
11930
|
interface AniLinkCredentials {
|
|
11244
11931
|
/** Credentials for the AniList provider surface. */
|
|
11245
11932
|
anilist?: AniListCredentials;
|
|
11246
|
-
/** Credentials for the MyAnimeList provider surface
|
|
11933
|
+
/** Credentials for the MyAnimeList provider surface. */
|
|
11247
11934
|
mal?: MalCredentials;
|
|
11248
11935
|
}
|
|
11936
|
+
/**
|
|
11937
|
+
* Normalized authentication and transport settings for one provider slot.
|
|
11938
|
+
*
|
|
11939
|
+
* Credential resolvers use this shape to keep provider-specific fields out of
|
|
11940
|
+
* the shared operation-constructor seam while preserving provider-only auth.
|
|
11941
|
+
*
|
|
11942
|
+
* @see {@link resolveAniListCredentials}
|
|
11943
|
+
* @see {@link resolveMalCredentials}
|
|
11944
|
+
*/
|
|
11945
|
+
interface ResolvedProviderCredentials {
|
|
11946
|
+
/** Authentication material for the provider's request operations. */
|
|
11947
|
+
auth?: RequestAuthInput;
|
|
11948
|
+
/** Transport settings with provider-only authentication fields removed. */
|
|
11949
|
+
options?: RequestOptions;
|
|
11950
|
+
}
|
|
11249
11951
|
|
|
11250
11952
|
/** The AniList OAuth2 token endpoint used for code exchange and refresh. */
|
|
11251
11953
|
declare const ANILIST_TOKEN_URL = "https://anilist.co/api/v2/oauth/token";
|
|
@@ -11257,7 +11959,7 @@ declare const ANILIST_AUTHORIZE_URL = "https://anilist.co/api/v2/oauth/authorize
|
|
|
11257
11959
|
* rotate the refresh token.
|
|
11258
11960
|
*/
|
|
11259
11961
|
interface AniListTokenResponse {
|
|
11260
|
-
/** The bearer token to pass to the
|
|
11962
|
+
/** The bearer token to pass to the {@link AniLink} constructor. */
|
|
11261
11963
|
access_token: string;
|
|
11262
11964
|
/** The token type, typically `Bearer`. */
|
|
11263
11965
|
token_type: string;
|
|
@@ -11296,7 +11998,7 @@ declare const buildAuthorizationUrl: (clientId: string, redirectUri: string, sta
|
|
|
11296
11998
|
* @param redirectUri - The redirect URI registered for your AniList application. This parameter is optional but must match the URI used in {@link buildAuthorizationUrl} when AniList requires it.
|
|
11297
11999
|
* @param signal - Optional `AbortSignal` to cancel the token exchange while it is in flight.
|
|
11298
12000
|
* @returns A promise that resolves to the token response containing `access_token`.
|
|
11299
|
-
* @throws An
|
|
12001
|
+
* @throws An {@link AniLinkApiError} when AniList rejects the exchange, for example with `invalid_grant` for an invalid or expired code, or an {@link AniLinkNetworkError} on transport failure. Errors never include the request body, so the client secret and code are not leaked.
|
|
11300
12002
|
* @example
|
|
11301
12003
|
* ```typescript
|
|
11302
12004
|
* const { access_token } = await getAccessToken(
|
|
@@ -11318,7 +12020,7 @@ declare const getAccessToken: (clientId: string, clientSecret: string, code: str
|
|
|
11318
12020
|
* @param refreshToken - The refresh token from a previous token response.
|
|
11319
12021
|
* @param signal - Optional `AbortSignal` to cancel the refresh while it is in flight.
|
|
11320
12022
|
* @returns A promise that resolves to the token response containing a new `access_token`. The `refresh_token` field may be absent when AniList does not rotate it.
|
|
11321
|
-
* @throws An
|
|
12023
|
+
* @throws An {@link AniLinkApiError} when AniList rejects the refresh, for example when the refresh token is invalid or revoked, or an {@link AniLinkNetworkError} on transport failure. Errors never include the request body, so the client secret and refresh token are not leaked.
|
|
11322
12024
|
* @example
|
|
11323
12025
|
* ```typescript
|
|
11324
12026
|
* const { access_token } = await refreshAccessToken("1234", "secret", "stored-refresh-token");
|
|
@@ -11346,25 +12048,255 @@ declare const refreshAccessToken: (clientId: string, clientSecret: string, refre
|
|
|
11346
12048
|
declare const getTokenExpiry: (response: AniListTokenResponse, now?: number) => Date;
|
|
11347
12049
|
|
|
11348
12050
|
/**
|
|
11349
|
-
*
|
|
11350
|
-
*
|
|
12051
|
+
* {@link ProviderId} is the union of provider identifiers composed by {@link AniLink} and {@link ProviderClients}.
|
|
12052
|
+
*
|
|
12053
|
+
* It keys {@link PROVIDER_FACTORIES} and {@link AniLinkCredentials}, isolating each provider's credentials and transport settings.
|
|
12054
|
+
*
|
|
12055
|
+
* @see {@link ProviderClients}
|
|
12056
|
+
* @see {@link buildProviderClients}
|
|
12057
|
+
*/
|
|
12058
|
+
type ProviderId = "anilist" | "mal";
|
|
12059
|
+
/**
|
|
12060
|
+
* {@link ProviderClients} is the typed provider clients exposed by one {@link AniLink} instance.
|
|
12061
|
+
*
|
|
12062
|
+
* It composes {@link AniListApi} under `anilist` and {@link MyAnimeListApi} under `mal`, each built from its own credential slot via {@link PROVIDER_FACTORIES} and {@link buildProviderClients}.
|
|
12063
|
+
*
|
|
12064
|
+
* @see {@link AniLink}
|
|
12065
|
+
* @see {@link buildProviderClients}
|
|
12066
|
+
*/
|
|
12067
|
+
interface ProviderClients {
|
|
12068
|
+
/** The AniList GraphQL provider client, a {@link AniListApi} built from {@link AniListCredentials}. */
|
|
12069
|
+
anilist: AniListApi;
|
|
12070
|
+
/** The MyAnimeList REST provider client, a {@link MyAnimeListApi} built from {@link MalCredentials} via {@link buildMyAnimeListApi}. */
|
|
12071
|
+
mal: MyAnimeListApi;
|
|
12072
|
+
}
|
|
12073
|
+
/**
|
|
12074
|
+
* {@link ProviderFactory} is a provider factory that receives only that provider's credential slot.
|
|
12075
|
+
*
|
|
12076
|
+
* It is the shape of each entry in {@link PROVIDER_FACTORIES} and is invoked by {@link buildProviderClients} with isolated {@link AniListCredentials} or {@link MalCredentials} plus optional {@link RequestOptions}.
|
|
12077
|
+
*
|
|
12078
|
+
* @typeParam TCredentials - The credential slot for the provider, such as {@link AniListCredentials} or {@link MalCredentials}.
|
|
12079
|
+
* @typeParam TClient - The client produced, such as {@link AniListApi} or {@link MyAnimeListApi}.
|
|
12080
|
+
* @param credentials - The provider's credential slot.
|
|
12081
|
+
* @param legacyOptions - Transport settings for the legacy `new AniLink(token, options)` form; only the AniList factory consumes this.
|
|
12082
|
+
* @returns The typed client for the provider.
|
|
12083
|
+
* @see {@link PROVIDER_FACTORIES}
|
|
12084
|
+
* @see {@link buildProviderClients}
|
|
12085
|
+
*/
|
|
12086
|
+
type ProviderFactory<TCredentials, TClient> = (credentials?: TCredentials, legacyOptions?: RequestOptions) => TClient;
|
|
12087
|
+
/**
|
|
12088
|
+
* {@link buildProviderClients} builds every public provider client from isolated credential slots.
|
|
12089
|
+
*
|
|
12090
|
+
* It invokes each {@link ProviderFactory} in {@link PROVIDER_FACTORIES} with its own {@link AniLinkCredentials} slot, producing {@link ProviderClients} with the AniList surface (`AniListApi`) and the MyAnimeList surface (`MyAnimeListApi`). The optional `legacyOptions` argument exists only for the positional `new AniLink(token, options)` constructor form; provider-scoped credentials carry their own {@link RequestOptions} and never share them with another slot.
|
|
12091
|
+
*
|
|
12092
|
+
* @param credentials - Per-provider credential slots; an {@link AniLinkCredentials} object.
|
|
12093
|
+
* @param legacyOptions - Transport settings for the legacy AniList form; forwarded only to the AniList factory.
|
|
12094
|
+
* @returns Typed clients for every registered provider, a {@link ProviderClients} object.
|
|
12095
|
+
* @see {@link PROVIDER_FACTORIES}
|
|
12096
|
+
* @see {@link ProviderClients}
|
|
12097
|
+
* @example
|
|
12098
|
+
* ```typescript
|
|
12099
|
+
* const clients = buildProviderClients({
|
|
12100
|
+
* anilist: { authToken: "anilist-token" },
|
|
12101
|
+
* mal: { accessToken: "mal-token" },
|
|
12102
|
+
* });
|
|
12103
|
+
* const anime = await clients.mal.anime.get(21);
|
|
12104
|
+
* ```
|
|
12105
|
+
*/
|
|
12106
|
+
declare function buildProviderClients(credentials?: AniLinkCredentials, legacyOptions?: AniLinkOptions): ProviderClients;
|
|
12107
|
+
|
|
12108
|
+
/**
|
|
12109
|
+
* {@link MAL_API_BASE_URL} is the base URL for the MyAnimeList API v2 consumed by `MalAnimeOperation` and `MalUserOperation`.
|
|
12110
|
+
*
|
|
12111
|
+
* It is the prefix for the built-in REST calls exposed through `MyAnimeListApi`.
|
|
12112
|
+
*
|
|
12113
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2
|
|
12114
|
+
*/
|
|
12115
|
+
declare const MAL_API_BASE_URL = "https://api.myanimelist.net/v2";
|
|
12116
|
+
/**
|
|
12117
|
+
* {@link MAL_AUTHORIZE_URL} is the MyAnimeList OAuth2 authorization endpoint used by `buildMalAuthorizationUrl`.
|
|
12118
|
+
*
|
|
12119
|
+
* It is the entry point for the PKCE flow that produces the code consumed by `getMalAccessToken`.
|
|
12120
|
+
*
|
|
12121
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12122
|
+
*/
|
|
12123
|
+
declare const MAL_AUTHORIZE_URL = "https://myanimelist.net/v1/oauth2/authorize";
|
|
12124
|
+
/**
|
|
12125
|
+
* {@link MAL_TOKEN_URL} is the MyAnimeList OAuth2 token endpoint used by `getMalAccessToken` and `refreshMalAccessToken`.
|
|
12126
|
+
*
|
|
12127
|
+
* It exchanges the PKCE code or refresh token for a `MalTokenResponse`.
|
|
12128
|
+
*
|
|
12129
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12130
|
+
*/
|
|
12131
|
+
declare const MAL_TOKEN_URL = "https://myanimelist.net/v1/oauth2/token";
|
|
12132
|
+
/**
|
|
12133
|
+
* {@link MAL_API_REFERENCE} is the MyAnimeList API v2 reference index linked from `MyAnimeListApi` and `buildMyAnimeListApi`.
|
|
12134
|
+
*
|
|
12135
|
+
* Use it as the generic fallback when a more specific endpoint reference is not available.
|
|
12136
|
+
*
|
|
12137
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2
|
|
12138
|
+
*/
|
|
12139
|
+
declare const MAL_API_REFERENCE = "https://myanimelist.net/apiconfig/references/api/v2";
|
|
12140
|
+
|
|
12141
|
+
/**
|
|
12142
|
+
* {@link MalTokenResponse} is the successful MyAnimeList OAuth2 token response returned by {@link getMalAccessToken} and {@link refreshMalAccessToken}.
|
|
12143
|
+
*
|
|
12144
|
+
* It carries the bearer token consumed by `MalAnimeOperation` and `MalUserOperation` through `MalCredentials`.
|
|
12145
|
+
*
|
|
12146
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12147
|
+
*/
|
|
12148
|
+
interface MalTokenResponse {
|
|
12149
|
+
/** The bearer access token used by MAL REST operations. */
|
|
12150
|
+
access_token: string;
|
|
12151
|
+
/** The token type, normally `Bearer`. */
|
|
12152
|
+
token_type: string;
|
|
12153
|
+
/** The access-token lifetime in seconds. */
|
|
12154
|
+
expires_in: number;
|
|
12155
|
+
/** A refresh token, when MAL issues one. */
|
|
12156
|
+
refresh_token?: string;
|
|
12157
|
+
/** The granted scopes, when MAL returns them. */
|
|
12158
|
+
scope?: string;
|
|
12159
|
+
}
|
|
12160
|
+
/**
|
|
12161
|
+
* {@link MalAuthorizationCodeRequest} is the input for {@link getMalAccessToken} when exchanging a MAL authorization code with PKCE.
|
|
12162
|
+
*
|
|
12163
|
+
* It carries the client identity and PKCE verifier initiated by {@link buildMalAuthorizationUrl}, plus optional {@link RequestOptions} for the token call.
|
|
12164
|
+
*
|
|
12165
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12166
|
+
*/
|
|
12167
|
+
interface MalAuthorizationCodeRequest {
|
|
12168
|
+
/** The MAL application client ID. */
|
|
12169
|
+
clientId: string;
|
|
12170
|
+
/** The authorization code returned by the redirect. */
|
|
12171
|
+
code: string;
|
|
12172
|
+
/** The original PKCE code verifier. */
|
|
12173
|
+
codeVerifier: string;
|
|
12174
|
+
/** An optional client secret for applications that use one. */
|
|
12175
|
+
clientSecret?: string;
|
|
12176
|
+
/** Shared transport settings for the token request. */
|
|
12177
|
+
options?: RequestOptions;
|
|
12178
|
+
}
|
|
12179
|
+
/**
|
|
12180
|
+
* {@link MalRefreshTokenRequest} is the input for {@link refreshMalAccessToken} when refreshing a MAL access token.
|
|
12181
|
+
*
|
|
12182
|
+
* It carries the client identity and stored refresh token from a prior {@link MalTokenResponse}, plus optional {@link RequestOptions} for the token call.
|
|
12183
|
+
*
|
|
12184
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12185
|
+
*/
|
|
12186
|
+
interface MalRefreshTokenRequest {
|
|
12187
|
+
/** The MAL application client ID. */
|
|
12188
|
+
clientId: string;
|
|
12189
|
+
/** The stored MAL refresh token. */
|
|
12190
|
+
refreshToken: string;
|
|
12191
|
+
/** An optional client secret for applications that use one. */
|
|
12192
|
+
clientSecret?: string;
|
|
12193
|
+
/** Shared transport settings for the token request. */
|
|
12194
|
+
options?: RequestOptions;
|
|
12195
|
+
}
|
|
12196
|
+
/**
|
|
12197
|
+
* {@link buildMalAuthorizationUrl} is the PKCE helper that builds the MyAnimeList OAuth2 authorization URL for {@link getMalAccessToken}.
|
|
12198
|
+
*
|
|
12199
|
+
* It encodes the client identity and PKCE challenge from {@link MalAuthorizationCodeRequest} and returns the URL to open in a browser. The current implementation sends `code_challenge_method=S256`; verify that method against the linked MAL authorization reference before relying on the helper. Validate the `state` on redirect before exchanging the code via {@link getMalAccessToken}.
|
|
12200
|
+
*
|
|
12201
|
+
* @param clientId - The MAL application client ID from {@link MalAuthorizationCodeRequest.clientId}.
|
|
12202
|
+
* @param codeChallenge - The PKCE challenge generated for the login attempt; this helper sends it with the `S256` method.
|
|
12203
|
+
* @param state - Optional opaque CSRF state to validate on the redirect.
|
|
12204
|
+
* @returns The fully encoded authorization URL for the MAL OAuth flow.
|
|
12205
|
+
* @example
|
|
12206
|
+
* ```typescript
|
|
12207
|
+
* const url = buildMalAuthorizationUrl("client-id", "pkce-challenge", "csrf-state");
|
|
12208
|
+
* // Open url in a browser, then exchange the returned code with getMalAccessToken.
|
|
12209
|
+
* ```
|
|
12210
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12211
|
+
*/
|
|
12212
|
+
declare const buildMalAuthorizationUrl: (clientId: string, codeChallenge: string, state?: string) => string;
|
|
12213
|
+
/**
|
|
12214
|
+
* {@link getMalAccessToken} exchanges a MAL authorization code for an access token through PKCE.
|
|
12215
|
+
*
|
|
12216
|
+
* It completes the flow started by {@link buildMalAuthorizationUrl} using the {@link MalAuthorizationCodeRequest} fields and returns a {@link MalTokenResponse} consumed by `MalCredentials` and `buildMyAnimeListApi`. Transport is shared with {@link RequestOptions}.
|
|
12217
|
+
*
|
|
12218
|
+
* @param request - The authorization-code fields and optional transport settings; a {@link MalAuthorizationCodeRequest}.
|
|
12219
|
+
* @returns The {@link MalTokenResponse} for the authenticated session.
|
|
12220
|
+
* @throws An {@link AniLinkApiError} or {@link AniLinkNetworkError} with sanitized token-request details.
|
|
12221
|
+
* @example
|
|
12222
|
+
* ```typescript
|
|
12223
|
+
* const token = await getMalAccessToken({ clientId, code, codeVerifier });
|
|
12224
|
+
* // token.access_token -> pass as MalCredentials.accessToken to buildMyAnimeListApi
|
|
12225
|
+
* ```
|
|
12226
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12227
|
+
*/
|
|
12228
|
+
declare const getMalAccessToken: (request: MalAuthorizationCodeRequest) => Promise<MalTokenResponse>;
|
|
12229
|
+
/**
|
|
12230
|
+
* {@link refreshMalAccessToken} exchanges a MAL refresh token for a new access token.
|
|
12231
|
+
*
|
|
12232
|
+
* It uses the {@link MalRefreshTokenRequest} fields from a prior {@link MalTokenResponse} and returns a fresh {@link MalTokenResponse} for `MalCredentials` and `buildMyAnimeListApi`. Transport is shared with {@link RequestOptions}.
|
|
12233
|
+
*
|
|
12234
|
+
* @param request - The refresh-token fields and optional transport settings; a {@link MalRefreshTokenRequest}.
|
|
12235
|
+
* @returns The refreshed {@link MalTokenResponse}.
|
|
12236
|
+
* @throws An {@link AniLinkApiError} or {@link AniLinkNetworkError} with sanitized token-request details.
|
|
12237
|
+
* @example
|
|
12238
|
+
* ```typescript
|
|
12239
|
+
* const token = await refreshMalAccessToken({ clientId, refreshToken });
|
|
12240
|
+
* // token.access_token -> replace the stored MalCredentials.accessToken
|
|
12241
|
+
* ```
|
|
12242
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12243
|
+
*/
|
|
12244
|
+
declare const refreshMalAccessToken: (request: MalRefreshTokenRequest) => Promise<MalTokenResponse>;
|
|
12245
|
+
/**
|
|
12246
|
+
* {@link getMalTokenExpiry} computes the absolute expiry time of a {@link MalTokenResponse}.
|
|
12247
|
+
*
|
|
12248
|
+
* It adds `expires_in` from the response returned by {@link getMalAccessToken} or {@link refreshMalAccessToken} to the supplied clock value, so callers can schedule refresh before the token held in `MalCredentials` expires.
|
|
12249
|
+
*
|
|
12250
|
+
* @param response - The {@link MalTokenResponse} whose `expires_in` to evaluate.
|
|
12251
|
+
* @param now - The current time in milliseconds since the Unix epoch.
|
|
12252
|
+
* @returns The moment the access token expires.
|
|
12253
|
+
* @example
|
|
12254
|
+
* ```typescript
|
|
12255
|
+
* const expiresAt = getMalTokenExpiry(token);
|
|
12256
|
+
* if (expiresAt.getTime() - Date.now() < 60_000) await refreshMalAccessToken({ clientId, refreshToken });
|
|
12257
|
+
* ```
|
|
12258
|
+
* @see https://myanimelist.net/apiconfig/references/authorization
|
|
12259
|
+
*/
|
|
12260
|
+
declare const getMalTokenExpiry: (response: MalTokenResponse, now?: number) => Date;
|
|
12261
|
+
|
|
12262
|
+
/**
|
|
12263
|
+
* {@link buildMyAnimeListApi} is the wiring helper that builds the {@link MyAnimeListApi} from provider-owned {@link MalCredentials}.
|
|
12264
|
+
*
|
|
12265
|
+
* It resolves credentials through {@link resolveMalCredentials} and composes {@link MalAnimeOperation} and {@link MalUserOperation} into the {@link MyAnimeListApi} facade exposed as `aniLink.mal`. Transport settings from {@link MalCredentials} flow to `MalRequestOptions` without leaking between providers.
|
|
12266
|
+
*
|
|
12267
|
+
* @param credentials - MAL access and OAuth credentials plus transport settings; a {@link MalCredentials} slot.
|
|
12268
|
+
* @returns The composed {@link MyAnimeListApi} surface.
|
|
12269
|
+
* @example
|
|
12270
|
+
* ```typescript
|
|
12271
|
+
* const api = buildMyAnimeListApi({ accessToken: "mal-token" });
|
|
12272
|
+
* const anime = await api.anime.get(21);
|
|
12273
|
+
* ```
|
|
12274
|
+
* @see https://myanimelist.net/apiconfig/references/api/v2
|
|
12275
|
+
*/
|
|
12276
|
+
declare function buildMyAnimeListApi(credentials?: MalCredentials): MyAnimeListApi;
|
|
12277
|
+
|
|
12278
|
+
/**
|
|
12279
|
+
* {@link AniLink} is the public entry point for interacting with the AniList GraphQL
|
|
12280
|
+
* and MyAnimeList REST APIs. A single instance composes an {@link AniListApi}
|
|
12281
|
+
* (under `anilist`) and a {@link MyAnimeListApi} (under `mal`), each keeping its
|
|
12282
|
+
* own credentials and transport settings.
|
|
11351
12283
|
*/
|
|
11352
12284
|
declare class AniLink {
|
|
11353
12285
|
/**
|
|
11354
|
-
*
|
|
12286
|
+
* The AniList GraphQL API surface, a {@link AniListApi} composed from the
|
|
12287
|
+
* query, mutation, custom, and helper groups.
|
|
11355
12288
|
* @public
|
|
11356
12289
|
*/
|
|
11357
12290
|
anilist: AniListApi;
|
|
12291
|
+
/** The MyAnimeList REST API methods, a {@link MyAnimeListApi} exposed under the `mal` namespace. */
|
|
12292
|
+
mal: MyAnimeListApi;
|
|
11358
12293
|
/**
|
|
11359
|
-
*
|
|
11360
|
-
*
|
|
11361
|
-
*
|
|
11362
|
-
|
|
11363
|
-
mal?: unknown;
|
|
11364
|
-
/**
|
|
11365
|
-
* Creates a new AniLink instance. The `authToken` parameter is optional and only required for authenticated queries and mutations. If no `authToken` is provided, only public queries will be available. You are able to create multiple AniLink instances with different `authToken`s.
|
|
12294
|
+
* Creates a new {@link AniLink} instance. The `authToken` parameter is optional and only
|
|
12295
|
+
* required for authenticated queries and mutations; without it only public queries are
|
|
12296
|
+
* available. Multiple instances can hold different `authToken`s, each exposing an
|
|
12297
|
+
* {@link AniListApi} under `anilist` and a {@link MyAnimeListApi} under `mal`.
|
|
11366
12298
|
*
|
|
11367
|
-
* Alternatively, pass a per-provider
|
|
12299
|
+
* Alternatively, pass a per-provider {@link AniLinkCredentials} object: each provider
|
|
11368
12300
|
* owns its own credentials shape, and credentials given under one key are
|
|
11369
12301
|
* never applied to another provider's requests.
|
|
11370
12302
|
* @param {string | AniLinkCredentials} [authToken] - The authentication token to use for AniList API requests, or a per-provider credentials object (`{ anilist?: …, mal?: … }`).
|
|
@@ -11390,8 +12322,8 @@ declare class AniLink {
|
|
|
11390
12322
|
* });
|
|
11391
12323
|
* ```
|
|
11392
12324
|
*/
|
|
11393
|
-
constructor(authToken?: string | AniLinkCredentials, options?: AniLinkOptions
|
|
12325
|
+
constructor(authToken?: string | AniLinkCredentials, options?: AniLinkOptions);
|
|
11394
12326
|
}
|
|
11395
12327
|
|
|
11396
|
-
export { ANILIST_AUTHORIZE_URL, ANILIST_TOKEN_URL, AniLink, AniLinkApiError, AniLinkAuthError, AniLinkError, AniLinkErrorCodes, AniLinkGraphQLError, AniLinkNetworkError, AniLinkRestError, AniLinkValidationError, buildAuthorizationUrl, getAccessToken, getTokenExpiry, paginate, paginateChunks, paginatePages, refreshAccessToken };
|
|
11397
|
-
export type { AniLinkCredentials, AniLinkErrorCode, AniLinkOptions, AniListApi, AniListCredentials, AniListTokenResponse, ChunkPaginateOptions, ChunkPaginateResult, MalCredentials, PaginateOptions, PaginateResult, ProviderCredentials, RateLimitInfo };
|
|
12328
|
+
export { ANILIST_AUTHORIZE_URL, ANILIST_TOKEN_URL, AniLink, AniLinkApiError, AniLinkAuthError, AniLinkError, AniLinkErrorCodes, AniLinkGraphQLError, AniLinkNetworkError, AniLinkRestError, AniLinkValidationError, MAL_API_BASE_URL, MAL_API_REFERENCE, MAL_AUTHORIZE_URL, MAL_TOKEN_URL, buildAuthorizationUrl, buildMalAuthorizationUrl, buildMyAnimeListApi, buildProviderClients, getAccessToken, getMalAccessToken, getMalTokenExpiry, getTokenExpiry, paginate, paginateChunks, paginatePages, refreshAccessToken, refreshMalAccessToken };
|
|
12329
|
+
export type { AniLinkCredentials, AniLinkErrorCode, AniLinkOptions, AniListApi, AniListCredentials, AniListTokenResponse, ChunkPaginateOptions, ChunkPaginateResult, MalAnime as M, MalAuthorizationCodeRequest, MalCredentials, MalRefreshTokenRequest, MalTokenResponse, MyAnimeListApi, PaginateOptions, PaginateResult, ProviderClients, ProviderCredentials, ProviderFactory, ProviderId, RequestOptions as R, RateLimitInfo, RequestAuth, RequestAuthInput, ResolvedProviderCredentials, MalPicture as a, MalRequestOptions as b, MalUser as c, MyAnimeListAnimeApi as d, MyAnimeListUserApi as e };
|