@tamu-dor/famis-db 3.0.5 → 3.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1155 -1185
- package/dist/index.d.ts +1155 -1185
- package/dist/main.cjs +2214 -2551
- package/dist/main.cjs.map +1 -1
- package/dist/main.js +2188 -2548
- package/dist/main.js.map +1 -1
- package/package.json +11 -11
package/dist/index.d.mts
CHANGED
|
@@ -1,1185 +1,1155 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
* @param {
|
|
435
|
-
* @param {
|
|
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
|
-
* @param {
|
|
461
|
-
* @param {string}
|
|
462
|
-
* @
|
|
463
|
-
* @
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
*
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
* @param {
|
|
474
|
-
* @param {string}
|
|
475
|
-
* @
|
|
476
|
-
* @
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
*
|
|
482
|
-
*
|
|
483
|
-
* @param {string}
|
|
484
|
-
* @param {
|
|
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
|
-
* @param {
|
|
520
|
-
* @param {
|
|
521
|
-
* @returns {Promise<
|
|
522
|
-
* @memberof FAMISDb
|
|
523
|
-
*/
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
*
|
|
527
|
-
*
|
|
528
|
-
* @param {string}
|
|
529
|
-
* @param {string}
|
|
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
|
-
* @param {string
|
|
556
|
-
* @
|
|
557
|
-
* @
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
*
|
|
564
|
-
*
|
|
565
|
-
* @
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
*
|
|
570
|
-
*
|
|
571
|
-
* @param {string}
|
|
572
|
-
* @
|
|
573
|
-
* @
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
*
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
*
|
|
582
|
-
*
|
|
583
|
-
* @param {string}
|
|
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
|
-
* @param {
|
|
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
|
-
* @param {string}
|
|
647
|
-
* @param {
|
|
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
|
-
* @param {
|
|
720
|
-
* @
|
|
721
|
-
* @
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
* @param {string
|
|
729
|
-
* @returns {Promise<
|
|
730
|
-
* @memberof FAMISDb
|
|
731
|
-
*/
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
*
|
|
735
|
-
* Get
|
|
736
|
-
* @param {string}
|
|
737
|
-
* @returns {Promise<
|
|
738
|
-
* @memberof FAMISDb
|
|
739
|
-
*/
|
|
740
|
-
|
|
741
|
-
/**
|
|
742
|
-
*
|
|
743
|
-
*
|
|
744
|
-
* @
|
|
745
|
-
* @
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
*
|
|
752
|
-
*
|
|
753
|
-
* @param {
|
|
754
|
-
* @
|
|
755
|
-
* @
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
*
|
|
762
|
-
*
|
|
763
|
-
* @
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
*
|
|
770
|
-
*
|
|
771
|
-
* @param {
|
|
772
|
-
* @returns {Promise<
|
|
773
|
-
* @memberof FAMISDb
|
|
774
|
-
*/
|
|
775
|
-
|
|
776
|
-
/**
|
|
777
|
-
*
|
|
778
|
-
*
|
|
779
|
-
* @
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
*
|
|
792
|
-
*
|
|
793
|
-
* @param {string}
|
|
794
|
-
* @param {
|
|
795
|
-
* @param {
|
|
796
|
-
* @param {
|
|
797
|
-
* @
|
|
798
|
-
* @
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
export declare interface TransactionData {
|
|
1158
|
-
to: Contact;
|
|
1159
|
-
lab: string;
|
|
1160
|
-
date: string;
|
|
1161
|
-
from: Contact;
|
|
1162
|
-
number: string;
|
|
1163
|
-
details: Details[];
|
|
1164
|
-
fingerprint: string;
|
|
1165
|
-
totalAmount: string;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
|
-
export declare type User = {
|
|
1169
|
-
id?: number;
|
|
1170
|
-
userId: string;
|
|
1171
|
-
admin?: boolean;
|
|
1172
|
-
role?: boolean;
|
|
1173
|
-
roleName?: string | null;
|
|
1174
|
-
roleEmail?: string | null;
|
|
1175
|
-
email?: string | null;
|
|
1176
|
-
usersSystemId?: number | null;
|
|
1177
|
-
systemId?: number | null;
|
|
1178
|
-
coreId?: number | null;
|
|
1179
|
-
coreUserId?: number | null;
|
|
1180
|
-
cores?: CorePayload | null;
|
|
1181
|
-
systems?: SystemPart[] | [] | null;
|
|
1182
|
-
deleted?: Date | null;
|
|
1183
|
-
};
|
|
1184
|
-
|
|
1185
|
-
export { }
|
|
1
|
+
export type SortDirection = "asc" | "desc";
|
|
2
|
+
export interface PI {
|
|
3
|
+
tamuEduPersonUIN: string;
|
|
4
|
+
tamuEduPersonNetID: string | null;
|
|
5
|
+
uid: string;
|
|
6
|
+
sn: string;
|
|
7
|
+
givenName: string;
|
|
8
|
+
cn: string[];
|
|
9
|
+
displayName: string;
|
|
10
|
+
tamuEduPersonOfficialName: string;
|
|
11
|
+
mail: string;
|
|
12
|
+
postalAddress: string;
|
|
13
|
+
mailStop: string;
|
|
14
|
+
localityName: string;
|
|
15
|
+
stateOrProvinceName: string;
|
|
16
|
+
postalCode: string;
|
|
17
|
+
telephoneNumber: string;
|
|
18
|
+
title: string;
|
|
19
|
+
tamuEduPersonTitleCode: string;
|
|
20
|
+
tamuEduPersonDepartmentName: string;
|
|
21
|
+
tamuEduPersonPrimaryMember: string;
|
|
22
|
+
tamuEduPersonMember: string[];
|
|
23
|
+
tamuEduPersonPrimaryMemberName: string | null;
|
|
24
|
+
tamuEduPersonAffiliation: string[];
|
|
25
|
+
eduPersonOrcid: string | null;
|
|
26
|
+
tamuEduPersonAdLoc: string;
|
|
27
|
+
tamuEduPersonEmpLoc: string;
|
|
28
|
+
tamuEduDataFeed: string[];
|
|
29
|
+
tamuLastSeenTimestamp: string | null;
|
|
30
|
+
tamuEduPersonSupervisorUIN: string;
|
|
31
|
+
tamuManualAddRDN: string | null;
|
|
32
|
+
}
|
|
33
|
+
export interface AccountBalance {
|
|
34
|
+
account_number: string;
|
|
35
|
+
campus_code: string;
|
|
36
|
+
fiscal_year: number;
|
|
37
|
+
account: string;
|
|
38
|
+
support_account: string;
|
|
39
|
+
description?: string | null;
|
|
40
|
+
balance: number;
|
|
41
|
+
}
|
|
42
|
+
export interface Department {
|
|
43
|
+
part: string;
|
|
44
|
+
dept: string;
|
|
45
|
+
sub?: string | null;
|
|
46
|
+
dept_name: string;
|
|
47
|
+
dept_head?: string | null;
|
|
48
|
+
exec_level?: string | null;
|
|
49
|
+
division?: string | null;
|
|
50
|
+
school?: string | null;
|
|
51
|
+
exp_date?: Date | null;
|
|
52
|
+
idt_email?: string | null;
|
|
53
|
+
id?: string | null;
|
|
54
|
+
}
|
|
55
|
+
export interface CoreAccountEmail {
|
|
56
|
+
uid?: string;
|
|
57
|
+
core_id?: number;
|
|
58
|
+
account_number?: string;
|
|
59
|
+
email: string;
|
|
60
|
+
created?: Date | null;
|
|
61
|
+
deleted?: Date | null;
|
|
62
|
+
}
|
|
63
|
+
export type FAMISObjectCode = {
|
|
64
|
+
id: number;
|
|
65
|
+
revenue: string | null;
|
|
66
|
+
expense: string | null;
|
|
67
|
+
sales: boolean;
|
|
68
|
+
srs: boolean;
|
|
69
|
+
};
|
|
70
|
+
export type User = {
|
|
71
|
+
id?: number;
|
|
72
|
+
userId: string;
|
|
73
|
+
admin?: boolean;
|
|
74
|
+
role?: boolean;
|
|
75
|
+
roleName?: string | null;
|
|
76
|
+
roleEmail?: string | null;
|
|
77
|
+
email?: string | null;
|
|
78
|
+
usersSystemId?: number | null;
|
|
79
|
+
systemId?: number | null;
|
|
80
|
+
coreId?: number | null;
|
|
81
|
+
coreUserId?: number | null;
|
|
82
|
+
cores?: CorePayload | null;
|
|
83
|
+
systems?: SystemPart[] | [] | null;
|
|
84
|
+
deleted?: Date | null;
|
|
85
|
+
};
|
|
86
|
+
export interface SystemPart {
|
|
87
|
+
id: number;
|
|
88
|
+
name: string;
|
|
89
|
+
due: string;
|
|
90
|
+
fein: string;
|
|
91
|
+
agency: string;
|
|
92
|
+
checkAddress: string;
|
|
93
|
+
credit?: boolean | null;
|
|
94
|
+
creditUrl?: string | null;
|
|
95
|
+
creditFee?: string | null;
|
|
96
|
+
part: string;
|
|
97
|
+
abbrev: string;
|
|
98
|
+
aggiebuy: string;
|
|
99
|
+
image: string;
|
|
100
|
+
}
|
|
101
|
+
export interface Account {
|
|
102
|
+
uid: string;
|
|
103
|
+
account_number: string;
|
|
104
|
+
campus_code: string;
|
|
105
|
+
fiscal_year: number;
|
|
106
|
+
account: string;
|
|
107
|
+
support_account: string;
|
|
108
|
+
budget_support_account: string;
|
|
109
|
+
budget_account_number: string;
|
|
110
|
+
title: string | null;
|
|
111
|
+
expiration_date: Date | null;
|
|
112
|
+
status: string | null;
|
|
113
|
+
uin: string;
|
|
114
|
+
responsible_uin: string | null;
|
|
115
|
+
department: string | null;
|
|
116
|
+
setup_date: Date | null;
|
|
117
|
+
budget_access: string | null;
|
|
118
|
+
abr_rule: string;
|
|
119
|
+
idt_allowed: boolean | null;
|
|
120
|
+
adloc_campus_code: string | null;
|
|
121
|
+
adloc_department: string | null;
|
|
122
|
+
adloc_name: string | null;
|
|
123
|
+
preferred_first_name: string | null;
|
|
124
|
+
first_name: string | null;
|
|
125
|
+
middle_name: string | null;
|
|
126
|
+
last_name: string | null;
|
|
127
|
+
email: string | null;
|
|
128
|
+
work_phone: string | null;
|
|
129
|
+
active: boolean | null;
|
|
130
|
+
default_bank: string | null;
|
|
131
|
+
bank_override: boolean | null;
|
|
132
|
+
last_seen: Date | null;
|
|
133
|
+
srs: boolean | null;
|
|
134
|
+
cfda_no: string | null;
|
|
135
|
+
sponsor_type: string | null;
|
|
136
|
+
}
|
|
137
|
+
export interface CoreAccount {
|
|
138
|
+
id?: number;
|
|
139
|
+
account?: string;
|
|
140
|
+
coreId: number;
|
|
141
|
+
coreAccountId?: number;
|
|
142
|
+
coreAccountActive?: boolean | null;
|
|
143
|
+
effective?: Date | null;
|
|
144
|
+
active?: boolean | null;
|
|
145
|
+
}
|
|
146
|
+
export interface CoreUser {
|
|
147
|
+
id?: number;
|
|
148
|
+
userId?: string;
|
|
149
|
+
coreId: number;
|
|
150
|
+
coreUserId?: number;
|
|
151
|
+
email?: boolean | null;
|
|
152
|
+
}
|
|
153
|
+
export interface Core {
|
|
154
|
+
id?: number;
|
|
155
|
+
account?: string;
|
|
156
|
+
effective?: string;
|
|
157
|
+
facility?: string;
|
|
158
|
+
contact: string;
|
|
159
|
+
contactEmail: string;
|
|
160
|
+
systemId: number;
|
|
161
|
+
enabled: boolean;
|
|
162
|
+
deleted: string | null;
|
|
163
|
+
coreEmail?: string | null;
|
|
164
|
+
corePhone: string | null;
|
|
165
|
+
coreAddress: string | null;
|
|
166
|
+
from_email: string | null;
|
|
167
|
+
invoice_email: string | null;
|
|
168
|
+
systemPart?: SystemPart;
|
|
169
|
+
system_part?: string;
|
|
170
|
+
system_name?: string;
|
|
171
|
+
system_abbrev?: string;
|
|
172
|
+
users?: CoreUser[];
|
|
173
|
+
accounts?: CoreAccount[];
|
|
174
|
+
}
|
|
175
|
+
export interface FamisDetails {
|
|
176
|
+
invoiceType: string;
|
|
177
|
+
invoiceNumber: string;
|
|
178
|
+
customerPONumber: string;
|
|
179
|
+
invoiceDepartment: string;
|
|
180
|
+
sellingCampusCode: string;
|
|
181
|
+
sellingAccountNumber: string;
|
|
182
|
+
customerAccountNumber: string;
|
|
183
|
+
sellingSupportAccount: string;
|
|
184
|
+
}
|
|
185
|
+
export interface Details {
|
|
186
|
+
ppu: number;
|
|
187
|
+
date: string;
|
|
188
|
+
famis: FamisDetails;
|
|
189
|
+
other: string;
|
|
190
|
+
amount: number;
|
|
191
|
+
status: string;
|
|
192
|
+
category: string;
|
|
193
|
+
comments: string | null;
|
|
194
|
+
quantity: number;
|
|
195
|
+
pmtNumber: string | null;
|
|
196
|
+
usageType: string;
|
|
197
|
+
itemComment: string | null;
|
|
198
|
+
customerName: string;
|
|
199
|
+
purchaseDate: string;
|
|
200
|
+
billingPeriod: string | null;
|
|
201
|
+
customerEmail: string;
|
|
202
|
+
customerTitle: string;
|
|
203
|
+
itemDescription: string;
|
|
204
|
+
sellingObjectCode: string;
|
|
205
|
+
}
|
|
206
|
+
export interface HighRiskTransaction {
|
|
207
|
+
[key: number]: Details[];
|
|
208
|
+
}
|
|
209
|
+
export interface IsHighRisk {
|
|
210
|
+
isHighRisk: boolean;
|
|
211
|
+
flaggedTransactions: Details[];
|
|
212
|
+
}
|
|
213
|
+
export interface CustomerAccountInfo {
|
|
214
|
+
uid: string;
|
|
215
|
+
account_number: string;
|
|
216
|
+
campus_code: string;
|
|
217
|
+
fiscal_year: number;
|
|
218
|
+
account: string;
|
|
219
|
+
support_account: string;
|
|
220
|
+
budget_support_account: string;
|
|
221
|
+
budget_account_number: string;
|
|
222
|
+
title: string;
|
|
223
|
+
expiration_date: string;
|
|
224
|
+
status: string;
|
|
225
|
+
uin: string;
|
|
226
|
+
responsible_uin: string;
|
|
227
|
+
department: string;
|
|
228
|
+
setup_date: string;
|
|
229
|
+
budget_access: string;
|
|
230
|
+
abr_rule: string;
|
|
231
|
+
idt_allowed: boolean;
|
|
232
|
+
adloc_campus_code: string;
|
|
233
|
+
adloc_department: string;
|
|
234
|
+
adloc_name: string;
|
|
235
|
+
preferred_first_name: string;
|
|
236
|
+
first_name: string;
|
|
237
|
+
middle_name: string | null;
|
|
238
|
+
last_name: string;
|
|
239
|
+
email: string;
|
|
240
|
+
work_phone: string;
|
|
241
|
+
active: boolean;
|
|
242
|
+
default_bank: string;
|
|
243
|
+
bank_override: boolean;
|
|
244
|
+
srs: boolean;
|
|
245
|
+
cfda_no: string;
|
|
246
|
+
sponsor_type: string;
|
|
247
|
+
billingEmailId: string;
|
|
248
|
+
parent_account_idt_allowed: boolean;
|
|
249
|
+
}
|
|
250
|
+
export interface HighRiskInfo {
|
|
251
|
+
isHighRisk: boolean;
|
|
252
|
+
flaggedTransactions: Details[];
|
|
253
|
+
}
|
|
254
|
+
export interface Contact {
|
|
255
|
+
fax?: string | null;
|
|
256
|
+
city?: string | null;
|
|
257
|
+
name?: string;
|
|
258
|
+
email?: string | null;
|
|
259
|
+
phone?: string | null;
|
|
260
|
+
state?: string | null;
|
|
261
|
+
country?: string | null;
|
|
262
|
+
address1?: string | null;
|
|
263
|
+
address2?: string | null;
|
|
264
|
+
mailstop?: string | null;
|
|
265
|
+
department?: string | null;
|
|
266
|
+
postalCode?: string | null;
|
|
267
|
+
institution?: string | null;
|
|
268
|
+
}
|
|
269
|
+
export interface TransactionData {
|
|
270
|
+
to: Contact;
|
|
271
|
+
lab: string;
|
|
272
|
+
date: string;
|
|
273
|
+
from: Contact;
|
|
274
|
+
number: string;
|
|
275
|
+
details: Details[];
|
|
276
|
+
fingerprint: string;
|
|
277
|
+
totalAmount: string;
|
|
278
|
+
}
|
|
279
|
+
export interface InvoiceComment {
|
|
280
|
+
id?: number;
|
|
281
|
+
uid?: string;
|
|
282
|
+
invoice_id: string;
|
|
283
|
+
user_id?: string | null;
|
|
284
|
+
comment: string | null;
|
|
285
|
+
type: string | null;
|
|
286
|
+
created: string | null;
|
|
287
|
+
deleted: string | null;
|
|
288
|
+
}
|
|
289
|
+
export type InvoiceCommentFile = {
|
|
290
|
+
id?: number;
|
|
291
|
+
uid: string;
|
|
292
|
+
invoice_id: string;
|
|
293
|
+
comment_id: string;
|
|
294
|
+
original_filename: string | null;
|
|
295
|
+
filename: string | null;
|
|
296
|
+
created: Date | null;
|
|
297
|
+
deleted: Date | null;
|
|
298
|
+
};
|
|
299
|
+
export interface Invoice {
|
|
300
|
+
uid?: string | null;
|
|
301
|
+
number?: string | null;
|
|
302
|
+
lab?: string | null;
|
|
303
|
+
totalAmount?: string;
|
|
304
|
+
date?: string;
|
|
305
|
+
data: TransactionData;
|
|
306
|
+
invoiced: boolean;
|
|
307
|
+
type: string;
|
|
308
|
+
famisInvoiceNumber: string;
|
|
309
|
+
deleted: string | null;
|
|
310
|
+
customerAccount: string;
|
|
311
|
+
sellingAccount: string;
|
|
312
|
+
postedDate: string | null;
|
|
313
|
+
emailed: boolean;
|
|
314
|
+
replace_data?: object | null;
|
|
315
|
+
fingerprint?: string | null;
|
|
316
|
+
core?: Core | null;
|
|
317
|
+
customerAccountInfo?: CustomerAccountInfo | null;
|
|
318
|
+
isIdt?: boolean | null;
|
|
319
|
+
poNumber?: string | null;
|
|
320
|
+
pi?: PI | null;
|
|
321
|
+
highRiskInfo?: HighRiskInfo | null;
|
|
322
|
+
comments?: InvoiceComment[] | null;
|
|
323
|
+
}
|
|
324
|
+
export interface Edge {
|
|
325
|
+
cursor: string;
|
|
326
|
+
node: Invoice;
|
|
327
|
+
}
|
|
328
|
+
export interface PageInfo {
|
|
329
|
+
total?: number;
|
|
330
|
+
lastPage?: number;
|
|
331
|
+
currentPage: number;
|
|
332
|
+
perPage: number;
|
|
333
|
+
from: number;
|
|
334
|
+
to: number;
|
|
335
|
+
}
|
|
336
|
+
export interface InvoicePayload {
|
|
337
|
+
data: Invoice[];
|
|
338
|
+
pagination: PageInfo;
|
|
339
|
+
}
|
|
340
|
+
export interface AccountPayload {
|
|
341
|
+
data: Account[];
|
|
342
|
+
pagination: PageInfo;
|
|
343
|
+
}
|
|
344
|
+
export interface CorePayload {
|
|
345
|
+
data: Core[];
|
|
346
|
+
pagination: PageInfo;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* @typedef {Object} Account
|
|
350
|
+
* @property {string} uid
|
|
351
|
+
* @property {string} account_number
|
|
352
|
+
* @property {string} campus_code
|
|
353
|
+
* @property {number} fiscal_year
|
|
354
|
+
* @property {string} account
|
|
355
|
+
* @property {string} support_account
|
|
356
|
+
* @property {string} budget_support_account
|
|
357
|
+
* @property {string} budget_account_number
|
|
358
|
+
* @property {string | null} title
|
|
359
|
+
* @property {Date | null} expiration_date
|
|
360
|
+
* @property {string | null} status
|
|
361
|
+
* @property {string} uin
|
|
362
|
+
* @property {string | null} responsible_uin
|
|
363
|
+
* @property {string | null} department
|
|
364
|
+
* @property {Date | null} setup_date
|
|
365
|
+
* @property {string | null} budget_access
|
|
366
|
+
* @property {string} abr_rule
|
|
367
|
+
* @property {boolean | null} idt_allowed
|
|
368
|
+
* @property {string | null} adloc_campus_code
|
|
369
|
+
* @property {string | null} adloc_department
|
|
370
|
+
* @property {string | null} adloc_name
|
|
371
|
+
* @property {string | null} preferred_first_name
|
|
372
|
+
* @property {string | null} first_name
|
|
373
|
+
* @property {string | null} middle_name
|
|
374
|
+
* @property {string | null} last_name
|
|
375
|
+
* @property {string | null} email
|
|
376
|
+
* @property {string | null} work_phone
|
|
377
|
+
* @property {boolean | null} active
|
|
378
|
+
* @property {string | null} default_bank
|
|
379
|
+
* @property {boolean | null} bank_override
|
|
380
|
+
* @property {Date | null} last_seen
|
|
381
|
+
* @property {boolean | null} srs
|
|
382
|
+
* @property {string | null} cfda_no
|
|
383
|
+
* @property {string | null} sponsor_type
|
|
384
|
+
*/
|
|
385
|
+
/**
|
|
386
|
+
* Represents the Core schema.
|
|
387
|
+
* @typedef {Object} Core
|
|
388
|
+
* @property {number} id - The ID.
|
|
389
|
+
* @property {string} account - The account.
|
|
390
|
+
* @property {string} effective - The effective date.
|
|
391
|
+
* @property {string} facility - The facility.
|
|
392
|
+
* @property {string} contact - The contact.
|
|
393
|
+
* @property {string} contactEmail - The contact email.
|
|
394
|
+
* @property {number} systemId - The system ID.
|
|
395
|
+
* @property {boolean} enabled - Indicates if it's enabled.
|
|
396
|
+
* @property {string | null} deleted - The deletion status.
|
|
397
|
+
* @property {string} coreEmail - The core email.
|
|
398
|
+
* @property {string | null} corePhone - The core phone.
|
|
399
|
+
* @property {string | null} coreAddress - The core address.
|
|
400
|
+
* @property {string | null} from_email - The from email.
|
|
401
|
+
* @property {string | null} invoice_email - The invoice email.
|
|
402
|
+
* @property {Object} systemPart - The system part.
|
|
403
|
+
*/
|
|
404
|
+
/**
|
|
405
|
+
* @typedef {Object} Edge
|
|
406
|
+
* @property {string} cursor - Description of the property.
|
|
407
|
+
* @property {InvoiceSchema} node - Description of the property.
|
|
408
|
+
*/
|
|
409
|
+
/**
|
|
410
|
+
* @typedef {Object} PageInfo
|
|
411
|
+
* @property {boolean} hasNextPage - Description of the property.
|
|
412
|
+
* @property {boolean} hasPreviousPage - Description of the property.
|
|
413
|
+
* @property {string|null} [startCursor] - Description of the property.
|
|
414
|
+
* @property {string|null} [endCursor] - Description of the property.
|
|
415
|
+
*/
|
|
416
|
+
/**
|
|
417
|
+
* @typedef {Object} InvoicePayload
|
|
418
|
+
* @property {Edge[]} edges - Description of the property.
|
|
419
|
+
* @property {PageInfo} pageInfo - Description of the property.
|
|
420
|
+
*/
|
|
421
|
+
/**
|
|
422
|
+
* @typedef {Object} CorePayload
|
|
423
|
+
* @property {Edge[]} edges - Description of the property.
|
|
424
|
+
* @property {PageInfo} pageInfo - Description of the property.
|
|
425
|
+
*/
|
|
426
|
+
declare class FAMISDb {
|
|
427
|
+
private db;
|
|
428
|
+
private people;
|
|
429
|
+
constructor(config: any, people: any, debug: boolean);
|
|
430
|
+
/**
|
|
431
|
+
* Initializes the database connection and sets up the Knex instance for interacting with PostgreSQL database.
|
|
432
|
+
*
|
|
433
|
+
* @param {any} config - The configuration object that includes details about how to connect to a PostgreSQL database. This should include properties such as `host`, `user`, `password`, etc.
|
|
434
|
+
* @param {any} people - The data related to the 'people' entity. It could be an array of person objects or any other format depending on your application requirements.
|
|
435
|
+
* @param {boolean} debug - A flag indicating whether to enable debugging for Knex queries. Defaults to `false`. If set to `true`, it will log all SQL queries that are executed against the database in the console.
|
|
436
|
+
*/
|
|
437
|
+
init(config: any, people?: any, debug?: boolean): void;
|
|
438
|
+
/**
|
|
439
|
+
*
|
|
440
|
+
* Extract customer account and po number
|
|
441
|
+
* @param {object} famis
|
|
442
|
+
* @param {object} replace_data
|
|
443
|
+
* @returns {object} account number object
|
|
444
|
+
* @memberof FAMISDb
|
|
445
|
+
*/
|
|
446
|
+
getAccountNumber(famis: {
|
|
447
|
+
customerAccountNumber: string;
|
|
448
|
+
customerPONumber: string;
|
|
449
|
+
}, replace_data?: {
|
|
450
|
+
customerAccountNumber?: string;
|
|
451
|
+
customerPONumber?: string;
|
|
452
|
+
}): {
|
|
453
|
+
accountNumber: string;
|
|
454
|
+
poNumber: string | null;
|
|
455
|
+
};
|
|
456
|
+
/**
|
|
457
|
+
*
|
|
458
|
+
* Process an invoice to have all necessary relationships
|
|
459
|
+
* @param {object} invoice - the invoice object sent by iLab
|
|
460
|
+
* @param {boolean} [historical=false] - if true use historical accounts too
|
|
461
|
+
* @param {string[]} excludeFields - fields to exclude from results
|
|
462
|
+
* @returns {Promise<object>} invoice object
|
|
463
|
+
* @memberof FAMISDb
|
|
464
|
+
*/
|
|
465
|
+
processInvoice(invoice: any, historical?: boolean, excludeFields?: string[]): Promise<any>;
|
|
466
|
+
/**
|
|
467
|
+
*
|
|
468
|
+
* Get invoice by uid
|
|
469
|
+
* @param {string} uid
|
|
470
|
+
* @param {string} [sortColumn='date']
|
|
471
|
+
* @param {string} [sortDirection='desc']
|
|
472
|
+
* @param {boolean} [deleted=false]
|
|
473
|
+
* @param {integer} page - page of results to return
|
|
474
|
+
* @param {string} perPage - number of results per page to return
|
|
475
|
+
* @returns {Promise<InvoicePayload>} invoice object
|
|
476
|
+
* @memberof FAMISDb
|
|
477
|
+
*/
|
|
478
|
+
getInvoiceByUid(uid: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
479
|
+
/**
|
|
480
|
+
*
|
|
481
|
+
* Get invoice by originating system assigned number
|
|
482
|
+
* @param {string} number
|
|
483
|
+
* @param {string} [sortColumn='date']
|
|
484
|
+
* @param {string} [sortDirection='desc']
|
|
485
|
+
* @param {boolean} [deleted=false]
|
|
486
|
+
* @param {integer} page - page of results to return
|
|
487
|
+
* @param {string} perPage - number of results per page to return
|
|
488
|
+
* @returns {Promise<InvoicePayload>} invoice object
|
|
489
|
+
* @memberof FAMISDb
|
|
490
|
+
*/
|
|
491
|
+
getInvoiceByNumber(number: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
492
|
+
/**
|
|
493
|
+
*
|
|
494
|
+
* Get invoice by fingerprint
|
|
495
|
+
* @param {string} fingerPrint
|
|
496
|
+
* @returns {Promise<object>} invoice object
|
|
497
|
+
* @memberof FAMISDb
|
|
498
|
+
*/
|
|
499
|
+
getInvoiceByFingerPrint(fingerPrint: string): Promise<any>;
|
|
500
|
+
/**
|
|
501
|
+
*
|
|
502
|
+
* Get all invoices associated with a specified account number
|
|
503
|
+
* @param {string} accountNumber
|
|
504
|
+
* @param {string} [sortColumn='date']
|
|
505
|
+
* @param {string} [sortDirection='desc']
|
|
506
|
+
* @param {boolean} [deleted=false]
|
|
507
|
+
* @param {integer} page - page of results to return
|
|
508
|
+
* @param {string} perPage - number of results per page to return
|
|
509
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
510
|
+
* @memberof FAMISDb
|
|
511
|
+
*/
|
|
512
|
+
getInvoicesByAccount(accountNumber: string | string[], sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
513
|
+
/**
|
|
514
|
+
*
|
|
515
|
+
* Get all invoice ordered by and sorted by parameters passed
|
|
516
|
+
* @param {string} [sortColumn='date']
|
|
517
|
+
* @param {string} [sortDirection='desc']
|
|
518
|
+
* @param {boolean} [deleted=false]
|
|
519
|
+
* @param {integer} page - page of results to return
|
|
520
|
+
* @param {string} perPage - number of results per page to return
|
|
521
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
522
|
+
* @memberof FAMISDb
|
|
523
|
+
*/
|
|
524
|
+
getAllInvoices(sortColumn?: string, sortDirection?: SortDirection | string, deleted?: boolean, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
525
|
+
/**
|
|
526
|
+
*
|
|
527
|
+
* Retrieves invoices from the latest date
|
|
528
|
+
* @param {string} [sortColumn='date']
|
|
529
|
+
* @param {string} [sortDirection='desc']
|
|
530
|
+
* @param {integer} first - corresponds to the first param of the Relay spec
|
|
531
|
+
* @param {string} after - corresponds to the after param of the Relay spec
|
|
532
|
+
* @param {integer} last - corresponds to the last param of the Relay spec
|
|
533
|
+
* @param {string} before - corresponds to the before param of the Relay spec
|
|
534
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
535
|
+
* @memberof FAMISDb
|
|
536
|
+
*/
|
|
537
|
+
getLatestInvoices(sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
538
|
+
/**
|
|
539
|
+
*
|
|
540
|
+
* Returns all held invoices
|
|
541
|
+
* @param {string} [sortColumn='date']
|
|
542
|
+
* @param {string} [sortDirection='desc']
|
|
543
|
+
* @param {integer} page - corresponds to the first param of the Relay spec
|
|
544
|
+
* @param {integer} perPage - corresponds to the last param of the Relay spec
|
|
545
|
+
* @returns {Promise<InvoicePayload>} held invoice objects
|
|
546
|
+
* @memberof FAMISDb
|
|
547
|
+
*/
|
|
548
|
+
getHeldInvoices(sortColumn?: string, sortDirection?: string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
549
|
+
/**
|
|
550
|
+
*
|
|
551
|
+
* Returns all awaiting email invoices
|
|
552
|
+
* @param {string} [sortColumn='date']
|
|
553
|
+
* @param {string} [sortDirection='desc']
|
|
554
|
+
* @param {integer} first - corresponds to the first param of the Relay spec
|
|
555
|
+
* @param {string} after - corresponds to the after param of the Relay spec
|
|
556
|
+
* @param {integer} last - corresponds to the last param of the Relay spec
|
|
557
|
+
* @param {string} before - corresponds to the before param of the Relay spec
|
|
558
|
+
* @returns {Promise<InvoicePayload>} awaiting email invoice objects
|
|
559
|
+
* @memberof FAMISDb
|
|
560
|
+
*/
|
|
561
|
+
getInvoicesAwaitingEmail(sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
562
|
+
/**
|
|
563
|
+
*
|
|
564
|
+
* Search invoices by originating system generated invoice number
|
|
565
|
+
* @param {string} number
|
|
566
|
+
* @param {string} [sortColumn='date']
|
|
567
|
+
* @param {string} [sortDirection='desc']
|
|
568
|
+
* @param {integer} first - corresponds to the first param of the Relay spec
|
|
569
|
+
* @param {string} after - corresponds to the after param of the Relay spec
|
|
570
|
+
* @param {integer} last - corresponds to the last param of the Relay spec
|
|
571
|
+
* @param {string} before - corresponds to the before param of the Relay spec
|
|
572
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
573
|
+
* @memberof FAMISDb
|
|
574
|
+
*/
|
|
575
|
+
searchInvoicesByNumber(number: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
576
|
+
/**
|
|
577
|
+
*
|
|
578
|
+
* Search invoices by famis account number
|
|
579
|
+
* @param {string} account
|
|
580
|
+
* @param {string} [sortColumn='date']
|
|
581
|
+
* @param {string} [sortDirection='desc']
|
|
582
|
+
* @param {integer} first - corresponds to the first param of the Relay spec
|
|
583
|
+
* @param {string} after - corresponds to the after param of the Relay spec
|
|
584
|
+
* @param {integer} last - corresponds to the last param of the Relay spec
|
|
585
|
+
* @param {string} before - corresponds to the before param of the Relay spec
|
|
586
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
587
|
+
* @memberof FAMISDb
|
|
588
|
+
*/
|
|
589
|
+
searchInvoicesByAccountNumber(account: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
590
|
+
/**
|
|
591
|
+
*
|
|
592
|
+
* Search invoices by FAMIS invoice number
|
|
593
|
+
* @param {string} famis
|
|
594
|
+
* @param {string} [sortColumn='date']
|
|
595
|
+
* @param {string} [sortDirection='desc']
|
|
596
|
+
* @param {integer} page - page of results to return
|
|
597
|
+
* @param {integer} perPage - number of results per page to return
|
|
598
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
599
|
+
* @memberof FAMISDb
|
|
600
|
+
*/
|
|
601
|
+
searchInvoicesByFamis(famis: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<InvoicePayload>;
|
|
602
|
+
/**
|
|
603
|
+
*
|
|
604
|
+
* Queries invoices
|
|
605
|
+
* @param {string} query
|
|
606
|
+
* @param {string} [sortColumn='date']
|
|
607
|
+
* @param {string} [sortDirection='desc']
|
|
608
|
+
* @param {integer} page - page of results to return
|
|
609
|
+
* @param {integer} perPage - number of results per page to return
|
|
610
|
+
* @param {string[]} excludeFields - fields to exclude from results
|
|
611
|
+
* @returns {Promise<InvoicePayload>} invoice objects
|
|
612
|
+
* @memberof FAMISDb
|
|
613
|
+
*/
|
|
614
|
+
queryInvoices(query: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number, excludeFields?: string[]): Promise<InvoicePayload>;
|
|
615
|
+
/**
|
|
616
|
+
*
|
|
617
|
+
* Adds an invoice
|
|
618
|
+
* @param {object} invoice
|
|
619
|
+
* @param {string} type
|
|
620
|
+
* @param {string} famisInvoiceNumber
|
|
621
|
+
* @returns {Promise<object>} invoice
|
|
622
|
+
* @memberof FAMISDb
|
|
623
|
+
*/
|
|
624
|
+
addInvoice(invoice: any, type: string, famisInvoiceNumber?: string): Promise<any>;
|
|
625
|
+
/**
|
|
626
|
+
*
|
|
627
|
+
* Updates an invoice
|
|
628
|
+
* @param {string} uid
|
|
629
|
+
* @param {Invoice} invoice
|
|
630
|
+
* @returns {Promise<Invoice>} invoice object
|
|
631
|
+
* @memberof FAMISDb
|
|
632
|
+
*/
|
|
633
|
+
updateInvoice(uid: string, invoice: Invoice): Promise<InvoicePayload>;
|
|
634
|
+
/**
|
|
635
|
+
*
|
|
636
|
+
* Toggles an invoice as paid
|
|
637
|
+
* @param {string} uid
|
|
638
|
+
* @param {boolean} invoiced
|
|
639
|
+
* @returns {Promise<object>} invoice object
|
|
640
|
+
* @memberof FAMISDb
|
|
641
|
+
*/
|
|
642
|
+
markInvoiced(uid: string, invoiced: boolean): Promise<any>;
|
|
643
|
+
/**
|
|
644
|
+
*
|
|
645
|
+
* Toggles an invoice as emailed
|
|
646
|
+
* @param {string} uid
|
|
647
|
+
* @param {boolean} emailed
|
|
648
|
+
* @returns {Promise<object>} invoice object
|
|
649
|
+
* @memberof FAMISDb
|
|
650
|
+
*/
|
|
651
|
+
markEmailed(uid: string, emailed: boolean): Promise<any>;
|
|
652
|
+
/**
|
|
653
|
+
*
|
|
654
|
+
* Sets an invoice's deletion date
|
|
655
|
+
* @param {string} uid
|
|
656
|
+
* @param {date} deleted
|
|
657
|
+
* @returns {Promise<object>} invoice object
|
|
658
|
+
* @memberof FAMISDb
|
|
659
|
+
*/
|
|
660
|
+
setDeleted(uid: string, deleted: Date): Promise<any>;
|
|
661
|
+
/**
|
|
662
|
+
*
|
|
663
|
+
* Sets an invoice's posted date
|
|
664
|
+
* @param {string} uid
|
|
665
|
+
* @param {date} postedDate
|
|
666
|
+
* @returns {Promise<object>} invoice object
|
|
667
|
+
* @memberof FAMISDb
|
|
668
|
+
*/
|
|
669
|
+
setInvoicePostedDate(uid: string, postedDate: Date | null): Promise<any>;
|
|
670
|
+
/**
|
|
671
|
+
*
|
|
672
|
+
* Sets an invoice's fingerprint
|
|
673
|
+
* @param {string} uid
|
|
674
|
+
* @param {string} fingerprint
|
|
675
|
+
* @returns {Promise<object>} invoice object
|
|
676
|
+
* @memberof FAMISDb
|
|
677
|
+
*/
|
|
678
|
+
setInvoiceFingerPrint(uid: string, fingerprint: string): Promise<any>;
|
|
679
|
+
/**
|
|
680
|
+
*
|
|
681
|
+
* Get PI accounts by account number
|
|
682
|
+
* @param {string} number
|
|
683
|
+
* @param {string} campus
|
|
684
|
+
* @param {boolean} [historical=false]
|
|
685
|
+
* @returns {Promise<Account>} account object
|
|
686
|
+
* @memberof FAMISDb
|
|
687
|
+
*/
|
|
688
|
+
getByAccountNumber(number: string, campus?: string, historical?: boolean): Promise<any>;
|
|
689
|
+
/**
|
|
690
|
+
*
|
|
691
|
+
* Search PI accounts by partial account number
|
|
692
|
+
* @param {string|string[]} number
|
|
693
|
+
* @returns {Promise<AccountPayload>} account object(s)
|
|
694
|
+
* @memberof FAMISDb
|
|
695
|
+
*/
|
|
696
|
+
searchByAccountNumber(number: string | string[], sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<AccountPayload>;
|
|
697
|
+
/**
|
|
698
|
+
*
|
|
699
|
+
* Get PI Accounts by UIN
|
|
700
|
+
* @param {string|string[]} uin
|
|
701
|
+
* @returns {Promise<Account[]>} account object array
|
|
702
|
+
* @memberof FAMISDb
|
|
703
|
+
*/
|
|
704
|
+
getAccountsByUin(uin: string | string[], responsible?: boolean, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<AccountPayload>;
|
|
705
|
+
/**
|
|
706
|
+
*
|
|
707
|
+
* Get PI accounts by responsible UIN
|
|
708
|
+
* @param {string} uin
|
|
709
|
+
* @returns {Promise<Account[]>} account object array
|
|
710
|
+
* @memberof FAMISDb
|
|
711
|
+
*/
|
|
712
|
+
getAccountsByResponsibleUin(uin: string | string[]): Promise<Account[]>;
|
|
713
|
+
/**
|
|
714
|
+
*
|
|
715
|
+
* Queries accounts
|
|
716
|
+
* @param {string} query
|
|
717
|
+
* @param {string} [sortColumn='date']
|
|
718
|
+
* @param {string} [sortDirection='desc']
|
|
719
|
+
* @param {integer} page - page of results to return
|
|
720
|
+
* @param {integer} perPage - number of results per page to return
|
|
721
|
+
* @returns {Promise<AccountPayload>} invoice objects
|
|
722
|
+
* @memberof FAMISDb
|
|
723
|
+
*/
|
|
724
|
+
queryAccounts(query: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number): Promise<AccountPayload>;
|
|
725
|
+
/**
|
|
726
|
+
*
|
|
727
|
+
* Get next FAMIS invoice number in sequence for specified invoice type
|
|
728
|
+
* @param {string} invoice
|
|
729
|
+
* @returns {Promise<string>} next invoice number in sequence
|
|
730
|
+
* @memberof FAMISDb
|
|
731
|
+
*/
|
|
732
|
+
getNextFAMISInvoiceNumber(type: string): Promise<string>;
|
|
733
|
+
/**
|
|
734
|
+
*
|
|
735
|
+
* Get matching expense code for specified revenue code
|
|
736
|
+
* @param {string} revenue
|
|
737
|
+
* @returns {Promise<string>} expense code
|
|
738
|
+
* @memberof FAMISDb
|
|
739
|
+
*/
|
|
740
|
+
getExpenseCodeByRevenue(revenue: string): Promise<string>;
|
|
741
|
+
/**
|
|
742
|
+
* Represents a row in the 'codes' table.
|
|
743
|
+
* @typedef {Object} Code
|
|
744
|
+
* @property {number} id - The unique identifier for the code.
|
|
745
|
+
* @property {string|null} revenue - The revenue code (nullable).
|
|
746
|
+
* @property {string|null} expense - The expense code (nullable).
|
|
747
|
+
* @property {boolean} sales - Indicates if the code is associated with sales.
|
|
748
|
+
* @property {boolean} srs - Indicates if the code is associated with SRS.
|
|
749
|
+
*/
|
|
750
|
+
/**
|
|
751
|
+
*
|
|
752
|
+
* Get revenue code object
|
|
753
|
+
* @param {string} revenue
|
|
754
|
+
* @returns {Promise<Code>} revenue code object
|
|
755
|
+
* @memberof FAMISDb
|
|
756
|
+
*/
|
|
757
|
+
getRevenueCode(revenue: string): Promise<FAMISObjectCode>;
|
|
758
|
+
/**
|
|
759
|
+
*
|
|
760
|
+
* Get expense code object
|
|
761
|
+
* @param {string} code
|
|
762
|
+
* @returns {Promise<Code>} expense code object
|
|
763
|
+
* @memberof FAMISDb
|
|
764
|
+
*/
|
|
765
|
+
getExpenseCode(code: string): Promise<FAMISObjectCode>;
|
|
766
|
+
/**
|
|
767
|
+
*
|
|
768
|
+
* Check if expense code is within the allowable range for specified account and the specified fiscal year (defaults to the current)
|
|
769
|
+
* @param {string} accountNumber
|
|
770
|
+
* @param {string} code
|
|
771
|
+
* @param {integer} fiscal
|
|
772
|
+
* @returns {Promise<boolean>} truthy value
|
|
773
|
+
* @memberof FAMISDb
|
|
774
|
+
*/
|
|
775
|
+
allowableExpenseCode(accountNumber: string, code: string, fiscal?: number): Promise<boolean>;
|
|
776
|
+
/**
|
|
777
|
+
*
|
|
778
|
+
* Get allowable expense code ranges for the specified account
|
|
779
|
+
* @param {string} accountNumber
|
|
780
|
+
* @param {integer} fiscal
|
|
781
|
+
* @returns {Promise<boolean>} expense code range object(s)
|
|
782
|
+
* @memberof FAMISDb
|
|
783
|
+
*/
|
|
784
|
+
getAllowableExpenseCodes(accountNumber: string, fiscal?: number): Promise<{
|
|
785
|
+
allowed: object[];
|
|
786
|
+
disallowed: object[];
|
|
787
|
+
}>;
|
|
788
|
+
/**
|
|
789
|
+
*
|
|
790
|
+
* Query cores
|
|
791
|
+
* @param {string} query
|
|
792
|
+
* @param {string} [sortColumn='facility']
|
|
793
|
+
* @param {string} [sortDirection='asc']
|
|
794
|
+
* @param {integer} page - page of results to return
|
|
795
|
+
* @param {integer} perPage - number of results per page to return
|
|
796
|
+
* @param {string[]} excludeFields - fields to exclude from results
|
|
797
|
+
* @returns {Promise<CorePayload>} core objects
|
|
798
|
+
* @memberof FAMISDb
|
|
799
|
+
*/
|
|
800
|
+
queryCores(query: string, sortColumn?: string, sortDirection?: SortDirection | string, page?: number, perPage?: number, excludeFields?: string[]): Promise<CorePayload>;
|
|
801
|
+
/**
|
|
802
|
+
*
|
|
803
|
+
* Get core by specified attribute and search term
|
|
804
|
+
* @param {string} type
|
|
805
|
+
* @param {string} operator
|
|
806
|
+
* @param {string} search
|
|
807
|
+
* @param {string[]} excludeFields - fields to exclude from results
|
|
808
|
+
* @returns {Promise<Core>} core object
|
|
809
|
+
* @memberof FAMISDb
|
|
810
|
+
*/
|
|
811
|
+
getCore(type: string, operator: string | undefined, search: string, excludeFields?: string[]): Promise<Core>;
|
|
812
|
+
/**
|
|
813
|
+
*
|
|
814
|
+
* Get core by id
|
|
815
|
+
* @param {string} id
|
|
816
|
+
* @returns {Promise<Core>} core object
|
|
817
|
+
* @memberof FAMISDb
|
|
818
|
+
*/
|
|
819
|
+
getCoreById(id: string): Promise<Core>;
|
|
820
|
+
/**
|
|
821
|
+
*
|
|
822
|
+
* Get core by account number
|
|
823
|
+
* @param {string} account
|
|
824
|
+
* @returns {Promise<Core>} core object
|
|
825
|
+
* @param {string[]} excludeFields - fields to exclude from results
|
|
826
|
+
* @memberof FAMISDb
|
|
827
|
+
*/
|
|
828
|
+
getCoreByAccount(account: string, excludeFields?: string[]): Promise<Core>;
|
|
829
|
+
/**
|
|
830
|
+
*
|
|
831
|
+
* Update core
|
|
832
|
+
* @param {Core} core object
|
|
833
|
+
* @returns {Promise<Core>} core object
|
|
834
|
+
* @memberof FAMISDb
|
|
835
|
+
*/
|
|
836
|
+
updateCore(core: Core): Promise<Core | undefined>;
|
|
837
|
+
/**
|
|
838
|
+
*
|
|
839
|
+
* Add core
|
|
840
|
+
* @param {Core} core object
|
|
841
|
+
* @returns {Promise<Core>} core object
|
|
842
|
+
* @memberof FAMISDb
|
|
843
|
+
*/
|
|
844
|
+
addCore(core: Core): Promise<Core>;
|
|
845
|
+
/**
|
|
846
|
+
*
|
|
847
|
+
* Update core account
|
|
848
|
+
* @param {CoreAccount} account object
|
|
849
|
+
* @returns {Promise<CoreAccount>} core_account object
|
|
850
|
+
* @memberof FAMISDb
|
|
851
|
+
*/
|
|
852
|
+
updateCoreAccount(account: CoreAccount): Promise<CoreAccount>;
|
|
853
|
+
/**
|
|
854
|
+
*
|
|
855
|
+
* Add core_account
|
|
856
|
+
* @param {CoreAccount} account object
|
|
857
|
+
* @returns {Promise<CoreAccount>} core_account object
|
|
858
|
+
* @memberof FAMISDb
|
|
859
|
+
*/
|
|
860
|
+
addCoreAccount(account: CoreAccount): Promise<CoreAccount>;
|
|
861
|
+
/**
|
|
862
|
+
*
|
|
863
|
+
* Delete core account
|
|
864
|
+
* @param {coreAccountId} string core account id
|
|
865
|
+
* @returns {Promise<CoreAccount>} core account object
|
|
866
|
+
* @memberof FAMISDb
|
|
867
|
+
*/
|
|
868
|
+
deleteCoreAccount(coreAccountId: string): Promise<CoreAccount>;
|
|
869
|
+
/**
|
|
870
|
+
*
|
|
871
|
+
* Get system part by ID
|
|
872
|
+
* @param {number} id
|
|
873
|
+
* @param {string[]} excludeFields - fields to exclude from results
|
|
874
|
+
* @returns {Promise<SystemPart>} system part object
|
|
875
|
+
* @memberof FAMISDb
|
|
876
|
+
*/
|
|
877
|
+
getSystemById(id: number, excludeFields?: string[]): Promise<SystemPart>;
|
|
878
|
+
/**
|
|
879
|
+
*
|
|
880
|
+
* Get system part by two-digit part number
|
|
881
|
+
* @param {string} number
|
|
882
|
+
* @returns {Promise<SystemPart>} system part object
|
|
883
|
+
* @memberof FAMISDb
|
|
884
|
+
*/
|
|
885
|
+
getSystemByPartNumber(number: string): Promise<SystemPart>;
|
|
886
|
+
/**
|
|
887
|
+
*
|
|
888
|
+
* Get all enabled cores
|
|
889
|
+
* @returns {Promise<Core[]>} core objects
|
|
890
|
+
* @memberof FAMISDb
|
|
891
|
+
*/
|
|
892
|
+
getEnabledCores(): Promise<Core[]>;
|
|
893
|
+
/**
|
|
894
|
+
*
|
|
895
|
+
* Get all cores
|
|
896
|
+
* @param {string} [sortColumn='facility']
|
|
897
|
+
* @param {string} [sortDirection='asc']
|
|
898
|
+
* @param {boolean} [deleted=false]
|
|
899
|
+
* @param {integer} page - page of results to return
|
|
900
|
+
* @param {string} perPage - number of results per page to return
|
|
901
|
+
* @returns {Promise<CorePayload>} core objects
|
|
902
|
+
* @memberof FAMISDb
|
|
903
|
+
*/
|
|
904
|
+
getAllCores(sortColumn?: string, sortDirection?: SortDirection | string, deleted?: boolean, page?: number, perPage?: number): Promise<CorePayload>;
|
|
905
|
+
/**
|
|
906
|
+
*
|
|
907
|
+
* Get a core's users by core ID
|
|
908
|
+
* @param {number} coreId
|
|
909
|
+
* @returns {Promise<Core[]>} user objects
|
|
910
|
+
* @memberof FAMISDb
|
|
911
|
+
*/
|
|
912
|
+
getCoreUsers(coreId: number): Promise<Core[]>;
|
|
913
|
+
/**
|
|
914
|
+
*
|
|
915
|
+
* Update core user
|
|
916
|
+
* @param {CoreUser} user object
|
|
917
|
+
* @returns {Promise<CoreUser>} user_core object
|
|
918
|
+
* @memberof FAMISDb
|
|
919
|
+
*/
|
|
920
|
+
updateCoreUser(user: CoreUser): Promise<CoreUser>;
|
|
921
|
+
/**
|
|
922
|
+
* This function adds a new CoreUser to the database. If the user already exists, it updates the existing record.
|
|
923
|
+
* @param {CoreUser} coreUser - The CoreUser object containing details about the user.
|
|
924
|
+
* @return {Promise<CoreUser>} A Promise that resolves to the newly added or updated CoreUser, if successfully added and returned from the database; otherwise it rejects with an error.
|
|
925
|
+
*/
|
|
926
|
+
addCoreUser(coreUser: CoreUser): Promise<CoreUser>;
|
|
927
|
+
/**
|
|
928
|
+
*
|
|
929
|
+
* Delete core user
|
|
930
|
+
* @param {coreUserId} string core user object
|
|
931
|
+
* @returns {Promise<CoreUser>} core user object
|
|
932
|
+
* @memberof FAMISDb
|
|
933
|
+
*/
|
|
934
|
+
deleteCoreUser(coreUserId: string): Promise<CoreUser>;
|
|
935
|
+
/**
|
|
936
|
+
*
|
|
937
|
+
* Get a user's cores they manage
|
|
938
|
+
* @param {string} userId
|
|
939
|
+
* @param {string} [sortColumn='facility']
|
|
940
|
+
* @param {string} [sortDirection='asc']
|
|
941
|
+
* @param {boolean} [deleted=false]
|
|
942
|
+
* @param {integer} page - page of results to return
|
|
943
|
+
* @param {string} perPage - number of results per page to return
|
|
944
|
+
* @returns {Promise<CorePayload]>} core objects
|
|
945
|
+
* @memberof FAMISDb
|
|
946
|
+
*/
|
|
947
|
+
getUserCores(userId: string, sortColumn?: string, sortDirection?: SortDirection | string, deleted?: boolean, page?: number, perPage?: number): Promise<CorePayload>;
|
|
948
|
+
/**
|
|
949
|
+
*
|
|
950
|
+
* Get a system part's users by system ID
|
|
951
|
+
* @param {number} systemId
|
|
952
|
+
* @returns {Promise<object[]>} user objects
|
|
953
|
+
* @memberof FAMISDb
|
|
954
|
+
*/
|
|
955
|
+
getSystemUsers(systemId: number): Promise<User[]>;
|
|
956
|
+
/**
|
|
957
|
+
*
|
|
958
|
+
* Get a user's system parts they manage
|
|
959
|
+
* @param {string} userId
|
|
960
|
+
* @returns {Promise<SystemPart[]>} system objects
|
|
961
|
+
* @memberof FAMISDb
|
|
962
|
+
*/
|
|
963
|
+
getUserSystemParts(userId: string): Promise<SystemPart[]>;
|
|
964
|
+
/**
|
|
965
|
+
* Represents the "system" table in the public schema.
|
|
966
|
+
* @typedef {Object} System
|
|
967
|
+
* @property {number} id - The ID (auto-generated).
|
|
968
|
+
* @property {string | null} name - The name.
|
|
969
|
+
* @property {string | null} due - The due text.
|
|
970
|
+
* @property {string | null} fein - The FEIN (Federal Employer Identification Number).
|
|
971
|
+
* @property {string | null} agency - The agency.
|
|
972
|
+
* @property {string | null} checkAddress - The check address.
|
|
973
|
+
* @property {boolean} credit - Indicates if credit is allowed.
|
|
974
|
+
* @property {string | null} creditUrl - The credit URL.
|
|
975
|
+
* @property {string | null} creditFee - The credit fee.
|
|
976
|
+
* @property {string | null} part - The part.
|
|
977
|
+
* @property {string | null} abbrev - The abbreviation.
|
|
978
|
+
* @property {string | null} aggiebuy - The AggieBuy information.
|
|
979
|
+
* @property {string | null} image - The image URL.
|
|
980
|
+
*/
|
|
981
|
+
/**
|
|
982
|
+
* Get all system parts.
|
|
983
|
+
* @returns {Promise<SystemPart[]>} System objects.
|
|
984
|
+
* @memberof FAMISDb
|
|
985
|
+
*/
|
|
986
|
+
getAllSystemParts(): Promise<SystemPart[]>;
|
|
987
|
+
/**
|
|
988
|
+
* Get all admin users.
|
|
989
|
+
* @returns {Promise<object[]>} Array of user objects.
|
|
990
|
+
* @memberof FAMISDb
|
|
991
|
+
*/
|
|
992
|
+
getAdminUsers(): Promise<User[] | []>;
|
|
993
|
+
/**
|
|
994
|
+
* Get user.
|
|
995
|
+
* @param {string} userId - User ID.
|
|
996
|
+
* @returns {Promise<object>} User object.
|
|
997
|
+
* @memberof FAMISDb
|
|
998
|
+
*/
|
|
999
|
+
getUser(userId: string): Promise<User | null>;
|
|
1000
|
+
/**
|
|
1001
|
+
* Update user.
|
|
1002
|
+
* @param {object} user - User object.
|
|
1003
|
+
* @returns {Promise<object>} Updated user object.
|
|
1004
|
+
* @memberof FAMISDb
|
|
1005
|
+
*/
|
|
1006
|
+
updateUser(user: object): Promise<object | null>;
|
|
1007
|
+
/**
|
|
1008
|
+
* Get customer by customer account number.
|
|
1009
|
+
* @param {string} accountNumber - Customer account number.
|
|
1010
|
+
* @param {string} campusCode - Campus code.
|
|
1011
|
+
* @returns {Promise<object>} Customer account object.
|
|
1012
|
+
* @memberof FAMISDb
|
|
1013
|
+
*/
|
|
1014
|
+
getCustomerNumber(accountNumber: string, campusCode: string): Promise<object | null>;
|
|
1015
|
+
/**
|
|
1016
|
+
* Get current fiscal year.
|
|
1017
|
+
* @returns {number} Fiscal year.
|
|
1018
|
+
* @memberof FAMISDb
|
|
1019
|
+
*/
|
|
1020
|
+
getCurrentFiscalYear(): number;
|
|
1021
|
+
/**
|
|
1022
|
+
* Return fingerprint of invoice.
|
|
1023
|
+
* @param {object} invoice - JSON object.
|
|
1024
|
+
* @returns {string} Fingerprint.
|
|
1025
|
+
* @memberof FAMISDb
|
|
1026
|
+
*/
|
|
1027
|
+
getInvoiceFingerPrint(invoice: object): string;
|
|
1028
|
+
/**
|
|
1029
|
+
* Return formatted account number.
|
|
1030
|
+
* @param {string} accountNumber - Unformatted 13-digit FAMIS account number.
|
|
1031
|
+
* @returns {string} Formatted 13-digit FAMIS account number.
|
|
1032
|
+
* @memberof FAMISDb
|
|
1033
|
+
*/
|
|
1034
|
+
formatAccountNumber(accountNumber: string): string;
|
|
1035
|
+
/**
|
|
1036
|
+
* Is invoice flagged by SRS high-risk policies.
|
|
1037
|
+
* @param {object} invoice - JSON object.
|
|
1038
|
+
* @returns {Promise<HighRisk>} High-risk object.
|
|
1039
|
+
* @memberof FAMISDb
|
|
1040
|
+
*/
|
|
1041
|
+
isSrsHighRisk(invoice: Invoice): Promise<HighRiskInfo>;
|
|
1042
|
+
/**
|
|
1043
|
+
* @typedef {Object} Comment
|
|
1044
|
+
* @property {integer} id - db generated id
|
|
1045
|
+
* @property {string} uid - uid
|
|
1046
|
+
* @property {string} invoice_id - invoice id
|
|
1047
|
+
* @property {string} user_id - user uid
|
|
1048
|
+
* @property {string} comment - text of comment
|
|
1049
|
+
* @property {string} type - type of comment
|
|
1050
|
+
* @property {date} created - created date
|
|
1051
|
+
* @property {date} deleted - deleted date
|
|
1052
|
+
*/
|
|
1053
|
+
/**
|
|
1054
|
+
* Create or update an invoice comment.
|
|
1055
|
+
* @param {Comment} comment - JSON object representing the comment
|
|
1056
|
+
* @returns {Promise<Comment>} - Promise that resolves to the comment object
|
|
1057
|
+
* @memberof FAMISDb
|
|
1058
|
+
*/
|
|
1059
|
+
saveComment(comment: InvoiceComment): Promise<InvoiceComment | null>;
|
|
1060
|
+
/**
|
|
1061
|
+
* Get comments associated with an invoice.
|
|
1062
|
+
* @param {string} invoiceUid - Invoice UID
|
|
1063
|
+
* @returns {Promise<Comment[]>} - Promise that resolves to an array of comment objects
|
|
1064
|
+
* @memberof FAMISDb
|
|
1065
|
+
*/
|
|
1066
|
+
getInvoiceComments(invoiceUid: string): Promise<InvoiceComment[]>;
|
|
1067
|
+
/**
|
|
1068
|
+
* @typedef {Object} CommentFile
|
|
1069
|
+
* @property {integer} id - db generated id
|
|
1070
|
+
* @property {string} uid - uid
|
|
1071
|
+
* @property {string} invoice_id - invoice uid
|
|
1072
|
+
* @property {string} comment_id - comment uid
|
|
1073
|
+
* @property {string} original_filename - original file name
|
|
1074
|
+
* @property {string} filename - generate unique filename on filesystem
|
|
1075
|
+
* @property {date} created - created date
|
|
1076
|
+
* @property {date} deleted - deleted date
|
|
1077
|
+
*/
|
|
1078
|
+
/**
|
|
1079
|
+
* Create an invoice comment file.
|
|
1080
|
+
* @param {InvoiceCommentFile} file - JSON object representing the comment file
|
|
1081
|
+
* @returns {Promise<InvoiceCommentFile>} - Promise that resolves to the comment file object
|
|
1082
|
+
* @memberof FAMISDb
|
|
1083
|
+
*/
|
|
1084
|
+
saveCommentFile(file: InvoiceCommentFile): Promise<InvoiceCommentFile | null>;
|
|
1085
|
+
/**
|
|
1086
|
+
* Get invoice comment files.
|
|
1087
|
+
* @param {string} commentUid - Comment UID
|
|
1088
|
+
* @returns {Promise<CommentFile[]>} - Promise that resolves to an array of comment file objects
|
|
1089
|
+
* @memberof FAMISDb
|
|
1090
|
+
*/
|
|
1091
|
+
getCommentFiles(commentUid: string): Promise<InvoiceCommentFile[] | []>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Get invoice comment file.
|
|
1094
|
+
* @param {string} fileUid - File UID
|
|
1095
|
+
* @returns {Promise<CommentFile>} - Promise that resolves to a comment file object
|
|
1096
|
+
* @memberof FAMISDb
|
|
1097
|
+
*/
|
|
1098
|
+
getCommentFile(fileUid: string): Promise<InvoiceCommentFile | null>;
|
|
1099
|
+
/**
|
|
1100
|
+
* Represents a row in the public.core_account_emails table.
|
|
1101
|
+
*
|
|
1102
|
+
* @interface CoreAccountEmail
|
|
1103
|
+
* @property {string} uid - The unique identifier for the account email.
|
|
1104
|
+
* @property {number} core_id - The core ID associated with the account email.
|
|
1105
|
+
* @property {string} account_number - The account number associated with the email.
|
|
1106
|
+
* @property {string} email - The email address associated with the account.
|
|
1107
|
+
* @property {Date | null} [created] - The timestamp when the account email was created. Nullable.
|
|
1108
|
+
* @property {Date | null} [deleted] - The timestamp when the account email was deleted. Nullable.
|
|
1109
|
+
*/
|
|
1110
|
+
/**
|
|
1111
|
+
* Get additional delivery email to an expense accounts by uid
|
|
1112
|
+
* @param {string} uid - additional delivery email record uid
|
|
1113
|
+
* @returns {Promise<CoreAccountEmail|null>} - Promise that resolves to an account object
|
|
1114
|
+
* @memberof FAMISDb
|
|
1115
|
+
*/
|
|
1116
|
+
getCoreAccountAdditionalEmailByUid(uid: string): Promise<CoreAccountEmail | null>;
|
|
1117
|
+
/**
|
|
1118
|
+
* Get additional delivery emails to expense accounts for a core by core id
|
|
1119
|
+
* @param {number} coreId - Core ID
|
|
1120
|
+
* @returns {Promise<CoreAccountEmail[]|[]>} - Promise that resolves to an account object
|
|
1121
|
+
* @memberof FAMISDb
|
|
1122
|
+
*/
|
|
1123
|
+
getCoreAccountAdditionalEmailsByCoreId(coreId: number): Promise<CoreAccountEmail[] | []>;
|
|
1124
|
+
/**
|
|
1125
|
+
* Get additional delivery emails to expense accounts for a core by account number
|
|
1126
|
+
* @param {string} accountNumber - 13 digit famis account or customernumber
|
|
1127
|
+
* @returns {Promise<CoreAccountEmail[]|[]>} - Promise that resolves to an account object
|
|
1128
|
+
* @memberof FAMISDb
|
|
1129
|
+
*/
|
|
1130
|
+
getCoreAccountAdditionalEmailsByAccount(accountNumber: string): Promise<CoreAccountEmail[] | []>;
|
|
1131
|
+
/**
|
|
1132
|
+
* Get additional delivery emails to expense accounts for a core by core id
|
|
1133
|
+
* and account number
|
|
1134
|
+
* @param {number} coreId - Core ID
|
|
1135
|
+
* @param {string} account - account number
|
|
1136
|
+
* @returns {Promise<CoreAccountEmail[]|[]>} - Promise that resolves to an account object
|
|
1137
|
+
* @memberof FAMISDb
|
|
1138
|
+
*/
|
|
1139
|
+
getCoreAccountAdditionalEmailsByCoreIdAccount(coreId: number, account: string): Promise<CoreAccountEmail[] | []>;
|
|
1140
|
+
/**
|
|
1141
|
+
* Add an additional delivery email to an expense account for a core
|
|
1142
|
+
* @param {CoreAccountEmail} record - core account email delivery record
|
|
1143
|
+
* @returns {Promise<CoreAccountEmail>} - Promise that resolves to an account object
|
|
1144
|
+
* @memberof FAMISDb
|
|
1145
|
+
*/
|
|
1146
|
+
addCoreAccountAdditionalEmail(record: CoreAccountEmail): Promise<CoreAccountEmail | null>;
|
|
1147
|
+
/**
|
|
1148
|
+
* Remove an additional delivery email to an expense account for a core
|
|
1149
|
+
* @param {string} uid - uid for core account email record
|
|
1150
|
+
* @returns {Promise<CoreAccountEmail>} - Promise that resolves to an account object
|
|
1151
|
+
* @memberof FAMISDb
|
|
1152
|
+
*/
|
|
1153
|
+
removeCoreAccountAdditionalEmail(uid: string): Promise<CoreAccountEmail | null>;
|
|
1154
|
+
}
|
|
1155
|
+
export default FAMISDb;
|