feat: accounting integration (D27), SMS relay driver (D26), rebuild user apps
- Add Tahesab/Zarrin accounting sync module with admin panel UI - Add SMS relay driver as default provider, refactor SMS into driver pattern - Update customer services, orders, products, and catalog queries - Rebuild user-app and user-app-v2 dist assets - Add Prisma migration for accounting tables - Update docker-compose and env examples - Update parity docs (DECISIONS, ISSUES, PROGRESS) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a72fa607a5
commit
19d490e790
@@ -279,6 +279,15 @@ export interface ReportBalance {
|
||||
arz: string;
|
||||
mandeh: string;
|
||||
}
|
||||
/** GET /customer/me/accounting-balance. Signed like the app: positive = owes. */
|
||||
export interface AccountingBalance {
|
||||
source: 'accounting' | 'stored' | 'none'
|
||||
gold: string | null
|
||||
rial: string | null
|
||||
at: string | null
|
||||
provider: string | null
|
||||
}
|
||||
|
||||
export const api = {
|
||||
listProducts: () => request<ProductSummary[]>('/catalog/products'),
|
||||
/**
|
||||
@@ -307,6 +316,8 @@ export const api = {
|
||||
// /customers/:id, /:id/orders and /:id/ledger-entries, which took the id from
|
||||
// the URL and let anyone read anyone (SEC-08).
|
||||
getMe: () => request<CustomerDetail>('/customer/me'),
|
||||
/** D27 §12 — this customer's balance, read from the accounting software on every call. */
|
||||
getAccountingBalance: () => request<AccountingBalance>('/customer/me/accounting-balance'),
|
||||
getMyOrders: () => request<OrderDetail[]>('/customer/me/orders'),
|
||||
getMyLedgerEntries: () => request<LedgerEntrySummary[]>('/customer/me/ledger-entries'),
|
||||
createOrder: (dto: CreateOrderDto) => request<OrderSummary>('/orders', { method: 'POST', body: JSON.stringify(dto) }),
|
||||
|
||||
Reference in New Issue
Block a user