@robosystems/client 0.2.48 → 0.3.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/extensions/InvestorClient.d.ts +91 -0
- package/extensions/InvestorClient.js +223 -0
- package/extensions/InvestorClient.ts +501 -0
- package/extensions/LedgerClient.d.ts +213 -165
- package/extensions/LedgerClient.js +315 -393
- package/extensions/LedgerClient.ts +887 -564
- package/extensions/ReportClient.d.ts +77 -115
- package/extensions/ReportClient.js +124 -211
- package/extensions/ReportClient.ts +298 -358
- package/extensions/config.js +1 -1
- package/extensions/config.ts +1 -1
- package/extensions/graphql/client.d.ts +46 -0
- package/extensions/graphql/client.js +75 -0
- package/extensions/graphql/client.ts +82 -0
- package/extensions/graphql/generated/graphql.d.ts +1786 -0
- package/extensions/graphql/generated/graphql.js +2671 -0
- package/extensions/graphql/generated/graphql.ts +4491 -0
- package/extensions/graphql/queries/investor/holdings.d.ts +8 -0
- package/extensions/graphql/queries/investor/holdings.js +36 -0
- package/extensions/graphql/queries/investor/holdings.ts +34 -0
- package/extensions/graphql/queries/investor/portfolio.d.ts +4 -0
- package/extensions/graphql/queries/investor/portfolio.js +21 -0
- package/extensions/graphql/queries/investor/portfolio.ts +19 -0
- package/extensions/graphql/queries/investor/portfolios.d.ts +4 -0
- package/extensions/graphql/queries/investor/portfolios.js +29 -0
- package/extensions/graphql/queries/investor/portfolios.ts +27 -0
- package/extensions/graphql/queries/investor/position.d.ts +4 -0
- package/extensions/graphql/queries/investor/position.js +33 -0
- package/extensions/graphql/queries/investor/position.ts +31 -0
- package/extensions/graphql/queries/investor/positions.d.ts +8 -0
- package/extensions/graphql/queries/investor/positions.js +57 -0
- package/extensions/graphql/queries/investor/positions.ts +55 -0
- package/extensions/graphql/queries/investor/securities.d.ts +8 -0
- package/extensions/graphql/queries/investor/securities.js +50 -0
- package/extensions/graphql/queries/investor/securities.ts +48 -0
- package/extensions/graphql/queries/investor/security.d.ts +4 -0
- package/extensions/graphql/queries/investor/security.js +26 -0
- package/extensions/graphql/queries/investor/security.ts +24 -0
- package/extensions/graphql/queries/ledger/accountRollups.d.ts +7 -0
- package/extensions/graphql/queries/ledger/accountRollups.js +36 -0
- package/extensions/graphql/queries/ledger/accountRollups.ts +34 -0
- package/extensions/graphql/queries/ledger/accountTree.d.ts +11 -0
- package/extensions/graphql/queries/ledger/accountTree.js +61 -0
- package/extensions/graphql/queries/ledger/accountTree.ts +59 -0
- package/extensions/graphql/queries/ledger/accounts.d.ts +8 -0
- package/extensions/graphql/queries/ledger/accounts.js +45 -0
- package/extensions/graphql/queries/ledger/accounts.ts +43 -0
- package/extensions/graphql/queries/ledger/closingBookStructures.d.ts +6 -0
- package/extensions/graphql/queries/ledger/closingBookStructures.js +27 -0
- package/extensions/graphql/queries/ledger/closingBookStructures.ts +25 -0
- package/extensions/graphql/queries/ledger/elements.d.ts +6 -0
- package/extensions/graphql/queries/ledger/elements.js +56 -0
- package/extensions/graphql/queries/ledger/elements.ts +54 -0
- package/extensions/graphql/queries/ledger/entities.d.ts +7 -0
- package/extensions/graphql/queries/ledger/entities.js +31 -0
- package/extensions/graphql/queries/ledger/entities.ts +29 -0
- package/extensions/graphql/queries/ledger/entity.d.ts +14 -0
- package/extensions/graphql/queries/ledger/entity.js +55 -0
- package/extensions/graphql/queries/ledger/entity.ts +54 -0
- package/extensions/graphql/queries/ledger/fiscalCalendar.d.ts +8 -0
- package/extensions/graphql/queries/ledger/fiscalCalendar.js +35 -0
- package/extensions/graphql/queries/ledger/fiscalCalendar.ts +33 -0
- package/extensions/graphql/queries/ledger/mappedTrialBalance.d.ts +9 -0
- package/extensions/graphql/queries/ledger/mappedTrialBalance.js +29 -0
- package/extensions/graphql/queries/ledger/mappedTrialBalance.ts +27 -0
- package/extensions/graphql/queries/ledger/mapping.d.ts +5 -0
- package/extensions/graphql/queries/ledger/mapping.js +35 -0
- package/extensions/graphql/queries/ledger/mapping.ts +33 -0
- package/extensions/graphql/queries/ledger/mappingCoverage.d.ts +5 -0
- package/extensions/graphql/queries/ledger/mappingCoverage.js +22 -0
- package/extensions/graphql/queries/ledger/mappingCoverage.ts +20 -0
- package/extensions/graphql/queries/ledger/mappings.d.ts +6 -0
- package/extensions/graphql/queries/ledger/mappings.js +23 -0
- package/extensions/graphql/queries/ledger/mappings.ts +21 -0
- package/extensions/graphql/queries/ledger/periodCloseStatus.d.ts +6 -0
- package/extensions/graphql/queries/ledger/periodCloseStatus.js +29 -0
- package/extensions/graphql/queries/ledger/periodCloseStatus.ts +27 -0
- package/extensions/graphql/queries/ledger/periodDrafts.d.ts +8 -0
- package/extensions/graphql/queries/ledger/periodDrafts.js +45 -0
- package/extensions/graphql/queries/ledger/periodDrafts.ts +43 -0
- package/extensions/graphql/queries/ledger/publishList.d.ts +5 -0
- package/extensions/graphql/queries/ledger/publishList.js +29 -0
- package/extensions/graphql/queries/ledger/publishList.ts +27 -0
- package/extensions/graphql/queries/ledger/publishLists.d.ts +5 -0
- package/extensions/graphql/queries/ledger/publishLists.js +29 -0
- package/extensions/graphql/queries/ledger/publishLists.ts +27 -0
- package/extensions/graphql/queries/ledger/report.d.ts +5 -0
- package/extensions/graphql/queries/ledger/report.js +40 -0
- package/extensions/graphql/queries/ledger/report.ts +38 -0
- package/extensions/graphql/queries/ledger/reportingTaxonomy.d.ts +6 -0
- package/extensions/graphql/queries/ledger/reportingTaxonomy.js +27 -0
- package/extensions/graphql/queries/ledger/reportingTaxonomy.ts +25 -0
- package/extensions/graphql/queries/ledger/reports.d.ts +8 -0
- package/extensions/graphql/queries/ledger/reports.js +45 -0
- package/extensions/graphql/queries/ledger/reports.ts +43 -0
- package/extensions/graphql/queries/ledger/scheduleFacts.d.ts +7 -0
- package/extensions/graphql/queries/ledger/scheduleFacts.js +24 -0
- package/extensions/graphql/queries/ledger/scheduleFacts.ts +22 -0
- package/extensions/graphql/queries/ledger/schedules.d.ts +6 -0
- package/extensions/graphql/queries/ledger/schedules.js +24 -0
- package/extensions/graphql/queries/ledger/schedules.ts +22 -0
- package/extensions/graphql/queries/ledger/statement.d.ts +9 -0
- package/extensions/graphql/queries/ledger/statement.js +43 -0
- package/extensions/graphql/queries/ledger/statement.ts +41 -0
- package/extensions/graphql/queries/ledger/structures.d.ts +5 -0
- package/extensions/graphql/queries/ledger/structures.js +22 -0
- package/extensions/graphql/queries/ledger/structures.ts +20 -0
- package/extensions/graphql/queries/ledger/summary.d.ts +7 -0
- package/extensions/graphql/queries/ledger/summary.js +25 -0
- package/extensions/graphql/queries/ledger/summary.ts +23 -0
- package/extensions/graphql/queries/ledger/taxonomies.d.ts +5 -0
- package/extensions/graphql/queries/ledger/taxonomies.js +28 -0
- package/extensions/graphql/queries/ledger/taxonomies.ts +26 -0
- package/extensions/graphql/queries/ledger/transaction.d.ts +6 -0
- package/extensions/graphql/queries/ledger/transaction.js +49 -0
- package/extensions/graphql/queries/ledger/transaction.ts +47 -0
- package/extensions/graphql/queries/ledger/transactions.d.ts +7 -0
- package/extensions/graphql/queries/ledger/transactions.js +49 -0
- package/extensions/graphql/queries/ledger/transactions.ts +47 -0
- package/extensions/graphql/queries/ledger/trialBalance.d.ts +7 -0
- package/extensions/graphql/queries/ledger/trialBalance.js +28 -0
- package/extensions/graphql/queries/ledger/trialBalance.ts +26 -0
- package/extensions/graphql/queries/ledger/unmappedElements.d.ts +8 -0
- package/extensions/graphql/queries/ledger/unmappedElements.js +29 -0
- package/extensions/graphql/queries/ledger/unmappedElements.ts +27 -0
- package/extensions/hooks.d.ts +1 -1
- package/extensions/index.d.ts +5 -1
- package/extensions/index.js +13 -1
- package/extensions/index.ts +14 -0
- package/index.ts +2 -2
- package/package.json +14 -5
- package/sdk/index.d.ts +2 -2
- package/sdk/index.js +38 -65
- package/sdk/index.ts +2 -2
- package/sdk/sdk.gen.d.ts +101 -220
- package/sdk/sdk.gen.js +251 -445
- package/sdk/sdk.gen.ts +216 -409
- package/sdk/types.gen.d.ts +4586 -7045
- package/sdk/types.gen.ts +4702 -7334
- package/sdk.gen.d.ts +101 -220
- package/sdk.gen.js +251 -445
- package/sdk.gen.ts +216 -409
- package/types.gen.d.ts +4586 -7045
- package/types.gen.ts +4702 -7334
- package/extensions/AgentClient.test.ts +0 -403
- package/extensions/LedgerClient.test.ts +0 -1138
- package/extensions/OperationClient.test.ts +0 -365
- package/extensions/QueryClient.test.ts +0 -432
- package/extensions/ReportClient.test.ts +0 -828
- package/extensions/SSEClient.test.ts +0 -375
- package/extensions/config.test.ts +0 -199
- package/extensions/hooks.test.ts +0 -373
- package/extensions/index.test.ts +0 -420
- package/sdk-extensions/AgentClient.d.ts +0 -82
- package/sdk-extensions/AgentClient.js +0 -218
- package/sdk-extensions/AgentClient.test.ts +0 -403
- package/sdk-extensions/AgentClient.ts +0 -321
- package/sdk-extensions/LedgerClient.d.ts +0 -242
- package/sdk-extensions/LedgerClient.js +0 -496
- package/sdk-extensions/LedgerClient.test.ts +0 -1138
- package/sdk-extensions/LedgerClient.ts +0 -800
- package/sdk-extensions/OperationClient.d.ts +0 -65
- package/sdk-extensions/OperationClient.js +0 -251
- package/sdk-extensions/OperationClient.test.ts +0 -365
- package/sdk-extensions/OperationClient.ts +0 -324
- package/sdk-extensions/QueryClient.d.ts +0 -52
- package/sdk-extensions/QueryClient.js +0 -313
- package/sdk-extensions/QueryClient.test.ts +0 -432
- package/sdk-extensions/QueryClient.ts +0 -420
- package/sdk-extensions/README.md +0 -901
- package/sdk-extensions/ReportClient.d.ts +0 -151
- package/sdk-extensions/ReportClient.js +0 -278
- package/sdk-extensions/ReportClient.test.ts +0 -828
- package/sdk-extensions/ReportClient.ts +0 -486
- package/sdk-extensions/SSEClient.d.ts +0 -62
- package/sdk-extensions/SSEClient.js +0 -154
- package/sdk-extensions/SSEClient.test.ts +0 -375
- package/sdk-extensions/SSEClient.ts +0 -210
- package/sdk-extensions/config.d.ts +0 -57
- package/sdk-extensions/config.js +0 -152
- package/sdk-extensions/config.test.ts +0 -199
- package/sdk-extensions/config.ts +0 -175
- package/sdk-extensions/hooks.d.ts +0 -110
- package/sdk-extensions/hooks.js +0 -384
- package/sdk-extensions/hooks.test.ts +0 -373
- package/sdk-extensions/hooks.ts +0 -459
- package/sdk-extensions/index.d.ts +0 -63
- package/sdk-extensions/index.js +0 -164
- package/sdk-extensions/index.test.ts +0 -420
- package/sdk-extensions/index.ts +0 -203
|
@@ -1,42 +1,63 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import type { AutoMapElementsOperation, CreateMappingAssociationOperation, CreateStructureRequest, CreateTaxonomyRequest, DeleteMappingAssociationOperation, OperationEnvelope, UpdateEntityRequest } from '../types.gen';
|
|
2
|
+
import { type GetLedgerAccountRollupsQuery, type GetLedgerAccountTreeQuery, type GetLedgerClosingBookStructuresQuery, type GetLedgerEntityQuery, type GetLedgerFiscalCalendarQuery, type GetLedgerMappedTrialBalanceQuery, type GetLedgerMappingCoverageQuery, type GetLedgerMappingQuery, type GetLedgerPeriodCloseStatusQuery, type GetLedgerPeriodDraftsQuery, type GetLedgerReportingTaxonomyQuery, type GetLedgerScheduleFactsQuery, type GetLedgerSummaryQuery, type GetLedgerTransactionQuery, type GetLedgerTrialBalanceQuery, type ListLedgerAccountsQuery, type ListLedgerElementsQuery, type ListLedgerEntitiesQuery, type ListLedgerMappingsQuery, type ListLedgerSchedulesQuery, type ListLedgerStructuresQuery, type ListLedgerTaxonomiesQuery, type ListLedgerTransactionsQuery, type ListLedgerUnmappedElementsQuery } from './graphql/generated/graphql';
|
|
3
|
+
export type LedgerEntity = NonNullable<GetLedgerEntityQuery['entity']>;
|
|
4
|
+
export type LedgerEntitySummary = ListLedgerEntitiesQuery['entities'][number];
|
|
5
|
+
export type LedgerSummary = NonNullable<GetLedgerSummaryQuery['summary']>;
|
|
6
|
+
export type LedgerAccountList = NonNullable<ListLedgerAccountsQuery['accounts']>;
|
|
7
|
+
export type LedgerAccount = LedgerAccountList['accounts'][number];
|
|
8
|
+
export type LedgerAccountTree = NonNullable<GetLedgerAccountTreeQuery['accountTree']>;
|
|
9
|
+
export type LedgerAccountRollups = NonNullable<GetLedgerAccountRollupsQuery['accountRollups']>;
|
|
10
|
+
export type LedgerTrialBalance = NonNullable<GetLedgerTrialBalanceQuery['trialBalance']>;
|
|
11
|
+
export type LedgerMappedTrialBalance = NonNullable<GetLedgerMappedTrialBalanceQuery['mappedTrialBalance']>;
|
|
12
|
+
export type LedgerTransactionList = NonNullable<ListLedgerTransactionsQuery['transactions']>;
|
|
13
|
+
export type LedgerTransactionListItem = LedgerTransactionList['transactions'][number];
|
|
14
|
+
export type LedgerTransaction = NonNullable<GetLedgerTransactionQuery['transaction']>;
|
|
15
|
+
export type LedgerReportingTaxonomy = NonNullable<GetLedgerReportingTaxonomyQuery['reportingTaxonomy']>;
|
|
16
|
+
export type LedgerTaxonomyList = NonNullable<ListLedgerTaxonomiesQuery['taxonomies']>;
|
|
17
|
+
export type LedgerTaxonomy = LedgerTaxonomyList['taxonomies'][number];
|
|
18
|
+
export type LedgerElementList = NonNullable<ListLedgerElementsQuery['elements']>;
|
|
19
|
+
export type LedgerElement = LedgerElementList['elements'][number];
|
|
20
|
+
export type LedgerUnmappedElement = ListLedgerUnmappedElementsQuery['unmappedElements'][number];
|
|
21
|
+
export type LedgerStructureList = NonNullable<ListLedgerStructuresQuery['structures']>;
|
|
22
|
+
export type LedgerStructure = LedgerStructureList['structures'][number];
|
|
23
|
+
export type LedgerMappingList = NonNullable<ListLedgerMappingsQuery['mappings']>;
|
|
24
|
+
export type LedgerMappingInfo = LedgerMappingList['structures'][number];
|
|
25
|
+
export type LedgerMapping = NonNullable<GetLedgerMappingQuery['mapping']>;
|
|
26
|
+
export type LedgerMappingCoverage = NonNullable<GetLedgerMappingCoverageQuery['mappingCoverage']>;
|
|
27
|
+
export type LedgerScheduleList = NonNullable<ListLedgerSchedulesQuery['schedules']>;
|
|
28
|
+
export type LedgerSchedule = LedgerScheduleList['schedules'][number];
|
|
29
|
+
export type LedgerScheduleFacts = NonNullable<GetLedgerScheduleFactsQuery['scheduleFacts']>;
|
|
30
|
+
export type LedgerScheduleFact = LedgerScheduleFacts['facts'][number];
|
|
31
|
+
export type LedgerPeriodCloseStatus = NonNullable<GetLedgerPeriodCloseStatusQuery['periodCloseStatus']>;
|
|
32
|
+
export type LedgerPeriodCloseItem = LedgerPeriodCloseStatus['schedules'][number];
|
|
33
|
+
export type LedgerPeriodDrafts = NonNullable<GetLedgerPeriodDraftsQuery['periodDrafts']>;
|
|
34
|
+
export type LedgerDraftEntry = LedgerPeriodDrafts['drafts'][number];
|
|
35
|
+
export type LedgerDraftLineItem = LedgerDraftEntry['lineItems'][number];
|
|
36
|
+
export type LedgerClosingBookStructures = NonNullable<GetLedgerClosingBookStructuresQuery['closingBookStructures']>;
|
|
37
|
+
export type LedgerFiscalCalendar = NonNullable<GetLedgerFiscalCalendarQuery['fiscalCalendar']>;
|
|
38
|
+
export type LedgerFiscalPeriod = LedgerFiscalCalendar['periods'][number];
|
|
39
|
+
export interface InitializeLedgerResult {
|
|
40
|
+
fiscalCalendar: LedgerFiscalCalendar;
|
|
41
|
+
periodsCreated: number;
|
|
42
|
+
warnings: string[];
|
|
17
43
|
}
|
|
18
|
-
export interface
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
highConfidence: number;
|
|
24
|
-
mediumConfidence: number;
|
|
25
|
-
lowConfidence: number;
|
|
44
|
+
export interface ClosePeriodResult {
|
|
45
|
+
period: string;
|
|
46
|
+
entriesPosted: number;
|
|
47
|
+
targetAutoAdvanced: boolean;
|
|
48
|
+
fiscalCalendar: LedgerFiscalCalendar;
|
|
26
49
|
}
|
|
27
|
-
export
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
totalPeriods: number;
|
|
39
|
-
periodsWithEntries: number;
|
|
50
|
+
export type ClosingEntryOutcome = 'created' | 'unchanged' | 'regenerated' | 'removed' | 'skipped';
|
|
51
|
+
export interface ClosingEntry {
|
|
52
|
+
outcome: ClosingEntryOutcome;
|
|
53
|
+
entryId: string | null;
|
|
54
|
+
status: string | null;
|
|
55
|
+
postingDate: string | null;
|
|
56
|
+
memo: string | null;
|
|
57
|
+
debitElementId: string | null;
|
|
58
|
+
creditElementId: string | null;
|
|
59
|
+
amount: number | null;
|
|
60
|
+
reason: string | null;
|
|
40
61
|
}
|
|
41
62
|
export interface ScheduleCreated {
|
|
42
63
|
structureId: string;
|
|
@@ -45,36 +66,39 @@ export interface ScheduleCreated {
|
|
|
45
66
|
totalPeriods: number;
|
|
46
67
|
totalFacts: number;
|
|
47
68
|
}
|
|
48
|
-
export interface
|
|
49
|
-
elementId: string;
|
|
50
|
-
elementName: string;
|
|
51
|
-
value: number;
|
|
52
|
-
periodStart: string;
|
|
53
|
-
periodEnd: string;
|
|
54
|
-
}
|
|
55
|
-
export interface PeriodCloseItem {
|
|
69
|
+
export interface TruncateScheduleResult {
|
|
56
70
|
structureId: string;
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
entryId: string | null;
|
|
71
|
+
newEndDate: string;
|
|
72
|
+
factsDeleted: number;
|
|
73
|
+
reason: string;
|
|
61
74
|
}
|
|
62
|
-
export
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
75
|
+
export type LedgerEntryType = 'standard' | 'adjusting' | 'closing' | 'reversing';
|
|
76
|
+
export interface InitializeLedgerOptions {
|
|
77
|
+
closedThrough?: string | null;
|
|
78
|
+
fiscalYearStartMonth?: number;
|
|
79
|
+
earliestDataPeriod?: string | null;
|
|
80
|
+
autoSeedSchedules?: boolean;
|
|
81
|
+
note?: string | null;
|
|
69
82
|
}
|
|
70
|
-
export interface
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
export interface ClosePeriodOptions {
|
|
84
|
+
note?: string | null;
|
|
85
|
+
allowStaleSync?: boolean;
|
|
86
|
+
}
|
|
87
|
+
export interface ManualClosingLineItem {
|
|
88
|
+
elementId: string;
|
|
89
|
+
debitAmount?: number;
|
|
90
|
+
creditAmount?: number;
|
|
91
|
+
description?: string | null;
|
|
92
|
+
}
|
|
93
|
+
export interface CreateManualClosingEntryOptions {
|
|
73
94
|
postingDate: string;
|
|
74
95
|
memo: string;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
lineItems: ManualClosingLineItem[];
|
|
97
|
+
entryType?: LedgerEntryType;
|
|
98
|
+
}
|
|
99
|
+
export interface TruncateScheduleOptions {
|
|
100
|
+
newEndDate: string;
|
|
101
|
+
reason: string;
|
|
78
102
|
}
|
|
79
103
|
export interface CreateScheduleOptions {
|
|
80
104
|
name: string;
|
|
@@ -85,7 +109,7 @@ export interface CreateScheduleOptions {
|
|
|
85
109
|
entryTemplate: {
|
|
86
110
|
debitElementId: string;
|
|
87
111
|
creditElementId: string;
|
|
88
|
-
entryType?:
|
|
112
|
+
entryType?: LedgerEntryType;
|
|
89
113
|
memoTemplate?: string;
|
|
90
114
|
};
|
|
91
115
|
taxonomyId?: string;
|
|
@@ -97,69 +121,81 @@ export interface CreateScheduleOptions {
|
|
|
97
121
|
assetElementId?: string;
|
|
98
122
|
};
|
|
99
123
|
}
|
|
124
|
+
interface LedgerClientConfig {
|
|
125
|
+
baseUrl: string;
|
|
126
|
+
credentials?: 'include' | 'same-origin' | 'omit';
|
|
127
|
+
headers?: Record<string, string>;
|
|
128
|
+
token?: string;
|
|
129
|
+
}
|
|
100
130
|
export declare class LedgerClient {
|
|
101
131
|
private config;
|
|
102
|
-
constructor(config: {
|
|
103
|
-
baseUrl: string;
|
|
104
|
-
credentials?: 'include' | 'same-origin' | 'omit';
|
|
105
|
-
headers?: Record<string, string>;
|
|
106
|
-
token?: string;
|
|
107
|
-
});
|
|
108
|
-
/**
|
|
109
|
-
* Get the entity (company/organization) for this graph.
|
|
110
|
-
*/
|
|
111
|
-
getEntity(graphId: string): Promise<LedgerEntity | null>;
|
|
112
132
|
/**
|
|
113
|
-
*
|
|
133
|
+
* Per-graph GraphQL client cache. The first call for a given graph
|
|
134
|
+
* creates a `GraphQLClient` bound to `/extensions/{graph_id}/graphql`;
|
|
135
|
+
* subsequent calls reuse it.
|
|
114
136
|
*/
|
|
115
|
-
|
|
137
|
+
private gql;
|
|
138
|
+
constructor(config: LedgerClientConfig);
|
|
116
139
|
/**
|
|
117
|
-
* Get the
|
|
140
|
+
* Get the entity (company/organization) for this graph.
|
|
141
|
+
* Returns null when the ledger has no entity yet.
|
|
118
142
|
*/
|
|
119
|
-
|
|
143
|
+
getEntity(graphId: string): Promise<LedgerEntity | null>;
|
|
144
|
+
/** List all entities for this graph, optionally filtered by source system. */
|
|
145
|
+
listEntities(graphId: string, options?: {
|
|
146
|
+
source?: string;
|
|
147
|
+
}): Promise<LedgerEntitySummary[]>;
|
|
120
148
|
/**
|
|
121
|
-
*
|
|
149
|
+
* Update the entity for this graph. Only non-null fields are applied.
|
|
150
|
+
* Returns the updated entity.
|
|
122
151
|
*/
|
|
152
|
+
updateEntity(graphId: string, updates: UpdateEntityRequest): Promise<LedgerEntity>;
|
|
153
|
+
/** Ledger rollup counts + QB sync metadata. */
|
|
154
|
+
getSummary(graphId: string): Promise<LedgerSummary | null>;
|
|
155
|
+
/** List CoA accounts with optional filters and pagination. */
|
|
156
|
+
listAccounts(graphId: string, options?: {
|
|
157
|
+
classification?: string;
|
|
158
|
+
isActive?: boolean;
|
|
159
|
+
limit?: number;
|
|
160
|
+
offset?: number;
|
|
161
|
+
}): Promise<LedgerAccountList | null>;
|
|
162
|
+
/** Hierarchical Chart of Accounts (up to 4 levels deep). */
|
|
163
|
+
getAccountTree(graphId: string): Promise<LedgerAccountTree | null>;
|
|
164
|
+
/** Accounts rolled up to reporting concepts via a mapping structure. */
|
|
165
|
+
getAccountRollups(graphId: string, options?: {
|
|
166
|
+
mappingId?: string;
|
|
167
|
+
startDate?: string;
|
|
168
|
+
endDate?: string;
|
|
169
|
+
}): Promise<LedgerAccountRollups | null>;
|
|
170
|
+
/** List transactions with optional type + date filters and pagination. */
|
|
123
171
|
listTransactions(graphId: string, options?: {
|
|
172
|
+
type?: string;
|
|
124
173
|
startDate?: string;
|
|
125
174
|
endDate?: string;
|
|
126
175
|
limit?: number;
|
|
127
176
|
offset?: number;
|
|
128
|
-
}): Promise<
|
|
129
|
-
/**
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
getTransaction(graphId: string, transactionId: string): Promise<LedgerTransactionDetailResponse>;
|
|
133
|
-
/**
|
|
134
|
-
* Get trial balance (CoA-level debits/credits).
|
|
135
|
-
*/
|
|
177
|
+
}): Promise<LedgerTransactionList | null>;
|
|
178
|
+
/** Get transaction detail with entries + line items. */
|
|
179
|
+
getTransaction(graphId: string, transactionId: string): Promise<LedgerTransaction | null>;
|
|
180
|
+
/** Trial balance by raw CoA account. */
|
|
136
181
|
getTrialBalance(graphId: string, options?: {
|
|
137
182
|
startDate?: string;
|
|
138
183
|
endDate?: string;
|
|
139
|
-
}): Promise<
|
|
140
|
-
/**
|
|
141
|
-
|
|
142
|
-
*/
|
|
143
|
-
getMappedTrialBalance(graphId: string, options?: {
|
|
144
|
-
mappingId?: string;
|
|
184
|
+
}): Promise<LedgerTrialBalance | null>;
|
|
185
|
+
/** Trial balance rolled up to GAAP reporting concepts via a mapping. */
|
|
186
|
+
getMappedTrialBalance(graphId: string, mappingId: string, options?: {
|
|
145
187
|
startDate?: string;
|
|
146
188
|
endDate?: string;
|
|
147
|
-
}): Promise<
|
|
148
|
-
/**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
/**
|
|
157
|
-
* List reporting structures (IS, BS, CF) for a taxonomy.
|
|
158
|
-
*/
|
|
159
|
-
listStructures(graphId: string, taxonomyId?: string): Promise<Structure[]>;
|
|
160
|
-
/**
|
|
161
|
-
* List elements (CoA accounts, GAAP concepts, etc.).
|
|
162
|
-
*/
|
|
189
|
+
}): Promise<LedgerMappedTrialBalance | null>;
|
|
190
|
+
/** Get the locked US GAAP reporting taxonomy for this graph. */
|
|
191
|
+
getReportingTaxonomy(graphId: string): Promise<LedgerReportingTaxonomy | null>;
|
|
192
|
+
/** List active taxonomies with optional type filter. */
|
|
193
|
+
listTaxonomies(graphId: string, options?: {
|
|
194
|
+
taxonomyType?: string;
|
|
195
|
+
}): Promise<LedgerTaxonomy[]>;
|
|
196
|
+
/** Create a new taxonomy (used for CoA + mapping taxonomies). */
|
|
197
|
+
createTaxonomy(graphId: string, body: CreateTaxonomyRequest): Promise<Record<string, unknown>>;
|
|
198
|
+
/** List elements (CoA accounts, GAAP concepts, etc.) with filters. */
|
|
163
199
|
listElements(graphId: string, options?: {
|
|
164
200
|
taxonomyId?: string;
|
|
165
201
|
source?: string;
|
|
@@ -167,76 +203,88 @@ export declare class LedgerClient {
|
|
|
167
203
|
isAbstract?: boolean;
|
|
168
204
|
limit?: number;
|
|
169
205
|
offset?: number;
|
|
170
|
-
}): Promise<
|
|
171
|
-
/**
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
description?: string;
|
|
206
|
+
}): Promise<LedgerElementList | null>;
|
|
207
|
+
/** CoA elements not yet mapped to a reporting concept. */
|
|
208
|
+
listUnmappedElements(graphId: string, options?: {
|
|
209
|
+
mappingId?: string;
|
|
210
|
+
}): Promise<LedgerUnmappedElement[]>;
|
|
211
|
+
/** List reporting structures (IS, BS, CF, schedules) with optional filters. */
|
|
212
|
+
listStructures(graphId: string, options?: {
|
|
178
213
|
taxonomyId?: string;
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
* List available CoA→GAAP mapping structures.
|
|
182
|
-
*/
|
|
183
|
-
listMappings(graphId: string): Promise<MappingInfo[]>;
|
|
214
|
+
structureType?: string;
|
|
215
|
+
}): Promise<LedgerStructure[]>;
|
|
184
216
|
/**
|
|
185
|
-
*
|
|
217
|
+
* Create a new structure. Most common use is a CoA→reporting mapping
|
|
218
|
+
* structure; also used for custom statement + schedule structures.
|
|
186
219
|
*/
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
/**
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
deleteMapping(graphId: string, mappingId: string, associationId: string): Promise<void>;
|
|
200
|
-
/**
|
|
201
|
-
* Trigger AI auto-mapping (MappingAgent).
|
|
202
|
-
* Returns immediately — the agent runs in the background.
|
|
203
|
-
*/
|
|
204
|
-
autoMap(graphId: string, mappingId: string): Promise<{
|
|
205
|
-
operationId?: string;
|
|
220
|
+
createStructure(graphId: string, body: CreateStructureRequest): Promise<LedgerMappingInfo>;
|
|
221
|
+
/** List active CoA→reporting mapping structures. */
|
|
222
|
+
listMappings(graphId: string): Promise<LedgerMappingInfo[]>;
|
|
223
|
+
/** Get a mapping structure with all its associations. */
|
|
224
|
+
getMapping(graphId: string, mappingId: string): Promise<LedgerMapping | null>;
|
|
225
|
+
/** Mapping coverage stats — how many CoA elements are mapped. */
|
|
226
|
+
getMappingCoverage(graphId: string, mappingId: string): Promise<LedgerMappingCoverage | null>;
|
|
227
|
+
/** Create a manual mapping association between two elements. */
|
|
228
|
+
createMappingAssociation(graphId: string, body: CreateMappingAssociationOperation): Promise<Record<string, unknown>>;
|
|
229
|
+
/** Delete a mapping association. */
|
|
230
|
+
deleteMappingAssociation(graphId: string, body: DeleteMappingAssociationOperation): Promise<{
|
|
231
|
+
deleted: boolean;
|
|
206
232
|
}>;
|
|
207
233
|
/**
|
|
208
|
-
*
|
|
234
|
+
* Trigger the AI MappingAgent. Returns the operation id — async; the
|
|
235
|
+
* agent runs in the background. Consumers can subscribe to progress
|
|
236
|
+
* via `/v1/operations/{operationId}/stream`.
|
|
209
237
|
*/
|
|
238
|
+
autoMapElements(graphId: string, body: AutoMapElementsOperation): Promise<{
|
|
239
|
+
operationId: string;
|
|
240
|
+
status: OperationEnvelope['status'];
|
|
241
|
+
}>;
|
|
242
|
+
/** List all schedule structures with metadata. */
|
|
243
|
+
listSchedules(graphId: string): Promise<LedgerSchedule[]>;
|
|
244
|
+
/** Schedule facts optionally filtered by period window. */
|
|
245
|
+
getScheduleFacts(graphId: string, structureId: string, options?: {
|
|
246
|
+
periodStart?: string;
|
|
247
|
+
periodEnd?: string;
|
|
248
|
+
}): Promise<LedgerScheduleFact[]>;
|
|
249
|
+
/** Create a new schedule with pre-generated monthly facts. */
|
|
210
250
|
createSchedule(graphId: string, options: CreateScheduleOptions): Promise<ScheduleCreated>;
|
|
251
|
+
/** Truncate a schedule — end it early at `newEndDate`. */
|
|
252
|
+
truncateSchedule(graphId: string, structureId: string, options: TruncateScheduleOptions): Promise<TruncateScheduleResult>;
|
|
253
|
+
/** Close status for all schedules in a fiscal period. */
|
|
254
|
+
getPeriodCloseStatus(graphId: string, periodStart: string, periodEnd: string): Promise<LedgerPeriodCloseStatus | null>;
|
|
255
|
+
/** All draft entries in a period, fully expanded for review pre-close. */
|
|
256
|
+
listPeriodDrafts(graphId: string, period: string): Promise<LedgerPeriodDrafts | null>;
|
|
211
257
|
/**
|
|
212
|
-
*
|
|
258
|
+
* Idempotently create (or refresh) a draft closing entry from a
|
|
259
|
+
* schedule for a period. See `ClosingEntryOutcome` for semantics.
|
|
213
260
|
*/
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Get facts for a schedule, optionally filtered by period.
|
|
217
|
-
*/
|
|
218
|
-
getScheduleFacts(graphId: string, structureId: string, periodStart?: string, periodEnd?: string): Promise<ScheduleFact[]>;
|
|
219
|
-
/**
|
|
220
|
-
* Get close status for all schedules in a fiscal period.
|
|
221
|
-
*/
|
|
222
|
-
getPeriodCloseStatus(graphId: string, periodStart: string, periodEnd: string): Promise<PeriodCloseStatus>;
|
|
261
|
+
createClosingEntry(graphId: string, structureId: string, postingDate: string, periodStart: string, periodEnd: string, memo?: string): Promise<ClosingEntry>;
|
|
223
262
|
/**
|
|
224
|
-
* Create a
|
|
263
|
+
* Create a manual balanced closing entry (not tied to a schedule).
|
|
264
|
+
* Used for disposals, adjustments, and one-off closing events.
|
|
225
265
|
*/
|
|
226
|
-
|
|
266
|
+
createManualClosingEntry(graphId: string, options: CreateManualClosingEntryOptions): Promise<ClosingEntry>;
|
|
267
|
+
/** Grouped closing book structures for the close-screen sidebar. */
|
|
268
|
+
getClosingBookStructures(graphId: string): Promise<LedgerClosingBookStructures | null>;
|
|
269
|
+
/** Current fiscal calendar state — pointers, gap, closeable status. */
|
|
270
|
+
getFiscalCalendar(graphId: string): Promise<LedgerFiscalCalendar | null>;
|
|
271
|
+
/** One-time ledger initialization — seed fiscal calendar + periods. */
|
|
272
|
+
initializeLedger(graphId: string, options?: InitializeLedgerOptions): Promise<InitializeLedgerResult>;
|
|
273
|
+
/** Set the user-controlled close target (YYYY-MM). */
|
|
274
|
+
setCloseTarget(graphId: string, period: string, note?: string | null): Promise<LedgerFiscalCalendar>;
|
|
275
|
+
/** Close a fiscal period — the final commit action. */
|
|
276
|
+
closePeriod(graphId: string, period: string, options?: ClosePeriodOptions): Promise<ClosePeriodResult>;
|
|
277
|
+
/** Reopen a closed fiscal period. Requires a reason for the audit log. */
|
|
278
|
+
reopenPeriod(graphId: string, period: string, reason: string, note?: string | null): Promise<LedgerFiscalCalendar>;
|
|
227
279
|
/**
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
* and period close grouped into categories.
|
|
280
|
+
* Run a typed GraphQL query against the per-graph endpoint and
|
|
281
|
+
* translate ClientError into a readable facade error.
|
|
231
282
|
*/
|
|
232
|
-
|
|
283
|
+
private gqlQuery;
|
|
233
284
|
/**
|
|
234
|
-
*
|
|
235
|
-
*
|
|
285
|
+
* Await an SDK-generated `opXxx(...)` call, throw a readable error on
|
|
286
|
+
* non-2xx, and return the `OperationEnvelope` on success.
|
|
236
287
|
*/
|
|
237
|
-
|
|
238
|
-
mappingId?: string;
|
|
239
|
-
startDate?: string;
|
|
240
|
-
endDate?: string;
|
|
241
|
-
}): Promise<AccountRollupsResponse>;
|
|
288
|
+
private callOperation;
|
|
242
289
|
}
|
|
290
|
+
export {};
|