-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.json
68 lines (59 loc) · 1.48 KB
/
index.json
1
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
"use strict";
const O_o = String.raw`
__ _
_____/ /_ ____ _____ (_)
/ __ / __ \/ __ `/ __ \/ /
(__ ) /_/ / /_/ / /_/ / /
/____/_.___/\__,_/ .___/_/
/_/
`;
const Hapi = require('@hapi/hapi');
const Boom = require('@hapi/boom');
const axios = require('axios');
const config = require('./config.json');
const server = Hapi.server({
host: config.AUTH_PROXY_HOST,
port: config.AUTH_PROXY_PORT
});
const requestHandlers = {
userKey: userKey,
userBarcode: userBarcode,
holds: holds,
courtesy: courtesy,
overdue: overdue,
checkCharge: checkCharge,
checkHold: checkHold,
fee: fee
});
const api = axios.create({
baseURL: ILSWS_BASE_URI,
timeout: config.ILWS_TIMEOUT || 20000,
headers: {
'sd-originating-app-id': ILSWS_ORIGINATING_APP_ID,
'x-sirs-clientID': config.ILSWS_CLIENTID,
'Accept': 'application/json'
}
});
const PCODE1_CATEGORY = `category${config.PCODE1_SOURCE_CATEGORY.padStart(2, '0')}`;
const PCODE2_CATEGORY = `category${config.PCODE2_SOURCE_CATEGORY.padStart(2, '0')}`;
const PCODE3_CATEGORY = `category${config.PCODE3_SOURCE_CATEGORY.padStart(2, '0')}`;
const ILSWS_PATRON_INCLUDE_FIELDS = [
'profile',
'birthDate',
'library',
'alternateID',
'createdDate',
'lastActivityData',
'claimsReturnedCount',
'estimatedOverdueAmount',
'lastName',
'firstName',
'middleName',
'address1',
'barcode',
'standing',
'customInformation',
PCODE1_CATEGORY,
PCODE2_CATEGORY,
PCODE3_CATEGORY
];