@nemphi/sdk 0.2.5025 → 0.2.5079

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1420,6 +1420,47 @@ export interface InvitePreview {
1420
1420
  role_name?: string;
1421
1421
  expires_at: string;
1422
1422
  }
1423
+ export type BudgetSection = "income" | "fixed" | "variable" | "savings" | "debt";
1424
+ export type BudgetFrequency = "monthly" | "weekly" | "biweekly" | "quarterly" | "yearly" | "once";
1425
+ /** One month of a budget line (`budget.overview`). Amounts are in cents. */
1426
+ export interface BudgetMonth {
1427
+ /** YYYY-MM. */
1428
+ month: string;
1429
+ plan_cents: number;
1430
+ actual_cents: number;
1431
+ /** Where the actual comes from: a person's record, the ledger, or nowhere yet. */
1432
+ actual_source: "manual" | "ledger" | "none";
1433
+ /** Whether a person set this month's plan instead of the spread one. */
1434
+ plan_set: boolean;
1435
+ /** Whether the line counts in this month at all. */
1436
+ open: boolean;
1437
+ }
1438
+ /** A budget line with its twelve months (`budget.overview`). */
1439
+ export interface BudgetLine {
1440
+ id: string;
1441
+ section: BudgetSection;
1442
+ name: string;
1443
+ frequency: BudgetFrequency;
1444
+ amount_cents: number;
1445
+ due_day: number | null;
1446
+ account_code: string | null;
1447
+ account_name: string | null;
1448
+ owner_user_id: string | null;
1449
+ owner_name: string | null;
1450
+ /** YYYY-MM. */
1451
+ starts_on: string;
1452
+ ends_on: string | null;
1453
+ archived: boolean;
1454
+ months: BudgetMonth[];
1455
+ }
1456
+ /** The budget planner's year (`budget.overview`). */
1457
+ export interface BudgetOverview {
1458
+ year: number;
1459
+ today: string;
1460
+ /** Caja y bancos at the close of the day before the year opens. */
1461
+ opening_cash_cents: number;
1462
+ lines: BudgetLine[];
1463
+ }
1423
1464
  export interface RecurringDocument {
1424
1465
  id: string;
1425
1466
  kind: "invoice" | "bill";
@@ -8077,6 +8118,7 @@ export interface NemphiClient {
8077
8118
  }>;
8078
8119
  listPolicies(): Promise<PolicyList>;
8079
8120
  listRecurringDocuments(): Promise<RecurringDocument[]>;
8121
+ budgetOverview(year?: number): Promise<BudgetOverview>;
8080
8122
  createInvite(input: {
8081
8123
  email: string;
8082
8124
  role: "admin" | "member" | "viewer" | "custom";