narou 1.2.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +73 -37
- package/dist/index.browser.cjs +87 -1359
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +11 -19
- package/dist/index.browser.d.mts +47 -0
- package/dist/index.browser.mjs +66 -0
- package/dist/index.browser.mjs.map +1 -0
- package/dist/index.cjs +147 -1410
- package/dist/index.cjs.map +1 -1
- package/dist/index.common-8lS2K_1Y.mjs +1166 -0
- package/dist/index.common-8lS2K_1Y.mjs.map +1 -0
- package/dist/index.common-CYj0n0aU.cjs +1346 -0
- package/dist/index.common-CYj0n0aU.cjs.map +1 -0
- package/dist/index.d.cts +28 -21
- package/dist/index.d.mts +63 -0
- package/dist/index.mjs +128 -0
- package/dist/index.mjs.map +1 -0
- package/dist/user-search-BY6FdEe7.d.cts +1394 -0
- package/dist/user-search-Besgk-Hx.d.mts +1394 -0
- package/package.json +28 -37
- package/pnpm-lock.yaml +1325 -1100
- package/src/index.ts +5 -1
- package/src/narou-fetch.ts +4 -3
- package/src/narou-jsonp.ts +4 -2
- package/src/narou.ts +50 -13
- package/src/params.ts +1 -1
- package/src/ranking.ts +20 -11
- package/src/search-builder-r18.ts +6 -2
- package/src/search-builder.ts +7 -3
- package/src/user-search.ts +9 -2
- package/dist/chunk-3A5MHPWL.js +0 -37
- package/dist/chunk-3A5MHPWL.js.map +0 -1
- package/dist/chunk-4ZP5YNWI.js +0 -1
- package/dist/chunk-4ZP5YNWI.js.map +0 -1
- package/dist/chunk-5UDKQCPJ.js +0 -407
- package/dist/chunk-5UDKQCPJ.js.map +0 -1
- package/dist/chunk-6BZWV4ZC.js +0 -75
- package/dist/chunk-6BZWV4ZC.js.map +0 -1
- package/dist/chunk-BQLSW236.js +0 -117
- package/dist/chunk-BQLSW236.js.map +0 -1
- package/dist/chunk-DEQICAN3.js +0 -94
- package/dist/chunk-DEQICAN3.js.map +0 -1
- package/dist/chunk-E2H3AJSQ.js +0 -57
- package/dist/chunk-E2H3AJSQ.js.map +0 -1
- package/dist/chunk-HOBLKBZ6.js +0 -452
- package/dist/chunk-HOBLKBZ6.js.map +0 -1
- package/dist/chunk-IPDEGCWU.js +0 -39
- package/dist/chunk-IPDEGCWU.js.map +0 -1
- package/dist/chunk-LQLNWSWV.js +0 -26
- package/dist/chunk-LQLNWSWV.js.map +0 -1
- package/dist/chunk-PLEM2AOH.js +0 -44
- package/dist/chunk-PLEM2AOH.js.map +0 -1
- package/dist/chunk-RNHRR56W.js +0 -25
- package/dist/chunk-RNHRR56W.js.map +0 -1
- package/dist/chunk-VUZIISP2.js +0 -23
- package/dist/chunk-VUZIISP2.js.map +0 -1
- package/dist/chunk-VZVUANDN.js +0 -17
- package/dist/chunk-VZVUANDN.js.map +0 -1
- package/dist/index.browser.d.ts +0 -55
- package/dist/index.browser.js +0 -126
- package/dist/index.browser.js.map +0 -1
- package/dist/index.common.cjs +0 -1187
- package/dist/index.common.cjs.map +0 -1
- package/dist/index.common.d.cts +0 -6
- package/dist/index.common.d.ts +0 -6
- package/dist/index.common.js +0 -76
- package/dist/index.common.js.map +0 -1
- package/dist/index.d.ts +0 -56
- package/dist/index.js +0 -131
- package/dist/index.js.map +0 -1
- package/dist/narou-DBa12V_l.d.ts +0 -404
- package/dist/narou-DCp4aGfA.d.cts +0 -404
- package/dist/narou-fetch.cjs +0 -164
- package/dist/narou-fetch.cjs.map +0 -1
- package/dist/narou-fetch.d.cts +0 -20
- package/dist/narou-fetch.d.ts +0 -20
- package/dist/narou-fetch.js +0 -10
- package/dist/narou-fetch.js.map +0 -1
- package/dist/narou-jsonp.cjs +0 -162
- package/dist/narou-jsonp.cjs.map +0 -1
- package/dist/narou-jsonp.d.cts +0 -13
- package/dist/narou-jsonp.d.ts +0 -13
- package/dist/narou-jsonp.js +0 -10
- package/dist/narou-jsonp.js.map +0 -1
- package/dist/narou-ranking-results.cjs +0 -19
- package/dist/narou-ranking-results.cjs.map +0 -1
- package/dist/narou-ranking-results.d.cts +0 -4
- package/dist/narou-ranking-results.d.ts +0 -4
- package/dist/narou-ranking-results.js +0 -1
- package/dist/narou-ranking-results.js.map +0 -1
- package/dist/narou-search-results-C21hWrnL.d.cts +0 -727
- package/dist/narou-search-results-DT0YdaBn.d.ts +0 -727
- package/dist/narou-search-results.cjs +0 -62
- package/dist/narou-search-results.cjs.map +0 -1
- package/dist/narou-search-results.d.cts +0 -2
- package/dist/narou-search-results.d.ts +0 -2
- package/dist/narou-search-results.js +0 -11
- package/dist/narou-search-results.js.map +0 -1
- package/dist/narou.cjs +0 -112
- package/dist/narou.cjs.map +0 -1
- package/dist/narou.d.cts +0 -4
- package/dist/narou.d.ts +0 -4
- package/dist/narou.js +0 -8
- package/dist/narou.js.map +0 -1
- package/dist/params.cjs +0 -448
- package/dist/params.cjs.map +0 -1
- package/dist/params.d.cts +0 -2
- package/dist/params.d.ts +0 -2
- package/dist/params.js +0 -41
- package/dist/params.js.map +0 -1
- package/dist/ranking-history.cjs +0 -47
- package/dist/ranking-history.cjs.map +0 -1
- package/dist/ranking-history.d.cts +0 -28
- package/dist/ranking-history.d.ts +0 -28
- package/dist/ranking-history.js +0 -8
- package/dist/ranking-history.js.map +0 -1
- package/dist/ranking.cjs +0 -783
- package/dist/ranking.cjs.map +0 -1
- package/dist/ranking.d.cts +0 -108
- package/dist/ranking.d.ts +0 -108
- package/dist/ranking.js +0 -10
- package/dist/ranking.js.map +0 -1
- package/dist/search-builder-r18.cjs +0 -547
- package/dist/search-builder-r18.cjs.map +0 -1
- package/dist/search-builder-r18.d.cts +0 -45
- package/dist/search-builder-r18.d.ts +0 -45
- package/dist/search-builder-r18.js +0 -9
- package/dist/search-builder-r18.js.map +0 -1
- package/dist/search-builder.cjs +0 -591
- package/dist/search-builder.cjs.map +0 -1
- package/dist/search-builder.d.cts +0 -4
- package/dist/search-builder.d.ts +0 -4
- package/dist/search-builder.js +0 -12
- package/dist/search-builder.js.map +0 -1
- package/dist/user-search.cjs +0 -325
- package/dist/user-search.cjs.map +0 -1
- package/dist/user-search.d.cts +0 -66
- package/dist/user-search.d.ts +0 -66
- package/dist/user-search.js +0 -9
- package/dist/user-search.js.map +0 -1
- package/dist/util/date.cjs +0 -51
- package/dist/util/date.cjs.map +0 -1
- package/dist/util/date.d.cts +0 -21
- package/dist/util/date.d.ts +0 -21
- package/dist/util/date.js +0 -11
- package/dist/util/date.js.map +0 -1
- package/dist/util/jsonp.cjs +0 -63
- package/dist/util/jsonp.cjs.map +0 -1
- package/dist/util/jsonp.d.cts +0 -49
- package/dist/util/jsonp.d.ts +0 -49
- package/dist/util/jsonp.js +0 -7
- package/dist/util/jsonp.js.map +0 -1
- package/dist/util/type.cjs +0 -19
- package/dist/util/type.cjs.map +0 -1
- package/dist/util/type.d.cts +0 -27
- package/dist/util/type.d.ts +0 -27
- package/dist/util/type.js +0 -1
- package/dist/util/type.js.map +0 -1
- package/dist/util/unzipp.cjs +0 -47
- package/dist/util/unzipp.cjs.map +0 -1
- package/dist/util/unzipp.d.cts +0 -12
- package/dist/util/unzipp.d.ts +0 -12
- package/dist/util/unzipp.js +0 -7
- package/dist/util/unzipp.js.map +0 -1
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
import './ranking-history.cjs';
|
|
4
|
-
import './util/type.cjs';
|
|
5
|
-
|
|
6
|
-
type DefaultR18SearchResultFields = keyof Omit<NarouSearchResult, "weekly_unique" | "noveltype" | "biggenre" | "genre" | "isr15" | "id">;
|
|
7
|
-
/**
|
|
8
|
-
* 18禁API検索ヘルパー
|
|
9
|
-
* @class SearchBuilderR18
|
|
10
|
-
*/
|
|
11
|
-
declare class SearchBuilderR18<T extends SearchResultFieldNames = DefaultR18SearchResultFields, TOpt extends keyof NarouSearchResult = never> extends NovelSearchBuilderBase<T | TOpt> {
|
|
12
|
-
/**
|
|
13
|
-
* なろう小説APIへの検索リクエストを実行する
|
|
14
|
-
* @override
|
|
15
|
-
* @returns {Promise<NarouSearchResults>} 検索結果
|
|
16
|
-
*/
|
|
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
|
-
*/
|
|
23
|
-
r18Site(sites: R18Site | readonly R18Site[]): this;
|
|
24
|
-
/**
|
|
25
|
-
* X-IDを指定して取得します (xid)。
|
|
26
|
-
* @param ids X-ID、またはX-IDの配列
|
|
27
|
-
* @return {this}
|
|
28
|
-
*/
|
|
29
|
-
xid(ids: number | readonly number[]): this;
|
|
30
|
-
/**
|
|
31
|
-
* 出力する項目を個別に指定します (of)。
|
|
32
|
-
* 未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
|
|
33
|
-
* @param fields 出力するR18フィールド名、またはR18フィールド名の配列
|
|
34
|
-
* @return {SearchBuilderR18<SearchResultR18Fields<R18Fields>>} 型が更新されたビルダー
|
|
35
|
-
*/
|
|
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
|
-
*/
|
|
42
|
-
opt<TFields extends OptionalFields>(option: TFields | readonly TFields[]): SearchBuilderR18<T, SearchResultOptionalFields<TFields>>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { type DefaultR18SearchResultFields, SearchBuilderR18 as default };
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
import './ranking-history.js';
|
|
4
|
-
import './util/type.js';
|
|
5
|
-
|
|
6
|
-
type DefaultR18SearchResultFields = keyof Omit<NarouSearchResult, "weekly_unique" | "noveltype" | "biggenre" | "genre" | "isr15" | "id">;
|
|
7
|
-
/**
|
|
8
|
-
* 18禁API検索ヘルパー
|
|
9
|
-
* @class SearchBuilderR18
|
|
10
|
-
*/
|
|
11
|
-
declare class SearchBuilderR18<T extends SearchResultFieldNames = DefaultR18SearchResultFields, TOpt extends keyof NarouSearchResult = never> extends NovelSearchBuilderBase<T | TOpt> {
|
|
12
|
-
/**
|
|
13
|
-
* なろう小説APIへの検索リクエストを実行する
|
|
14
|
-
* @override
|
|
15
|
-
* @returns {Promise<NarouSearchResults>} 検索結果
|
|
16
|
-
*/
|
|
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
|
-
*/
|
|
23
|
-
r18Site(sites: R18Site | readonly R18Site[]): this;
|
|
24
|
-
/**
|
|
25
|
-
* X-IDを指定して取得します (xid)。
|
|
26
|
-
* @param ids X-ID、またはX-IDの配列
|
|
27
|
-
* @return {this}
|
|
28
|
-
*/
|
|
29
|
-
xid(ids: number | readonly number[]): this;
|
|
30
|
-
/**
|
|
31
|
-
* 出力する項目を個別に指定します (of)。
|
|
32
|
-
* 未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
|
|
33
|
-
* @param fields 出力するR18フィールド名、またはR18フィールド名の配列
|
|
34
|
-
* @return {SearchBuilderR18<SearchResultR18Fields<R18Fields>>} 型が更新されたビルダー
|
|
35
|
-
*/
|
|
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
|
-
*/
|
|
42
|
-
opt<TFields extends OptionalFields>(option: TFields | readonly TFields[]): SearchBuilderR18<T, SearchResultOptionalFields<TFields>>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { type DefaultR18SearchResultFields, SearchBuilderR18 as default };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/search-builder.cjs
DELETED
|
@@ -1,591 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/search-builder.ts
|
|
21
|
-
var search_builder_exports = {};
|
|
22
|
-
__export(search_builder_exports, {
|
|
23
|
-
NovelSearchBuilderBase: () => NovelSearchBuilderBase,
|
|
24
|
-
SearchBuilderBase: () => SearchBuilderBase,
|
|
25
|
-
default: () => SearchBuilder
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(search_builder_exports);
|
|
28
|
-
|
|
29
|
-
// src/params.ts
|
|
30
|
-
var BooleanNumber = {
|
|
31
|
-
True: 1,
|
|
32
|
-
False: 0
|
|
33
|
-
};
|
|
34
|
-
var R18Site = {
|
|
35
|
-
/** ノクターンノベルズ(男性向け) */
|
|
36
|
-
Nocturne: 1,
|
|
37
|
-
/** ムーンライトノベルズ(女性向け) */
|
|
38
|
-
MoonLight: 2,
|
|
39
|
-
/** ムーンライトノベルズ(BL) */
|
|
40
|
-
MoonLightBL: 3,
|
|
41
|
-
/** ミッドナイトノベルズ(大人向け) */
|
|
42
|
-
Midnight: 4
|
|
43
|
-
};
|
|
44
|
-
var R18SiteNotation = {
|
|
45
|
-
[R18Site.Nocturne]: "\u30CE\u30AF\u30BF\u30FC\u30F3\u30CE\u30D9\u30EB\u30BA(\u7537\u6027\u5411\u3051)",
|
|
46
|
-
[R18Site.MoonLight]: "\u30E0\u30FC\u30F3\u30E9\u30A4\u30C8\u30CE\u30D9\u30EB\u30BA(\u5973\u6027\u5411\u3051)",
|
|
47
|
-
[R18Site.MoonLightBL]: "\u30E0\u30FC\u30F3\u30E9\u30A4\u30C8\u30CE\u30D9\u30EB\u30BA(BL)",
|
|
48
|
-
[R18Site.Midnight]: "\u30DF\u30C3\u30C9\u30CA\u30A4\u30C8\u30CE\u30D9\u30EB\u30BA(\u5927\u4EBA\u5411\u3051)"
|
|
49
|
-
};
|
|
50
|
-
var BigGenre = {
|
|
51
|
-
/** 恋愛 */
|
|
52
|
-
Renai: 1,
|
|
53
|
-
/** ファンタジー */
|
|
54
|
-
Fantasy: 2,
|
|
55
|
-
/** 文芸 */
|
|
56
|
-
Bungei: 3,
|
|
57
|
-
/** SF */
|
|
58
|
-
Sf: 4,
|
|
59
|
-
/** その他 */
|
|
60
|
-
Sonota: 99,
|
|
61
|
-
/** ノンジャンル */
|
|
62
|
-
NonGenre: 98
|
|
63
|
-
};
|
|
64
|
-
var BigGenreNotation = {
|
|
65
|
-
[BigGenre.Renai]: "\u604B\u611B",
|
|
66
|
-
[BigGenre.Fantasy]: "\u30D5\u30A1\u30F3\u30BF\u30B8\u30FC",
|
|
67
|
-
[BigGenre.Bungei]: "\u6587\u82B8",
|
|
68
|
-
[BigGenre.Sf]: "SF",
|
|
69
|
-
[BigGenre.Sonota]: "\u305D\u306E\u4ED6",
|
|
70
|
-
[BigGenre.NonGenre]: "\u30CE\u30F3\u30B8\u30E3\u30F3\u30EB"
|
|
71
|
-
};
|
|
72
|
-
var Genre = {
|
|
73
|
-
/** 異世界〔恋愛〕*/
|
|
74
|
-
RenaiIsekai: 101,
|
|
75
|
-
/** 現実世界〔恋愛〕*/
|
|
76
|
-
RenaiGenjitsusekai: 102,
|
|
77
|
-
/** ハイファンタジー〔ファンタジー〕*/
|
|
78
|
-
FantasyHigh: 201,
|
|
79
|
-
/** ローファンタジー〔ファンタジー〕*/
|
|
80
|
-
FantasyLow: 202,
|
|
81
|
-
/** 純文学〔文芸〕*/
|
|
82
|
-
BungeiJyunbungei: 301,
|
|
83
|
-
/** ヒューマンドラマ〔文芸〕*/
|
|
84
|
-
BungeiHumanDrama: 302,
|
|
85
|
-
/** 歴史〔文芸〕*/
|
|
86
|
-
BungeiHistory: 303,
|
|
87
|
-
/** 推理〔文芸〕*/
|
|
88
|
-
BungeiSuiri: 304,
|
|
89
|
-
/** ホラー〔文芸〕*/
|
|
90
|
-
BungeiHorror: 305,
|
|
91
|
-
/** アクション〔文芸〕*/
|
|
92
|
-
BungeiAction: 306,
|
|
93
|
-
/** コメディー〔文芸〕*/
|
|
94
|
-
BungeiComedy: 307,
|
|
95
|
-
/** VRゲーム〔SF〕*/
|
|
96
|
-
SfVrgame: 401,
|
|
97
|
-
/** 宇宙〔SF〕*/
|
|
98
|
-
SfSpace: 402,
|
|
99
|
-
/** 空想科学〔SF〕*/
|
|
100
|
-
SfKuusoukagaku: 403,
|
|
101
|
-
/** パニック〔SF〕*/
|
|
102
|
-
SfPanic: 404,
|
|
103
|
-
/** 童話〔その他〕*/
|
|
104
|
-
SonotaDouwa: 9901,
|
|
105
|
-
/** 詩〔その他〕*/
|
|
106
|
-
SonotaShi: 9902,
|
|
107
|
-
/** エッセイ〔その他〕*/
|
|
108
|
-
SonotaEssei: 9903,
|
|
109
|
-
/** リプレイ〔その他〕*/
|
|
110
|
-
SonotaReplay: 9904,
|
|
111
|
-
/** その他〔その他〕 */
|
|
112
|
-
SonotaSonota: 9999,
|
|
113
|
-
/** ノンジャンル〔ノンジャンル〕*/
|
|
114
|
-
NonGenre: 9801
|
|
115
|
-
};
|
|
116
|
-
var GenreNotation = {
|
|
117
|
-
[Genre.RenaiIsekai]: "\u7570\u4E16\u754C\u3014\u604B\u611B\u3015",
|
|
118
|
-
[Genre.RenaiGenjitsusekai]: "\u73FE\u5B9F\u4E16\u754C\u3014\u604B\u611B\u3015",
|
|
119
|
-
[Genre.FantasyHigh]: "\u30CF\u30A4\u30D5\u30A1\u30F3\u30BF\u30B8\u30FC\u3014\u30D5\u30A1\u30F3\u30BF\u30B8\u30FC\u3015",
|
|
120
|
-
[Genre.FantasyLow]: "\u30ED\u30FC\u30D5\u30A1\u30F3\u30BF\u30B8\u30FC\u3014\u30D5\u30A1\u30F3\u30BF\u30B8\u30FC\u3015",
|
|
121
|
-
[Genre.BungeiJyunbungei]: "\u7D14\u6587\u5B66\u3014\u6587\u82B8\u3015",
|
|
122
|
-
[Genre.BungeiHumanDrama]: "\u30D2\u30E5\u30FC\u30DE\u30F3\u30C9\u30E9\u30DE\u3014\u6587\u82B8\u3015",
|
|
123
|
-
[Genre.BungeiHistory]: "\u6B74\u53F2\u3014\u6587\u82B8\u3015",
|
|
124
|
-
[Genre.BungeiSuiri]: "\u63A8\u7406\u3014\u6587\u82B8\u3015",
|
|
125
|
-
[Genre.BungeiHorror]: "\u30DB\u30E9\u30FC\u3014\u6587\u82B8\u3015",
|
|
126
|
-
[Genre.BungeiAction]: "\u30A2\u30AF\u30B7\u30E7\u30F3\u3014\u6587\u82B8\u3015",
|
|
127
|
-
[Genre.BungeiComedy]: "\u30B3\u30E1\u30C7\u30A3\u30FC\u3014\u6587\u82B8\u3015",
|
|
128
|
-
[Genre.SfVrgame]: "VR\u30B2\u30FC\u30E0\u3014SF\u3015",
|
|
129
|
-
[Genre.SfSpace]: "\u5B87\u5B99\u3014SF\u3015",
|
|
130
|
-
[Genre.SfKuusoukagaku]: "\u7A7A\u60F3\u79D1\u5B66\u3014SF\u3015",
|
|
131
|
-
[Genre.SfPanic]: "\u30D1\u30CB\u30C3\u30AF\u3014SF\u3015",
|
|
132
|
-
[Genre.SonotaDouwa]: "\u7AE5\u8A71\u3014\u305D\u306E\u4ED6\u3015",
|
|
133
|
-
[Genre.SonotaShi]: "\u8A69\u3014\u305D\u306E\u4ED6\u3015",
|
|
134
|
-
[Genre.SonotaEssei]: "\u30A8\u30C3\u30BB\u30A4\u3014\u305D\u306E\u4ED6\u3015",
|
|
135
|
-
[Genre.SonotaReplay]: "\u30EA\u30D7\u30EC\u30A4\u3014\u305D\u306E\u4ED6\u3015",
|
|
136
|
-
[Genre.SonotaSonota]: "\u305D\u306E\u4ED6\u3014\u305D\u306E\u4ED6\u3015",
|
|
137
|
-
[Genre.NonGenre]: "\u30CE\u30F3\u30B8\u30E3\u30F3\u30EB\u3014\u30CE\u30F3\u30B8\u30E3\u30F3\u30EB\u3015"
|
|
138
|
-
};
|
|
139
|
-
var StopParam = {
|
|
140
|
-
/** 長期連載停止中を除きます */
|
|
141
|
-
NoStopping: 1,
|
|
142
|
-
/** 長期連載停止中のみ取得します */
|
|
143
|
-
Stopping: 2
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
// src/search-builder.ts
|
|
147
|
-
var SearchBuilderBase = class {
|
|
148
|
-
/**
|
|
149
|
-
* constructor
|
|
150
|
-
* @private
|
|
151
|
-
* @param params クエリパラメータ
|
|
152
|
-
* @param api NarouNovel インスタンス
|
|
153
|
-
*/
|
|
154
|
-
constructor(params = {}, api) {
|
|
155
|
-
this.params = params;
|
|
156
|
-
this.api = api;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* 配列から重複を除去する
|
|
160
|
-
* @protected
|
|
161
|
-
* @static
|
|
162
|
-
* @param array 配列
|
|
163
|
-
* @returns 重複を除去した配列
|
|
164
|
-
*/
|
|
165
|
-
static distinct(array) {
|
|
166
|
-
return Array.from(new Set(array));
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* 配列をハイフン区切りの文字列に変換する
|
|
170
|
-
* @protected
|
|
171
|
-
* @static
|
|
172
|
-
* @param n 文字列または数値の配列、あるいは単一の文字列または数値
|
|
173
|
-
* @returns ハイフン区切りの文字列
|
|
174
|
-
*/
|
|
175
|
-
static array2string(n) {
|
|
176
|
-
if (Array.isArray(n)) {
|
|
177
|
-
return this.distinct(n).join("-");
|
|
178
|
-
} else {
|
|
179
|
-
return n.toString();
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
/**
|
|
183
|
-
* 取得件数を指定する (lim)
|
|
184
|
-
* @param num 取得件数 (1-500)
|
|
185
|
-
* @return {this}
|
|
186
|
-
*/
|
|
187
|
-
limit(num) {
|
|
188
|
-
this.set({ lim: num });
|
|
189
|
-
return this;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* 取得開始位置を指定する (st)
|
|
193
|
-
* @param num 取得開始位置 (1-)
|
|
194
|
-
* @return {this}
|
|
195
|
-
*/
|
|
196
|
-
start(num) {
|
|
197
|
-
this.set({ st: num });
|
|
198
|
-
return this;
|
|
199
|
-
}
|
|
200
|
-
/**
|
|
201
|
-
* ページ番号と1ページあたりの件数で取得範囲を指定する
|
|
202
|
-
* @param no ページ番号 (0-)
|
|
203
|
-
* @param count 1ページあたりの件数 (デフォルト: 20)
|
|
204
|
-
* @return {this}
|
|
205
|
-
*/
|
|
206
|
-
page(no, count = 20) {
|
|
207
|
-
return this.limit(count).start(no * count);
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* 出力順序を指定する (order)
|
|
211
|
-
* 指定しない場合は新着順となります。
|
|
212
|
-
* @param {TOrder} order 出力順序
|
|
213
|
-
* @return {this}
|
|
214
|
-
*/
|
|
215
|
-
order(order) {
|
|
216
|
-
this.set({ order });
|
|
217
|
-
return this;
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* gzip圧縮レベルを指定する (gzip)
|
|
221
|
-
*
|
|
222
|
-
* 転送量上限を減らすためにも推奨
|
|
223
|
-
* @param {GzipLevel} level gzip圧縮レベル(1~5)
|
|
224
|
-
* @return {this}
|
|
225
|
-
*/
|
|
226
|
-
gzip(level) {
|
|
227
|
-
this.set({ gzip: level });
|
|
228
|
-
return this;
|
|
229
|
-
}
|
|
230
|
-
/**
|
|
231
|
-
* クエリパラメータをセットする
|
|
232
|
-
* @protected
|
|
233
|
-
* @param obj セットするパラメータ
|
|
234
|
-
* @return {this}
|
|
235
|
-
*/
|
|
236
|
-
set(obj) {
|
|
237
|
-
this.params = { ...this.params, ...obj };
|
|
238
|
-
return this;
|
|
239
|
-
}
|
|
240
|
-
/**
|
|
241
|
-
* クエリパラメータを削除する
|
|
242
|
-
* @protected
|
|
243
|
-
* @param key 削除するパラメータのキー
|
|
244
|
-
* @returns {this}
|
|
245
|
-
*/
|
|
246
|
-
unset(key) {
|
|
247
|
-
delete this.params[key];
|
|
248
|
-
return this;
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
var NovelSearchBuilderBase = class _NovelSearchBuilderBase extends SearchBuilderBase {
|
|
252
|
-
/**
|
|
253
|
-
* 検索語を指定します (word)。
|
|
254
|
-
* 半角または全角スペースで区切るとAND抽出になります。部分一致でHITします。
|
|
255
|
-
* @param word 検索語
|
|
256
|
-
* @return {this}
|
|
257
|
-
*/
|
|
258
|
-
word(word) {
|
|
259
|
-
this.set({ word });
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
/**
|
|
263
|
-
* 除外したい単語を指定します (notword)。
|
|
264
|
-
* スペースで区切ることにより除外する単語を増やせます。部分一致で除外されます。
|
|
265
|
-
* @param word 除外語
|
|
266
|
-
* @return {this}
|
|
267
|
-
*/
|
|
268
|
-
notWord(word) {
|
|
269
|
-
this.set({ notword: word });
|
|
270
|
-
return this;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* 検索対象を作品名に限定するかどうかを指定します (title)。
|
|
274
|
-
* @param bool trueの場合、作品名を検索対象とする (デフォルト: true)
|
|
275
|
-
* @return {this}
|
|
276
|
-
*/
|
|
277
|
-
byTitle(bool = true) {
|
|
278
|
-
this.set({ title: bool ? BooleanNumber.True : BooleanNumber.False });
|
|
279
|
-
return this;
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* 検索対象をあらすじに限定するかどうかを指定します (ex)。
|
|
283
|
-
* @param bool trueの場合、あらすじを検索対象とする (デフォルト: true)
|
|
284
|
-
* @return {this}
|
|
285
|
-
*/
|
|
286
|
-
byOutline(bool = true) {
|
|
287
|
-
this.set({ ex: bool ? BooleanNumber.True : BooleanNumber.False });
|
|
288
|
-
return this;
|
|
289
|
-
}
|
|
290
|
-
/**
|
|
291
|
-
* 検索対象をキーワードに限定するかどうかを指定します (keyword)。
|
|
292
|
-
* @param bool trueの場合、キーワードを検索対象とする (デフォルト: true)
|
|
293
|
-
* @return {this}
|
|
294
|
-
*/
|
|
295
|
-
byKeyword(bool = true) {
|
|
296
|
-
this.set({ keyword: bool ? BooleanNumber.True : BooleanNumber.False });
|
|
297
|
-
return this;
|
|
298
|
-
}
|
|
299
|
-
/**
|
|
300
|
-
* 検索対象を作者名に限定するかどうかを指定します (wname)。
|
|
301
|
-
* @param bool trueの場合、作者名を検索対象とする (デフォルト: true)
|
|
302
|
-
* @return {this}
|
|
303
|
-
*/
|
|
304
|
-
byAuthor(bool = true) {
|
|
305
|
-
this.set({ wname: bool ? BooleanNumber.True : BooleanNumber.False });
|
|
306
|
-
return this;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* ボーイズラブ作品を抽出または除外します (isbl/notbl)。
|
|
310
|
-
* @param bool trueの場合、ボーイズラブ作品を抽出する (デフォルト: true)。falseの場合、除外する。
|
|
311
|
-
* @return {this}
|
|
312
|
-
*/
|
|
313
|
-
isBL(bool = true) {
|
|
314
|
-
if (bool) {
|
|
315
|
-
this.set({ isbl: BooleanNumber.True });
|
|
316
|
-
} else {
|
|
317
|
-
this.set({ notbl: BooleanNumber.True });
|
|
318
|
-
}
|
|
319
|
-
return this;
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* ガールズラブ作品を抽出または除外します (isgl/notgl)。
|
|
323
|
-
* @param bool trueの場合、ガールズラブ作品を抽出する (デフォルト: true)。falseの場合、除外する。
|
|
324
|
-
* @return {this}
|
|
325
|
-
*/
|
|
326
|
-
isGL(bool = true) {
|
|
327
|
-
if (bool) {
|
|
328
|
-
this.set({ isgl: BooleanNumber.True });
|
|
329
|
-
} else {
|
|
330
|
-
this.set({ notgl: BooleanNumber.True });
|
|
331
|
-
}
|
|
332
|
-
return this;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* 残酷な描写あり作品を抽出または除外します (iszankoku/notzankoku)。
|
|
336
|
-
* @param bool trueの場合、残酷な描写あり作品を抽出する (デフォルト: true)。falseの場合、除外する。
|
|
337
|
-
* @return {this}
|
|
338
|
-
*/
|
|
339
|
-
isZankoku(bool = true) {
|
|
340
|
-
if (bool) {
|
|
341
|
-
this.set({ iszankoku: BooleanNumber.True });
|
|
342
|
-
} else {
|
|
343
|
-
this.set({ notzankoku: BooleanNumber.True });
|
|
344
|
-
}
|
|
345
|
-
return this;
|
|
346
|
-
}
|
|
347
|
-
/**
|
|
348
|
-
* 異世界転生作品を抽出または除外します (istensei/nottensei)。
|
|
349
|
-
* @param bool trueの場合、異世界転生作品を抽出する (デフォルト: true)。falseの場合、除外する。
|
|
350
|
-
* @return {this}
|
|
351
|
-
*/
|
|
352
|
-
isTensei(bool = true) {
|
|
353
|
-
if (bool) {
|
|
354
|
-
this.set({ istensei: BooleanNumber.True });
|
|
355
|
-
} else {
|
|
356
|
-
this.set({ nottensei: BooleanNumber.True });
|
|
357
|
-
}
|
|
358
|
-
return this;
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* 異世界転移作品を抽出または除外します (istenni/nottenni)。
|
|
362
|
-
* @param bool trueの場合、異世界転移作品を抽出する (デフォルト: true)。falseの場合、除外する。
|
|
363
|
-
* @return {this}
|
|
364
|
-
*/
|
|
365
|
-
isTenni(bool = true) {
|
|
366
|
-
if (bool) {
|
|
367
|
-
this.set({ istenni: BooleanNumber.True });
|
|
368
|
-
} else {
|
|
369
|
-
this.set({ nottenni: BooleanNumber.True });
|
|
370
|
-
}
|
|
371
|
-
return this;
|
|
372
|
-
}
|
|
373
|
-
/**
|
|
374
|
-
* 異世界転生または異世界転移作品を抽出します (istt)。
|
|
375
|
-
* @return {this}
|
|
376
|
-
*/
|
|
377
|
-
isTT() {
|
|
378
|
-
this.set({ istt: BooleanNumber.True });
|
|
379
|
-
return this;
|
|
380
|
-
}
|
|
381
|
-
/**
|
|
382
|
-
* 抽出する作品の文字数を指定します (length)。
|
|
383
|
-
* 範囲指定する場合は、最小文字数と最大文字数をハイフン(-)記号で区切ってください。
|
|
384
|
-
* @param length 文字数、または[最小文字数, 最大文字数]
|
|
385
|
-
* @return {this}
|
|
386
|
-
*/
|
|
387
|
-
length(length) {
|
|
388
|
-
this.set({ length: _NovelSearchBuilderBase.array2string(length) });
|
|
389
|
-
return this;
|
|
390
|
-
}
|
|
391
|
-
kaiwaritu(min, max) {
|
|
392
|
-
let n;
|
|
393
|
-
if (max != null) {
|
|
394
|
-
n = `${min}-${max}`;
|
|
395
|
-
} else {
|
|
396
|
-
n = min;
|
|
397
|
-
}
|
|
398
|
-
this.set({ kaiwaritu: n });
|
|
399
|
-
return this;
|
|
400
|
-
}
|
|
401
|
-
/**
|
|
402
|
-
* 抽出する作品の挿絵数を指定します (sasie)。
|
|
403
|
-
* @param num 挿絵数、または[最小挿絵数, 最大挿絵数]
|
|
404
|
-
* @return {this}
|
|
405
|
-
*/
|
|
406
|
-
sasie(num) {
|
|
407
|
-
this.set({ sasie: _NovelSearchBuilderBase.array2string(num) });
|
|
408
|
-
return this;
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* 抽出する作品の予想読了時間を分単位で指定します (time)。
|
|
412
|
-
* @param num 読了時間(分)、または[最小読了時間, 最大読了時間]
|
|
413
|
-
* @return {this}
|
|
414
|
-
*/
|
|
415
|
-
time(num) {
|
|
416
|
-
this.set({ time: _NovelSearchBuilderBase.array2string(num) });
|
|
417
|
-
return this;
|
|
418
|
-
}
|
|
419
|
-
/**
|
|
420
|
-
* Nコードを指定して取得します (ncode)。
|
|
421
|
-
* @param ncodes Nコード、またはNコードの配列
|
|
422
|
-
* @return {this}
|
|
423
|
-
*/
|
|
424
|
-
ncode(ncodes) {
|
|
425
|
-
this.set({ ncode: _NovelSearchBuilderBase.array2string(ncodes) });
|
|
426
|
-
return this;
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* 抽出する小説タイプを指定します (type)。
|
|
430
|
-
* @param type 小説タイプ (t: 短編, r: 連載中, er: 完結済連載小説, ter: 短編と完結済連載小説, re: 連載中と完結済連載小説)
|
|
431
|
-
* @return {this}
|
|
432
|
-
*/
|
|
433
|
-
type(type) {
|
|
434
|
-
this.set({ type });
|
|
435
|
-
return this;
|
|
436
|
-
}
|
|
437
|
-
/**
|
|
438
|
-
* 抽出する作品の文体を指定します (buntai)。
|
|
439
|
-
* 複数指定する場合はハイフン(-)で区切ってください。
|
|
440
|
-
* @param buntai 文体コード、または文体コードの配列
|
|
441
|
-
* @return {this}
|
|
442
|
-
*/
|
|
443
|
-
buntai(buntai) {
|
|
444
|
-
this.set({ buntai: _NovelSearchBuilderBase.array2string(buntai) });
|
|
445
|
-
return this;
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* 連載停止中作品に関する指定をします (stop)。
|
|
449
|
-
* @param bool trueの場合、長期連載停止中のみ取得する (デフォルト: true)。falseの場合、長期連載停止中を除外する。
|
|
450
|
-
* @return {this}
|
|
451
|
-
*/
|
|
452
|
-
isStop(bool = true) {
|
|
453
|
-
this.set({ stop: bool ? StopParam.Stopping : StopParam.NoStopping });
|
|
454
|
-
return this;
|
|
455
|
-
}
|
|
456
|
-
/**
|
|
457
|
-
* ピックアップ作品のみを取得します (ispickup)。
|
|
458
|
-
* @return {this}
|
|
459
|
-
*/
|
|
460
|
-
isPickup() {
|
|
461
|
-
this.set({ ispickup: BooleanNumber.True });
|
|
462
|
-
return this;
|
|
463
|
-
}
|
|
464
|
-
lastUpdate(x, y) {
|
|
465
|
-
let date;
|
|
466
|
-
if (typeof x == "string") {
|
|
467
|
-
date = x;
|
|
468
|
-
} else if (x instanceof Date && y instanceof Date) {
|
|
469
|
-
date = `${Math.floor(x.getTime() / 1e3)}-${Math.floor(
|
|
470
|
-
y.getTime() / 1e3
|
|
471
|
-
)}`;
|
|
472
|
-
} else {
|
|
473
|
-
date = `${x}-${y}`;
|
|
474
|
-
}
|
|
475
|
-
this.set({ lastup: date });
|
|
476
|
-
return this;
|
|
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
|
-
}
|
|
492
|
-
/**
|
|
493
|
-
* なろう小説APIへの検索リクエストを実行する
|
|
494
|
-
* @returns {Promise<NarouSearchResults>} 検索結果
|
|
495
|
-
*/
|
|
496
|
-
execute() {
|
|
497
|
-
return this.api.executeNovel(this.params);
|
|
498
|
-
}
|
|
499
|
-
};
|
|
500
|
-
var SearchBuilder = class _SearchBuilder extends NovelSearchBuilderBase {
|
|
501
|
-
/**
|
|
502
|
-
* 大ジャンルを指定して取得します (biggenre)。
|
|
503
|
-
* 複数指定する場合はハイフン(-)で区切ってください。
|
|
504
|
-
* @param genre 大ジャンルコード、または大ジャンルコードの配列
|
|
505
|
-
* @return {this}
|
|
506
|
-
*/
|
|
507
|
-
bigGenre(genre) {
|
|
508
|
-
this.set({ biggenre: _SearchBuilder.array2string(genre) });
|
|
509
|
-
return this;
|
|
510
|
-
}
|
|
511
|
-
/**
|
|
512
|
-
* 除外したい大ジャンルを指定します (notbiggenre)。
|
|
513
|
-
* 複数指定する場合はハイフン(-)で区切ってください。
|
|
514
|
-
* @param genre 除外する大ジャンルコード、または大ジャンルコードの配列
|
|
515
|
-
* @return {this}
|
|
516
|
-
*/
|
|
517
|
-
notBigGenre(genre) {
|
|
518
|
-
this.set({ notbiggenre: _SearchBuilder.array2string(genre) });
|
|
519
|
-
return this;
|
|
520
|
-
}
|
|
521
|
-
/**
|
|
522
|
-
* ジャンルを指定して取得します (genre)。
|
|
523
|
-
* 複数指定する場合はハイフン(-)で区切ってください。
|
|
524
|
-
* @param genre ジャンルコード、またはジャンルコードの配列
|
|
525
|
-
* @return {this}
|
|
526
|
-
*/
|
|
527
|
-
genre(genre) {
|
|
528
|
-
this.set({ genre: _SearchBuilder.array2string(genre) });
|
|
529
|
-
return this;
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* 除外したいジャンルを指定します (notgenre)。
|
|
533
|
-
* 複数指定する場合はハイフン(-)で区切ってください。
|
|
534
|
-
* @param genre 除外するジャンルコード、またはジャンルコードの配列
|
|
535
|
-
* @return {this}
|
|
536
|
-
*/
|
|
537
|
-
notGenre(genre) {
|
|
538
|
-
this.set({ notgenre: _SearchBuilder.array2string(genre) });
|
|
539
|
-
return this;
|
|
540
|
-
}
|
|
541
|
-
/**
|
|
542
|
-
* ユーザIDを指定して取得します (userid)。
|
|
543
|
-
* 複数指定する場合はハイフン(-)で区切ってください。
|
|
544
|
-
* @param ids ユーザID、またはユーザIDの配列
|
|
545
|
-
* @return {this}
|
|
546
|
-
*/
|
|
547
|
-
userId(ids) {
|
|
548
|
-
this.set({ userid: _SearchBuilder.array2string(ids) });
|
|
549
|
-
return this;
|
|
550
|
-
}
|
|
551
|
-
/**
|
|
552
|
-
* R15作品を抽出または除外します (isr15/notr15)。
|
|
553
|
-
* @param bool trueの場合、R15作品を抽出する (デフォルト: true)。falseの場合、除外する。
|
|
554
|
-
* @return {this}
|
|
555
|
-
*/
|
|
556
|
-
isR15(bool = true) {
|
|
557
|
-
if (bool) {
|
|
558
|
-
this.set({ isr15: 1 });
|
|
559
|
-
} else {
|
|
560
|
-
this.set({ notr15: 1 });
|
|
561
|
-
}
|
|
562
|
-
return this;
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* 出力する項目を個別に指定します (of)。
|
|
566
|
-
* 未指定時は全項目出力されます。転送量軽減のため、このパラメータの使用が推奨されます。
|
|
567
|
-
* 複数項目を出力する場合はハイフン(-)記号で区切ってください。
|
|
568
|
-
* @param fields 出力するフィールド名、またはフィールド名の配列
|
|
569
|
-
* @return {SearchBuilder<SearchResultFields<TFields>, TOpt>} 型が更新されたビルダー
|
|
570
|
-
*/
|
|
571
|
-
fields(fields) {
|
|
572
|
-
this.set({ of: _SearchBuilder.array2string(fields) });
|
|
573
|
-
return this;
|
|
574
|
-
}
|
|
575
|
-
/**
|
|
576
|
-
* 出力オプション項目を指定します (opt)。
|
|
577
|
-
* 複数項目を出力する場合はハイフン(-)記号で区切ってください。
|
|
578
|
-
* @param option 出力するオプションフィールド名、またはオプションフィールド名の配列
|
|
579
|
-
* @return {SearchBuilder<T, SearchResultOptionalFields<TFields>>} 型が更新されたビルダー
|
|
580
|
-
*/
|
|
581
|
-
opt(option) {
|
|
582
|
-
this.set({ opt: _SearchBuilder.array2string(option) });
|
|
583
|
-
return this;
|
|
584
|
-
}
|
|
585
|
-
};
|
|
586
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
587
|
-
0 && (module.exports = {
|
|
588
|
-
NovelSearchBuilderBase,
|
|
589
|
-
SearchBuilderBase
|
|
590
|
-
});
|
|
591
|
-
//# sourceMappingURL=search-builder.cjs.map
|