@book000/pixivts 0.58.0 → 0.58.1

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.cts CHANGED
@@ -497,11 +497,11 @@ interface ParsedNextUrl {
497
497
  declare function parseNextUrl(url: string): ParsedNextUrl;
498
498
 
499
499
  /**
500
- * Public option types for @book000/pixivts.
500
+ * Public option constants for @book000/pixivts.
501
501
  *
502
- * Each option is exported as both a runtime `const` object (for enum-like
503
- * access, e.g. `BookmarkRestrict.PUBLIC`) and a TypeScript `type` (so plain
504
- * string literals such as `'public'` are also accepted).
502
+ * Each option is exported as a runtime `const` object for enum-like access
503
+ * (e.g. `BookmarkRestrict.PUBLIC`). Plain string literals are also accepted
504
+ * wherever these values are used as parameters.
505
505
  *
506
506
  * @example
507
507
  * ```ts
@@ -526,7 +526,6 @@ declare const SearchTarget: {
526
526
  readonly TITLE_AND_CAPTION: "title_and_caption";
527
527
  readonly KEYWORD: "keyword";
528
528
  };
529
- type SearchTarget = (typeof SearchTarget)[keyof typeof SearchTarget];
530
529
  /**
531
530
  * Sort order for search results.
532
531
  *
@@ -539,7 +538,6 @@ declare const SearchSort: {
539
538
  readonly DATE_ASC: "date_asc";
540
539
  readonly POPULAR_DESC: "popular_desc";
541
540
  };
542
- type SearchSort = (typeof SearchSort)[keyof typeof SearchSort];
543
541
  /**
544
542
  * Date range filter for search results.
545
543
  *
@@ -552,7 +550,6 @@ declare const SearchDuration: {
552
550
  readonly WITHIN_LAST_WEEK: "within_last_week";
553
551
  readonly WITHIN_LAST_MONTH: "within_last_month";
554
552
  };
555
- type SearchDuration = (typeof SearchDuration)[keyof typeof SearchDuration];
556
553
  /**
557
554
  * Ranking mode for illust rankings.
558
555
  *
@@ -573,7 +570,6 @@ declare const RankingMode: {
573
570
  readonly DAY_FEMALE_R18: "day_female_r18";
574
571
  readonly DAY_R18_AI: "day_r18_ai";
575
572
  };
576
- type RankingMode = (typeof RankingMode)[keyof typeof RankingMode];
577
573
  /**
578
574
  * Ranking mode for novel rankings.
579
575
  *
@@ -589,7 +585,6 @@ declare const NovelRankingMode: {
589
585
  readonly WEEK_R18: "week_r18";
590
586
  readonly DAY_R18_AI: "day_r18_ai";
591
587
  };
592
- type NovelRankingMode = (typeof NovelRankingMode)[keyof typeof NovelRankingMode];
593
588
  /**
594
589
  * Visibility restriction for bookmarks.
595
590
  *
@@ -600,7 +595,6 @@ declare const BookmarkRestrict: {
600
595
  readonly PUBLIC: "public";
601
596
  readonly PRIVATE: "private";
602
597
  };
603
- type BookmarkRestrict = (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
604
598
  /**
605
599
  * Visibility restriction for follows.
606
600
  *
@@ -611,7 +605,6 @@ declare const FollowRestrict: {
611
605
  readonly PUBLIC: "public";
612
606
  readonly PRIVATE: "private";
613
607
  };
614
- type FollowRestrict = (typeof FollowRestrict)[keyof typeof FollowRestrict];
615
608
  /**
616
609
  * OS filter used to request works compatible with the given platform.
617
610
  *
@@ -622,7 +615,6 @@ declare const OSFilter: {
622
615
  readonly FOR_IOS: "for_ios";
623
616
  readonly FOR_ANDROID: "for_android";
624
617
  };
625
- type OSFilter = (typeof OSFilter)[keyof typeof OSFilter];
626
618
  /**
627
619
  * Work type filter for user illust listings.
628
620
  *
@@ -633,7 +625,6 @@ declare const UserIllustType: {
633
625
  readonly ILLUST: "illust";
634
626
  readonly MANGA: "manga";
635
627
  };
636
- type UserIllustType = (typeof UserIllustType)[keyof typeof UserIllustType];
637
628
 
638
629
  /**
639
630
  * Public types for @book000/pixivts.
@@ -1222,7 +1213,7 @@ interface IllustDetailParams {
1222
1213
  /** ID of the illust to fetch. */
1223
1214
  illustId: number;
1224
1215
  /** OS filter to apply (default: `"for_ios"`). */
1225
- filter?: OSFilter;
1216
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1226
1217
  }
1227
1218
  /** Parameters for fetching related illusts. */
1228
1219
  interface IllustRelatedParams {
@@ -1231,24 +1222,24 @@ interface IllustRelatedParams {
1231
1222
  /** Additional seed illust IDs to influence recommendations. */
1232
1223
  seedIllustIds?: number[];
1233
1224
  /** OS filter to apply (default: `"for_ios"`). */
1234
- filter?: OSFilter;
1225
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1235
1226
  }
1236
1227
  /** Parameters for searching illusts. */
1237
1228
  interface IllustSearchParams {
1238
1229
  /** Search keyword. */
1239
1230
  word: string;
1240
1231
  /** How to match the keyword against works (default: `"partial_match_for_tags"`). */
1241
- searchTarget?: SearchTarget;
1232
+ searchTarget?: (typeof SearchTarget)[keyof typeof SearchTarget];
1242
1233
  /** Sort order for results (default: `"date_desc"`). */
1243
- sort?: SearchSort;
1234
+ sort?: (typeof SearchSort)[keyof typeof SearchSort];
1244
1235
  /** Date range preset filter (omit for no restriction). */
1245
- duration?: SearchDuration;
1236
+ duration?: (typeof SearchDuration)[keyof typeof SearchDuration];
1246
1237
  /** Start date for a custom date range (YYYY-MM-DD; requires `endDate`). */
1247
1238
  startDate?: string;
1248
1239
  /** End date for a custom date range (YYYY-MM-DD; requires `startDate`). */
1249
1240
  endDate?: string;
1250
1241
  /** OS filter to apply (default: `"for_ios"`). */
1251
- filter?: OSFilter;
1242
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1252
1243
  /** AI-generated content filter: `0` = hide AI works, `1` = show only AI works. */
1253
1244
  searchAiType?: 0 | 1;
1254
1245
  /** Zero-based offset for pagination. */
@@ -1257,9 +1248,9 @@ interface IllustSearchParams {
1257
1248
  /** Parameters for fetching the illust ranking. */
1258
1249
  interface IllustRankingParams {
1259
1250
  /** Ranking category (default: `"day"`). */
1260
- mode?: RankingMode;
1251
+ mode?: (typeof RankingMode)[keyof typeof RankingMode];
1261
1252
  /** OS filter to apply (default: `"for_ios"`). */
1262
- filter?: OSFilter;
1253
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1263
1254
  /** Specific date to fetch rankings for (YYYY-MM-DD; omit for the latest). */
1264
1255
  date?: string;
1265
1256
  /** Zero-based offset for pagination. */
@@ -1268,7 +1259,7 @@ interface IllustRankingParams {
1268
1259
  /** Parameters for fetching recommended illusts. */
1269
1260
  interface IllustRecommendedParams {
1270
1261
  /** OS filter to apply (default: `"for_ios"`). */
1271
- filter?: OSFilter;
1262
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1272
1263
  /** Zero-based offset for pagination. */
1273
1264
  offset?: number;
1274
1265
  /**
@@ -1287,14 +1278,14 @@ interface IllustSeriesParams {
1287
1278
  /** ID of the illust series to fetch. */
1288
1279
  illustSeriesId: number;
1289
1280
  /** OS filter to apply (default: `"for_ios"`). */
1290
- filter?: OSFilter;
1281
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1291
1282
  }
1292
1283
  /** Parameters for adding an illust bookmark. */
1293
1284
  interface IllustBookmarkAddParams {
1294
1285
  /** ID of the illust to bookmark. */
1295
1286
  illustId: number;
1296
1287
  /** Bookmark visibility (default: `"public"`). */
1297
- restrict?: BookmarkRestrict;
1288
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1298
1289
  /** Tags to attach to the bookmark. */
1299
1290
  tags?: string[];
1300
1291
  }
@@ -1413,13 +1404,13 @@ interface NovelSearchParams {
1413
1404
  /** Search keyword. */
1414
1405
  word: string;
1415
1406
  /** How to match the keyword against works (default: `"partial_match_for_tags"`). */
1416
- searchTarget?: SearchTarget;
1407
+ searchTarget?: (typeof SearchTarget)[keyof typeof SearchTarget];
1417
1408
  /** Sort order for results (default: `"date_desc"`). */
1418
- sort?: SearchSort;
1409
+ sort?: (typeof SearchSort)[keyof typeof SearchSort];
1419
1410
  /** OS filter to apply (default: `"for_ios"`). */
1420
- filter?: OSFilter;
1411
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1421
1412
  /** Date range preset filter (omit for no restriction). */
1422
- duration?: SearchDuration;
1413
+ duration?: (typeof SearchDuration)[keyof typeof SearchDuration];
1423
1414
  /** Start date for a custom date range (YYYY-MM-DD; requires `endDate`). */
1424
1415
  startDate?: string;
1425
1416
  /** End date for a custom date range (YYYY-MM-DD; requires `startDate`). */
@@ -1432,9 +1423,9 @@ interface NovelSearchParams {
1432
1423
  /** Parameters for fetching the novel ranking. */
1433
1424
  interface NovelRankingParams {
1434
1425
  /** Ranking category (default: `"day"`). */
1435
- mode?: NovelRankingMode;
1426
+ mode?: (typeof NovelRankingMode)[keyof typeof NovelRankingMode];
1436
1427
  /** OS filter to apply (default: `"for_ios"`). */
1437
- filter?: OSFilter;
1428
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1438
1429
  /** Specific date to fetch rankings for (YYYY-MM-DD; omit for the latest). */
1439
1430
  date?: string;
1440
1431
  /** Zero-based offset for pagination. */
@@ -1443,7 +1434,7 @@ interface NovelRankingParams {
1443
1434
  /** Parameters for fetching recommended novels. */
1444
1435
  interface NovelRecommendedParams {
1445
1436
  /** OS filter to apply (default: `"for_ios"`). */
1446
- filter?: OSFilter;
1437
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1447
1438
  /** Zero-based offset for pagination. */
1448
1439
  offset?: number;
1449
1440
  /**
@@ -1464,7 +1455,7 @@ interface NovelBookmarkAddParams {
1464
1455
  /** ID of the novel to bookmark. */
1465
1456
  novelId: number;
1466
1457
  /** Bookmark visibility (default: `"public"`). */
1467
- restrict?: BookmarkRestrict;
1458
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1468
1459
  /** Tags to attach to the bookmark. */
1469
1460
  tags?: string[];
1470
1461
  }
@@ -1578,9 +1569,9 @@ interface UserBookmarksIllustParams {
1578
1569
  /** ID of the user whose bookmarks to fetch. */
1579
1570
  userId: number;
1580
1571
  /** Visibility of the bookmarks to return (default: `"public"`). */
1581
- restrict?: BookmarkRestrict;
1572
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1582
1573
  /** OS filter to apply (default: `"for_ios"`). */
1583
- filter?: OSFilter;
1574
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1584
1575
  /** Limit results to bookmarks with this tag. */
1585
1576
  tag?: string;
1586
1577
  /** Fetch bookmarks older than this bookmark ID (cursor-based pagination). */
@@ -1593,9 +1584,9 @@ interface UserBookmarksNovelParams {
1593
1584
  /** ID of the user whose bookmarks to fetch. */
1594
1585
  userId: number;
1595
1586
  /** Visibility of the bookmarks to return (default: `"public"`). */
1596
- restrict?: BookmarkRestrict;
1587
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1597
1588
  /** OS filter to apply (default: `"for_ios"`). */
1598
- filter?: OSFilter;
1589
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1599
1590
  /** Limit results to bookmarks with this tag. */
1600
1591
  tag?: string;
1601
1592
  /** Fetch bookmarks older than this bookmark ID (cursor-based pagination). */
@@ -1608,16 +1599,16 @@ interface UserDetailParams {
1608
1599
  /** ID of the user to fetch. */
1609
1600
  userId: number;
1610
1601
  /** OS filter to apply (default: `"for_ios"`). */
1611
- filter?: OSFilter;
1602
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1612
1603
  }
1613
1604
  /** Parameters for fetching a user's illusts. */
1614
1605
  interface UserIllustsParams {
1615
1606
  /** ID of the user whose illusts to fetch. */
1616
1607
  userId: number;
1617
1608
  /** Work type to filter by (omit to return both illusts and manga). */
1618
- type?: UserIllustType;
1609
+ type?: (typeof UserIllustType)[keyof typeof UserIllustType];
1619
1610
  /** OS filter to apply (default: `"for_ios"`). */
1620
- filter?: OSFilter;
1611
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1621
1612
  /** Zero-based offset for pagination. */
1622
1613
  offset?: number;
1623
1614
  }
@@ -1626,7 +1617,7 @@ interface UserNovelsParams {
1626
1617
  /** ID of the user whose novels to fetch. */
1627
1618
  userId: number;
1628
1619
  /** OS filter to apply (default: `"for_ios"`). */
1629
- filter?: OSFilter;
1620
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1630
1621
  /** Zero-based offset for pagination. */
1631
1622
  offset?: number;
1632
1623
  }
@@ -1635,7 +1626,7 @@ interface UserFollowingParams {
1635
1626
  /** ID of the user whose following list to fetch. */
1636
1627
  userId: number;
1637
1628
  /** Visibility of the follows to return (default: `"public"`). */
1638
- restrict?: FollowRestrict;
1629
+ restrict?: (typeof FollowRestrict)[keyof typeof FollowRestrict];
1639
1630
  /** Zero-based offset for pagination. */
1640
1631
  offset?: number;
1641
1632
  }
@@ -1644,7 +1635,7 @@ interface UserFollowAddParams {
1644
1635
  /** ID of the user to follow. */
1645
1636
  userId: number;
1646
1637
  /** Visibility of the follow (default: `"public"`). */
1647
- restrict?: FollowRestrict;
1638
+ restrict?: (typeof FollowRestrict)[keyof typeof FollowRestrict];
1648
1639
  }
1649
1640
  /** Parameters for unfollowing a user. */
1650
1641
  interface UserFollowDeleteParams {
@@ -1754,7 +1745,7 @@ declare class UserResource {
1754
1745
  /** Parameters for fetching recommended manga. */
1755
1746
  interface MangaRecommendedParams {
1756
1747
  /** OS filter to apply (default: `"for_ios"`). */
1757
- filter?: OSFilter;
1748
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1758
1749
  /** Zero-based offset for pagination. */
1759
1750
  offset?: number;
1760
1751
  }
package/dist/index.d.ts CHANGED
@@ -497,11 +497,11 @@ interface ParsedNextUrl {
497
497
  declare function parseNextUrl(url: string): ParsedNextUrl;
498
498
 
499
499
  /**
500
- * Public option types for @book000/pixivts.
500
+ * Public option constants for @book000/pixivts.
501
501
  *
502
- * Each option is exported as both a runtime `const` object (for enum-like
503
- * access, e.g. `BookmarkRestrict.PUBLIC`) and a TypeScript `type` (so plain
504
- * string literals such as `'public'` are also accepted).
502
+ * Each option is exported as a runtime `const` object for enum-like access
503
+ * (e.g. `BookmarkRestrict.PUBLIC`). Plain string literals are also accepted
504
+ * wherever these values are used as parameters.
505
505
  *
506
506
  * @example
507
507
  * ```ts
@@ -526,7 +526,6 @@ declare const SearchTarget: {
526
526
  readonly TITLE_AND_CAPTION: "title_and_caption";
527
527
  readonly KEYWORD: "keyword";
528
528
  };
529
- type SearchTarget = (typeof SearchTarget)[keyof typeof SearchTarget];
530
529
  /**
531
530
  * Sort order for search results.
532
531
  *
@@ -539,7 +538,6 @@ declare const SearchSort: {
539
538
  readonly DATE_ASC: "date_asc";
540
539
  readonly POPULAR_DESC: "popular_desc";
541
540
  };
542
- type SearchSort = (typeof SearchSort)[keyof typeof SearchSort];
543
541
  /**
544
542
  * Date range filter for search results.
545
543
  *
@@ -552,7 +550,6 @@ declare const SearchDuration: {
552
550
  readonly WITHIN_LAST_WEEK: "within_last_week";
553
551
  readonly WITHIN_LAST_MONTH: "within_last_month";
554
552
  };
555
- type SearchDuration = (typeof SearchDuration)[keyof typeof SearchDuration];
556
553
  /**
557
554
  * Ranking mode for illust rankings.
558
555
  *
@@ -573,7 +570,6 @@ declare const RankingMode: {
573
570
  readonly DAY_FEMALE_R18: "day_female_r18";
574
571
  readonly DAY_R18_AI: "day_r18_ai";
575
572
  };
576
- type RankingMode = (typeof RankingMode)[keyof typeof RankingMode];
577
573
  /**
578
574
  * Ranking mode for novel rankings.
579
575
  *
@@ -589,7 +585,6 @@ declare const NovelRankingMode: {
589
585
  readonly WEEK_R18: "week_r18";
590
586
  readonly DAY_R18_AI: "day_r18_ai";
591
587
  };
592
- type NovelRankingMode = (typeof NovelRankingMode)[keyof typeof NovelRankingMode];
593
588
  /**
594
589
  * Visibility restriction for bookmarks.
595
590
  *
@@ -600,7 +595,6 @@ declare const BookmarkRestrict: {
600
595
  readonly PUBLIC: "public";
601
596
  readonly PRIVATE: "private";
602
597
  };
603
- type BookmarkRestrict = (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
604
598
  /**
605
599
  * Visibility restriction for follows.
606
600
  *
@@ -611,7 +605,6 @@ declare const FollowRestrict: {
611
605
  readonly PUBLIC: "public";
612
606
  readonly PRIVATE: "private";
613
607
  };
614
- type FollowRestrict = (typeof FollowRestrict)[keyof typeof FollowRestrict];
615
608
  /**
616
609
  * OS filter used to request works compatible with the given platform.
617
610
  *
@@ -622,7 +615,6 @@ declare const OSFilter: {
622
615
  readonly FOR_IOS: "for_ios";
623
616
  readonly FOR_ANDROID: "for_android";
624
617
  };
625
- type OSFilter = (typeof OSFilter)[keyof typeof OSFilter];
626
618
  /**
627
619
  * Work type filter for user illust listings.
628
620
  *
@@ -633,7 +625,6 @@ declare const UserIllustType: {
633
625
  readonly ILLUST: "illust";
634
626
  readonly MANGA: "manga";
635
627
  };
636
- type UserIllustType = (typeof UserIllustType)[keyof typeof UserIllustType];
637
628
 
638
629
  /**
639
630
  * Public types for @book000/pixivts.
@@ -1222,7 +1213,7 @@ interface IllustDetailParams {
1222
1213
  /** ID of the illust to fetch. */
1223
1214
  illustId: number;
1224
1215
  /** OS filter to apply (default: `"for_ios"`). */
1225
- filter?: OSFilter;
1216
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1226
1217
  }
1227
1218
  /** Parameters for fetching related illusts. */
1228
1219
  interface IllustRelatedParams {
@@ -1231,24 +1222,24 @@ interface IllustRelatedParams {
1231
1222
  /** Additional seed illust IDs to influence recommendations. */
1232
1223
  seedIllustIds?: number[];
1233
1224
  /** OS filter to apply (default: `"for_ios"`). */
1234
- filter?: OSFilter;
1225
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1235
1226
  }
1236
1227
  /** Parameters for searching illusts. */
1237
1228
  interface IllustSearchParams {
1238
1229
  /** Search keyword. */
1239
1230
  word: string;
1240
1231
  /** How to match the keyword against works (default: `"partial_match_for_tags"`). */
1241
- searchTarget?: SearchTarget;
1232
+ searchTarget?: (typeof SearchTarget)[keyof typeof SearchTarget];
1242
1233
  /** Sort order for results (default: `"date_desc"`). */
1243
- sort?: SearchSort;
1234
+ sort?: (typeof SearchSort)[keyof typeof SearchSort];
1244
1235
  /** Date range preset filter (omit for no restriction). */
1245
- duration?: SearchDuration;
1236
+ duration?: (typeof SearchDuration)[keyof typeof SearchDuration];
1246
1237
  /** Start date for a custom date range (YYYY-MM-DD; requires `endDate`). */
1247
1238
  startDate?: string;
1248
1239
  /** End date for a custom date range (YYYY-MM-DD; requires `startDate`). */
1249
1240
  endDate?: string;
1250
1241
  /** OS filter to apply (default: `"for_ios"`). */
1251
- filter?: OSFilter;
1242
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1252
1243
  /** AI-generated content filter: `0` = hide AI works, `1` = show only AI works. */
1253
1244
  searchAiType?: 0 | 1;
1254
1245
  /** Zero-based offset for pagination. */
@@ -1257,9 +1248,9 @@ interface IllustSearchParams {
1257
1248
  /** Parameters for fetching the illust ranking. */
1258
1249
  interface IllustRankingParams {
1259
1250
  /** Ranking category (default: `"day"`). */
1260
- mode?: RankingMode;
1251
+ mode?: (typeof RankingMode)[keyof typeof RankingMode];
1261
1252
  /** OS filter to apply (default: `"for_ios"`). */
1262
- filter?: OSFilter;
1253
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1263
1254
  /** Specific date to fetch rankings for (YYYY-MM-DD; omit for the latest). */
1264
1255
  date?: string;
1265
1256
  /** Zero-based offset for pagination. */
@@ -1268,7 +1259,7 @@ interface IllustRankingParams {
1268
1259
  /** Parameters for fetching recommended illusts. */
1269
1260
  interface IllustRecommendedParams {
1270
1261
  /** OS filter to apply (default: `"for_ios"`). */
1271
- filter?: OSFilter;
1262
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1272
1263
  /** Zero-based offset for pagination. */
1273
1264
  offset?: number;
1274
1265
  /**
@@ -1287,14 +1278,14 @@ interface IllustSeriesParams {
1287
1278
  /** ID of the illust series to fetch. */
1288
1279
  illustSeriesId: number;
1289
1280
  /** OS filter to apply (default: `"for_ios"`). */
1290
- filter?: OSFilter;
1281
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1291
1282
  }
1292
1283
  /** Parameters for adding an illust bookmark. */
1293
1284
  interface IllustBookmarkAddParams {
1294
1285
  /** ID of the illust to bookmark. */
1295
1286
  illustId: number;
1296
1287
  /** Bookmark visibility (default: `"public"`). */
1297
- restrict?: BookmarkRestrict;
1288
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1298
1289
  /** Tags to attach to the bookmark. */
1299
1290
  tags?: string[];
1300
1291
  }
@@ -1413,13 +1404,13 @@ interface NovelSearchParams {
1413
1404
  /** Search keyword. */
1414
1405
  word: string;
1415
1406
  /** How to match the keyword against works (default: `"partial_match_for_tags"`). */
1416
- searchTarget?: SearchTarget;
1407
+ searchTarget?: (typeof SearchTarget)[keyof typeof SearchTarget];
1417
1408
  /** Sort order for results (default: `"date_desc"`). */
1418
- sort?: SearchSort;
1409
+ sort?: (typeof SearchSort)[keyof typeof SearchSort];
1419
1410
  /** OS filter to apply (default: `"for_ios"`). */
1420
- filter?: OSFilter;
1411
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1421
1412
  /** Date range preset filter (omit for no restriction). */
1422
- duration?: SearchDuration;
1413
+ duration?: (typeof SearchDuration)[keyof typeof SearchDuration];
1423
1414
  /** Start date for a custom date range (YYYY-MM-DD; requires `endDate`). */
1424
1415
  startDate?: string;
1425
1416
  /** End date for a custom date range (YYYY-MM-DD; requires `startDate`). */
@@ -1432,9 +1423,9 @@ interface NovelSearchParams {
1432
1423
  /** Parameters for fetching the novel ranking. */
1433
1424
  interface NovelRankingParams {
1434
1425
  /** Ranking category (default: `"day"`). */
1435
- mode?: NovelRankingMode;
1426
+ mode?: (typeof NovelRankingMode)[keyof typeof NovelRankingMode];
1436
1427
  /** OS filter to apply (default: `"for_ios"`). */
1437
- filter?: OSFilter;
1428
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1438
1429
  /** Specific date to fetch rankings for (YYYY-MM-DD; omit for the latest). */
1439
1430
  date?: string;
1440
1431
  /** Zero-based offset for pagination. */
@@ -1443,7 +1434,7 @@ interface NovelRankingParams {
1443
1434
  /** Parameters for fetching recommended novels. */
1444
1435
  interface NovelRecommendedParams {
1445
1436
  /** OS filter to apply (default: `"for_ios"`). */
1446
- filter?: OSFilter;
1437
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1447
1438
  /** Zero-based offset for pagination. */
1448
1439
  offset?: number;
1449
1440
  /**
@@ -1464,7 +1455,7 @@ interface NovelBookmarkAddParams {
1464
1455
  /** ID of the novel to bookmark. */
1465
1456
  novelId: number;
1466
1457
  /** Bookmark visibility (default: `"public"`). */
1467
- restrict?: BookmarkRestrict;
1458
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1468
1459
  /** Tags to attach to the bookmark. */
1469
1460
  tags?: string[];
1470
1461
  }
@@ -1578,9 +1569,9 @@ interface UserBookmarksIllustParams {
1578
1569
  /** ID of the user whose bookmarks to fetch. */
1579
1570
  userId: number;
1580
1571
  /** Visibility of the bookmarks to return (default: `"public"`). */
1581
- restrict?: BookmarkRestrict;
1572
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1582
1573
  /** OS filter to apply (default: `"for_ios"`). */
1583
- filter?: OSFilter;
1574
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1584
1575
  /** Limit results to bookmarks with this tag. */
1585
1576
  tag?: string;
1586
1577
  /** Fetch bookmarks older than this bookmark ID (cursor-based pagination). */
@@ -1593,9 +1584,9 @@ interface UserBookmarksNovelParams {
1593
1584
  /** ID of the user whose bookmarks to fetch. */
1594
1585
  userId: number;
1595
1586
  /** Visibility of the bookmarks to return (default: `"public"`). */
1596
- restrict?: BookmarkRestrict;
1587
+ restrict?: (typeof BookmarkRestrict)[keyof typeof BookmarkRestrict];
1597
1588
  /** OS filter to apply (default: `"for_ios"`). */
1598
- filter?: OSFilter;
1589
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1599
1590
  /** Limit results to bookmarks with this tag. */
1600
1591
  tag?: string;
1601
1592
  /** Fetch bookmarks older than this bookmark ID (cursor-based pagination). */
@@ -1608,16 +1599,16 @@ interface UserDetailParams {
1608
1599
  /** ID of the user to fetch. */
1609
1600
  userId: number;
1610
1601
  /** OS filter to apply (default: `"for_ios"`). */
1611
- filter?: OSFilter;
1602
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1612
1603
  }
1613
1604
  /** Parameters for fetching a user's illusts. */
1614
1605
  interface UserIllustsParams {
1615
1606
  /** ID of the user whose illusts to fetch. */
1616
1607
  userId: number;
1617
1608
  /** Work type to filter by (omit to return both illusts and manga). */
1618
- type?: UserIllustType;
1609
+ type?: (typeof UserIllustType)[keyof typeof UserIllustType];
1619
1610
  /** OS filter to apply (default: `"for_ios"`). */
1620
- filter?: OSFilter;
1611
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1621
1612
  /** Zero-based offset for pagination. */
1622
1613
  offset?: number;
1623
1614
  }
@@ -1626,7 +1617,7 @@ interface UserNovelsParams {
1626
1617
  /** ID of the user whose novels to fetch. */
1627
1618
  userId: number;
1628
1619
  /** OS filter to apply (default: `"for_ios"`). */
1629
- filter?: OSFilter;
1620
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1630
1621
  /** Zero-based offset for pagination. */
1631
1622
  offset?: number;
1632
1623
  }
@@ -1635,7 +1626,7 @@ interface UserFollowingParams {
1635
1626
  /** ID of the user whose following list to fetch. */
1636
1627
  userId: number;
1637
1628
  /** Visibility of the follows to return (default: `"public"`). */
1638
- restrict?: FollowRestrict;
1629
+ restrict?: (typeof FollowRestrict)[keyof typeof FollowRestrict];
1639
1630
  /** Zero-based offset for pagination. */
1640
1631
  offset?: number;
1641
1632
  }
@@ -1644,7 +1635,7 @@ interface UserFollowAddParams {
1644
1635
  /** ID of the user to follow. */
1645
1636
  userId: number;
1646
1637
  /** Visibility of the follow (default: `"public"`). */
1647
- restrict?: FollowRestrict;
1638
+ restrict?: (typeof FollowRestrict)[keyof typeof FollowRestrict];
1648
1639
  }
1649
1640
  /** Parameters for unfollowing a user. */
1650
1641
  interface UserFollowDeleteParams {
@@ -1754,7 +1745,7 @@ declare class UserResource {
1754
1745
  /** Parameters for fetching recommended manga. */
1755
1746
  interface MangaRecommendedParams {
1756
1747
  /** OS filter to apply (default: `"for_ios"`). */
1757
- filter?: OSFilter;
1748
+ filter?: (typeof OSFilter)[keyof typeof OSFilter];
1758
1749
  /** Zero-based offset for pagination. */
1759
1750
  offset?: number;
1760
1751
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@book000/pixivts",
3
- "version": "0.58.0",
3
+ "version": "0.58.1",
4
4
  "description": "pixiv Unofficial API Library for TypeScript",
5
5
  "keywords": [
6
6
  "pixiv",