@robosystems/client 1.16.0 → 1.17.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/sdk.gen.js CHANGED
@@ -584,7 +584,7 @@ exports.getOrgUsage = getOrgUsage;
584
584
  /**
585
585
  * Sync Connection
586
586
  *
587
- * QuickBooks: fetches transactions, balances, and chart of accounts; the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
587
+ * QuickBooks: fetches transactions, balances, and chart of accounts. Mercury: pulls the bank feed (a 60-day window by default, or from `since_date` / the full backfill on `full_rebuild`) and captures it into the inbox. For both the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp and `last_sync_result`. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
588
588
  */
589
589
  const syncConnection = (options) => (options.client ?? client_gen_1.client).post({
590
590
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -599,7 +599,7 @@ exports.syncConnection = syncConnection;
599
599
  /**
600
600
  * List Connection Options
601
601
  *
602
- * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks requires OAuth 2.0; external connections require no auth.
602
+ * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks and Mercury require OAuth 2.0; external connections require no auth.
603
603
  */
604
604
  const getConnectionOptions = (options) => (options.client ?? client_gen_1.client).get({
605
605
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -647,7 +647,7 @@ exports.listConnections = listConnections;
647
647
  /**
648
648
  * Create Connection
649
649
  *
650
- * QuickBooks: returns an OAuth URL — complete the flow to activate. External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name.
650
+ * QuickBooks and Mercury: returns a pending connection — complete the OAuth flow to activate (Mercury may instead connect at once with a personal API token where the deployment allows it). External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name. A bank feed (Mercury) is refused (409) beside a live QuickBooks connection or on a graph with no chart of accounts.
651
651
  */
652
652
  const createConnection = (options) => (options.client ?? client_gen_1.client).post({
653
653
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1736,7 +1736,7 @@ exports.initializeChartOfAccounts = initializeChartOfAccounts;
1736
1736
  /**
1737
1737
  * Update Taxonomy Block
1738
1738
  *
1739
- * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1739
+ * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. For a chart of accounts: add, rename and reclassify accounts freely; an account with facts or line items is never removed — retire it with `elements_to_update[].is_active=false` (history stays, new postings are refused, pickers hide it; `true` reactivates). Removal and whole-chart delete work only with no activity. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1740
1740
  *
1741
1741
  * **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.
1742
1742
  */
@@ -2025,7 +2025,7 @@ exports.createEventBlock = createEventBlock;
2025
2025
  /**
2026
2026
  * Update Event Block
2027
2027
  *
2028
- * Apply a status transition (captured → committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; 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.
2028
+ * 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; 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.
2029
2029
  *
2030
2030
  * **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.
2031
2031
  */
@@ -2144,7 +2144,7 @@ exports.resolveReconcilingItem = resolveReconcilingItem;
2144
2144
  /**
2145
2145
  * Update Journal Entry
2146
2146
  *
2147
- * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically and the new set must balance.
2147
+ * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (`is_active=false`) account is refused.
2148
2148
  *
2149
2149
  * **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.
2150
2150
  */
package/sdk/sdk.gen.ts CHANGED
@@ -596,7 +596,7 @@ export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Optio
596
596
  /**
597
597
  * Sync Connection
598
598
  *
599
- * QuickBooks: fetches transactions, balances, and chart of accounts; the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
599
+ * QuickBooks: fetches transactions, balances, and chart of accounts. Mercury: pulls the bank feed (a 60-day window by default, or from `since_date` / the full backfill on `full_rebuild`) and captures it into the inbox. For both the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp and `last_sync_result`. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
600
600
  */
601
601
  export const syncConnection = <ThrowOnError extends boolean = false>(options: Options<SyncConnectionData, ThrowOnError>): RequestResult<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError> => (options.client ?? client).post<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError>({
602
602
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -611,7 +611,7 @@ export const syncConnection = <ThrowOnError extends boolean = false>(options: Op
611
611
  /**
612
612
  * List Connection Options
613
613
  *
614
- * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks requires OAuth 2.0; external connections require no auth.
614
+ * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks and Mercury require OAuth 2.0; external connections require no auth.
615
615
  */
616
616
  export const getConnectionOptions = <ThrowOnError extends boolean = false>(options: Options<GetConnectionOptionsData, ThrowOnError>): RequestResult<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError> => (options.client ?? client).get<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError>({
617
617
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -659,7 +659,7 @@ export const listConnections = <ThrowOnError extends boolean = false>(options: O
659
659
  /**
660
660
  * Create Connection
661
661
  *
662
- * QuickBooks: returns an OAuth URL — complete the flow to activate. External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name.
662
+ * QuickBooks and Mercury: returns a pending connection — complete the OAuth flow to activate (Mercury may instead connect at once with a personal API token where the deployment allows it). External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name. A bank feed (Mercury) is refused (409) beside a live QuickBooks connection or on a graph with no chart of accounts.
663
663
  */
664
664
  export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>): RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError> => (options.client ?? client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
665
665
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1748,7 +1748,7 @@ export const initializeChartOfAccounts = <ThrowOnError extends boolean = false>(
1748
1748
  /**
1749
1749
  * Update Taxonomy Block
1750
1750
  *
1751
- * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1751
+ * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. For a chart of accounts: add, rename and reclassify accounts freely; an account with facts or line items is never removed — retire it with `elements_to_update[].is_active=false` (history stays, new postings are refused, pickers hide it; `true` reactivates). Removal and whole-chart delete work only with no activity. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1752
1752
  *
1753
1753
  * **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.
1754
1754
  */
@@ -2037,7 +2037,7 @@ export const createEventBlock = <ThrowOnError extends boolean = false>(options:
2037
2037
  /**
2038
2038
  * Update Event Block
2039
2039
  *
2040
- * Apply a status transition (captured → committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; 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.
2040
+ * 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; 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.
2041
2041
  *
2042
2042
  * **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.
2043
2043
  */
@@ -2156,7 +2156,7 @@ export const resolveReconcilingItem = <ThrowOnError extends boolean = false>(opt
2156
2156
  /**
2157
2157
  * Update Journal Entry
2158
2158
  *
2159
- * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically and the new set must balance.
2159
+ * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (`is_active=false`) account is refused.
2160
2160
  *
2161
2161
  * **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.
2162
2162
  */
@@ -2018,7 +2018,7 @@ export type ConnectionProviderInfo = {
2018
2018
  *
2019
2019
  * Provider identifier
2020
2020
  */
2021
- provider: 'quickbooks' | 'external';
2021
+ provider: 'quickbooks' | 'external' | 'mercury';
2022
2022
  /**
2023
2023
  * Display Name
2024
2024
  *
@@ -2411,7 +2411,7 @@ export type CreateConnectionRequest = {
2411
2411
  *
2412
2412
  * Connection provider type
2413
2413
  */
2414
- provider: 'quickbooks' | 'external';
2414
+ provider: 'quickbooks' | 'external' | 'mercury';
2415
2415
  /**
2416
2416
  * Entity Id
2417
2417
  *
@@ -2420,6 +2420,7 @@ export type CreateConnectionRequest = {
2420
2420
  entity_id?: string | null;
2421
2421
  quickbooks_config?: QuickBooksConnectionConfig | null;
2422
2422
  external_config?: ExternalConnectionConfig | null;
2423
+ mercury_config?: MercuryConnectionConfig | null;
2423
2424
  };
2424
2425
  /**
2425
2426
  * CreateEventBlockRequest
@@ -4639,6 +4640,12 @@ export type ElementUpdatePatch = {
4639
4640
  metadata?: {
4640
4641
  [key: string]: unknown;
4641
4642
  } | null;
4643
+ /**
4644
+ * Is Active
4645
+ *
4646
+ * Retire (`false`) or reactivate (`true`) a chart account. Retiring keeps its history and hides it from account pickers and the chart tree, and new line items on it are refused — the way to take an account with activity out of use, since removal needs no facts and no line items.
4647
+ */
4648
+ is_active?: boolean | null;
4642
4649
  };
4643
4650
  /**
4644
4651
  * EmailVerificationRequest
@@ -8697,6 +8704,39 @@ export type MemoryRecord = {
8697
8704
  */
8698
8705
  updated_at?: string | null;
8699
8706
  };
8707
+ /**
8708
+ * MercuryConnectionConfig
8709
+ *
8710
+ * Mercury bank-feed connection configuration.
8711
+ *
8712
+ * A bank feed is native accounting: the graph must already have a chart of
8713
+ * accounts and no live QuickBooks connection. Over OAuth (the hosted
8714
+ * default) the connection is created ``pending_oauth`` and activated by the
8715
+ * callback. ``api_key`` — a personal **read-only** Mercury token — connects
8716
+ * at once without a browser round-trip, but only on deployments that turn
8717
+ * on ``MERCURY_API_KEY_CONNECTIONS_ENABLED`` (self-hosted and local); the
8718
+ * hosted product refuses it.
8719
+ */
8720
+ export type MercuryConnectionConfig = {
8721
+ /**
8722
+ * Since Date
8723
+ *
8724
+ * First day of the backfill (ISO 8601). Defaults to 1 January of last year. Incremental syncs never look back before it.
8725
+ */
8726
+ since_date?: string | null;
8727
+ /**
8728
+ * Include Treasury
8729
+ *
8730
+ * Capture treasury-account activity alongside checking/savings.
8731
+ */
8732
+ include_treasury?: boolean;
8733
+ /**
8734
+ * Api Key
8735
+ *
8736
+ * A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
8737
+ */
8738
+ api_key?: string | null;
8739
+ };
8700
8740
  /**
8701
8741
  * MetricMechanics
8702
8742
  *
@@ -16619,9 +16659,9 @@ export type UpdateEventBlockRequest = {
16619
16659
  /**
16620
16660
  * Transition To
16621
16661
  *
16622
- * Status transition. Valid moves depend on current status: captured → committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. Note: classified and fulfilled are usually set by handlers, not by callers, but the transition is allowed for corrections.
16662
+ * Status transition. Valid moves depend on current status: captured → classified | committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. captured → classified records an account choice without posting (bank-feed lines: patch classified_element_id, or accept_suggestion: true, in the same call); the later commit fires the handler. Note: classified and fulfilled are otherwise set by handlers, not by callers, but the transition is allowed for corrections.
16623
16663
  */
16624
- transition_to?: 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
16664
+ transition_to?: 'classified' | 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
16625
16665
  /**
16626
16666
  * Superseded By Id
16627
16667
  *
@@ -20303,7 +20343,7 @@ export type ListConnectionsData = {
20303
20343
  *
20304
20344
  * Filter by provider type
20305
20345
  */
20306
- provider?: 'quickbooks' | 'external' | null;
20346
+ provider?: 'quickbooks' | 'external' | 'mercury' | null;
20307
20347
  };
20308
20348
  url: '/v1/graphs/{graph_id}/connections';
20309
20349
  };
package/sdk/types.gen.ts CHANGED
@@ -2074,7 +2074,7 @@ export type ConnectionProviderInfo = {
2074
2074
  *
2075
2075
  * Provider identifier
2076
2076
  */
2077
- provider: 'quickbooks' | 'external';
2077
+ provider: 'quickbooks' | 'external' | 'mercury';
2078
2078
  /**
2079
2079
  * Display Name
2080
2080
  *
@@ -2475,7 +2475,7 @@ export type CreateConnectionRequest = {
2475
2475
  *
2476
2476
  * Connection provider type
2477
2477
  */
2478
- provider: 'quickbooks' | 'external';
2478
+ provider: 'quickbooks' | 'external' | 'mercury';
2479
2479
  /**
2480
2480
  * Entity Id
2481
2481
  *
@@ -2484,6 +2484,7 @@ export type CreateConnectionRequest = {
2484
2484
  entity_id?: string | null;
2485
2485
  quickbooks_config?: QuickBooksConnectionConfig | null;
2486
2486
  external_config?: ExternalConnectionConfig | null;
2487
+ mercury_config?: MercuryConnectionConfig | null;
2487
2488
  };
2488
2489
 
2489
2490
  /**
@@ -4759,6 +4760,12 @@ export type ElementUpdatePatch = {
4759
4760
  metadata?: {
4760
4761
  [key: string]: unknown;
4761
4762
  } | null;
4763
+ /**
4764
+ * Is Active
4765
+ *
4766
+ * Retire (`false`) or reactivate (`true`) a chart account. Retiring keeps its history and hides it from account pickers and the chart tree, and new line items on it are refused — the way to take an account with activity out of use, since removal needs no facts and no line items.
4767
+ */
4768
+ is_active?: boolean | null;
4762
4769
  };
4763
4770
 
4764
4771
  /**
@@ -8905,6 +8912,40 @@ export type MemoryRecord = {
8905
8912
  updated_at?: string | null;
8906
8913
  };
8907
8914
 
8915
+ /**
8916
+ * MercuryConnectionConfig
8917
+ *
8918
+ * Mercury bank-feed connection configuration.
8919
+ *
8920
+ * A bank feed is native accounting: the graph must already have a chart of
8921
+ * accounts and no live QuickBooks connection. Over OAuth (the hosted
8922
+ * default) the connection is created ``pending_oauth`` and activated by the
8923
+ * callback. ``api_key`` — a personal **read-only** Mercury token — connects
8924
+ * at once without a browser round-trip, but only on deployments that turn
8925
+ * on ``MERCURY_API_KEY_CONNECTIONS_ENABLED`` (self-hosted and local); the
8926
+ * hosted product refuses it.
8927
+ */
8928
+ export type MercuryConnectionConfig = {
8929
+ /**
8930
+ * Since Date
8931
+ *
8932
+ * First day of the backfill (ISO 8601). Defaults to 1 January of last year. Incremental syncs never look back before it.
8933
+ */
8934
+ since_date?: string | null;
8935
+ /**
8936
+ * Include Treasury
8937
+ *
8938
+ * Capture treasury-account activity alongside checking/savings.
8939
+ */
8940
+ include_treasury?: boolean;
8941
+ /**
8942
+ * Api Key
8943
+ *
8944
+ * A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
8945
+ */
8946
+ api_key?: string | null;
8947
+ };
8948
+
8908
8949
  /**
8909
8950
  * MetricMechanics
8910
8951
  *
@@ -17035,9 +17076,9 @@ export type UpdateEventBlockRequest = {
17035
17076
  /**
17036
17077
  * Transition To
17037
17078
  *
17038
- * Status transition. Valid moves depend on current status: captured → committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. Note: classified and fulfilled are usually set by handlers, not by callers, but the transition is allowed for corrections.
17079
+ * Status transition. Valid moves depend on current status: captured → classified | committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. captured → classified records an account choice without posting (bank-feed lines: patch classified_element_id, or accept_suggestion: true, in the same call); the later commit fires the handler. Note: classified and fulfilled are otherwise set by handlers, not by callers, but the transition is allowed for corrections.
17039
17080
  */
17040
- transition_to?: 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
17081
+ transition_to?: 'classified' | 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
17041
17082
  /**
17042
17083
  * Superseded By Id
17043
17084
  *
@@ -21041,7 +21082,7 @@ export type ListConnectionsData = {
21041
21082
  *
21042
21083
  * Filter by provider type
21043
21084
  */
21044
- provider?: 'quickbooks' | 'external' | null;
21085
+ provider?: 'quickbooks' | 'external' | 'mercury' | null;
21045
21086
  };
21046
21087
  url: '/v1/graphs/{graph_id}/connections';
21047
21088
  };
package/sdk.gen.d.ts CHANGED
@@ -304,13 +304,13 @@ export declare const getOrgUsage: <ThrowOnError extends boolean = false>(options
304
304
  /**
305
305
  * Sync Connection
306
306
  *
307
- * QuickBooks: fetches transactions, balances, and chart of accounts; the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
307
+ * QuickBooks: fetches transactions, balances, and chart of accounts. Mercury: pulls the bank feed (a 60-day window by default, or from `since_date` / the full backfill on `full_rebuild`) and captures it into the inbox. For both the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp and `last_sync_result`. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
308
308
  */
309
309
  export declare const syncConnection: <ThrowOnError extends boolean = false>(options: Options<SyncConnectionData, ThrowOnError>) => RequestResult<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError>;
310
310
  /**
311
311
  * List Connection Options
312
312
  *
313
- * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks requires OAuth 2.0; external connections require no auth.
313
+ * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks and Mercury require OAuth 2.0; external connections require no auth.
314
314
  */
315
315
  export declare const getConnectionOptions: <ThrowOnError extends boolean = false>(options: Options<GetConnectionOptionsData, ThrowOnError>) => RequestResult<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError>;
316
316
  /**
@@ -330,7 +330,7 @@ export declare const listConnections: <ThrowOnError extends boolean = false>(opt
330
330
  /**
331
331
  * Create Connection
332
332
  *
333
- * QuickBooks: returns an OAuth URL — complete the flow to activate. External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name.
333
+ * QuickBooks and Mercury: returns a pending connection — complete the OAuth flow to activate (Mercury may instead connect at once with a personal API token where the deployment allows it). External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name. A bank feed (Mercury) is refused (409) beside a live QuickBooks connection or on a graph with no chart of accounts.
334
334
  */
335
335
  export declare const createConnection: <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>;
336
336
  /**
@@ -846,7 +846,7 @@ export declare const initializeChartOfAccounts: <ThrowOnError extends boolean =
846
846
  /**
847
847
  * Update Taxonomy Block
848
848
  *
849
- * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
849
+ * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. For a chart of accounts: add, rename and reclassify accounts freely; an account with facts or line items is never removed — retire it with `elements_to_update[].is_active=false` (history stays, new postings are refused, pickers hide it; `true` reactivates). Removal and whole-chart delete work only with no activity. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
850
850
  *
851
851
  * **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.
852
852
  */
@@ -982,7 +982,7 @@ export declare const createEventBlock: <ThrowOnError extends boolean = false>(op
982
982
  /**
983
983
  * Update Event Block
984
984
  *
985
- * Apply a status transition (captured → committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; 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.
985
+ * 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; 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.
986
986
  *
987
987
  * **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.
988
988
  */
@@ -1038,7 +1038,7 @@ export declare const resolveReconcilingItem: <ThrowOnError extends boolean = fal
1038
1038
  /**
1039
1039
  * Update Journal Entry
1040
1040
  *
1041
- * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically and the new set must balance.
1041
+ * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (`is_active=false`) account is refused.
1042
1042
  *
1043
1043
  * **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.
1044
1044
  */
package/sdk.gen.js CHANGED
@@ -584,7 +584,7 @@ exports.getOrgUsage = getOrgUsage;
584
584
  /**
585
585
  * Sync Connection
586
586
  *
587
- * QuickBooks: fetches transactions, balances, and chart of accounts; the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
587
+ * QuickBooks: fetches transactions, balances, and chart of accounts. Mercury: pulls the bank feed (a 60-day window by default, or from `since_date` / the full backfill on `full_rebuild`) and captures it into the inbox. For both the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp and `last_sync_result`. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
588
588
  */
589
589
  const syncConnection = (options) => (options.client ?? client_gen_1.client).post({
590
590
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -599,7 +599,7 @@ exports.syncConnection = syncConnection;
599
599
  /**
600
600
  * List Connection Options
601
601
  *
602
- * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks requires OAuth 2.0; external connections require no auth.
602
+ * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks and Mercury require OAuth 2.0; external connections require no auth.
603
603
  */
604
604
  const getConnectionOptions = (options) => (options.client ?? client_gen_1.client).get({
605
605
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -647,7 +647,7 @@ exports.listConnections = listConnections;
647
647
  /**
648
648
  * Create Connection
649
649
  *
650
- * QuickBooks: returns an OAuth URL — complete the flow to activate. External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name.
650
+ * QuickBooks and Mercury: returns a pending connection — complete the OAuth flow to activate (Mercury may instead connect at once with a personal API token where the deployment allows it). External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name. A bank feed (Mercury) is refused (409) beside a live QuickBooks connection or on a graph with no chart of accounts.
651
651
  */
652
652
  const createConnection = (options) => (options.client ?? client_gen_1.client).post({
653
653
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1736,7 +1736,7 @@ exports.initializeChartOfAccounts = initializeChartOfAccounts;
1736
1736
  /**
1737
1737
  * Update Taxonomy Block
1738
1738
  *
1739
- * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1739
+ * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. For a chart of accounts: add, rename and reclassify accounts freely; an account with facts or line items is never removed — retire it with `elements_to_update[].is_active=false` (history stays, new postings are refused, pickers hide it; `true` reactivates). Removal and whole-chart delete work only with no activity. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1740
1740
  *
1741
1741
  * **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.
1742
1742
  */
@@ -2025,7 +2025,7 @@ exports.createEventBlock = createEventBlock;
2025
2025
  /**
2026
2026
  * Update Event Block
2027
2027
  *
2028
- * Apply a status transition (captured → committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; 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.
2028
+ * 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; 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.
2029
2029
  *
2030
2030
  * **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.
2031
2031
  */
@@ -2144,7 +2144,7 @@ exports.resolveReconcilingItem = resolveReconcilingItem;
2144
2144
  /**
2145
2145
  * Update Journal Entry
2146
2146
  *
2147
- * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically and the new set must balance.
2147
+ * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (`is_active=false`) account is refused.
2148
2148
  *
2149
2149
  * **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.
2150
2150
  */
package/sdk.gen.ts CHANGED
@@ -596,7 +596,7 @@ export const getOrgUsage = <ThrowOnError extends boolean = false>(options: Optio
596
596
  /**
597
597
  * Sync Connection
598
598
  *
599
- * QuickBooks: fetches transactions, balances, and chart of accounts; the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
599
+ * QuickBooks: fetches transactions, balances, and chart of accounts. Mercury: pulls the bank feed (a 60-day window by default, or from `since_date` / the full backfill on `full_rebuild`) and captures it into the inbox. For both the envelope is `pending` with the run's `task_id`, and completion is reflected in the connection's `last_sync` timestamp and `last_sync_result`. External connections are push-based and have nothing to pull; the envelope is `completed` with a null `task_id` and a message saying so — there is nothing to poll. Returns an `OperationEnvelope`; supports `Idempotency-Key`.
600
600
  */
601
601
  export const syncConnection = <ThrowOnError extends boolean = false>(options: Options<SyncConnectionData, ThrowOnError>): RequestResult<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError> => (options.client ?? client).post<SyncConnectionResponses, SyncConnectionErrors, ThrowOnError>({
602
602
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -611,7 +611,7 @@ export const syncConnection = <ThrowOnError extends boolean = false>(options: Op
611
611
  /**
612
612
  * List Connection Options
613
613
  *
614
- * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks requires OAuth 2.0; external connections require no auth.
614
+ * Returns available providers and their requirements. Only enabled providers are included (gated by feature flags). QuickBooks and Mercury require OAuth 2.0; external connections require no auth.
615
615
  */
616
616
  export const getConnectionOptions = <ThrowOnError extends boolean = false>(options: Options<GetConnectionOptionsData, ThrowOnError>): RequestResult<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError> => (options.client ?? client).get<GetConnectionOptionsResponses, GetConnectionOptionsErrors, ThrowOnError>({
617
617
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -659,7 +659,7 @@ export const listConnections = <ThrowOnError extends boolean = false>(options: O
659
659
  /**
660
660
  * Create Connection
661
661
  *
662
- * QuickBooks: returns an OAuth URL — complete the flow to activate. External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name.
662
+ * QuickBooks and Mercury: returns a pending connection — complete the OAuth flow to activate (Mercury may instead connect at once with a personal API token where the deployment allows it). External: registers a source namespace for an integration that writes through the public API. One connection allowed per provider per graph, except 'external' which allows one per source_name. A bank feed (Mercury) is refused (409) beside a live QuickBooks connection or on a graph with no chart of accounts.
663
663
  */
664
664
  export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>): RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError> => (options.client ?? client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
665
665
  security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
@@ -1748,7 +1748,7 @@ export const initializeChartOfAccounts = <ThrowOnError extends boolean = false>(
1748
1748
  /**
1749
1749
  * Update Taxonomy Block
1750
1750
  *
1751
- * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1751
+ * Incrementally mutate a taxonomy block via typed delta lists (elements/structures/associations/rules to add, update, remove). Dispatches by the target taxonomy's stored `taxonomy_type`. For a chart of accounts: add, rename and reclassify accounts freely; an account with facts or line items is never removed — retire it with `elements_to_update[].is_active=false` (history stays, new postings are refused, pickers hide it; `true` reactivates). Removal and whole-chart delete work only with no activity. Library-origin block types (`reporting_standard`) surface 501. `reporting_extension` / `custom_ontology` authoring may be disabled per environment (TAXONOMY_AUTHORING_ENABLED) — disabled surfaces 403.
1752
1752
  *
1753
1753
  * **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.
1754
1754
  */
@@ -2037,7 +2037,7 @@ export const createEventBlock = <ThrowOnError extends boolean = false>(options:
2037
2037
  /**
2038
2038
  * Update Event Block
2039
2039
  *
2040
- * Apply a status transition (captured → committed | voided) and/or field corrections (description, effective_at, metadata_patch) to an existing event block. Only supplied fields are updated. When the transition is captured/classified → committed, the registered Python handler fires against the captured metadata to produce the GL rows; 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.
2040
+ * 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; 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.
2041
2041
  *
2042
2042
  * **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.
2043
2043
  */
@@ -2156,7 +2156,7 @@ export const resolveReconcilingItem = <ThrowOnError extends boolean = false>(opt
2156
2156
  /**
2157
2157
  * Update Journal Entry
2158
2158
  *
2159
- * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically and the new set must balance.
2159
+ * Update a draft journal entry. Posted entries are immutable and must be corrected via `create-event-block(event_type='journal_entry_reversed')`. If line_items is provided, existing line items are replaced atomically, the new set must balance, and a line on a retired (`is_active=false`) account is refused.
2160
2160
  *
2161
2161
  * **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.
2162
2162
  */
package/types.gen.d.ts CHANGED
@@ -2018,7 +2018,7 @@ export type ConnectionProviderInfo = {
2018
2018
  *
2019
2019
  * Provider identifier
2020
2020
  */
2021
- provider: 'quickbooks' | 'external';
2021
+ provider: 'quickbooks' | 'external' | 'mercury';
2022
2022
  /**
2023
2023
  * Display Name
2024
2024
  *
@@ -2411,7 +2411,7 @@ export type CreateConnectionRequest = {
2411
2411
  *
2412
2412
  * Connection provider type
2413
2413
  */
2414
- provider: 'quickbooks' | 'external';
2414
+ provider: 'quickbooks' | 'external' | 'mercury';
2415
2415
  /**
2416
2416
  * Entity Id
2417
2417
  *
@@ -2420,6 +2420,7 @@ export type CreateConnectionRequest = {
2420
2420
  entity_id?: string | null;
2421
2421
  quickbooks_config?: QuickBooksConnectionConfig | null;
2422
2422
  external_config?: ExternalConnectionConfig | null;
2423
+ mercury_config?: MercuryConnectionConfig | null;
2423
2424
  };
2424
2425
  /**
2425
2426
  * CreateEventBlockRequest
@@ -4639,6 +4640,12 @@ export type ElementUpdatePatch = {
4639
4640
  metadata?: {
4640
4641
  [key: string]: unknown;
4641
4642
  } | null;
4643
+ /**
4644
+ * Is Active
4645
+ *
4646
+ * Retire (`false`) or reactivate (`true`) a chart account. Retiring keeps its history and hides it from account pickers and the chart tree, and new line items on it are refused — the way to take an account with activity out of use, since removal needs no facts and no line items.
4647
+ */
4648
+ is_active?: boolean | null;
4642
4649
  };
4643
4650
  /**
4644
4651
  * EmailVerificationRequest
@@ -8697,6 +8704,39 @@ export type MemoryRecord = {
8697
8704
  */
8698
8705
  updated_at?: string | null;
8699
8706
  };
8707
+ /**
8708
+ * MercuryConnectionConfig
8709
+ *
8710
+ * Mercury bank-feed connection configuration.
8711
+ *
8712
+ * A bank feed is native accounting: the graph must already have a chart of
8713
+ * accounts and no live QuickBooks connection. Over OAuth (the hosted
8714
+ * default) the connection is created ``pending_oauth`` and activated by the
8715
+ * callback. ``api_key`` — a personal **read-only** Mercury token — connects
8716
+ * at once without a browser round-trip, but only on deployments that turn
8717
+ * on ``MERCURY_API_KEY_CONNECTIONS_ENABLED`` (self-hosted and local); the
8718
+ * hosted product refuses it.
8719
+ */
8720
+ export type MercuryConnectionConfig = {
8721
+ /**
8722
+ * Since Date
8723
+ *
8724
+ * First day of the backfill (ISO 8601). Defaults to 1 January of last year. Incremental syncs never look back before it.
8725
+ */
8726
+ since_date?: string | null;
8727
+ /**
8728
+ * Include Treasury
8729
+ *
8730
+ * Capture treasury-account activity alongside checking/savings.
8731
+ */
8732
+ include_treasury?: boolean;
8733
+ /**
8734
+ * Api Key
8735
+ *
8736
+ * A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
8737
+ */
8738
+ api_key?: string | null;
8739
+ };
8700
8740
  /**
8701
8741
  * MetricMechanics
8702
8742
  *
@@ -16619,9 +16659,9 @@ export type UpdateEventBlockRequest = {
16619
16659
  /**
16620
16660
  * Transition To
16621
16661
  *
16622
- * Status transition. Valid moves depend on current status: captured → committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. Note: classified and fulfilled are usually set by handlers, not by callers, but the transition is allowed for corrections.
16662
+ * Status transition. Valid moves depend on current status: captured → classified | committed | voided | superseded; classified → committed | pending | fulfilled | voided | superseded; committed → pending | fulfilled | voided | superseded; pending → fulfilled | voided | superseded; fulfilled → voided | superseded. A retraction (voided, superseded) is final and is refused from any status once the event's ledger rows have posted or it has published to QuickBooks — reverse the posted entries instead. captured → classified records an account choice without posting (bank-feed lines: patch classified_element_id, or accept_suggestion: true, in the same call); the later commit fires the handler. Note: classified and fulfilled are otherwise set by handlers, not by callers, but the transition is allowed for corrections.
16623
16663
  */
16624
- transition_to?: 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
16664
+ transition_to?: 'classified' | 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
16625
16665
  /**
16626
16666
  * Superseded By Id
16627
16667
  *
@@ -20303,7 +20343,7 @@ export type ListConnectionsData = {
20303
20343
  *
20304
20344
  * Filter by provider type
20305
20345
  */
20306
- provider?: 'quickbooks' | 'external' | null;
20346
+ provider?: 'quickbooks' | 'external' | 'mercury' | null;
20307
20347
  };
20308
20348
  url: '/v1/graphs/{graph_id}/connections';
20309
20349
  };