@robosystems/client 2.11.2 → 2.12.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
@@ -144,6 +144,63 @@ export type AddPublishListMembersOperation = {
144
144
  list_id: string;
145
145
  };
146
146
 
147
+ /**
148
+ * AgentClassification
149
+ *
150
+ * A counterparty's default account, learned from committed lines or set by
151
+ * hand.
152
+ */
153
+ export type AgentClassification = {
154
+ /**
155
+ * Element Id
156
+ *
157
+ * The default chart account.
158
+ */
159
+ element_id: string;
160
+ /**
161
+ * Account Name
162
+ *
163
+ * The account's name.
164
+ */
165
+ account_name?: string | null;
166
+ /**
167
+ * Mode
168
+ *
169
+ * `suggest`: offered on each new line. `always_ask`: never offered.
170
+ */
171
+ mode: string;
172
+ /**
173
+ * Confirmations
174
+ *
175
+ * Committed lines that went to this account.
176
+ */
177
+ confirmations: number;
178
+ /**
179
+ * Overrides
180
+ *
181
+ * Committed lines that went elsewhere while it was the default.
182
+ */
183
+ overrides: number;
184
+ /**
185
+ * Set By
186
+ *
187
+ * Who set or last moved it.
188
+ */
189
+ set_by?: string | null;
190
+ /**
191
+ * Set At
192
+ *
193
+ * When it was set or last moved.
194
+ */
195
+ set_at?: string | null;
196
+ /**
197
+ * Learned From
198
+ *
199
+ * The committed line it was learned from, when it was.
200
+ */
201
+ learned_from?: string | null;
202
+ };
203
+
147
204
  /**
148
205
  * AnalyticalStatementFactRow
149
206
  *
@@ -8781,6 +8838,56 @@ export type JournalEntryResponse = {
8781
8838
  total_credit: number;
8782
8839
  };
8783
8840
 
8841
+ /**
8842
+ * LearnClassificationDefaultsRequest
8843
+ *
8844
+ * Seed counterparty defaults from the bank lines already committed.
8845
+ */
8846
+ export type LearnClassificationDefaultsRequest = {
8847
+ /**
8848
+ * Dry Run
8849
+ *
8850
+ * Report what would be learned without writing it.
8851
+ */
8852
+ dry_run?: boolean;
8853
+ };
8854
+
8855
+ /**
8856
+ * LearnClassificationDefaultsResponse
8857
+ *
8858
+ * What seeding the defaults learned.
8859
+ */
8860
+ export type LearnClassificationDefaultsResponse = {
8861
+ /**
8862
+ * Agents Learned
8863
+ *
8864
+ * Counterparties given a default from their committed lines.
8865
+ */
8866
+ agents_learned: number;
8867
+ /**
8868
+ * Agents Kept
8869
+ *
8870
+ * Counterparties that already had a default, left as they were.
8871
+ */
8872
+ agents_kept: number;
8873
+ /**
8874
+ * Lines Read
8875
+ *
8876
+ * Committed lines classified to a single account that were read.
8877
+ */
8878
+ lines_read: number;
8879
+ /**
8880
+ * Open Lines Resuggested
8881
+ *
8882
+ * Still-open lines whose suggestion changed as a result.
8883
+ */
8884
+ open_lines_resuggested: number;
8885
+ /**
8886
+ * Dry Run
8887
+ */
8888
+ dry_run: boolean;
8889
+ };
8890
+
8784
8891
  /**
8785
8892
  * LedgerAgentResponse
8786
8893
  */
@@ -8847,6 +8954,10 @@ export type LedgerAgentResponse = {
8847
8954
  * Is 1099 Recipient
8848
8955
  */
8849
8956
  is_1099_recipient: boolean;
8957
+ /**
8958
+ * The default account its bank lines are suggested.
8959
+ */
8960
+ classification?: AgentClassification | null;
8850
8961
  /**
8851
8962
  * Created At
8852
8963
  */
@@ -12008,6 +12119,52 @@ export type OperationEnvelopeJournalEntryResponse = {
12008
12119
  idempotentReplay?: boolean;
12009
12120
  };
12010
12121
 
12122
+ /**
12123
+ * OperationEnvelope[LearnClassificationDefaultsResponse]
12124
+ */
12125
+ export type OperationEnvelopeLearnClassificationDefaultsResponse = {
12126
+ /**
12127
+ * Operation
12128
+ *
12129
+ * Kebab-case operation name
12130
+ */
12131
+ operation: string;
12132
+ /**
12133
+ * Operationid
12134
+ *
12135
+ * op_-prefixed ULID for audit and SSE correlation
12136
+ */
12137
+ operationId: string;
12138
+ /**
12139
+ * Status
12140
+ *
12141
+ * Operation lifecycle state
12142
+ */
12143
+ status: 'completed' | 'pending' | 'failed';
12144
+ /**
12145
+ * Command-specific result payload
12146
+ */
12147
+ result?: LearnClassificationDefaultsResponse | null;
12148
+ /**
12149
+ * At
12150
+ *
12151
+ * ISO-8601 UTC timestamp
12152
+ */
12153
+ at: string;
12154
+ /**
12155
+ * Createdby
12156
+ *
12157
+ * User ID that initiated the operation
12158
+ */
12159
+ createdBy?: string | null;
12160
+ /**
12161
+ * Idempotentreplay
12162
+ *
12163
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
12164
+ */
12165
+ idempotentReplay?: boolean;
12166
+ };
12167
+
12011
12168
  /**
12012
12169
  * OperationEnvelope[LedgerAgentResponse]
12013
12170
  */
@@ -14708,7 +14865,7 @@ export type PreviewReconciliationsRequest = {
14708
14865
  /**
14709
14866
  * Method
14710
14867
  *
14711
- * Which check to preview. `source_ledger` compares every account with the synced accounting system's own trial balance. `schedule_register` compares each asset account a schedule carries a balance on with what its schedules say it holds. `statement` compares each account that has a statement balance recorded in the period with that balance.
14868
+ * Which check to preview. `source_ledger` compares every account with the synced accounting system's own trial balance. `schedule_register` compares each asset account a schedule carries a balance on with what its schedules say it holds. `statement` compares each account that has a statement covering the period with that balance, adjusted on a bank-fed account by the lines the bank had not cleared.
14712
14869
  */
14713
14870
  method?: 'source_ledger' | 'schedule_register' | 'statement';
14714
14871
  /**
@@ -15123,13 +15280,14 @@ export type RebuildScheduleRequest = {
15123
15280
  * ReconciliationComponent
15124
15281
  *
15125
15282
  * One part of an account's independent balance: what a single schedule
15126
- * says the account carries, or a recorded statement balance.
15283
+ * says the account carries, a recorded statement balance, or a ledger line
15284
+ * outstanding at the statement's date.
15127
15285
  */
15128
15286
  export type ReconciliationComponent = {
15129
15287
  /**
15130
15288
  * Name
15131
15289
  *
15132
- * The schedule's name, or the statement and its date.
15290
+ * The schedule's name, the statement and its date, or the outstanding line's description.
15133
15291
  */
15134
15292
  name: string;
15135
15293
  /**
@@ -15138,6 +15296,24 @@ export type ReconciliationComponent = {
15138
15296
  * What this part says the account holds, debit-positive.
15139
15297
  */
15140
15298
  amount: number;
15299
+ /**
15300
+ * Kind
15301
+ *
15302
+ * `schedule`, `statement`, or `outstanding`: a ledger line on a bank-fed account that did not come from the feed, dated on or before the statement, so the bank had not cleared it.
15303
+ */
15304
+ kind?: string | null;
15305
+ /**
15306
+ * Posting Date
15307
+ *
15308
+ * An `outstanding` line's posting date.
15309
+ */
15310
+ posting_date?: string | null;
15311
+ /**
15312
+ * Entry Id
15313
+ *
15314
+ * The journal entry an `outstanding` line belongs to.
15315
+ */
15316
+ entry_id?: string | null;
15141
15317
  /**
15142
15318
  * Structure Id
15143
15319
  *
@@ -15147,7 +15323,7 @@ export type ReconciliationComponent = {
15147
15323
  /**
15148
15324
  * Event Id
15149
15325
  *
15150
- * The recorded balance, for a `statement` part.
15326
+ * The recorded balance, for a `statement` part; the event behind an `outstanding` line, when it has one.
15151
15327
  */
15152
15328
  event_id?: string | null;
15153
15329
  /**
@@ -15253,6 +15429,12 @@ export type ReconciliationMechanics = {
15253
15429
  * Whether the person who signs off must be someone other than the person who ran the comparison.
15254
15430
  */
15255
15431
  separate_reviewer?: boolean;
15432
+ /**
15433
+ * Statement Cycle
15434
+ *
15435
+ * `statement` blocks only: how often the account's statement is issued; unset is monthly. A period is covered by the latest statement ending within the cycle that ends with it.
15436
+ */
15437
+ statement_cycle?: 'monthly' | 'quarterly' | 'annual' | null;
15256
15438
  };
15257
15439
 
15258
15440
  /**
@@ -15281,6 +15463,12 @@ export type ReconciliationPolicyResponse = {
15281
15463
  * Separate Reviewer
15282
15464
  */
15283
15465
  separate_reviewer: boolean;
15466
+ /**
15467
+ * Statement Cycle
15468
+ *
15469
+ * `statement` blocks only: how often the statement is issued.
15470
+ */
15471
+ statement_cycle?: 'monthly' | 'quarterly' | 'annual' | null;
15284
15472
  };
15285
15473
 
15286
15474
  /**
@@ -15363,6 +15551,69 @@ export type ReconciliationPreviewResponse = {
15363
15551
  notes?: Array<string>;
15364
15552
  };
15365
15553
 
15554
+ /**
15555
+ * ReconciliationRollForward
15556
+ *
15557
+ * A statement carried from its ending date to the period's last day on a
15558
+ * bank-fed account, where every line the feed brought is the bank's own.
15559
+ */
15560
+ export type ReconciliationRollForward = {
15561
+ /**
15562
+ * Statement As Of
15563
+ *
15564
+ * The statement's ending date.
15565
+ */
15566
+ statement_as_of: string;
15567
+ /**
15568
+ * Through
15569
+ *
15570
+ * The period's last day.
15571
+ */
15572
+ through: string;
15573
+ /**
15574
+ * Bank Lines
15575
+ *
15576
+ * Booked feed lines dated after the statement, to the period end.
15577
+ */
15578
+ bank_lines: number;
15579
+ /**
15580
+ * Bank Activity
15581
+ *
15582
+ * Their net effect on the account, debit-positive.
15583
+ */
15584
+ bank_activity: number;
15585
+ /**
15586
+ * Bank Balance
15587
+ *
15588
+ * The statement balance carried to the period end by those lines: what the bank held then, debit-positive.
15589
+ */
15590
+ bank_balance: number;
15591
+ /**
15592
+ * Ledger Balance
15593
+ *
15594
+ * The ledger's balance at the period end, as the close will leave it, debit-positive.
15595
+ */
15596
+ ledger_balance: number;
15597
+ /**
15598
+ * Outstanding
15599
+ *
15600
+ * Ledger lines not from the feed and dated on or before the period end, net: the ledger minus the carried bank balance.
15601
+ */
15602
+ outstanding: number;
15603
+ /**
15604
+ * Feed Balance
15605
+ *
15606
+ * A cross-check, never the figure reconciled: the bank feed's own balance from the first reading on or after the period end, less the booked feed lines between the period end and that reading. Null when the feed has no reading within ten days.
15607
+ */
15608
+ feed_balance?: number | null;
15609
+ /**
15610
+ * Feed Balance Read On
15611
+ *
15612
+ * The day of the feed reading `feed_balance` starts from.
15613
+ */
15614
+ feed_balance_read_on?: string | null;
15615
+ };
15616
+
15366
15617
  /**
15367
15618
  * ReconciliationRow
15368
15619
  *
@@ -15410,7 +15661,7 @@ export type ReconciliationRow = {
15410
15661
  /**
15411
15662
  * Independent Balance
15412
15663
  *
15413
- * What the independent source says.
15664
+ * What the independent source says. For a `statement` on a bank-fed account, the statement balance adjusted by its outstanding lines.
15414
15665
  */
15415
15666
  independent_balance: number;
15416
15667
  /**
@@ -15434,9 +15685,13 @@ export type ReconciliationRow = {
15434
15685
  /**
15435
15686
  * Components
15436
15687
  *
15437
- * Account-scope methods only: what makes up the independent balance. One entry per schedule for `schedule_register`; the recorded statement for `statement`.
15688
+ * Account-scope methods only: what makes up the independent balance. One entry per schedule for `schedule_register`; the recorded statement for `statement`, then each outstanding line.
15438
15689
  */
15439
15690
  components?: Array<ReconciliationComponent>;
15691
+ /**
15692
+ * `statement` on a bank-fed account whose statement ends before the period's last day: the statement carried to it by the feed's lines.
15693
+ */
15694
+ roll_forward?: ReconciliationRollForward | null;
15440
15695
  };
15441
15696
 
15442
15697
  /**
@@ -15487,6 +15742,12 @@ export type ReconciliationSummary = {
15487
15742
  * A difference up to this amount still counts as reconciled.
15488
15743
  */
15489
15744
  materiality: number;
15745
+ /**
15746
+ * Statement Cycle
15747
+ *
15748
+ * `statement` blocks only: how often the account's statement is issued, `monthly`, `quarterly` or `annual`.
15749
+ */
15750
+ statement_cycle?: string | null;
15490
15751
  /**
15491
15752
  * Period
15492
15753
  *
@@ -15538,15 +15799,19 @@ export type ReconciliationSummary = {
15538
15799
  /**
15539
15800
  * Balance As Of
15540
15801
  *
15541
- * Account-scope only: the date the two balances are stated at. The period's last day, unless a statement ended earlier in the period.
15802
+ * Account-scope only: the date the two balances are stated at. The period's last day, unless the statement covering it ended earlier.
15542
15803
  */
15543
15804
  balance_as_of?: string | null;
15544
15805
  /**
15545
15806
  * Components
15546
15807
  *
15547
- * Account-scope only: what makes up the independent balance. One entry per schedule for `schedule_register`; the recorded statement for `statement`.
15808
+ * Account-scope only: what makes up the independent balance. One entry per schedule for `schedule_register`; the recorded statement for `statement`, then each outstanding line.
15548
15809
  */
15549
15810
  components?: Array<ReconciliationComponent>;
15811
+ /**
15812
+ * `statement` on a bank-fed account whose statement ends before the period's last day: the statement carried to it by the feed's lines.
15813
+ */
15814
+ roll_forward?: ReconciliationRollForward | null;
15550
15815
  /**
15551
15816
  * Source
15552
15817
  *
@@ -17877,6 +18142,12 @@ export type SetReconciliationPolicyRequest = {
17877
18142
  * Whether the person who signs off must be someone other than the person who ran the comparison. It can only be turned on when the graph has at least two members who can write. Omit to keep.
17878
18143
  */
17879
18144
  separate_reviewer?: boolean | null;
18145
+ /**
18146
+ * Statement Cycle
18147
+ *
18148
+ * `statement` blocks only: how often the account's statement is issued. A period is covered by the latest statement ending within the cycle that ends with it, so a quarterly statement covers the two months before the next one. Omit to keep.
18149
+ */
18150
+ statement_cycle?: 'monthly' | 'quarterly' | 'annual' | null;
17880
18151
  };
17881
18152
 
17882
18153
  /**
@@ -19611,10 +19882,22 @@ export type UpdateAgentRequest = {
19611
19882
  * Is 1099 Recipient
19612
19883
  */
19613
19884
  is_1099_recipient?: boolean | null;
19885
+ /**
19886
+ * Classification Element Id
19887
+ *
19888
+ * The chart account this counterparty's bank lines are usually classified to, suggested on each new line. An empty string clears it. Its still-open lines are re-suggested at once. Omit to keep.
19889
+ */
19890
+ classification_element_id?: string | null;
19891
+ /**
19892
+ * Classification Mode
19893
+ *
19894
+ * `suggest` offers the default on each line; `always_ask` offers none, for a counterparty whose lines go to different accounts. Omit to keep.
19895
+ */
19896
+ classification_mode?: 'suggest' | 'always_ask' | null;
19614
19897
  /**
19615
19898
  * Metadata Patch
19616
19899
  *
19617
- * Deep-merged into agent.metadata. Pass `{}` to leave unchanged.
19900
+ * Deep-merged into agent.metadata. Pass `{}` to leave unchanged. The default classification is set with the fields above, not here.
19618
19901
  */
19619
19902
  metadata_patch?: {
19620
19903
  [key: string]: unknown;
@@ -30424,6 +30707,70 @@ export type UpdateAgentResponses = {
30424
30707
 
30425
30708
  export type UpdateAgentResponse = UpdateAgentResponses[keyof UpdateAgentResponses];
30426
30709
 
30710
+ export type LearnClassificationDefaultsData = {
30711
+ body: LearnClassificationDefaultsRequest;
30712
+ headers?: {
30713
+ /**
30714
+ * Idempotency-Key
30715
+ */
30716
+ 'Idempotency-Key'?: string | null;
30717
+ };
30718
+ path: {
30719
+ /**
30720
+ * Graph Id
30721
+ */
30722
+ graph_id: string;
30723
+ };
30724
+ query?: never;
30725
+ url: '/extensions/roboledger/{graph_id}/operations/learn-classification-defaults';
30726
+ };
30727
+
30728
+ export type LearnClassificationDefaultsErrors = {
30729
+ /**
30730
+ * Invalid request
30731
+ */
30732
+ 400: ErrorResponse;
30733
+ /**
30734
+ * Authentication required
30735
+ */
30736
+ 401: ErrorResponse;
30737
+ /**
30738
+ * Access denied
30739
+ */
30740
+ 403: ErrorResponse;
30741
+ /**
30742
+ * Resource not found
30743
+ */
30744
+ 404: ErrorResponse;
30745
+ /**
30746
+ * Idempotency-Key conflict — key reused with different body
30747
+ */
30748
+ 409: ErrorResponse;
30749
+ /**
30750
+ * Validation error
30751
+ */
30752
+ 422: ErrorResponse;
30753
+ /**
30754
+ * Rate limit exceeded
30755
+ */
30756
+ 429: ErrorResponse;
30757
+ /**
30758
+ * Internal server error
30759
+ */
30760
+ 500: ErrorResponse;
30761
+ };
30762
+
30763
+ export type LearnClassificationDefaultsError = LearnClassificationDefaultsErrors[keyof LearnClassificationDefaultsErrors];
30764
+
30765
+ export type LearnClassificationDefaultsResponses = {
30766
+ /**
30767
+ * Successful Response
30768
+ */
30769
+ 200: OperationEnvelopeLearnClassificationDefaultsResponse;
30770
+ };
30771
+
30772
+ export type LearnClassificationDefaultsResponse2 = LearnClassificationDefaultsResponses[keyof LearnClassificationDefaultsResponses];
30773
+
30427
30774
  export type CreateEventBlockData = {
30428
30775
  body: CreateEventBlockRequest;
30429
30776
  headers?: {