@robosystems/client 2.21.0 → 2.22.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/sdk/types.gen.ts CHANGED
@@ -3447,6 +3447,18 @@ export type CreateEventBlockRequest = {
3447
3447
  * Accounting recognition date, if different from occurred_at
3448
3448
  */
3449
3449
  effective_at?: string | null;
3450
+ /**
3451
+ * Due Date
3452
+ *
3453
+ * When an obligation falls due: an `invoice_issued` or a `bill_received`. Give it, or `terms_days`; with neither, the obligation is due on receipt. Refused on any other event type.
3454
+ */
3455
+ due_date?: string | null;
3456
+ /**
3457
+ * Terms Days
3458
+ *
3459
+ * Net terms in days from `occurred_at` (30 for net 30), in place of `due_date`. Only on an `invoice_issued` or a `bill_received`.
3460
+ */
3461
+ terms_days?: number | null;
3450
3462
  /**
3451
3463
  * Source
3452
3464
  *
@@ -5354,6 +5366,26 @@ export type Dimension = {
5354
5366
  */
5355
5367
  export type DimensionType = 'element' | 'period' | 'entity';
5356
5368
 
5369
+ /**
5370
+ * DischargeAllocation
5371
+ *
5372
+ * How much of a payment went to one invoice or bill.
5373
+ */
5374
+ export type DischargeAllocation = {
5375
+ /**
5376
+ * Obligation Event Id
5377
+ *
5378
+ * The `invoice_issued` or `bill_received` event it settles.
5379
+ */
5380
+ obligation_event_id: string;
5381
+ /**
5382
+ * Amount
5383
+ *
5384
+ * Positive cents of the payment applied to it.
5385
+ */
5386
+ amount: number;
5387
+ };
5388
+
5357
5389
  /**
5358
5390
  * DisclosuresRequest
5359
5391
  *
@@ -6317,6 +6349,12 @@ export type EventBlockEnvelope = {
6317
6349
  * Accounting recognition date, when different from `occurred_at`.
6318
6350
  */
6319
6351
  effective_at?: string | null;
6352
+ /**
6353
+ * Due Date
6354
+ *
6355
+ * When the obligation falls due (an `invoice_issued` or a `bill_received`); null when none was stated, which reads as due on receipt, and on every other event type.
6356
+ */
6357
+ due_date?: string | null;
6320
6358
  /**
6321
6359
  * Source
6322
6360
  *
@@ -21220,6 +21258,12 @@ export type UpdateEventBlockRequest = {
21220
21258
  * New accounting recognition date. Unset = unchanged. Useful when an event was captured against the wrong period.
21221
21259
  */
21222
21260
  effective_at?: string | null;
21261
+ /**
21262
+ * Due Date
21263
+ *
21264
+ * New due date of an obligation (an `invoice_issued` or a `bill_received`), such as an extension granted. Unset = unchanged. It moves no ledger row, so it is accepted in a closed period.
21265
+ */
21266
+ due_date?: string | null;
21223
21267
  /**
21224
21268
  * Metadata Patch
21225
21269
  *
@@ -21243,9 +21287,15 @@ export type UpdateEventBlockRequest = {
21243
21287
  /**
21244
21288
  * Discharges Event Id
21245
21289
  *
21246
- * Set/update the settlement link.
21290
+ * Set the settlement link: the one invoice or bill this payment settles, at its full amount; an empty string clears it. Replaces any `discharge_allocations`. Checked as they are.
21247
21291
  */
21248
21292
  discharges_event_id?: string | null;
21293
+ /**
21294
+ * Discharge Allocations
21295
+ *
21296
+ * What this payment settles, document by document: one row per invoice or bill with the positive cents applied to it, together at most the payment's amount (the rest is unapplied). Replaces any held; an empty list clears them, and the settlement link becomes the first row's. Each must be an obligation of this event's entity, not voided: an invoice for money in, a bill for money out. A person chooses them; the open items a bank line may settle are `dischargeCandidates` over GraphQL.
21297
+ */
21298
+ discharge_allocations?: Array<DischargeAllocation> | null;
21249
21299
  /**
21250
21300
  * Document Id
21251
21301
  *
package/sdk.gen.d.ts CHANGED
@@ -1054,7 +1054,7 @@ export declare const acceptSuggestions: <ThrowOnError extends boolean = false>(o
1054
1054
  /**
1055
1055
  * Create Event Block
1056
1056
  *
1057
- * Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice.
1057
+ * Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from occurred_at); with neither it is due on receipt. A later due date is a field correction on update-event-block.
1058
1058
  *
1059
1059
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1060
1060
  */
@@ -1062,7 +1062,7 @@ export declare const createEventBlock: <ThrowOnError extends boolean = false>(op
1062
1062
  /**
1063
1063
  * Update Event Block
1064
1064
  *
1065
- * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it.
1065
+ * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it. A payment or bank line records the invoices or bills it settles with `discharge_allocations` (positive cents per document, together at most its amount) or one `discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own entity, not voided.
1066
1066
  *
1067
1067
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
1068
1068
  */
package/sdk.gen.js CHANGED
@@ -2164,7 +2164,7 @@ exports.acceptSuggestions = acceptSuggestions;
2164
2164
  /**
2165
2165
  * Create Event Block
2166
2166
  *
2167
- * Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice.
2167
+ * Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from occurred_at); with neither it is due on receipt. A later due date is a field correction on update-event-block.
2168
2168
  *
2169
2169
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2170
2170
  */
@@ -2181,7 +2181,7 @@ exports.createEventBlock = createEventBlock;
2181
2181
  /**
2182
2182
  * Update Event Block
2183
2183
  *
2184
- * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it.
2184
+ * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it. A payment or bank line records the invoices or bills it settles with `discharge_allocations` (positive cents per document, together at most its amount) or one `discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own entity, not voided.
2185
2185
  *
2186
2186
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2187
2187
  */
package/sdk.gen.ts CHANGED
@@ -2175,7 +2175,7 @@ export const acceptSuggestions = <ThrowOnError extends boolean = false>(options:
2175
2175
  /**
2176
2176
  * Create Event Block
2177
2177
  *
2178
- * Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice.
2178
+ * Persist a real-world business event. apply_handlers=False (default): capture-only, status='captured'. apply_handlers=True: resolves an event_handler, fires the template, creates GL entries atomically, status='classified'. Use preview-event-block to dry-run before committing. For journal_entry_recorded, whether the entry writes back to a connected source system follows `source` (schedule/manual publish; system does not) unless metadata.publish_to_source says otherwise — set it false for an alignment entry mirroring a change already made upstream, which would otherwise be applied twice. An invoice_issued or bill_received takes due_date, or terms_days (net N from occurred_at); with neither it is due on receipt. A later due date is a field correction on update-event-block.
2179
2179
  *
2180
2180
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2181
2181
  */
@@ -2192,7 +2192,7 @@ export const createEventBlock = <ThrowOnError extends boolean = false>(options:
2192
2192
  /**
2193
2193
  * Update Event Block
2194
2194
  *
2195
- * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it.
2195
+ * Apply a status transition (captured → classified | committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. captured → classified records an account choice without posting — for a bank-feed line, patch metadata.classified_element_id (or accept_suggestion: true) in the same call. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows, unless it already wrote them when the event was created; a bank-feed line with no account chosen and no matching rule is refused. Errors from the handler (validation, element resolution, closed period, unbalanced lines) surface as 422 here so the inbox UI can display the failure reason without retry. A bank line's flow is a second classification beside its account, overriding the account's default flow on the cash flow and equity statements: patch `classified_flow_qname` (or `flow_qname` on each `classified_allocations` part) with an rs-gaap flow concept such as `rs-gaap:ProceedsFromIssuanceOfLongTermDebt`. On a line that has already posted, this re-tags its lines in place, in a closed month too, since no balance moves; an empty string clears it. A payment or bank line records the invoices or bills it settles with `discharge_allocations` (positive cents per document, together at most its amount) or one `discharges_event_id`; each is checked: an invoice for money in, a bill for money out, on its own entity, not voided.
2196
2196
  *
2197
2197
  * **Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.
2198
2198
  */
package/types.gen.d.ts CHANGED
@@ -3366,6 +3366,18 @@ export type CreateEventBlockRequest = {
3366
3366
  * Accounting recognition date, if different from occurred_at
3367
3367
  */
3368
3368
  effective_at?: string | null;
3369
+ /**
3370
+ * Due Date
3371
+ *
3372
+ * When an obligation falls due: an `invoice_issued` or a `bill_received`. Give it, or `terms_days`; with neither, the obligation is due on receipt. Refused on any other event type.
3373
+ */
3374
+ due_date?: string | null;
3375
+ /**
3376
+ * Terms Days
3377
+ *
3378
+ * Net terms in days from `occurred_at` (30 for net 30), in place of `due_date`. Only on an `invoice_issued` or a `bill_received`.
3379
+ */
3380
+ terms_days?: number | null;
3369
3381
  /**
3370
3382
  * Source
3371
3383
  *
@@ -5224,6 +5236,25 @@ export type Dimension = {
5224
5236
  * DimensionType
5225
5237
  */
5226
5238
  export type DimensionType = 'element' | 'period' | 'entity';
5239
+ /**
5240
+ * DischargeAllocation
5241
+ *
5242
+ * How much of a payment went to one invoice or bill.
5243
+ */
5244
+ export type DischargeAllocation = {
5245
+ /**
5246
+ * Obligation Event Id
5247
+ *
5248
+ * The `invoice_issued` or `bill_received` event it settles.
5249
+ */
5250
+ obligation_event_id: string;
5251
+ /**
5252
+ * Amount
5253
+ *
5254
+ * Positive cents of the payment applied to it.
5255
+ */
5256
+ amount: number;
5257
+ };
5227
5258
  /**
5228
5259
  * DisclosuresRequest
5229
5260
  *
@@ -6164,6 +6195,12 @@ export type EventBlockEnvelope = {
6164
6195
  * Accounting recognition date, when different from `occurred_at`.
6165
6196
  */
6166
6197
  effective_at?: string | null;
6198
+ /**
6199
+ * Due Date
6200
+ *
6201
+ * When the obligation falls due (an `invoice_issued` or a `bill_received`); null when none was stated, which reads as due on receipt, and on every other event type.
6202
+ */
6203
+ due_date?: string | null;
6167
6204
  /**
6168
6205
  * Source
6169
6206
  *
@@ -20727,6 +20764,12 @@ export type UpdateEventBlockRequest = {
20727
20764
  * New accounting recognition date. Unset = unchanged. Useful when an event was captured against the wrong period.
20728
20765
  */
20729
20766
  effective_at?: string | null;
20767
+ /**
20768
+ * Due Date
20769
+ *
20770
+ * New due date of an obligation (an `invoice_issued` or a `bill_received`), such as an extension granted. Unset = unchanged. It moves no ledger row, so it is accepted in a closed period.
20771
+ */
20772
+ due_date?: string | null;
20730
20773
  /**
20731
20774
  * Metadata Patch
20732
20775
  *
@@ -20750,9 +20793,15 @@ export type UpdateEventBlockRequest = {
20750
20793
  /**
20751
20794
  * Discharges Event Id
20752
20795
  *
20753
- * Set/update the settlement link.
20796
+ * Set the settlement link: the one invoice or bill this payment settles, at its full amount; an empty string clears it. Replaces any `discharge_allocations`. Checked as they are.
20754
20797
  */
20755
20798
  discharges_event_id?: string | null;
20799
+ /**
20800
+ * Discharge Allocations
20801
+ *
20802
+ * What this payment settles, document by document: one row per invoice or bill with the positive cents applied to it, together at most the payment's amount (the rest is unapplied). Replaces any held; an empty list clears them, and the settlement link becomes the first row's. Each must be an obligation of this event's entity, not voided: an invoice for money in, a bill for money out. A person chooses them; the open items a bank line may settle are `dischargeCandidates` over GraphQL.
20803
+ */
20804
+ discharge_allocations?: Array<DischargeAllocation> | null;
20756
20805
  /**
20757
20806
  * Document Id
20758
20807
  *
package/types.gen.ts CHANGED
@@ -3447,6 +3447,18 @@ export type CreateEventBlockRequest = {
3447
3447
  * Accounting recognition date, if different from occurred_at
3448
3448
  */
3449
3449
  effective_at?: string | null;
3450
+ /**
3451
+ * Due Date
3452
+ *
3453
+ * When an obligation falls due: an `invoice_issued` or a `bill_received`. Give it, or `terms_days`; with neither, the obligation is due on receipt. Refused on any other event type.
3454
+ */
3455
+ due_date?: string | null;
3456
+ /**
3457
+ * Terms Days
3458
+ *
3459
+ * Net terms in days from `occurred_at` (30 for net 30), in place of `due_date`. Only on an `invoice_issued` or a `bill_received`.
3460
+ */
3461
+ terms_days?: number | null;
3450
3462
  /**
3451
3463
  * Source
3452
3464
  *
@@ -5354,6 +5366,26 @@ export type Dimension = {
5354
5366
  */
5355
5367
  export type DimensionType = 'element' | 'period' | 'entity';
5356
5368
 
5369
+ /**
5370
+ * DischargeAllocation
5371
+ *
5372
+ * How much of a payment went to one invoice or bill.
5373
+ */
5374
+ export type DischargeAllocation = {
5375
+ /**
5376
+ * Obligation Event Id
5377
+ *
5378
+ * The `invoice_issued` or `bill_received` event it settles.
5379
+ */
5380
+ obligation_event_id: string;
5381
+ /**
5382
+ * Amount
5383
+ *
5384
+ * Positive cents of the payment applied to it.
5385
+ */
5386
+ amount: number;
5387
+ };
5388
+
5357
5389
  /**
5358
5390
  * DisclosuresRequest
5359
5391
  *
@@ -6317,6 +6349,12 @@ export type EventBlockEnvelope = {
6317
6349
  * Accounting recognition date, when different from `occurred_at`.
6318
6350
  */
6319
6351
  effective_at?: string | null;
6352
+ /**
6353
+ * Due Date
6354
+ *
6355
+ * When the obligation falls due (an `invoice_issued` or a `bill_received`); null when none was stated, which reads as due on receipt, and on every other event type.
6356
+ */
6357
+ due_date?: string | null;
6320
6358
  /**
6321
6359
  * Source
6322
6360
  *
@@ -21220,6 +21258,12 @@ export type UpdateEventBlockRequest = {
21220
21258
  * New accounting recognition date. Unset = unchanged. Useful when an event was captured against the wrong period.
21221
21259
  */
21222
21260
  effective_at?: string | null;
21261
+ /**
21262
+ * Due Date
21263
+ *
21264
+ * New due date of an obligation (an `invoice_issued` or a `bill_received`), such as an extension granted. Unset = unchanged. It moves no ledger row, so it is accepted in a closed period.
21265
+ */
21266
+ due_date?: string | null;
21223
21267
  /**
21224
21268
  * Metadata Patch
21225
21269
  *
@@ -21243,9 +21287,15 @@ export type UpdateEventBlockRequest = {
21243
21287
  /**
21244
21288
  * Discharges Event Id
21245
21289
  *
21246
- * Set/update the settlement link.
21290
+ * Set the settlement link: the one invoice or bill this payment settles, at its full amount; an empty string clears it. Replaces any `discharge_allocations`. Checked as they are.
21247
21291
  */
21248
21292
  discharges_event_id?: string | null;
21293
+ /**
21294
+ * Discharge Allocations
21295
+ *
21296
+ * What this payment settles, document by document: one row per invoice or bill with the positive cents applied to it, together at most the payment's amount (the rest is unapplied). Replaces any held; an empty list clears them, and the settlement link becomes the first row's. Each must be an obligation of this event's entity, not voided: an invoice for money in, a bill for money out. A person chooses them; the open items a bank line may settle are `dischargeCandidates` over GraphQL.
21297
+ */
21298
+ discharge_allocations?: Array<DischargeAllocation> | null;
21249
21299
  /**
21250
21300
  * Document Id
21251
21301
  *