@robosystems/client 1.15.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/artifacts/LedgerClient.d.ts +37 -2
- package/artifacts/LedgerClient.js +30 -0
- package/artifacts/LedgerClient.ts +80 -0
- package/artifacts/graphql/generated/graphql.d.ts +12 -0
- package/artifacts/graphql/generated/graphql.js +30 -2
- package/artifacts/graphql/generated/graphql.ts +39 -0
- package/artifacts/graphql/queries/ledger/chartTemplates.d.ts +6 -0
- package/artifacts/graphql/queries/ledger/chartTemplates.js +19 -0
- package/artifacts/graphql/queries/ledger/chartTemplates.ts +17 -0
- package/index.ts +2 -2
- package/package.json +1 -1
- package/sdk/index.d.ts +2 -2
- package/sdk/index.js +3 -2
- package/sdk/index.ts +2 -2
- package/sdk/sdk.gen.d.ts +16 -8
- package/sdk/sdk.gen.js +26 -9
- package/sdk/sdk.gen.ts +25 -8
- package/sdk/types.gen.d.ts +239 -6
- package/sdk/types.gen.ts +248 -6
- package/sdk.gen.d.ts +16 -8
- package/sdk.gen.js +26 -9
- package/sdk.gen.ts +25 -8
- package/types.gen.d.ts +239 -6
- package/types.gen.ts +248 -6
package/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
|
/**
|
|
@@ -7391,6 +7398,84 @@ export type InitialEntityData = {
|
|
|
7391
7398
|
reporting_style_id?: string | null;
|
|
7392
7399
|
};
|
|
7393
7400
|
|
|
7401
|
+
/**
|
|
7402
|
+
* InitializeChartOfAccountsRequest
|
|
7403
|
+
*
|
|
7404
|
+
* Create the graph's chart of accounts from a shipped template.
|
|
7405
|
+
*
|
|
7406
|
+
* Refused (409) when the graph already has an active ``chart_of_accounts``
|
|
7407
|
+
* taxonomy — a QuickBooks-synced tenant never needs this, and a chart is
|
|
7408
|
+
* never replaced. The template's equity rows are mapped by the entity's
|
|
7409
|
+
* legal form (``entity_type``: corporation / llc / partnership); omit it
|
|
7410
|
+
* to use the graph's primary entity, falling back to corporation.
|
|
7411
|
+
*/
|
|
7412
|
+
export type InitializeChartOfAccountsRequest = {
|
|
7413
|
+
/**
|
|
7414
|
+
* Template
|
|
7415
|
+
*
|
|
7416
|
+
* Template key: `saas` (subscription software — deferred revenue, cost of revenue, R&D / S&M / G&A), `services` (professional services — no inventory, no COGS), `product` (inventory and cost of goods sold, direct + wholesale + subscription revenue).
|
|
7417
|
+
*/
|
|
7418
|
+
template: 'saas' | 'services' | 'product';
|
|
7419
|
+
/**
|
|
7420
|
+
* Entity Type
|
|
7421
|
+
*
|
|
7422
|
+
* Legal form for the equity mapping: `corporation`, `llc` or `partnership`. Defaults to the graph's primary entity, then to corporation.
|
|
7423
|
+
*/
|
|
7424
|
+
entity_type?: string | null;
|
|
7425
|
+
/**
|
|
7426
|
+
* Name
|
|
7427
|
+
*
|
|
7428
|
+
* Chart display name. Defaults to 'Chart of Accounts'.
|
|
7429
|
+
*/
|
|
7430
|
+
name?: string | null;
|
|
7431
|
+
};
|
|
7432
|
+
|
|
7433
|
+
/**
|
|
7434
|
+
* InitializeChartOfAccountsResponse
|
|
7435
|
+
*/
|
|
7436
|
+
export type InitializeChartOfAccountsResponse = {
|
|
7437
|
+
/**
|
|
7438
|
+
* Taxonomy Id
|
|
7439
|
+
*
|
|
7440
|
+
* The new chart's taxonomy id.
|
|
7441
|
+
*/
|
|
7442
|
+
taxonomy_id: string;
|
|
7443
|
+
/**
|
|
7444
|
+
* Name
|
|
7445
|
+
*/
|
|
7446
|
+
name: string;
|
|
7447
|
+
/**
|
|
7448
|
+
* Template
|
|
7449
|
+
*/
|
|
7450
|
+
template: 'saas' | 'services' | 'product';
|
|
7451
|
+
/**
|
|
7452
|
+
* Entity Type
|
|
7453
|
+
*
|
|
7454
|
+
* Legal form the equity rows were mapped for.
|
|
7455
|
+
*/
|
|
7456
|
+
entity_type: string;
|
|
7457
|
+
/**
|
|
7458
|
+
* Elements Created
|
|
7459
|
+
*/
|
|
7460
|
+
elements_created: number;
|
|
7461
|
+
/**
|
|
7462
|
+
* Mappings Created
|
|
7463
|
+
*/
|
|
7464
|
+
mappings_created: number;
|
|
7465
|
+
/**
|
|
7466
|
+
* Frameworks
|
|
7467
|
+
*
|
|
7468
|
+
* Frameworks the chart was mapped into — each template mapping set whose framework this graph's library carries (rs-gaap today; every framework in the graph's pin once it is plural).
|
|
7469
|
+
*/
|
|
7470
|
+
frameworks?: Array<string>;
|
|
7471
|
+
/**
|
|
7472
|
+
* Unresolved
|
|
7473
|
+
*
|
|
7474
|
+
* What could not be mapped, never fatal — the accounts exist and can be mapped by hand: a target qname the framework's library copy did not resolve, `<framework>: not in this graph's library` for a template mapping set whose framework this graph does not carry, or a template row naming an account it does not declare.
|
|
7475
|
+
*/
|
|
7476
|
+
unresolved?: Array<string>;
|
|
7477
|
+
};
|
|
7478
|
+
|
|
7394
7479
|
/**
|
|
7395
7480
|
* InitializeLedgerRequest
|
|
7396
7481
|
*
|
|
@@ -8827,6 +8912,40 @@ export type MemoryRecord = {
|
|
|
8827
8912
|
updated_at?: string | null;
|
|
8828
8913
|
};
|
|
8829
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
|
+
|
|
8830
8949
|
/**
|
|
8831
8950
|
* MetricMechanics
|
|
8832
8951
|
*
|
|
@@ -10407,6 +10526,52 @@ export type OperationEnvelopeInformationBlockEnvelope = {
|
|
|
10407
10526
|
idempotentReplay?: boolean;
|
|
10408
10527
|
};
|
|
10409
10528
|
|
|
10529
|
+
/**
|
|
10530
|
+
* OperationEnvelope[InitializeChartOfAccountsResponse]
|
|
10531
|
+
*/
|
|
10532
|
+
export type OperationEnvelopeInitializeChartOfAccountsResponse = {
|
|
10533
|
+
/**
|
|
10534
|
+
* Operation
|
|
10535
|
+
*
|
|
10536
|
+
* Kebab-case operation name
|
|
10537
|
+
*/
|
|
10538
|
+
operation: string;
|
|
10539
|
+
/**
|
|
10540
|
+
* Operationid
|
|
10541
|
+
*
|
|
10542
|
+
* op_-prefixed ULID for audit and SSE correlation
|
|
10543
|
+
*/
|
|
10544
|
+
operationId: string;
|
|
10545
|
+
/**
|
|
10546
|
+
* Status
|
|
10547
|
+
*
|
|
10548
|
+
* Operation lifecycle state
|
|
10549
|
+
*/
|
|
10550
|
+
status: 'completed' | 'pending' | 'failed';
|
|
10551
|
+
/**
|
|
10552
|
+
* Command-specific result payload
|
|
10553
|
+
*/
|
|
10554
|
+
result?: InitializeChartOfAccountsResponse | null;
|
|
10555
|
+
/**
|
|
10556
|
+
* At
|
|
10557
|
+
*
|
|
10558
|
+
* ISO-8601 UTC timestamp
|
|
10559
|
+
*/
|
|
10560
|
+
at: string;
|
|
10561
|
+
/**
|
|
10562
|
+
* Createdby
|
|
10563
|
+
*
|
|
10564
|
+
* User ID that initiated the operation (null for legacy callers)
|
|
10565
|
+
*/
|
|
10566
|
+
createdBy?: string | null;
|
|
10567
|
+
/**
|
|
10568
|
+
* Idempotentreplay
|
|
10569
|
+
*
|
|
10570
|
+
* True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.
|
|
10571
|
+
*/
|
|
10572
|
+
idempotentReplay?: boolean;
|
|
10573
|
+
};
|
|
10574
|
+
|
|
10410
10575
|
/**
|
|
10411
10576
|
* OperationEnvelope[InitializeLedgerResponse]
|
|
10412
10577
|
*/
|
|
@@ -14815,6 +14980,12 @@ export type SearchRequest = {
|
|
|
14815
14980
|
* Pagination offset
|
|
14816
14981
|
*/
|
|
14817
14982
|
offset?: number;
|
|
14983
|
+
/**
|
|
14984
|
+
* Snippet Chars
|
|
14985
|
+
*
|
|
14986
|
+
* Approximate snippet budget per hit in characters; the default is three highlight fragments of about 200
|
|
14987
|
+
*/
|
|
14988
|
+
snippet_chars?: number | null;
|
|
14818
14989
|
};
|
|
14819
14990
|
|
|
14820
14991
|
/**
|
|
@@ -16905,9 +17076,9 @@ export type UpdateEventBlockRequest = {
|
|
|
16905
17076
|
/**
|
|
16906
17077
|
* Transition To
|
|
16907
17078
|
*
|
|
16908
|
-
* 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
|
|
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.
|
|
16909
17080
|
*/
|
|
16910
|
-
transition_to?: 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
|
|
17081
|
+
transition_to?: 'classified' | 'committed' | 'pending' | 'fulfilled' | 'voided' | 'superseded' | null;
|
|
16911
17082
|
/**
|
|
16912
17083
|
* Superseded By Id
|
|
16913
17084
|
*
|
|
@@ -20911,7 +21082,7 @@ export type ListConnectionsData = {
|
|
|
20911
21082
|
*
|
|
20912
21083
|
* Filter by provider type
|
|
20913
21084
|
*/
|
|
20914
|
-
provider?: 'quickbooks' | 'external' | null;
|
|
21085
|
+
provider?: 'quickbooks' | 'external' | 'mercury' | null;
|
|
20915
21086
|
};
|
|
20916
21087
|
url: '/v1/graphs/{graph_id}/connections';
|
|
20917
21088
|
};
|
|
@@ -21032,7 +21203,14 @@ export type DeleteConnectionData = {
|
|
|
21032
21203
|
*/
|
|
21033
21204
|
connection_id: string;
|
|
21034
21205
|
};
|
|
21035
|
-
query?:
|
|
21206
|
+
query?: {
|
|
21207
|
+
/**
|
|
21208
|
+
* Disposition
|
|
21209
|
+
*
|
|
21210
|
+
* `disconnect` (default): soft-delete; a later re-OAuth to the same realm revives the connection. `sever`: the native-accounting cutover — QuickBooks only; the chart it created is stamped native-owned, write_policy drops to native, and the connection is never revived.
|
|
21211
|
+
*/
|
|
21212
|
+
disposition?: 'disconnect' | 'sever';
|
|
21213
|
+
};
|
|
21036
21214
|
url: '/v1/graphs/{graph_id}/connections/{connection_id}';
|
|
21037
21215
|
};
|
|
21038
21216
|
|
|
@@ -25983,6 +26161,70 @@ export type CreateTaxonomyBlockResponses = {
|
|
|
25983
26161
|
|
|
25984
26162
|
export type CreateTaxonomyBlockResponse = CreateTaxonomyBlockResponses[keyof CreateTaxonomyBlockResponses];
|
|
25985
26163
|
|
|
26164
|
+
export type InitializeChartOfAccountsData = {
|
|
26165
|
+
body: InitializeChartOfAccountsRequest;
|
|
26166
|
+
headers?: {
|
|
26167
|
+
/**
|
|
26168
|
+
* Idempotency-Key
|
|
26169
|
+
*/
|
|
26170
|
+
'Idempotency-Key'?: string | null;
|
|
26171
|
+
};
|
|
26172
|
+
path: {
|
|
26173
|
+
/**
|
|
26174
|
+
* Graph Id
|
|
26175
|
+
*/
|
|
26176
|
+
graph_id: string;
|
|
26177
|
+
};
|
|
26178
|
+
query?: never;
|
|
26179
|
+
url: '/extensions/roboledger/{graph_id}/operations/initialize-chart-of-accounts';
|
|
26180
|
+
};
|
|
26181
|
+
|
|
26182
|
+
export type InitializeChartOfAccountsErrors = {
|
|
26183
|
+
/**
|
|
26184
|
+
* Invalid request
|
|
26185
|
+
*/
|
|
26186
|
+
400: ErrorResponse;
|
|
26187
|
+
/**
|
|
26188
|
+
* Authentication required
|
|
26189
|
+
*/
|
|
26190
|
+
401: ErrorResponse;
|
|
26191
|
+
/**
|
|
26192
|
+
* Access denied
|
|
26193
|
+
*/
|
|
26194
|
+
403: ErrorResponse;
|
|
26195
|
+
/**
|
|
26196
|
+
* Resource not found
|
|
26197
|
+
*/
|
|
26198
|
+
404: ErrorResponse;
|
|
26199
|
+
/**
|
|
26200
|
+
* Idempotency-Key conflict — key reused with different body
|
|
26201
|
+
*/
|
|
26202
|
+
409: ErrorResponse;
|
|
26203
|
+
/**
|
|
26204
|
+
* Validation error
|
|
26205
|
+
*/
|
|
26206
|
+
422: ErrorResponse;
|
|
26207
|
+
/**
|
|
26208
|
+
* Rate limit exceeded
|
|
26209
|
+
*/
|
|
26210
|
+
429: ErrorResponse;
|
|
26211
|
+
/**
|
|
26212
|
+
* Internal server error
|
|
26213
|
+
*/
|
|
26214
|
+
500: ErrorResponse;
|
|
26215
|
+
};
|
|
26216
|
+
|
|
26217
|
+
export type InitializeChartOfAccountsError = InitializeChartOfAccountsErrors[keyof InitializeChartOfAccountsErrors];
|
|
26218
|
+
|
|
26219
|
+
export type InitializeChartOfAccountsResponses = {
|
|
26220
|
+
/**
|
|
26221
|
+
* Successful Response
|
|
26222
|
+
*/
|
|
26223
|
+
200: OperationEnvelopeInitializeChartOfAccountsResponse;
|
|
26224
|
+
};
|
|
26225
|
+
|
|
26226
|
+
export type InitializeChartOfAccountsResponse2 = InitializeChartOfAccountsResponses[keyof InitializeChartOfAccountsResponses];
|
|
26227
|
+
|
|
25986
26228
|
export type UpdateTaxonomyBlockData = {
|
|
25987
26229
|
body: UpdateTaxonomyBlockRequest;
|
|
25988
26230
|
headers?: {
|