Skip to content
Merged
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: 18 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: CI
on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- run: npm run build
- run: npx tsc --noEmit
72 changes: 36 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 20 additions & 2 deletions src/lib/api/accountMapper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import apiClient from './client'
import type { BeneficiaryEntry, ApiConfig } from '@/modules/account-mapper/types'

export const lookupBeneficiary = async (beneficiaryId: string) => {
const response = await apiClient.get(`/beneficiary/${beneficiaryId}`)
Expand All @@ -7,8 +8,25 @@ export const lookupBeneficiary = async (beneficiaryId: string) => {

export const updateBeneficiary = async (
beneficiaryId: string,
data: { financialInstitution: string; financialAddress: string; paymentModality: string },
data: { financialInstitution: string; financialAddress: string; paymentModality: string; bbic?: string },
) => {
const response = await apiClient.put(`/beneficiary/${beneficiaryId}`, data)
const response = await apiClient.put('/identityAccountMapper/beneficiary', {
beneficiaryId,
...data,
})
return response.data
}

// No backend endpoint deployed yet for bulk register/update — logs the
// request shape so operators can verify the payload, then resolves as if
// the call succeeded.
export const submitBeneficiaries = async (
mode: 'register' | 'update',
beneficiaries: BeneficiaryEntry[],
config: ApiConfig,
) => {
const payload = { mode, beneficiaries, config }
console.log(`[mock] ${mode === 'register' ? 'POST' : 'PUT'} /identityAccountMapper/beneficiary`, payload)
await new Promise((resolve) => setTimeout(resolve, 800))
return { message: `${beneficiaries.length} beneficiary(ies) ${mode === 'register' ? 'registered' : 'updated'} successfully` }
}
3 changes: 2 additions & 1 deletion src/lib/api/paymentHub.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import apiClient from './client'
import type { MainBatch } from '@/modules/payment-hub/types'

export const fetchMainBatches = async () => {
export const fetchMainBatches = async (): Promise<{ data: MainBatch[] }> => {
const response = await apiClient.get('/batches')
return { data: response.data.data }
}
Expand Down
Loading
Loading