-
Notifications
You must be signed in to change notification settings - Fork 161
/
definitions.ts
120 lines (116 loc) · 3.13 KB
/
definitions.ts
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
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
// NOTICE: avoid changing exported keys as they are part of the public api
export const PASSWORD_FIELD = 'password';
export enum CompanyTypes {
hapoalim = 'hapoalim',
hapoalimBeOnline = 'hapoalimBeOnline',
beinleumi = 'beinleumi',
union = 'union',
amex = 'amex',
isracard = 'isracard',
visaCal = 'visaCal',
max = 'max',
leumiCard = 'leumiCard',
otsarHahayal = 'otsarHahayal',
discount = 'discount',
mercantile = 'mercantile',
mizrahi = 'mizrahi',
leumi = 'leumi',
massad = 'massad',
yahav = 'yahav',
behatsdaa = 'behatsdaa',
beyahadBishvilha = 'beyahadBishvilha',
oneZero = 'oneZero',
pagi = 'pagi',
}
export const SCRAPERS = {
[CompanyTypes.hapoalim]: {
name: 'Bank Hapoalim',
loginFields: ['userCode', PASSWORD_FIELD],
},
[CompanyTypes.hapoalimBeOnline]: { // TODO remove in Major version
name: 'Bank Hapoalim',
loginFields: ['userCode', PASSWORD_FIELD],
},
[CompanyTypes.leumi]: {
name: 'Bank Leumi',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.mizrahi]: {
name: 'Mizrahi Bank',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.discount]: {
name: 'Discount Bank',
loginFields: ['id', PASSWORD_FIELD, 'num'],
},
[CompanyTypes.mercantile]: {
name: 'Mercantile Bank',
loginFields: ['id', PASSWORD_FIELD, 'num'],
},
[CompanyTypes.otsarHahayal]: {
name: 'Bank Otsar Hahayal',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.leumiCard]: { // TODO remove in Major version
name: 'Leumi Card',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.max]: {
name: 'Max',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.visaCal]: {
name: 'Visa Cal',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.isracard]: {
name: 'Isracard',
loginFields: ['id', 'card6Digits', PASSWORD_FIELD],
},
[CompanyTypes.amex]: {
name: 'Amex',
loginFields: ['id', 'card6Digits', PASSWORD_FIELD],
},
[CompanyTypes.union]: {
name: 'Union',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.beinleumi]: {
name: 'Beinleumi',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.massad]: {
name: 'Massad',
loginFields: ['username', PASSWORD_FIELD],
},
[CompanyTypes.yahav]: {
name: 'Bank Yahav',
loginFields: ['username', 'nationalID', PASSWORD_FIELD],
},
[CompanyTypes.beyahadBishvilha]: {
name: 'Beyahad Bishvilha',
loginFields: ['id', PASSWORD_FIELD],
},
[CompanyTypes.oneZero]: {
name: 'One Zero',
loginFields: ['email', PASSWORD_FIELD, 'otpCodeRetriever', 'phoneNumber', 'otpLongTermToken'],
},
[CompanyTypes.behatsdaa]: {
name: 'Behatsdaa',
loginFields: ['id', PASSWORD_FIELD],
},
[CompanyTypes.pagi]: {
name: 'Pagi',
loginFields: ['username', PASSWORD_FIELD],
},
};
export enum ScraperProgressTypes {
Initializing = 'INITIALIZING',
StartScraping = 'START_SCRAPING',
LoggingIn = 'LOGGING_IN',
LoginSuccess = 'LOGIN_SUCCESS',
LoginFailed = 'LOGIN_FAILED',
ChangePassword = 'CHANGE_PASSWORD',
EndScraping = 'END_SCRAPING',
Terminating = 'TERMINATING',
}