@robosystems/client 2.2.5 → 2.4.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 +111 -7
- package/artifacts/LedgerClient.js +174 -6
- package/artifacts/LedgerClient.ts +335 -6
- package/artifacts/graphql/generated/graphql.d.ts +71 -0
- package/artifacts/graphql/generated/graphql.js +134 -2
- package/artifacts/graphql/generated/graphql.ts +207 -0
- package/artifacts/graphql/queries/ledger/fiscalCalendar.js +2 -0
- package/artifacts/graphql/queries/ledger/fiscalCalendar.ts +2 -0
- package/artifacts/graphql/queries/ledger/mappings.d.ts +4 -3
- package/artifacts/graphql/queries/ledger/mappings.js +5 -3
- package/artifacts/graphql/queries/ledger/mappings.ts +5 -3
- package/artifacts/graphql/queries/ledger/reconciliations.d.ts +10 -0
- package/artifacts/graphql/queries/ledger/reconciliations.js +78 -0
- package/artifacts/graphql/queries/ledger/reconciliations.ts +76 -0
- package/artifacts/graphql/queries/ledger/structures.js +1 -0
- package/artifacts/graphql/queries/ledger/structures.ts +1 -0
- package/index.ts +2 -2
- package/package.json +1 -1
- package/sdk/index.d.ts +2 -2
- package/sdk/index.js +8 -3
- package/sdk/index.ts +2 -2
- package/sdk/sdk.gen.d.ts +41 -1
- package/sdk/sdk.gen.js +87 -2
- package/sdk/sdk.gen.ts +86 -1
- package/sdk/types.gen.d.ts +1194 -49
- package/sdk/types.gen.ts +1594 -408
- package/sdk.gen.d.ts +41 -1
- package/sdk.gen.js +87 -2
- package/sdk.gen.ts +86 -1
- package/types.gen.d.ts +1194 -49
- package/types.gen.ts +1594 -408
|
@@ -54,13 +54,18 @@ import {
|
|
|
54
54
|
linkEntityTaxonomy,
|
|
55
55
|
liveFinancialStatement,
|
|
56
56
|
previewEventBlock,
|
|
57
|
+
previewReconciliations,
|
|
57
58
|
rebuildSchedule,
|
|
59
|
+
recordStatementBalance,
|
|
60
|
+
refreshReconciliations,
|
|
58
61
|
regenerateReport,
|
|
59
62
|
removePublishListMember,
|
|
60
63
|
reopenPeriod,
|
|
61
64
|
revokeReportShare,
|
|
62
65
|
setCloseTarget,
|
|
66
|
+
setReconciliationPolicy,
|
|
63
67
|
shareReport,
|
|
68
|
+
signOffReconciliation,
|
|
64
69
|
transitionFilingStatus,
|
|
65
70
|
unblockSourceGraph,
|
|
66
71
|
updateAgent,
|
|
@@ -119,14 +124,25 @@ import type {
|
|
|
119
124
|
LiveFinancialStatementResponse,
|
|
120
125
|
OperationEnvelope,
|
|
121
126
|
PreviewEventBlockResponse,
|
|
127
|
+
PreviewReconciliationsRequest,
|
|
122
128
|
PublishListMemberResponse,
|
|
123
129
|
PublishListResponse,
|
|
124
130
|
RebuildScheduleRequest,
|
|
131
|
+
ReconciliationComponent,
|
|
132
|
+
ReconciliationListResponse,
|
|
133
|
+
ReconciliationPolicyResponse,
|
|
134
|
+
ReconciliationPreviewResponse,
|
|
135
|
+
ReconciliationRow,
|
|
136
|
+
ReconciliationSummary,
|
|
137
|
+
RecordStatementBalanceRequest,
|
|
138
|
+
RefreshReconciliationsRequest,
|
|
125
139
|
ReopenPeriodOperation,
|
|
126
140
|
ReportResponse,
|
|
127
141
|
RevokeReportShareResponse,
|
|
128
142
|
SetCloseTargetOperation,
|
|
143
|
+
SetReconciliationPolicyRequest,
|
|
129
144
|
ShareReportResponse,
|
|
145
|
+
SignOffReconciliationRequest,
|
|
130
146
|
TaxonomyBlockEnvelope,
|
|
131
147
|
TransitionFilingStatusRequest,
|
|
132
148
|
UpdateAgentRequest,
|
|
@@ -176,6 +192,7 @@ import {
|
|
|
176
192
|
ListLedgerJournalEntriesDocument,
|
|
177
193
|
ListLedgerMappingsDocument,
|
|
178
194
|
ListLedgerPublishListsDocument,
|
|
195
|
+
ListLedgerReconciliationsDocument,
|
|
179
196
|
ListLedgerReportsDocument,
|
|
180
197
|
ListLedgerStructuresDocument,
|
|
181
198
|
ListLedgerTaxonomiesDocument,
|
|
@@ -214,6 +231,7 @@ import {
|
|
|
214
231
|
type ListLedgerJournalEntriesQuery,
|
|
215
232
|
type ListLedgerMappingsQuery,
|
|
216
233
|
type ListLedgerPublishListsQuery,
|
|
234
|
+
type ListLedgerReconciliationsQuery,
|
|
217
235
|
type ListLedgerReportsQuery,
|
|
218
236
|
type ListLedgerStructuresQuery,
|
|
219
237
|
type ListLedgerTaxonomiesQuery,
|
|
@@ -306,6 +324,17 @@ export type LedgerFiscalCalendar = NonNullable<GetLedgerFiscalCalendarQuery['fis
|
|
|
306
324
|
export type LedgerChartTemplate = ListChartTemplatesQuery['chartTemplates'][number]
|
|
307
325
|
export type LedgerFiscalPeriod = LedgerFiscalCalendar['periods'][number]
|
|
308
326
|
|
|
327
|
+
/** Every reconciliation block's standing for one period. */
|
|
328
|
+
export type LedgerReconciliationList = NonNullable<
|
|
329
|
+
ListLedgerReconciliationsQuery['reconciliations']
|
|
330
|
+
>
|
|
331
|
+
/** One reconciliation block's standing for a period. */
|
|
332
|
+
export type LedgerReconciliation = LedgerReconciliationList['reconciliations'][number]
|
|
333
|
+
/** One account: the ledger's balance, the independent balance, the difference. */
|
|
334
|
+
export type LedgerReconciliationRow = LedgerReconciliation['differences'][number]
|
|
335
|
+
/** One part of an account's independent balance: a schedule, or a statement. */
|
|
336
|
+
export type LedgerReconciliationComponent = LedgerReconciliation['components'][number]
|
|
337
|
+
|
|
309
338
|
// Reports + publish lists + statements
|
|
310
339
|
export type Report = NonNullable<GetLedgerReportQuery['report']>
|
|
311
340
|
export type ReportPackage = NonNullable<GetLedgerReportPackageQuery['reportPackage']>
|
|
@@ -396,6 +425,8 @@ interface RawFiscalCalendar {
|
|
|
396
425
|
stranded_obligation_count?: number
|
|
397
426
|
stranded_obligation_sample?: RawObligationDetail[]
|
|
398
427
|
sync_stale_days?: number | null
|
|
428
|
+
unreconciled_account_count?: number
|
|
429
|
+
unreconciled_account_sample?: string[]
|
|
399
430
|
last_close_at: string | null
|
|
400
431
|
initialized_at: string | null
|
|
401
432
|
last_sync_at: string | null
|
|
@@ -554,6 +585,74 @@ export interface ClosePeriodOptions {
|
|
|
554
585
|
* in the close audit note.
|
|
555
586
|
*/
|
|
556
587
|
allowStrandedObligations?: boolean
|
|
588
|
+
/**
|
|
589
|
+
* Close despite a reconciliation the close waits on that is not
|
|
590
|
+
* reconciled for the period, or was never compared for it. Prefer
|
|
591
|
+
* `refreshReconciliations` and clearing what it reports. The override is
|
|
592
|
+
* recorded in the close audit note.
|
|
593
|
+
*/
|
|
594
|
+
allowUnreconciledAccounts?: boolean
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
/** Which reconciliation check to run. */
|
|
598
|
+
export type ReconciliationMethod = NonNullable<PreviewReconciliationsRequest['method']>
|
|
599
|
+
|
|
600
|
+
export interface PreviewReconciliationsOptions {
|
|
601
|
+
/** Defaults to `source_ledger`, which needs a connected QuickBooks ledger. */
|
|
602
|
+
method?: ReconciliationMethod
|
|
603
|
+
/** Also return the accounts that tie. */
|
|
604
|
+
includeTied?: boolean
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/** One comparison of the ledger with something outside it. Nothing is recorded. */
|
|
608
|
+
export interface LedgerReconciliationPreview {
|
|
609
|
+
period: string
|
|
610
|
+
asOf: string
|
|
611
|
+
fiscalYearStart: string
|
|
612
|
+
method: string
|
|
613
|
+
source: string
|
|
614
|
+
reportBasis: string | null
|
|
615
|
+
lastSyncAt: string | null
|
|
616
|
+
accountsCompared: number
|
|
617
|
+
accountsTied: number
|
|
618
|
+
accountsDifferent: number
|
|
619
|
+
/** Sum of the absolute differences across accounts, not a net figure. */
|
|
620
|
+
totalDifference: number
|
|
621
|
+
/** Accounts that do not tie, largest first; tied ones follow with `includeTied`. */
|
|
622
|
+
rows: LedgerReconciliationRow[]
|
|
623
|
+
notes: string[]
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
export interface RecordStatementBalanceInput {
|
|
627
|
+
/** The balance-sheet account the statement is for. */
|
|
628
|
+
elementId: string
|
|
629
|
+
/** The statement's ending date, as YYYY-MM-DD. */
|
|
630
|
+
asOf: string
|
|
631
|
+
/**
|
|
632
|
+
* The ending balance as the statement shows it: a positive number in the
|
|
633
|
+
* account's normal direction (money in a bank account, or the amount owed
|
|
634
|
+
* on a loan or a card).
|
|
635
|
+
*/
|
|
636
|
+
balance: number
|
|
637
|
+
/** The statement itself, as a document already on the graph. */
|
|
638
|
+
documentId?: string | null
|
|
639
|
+
note?: string | null
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
/** Policy fields to change; an omitted field keeps its value. */
|
|
643
|
+
export interface ReconciliationPolicyChanges {
|
|
644
|
+
requiredForClose?: boolean
|
|
645
|
+
materiality?: number
|
|
646
|
+
reviewRequired?: boolean
|
|
647
|
+
separateReviewer?: boolean
|
|
648
|
+
}
|
|
649
|
+
|
|
650
|
+
export interface LedgerReconciliationPolicy {
|
|
651
|
+
structureId: string
|
|
652
|
+
requiredForClose: boolean
|
|
653
|
+
materiality: number
|
|
654
|
+
reviewRequired: boolean
|
|
655
|
+
separateReviewer: boolean
|
|
557
656
|
}
|
|
558
657
|
|
|
559
658
|
export interface CreateScheduleOptions {
|
|
@@ -575,6 +674,12 @@ export interface CreateScheduleOptions {
|
|
|
575
674
|
residualValue?: number
|
|
576
675
|
usefulLifeMonths?: number
|
|
577
676
|
assetElementId?: string
|
|
677
|
+
/**
|
|
678
|
+
* The day the cost went on the books (YYYY-MM-DD), when that is before
|
|
679
|
+
* the schedule's first period. The schedule reconciliation carries the
|
|
680
|
+
* cost from that day.
|
|
681
|
+
*/
|
|
682
|
+
bookedOn?: string
|
|
578
683
|
}
|
|
579
684
|
}
|
|
580
685
|
|
|
@@ -1164,7 +1269,10 @@ export class LedgerClient {
|
|
|
1164
1269
|
|
|
1165
1270
|
// ── Mappings ────────────────────────────────────────────────────────
|
|
1166
1271
|
|
|
1167
|
-
/**
|
|
1272
|
+
/**
|
|
1273
|
+
* List active CoA→reporting mapping structures, the book mapping first.
|
|
1274
|
+
* Each carries `framework`: the reporting framework it maps the chart into.
|
|
1275
|
+
*/
|
|
1168
1276
|
async listMappings(graphId: string): Promise<LedgerMappingInfo[]> {
|
|
1169
1277
|
const list = await this.gqlQuery(
|
|
1170
1278
|
graphId,
|
|
@@ -1427,6 +1535,7 @@ export class LedgerClient {
|
|
|
1427
1535
|
residual_value: options.scheduleMetadata.residualValue,
|
|
1428
1536
|
useful_life_months: options.scheduleMetadata.usefulLifeMonths,
|
|
1429
1537
|
asset_element_id: options.scheduleMetadata.assetElementId,
|
|
1538
|
+
booked_on: options.scheduleMetadata.bookedOn,
|
|
1430
1539
|
}
|
|
1431
1540
|
: undefined,
|
|
1432
1541
|
},
|
|
@@ -1791,6 +1900,7 @@ export class LedgerClient {
|
|
|
1791
1900
|
note: options?.note ?? null,
|
|
1792
1901
|
allow_stale_sync: options?.allowStaleSync,
|
|
1793
1902
|
allow_stranded_obligations: options?.allowStrandedObligations,
|
|
1903
|
+
allow_unreconciled_accounts: options?.allowUnreconciledAccounts,
|
|
1794
1904
|
}
|
|
1795
1905
|
const envelope = await this.callOperation(
|
|
1796
1906
|
'Close period',
|
|
@@ -1828,6 +1938,127 @@ export class LedgerClient {
|
|
|
1828
1938
|
return rawFiscalCalendarToCamel(envelope.result as unknown as RawFiscalCalendar)
|
|
1829
1939
|
}
|
|
1830
1940
|
|
|
1941
|
+
// ── Reconciliations ─────────────────────────────────────────────────
|
|
1942
|
+
|
|
1943
|
+
/**
|
|
1944
|
+
* Every reconciliation block's standing at a period end (YYYY-MM). A block
|
|
1945
|
+
* not yet compared for the period reads `not_started`.
|
|
1946
|
+
*/
|
|
1947
|
+
async listReconciliations(
|
|
1948
|
+
graphId: string,
|
|
1949
|
+
period: string
|
|
1950
|
+
): Promise<LedgerReconciliationList | null> {
|
|
1951
|
+
return this.gqlQuery(
|
|
1952
|
+
graphId,
|
|
1953
|
+
ListLedgerReconciliationsDocument,
|
|
1954
|
+
{ period },
|
|
1955
|
+
'List reconciliations',
|
|
1956
|
+
(data) => data.reconciliations
|
|
1957
|
+
)
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
/** Compare the ledger with something outside it. Records nothing. */
|
|
1961
|
+
async previewReconciliations(
|
|
1962
|
+
graphId: string,
|
|
1963
|
+
period: string,
|
|
1964
|
+
options?: PreviewReconciliationsOptions
|
|
1965
|
+
): Promise<LedgerReconciliationPreview> {
|
|
1966
|
+
const body: PreviewReconciliationsRequest = {
|
|
1967
|
+
period,
|
|
1968
|
+
method: options?.method,
|
|
1969
|
+
include_tied: options?.includeTied,
|
|
1970
|
+
}
|
|
1971
|
+
const envelope = await this.callOperation(
|
|
1972
|
+
'Preview reconciliations',
|
|
1973
|
+
previewReconciliations({ path: { graph_id: graphId }, body })
|
|
1974
|
+
)
|
|
1975
|
+
return reconciliationPreviewToCamel(envelope.result as unknown as ReconciliationPreviewResponse)
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* Run every reconciliation that applies at a period end and record each
|
|
1980
|
+
* result on its block. `notes` names any check that could not run.
|
|
1981
|
+
*/
|
|
1982
|
+
async refreshReconciliations(graphId: string, period: string): Promise<LedgerReconciliationList> {
|
|
1983
|
+
const body: RefreshReconciliationsRequest = { period }
|
|
1984
|
+
const envelope = await this.callOperation(
|
|
1985
|
+
'Refresh reconciliations',
|
|
1986
|
+
refreshReconciliations({ path: { graph_id: graphId }, body })
|
|
1987
|
+
)
|
|
1988
|
+
return reconciliationListToCamel(envelope.result as unknown as ReconciliationListResponse)
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
/**
|
|
1992
|
+
* Record a statement's ending balance for an account and reconcile the
|
|
1993
|
+
* account to it for the period the statement ends in. Writes no books.
|
|
1994
|
+
*/
|
|
1995
|
+
async recordStatementBalance(
|
|
1996
|
+
graphId: string,
|
|
1997
|
+
input: RecordStatementBalanceInput
|
|
1998
|
+
): Promise<LedgerReconciliation> {
|
|
1999
|
+
const body: RecordStatementBalanceRequest = {
|
|
2000
|
+
element_id: input.elementId,
|
|
2001
|
+
as_of: input.asOf,
|
|
2002
|
+
balance: input.balance,
|
|
2003
|
+
document_id: input.documentId ?? null,
|
|
2004
|
+
note: input.note ?? null,
|
|
2005
|
+
}
|
|
2006
|
+
const envelope = await this.callOperation(
|
|
2007
|
+
'Record statement balance',
|
|
2008
|
+
recordStatementBalance({ path: { graph_id: graphId }, body })
|
|
2009
|
+
)
|
|
2010
|
+
return reconciliationSummaryToCamel(envelope.result as unknown as ReconciliationSummary)
|
|
2011
|
+
}
|
|
2012
|
+
|
|
2013
|
+
/** Change how much the close cares about one reconciliation. */
|
|
2014
|
+
async setReconciliationPolicy(
|
|
2015
|
+
graphId: string,
|
|
2016
|
+
structureId: string,
|
|
2017
|
+
changes: ReconciliationPolicyChanges
|
|
2018
|
+
): Promise<LedgerReconciliationPolicy> {
|
|
2019
|
+
const body: SetReconciliationPolicyRequest = {
|
|
2020
|
+
structure_id: structureId,
|
|
2021
|
+
required_for_close: changes.requiredForClose,
|
|
2022
|
+
materiality: changes.materiality,
|
|
2023
|
+
review_required: changes.reviewRequired,
|
|
2024
|
+
separate_reviewer: changes.separateReviewer,
|
|
2025
|
+
}
|
|
2026
|
+
const envelope = await this.callOperation(
|
|
2027
|
+
'Set reconciliation policy',
|
|
2028
|
+
setReconciliationPolicy({ path: { graph_id: graphId }, body })
|
|
2029
|
+
)
|
|
2030
|
+
const raw = envelope.result as unknown as ReconciliationPolicyResponse
|
|
2031
|
+
return {
|
|
2032
|
+
structureId: raw.structure_id,
|
|
2033
|
+
requiredForClose: raw.required_for_close,
|
|
2034
|
+
materiality: raw.materiality,
|
|
2035
|
+
reviewRequired: raw.review_required,
|
|
2036
|
+
separateReviewer: raw.separate_reviewer,
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
/**
|
|
2041
|
+
* Sign off a reconciled period as its reviewer. Only a member of the graph
|
|
2042
|
+
* can; a later change to any balance lapses the sign-off.
|
|
2043
|
+
*/
|
|
2044
|
+
async signOffReconciliation(
|
|
2045
|
+
graphId: string,
|
|
2046
|
+
structureId: string,
|
|
2047
|
+
period: string,
|
|
2048
|
+
note?: string | null
|
|
2049
|
+
): Promise<LedgerReconciliation> {
|
|
2050
|
+
const body: SignOffReconciliationRequest = {
|
|
2051
|
+
structure_id: structureId,
|
|
2052
|
+
period,
|
|
2053
|
+
note: note ?? null,
|
|
2054
|
+
}
|
|
2055
|
+
const envelope = await this.callOperation(
|
|
2056
|
+
'Sign off reconciliation',
|
|
2057
|
+
signOffReconciliation({ path: { graph_id: graphId }, body })
|
|
2058
|
+
)
|
|
2059
|
+
return reconciliationSummaryToCamel(envelope.result as unknown as ReconciliationSummary)
|
|
2060
|
+
}
|
|
2061
|
+
|
|
1831
2062
|
// ── Journal entries (native accounting writes) ──────────────────────
|
|
1832
2063
|
|
|
1833
2064
|
/**
|
|
@@ -2267,8 +2498,8 @@ export class LedgerClient {
|
|
|
2267
2498
|
* A download is a read, so this resolves through GraphQL
|
|
2268
2499
|
* (`reportDownloadUrl`) — the retired `GET .../reports/{id}/download`
|
|
2269
2500
|
* REST resource is gone. Every flavor resolves to a presigned S3 URL:
|
|
2270
|
-
*
|
|
2271
|
-
* on first request. The returned `downloadUrl` is valid for
|
|
2501
|
+
* the Tavi model is stamped at publish time; the holon and XBRL are
|
|
2502
|
+
* materialized + cached on first request. The returned `downloadUrl` is valid for
|
|
2272
2503
|
* `expiresIn` seconds (default 300, max 3600); browser callers
|
|
2273
2504
|
* navigate to it via `window.location.href` (or an `<a href>` click)
|
|
2274
2505
|
* to trigger the download — the server-set Content-Disposition forces
|
|
@@ -2280,8 +2511,9 @@ export class LedgerClient {
|
|
|
2280
2511
|
*
|
|
2281
2512
|
* @param graphId Graph identifier owning the Report.
|
|
2282
2513
|
* @param reportId Report identifier (rpt_-prefixed ULID).
|
|
2283
|
-
* @param options.format Serialization flavor — `
|
|
2284
|
-
*
|
|
2514
|
+
* @param options.format Serialization flavor — `HOLON_JSONLD` (default, the
|
|
2515
|
+
* holon, which carries the whole report), `TAVI` (the Project Tavi
|
|
2516
|
+
* compiled model stamped at publish), or `XBRL_2_1`.
|
|
2285
2517
|
* @param options.expiresIn Presigned URL lifetime, in seconds.
|
|
2286
2518
|
*/
|
|
2287
2519
|
async getReportDownloadUrl(
|
|
@@ -2294,7 +2526,7 @@ export class LedgerClient {
|
|
|
2294
2526
|
GetLedgerReportDownloadUrlDocument,
|
|
2295
2527
|
{
|
|
2296
2528
|
reportId,
|
|
2297
|
-
format: options.format ?? '
|
|
2529
|
+
format: options.format ?? 'HOLON_JSONLD',
|
|
2298
2530
|
expiresIn: options.expiresIn ?? 300,
|
|
2299
2531
|
},
|
|
2300
2532
|
'Get report download URL',
|
|
@@ -2698,6 +2930,8 @@ function rawFiscalCalendarToCamel(raw: RawFiscalCalendar): LedgerFiscalCalendar
|
|
|
2698
2930
|
rawObligationDetailToCamel
|
|
2699
2931
|
),
|
|
2700
2932
|
syncStaleDays: raw.sync_stale_days ?? null,
|
|
2933
|
+
unreconciledAccountCount: raw.unreconciled_account_count ?? 0,
|
|
2934
|
+
unreconciledAccountSample: raw.unreconciled_account_sample ?? [],
|
|
2701
2935
|
lastCloseAt: raw.last_close_at ?? null,
|
|
2702
2936
|
initializedAt: raw.initialized_at ?? null,
|
|
2703
2937
|
lastSyncAt: raw.last_sync_at ?? null,
|
|
@@ -2711,6 +2945,101 @@ function rawFiscalCalendarToCamel(raw: RawFiscalCalendar): LedgerFiscalCalendar
|
|
|
2711
2945
|
}
|
|
2712
2946
|
}
|
|
2713
2947
|
|
|
2948
|
+
function reconciliationComponentToCamel(
|
|
2949
|
+
raw: ReconciliationComponent
|
|
2950
|
+
): LedgerReconciliationComponent {
|
|
2951
|
+
return {
|
|
2952
|
+
name: raw.name,
|
|
2953
|
+
amount: raw.amount,
|
|
2954
|
+
structureId: raw.structure_id ?? null,
|
|
2955
|
+
eventId: raw.event_id ?? null,
|
|
2956
|
+
documentId: raw.document_id ?? null,
|
|
2957
|
+
note: raw.note ?? null,
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
|
|
2961
|
+
function reconciliationRowToCamel(raw: ReconciliationRow): LedgerReconciliationRow {
|
|
2962
|
+
return {
|
|
2963
|
+
elementId: raw.element_id ?? null,
|
|
2964
|
+
accountCode: raw.account_code ?? null,
|
|
2965
|
+
accountName: raw.account_name,
|
|
2966
|
+
sourceAccountId: raw.source_account_id ?? null,
|
|
2967
|
+
statement: raw.statement ?? null,
|
|
2968
|
+
ledgerBalance: raw.ledger_balance,
|
|
2969
|
+
independentBalance: raw.independent_balance,
|
|
2970
|
+
difference: raw.difference,
|
|
2971
|
+
status: raw.status,
|
|
2972
|
+
asOf: raw.as_of ?? null,
|
|
2973
|
+
components: (raw.components ?? []).map(reconciliationComponentToCamel),
|
|
2974
|
+
}
|
|
2975
|
+
}
|
|
2976
|
+
|
|
2977
|
+
/**
|
|
2978
|
+
* Map the REST `ReconciliationSummary` (snake_case) onto the GraphQL shape
|
|
2979
|
+
* `listReconciliations` returns, so a read and a write give the same object.
|
|
2980
|
+
*/
|
|
2981
|
+
function reconciliationSummaryToCamel(raw: ReconciliationSummary): LedgerReconciliation {
|
|
2982
|
+
return {
|
|
2983
|
+
structureId: raw.structure_id,
|
|
2984
|
+
name: raw.name,
|
|
2985
|
+
scope: raw.scope,
|
|
2986
|
+
method: raw.method,
|
|
2987
|
+
elementId: raw.element_id ?? null,
|
|
2988
|
+
requiredForClose: raw.required_for_close,
|
|
2989
|
+
materiality: raw.materiality,
|
|
2990
|
+
period: raw.period,
|
|
2991
|
+
asOf: raw.as_of,
|
|
2992
|
+
status: raw.status,
|
|
2993
|
+
unreconciledDifference: raw.unreconciled_difference ?? null,
|
|
2994
|
+
accountsCompared: raw.accounts_compared ?? null,
|
|
2995
|
+
accountsDifferent: raw.accounts_different ?? null,
|
|
2996
|
+
ledgerBalance: raw.ledger_balance ?? null,
|
|
2997
|
+
independentBalance: raw.independent_balance ?? null,
|
|
2998
|
+
balanceAsOf: raw.balance_as_of ?? null,
|
|
2999
|
+
components: (raw.components ?? []).map(reconciliationComponentToCamel),
|
|
3000
|
+
source: raw.source ?? null,
|
|
3001
|
+
comparedAt: raw.compared_at ?? null,
|
|
3002
|
+
factSetId: raw.fact_set_id ?? null,
|
|
3003
|
+
comparedBy: raw.compared_by ?? null,
|
|
3004
|
+
comparedVia: raw.compared_via ?? null,
|
|
3005
|
+
reviewRequired: raw.review_required,
|
|
3006
|
+
separateReviewer: raw.separate_reviewer,
|
|
3007
|
+
reviewedBy: raw.reviewed_by ?? null,
|
|
3008
|
+
reviewedAt: raw.reviewed_at ?? null,
|
|
3009
|
+
selfReviewed: raw.self_reviewed ?? null,
|
|
3010
|
+
differences: (raw.differences ?? []).map(reconciliationRowToCamel),
|
|
3011
|
+
}
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
function reconciliationListToCamel(raw: ReconciliationListResponse): LedgerReconciliationList {
|
|
3015
|
+
return {
|
|
3016
|
+
period: raw.period,
|
|
3017
|
+
asOf: raw.as_of,
|
|
3018
|
+
notes: raw.notes ?? [],
|
|
3019
|
+
reconciliations: (raw.reconciliations ?? []).map(reconciliationSummaryToCamel),
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
|
|
3023
|
+
function reconciliationPreviewToCamel(
|
|
3024
|
+
raw: ReconciliationPreviewResponse
|
|
3025
|
+
): LedgerReconciliationPreview {
|
|
3026
|
+
return {
|
|
3027
|
+
period: raw.period,
|
|
3028
|
+
asOf: raw.as_of,
|
|
3029
|
+
fiscalYearStart: raw.fiscal_year_start,
|
|
3030
|
+
method: raw.method,
|
|
3031
|
+
source: raw.source,
|
|
3032
|
+
reportBasis: raw.report_basis ?? null,
|
|
3033
|
+
lastSyncAt: raw.last_sync_at ?? null,
|
|
3034
|
+
accountsCompared: raw.accounts_compared,
|
|
3035
|
+
accountsTied: raw.accounts_tied,
|
|
3036
|
+
accountsDifferent: raw.accounts_different,
|
|
3037
|
+
totalDifference: raw.total_difference,
|
|
3038
|
+
rows: (raw.rows ?? []).map(reconciliationRowToCamel),
|
|
3039
|
+
notes: raw.notes ?? [],
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
|
|
2714
3043
|
/**
|
|
2715
3044
|
* Map the REST `LedgerEntityResponse` (snake_case) onto the GraphQL
|
|
2716
3045
|
* `LedgerEntity` (camelCase) that `getEntity` returns, so callers can treat the
|
|
@@ -627,6 +627,8 @@ export type GetLedgerFiscalCalendarQuery = {
|
|
|
627
627
|
earliestPendingPeriod: string | null;
|
|
628
628
|
strandedObligationCount: number;
|
|
629
629
|
syncStaleDays: number | null;
|
|
630
|
+
unreconciledAccountCount: number;
|
|
631
|
+
unreconciledAccountSample: Array<string>;
|
|
630
632
|
lastCloseAt: string | null;
|
|
631
633
|
initializedAt: string | null;
|
|
632
634
|
lastSyncAt: string | null;
|
|
@@ -1257,6 +1259,7 @@ export type ListLedgerMappingsQuery = {
|
|
|
1257
1259
|
blockType: string;
|
|
1258
1260
|
taxonomyId: string;
|
|
1259
1261
|
isActive: boolean;
|
|
1262
|
+
framework: string | null;
|
|
1260
1263
|
}>;
|
|
1261
1264
|
} | null;
|
|
1262
1265
|
};
|
|
@@ -1367,6 +1370,72 @@ export type ListLedgerPublishListsQuery = {
|
|
|
1367
1370
|
};
|
|
1368
1371
|
} | null;
|
|
1369
1372
|
};
|
|
1373
|
+
export type ListLedgerReconciliationsQueryVariables = Exact<{
|
|
1374
|
+
period: string;
|
|
1375
|
+
}>;
|
|
1376
|
+
export type ListLedgerReconciliationsQuery = {
|
|
1377
|
+
reconciliations: {
|
|
1378
|
+
period: string;
|
|
1379
|
+
asOf: string;
|
|
1380
|
+
notes: Array<string>;
|
|
1381
|
+
reconciliations: Array<{
|
|
1382
|
+
structureId: string;
|
|
1383
|
+
name: string;
|
|
1384
|
+
scope: string;
|
|
1385
|
+
method: string;
|
|
1386
|
+
elementId: string | null;
|
|
1387
|
+
requiredForClose: boolean;
|
|
1388
|
+
materiality: number;
|
|
1389
|
+
period: string;
|
|
1390
|
+
asOf: string;
|
|
1391
|
+
status: string;
|
|
1392
|
+
unreconciledDifference: number | null;
|
|
1393
|
+
accountsCompared: number | null;
|
|
1394
|
+
accountsDifferent: number | null;
|
|
1395
|
+
ledgerBalance: number | null;
|
|
1396
|
+
independentBalance: number | null;
|
|
1397
|
+
balanceAsOf: string | null;
|
|
1398
|
+
source: string | null;
|
|
1399
|
+
comparedAt: string | null;
|
|
1400
|
+
factSetId: string | null;
|
|
1401
|
+
comparedBy: string | null;
|
|
1402
|
+
comparedVia: string | null;
|
|
1403
|
+
reviewRequired: boolean;
|
|
1404
|
+
separateReviewer: boolean;
|
|
1405
|
+
reviewedBy: string | null;
|
|
1406
|
+
reviewedAt: string | null;
|
|
1407
|
+
selfReviewed: boolean | null;
|
|
1408
|
+
components: Array<{
|
|
1409
|
+
name: string;
|
|
1410
|
+
amount: number;
|
|
1411
|
+
structureId: string | null;
|
|
1412
|
+
eventId: string | null;
|
|
1413
|
+
documentId: string | null;
|
|
1414
|
+
note: string | null;
|
|
1415
|
+
}>;
|
|
1416
|
+
differences: Array<{
|
|
1417
|
+
elementId: string | null;
|
|
1418
|
+
accountCode: string | null;
|
|
1419
|
+
accountName: string;
|
|
1420
|
+
sourceAccountId: string | null;
|
|
1421
|
+
statement: string | null;
|
|
1422
|
+
ledgerBalance: number;
|
|
1423
|
+
independentBalance: number;
|
|
1424
|
+
difference: number;
|
|
1425
|
+
status: string;
|
|
1426
|
+
asOf: string | null;
|
|
1427
|
+
components: Array<{
|
|
1428
|
+
name: string;
|
|
1429
|
+
amount: number;
|
|
1430
|
+
structureId: string | null;
|
|
1431
|
+
eventId: string | null;
|
|
1432
|
+
documentId: string | null;
|
|
1433
|
+
note: string | null;
|
|
1434
|
+
}>;
|
|
1435
|
+
}>;
|
|
1436
|
+
}>;
|
|
1437
|
+
} | null;
|
|
1438
|
+
};
|
|
1370
1439
|
export type GetLedgerReportQueryVariables = Exact<{
|
|
1371
1440
|
reportId: string;
|
|
1372
1441
|
}>;
|
|
@@ -1697,6 +1766,7 @@ export type ListLedgerStructuresQuery = {
|
|
|
1697
1766
|
blockType: string;
|
|
1698
1767
|
taxonomyId: string;
|
|
1699
1768
|
isActive: boolean;
|
|
1769
|
+
framework: string | null;
|
|
1700
1770
|
}>;
|
|
1701
1771
|
} | null;
|
|
1702
1772
|
};
|
|
@@ -2136,6 +2206,7 @@ export declare const GetLedgerPeriodCloseStatusDocument: DocumentNode<GetLedgerP
|
|
|
2136
2206
|
export declare const GetLedgerPeriodDraftsDocument: DocumentNode<GetLedgerPeriodDraftsQuery, GetLedgerPeriodDraftsQueryVariables>;
|
|
2137
2207
|
export declare const GetLedgerPublishListDocument: DocumentNode<GetLedgerPublishListQuery, GetLedgerPublishListQueryVariables>;
|
|
2138
2208
|
export declare const ListLedgerPublishListsDocument: DocumentNode<ListLedgerPublishListsQuery, ListLedgerPublishListsQueryVariables>;
|
|
2209
|
+
export declare const ListLedgerReconciliationsDocument: DocumentNode<ListLedgerReconciliationsQuery, ListLedgerReconciliationsQueryVariables>;
|
|
2139
2210
|
export declare const GetLedgerReportDocument: DocumentNode<GetLedgerReportQuery, GetLedgerReportQueryVariables>;
|
|
2140
2211
|
export declare const GetLedgerReportDownloadUrlDocument: DocumentNode<GetLedgerReportDownloadUrlQuery, GetLedgerReportDownloadUrlQueryVariables>;
|
|
2141
2212
|
export declare const GetLedgerReportPackageDocument: DocumentNode<GetLedgerReportPackageQuery, GetLedgerReportPackageQueryVariables>;
|