narou 0.8.0 → 0.8.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.
Files changed (70) hide show
  1. package/dist/index.browser.d.ts +35 -35
  2. package/dist/index.browser.js +82 -82
  3. package/dist/index.common.d.ts +14 -14
  4. package/dist/index.common.js +34 -34
  5. package/dist/index.d.ts +42 -42
  6. package/dist/index.js +90 -90
  7. package/dist/narou-fetch.d.ts +12 -12
  8. package/dist/narou-fetch.js +45 -45
  9. package/dist/narou-jsonp.d.ts +9 -9
  10. package/dist/narou-jsonp.js +23 -23
  11. package/dist/narou-ranking-results.d.ts +9 -9
  12. package/dist/narou-ranking-results.js +2 -2
  13. package/dist/narou-search-results.d.ts +130 -130
  14. package/dist/narou-search-results.js +62 -62
  15. package/dist/narou.d.ts +25 -25
  16. package/dist/narou.js +29 -29
  17. package/dist/params.d.ts +323 -323
  18. package/dist/params.js +246 -246
  19. package/dist/ranking-history.d.ts +13 -13
  20. package/dist/ranking-history.js +13 -13
  21. package/dist/ranking.d.ts +45 -45
  22. package/dist/ranking.js +86 -86
  23. package/dist/search-builder-r18.d.ts +28 -28
  24. package/dist/search-builder-r18.js +44 -44
  25. package/dist/search-builder.d.ts +219 -219
  26. package/dist/search-builder.js +380 -380
  27. package/dist/user-search.d.ts +62 -62
  28. package/dist/user-search.js +93 -93
  29. package/dist/util/jsonp.d.ts +16 -16
  30. package/dist/util/jsonp.js +45 -45
  31. package/dist/util/type.d.ts +3 -3
  32. package/dist/util/type.js +2 -2
  33. package/dist/util/unzipp.d.ts +3 -3
  34. package/dist/util/unzipp.js +11 -11
  35. package/dist.esm/index.browser.js +86 -0
  36. package/dist.esm/index.browser.js.map +1 -0
  37. package/dist.esm/index.common.js +38 -0
  38. package/dist.esm/index.common.js.map +1 -0
  39. package/dist.esm/index.js +94 -0
  40. package/dist.esm/index.js.map +1 -0
  41. package/dist.esm/narou-fetch.js +49 -0
  42. package/dist.esm/narou-fetch.js.map +1 -0
  43. package/dist.esm/narou-jsonp.js +27 -0
  44. package/dist.esm/narou-jsonp.js.map +1 -0
  45. package/dist.esm/narou-ranking-results.js +3 -0
  46. package/dist.esm/narou-ranking-results.js.map +1 -0
  47. package/dist.esm/narou-search-results.js +63 -0
  48. package/dist.esm/narou-search-results.js.map +1 -0
  49. package/dist.esm/narou.js +33 -0
  50. package/dist.esm/narou.js.map +1 -0
  51. package/dist.esm/params.js +247 -0
  52. package/dist.esm/params.js.map +1 -0
  53. package/dist.esm/ranking-history.js +14 -0
  54. package/dist.esm/ranking-history.js.map +1 -0
  55. package/dist.esm/ranking.js +90 -0
  56. package/dist.esm/ranking.js.map +1 -0
  57. package/dist.esm/search-builder-r18.js +45 -0
  58. package/dist.esm/search-builder-r18.js.map +1 -0
  59. package/dist.esm/search-builder.js +381 -0
  60. package/dist.esm/search-builder.js.map +1 -0
  61. package/dist.esm/user-search.js +94 -0
  62. package/dist.esm/user-search.js.map +1 -0
  63. package/dist.esm/util/jsonp.js +46 -0
  64. package/dist.esm/util/jsonp.js.map +1 -0
  65. package/dist.esm/util/type.js +3 -0
  66. package/dist.esm/util/type.js.map +1 -0
  67. package/dist.esm/util/unzipp.js +12 -0
  68. package/dist.esm/util/unzipp.js.map +1 -0
  69. package/package.json +1 -1
  70. package/src/user-search.ts +109 -109
@@ -1,381 +1,381 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NovelSearchBuilderBase = exports.SearchBuilderBase = void 0;
4
- const params_1 = require("./params");
5
- class SearchBuilderBase {
6
- /**
7
- * constructor
8
- * @private
9
- */
10
- constructor(params = {}, api) {
11
- this.params = params;
12
- this.api = api;
13
- }
14
- static distinct(array) {
15
- return Array.from(new Set(array));
16
- }
17
- static array2string(n) {
18
- if (Array.isArray(n)) {
19
- return this.distinct(n).join("-");
20
- }
21
- else {
22
- return n.toString();
23
- }
24
- }
25
- /**
26
- *
27
- * @return {SearchBuilder} this
28
- */
29
- limit(num) {
30
- this.set({ lim: num });
31
- return this;
32
- }
33
- /**
34
- *
35
- * @return {SearchBuilder} this
36
- */
37
- start(num) {
38
- this.set({ st: num });
39
- return this;
40
- }
41
- /**
42
- *
43
- * @return {SearchBuilder} this
44
- */
45
- page(no, count = 20) {
46
- return this.limit(count).start(no * count);
47
- }
48
- /**
49
- * 出力順序を指定する。指定しない場合は新着順となります。
50
- * old 古い順
51
- * @param {TOrder} order 出力順序
52
- * @return {SearchBuilder} this
53
- */
54
- order(order) {
55
- this.set({ order: order });
56
- return this;
57
- }
58
- /**
59
- * gzip圧縮する。
60
- *
61
- * 転送量上限を減らすためにも推奨
62
- * @param {GzipLevel} level gzip圧縮レベル(1~5)
63
- * @return {SearchBuilder} this
64
- */
65
- gzip(level) {
66
- this.set({ gzip: level });
67
- return this;
68
- }
69
- /**
70
- * クエリパラメータをセットする
71
- * @private
72
- * @return {SearchBuilder} this
73
- */
74
- set(obj) {
75
- this.params = { ...this.params, ...obj };
76
- return this;
77
- }
78
- /**
79
- * クエリパラメータを削除する
80
- */
81
- unset(key) {
82
- delete this.params[key];
83
- return this;
84
- }
85
- }
86
- exports.SearchBuilderBase = SearchBuilderBase;
87
- class NovelSearchBuilderBase extends SearchBuilderBase {
88
- /**
89
- * a
90
- * @return {SearchBuilder} this
91
- */
92
- word(word) {
93
- this.set({ word: word });
94
- return this;
95
- }
96
- /**
97
- *
98
- * @return {SearchBuilder} this
99
- */
100
- notWord(word) {
101
- this.set({ notword: word });
102
- return this;
103
- }
104
- /**
105
- *
106
- * @return {SearchBuilder} this
107
- */
108
- byTitle(bool = true) {
109
- this.set({ title: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
110
- return this;
111
- }
112
- /**
113
- *
114
- * @return {SearchBuilder} this
115
- */
116
- byOutline(bool = true) {
117
- this.set({ ex: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
118
- return this;
119
- }
120
- /**
121
- *
122
- * @return {SearchBuilder} this
123
- */
124
- byKeyword(bool = true) {
125
- this.set({ keyword: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
126
- return this;
127
- }
128
- /**
129
- *
130
- * @return {SearchBuilder} this
131
- */
132
- byAuthor(bool = true) {
133
- this.set({ wname: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
134
- return this;
135
- }
136
- /**
137
- *
138
- * @return {SearchBuilder} this
139
- */
140
- isBL(bool = true) {
141
- if (bool) {
142
- this.set({ isbl: params_1.BooleanNumber.True });
143
- }
144
- else {
145
- this.set({ notbl: params_1.BooleanNumber.True });
146
- }
147
- return this;
148
- }
149
- /**
150
- *
151
- * @return {SearchBuilder} this
152
- */
153
- isGL(bool = true) {
154
- if (bool) {
155
- this.set({ isgl: params_1.BooleanNumber.True });
156
- }
157
- else {
158
- this.set({ notgl: params_1.BooleanNumber.True });
159
- }
160
- return this;
161
- }
162
- /**
163
- *
164
- * @return {SearchBuilder} this
165
- */
166
- isZankoku(bool = true) {
167
- if (bool) {
168
- this.set({ iszankoku: params_1.BooleanNumber.True });
169
- }
170
- else {
171
- this.set({ notzankoku: params_1.BooleanNumber.True });
172
- }
173
- return this;
174
- }
175
- /**
176
- *
177
- * @return {SearchBuilder} this
178
- */
179
- isTensei(bool = true) {
180
- if (bool) {
181
- this.set({ istensei: params_1.BooleanNumber.True });
182
- }
183
- else {
184
- this.set({ nottensei: params_1.BooleanNumber.True });
185
- }
186
- return this;
187
- }
188
- /**
189
- *
190
- * @return {SearchBuilder} this
191
- */
192
- isTenni(bool = true) {
193
- if (bool) {
194
- this.set({ istenni: params_1.BooleanNumber.True });
195
- }
196
- else {
197
- this.set({ nottenni: params_1.BooleanNumber.True });
198
- }
199
- return this;
200
- }
201
- /**
202
- *
203
- * @return {SearchBuilder} this
204
- */
205
- isTT() {
206
- this.set({ istt: params_1.BooleanNumber.True });
207
- return this;
208
- }
209
- /**
210
- *
211
- * @return {SearchBuilder} this
212
- */
213
- length(length) {
214
- this.set({ length: NovelSearchBuilderBase.array2string(length) });
215
- return this;
216
- }
217
- kaiwaritu(min, max) {
218
- let n;
219
- if (max != null) {
220
- n = `${min}-${max}`;
221
- }
222
- else {
223
- n = min;
224
- }
225
- this.set({ kaiwaritu: n });
226
- return this;
227
- }
228
- /**
229
- *
230
- * @return {SearchBuilder} this
231
- */
232
- sasie(num) {
233
- this.set({ sasie: NovelSearchBuilderBase.array2string(num) });
234
- return this;
235
- }
236
- /**
237
- *
238
- * @return {SearchBuilder} this
239
- */
240
- time(num) {
241
- this.set({ time: NovelSearchBuilderBase.array2string(num) });
242
- return this;
243
- }
244
- /**
245
- *
246
- * @return {SearchBuilder} this
247
- */
248
- ncode(ncodes) {
249
- this.set({ ncode: NovelSearchBuilderBase.array2string(ncodes) });
250
- return this;
251
- }
252
- /**
253
- *
254
- * @return {SearchBuilder} this
255
- */
256
- type(type) {
257
- this.set({ type });
258
- return this;
259
- }
260
- /**
261
- *
262
- * @return {SearchBuilder} this
263
- */
264
- buntai(buntai) {
265
- this.set({ buntai: NovelSearchBuilderBase.array2string(buntai) });
266
- return this;
267
- }
268
- /**
269
- *
270
- * @return {SearchBuilder} this
271
- */
272
- isStop(bool = true) {
273
- this.set({ stop: bool ? params_1.StopParam.Stopping : params_1.StopParam.NoStopping });
274
- return this;
275
- }
276
- /**
277
- *
278
- * @return {SearchBuilder} this
279
- */
280
- isPickup(bool = true) {
281
- this.set({ ispickup: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
282
- return this;
283
- }
284
- lastUpdate(x, y) {
285
- let date;
286
- if (typeof x == "string") {
287
- date = x;
288
- }
289
- else if (x instanceof Date && y instanceof Date) {
290
- date = `${Math.floor(x.getTime() / 1000)}-${Math.floor(x.getTime() / 1000)}`;
291
- }
292
- else {
293
- date = `${x}-${y}`;
294
- }
295
- this.set({ lastup: date });
296
- return this;
297
- }
298
- /**
299
- * なろう小説APIへの検索リクエストを実行する
300
- * @returns {Promise<NarouSearchResults>} 検索結果
301
- */
302
- execute() {
303
- return this.api.executeNovel(this.params);
304
- }
305
- }
306
- exports.NovelSearchBuilderBase = NovelSearchBuilderBase;
307
- /**
308
- * 検索ヘルパー
309
- * @class SearchBuilder
310
- */
311
- class SearchBuilder extends NovelSearchBuilderBase {
312
- /**
313
- *
314
- * @return {SearchBuilder} this
315
- */
316
- bigGenre(genre) {
317
- this.set({ biggenre: SearchBuilder.array2string(genre) });
318
- return this;
319
- }
320
- /**
321
- *
322
- * @return {SearchBuilder} this
323
- */
324
- notBigGenre(genre) {
325
- this.set({ notbiggenre: SearchBuilder.array2string(genre) });
326
- return this;
327
- }
328
- /**
329
- *
330
- * @return {SearchBuilder} this
331
- */
332
- genre(genre) {
333
- this.set({ genre: SearchBuilder.array2string(genre) });
334
- return this;
335
- }
336
- /**
337
- *
338
- * @return {SearchBuilder} this
339
- */
340
- notGenre(genre) {
341
- this.set({ notgenre: SearchBuilder.array2string(genre) });
342
- return this;
343
- }
344
- /**
345
- *
346
- * @return {SearchBuilder} this
347
- */
348
- userId(ids) {
349
- this.set({ userid: SearchBuilder.array2string(ids) });
350
- return this;
351
- }
352
- /**
353
- *
354
- * @return {SearchBuilder} this
355
- */
356
- isR15(bool = true) {
357
- if (bool) {
358
- this.set({ isr15: 1 });
359
- }
360
- else {
361
- this.set({ notr15: 1 });
362
- }
363
- return this;
364
- }
365
- /**
366
- *
367
- * @return {SearchBuilder} this
368
- */
369
- fields(fields) {
370
- this.set({ of: SearchBuilder.array2string(fields) });
371
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
372
- return this;
373
- }
374
- opt(option) {
375
- this.set({ opt: SearchBuilder.array2string(option) });
376
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
377
- return this;
378
- }
379
- }
380
- exports.default = SearchBuilder;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NovelSearchBuilderBase = exports.SearchBuilderBase = void 0;
4
+ const params_1 = require("./params");
5
+ class SearchBuilderBase {
6
+ /**
7
+ * constructor
8
+ * @private
9
+ */
10
+ constructor(params = {}, api) {
11
+ this.params = params;
12
+ this.api = api;
13
+ }
14
+ static distinct(array) {
15
+ return Array.from(new Set(array));
16
+ }
17
+ static array2string(n) {
18
+ if (Array.isArray(n)) {
19
+ return this.distinct(n).join("-");
20
+ }
21
+ else {
22
+ return n.toString();
23
+ }
24
+ }
25
+ /**
26
+ *
27
+ * @return {SearchBuilder} this
28
+ */
29
+ limit(num) {
30
+ this.set({ lim: num });
31
+ return this;
32
+ }
33
+ /**
34
+ *
35
+ * @return {SearchBuilder} this
36
+ */
37
+ start(num) {
38
+ this.set({ st: num });
39
+ return this;
40
+ }
41
+ /**
42
+ *
43
+ * @return {SearchBuilder} this
44
+ */
45
+ page(no, count = 20) {
46
+ return this.limit(count).start(no * count);
47
+ }
48
+ /**
49
+ * 出力順序を指定する。指定しない場合は新着順となります。
50
+ * old 古い順
51
+ * @param {TOrder} order 出力順序
52
+ * @return {SearchBuilder} this
53
+ */
54
+ order(order) {
55
+ this.set({ order: order });
56
+ return this;
57
+ }
58
+ /**
59
+ * gzip圧縮する。
60
+ *
61
+ * 転送量上限を減らすためにも推奨
62
+ * @param {GzipLevel} level gzip圧縮レベル(1~5)
63
+ * @return {SearchBuilder} this
64
+ */
65
+ gzip(level) {
66
+ this.set({ gzip: level });
67
+ return this;
68
+ }
69
+ /**
70
+ * クエリパラメータをセットする
71
+ * @private
72
+ * @return {SearchBuilder} this
73
+ */
74
+ set(obj) {
75
+ this.params = { ...this.params, ...obj };
76
+ return this;
77
+ }
78
+ /**
79
+ * クエリパラメータを削除する
80
+ */
81
+ unset(key) {
82
+ delete this.params[key];
83
+ return this;
84
+ }
85
+ }
86
+ exports.SearchBuilderBase = SearchBuilderBase;
87
+ class NovelSearchBuilderBase extends SearchBuilderBase {
88
+ /**
89
+ * a
90
+ * @return {SearchBuilder} this
91
+ */
92
+ word(word) {
93
+ this.set({ word: word });
94
+ return this;
95
+ }
96
+ /**
97
+ *
98
+ * @return {SearchBuilder} this
99
+ */
100
+ notWord(word) {
101
+ this.set({ notword: word });
102
+ return this;
103
+ }
104
+ /**
105
+ *
106
+ * @return {SearchBuilder} this
107
+ */
108
+ byTitle(bool = true) {
109
+ this.set({ title: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
110
+ return this;
111
+ }
112
+ /**
113
+ *
114
+ * @return {SearchBuilder} this
115
+ */
116
+ byOutline(bool = true) {
117
+ this.set({ ex: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
118
+ return this;
119
+ }
120
+ /**
121
+ *
122
+ * @return {SearchBuilder} this
123
+ */
124
+ byKeyword(bool = true) {
125
+ this.set({ keyword: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
126
+ return this;
127
+ }
128
+ /**
129
+ *
130
+ * @return {SearchBuilder} this
131
+ */
132
+ byAuthor(bool = true) {
133
+ this.set({ wname: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
134
+ return this;
135
+ }
136
+ /**
137
+ *
138
+ * @return {SearchBuilder} this
139
+ */
140
+ isBL(bool = true) {
141
+ if (bool) {
142
+ this.set({ isbl: params_1.BooleanNumber.True });
143
+ }
144
+ else {
145
+ this.set({ notbl: params_1.BooleanNumber.True });
146
+ }
147
+ return this;
148
+ }
149
+ /**
150
+ *
151
+ * @return {SearchBuilder} this
152
+ */
153
+ isGL(bool = true) {
154
+ if (bool) {
155
+ this.set({ isgl: params_1.BooleanNumber.True });
156
+ }
157
+ else {
158
+ this.set({ notgl: params_1.BooleanNumber.True });
159
+ }
160
+ return this;
161
+ }
162
+ /**
163
+ *
164
+ * @return {SearchBuilder} this
165
+ */
166
+ isZankoku(bool = true) {
167
+ if (bool) {
168
+ this.set({ iszankoku: params_1.BooleanNumber.True });
169
+ }
170
+ else {
171
+ this.set({ notzankoku: params_1.BooleanNumber.True });
172
+ }
173
+ return this;
174
+ }
175
+ /**
176
+ *
177
+ * @return {SearchBuilder} this
178
+ */
179
+ isTensei(bool = true) {
180
+ if (bool) {
181
+ this.set({ istensei: params_1.BooleanNumber.True });
182
+ }
183
+ else {
184
+ this.set({ nottensei: params_1.BooleanNumber.True });
185
+ }
186
+ return this;
187
+ }
188
+ /**
189
+ *
190
+ * @return {SearchBuilder} this
191
+ */
192
+ isTenni(bool = true) {
193
+ if (bool) {
194
+ this.set({ istenni: params_1.BooleanNumber.True });
195
+ }
196
+ else {
197
+ this.set({ nottenni: params_1.BooleanNumber.True });
198
+ }
199
+ return this;
200
+ }
201
+ /**
202
+ *
203
+ * @return {SearchBuilder} this
204
+ */
205
+ isTT() {
206
+ this.set({ istt: params_1.BooleanNumber.True });
207
+ return this;
208
+ }
209
+ /**
210
+ *
211
+ * @return {SearchBuilder} this
212
+ */
213
+ length(length) {
214
+ this.set({ length: NovelSearchBuilderBase.array2string(length) });
215
+ return this;
216
+ }
217
+ kaiwaritu(min, max) {
218
+ let n;
219
+ if (max != null) {
220
+ n = `${min}-${max}`;
221
+ }
222
+ else {
223
+ n = min;
224
+ }
225
+ this.set({ kaiwaritu: n });
226
+ return this;
227
+ }
228
+ /**
229
+ *
230
+ * @return {SearchBuilder} this
231
+ */
232
+ sasie(num) {
233
+ this.set({ sasie: NovelSearchBuilderBase.array2string(num) });
234
+ return this;
235
+ }
236
+ /**
237
+ *
238
+ * @return {SearchBuilder} this
239
+ */
240
+ time(num) {
241
+ this.set({ time: NovelSearchBuilderBase.array2string(num) });
242
+ return this;
243
+ }
244
+ /**
245
+ *
246
+ * @return {SearchBuilder} this
247
+ */
248
+ ncode(ncodes) {
249
+ this.set({ ncode: NovelSearchBuilderBase.array2string(ncodes) });
250
+ return this;
251
+ }
252
+ /**
253
+ *
254
+ * @return {SearchBuilder} this
255
+ */
256
+ type(type) {
257
+ this.set({ type });
258
+ return this;
259
+ }
260
+ /**
261
+ *
262
+ * @return {SearchBuilder} this
263
+ */
264
+ buntai(buntai) {
265
+ this.set({ buntai: NovelSearchBuilderBase.array2string(buntai) });
266
+ return this;
267
+ }
268
+ /**
269
+ *
270
+ * @return {SearchBuilder} this
271
+ */
272
+ isStop(bool = true) {
273
+ this.set({ stop: bool ? params_1.StopParam.Stopping : params_1.StopParam.NoStopping });
274
+ return this;
275
+ }
276
+ /**
277
+ *
278
+ * @return {SearchBuilder} this
279
+ */
280
+ isPickup(bool = true) {
281
+ this.set({ ispickup: bool ? params_1.BooleanNumber.True : params_1.BooleanNumber.False });
282
+ return this;
283
+ }
284
+ lastUpdate(x, y) {
285
+ let date;
286
+ if (typeof x == "string") {
287
+ date = x;
288
+ }
289
+ else if (x instanceof Date && y instanceof Date) {
290
+ date = `${Math.floor(x.getTime() / 1000)}-${Math.floor(x.getTime() / 1000)}`;
291
+ }
292
+ else {
293
+ date = `${x}-${y}`;
294
+ }
295
+ this.set({ lastup: date });
296
+ return this;
297
+ }
298
+ /**
299
+ * なろう小説APIへの検索リクエストを実行する
300
+ * @returns {Promise<NarouSearchResults>} 検索結果
301
+ */
302
+ execute() {
303
+ return this.api.executeNovel(this.params);
304
+ }
305
+ }
306
+ exports.NovelSearchBuilderBase = NovelSearchBuilderBase;
307
+ /**
308
+ * 検索ヘルパー
309
+ * @class SearchBuilder
310
+ */
311
+ class SearchBuilder extends NovelSearchBuilderBase {
312
+ /**
313
+ *
314
+ * @return {SearchBuilder} this
315
+ */
316
+ bigGenre(genre) {
317
+ this.set({ biggenre: SearchBuilder.array2string(genre) });
318
+ return this;
319
+ }
320
+ /**
321
+ *
322
+ * @return {SearchBuilder} this
323
+ */
324
+ notBigGenre(genre) {
325
+ this.set({ notbiggenre: SearchBuilder.array2string(genre) });
326
+ return this;
327
+ }
328
+ /**
329
+ *
330
+ * @return {SearchBuilder} this
331
+ */
332
+ genre(genre) {
333
+ this.set({ genre: SearchBuilder.array2string(genre) });
334
+ return this;
335
+ }
336
+ /**
337
+ *
338
+ * @return {SearchBuilder} this
339
+ */
340
+ notGenre(genre) {
341
+ this.set({ notgenre: SearchBuilder.array2string(genre) });
342
+ return this;
343
+ }
344
+ /**
345
+ *
346
+ * @return {SearchBuilder} this
347
+ */
348
+ userId(ids) {
349
+ this.set({ userid: SearchBuilder.array2string(ids) });
350
+ return this;
351
+ }
352
+ /**
353
+ *
354
+ * @return {SearchBuilder} this
355
+ */
356
+ isR15(bool = true) {
357
+ if (bool) {
358
+ this.set({ isr15: 1 });
359
+ }
360
+ else {
361
+ this.set({ notr15: 1 });
362
+ }
363
+ return this;
364
+ }
365
+ /**
366
+ *
367
+ * @return {SearchBuilder} this
368
+ */
369
+ fields(fields) {
370
+ this.set({ of: SearchBuilder.array2string(fields) });
371
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
372
+ return this;
373
+ }
374
+ opt(option) {
375
+ this.set({ opt: SearchBuilder.array2string(option) });
376
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
377
+ return this;
378
+ }
379
+ }
380
+ exports.default = SearchBuilder;
381
381
  //# sourceMappingURL=search-builder.js.map