@robosystems/client 2.9.0 → 2.9.2
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/package.json +1 -1
- package/sdk/sdk.gen.d.ts +4 -4
- package/sdk/sdk.gen.js +4 -4
- package/sdk/sdk.gen.ts +4 -4
- package/sdk/types.gen.d.ts +49 -9
- package/sdk/types.gen.ts +49 -9
- package/sdk.gen.d.ts +4 -4
- package/sdk.gen.js +4 -4
- package/sdk.gen.ts +4 -4
- package/types.gen.d.ts +49 -9
- package/types.gen.ts +49 -9
package/package.json
CHANGED
package/sdk/sdk.gen.d.ts
CHANGED
|
@@ -320,7 +320,7 @@ export declare const listConnections: <ThrowOnError extends boolean = false>(opt
|
|
|
320
320
|
/**
|
|
321
321
|
* Create Connection
|
|
322
322
|
*
|
|
323
|
-
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) is refused (409)
|
|
323
|
+
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.
|
|
324
324
|
*/
|
|
325
325
|
export declare const createConnection: <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>;
|
|
326
326
|
/**
|
|
@@ -352,7 +352,7 @@ export declare const syncConnection: <ThrowOnError extends boolean = false>(opti
|
|
|
352
352
|
/**
|
|
353
353
|
* Set Connection Write Policy
|
|
354
354
|
*
|
|
355
|
-
*
|
|
355
|
+
* Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.
|
|
356
356
|
*/
|
|
357
357
|
export declare const setConnectionWritePolicy: <ThrowOnError extends boolean = false>(options: Options<SetConnectionWritePolicyData, ThrowOnError>) => RequestResult<SetConnectionWritePolicyResponses, SetConnectionWritePolicyErrors, ThrowOnError>;
|
|
358
358
|
/**
|
|
@@ -864,7 +864,7 @@ export declare const changeReportingStyle: <ThrowOnError extends boolean = false
|
|
|
864
864
|
/**
|
|
865
865
|
* Link Bank Account
|
|
866
866
|
*
|
|
867
|
-
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused. An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
867
|
+
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
868
868
|
*
|
|
869
869
|
* **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.
|
|
870
870
|
*/
|
|
@@ -1136,7 +1136,7 @@ export declare const setCloseTarget: <ThrowOnError extends boolean = false>(opti
|
|
|
1136
1136
|
/**
|
|
1137
1137
|
* Close Fiscal Period
|
|
1138
1138
|
*
|
|
1139
|
-
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
|
|
1139
|
+
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.
|
|
1140
1140
|
*
|
|
1141
1141
|
* **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.
|
|
1142
1142
|
*/
|
package/sdk/sdk.gen.js
CHANGED
|
@@ -614,7 +614,7 @@ exports.listConnections = listConnections;
|
|
|
614
614
|
/**
|
|
615
615
|
* Create Connection
|
|
616
616
|
*
|
|
617
|
-
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) is refused (409)
|
|
617
|
+
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.
|
|
618
618
|
*/
|
|
619
619
|
const createConnection = (options) => (options.client ?? client_gen_1.client).post({
|
|
620
620
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -692,7 +692,7 @@ exports.syncConnection = syncConnection;
|
|
|
692
692
|
/**
|
|
693
693
|
* Set Connection Write Policy
|
|
694
694
|
*
|
|
695
|
-
*
|
|
695
|
+
* Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.
|
|
696
696
|
*/
|
|
697
697
|
const setConnectionWritePolicy = (options) => (options.client ?? client_gen_1.client).put({
|
|
698
698
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1762,7 +1762,7 @@ exports.changeReportingStyle = changeReportingStyle;
|
|
|
1762
1762
|
/**
|
|
1763
1763
|
* Link Bank Account
|
|
1764
1764
|
*
|
|
1765
|
-
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused. An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1765
|
+
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1766
1766
|
*
|
|
1767
1767
|
* **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.
|
|
1768
1768
|
*/
|
|
@@ -2340,7 +2340,7 @@ exports.setCloseTarget = setCloseTarget;
|
|
|
2340
2340
|
/**
|
|
2341
2341
|
* Close Fiscal Period
|
|
2342
2342
|
*
|
|
2343
|
-
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
|
|
2343
|
+
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.
|
|
2344
2344
|
*
|
|
2345
2345
|
* **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.
|
|
2346
2346
|
*/
|
package/sdk/sdk.gen.ts
CHANGED
|
@@ -625,7 +625,7 @@ export const listConnections = <ThrowOnError extends boolean = false>(options: O
|
|
|
625
625
|
/**
|
|
626
626
|
* Create Connection
|
|
627
627
|
*
|
|
628
|
-
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) is refused (409)
|
|
628
|
+
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.
|
|
629
629
|
*/
|
|
630
630
|
export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>): RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError> => (options.client ?? client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
|
|
631
631
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -703,7 +703,7 @@ export const syncConnection = <ThrowOnError extends boolean = false>(options: Op
|
|
|
703
703
|
/**
|
|
704
704
|
* Set Connection Write Policy
|
|
705
705
|
*
|
|
706
|
-
*
|
|
706
|
+
* Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.
|
|
707
707
|
*/
|
|
708
708
|
export const setConnectionWritePolicy = <ThrowOnError extends boolean = false>(options: Options<SetConnectionWritePolicyData, ThrowOnError>): RequestResult<SetConnectionWritePolicyResponses, SetConnectionWritePolicyErrors, ThrowOnError> => (options.client ?? client).put<SetConnectionWritePolicyResponses, SetConnectionWritePolicyErrors, ThrowOnError>({
|
|
709
709
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1773,7 +1773,7 @@ export const changeReportingStyle = <ThrowOnError extends boolean = false>(optio
|
|
|
1773
1773
|
/**
|
|
1774
1774
|
* Link Bank Account
|
|
1775
1775
|
*
|
|
1776
|
-
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused. An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1776
|
+
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1777
1777
|
*
|
|
1778
1778
|
* **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.
|
|
1779
1779
|
*/
|
|
@@ -2351,7 +2351,7 @@ export const setCloseTarget = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2351
2351
|
/**
|
|
2352
2352
|
* Close Fiscal Period
|
|
2353
2353
|
*
|
|
2354
|
-
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
|
|
2354
|
+
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.
|
|
2355
2355
|
*
|
|
2356
2356
|
* **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.
|
|
2357
2357
|
*/
|
package/sdk/types.gen.d.ts
CHANGED
|
@@ -1738,6 +1738,32 @@ export type ClosePeriodResponse = {
|
|
|
1738
1738
|
* Whether the close stamped the period's canonical statement FactSets (the close-time pivot). False when the tenant hasn't set up reporting yet — see statement_stamp_note.
|
|
1739
1739
|
*/
|
|
1740
1740
|
statements_stamped?: boolean;
|
|
1741
|
+
/**
|
|
1742
|
+
* Shadow
|
|
1743
|
+
*
|
|
1744
|
+
* True when the close ran in shadow (the QuickBooks connection's write_policy is 'shadow'): nothing was written to QuickBooks, nothing posted, the in-window drafts were shadowed, and the gates that would have blocked the close are in gate_findings.
|
|
1745
|
+
*/
|
|
1746
|
+
shadow?: boolean;
|
|
1747
|
+
/**
|
|
1748
|
+
* Entries Shadowed
|
|
1749
|
+
*
|
|
1750
|
+
* Drafts a shadow close took as expectations (status 'shadowed') instead of posting. Always 0 outside shadow.
|
|
1751
|
+
*/
|
|
1752
|
+
entries_shadowed?: number;
|
|
1753
|
+
/**
|
|
1754
|
+
* Gate Findings
|
|
1755
|
+
*
|
|
1756
|
+
* Blocker codes a shadow close recorded instead of enforcing: sync_stale, pending_obligations, stranded_obligations, reconciling_items, unposted_source_events, unreconciled_accounts. Empty outside shadow.
|
|
1757
|
+
*/
|
|
1758
|
+
gate_findings?: Array<string>;
|
|
1759
|
+
/**
|
|
1760
|
+
* Gate Finding Counts
|
|
1761
|
+
*
|
|
1762
|
+
* Each finding's size: days stale for sync_stale, a count for the rest.
|
|
1763
|
+
*/
|
|
1764
|
+
gate_finding_counts?: {
|
|
1765
|
+
[key: string]: number;
|
|
1766
|
+
};
|
|
1741
1767
|
/**
|
|
1742
1768
|
* Statement Stamp Note
|
|
1743
1769
|
*
|
|
@@ -9021,7 +9047,7 @@ export type LinkBankAccountResponse = {
|
|
|
9021
9047
|
/**
|
|
9022
9048
|
* Changed
|
|
9023
9049
|
*
|
|
9024
|
-
* False when the link already stood.
|
|
9050
|
+
* False when the link already stood and no line moved.
|
|
9025
9051
|
*/
|
|
9026
9052
|
changed?: boolean;
|
|
9027
9053
|
};
|
|
@@ -9472,8 +9498,9 @@ export type MemoryRecord = {
|
|
|
9472
9498
|
*
|
|
9473
9499
|
* Mercury bank-feed connection configuration.
|
|
9474
9500
|
*
|
|
9475
|
-
* A bank feed is native accounting: the
|
|
9476
|
-
* accounts and
|
|
9501
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
9502
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
9503
|
+
* (the group parent, while QuickBooks is connected). Over OAuth (the hosted
|
|
9477
9504
|
* default) the connection is created `pending_oauth` and activated by the
|
|
9478
9505
|
* callback. `api_key` — a personal **read-only** Mercury token — connects
|
|
9479
9506
|
* at once without a browser round-trip, but only on deployments that turn
|
|
@@ -9499,6 +9526,12 @@ export type MercuryConnectionConfig = {
|
|
|
9499
9526
|
* A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
|
|
9500
9527
|
*/
|
|
9501
9528
|
api_key?: string | null;
|
|
9529
|
+
/**
|
|
9530
|
+
* Entity Id
|
|
9531
|
+
*
|
|
9532
|
+
* 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`.
|
|
9533
|
+
*/
|
|
9534
|
+
entity_id?: string | null;
|
|
9502
9535
|
};
|
|
9503
9536
|
/**
|
|
9504
9537
|
* MetricMechanics
|
|
@@ -13551,10 +13584,11 @@ export type PeriodSpec = {
|
|
|
13551
13584
|
*
|
|
13552
13585
|
* Plaid bank-feed connection configuration.
|
|
13553
13586
|
*
|
|
13554
|
-
* A bank feed is native accounting: the
|
|
13555
|
-
* accounts and
|
|
13556
|
-
*
|
|
13557
|
-
*
|
|
13587
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
13588
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
13589
|
+
* (the group parent, while QuickBooks is connected). The connection is
|
|
13590
|
+
* created `pending_oauth`; `POST /oauth/init` returns a `link_token` for
|
|
13591
|
+
* Plaid Link, and the `public_token` Link hands back completes it through
|
|
13558
13592
|
* `POST /oauth/callback/plaid` (as `code`). One connection per institution
|
|
13559
13593
|
* login; a graph can hold several.
|
|
13560
13594
|
*/
|
|
@@ -13565,6 +13599,12 @@ export type PlaidConnectionConfig = {
|
|
|
13565
13599
|
* 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.
|
|
13566
13600
|
*/
|
|
13567
13601
|
since_date?: string | null;
|
|
13602
|
+
/**
|
|
13603
|
+
* Entity Id
|
|
13604
|
+
*
|
|
13605
|
+
* 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`.
|
|
13606
|
+
*/
|
|
13607
|
+
entity_id?: string | null;
|
|
13568
13608
|
};
|
|
13569
13609
|
/**
|
|
13570
13610
|
* PortalSessionResponse
|
|
@@ -17164,9 +17204,9 @@ export type SetWritePolicyRequest = {
|
|
|
17164
17204
|
/**
|
|
17165
17205
|
* Write Policy
|
|
17166
17206
|
*
|
|
17167
|
-
* '
|
|
17207
|
+
* 'qb_authoritative' = QuickBooks authoritative, entries publish to QB; 'shadow' = QuickBooks authoritative and RoboSystems only observes: nothing is written to QuickBooks, the close posts nothing locally, its drafts become shadowed expectations and its gates are findings. 'native', books kept in RoboSystems with no write-back, is what disconnecting or severing leaves, not a choice for a live connection.
|
|
17168
17208
|
*/
|
|
17169
|
-
write_policy: '
|
|
17209
|
+
write_policy: 'qb_authoritative' | 'shadow';
|
|
17170
17210
|
};
|
|
17171
17211
|
/**
|
|
17172
17212
|
* ShareReportOperation
|
package/sdk/types.gen.ts
CHANGED
|
@@ -1786,6 +1786,32 @@ export type ClosePeriodResponse = {
|
|
|
1786
1786
|
* Whether the close stamped the period's canonical statement FactSets (the close-time pivot). False when the tenant hasn't set up reporting yet — see statement_stamp_note.
|
|
1787
1787
|
*/
|
|
1788
1788
|
statements_stamped?: boolean;
|
|
1789
|
+
/**
|
|
1790
|
+
* Shadow
|
|
1791
|
+
*
|
|
1792
|
+
* True when the close ran in shadow (the QuickBooks connection's write_policy is 'shadow'): nothing was written to QuickBooks, nothing posted, the in-window drafts were shadowed, and the gates that would have blocked the close are in gate_findings.
|
|
1793
|
+
*/
|
|
1794
|
+
shadow?: boolean;
|
|
1795
|
+
/**
|
|
1796
|
+
* Entries Shadowed
|
|
1797
|
+
*
|
|
1798
|
+
* Drafts a shadow close took as expectations (status 'shadowed') instead of posting. Always 0 outside shadow.
|
|
1799
|
+
*/
|
|
1800
|
+
entries_shadowed?: number;
|
|
1801
|
+
/**
|
|
1802
|
+
* Gate Findings
|
|
1803
|
+
*
|
|
1804
|
+
* Blocker codes a shadow close recorded instead of enforcing: sync_stale, pending_obligations, stranded_obligations, reconciling_items, unposted_source_events, unreconciled_accounts. Empty outside shadow.
|
|
1805
|
+
*/
|
|
1806
|
+
gate_findings?: Array<string>;
|
|
1807
|
+
/**
|
|
1808
|
+
* Gate Finding Counts
|
|
1809
|
+
*
|
|
1810
|
+
* Each finding's size: days stale for sync_stale, a count for the rest.
|
|
1811
|
+
*/
|
|
1812
|
+
gate_finding_counts?: {
|
|
1813
|
+
[key: string]: number;
|
|
1814
|
+
};
|
|
1789
1815
|
/**
|
|
1790
1816
|
* Statement Stamp Note
|
|
1791
1817
|
*
|
|
@@ -9227,7 +9253,7 @@ export type LinkBankAccountResponse = {
|
|
|
9227
9253
|
/**
|
|
9228
9254
|
* Changed
|
|
9229
9255
|
*
|
|
9230
|
-
* False when the link already stood.
|
|
9256
|
+
* False when the link already stood and no line moved.
|
|
9231
9257
|
*/
|
|
9232
9258
|
changed?: boolean;
|
|
9233
9259
|
};
|
|
@@ -9690,8 +9716,9 @@ export type MemoryRecord = {
|
|
|
9690
9716
|
*
|
|
9691
9717
|
* Mercury bank-feed connection configuration.
|
|
9692
9718
|
*
|
|
9693
|
-
* A bank feed is native accounting: the
|
|
9694
|
-
* accounts and
|
|
9719
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
9720
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
9721
|
+
* (the group parent, while QuickBooks is connected). Over OAuth (the hosted
|
|
9695
9722
|
* default) the connection is created `pending_oauth` and activated by the
|
|
9696
9723
|
* callback. `api_key` — a personal **read-only** Mercury token — connects
|
|
9697
9724
|
* at once without a browser round-trip, but only on deployments that turn
|
|
@@ -9717,6 +9744,12 @@ export type MercuryConnectionConfig = {
|
|
|
9717
9744
|
* A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
|
|
9718
9745
|
*/
|
|
9719
9746
|
api_key?: string | null;
|
|
9747
|
+
/**
|
|
9748
|
+
* Entity Id
|
|
9749
|
+
*
|
|
9750
|
+
* 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`.
|
|
9751
|
+
*/
|
|
9752
|
+
entity_id?: string | null;
|
|
9720
9753
|
};
|
|
9721
9754
|
|
|
9722
9755
|
/**
|
|
@@ -13874,10 +13907,11 @@ export type PeriodSpec = {
|
|
|
13874
13907
|
*
|
|
13875
13908
|
* Plaid bank-feed connection configuration.
|
|
13876
13909
|
*
|
|
13877
|
-
* A bank feed is native accounting: the
|
|
13878
|
-
* accounts and
|
|
13879
|
-
*
|
|
13880
|
-
*
|
|
13910
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
13911
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
13912
|
+
* (the group parent, while QuickBooks is connected). The connection is
|
|
13913
|
+
* created `pending_oauth`; `POST /oauth/init` returns a `link_token` for
|
|
13914
|
+
* Plaid Link, and the `public_token` Link hands back completes it through
|
|
13881
13915
|
* `POST /oauth/callback/plaid` (as `code`). One connection per institution
|
|
13882
13916
|
* login; a graph can hold several.
|
|
13883
13917
|
*/
|
|
@@ -13888,6 +13922,12 @@ export type PlaidConnectionConfig = {
|
|
|
13888
13922
|
* 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.
|
|
13889
13923
|
*/
|
|
13890
13924
|
since_date?: string | null;
|
|
13925
|
+
/**
|
|
13926
|
+
* Entity Id
|
|
13927
|
+
*
|
|
13928
|
+
* 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`.
|
|
13929
|
+
*/
|
|
13930
|
+
entity_id?: string | null;
|
|
13891
13931
|
};
|
|
13892
13932
|
|
|
13893
13933
|
/**
|
|
@@ -17573,9 +17613,9 @@ export type SetWritePolicyRequest = {
|
|
|
17573
17613
|
/**
|
|
17574
17614
|
* Write Policy
|
|
17575
17615
|
*
|
|
17576
|
-
* '
|
|
17616
|
+
* 'qb_authoritative' = QuickBooks authoritative, entries publish to QB; 'shadow' = QuickBooks authoritative and RoboSystems only observes: nothing is written to QuickBooks, the close posts nothing locally, its drafts become shadowed expectations and its gates are findings. 'native', books kept in RoboSystems with no write-back, is what disconnecting or severing leaves, not a choice for a live connection.
|
|
17577
17617
|
*/
|
|
17578
|
-
write_policy: '
|
|
17618
|
+
write_policy: 'qb_authoritative' | 'shadow';
|
|
17579
17619
|
};
|
|
17580
17620
|
|
|
17581
17621
|
/**
|
package/sdk.gen.d.ts
CHANGED
|
@@ -320,7 +320,7 @@ export declare const listConnections: <ThrowOnError extends boolean = false>(opt
|
|
|
320
320
|
/**
|
|
321
321
|
* Create Connection
|
|
322
322
|
*
|
|
323
|
-
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) is refused (409)
|
|
323
|
+
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.
|
|
324
324
|
*/
|
|
325
325
|
export declare const createConnection: <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>) => RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>;
|
|
326
326
|
/**
|
|
@@ -352,7 +352,7 @@ export declare const syncConnection: <ThrowOnError extends boolean = false>(opti
|
|
|
352
352
|
/**
|
|
353
353
|
* Set Connection Write Policy
|
|
354
354
|
*
|
|
355
|
-
*
|
|
355
|
+
* Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.
|
|
356
356
|
*/
|
|
357
357
|
export declare const setConnectionWritePolicy: <ThrowOnError extends boolean = false>(options: Options<SetConnectionWritePolicyData, ThrowOnError>) => RequestResult<SetConnectionWritePolicyResponses, SetConnectionWritePolicyErrors, ThrowOnError>;
|
|
358
358
|
/**
|
|
@@ -864,7 +864,7 @@ export declare const changeReportingStyle: <ThrowOnError extends boolean = false
|
|
|
864
864
|
/**
|
|
865
865
|
* Link Bank Account
|
|
866
866
|
*
|
|
867
|
-
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused. An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
867
|
+
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
868
868
|
*
|
|
869
869
|
* **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.
|
|
870
870
|
*/
|
|
@@ -1136,7 +1136,7 @@ export declare const setCloseTarget: <ThrowOnError extends boolean = false>(opti
|
|
|
1136
1136
|
/**
|
|
1137
1137
|
* Close Fiscal Period
|
|
1138
1138
|
*
|
|
1139
|
-
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
|
|
1139
|
+
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.
|
|
1140
1140
|
*
|
|
1141
1141
|
* **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.
|
|
1142
1142
|
*/
|
package/sdk.gen.js
CHANGED
|
@@ -614,7 +614,7 @@ exports.listConnections = listConnections;
|
|
|
614
614
|
/**
|
|
615
615
|
* Create Connection
|
|
616
616
|
*
|
|
617
|
-
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) is refused (409)
|
|
617
|
+
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.
|
|
618
618
|
*/
|
|
619
619
|
const createConnection = (options) => (options.client ?? client_gen_1.client).post({
|
|
620
620
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -692,7 +692,7 @@ exports.syncConnection = syncConnection;
|
|
|
692
692
|
/**
|
|
693
693
|
* Set Connection Write Policy
|
|
694
694
|
*
|
|
695
|
-
*
|
|
695
|
+
* Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.
|
|
696
696
|
*/
|
|
697
697
|
const setConnectionWritePolicy = (options) => (options.client ?? client_gen_1.client).put({
|
|
698
698
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1762,7 +1762,7 @@ exports.changeReportingStyle = changeReportingStyle;
|
|
|
1762
1762
|
/**
|
|
1763
1763
|
* Link Bank Account
|
|
1764
1764
|
*
|
|
1765
|
-
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused. An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1765
|
+
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1766
1766
|
*
|
|
1767
1767
|
* **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.
|
|
1768
1768
|
*/
|
|
@@ -2340,7 +2340,7 @@ exports.setCloseTarget = setCloseTarget;
|
|
|
2340
2340
|
/**
|
|
2341
2341
|
* Close Fiscal Period
|
|
2342
2342
|
*
|
|
2343
|
-
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
|
|
2343
|
+
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.
|
|
2344
2344
|
*
|
|
2345
2345
|
* **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.
|
|
2346
2346
|
*/
|
package/sdk.gen.ts
CHANGED
|
@@ -625,7 +625,7 @@ export const listConnections = <ThrowOnError extends boolean = false>(options: O
|
|
|
625
625
|
/**
|
|
626
626
|
* Create Connection
|
|
627
627
|
*
|
|
628
|
-
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) is refused (409)
|
|
628
|
+
* 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 and 'plaid' which allows one per bank login (a connection still waiting on Link is returned instead of a second). Plaid: returns a pending connection — `POST /oauth/init` returns a `link_token` for Plaid Link. A bank feed (Mercury, Plaid) names the entity its accounts book to (`entity_id`, the group parent when omitted) and is refused (409) when that entity has no chart of accounts or is the one QuickBooks keeps; QuickBooks is refused (409) when the group parent's books are already native.
|
|
629
629
|
*/
|
|
630
630
|
export const createConnection = <ThrowOnError extends boolean = false>(options: Options<CreateConnectionData, ThrowOnError>): RequestResult<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError> => (options.client ?? client).post<CreateConnectionResponses, CreateConnectionErrors, ThrowOnError>({
|
|
631
631
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -703,7 +703,7 @@ export const syncConnection = <ThrowOnError extends boolean = false>(options: Op
|
|
|
703
703
|
/**
|
|
704
704
|
* Set Connection Write Policy
|
|
705
705
|
*
|
|
706
|
-
*
|
|
706
|
+
* Choose how a live connection and RoboSystems share the books. 'qb_authoritative', the default, makes QuickBooks the book of record: RoboSystems-originated entries (manual JEs, schedule drafts) publish to QuickBooks when executed or at close. 'shadow' keeps QuickBooks the book of record and writes nothing to it: the close posts nothing locally either, its drafts become shadowed expectations compared with what QuickBooks holds, and its gates are recorded as findings. 'native' is not a choice here: it is what disconnecting or severing leaves, books kept in RoboSystems with no connection to write to. This is the explicit operator opt-in for writing to your books of record.
|
|
707
707
|
*/
|
|
708
708
|
export const setConnectionWritePolicy = <ThrowOnError extends boolean = false>(options: Options<SetConnectionWritePolicyData, ThrowOnError>): RequestResult<SetConnectionWritePolicyResponses, SetConnectionWritePolicyErrors, ThrowOnError> => (options.client ?? client).put<SetConnectionWritePolicyResponses, SetConnectionWritePolicyErrors, ThrowOnError>({
|
|
709
709
|
security: [{ name: 'X-API-Key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
@@ -1773,7 +1773,7 @@ export const changeReportingStyle = <ThrowOnError extends boolean = false>(optio
|
|
|
1773
1773
|
/**
|
|
1774
1774
|
* Link Bank Account
|
|
1775
1775
|
*
|
|
1776
|
-
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused. An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1776
|
+
* Point a bank feed's account at a chart account. Name `element_id` for an existing active account, or `entity_id` alone to create one in that entity's chart. The chart the account is in decides whose books the feed's lines go into, so this is also how a feed account is bound to a subsidiary. Lines still in the inbox move with it (across an entity change their suggestion is resolved again on the new chart, and a classification that named the old entity's account is dropped); posted entries stay where they were posted. An account another connection already feeds is refused, as is an entity whose books QuickBooks keeps (the group parent, while QuickBooks is connected). An account the feed created and then left stays on its chart as an ordinary account. A sync already in flight when the link moves can still land a line or two on the old account; running this again moves them. Read the group's accounts with the `bankAccounts` GraphQL field.
|
|
1777
1777
|
*
|
|
1778
1778
|
* **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.
|
|
1779
1779
|
*/
|
|
@@ -2351,7 +2351,7 @@ export const setCloseTarget = <ThrowOnError extends boolean = false>(options: Op
|
|
|
2351
2351
|
/**
|
|
2352
2352
|
* Close Fiscal Period
|
|
2353
2353
|
*
|
|
2354
|
-
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order).
|
|
2354
|
+
* Lock a single fiscal period. Posts draft entries, runs the balance-sheet equation check, advances `closed_through` by one, auto-advances `close_target` if this close caught up to it, and stamps the period's canonical statement FactSets from the posted ledger (`statements_stamped` / `stamped_statement_sets` in the response; soft-skipped with `statement_stamp_note` when reporting isn't set up). Period must be exactly `closed_through + 1` — sequence violations return 422 with structured `blockers`. Common blockers: `sync_stale` (override with `allow_stale_sync=true` after manual verification), `period_incomplete` (draft entries unbalanced), `sequence_violation` (out-of-order). Under a QuickBooks connection whose write_policy is `shadow`, the close observes instead: nothing is written to QuickBooks or posted, the drafts become `shadowed` expectations (`entries_shadowed`), and the gates that would have blocked are returned as `gate_findings` rather than enforced.
|
|
2355
2355
|
*
|
|
2356
2356
|
* **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.
|
|
2357
2357
|
*/
|
package/types.gen.d.ts
CHANGED
|
@@ -1738,6 +1738,32 @@ export type ClosePeriodResponse = {
|
|
|
1738
1738
|
* Whether the close stamped the period's canonical statement FactSets (the close-time pivot). False when the tenant hasn't set up reporting yet — see statement_stamp_note.
|
|
1739
1739
|
*/
|
|
1740
1740
|
statements_stamped?: boolean;
|
|
1741
|
+
/**
|
|
1742
|
+
* Shadow
|
|
1743
|
+
*
|
|
1744
|
+
* True when the close ran in shadow (the QuickBooks connection's write_policy is 'shadow'): nothing was written to QuickBooks, nothing posted, the in-window drafts were shadowed, and the gates that would have blocked the close are in gate_findings.
|
|
1745
|
+
*/
|
|
1746
|
+
shadow?: boolean;
|
|
1747
|
+
/**
|
|
1748
|
+
* Entries Shadowed
|
|
1749
|
+
*
|
|
1750
|
+
* Drafts a shadow close took as expectations (status 'shadowed') instead of posting. Always 0 outside shadow.
|
|
1751
|
+
*/
|
|
1752
|
+
entries_shadowed?: number;
|
|
1753
|
+
/**
|
|
1754
|
+
* Gate Findings
|
|
1755
|
+
*
|
|
1756
|
+
* Blocker codes a shadow close recorded instead of enforcing: sync_stale, pending_obligations, stranded_obligations, reconciling_items, unposted_source_events, unreconciled_accounts. Empty outside shadow.
|
|
1757
|
+
*/
|
|
1758
|
+
gate_findings?: Array<string>;
|
|
1759
|
+
/**
|
|
1760
|
+
* Gate Finding Counts
|
|
1761
|
+
*
|
|
1762
|
+
* Each finding's size: days stale for sync_stale, a count for the rest.
|
|
1763
|
+
*/
|
|
1764
|
+
gate_finding_counts?: {
|
|
1765
|
+
[key: string]: number;
|
|
1766
|
+
};
|
|
1741
1767
|
/**
|
|
1742
1768
|
* Statement Stamp Note
|
|
1743
1769
|
*
|
|
@@ -9021,7 +9047,7 @@ export type LinkBankAccountResponse = {
|
|
|
9021
9047
|
/**
|
|
9022
9048
|
* Changed
|
|
9023
9049
|
*
|
|
9024
|
-
* False when the link already stood.
|
|
9050
|
+
* False when the link already stood and no line moved.
|
|
9025
9051
|
*/
|
|
9026
9052
|
changed?: boolean;
|
|
9027
9053
|
};
|
|
@@ -9472,8 +9498,9 @@ export type MemoryRecord = {
|
|
|
9472
9498
|
*
|
|
9473
9499
|
* Mercury bank-feed connection configuration.
|
|
9474
9500
|
*
|
|
9475
|
-
* A bank feed is native accounting: the
|
|
9476
|
-
* accounts and
|
|
9501
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
9502
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
9503
|
+
* (the group parent, while QuickBooks is connected). Over OAuth (the hosted
|
|
9477
9504
|
* default) the connection is created `pending_oauth` and activated by the
|
|
9478
9505
|
* callback. `api_key` — a personal **read-only** Mercury token — connects
|
|
9479
9506
|
* at once without a browser round-trip, but only on deployments that turn
|
|
@@ -9499,6 +9526,12 @@ export type MercuryConnectionConfig = {
|
|
|
9499
9526
|
* A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
|
|
9500
9527
|
*/
|
|
9501
9528
|
api_key?: string | null;
|
|
9529
|
+
/**
|
|
9530
|
+
* Entity Id
|
|
9531
|
+
*
|
|
9532
|
+
* 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`.
|
|
9533
|
+
*/
|
|
9534
|
+
entity_id?: string | null;
|
|
9502
9535
|
};
|
|
9503
9536
|
/**
|
|
9504
9537
|
* MetricMechanics
|
|
@@ -13551,10 +13584,11 @@ export type PeriodSpec = {
|
|
|
13551
13584
|
*
|
|
13552
13585
|
* Plaid bank-feed connection configuration.
|
|
13553
13586
|
*
|
|
13554
|
-
* A bank feed is native accounting: the
|
|
13555
|
-
* accounts and
|
|
13556
|
-
*
|
|
13557
|
-
*
|
|
13587
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
13588
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
13589
|
+
* (the group parent, while QuickBooks is connected). The connection is
|
|
13590
|
+
* created `pending_oauth`; `POST /oauth/init` returns a `link_token` for
|
|
13591
|
+
* Plaid Link, and the `public_token` Link hands back completes it through
|
|
13558
13592
|
* `POST /oauth/callback/plaid` (as `code`). One connection per institution
|
|
13559
13593
|
* login; a graph can hold several.
|
|
13560
13594
|
*/
|
|
@@ -13565,6 +13599,12 @@ export type PlaidConnectionConfig = {
|
|
|
13565
13599
|
* 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.
|
|
13566
13600
|
*/
|
|
13567
13601
|
since_date?: string | null;
|
|
13602
|
+
/**
|
|
13603
|
+
* Entity Id
|
|
13604
|
+
*
|
|
13605
|
+
* 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`.
|
|
13606
|
+
*/
|
|
13607
|
+
entity_id?: string | null;
|
|
13568
13608
|
};
|
|
13569
13609
|
/**
|
|
13570
13610
|
* PortalSessionResponse
|
|
@@ -17164,9 +17204,9 @@ export type SetWritePolicyRequest = {
|
|
|
17164
17204
|
/**
|
|
17165
17205
|
* Write Policy
|
|
17166
17206
|
*
|
|
17167
|
-
* '
|
|
17207
|
+
* 'qb_authoritative' = QuickBooks authoritative, entries publish to QB; 'shadow' = QuickBooks authoritative and RoboSystems only observes: nothing is written to QuickBooks, the close posts nothing locally, its drafts become shadowed expectations and its gates are findings. 'native', books kept in RoboSystems with no write-back, is what disconnecting or severing leaves, not a choice for a live connection.
|
|
17168
17208
|
*/
|
|
17169
|
-
write_policy: '
|
|
17209
|
+
write_policy: 'qb_authoritative' | 'shadow';
|
|
17170
17210
|
};
|
|
17171
17211
|
/**
|
|
17172
17212
|
* ShareReportOperation
|
package/types.gen.ts
CHANGED
|
@@ -1786,6 +1786,32 @@ export type ClosePeriodResponse = {
|
|
|
1786
1786
|
* Whether the close stamped the period's canonical statement FactSets (the close-time pivot). False when the tenant hasn't set up reporting yet — see statement_stamp_note.
|
|
1787
1787
|
*/
|
|
1788
1788
|
statements_stamped?: boolean;
|
|
1789
|
+
/**
|
|
1790
|
+
* Shadow
|
|
1791
|
+
*
|
|
1792
|
+
* True when the close ran in shadow (the QuickBooks connection's write_policy is 'shadow'): nothing was written to QuickBooks, nothing posted, the in-window drafts were shadowed, and the gates that would have blocked the close are in gate_findings.
|
|
1793
|
+
*/
|
|
1794
|
+
shadow?: boolean;
|
|
1795
|
+
/**
|
|
1796
|
+
* Entries Shadowed
|
|
1797
|
+
*
|
|
1798
|
+
* Drafts a shadow close took as expectations (status 'shadowed') instead of posting. Always 0 outside shadow.
|
|
1799
|
+
*/
|
|
1800
|
+
entries_shadowed?: number;
|
|
1801
|
+
/**
|
|
1802
|
+
* Gate Findings
|
|
1803
|
+
*
|
|
1804
|
+
* Blocker codes a shadow close recorded instead of enforcing: sync_stale, pending_obligations, stranded_obligations, reconciling_items, unposted_source_events, unreconciled_accounts. Empty outside shadow.
|
|
1805
|
+
*/
|
|
1806
|
+
gate_findings?: Array<string>;
|
|
1807
|
+
/**
|
|
1808
|
+
* Gate Finding Counts
|
|
1809
|
+
*
|
|
1810
|
+
* Each finding's size: days stale for sync_stale, a count for the rest.
|
|
1811
|
+
*/
|
|
1812
|
+
gate_finding_counts?: {
|
|
1813
|
+
[key: string]: number;
|
|
1814
|
+
};
|
|
1789
1815
|
/**
|
|
1790
1816
|
* Statement Stamp Note
|
|
1791
1817
|
*
|
|
@@ -9227,7 +9253,7 @@ export type LinkBankAccountResponse = {
|
|
|
9227
9253
|
/**
|
|
9228
9254
|
* Changed
|
|
9229
9255
|
*
|
|
9230
|
-
* False when the link already stood.
|
|
9256
|
+
* False when the link already stood and no line moved.
|
|
9231
9257
|
*/
|
|
9232
9258
|
changed?: boolean;
|
|
9233
9259
|
};
|
|
@@ -9690,8 +9716,9 @@ export type MemoryRecord = {
|
|
|
9690
9716
|
*
|
|
9691
9717
|
* Mercury bank-feed connection configuration.
|
|
9692
9718
|
*
|
|
9693
|
-
* A bank feed is native accounting: the
|
|
9694
|
-
* accounts and
|
|
9719
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
9720
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
9721
|
+
* (the group parent, while QuickBooks is connected). Over OAuth (the hosted
|
|
9695
9722
|
* default) the connection is created `pending_oauth` and activated by the
|
|
9696
9723
|
* callback. `api_key` — a personal **read-only** Mercury token — connects
|
|
9697
9724
|
* at once without a browser round-trip, but only on deployments that turn
|
|
@@ -9717,6 +9744,12 @@ export type MercuryConnectionConfig = {
|
|
|
9717
9744
|
* A personal read-only Mercury API token, for deployments that allow the api_key credential mode. Omit to connect over OAuth.
|
|
9718
9745
|
*/
|
|
9719
9746
|
api_key?: string | null;
|
|
9747
|
+
/**
|
|
9748
|
+
* Entity Id
|
|
9749
|
+
*
|
|
9750
|
+
* 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`.
|
|
9751
|
+
*/
|
|
9752
|
+
entity_id?: string | null;
|
|
9720
9753
|
};
|
|
9721
9754
|
|
|
9722
9755
|
/**
|
|
@@ -13874,10 +13907,11 @@ export type PeriodSpec = {
|
|
|
13874
13907
|
*
|
|
13875
13908
|
* Plaid bank-feed connection configuration.
|
|
13876
13909
|
*
|
|
13877
|
-
* A bank feed is native accounting: the
|
|
13878
|
-
* accounts and
|
|
13879
|
-
*
|
|
13880
|
-
*
|
|
13910
|
+
* A bank feed is native accounting: the entity its accounts land on must
|
|
13911
|
+
* already have a chart of accounts and must not be the one QuickBooks keeps
|
|
13912
|
+
* (the group parent, while QuickBooks is connected). The connection is
|
|
13913
|
+
* created `pending_oauth`; `POST /oauth/init` returns a `link_token` for
|
|
13914
|
+
* Plaid Link, and the `public_token` Link hands back completes it through
|
|
13881
13915
|
* `POST /oauth/callback/plaid` (as `code`). One connection per institution
|
|
13882
13916
|
* login; a graph can hold several.
|
|
13883
13917
|
*/
|
|
@@ -13888,6 +13922,12 @@ export type PlaidConnectionConfig = {
|
|
|
13888
13922
|
* 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.
|
|
13889
13923
|
*/
|
|
13890
13924
|
since_date?: string | null;
|
|
13925
|
+
/**
|
|
13926
|
+
* Entity Id
|
|
13927
|
+
*
|
|
13928
|
+
* 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`.
|
|
13929
|
+
*/
|
|
13930
|
+
entity_id?: string | null;
|
|
13891
13931
|
};
|
|
13892
13932
|
|
|
13893
13933
|
/**
|
|
@@ -17573,9 +17613,9 @@ export type SetWritePolicyRequest = {
|
|
|
17573
17613
|
/**
|
|
17574
17614
|
* Write Policy
|
|
17575
17615
|
*
|
|
17576
|
-
* '
|
|
17616
|
+
* 'qb_authoritative' = QuickBooks authoritative, entries publish to QB; 'shadow' = QuickBooks authoritative and RoboSystems only observes: nothing is written to QuickBooks, the close posts nothing locally, its drafts become shadowed expectations and its gates are findings. 'native', books kept in RoboSystems with no write-back, is what disconnecting or severing leaves, not a choice for a live connection.
|
|
17577
17617
|
*/
|
|
17578
|
-
write_policy: '
|
|
17618
|
+
write_policy: 'qb_authoritative' | 'shadow';
|
|
17579
17619
|
};
|
|
17580
17620
|
|
|
17581
17621
|
/**
|