Update CBS Mobile App codebase

This commit is contained in:
Abin Toppo
2026-09-21 13:21:25 +05:30
parent 58af541536
commit 2dcb10775c
339 changed files with 26750 additions and 16767 deletions
+102 -2
View File
@@ -1,8 +1,63 @@
export const endpoints = {
/** Unauthenticated by necessity — between them these produce a session. */
registration: {
start: '/registration',
verifyOtp: '/registration/verify-otp',
mpin: '/registration/mpin',
},
crypto: {
publicKey: '/crypto/public-key',
},
/**
* Server-driven feature switches. Deliberately callable without a session —
* the sign-in screen's own controls are gated, so this has to resolve before
* anyone has signed in.
*/
features: {
config: '/features/config',
},
auth: {
login: '/auth/login',
verifyOtp: '/auth/verify-otp',
setupMpin: '/auth/setup-mpin',
me: '/auth/me',
logout: '/auth/logout',
},
accounts: {
/**
* Every account on the signed-in profile. No parameters — the profile comes
* entirely from the session. This is the only endpoint that returns a full
* account number rather than a masked one.
*/
list: '/accounts',
mmid: '/accounts/mmid',
/**
* A page of ledger entries for one account. Takes the full account number
* from `list` above, and an optional `fromDate`/`toDate` pair that the
* bank rejects unless both are given or neither is.
*/
statement: '/accounts/statement',
/**
* The same range `statement` pages through, as one PDF. Takes the identical
* `accountNumber` and optional `fromDate`/`toDate` pair and no
* `page`/`size` — the whole range becomes one document. Answers
* `application/pdf`, not the JSON envelope every other endpoint returns.
*/
statementExport: '/accounts/statement/export',
/**
* The last 10 entries as a short PDF, led by the current available balance.
* `accountNumber` only — no date range, and no envelope.
*/
miniStatement: '/accounts/mini-statement',
/**
* One deposit's terms, by `accountNumber` query parameter. Takes the full
* number from `list` above — the masked form every other endpoint returns
* will not resolve.
*/
depositDetail: '/accounts/deposits/detail',
},
beneficiaries: {
list: '/beneficiaries',
save: '/beneficiaries',
validate: '/beneficiaries/validate',
},
dashboard: {
summary: '/dashboard/summary',
@@ -33,6 +88,51 @@ export const endpoints = {
requests: '/services/requests',
chat: '/services/chat',
},
/**
* Declares a cheque before it is presented. Write-only: the bank is the
* system of record and keeps no client-side copy, so there is nothing to
* list or fetch back — `referenceId` in the response is the only handle.
*/
positivePay: {
register: '/positive-pay',
/**
* Checks the bank does *not* already hold this cheque, before the customer
* fills in the full registration form. "Not found" is the happy path here
* and answers 200 with a null `data`; a cheque already on file is refused
* with `CHEQUE_ALREADY_REGISTERED`.
*/
verify: '/positive-pay/verify',
},
/**
* Stopping a cheque already declared under Positive Pay.
*
* `verify` resolves to the same core-banking lookup as
* `positivePay.verify` — what differs is which answer is good news. There,
* finding the cheque is a rejection; here it is the whole point, and the
* cheque's own detail comes back so the customer can confirm what they are
* about to stop. A cheque that never went through `positivePay.register`
* does not exist to either of these.
*/
cheque: {
verify: '/check/verify',
stopPayment: '/check/stop-payment',
},
/**
* Cheque book issuance — the one cheque journey the bank keeps a history
* for, unlike Positive Pay and stop payment above.
*
* `charges` quotes the fee before the customer commits to `issue`, the same
* preview-then-act convention as `positivePay.verify`. `issue` is
* synchronous: the serial range comes back in its own response, so there is
* no pending state and nothing to poll. `issue` and `list` are the same
* path under different methods, named apart because the screens reach for
* one or the other and a shared constant reads like a copy-paste slip.
*/
chequeBook: {
charges: '/cheque-book/charges',
issue: '/cheque-book',
list: '/cheque-book',
},
loans: {
products: '/loans/products',
active: '/loans/active',