@vtecx/vtecxnext 1.1.12 → 2.0.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/vtecxnext.d.ts +804 -872
- package/dist/vtecxnext.js +3265 -3535
- package/package.json +4 -5
package/dist/vtecxnext.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { IncomingMessage, ServerResponse } from 'http';
|
|
1
|
+
import { NextRequest } from 'next/server';
|
|
3
2
|
import type { Readable } from 'node:stream';
|
|
4
3
|
/**
|
|
5
4
|
* Hello world.
|
|
@@ -9,876 +8,809 @@ type StatusMessage = {
|
|
|
9
8
|
status: number;
|
|
10
9
|
message: string;
|
|
11
10
|
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
/**
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
/**
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
/**
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
/**
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
/**
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
* @return message
|
|
816
|
-
*/
|
|
817
|
-
export declare const removealias: (req: IncomingMessage, res: ServerResponse, feed: any) => Promise<any>;
|
|
818
|
-
/**
|
|
819
|
-
* OAuth authorization request to LINE
|
|
820
|
-
* @param req request (for authentication)
|
|
821
|
-
* @param res response (for authentication)
|
|
822
|
-
*/
|
|
823
|
-
export declare const oauthLine: (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
|
|
824
|
-
/**
|
|
825
|
-
* OAuth authorization request to LINE
|
|
826
|
-
* @param req request (for authentication)
|
|
827
|
-
* @param res response (for authentication)
|
|
828
|
-
*/
|
|
829
|
-
export declare const oauthCallbackLine: (req: IncomingMessage, res: ServerResponse) => Promise<boolean>;
|
|
830
|
-
/**
|
|
831
|
-
* get binary data from stream
|
|
832
|
-
* @param readable Readable
|
|
833
|
-
* @returns buffer
|
|
834
|
-
*/
|
|
835
|
-
export declare const buffer: (readable: Readable) => Promise<Buffer>;
|
|
836
|
-
/**
|
|
837
|
-
* get TOTP link
|
|
838
|
-
* @param req request (for authentication)
|
|
839
|
-
* @param res response (for authentication)
|
|
840
|
-
* @param chs length of one side of QR code
|
|
841
|
-
* @return QR code URL in feed.title
|
|
842
|
-
*/
|
|
843
|
-
export declare const getTotpLink: (req: IncomingMessage, res: ServerResponse, chs?: number) => Promise<any>;
|
|
844
|
-
/**
|
|
845
|
-
* create TOTP
|
|
846
|
-
* @param req request (for authentication)
|
|
847
|
-
* @param res response (for authentication)
|
|
848
|
-
* @param feed one-time password for feed.title when you do book registration
|
|
849
|
-
* @return message
|
|
850
|
-
*/
|
|
851
|
-
export declare const createTotp: (req: IncomingMessage, res: ServerResponse, feed: any) => Promise<any>;
|
|
852
|
-
/**
|
|
853
|
-
* delete TOTP
|
|
854
|
-
* @param req request (for authentication)
|
|
855
|
-
* @param res response (for authentication)
|
|
856
|
-
* @param account target account (for service admin user)
|
|
857
|
-
* @return message
|
|
858
|
-
*/
|
|
859
|
-
export declare const deleteTotp: (req: IncomingMessage, res: ServerResponse, account?: string) => Promise<any>;
|
|
860
|
-
/**
|
|
861
|
-
* change TDID (Trusted device ID)
|
|
862
|
-
* @param req request (for authentication)
|
|
863
|
-
* @param res response (for authentication)
|
|
864
|
-
* @param account target account (for service admin user)
|
|
865
|
-
* @return message
|
|
866
|
-
*/
|
|
867
|
-
export declare const changeTdid: (req: IncomingMessage, res: ServerResponse) => Promise<any>;
|
|
868
|
-
/**
|
|
869
|
-
* Merge an existing user with an line oauth user.
|
|
870
|
-
* @param req request (for authentication)
|
|
871
|
-
* @param res response (for authentication)
|
|
872
|
-
* @param rxid RXID
|
|
873
|
-
* @return message feed
|
|
874
|
-
*/
|
|
875
|
-
export declare const mergeOAuthUserLine: (req: IncomingMessage, res: ServerResponse, rxid: string) => Promise<any>;
|
|
876
|
-
/**
|
|
877
|
-
* null、undefined、空文字の判定
|
|
878
|
-
* @param val チェック値
|
|
879
|
-
* @returns null、undefined、空文字の場合true
|
|
880
|
-
*/
|
|
881
|
-
export declare const isBlank: (val: any) => boolean;
|
|
11
|
+
export declare class VtecxNext {
|
|
12
|
+
/** Request */
|
|
13
|
+
readonly req: NextRequest;
|
|
14
|
+
/** Response status */
|
|
15
|
+
private resStatus;
|
|
16
|
+
/** Response headers */
|
|
17
|
+
private resHeaders;
|
|
18
|
+
/** binary data */
|
|
19
|
+
private bufferData;
|
|
20
|
+
/**
|
|
21
|
+
* constructor
|
|
22
|
+
* @param req Request
|
|
23
|
+
*/
|
|
24
|
+
constructor(req: NextRequest);
|
|
25
|
+
/**
|
|
26
|
+
* get url parameter.
|
|
27
|
+
* @param name parameter name
|
|
28
|
+
* @returns parameter value
|
|
29
|
+
*/
|
|
30
|
+
getParameter: (name: string) => string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Check if URL parameters exist.
|
|
33
|
+
* @param name パラメータ名
|
|
34
|
+
* @return URLパラメータがある場合true
|
|
35
|
+
*/
|
|
36
|
+
hasParameter: (name: string) => boolean;
|
|
37
|
+
/**
|
|
38
|
+
* get binary data from stream
|
|
39
|
+
* @param readable if undefined, return the request buffer.
|
|
40
|
+
* @returns buffer
|
|
41
|
+
*/
|
|
42
|
+
buffer: (readable?: Readable) => Promise<Uint8Array>;
|
|
43
|
+
/**
|
|
44
|
+
* null、undefined、空文字の判定
|
|
45
|
+
* @param val チェック値
|
|
46
|
+
* @returns null、undefined、空文字の場合true
|
|
47
|
+
*/
|
|
48
|
+
isBlank: (val: any) => boolean;
|
|
49
|
+
/**
|
|
50
|
+
* X-Requested-With header check.
|
|
51
|
+
* If not specified, set status 417 to the response.
|
|
52
|
+
* @return Response if no X-Requested-With header is specified
|
|
53
|
+
*/
|
|
54
|
+
checkXRequestedWith: () => Response | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* set response header
|
|
57
|
+
* @param name name
|
|
58
|
+
* @param value value
|
|
59
|
+
*/
|
|
60
|
+
setResponseHeader: (name: string, value: string) => void;
|
|
61
|
+
/**
|
|
62
|
+
* response
|
|
63
|
+
* @param status response status code
|
|
64
|
+
* @param data response data
|
|
65
|
+
* @returns Response object
|
|
66
|
+
*/
|
|
67
|
+
response: (status?: number, data?: any) => Response;
|
|
68
|
+
/**
|
|
69
|
+
* Sends an feed response(including message) to the client using the specified status.
|
|
70
|
+
* @param statusCode status code
|
|
71
|
+
* @param message message
|
|
72
|
+
* @return true
|
|
73
|
+
*/
|
|
74
|
+
sendMessage: (statusCode: number, message: string) => Response;
|
|
75
|
+
/**
|
|
76
|
+
* whether you are logged in
|
|
77
|
+
* @return true if logged in
|
|
78
|
+
*/
|
|
79
|
+
isLoggedin: () => Promise<boolean>;
|
|
80
|
+
/**
|
|
81
|
+
* get current datetime
|
|
82
|
+
* @return current datetime
|
|
83
|
+
*/
|
|
84
|
+
now: () => Promise<string>;
|
|
85
|
+
/**
|
|
86
|
+
* get login uid
|
|
87
|
+
* @return uid
|
|
88
|
+
*/
|
|
89
|
+
uid: () => Promise<string>;
|
|
90
|
+
/**
|
|
91
|
+
* get login account
|
|
92
|
+
* @return account
|
|
93
|
+
*/
|
|
94
|
+
account: () => Promise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* get login service
|
|
97
|
+
* @return service
|
|
98
|
+
*/
|
|
99
|
+
service: () => Promise<string>;
|
|
100
|
+
/**
|
|
101
|
+
* get RXID
|
|
102
|
+
* @return RXID
|
|
103
|
+
*/
|
|
104
|
+
rxid: () => Promise<string>;
|
|
105
|
+
/**
|
|
106
|
+
* login.
|
|
107
|
+
* Request authentication with WSSE.
|
|
108
|
+
* If the login is successful, sets the authentication information in a cookie.
|
|
109
|
+
* @param wsse WSSE
|
|
110
|
+
* @param reCaptchaToken reCAPTCHA token
|
|
111
|
+
* @return status and message
|
|
112
|
+
*/
|
|
113
|
+
login: (wsse: string, reCaptchaToken?: string) => Promise<StatusMessage>;
|
|
114
|
+
/**
|
|
115
|
+
* login with RXID.
|
|
116
|
+
* If the login is successful, sets the authentication information in a cookie.
|
|
117
|
+
* @param rxid RXID
|
|
118
|
+
* @return status and message
|
|
119
|
+
*/
|
|
120
|
+
loginWithRxid: (rxid: string) => Promise<StatusMessage>;
|
|
121
|
+
/**
|
|
122
|
+
* login with Time-based One Time Password.
|
|
123
|
+
* If the login is successful, sets the authentication information in a cookie.
|
|
124
|
+
* @param totp Time-based One Time Password
|
|
125
|
+
* @param isTrustedDevice true if trusted device
|
|
126
|
+
* @return status and message
|
|
127
|
+
*/
|
|
128
|
+
loginWithTotp: (totp: string, isTrustedDevice: boolean) => Promise<StatusMessage>;
|
|
129
|
+
/**
|
|
130
|
+
* logout.
|
|
131
|
+
* If the logout is successful, delete the authentication information in a cookie.
|
|
132
|
+
* @return status and message
|
|
133
|
+
*/
|
|
134
|
+
logout: () => Promise<StatusMessage>;
|
|
135
|
+
/**
|
|
136
|
+
* get login whoami
|
|
137
|
+
* @return login user information
|
|
138
|
+
*/
|
|
139
|
+
whoami: () => Promise<any>;
|
|
140
|
+
/**
|
|
141
|
+
* register a log entry
|
|
142
|
+
* @param message message
|
|
143
|
+
* @param title title
|
|
144
|
+
* @param subtitle subtitle
|
|
145
|
+
* @return true if successful
|
|
146
|
+
*/
|
|
147
|
+
log: (message: string, title?: string, subtitle?: string) => Promise<boolean>;
|
|
148
|
+
/**
|
|
149
|
+
* get entry
|
|
150
|
+
* @param uri key
|
|
151
|
+
* @param targetService target service name (for service linkage)
|
|
152
|
+
* @return entry
|
|
153
|
+
*/
|
|
154
|
+
getEntry: (uri: string, targetService?: string) => Promise<any>;
|
|
155
|
+
/**
|
|
156
|
+
* get feed
|
|
157
|
+
* @param uri key and conditions
|
|
158
|
+
* @param targetService target service name (for service linkage)
|
|
159
|
+
* @return feed (entry array)
|
|
160
|
+
*/
|
|
161
|
+
getFeed: (uri: string, targetService?: string) => Promise<any>;
|
|
162
|
+
/**
|
|
163
|
+
* get feed
|
|
164
|
+
* @param uri key and conditions
|
|
165
|
+
* @param targetService target service name (for service linkage)
|
|
166
|
+
* @return feed (entry array). Returns a cursor in the header if more data is available. (x-vtecx-nextpage)
|
|
167
|
+
*/
|
|
168
|
+
getFeedResponse: (uri: string, targetService?: string) => Promise<VtecxResponse>;
|
|
169
|
+
/**
|
|
170
|
+
* get count
|
|
171
|
+
* @param uri key and conditions
|
|
172
|
+
* @param targetService target service name (for service linkage)
|
|
173
|
+
* @return count
|
|
174
|
+
*/
|
|
175
|
+
count: (uri: string, targetService?: string) => Promise<number | null>;
|
|
176
|
+
/**
|
|
177
|
+
* get count
|
|
178
|
+
* @param uri key and conditions
|
|
179
|
+
* @param targetService target service name (for service linkage)
|
|
180
|
+
* @return feed. Returns a cursor in the header if more data is available. (x-vtecx-nextpage)
|
|
181
|
+
*/
|
|
182
|
+
countResponse: (uri: string, targetService?: string) => Promise<VtecxResponse>;
|
|
183
|
+
/**
|
|
184
|
+
* register entries
|
|
185
|
+
* @param feed entries (JSON)
|
|
186
|
+
* @param uri parent key if not specified in entry
|
|
187
|
+
* @param targetService target service name (for service linkage)
|
|
188
|
+
* @return registed entries
|
|
189
|
+
*/
|
|
190
|
+
post: (feed: any, uri?: string, targetService?: string) => Promise<any>;
|
|
191
|
+
/**
|
|
192
|
+
* update entries
|
|
193
|
+
* @param feed entries (JSON)
|
|
194
|
+
* @param isbulk Forcibly execute even if it exceeds the upper limit of entries of request feed.
|
|
195
|
+
* @param parallel Execute parallel if this param is true. Valid only if 'isbulk' is true.
|
|
196
|
+
* @param async Execute asynchronous if this param is true. Valid only if 'isbulk' is true.
|
|
197
|
+
* @param targetService target service name (for service linkage)
|
|
198
|
+
* @return updated entries
|
|
199
|
+
*/
|
|
200
|
+
put: (feed: any, isbulk?: boolean, parallel?: boolean, async?: boolean, targetService?: string) => Promise<any>;
|
|
201
|
+
/**
|
|
202
|
+
* delete entry
|
|
203
|
+
* @param uri key
|
|
204
|
+
* @param revision number of revision
|
|
205
|
+
* @param targetService target service name (for service linkage)
|
|
206
|
+
* @return true if successful
|
|
207
|
+
*/
|
|
208
|
+
deleteEntry: (uri: string, revision?: number, targetService?: string) => Promise<boolean>;
|
|
209
|
+
/**
|
|
210
|
+
* delete folder
|
|
211
|
+
* @param uri parent key
|
|
212
|
+
* @param async execute async
|
|
213
|
+
* @param targetService target service name (for service linkage)
|
|
214
|
+
* @return true if successful
|
|
215
|
+
*/
|
|
216
|
+
deleteFolder: (uri: string, async?: boolean, targetService?: string) => Promise<boolean>;
|
|
217
|
+
/**
|
|
218
|
+
* clear folder
|
|
219
|
+
* @param uri parent key
|
|
220
|
+
* @param async execute async
|
|
221
|
+
* @param targetService target service name (for service linkage)
|
|
222
|
+
* @return true if successful
|
|
223
|
+
*/
|
|
224
|
+
clearFolder: (uri: string, async?: boolean, targetService?: string) => Promise<boolean>;
|
|
225
|
+
/**
|
|
226
|
+
* allocate numbers
|
|
227
|
+
* @param uri key
|
|
228
|
+
* @param num number to allocate
|
|
229
|
+
* @param targetService target service name (for service linkage)
|
|
230
|
+
* @return allocated numbers. comma separated if multiple.
|
|
231
|
+
*/
|
|
232
|
+
allocids: (uri: string, num: number, targetService?: string) => Promise<string>;
|
|
233
|
+
/**
|
|
234
|
+
* add a number
|
|
235
|
+
* @param uri key
|
|
236
|
+
* @param num number to add
|
|
237
|
+
* @param targetService target service name (for service linkage)
|
|
238
|
+
* @return added number
|
|
239
|
+
*/
|
|
240
|
+
addids: (uri: string, num: number, targetService?: string) => Promise<number | null>;
|
|
241
|
+
/**
|
|
242
|
+
* get a added number
|
|
243
|
+
* @param uri key
|
|
244
|
+
* @param targetService target service name (for service linkage)
|
|
245
|
+
* @return added number
|
|
246
|
+
*/
|
|
247
|
+
getids: (uri: string, targetService?: string) => Promise<number | null>;
|
|
248
|
+
/**
|
|
249
|
+
* set a number
|
|
250
|
+
* @param uri key
|
|
251
|
+
* @param num number to set
|
|
252
|
+
* @param targetService target service name (for service linkage)
|
|
253
|
+
* @return set number
|
|
254
|
+
*/
|
|
255
|
+
setids: (uri: string, num: number, targetService?: string) => Promise<number | null>;
|
|
256
|
+
/**
|
|
257
|
+
* set a addition range
|
|
258
|
+
* @param uri key
|
|
259
|
+
* @param range addition range
|
|
260
|
+
* @param targetService target service name (for service linkage)
|
|
261
|
+
* @return addition range
|
|
262
|
+
*/
|
|
263
|
+
rangeids: (uri: string, range: string) => Promise<string>;
|
|
264
|
+
/**
|
|
265
|
+
* get a addition range
|
|
266
|
+
* @param uri key
|
|
267
|
+
* @param targetService target service name (for service linkage)
|
|
268
|
+
* @return addition range
|
|
269
|
+
*/
|
|
270
|
+
getRangeids: (uri: string) => Promise<string>;
|
|
271
|
+
/**
|
|
272
|
+
* set feed to session
|
|
273
|
+
* @param name name
|
|
274
|
+
* @param feed entries (JSON)
|
|
275
|
+
* @return true if successful
|
|
276
|
+
*/
|
|
277
|
+
setSessionFeed: (name: string, feed: any) => Promise<boolean>;
|
|
278
|
+
/**
|
|
279
|
+
* set entry to session
|
|
280
|
+
* @param name name
|
|
281
|
+
* @param entry entry (JSON)
|
|
282
|
+
* @return true if successful
|
|
283
|
+
*/
|
|
284
|
+
setSessionEntry: (name: string, entry: any) => Promise<boolean>;
|
|
285
|
+
/**
|
|
286
|
+
* set string to session
|
|
287
|
+
* @param name name
|
|
288
|
+
* @param str string
|
|
289
|
+
* @return true if successful
|
|
290
|
+
*/
|
|
291
|
+
setSessionString: (name: string, str: string) => Promise<boolean>;
|
|
292
|
+
/**
|
|
293
|
+
* set number to session
|
|
294
|
+
* @param name name
|
|
295
|
+
* @param num number
|
|
296
|
+
* @return true if successful
|
|
297
|
+
*/
|
|
298
|
+
setSessionLong: (name: string, num: number) => Promise<boolean>;
|
|
299
|
+
/**
|
|
300
|
+
* add number in session
|
|
301
|
+
* @param name name
|
|
302
|
+
* @param num number to add
|
|
303
|
+
* @return true if successful
|
|
304
|
+
*/
|
|
305
|
+
incrementSession: (name: string, num: number) => Promise<number | null>;
|
|
306
|
+
/**
|
|
307
|
+
* delete feed from session
|
|
308
|
+
* @param name name
|
|
309
|
+
* @return true if successful
|
|
310
|
+
*/
|
|
311
|
+
deleteSessionFeed: (name: string) => Promise<boolean>;
|
|
312
|
+
/**
|
|
313
|
+
* delete entry from session
|
|
314
|
+
* @param name name
|
|
315
|
+
* @return true if successful
|
|
316
|
+
*/
|
|
317
|
+
deleteSessionEntry: (name: string) => Promise<boolean>;
|
|
318
|
+
/**
|
|
319
|
+
* delete string from session
|
|
320
|
+
* @param name name
|
|
321
|
+
* @return true if successful
|
|
322
|
+
*/
|
|
323
|
+
deleteSessionString: (name: string) => Promise<boolean>;
|
|
324
|
+
/**
|
|
325
|
+
* delete number from session
|
|
326
|
+
* @param name name
|
|
327
|
+
* @return true if successful
|
|
328
|
+
*/
|
|
329
|
+
deleteSessionLong: (name: string) => Promise<boolean>;
|
|
330
|
+
/**
|
|
331
|
+
* get feed from session
|
|
332
|
+
* @param name name
|
|
333
|
+
* @return feed
|
|
334
|
+
*/
|
|
335
|
+
getSessionFeed: (name: string) => Promise<any>;
|
|
336
|
+
/**
|
|
337
|
+
* get entry from session
|
|
338
|
+
* @param name name
|
|
339
|
+
* @return entry
|
|
340
|
+
*/
|
|
341
|
+
getSessionEntry: (name: string) => Promise<any>;
|
|
342
|
+
/**
|
|
343
|
+
* get string from session
|
|
344
|
+
* @param name name
|
|
345
|
+
* @return string
|
|
346
|
+
*/
|
|
347
|
+
getSessionString: (name: string) => Promise<string | null>;
|
|
348
|
+
/**
|
|
349
|
+
* get number from session
|
|
350
|
+
* @param name name
|
|
351
|
+
* @return number
|
|
352
|
+
*/
|
|
353
|
+
getSessionLong: (name: string) => Promise<number | null>;
|
|
354
|
+
/**
|
|
355
|
+
* pagination
|
|
356
|
+
* @param uri key and conditions
|
|
357
|
+
* @param pagerange page range
|
|
358
|
+
* @param targetService target service name (for service linkage)
|
|
359
|
+
* @return feed Maximum number of pages in the specified page range, and total count.
|
|
360
|
+
*/
|
|
361
|
+
pagination: (uri: string, pagerange: string, targetService?: string) => Promise<any>;
|
|
362
|
+
/**
|
|
363
|
+
* get page
|
|
364
|
+
* @param uri key and conditions
|
|
365
|
+
* @param num page number
|
|
366
|
+
* @param targetService target service name (for service linkage)
|
|
367
|
+
* @return feed Maximum number of pages in the specified page range, and total count.
|
|
368
|
+
*/
|
|
369
|
+
getPage: (uri: string, num: number, targetService?: string) => Promise<any>;
|
|
370
|
+
/**
|
|
371
|
+
* post data to bigquery
|
|
372
|
+
* @param feed entries (JSON)
|
|
373
|
+
* @param async execute async
|
|
374
|
+
* @param tablenames key:entity's prop name, value:BigQuery table name
|
|
375
|
+
* @return true if successful
|
|
376
|
+
*/
|
|
377
|
+
postBQ: (feed: any, async?: boolean, tablenames?: any) => Promise<boolean>;
|
|
378
|
+
/**
|
|
379
|
+
* delete data from bigquery
|
|
380
|
+
* @param keys delete keys
|
|
381
|
+
* @param async execute async
|
|
382
|
+
* @param tablenames key:entity's prop name, value:BigQuery table name
|
|
383
|
+
* @return true if successful
|
|
384
|
+
*/
|
|
385
|
+
deleteBQ: (keys: string[], async?: boolean, tablenames?: any) => Promise<boolean>;
|
|
386
|
+
/**
|
|
387
|
+
* query bigquery
|
|
388
|
+
* @param sql query sql
|
|
389
|
+
* @param values values of query arguments
|
|
390
|
+
* @param parent parent name of result json
|
|
391
|
+
* @return query results in JSON format
|
|
392
|
+
*/
|
|
393
|
+
getBQ: (sql: string, values?: any[], parent?: string) => Promise<any>;
|
|
394
|
+
/**
|
|
395
|
+
* query bigquery
|
|
396
|
+
* @param sql query sql
|
|
397
|
+
* @param values values of query arguments
|
|
398
|
+
* @param parent parent name of result json
|
|
399
|
+
* @return query results in JSON format
|
|
400
|
+
*/
|
|
401
|
+
execBQ: (sql: string, values?: any[], parent?: string) => Promise<any>;
|
|
402
|
+
/**
|
|
403
|
+
* Search BigQuery and return results in CSV format.
|
|
404
|
+
* @param sql query sql
|
|
405
|
+
* @param values values of query arguments
|
|
406
|
+
* @param filename file name of csv
|
|
407
|
+
* @param parent parent name of result json
|
|
408
|
+
* @return true
|
|
409
|
+
*/
|
|
410
|
+
getBQCsv: (sql: string, values?: any[], filename?: string, parent?: string) => Promise<boolean>;
|
|
411
|
+
/**
|
|
412
|
+
* Execute a query SQL to the database and get the result.
|
|
413
|
+
* @param sql query sql
|
|
414
|
+
* @param values values of query arguments
|
|
415
|
+
* @param parent parent name of result json
|
|
416
|
+
* @return query results in JSON format
|
|
417
|
+
*/
|
|
418
|
+
queryRDB: (sql: string, values?: any[], parent?: string) => Promise<any>;
|
|
419
|
+
/**
|
|
420
|
+
* Search RDB and return results in CSV format.
|
|
421
|
+
* @param sql query sql
|
|
422
|
+
* @param values values of query arguments
|
|
423
|
+
* @param filename file name of csv
|
|
424
|
+
* @param parent parent name of result json
|
|
425
|
+
* @return true
|
|
426
|
+
*/
|
|
427
|
+
queryRDBCsv: (sql: string, values?: any[], filename?: string, parent?: string) => Promise<boolean>;
|
|
428
|
+
/**
|
|
429
|
+
* Execute SQL to the database.
|
|
430
|
+
* If there are multiple SQLs, they will be wrapped in a transaction.
|
|
431
|
+
* @param sqls sql list
|
|
432
|
+
* @param values values of query arguments
|
|
433
|
+
* @param async execute async
|
|
434
|
+
* @param isbulk execute with autocommit
|
|
435
|
+
*/
|
|
436
|
+
execRDB: (sqls: string[], values?: any[][], async?: boolean, isbulk?: boolean) => Promise<any>;
|
|
437
|
+
/**
|
|
438
|
+
* Create PDF.
|
|
439
|
+
* Writes a PDF to the response.
|
|
440
|
+
* @param htmlTemplate PDF layout
|
|
441
|
+
* @param filename PDF file name
|
|
442
|
+
* @return true
|
|
443
|
+
*/
|
|
444
|
+
toPdf: (htmlTemplate: string, filename?: string) => Promise<boolean>;
|
|
445
|
+
/**
|
|
446
|
+
* put the signature of uri and revision.
|
|
447
|
+
* @param uri key
|
|
448
|
+
* @param revision revision
|
|
449
|
+
* @return signed entry
|
|
450
|
+
*/
|
|
451
|
+
putSignature: (uri: string, revision?: number) => Promise<any>;
|
|
452
|
+
/**
|
|
453
|
+
* puts the signature of uri and revision.
|
|
454
|
+
* @param feed entries
|
|
455
|
+
* @return signed entries
|
|
456
|
+
*/
|
|
457
|
+
putSignatures: (feed: any) => Promise<any>;
|
|
458
|
+
/**
|
|
459
|
+
* delete the signature.
|
|
460
|
+
* @param uri key
|
|
461
|
+
* @param revision revision
|
|
462
|
+
* @return true if successful
|
|
463
|
+
*/
|
|
464
|
+
deleteSignature: (uri: string, revision?: number) => Promise<boolean>;
|
|
465
|
+
/**
|
|
466
|
+
* check the signature.
|
|
467
|
+
* @param uri key
|
|
468
|
+
* @return true if the signature is valid
|
|
469
|
+
*/
|
|
470
|
+
checkSignature: (uri: string) => Promise<boolean>;
|
|
471
|
+
/**
|
|
472
|
+
* Send an mail (with attachments)
|
|
473
|
+
* @param entry email contents
|
|
474
|
+
* @param to email addresses to
|
|
475
|
+
* @param cc email addresses cc
|
|
476
|
+
* @param bcc email addresses bcc
|
|
477
|
+
* @param attachments keys of attachment files
|
|
478
|
+
* @return true if successful
|
|
479
|
+
*/
|
|
480
|
+
sendMail: (entry: any, to: string[], cc?: string[], bcc?: string[], attachments?: string[]) => Promise<boolean>;
|
|
481
|
+
/**
|
|
482
|
+
* push notification to clients.
|
|
483
|
+
* @param message message
|
|
484
|
+
* @param to clients to
|
|
485
|
+
* @param title title
|
|
486
|
+
* @param subtitle subtitle (Expo)
|
|
487
|
+
* @param imageUrl url of image (FCM)
|
|
488
|
+
* @param data key value data (Expo)
|
|
489
|
+
* @return true if successful
|
|
490
|
+
*/
|
|
491
|
+
pushNotification: (message: string, to: string[], title?: string, subtitle?: string, imageUrl?: string, data?: any) => Promise<boolean>;
|
|
492
|
+
/**
|
|
493
|
+
* set status of MessageQueue.
|
|
494
|
+
* @param flag true if on, false if off
|
|
495
|
+
* @param channel channel
|
|
496
|
+
*/
|
|
497
|
+
setMessageQueueStatus: (flag: boolean, channel: string) => Promise<boolean>;
|
|
498
|
+
/**
|
|
499
|
+
* get status of MessageQueue.
|
|
500
|
+
* @param name name
|
|
501
|
+
* @return feed
|
|
502
|
+
*/
|
|
503
|
+
getMessageQueueStatus: (channel: string) => Promise<any>;
|
|
504
|
+
/**
|
|
505
|
+
* set MessageQueue.
|
|
506
|
+
* @param feed entries (JSON)
|
|
507
|
+
* @param channel channel
|
|
508
|
+
* @return true if successful
|
|
509
|
+
*/
|
|
510
|
+
setMessageQueue: (feed: any, channel: string) => Promise<boolean>;
|
|
511
|
+
/**
|
|
512
|
+
* get messageQueue.
|
|
513
|
+
* @param name name
|
|
514
|
+
* @return feed
|
|
515
|
+
*/
|
|
516
|
+
getMessageQueue: (channel: string) => Promise<any>;
|
|
517
|
+
/**
|
|
518
|
+
* join to the group
|
|
519
|
+
* @param group group
|
|
520
|
+
* @param selfid hierarchical name under my group alias
|
|
521
|
+
* @return feed
|
|
522
|
+
*/
|
|
523
|
+
joinGroup: (group: string, selfid: string) => Promise<any>;
|
|
524
|
+
/**
|
|
525
|
+
* leave from the group
|
|
526
|
+
* @param group group
|
|
527
|
+
* @return feed
|
|
528
|
+
*/
|
|
529
|
+
leaveGroup: (group: string) => Promise<boolean>;
|
|
530
|
+
/**
|
|
531
|
+
* Get entries that have entries in a group, but are not in the group.
|
|
532
|
+
* (for entries with no signature or with an incorrect signature, if the user group requires a signature)
|
|
533
|
+
* @param uri group key
|
|
534
|
+
* @return feed (entry array)
|
|
535
|
+
*/
|
|
536
|
+
noGroupMember: (uri: string) => Promise<any>;
|
|
537
|
+
/**
|
|
538
|
+
* Get groups
|
|
539
|
+
* @param uri group key
|
|
540
|
+
* @return feed (entry array)
|
|
541
|
+
*/
|
|
542
|
+
getGroups: () => Promise<any>;
|
|
543
|
+
/**
|
|
544
|
+
* whether you are in the group
|
|
545
|
+
* @param uri group key
|
|
546
|
+
* @return true/false
|
|
547
|
+
*/
|
|
548
|
+
isGroupMember: (uri: string) => Promise<boolean>;
|
|
549
|
+
/**
|
|
550
|
+
* whether you are in the admin group
|
|
551
|
+
* @return true/false
|
|
552
|
+
*/
|
|
553
|
+
isAdmin: () => Promise<boolean>;
|
|
554
|
+
/**
|
|
555
|
+
* add user
|
|
556
|
+
* @param feed entry (JSON)
|
|
557
|
+
* @param reCaptchaToken reCAPTCHA token
|
|
558
|
+
* @return message feed
|
|
559
|
+
*/
|
|
560
|
+
adduser: (feed: any, reCaptchaToken: string) => Promise<any>;
|
|
561
|
+
/**
|
|
562
|
+
* add user by user admin
|
|
563
|
+
* @param feed entries (JSON)
|
|
564
|
+
* @param reCaptchaToken reCAPTCHA token
|
|
565
|
+
* @return message feed
|
|
566
|
+
*/
|
|
567
|
+
adduserByAdmin: (feed: any) => Promise<any>;
|
|
568
|
+
/**
|
|
569
|
+
* Send email for password reset
|
|
570
|
+
* @param feed entry (JSON)
|
|
571
|
+
* @param reCaptchaToken reCAPTCHA token
|
|
572
|
+
* @return message feed
|
|
573
|
+
*/
|
|
574
|
+
passreset: (feed: any, reCaptchaToken?: string) => Promise<any>;
|
|
575
|
+
/**
|
|
576
|
+
* change password
|
|
577
|
+
* @param feed entry (JSON)
|
|
578
|
+
* @return message feed
|
|
579
|
+
*/
|
|
580
|
+
changepass: (feed: any) => Promise<any>;
|
|
581
|
+
/**
|
|
582
|
+
* change password by user admin
|
|
583
|
+
* @param feed entry (JSON)
|
|
584
|
+
* @return message feed
|
|
585
|
+
*/
|
|
586
|
+
changepassByAdmin: (feed: any) => Promise<any>;
|
|
587
|
+
/**
|
|
588
|
+
* change login user's account
|
|
589
|
+
* @param feed entries (JSON)
|
|
590
|
+
* @return message feed
|
|
591
|
+
*/
|
|
592
|
+
changeaccount: (feed: any) => Promise<any>;
|
|
593
|
+
/**
|
|
594
|
+
* verify to change login user's account
|
|
595
|
+
* @param verifyCode verify code
|
|
596
|
+
* @return message feed
|
|
597
|
+
*/
|
|
598
|
+
changeaccount_verify: (verifyCode: string) => Promise<any>;
|
|
599
|
+
/**
|
|
600
|
+
* get user status
|
|
601
|
+
* @param account account
|
|
602
|
+
* @return user status
|
|
603
|
+
*/
|
|
604
|
+
userstatus: (account?: string) => Promise<any>;
|
|
605
|
+
/**
|
|
606
|
+
* revoke user
|
|
607
|
+
* @param account account
|
|
608
|
+
* @return message feed
|
|
609
|
+
*/
|
|
610
|
+
revokeuser: (account: string) => Promise<any>;
|
|
611
|
+
/**
|
|
612
|
+
* revoke users
|
|
613
|
+
* @param feed entries (JSON)
|
|
614
|
+
* @return message feed
|
|
615
|
+
*/
|
|
616
|
+
revokeusers: (feed: any) => Promise<any>;
|
|
617
|
+
/**
|
|
618
|
+
* activate user
|
|
619
|
+
* @param account account
|
|
620
|
+
* @return message feed
|
|
621
|
+
*/
|
|
622
|
+
activateuser: (account: string) => Promise<any>;
|
|
623
|
+
/**
|
|
624
|
+
* activate users
|
|
625
|
+
* @param feed entries (JSON)
|
|
626
|
+
* @return message feed
|
|
627
|
+
*/
|
|
628
|
+
activateusers: (feed: any) => Promise<any>;
|
|
629
|
+
/**
|
|
630
|
+
* cancel user.
|
|
631
|
+
* @param account account
|
|
632
|
+
* @return message feed
|
|
633
|
+
*/
|
|
634
|
+
canceluser: () => Promise<any>;
|
|
635
|
+
/**
|
|
636
|
+
* delete user
|
|
637
|
+
* @param account account
|
|
638
|
+
* @return message feed
|
|
639
|
+
*/
|
|
640
|
+
deleteuser: (account: string) => Promise<any>;
|
|
641
|
+
/**
|
|
642
|
+
* revoke users
|
|
643
|
+
* @param feed entries (JSON)
|
|
644
|
+
* @return message feed
|
|
645
|
+
*/
|
|
646
|
+
deleteusers: (feed: any) => Promise<any>;
|
|
647
|
+
/**
|
|
648
|
+
* add acl
|
|
649
|
+
* @param feed entries
|
|
650
|
+
* @return message
|
|
651
|
+
*/
|
|
652
|
+
addacl: (feed: any) => Promise<any>;
|
|
653
|
+
/**
|
|
654
|
+
* remove acl
|
|
655
|
+
* @param feed entries
|
|
656
|
+
* @return message
|
|
657
|
+
*/
|
|
658
|
+
removeacl: (feed: any) => Promise<any>;
|
|
659
|
+
/**
|
|
660
|
+
* add alias
|
|
661
|
+
* @param feed entries
|
|
662
|
+
* @return message
|
|
663
|
+
*/
|
|
664
|
+
addalias: (feed: any) => Promise<any>;
|
|
665
|
+
/**
|
|
666
|
+
* remove alias
|
|
667
|
+
* @param feed entries
|
|
668
|
+
* @return message
|
|
669
|
+
*/
|
|
670
|
+
removealias: (feed: any) => Promise<any>;
|
|
671
|
+
/**
|
|
672
|
+
* get content url.
|
|
673
|
+
* @param uri key
|
|
674
|
+
* @return content url
|
|
675
|
+
*/
|
|
676
|
+
getcontenturl: (uri: string) => Promise<string>;
|
|
677
|
+
/**
|
|
678
|
+
* save files
|
|
679
|
+
* @param uri key
|
|
680
|
+
* @param bysize true if registering with specified size
|
|
681
|
+
* @returns message
|
|
682
|
+
*/
|
|
683
|
+
savefiles: (uri: string, bysize?: boolean) => Promise<any>;
|
|
684
|
+
/**
|
|
685
|
+
* save files registering with specified size
|
|
686
|
+
* @param uri key
|
|
687
|
+
* @returns message
|
|
688
|
+
*/
|
|
689
|
+
savefilesBySize: (uri: string) => Promise<any>;
|
|
690
|
+
/**
|
|
691
|
+
* upload content
|
|
692
|
+
* @param uri key
|
|
693
|
+
* @param bysize true if registering with specified size
|
|
694
|
+
* @return message
|
|
695
|
+
*/
|
|
696
|
+
putcontent: (uri: string, bysize?: boolean) => Promise<any>;
|
|
697
|
+
/**
|
|
698
|
+
* upload content registering with specified size
|
|
699
|
+
* @param uri key
|
|
700
|
+
* @return message
|
|
701
|
+
*/
|
|
702
|
+
putcontentBySize: (uri: string) => Promise<any>;
|
|
703
|
+
/**
|
|
704
|
+
* delete content
|
|
705
|
+
* @param uri key
|
|
706
|
+
* @return message
|
|
707
|
+
*/
|
|
708
|
+
deletecontent: (uri: string) => Promise<any>;
|
|
709
|
+
/**
|
|
710
|
+
* get content.
|
|
711
|
+
* Writes a content to the response.
|
|
712
|
+
* @param uri key
|
|
713
|
+
* @return true
|
|
714
|
+
*/
|
|
715
|
+
getcontent: (uri: string) => Promise<boolean>;
|
|
716
|
+
/**
|
|
717
|
+
* OAuth authorization request to LINE.
|
|
718
|
+
* If the OAuth request is successful, this module retains the redirect information.
|
|
719
|
+
*/
|
|
720
|
+
oauthLine: () => Promise<boolean>;
|
|
721
|
+
/**
|
|
722
|
+
* OAuth authorization request to LINE
|
|
723
|
+
*/
|
|
724
|
+
oauthCallbackLine: () => Promise<boolean>;
|
|
725
|
+
/**
|
|
726
|
+
* get TOTP link
|
|
727
|
+
* @param chs length of one side of QR code
|
|
728
|
+
* @return QR code URL in feed.title
|
|
729
|
+
*/
|
|
730
|
+
getTotpLink: (chs?: number) => Promise<any>;
|
|
731
|
+
/**
|
|
732
|
+
* create TOTP
|
|
733
|
+
* @param feed one-time password for feed.title when you do book registration
|
|
734
|
+
* @return message
|
|
735
|
+
*/
|
|
736
|
+
createTotp: (feed: any) => Promise<any>;
|
|
737
|
+
/**
|
|
738
|
+
* delete TOTP
|
|
739
|
+
* @param account target account (for service admin user)
|
|
740
|
+
* @return message
|
|
741
|
+
*/
|
|
742
|
+
deleteTotp: (account?: string) => Promise<any>;
|
|
743
|
+
/**
|
|
744
|
+
* change TDID (Trusted device ID)
|
|
745
|
+
* @param account target account (for service admin user)
|
|
746
|
+
* @return message
|
|
747
|
+
*/
|
|
748
|
+
changeTdid: () => Promise<any>;
|
|
749
|
+
/**
|
|
750
|
+
* Merge an existing user with an line oauth user.
|
|
751
|
+
* @param rxid RXID
|
|
752
|
+
* @return message feed
|
|
753
|
+
*/
|
|
754
|
+
mergeOAuthUserLine: (rxid: string) => Promise<any>;
|
|
755
|
+
/**
|
|
756
|
+
* vte.cxへリクエスト
|
|
757
|
+
* @param method メソッド
|
|
758
|
+
* @param url サーブレットパス以降のURL
|
|
759
|
+
* @param req リクエスト。認証情報設定に使用。
|
|
760
|
+
* @param body リクエストデータ
|
|
761
|
+
* @param additionalHeaders リクエストヘッダ追加分
|
|
762
|
+
* @param targetService 連携サービス名
|
|
763
|
+
* @param mode RequestMode ("cors" | "navigate" | "no-cors" | "same-origin")
|
|
764
|
+
* @returns promise
|
|
765
|
+
*/
|
|
766
|
+
private requestVtecx;
|
|
767
|
+
/**
|
|
768
|
+
* vte.cxからのset-cookieを、ブラウザへレスポンスする。
|
|
769
|
+
* @param response vte.cxからのレスポンス
|
|
770
|
+
*/
|
|
771
|
+
private setCookie;
|
|
772
|
+
/**
|
|
773
|
+
* vte.cxからのレスポンスヘッダを、ブラウザへレスポンスする。
|
|
774
|
+
* コンテンツの戻し時に使用。
|
|
775
|
+
* @param response vte.cxからのレスポンス
|
|
776
|
+
* @param res ブラウザへのレスポンス
|
|
777
|
+
*/
|
|
778
|
+
private setResponseHeaders;
|
|
779
|
+
/**
|
|
780
|
+
* OAuth authorization request
|
|
781
|
+
* @param provider OAuth provider name
|
|
782
|
+
* @param oauthUrl OAuth authorization request url
|
|
783
|
+
* @return true
|
|
784
|
+
*/
|
|
785
|
+
private oauth;
|
|
786
|
+
/**
|
|
787
|
+
* OAuth authorization request
|
|
788
|
+
* @param provider OAuth provider name
|
|
789
|
+
* @param oauthUrl OAuth get accesstoken request url
|
|
790
|
+
* @return {'client_id', 'client_secret', 'redirect_uri', 'state', 'access_token'}
|
|
791
|
+
*/
|
|
792
|
+
private oauthGetAccesstoken;
|
|
793
|
+
/**
|
|
794
|
+
* OAuth get userinfo request
|
|
795
|
+
* @param oauthInfo OAuth info {'client_id', 'client_secret', 'redirect_uri', 'state', 'access_token'}
|
|
796
|
+
* @return userinfo {'guid', 'nickname', 'state'}
|
|
797
|
+
*/
|
|
798
|
+
private oauthGetUserinfoLine;
|
|
799
|
+
/**
|
|
800
|
+
* OAuth user link.
|
|
801
|
+
* @param provider OAuth provider name
|
|
802
|
+
* @param userInfo user info
|
|
803
|
+
* @return true if log in has been successful.
|
|
804
|
+
*/
|
|
805
|
+
private oauthLink;
|
|
806
|
+
/**
|
|
807
|
+
* Merge an existing user with an oauth user.
|
|
808
|
+
* @param provider OAuth provider name
|
|
809
|
+
* @param rxid RXID
|
|
810
|
+
* @return message feed
|
|
811
|
+
*/
|
|
812
|
+
private mergeOAuthUser;
|
|
813
|
+
}
|
|
882
814
|
/**
|
|
883
815
|
* response class
|
|
884
816
|
*/
|