narou 1.0.0 → 1.2.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.
Files changed (148) hide show
  1. package/README.md +7 -0
  2. package/dist/{chunk-RITMMCZE.js → chunk-3A5MHPWL.js} +1 -1
  3. package/dist/chunk-3A5MHPWL.js.map +1 -0
  4. package/dist/{chunk-6RIDVTFQ.js → chunk-5UDKQCPJ.js} +12 -2
  5. package/dist/chunk-5UDKQCPJ.js.map +1 -0
  6. package/dist/{chunk-UN3W2CT3.js → chunk-6BZWV4ZC.js} +6 -3
  7. package/dist/{chunk-UN3W2CT3.js.map → chunk-6BZWV4ZC.js.map} +1 -1
  8. package/dist/chunk-BQLSW236.js +117 -0
  9. package/dist/chunk-BQLSW236.js.map +1 -0
  10. package/dist/{chunk-DBCAWGIX.js → chunk-DEQICAN3.js} +2 -2
  11. package/dist/chunk-E2H3AJSQ.js +57 -0
  12. package/dist/chunk-E2H3AJSQ.js.map +1 -0
  13. package/dist/chunk-HOBLKBZ6.js +452 -0
  14. package/dist/chunk-HOBLKBZ6.js.map +1 -0
  15. package/dist/{chunk-TNDGN3EF.js → chunk-IPDEGCWU.js} +1 -1
  16. package/dist/chunk-IPDEGCWU.js.map +1 -0
  17. package/dist/{chunk-GAEL5UWA.js → chunk-LQLNWSWV.js} +4 -4
  18. package/dist/{chunk-GAEL5UWA.js.map → chunk-LQLNWSWV.js.map} +1 -1
  19. package/dist/{chunk-NP5NZV5Q.js → chunk-PLEM2AOH.js} +8 -5
  20. package/dist/chunk-PLEM2AOH.js.map +1 -0
  21. package/dist/chunk-RNHRR56W.js +25 -0
  22. package/dist/chunk-RNHRR56W.js.map +1 -0
  23. package/dist/{chunk-JMTNQTNC.js → chunk-VUZIISP2.js} +2 -3
  24. package/dist/chunk-VUZIISP2.js.map +1 -0
  25. package/dist/{chunk-XAUB42TO.js → chunk-VZVUANDN.js} +6 -4
  26. package/dist/chunk-VZVUANDN.js.map +1 -0
  27. package/dist/index.browser.cjs +245 -94
  28. package/dist/index.browser.cjs.map +1 -1
  29. package/dist/index.browser.d.cts +24 -9
  30. package/dist/index.browser.d.ts +24 -9
  31. package/dist/index.browser.js +16 -16
  32. package/dist/index.browser.js.map +1 -1
  33. package/dist/index.cjs +256 -103
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.common.cjs +241 -87
  36. package/dist/index.common.cjs.map +1 -1
  37. package/dist/index.common.d.cts +2 -2
  38. package/dist/index.common.d.ts +2 -2
  39. package/dist/index.common.js +11 -8
  40. package/dist/index.d.cts +15 -6
  41. package/dist/index.d.ts +15 -6
  42. package/dist/index.js +20 -20
  43. package/dist/index.js.map +1 -1
  44. package/dist/narou-DBa12V_l.d.ts +404 -0
  45. package/dist/narou-DCp4aGfA.d.cts +404 -0
  46. package/dist/narou-fetch.cjs +10 -5
  47. package/dist/narou-fetch.cjs.map +1 -1
  48. package/dist/narou-fetch.d.cts +4 -3
  49. package/dist/narou-fetch.d.ts +4 -3
  50. package/dist/narou-fetch.js +4 -4
  51. package/dist/narou-jsonp.cjs +5 -2
  52. package/dist/narou-jsonp.cjs.map +1 -1
  53. package/dist/narou-jsonp.d.cts +2 -2
  54. package/dist/narou-jsonp.d.ts +2 -2
  55. package/dist/narou-jsonp.js +4 -4
  56. package/dist/narou-ranking-results.d.cts +2 -2
  57. package/dist/narou-ranking-results.d.ts +2 -2
  58. package/dist/{narou-search-results-D_vbjc_I.d.cts → narou-search-results-C21hWrnL.d.cts} +30 -19
  59. package/dist/{narou-search-results-CvMcnYqe.d.ts → narou-search-results-DT0YdaBn.d.ts} +30 -19
  60. package/dist/narou-search-results.cjs.map +1 -1
  61. package/dist/narou-search-results.d.cts +1 -1
  62. package/dist/narou-search-results.d.ts +1 -1
  63. package/dist/narou-search-results.js +1 -1
  64. package/dist/narou.cjs +4 -1
  65. package/dist/narou.cjs.map +1 -1
  66. package/dist/narou.d.cts +2 -2
  67. package/dist/narou.d.ts +2 -2
  68. package/dist/narou.js +2 -2
  69. package/dist/params.cjs +12 -1
  70. package/dist/params.cjs.map +1 -1
  71. package/dist/params.d.cts +1 -1
  72. package/dist/params.d.ts +1 -1
  73. package/dist/params.js +3 -1
  74. package/dist/ranking-history.cjs +11 -3
  75. package/dist/ranking-history.cjs.map +1 -1
  76. package/dist/ranking-history.d.cts +12 -1
  77. package/dist/ranking-history.d.ts +12 -1
  78. package/dist/ranking-history.js +2 -1
  79. package/dist/ranking.cjs +201 -78
  80. package/dist/ranking.cjs.map +1 -1
  81. package/dist/ranking.d.cts +70 -9
  82. package/dist/ranking.d.ts +70 -9
  83. package/dist/ranking.js +4 -3
  84. package/dist/search-builder-r18.cjs +133 -60
  85. package/dist/search-builder-r18.cjs.map +1 -1
  86. package/dist/search-builder-r18.d.cts +19 -6
  87. package/dist/search-builder-r18.d.ts +19 -6
  88. package/dist/search-builder-r18.js +3 -3
  89. package/dist/search-builder.cjs +150 -70
  90. package/dist/search-builder.cjs.map +1 -1
  91. package/dist/search-builder.d.cts +2 -2
  92. package/dist/search-builder.d.ts +2 -2
  93. package/dist/search-builder.js +2 -2
  94. package/dist/user-search.cjs +37 -13
  95. package/dist/user-search.cjs.map +1 -1
  96. package/dist/user-search.d.cts +2 -2
  97. package/dist/user-search.d.ts +2 -2
  98. package/dist/user-search.js +3 -3
  99. package/dist/util/date.cjs +51 -0
  100. package/dist/util/date.cjs.map +1 -0
  101. package/dist/util/date.d.cts +21 -0
  102. package/dist/util/date.d.ts +21 -0
  103. package/dist/util/date.js +11 -0
  104. package/dist/util/date.js.map +1 -0
  105. package/dist/util/jsonp.cjs.map +1 -1
  106. package/dist/util/jsonp.d.cts +36 -0
  107. package/dist/util/jsonp.d.ts +36 -0
  108. package/dist/util/jsonp.js +1 -1
  109. package/dist/util/type.cjs.map +1 -1
  110. package/dist/util/type.d.cts +23 -0
  111. package/dist/util/type.d.ts +23 -0
  112. package/dist/util/unzipp.cjs +1 -2
  113. package/dist/util/unzipp.cjs.map +1 -1
  114. package/dist/util/unzipp.d.cts +9 -0
  115. package/dist/util/unzipp.d.ts +9 -0
  116. package/dist/util/unzipp.js +1 -1
  117. package/package.json +47 -46
  118. package/pnpm-lock.yaml +3041 -0
  119. package/src/index.browser.ts +21 -5
  120. package/src/index.ts +11 -2
  121. package/src/narou-fetch.ts +5 -2
  122. package/src/narou-jsonp.ts +1 -1
  123. package/src/narou-search-results.ts +2 -1
  124. package/src/narou.ts +4 -1
  125. package/src/params.ts +34 -18
  126. package/src/ranking-history.ts +13 -4
  127. package/src/ranking.ts +79 -15
  128. package/src/search-builder-r18.ts +17 -4
  129. package/src/search-builder.ts +203 -79
  130. package/src/util/date.ts +38 -0
  131. package/src/util/jsonp.ts +61 -6
  132. package/src/util/type.ts +23 -0
  133. package/src/util/unzipp.ts +9 -0
  134. package/dist/chunk-6RIDVTFQ.js.map +0 -1
  135. package/dist/chunk-JMTNQTNC.js.map +0 -1
  136. package/dist/chunk-NP5NZV5Q.js.map +0 -1
  137. package/dist/chunk-OJGRUQEQ.js +0 -372
  138. package/dist/chunk-OJGRUQEQ.js.map +0 -1
  139. package/dist/chunk-QQYQ4GQF.js +0 -83
  140. package/dist/chunk-QQYQ4GQF.js.map +0 -1
  141. package/dist/chunk-RITMMCZE.js.map +0 -1
  142. package/dist/chunk-TNDGN3EF.js.map +0 -1
  143. package/dist/chunk-XAUB42TO.js.map +0 -1
  144. package/dist/chunk-YJQXIVFD.js +0 -44
  145. package/dist/chunk-YJQXIVFD.js.map +0 -1
  146. package/dist/narou-CosGR0J9.d.cts +0 -298
  147. package/dist/narou-CutsOEgk.d.ts +0 -298
  148. /package/dist/{chunk-DBCAWGIX.js.map → chunk-DEQICAN3.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { d as NovelSearchBuilderBase } from './narou-CosGR0J9.cjs';
2
- import { r as NarouSearchResult, d as SearchResultFieldNames, N as NarouSearchResults, h as R18Site, e as R18Fields, w as SearchResultR18Fields, O as OptionalFields, v as SearchResultOptionalFields } from './narou-search-results-D_vbjc_I.cjs';
1
+ import { d as NovelSearchBuilderBase } from './narou-DCp4aGfA.cjs';
2
+ import { d as SearchResultFieldNames, r as NarouSearchResult, N as NarouSearchResults, h as R18Site, e as R18Fields, w as SearchResultR18Fields, O as OptionalFields, v as SearchResultOptionalFields } from './narou-search-results-C21hWrnL.cjs';
3
3
  import './ranking-history.cjs';
4
4
  import './util/type.cjs';
5
5
 
@@ -15,17 +15,30 @@ declare class SearchBuilderR18<T extends SearchResultFieldNames = DefaultR18Sear
15
15
  * @returns {Promise<NarouSearchResults>} 検索結果
16
16
  */
17
17
  execute(): Promise<NarouSearchResults<NarouSearchResult, T | TOpt>>;
18
+ /**
19
+ * 抽出するR18サイトを指定します (nocgenre)。
20
+ * @param sites R18サイトコード、またはR18サイトコードの配列 (1: ノクターンノベルズ, 2: ムーンライトノベルズ(男性向け), 3: ムーンライトノベルズ(BL), 4: ミッドナイトノベルズ)
21
+ * @return {this}
22
+ */
18
23
  r18Site(sites: R18Site | readonly R18Site[]): this;
19
24
  /**
20
- *
21
- * @return {SearchBuilder} this
25
+ * X-IDを指定して取得します (xid)。
26
+ * @param ids X-ID、またはX-IDの配列
27
+ * @return {this}
22
28
  */
23
29
  xid(ids: number | readonly number[]): this;
24
30
  /**
25
- *
26
- * @return {SearchBuilder} this
31
+ * 出力する項目を個別に指定します (of)。
32
+ * 未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
33
+ * @param fields 出力するR18フィールド名、またはR18フィールド名の配列
34
+ * @return {SearchBuilderR18<SearchResultR18Fields<R18Fields>>} 型が更新されたビルダー
27
35
  */
28
36
  fields<TFields extends R18Fields>(fields: TFields | readonly TFields[]): SearchBuilderR18<SearchResultR18Fields<R18Fields>>;
37
+ /**
38
+ * 出力オプション項目を指定します (opt)。
39
+ * @param option 出力するオプションフィールド名、またはオプションフィールド名の配列
40
+ * @return {SearchBuilderR18<T, SearchResultOptionalFields<TFields>>} 型が更新されたビルダー
41
+ */
29
42
  opt<TFields extends OptionalFields>(option: TFields | readonly TFields[]): SearchBuilderR18<T, SearchResultOptionalFields<TFields>>;
30
43
  }
31
44
 
@@ -1,5 +1,5 @@
1
- import { d as NovelSearchBuilderBase } from './narou-CutsOEgk.js';
2
- import { r as NarouSearchResult, d as SearchResultFieldNames, N as NarouSearchResults, h as R18Site, e as R18Fields, w as SearchResultR18Fields, O as OptionalFields, v as SearchResultOptionalFields } from './narou-search-results-CvMcnYqe.js';
1
+ import { d as NovelSearchBuilderBase } from './narou-DBa12V_l.js';
2
+ import { d as SearchResultFieldNames, r as NarouSearchResult, N as NarouSearchResults, h as R18Site, e as R18Fields, w as SearchResultR18Fields, O as OptionalFields, v as SearchResultOptionalFields } from './narou-search-results-DT0YdaBn.js';
3
3
  import './ranking-history.js';
4
4
  import './util/type.js';
5
5
 
@@ -15,17 +15,30 @@ declare class SearchBuilderR18<T extends SearchResultFieldNames = DefaultR18Sear
15
15
  * @returns {Promise<NarouSearchResults>} 検索結果
16
16
  */
17
17
  execute(): Promise<NarouSearchResults<NarouSearchResult, T | TOpt>>;
18
+ /**
19
+ * 抽出するR18サイトを指定します (nocgenre)。
20
+ * @param sites R18サイトコード、またはR18サイトコードの配列 (1: ノクターンノベルズ, 2: ムーンライトノベルズ(男性向け), 3: ムーンライトノベルズ(BL), 4: ミッドナイトノベルズ)
21
+ * @return {this}
22
+ */
18
23
  r18Site(sites: R18Site | readonly R18Site[]): this;
19
24
  /**
20
- *
21
- * @return {SearchBuilder} this
25
+ * X-IDを指定して取得します (xid)。
26
+ * @param ids X-ID、またはX-IDの配列
27
+ * @return {this}
22
28
  */
23
29
  xid(ids: number | readonly number[]): this;
24
30
  /**
25
- *
26
- * @return {SearchBuilder} this
31
+ * 出力する項目を個別に指定します (of)。
32
+ * 未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
33
+ * @param fields 出力するR18フィールド名、またはR18フィールド名の配列
34
+ * @return {SearchBuilderR18<SearchResultR18Fields<R18Fields>>} 型が更新されたビルダー
27
35
  */
28
36
  fields<TFields extends R18Fields>(fields: TFields | readonly TFields[]): SearchBuilderR18<SearchResultR18Fields<R18Fields>>;
37
+ /**
38
+ * 出力オプション項目を指定します (opt)。
39
+ * @param option 出力するオプションフィールド名、またはオプションフィールド名の配列
40
+ * @return {SearchBuilderR18<T, SearchResultOptionalFields<TFields>>} 型が更新されたビルダー
41
+ */
29
42
  opt<TFields extends OptionalFields>(option: TFields | readonly TFields[]): SearchBuilderR18<T, SearchResultOptionalFields<TFields>>;
30
43
  }
31
44
 
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  SearchBuilderR18
3
- } from "./chunk-YJQXIVFD.js";
4
- import "./chunk-OJGRUQEQ.js";
5
- import "./chunk-6RIDVTFQ.js";
3
+ } from "./chunk-E2H3AJSQ.js";
4
+ import "./chunk-HOBLKBZ6.js";
5
+ import "./chunk-5UDKQCPJ.js";
6
6
  export {
7
7
  SearchBuilderR18 as default
8
8
  };
@@ -148,14 +148,30 @@ var SearchBuilderBase = class {
148
148
  /**
149
149
  * constructor
150
150
  * @private
151
+ * @param params クエリパラメータ
152
+ * @param api NarouNovel インスタンス
151
153
  */
152
154
  constructor(params = {}, api) {
153
155
  this.params = params;
154
156
  this.api = api;
155
157
  }
158
+ /**
159
+ * 配列から重複を除去する
160
+ * @protected
161
+ * @static
162
+ * @param array 配列
163
+ * @returns 重複を除去した配列
164
+ */
156
165
  static distinct(array) {
157
166
  return Array.from(new Set(array));
158
167
  }
168
+ /**
169
+ * 配列をハイフン区切りの文字列に変換する
170
+ * @protected
171
+ * @static
172
+ * @param n 文字列または数値の配列、あるいは単一の文字列または数値
173
+ * @returns ハイフン区切りの文字列
174
+ */
159
175
  static array2string(n) {
160
176
  if (Array.isArray(n)) {
161
177
  return this.distinct(n).join("-");
@@ -164,44 +180,48 @@ var SearchBuilderBase = class {
164
180
  }
165
181
  }
166
182
  /**
167
- *
168
- * @return {SearchBuilder} this
183
+ * 取得件数を指定する (lim)
184
+ * @param num 取得件数 (1-500)
185
+ * @return {this}
169
186
  */
170
187
  limit(num) {
171
188
  this.set({ lim: num });
172
189
  return this;
173
190
  }
174
191
  /**
175
- *
176
- * @return {SearchBuilder} this
192
+ * 取得開始位置を指定する (st)
193
+ * @param num 取得開始位置 (1-)
194
+ * @return {this}
177
195
  */
178
196
  start(num) {
179
197
  this.set({ st: num });
180
198
  return this;
181
199
  }
182
200
  /**
183
- *
184
- * @return {SearchBuilder} this
201
+ * ページ番号と1ページあたりの件数で取得範囲を指定する
202
+ * @param no ページ番号 (0-)
203
+ * @param count 1ページあたりの件数 (デフォルト: 20)
204
+ * @return {this}
185
205
  */
186
206
  page(no, count = 20) {
187
207
  return this.limit(count).start(no * count);
188
208
  }
189
209
  /**
190
- * 出力順序を指定する。指定しない場合は新着順となります。
191
- * old 古い順
210
+ * 出力順序を指定する (order)
211
+ * 指定しない場合は新着順となります。
192
212
  * @param {TOrder} order 出力順序
193
- * @return {SearchBuilder} this
213
+ * @return {this}
194
214
  */
195
215
  order(order) {
196
216
  this.set({ order });
197
217
  return this;
198
218
  }
199
219
  /**
200
- * gzip圧縮する。
220
+ * gzip圧縮レベルを指定する (gzip)
201
221
  *
202
222
  * 転送量上限を減らすためにも推奨
203
223
  * @param {GzipLevel} level gzip圧縮レベル(1~5)
204
- * @return {SearchBuilder} this
224
+ * @return {this}
205
225
  */
206
226
  gzip(level) {
207
227
  this.set({ gzip: level });
@@ -209,8 +229,9 @@ var SearchBuilderBase = class {
209
229
  }
210
230
  /**
211
231
  * クエリパラメータをセットする
212
- * @private
213
- * @return {SearchBuilder} this
232
+ * @protected
233
+ * @param obj セットするパラメータ
234
+ * @return {this}
214
235
  */
215
236
  set(obj) {
216
237
  this.params = { ...this.params, ...obj };
@@ -218,6 +239,9 @@ var SearchBuilderBase = class {
218
239
  }
219
240
  /**
220
241
  * クエリパラメータを削除する
242
+ * @protected
243
+ * @param key 削除するパラメータのキー
244
+ * @returns {this}
221
245
  */
222
246
  unset(key) {
223
247
  delete this.params[key];
@@ -226,56 +250,65 @@ var SearchBuilderBase = class {
226
250
  };
227
251
  var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilderBase {
228
252
  /**
229
- * a
230
- * @return {SearchBuilder} this
253
+ * 検索語を指定します (word)。
254
+ * 半角または全角スペースで区切るとAND抽出になります。部分一致でHITします。
255
+ * @param word 検索語
256
+ * @return {this}
231
257
  */
232
258
  word(word) {
233
259
  this.set({ word });
234
260
  return this;
235
261
  }
236
262
  /**
237
- *
238
- * @return {SearchBuilder} this
263
+ * 除外したい単語を指定します (notword)。
264
+ * スペースで区切ることにより除外する単語を増やせます。部分一致で除外されます。
265
+ * @param word 除外語
266
+ * @return {this}
239
267
  */
240
268
  notWord(word) {
241
269
  this.set({ notword: word });
242
270
  return this;
243
271
  }
244
272
  /**
245
- *
246
- * @return {SearchBuilder} this
273
+ * 検索対象を作品名に限定するかどうかを指定します (title)。
274
+ * @param bool trueの場合、作品名を検索対象とする (デフォルト: true)
275
+ * @return {this}
247
276
  */
248
277
  byTitle(bool = true) {
249
278
  this.set({ title: bool ? BooleanNumber.True : BooleanNumber.False });
250
279
  return this;
251
280
  }
252
281
  /**
253
- *
254
- * @return {SearchBuilder} this
282
+ * 検索対象をあらすじに限定するかどうかを指定します (ex)。
283
+ * @param bool trueの場合、あらすじを検索対象とする (デフォルト: true)
284
+ * @return {this}
255
285
  */
256
286
  byOutline(bool = true) {
257
287
  this.set({ ex: bool ? BooleanNumber.True : BooleanNumber.False });
258
288
  return this;
259
289
  }
260
290
  /**
261
- *
262
- * @return {SearchBuilder} this
291
+ * 検索対象をキーワードに限定するかどうかを指定します (keyword)。
292
+ * @param bool trueの場合、キーワードを検索対象とする (デフォルト: true)
293
+ * @return {this}
263
294
  */
264
295
  byKeyword(bool = true) {
265
296
  this.set({ keyword: bool ? BooleanNumber.True : BooleanNumber.False });
266
297
  return this;
267
298
  }
268
299
  /**
269
- *
270
- * @return {SearchBuilder} this
300
+ * 検索対象を作者名に限定するかどうかを指定します (wname)。
301
+ * @param bool trueの場合、作者名を検索対象とする (デフォルト: true)
302
+ * @return {this}
271
303
  */
272
304
  byAuthor(bool = true) {
273
305
  this.set({ wname: bool ? BooleanNumber.True : BooleanNumber.False });
274
306
  return this;
275
307
  }
276
308
  /**
277
- *
278
- * @return {SearchBuilder} this
309
+ * ボーイズラブ作品を抽出または除外します (isbl/notbl)。
310
+ * @param bool trueの場合、ボーイズラブ作品を抽出する (デフォルト: true)。falseの場合、除外する。
311
+ * @return {this}
279
312
  */
280
313
  isBL(bool = true) {
281
314
  if (bool) {
@@ -286,8 +319,9 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
286
319
  return this;
287
320
  }
288
321
  /**
289
- *
290
- * @return {SearchBuilder} this
322
+ * ガールズラブ作品を抽出または除外します (isgl/notgl)。
323
+ * @param bool trueの場合、ガールズラブ作品を抽出する (デフォルト: true)。falseの場合、除外する。
324
+ * @return {this}
291
325
  */
292
326
  isGL(bool = true) {
293
327
  if (bool) {
@@ -298,8 +332,9 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
298
332
  return this;
299
333
  }
300
334
  /**
301
- *
302
- * @return {SearchBuilder} this
335
+ * 残酷な描写あり作品を抽出または除外します (iszankoku/notzankoku)。
336
+ * @param bool trueの場合、残酷な描写あり作品を抽出する (デフォルト: true)。falseの場合、除外する。
337
+ * @return {this}
303
338
  */
304
339
  isZankoku(bool = true) {
305
340
  if (bool) {
@@ -310,8 +345,9 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
310
345
  return this;
311
346
  }
312
347
  /**
313
- *
314
- * @return {SearchBuilder} this
348
+ * 異世界転生作品を抽出または除外します (istensei/nottensei)。
349
+ * @param bool trueの場合、異世界転生作品を抽出する (デフォルト: true)。falseの場合、除外する。
350
+ * @return {this}
315
351
  */
316
352
  isTensei(bool = true) {
317
353
  if (bool) {
@@ -322,8 +358,9 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
322
358
  return this;
323
359
  }
324
360
  /**
325
- *
326
- * @return {SearchBuilder} this
361
+ * 異世界転移作品を抽出または除外します (istenni/nottenni)。
362
+ * @param bool trueの場合、異世界転移作品を抽出する (デフォルト: true)。falseの場合、除外する。
363
+ * @return {this}
327
364
  */
328
365
  isTenni(bool = true) {
329
366
  if (bool) {
@@ -334,16 +371,18 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
334
371
  return this;
335
372
  }
336
373
  /**
337
- *
338
- * @return {SearchBuilder} this
374
+ * 異世界転生または異世界転移作品を抽出します (istt)。
375
+ * @return {this}
339
376
  */
340
377
  isTT() {
341
378
  this.set({ istt: BooleanNumber.True });
342
379
  return this;
343
380
  }
344
381
  /**
345
- *
346
- * @return {SearchBuilder} this
382
+ * 抽出する作品の文字数を指定します (length)。
383
+ * 範囲指定する場合は、最小文字数と最大文字数をハイフン(-)記号で区切ってください。
384
+ * @param length 文字数、または[最小文字数, 最大文字数]
385
+ * @return {this}
347
386
  */
348
387
  length(length) {
349
388
  this.set({ length: _NovelSearchBuilderBase.array2string(length) });
@@ -360,59 +399,66 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
360
399
  return this;
361
400
  }
362
401
  /**
363
- *
364
- * @return {SearchBuilder} this
402
+ * 抽出する作品の挿絵数を指定します (sasie)。
403
+ * @param num 挿絵数、または[最小挿絵数, 最大挿絵数]
404
+ * @return {this}
365
405
  */
366
406
  sasie(num) {
367
407
  this.set({ sasie: _NovelSearchBuilderBase.array2string(num) });
368
408
  return this;
369
409
  }
370
410
  /**
371
- *
372
- * @return {SearchBuilder} this
411
+ * 抽出する作品の予想読了時間を分単位で指定します (time)。
412
+ * @param num 読了時間(分)、または[最小読了時間, 最大読了時間]
413
+ * @return {this}
373
414
  */
374
415
  time(num) {
375
416
  this.set({ time: _NovelSearchBuilderBase.array2string(num) });
376
417
  return this;
377
418
  }
378
419
  /**
379
- *
380
- * @return {SearchBuilder} this
420
+ * Nコードを指定して取得します (ncode)。
421
+ * @param ncodes Nコード、またはNコードの配列
422
+ * @return {this}
381
423
  */
382
424
  ncode(ncodes) {
383
425
  this.set({ ncode: _NovelSearchBuilderBase.array2string(ncodes) });
384
426
  return this;
385
427
  }
386
428
  /**
387
- *
388
- * @return {SearchBuilder} this
429
+ * 抽出する小説タイプを指定します (type)。
430
+ * @param type 小説タイプ (t: 短編, r: 連載中, er: 完結済連載小説, ter: 短編と完結済連載小説, re: 連載中と完結済連載小説)
431
+ * @return {this}
389
432
  */
390
433
  type(type) {
391
434
  this.set({ type });
392
435
  return this;
393
436
  }
394
437
  /**
395
- *
396
- * @return {SearchBuilder} this
438
+ * 抽出する作品の文体を指定します (buntai)。
439
+ * 複数指定する場合はハイフン(-)で区切ってください。
440
+ * @param buntai 文体コード、または文体コードの配列
441
+ * @return {this}
397
442
  */
398
443
  buntai(buntai) {
399
444
  this.set({ buntai: _NovelSearchBuilderBase.array2string(buntai) });
400
445
  return this;
401
446
  }
402
447
  /**
403
- *
404
- * @return {SearchBuilder} this
448
+ * 連載停止中作品に関する指定をします (stop)。
449
+ * @param bool trueの場合、長期連載停止中のみ取得する (デフォルト: true)。falseの場合、長期連載停止中を除外する。
450
+ * @return {this}
405
451
  */
406
452
  isStop(bool = true) {
407
453
  this.set({ stop: bool ? StopParam.Stopping : StopParam.NoStopping });
408
454
  return this;
409
455
  }
410
456
  /**
411
- *
412
- * @return {SearchBuilder} this
457
+ * ピックアップ作品のみを取得します (ispickup)。
458
+ * @return {this}
413
459
  */
414
- isPickup(bool = true) {
415
- this.set({ ispickup: bool ? BooleanNumber.True : BooleanNumber.False });
460
+ isPickup() {
461
+ this.set({ ispickup: BooleanNumber.True });
416
462
  return this;
417
463
  }
418
464
  lastUpdate(x, y) {
@@ -421,7 +467,7 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
421
467
  date = x;
422
468
  } else if (x instanceof Date && y instanceof Date) {
423
469
  date = `${Math.floor(x.getTime() / 1e3)}-${Math.floor(
424
- x.getTime() / 1e3
470
+ y.getTime() / 1e3
425
471
  )}`;
426
472
  } else {
427
473
  date = `${x}-${y}`;
@@ -429,6 +475,20 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
429
475
  this.set({ lastup: date });
430
476
  return this;
431
477
  }
478
+ lastNovelUpdate(x, y) {
479
+ let date;
480
+ if (typeof x == "string") {
481
+ date = x;
482
+ } else if (x instanceof Date && y instanceof Date) {
483
+ date = `${Math.floor(x.getTime() / 1e3)}-${Math.floor(
484
+ y.getTime() / 1e3
485
+ )}`;
486
+ } else {
487
+ date = `${x}-${y}`;
488
+ }
489
+ this.set({ lastupdate: date });
490
+ return this;
491
+ }
432
492
  /**
433
493
  * なろう小説APIへの検索リクエストを実行する
434
494
  * @returns {Promise<NarouSearchResults>} 検索結果
@@ -439,48 +499,59 @@ var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilder
439
499
  };
440
500
  var SearchBuilder = class _SearchBuilder extends NovelSearchBuilderBase {
441
501
  /**
442
- *
443
- * @return {SearchBuilder} this
502
+ * 大ジャンルを指定して取得します (biggenre)。
503
+ * 複数指定する場合はハイフン(-)で区切ってください。
504
+ * @param genre 大ジャンルコード、または大ジャンルコードの配列
505
+ * @return {this}
444
506
  */
445
507
  bigGenre(genre) {
446
508
  this.set({ biggenre: _SearchBuilder.array2string(genre) });
447
509
  return this;
448
510
  }
449
511
  /**
450
- *
451
- * @return {SearchBuilder} this
512
+ * 除外したい大ジャンルを指定します (notbiggenre)。
513
+ * 複数指定する場合はハイフン(-)で区切ってください。
514
+ * @param genre 除外する大ジャンルコード、または大ジャンルコードの配列
515
+ * @return {this}
452
516
  */
453
517
  notBigGenre(genre) {
454
518
  this.set({ notbiggenre: _SearchBuilder.array2string(genre) });
455
519
  return this;
456
520
  }
457
521
  /**
458
- *
459
- * @return {SearchBuilder} this
522
+ * ジャンルを指定して取得します (genre)。
523
+ * 複数指定する場合はハイフン(-)で区切ってください。
524
+ * @param genre ジャンルコード、またはジャンルコードの配列
525
+ * @return {this}
460
526
  */
461
527
  genre(genre) {
462
528
  this.set({ genre: _SearchBuilder.array2string(genre) });
463
529
  return this;
464
530
  }
465
531
  /**
466
- *
467
- * @return {SearchBuilder} this
532
+ * 除外したいジャンルを指定します (notgenre)。
533
+ * 複数指定する場合はハイフン(-)で区切ってください。
534
+ * @param genre 除外するジャンルコード、またはジャンルコードの配列
535
+ * @return {this}
468
536
  */
469
537
  notGenre(genre) {
470
538
  this.set({ notgenre: _SearchBuilder.array2string(genre) });
471
539
  return this;
472
540
  }
473
541
  /**
474
- *
475
- * @return {SearchBuilder} this
542
+ * ユーザIDを指定して取得します (userid)。
543
+ * 複数指定する場合はハイフン(-)で区切ってください。
544
+ * @param ids ユーザID、またはユーザIDの配列
545
+ * @return {this}
476
546
  */
477
547
  userId(ids) {
478
548
  this.set({ userid: _SearchBuilder.array2string(ids) });
479
549
  return this;
480
550
  }
481
551
  /**
482
- *
483
- * @return {SearchBuilder} this
552
+ * R15作品を抽出または除外します (isr15/notr15)。
553
+ * @param bool trueの場合、R15作品を抽出する (デフォルト: true)。falseの場合、除外する。
554
+ * @return {this}
484
555
  */
485
556
  isR15(bool = true) {
486
557
  if (bool) {
@@ -491,13 +562,22 @@ var SearchBuilder = class _SearchBuilder extends NovelSearchBuilderBase {
491
562
  return this;
492
563
  }
493
564
  /**
494
- *
495
- * @return {SearchBuilder} this
565
+ * 出力する項目を個別に指定します (of)。
566
+ * 未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
567
+ * 複数項目を出力する場合はハイフン(-)記号で区切ってください。
568
+ * @param fields 出力するフィールド名、またはフィールド名の配列
569
+ * @return {SearchBuilder<SearchResultFields<TFields>, TOpt>} 型が更新されたビルダー
496
570
  */
497
571
  fields(fields) {
498
572
  this.set({ of: _SearchBuilder.array2string(fields) });
499
573
  return this;
500
574
  }
575
+ /**
576
+ * 出力オプション項目を指定します (opt)。
577
+ * 複数項目を出力する場合はハイフン(-)記号で区切ってください。
578
+ * @param option 出力するオプションフィールド名、またはオプションフィールド名の配列
579
+ * @return {SearchBuilder<T, SearchResultOptionalFields<TFields>>} 型が更新されたビルダー
580
+ */
501
581
  opt(option) {
502
582
  this.set({ opt: _SearchBuilder.array2string(option) });
503
583
  return this;