@robosystems/client 0.3.10 → 0.3.11

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/types.gen.ts CHANGED
@@ -1291,6 +1291,80 @@ export type CreateApiKeyResponse = {
1291
1291
  key: string;
1292
1292
  };
1293
1293
 
1294
+ /**
1295
+ * CreateAgentRequest
1296
+ */
1297
+ export type CreateAgentRequest = {
1298
+ /**
1299
+ * Agent Type
1300
+ *
1301
+ * 'customer' | 'vendor' | 'employee' | 'owner' | 'supplier' | 'government' | 'lender' | 'self' | 'other'
1302
+ */
1303
+ agent_type: string;
1304
+ /**
1305
+ * Name
1306
+ */
1307
+ name: string;
1308
+ /**
1309
+ * Legal Name
1310
+ */
1311
+ legal_name?: string | null;
1312
+ /**
1313
+ * Tax Id
1314
+ */
1315
+ tax_id?: string | null;
1316
+ /**
1317
+ * Registration Number
1318
+ */
1319
+ registration_number?: string | null;
1320
+ /**
1321
+ * Duns
1322
+ */
1323
+ duns?: string | null;
1324
+ /**
1325
+ * Lei
1326
+ */
1327
+ lei?: string | null;
1328
+ /**
1329
+ * Email
1330
+ */
1331
+ email?: string | null;
1332
+ /**
1333
+ * Phone
1334
+ */
1335
+ phone?: string | null;
1336
+ /**
1337
+ * Address
1338
+ */
1339
+ address?: {
1340
+ [key: string]: unknown;
1341
+ } | null;
1342
+ /**
1343
+ * Source
1344
+ *
1345
+ * 'quickbooks' | 'xero' | 'plaid' | 'native'
1346
+ */
1347
+ source?: string;
1348
+ /**
1349
+ * External Id
1350
+ */
1351
+ external_id?: string | null;
1352
+ /**
1353
+ * Is Active
1354
+ */
1355
+ is_active?: boolean;
1356
+ /**
1357
+ * Is 1099 Recipient
1358
+ */
1359
+ is_1099_recipient?: boolean;
1360
+ /**
1361
+ * Metadata
1362
+ */
1363
+ metadata?: {
1364
+ [key: string]: unknown;
1365
+ };
1366
+ };
1367
+
1294
1368
  /**
1295
1369
  * CreateCheckoutRequest
1296
1370
  *
@@ -1320,66 +1394,188 @@ export type CreateCheckoutRequest = {
1320
1394
  };
1321
1395
 
1322
1396
  /**
1323
- * CreateClosingEntryOperation
1397
+ * CreateConnectionRequest
1324
1398
  *
1325
- * CQRS-shaped body for `POST /operations/create-closing-entry`.
1399
+ * Request to create a new connection.
1400
+ */
1401
+ export type CreateConnectionRequest = {
1402
+ /**
1403
+ * Provider
1404
+ *
1405
+ * Connection provider type
1406
+ */
1407
+ provider: 'sec' | 'quickbooks';
1408
+ /**
1409
+ * Entity Id
1410
+ *
1411
+ * Entity identifier. Required for QuickBooks, optional for SEC (SEC creates the entity from filing data).
1412
+ */
1413
+ entity_id?: string | null;
1414
+ sec_config?: SecConnectionConfig | null;
1415
+ quickbooks_config?: QuickBooksConnectionConfig | null;
1416
+ };
1417
+
1418
+ /**
1419
+ * CreateEventBlockRequest
1326
1420
  *
1327
- * `structure_id` moves into the body so REST + MCP share a single body
1328
- * type via the registrar.
1421
+ * Write surface for a single business event.
1329
1422
  */
1330
- export type CreateClosingEntryOperation = {
1423
+ export type CreateEventBlockRequest = {
1331
1424
  /**
1332
- * Posting Date
1425
+ * Event Type
1333
1426
  *
1334
- * Posting date for the entry
1427
+ * Open vocabulary: 'invoice_issued' | 'contract_signed' | 'bank_transaction' | ...
1335
1428
  */
1336
- posting_date: string;
1429
+ event_type: string;
1337
1430
  /**
1338
- * Period Start
1431
+ * Event Category
1339
1432
  *
1340
- * Period start
1433
+ * REA economic classification. One of: sales, purchase, financing, payroll, treasury, adjustment, recognition, other.
1341
1434
  */
1342
- period_start: string;
1435
+ event_category: 'sales' | 'purchase' | 'financing' | 'payroll' | 'treasury' | 'adjustment' | 'recognition' | 'other';
1343
1436
  /**
1344
- * Period End
1437
+ * Agent Id
1345
1438
  *
1346
- * Period end
1439
+ * Counterparty agent id
1347
1440
  */
1348
- period_end: string;
1441
+ agent_id?: string | null;
1349
1442
  /**
1350
- * Memo
1443
+ * Resource Type
1351
1444
  *
1352
- * Override memo
1445
+ * REA resource kind. One of: goods, services, money, right, obligation, information, labor.
1353
1446
  */
1354
- memo?: string | null;
1447
+ resource_type?: 'goods' | 'services' | 'money' | 'right' | 'obligation' | 'information' | 'labor' | null;
1355
1448
  /**
1356
- * Structure Id
1449
+ * Resource Element Id
1357
1450
  *
1358
- * Schedule structure the closing entry is derived from.
1451
+ * Specific element being exchanged, if applicable
1359
1452
  */
1360
- structure_id: string;
1453
+ resource_element_id?: string | null;
1454
+ /**
1455
+ * Occurred At
1456
+ *
1457
+ * When the event happened in the real world
1458
+ */
1459
+ occurred_at: string;
1460
+ /**
1461
+ * Effective At
1462
+ *
1463
+ * Accounting recognition date, if different from occurred_at
1464
+ */
1465
+ effective_at?: string | null;
1466
+ /**
1467
+ * Source
1468
+ *
1469
+ * 'quickbooks' | 'xero' | 'plaid' | 'native' | 'scheduled' | ...
1470
+ */
1471
+ source: string;
1472
+ /**
1473
+ * External Id
1474
+ *
1475
+ * Source-system dedup key. (source, external_id) is enforced unique when external_id is provided, so retries from external adapters are idempotent at the DB level.
1476
+ */
1477
+ external_id?: string | null;
1478
+ /**
1479
+ * External Url
1480
+ *
1481
+ * Deep link back to source-system record
1482
+ */
1483
+ external_url?: string | null;
1484
+ /**
1485
+ * Amount
1486
+ *
1487
+ * Cents, signed
1488
+ */
1489
+ amount?: number | null;
1490
+ /**
1491
+ * Currency
1492
+ *
1493
+ * ISO 4217 currency code
1494
+ */
1495
+ currency?: string;
1496
+ /**
1497
+ * Description
1498
+ */
1499
+ description?: string | null;
1500
+ /**
1501
+ * Metadata
1502
+ *
1503
+ * Event-type-specific payload
1504
+ */
1505
+ metadata?: {
1506
+ [key: string]: unknown;
1507
+ };
1508
+ /**
1509
+ * Dimension Ids
1510
+ */
1511
+ dimension_ids?: Array<string>;
1512
+ /**
1513
+ * Apply Handlers
1514
+ *
1515
+ * When True, resolves the event_type to a handler (Python registry first, then DSL) and fires it atomically with event creation.
1516
+ */
1517
+ apply_handlers?: boolean;
1361
1518
  };
1362
1519
 
1363
1520
  /**
1364
- * CreateConnectionRequest
1365
- *
1366
- * Request to create a new connection.
1521
+ * CreateEventHandlerRequest
1367
1522
  */
1368
- export type CreateConnectionRequest = {
1523
+ export type CreateEventHandlerRequest = {
1369
1524
  /**
1370
- * Provider
1371
- *
1372
- * Connection provider type
1525
+ * Name
1373
1526
  */
1374
- provider: 'sec' | 'quickbooks';
1527
+ name: string;
1375
1528
  /**
1376
- * Entity Id
1529
+ * Description
1530
+ */
1531
+ description?: string | null;
1532
+ /**
1533
+ * Event Type
1534
+ */
1535
+ event_type: string;
1536
+ /**
1537
+ * Event Category
1538
+ */
1539
+ event_category?: string | null;
1540
+ /**
1541
+ * Match Source
1542
+ */
1543
+ match_source?: string | null;
1544
+ /**
1545
+ * Match Agent Type
1546
+ */
1547
+ match_agent_type?: string | null;
1548
+ /**
1549
+ * Match Resource Type
1550
+ */
1551
+ match_resource_type?: string | null;
1552
+ /**
1553
+ * Match Metadata Expression
1377
1554
  *
1378
- * Entity identifier. Required for QuickBooks, optional for SEC (SEC creates the entity from filing data).
1555
+ * JSONPath-style equality map, e.g. {"metadata.category": "payroll"}
1379
1556
  */
1380
- entity_id?: string | null;
1381
- sec_config?: SecConnectionConfig | null;
1382
- quickbooks_config?: QuickBooksConnectionConfig | null;
1557
+ match_metadata_expression?: {
1558
+ [key: string]: unknown;
1559
+ } | null;
1560
+ transaction_template: TransactionTemplate;
1561
+ /**
1562
+ * Priority
1563
+ */
1564
+ priority?: number;
1565
+ /**
1566
+ * Is Active
1567
+ */
1568
+ is_active?: boolean;
1569
+ /**
1570
+ * Origin
1571
+ */
1572
+ origin?: 'hub' | 'tenant';
1573
+ /**
1574
+ * Metadata
1575
+ */
1576
+ metadata?: {
1577
+ [key: string]: unknown;
1578
+ };
1383
1579
  };
1384
1580
 
1385
1581
  /**
@@ -1453,77 +1649,6 @@ export type CreateInformationBlockRequest = {
1453
1649
  };
1454
1650
  };
1455
1651
 
1456
- /**
1457
- * CreateJournalEntryRequest
1458
- *
1459
- * Create a new journal entry with balanced line items.
1460
- *
1461
- * Defaults to `status='draft'` for ongoing native writes (the normal
1462
- * workflow: draft → review → post via close-period). Pass
1463
- * `status='posted'` for historical data import where entries represent
1464
- * already-happened business events that don't need review.
1465
- *
1466
- * Total debit amount must equal total credit amount or the request
1467
- * is rejected with 422. `line_items` must contain at least two rows
1468
- * (at least one debit, at least one credit).
1469
- */
1470
- export type CreateJournalEntryRequest = {
1471
- /**
1472
- * Posting Date
1473
- */
1474
- posting_date: string;
1475
- /**
1476
- * Memo
1477
- */
1478
- memo: string;
1479
- /**
1480
- * Line Items
1481
- */
1482
- line_items: Array<JournalEntryLineItemInput>;
1483
- /**
1484
- * Type
1485
- */
1486
- type?: 'standard' | 'adjusting' | 'closing' | 'reversing';
1487
- /**
1488
- * Status
1489
- */
1490
- status?: 'draft' | 'posted';
1491
- /**
1492
- * Transaction Id
1493
- */
1494
- transaction_id?: string | null;
1495
- };
1496
-
1497
- /**
1498
- * CreateManualClosingEntryRequest
1499
- */
1500
- export type CreateManualClosingEntryRequest = {
1501
- /**
1502
- * Posting Date
1503
- *
1504
- * Posting date for the entry
1505
- */
1506
- posting_date: string;
1507
- /**
1508
- * Memo
1509
- *
1510
- * Memo describing the business event (e.g., 'Sale of computer to Vendor X on 3/15')
1511
- */
1512
- memo: string;
1513
- /**
1514
- * Line Items
1515
- *
1516
- * Line items; must balance (total DR = total CR)
1517
- */
1518
- line_items: Array<ManualLineItemRequest>;
1519
- /**
1520
- * Entry Type
1521
- *
1522
- * Entry type: 'closing' (default), 'adjusting', 'standard', 'reversing'
1523
- */
1524
- entry_type?: 'standard' | 'adjusting' | 'closing' | 'reversing';
1525
- };
1526
-
1527
1652
  /**
1528
1653
  * CreateMappingAssociationOperation
1529
1654
  *
@@ -1894,66 +2019,6 @@ export type CreateTaxonomyBlockRequest = {
1894
2019
  };
1895
2020
  };
1896
2021
 
1897
- /**
1898
- * CreateTransactionRequest
1899
- *
1900
- * Create a standalone business-event Transaction.
1901
- *
1902
- * Use this when you want to record a real-world event (invoice, payment,
1903
- * deposit, expense) first and then attach one or more journal entries to
1904
- * it via `create-journal-entry` with the returned `transaction_id`.
1905
- *
1906
- * `amount` is in minor currency units (cents). `type` is free-form but
1907
- * common values are: invoice, payment, bill, expense, deposit, transfer,
1908
- * journal_entry.
1909
- */
1910
- export type CreateTransactionRequest = {
1911
- /**
1912
- * Type
1913
- */
1914
- type: string;
1915
- /**
1916
- * Date
1917
- */
1918
- date: string;
1919
- /**
1920
- * Amount
1921
- */
1922
- amount: number;
1923
- /**
1924
- * Currency
1925
- */
1926
- currency?: string;
1927
- /**
1928
- * Description
1929
- */
1930
- description?: string | null;
1931
- /**
1932
- * Merchant Name
1933
- */
1934
- merchant_name?: string | null;
1935
- /**
1936
- * Reference Number
1937
- */
1938
- reference_number?: string | null;
1939
- /**
1940
- * Number
1941
- */
1942
- number?: string | null;
1943
- /**
1944
- * Category
1945
- */
1946
- category?: string | null;
1947
- /**
1948
- * Due Date
1949
- */
1950
- due_date?: string | null;
1951
- /**
1952
- * Status
1953
- */
1954
- status?: 'pending' | 'posted';
1955
- };
1956
-
1957
2022
  /**
1958
2023
  * CreateViewRequest
1959
2024
  */
@@ -2693,60 +2758,6 @@ export type DetailedTransactionsResponse = {
2693
2758
  };
2694
2759
  };
2695
2760
 
2696
- /**
2697
- * DisposeScheduleRequest
2698
- *
2699
- * Dispose a schedule early — combines truncation with a disposal closing entry.
2700
- *
2701
- * Computes net book value from the schedule's own facts, truncates forward
2702
- * periods, and creates a balanced disposal entry in one atomic operation.
2703
- * Use when an asset is sold or abandoned before the schedule runs to completion.
2704
- */
2705
- export type DisposeScheduleRequest = {
2706
- /**
2707
- * Structure Id
2708
- *
2709
- * Target schedule structure ID.
2710
- */
2711
- structure_id: string;
2712
- /**
2713
- * Disposal Date
2714
- *
2715
- * Last day of the final period (month-end). Forward facts past this date are deleted; the disposal entry is posted on this date.
2716
- */
2717
- disposal_date: string;
2718
- /**
2719
- * Sale Proceeds
2720
- *
2721
- * Cash received from the sale in cents. None or 0 for abandonment (no cash received). If provided, `proceeds_element_id` is required.
2722
- */
2723
- sale_proceeds?: number | null;
2724
- /**
2725
- * Proceeds Element Id
2726
- *
2727
- * Element to debit for sale proceeds (e.g., Cash or AR). Required when sale_proceeds > 0.
2728
- */
2729
- proceeds_element_id?: string | null;
2730
- /**
2731
- * Gain Loss Element Id
2732
- *
2733
- * Element for gain or loss on disposal. Required when net book value > 0 after applying sale proceeds. Optional when asset is fully depreciated (NBV = 0, no gain/loss line needed).
2734
- */
2735
- gain_loss_element_id?: string | null;
2736
- /**
2737
- * Memo
2738
- *
2739
- * Memo for the disposal closing entry.
2740
- */
2741
- memo: string;
2742
- /**
2743
- * Reason
2744
- *
2745
- * Reason for disposal (audit trail).
2746
- */
2747
- reason: string;
2748
- };
2749
-
2750
2761
  /**
2751
2762
  * DocumentDetailResponse
2752
2763
  *
@@ -4931,41 +4942,13 @@ export type McpToolCall = {
4931
4942
  */
4932
4943
  export type McpToolsResponse = {
4933
4944
  /**
4934
- * Tools
4935
- *
4936
- * List of available MCP tools with their schemas
4937
- */
4938
- tools: Array<{
4939
- [key: string]: unknown;
4940
- }>;
4941
- };
4942
-
4943
- /**
4944
- * ManualLineItemRequest
4945
- */
4946
- export type ManualLineItemRequest = {
4947
- /**
4948
- * Element Id
4949
- *
4950
- * Element ID (chart of accounts)
4951
- */
4952
- element_id: string;
4953
- /**
4954
- * Debit Amount
4955
- *
4956
- * Debit in cents
4957
- */
4958
- debit_amount?: number;
4959
- /**
4960
- * Credit Amount
4961
- *
4962
- * Credit in cents
4963
- */
4964
- credit_amount?: number;
4965
- /**
4966
- * Description
4945
+ * Tools
4946
+ *
4947
+ * List of available MCP tools with their schemas
4967
4948
  */
4968
- description?: string | null;
4949
+ tools: Array<{
4950
+ [key: string]: unknown;
4951
+ }>;
4969
4952
  };
4970
4953
 
4971
4954
  /**
@@ -6082,35 +6065,6 @@ export type RestoreBackupOp = {
6082
6065
  verify_after_restore?: boolean;
6083
6066
  };
6084
6067
 
6085
- /**
6086
- * ReverseJournalEntryRequest
6087
- *
6088
- * Reverse a posted journal entry.
6089
- *
6090
- * Creates a new entry whose line items flip the originals
6091
- * (debits → credits, credits → debits), sets `reversal_of` on the new
6092
- * entry to the original's id, marks the original as
6093
- * `status='reversed'`, and posts the reversing entry immediately.
6094
- *
6095
- * This is how accountants correct posted entries — the original stays
6096
- * in the audit trail, the reversal cancels its effect, and a
6097
- * corrected entry can be created separately.
6098
- */
6099
- export type ReverseJournalEntryRequest = {
6100
- /**
6101
- * Entry Id
6102
- */
6103
- entry_id: string;
6104
- /**
6105
- * Posting Date
6106
- */
6107
- posting_date?: string | null;
6108
- /**
6109
- * Memo
6110
- */
6111
- memo?: string | null;
6112
- };
6113
-
6114
6068
  /**
6115
6069
  * SECConnectionConfig
6116
6070
  *
@@ -7476,34 +7430,67 @@ export type TransactionSummaryResponse = {
7476
7430
  };
7477
7431
 
7478
7432
  /**
7479
- * TruncateScheduleOperation
7433
+ * TransactionTemplate
7434
+ *
7435
+ * The handler's output spec — one or more balanced entries to post.
7480
7436
  *
7481
- * CQRS-shaped body for `POST /operations/truncate-schedule`.
7437
+ * Wire shape::
7482
7438
  *
7483
- * Bundles the target schedule's `structure_id` with the update payload so
7484
- * the single-body signature matches the registrar/MCP contract. The REST
7485
- * handler, GraphQL resolver, and MCP tool all resolve to the same
7486
- * `cmd_truncate_schedule(session, body, created_by=...)`.
7439
+ * {
7440
+ * "transactions": [{
7441
+ * "entry_template": {
7442
+ * "debit": {"element_id": "elem_...", "amount": "{{ event.amount }}"},
7443
+ * "credit": {"element_id": "elem_...", "amount": "{{ event.amount }}"}
7444
+ * }
7445
+ * }]
7446
+ * }
7487
7447
  */
7488
- export type TruncateScheduleOperation = {
7448
+ export type TransactionTemplate = {
7489
7449
  /**
7490
- * New End Date
7450
+ * Transactions
7491
7451
  *
7492
- * New last-covered date for the schedule. Facts with period_start > this date are deleted (along with any stale draft entries they produced). Historical facts (already posted) are preserved.
7452
+ * At least one debit/credit entry pair
7493
7453
  */
7494
- new_end_date: string;
7454
+ transactions: Array<TransactionTemplateItem>;
7455
+ };
7456
+
7457
+ /**
7458
+ * TransactionTemplateEntry
7459
+ *
7460
+ * One balanced entry (debit + credit pair) — the inner shape of entry_template.
7461
+ */
7462
+ export type TransactionTemplateEntry = {
7463
+ debit: TransactionTemplateLeg;
7464
+ credit: TransactionTemplateLeg;
7465
+ };
7466
+
7467
+ /**
7468
+ * TransactionTemplateItem
7469
+ *
7470
+ * One item in the transactions list — wraps entry_template to match the DSL shape.
7471
+ */
7472
+ export type TransactionTemplateItem = {
7473
+ entry_template: TransactionTemplateEntry;
7474
+ };
7475
+
7476
+ /**
7477
+ * TransactionTemplateLeg
7478
+ *
7479
+ * One side of a journal entry leg (debit or credit).
7480
+ */
7481
+ export type TransactionTemplateLeg = {
7495
7482
  /**
7496
- * Reason
7483
+ * Element Id
7497
7484
  *
7498
- * Required reason for the truncation (captured in audit log).
7485
+ * Element ULID (elem_ prefixed) identifying the account to post to
7499
7486
  */
7500
- reason: string;
7487
+ element_id: string;
7501
7488
  /**
7502
- * Structure Id
7489
+ * Amount
7503
7490
  *
7504
- * Target schedule structure ID.
7491
+ * Amount expression. Supports: '{{ event.amount }}' — raw event amount (cents); '{{ event.amount }} / 2' — half of event amount; '{{ event.metadata.fee_cents }}' — field from event metadata
7505
7492
  */
7506
- structure_id: string;
7493
+ amount: string;
7507
7494
  };
7508
7495
 
7509
7496
  /**
@@ -7570,6 +7557,68 @@ export type UpdateApiKeyRequest = {
7570
7557
  description?: string | null;
7571
7558
  };
7572
7559
 
7560
+ /**
7561
+ * UpdateAgentRequest
7562
+ */
7563
+ export type UpdateAgentRequest = {
7564
+ /**
7565
+ * Agent Id
7566
+ */
7567
+ agent_id: string;
7568
+ /**
7569
+ * Name
7570
+ */
7571
+ name?: string | null;
7572
+ /**
7573
+ * Legal Name
7574
+ */
7575
+ legal_name?: string | null;
7576
+ /**
7577
+ * Tax Id
7578
+ */
7579
+ tax_id?: string | null;
7580
+ /**
7581
+ * Registration Number
7582
+ */
7583
+ registration_number?: string | null;
7584
+ /**
7585
+ * Duns
7586
+ */
7587
+ duns?: string | null;
7588
+ /**
7589
+ * Lei
7590
+ */
7591
+ lei?: string | null;
7592
+ /**
7593
+ * Email
7594
+ */
7595
+ email?: string | null;
7596
+ /**
7597
+ * Phone
7598
+ */
7599
+ phone?: string | null;
7600
+ /**
7601
+ * Address
7602
+ */
7603
+ address?: {
7604
+ [key: string]: unknown;
7605
+ } | null;
7606
+ /**
7607
+ * Is Active
7608
+ */
7609
+ is_active?: boolean | null;
7610
+ /**
7611
+ * Is 1099 Recipient
7612
+ */
7613
+ is_1099_recipient?: boolean | null;
7614
+ /**
7615
+ * Metadata Patch
7616
+ */
7617
+ metadata_patch?: {
7618
+ [key: string]: unknown;
7619
+ };
7620
+ };
7621
+
7573
7622
  /**
7574
7623
  * UpdateEntityRequest
7575
7624
  *
@@ -7666,6 +7715,107 @@ export type UpdateEntityRequest = {
7666
7715
  address_country?: string | null;
7667
7716
  };
7668
7717
 
7718
+ /**
7719
+ * UpdateEventBlockRequest
7720
+ *
7721
+ * Status transitions and field corrections for an event block.
7722
+ *
7723
+ * All fields except event_id are optional — only supplied fields are updated.
7724
+ */
7725
+ export type UpdateEventBlockRequest = {
7726
+ /**
7727
+ * Event Id
7728
+ */
7729
+ event_id: string;
7730
+ /**
7731
+ * Transition To
7732
+ *
7733
+ * Status transition. Valid moves depend on current status: captured → committed | voided; classified → committed | pending | fulfilled | voided; committed → pending | fulfilled | voided; pending → fulfilled | voided. Terminal states (fulfilled, voided, superseded) accept no further transitions. Note: classified and fulfilled are usually set by handlers, not by callers, but the transition is allowed for corrections.
7734
+ */
7735
+ transition_to?: 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
7736
+ /**
7737
+ * Superseded By Id
7738
+ *
7739
+ * New event id that replaces this one. Required when transition_to='superseded'.
7740
+ */
7741
+ superseded_by_id?: string | null;
7742
+ /**
7743
+ * Description
7744
+ */
7745
+ description?: string | null;
7746
+ /**
7747
+ * Effective At
7748
+ */
7749
+ effective_at?: string | null;
7750
+ /**
7751
+ * Metadata Patch
7752
+ *
7753
+ * Key-value pairs merged into existing metadata (additive patch, not replace).
7754
+ */
7755
+ metadata_patch?: {
7756
+ [key: string]: unknown;
7757
+ };
7758
+ };
7759
+
7760
+ /**
7761
+ * UpdateEventHandlerRequest
7762
+ */
7763
+ export type UpdateEventHandlerRequest = {
7764
+ /**
7765
+ * Event Handler Id
7766
+ */
7767
+ event_handler_id: string;
7768
+ /**
7769
+ * Name
7770
+ */
7771
+ name?: string | null;
7772
+ /**
7773
+ * Description
7774
+ */
7775
+ description?: string | null;
7776
+ /**
7777
+ * Event Category
7778
+ */
7779
+ event_category?: string | null;
7780
+ /**
7781
+ * Match Source
7782
+ */
7783
+ match_source?: string | null;
7784
+ /**
7785
+ * Match Agent Type
7786
+ */
7787
+ match_agent_type?: string | null;
7788
+ /**
7789
+ * Match Resource Type
7790
+ */
7791
+ match_resource_type?: string | null;
7792
+ /**
7793
+ * Match Metadata Expression
7794
+ */
7795
+ match_metadata_expression?: {
7796
+ [key: string]: unknown;
7797
+ } | null;
7798
+ transaction_template?: TransactionTemplate | null;
7799
+ /**
7800
+ * Priority
7801
+ */
7802
+ priority?: number | null;
7803
+ /**
7804
+ * Is Active
7805
+ */
7806
+ is_active?: boolean | null;
7807
+ /**
7808
+ * Approve
7809
+ */
7810
+ approve?: boolean | null;
7811
+ /**
7812
+ * Metadata Patch
7813
+ */
7814
+ metadata_patch?: {
7815
+ [key: string]: unknown;
7816
+ };
7817
+ };
7818
+
7669
7819
  /**
7670
7820
  * UpdateInformationBlockRequest
7671
7821
  *
@@ -15133,8 +15283,8 @@ export type OpEvaluateRulesResponses = {
15133
15283
 
15134
15284
  export type OpEvaluateRulesResponse = OpEvaluateRulesResponses[keyof OpEvaluateRulesResponses];
15135
15285
 
15136
- export type OpCreateTransactionData = {
15137
- body: CreateTransactionRequest;
15286
+ export type OpCreateAgentData = {
15287
+ body: CreateAgentRequest;
15138
15288
  headers?: {
15139
15289
  /**
15140
15290
  * Idempotency-Key
@@ -15148,10 +15298,10 @@ export type OpCreateTransactionData = {
15148
15298
  graph_id: string;
15149
15299
  };
15150
15300
  query?: never;
15151
- url: '/extensions/roboledger/{graph_id}/operations/create-transaction';
15301
+ url: '/extensions/roboledger/{graph_id}/operations/create-agent';
15152
15302
  };
15153
15303
 
15154
- export type OpCreateTransactionErrors = {
15304
+ export type OpCreateAgentErrors = {
15155
15305
  /**
15156
15306
  * Invalid request payload
15157
15307
  */
@@ -15186,19 +15336,19 @@ export type OpCreateTransactionErrors = {
15186
15336
  500: unknown;
15187
15337
  };
15188
15338
 
15189
- export type OpCreateTransactionError = OpCreateTransactionErrors[keyof OpCreateTransactionErrors];
15339
+ export type OpCreateAgentError = OpCreateAgentErrors[keyof OpCreateAgentErrors];
15190
15340
 
15191
- export type OpCreateTransactionResponses = {
15341
+ export type OpCreateAgentResponses = {
15192
15342
  /**
15193
15343
  * Successful Response
15194
15344
  */
15195
15345
  200: OperationEnvelope;
15196
15346
  };
15197
15347
 
15198
- export type OpCreateTransactionResponse = OpCreateTransactionResponses[keyof OpCreateTransactionResponses];
15348
+ export type OpCreateAgentResponse = OpCreateAgentResponses[keyof OpCreateAgentResponses];
15199
15349
 
15200
- export type OpCreateJournalEntryData = {
15201
- body: CreateJournalEntryRequest;
15350
+ export type OpUpdateAgentData = {
15351
+ body: UpdateAgentRequest;
15202
15352
  headers?: {
15203
15353
  /**
15204
15354
  * Idempotency-Key
@@ -15212,10 +15362,10 @@ export type OpCreateJournalEntryData = {
15212
15362
  graph_id: string;
15213
15363
  };
15214
15364
  query?: never;
15215
- url: '/extensions/roboledger/{graph_id}/operations/create-journal-entry';
15365
+ url: '/extensions/roboledger/{graph_id}/operations/update-agent';
15216
15366
  };
15217
15367
 
15218
- export type OpCreateJournalEntryErrors = {
15368
+ export type OpUpdateAgentErrors = {
15219
15369
  /**
15220
15370
  * Invalid request payload
15221
15371
  */
@@ -15250,19 +15400,19 @@ export type OpCreateJournalEntryErrors = {
15250
15400
  500: unknown;
15251
15401
  };
15252
15402
 
15253
- export type OpCreateJournalEntryError = OpCreateJournalEntryErrors[keyof OpCreateJournalEntryErrors];
15403
+ export type OpUpdateAgentError = OpUpdateAgentErrors[keyof OpUpdateAgentErrors];
15254
15404
 
15255
- export type OpCreateJournalEntryResponses = {
15405
+ export type OpUpdateAgentResponses = {
15256
15406
  /**
15257
15407
  * Successful Response
15258
15408
  */
15259
15409
  200: OperationEnvelope;
15260
15410
  };
15261
15411
 
15262
- export type OpCreateJournalEntryResponse = OpCreateJournalEntryResponses[keyof OpCreateJournalEntryResponses];
15412
+ export type OpUpdateAgentResponse = OpUpdateAgentResponses[keyof OpUpdateAgentResponses];
15263
15413
 
15264
- export type OpUpdateJournalEntryData = {
15265
- body: UpdateJournalEntryRequest;
15414
+ export type OpCreateEventBlockData = {
15415
+ body: CreateEventBlockRequest;
15266
15416
  headers?: {
15267
15417
  /**
15268
15418
  * Idempotency-Key
@@ -15276,10 +15426,10 @@ export type OpUpdateJournalEntryData = {
15276
15426
  graph_id: string;
15277
15427
  };
15278
15428
  query?: never;
15279
- url: '/extensions/roboledger/{graph_id}/operations/update-journal-entry';
15429
+ url: '/extensions/roboledger/{graph_id}/operations/create-event-block';
15280
15430
  };
15281
15431
 
15282
- export type OpUpdateJournalEntryErrors = {
15432
+ export type OpCreateEventBlockErrors = {
15283
15433
  /**
15284
15434
  * Invalid request payload
15285
15435
  */
@@ -15314,19 +15464,19 @@ export type OpUpdateJournalEntryErrors = {
15314
15464
  500: unknown;
15315
15465
  };
15316
15466
 
15317
- export type OpUpdateJournalEntryError = OpUpdateJournalEntryErrors[keyof OpUpdateJournalEntryErrors];
15467
+ export type OpCreateEventBlockError = OpCreateEventBlockErrors[keyof OpCreateEventBlockErrors];
15318
15468
 
15319
- export type OpUpdateJournalEntryResponses = {
15469
+ export type OpCreateEventBlockResponses = {
15320
15470
  /**
15321
15471
  * Successful Response
15322
15472
  */
15323
15473
  200: OperationEnvelope;
15324
15474
  };
15325
15475
 
15326
- export type OpUpdateJournalEntryResponse = OpUpdateJournalEntryResponses[keyof OpUpdateJournalEntryResponses];
15476
+ export type OpCreateEventBlockResponse = OpCreateEventBlockResponses[keyof OpCreateEventBlockResponses];
15327
15477
 
15328
- export type OpDeleteJournalEntryData = {
15329
- body: DeleteJournalEntryRequest;
15478
+ export type OpUpdateEventBlockData = {
15479
+ body: UpdateEventBlockRequest;
15330
15480
  headers?: {
15331
15481
  /**
15332
15482
  * Idempotency-Key
@@ -15340,10 +15490,10 @@ export type OpDeleteJournalEntryData = {
15340
15490
  graph_id: string;
15341
15491
  };
15342
15492
  query?: never;
15343
- url: '/extensions/roboledger/{graph_id}/operations/delete-journal-entry';
15493
+ url: '/extensions/roboledger/{graph_id}/operations/update-event-block';
15344
15494
  };
15345
15495
 
15346
- export type OpDeleteJournalEntryErrors = {
15496
+ export type OpUpdateEventBlockErrors = {
15347
15497
  /**
15348
15498
  * Invalid request payload
15349
15499
  */
@@ -15378,19 +15528,19 @@ export type OpDeleteJournalEntryErrors = {
15378
15528
  500: unknown;
15379
15529
  };
15380
15530
 
15381
- export type OpDeleteJournalEntryError = OpDeleteJournalEntryErrors[keyof OpDeleteJournalEntryErrors];
15531
+ export type OpUpdateEventBlockError = OpUpdateEventBlockErrors[keyof OpUpdateEventBlockErrors];
15382
15532
 
15383
- export type OpDeleteJournalEntryResponses = {
15533
+ export type OpUpdateEventBlockResponses = {
15384
15534
  /**
15385
15535
  * Successful Response
15386
15536
  */
15387
15537
  200: OperationEnvelope;
15388
15538
  };
15389
15539
 
15390
- export type OpDeleteJournalEntryResponse = OpDeleteJournalEntryResponses[keyof OpDeleteJournalEntryResponses];
15540
+ export type OpUpdateEventBlockResponse = OpUpdateEventBlockResponses[keyof OpUpdateEventBlockResponses];
15391
15541
 
15392
- export type OpReverseJournalEntryData = {
15393
- body: ReverseJournalEntryRequest;
15542
+ export type OpCreateEventHandlerData = {
15543
+ body: CreateEventHandlerRequest;
15394
15544
  headers?: {
15395
15545
  /**
15396
15546
  * Idempotency-Key
@@ -15404,10 +15554,10 @@ export type OpReverseJournalEntryData = {
15404
15554
  graph_id: string;
15405
15555
  };
15406
15556
  query?: never;
15407
- url: '/extensions/roboledger/{graph_id}/operations/reverse-journal-entry';
15557
+ url: '/extensions/roboledger/{graph_id}/operations/create-event-handler';
15408
15558
  };
15409
15559
 
15410
- export type OpReverseJournalEntryErrors = {
15560
+ export type OpCreateEventHandlerErrors = {
15411
15561
  /**
15412
15562
  * Invalid request payload
15413
15563
  */
@@ -15442,19 +15592,19 @@ export type OpReverseJournalEntryErrors = {
15442
15592
  500: unknown;
15443
15593
  };
15444
15594
 
15445
- export type OpReverseJournalEntryError = OpReverseJournalEntryErrors[keyof OpReverseJournalEntryErrors];
15595
+ export type OpCreateEventHandlerError = OpCreateEventHandlerErrors[keyof OpCreateEventHandlerErrors];
15446
15596
 
15447
- export type OpReverseJournalEntryResponses = {
15597
+ export type OpCreateEventHandlerResponses = {
15448
15598
  /**
15449
15599
  * Successful Response
15450
15600
  */
15451
15601
  200: OperationEnvelope;
15452
15602
  };
15453
15603
 
15454
- export type OpReverseJournalEntryResponse = OpReverseJournalEntryResponses[keyof OpReverseJournalEntryResponses];
15604
+ export type OpCreateEventHandlerResponse = OpCreateEventHandlerResponses[keyof OpCreateEventHandlerResponses];
15455
15605
 
15456
- export type OpSetCloseTargetData = {
15457
- body: SetCloseTargetOperation;
15606
+ export type OpUpdateEventHandlerData = {
15607
+ body: UpdateEventHandlerRequest;
15458
15608
  headers?: {
15459
15609
  /**
15460
15610
  * Idempotency-Key
@@ -15468,30 +15618,30 @@ export type OpSetCloseTargetData = {
15468
15618
  graph_id: string;
15469
15619
  };
15470
15620
  query?: never;
15471
- url: '/extensions/roboledger/{graph_id}/operations/set-close-target';
15621
+ url: '/extensions/roboledger/{graph_id}/operations/update-event-handler';
15472
15622
  };
15473
15623
 
15474
- export type OpSetCloseTargetErrors = {
15624
+ export type OpUpdateEventHandlerErrors = {
15475
15625
  /**
15476
- * Invalid request
15626
+ * Invalid request payload
15477
15627
  */
15478
- 400: ErrorResponse;
15628
+ 400: OperationError;
15479
15629
  /**
15480
- * Authentication required
15630
+ * Unauthorized — missing or invalid credentials
15481
15631
  */
15482
- 401: ErrorResponse;
15632
+ 401: unknown;
15483
15633
  /**
15484
- * Access denied
15634
+ * Forbidden — caller cannot access this graph
15485
15635
  */
15486
- 403: ErrorResponse;
15636
+ 403: unknown;
15487
15637
  /**
15488
- * Resource not found
15638
+ * Resource not found (graph, ledger, report, etc.)
15489
15639
  */
15490
- 404: ErrorResponse;
15640
+ 404: OperationError;
15491
15641
  /**
15492
- * Idempotency-Key conflict — key reused with different body
15642
+ * Idempotency-Key reused with a different request body, or other operation-level conflict
15493
15643
  */
15494
- 409: ErrorResponse;
15644
+ 409: OperationError;
15495
15645
  /**
15496
15646
  * Validation Error
15497
15647
  */
@@ -15499,26 +15649,26 @@ export type OpSetCloseTargetErrors = {
15499
15649
  /**
15500
15650
  * Rate limit exceeded
15501
15651
  */
15502
- 429: ErrorResponse;
15652
+ 429: unknown;
15503
15653
  /**
15504
- * Internal server error
15654
+ * Internal error
15505
15655
  */
15506
- 500: ErrorResponse;
15656
+ 500: unknown;
15507
15657
  };
15508
15658
 
15509
- export type OpSetCloseTargetError = OpSetCloseTargetErrors[keyof OpSetCloseTargetErrors];
15659
+ export type OpUpdateEventHandlerError = OpUpdateEventHandlerErrors[keyof OpUpdateEventHandlerErrors];
15510
15660
 
15511
- export type OpSetCloseTargetResponses = {
15661
+ export type OpUpdateEventHandlerResponses = {
15512
15662
  /**
15513
15663
  * Successful Response
15514
15664
  */
15515
15665
  200: OperationEnvelope;
15516
15666
  };
15517
15667
 
15518
- export type OpSetCloseTargetResponse = OpSetCloseTargetResponses[keyof OpSetCloseTargetResponses];
15668
+ export type OpUpdateEventHandlerResponse = OpUpdateEventHandlerResponses[keyof OpUpdateEventHandlerResponses];
15519
15669
 
15520
- export type OpCreateClosingEntryData = {
15521
- body: CreateClosingEntryOperation;
15670
+ export type OpPreviewEventBlockData = {
15671
+ body: CreateEventBlockRequest;
15522
15672
  headers?: {
15523
15673
  /**
15524
15674
  * Idempotency-Key
@@ -15532,10 +15682,10 @@ export type OpCreateClosingEntryData = {
15532
15682
  graph_id: string;
15533
15683
  };
15534
15684
  query?: never;
15535
- url: '/extensions/roboledger/{graph_id}/operations/create-closing-entry';
15685
+ url: '/extensions/roboledger/{graph_id}/operations/preview-event-block';
15536
15686
  };
15537
15687
 
15538
- export type OpCreateClosingEntryErrors = {
15688
+ export type OpPreviewEventBlockErrors = {
15539
15689
  /**
15540
15690
  * Invalid request payload
15541
15691
  */
@@ -15570,19 +15720,19 @@ export type OpCreateClosingEntryErrors = {
15570
15720
  500: unknown;
15571
15721
  };
15572
15722
 
15573
- export type OpCreateClosingEntryError = OpCreateClosingEntryErrors[keyof OpCreateClosingEntryErrors];
15723
+ export type OpPreviewEventBlockError = OpPreviewEventBlockErrors[keyof OpPreviewEventBlockErrors];
15574
15724
 
15575
- export type OpCreateClosingEntryResponses = {
15725
+ export type OpPreviewEventBlockResponses = {
15576
15726
  /**
15577
15727
  * Successful Response
15578
15728
  */
15579
15729
  200: OperationEnvelope;
15580
15730
  };
15581
15731
 
15582
- export type OpCreateClosingEntryResponse = OpCreateClosingEntryResponses[keyof OpCreateClosingEntryResponses];
15732
+ export type OpPreviewEventBlockResponse = OpPreviewEventBlockResponses[keyof OpPreviewEventBlockResponses];
15583
15733
 
15584
- export type OpCreateManualClosingEntryData = {
15585
- body: CreateManualClosingEntryRequest;
15734
+ export type OpUpdateJournalEntryData = {
15735
+ body: UpdateJournalEntryRequest;
15586
15736
  headers?: {
15587
15737
  /**
15588
15738
  * Idempotency-Key
@@ -15596,10 +15746,10 @@ export type OpCreateManualClosingEntryData = {
15596
15746
  graph_id: string;
15597
15747
  };
15598
15748
  query?: never;
15599
- url: '/extensions/roboledger/{graph_id}/operations/create-manual-closing-entry';
15749
+ url: '/extensions/roboledger/{graph_id}/operations/update-journal-entry';
15600
15750
  };
15601
15751
 
15602
- export type OpCreateManualClosingEntryErrors = {
15752
+ export type OpUpdateJournalEntryErrors = {
15603
15753
  /**
15604
15754
  * Invalid request payload
15605
15755
  */
@@ -15634,19 +15784,19 @@ export type OpCreateManualClosingEntryErrors = {
15634
15784
  500: unknown;
15635
15785
  };
15636
15786
 
15637
- export type OpCreateManualClosingEntryError = OpCreateManualClosingEntryErrors[keyof OpCreateManualClosingEntryErrors];
15787
+ export type OpUpdateJournalEntryError = OpUpdateJournalEntryErrors[keyof OpUpdateJournalEntryErrors];
15638
15788
 
15639
- export type OpCreateManualClosingEntryResponses = {
15789
+ export type OpUpdateJournalEntryResponses = {
15640
15790
  /**
15641
15791
  * Successful Response
15642
15792
  */
15643
15793
  200: OperationEnvelope;
15644
15794
  };
15645
15795
 
15646
- export type OpCreateManualClosingEntryResponse = OpCreateManualClosingEntryResponses[keyof OpCreateManualClosingEntryResponses];
15796
+ export type OpUpdateJournalEntryResponse = OpUpdateJournalEntryResponses[keyof OpUpdateJournalEntryResponses];
15647
15797
 
15648
- export type OpTruncateScheduleData = {
15649
- body: TruncateScheduleOperation;
15798
+ export type OpDeleteJournalEntryData = {
15799
+ body: DeleteJournalEntryRequest;
15650
15800
  headers?: {
15651
15801
  /**
15652
15802
  * Idempotency-Key
@@ -15660,10 +15810,10 @@ export type OpTruncateScheduleData = {
15660
15810
  graph_id: string;
15661
15811
  };
15662
15812
  query?: never;
15663
- url: '/extensions/roboledger/{graph_id}/operations/truncate-schedule';
15813
+ url: '/extensions/roboledger/{graph_id}/operations/delete-journal-entry';
15664
15814
  };
15665
15815
 
15666
- export type OpTruncateScheduleErrors = {
15816
+ export type OpDeleteJournalEntryErrors = {
15667
15817
  /**
15668
15818
  * Invalid request payload
15669
15819
  */
@@ -15698,19 +15848,19 @@ export type OpTruncateScheduleErrors = {
15698
15848
  500: unknown;
15699
15849
  };
15700
15850
 
15701
- export type OpTruncateScheduleError = OpTruncateScheduleErrors[keyof OpTruncateScheduleErrors];
15851
+ export type OpDeleteJournalEntryError = OpDeleteJournalEntryErrors[keyof OpDeleteJournalEntryErrors];
15702
15852
 
15703
- export type OpTruncateScheduleResponses = {
15853
+ export type OpDeleteJournalEntryResponses = {
15704
15854
  /**
15705
15855
  * Successful Response
15706
15856
  */
15707
15857
  200: OperationEnvelope;
15708
15858
  };
15709
15859
 
15710
- export type OpTruncateScheduleResponse = OpTruncateScheduleResponses[keyof OpTruncateScheduleResponses];
15860
+ export type OpDeleteJournalEntryResponse = OpDeleteJournalEntryResponses[keyof OpDeleteJournalEntryResponses];
15711
15861
 
15712
- export type OpDisposeScheduleData = {
15713
- body: DisposeScheduleRequest;
15862
+ export type OpSetCloseTargetData = {
15863
+ body: SetCloseTargetOperation;
15714
15864
  headers?: {
15715
15865
  /**
15716
15866
  * Idempotency-Key
@@ -15724,30 +15874,30 @@ export type OpDisposeScheduleData = {
15724
15874
  graph_id: string;
15725
15875
  };
15726
15876
  query?: never;
15727
- url: '/extensions/roboledger/{graph_id}/operations/dispose-schedule';
15877
+ url: '/extensions/roboledger/{graph_id}/operations/set-close-target';
15728
15878
  };
15729
15879
 
15730
- export type OpDisposeScheduleErrors = {
15880
+ export type OpSetCloseTargetErrors = {
15731
15881
  /**
15732
- * Invalid request payload
15882
+ * Invalid request
15733
15883
  */
15734
- 400: OperationError;
15884
+ 400: ErrorResponse;
15735
15885
  /**
15736
- * Unauthorized — missing or invalid credentials
15886
+ * Authentication required
15737
15887
  */
15738
- 401: unknown;
15888
+ 401: ErrorResponse;
15739
15889
  /**
15740
- * Forbidden — caller cannot access this graph
15890
+ * Access denied
15741
15891
  */
15742
- 403: unknown;
15892
+ 403: ErrorResponse;
15743
15893
  /**
15744
- * Resource not found (graph, ledger, report, etc.)
15894
+ * Resource not found
15745
15895
  */
15746
- 404: OperationError;
15896
+ 404: ErrorResponse;
15747
15897
  /**
15748
- * Idempotency-Key reused with a different request body, or other operation-level conflict
15898
+ * Idempotency-Key conflict — key reused with different body
15749
15899
  */
15750
- 409: OperationError;
15900
+ 409: ErrorResponse;
15751
15901
  /**
15752
15902
  * Validation Error
15753
15903
  */
@@ -15755,23 +15905,23 @@ export type OpDisposeScheduleErrors = {
15755
15905
  /**
15756
15906
  * Rate limit exceeded
15757
15907
  */
15758
- 429: unknown;
15908
+ 429: ErrorResponse;
15759
15909
  /**
15760
- * Internal error
15910
+ * Internal server error
15761
15911
  */
15762
- 500: unknown;
15912
+ 500: ErrorResponse;
15763
15913
  };
15764
15914
 
15765
- export type OpDisposeScheduleError = OpDisposeScheduleErrors[keyof OpDisposeScheduleErrors];
15915
+ export type OpSetCloseTargetError = OpSetCloseTargetErrors[keyof OpSetCloseTargetErrors];
15766
15916
 
15767
- export type OpDisposeScheduleResponses = {
15917
+ export type OpSetCloseTargetResponses = {
15768
15918
  /**
15769
15919
  * Successful Response
15770
15920
  */
15771
15921
  200: OperationEnvelope;
15772
15922
  };
15773
15923
 
15774
- export type OpDisposeScheduleResponse = OpDisposeScheduleResponses[keyof OpDisposeScheduleResponses];
15924
+ export type OpSetCloseTargetResponse = OpSetCloseTargetResponses[keyof OpSetCloseTargetResponses];
15775
15925
 
15776
15926
  export type OpClosePeriodData = {
15777
15927
  body: ClosePeriodOperation;