@book000/pixivts 0.63.2-beta.9 → 0.64.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -722,6 +722,60 @@ interface MetaPages {
722
722
  /** Full set of image URLs for this page, including the original. */
723
723
  imageUrls: Required<ImageUrls>;
724
724
  }
725
+ /** A user who can accept requests, listed in {@link IllustRequest}. */
726
+ interface IllustRequestUser {
727
+ /** User ID. */
728
+ id: number;
729
+ /** Display name. */
730
+ name: string;
731
+ /** Account name (used in URLs). */
732
+ account: string;
733
+ /** Profile image URLs. */
734
+ profileImageUrls: ProfileImageUrls;
735
+ /** Whether the authenticated user follows this user. */
736
+ isFollowed: boolean;
737
+ /** Whether this user blocks the authenticated user's access. */
738
+ isAccessBlockingUser: boolean;
739
+ /** Whether this user accepts requests. */
740
+ isAcceptRequest: boolean;
741
+ }
742
+ /** A collaborating user sample in {@link IllustRequestCollaborateStatus}. */
743
+ interface IllustRequestCollaborateUserSample {
744
+ /** User ID, or `null` when the collaborator is anonymous. */
745
+ userId: number | null;
746
+ /** Whether the collaborator is shown anonymously. */
747
+ anonymousFlag: boolean;
748
+ }
749
+ /** Collaboration status of a request. */
750
+ interface IllustRequestCollaborateStatus {
751
+ /** Whether the work is being collaborated on. */
752
+ collaborating: boolean;
753
+ /** Whether collaborators are shown anonymously. */
754
+ collaborateAnonymousFlag: boolean;
755
+ /** Sample of collaborating users. */
756
+ collaborateUserSamples: IllustRequestCollaborateUserSample[];
757
+ }
758
+ /** Request details of an illust created from a request. */
759
+ interface IllustRequestInfo {
760
+ /** ID of the user who made the request, or `null` when not disclosed. */
761
+ fanUserId: number | null;
762
+ /** Collaboration status. */
763
+ collaborateStatus: IllustRequestCollaborateStatus;
764
+ /** Role of the author in the request (e.g. the requested creator). */
765
+ role: string;
766
+ }
767
+ /**
768
+ * Request (commission) metadata attached to an illust.
769
+ *
770
+ * The shape is based on a small number of live responses and may be
771
+ * incomplete.
772
+ */
773
+ interface IllustRequest {
774
+ /** Request details. */
775
+ requestInfo: IllustRequestInfo;
776
+ /** Users who can accept requests. */
777
+ requestUsers: IllustRequestUser[];
778
+ }
725
779
  /**
726
780
  * A pixiv illust or manga work item as returned by the API.
727
781
  *
@@ -793,6 +847,12 @@ interface PixivIllustItem {
793
847
  commentAccessControl?: number;
794
848
  /** Additional access-restriction attributes (may be absent). */
795
849
  restrictionAttributes?: string[];
850
+ /** Request (commission) metadata, or `null` when the work is not request-related. */
851
+ request?: IllustRequest | null;
852
+ /** Event banner data. Always `null` in observed responses; the non-null shape is unknown. */
853
+ eventBanners?: unknown;
854
+ /** Seasonal-effect animation URLs. Always `null` in observed responses; the non-null shape is unknown. */
855
+ seasonalEffectAnimationUrls?: unknown;
796
856
  }
797
857
  /** Stamp attached to an illust comment. */
798
858
  interface IllustCommentStamp {
@@ -928,7 +988,7 @@ interface PixivNovelItem {
928
988
  /**
929
989
  * A single comment on a novel.
930
990
  *
931
- * Returned by GET /v1/novel/comments.
991
+ * Returned by GET /v3/novel/comments.
932
992
  */
933
993
  interface NovelComment {
934
994
  /** Comment ID. */
@@ -941,7 +1001,13 @@ interface NovelComment {
941
1001
  user: PixivUser;
942
1002
  /** Whether this comment has replies. */
943
1003
  hasReplies?: boolean;
944
- /** The comment this is a reply to, or `{}` (empty object) for a top-level comment. */
1004
+ /** Stamp attached to this comment, or `null` when the comment has no stamp. */
1005
+ stamp?: IllustCommentStamp | null;
1006
+ /**
1007
+ * The comment this is a reply to, or `{}` (empty object) for a top-level comment.
1008
+ *
1009
+ * Not returned by `/v3/novel/comments`.
1010
+ */
945
1011
  parentComment?: NovelComment | Record<string, never>;
946
1012
  }
947
1013
  /** Novel series details returned by GET /v2/novel/series. */
@@ -1167,6 +1233,13 @@ interface IllustCommentsPage {
1167
1233
  /** Who is permitted to post comments (may be absent). */
1168
1234
  commentAccessControl?: number;
1169
1235
  }
1236
+ /** Page response for GET /v2/illust/comment/replies. */
1237
+ interface IllustCommentRepliesPage {
1238
+ /** Replies on this page. */
1239
+ comments: IllustComment[];
1240
+ /** URL to the next page, or `null` when this is the last page. */
1241
+ nextUrl: string | null;
1242
+ }
1170
1243
  /** Response shape for GET /v2/illust/bookmark/detail. */
1171
1244
  interface IllustBookmarkDetailResponse {
1172
1245
  /** Bookmark metadata for the requested illust. */
@@ -1199,6 +1272,33 @@ interface TrendingTagsIllustResponse {
1199
1272
  /** Currently trending tags, each with a representative illust. */
1200
1273
  trendTags: TrendingTagIllust[];
1201
1274
  }
1275
+ /** Response shape for GET /v1/trending-tags/novel. */
1276
+ interface TrendingTagsNovelResponse {
1277
+ /** Currently trending novel tags, each with a representative illust. */
1278
+ trendTags: TrendingTagIllust[];
1279
+ }
1280
+ /**
1281
+ * Response shape for GET /v1/search/popular-preview/illust.
1282
+ *
1283
+ * Single page: the endpoint returns no `next_url`.
1284
+ */
1285
+ interface IllustPopularPreviewResponse {
1286
+ /** Popular illusts for the search keyword. */
1287
+ illusts: PixivIllustItem[];
1288
+ /** Maximum number of results the search will return. */
1289
+ searchSpanLimit: number;
1290
+ }
1291
+ /**
1292
+ * Response shape for GET /v1/search/popular-preview/novel.
1293
+ *
1294
+ * Single page: the endpoint returns no `next_url`.
1295
+ */
1296
+ interface NovelPopularPreviewResponse {
1297
+ /** Popular novels for the search keyword. */
1298
+ novels: PixivNovelItem[];
1299
+ /** Maximum number of results the search will return. */
1300
+ searchSpanLimit: number;
1301
+ }
1202
1302
  /** Page response for GET /v1/manga/recommended. */
1203
1303
  interface MangaRecommendedPage {
1204
1304
  /** Recommended manga works. */
@@ -1210,6 +1310,65 @@ interface MangaRecommendedPage {
1210
1310
  /** URL to the next page, or `null` when this is the last page. */
1211
1311
  nextUrl: string | null;
1212
1312
  }
1313
+ /** A series on the authenticated user's watchlist. */
1314
+ interface WatchlistSeries {
1315
+ /** Series ID. */
1316
+ id: number;
1317
+ /** Series title. */
1318
+ title: string;
1319
+ /** URL of the series page. */
1320
+ url: string;
1321
+ /** Mask text shown in place of the title, or `null` when not masked. */
1322
+ maskText: string | null;
1323
+ /** Number of published works in the series. */
1324
+ publishedContentCount: number;
1325
+ /** Datetime (ISO 8601) of the most recently published work. */
1326
+ lastPublishedContentDatetime: string;
1327
+ /** ID of the most recently published work. */
1328
+ latestContentId: number;
1329
+ /** Author of the series. */
1330
+ user: PixivUser;
1331
+ }
1332
+ /** Page response for GET /v1/watchlist/manga. */
1333
+ interface WatchlistMangaPage {
1334
+ /** Manga series on this page. */
1335
+ series: WatchlistSeries[];
1336
+ /** URL to the next page, or `null` when this is the last page. */
1337
+ nextUrl: string | null;
1338
+ }
1339
+ /** Page response for GET /v1/watchlist/novel. */
1340
+ interface WatchlistNovelPage {
1341
+ /** Novel series on this page. */
1342
+ series: WatchlistSeries[];
1343
+ /** URL to the next page, or `null` when this is the last page. */
1344
+ nextUrl: string | null;
1345
+ }
1346
+ /** A pixivision spotlight article. */
1347
+ interface SpotlightArticle {
1348
+ /** Article ID. */
1349
+ id: number;
1350
+ /** Article title. */
1351
+ title: string;
1352
+ /** Article title without decoration. */
1353
+ pureTitle: string;
1354
+ /** Thumbnail image URL. */
1355
+ thumbnail: string;
1356
+ /** URL of the article on pixivision. */
1357
+ articleUrl: string;
1358
+ /** Publication date-time (ISO 8601 with offset). */
1359
+ publishDate: string;
1360
+ /** Kind of the article (e.g. `"spotlight"`, `"inspiration"`). */
1361
+ category: string;
1362
+ /** Display label of the article's subcategory. */
1363
+ subcategoryLabel: string;
1364
+ }
1365
+ /** Page response for GET /v1/spotlight/articles. */
1366
+ interface SpotlightArticlesPage {
1367
+ /** Spotlight articles on this page (10 per page). */
1368
+ spotlightArticles: SpotlightArticle[];
1369
+ /** URL to the next page, or `null` when this is the last page. */
1370
+ nextUrl: string | null;
1371
+ }
1213
1372
  /** Response shape for GET /v1/ugoira/metadata. */
1214
1373
  interface UgoiraMetadataResponse {
1215
1374
  /** Ugoira metadata (ZIP URLs and per-frame timings). */
@@ -1244,9 +1403,9 @@ interface NovelRecommendedPage {
1244
1403
  /** URL to the next page, or `null` when this is the last page. */
1245
1404
  nextUrl: string | null;
1246
1405
  }
1247
- /** Page response for GET /v1/novel/comments. */
1406
+ /** Page response for GET /v3/novel/comments. */
1248
1407
  interface NovelCommentsPage {
1249
- /** Total number of comments on the novel (present only when `includeTotalComments` is requested). */
1408
+ /** Total number of comments on the novel. Not returned by v3; use `novel.totalComments` from `novels.detail()` instead. */
1250
1409
  totalComments?: number;
1251
1410
  /** Comments on this page. */
1252
1411
  comments: NovelComment[];
@@ -1255,6 +1414,13 @@ interface NovelCommentsPage {
1255
1414
  /** Who is permitted to post comments (may be absent). */
1256
1415
  commentAccessControl?: number;
1257
1416
  }
1417
+ /** Page response for GET /v2/novel/comment/replies. */
1418
+ interface NovelCommentRepliesPage {
1419
+ /** Replies on this page. */
1420
+ comments: NovelComment[];
1421
+ /** URL to the next page, or `null` when this is the last page. */
1422
+ nextUrl: string | null;
1423
+ }
1258
1424
  /** Page response for GET /v2/novel/series. */
1259
1425
  interface NovelSeriesPage {
1260
1426
  /** Metadata for the series. */
@@ -1268,6 +1434,25 @@ interface NovelSeriesPage {
1268
1434
  /** URL to the next page, or `null` when this is the last page. */
1269
1435
  nextUrl: string | null;
1270
1436
  }
1437
+ /** Saved reading position of a novel. */
1438
+ interface NovelMarker {
1439
+ /** Marked page number within the novel. */
1440
+ page: number;
1441
+ }
1442
+ /** A novel together with the authenticated user's saved marker. */
1443
+ interface MarkedNovel {
1444
+ /** The marked novel. */
1445
+ novel: PixivNovelItem;
1446
+ /** The saved reading position. */
1447
+ novelMarker: NovelMarker;
1448
+ }
1449
+ /** Page response for GET /v2/novel/markers. */
1450
+ interface NovelMarkersPage {
1451
+ /** Marked novels on this page. */
1452
+ markedNovels: MarkedNovel[];
1453
+ /** URL to the next page, or `null` when this is the last page. */
1454
+ nextUrl: string | null;
1455
+ }
1271
1456
  /** Bookmark / view counters embedded in a WebView novel page. */
1272
1457
  interface WebviewNovelRating {
1273
1458
  /** Number of "likes" (lightweight reactions). */
@@ -1350,7 +1535,105 @@ interface WebviewNovel {
1350
1535
  /** Whether the novel is an original work (not fan fiction). */
1351
1536
  isOriginal: boolean;
1352
1537
  }
1353
- /** Response shape for GET /v1/user/detail. */
1538
+ /** Badge shown on a user's profile, returned by GET /v2/user/detail. */
1539
+ interface PixivUserProfileBadge {
1540
+ /** Badge kind (observed: `"premium"`, `"official"`). */
1541
+ type: string;
1542
+ /** Badge icon URL, or `null` when none is provided. */
1543
+ url: string | null;
1544
+ }
1545
+ /** Detailed profile information returned by GET /v2/user/detail. */
1546
+ interface PixivUserProfileV2 {
1547
+ /** Personal website URL, or `null` if not set. */
1548
+ webpage: string | null;
1549
+ /** Numeric gender code (observed: 0, 1, 2), or `null` when not disclosed. */
1550
+ gender: number | null;
1551
+ /** Birth date string, or `null` when not disclosed. */
1552
+ birth: string | null;
1553
+ /** Birth day portion (MM-DD format), or `null` when not disclosed. */
1554
+ birthDay: string | null;
1555
+ /** Birth year, or `null` when not disclosed. */
1556
+ birthYear: number | null;
1557
+ /** Region / prefecture, or `null` when not disclosed. */
1558
+ region: string | null;
1559
+ /** Internal address ID, or `null` when not disclosed. */
1560
+ addressId: number | null;
1561
+ /** Country code, or `null` when not disclosed. */
1562
+ countryCode: string | null;
1563
+ /** Occupation / job description, or `null` when not disclosed. */
1564
+ job: string | null;
1565
+ /** Internal job category ID, or `null` when not disclosed. */
1566
+ jobId: number | null;
1567
+ /** Number of users this user follows. */
1568
+ totalFollowUsers: number;
1569
+ /** Number of mutual-follow (mypixiv) connections. */
1570
+ totalMypixivUsers: number;
1571
+ /** Total number of public illusts. */
1572
+ totalIllusts: number;
1573
+ /** Total number of public manga works. */
1574
+ totalManga: number;
1575
+ /** Total number of public novels. */
1576
+ totalNovels: number;
1577
+ /** Total number of illust series. */
1578
+ totalIllustSeries: number;
1579
+ /** Total number of novel series. */
1580
+ totalNovelSeries: number;
1581
+ /** Profile background image URL, or `null` if not set. */
1582
+ backgroundImageUrl: string | null;
1583
+ /** Linked Twitter/X account name (without @), or `null` if not set. */
1584
+ twitterAccount: string | null;
1585
+ /** Twitter/X profile URL, or `null` if not set. */
1586
+ twitterUrl: string | null;
1587
+ /** Whether the user has a premium (paid) account. */
1588
+ isPremium: boolean;
1589
+ /** Whether the user has set a custom profile image. */
1590
+ isUsingCustomProfileImage: boolean;
1591
+ /** Profile badge, or `null` when the user has none. */
1592
+ badge: PixivUserProfileBadge | null;
1593
+ }
1594
+ /** Visibility settings returned by GET /v2/user/detail (each `null` when not exposed). */
1595
+ interface PixivUserProfilePublicityV2 {
1596
+ /** Visibility of the gender field. */
1597
+ gender: Publicity | null;
1598
+ /** Visibility of the region field. */
1599
+ region: Publicity | null;
1600
+ /** Visibility of the birth-day field. */
1601
+ birthDay: Publicity | null;
1602
+ /** Visibility of the birth-year field. */
1603
+ birthYear: Publicity | null;
1604
+ /** Visibility of the job field. */
1605
+ job: Publicity | null;
1606
+ }
1607
+ /** Workspace information returned by GET /v2/user/detail (no image URL). */
1608
+ type PixivUserProfileWorkspaceV2 = Omit<PixivUserProfileWorkspace, 'workspaceImageUrl'>;
1609
+ /**
1610
+ * Response shape for GET /v2/user/detail.
1611
+ *
1612
+ * Differs from {@link UserDetailResponse}: several profile values are nullable,
1613
+ * `disabledLinks` and `profile.badge` are present, and the v1-only fields
1614
+ * (`profile.pawooUrl`, `profile.totalIllustBookmarksPublic`,
1615
+ * `profilePublicity.pawoo`, `workspace.workspaceImageUrl`) are absent.
1616
+ */
1617
+ interface UserDetailV2Response {
1618
+ /** Basic user info with self-introduction. */
1619
+ user: PixivUserItem & {
1620
+ isAcceptRequest: boolean;
1621
+ };
1622
+ /** Detailed profile data. */
1623
+ profile: PixivUserProfileV2;
1624
+ /** Visibility settings for profile fields. */
1625
+ profilePublicity: PixivUserProfilePublicityV2;
1626
+ /** Workspace / desk-setup information. */
1627
+ workspace: PixivUserProfileWorkspaceV2;
1628
+ /** Links the user has disabled; the element shape is not yet known. */
1629
+ disabledLinks: unknown[];
1630
+ }
1631
+ /**
1632
+ * Response shape for GET /v1/user/detail.
1633
+ *
1634
+ * See {@link UserDetailV2Response} (`users.detailV2()`) for the v2 endpoint
1635
+ * and its additional fields.
1636
+ */
1354
1637
  interface UserDetailResponse {
1355
1638
  /** Basic user info with self-introduction. */
1356
1639
  user: PixivUserItem;
@@ -1361,6 +1644,96 @@ interface UserDetailResponse {
1361
1644
  /** Workspace / desk-setup information. */
1362
1645
  workspace: PixivUserProfileWorkspace;
1363
1646
  }
1647
+ /** Response shape for GET /v1/user/ai-show-settings. */
1648
+ interface AiShowSettingsResponse {
1649
+ /** Whether AI-generated works are shown. */
1650
+ showAi: boolean;
1651
+ }
1652
+ /** Response shape for GET /v1/user/restricted-mode-settings. */
1653
+ interface RestrictedModeSettingsResponse {
1654
+ /** Whether restricted mode is enabled. */
1655
+ isRestrictedModeEnabled: boolean;
1656
+ }
1657
+ /** A tag in the authenticated user's mute list. */
1658
+ interface MutedTag {
1659
+ /** The muted tag. */
1660
+ tag: {
1661
+ /** Tag name. */
1662
+ name: string;
1663
+ };
1664
+ /** Whether the tag occupies a premium-only mute slot. */
1665
+ isPremiumSlot: boolean;
1666
+ }
1667
+ /** Response shape for GET /v1/mute/list. */
1668
+ interface MuteListResponse {
1669
+ /** Muted tags. */
1670
+ mutedTags: MutedTag[];
1671
+ /** Muted users. The item shape is not known, so callers must narrow it. */
1672
+ mutedUsers: unknown[];
1673
+ /** Total number of muted items. */
1674
+ mutedCount: number;
1675
+ /** Number of muted tags. */
1676
+ mutedTagsCount: number;
1677
+ /** Number of muted users. */
1678
+ mutedUsersCount: number;
1679
+ /** Maximum number of mute entries for the current account. */
1680
+ muteLimitCount: number;
1681
+ /** Mute limits shown in the UI text, by premium status. */
1682
+ forText: {
1683
+ /** Mute limit for accounts without premium. */
1684
+ muteLimitCountIfNoPremium: number;
1685
+ /** Mute limit for premium accounts. */
1686
+ muteLimitCountIfPremium: number;
1687
+ };
1688
+ }
1689
+ /** Account state flags returned by GET /v1/user/me/state. */
1690
+ interface UserMeState {
1691
+ /** Whether the mail address is verified. */
1692
+ isMailAuthorized: boolean;
1693
+ /** Whether a mail address is registered. */
1694
+ hasMailAddress: boolean;
1695
+ /** Whether the pixiv ID has been changed. */
1696
+ hasChangedPixivId: boolean;
1697
+ /** Whether the pixiv ID can be changed. */
1698
+ canChangePixivId: boolean;
1699
+ /** Whether a password is set. */
1700
+ hasPassword: boolean;
1701
+ /** Whether a policy agreement is required. */
1702
+ requirePolicyAgreement: boolean;
1703
+ /** Whether the account has no login method. */
1704
+ noLoginMethod: boolean;
1705
+ /** Whether the account is restricted. */
1706
+ isUserRestricted: boolean;
1707
+ /** Whether official event notifications are enabled. */
1708
+ isOfficialEventNotificationsEnabled: boolean;
1709
+ }
1710
+ /** Profile of the authenticated user returned by GET /v1/user/me/state. */
1711
+ interface UserMeProfile {
1712
+ /** User ID. */
1713
+ userId: number;
1714
+ /** pixiv ID (account name). */
1715
+ pixivId: string;
1716
+ /** Display name. */
1717
+ name: string;
1718
+ /** Profile image URLs. */
1719
+ profileImageUrls: ProfileImageUrls;
1720
+ /** Whether the account has premium. */
1721
+ isPremium: boolean;
1722
+ /** Restriction level of the account's content setting. */
1723
+ xRestrict: number;
1724
+ }
1725
+ /** Response shape for GET /v1/user/me/state. */
1726
+ interface UserMeStateResponse {
1727
+ /** Account state flags. */
1728
+ userState: UserMeState;
1729
+ /** Profile of the authenticated user. */
1730
+ profile: UserMeProfile;
1731
+ }
1732
+ /** Response shape for GET /v1/notification/has-unread-notifications. */
1733
+ interface HasUnreadNotificationsResponse {
1734
+ /** Whether there are unread notifications. */
1735
+ hasUnreadNotifications: boolean;
1736
+ }
1364
1737
  /** Page response for GET /v1/user/illusts. */
1365
1738
  interface UserIllustsPage {
1366
1739
  /** The user whose illusts are listed. */
@@ -1504,9 +1877,35 @@ interface IllustSearchParams {
1504
1877
  filter?: (typeof OSFilter)[keyof typeof OSFilter];
1505
1878
  /** AI-generated content filter: `0` = hide AI works, `1` = show only AI works. */
1506
1879
  searchAiType?: 0 | 1;
1880
+ /** Include results matched through translated tags (sent only when set). */
1881
+ includeTranslatedTagResults?: boolean;
1882
+ /** Merge plain-keyword results into tag results (sent only when set). */
1883
+ mergePlainKeywordResults?: boolean;
1884
+ /** Include works that may violate guidelines (sent only when set). */
1885
+ includePotentialViolationWorks?: boolean;
1886
+ /**
1887
+ * Content type selector as sent by the Android client, e.g.
1888
+ * `"illust_and_manga_and_ugoira"` (sent only when set).
1889
+ */
1890
+ contentType?: string;
1507
1891
  /** Zero-based offset for pagination. */
1508
1892
  offset?: number;
1509
1893
  }
1894
+ /** Parameters for the popular-preview illust search. */
1895
+ interface IllustPopularPreviewParams {
1896
+ /** Search keyword. */
1897
+ word: string;
1898
+ /** How to match the keyword against works (default: `"partial_match_for_tags"`). */
1899
+ searchTarget?: (typeof SearchTarget)[keyof typeof SearchTarget];
1900
+ /** AI-generated content filter: `0` = hide AI works, `1` = show only AI works. */
1901
+ searchAiType?: 0 | 1;
1902
+ /** Include results matched through translated tags (sent only when set). */
1903
+ includeTranslatedTagResults?: boolean;
1904
+ /** Merge plain-keyword results into tag results (sent only when set). */
1905
+ mergePlainKeywordResults?: boolean;
1906
+ /** OS filter to apply (default: `"for_ios"`). */
1907
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1908
+ }
1510
1909
  /** Parameters for fetching the illust ranking. */
1511
1910
  interface IllustRankingParams {
1512
1911
  /** Ranking category (default: `"day"`). */
@@ -1595,6 +1994,13 @@ interface IllustCommentsParams {
1595
1994
  */
1596
1995
  includeTotalComments?: boolean;
1597
1996
  }
1997
+ /** Parameters for fetching replies to an illust comment. */
1998
+ interface IllustCommentRepliesParams {
1999
+ /** ID of the comment to fetch replies for. */
2000
+ commentId: number;
2001
+ /** Zero-based offset for pagination. */
2002
+ offset?: number;
2003
+ }
1598
2004
  /** Parameters for fetching bookmark metadata for an illust. */
1599
2005
  interface IllustBookmarkDetailParams {
1600
2006
  /** ID of the illust to fetch bookmark metadata for. */
@@ -1663,6 +2069,23 @@ declare class IllustResource {
1663
2069
  * ```
1664
2070
  */
1665
2071
  search(params: IllustSearchParams): PaginatedResultAsync<IllustListPage, IllustListPage['illusts'][number]>;
2072
+ /**
2073
+ * Fetches the popular-preview illust search results (a single page of 30).
2074
+ * GET /v1/search/popular-preview/illust
2075
+ *
2076
+ * The endpoint returns no `next_url`, so the result is not paginated.
2077
+ *
2078
+ * @param params - Request parameters
2079
+ *
2080
+ * @example
2081
+ * ```ts
2082
+ * const result = await client.illusts.popularPreview({ word: 'cat' })
2083
+ * if (result.isOk) {
2084
+ * console.log(result.value.illusts.length)
2085
+ * }
2086
+ * ```
2087
+ */
2088
+ popularPreview(params: IllustPopularPreviewParams): ResultAsync<IllustPopularPreviewResponse, PixivError>;
1666
2089
  /**
1667
2090
  * Fetches the illust ranking.
1668
2091
  * GET /v1/illust/ranking
@@ -1712,6 +2135,13 @@ declare class IllustResource {
1712
2135
  * @param params - Request parameters
1713
2136
  */
1714
2137
  comments(params: IllustCommentsParams): PaginatedResultAsync<IllustCommentsPage, IllustComment>;
2138
+ /**
2139
+ * Fetches replies to a comment on an illust.
2140
+ * GET /v2/illust/comment/replies
2141
+ *
2142
+ * @param params - Request parameters
2143
+ */
2144
+ commentReplies(params: IllustCommentRepliesParams): PaginatedResultAsync<IllustCommentRepliesPage, IllustComment>;
1715
2145
  /**
1716
2146
  * Fetches bookmark metadata (tags, visibility) for an illust.
1717
2147
  * GET /v2/illust/bookmark/detail
@@ -1769,9 +2199,28 @@ interface NovelSearchParams {
1769
2199
  endDate?: string;
1770
2200
  /** AI-generated content filter: `0` = hide AI works, `1` = show only AI works. */
1771
2201
  searchAiType?: 0 | 1;
2202
+ /** Include results matched through translated tags (sent only when set). */
2203
+ includeTranslatedTagResults?: boolean;
2204
+ /** Merge plain-keyword results into tag results (sent only when set). */
2205
+ mergePlainKeywordResults?: boolean;
2206
+ /** Include works that may violate guidelines (sent only when set). */
2207
+ includePotentialViolationWorks?: boolean;
1772
2208
  /** Zero-based offset for pagination. */
1773
2209
  offset?: number;
1774
2210
  }
2211
+ /** Parameters for the popular-preview novel search. */
2212
+ interface NovelPopularPreviewParams {
2213
+ /** Search keyword. */
2214
+ word: string;
2215
+ /** How to match the keyword against works (default: `"partial_match_for_tags"`). */
2216
+ searchTarget?: (typeof SearchTarget)[keyof typeof SearchTarget];
2217
+ /** AI-generated content filter: `0` = hide AI works, `1` = show only AI works. */
2218
+ searchAiType?: 0 | 1;
2219
+ /** Include results matched through translated tags (sent only when set). */
2220
+ includeTranslatedTagResults?: boolean;
2221
+ /** Merge plain-keyword results into tag results (sent only when set). */
2222
+ mergePlainKeywordResults?: boolean;
2223
+ }
1775
2224
  /** Parameters for fetching the novel ranking. */
1776
2225
  interface NovelRankingParams {
1777
2226
  /** Ranking category (default: `"day"`). */
@@ -1829,9 +2278,21 @@ interface NovelCommentsParams {
1829
2278
  novelId: number;
1830
2279
  /** Zero-based offset for pagination. */
1831
2280
  offset?: number;
1832
- /** Whether to include the `totalComments` count in the response. */
2281
+ /**
2282
+ * Has no effect: `/v3/novel/comments` does not return `totalComments`
2283
+ * and this parameter is not sent.
2284
+ *
2285
+ * @deprecated Read `novel.totalComments` from `novels.detail()` instead.
2286
+ */
1833
2287
  includeTotalComments?: boolean;
1834
2288
  }
2289
+ /** Parameters for fetching replies to a novel comment. */
2290
+ interface NovelCommentRepliesParams {
2291
+ /** ID of the comment to fetch replies for. */
2292
+ commentId: number;
2293
+ /** Zero-based offset for pagination. */
2294
+ offset?: number;
2295
+ }
1835
2296
  /** Parameters for fetching newly posted novels. */
1836
2297
  interface NovelNewParams {
1837
2298
  /** OS filter to apply (default: `"for_ios"`). */
@@ -1902,6 +2363,30 @@ declare class NovelResource {
1902
2363
  * ```
1903
2364
  */
1904
2365
  search(params: NovelSearchParams): PaginatedResultAsync<NovelListPage, PixivNovelItem>;
2366
+ /**
2367
+ * Fetches the popular-preview novel search results (a single page of 30).
2368
+ * GET /v1/search/popular-preview/novel
2369
+ *
2370
+ * The endpoint returns no `next_url`, so the result is not paginated.
2371
+ *
2372
+ * @param params - Request parameters
2373
+ *
2374
+ * @example
2375
+ * ```ts
2376
+ * const result = await client.novels.popularPreview({ word: 'fantasy' })
2377
+ * if (result.isOk) {
2378
+ * console.log(result.value.novels.length)
2379
+ * }
2380
+ * ```
2381
+ */
2382
+ popularPreview(params: NovelPopularPreviewParams): ResultAsync<NovelPopularPreviewResponse, PixivError>;
2383
+ /**
2384
+ * Fetches currently trending novel tags, each with a representative illust.
2385
+ * GET /v1/trending-tags/novel
2386
+ *
2387
+ * Takes no parameters: the endpoint ignores `filter`.
2388
+ */
2389
+ trendingTags(): ResultAsync<TrendingTagsNovelResponse, PixivError>;
1905
2390
  /**
1906
2391
  * Fetches the novel ranking.
1907
2392
  * GET /v1/novel/ranking
@@ -1923,6 +2408,20 @@ declare class NovelResource {
1923
2408
  * @param params - Request parameters
1924
2409
  */
1925
2410
  series(params: NovelSeriesParams): PaginatedResultAsync<NovelSeriesPage, PixivNovelItem>;
2411
+ /**
2412
+ * Fetches the authenticated user's novel series watchlist.
2413
+ * GET /v1/watchlist/novel
2414
+ *
2415
+ * Takes no parameters; later pages follow the server-provided `next_url`.
2416
+ */
2417
+ watchlist(): PaginatedResultAsync<WatchlistNovelPage, WatchlistSeries>;
2418
+ /**
2419
+ * Fetches the novels with a saved reading position (marker).
2420
+ * GET /v2/novel/markers
2421
+ *
2422
+ * Takes no parameters; later pages follow the server-provided `next_url`.
2423
+ */
2424
+ markers(): PaginatedResultAsync<NovelMarkersPage, MarkedNovel>;
1926
2425
  /**
1927
2426
  * Adds a novel bookmark.
1928
2427
  * POST /v2/novel/bookmark/add
@@ -1946,11 +2445,18 @@ declare class NovelResource {
1946
2445
  follow(params?: NovelFollowParams): PaginatedResultAsync<NovelListPage, PixivNovelItem>;
1947
2446
  /**
1948
2447
  * Fetches comments posted on a novel.
1949
- * GET /v1/novel/comments
2448
+ * GET /v3/novel/comments
1950
2449
  *
1951
2450
  * @param params - Request parameters
1952
2451
  */
1953
2452
  comments(params: NovelCommentsParams): PaginatedResultAsync<NovelCommentsPage, NovelComment>;
2453
+ /**
2454
+ * Fetches replies to a comment on a novel.
2455
+ * GET /v2/novel/comment/replies
2456
+ *
2457
+ * @param params - Request parameters
2458
+ */
2459
+ commentReplies(params: NovelCommentRepliesParams): PaginatedResultAsync<NovelCommentRepliesPage, NovelComment>;
1954
2460
  /**
1955
2461
  * Fetches newly posted novels.
1956
2462
  * GET /v1/novel/new
@@ -2163,9 +2669,25 @@ declare class UserResource {
2163
2669
  * Fetches detailed profile information for a user.
2164
2670
  * GET /v1/user/detail
2165
2671
  *
2672
+ * See {@link UserResource.detailV2} for the v2 endpoint, which exposes
2673
+ * additional fields (`disabledLinks`, `profile.badge`).
2674
+ *
2166
2675
  * @param params - Request parameters
2167
2676
  */
2168
2677
  detail(params: UserDetailParams): ResultAsync<UserDetailResponse, PixivError>;
2678
+ /**
2679
+ * Fetches detailed profile information for a user using the v2 endpoint.
2680
+ * GET /v2/user/detail
2681
+ *
2682
+ * Unlike {@link UserResource.detail}, the response includes `disabledLinks`
2683
+ * and `profile.badge`, several profile values are `null` instead of empty
2684
+ * strings or `0`, and the v1-only fields (`profile.pawooUrl`,
2685
+ * `profile.totalIllustBookmarksPublic`, `profilePublicity.pawoo`,
2686
+ * `workspace.workspaceImageUrl`) are absent.
2687
+ *
2688
+ * @param params - Request parameters
2689
+ */
2690
+ detailV2(params: UserDetailParams): ResultAsync<UserDetailV2Response, PixivError>;
2169
2691
  /**
2170
2692
  * Searches for users.
2171
2693
  * GET /v1/search/user
@@ -2268,6 +2790,59 @@ declare class UserResource {
2268
2790
  * @param params - Request parameters
2269
2791
  */
2270
2792
  editAiShowSettings(params: UserEditAiShowSettingsParams): ResultAsync<Record<string, never>, PixivError>;
2793
+ /**
2794
+ * Fetches the authenticated user's AI-generated-work display setting.
2795
+ * GET /v1/user/ai-show-settings
2796
+ */
2797
+ aiShowSettings(): ResultAsync<AiShowSettingsResponse, PixivError>;
2798
+ /**
2799
+ * Fetches the authenticated user's restricted-mode setting.
2800
+ * GET /v1/user/restricted-mode-settings
2801
+ */
2802
+ restrictedModeSettings(): ResultAsync<RestrictedModeSettingsResponse, PixivError>;
2803
+ /**
2804
+ * Fetches the authenticated user's mute list.
2805
+ * GET /v1/mute/list
2806
+ */
2807
+ muteList(): ResultAsync<MuteListResponse, PixivError>;
2808
+ /**
2809
+ * Fetches the authenticated user's account state and profile.
2810
+ * GET /v1/user/me/state
2811
+ */
2812
+ meState(): ResultAsync<UserMeStateResponse, PixivError>;
2813
+ /**
2814
+ * Fetches whether the authenticated user has unread notifications.
2815
+ * GET /v1/notification/has-unread-notifications
2816
+ */
2817
+ hasUnreadNotifications(): ResultAsync<HasUnreadNotificationsResponse, PixivError>;
2818
+ }
2819
+ //#endregion
2820
+ //#region src/resources/spotlight.d.ts
2821
+ /** Parameters for fetching spotlight articles. */
2822
+ interface SpotlightArticlesParams {
2823
+ /**
2824
+ * Article category (default: `"all"`).
2825
+ *
2826
+ * `"all"` and `"manga"` are known to work. The full list of valid values is
2827
+ * not known; other values are rejected with HTTP 400.
2828
+ */
2829
+ category?: string;
2830
+ /** OS filter to apply (default: `"for_ios"`). */
2831
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
2832
+ /** Zero-based offset for pagination. */
2833
+ offset?: number;
2834
+ }
2835
+ /** Methods for the pixivision spotlight API namespace. */
2836
+ declare class SpotlightResource {
2837
+ #private;
2838
+ constructor(http: HttpClient);
2839
+ /**
2840
+ * Fetches pixivision spotlight articles.
2841
+ * GET /v1/spotlight/articles
2842
+ *
2843
+ * @param params - Request parameters
2844
+ */
2845
+ articles(params?: SpotlightArticlesParams): PaginatedResultAsync<SpotlightArticlesPage, SpotlightArticle>;
2271
2846
  }
2272
2847
  //#endregion
2273
2848
  //#region src/resources/manga.d.ts
@@ -2289,6 +2864,13 @@ declare class MangaResource {
2289
2864
  * @param params - Request parameters
2290
2865
  */
2291
2866
  recommended(params?: MangaRecommendedParams): PaginatedResultAsync<MangaRecommendedPage, PixivIllustItem>;
2867
+ /**
2868
+ * Fetches the authenticated user's manga series watchlist.
2869
+ * GET /v1/watchlist/manga
2870
+ *
2871
+ * Takes no parameters; later pages follow the server-provided `next_url`.
2872
+ */
2873
+ watchlist(): PaginatedResultAsync<WatchlistMangaPage, WatchlistSeries>;
2292
2874
  }
2293
2875
  //#endregion
2294
2876
  //#region src/resources/ugoira.d.ts
@@ -2352,6 +2934,8 @@ export declare class PixivClient {
2352
2934
  readonly manga: MangaResource;
2353
2935
  /** Ugoira API namespace. */
2354
2936
  readonly ugoira: UgoiraResource;
2937
+ /** Spotlight (pixivision) API namespace. */
2938
+ readonly spotlight: SpotlightResource;
2355
2939
  /** Image fetch helpers. */
2356
2940
  readonly images: ImageResource;
2357
2941
  private constructor();
@@ -2399,5 +2983,5 @@ export declare class PixivClient {
2399
2983
  static of(refreshToken: string, options?: PixivClientOptions): Promise<PixivClient>;
2400
2984
  }
2401
2985
  //#endregion
2402
- export type { BookmarkDetail, BookmarkDetailTag, BookmarkTag, ErrResult, Frame, HttpMethod, IllustBookmarkAddParams, IllustBookmarkDeleteParams, IllustBookmarkDetailParams, IllustBookmarkDetailResponse, IllustComment, IllustCommentStamp, IllustCommentsPage, IllustCommentsParams, IllustDetailParams, IllustDetailResponse, IllustFollowParams, IllustListPage, IllustNewParams, IllustRankingParams, IllustRecommendedPage, IllustRecommendedParams, IllustRelatedParams, IllustSearchParams, IllustSeriesDetail, IllustSeriesPage, IllustSeriesParams, IllustTrendingTagsParams, ImageUrls, MangaRecommendedPage, MetaPages, MetaSinglePage, NovelBookmarkAddParams, NovelBookmarkDeleteParams, NovelComment, NovelCommentsPage, NovelCommentsParams, NovelDetailParams, NovelDetailResponse, NovelFollowParams, NovelListPage, NovelNewParams, NovelRankingParams, NovelRecommendedPage, NovelRecommendedParams, NovelRelatedParams, NovelSearchParams, NovelSeriesDetail, NovelSeriesPage, NovelSeriesParams, NovelTextParams, OkResult, PagedResponse, ParsedNextUrl, PixivApiErrorBody, PixivClientOptions, PixivError, PixivIllustItem, PixivNovelItem, PixivUgoiraItem, PixivUser, PixivUserItem, PixivUserPreviewItem, PixivUserProfile, PixivUserProfilePublicity, PixivUserProfileWorkspace, PrivacyPolicy, ProfileImageUrls, ResponseInterceptor, ResponseRecord, Result, Series, Tag, TrendingTagIllust, TrendingTagsIllustResponse, UgoiraMetadataResponse, UserBookmarkTagsIllustPage, UserBookmarkTagsIllustParams, UserBookmarksIllustPage, UserBookmarksIllustParams, UserBookmarksNovelPage, UserBookmarksNovelParams, UserDetailParams, UserDetailResponse, UserEditAiShowSettingsParams, UserFollowAddParams, UserFollowDeleteParams, UserFollowerPage, UserFollowerParams, UserFollowingPage, UserFollowingParams, UserIllustsPage, UserIllustsParams, UserListPage, UserListParams, UserMypixivPage, UserMypixivParams, UserNovelsPage, UserNovelsParams, UserRecommendedPage, UserRecommendedParams, UserRelatedPage, UserRelatedParams, UserSearchPage, UserSearchParams, WebviewNovel, WebviewNovelNavigationInfo, WebviewNovelRating, WebviewNovelSeriesNavigation, ZipUrls };
2986
+ export type { AiShowSettingsResponse, BookmarkDetail, BookmarkDetailTag, BookmarkTag, ErrResult, Frame, HasUnreadNotificationsResponse, HttpMethod, IllustBookmarkAddParams, IllustBookmarkDeleteParams, IllustBookmarkDetailParams, IllustBookmarkDetailResponse, IllustComment, IllustCommentRepliesPage, IllustCommentRepliesParams, IllustCommentStamp, IllustCommentsPage, IllustCommentsParams, IllustDetailParams, IllustDetailResponse, IllustFollowParams, IllustListPage, IllustNewParams, IllustPopularPreviewParams, IllustPopularPreviewResponse, IllustRankingParams, IllustRecommendedPage, IllustRecommendedParams, IllustRelatedParams, IllustRequest, IllustRequestCollaborateStatus, IllustRequestCollaborateUserSample, IllustRequestInfo, IllustRequestUser, IllustSearchParams, IllustSeriesDetail, IllustSeriesPage, IllustSeriesParams, IllustTrendingTagsParams, ImageUrls, MangaRecommendedPage, MarkedNovel, MetaPages, MetaSinglePage, MuteListResponse, MutedTag, NovelBookmarkAddParams, NovelBookmarkDeleteParams, NovelComment, NovelCommentRepliesPage, NovelCommentRepliesParams, NovelCommentsPage, NovelCommentsParams, NovelDetailParams, NovelDetailResponse, NovelFollowParams, NovelListPage, NovelMarker, NovelMarkersPage, NovelNewParams, NovelPopularPreviewParams, NovelPopularPreviewResponse, NovelRankingParams, NovelRecommendedPage, NovelRecommendedParams, NovelRelatedParams, NovelSearchParams, NovelSeriesDetail, NovelSeriesPage, NovelSeriesParams, NovelTextParams, OkResult, PagedResponse, ParsedNextUrl, PixivApiErrorBody, PixivClientOptions, PixivError, PixivIllustItem, PixivNovelItem, PixivUgoiraItem, PixivUser, PixivUserItem, PixivUserPreviewItem, PixivUserProfile, PixivUserProfileBadge, PixivUserProfilePublicity, PixivUserProfilePublicityV2, PixivUserProfileV2, PixivUserProfileWorkspace, PixivUserProfileWorkspaceV2, PrivacyPolicy, ProfileImageUrls, ResponseInterceptor, ResponseRecord, RestrictedModeSettingsResponse, Result, Series, SpotlightArticle, SpotlightArticlesPage, SpotlightArticlesParams, Tag, TrendingTagIllust, TrendingTagsIllustResponse, TrendingTagsNovelResponse, UgoiraMetadataResponse, UserBookmarkTagsIllustPage, UserBookmarkTagsIllustParams, UserBookmarksIllustPage, UserBookmarksIllustParams, UserBookmarksNovelPage, UserBookmarksNovelParams, UserDetailParams, UserDetailResponse, UserDetailV2Response, UserEditAiShowSettingsParams, UserFollowAddParams, UserFollowDeleteParams, UserFollowerPage, UserFollowerParams, UserFollowingPage, UserFollowingParams, UserIllustsPage, UserIllustsParams, UserListPage, UserListParams, UserMeProfile, UserMeState, UserMeStateResponse, UserMypixivPage, UserMypixivParams, UserNovelsPage, UserNovelsParams, UserRecommendedPage, UserRecommendedParams, UserRelatedPage, UserRelatedParams, UserSearchPage, UserSearchParams, WatchlistMangaPage, WatchlistNovelPage, WatchlistSeries, WebviewNovel, WebviewNovelNavigationInfo, WebviewNovelRating, WebviewNovelSeriesNavigation, ZipUrls };
2403
2987
  //# sourceMappingURL=index.d.ts.map