@nemphi/sdk 0.2.5025 → 0.2.5089
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 +50 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/ui-spec.d.ts +143 -0
- package/dist/ui-spec.d.ts.map +1 -0
- package/dist/ui-spec.js +6 -0
- package/dist/ui-spec.js.map +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
*/
|
|
11
11
|
export * from "./block-kit.js";
|
|
12
12
|
export * from "./block-kit-state.js";
|
|
13
|
+
export * from "./ui-spec.js";
|
|
13
14
|
export * from "./reactions.js";
|
|
14
15
|
import type { MessageBlock } from "./block-kit.js";
|
|
16
|
+
import type { UISpec } from "./ui-spec.js";
|
|
15
17
|
/**
|
|
16
18
|
* Any value `JSON.parse` can produce. The API speaks JSON, so a field the
|
|
17
19
|
* wire leaves open (`metadata`, a stored `template`, a tool's
|
|
@@ -1420,6 +1422,47 @@ export interface InvitePreview {
|
|
|
1420
1422
|
role_name?: string;
|
|
1421
1423
|
expires_at: string;
|
|
1422
1424
|
}
|
|
1425
|
+
export type BudgetSection = "income" | "fixed" | "variable" | "savings" | "debt";
|
|
1426
|
+
export type BudgetFrequency = "monthly" | "weekly" | "biweekly" | "quarterly" | "yearly" | "once";
|
|
1427
|
+
/** One month of a budget line (`budget.overview`). Amounts are in cents. */
|
|
1428
|
+
export interface BudgetMonth {
|
|
1429
|
+
/** YYYY-MM. */
|
|
1430
|
+
month: string;
|
|
1431
|
+
plan_cents: number;
|
|
1432
|
+
actual_cents: number;
|
|
1433
|
+
/** Where the actual comes from: a person's record, the ledger, or nowhere yet. */
|
|
1434
|
+
actual_source: "manual" | "ledger" | "none";
|
|
1435
|
+
/** Whether a person set this month's plan instead of the spread one. */
|
|
1436
|
+
plan_set: boolean;
|
|
1437
|
+
/** Whether the line counts in this month at all. */
|
|
1438
|
+
open: boolean;
|
|
1439
|
+
}
|
|
1440
|
+
/** A budget line with its twelve months (`budget.overview`). */
|
|
1441
|
+
export interface BudgetLine {
|
|
1442
|
+
id: string;
|
|
1443
|
+
section: BudgetSection;
|
|
1444
|
+
name: string;
|
|
1445
|
+
frequency: BudgetFrequency;
|
|
1446
|
+
amount_cents: number;
|
|
1447
|
+
due_day: number | null;
|
|
1448
|
+
account_code: string | null;
|
|
1449
|
+
account_name: string | null;
|
|
1450
|
+
owner_user_id: string | null;
|
|
1451
|
+
owner_name: string | null;
|
|
1452
|
+
/** YYYY-MM. */
|
|
1453
|
+
starts_on: string;
|
|
1454
|
+
ends_on: string | null;
|
|
1455
|
+
archived: boolean;
|
|
1456
|
+
months: BudgetMonth[];
|
|
1457
|
+
}
|
|
1458
|
+
/** The budget planner's year (`budget.overview`). */
|
|
1459
|
+
export interface BudgetOverview {
|
|
1460
|
+
year: number;
|
|
1461
|
+
today: string;
|
|
1462
|
+
/** Caja y bancos at the close of the day before the year opens. */
|
|
1463
|
+
opening_cash_cents: number;
|
|
1464
|
+
lines: BudgetLine[];
|
|
1465
|
+
}
|
|
1423
1466
|
export interface RecurringDocument {
|
|
1424
1467
|
id: string;
|
|
1425
1468
|
kind: "invoice" | "bill";
|
|
@@ -2230,6 +2273,12 @@ export interface MessagingMessage {
|
|
|
2230
2273
|
body: string;
|
|
2231
2274
|
/** Block Kit blocks rendered under the body, when the message carries any. */
|
|
2232
2275
|
blocks?: MessageBlock[];
|
|
2276
|
+
/**
|
|
2277
|
+
* The json-render spec an agent's answer drew. When present it is the
|
|
2278
|
+
* message's UI, and `blocks` is its Block Kit reading for readers that
|
|
2279
|
+
* do not draw specs.
|
|
2280
|
+
*/
|
|
2281
|
+
ui?: UISpec;
|
|
2233
2282
|
/** The message carries a live canvas; messages.get_canvas fills it for the reader. */
|
|
2234
2283
|
has_canvas?: boolean;
|
|
2235
2284
|
reply_to_id: string | null;
|
|
@@ -8077,6 +8126,7 @@ export interface NemphiClient {
|
|
|
8077
8126
|
}>;
|
|
8078
8127
|
listPolicies(): Promise<PolicyList>;
|
|
8079
8128
|
listRecurringDocuments(): Promise<RecurringDocument[]>;
|
|
8129
|
+
budgetOverview(year?: number): Promise<BudgetOverview>;
|
|
8080
8130
|
createInvite(input: {
|
|
8081
8131
|
email: string;
|
|
8082
8132
|
role: "admin" | "member" | "viewer" | "custom";
|