feat(borç): borç takibi backend (ölçümler, taksit planları, yol haritası, dönem borcu, içe aktarma)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DebtImportRow } from "./DebtImportRow";
|
||||
|
||||
export type DebtImportReport = { committed: boolean, rows: Array<DebtImportRow>, errors: Array<string>, };
|
||||
@@ -0,0 +1,11 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DebtImportRow = {
|
||||
/**
|
||||
* `snapshot` | `installment` | `target`
|
||||
*/
|
||||
kind: string, label: string, amount: number,
|
||||
/**
|
||||
* `new` | `exists` | `update` | `error`
|
||||
*/
|
||||
status: string, message: string | null, };
|
||||
@@ -0,0 +1,11 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DebtSnapshot = { id: string, date: string, kmh: number, positive_balance: number, card_balance: number, remaining_installments: number,
|
||||
/**
|
||||
* Hesaplanır: KMH + kart + kalan taksit − artı bakiye
|
||||
*/
|
||||
total: number,
|
||||
/**
|
||||
* Bir önceki ölçüme göre
|
||||
*/
|
||||
change: number | null, note: string | null, source: string, version: number, };
|
||||
@@ -0,0 +1,11 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DebtSnapshotRequest = {
|
||||
/**
|
||||
* `"YYYY-MM-DD"`
|
||||
*/
|
||||
date?: string, kmh: number, positive_balance: number, card_balance: number, remaining_installments: number,
|
||||
/**
|
||||
* Boş metin → notu kaldır
|
||||
*/
|
||||
note?: string, version?: number, };
|
||||
@@ -0,0 +1,35 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DebtSnapshot } from "./DebtSnapshot";
|
||||
import type { DebtTarget } from "./DebtTarget";
|
||||
import type { InstallmentPlan } from "./InstallmentPlan";
|
||||
import type { MonthLoad } from "./MonthLoad";
|
||||
|
||||
export type DebtSummary = {
|
||||
/**
|
||||
* En yeni önce
|
||||
*/
|
||||
snapshots: Array<DebtSnapshot>, latest: DebtSnapshot | null,
|
||||
/**
|
||||
* Son ölçüm − önceki ayın son ölçümü (eksi → azaldı)
|
||||
*/
|
||||
change_vs_last_month: number | null,
|
||||
/**
|
||||
* İlk ölçüm (yolculuğun başı)
|
||||
*/
|
||||
start: DebtSnapshot | null,
|
||||
/**
|
||||
* 0..1
|
||||
*/
|
||||
progress: number | null,
|
||||
/**
|
||||
* `"YYYY-MM"`
|
||||
*/
|
||||
estimated_end: string | null, installments: Array<InstallmentPlan>, targets: Array<DebtTarget>,
|
||||
/**
|
||||
* Bu ay dahil 6 ay
|
||||
*/
|
||||
schedule: Array<MonthLoad>,
|
||||
/**
|
||||
* Bu ay (`"YYYY-MM"`)
|
||||
*/
|
||||
this_month: string, };
|
||||
@@ -0,0 +1,11 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type DebtTarget = {
|
||||
/**
|
||||
* `"YYYY-MM"`
|
||||
*/
|
||||
month: string,
|
||||
/**
|
||||
* Ay sonu toplam borç hedefi (kuruş)
|
||||
*/
|
||||
closing_target: number, };
|
||||
@@ -0,0 +1,4 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
import type { DebtTarget } from "./DebtTarget";
|
||||
|
||||
export type DebtTargetsRequest = { targets: Array<DebtTarget>, };
|
||||
@@ -0,0 +1,15 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type InstallmentPlan = { id: string, merchant: string, total_amount: number, monthly_amount: number, total_count: number,
|
||||
/**
|
||||
* `"YYYY-MM"`
|
||||
*/
|
||||
first_month: string, last_month: string,
|
||||
/**
|
||||
* Bu ay dahil ekstreye gelen
|
||||
*/
|
||||
paid_count: number, remaining_count: number,
|
||||
/**
|
||||
* Kalan taksitlerin toplamı (bu aydan sonra)
|
||||
*/
|
||||
remaining_amount: number, version: number, };
|
||||
@@ -0,0 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type InstallmentRequest = { merchant?: string, total_amount: number, monthly_amount: number, total_count?: number,
|
||||
/**
|
||||
* `"YYYY-MM"`
|
||||
*/
|
||||
first_month?: string, version?: number, };
|
||||
@@ -0,0 +1,3 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type MonthLoad = { month: string, amount: number, };
|
||||
@@ -0,0 +1,7 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type OpeningDebtRequest = {
|
||||
/**
|
||||
* Kuruş; `null` → son ölçümden
|
||||
*/
|
||||
amount: number | null, };
|
||||
@@ -0,0 +1,23 @@
|
||||
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||
|
||||
export type PeriodDebt = {
|
||||
/**
|
||||
* Ay başı toplam borç
|
||||
*/
|
||||
opening_total: number | null,
|
||||
/**
|
||||
* `manual` | `snapshot` | `none`
|
||||
*/
|
||||
opening_source: string, opening_date: string | null,
|
||||
/**
|
||||
* Devreden borç = ay başı toplam − kalan taksitler
|
||||
*/
|
||||
carried: number | null, installment_load: number,
|
||||
/**
|
||||
* Borç ödemesi (dönemin birikim hedefi)
|
||||
*/
|
||||
payment: number,
|
||||
/**
|
||||
* Ay başı − borç ödemesi − taksit yükü
|
||||
*/
|
||||
closing_target: number | null, roadmap_target: number | null, latest_date: string | null, latest_total: number | null, };
|
||||
Reference in New Issue
Block a user