@robosystems/client 0.3.37 → 0.3.38

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
@@ -1188,6 +1188,12 @@ export type ConnectionResponse = {
1188
1188
  * Last sync timestamp
1189
1189
  */
1190
1190
  last_sync?: string | null;
1191
+ /**
1192
+ * Write Policy
1193
+ *
1194
+ * Source-of-truth write policy: 'native' (RoboSystems is authoritative; no outbound write-back) or 'qb_authoritative' (QuickBooks is authoritative; RoboSystems-originated entries publish to QB). Set via the write-policy endpoint.
1195
+ */
1196
+ write_policy?: string | null;
1191
1197
  /**
1192
1198
  * Metadata
1193
1199
  *
@@ -1528,7 +1534,7 @@ export type CreateEventBlockRequest = {
1528
1534
  /**
1529
1535
  * Source
1530
1536
  *
1531
- * 'quickbooks' | 'xero' | 'plaid' | 'native' | 'scheduled' | ...
1537
+ * 'manual' | 'system' | 'schedule' | 'quickbooks' | 'xero' | 'plaid'
1532
1538
  */
1533
1539
  source: string;
1534
1540
  /**
@@ -3933,7 +3939,7 @@ export type EventBlockEnvelope = {
3933
3939
  /**
3934
3940
  * Source
3935
3941
  *
3936
- * Capture source (`quickbooks`, `xero`, `plaid`, `native`, `scheduled`, ). Used for adapter routing.
3942
+ * Capture source (`manual`, `system`, `schedule`, `quickbooks`, `xero`, `plaid`). Used for adapter routing.
3937
3943
  */
3938
3944
  source: string;
3939
3945
  /**
@@ -7936,6 +7942,52 @@ export type OperationEnvelopePreviewEventBlockResponse = {
7936
7942
  idempotentReplay?: boolean;
7937
7943
  };
7938
7944
 
7945
+ /**
7946
+ * OperationEnvelope[PromoteObligationsResponse]
7947
+ */
7948
+ export type OperationEnvelopePromoteObligationsResponse = {
7949
+ /**
7950
+ * Operation
7951
+ *
7952
+ * Kebab-case operation name
7953
+ */
7954
+ operation: string;
7955
+ /**
7956
+ * Operationid
7957
+ *
7958
+ * op_-prefixed ULID for audit and SSE correlation
7959
+ */
7960
+ operationId: string;
7961
+ /**
7962
+ * Status
7963
+ *
7964
+ * Operation lifecycle state
7965
+ */
7966
+ status: 'completed' | 'pending' | 'failed';
7967
+ /**
7968
+ * Command-specific result payload
7969
+ */
7970
+ result?: PromoteObligationsResponse | null;
7971
+ /**
7972
+ * At
7973
+ *
7974
+ * ISO-8601 UTC timestamp
7975
+ */
7976
+ at: string;
7977
+ /**
7978
+ * Createdby
7979
+ *
7980
+ * User ID that initiated the operation (null for legacy callers)
7981
+ */
7982
+ createdBy?: string | null;
7983
+ /**
7984
+ * Idempotentreplay
7985
+ *
7986
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
7987
+ */
7988
+ idempotentReplay?: boolean;
7989
+ };
7990
+
7939
7991
  /**
7940
7992
  * OperationEnvelope[PublishListResponse]
7941
7993
  */
@@ -9535,6 +9587,67 @@ export type PreviewEventBlockResponse = {
9535
9587
  };
9536
9588
  };
9537
9589
 
9590
+ /**
9591
+ * PromoteObligationsRequest
9592
+ *
9593
+ * On-demand trigger for the obligation-promotion sweep.
9594
+ *
9595
+ * Mirrors what the ``scheduled_obligation_promoter`` Dagster sensor does
9596
+ * on its tick, but lets an interactive caller or an MCP close co-pilot
9597
+ * run it now instead of waiting for the background cadence — required to
9598
+ * drive a schedule-driven close to completion in a single session.
9599
+ * Flips matured ``pending`` ``schedule_entry_due`` events (period boundary
9600
+ * passed) to ``classified``; with ``dispatch_handlers`` it also drafts the
9601
+ * closing entries in the same transaction (idempotent — reconciles to an
9602
+ * existing draft).
9603
+ */
9604
+ export type PromoteObligationsRequest = {
9605
+ /**
9606
+ * Dispatch Handlers
9607
+ *
9608
+ * When True (default), also fire the schedule_entry_due handler for each promoted obligation so the draft closing entry materializes immediately (autopilot). When False, flip status only (co-pilot) — the draft is created separately.
9609
+ */
9610
+ dispatch_handlers?: boolean;
9611
+ };
9612
+
9613
+ /**
9614
+ * PromoteObligationsResponse
9615
+ *
9616
+ * Counts from a single on-demand promotion sweep.
9617
+ */
9618
+ export type PromoteObligationsResponse = {
9619
+ /**
9620
+ * Classified Count
9621
+ *
9622
+ * Matured obligations flipped pending → classified.
9623
+ */
9624
+ classified_count: number;
9625
+ /**
9626
+ * Dispatched Count
9627
+ *
9628
+ * Obligations whose closing entry was drafted this run.
9629
+ */
9630
+ dispatched_count: number;
9631
+ /**
9632
+ * Error Count
9633
+ *
9634
+ * Per-obligation handler errors (non-fatal).
9635
+ */
9636
+ error_count: number;
9637
+ /**
9638
+ * Classified Event Ids
9639
+ */
9640
+ classified_event_ids?: Array<string>;
9641
+ /**
9642
+ * Errors
9643
+ *
9644
+ * Per-obligation errors as {event_id, error}; the sweep continues past them.
9645
+ */
9646
+ errors?: Array<{
9647
+ [key: string]: string;
9648
+ }>;
9649
+ };
9650
+
9538
9651
  /**
9539
9652
  * PublishListMemberResponse
9540
9653
  *
@@ -10382,9 +10495,15 @@ export type RuleVariableLite = {
10382
10495
  /**
10383
10496
  * Variable Qname
10384
10497
  *
10385
- * Concept qname the variable resolves to, e.g. 'fac:Assets'.
10498
+ * Concept qname the variable resolves to, e.g. 'fac:Assets'. Null for tenant CoA elements (which key on `code`/`element_id`, not qname) — in that case the binding is carried by `variable_element_id`.
10499
+ */
10500
+ variable_qname?: string | null;
10501
+ /**
10502
+ * Variable Element Id
10503
+ *
10504
+ * Element id the variable binds to directly. Set for schedule SumEquals rules over CoA-debit elements that have no qname; null otherwise.
10386
10505
  */
10387
- variable_qname: string;
10506
+ variable_element_id?: string | null;
10388
10507
  };
10389
10508
 
10390
10509
  /**
@@ -11153,6 +11272,23 @@ export type SetCloseTargetOperation = {
11153
11272
  note?: string | null;
11154
11273
  };
11155
11274
 
11275
+ /**
11276
+ * SetWritePolicyRequest
11277
+ *
11278
+ * Request to set a connection's source-of-truth write policy.
11279
+ *
11280
+ * The explicit operator opt-in for outbound write-back. `hybrid` is omitted
11281
+ * until its code path ships.
11282
+ */
11283
+ export type SetWritePolicyRequest = {
11284
+ /**
11285
+ * Write Policy
11286
+ *
11287
+ * 'native' = RoboSystems authoritative, no write-back; 'qb_authoritative' = QuickBooks authoritative, entries publish to QB.
11288
+ */
11289
+ write_policy: 'native' | 'qb_authoritative';
11290
+ };
11291
+
11156
11292
  /**
11157
11293
  * ShareReportOperation
11158
11294
  *
@@ -15874,6 +16010,66 @@ export type SyncConnectionResponses = {
15874
16010
 
15875
16011
  export type SyncConnectionResponse = SyncConnectionResponses[keyof SyncConnectionResponses];
15876
16012
 
16013
+ export type SetConnectionWritePolicyData = {
16014
+ body: SetWritePolicyRequest;
16015
+ path: {
16016
+ /**
16017
+ * Graph Id
16018
+ */
16019
+ graph_id: string;
16020
+ /**
16021
+ * Connection Id
16022
+ *
16023
+ * Unique connection identifier
16024
+ */
16025
+ connection_id: string;
16026
+ };
16027
+ query?: never;
16028
+ url: '/v1/graphs/{graph_id}/connections/{connection_id}/write-policy';
16029
+ };
16030
+
16031
+ export type SetConnectionWritePolicyErrors = {
16032
+ /**
16033
+ * Invalid request
16034
+ */
16035
+ 400: ErrorResponse;
16036
+ /**
16037
+ * Authentication required
16038
+ */
16039
+ 401: ErrorResponse;
16040
+ /**
16041
+ * Access denied
16042
+ */
16043
+ 403: ErrorResponse;
16044
+ /**
16045
+ * Resource not found
16046
+ */
16047
+ 404: ErrorResponse;
16048
+ /**
16049
+ * Validation Error
16050
+ */
16051
+ 422: HttpValidationError;
16052
+ /**
16053
+ * Rate limit exceeded
16054
+ */
16055
+ 429: ErrorResponse;
16056
+ /**
16057
+ * Internal server error
16058
+ */
16059
+ 500: ErrorResponse;
16060
+ };
16061
+
16062
+ export type SetConnectionWritePolicyError = SetConnectionWritePolicyErrors[keyof SetConnectionWritePolicyErrors];
16063
+
16064
+ export type SetConnectionWritePolicyResponses = {
16065
+ /**
16066
+ * Successful Response
16067
+ */
16068
+ 200: ConnectionResponse;
16069
+ };
16070
+
16071
+ export type SetConnectionWritePolicyResponse = SetConnectionWritePolicyResponses[keyof SetConnectionWritePolicyResponses];
16072
+
15877
16073
  export type ListOperatorsData = {
15878
16074
  body?: never;
15879
16075
  path: {
@@ -21603,6 +21799,70 @@ export type OpDeleteJournalEntryResponses = {
21603
21799
 
21604
21800
  export type OpDeleteJournalEntryResponse = OpDeleteJournalEntryResponses[keyof OpDeleteJournalEntryResponses];
21605
21801
 
21802
+ export type OpPromoteObligationsData = {
21803
+ body: PromoteObligationsRequest;
21804
+ headers?: {
21805
+ /**
21806
+ * Idempotency-Key
21807
+ */
21808
+ 'Idempotency-Key'?: string | null;
21809
+ };
21810
+ path: {
21811
+ /**
21812
+ * Graph Id
21813
+ */
21814
+ graph_id: string;
21815
+ };
21816
+ query?: never;
21817
+ url: '/extensions/roboledger/{graph_id}/operations/promote-obligations';
21818
+ };
21819
+
21820
+ export type OpPromoteObligationsErrors = {
21821
+ /**
21822
+ * Invalid request
21823
+ */
21824
+ 400: ErrorResponse;
21825
+ /**
21826
+ * Authentication required
21827
+ */
21828
+ 401: ErrorResponse;
21829
+ /**
21830
+ * Access denied
21831
+ */
21832
+ 403: ErrorResponse;
21833
+ /**
21834
+ * Resource not found
21835
+ */
21836
+ 404: ErrorResponse;
21837
+ /**
21838
+ * Idempotency-Key conflict — key reused with different body
21839
+ */
21840
+ 409: ErrorResponse;
21841
+ /**
21842
+ * Validation error
21843
+ */
21844
+ 422: ErrorResponse;
21845
+ /**
21846
+ * Rate limit exceeded
21847
+ */
21848
+ 429: ErrorResponse;
21849
+ /**
21850
+ * Internal server error
21851
+ */
21852
+ 500: ErrorResponse;
21853
+ };
21854
+
21855
+ export type OpPromoteObligationsError = OpPromoteObligationsErrors[keyof OpPromoteObligationsErrors];
21856
+
21857
+ export type OpPromoteObligationsResponses = {
21858
+ /**
21859
+ * Successful Response
21860
+ */
21861
+ 200: OperationEnvelopePromoteObligationsResponse;
21862
+ };
21863
+
21864
+ export type OpPromoteObligationsResponse = OpPromoteObligationsResponses[keyof OpPromoteObligationsResponses];
21865
+
21606
21866
  export type OpSetCloseTargetData = {
21607
21867
  body: SetCloseTargetOperation;
21608
21868
  headers?: {