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