@robosystems/client 2.12.1 → 2.13.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.
@@ -75,6 +75,165 @@ export type ApiKeysResponse = {
75
75
  */
76
76
  api_keys: Array<ApiKeyInfo>;
77
77
  };
78
+ /**
79
+ * AcceptSuggestionLine
80
+ *
81
+ * What the batch did with one line.
82
+ */
83
+ export type AcceptSuggestionLine = {
84
+ /**
85
+ * Event Id
86
+ *
87
+ * The line.
88
+ */
89
+ event_id: string;
90
+ /**
91
+ * Outcome
92
+ *
93
+ * What happened to it.
94
+ */
95
+ outcome: 'classified' | 'committed' | 'skipped';
96
+ /**
97
+ * Reason
98
+ *
99
+ * Why a skipped line was not taken: `not_open` (already classified, posted or retracted), `no_suggestion` (nothing to take, or a name that matches no account), `source_changed` (the feed changed it after capture), `closed_period`, `locked` (another process holds it; retry), or `refused` (the handler would not post the choice).
100
+ */
101
+ reason?: string | null;
102
+ /**
103
+ * Detail
104
+ *
105
+ * The refusal's own words, when there was one.
106
+ */
107
+ detail?: string | null;
108
+ /**
109
+ * Element Id
110
+ *
111
+ * The account the suggestion names.
112
+ */
113
+ element_id?: string | null;
114
+ /**
115
+ * Description
116
+ *
117
+ * The line's description.
118
+ */
119
+ description?: string | null;
120
+ };
121
+ /**
122
+ * AcceptSuggestionsRequest
123
+ *
124
+ * Take the suggestion on every open bank line the filters select.
125
+ */
126
+ export type AcceptSuggestionsRequest = {
127
+ /**
128
+ * Entity Id
129
+ *
130
+ * The entity whose inbox to act on. Omit for the group parent.
131
+ */
132
+ entity_id?: string | null;
133
+ /**
134
+ * Event Ids
135
+ *
136
+ * Explicit lines, as from the inbox's multi-select; each is answered, even one that cannot be taken. The other filters still narrow them.
137
+ */
138
+ event_ids?: Array<string> | null;
139
+ /**
140
+ * Source
141
+ *
142
+ * Only lines from this feed (`plaid`, `mercury`).
143
+ */
144
+ source?: string | null;
145
+ /**
146
+ * Agent Id
147
+ *
148
+ * Only one counterparty's lines.
149
+ */
150
+ agent_id?: string | null;
151
+ /**
152
+ * Suggestion Source
153
+ *
154
+ * Only lines whose suggestion came from here: `agent_default` (the counterparty's learned default), `tier0` (the bank's category) or `ai`.
155
+ */
156
+ suggestion_source?: string | null;
157
+ /**
158
+ * Occurred From
159
+ *
160
+ * Only lines dated on or after this day.
161
+ */
162
+ occurred_from?: string | null;
163
+ /**
164
+ * Occurred To
165
+ *
166
+ * Only lines dated on or before this day.
167
+ */
168
+ occurred_to?: string | null;
169
+ /**
170
+ * Commit
171
+ *
172
+ * Post each taken line as well (captured → committed). Off, the lines are classified and wait for a person to post them.
173
+ */
174
+ commit?: boolean;
175
+ /**
176
+ * Limit
177
+ *
178
+ * At most this many lines per call, oldest first; `truncated` in the response says whether more matched.
179
+ */
180
+ limit?: number;
181
+ /**
182
+ * Dry Run
183
+ *
184
+ * Report what each line would do without writing. A closed month is found only when a line actually posts, so a real run can still skip one a dry run counted.
185
+ */
186
+ dry_run?: boolean;
187
+ };
188
+ /**
189
+ * AcceptSuggestionsResponse
190
+ *
191
+ * The batch's counts, and every line it looked at.
192
+ */
193
+ export type AcceptSuggestionsResponse = {
194
+ /**
195
+ * Selected
196
+ *
197
+ * Lines the filters matched, before the limit.
198
+ */
199
+ selected: number;
200
+ /**
201
+ * Classified
202
+ *
203
+ * Lines classified to their suggestion and left to post.
204
+ */
205
+ classified: number;
206
+ /**
207
+ * Committed
208
+ *
209
+ * Lines classified to their suggestion and posted.
210
+ */
211
+ committed: number;
212
+ /**
213
+ * Skipped
214
+ *
215
+ * Lines not taken, each with a reason.
216
+ */
217
+ skipped: number;
218
+ /**
219
+ * Truncated
220
+ *
221
+ * More lines matched than the limit allowed in this call.
222
+ */
223
+ truncated: boolean;
224
+ /**
225
+ * Dry Run
226
+ *
227
+ * Nothing was written.
228
+ */
229
+ dry_run: boolean;
230
+ /**
231
+ * Lines
232
+ *
233
+ * Each line looked at, oldest first.
234
+ */
235
+ lines: Array<AcceptSuggestionLine>;
236
+ };
78
237
  /**
79
238
  * AccountInfo
80
239
  *
@@ -3454,7 +3613,7 @@ export type CreateScheduleRequest = {
3454
3613
  /**
3455
3614
  * Closed Through
3456
3615
  *
3457
- * 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. Set this to the last day of the fiscal calendar's closed_through month (calendar '2026-05' → '2026-05-31') whether those months were actually closed in RoboLedger or just baseline-watermarked at initialization. Omitting it (when prior periods exist) leaves pre-watermark periods as 'pending' obligations that block the first close.
3616
+ * 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.
3458
3617
  */
3459
3618
  closed_through?: string | null;
3460
3619
  /**
@@ -10493,6 +10652,51 @@ export type OperationEnvelope = {
10493
10652
  */
10494
10653
  idempotentReplay?: boolean;
10495
10654
  };
10655
+ /**
10656
+ * OperationEnvelope[AcceptSuggestionsResponse]
10657
+ */
10658
+ export type OperationEnvelopeAcceptSuggestionsResponse = {
10659
+ /**
10660
+ * Operation
10661
+ *
10662
+ * Kebab-case operation name
10663
+ */
10664
+ operation: string;
10665
+ /**
10666
+ * Operationid
10667
+ *
10668
+ * op_-prefixed ULID for audit and SSE correlation
10669
+ */
10670
+ operationId: string;
10671
+ /**
10672
+ * Status
10673
+ *
10674
+ * Operation lifecycle state
10675
+ */
10676
+ status: 'completed' | 'pending' | 'failed';
10677
+ /**
10678
+ * Command-specific result payload
10679
+ */
10680
+ result?: AcceptSuggestionsResponse | null;
10681
+ /**
10682
+ * At
10683
+ *
10684
+ * ISO-8601 UTC timestamp
10685
+ */
10686
+ at: string;
10687
+ /**
10688
+ * Createdby
10689
+ *
10690
+ * User ID that initiated the operation
10691
+ */
10692
+ createdBy?: string | null;
10693
+ /**
10694
+ * Idempotentreplay
10695
+ *
10696
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
10697
+ */
10698
+ idempotentReplay?: boolean;
10699
+ };
10496
10700
  /**
10497
10701
  * OperationEnvelope[AssertMetricsResponse]
10498
10702
  */
@@ -14906,8 +15110,9 @@ export type ReadTextResponse = {
14906
15110
  * monthly_amount / period bounds on the Structure's metadata).
14907
15111
  *
14908
15112
  * The historical-vs-in-scope split is re-derived from the CURRENT fiscal
14909
- * calendar `closed_through`, so a rebuild re-scopes the schedule to
14910
- * today's close state. Use this to pick up a fixed generator (e.g. the
15113
+ * calendar (months through its `closed_through`, or before its first
15114
+ * month, are history), so a rebuild re-scopes the schedule to today's
15115
+ * close state. Use this to pick up a fixed generator (e.g. the
14911
15116
  * roll-forward direction fix) without orphaning obligations.
14912
15117
  */
14913
15118
  export type RebuildScheduleRequest = {
@@ -29433,6 +29638,65 @@ export type LearnClassificationDefaultsResponses = {
29433
29638
  200: OperationEnvelopeLearnClassificationDefaultsResponse;
29434
29639
  };
29435
29640
  export type LearnClassificationDefaultsResponse2 = LearnClassificationDefaultsResponses[keyof LearnClassificationDefaultsResponses];
29641
+ export type AcceptSuggestionsData = {
29642
+ body: AcceptSuggestionsRequest;
29643
+ headers?: {
29644
+ /**
29645
+ * Idempotency-Key
29646
+ */
29647
+ 'Idempotency-Key'?: string | null;
29648
+ };
29649
+ path: {
29650
+ /**
29651
+ * Graph Id
29652
+ */
29653
+ graph_id: string;
29654
+ };
29655
+ query?: never;
29656
+ url: '/extensions/roboledger/{graph_id}/operations/accept-suggestions';
29657
+ };
29658
+ export type AcceptSuggestionsErrors = {
29659
+ /**
29660
+ * Invalid request
29661
+ */
29662
+ 400: ErrorResponse;
29663
+ /**
29664
+ * Authentication required
29665
+ */
29666
+ 401: ErrorResponse;
29667
+ /**
29668
+ * Access denied
29669
+ */
29670
+ 403: ErrorResponse;
29671
+ /**
29672
+ * Resource not found
29673
+ */
29674
+ 404: ErrorResponse;
29675
+ /**
29676
+ * Idempotency-Key conflict — key reused with different body
29677
+ */
29678
+ 409: ErrorResponse;
29679
+ /**
29680
+ * Validation error
29681
+ */
29682
+ 422: ErrorResponse;
29683
+ /**
29684
+ * Rate limit exceeded
29685
+ */
29686
+ 429: ErrorResponse;
29687
+ /**
29688
+ * Internal server error
29689
+ */
29690
+ 500: ErrorResponse;
29691
+ };
29692
+ export type AcceptSuggestionsError = AcceptSuggestionsErrors[keyof AcceptSuggestionsErrors];
29693
+ export type AcceptSuggestionsResponses = {
29694
+ /**
29695
+ * Successful Response
29696
+ */
29697
+ 200: OperationEnvelopeAcceptSuggestionsResponse;
29698
+ };
29699
+ export type AcceptSuggestionsResponse2 = AcceptSuggestionsResponses[keyof AcceptSuggestionsResponses];
29436
29700
  export type CreateEventBlockData = {
29437
29701
  body: CreateEventBlockRequest;
29438
29702
  headers?: {
package/sdk/types.gen.ts CHANGED
@@ -80,6 +80,168 @@ export type ApiKeysResponse = {
80
80
  api_keys: Array<ApiKeyInfo>;
81
81
  };
82
82
 
83
+ /**
84
+ * AcceptSuggestionLine
85
+ *
86
+ * What the batch did with one line.
87
+ */
88
+ export type AcceptSuggestionLine = {
89
+ /**
90
+ * Event Id
91
+ *
92
+ * The line.
93
+ */
94
+ event_id: string;
95
+ /**
96
+ * Outcome
97
+ *
98
+ * What happened to it.
99
+ */
100
+ outcome: 'classified' | 'committed' | 'skipped';
101
+ /**
102
+ * Reason
103
+ *
104
+ * Why a skipped line was not taken: `not_open` (already classified, posted or retracted), `no_suggestion` (nothing to take, or a name that matches no account), `source_changed` (the feed changed it after capture), `closed_period`, `locked` (another process holds it; retry), or `refused` (the handler would not post the choice).
105
+ */
106
+ reason?: string | null;
107
+ /**
108
+ * Detail
109
+ *
110
+ * The refusal's own words, when there was one.
111
+ */
112
+ detail?: string | null;
113
+ /**
114
+ * Element Id
115
+ *
116
+ * The account the suggestion names.
117
+ */
118
+ element_id?: string | null;
119
+ /**
120
+ * Description
121
+ *
122
+ * The line's description.
123
+ */
124
+ description?: string | null;
125
+ };
126
+
127
+ /**
128
+ * AcceptSuggestionsRequest
129
+ *
130
+ * Take the suggestion on every open bank line the filters select.
131
+ */
132
+ export type AcceptSuggestionsRequest = {
133
+ /**
134
+ * Entity Id
135
+ *
136
+ * The entity whose inbox to act on. Omit for the group parent.
137
+ */
138
+ entity_id?: string | null;
139
+ /**
140
+ * Event Ids
141
+ *
142
+ * Explicit lines, as from the inbox's multi-select; each is answered, even one that cannot be taken. The other filters still narrow them.
143
+ */
144
+ event_ids?: Array<string> | null;
145
+ /**
146
+ * Source
147
+ *
148
+ * Only lines from this feed (`plaid`, `mercury`).
149
+ */
150
+ source?: string | null;
151
+ /**
152
+ * Agent Id
153
+ *
154
+ * Only one counterparty's lines.
155
+ */
156
+ agent_id?: string | null;
157
+ /**
158
+ * Suggestion Source
159
+ *
160
+ * Only lines whose suggestion came from here: `agent_default` (the counterparty's learned default), `tier0` (the bank's category) or `ai`.
161
+ */
162
+ suggestion_source?: string | null;
163
+ /**
164
+ * Occurred From
165
+ *
166
+ * Only lines dated on or after this day.
167
+ */
168
+ occurred_from?: string | null;
169
+ /**
170
+ * Occurred To
171
+ *
172
+ * Only lines dated on or before this day.
173
+ */
174
+ occurred_to?: string | null;
175
+ /**
176
+ * Commit
177
+ *
178
+ * Post each taken line as well (captured → committed). Off, the lines are classified and wait for a person to post them.
179
+ */
180
+ commit?: boolean;
181
+ /**
182
+ * Limit
183
+ *
184
+ * At most this many lines per call, oldest first; `truncated` in the response says whether more matched.
185
+ */
186
+ limit?: number;
187
+ /**
188
+ * Dry Run
189
+ *
190
+ * Report what each line would do without writing. A closed month is found only when a line actually posts, so a real run can still skip one a dry run counted.
191
+ */
192
+ dry_run?: boolean;
193
+ };
194
+
195
+ /**
196
+ * AcceptSuggestionsResponse
197
+ *
198
+ * The batch's counts, and every line it looked at.
199
+ */
200
+ export type AcceptSuggestionsResponse = {
201
+ /**
202
+ * Selected
203
+ *
204
+ * Lines the filters matched, before the limit.
205
+ */
206
+ selected: number;
207
+ /**
208
+ * Classified
209
+ *
210
+ * Lines classified to their suggestion and left to post.
211
+ */
212
+ classified: number;
213
+ /**
214
+ * Committed
215
+ *
216
+ * Lines classified to their suggestion and posted.
217
+ */
218
+ committed: number;
219
+ /**
220
+ * Skipped
221
+ *
222
+ * Lines not taken, each with a reason.
223
+ */
224
+ skipped: number;
225
+ /**
226
+ * Truncated
227
+ *
228
+ * More lines matched than the limit allowed in this call.
229
+ */
230
+ truncated: boolean;
231
+ /**
232
+ * Dry Run
233
+ *
234
+ * Nothing was written.
235
+ */
236
+ dry_run: boolean;
237
+ /**
238
+ * Lines
239
+ *
240
+ * Each line looked at, oldest first.
241
+ */
242
+ lines: Array<AcceptSuggestionLine>;
243
+ };
244
+
83
245
  /**
84
246
  * AccountInfo
85
247
  *
@@ -3537,7 +3699,7 @@ export type CreateScheduleRequest = {
3537
3699
  /**
3538
3700
  * Closed Through
3539
3701
  *
3540
- * 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. Set this to the last day of the fiscal calendar's closed_through month (calendar '2026-05' → '2026-05-31') whether those months were actually closed in RoboLedger or just baseline-watermarked at initialization. Omitting it (when prior periods exist) leaves pre-watermark periods as 'pending' obligations that block the first close.
3702
+ * 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.
3541
3703
  */
3542
3704
  closed_through?: string | null;
3543
3705
  /**
@@ -10739,6 +10901,52 @@ export type OperationEnvelope = {
10739
10901
  idempotentReplay?: boolean;
10740
10902
  };
10741
10903
 
10904
+ /**
10905
+ * OperationEnvelope[AcceptSuggestionsResponse]
10906
+ */
10907
+ export type OperationEnvelopeAcceptSuggestionsResponse = {
10908
+ /**
10909
+ * Operation
10910
+ *
10911
+ * Kebab-case operation name
10912
+ */
10913
+ operation: string;
10914
+ /**
10915
+ * Operationid
10916
+ *
10917
+ * op_-prefixed ULID for audit and SSE correlation
10918
+ */
10919
+ operationId: string;
10920
+ /**
10921
+ * Status
10922
+ *
10923
+ * Operation lifecycle state
10924
+ */
10925
+ status: 'completed' | 'pending' | 'failed';
10926
+ /**
10927
+ * Command-specific result payload
10928
+ */
10929
+ result?: AcceptSuggestionsResponse | null;
10930
+ /**
10931
+ * At
10932
+ *
10933
+ * ISO-8601 UTC timestamp
10934
+ */
10935
+ at: string;
10936
+ /**
10937
+ * Createdby
10938
+ *
10939
+ * User ID that initiated the operation
10940
+ */
10941
+ createdBy?: string | null;
10942
+ /**
10943
+ * Idempotentreplay
10944
+ *
10945
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
10946
+ */
10947
+ idempotentReplay?: boolean;
10948
+ };
10949
+
10742
10950
  /**
10743
10951
  * OperationEnvelope[AssertMetricsResponse]
10744
10952
  */
@@ -15263,8 +15471,9 @@ export type ReadTextResponse = {
15263
15471
  * monthly_amount / period bounds on the Structure's metadata).
15264
15472
  *
15265
15473
  * The historical-vs-in-scope split is re-derived from the CURRENT fiscal
15266
- * calendar `closed_through`, so a rebuild re-scopes the schedule to
15267
- * today's close state. Use this to pick up a fixed generator (e.g. the
15474
+ * calendar (months through its `closed_through`, or before its first
15475
+ * month, are history), so a rebuild re-scopes the schedule to today's
15476
+ * close state. Use this to pick up a fixed generator (e.g. the
15268
15477
  * roll-forward direction fix) without orphaning obligations.
15269
15478
  */
15270
15479
  export type RebuildScheduleRequest = {
@@ -30771,6 +30980,70 @@ export type LearnClassificationDefaultsResponses = {
30771
30980
 
30772
30981
  export type LearnClassificationDefaultsResponse2 = LearnClassificationDefaultsResponses[keyof LearnClassificationDefaultsResponses];
30773
30982
 
30983
+ export type AcceptSuggestionsData = {
30984
+ body: AcceptSuggestionsRequest;
30985
+ headers?: {
30986
+ /**
30987
+ * Idempotency-Key
30988
+ */
30989
+ 'Idempotency-Key'?: string | null;
30990
+ };
30991
+ path: {
30992
+ /**
30993
+ * Graph Id
30994
+ */
30995
+ graph_id: string;
30996
+ };
30997
+ query?: never;
30998
+ url: '/extensions/roboledger/{graph_id}/operations/accept-suggestions';
30999
+ };
31000
+
31001
+ export type AcceptSuggestionsErrors = {
31002
+ /**
31003
+ * Invalid request
31004
+ */
31005
+ 400: ErrorResponse;
31006
+ /**
31007
+ * Authentication required
31008
+ */
31009
+ 401: ErrorResponse;
31010
+ /**
31011
+ * Access denied
31012
+ */
31013
+ 403: ErrorResponse;
31014
+ /**
31015
+ * Resource not found
31016
+ */
31017
+ 404: ErrorResponse;
31018
+ /**
31019
+ * Idempotency-Key conflict — key reused with different body
31020
+ */
31021
+ 409: ErrorResponse;
31022
+ /**
31023
+ * Validation error
31024
+ */
31025
+ 422: ErrorResponse;
31026
+ /**
31027
+ * Rate limit exceeded
31028
+ */
31029
+ 429: ErrorResponse;
31030
+ /**
31031
+ * Internal server error
31032
+ */
31033
+ 500: ErrorResponse;
31034
+ };
31035
+
31036
+ export type AcceptSuggestionsError = AcceptSuggestionsErrors[keyof AcceptSuggestionsErrors];
31037
+
31038
+ export type AcceptSuggestionsResponses = {
31039
+ /**
31040
+ * Successful Response
31041
+ */
31042
+ 200: OperationEnvelopeAcceptSuggestionsResponse;
31043
+ };
31044
+
31045
+ export type AcceptSuggestionsResponse2 = AcceptSuggestionsResponses[keyof AcceptSuggestionsResponses];
31046
+
30774
31047
  export type CreateEventBlockData = {
30775
31048
  body: CreateEventBlockRequest;
30776
31049
  headers?: {