Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove old banks keys #899

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions src/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ 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',
Expand All @@ -30,10 +28,6 @@ export const SCRAPERS = {
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],
Expand All @@ -54,10 +48,6 @@ export const SCRAPERS = {
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],
Expand Down Expand Up @@ -96,7 +86,13 @@ export const SCRAPERS = {
},
[CompanyTypes.oneZero]: {
name: 'One Zero',
loginFields: ['email', PASSWORD_FIELD, 'otpCodeRetriever', 'phoneNumber', 'otpLongTermToken'],
loginFields: [
'email',
PASSWORD_FIELD,
'otpCodeRetriever',
'phoneNumber',
'otpLongTermToken',
],
},
[CompanyTypes.behatsdaa]: {
name: 'Behatsdaa',
Expand Down
8 changes: 0 additions & 8 deletions src/scrapers/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ export default function createScraper(options: ScraperOptions): Scraper<ScraperC
switch (options.companyId) {
case CompanyTypes.hapoalim:
return new HapoalimScraper(options);
case CompanyTypes.hapoalimBeOnline:
// eslint-disable-next-line no-console
console.warn("hapoalimBeOnline is deprecated, use 'hapoalim' instead");
return new HapoalimScraper(options);
case CompanyTypes.leumi:
return new LeumiScraper(options);
case CompanyTypes.beyahadBishvilha:
Expand All @@ -42,10 +38,6 @@ export default function createScraper(options: ScraperOptions): Scraper<ScraperC
return new OtsarHahayalScraper(options);
case CompanyTypes.visaCal:
return new VisaCalScraper(options);
case CompanyTypes.leumiCard:
// eslint-disable-next-line no-console
console.warn("leumiCard is deprecated, use 'max' instead");
return new MaxScraper(options);
case CompanyTypes.max:
return new MaxScraper(options);
case CompanyTypes.isracard:
Expand Down
Loading