@robosystems/client 2.8.1 → 2.9.1

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
@@ -9128,6 +9128,110 @@ export type LineItemMetadataPredicate = {
9128
9128
  values: Array<string>;
9129
9129
  };
9130
9130
 
9131
+ /**
9132
+ * LinkBankAccountRequest
9133
+ *
9134
+ * Point a bank feed's account at a chart account.
9135
+ *
9136
+ * Name `element_id` for an existing active account, or `entity_id` alone to
9137
+ * create one in that entity's chart. The chart the account is in decides
9138
+ * whose books the feed's lines go into, so this is also how a feed account
9139
+ * is bound to a subsidiary. Lines still in the inbox move with it; posted
9140
+ * entries stay where they were posted.
9141
+ */
9142
+ export type LinkBankAccountRequest = {
9143
+ /**
9144
+ * Connection Id
9145
+ *
9146
+ * The feed's connection.
9147
+ */
9148
+ connection_id: string;
9149
+ /**
9150
+ * Account Id
9151
+ *
9152
+ * The provider's id for the account.
9153
+ */
9154
+ account_id: string;
9155
+ /**
9156
+ * Element Id
9157
+ *
9158
+ * The chart account to link; its chart's entity takes the feed.
9159
+ */
9160
+ element_id?: string | null;
9161
+ /**
9162
+ * Entity Id
9163
+ *
9164
+ * With `element_id`, the entity the account must belong to. Alone, the entity in whose chart a new account is created for the feed account.
9165
+ */
9166
+ entity_id?: string | null;
9167
+ };
9168
+
9169
+ /**
9170
+ * LinkBankAccountResponse
9171
+ *
9172
+ * What `link-bank-account` did.
9173
+ */
9174
+ export type LinkBankAccountResponse = {
9175
+ /**
9176
+ * Connection Id
9177
+ */
9178
+ connection_id: string;
9179
+ /**
9180
+ * Provider
9181
+ */
9182
+ provider: string;
9183
+ /**
9184
+ * Account Id
9185
+ */
9186
+ account_id: string;
9187
+ /**
9188
+ * Element Id
9189
+ *
9190
+ * The chart account the feed now books to.
9191
+ */
9192
+ element_id: string;
9193
+ /**
9194
+ * Previous Element Id
9195
+ */
9196
+ previous_element_id: string;
9197
+ /**
9198
+ * Entity Id
9199
+ *
9200
+ * The entity the feed's lines now belong to.
9201
+ */
9202
+ entity_id: string;
9203
+ /**
9204
+ * Account Created
9205
+ *
9206
+ * A new account was created in the entity's chart.
9207
+ */
9208
+ account_created?: boolean;
9209
+ /**
9210
+ * Events Repointed
9211
+ *
9212
+ * Inbox lines moved to the new account (posted entries stay).
9213
+ */
9214
+ events_repointed?: number;
9215
+ /**
9216
+ * Events Unclassified
9217
+ *
9218
+ * Lines returned to `captured`: their classification named an account in the previous entity's chart.
9219
+ */
9220
+ events_unclassified?: number;
9221
+ /**
9222
+ * Pairs Across Entities
9223
+ *
9224
+ * Open transfer pairs whose two legs now sit on two entities, because only one leg's account moved. Intercompany; the commit guard refuses them until the other leg follows.
9225
+ */
9226
+ pairs_across_entities?: number;
9227
+ /**
9228
+ * Changed
9229
+ *
9230
+ * False when the link already stood.
9231
+ */
9232
+ changed?: boolean;
9233
+ };
9234
+
9131
9235
  /**
9132
9236
  * LinkEntityTaxonomyRequest
9133
9237
  *
@@ -9613,6 +9717,12 @@ export type MercuryConnectionConfig = {
9613
9717
  * A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
9614
9718
  */
9615
9719
  api_key?: string | null;
9720
+ /**
9721
+ * Entity Id
9722
+ *
9723
+ * The entity whose books the feed's accounts land on: a subsidiary's id, or omit for the group parent. Required when QuickBooks keeps the parent's books. Each account can be moved to another entity later with `link-bank-account`.
9724
+ */
9725
+ entity_id?: string | null;
9616
9726
  };
9617
9727
 
9618
9728
  /**
@@ -11689,6 +11799,52 @@ export type OperationEnvelopeLedgerEntityResponse = {
11689
11799
  idempotentReplay?: boolean;
11690
11800
  };
11691
11801
 
11802
+ /**
11803
+ * OperationEnvelope[LinkBankAccountResponse]
11804
+ */
11805
+ export type OperationEnvelopeLinkBankAccountResponse = {
11806
+ /**
11807
+ * Operation
11808
+ *
11809
+ * Kebab-case operation name
11810
+ */
11811
+ operation: string;
11812
+ /**
11813
+ * Operationid
11814
+ *
11815
+ * op_-prefixed ULID for audit and SSE correlation
11816
+ */
11817
+ operationId: string;
11818
+ /**
11819
+ * Status
11820
+ *
11821
+ * Operation lifecycle state
11822
+ */
11823
+ status: 'completed' | 'pending' | 'failed';
11824
+ /**
11825
+ * Command-specific result payload
11826
+ */
11827
+ result?: LinkBankAccountResponse | null;
11828
+ /**
11829
+ * At
11830
+ *
11831
+ * ISO-8601 UTC timestamp
11832
+ */
11833
+ at: string;
11834
+ /**
11835
+ * Createdby
11836
+ *
11837
+ * User ID that initiated the operation
11838
+ */
11839
+ createdBy?: string | null;
11840
+ /**
11841
+ * Idempotentreplay
11842
+ *
11843
+ * True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
11844
+ */
11845
+ idempotentReplay?: boolean;
11846
+ };
11847
+
11692
11848
  /**
11693
11849
  * OperationEnvelope[LiveFinancialStatementResponse]
11694
11850
  */
@@ -13724,10 +13880,11 @@ export type PeriodSpec = {
13724
13880
  *
13725
13881
  * Plaid bank-feed connection configuration.
13726
13882
  *
13727
- * A bank feed is native accounting: the graph must already have a chart of
13728
- * accounts and no live QuickBooks connection. The connection is created
13729
- * `pending_oauth`; `POST /oauth/init` returns a `link_token` for Plaid
13730
- * Link, and the `public_token` Link hands back completes it through
13883
+ * A bank feed is native accounting: the entity its accounts land on must
13884
+ * already have a chart of accounts and must not be the one QuickBooks keeps
13885
+ * (the group parent, while QuickBooks is connected). The connection is
13886
+ * created `pending_oauth`; `POST /oauth/init` returns a `link_token` for
13887
+ * Plaid Link, and the `public_token` Link hands back completes it through
13731
13888
  * `POST /oauth/callback/plaid` (as `code`). One connection per institution
13732
13889
  * login; a graph can hold several.
13733
13890
  */
@@ -13738,6 +13895,12 @@ export type PlaidConnectionConfig = {
13738
13895
  * First day of the backfill (ISO 8601), and how much history Plaid is asked to pull for the new Item (at most two years). Defaults to 1 January of last year.
13739
13896
  */
13740
13897
  since_date?: string | null;
13898
+ /**
13899
+ * Entity Id
13900
+ *
13901
+ * The entity whose books the feed's accounts land on: a subsidiary's id, or omit for the group parent. Required when QuickBooks keeps the parent's books. Each account can be moved to another entity later with `link-bank-account`.
13902
+ */
13903
+ entity_id?: string | null;
13741
13904
  };
13742
13905
 
13743
13906
  /**
@@ -28534,6 +28697,70 @@ export type ChangeReportingStyleResponses = {
28534
28697
 
28535
28698
  export type ChangeReportingStyleResponse2 = ChangeReportingStyleResponses[keyof ChangeReportingStyleResponses];
28536
28699
 
28700
+ export type LinkBankAccountData = {
28701
+ body: LinkBankAccountRequest;
28702
+ headers?: {
28703
+ /**
28704
+ * Idempotency-Key
28705
+ */
28706
+ 'Idempotency-Key'?: string | null;
28707
+ };
28708
+ path: {
28709
+ /**
28710
+ * Graph Id
28711
+ */
28712
+ graph_id: string;
28713
+ };
28714
+ query?: never;
28715
+ url: '/extensions/roboledger/{graph_id}/operations/link-bank-account';
28716
+ };
28717
+
28718
+ export type LinkBankAccountErrors = {
28719
+ /**
28720
+ * Invalid request
28721
+ */
28722
+ 400: ErrorResponse;
28723
+ /**
28724
+ * Authentication required
28725
+ */
28726
+ 401: ErrorResponse;
28727
+ /**
28728
+ * Access denied
28729
+ */
28730
+ 403: ErrorResponse;
28731
+ /**
28732
+ * Resource not found
28733
+ */
28734
+ 404: ErrorResponse;
28735
+ /**
28736
+ * Idempotency-Key conflict — key reused with different body
28737
+ */
28738
+ 409: ErrorResponse;
28739
+ /**
28740
+ * Validation error
28741
+ */
28742
+ 422: ErrorResponse;
28743
+ /**
28744
+ * Rate limit exceeded
28745
+ */
28746
+ 429: ErrorResponse;
28747
+ /**
28748
+ * Internal server error
28749
+ */
28750
+ 500: ErrorResponse;
28751
+ };
28752
+
28753
+ export type LinkBankAccountError = LinkBankAccountErrors[keyof LinkBankAccountErrors];
28754
+
28755
+ export type LinkBankAccountResponses = {
28756
+ /**
28757
+ * Successful Response
28758
+ */
28759
+ 200: OperationEnvelopeLinkBankAccountResponse;
28760
+ };
28761
+
28762
+ export type LinkBankAccountResponse2 = LinkBankAccountResponses[keyof LinkBankAccountResponses];
28763
+
28537
28764
  export type CreateTaxonomyBlockData = {
28538
28765
  body: CreateTaxonomyBlockRequest;
28539
28766
  headers?: {