@robosystems/client 2.30.0 → 2.32.0

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
@@ -4033,9 +4033,9 @@ export type CreateScheduleRequest = {
4033
4033
  /**
4034
4034
  * Monthly Amount
4035
4035
  *
4036
- * Monthly amount in cents
4036
+ * Monthly amount in cents. Required for a straight-line schedule; a custom or loan schedule takes its amounts from its curve.
4037
4037
  */
4038
- monthly_amount: number;
4038
+ monthly_amount?: number;
4039
4039
  entry_template: EntryTemplateRequest;
4040
4040
  schedule_metadata?: ScheduleMetadataRequest | null;
4041
4041
  /**
@@ -4759,6 +4759,74 @@ export type DatabaseStorageEntry = {
4759
4759
  size_mb?: number | null;
4760
4760
  };
4761
4761
 
4762
+ /**
4763
+ * DeconsolidationResponse
4764
+ *
4765
+ * A member's leaving as recorded: the draft in the consolidation entity
4766
+ * its close posts, dated the first day of the month after the member's
4767
+ * last.
4768
+ */
4769
+ export type DeconsolidationResponse = {
4770
+ /**
4771
+ * Entity Id
4772
+ *
4773
+ * The member that left.
4774
+ */
4775
+ entity_id: string;
4776
+ /**
4777
+ * Entity Name
4778
+ *
4779
+ * The member's name.
4780
+ */
4781
+ entity_name: string;
4782
+ /**
4783
+ * Left On
4784
+ *
4785
+ * The day it left, as the entity records.
4786
+ */
4787
+ left_on: string;
4788
+ /**
4789
+ * Period
4790
+ *
4791
+ * The month the entry is dated in, as YYYY-MM: the first the group reads without the member.
4792
+ */
4793
+ period: string;
4794
+ /**
4795
+ * Consideration
4796
+ *
4797
+ * Cents the parent received.
4798
+ */
4799
+ consideration: number;
4800
+ /**
4801
+ * Derecognized
4802
+ *
4803
+ * What the consolidation entity held for the member beyond the eliminations its leaving reverses on their own, each taken off.
4804
+ */
4805
+ derecognized?: Array<DerecognizedBalance>;
4806
+ /**
4807
+ * Earnings Restored
4808
+ *
4809
+ * Cents: the member's results since it joined, credited to the group's equity as they leave with its books; they were the group's income. Zero for an equity-method member, whose books were never summed.
4810
+ */
4811
+ earnings_restored?: number;
4812
+ /**
4813
+ * Gain Loss
4814
+ *
4815
+ * Cents, a gain positive: the group's adjustment to the parent's own gain or loss on the sale, so the consolidated gain is the consideration less the carrying amount of what left (ASC 810).
4816
+ */
4817
+ gain_loss: number;
4818
+ /**
4819
+ * The deconsolidation entry, a draft the close posts.
4820
+ */
4821
+ entry: JournalEntryResponse;
4822
+ /**
4823
+ * Replaced
4824
+ *
4825
+ * True when it replaced an earlier draft of the deconsolidation.
4826
+ */
4827
+ replaced?: boolean;
4828
+ };
4829
+
4762
4830
  /**
4763
4831
  * DeleteDocumentOp
4764
4832
  *
@@ -5144,6 +5212,27 @@ export type DeleteTaxonomyBlockResponse = {
5144
5212
  cascade_applied?: boolean;
5145
5213
  };
5146
5214
 
5215
+ /**
5216
+ * DerecognizedBalance
5217
+ *
5218
+ * A balance the consolidation entity held for a member that left, taken
5219
+ * off by the deconsolidation.
5220
+ */
5221
+ export type DerecognizedBalance = {
5222
+ /**
5223
+ * Concept
5224
+ *
5225
+ * The rs-gaap concept.
5226
+ */
5227
+ concept: string;
5228
+ /**
5229
+ * Amount
5230
+ *
5231
+ * Cents as held: positive a debit (goodwill, a step-up), negative a credit (the outside owners' interest, the price above book of the parent's investment).
5232
+ */
5233
+ amount: number;
5234
+ };
5235
+
5147
5236
  /**
5148
5237
  * DescribeFilingRequest
5149
5238
  *
@@ -6172,7 +6261,7 @@ export type EntryTemplateRequest = {
6172
6261
  /**
6173
6262
  * Credit Element Id
6174
6263
  *
6175
- * CoA element id to credit (e.g. Accumulated Depreciation). A chart-of-accounts element id (see get-unmapped-elements), not a taxonomy qname. One template = one debit/credit pair; model a multi-account entry as several schedules.
6264
+ * CoA element id to credit (e.g. Accumulated Depreciation). A chart-of-accounts element id (see get-unmapped-elements), not a taxonomy qname. A straight-line or custom schedule posts this one debit/credit pair; a loan schedule posts its `legs`.
6176
6265
  */
6177
6266
  credit_element_id: string;
6178
6267
  /**
@@ -6199,6 +6288,12 @@ export type EntryTemplateRequest = {
6199
6288
  * The management dimension members (department, class, location, project) every entry the schedule drafts carries on both lines, one per axis: a department's depreciation lands in that department.
6200
6289
  */
6201
6290
  dimension_ids?: Array<string>;
6291
+ /**
6292
+ * Legs
6293
+ *
6294
+ * The lines of a loan schedule's entry (`method='effective_interest'` only), each taking one column of the amortization table; each period's lines must balance. Accrue interest and pay through the bank: debit Interest Expense and credit Accrued Interest, both `interest`. The schedule settles the payment itself: debit the note `principal`, debit Interest Expense `interest`, credit cash or a due-to `payment`. `debit_element_id` names the interest debit leg and `credit_element_id` one credit leg. Empty for every other method, which posts the debit/credit pair.
6295
+ */
6296
+ legs?: Array<ScheduleLegRequest>;
6202
6297
  };
6203
6298
 
6204
6299
  /**
@@ -9890,6 +9985,12 @@ export type LedgerEntityResponse = {
9890
9985
  * The month this entity left the group, as any date in it; null is a member still. The consolidated statements include it through that month and leave it out after. Membership is by month: a period column wider than a month that overlaps the interval is summed whole, so a member's books in this graph should hold only the months it belonged.
9891
9986
  */
9892
9987
  left_on?: string | null;
9988
+ /**
9989
+ * Is Former
9990
+ *
9991
+ * True once the month this entity left the group is over: its months in the group are history, readable under it, and it is no longer current. False for a member still in, and through the month it leaves.
9992
+ */
9993
+ is_former?: boolean;
9893
9994
  /**
9894
9995
  * Source
9895
9996
  *
@@ -10678,6 +10779,86 @@ export type LiveStatementFactRow = {
10678
10779
  sources?: Array<Array<StatementRowSource>> | null;
10679
10780
  };
10680
10781
 
10782
+ /**
10783
+ * LoanTermsRequest
10784
+ *
10785
+ * The terms a loan schedule's amortization table is computed from.
10786
+ */
10787
+ export type LoanTermsRequest = {
10788
+ /**
10789
+ * Principal
10790
+ *
10791
+ * Principal drawn, in cents.
10792
+ */
10793
+ principal: number;
10794
+ /**
10795
+ * Annual Rate
10796
+ *
10797
+ * Annual interest rate as a fraction: 0.099 for 9.9%.
10798
+ */
10799
+ annual_rate: number;
10800
+ /**
10801
+ * Start Date
10802
+ *
10803
+ * The day the principal was drawn; interest accrues from it. Falls in the schedule's first month.
10804
+ */
10805
+ start_date: string;
10806
+ /**
10807
+ * Day Count
10808
+ *
10809
+ * How a period's interest counts days: `30/360` (every whole month is 30 days), `actual/365` or `actual/360` (the days elapsed, over a 365- or 360-day year; actual/360 is the usual bank line of credit).
10810
+ */
10811
+ day_count?: '30/360' | 'actual/365' | 'actual/360';
10812
+ /**
10813
+ * Payment Frequency
10814
+ *
10815
+ * How often a payment falls due. A payment is applied at the end of the month it falls in.
10816
+ */
10817
+ payment_frequency?: 'monthly' | 'quarterly' | 'annual' | 'at_maturity';
10818
+ /**
10819
+ * First Payment Date
10820
+ *
10821
+ * The first payment's date. Omit for one frequency after the schedule's first month.
10822
+ */
10823
+ first_payment_date?: string | null;
10824
+ /**
10825
+ * Payment Amount
10826
+ *
10827
+ * Each scheduled payment in cents, interest included. Omit for the level payment that retires the principal by `maturity_date`, or for the accrued interest when `interest_only`.
10828
+ */
10829
+ payment_amount?: number | null;
10830
+ /**
10831
+ * Interest Only
10832
+ *
10833
+ * Payments settle interest only; the principal is due at maturity.
10834
+ */
10835
+ interest_only?: boolean;
10836
+ /**
10837
+ * Maturity Date
10838
+ *
10839
+ * When the remaining principal is due: it is repaid in that month, which is the schedule's last. Omit for a line of credit with no maturity, whose balance carries past the schedule.
10840
+ */
10841
+ maturity_date?: string | null;
10842
+ /**
10843
+ * Capitalize Interest
10844
+ *
10845
+ * Interest is added to the note rather than accrued apart (a PIK note): the balance grows by each period's interest, and payments reduce it whole.
10846
+ */
10847
+ capitalize_interest?: boolean;
10848
+ /**
10849
+ * Note Element Id
10850
+ *
10851
+ * The liability account the principal is carried in. The schedule states its balance each period, which the schedule reconciliation compares with the ledger.
10852
+ */
10853
+ note_element_id: string;
10854
+ /**
10855
+ * Current Portion Element Id
10856
+ *
10857
+ * A current-liability account for the principal due within twelve months. When set, each period's entry also reclasses between it and `note_element_id` so it holds the next twelve months' principal.
10858
+ */
10859
+ current_portion_element_id?: string | null;
10860
+ };
10861
+
10681
10862
  /**
10682
10863
  * LoginRequest
10683
10864
  *
@@ -12199,6 +12380,52 @@ export type OperationEnvelopeConsolidationWorksheetResponse = {
12199
12380
  idempotentReplay?: boolean;
12200
12381
  };
12201
12382
 
12383
+ /**
12384
+ * OperationEnvelope[DeconsolidationResponse]
12385
+ */
12386
+ export type OperationEnvelopeDeconsolidationResponse = {
12387
+ /**
12388
+ * Operation
12389
+ *
12390
+ * Kebab-case operation name
12391
+ */
12392
+ operation: string;
12393
+ /**
12394
+ * Operationid
12395
+ *
12396
+ * op_-prefixed ULID for audit and SSE correlation
12397
+ */
12398
+ operationId: string;
12399
+ /**
12400
+ * Status
12401
+ *
12402
+ * Operation lifecycle state
12403
+ */
12404
+ status: 'completed' | 'pending' | 'failed';
12405
+ /**
12406
+ * Command-specific result payload
12407
+ */
12408
+ result?: DeconsolidationResponse | null;
12409
+ /**
12410
+ * At
12411
+ *
12412
+ * ISO-8601 UTC timestamp
12413
+ */
12414
+ at: string;
12415
+ /**
12416
+ * Createdby
12417
+ *
12418
+ * User ID that initiated the operation
12419
+ */
12420
+ createdBy?: string | null;
12421
+ /**
12422
+ * Idempotentreplay
12423
+ *
12424
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
12425
+ */
12426
+ idempotentReplay?: boolean;
12427
+ };
12428
+
12202
12429
  /**
12203
12430
  * OperationEnvelope[DeleteInformationBlockResponse]
12204
12431
  */
@@ -13533,6 +13760,52 @@ export type OperationEnvelopePreviewEventBlockResponse = {
13533
13760
  idempotentReplay?: boolean;
13534
13761
  };
13535
13762
 
13763
+ /**
13764
+ * OperationEnvelope[PreviewScheduleResponse]
13765
+ */
13766
+ export type OperationEnvelopePreviewScheduleResponse = {
13767
+ /**
13768
+ * Operation
13769
+ *
13770
+ * Kebab-case operation name
13771
+ */
13772
+ operation: string;
13773
+ /**
13774
+ * Operationid
13775
+ *
13776
+ * op_-prefixed ULID for audit and SSE correlation
13777
+ */
13778
+ operationId: string;
13779
+ /**
13780
+ * Status
13781
+ *
13782
+ * Operation lifecycle state
13783
+ */
13784
+ status: 'completed' | 'pending' | 'failed';
13785
+ /**
13786
+ * Command-specific result payload
13787
+ */
13788
+ result?: PreviewScheduleResponse | null;
13789
+ /**
13790
+ * At
13791
+ *
13792
+ * ISO-8601 UTC timestamp
13793
+ */
13794
+ at: string;
13795
+ /**
13796
+ * Createdby
13797
+ *
13798
+ * User ID that initiated the operation
13799
+ */
13800
+ createdBy?: string | null;
13801
+ /**
13802
+ * Idempotentreplay
13803
+ *
13804
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
13805
+ */
13806
+ idempotentReplay?: boolean;
13807
+ };
13808
+
13536
13809
  /**
13537
13810
  * OperationEnvelope[PromoteObligationsResponse]
13538
13811
  */
@@ -15110,6 +15383,12 @@ export type OwnershipChangeResponse = {
15110
15383
  * Cents: the share bought of the member's results since it joined, moved from the outside owners' interest to the parent.
15111
15384
  */
15112
15385
  earnings_transferred: number;
15386
+ /**
15387
+ * Premium Transferred
15388
+ *
15389
+ * Cents: the share bought of the outside owners' interest beyond their share of book value (from the acquisition at fair value, or its step-ups), moved to the parent.
15390
+ */
15391
+ premium_transferred?: number;
15113
15392
  /**
15114
15393
  * Equity Adjustment
15115
15394
  *
@@ -16201,6 +16480,103 @@ export type PreviewReconcilingItemRequest = {
16201
16480
  event_id: string;
16202
16481
  };
16203
16482
 
16483
+ /**
16484
+ * PreviewScheduleRequest
16485
+ *
16486
+ * A schedule's definition, generated without being kept.
16487
+ */
16488
+ export type PreviewScheduleRequest = {
16489
+ /**
16490
+ * Name
16491
+ *
16492
+ * Schedule name
16493
+ */
16494
+ name: string;
16495
+ /**
16496
+ * Entity Id
16497
+ *
16498
+ * The entity whose books the schedule belongs to, by id. Omit for the group parent. Its facts, obligations and closing entries land in that entity's books, against that entity's own accounts.
16499
+ */
16500
+ entity_id?: string | null;
16501
+ /**
16502
+ * Taxonomy Id
16503
+ *
16504
+ * Taxonomy ID (auto-creates if omitted)
16505
+ */
16506
+ taxonomy_id?: string | null;
16507
+ /**
16508
+ * Element Ids
16509
+ *
16510
+ * CoA element ids the schedule touches (the `id` from get-unmapped-elements, not taxonomy qnames) — typically the same debit + credit ids used in entry_template.
16511
+ */
16512
+ element_ids: Array<string>;
16513
+ /**
16514
+ * Period Start
16515
+ *
16516
+ * First period start
16517
+ */
16518
+ period_start: string;
16519
+ /**
16520
+ * Period End
16521
+ *
16522
+ * Last period end
16523
+ */
16524
+ period_end: string;
16525
+ /**
16526
+ * Monthly Amount
16527
+ *
16528
+ * Monthly amount in cents. Required for a straight-line schedule; a custom or loan schedule takes its amounts from its curve.
16529
+ */
16530
+ monthly_amount?: number;
16531
+ entry_template: EntryTemplateRequest;
16532
+ schedule_metadata?: ScheduleMetadataRequest | null;
16533
+ /**
16534
+ * Closed Through
16535
+ *
16536
+ * Watermark for onboarding. Facts with period_end ≤ this date are flagged 'historical' and their schedule_entry_due obligations are emitted 'voided', so the close workflow starts drafting at the first open period. Defaults to the calendar's history end: the last day of its closed_through month (calendar '2026-05' → '2026-05-31'), or the day before its first month when nothing has closed yet. An earlier date is raised to it, since an obligation there could never post; set a later one only to treat more months as already booked.
16537
+ */
16538
+ closed_through?: string | null;
16539
+ /**
16540
+ * Source Transaction Id
16541
+ *
16542
+ * Free-form reference to the originating GL transaction (e.g. an import ID, ledger entry ID, or external system key). Stored in artifact_mechanics for audit; no FK constraint.
16543
+ */
16544
+ source_transaction_id?: string | null;
16545
+ /**
16546
+ * Replaces Structure Id
16547
+ *
16548
+ * The schedule this definition would replace, when editing or recreating one: the preview then says what its posted entries mean for the change.
16549
+ */
16550
+ replaces_structure_id?: string | null;
16551
+ };
16552
+
16553
+ /**
16554
+ * PreviewScheduleResponse
16555
+ *
16556
+ * A generated schedule nobody kept: its envelope as create would leave
16557
+ * it, period by period.
16558
+ */
16559
+ export type PreviewScheduleResponse = {
16560
+ /**
16561
+ * The schedule's Information Block envelope as create would leave it. Its ids are provisional: nothing was written.
16562
+ */
16563
+ envelope: InformationBlockEnvelope;
16564
+ /**
16565
+ * Roll Forward
16566
+ */
16567
+ roll_forward?: Array<ScheduleRollForwardRow>;
16568
+ /**
16569
+ * Warnings
16570
+ *
16571
+ * Things create would go ahead with that deserve a look: an active schedule already posting to the same accounts over the same months.
16572
+ */
16573
+ warnings?: Array<string>;
16574
+ /**
16575
+ * With `replaces_structure_id`: the schedule being replaced.
16576
+ */
16577
+ replaces?: ScheduleReplacementSummary | null;
16578
+ };
16579
+
16204
16580
  /**
16205
16581
  * PromoteObligationsRequest
16206
16582
  *
@@ -16636,14 +17012,45 @@ export type ReadTextResponse = {
16636
17012
  * month, are history), so a rebuild re-scopes the schedule to today's
16637
17013
  * close state. Use this to pick up a fixed generator (e.g. the
16638
17014
  * roll-forward direction fix) without orphaning obligations.
17015
+ *
17016
+ * It is also how an edit is saved while nothing has posted: the fields below
17017
+ * replace the stored definition before it regenerates, as the schedule's
17018
+ * envelope reads them back (`artifact.mechanics`). Omitted fields keep their
17019
+ * stored values, inside `schedule_metadata` too.
16639
17020
  */
16640
17021
  export type RebuildScheduleRequest = {
16641
17022
  /**
16642
- * Structure Id
17023
+ * Structure Id
17024
+ *
17025
+ * The schedule structure to regenerate in place.
17026
+ */
17027
+ structure_id: string;
17028
+ /**
17029
+ * Period Start
17030
+ *
17031
+ * A new first period start.
17032
+ */
17033
+ period_start?: string | null;
17034
+ /**
17035
+ * Period End
17036
+ *
17037
+ * A new last period end.
17038
+ */
17039
+ period_end?: string | null;
17040
+ /**
17041
+ * Monthly Amount
16643
17042
  *
16644
- * The schedule structure to regenerate in place.
17043
+ * A new straight-line monthly amount, in cents.
16645
17044
  */
16646
- structure_id: string;
17045
+ monthly_amount?: number | null;
17046
+ /**
17047
+ * A new entry template, replacing the stored one whole.
17048
+ */
17049
+ entry_template?: EntryTemplateRequest | null;
17050
+ /**
17051
+ * The schedule_metadata fields to change.
17052
+ */
17053
+ schedule_metadata?: ScheduleMetadataRequest | null;
16647
17054
  };
16648
17055
 
16649
17056
  /**
@@ -17525,6 +17932,35 @@ export type RecordAcquisitionRequest = {
17525
17932
  confirm_bargain_purchase?: boolean;
17526
17933
  };
17527
17934
 
17935
+ /**
17936
+ * RecordDeconsolidationRequest
17937
+ *
17938
+ * A member has left the group (`left_on` set): what the parent received
17939
+ * for its shares, and the basis. The entry derecognizes what the
17940
+ * consolidation entity still holds for the member and takes the gain or
17941
+ * loss on its leaving; the parent's own sale entry stays on its books.
17942
+ */
17943
+ export type RecordDeconsolidationRequest = {
17944
+ /**
17945
+ * Entity Id
17946
+ *
17947
+ * The member that left: its `left_on` is set.
17948
+ */
17949
+ entity_id: string;
17950
+ /**
17951
+ * Consideration
17952
+ *
17953
+ * Cents the parent received for its shares; 0 for a dissolution or an abandonment. Recorded with the entry for the record: the parent's own books hold the sale, cash against its investment and its own gain or loss, which this entry adjusts to the group's.
17954
+ */
17955
+ consideration: number;
17956
+ /**
17957
+ * Basis
17958
+ *
17959
+ * The sale agreement, the dissolution, or what sets the price.
17960
+ */
17961
+ basis: string;
17962
+ };
17963
+
17528
17964
  /**
17529
17965
  * RecordOpeningBalanceRequest
17530
17966
  *
@@ -18702,6 +19138,38 @@ export type ScheduleCreatedResponse = {
18702
19138
  * Pending Event Count
18703
19139
  */
18704
19140
  pending_event_count?: number;
19141
+ /**
19142
+ * Warnings
19143
+ *
19144
+ * What the write went ahead with that deserves a look: another active schedule posting to the same accounts over the same months.
19145
+ */
19146
+ warnings?: Array<string>;
19147
+ };
19148
+
19149
+ /**
19150
+ * ScheduleLegRequest
19151
+ *
19152
+ * One line of the entry a loan schedule drafts each period.
19153
+ */
19154
+ export type ScheduleLegRequest = {
19155
+ /**
19156
+ * Element Id
19157
+ *
19158
+ * CoA element id the line posts to.
19159
+ */
19160
+ element_id: string;
19161
+ /**
19162
+ * Side
19163
+ *
19164
+ * The line's side.
19165
+ */
19166
+ side: 'debit' | 'credit';
19167
+ /**
19168
+ * Amount Source
19169
+ *
19170
+ * The amortization-table column the line takes each period: `interest` (accrued in the period), `interest_paid` (accrued interest settled by the period's payment), `principal` (principal repaid), `payment` (interest_paid + principal).
19171
+ */
19172
+ amount_source: 'interest' | 'interest_paid' | 'principal' | 'payment';
18705
19173
  };
18706
19174
 
18707
19175
  /**
@@ -18733,6 +19201,42 @@ export type ScheduleMechanics = {
18733
19201
  * Number of in-scope periods that have at least one closing entry posted. Runtime state derived at envelope-build time from the Entry table.
18734
19202
  */
18735
19203
  periods_with_entries?: number;
19204
+ /**
19205
+ * Period Start
19206
+ *
19207
+ * The schedule's first period start, as defined.
19208
+ */
19209
+ period_start?: string | null;
19210
+ /**
19211
+ * Period End
19212
+ *
19213
+ * The schedule's last period end, as defined. An early end is `end_date`; rebuild-schedule regenerates to this and ends at it again.
19214
+ */
19215
+ period_end?: string | null;
19216
+ /**
19217
+ * Monthly Amount
19218
+ *
19219
+ * The straight-line monthly amount in cents. With `period_start`, `period_end`, `entry_template` and `schedule_metadata` this is the whole definition: rebuild-schedule takes the same fields back.
19220
+ */
19221
+ monthly_amount?: number | null;
19222
+ /**
19223
+ * End Date
19224
+ *
19225
+ * Where terminate-schedule ended it, when it did.
19226
+ */
19227
+ end_date?: string | null;
19228
+ /**
19229
+ * Posted Periods
19230
+ *
19231
+ * The months (YYYY-MM) holding a posted or shadowed closing entry of the schedule, which no edit may rewrite.
19232
+ */
19233
+ posted_periods?: Array<string>;
19234
+ /**
19235
+ * Edit Warning
19236
+ *
19237
+ * Set once an entry has posted: what deleting, rebuilding or recreating the schedule would do to that history, and the path an edit takes instead.
19238
+ */
19239
+ edit_warning?: string | null;
18736
19240
  };
18737
19241
 
18738
19242
  /**
@@ -18742,9 +19246,13 @@ export type ScheduleMetadataRequest = {
18742
19246
  /**
18743
19247
  * Method
18744
19248
  *
18745
- * Calculation method. 'straight_line' (default) distributes `monthly_amount` evenly across periods with the final period absorbing rounding. 'custom' requires `periodic_amounts` — the generator uses those values verbatim instead of computing. Other strings are labels only; fact values still come from `monthly_amount` or `periodic_amounts`.
19249
+ * Calculation method. 'straight_line' (default) distributes `monthly_amount` evenly across periods with the final period absorbing rounding. 'custom' requires `periodic_amounts` — the generator uses those values verbatim instead of computing. 'effective_interest' requires `loan_terms` and the template's `legs`: the generator computes the amortization table (opening balance, interest, payment, principal, closing balance) and drafts the legs from it. Other strings are labels only; fact values still come from `monthly_amount` or `periodic_amounts`.
18746
19250
  */
18747
19251
  method?: string;
19252
+ /**
19253
+ * The loan's terms, for `method='effective_interest'`.
19254
+ */
19255
+ loan_terms?: LoanTermsRequest | null;
18748
19256
  /**
18749
19257
  * Original Amount
18750
19258
  *
@@ -18783,6 +19291,109 @@ export type ScheduleMetadataRequest = {
18783
19291
  periodic_amounts?: Array<number> | null;
18784
19292
  };
18785
19293
 
19294
+ /**
19295
+ * ScheduleReplacementSummary
19296
+ *
19297
+ * What an existing schedule's entries mean for replacing it.
19298
+ */
19299
+ export type ScheduleReplacementSummary = {
19300
+ /**
19301
+ * Structure Id
19302
+ */
19303
+ structure_id: string;
19304
+ /**
19305
+ * Name
19306
+ */
19307
+ name: string;
19308
+ /**
19309
+ * Posted Entry Count
19310
+ *
19311
+ * Its posted or shadowed closing entries.
19312
+ */
19313
+ posted_entry_count: number;
19314
+ /**
19315
+ * Posted Periods
19316
+ *
19317
+ * The months those entries are in (YYYY-MM).
19318
+ */
19319
+ posted_periods?: Array<string>;
19320
+ /**
19321
+ * Draft Entry Count
19322
+ */
19323
+ draft_entry_count?: number;
19324
+ /**
19325
+ * Path
19326
+ *
19327
+ * `rebuild` when nothing has posted: rebuild-schedule with the new definition replaces it in place. `terminate_and_succeed` once an entry has: terminate it after its last posted month and create the successor from the month after.
19328
+ */
19329
+ path: 'rebuild' | 'terminate_and_succeed';
19330
+ };
19331
+
19332
+ /**
19333
+ * ScheduleRollForwardRow
19334
+ *
19335
+ * One period of a previewed schedule: the balance it carries, and what
19336
+ * moves it.
19337
+ */
19338
+ export type ScheduleRollForwardRow = {
19339
+ /**
19340
+ * Period Start
19341
+ */
19342
+ period_start: string;
19343
+ /**
19344
+ * Period End
19345
+ */
19346
+ period_end: string;
19347
+ /**
19348
+ * Opening
19349
+ *
19350
+ * The carried balance at the period's start.
19351
+ */
19352
+ opening: number;
19353
+ /**
19354
+ * Amount
19355
+ *
19356
+ * What the period recognizes: the entry's debit amount.
19357
+ */
19358
+ amount: number;
19359
+ /**
19360
+ * Closing
19361
+ *
19362
+ * The carried balance at the period's end.
19363
+ */
19364
+ closing: number;
19365
+ /**
19366
+ * Scope
19367
+ *
19368
+ * `historical` for a month already in the books' history, which the schedule records but never drafts; `in_scope` for one a close drafts.
19369
+ */
19370
+ scope: 'historical' | 'in_scope';
19371
+ /**
19372
+ * Interest
19373
+ *
19374
+ * Loan schedules: interest accrued.
19375
+ */
19376
+ interest?: number | null;
19377
+ /**
19378
+ * Payment
19379
+ *
19380
+ * Loan schedules: the payment.
19381
+ */
19382
+ payment?: number | null;
19383
+ /**
19384
+ * Principal
19385
+ *
19386
+ * Loan schedules: principal repaid.
19387
+ */
19388
+ principal?: number | null;
19389
+ /**
19390
+ * Current Portion
19391
+ *
19392
+ * Loan schedules with a current-portion account: the principal due in the next twelve months.
19393
+ */
19394
+ current_portion?: number | null;
19395
+ };
19396
+
18786
19397
  /**
18787
19398
  * SchemaExportResponse
18788
19399
  *
@@ -33799,6 +34410,70 @@ export type RecordOwnershipChangeResponses = {
33799
34410
 
33800
34411
  export type RecordOwnershipChangeResponse = RecordOwnershipChangeResponses[keyof RecordOwnershipChangeResponses];
33801
34412
 
34413
+ export type RecordDeconsolidationData = {
34414
+ body: RecordDeconsolidationRequest;
34415
+ headers?: {
34416
+ /**
34417
+ * Idempotency-Key
34418
+ */
34419
+ 'Idempotency-Key'?: string | null;
34420
+ };
34421
+ path: {
34422
+ /**
34423
+ * Graph Id
34424
+ */
34425
+ graph_id: string;
34426
+ };
34427
+ query?: never;
34428
+ url: '/extensions/roboledger/{graph_id}/operations/record-deconsolidation';
34429
+ };
34430
+
34431
+ export type RecordDeconsolidationErrors = {
34432
+ /**
34433
+ * Invalid request
34434
+ */
34435
+ 400: ErrorResponse;
34436
+ /**
34437
+ * Authentication required
34438
+ */
34439
+ 401: ErrorResponse;
34440
+ /**
34441
+ * Access denied
34442
+ */
34443
+ 403: ErrorResponse;
34444
+ /**
34445
+ * Resource not found
34446
+ */
34447
+ 404: ErrorResponse;
34448
+ /**
34449
+ * Idempotency-Key conflict — key reused with different body
34450
+ */
34451
+ 409: ErrorResponse;
34452
+ /**
34453
+ * Validation error
34454
+ */
34455
+ 422: ErrorResponse;
34456
+ /**
34457
+ * Rate limit exceeded
34458
+ */
34459
+ 429: ErrorResponse;
34460
+ /**
34461
+ * Internal server error
34462
+ */
34463
+ 500: ErrorResponse;
34464
+ };
34465
+
34466
+ export type RecordDeconsolidationError = RecordDeconsolidationErrors[keyof RecordDeconsolidationErrors];
34467
+
34468
+ export type RecordDeconsolidationResponses = {
34469
+ /**
34470
+ * Successful Response
34471
+ */
34472
+ 200: OperationEnvelopeDeconsolidationResponse;
34473
+ };
34474
+
34475
+ export type RecordDeconsolidationResponse = RecordDeconsolidationResponses[keyof RecordDeconsolidationResponses];
34476
+
33802
34477
  export type UpdateJournalEntryData = {
33803
34478
  body: UpdateJournalEntryRequest;
33804
34479
  headers?: {
@@ -34247,6 +34922,70 @@ export type PromoteObligationsResponses = {
34247
34922
 
34248
34923
  export type PromoteObligationsResponse2 = PromoteObligationsResponses[keyof PromoteObligationsResponses];
34249
34924
 
34925
+ export type PreviewScheduleData = {
34926
+ body: PreviewScheduleRequest;
34927
+ headers?: {
34928
+ /**
34929
+ * Idempotency-Key
34930
+ */
34931
+ 'Idempotency-Key'?: string | null;
34932
+ };
34933
+ path: {
34934
+ /**
34935
+ * Graph Id
34936
+ */
34937
+ graph_id: string;
34938
+ };
34939
+ query?: never;
34940
+ url: '/extensions/roboledger/{graph_id}/operations/preview-schedule';
34941
+ };
34942
+
34943
+ export type PreviewScheduleErrors = {
34944
+ /**
34945
+ * Invalid request
34946
+ */
34947
+ 400: ErrorResponse;
34948
+ /**
34949
+ * Authentication required
34950
+ */
34951
+ 401: ErrorResponse;
34952
+ /**
34953
+ * Access denied
34954
+ */
34955
+ 403: ErrorResponse;
34956
+ /**
34957
+ * Resource not found
34958
+ */
34959
+ 404: ErrorResponse;
34960
+ /**
34961
+ * Idempotency-Key conflict — key reused with different body
34962
+ */
34963
+ 409: ErrorResponse;
34964
+ /**
34965
+ * Validation error
34966
+ */
34967
+ 422: ErrorResponse;
34968
+ /**
34969
+ * Rate limit exceeded
34970
+ */
34971
+ 429: ErrorResponse;
34972
+ /**
34973
+ * Internal server error
34974
+ */
34975
+ 500: ErrorResponse;
34976
+ };
34977
+
34978
+ export type PreviewScheduleError = PreviewScheduleErrors[keyof PreviewScheduleErrors];
34979
+
34980
+ export type PreviewScheduleResponses = {
34981
+ /**
34982
+ * Successful Response
34983
+ */
34984
+ 200: OperationEnvelopePreviewScheduleResponse;
34985
+ };
34986
+
34987
+ export type PreviewScheduleResponse2 = PreviewScheduleResponses[keyof PreviewScheduleResponses];
34988
+
34250
34989
  export type RebuildScheduleData = {
34251
34990
  body: RebuildScheduleRequest;
34252
34991
  headers?: {