mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-09 07:25:19 +02:00
add worker service
This commit is contained in:
parent
e139df7a7d
commit
f612971efe
3 changed files with 20 additions and 0 deletions
|
@ -28,6 +28,8 @@ import {
|
|||
LoanBalanceSyncStrategy,
|
||||
PlaidETL,
|
||||
PlaidService,
|
||||
TellerETL,
|
||||
TellerService,
|
||||
SecurityPricingProcessor,
|
||||
SecurityPricingService,
|
||||
TransactionBalanceSyncStrategy,
|
||||
|
@ -55,6 +57,7 @@ import logger from './logger'
|
|||
import prisma from './prisma'
|
||||
import plaid from './plaid'
|
||||
import finicity from './finicity'
|
||||
import teller from './teller'
|
||||
import postmark from './postmark'
|
||||
import stripe from './stripe'
|
||||
import env from '../../env'
|
||||
|
@ -124,11 +127,22 @@ const finicityService = new FinicityService(
|
|||
env.NX_FINICITY_ENV === 'sandbox'
|
||||
)
|
||||
|
||||
const tellerService = new TellerService(
|
||||
logger.child({ service: 'TellerService' }),
|
||||
prisma,
|
||||
teller,
|
||||
new TellerETL(logger.child({ service: 'TellerETL' }), prisma, teller, cryptoService),
|
||||
cryptoService,
|
||||
'',
|
||||
env.NX_TELLER_ENV === 'sandbox'
|
||||
)
|
||||
|
||||
// account-connection
|
||||
|
||||
const accountConnectionProviderFactory = new AccountConnectionProviderFactory({
|
||||
plaid: plaidService,
|
||||
finicity: finicityService,
|
||||
teller: tellerService,
|
||||
})
|
||||
|
||||
const transactionStrategy = new TransactionBalanceSyncStrategy(
|
||||
|
|
5
apps/workers/src/app/lib/teller.ts
Normal file
5
apps/workers/src/app/lib/teller.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { TellerApi } from '@maybe-finance/teller-api'
|
||||
|
||||
const teller = new TellerApi()
|
||||
|
||||
export default teller
|
|
@ -17,6 +17,7 @@ const envSchema = z.object({
|
|||
|
||||
NX_TELLER_SIGNING_SECRET: z.string().default('REPLACE_THIS'),
|
||||
NX_TELLER_APP_ID: z.string().default('REPLACE_THIS'),
|
||||
NX_TELLER_ENV: z.string().default('sandbox'),
|
||||
|
||||
NX_SENTRY_DSN: z.string().optional(),
|
||||
NX_SENTRY_ENV: z.string().optional(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue