aniql 1.5.0 → 2.0.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 CHANGED
@@ -15,29 +15,36 @@
15
15
 
16
16
  ## Usage
17
17
 
18
- `aniql` is available via server-side (Bun & Node.js), as well as in browser.
18
+ `aniql` is ESM-only and works in Bun, modern Node.js, and browsers with `fetch`.
19
19
 
20
20
  ```ts
21
- import { AniQLClient } from "aniql";
21
+ import { AniQLClient } from 'aniql';
22
22
 
23
- const client = new AniQLClient({
24
- token: Bun.env.TOKEN,
25
- });
23
+ const client = new AniQLClient(); // `new AniQLClient({ client_id: 123 })` also works
26
24
 
27
25
  const user = await client.query({
28
- User: {
29
- __args: { name: "itss0n1c" },
30
- id: true,
31
- name: true,
32
- avatar: {
33
- large: true,
34
- medium: true,
35
- },
36
- },
26
+ User: {
27
+ __args: { name: 'itss0n1c' },
28
+ id: true,
29
+ name: true,
30
+ avatar: {
31
+ large: true,
32
+ medium: true,
33
+ },
34
+ },
37
35
  });
38
36
  console.log(user.User);
39
37
  ```
40
38
 
39
+ Public AniList queries don't require OAuth or send a client ID. If you already
40
+ have an access token, use `new AniQLClient({ token: accessToken })`, or provide
41
+ `get_token: () => accessToken` if it can change. Pass `{ token }` as the second
42
+ argument to `query` or `mutation` to override the client token for one request.
43
+ Both the client and individual requests accept an `AbortSignal` via `signal`.
44
+
45
+ Set `auth` only if you use `auth_url` or `auth_exchange`. For OAuth code
46
+ exchange, keep the client secret on your server.
47
+
41
48
  ## Note
42
49
 
43
50
  This library is not affiliated with AniList, and is not an official AniList library.
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- //#region lib/genql/schema.d.ts
1
+ /** biome-ignore-all lint/suspicious/noExplicitAny: necessary for genql */
2
2
  export type Scalars = {
3
3
  Int: number;
4
4
  Boolean: boolean;
@@ -47,6 +47,8 @@ export interface Query {
47
47
  Following: (User | null);
48
48
  /** Follower query */
49
49
  Follower: (User | null);
50
+ /** Mutual follower query */
51
+ MutualFollower: (User | null);
50
52
  /** Thread query */
51
53
  Thread: (Thread | null);
52
54
  /** Comment query */
@@ -79,6 +81,7 @@ export interface Page {
79
81
  notifications: ((NotificationUnion | null)[] | null);
80
82
  followers: ((User | null)[] | null);
81
83
  following: ((User | null)[] | null);
84
+ mutualFollowers: ((User | null)[] | null);
82
85
  activities: ((ActivityUnion | null)[] | null);
83
86
  activityReplies: ((ActivityReply | null)[] | null);
84
87
  threads: ((Thread | null)[] | null);
@@ -137,6 +140,8 @@ export interface User {
137
140
  siteUrl: (Scalars['String'] | null);
138
141
  /** The donation tier of the user */
139
142
  donatorTier: (Scalars['Int'] | null);
143
+ /** The user's account privacy setting */
144
+ privacy: (UserPrivacy | null);
140
145
  /** Custom donation badge text */
141
146
  donatorBadge: (Scalars['String'] | null);
142
147
  /** The user's moderator roles if they are a site moderator */
@@ -173,6 +178,12 @@ export interface UserOptions {
173
178
  titleLanguage: (UserTitleLanguage | null);
174
179
  /** Whether the user has enabled viewing of 18+ content */
175
180
  displayAdultContent: (Scalars['Boolean'] | null);
181
+ /** Whether the user wants to see adult media in search results by default. Sub-option of displayAdultContent */
182
+ includeAdultContentInSearch: (Scalars['Boolean'] | null);
183
+ /** Whether the user wants to see adult media in quick search results by default. Sub-option of displayAdultContent */
184
+ includeAdultContentInQuickSearch: (Scalars['Boolean'] | null);
185
+ /** Whether the user wants to see others' activities for adult media. Sub-option of displayAdultContent */
186
+ displayAdultActivities: (Scalars['Boolean'] | null);
176
187
  /** Whether the user receives notifications when a show they are watching aires */
177
188
  airingNotifications: (Scalars['Boolean'] | null);
178
189
  /** Profile highlight color (blue, purple, pink, orange, red, green, gray) */
@@ -245,7 +256,7 @@ export interface MediaListTypeOptions {
245
256
  /** If the completed sections of the list should be separated by format */
246
257
  splitCompletedSectionByFormat: (Scalars['Boolean'] | null);
247
258
  /**
248
- * @deprecated This field has not yet been fully implemented and may change without warning
259
+ * @deprecated No longer used
249
260
  * The list theme options
250
261
  */
251
262
  theme: (Scalars['Json'] | null);
@@ -361,8 +372,13 @@ export interface Media {
361
372
  genres: ((Scalars['String'] | null)[] | null);
362
373
  /** Alternative titles of the media */
363
374
  synonyms: ((Scalars['String'] | null)[] | null);
364
- /** A weighted average score of all the user's scores of the media */
375
+ /**
376
+ * @deprecated Use weightedScore
377
+ * A weighted average score of all the users' scores of the media
378
+ */
365
379
  averageScore: (Scalars['Int'] | null);
380
+ /** A weighted average score of all the users' scores of the media */
381
+ weightedScore: (Scalars['Int'] | null);
366
382
  /** Mean score of all the user's scores of the media */
367
383
  meanScore: (Scalars['Int'] | null);
368
384
  /** The number of users with the media on their list */
@@ -793,8 +809,13 @@ export interface MediaTrend {
793
809
  date: Scalars['Int'];
794
810
  /** The amount of media activity on the day */
795
811
  trending: Scalars['Int'];
796
- /** A weighted average score of all the user's scores of the media */
812
+ /**
813
+ * @deprecated Use weightedScore
814
+ * A weighted average score of all the user's scores of the media
815
+ */
797
816
  averageScore: (Scalars['Int'] | null);
817
+ /** A weighted average score of all the user's scores of the media */
818
+ weightedScore: (Scalars['Int'] | null);
798
819
  /** The number of users with the media on their list */
799
820
  popularity: (Scalars['Int'] | null);
800
821
  /** The number of users with watching/reading the media */
@@ -1015,7 +1036,7 @@ export interface StatusDistribution {
1015
1036
  export interface AiringProgression {
1016
1037
  /** The episode the stats were recorded at. .5 is the mid point between 2 episodes airing dates. */
1017
1038
  episode: (Scalars['Float'] | null);
1018
- /** The average score for the media */
1039
+ /** The weighted average score for the media */
1019
1040
  score: (Scalars['Float'] | null);
1020
1041
  /** The amount of users watching the anime */
1021
1042
  watching: (Scalars['Int'] | null);
@@ -1161,6 +1182,8 @@ export interface UserStudioStatistic {
1161
1182
  studio: (Studio | null);
1162
1183
  __typename: 'UserStudioStatistic';
1163
1184
  }
1185
+ /** User's account privacy setting */
1186
+ export type UserPrivacy = 'PUBLIC' | 'SEMI_PUBLIC' | 'PRIVATE';
1164
1187
  /** Mod role enums */
1165
1188
  export type ModRole = 'ADMIN' | 'LEAD_DEVELOPER' | 'DEVELOPER' | 'LEAD_COMMUNITY' | 'COMMUNITY' | 'DISCORD_COMMUNITY' | 'LEAD_ANIME_DATA' | 'ANIME_DATA' | 'LEAD_MANGA_DATA' | 'MANGA_DATA' | 'LEAD_SOCIAL_MEDIA' | 'SOCIAL_MEDIA' | 'RETIRED' | 'CHARACTER_DATA' | 'STAFF_DATA';
1166
1189
  /** A user's statistics */
@@ -2006,6 +2029,8 @@ export interface Mutation {
2006
2029
  ToggleLikeV2: (LikeableUnion | null);
2007
2030
  /** Toggle the un/following of a user */
2008
2031
  ToggleFollow: (User | null);
2032
+ /** Removes a follower */
2033
+ DeleteFollower: (User | null);
2009
2034
  /** Favourite or unfavourite an anime, manga, character, staff member, or studio */
2010
2035
  ToggleFavourite: (Favourites | null);
2011
2036
  /** Update the order favourites are displayed in */
@@ -2051,6 +2076,7 @@ export interface InternalPage {
2051
2076
  reports: ((Report | null)[] | null);
2052
2077
  modActions: ((ModAction | null)[] | null);
2053
2078
  userBlockSearch: ((User | null)[] | null);
2079
+ recentlyRepliedActivities: ((ActivityUnion | null)[] | null);
2054
2080
  /** The pagination information */
2055
2081
  pageInfo: (PageInfo | null);
2056
2082
  users: ((User | null)[] | null);
@@ -2064,6 +2090,7 @@ export interface InternalPage {
2064
2090
  notifications: ((NotificationUnion | null)[] | null);
2065
2091
  followers: ((User | null)[] | null);
2066
2092
  following: ((User | null)[] | null);
2093
+ mutualFollowers: ((User | null)[] | null);
2067
2094
  activities: ((ActivityUnion | null)[] | null);
2068
2095
  activityReplies: ((ActivityReply | null)[] | null);
2069
2096
  threads: ((Thread | null)[] | null);
@@ -2226,6 +2253,7 @@ export interface Report {
2226
2253
  /** When the entry data was created */
2227
2254
  createdAt: (Scalars['Int'] | null);
2228
2255
  cleared: (Scalars['Boolean'] | null);
2256
+ assignee: (User | null);
2229
2257
  __typename: 'Report';
2230
2258
  }
2231
2259
  export interface ModAction {
@@ -2261,11 +2289,11 @@ export interface CharacterSubmissionEdge {
2261
2289
  }
2262
2290
  /** User data for moderators */
2263
2291
  export interface UserModData {
2264
- alts: ((User | null)[] | null);
2265
2292
  bans: (Scalars['Json'] | null);
2293
+ browserAlts: ((User | null)[] | null);
2266
2294
  ip: (Scalars['Json'] | null);
2295
+ ipAlts: ((User | null)[] | null);
2267
2296
  counts: (Scalars['Json'] | null);
2268
- privacy: (Scalars['Int'] | null);
2269
2297
  email: (Scalars['String'] | null);
2270
2298
  __typename: 'UserModData';
2271
2299
  }
@@ -2325,6 +2353,8 @@ export interface QueryGenqlSelection {
2325
2353
  licensedById?: (Scalars['Int'] | null);
2326
2354
  /** Filter by the media's average score */
2327
2355
  averageScore?: (Scalars['Int'] | null);
2356
+ /** Filter by the media's average score */
2357
+ weightedScore?: (Scalars['Int'] | null);
2328
2358
  /** Filter by the number of users with this media on their list */
2329
2359
  popularity?: (Scalars['Int'] | null);
2330
2360
  /** Filter by the source type of the media */
@@ -2409,6 +2439,12 @@ export interface QueryGenqlSelection {
2409
2439
  averageScore_greater?: (Scalars['Int'] | null);
2410
2440
  /** Filter by the media's average score */
2411
2441
  averageScore_lesser?: (Scalars['Int'] | null);
2442
+ /** Filter by the media's average score */
2443
+ weightedScore_not?: (Scalars['Int'] | null);
2444
+ /** Filter by the media's average score */
2445
+ weightedScore_greater?: (Scalars['Int'] | null);
2446
+ /** Filter by the media's average score */
2447
+ weightedScore_lesser?: (Scalars['Int'] | null);
2412
2448
  /** Filter by the number of users with this media on their list */
2413
2449
  popularity_not?: (Scalars['Int'] | null);
2414
2450
  /** Filter by the number of users with this media on their list */
@@ -2436,6 +2472,8 @@ export interface QueryGenqlSelection {
2436
2472
  trending?: (Scalars['Int'] | null);
2437
2473
  /** Filter by score */
2438
2474
  averageScore?: (Scalars['Int'] | null);
2475
+ /** Filter by weighted scores */
2476
+ weightedScore?: (Scalars['Int'] | null);
2439
2477
  /** Filter by popularity */
2440
2478
  popularity?: (Scalars['Int'] | null);
2441
2479
  /** Filter by episode number */
@@ -2464,6 +2502,12 @@ export interface QueryGenqlSelection {
2464
2502
  averageScore_lesser?: (Scalars['Int'] | null);
2465
2503
  /** Filter by score */
2466
2504
  averageScore_not?: (Scalars['Int'] | null);
2505
+ /** Filter by weighted scores */
2506
+ weightedScore_greater?: (Scalars['Int'] | null);
2507
+ /** Filter by weighted scores */
2508
+ weightedScore_lesser?: (Scalars['Int'] | null);
2509
+ /** Filter by weighted scores */
2510
+ weightedScore_not?: (Scalars['Int'] | null);
2467
2511
  /** Filter by popularity */
2468
2512
  popularity_greater?: (Scalars['Int'] | null);
2469
2513
  /** Filter by popularity */
@@ -2818,6 +2862,15 @@ export interface QueryGenqlSelection {
2818
2862
  sort?: ((UserSort | null)[] | null);
2819
2863
  };
2820
2864
  });
2865
+ /** Mutual follower query */
2866
+ MutualFollower?: (UserGenqlSelection & {
2867
+ __args: {
2868
+ /** User id to fetch mutual followers for */
2869
+ userId: Scalars['Int'];
2870
+ /** The order the results will be returned in */
2871
+ sort?: ((UserSort | null)[] | null);
2872
+ };
2873
+ });
2821
2874
  /** Thread query */
2822
2875
  Thread?: (ThreadGenqlSelection & {
2823
2876
  __args?: {
@@ -2972,6 +3025,8 @@ export interface PageGenqlSelection {
2972
3025
  licensedById?: (Scalars['Int'] | null);
2973
3026
  /** Filter by the media's average score */
2974
3027
  averageScore?: (Scalars['Int'] | null);
3028
+ /** Filter by the media's average score */
3029
+ weightedScore?: (Scalars['Int'] | null);
2975
3030
  /** Filter by the number of users with this media on their list */
2976
3031
  popularity?: (Scalars['Int'] | null);
2977
3032
  /** Filter by the source type of the media */
@@ -3056,6 +3111,12 @@ export interface PageGenqlSelection {
3056
3111
  averageScore_greater?: (Scalars['Int'] | null);
3057
3112
  /** Filter by the media's average score */
3058
3113
  averageScore_lesser?: (Scalars['Int'] | null);
3114
+ /** Filter by the media's average score */
3115
+ weightedScore_not?: (Scalars['Int'] | null);
3116
+ /** Filter by the media's average score */
3117
+ weightedScore_greater?: (Scalars['Int'] | null);
3118
+ /** Filter by the media's average score */
3119
+ weightedScore_lesser?: (Scalars['Int'] | null);
3059
3120
  /** Filter by the number of users with this media on their list */
3060
3121
  popularity_not?: (Scalars['Int'] | null);
3061
3122
  /** Filter by the number of users with this media on their list */
@@ -3230,6 +3291,8 @@ export interface PageGenqlSelection {
3230
3291
  trending?: (Scalars['Int'] | null);
3231
3292
  /** Filter by score */
3232
3293
  averageScore?: (Scalars['Int'] | null);
3294
+ /** Filter by weighted scores */
3295
+ weightedScore?: (Scalars['Int'] | null);
3233
3296
  /** Filter by popularity */
3234
3297
  popularity?: (Scalars['Int'] | null);
3235
3298
  /** Filter by episode number */
@@ -3258,6 +3321,12 @@ export interface PageGenqlSelection {
3258
3321
  averageScore_lesser?: (Scalars['Int'] | null);
3259
3322
  /** Filter by score */
3260
3323
  averageScore_not?: (Scalars['Int'] | null);
3324
+ /** Filter by weighted scores */
3325
+ weightedScore_greater?: (Scalars['Int'] | null);
3326
+ /** Filter by weighted scores */
3327
+ weightedScore_lesser?: (Scalars['Int'] | null);
3328
+ /** Filter by weighted scores */
3329
+ weightedScore_not?: (Scalars['Int'] | null);
3261
3330
  /** Filter by popularity */
3262
3331
  popularity_greater?: (Scalars['Int'] | null);
3263
3332
  /** Filter by popularity */
@@ -3300,6 +3369,14 @@ export interface PageGenqlSelection {
3300
3369
  sort?: ((UserSort | null)[] | null);
3301
3370
  };
3302
3371
  });
3372
+ mutualFollowers?: (UserGenqlSelection & {
3373
+ __args: {
3374
+ /** User id to fetch mutual followers for */
3375
+ userId: Scalars['Int'];
3376
+ /** The order the results will be returned in */
3377
+ sort?: ((UserSort | null)[] | null);
3378
+ };
3379
+ });
3303
3380
  activities?: (ActivityUnionGenqlSelection & {
3304
3381
  __args?: {
3305
3382
  /** Filter by the activity id */
@@ -3505,6 +3582,8 @@ export interface UserGenqlSelection {
3505
3582
  siteUrl?: boolean | number;
3506
3583
  /** The donation tier of the user */
3507
3584
  donatorTier?: boolean | number;
3585
+ /** The user's account privacy setting */
3586
+ privacy?: boolean | number;
3508
3587
  /** Custom donation badge text */
3509
3588
  donatorBadge?: boolean | number;
3510
3589
  /** The user's moderator roles if they are a site moderator */
@@ -3543,6 +3622,12 @@ export interface UserOptionsGenqlSelection {
3543
3622
  titleLanguage?: boolean | number;
3544
3623
  /** Whether the user has enabled viewing of 18+ content */
3545
3624
  displayAdultContent?: boolean | number;
3625
+ /** Whether the user wants to see adult media in search results by default. Sub-option of displayAdultContent */
3626
+ includeAdultContentInSearch?: boolean | number;
3627
+ /** Whether the user wants to see adult media in quick search results by default. Sub-option of displayAdultContent */
3628
+ includeAdultContentInQuickSearch?: boolean | number;
3629
+ /** Whether the user wants to see others' activities for adult media. Sub-option of displayAdultContent */
3630
+ displayAdultActivities?: boolean | number;
3546
3631
  /** Whether the user receives notifications when a show they are watching aires */
3547
3632
  airingNotifications?: boolean | number;
3548
3633
  /** Profile highlight color (blue, purple, pink, orange, red, green, gray) */
@@ -3609,7 +3694,7 @@ export interface MediaListTypeOptionsGenqlSelection {
3609
3694
  /** If the completed sections of the list should be separated by format */
3610
3695
  splitCompletedSectionByFormat?: boolean | number;
3611
3696
  /**
3612
- * @deprecated This field has not yet been fully implemented and may change without warning
3697
+ * @deprecated No longer used
3613
3698
  * The list theme options
3614
3699
  */
3615
3700
  theme?: boolean | number;
@@ -3794,8 +3879,13 @@ export interface MediaGenqlSelection {
3794
3879
  genres?: boolean | number;
3795
3880
  /** Alternative titles of the media */
3796
3881
  synonyms?: boolean | number;
3797
- /** A weighted average score of all the user's scores of the media */
3882
+ /**
3883
+ * @deprecated Use weightedScore
3884
+ * A weighted average score of all the users' scores of the media
3885
+ */
3798
3886
  averageScore?: boolean | number;
3887
+ /** A weighted average score of all the users' scores of the media */
3888
+ weightedScore?: boolean | number;
3799
3889
  /** Mean score of all the user's scores of the media */
3800
3890
  meanScore?: boolean | number;
3801
3891
  /** The number of users with the media on their list */
@@ -4367,8 +4457,13 @@ export interface MediaTrendGenqlSelection {
4367
4457
  date?: boolean | number;
4368
4458
  /** The amount of media activity on the day */
4369
4459
  trending?: boolean | number;
4370
- /** A weighted average score of all the user's scores of the media */
4460
+ /**
4461
+ * @deprecated Use weightedScore
4462
+ * A weighted average score of all the user's scores of the media
4463
+ */
4371
4464
  averageScore?: boolean | number;
4465
+ /** A weighted average score of all the user's scores of the media */
4466
+ weightedScore?: boolean | number;
4372
4467
  /** The number of users with the media on their list */
4373
4468
  popularity?: boolean | number;
4374
4469
  /** The number of users with watching/reading the media */
@@ -4607,7 +4702,7 @@ export interface StatusDistributionGenqlSelection {
4607
4702
  export interface AiringProgressionGenqlSelection {
4608
4703
  /** The episode the stats were recorded at. .5 is the mid point between 2 episodes airing dates. */
4609
4704
  episode?: boolean | number;
4610
- /** The average score for the media */
4705
+ /** The weighted average score for the media */
4611
4706
  score?: boolean | number;
4612
4707
  /** The amount of users watching the anime */
4613
4708
  watching?: boolean | number;
@@ -5781,6 +5876,12 @@ export interface MutationGenqlSelection {
5781
5876
  titleLanguage?: (UserTitleLanguage | null);
5782
5877
  /** If the user should see media marked as adult-only */
5783
5878
  displayAdultContent?: (Scalars['Boolean'] | null);
5879
+ /** If the user should see media marked as adult-only in search results */
5880
+ includeAdultContentInSearch?: (Scalars['Boolean'] | null);
5881
+ /** If the user should see media marked as adult-only in quick search results */
5882
+ includeAdultContentInQuickSearch?: (Scalars['Boolean'] | null);
5883
+ /** If the user should see others' activities for media marked as adult */
5884
+ displayAdultActivities?: (Scalars['Boolean'] | null);
5784
5885
  /** If the user should get notifications when a show they are watching aires */
5785
5886
  airingNotifications?: (Scalars['Boolean'] | null);
5786
5887
  /** The user's list scoring system */
@@ -5789,7 +5890,7 @@ export interface MutationGenqlSelection {
5789
5890
  rowOrder?: (Scalars['String'] | null);
5790
5891
  /** Profile highlight color */
5791
5892
  profileColor?: (Scalars['String'] | null);
5792
- /** Profile highlight color (Max: 24) */
5893
+ /** User's donator badge, only displayed for donators (Max: 24) */
5793
5894
  donatorBadge?: (Scalars['String'] | null);
5794
5895
  /** Notification options */
5795
5896
  notificationOptions?: ((NotificationOptionInput | null)[] | null);
@@ -6004,6 +6105,13 @@ export interface MutationGenqlSelection {
6004
6105
  userId?: (Scalars['Int'] | null);
6005
6106
  };
6006
6107
  });
6108
+ /** Removes a follower */
6109
+ DeleteFollower?: (UserGenqlSelection & {
6110
+ __args?: {
6111
+ /** The id of the user to remove the follower status of */
6112
+ userId?: (Scalars['Int'] | null);
6113
+ };
6114
+ });
6007
6115
  /** Favourite or unfavourite an anime, manga, character, staff member, or studio */
6008
6116
  ToggleFavourite?: (FavouritesGenqlSelection & {
6009
6117
  __args?: {
@@ -6095,7 +6203,7 @@ export interface MutationGenqlSelection {
6095
6203
  id?: (Scalars['Int'] | null);
6096
6204
  /** The title of the thread (Min: 6, Max: 120) */
6097
6205
  title?: (Scalars['String'] | null);
6098
- /** The main text body of the thread (Max: 30000) */
6206
+ /** The main text body of the thread (Min: 10, Max: 30000) */
6099
6207
  body?: (Scalars['String'] | null);
6100
6208
  /** Forum categories the thread should be within */
6101
6209
  categories?: ((Scalars['Int'] | null)[] | null);
@@ -6293,6 +6401,12 @@ export interface InternalPageGenqlSelection {
6293
6401
  search?: (Scalars['String'] | null);
6294
6402
  };
6295
6403
  });
6404
+ recentlyRepliedActivities?: (ActivityUnionGenqlSelection & {
6405
+ __args?: {
6406
+ /** Filter by the owner user id */
6407
+ userId?: (Scalars['Int'] | null);
6408
+ };
6409
+ });
6296
6410
  /** The pagination information */
6297
6411
  pageInfo?: PageInfoGenqlSelection;
6298
6412
  users?: (UserGenqlSelection & {
@@ -6355,6 +6469,8 @@ export interface InternalPageGenqlSelection {
6355
6469
  licensedById?: (Scalars['Int'] | null);
6356
6470
  /** Filter by the media's average score */
6357
6471
  averageScore?: (Scalars['Int'] | null);
6472
+ /** Filter by the media's average score */
6473
+ weightedScore?: (Scalars['Int'] | null);
6358
6474
  /** Filter by the number of users with this media on their list */
6359
6475
  popularity?: (Scalars['Int'] | null);
6360
6476
  /** Filter by the source type of the media */
@@ -6439,6 +6555,12 @@ export interface InternalPageGenqlSelection {
6439
6555
  averageScore_greater?: (Scalars['Int'] | null);
6440
6556
  /** Filter by the media's average score */
6441
6557
  averageScore_lesser?: (Scalars['Int'] | null);
6558
+ /** Filter by the media's average score */
6559
+ weightedScore_not?: (Scalars['Int'] | null);
6560
+ /** Filter by the media's average score */
6561
+ weightedScore_greater?: (Scalars['Int'] | null);
6562
+ /** Filter by the media's average score */
6563
+ weightedScore_lesser?: (Scalars['Int'] | null);
6442
6564
  /** Filter by the number of users with this media on their list */
6443
6565
  popularity_not?: (Scalars['Int'] | null);
6444
6566
  /** Filter by the number of users with this media on their list */
@@ -6613,6 +6735,8 @@ export interface InternalPageGenqlSelection {
6613
6735
  trending?: (Scalars['Int'] | null);
6614
6736
  /** Filter by score */
6615
6737
  averageScore?: (Scalars['Int'] | null);
6738
+ /** Filter by weighted scores */
6739
+ weightedScore?: (Scalars['Int'] | null);
6616
6740
  /** Filter by popularity */
6617
6741
  popularity?: (Scalars['Int'] | null);
6618
6742
  /** Filter by episode number */
@@ -6641,6 +6765,12 @@ export interface InternalPageGenqlSelection {
6641
6765
  averageScore_lesser?: (Scalars['Int'] | null);
6642
6766
  /** Filter by score */
6643
6767
  averageScore_not?: (Scalars['Int'] | null);
6768
+ /** Filter by weighted scores */
6769
+ weightedScore_greater?: (Scalars['Int'] | null);
6770
+ /** Filter by weighted scores */
6771
+ weightedScore_lesser?: (Scalars['Int'] | null);
6772
+ /** Filter by weighted scores */
6773
+ weightedScore_not?: (Scalars['Int'] | null);
6644
6774
  /** Filter by popularity */
6645
6775
  popularity_greater?: (Scalars['Int'] | null);
6646
6776
  /** Filter by popularity */
@@ -6683,6 +6813,14 @@ export interface InternalPageGenqlSelection {
6683
6813
  sort?: ((UserSort | null)[] | null);
6684
6814
  };
6685
6815
  });
6816
+ mutualFollowers?: (UserGenqlSelection & {
6817
+ __args: {
6818
+ /** User id to fetch mutual followers for */
6819
+ userId: Scalars['Int'];
6820
+ /** The order the results will be returned in */
6821
+ sort?: ((UserSort | null)[] | null);
6822
+ };
6823
+ });
6686
6824
  activities?: (ActivityUnionGenqlSelection & {
6687
6825
  __args?: {
6688
6826
  /** Filter by the activity id */
@@ -6984,6 +7122,7 @@ export interface ReportGenqlSelection {
6984
7122
  /** When the entry data was created */
6985
7123
  createdAt?: boolean | number;
6986
7124
  cleared?: boolean | number;
7125
+ assignee?: UserGenqlSelection;
6987
7126
  __typename?: boolean | number;
6988
7127
  __scalar?: boolean | number;
6989
7128
  }
@@ -7073,11 +7212,11 @@ export interface StaffNameInput {
7073
7212
  }
7074
7213
  /** User data for moderators */
7075
7214
  export interface UserModDataGenqlSelection {
7076
- alts?: UserGenqlSelection;
7077
7215
  bans?: boolean | number;
7216
+ browserAlts?: UserGenqlSelection;
7078
7217
  ip?: boolean | number;
7218
+ ipAlts?: UserGenqlSelection;
7079
7219
  counts?: boolean | number;
7080
- privacy?: boolean | number;
7081
7220
  email?: boolean | number;
7082
7221
  __typename?: boolean | number;
7083
7222
  __scalar?: boolean | number;
@@ -7745,6 +7884,11 @@ export declare const enumUserStatisticsSort: {
7745
7884
  MEAN_SCORE: "MEAN_SCORE";
7746
7885
  MEAN_SCORE_DESC: "MEAN_SCORE_DESC";
7747
7886
  };
7887
+ export declare const enumUserPrivacy: {
7888
+ PUBLIC: "PUBLIC";
7889
+ SEMI_PUBLIC: "SEMI_PUBLIC";
7890
+ PRIVATE: "PRIVATE";
7891
+ };
7748
7892
  export declare const enumModRole: {
7749
7893
  ADMIN: "ADMIN";
7750
7894
  LEAD_DEVELOPER: "LEAD_DEVELOPER";
@@ -7881,14 +8025,6 @@ export declare const enumModActionType: {
7881
8025
  RESET: "RESET";
7882
8026
  ANON: "ANON";
7883
8027
  };
7884
- //#endregion
7885
- //#region lib/genql/runtime/types.d.ts
7886
- interface ExecutionResult<TData = {
7887
- [key: string]: any;
7888
- }> {
7889
- errors?: Array<Error>;
7890
- data?: TData | null;
7891
- }
7892
8028
  interface LinkedArgMap {
7893
8029
  [arg: string]: [LinkedType, string] | undefined;
7894
8030
  }
@@ -7904,8 +8040,6 @@ interface LinkedType {
7904
8040
  fields?: LinkedFieldMap;
7905
8041
  scalar?: string[];
7906
8042
  }
7907
- //#endregion
7908
- //#region lib/genql/runtime/generateGraphqlOperation.d.ts
7909
8043
  interface Fields {
7910
8044
  [field: string]: Request;
7911
8045
  }
@@ -7918,25 +8052,6 @@ interface GraphqlOperation {
7918
8052
  operationName?: string;
7919
8053
  }
7920
8054
  export declare const generateGraphqlOperation: (operation: "query" | "mutation" | "subscription", root: LinkedType, fields?: Fields) => GraphqlOperation;
7921
- //#endregion
7922
- //#region lib/genql/runtime/fetcher.d.ts
7923
- type BatchOptions = {
7924
- batchInterval?: number;
7925
- maxBatchSize?: number;
7926
- };
7927
- //#endregion
7928
- //#region lib/genql/runtime/createClient.d.ts
7929
- type Headers = HeadersInit | (() => HeadersInit) | (() => Promise<HeadersInit>);
7930
- type BaseFetcher = (operation: GraphqlOperation | GraphqlOperation[]) => Promise<ExecutionResult | ExecutionResult[]>;
7931
- type ClientOptions = Omit<RequestInit, 'body' | 'headers'> & {
7932
- url?: string;
7933
- batch?: BatchOptions | boolean;
7934
- fetcher?: BaseFetcher;
7935
- fetch?: Function;
7936
- headers?: Headers;
7937
- };
7938
- //#endregion
7939
- //#region lib/genql/runtime/typeSelection.d.ts
7940
8055
  type FieldsSelection<SRC extends Anify<DST> | undefined, DST> = {
7941
8056
  scalar: SRC;
7942
8057
  union: Handle__isUnion<SRC, DST>;
@@ -7956,8 +8071,6 @@ type Scalar = string | number | Date | boolean | null | undefined;
7956
8071
  type Anify<T> = { [P in keyof T]?: any; };
7957
8072
  type FieldsToRemove = '__isUnion' | '__scalar' | '__name' | '__args';
7958
8073
  type Nil = undefined | null;
7959
- //#endregion
7960
- //#region lib/genql/runtime/error.d.ts
7961
8074
  export declare class GenqlError extends Error {
7962
8075
  errors: Array<GraphqlError>;
7963
8076
  /**
@@ -7975,13 +8088,9 @@ interface GraphqlError {
7975
8088
  path?: string[];
7976
8089
  extensions?: Record<string, any>;
7977
8090
  }
7978
- //#endregion
7979
- //#region lib/genql/runtime/index.d.ts
7980
8091
  export declare const everything: {
7981
8092
  __scalar: boolean;
7982
8093
  };
7983
- //#endregion
7984
- //#region lib/index.d.ts
7985
8094
  export type Awaitable<T> = Promise<T> | T;
7986
8095
  interface AniQLAuthBase {
7987
8096
  client_id: number;
@@ -7996,13 +8105,18 @@ export interface AniQLAuthResToken extends AniQLAuthBase {
7996
8105
  }
7997
8106
  export type AniQLAuth = AniQLAuthResCode | AniQLAuthResToken;
7998
8107
  /** Options for the AniQL client. */
7999
- export interface AniQLOptions extends ClientOptions {
8000
- auth: AniQLAuth;
8108
+ export interface AniQLOptions {
8109
+ /** Optional AniList app ID for clients that don't use the OAuth helpers. */
8110
+ client_id?: number;
8111
+ auth?: AniQLAuth;
8112
+ token?: string;
8001
8113
  get_token?: () => Awaitable<string | undefined>;
8114
+ signal?: AbortSignal;
8002
8115
  }
8003
8116
  /** Options for the request made by the AniQL client. */
8004
8117
  export interface AniQLRequestOptions {
8005
8118
  token?: string;
8119
+ signal?: AbortSignal;
8006
8120
  }
8007
8121
  /**
8008
8122
  * AniQLClientError is an error class for errors that occur in the AniQL client.
@@ -8033,9 +8147,9 @@ export interface AniQLClientEvents {
8033
8147
  export declare class AniQLClient {
8034
8148
  #private;
8035
8149
  static base_url: string;
8036
- rate_limit: RateLimitData;
8150
+ get rate_limit(): RateLimitData;
8037
8151
  on<K extends keyof AniQLClientEvents>(event: K, listener: AniQLClientEvents[K][number]): this;
8038
- constructor(opts: AniQLOptions);
8152
+ constructor(opts?: AniQLOptions);
8039
8153
  query<R extends QueryGenqlSelection>(request: R & {
8040
8154
  __name?: string;
8041
8155
  }, opts?: AniQLRequestOptions): Promise<FieldsSelection<Query, R>>;
@@ -8060,6 +8174,4 @@ export declare class AniQLClient {
8060
8174
  refresh_token: string;
8061
8175
  }>;
8062
8176
  }
8063
- //#endregion
8064
- export type { FieldsSelection, GraphqlOperation };
8065
- //# sourceMappingURL=index.d.ts.map
8177
+ export type { FieldsSelection, GraphqlOperation };