@book000/pixivts 0.58.1 → 0.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -377,7 +377,7 @@ declare class HttpClient {
377
377
  * - `.pages()` is an async generator that yields each page
378
378
  * - `.items()` is an async generator that yields individual items across all pages
379
379
  *
380
- * Pagination uses the `next_url` field returned by list endpoints. The URL is
380
+ * Pagination uses the `nextUrl` field returned by list endpoints. The URL is
381
381
  * fetched via `HttpClient.getAbsolute()` which reuses the same auth / retry /
382
382
  * interceptor pipeline as regular requests.
383
383
  */
@@ -385,17 +385,17 @@ declare class HttpClient {
385
385
  /**
386
386
  * A page returned by a pixiv list endpoint.
387
387
  *
388
- * Must have a `next_url` field (null when there are no more pages).
388
+ * Must have a `nextUrl` field (null when there are no more pages).
389
389
  */
390
390
  interface PagedResponse {
391
391
  /** URL to the next page, or `null` when there are no more pages. */
392
- next_url: string | null;
392
+ nextUrl: string | null;
393
393
  }
394
394
  /**
395
395
  * A `ResultAsync<TPage, PixivError>` with additional `.pages()` / `.items()`
396
396
  * async generators for consuming paginated pixiv list responses.
397
397
  *
398
- * Returned by all resource methods that produce a `next_url` field.
398
+ * Returned by all resource methods that produce a `nextUrl` field.
399
399
  */
400
400
  declare class PaginatedResultAsync<TPage extends PagedResponse, TItem> extends ResultAsync<TPage, PixivError> {
401
401
  #private;
@@ -481,8 +481,8 @@ interface ParsedNextUrl {
481
481
  * @example
482
482
  * ```ts
483
483
  * const page = await client.users.bookmarks.illusts({ userId: client.userId })
484
- * if (page.isOk && page.value.next_url) {
485
- * const cursor = parseNextUrl(page.value.next_url)
484
+ * if (page.isOk && page.value.nextUrl) {
485
+ * const cursor = parseNextUrl(page.value.nextUrl)
486
486
  * // Resume later:
487
487
  * const next = await client.users.bookmarks.illusts({
488
488
  * userId: client.userId,
@@ -643,12 +643,12 @@ declare const UserIllustType: {
643
643
  */
644
644
  interface ImageUrls {
645
645
  /** 360×360 thumbnail */
646
- square_medium: string;
646
+ squareMedium: string;
647
647
  /** Long side ≤ 540 px */
648
648
  medium: string;
649
649
  /** Width ≤ 600 px, height ≤ 1200 px */
650
650
  large: string;
651
- /** Original image (present in `meta_pages` entries only) */
651
+ /** Original image (present in `metaPages` entries only) */
652
652
  original?: string;
653
653
  }
654
654
  /** Profile image URLs for a user. */
@@ -674,22 +674,22 @@ interface PixivUser {
674
674
  /** Login account name (distinct from the display `name`). */
675
675
  account: string;
676
676
  /** Set of profile image URLs at different sizes. */
677
- profile_image_urls: ProfileImageUrls;
677
+ profileImageUrls: ProfileImageUrls;
678
678
  /** Whether the authenticated user follows this user. */
679
- is_followed?: boolean;
679
+ isFollowed?: boolean;
680
680
  /** Whether this user has blocked access by the authenticated user. */
681
- is_access_blocking_user?: boolean;
681
+ isAccessBlockingUser?: boolean;
682
682
  /** Whether this user accepts illustration commission requests. */
683
- is_accept_request?: boolean;
683
+ isAcceptRequest?: boolean;
684
684
  }
685
685
  /** Tag on a work. */
686
686
  interface Tag {
687
687
  /** Tag name in Japanese. */
688
688
  name: string;
689
689
  /** Translated tag name, or `null` if no translation is available. */
690
- translated_name: string | null;
690
+ translatedName: string | null;
691
691
  /** Whether the tag was added by the work's uploader. */
692
- added_by_uploaded_user?: boolean;
692
+ addedByUploadedUser?: boolean;
693
693
  }
694
694
  /** Series information embedded in a work item. */
695
695
  interface Series {
@@ -710,12 +710,12 @@ interface PrivacyPolicy {
710
710
  /** Original-image URL for a single-page illust. */
711
711
  interface MetaSinglePage {
712
712
  /** Direct URL to the original-resolution image. */
713
- original_image_url: string;
713
+ originalImageUrl: string;
714
714
  }
715
715
  /** Per-page image URLs for a multi-page work (manga). */
716
716
  interface MetaPages {
717
717
  /** Full set of image URLs for this page, including the original. */
718
- image_urls: Required<ImageUrls>;
718
+ imageUrls: Required<ImageUrls>;
719
719
  }
720
720
  /**
721
721
  * A pixiv illust or manga work item as returned by the API.
@@ -736,7 +736,7 @@ interface PixivIllustItem {
736
736
  /** Work category: illustration, manga, or animated illustration. */
737
737
  type: 'illust' | 'manga' | 'ugoira';
738
738
  /** Thumbnail image URLs at various sizes. */
739
- image_urls: ImageUrls;
739
+ imageUrls: ImageUrls;
740
740
  /** Work caption / description (may contain HTML). */
741
741
  caption: string;
742
742
  /** Content restriction level (0 = public, 1 = mypixiv-only, 2 = private). */
@@ -748,46 +748,46 @@ interface PixivIllustItem {
748
748
  /** Creation tools listed by the author (e.g. "Photoshop"). */
749
749
  tools: string[];
750
750
  /** ISO 8601 date-time string of when the work was posted. */
751
- create_date: string;
751
+ createDate: string;
752
752
  /** Number of images in a multi-page work (1 for single-page). */
753
- page_count: number;
753
+ pageCount: number;
754
754
  /** Canvas width in pixels. */
755
755
  width: number;
756
756
  /** Canvas height in pixels. */
757
757
  height: number;
758
758
  /** Sanity / sensitivity level assigned by the pixiv content filter. */
759
- sanity_level: number;
759
+ sanityLevel: number;
760
760
  /** Age restriction: 0 = all-ages, 1 = R-18, 2 = R-18G */
761
- x_restrict: number;
761
+ xRestrict: number;
762
762
  /** Series this work belongs to, or `null` if not part of a series. */
763
763
  series: Series | null;
764
764
  /**
765
- * For single-page works: `{ original_image_url: string }`.
765
+ * For single-page works: `{ originalImageUrl: string }`.
766
766
  * For multi-page works: `{}` (empty object).
767
767
  */
768
- meta_single_page: MetaSinglePage | Record<string, never>;
768
+ metaSinglePage: MetaSinglePage | Record<string, never>;
769
769
  /** Per-page image URLs for multi-page works (empty array for single-page). */
770
- meta_pages: MetaPages[];
770
+ metaPages: MetaPages[];
771
771
  /** Total number of views. */
772
- total_view: number;
772
+ totalView: number;
773
773
  /** Total number of bookmarks. */
774
- total_bookmarks: number;
774
+ totalBookmarks: number;
775
775
  /** Whether the authenticated user has bookmarked this work. */
776
- is_bookmarked: boolean;
776
+ isBookmarked: boolean;
777
777
  /** Whether the work is publicly visible. */
778
778
  visible: boolean;
779
779
  /** Whether the work is muted for the authenticated user. */
780
- is_muted: boolean;
780
+ isMuted: boolean;
781
781
  /** Total number of comments (may be absent on some endpoints). */
782
- total_comments?: number;
782
+ totalComments?: number;
783
783
  /** AI-generated content flag: 0 = no AI, 1 = partial AI, 2 = fully AI */
784
- illust_ai_type: number;
784
+ illustAiType: number;
785
785
  /** Book-style rendering flag (0 = normal, 1 = book). */
786
- illust_book_style: number;
786
+ illustBookStyle: number;
787
787
  /** Controls who can post comments (may be absent). */
788
- comment_access_control?: number;
788
+ commentAccessControl?: number;
789
789
  /** Additional access-restriction attributes (may be absent). */
790
- restriction_attributes?: string[];
790
+ restrictionAttributes?: string[];
791
791
  }
792
792
  /** Illust series metadata returned by GET /v1/illust/series. */
793
793
  interface IllustSeriesDetail {
@@ -798,13 +798,13 @@ interface IllustSeriesDetail {
798
798
  /** Series description / caption. */
799
799
  caption: string;
800
800
  /** Cover image URLs. */
801
- cover_image_urls: {
801
+ coverImageUrls: {
802
802
  medium: string;
803
803
  };
804
804
  /** Number of works in the series. */
805
- series_work_count: number;
805
+ seriesWorkCount: number;
806
806
  /** ISO 8601 date-time string of when the series was created. */
807
- create_date: string;
807
+ createDate: string;
808
808
  /** Canvas width of the cover image in pixels. */
809
809
  width: number;
810
810
  /** Canvas height of the cover image in pixels. */
@@ -812,7 +812,7 @@ interface IllustSeriesDetail {
812
812
  /** Author of the series. */
813
813
  user: PixivUser;
814
814
  /** Whether the authenticated user has added this series to their watchlist. */
815
- watchlist_added: boolean;
815
+ watchlistAdded: boolean;
816
816
  }
817
817
  /**
818
818
  * A pixiv novel work item as returned by the API.
@@ -834,19 +834,19 @@ interface PixivNovelItem {
834
834
  /** Content restriction level (0 = public, 1 = mypixiv-only, 2 = private). */
835
835
  restrict: number;
836
836
  /** Age restriction: 0 = all-ages, 1 = R-18, 2 = R-18G */
837
- x_restrict: number;
837
+ xRestrict: number;
838
838
  /** Whether the novel is an original work (not fan fiction). */
839
- is_original: boolean;
839
+ isOriginal: boolean;
840
840
  /** Cover image URLs. */
841
- image_urls: ImageUrls;
841
+ imageUrls: ImageUrls;
842
842
  /** ISO 8601 date-time string of when the novel was posted. */
843
- create_date: string;
843
+ createDate: string;
844
844
  /** Tags attached to the novel. */
845
845
  tags: Tag[];
846
846
  /** Number of pages (word-count chunks). */
847
- page_count: number;
847
+ pageCount: number;
848
848
  /** Total character count of the novel body. */
849
- text_length: number;
849
+ textLength: number;
850
850
  /** Author of the novel. */
851
851
  user: PixivUser;
852
852
  /**
@@ -856,25 +856,25 @@ interface PixivNovelItem {
856
856
  */
857
857
  series: Series | Record<string, never>;
858
858
  /** Whether the authenticated user has bookmarked this novel. */
859
- is_bookmarked: boolean;
859
+ isBookmarked: boolean;
860
860
  /** Total number of bookmarks. */
861
- total_bookmarks: number;
861
+ totalBookmarks: number;
862
862
  /** Total number of views. */
863
- total_view: number;
863
+ totalView: number;
864
864
  /** Whether the novel is publicly visible. */
865
865
  visible: boolean;
866
866
  /** Total number of comments. */
867
- total_comments: number;
867
+ totalComments: number;
868
868
  /** Whether the novel is muted for the authenticated user. */
869
- is_muted: boolean;
869
+ isMuted: boolean;
870
870
  /** Whether the novel is restricted to mutual followers (mypixiv). */
871
- is_mypixiv_only: boolean;
872
- /** Whether the novel contains explicit content beyond the `x_restrict` flag. */
873
- is_x_restricted: boolean;
871
+ isMypixivOnly: boolean;
872
+ /** Whether the novel contains explicit content beyond the `xRestrict` flag. */
873
+ isXRestricted: boolean;
874
874
  /** AI-generated content flag: 0 = no AI, 1 = partial AI, 2 = fully AI */
875
- novel_ai_type: number;
875
+ novelAiType: number;
876
876
  /** Controls who can post comments (may be absent). */
877
- comment_access_control?: number;
877
+ commentAccessControl?: number;
878
878
  }
879
879
  /** Novel series details returned by GET /v2/novel/series. */
880
880
  interface NovelSeriesDetail {
@@ -885,21 +885,21 @@ interface NovelSeriesDetail {
885
885
  /** Series description / caption. */
886
886
  caption: string;
887
887
  /** Whether every novel in the series is original (not fan fiction). */
888
- is_original: boolean;
888
+ isOriginal: boolean;
889
889
  /** Whether the series has been marked as concluded by the author. */
890
- is_concluded: boolean;
890
+ isConcluded: boolean;
891
891
  /** Number of novels in the series. */
892
- content_count: number;
892
+ contentCount: number;
893
893
  /** Total character count across all novels in the series. */
894
- total_character_count: number;
894
+ totalCharacterCount: number;
895
895
  /** Author of the series. */
896
896
  user: PixivUser;
897
897
  /** Human-readable series label / tagline. */
898
- display_text: string;
898
+ displayText: string;
899
899
  /** AI-generated content flag: 0 = no AI, 1 = partial AI, 2 = fully AI */
900
- novel_ai_type: number;
900
+ novelAiType: number;
901
901
  /** Whether the authenticated user has added this series to their watchlist. */
902
- watchlist_added: boolean;
902
+ watchlistAdded: boolean;
903
903
  }
904
904
  /** User item with self-introduction; embedded in GET /v1/user/detail. */
905
905
  type PixivUserItem = PixivUser & {
@@ -917,47 +917,47 @@ interface PixivUserProfile {
917
917
  /** Birth date string (YYYY-MM-DD format, may be partial). */
918
918
  birth: string;
919
919
  /** Birth day portion (MM-DD format). */
920
- birth_day: string;
920
+ birthDay: string;
921
921
  /** Birth year. */
922
- birth_year: number;
922
+ birthYear: number;
923
923
  /** Region / prefecture. */
924
924
  region: string;
925
925
  /** Internal address ID. */
926
- address_id: number;
926
+ addressId: number;
927
927
  /** Two-letter country code (ISO 3166-1 alpha-2). */
928
- country_code: string;
928
+ countryCode: string;
929
929
  /** Occupation / job description. */
930
930
  job: string;
931
931
  /** Internal job category ID. */
932
- job_id: number;
932
+ jobId: number;
933
933
  /** Number of users this user follows. */
934
- total_follow_users: number;
934
+ totalFollowUsers: number;
935
935
  /** Number of mutual-follow (mypixiv) connections. */
936
- total_mypixiv_users: number;
936
+ totalMypixivUsers: number;
937
937
  /** Total number of public illusts. */
938
- total_illusts: number;
938
+ totalIllusts: number;
939
939
  /** Total number of public manga works. */
940
- total_manga: number;
940
+ totalManga: number;
941
941
  /** Total number of public novels. */
942
- total_novels: number;
942
+ totalNovels: number;
943
943
  /** Total number of publicly bookmarked illusts. */
944
- total_illust_bookmarks_public: number;
944
+ totalIllustBookmarksPublic: number;
945
945
  /** Total number of illust series. */
946
- total_illust_series: number;
946
+ totalIllustSeries: number;
947
947
  /** Total number of novel series. */
948
- total_novel_series: number;
948
+ totalNovelSeries: number;
949
949
  /** Profile background image URL, or `null` if not set. */
950
- background_image_url: string | null;
950
+ backgroundImageUrl: string | null;
951
951
  /** Linked Twitter/X account name (without @). */
952
- twitter_account: string;
952
+ twitterAccount: string;
953
953
  /** Twitter/X profile URL, or `null` if not set. */
954
- twitter_url: string | null;
954
+ twitterUrl: string | null;
955
955
  /** Pawoo profile URL, or `null` if not set. */
956
- pawoo_url: string | null;
956
+ pawooUrl: string | null;
957
957
  /** Whether the user has a premium (paid) account. */
958
- is_premium: boolean;
958
+ isPremium: boolean;
959
959
  /** Whether the user has set a custom profile image. */
960
- is_using_custom_profile_image: boolean;
960
+ isUsingCustomProfileImage: boolean;
961
961
  }
962
962
  /** Visibility settings for a user's profile fields. */
963
963
  interface PixivUserProfilePublicity {
@@ -966,9 +966,9 @@ interface PixivUserProfilePublicity {
966
966
  /** Visibility of the region field. */
967
967
  region: Publicity;
968
968
  /** Visibility of the birth-day field. */
969
- birth_day: Publicity;
969
+ birthDay: Publicity;
970
970
  /** Visibility of the birth-year field. */
971
- birth_year: Publicity;
971
+ birthYear: Publicity;
972
972
  /** Visibility of the job field. */
973
973
  job: Publicity;
974
974
  /** Whether the Pawoo account link is visible. */
@@ -1001,7 +1001,7 @@ interface PixivUserProfileWorkspace {
1001
1001
  /** Free-text comment about the workspace. */
1002
1002
  comment: string;
1003
1003
  /** Workspace image URL, or `null` if not set. */
1004
- workspace_image_url: string | null;
1004
+ workspaceImageUrl: string | null;
1005
1005
  }
1006
1006
  /**
1007
1007
  * Preview item for a user in the GET /v1/user/following response.
@@ -1016,7 +1016,7 @@ interface PixivUserPreviewItem {
1016
1016
  /** A small sample of the user's recent novels. */
1017
1017
  novels: PixivNovelItem[];
1018
1018
  /** Whether this user is muted by the authenticated user. */
1019
- is_muted: boolean;
1019
+ isMuted: boolean;
1020
1020
  }
1021
1021
  /** URLs for ugoira frame archives (ZIP files). */
1022
1022
  interface ZipUrls {
@@ -1033,24 +1033,28 @@ interface Frame {
1033
1033
  /** Ugoira metadata as returned by GET /v1/ugoira/metadata. */
1034
1034
  interface PixivUgoiraItem {
1035
1035
  /** Archive URLs for the frame ZIP. */
1036
- zip_urls: ZipUrls;
1036
+ zipUrls: ZipUrls;
1037
1037
  /** Per-frame timing data (in order). */
1038
1038
  frames: Frame[];
1039
1039
  }
1040
1040
  /**
1041
- * Shape of the JSON body returned by the pixiv API on error.
1041
+ * Camelized shape of the JSON error body returned by the pixiv API.
1042
+ *
1043
+ * The pixiv wire format uses `snake_case` field names (e.g. `user_message`);
1044
+ * `HttpClient` applies `camelizeKeys()` before returning, so all fields here
1045
+ * are `lowerCamelCase`.
1042
1046
  */
1043
1047
  interface PixivApiErrorBody {
1044
- /** Error payload returned by the pixiv API. */
1048
+ /** Error payload returned by the pixiv API (keys camelized). */
1045
1049
  error: {
1046
1050
  /** Localised error message intended for end users. */
1047
- user_message: string;
1051
+ userMessage: string;
1048
1052
  /** Internal error message. */
1049
1053
  message: string;
1050
1054
  /** Short error reason / code. */
1051
1055
  reason: string;
1052
1056
  /** Additional details for the user-facing message (may be absent). */
1053
- user_message_details?: Record<string, unknown>;
1057
+ userMessageDetails?: Record<string, unknown>;
1054
1058
  };
1055
1059
  }
1056
1060
  /** Response shape for GET /v1/illust/detail. */
@@ -1067,49 +1071,49 @@ interface IllustListPage {
1067
1071
  *
1068
1072
  * Only present on search responses; absent on related/ranking/recommended endpoints.
1069
1073
  */
1070
- show_ai?: boolean;
1074
+ showAi?: boolean;
1071
1075
  /** URL to the next page, or `null` when this is the last page. */
1072
- next_url: string | null;
1076
+ nextUrl: string | null;
1073
1077
  }
1074
1078
  /** Page response for GET /v1/illust/recommended. */
1075
1079
  interface IllustRecommendedPage {
1076
1080
  /** Recommended illusts. */
1077
1081
  illusts: PixivIllustItem[];
1078
1082
  /** Ranking illusts included alongside recommendations. */
1079
- ranking_illusts: PixivIllustItem[];
1083
+ rankingIllusts: PixivIllustItem[];
1080
1084
  /** Whether an ongoing contest exists. */
1081
- contest_exists: boolean;
1085
+ contestExists: boolean;
1082
1086
  /** Privacy-policy notice (present on the first page). */
1083
- privacy_policy?: PrivacyPolicy;
1087
+ privacyPolicy?: PrivacyPolicy;
1084
1088
  /** URL to the next page, or `null` when this is the last page. */
1085
- next_url: string | null;
1089
+ nextUrl: string | null;
1086
1090
  }
1087
1091
  /** Page response for GET /v1/illust/series. */
1088
1092
  interface IllustSeriesPage {
1089
1093
  /** Metadata for the series. */
1090
- illust_series_detail: IllustSeriesDetail;
1094
+ illustSeriesDetail: IllustSeriesDetail;
1091
1095
  /** First illust in the series. */
1092
- illust_series_first_illust: PixivIllustItem;
1096
+ illustSeriesFirstIllust: PixivIllustItem;
1093
1097
  /** Illusts on this page. */
1094
1098
  illusts: PixivIllustItem[];
1095
1099
  /** URL to the next page, or `null` when this is the last page. */
1096
- next_url: string | null;
1100
+ nextUrl: string | null;
1097
1101
  }
1098
1102
  /** Page response for GET /v1/manga/recommended. */
1099
1103
  interface MangaRecommendedPage {
1100
1104
  /** Recommended manga works. */
1101
1105
  illusts: PixivIllustItem[];
1102
1106
  /** Ranking manga works included alongside recommendations. */
1103
- ranking_illusts: PixivIllustItem[];
1107
+ rankingIllusts: PixivIllustItem[];
1104
1108
  /** Privacy-policy notice (present on the first page). */
1105
- privacy_policy?: PrivacyPolicy;
1109
+ privacyPolicy?: PrivacyPolicy;
1106
1110
  /** URL to the next page, or `null` when this is the last page. */
1107
- next_url: string | null;
1111
+ nextUrl: string | null;
1108
1112
  }
1109
1113
  /** Response shape for GET /v1/ugoira/metadata. */
1110
1114
  interface UgoiraMetadataResponse {
1111
1115
  /** Ugoira metadata (ZIP URLs and per-frame timings). */
1112
- ugoira_metadata: PixivUgoiraItem;
1116
+ ugoiraMetadata: PixivUgoiraItem;
1113
1117
  }
1114
1118
  /** Response shape for GET /v2/novel/detail. */
1115
1119
  interface NovelDetailResponse {
@@ -1125,33 +1129,33 @@ interface NovelListPage {
1125
1129
  *
1126
1130
  * Only present on search responses; absent on related/ranking/recommended endpoints.
1127
1131
  */
1128
- show_ai?: boolean;
1132
+ showAi?: boolean;
1129
1133
  /** URL to the next page, or `null` when this is the last page. */
1130
- next_url: string | null;
1134
+ nextUrl: string | null;
1131
1135
  }
1132
1136
  /** Page response for GET /v1/novel/recommended. */
1133
1137
  interface NovelRecommendedPage {
1134
1138
  /** Recommended novels. */
1135
1139
  novels: PixivNovelItem[];
1136
1140
  /** Ranking novels included alongside recommendations. */
1137
- ranking_novels: PixivNovelItem[];
1141
+ rankingNovels: PixivNovelItem[];
1138
1142
  /** Privacy-policy notice (present on the first page). */
1139
- privacy_policy?: PrivacyPolicy;
1143
+ privacyPolicy?: PrivacyPolicy;
1140
1144
  /** URL to the next page, or `null` when this is the last page. */
1141
- next_url: string | null;
1145
+ nextUrl: string | null;
1142
1146
  }
1143
1147
  /** Page response for GET /v2/novel/series. */
1144
1148
  interface NovelSeriesPage {
1145
1149
  /** Metadata for the series. */
1146
- novel_series_detail: NovelSeriesDetail;
1150
+ novelSeriesDetail: NovelSeriesDetail;
1147
1151
  /** First novel in the series. */
1148
- novel_series_first_novel: PixivNovelItem;
1152
+ novelSeriesFirstNovel: PixivNovelItem;
1149
1153
  /** Most recently published novel in the series. */
1150
- novel_series_latest_novel: PixivNovelItem;
1154
+ novelSeriesLatestNovel: PixivNovelItem;
1151
1155
  /** Novels on this page. */
1152
1156
  novels: PixivNovelItem[];
1153
1157
  /** URL to the next page, or `null` when this is the last page. */
1154
- next_url: string | null;
1158
+ nextUrl: string | null;
1155
1159
  }
1156
1160
  /** Response shape for GET /v1/user/detail. */
1157
1161
  interface UserDetailResponse {
@@ -1160,7 +1164,7 @@ interface UserDetailResponse {
1160
1164
  /** Detailed profile data. */
1161
1165
  profile: PixivUserProfile;
1162
1166
  /** Visibility settings for profile fields. */
1163
- profile_publicity: PixivUserProfilePublicity;
1167
+ profilePublicity: PixivUserProfilePublicity;
1164
1168
  /** Workspace / desk-setup information. */
1165
1169
  workspace: PixivUserProfileWorkspace;
1166
1170
  }
@@ -1171,7 +1175,7 @@ interface UserIllustsPage {
1171
1175
  /** Illusts on this page. */
1172
1176
  illusts: PixivIllustItem[];
1173
1177
  /** URL to the next page, or `null` when this is the last page. */
1174
- next_url: string | null;
1178
+ nextUrl: string | null;
1175
1179
  }
1176
1180
  /** Page response for GET /v1/user/novels. */
1177
1181
  interface UserNovelsPage {
@@ -1180,28 +1184,28 @@ interface UserNovelsPage {
1180
1184
  /** Novels on this page. */
1181
1185
  novels: PixivNovelItem[];
1182
1186
  /** URL to the next page, or `null` when this is the last page. */
1183
- next_url: string | null;
1187
+ nextUrl: string | null;
1184
1188
  }
1185
1189
  /** Page response for GET /v1/user/bookmarks/illust. */
1186
1190
  interface UserBookmarksIllustPage {
1187
1191
  /** Bookmarked illusts on this page. */
1188
1192
  illusts: PixivIllustItem[];
1189
1193
  /** URL to the next page, or `null` when this is the last page. */
1190
- next_url: string | null;
1194
+ nextUrl: string | null;
1191
1195
  }
1192
1196
  /** Page response for GET /v1/user/bookmarks/novel. */
1193
1197
  interface UserBookmarksNovelPage {
1194
1198
  /** Bookmarked novels on this page. */
1195
1199
  novels: PixivNovelItem[];
1196
1200
  /** URL to the next page, or `null` when this is the last page. */
1197
- next_url: string | null;
1201
+ nextUrl: string | null;
1198
1202
  }
1199
1203
  /** Page response for GET /v1/user/following. */
1200
1204
  interface UserFollowingPage {
1201
1205
  /** User preview items on this page. */
1202
- user_previews: PixivUserPreviewItem[];
1206
+ userPreviews: PixivUserPreviewItem[];
1203
1207
  /** URL to the next page, or `null` when this is the last page. */
1204
- next_url: string | null;
1208
+ nextUrl: string | null;
1205
1209
  }
1206
1210
 
1207
1211
  /**
@@ -1662,8 +1666,8 @@ declare class UserBookmarksResource {
1662
1666
  * // Resume from a saved cursor
1663
1667
  * import { parseNextUrl } from '@book000/pixivts'
1664
1668
  * const page = await client.users.bookmarks.illusts({ userId: client.userId })
1665
- * if (page.isOk && page.value.next_url) {
1666
- * const cursor = parseNextUrl(page.value.next_url)
1669
+ * if (page.isOk && page.value.nextUrl) {
1670
+ * const cursor = parseNextUrl(page.value.nextUrl)
1667
1671
  * const next = await client.users.bookmarks.illusts({
1668
1672
  * userId: client.userId,
1669
1673
  * maxBookmarkId: cursor.maxBookmarkId,
@@ -1857,6 +1861,25 @@ declare class PixivClient {
1857
1861
  * ```
1858
1862
  */
1859
1863
  get userId(): number;
1864
+ /**
1865
+ * Returns the current OAuth access token.
1866
+ *
1867
+ * The access token is short-lived and changes after each call to
1868
+ * {@link PixivClient.of} and after each automatic token refresh triggered
1869
+ * by a 401 response.
1870
+ *
1871
+ * @returns The current bearer access token string
1872
+ */
1873
+ getAccessToken(): string;
1874
+ /**
1875
+ * Returns the current OAuth refresh token.
1876
+ *
1877
+ * The refresh token is long-lived and is used to obtain new access tokens.
1878
+ * It may rotate after a successful token refresh.
1879
+ *
1880
+ * @returns The current refresh token string
1881
+ */
1882
+ getRefreshToken(): string;
1860
1883
  /**
1861
1884
  * Creates a PixivClient by refreshing the given token.
1862
1885
  *