@robosystems/client 2.8.1 → 2.9.1

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.
@@ -1,6 +1,6 @@
1
- import type { AssociationResponse, AutoMapElementsOperation, BindTextBlockRequest, BindTextBlockResponse, BlockedSourceGraphResponse, BlockSourceGraphResult, ComputeMetricsRequest, ComputeMetricsResponse, CreateAgentRequest, CreateEntityRequest, CreateEventBlockRequest, CreateEventHandlerRequest, CreateInformationBlockRequest, CreateMappingAssociationOperation, CreateTaxonomyBlockRequest, CreateViewRequest, DeleteInformationBlockRequest, DeleteInformationBlockResponse, DeleteMappingAssociationOperation, DeleteResult, DeleteTaxonomyBlockRequest, DeleteTaxonomyBlockResponse, EntityTaxonomyResponse, EvaluateRulesRequest, EvaluateRulesResponse, EventBlockEnvelope, EventHandlerResponse, FinancialStatementAnalysisRequest, FinancialStatementAnalysisResponse, InformationBlockEnvelope, InitializeChartOfAccountsRequest, JournalEntryResponse, LedgerAgentResponse, LinkEntityTaxonomyRequest, LiveFinancialStatementRequest, LiveFinancialStatementResponse, OperationEnvelope, PreviewEventBlockResponse, PreviewReconciliationsRequest, PromoteObligationsRequest, PromoteObligationsResponse, PublishListMemberResponse, PublishListResponse, ReconcilingItemPlan, ReportResponse, ResolveReconcilingItemRequest, ResolveReconcilingItemResponse, RevokeReportShareResponse, ShareReportResponse, TaxonomyBlockEnvelope, UpdateAgentRequest, UpdateEntityRequest, UpdateEventBlockRequest, UpdateEventHandlerRequest, UpdateInformationBlockRequest, UpdateJournalEntryRequest, UpdateTaxonomyBlockRequest, ViewResponse } from '../types.gen';
1
+ import type { AssociationResponse, AutoMapElementsOperation, BindTextBlockRequest, BindTextBlockResponse, BlockedSourceGraphResponse, BlockSourceGraphResult, ComputeMetricsRequest, ComputeMetricsResponse, CreateAgentRequest, CreateEntityRequest, CreateEventBlockRequest, CreateEventHandlerRequest, CreateInformationBlockRequest, CreateMappingAssociationOperation, CreateTaxonomyBlockRequest, CreateViewRequest, DeleteInformationBlockRequest, DeleteInformationBlockResponse, DeleteMappingAssociationOperation, DeleteResult, DeleteTaxonomyBlockRequest, DeleteTaxonomyBlockResponse, EntityTaxonomyResponse, EvaluateRulesRequest, EvaluateRulesResponse, EventBlockEnvelope, EventHandlerResponse, FinancialStatementAnalysisRequest, FinancialStatementAnalysisResponse, InformationBlockEnvelope, InitializeChartOfAccountsRequest, JournalEntryResponse, LedgerAgentResponse, LinkBankAccountRequest, LinkBankAccountResponse, LinkEntityTaxonomyRequest, LiveFinancialStatementRequest, LiveFinancialStatementResponse, OperationEnvelope, PreviewEventBlockResponse, PreviewReconciliationsRequest, PromoteObligationsRequest, PromoteObligationsResponse, PublishListMemberResponse, PublishListResponse, ReconcilingItemPlan, ReportResponse, ResolveReconcilingItemRequest, ResolveReconcilingItemResponse, RevokeReportShareResponse, ShareReportResponse, TaxonomyBlockEnvelope, UpdateAgentRequest, UpdateEntityRequest, UpdateEventBlockRequest, UpdateEventHandlerRequest, UpdateInformationBlockRequest, UpdateJournalEntryRequest, UpdateTaxonomyBlockRequest, ViewResponse } from '../types.gen';
2
2
  import type { TokenProvider } from './graphql/client';
3
- import { type GetInformationBlockQuery, type GetLedgerAccountRollupsQuery, type GetLedgerAccountTreeQuery, type GetLedgerAgentQuery, type GetLedgerClosingBookStructuresQuery, type GetLedgerEntityQuery, type GetLedgerEventBlockQuery, type GetLedgerFiscalCalendarQuery, type GetLedgerMappedTrialBalanceQuery, type GetLedgerMappingCoverageQuery, type GetLedgerMappingQuery, type GetLedgerPeriodCloseStatusQuery, type GetLedgerPeriodDraftsQuery, type GetLedgerPublishListQuery, type GetLedgerReportingTaxonomyQuery, type GetLedgerReportPackageQuery, type GetLedgerReportQuery, type GetLedgerStatementQuery, type GetLedgerSummaryQuery, type GetLedgerTransactionQuery, type GetLedgerTrialBalanceQuery, type ListChartTemplatesQuery, type ListInformationBlocksQuery, type ListLedgerAccountsQuery, type ListLedgerAgentsQuery, type ListLedgerBlockedSourceGraphsQuery, type ListLedgerElementsQuery, type ListLedgerEntitiesQuery, type ListLedgerEventBlocksQuery, type ListLedgerJournalEntriesQuery, type ListLedgerMappingsQuery, type ListLedgerPublishListsQuery, type ListLedgerReconciliationsQuery, type ListLedgerReportsQuery, type ListLedgerStructuresQuery, type ListLedgerTaxonomiesQuery, type ListLedgerTransactionsQuery, type ListLedgerUnmappedElementsQuery, type MappingCandidatesQuery, type ReportDownloadFormat, type ReportLifecycle } from './graphql/generated/graphql';
3
+ import { ListLedgerBankAccountsQuery, type GetInformationBlockQuery, type GetLedgerAccountRollupsQuery, type GetLedgerAccountTreeQuery, type GetLedgerAgentQuery, type GetLedgerClosingBookStructuresQuery, type GetLedgerEntityQuery, type GetLedgerEventBlockQuery, type GetLedgerFiscalCalendarQuery, type GetLedgerMappedTrialBalanceQuery, type GetLedgerMappingCoverageQuery, type GetLedgerMappingQuery, type GetLedgerPeriodCloseStatusQuery, type GetLedgerPeriodDraftsQuery, type GetLedgerPublishListQuery, type GetLedgerReportingTaxonomyQuery, type GetLedgerReportPackageQuery, type GetLedgerReportQuery, type GetLedgerStatementQuery, type GetLedgerSummaryQuery, type GetLedgerTransactionQuery, type GetLedgerTrialBalanceQuery, type ListChartTemplatesQuery, type ListInformationBlocksQuery, type ListLedgerAccountsQuery, type ListLedgerAgentsQuery, type ListLedgerBlockedSourceGraphsQuery, type ListLedgerElementsQuery, type ListLedgerEntitiesQuery, type ListLedgerEventBlocksQuery, type ListLedgerJournalEntriesQuery, type ListLedgerMappingsQuery, type ListLedgerPublishListsQuery, type ListLedgerReconciliationsQuery, type ListLedgerReportsQuery, type ListLedgerStructuresQuery, type ListLedgerTaxonomiesQuery, type ListLedgerTransactionsQuery, type ListLedgerUnmappedElementsQuery, type MappingCandidatesQuery, type ReportDownloadFormat, type ReportLifecycle } from './graphql/generated/graphql';
4
4
  export { GraphQLError } from './graphql/client';
5
5
  export type { ReportLifecycle };
6
6
  export type LedgerEntity = NonNullable<GetLedgerEntityQuery['entity']>;
@@ -10,6 +10,8 @@ export type LedgerAccountList = NonNullable<ListLedgerAccountsQuery['accounts']>
10
10
  export type LedgerAccount = LedgerAccountList['accounts'][number];
11
11
  export type LedgerAccountTree = NonNullable<GetLedgerAccountTreeQuery['accountTree']>;
12
12
  export type LedgerAccountRollups = NonNullable<GetLedgerAccountRollupsQuery['accountRollups']>;
13
+ export type LedgerBankAccountList = NonNullable<ListLedgerBankAccountsQuery['bankAccounts']>;
14
+ export type LedgerBankAccount = LedgerBankAccountList['accounts'][number];
13
15
  export type LedgerTrialBalance = NonNullable<GetLedgerTrialBalanceQuery['trialBalance']>;
14
16
  export type LedgerMappedTrialBalance = NonNullable<GetLedgerMappedTrialBalanceQuery['mappedTrialBalance']>;
15
17
  export type LedgerTransactionList = NonNullable<ListLedgerTransactionsQuery['transactions']>;
@@ -420,6 +422,24 @@ export declare class LedgerClient {
420
422
  endDate?: string;
421
423
  entityId?: string | null;
422
424
  }): Promise<LedgerAccountRollups | null>;
425
+ /**
426
+ * The group's bank and card accounts: every chart account a feed books to,
427
+ * or that a source system types as a bank or card account, with the entity
428
+ * whose chart it is in (`entityId`, the books its lines go into), what
429
+ * writes to it (`source`: a feed provider, `quickbooks`, or null for an
430
+ * account kept by hand) and the connection's status and last sync. Pass
431
+ * `entityId` for one entity's accounts; omit it for the whole group.
432
+ */
433
+ listBankAccounts(graphId: string, options?: EntityScopeOptions): Promise<LedgerBankAccountList | null>;
434
+ /**
435
+ * Point a bank feed's account at a chart account. `element_id` links an
436
+ * existing account (its chart's entity takes the feed); `entity_id` alone
437
+ * creates one in that entity's chart. This is how a feed account is bound
438
+ * to a subsidiary: lines still in the inbox move with it, posted entries
439
+ * stay where they were posted. An account another connection already
440
+ * feeds is refused.
441
+ */
442
+ linkBankAccount(graphId: string, body: LinkBankAccountRequest): Promise<LinkBankAccountResponse>;
423
443
  /** List transactions with optional type + date filters and pagination. */
424
444
  listTransactions(graphId: string, options?: {
425
445
  type?: string;
@@ -90,6 +90,30 @@ class LedgerClient {
90
90
  entityId: options?.entityId ?? null,
91
91
  }, 'Get account rollups', (data) => data.accountRollups);
92
92
  }
93
+ // ── Bank accounts ─────────────────────────────────────────────────────
94
+ /**
95
+ * The group's bank and card accounts: every chart account a feed books to,
96
+ * or that a source system types as a bank or card account, with the entity
97
+ * whose chart it is in (`entityId`, the books its lines go into), what
98
+ * writes to it (`source`: a feed provider, `quickbooks`, or null for an
99
+ * account kept by hand) and the connection's status and last sync. Pass
100
+ * `entityId` for one entity's accounts; omit it for the whole group.
101
+ */
102
+ async listBankAccounts(graphId, options) {
103
+ return this.gqlQuery(graphId, graphql_1.ListLedgerBankAccountsDocument, { entityId: options?.entityId ?? null }, 'List bank accounts', (data) => data.bankAccounts);
104
+ }
105
+ /**
106
+ * Point a bank feed's account at a chart account. `element_id` links an
107
+ * existing account (its chart's entity takes the feed); `entity_id` alone
108
+ * creates one in that entity's chart. This is how a feed account is bound
109
+ * to a subsidiary: lines still in the inbox move with it, posted entries
110
+ * stay where they were posted. An account another connection already
111
+ * feeds is refused.
112
+ */
113
+ async linkBankAccount(graphId, body) {
114
+ const envelope = await this.callOperation('Link bank account', (o) => (0, sdk_gen_1.linkBankAccount)({ ...o, path: { graph_id: graphId }, body }));
115
+ return this.requireResult('Link bank account', envelope.result);
116
+ }
93
117
  // ── Transactions ────────────────────────────────────────────────────
94
118
  /** List transactions with optional type + date filters and pagination. */
95
119
  async listTransactions(graphId, options) {
@@ -55,6 +55,7 @@ import {
55
55
  financialStatementAnalysis,
56
56
  initializeChartOfAccounts,
57
57
  initializeLedger,
58
+ linkBankAccount,
58
59
  linkEntityTaxonomy,
59
60
  liveFinancialStatement,
60
61
  previewEventBlock,
@@ -127,6 +128,8 @@ import type {
127
128
  JournalEntryResponse,
128
129
  LedgerAgentResponse,
129
130
  LedgerEntityResponse,
131
+ LinkBankAccountRequest,
132
+ LinkBankAccountResponse,
130
133
  LinkEntityTaxonomyRequest,
131
134
  LiveFinancialStatementRequest,
132
135
  LiveFinancialStatementResponse,
@@ -198,6 +201,8 @@ import {
198
201
  ListInformationBlocksDocument,
199
202
  ListLedgerAccountsDocument,
200
203
  ListLedgerAgentsDocument,
204
+ ListLedgerBankAccountsDocument,
205
+ ListLedgerBankAccountsQuery,
201
206
  ListLedgerBlockedSourceGraphsDocument,
202
207
  ListLedgerElementsDocument,
203
208
  ListLedgerEntitiesDocument,
@@ -277,6 +282,8 @@ export type LedgerAccountList = NonNullable<ListLedgerAccountsQuery['accounts']>
277
282
  export type LedgerAccount = LedgerAccountList['accounts'][number]
278
283
  export type LedgerAccountTree = NonNullable<GetLedgerAccountTreeQuery['accountTree']>
279
284
  export type LedgerAccountRollups = NonNullable<GetLedgerAccountRollupsQuery['accountRollups']>
285
+ export type LedgerBankAccountList = NonNullable<ListLedgerBankAccountsQuery['bankAccounts']>
286
+ export type LedgerBankAccount = LedgerBankAccountList['accounts'][number]
280
287
 
281
288
  export type LedgerTrialBalance = NonNullable<GetLedgerTrialBalanceQuery['trialBalance']>
282
289
  export type LedgerMappedTrialBalance = NonNullable<
@@ -934,6 +941,47 @@ export class LedgerClient {
934
941
  )
935
942
  }
936
943
 
944
+ // ── Bank accounts ─────────────────────────────────────────────────────
945
+
946
+ /**
947
+ * The group's bank and card accounts: every chart account a feed books to,
948
+ * or that a source system types as a bank or card account, with the entity
949
+ * whose chart it is in (`entityId`, the books its lines go into), what
950
+ * writes to it (`source`: a feed provider, `quickbooks`, or null for an
951
+ * account kept by hand) and the connection's status and last sync. Pass
952
+ * `entityId` for one entity's accounts; omit it for the whole group.
953
+ */
954
+ async listBankAccounts(
955
+ graphId: string,
956
+ options?: EntityScopeOptions
957
+ ): Promise<LedgerBankAccountList | null> {
958
+ return this.gqlQuery(
959
+ graphId,
960
+ ListLedgerBankAccountsDocument,
961
+ { entityId: options?.entityId ?? null },
962
+ 'List bank accounts',
963
+ (data) => data.bankAccounts
964
+ )
965
+ }
966
+
967
+ /**
968
+ * Point a bank feed's account at a chart account. `element_id` links an
969
+ * existing account (its chart's entity takes the feed); `entity_id` alone
970
+ * creates one in that entity's chart. This is how a feed account is bound
971
+ * to a subsidiary: lines still in the inbox move with it, posted entries
972
+ * stay where they were posted. An account another connection already
973
+ * feeds is refused.
974
+ */
975
+ async linkBankAccount(
976
+ graphId: string,
977
+ body: LinkBankAccountRequest
978
+ ): Promise<LinkBankAccountResponse> {
979
+ const envelope = await this.callOperation('Link bank account', (o) =>
980
+ linkBankAccount({ ...o, path: { graph_id: graphId }, body })
981
+ )
982
+ return this.requireResult('Link bank account', envelope.result)
983
+ }
984
+
937
985
  // ── Transactions ────────────────────────────────────────────────────
938
986
 
939
987
  /** List transactions with optional type + date filters and pagination. */
@@ -392,6 +392,33 @@ export type ListLedgerAgentsQuery = {
392
392
  createdBy: string | null;
393
393
  }>;
394
394
  };
395
+ export type ListLedgerBankAccountsQueryVariables = Exact<{
396
+ entityId: string | null | undefined;
397
+ }>;
398
+ export type ListLedgerBankAccountsQuery = {
399
+ bankAccounts: {
400
+ total: number;
401
+ accounts: Array<{
402
+ id: string;
403
+ code: string | null;
404
+ name: string;
405
+ kind: string;
406
+ balanceType: string;
407
+ isActive: boolean;
408
+ entityId: string | null;
409
+ entityName: string | null;
410
+ source: string | null;
411
+ connectionId: string | null;
412
+ institution: string | null;
413
+ feedAccountId: string | null;
414
+ feedAccountName: string | null;
415
+ feedAccountKind: string | null;
416
+ connectionStatus: string | null;
417
+ lastSyncAt: string | null;
418
+ lastSyncStatus: string | null;
419
+ }>;
420
+ } | null;
421
+ };
395
422
  export type ListLedgerBlockedSourceGraphsQueryVariables = Exact<{
396
423
  limit?: number;
397
424
  offset?: number;
@@ -2206,6 +2233,7 @@ export declare const GetLedgerAccountTreeDocument: DocumentNode<GetLedgerAccount
2206
2233
  export declare const ListLedgerAccountsDocument: DocumentNode<ListLedgerAccountsQuery, ListLedgerAccountsQueryVariables>;
2207
2234
  export declare const GetLedgerAgentDocument: DocumentNode<GetLedgerAgentQuery, GetLedgerAgentQueryVariables>;
2208
2235
  export declare const ListLedgerAgentsDocument: DocumentNode<ListLedgerAgentsQuery, ListLedgerAgentsQueryVariables>;
2236
+ export declare const ListLedgerBankAccountsDocument: DocumentNode<ListLedgerBankAccountsQuery, ListLedgerBankAccountsQueryVariables>;
2209
2237
  export declare const ListLedgerBlockedSourceGraphsDocument: DocumentNode<ListLedgerBlockedSourceGraphsQuery, ListLedgerBlockedSourceGraphsQueryVariables>;
2210
2238
  export declare const ListChartTemplatesDocument: DocumentNode<ListChartTemplatesQuery, ListChartTemplatesQueryVariables>;
2211
2239
  export declare const GetLedgerClosingBookStructuresDocument: DocumentNode<GetLedgerClosingBookStructuresQuery, GetLedgerClosingBookStructuresQueryVariables>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetLibraryElementArcsDocument = exports.ListLibraryTaxonomyArcsDocument = exports.ListLedgerUnmappedElementsDocument = exports.GetLedgerTrialBalanceDocument = exports.ListLedgerTransactionsDocument = exports.GetLedgerTransactionDocument = exports.ListLedgerTaxonomiesDocument = exports.GetLedgerSummaryDocument = exports.ListLedgerStructuresDocument = exports.GetLedgerStatementDocument = exports.ListLedgerReportsDocument = exports.GetLedgerReportingTaxonomyDocument = exports.GetLedgerReportPackageDocument = exports.GetLedgerReportDownloadUrlDocument = exports.GetLedgerReportDocument = exports.ListLedgerReconciliationsDocument = exports.ListLedgerPublishListsDocument = exports.GetLedgerPublishListDocument = exports.GetLedgerPeriodDraftsDocument = exports.GetLedgerPeriodCloseStatusDocument = exports.ListLedgerMappingsDocument = exports.GetLedgerMappingCoverageDocument = exports.MappingCandidatesDocument = exports.GetLedgerMappingDocument = exports.GetLedgerMappedTrialBalanceDocument = exports.ListLedgerJournalEntriesDocument = exports.ListInformationBlocksDocument = exports.GetInformationBlockWindowedDocument = exports.GetInformationBlockDocument = exports.GetLedgerFiscalCalendarDocument = exports.ListLedgerEventBlocksDocument = exports.GetLedgerEventBlockDocument = exports.GetLedgerEntityDocument = exports.ListLedgerEntitiesDocument = exports.ListLedgerElementsDocument = exports.GetLedgerClosingBookStructuresDocument = exports.ListChartTemplatesDocument = exports.ListLedgerBlockedSourceGraphsDocument = exports.ListLedgerAgentsDocument = exports.GetLedgerAgentDocument = exports.ListLedgerAccountsDocument = exports.GetLedgerAccountTreeDocument = exports.GetLedgerAccountRollupsDocument = exports.GetInvestorSecurityDocument = exports.ListInvestorSecuritiesDocument = exports.ListInvestorPositionsDocument = exports.GetInvestorPositionDocument = exports.ListInvestorPortfoliosDocument = exports.GetInvestorPortfolioBlockDocument = exports.GetInvestorHoldingsDocument = void 0;
4
- exports.GetLibraryTaxonomyDocument = exports.ListLibraryTaxonomiesDocument = exports.GetLibraryStructureDocument = exports.ListLibraryStructuresDocument = exports.GetLibraryElementDocument = exports.SearchLibraryElementsDocument = exports.ListLibraryElementsDocument = exports.GetLibraryElementEquivalentsDocument = exports.GetLibraryElementClassificationsDocument = void 0;
3
+ exports.ListLibraryTaxonomyArcsDocument = exports.ListLedgerUnmappedElementsDocument = exports.GetLedgerTrialBalanceDocument = exports.ListLedgerTransactionsDocument = exports.GetLedgerTransactionDocument = exports.ListLedgerTaxonomiesDocument = exports.GetLedgerSummaryDocument = exports.ListLedgerStructuresDocument = exports.GetLedgerStatementDocument = exports.ListLedgerReportsDocument = exports.GetLedgerReportingTaxonomyDocument = exports.GetLedgerReportPackageDocument = exports.GetLedgerReportDownloadUrlDocument = exports.GetLedgerReportDocument = exports.ListLedgerReconciliationsDocument = exports.ListLedgerPublishListsDocument = exports.GetLedgerPublishListDocument = exports.GetLedgerPeriodDraftsDocument = exports.GetLedgerPeriodCloseStatusDocument = exports.ListLedgerMappingsDocument = exports.GetLedgerMappingCoverageDocument = exports.MappingCandidatesDocument = exports.GetLedgerMappingDocument = exports.GetLedgerMappedTrialBalanceDocument = exports.ListLedgerJournalEntriesDocument = exports.ListInformationBlocksDocument = exports.GetInformationBlockWindowedDocument = exports.GetInformationBlockDocument = exports.GetLedgerFiscalCalendarDocument = exports.ListLedgerEventBlocksDocument = exports.GetLedgerEventBlockDocument = exports.GetLedgerEntityDocument = exports.ListLedgerEntitiesDocument = exports.ListLedgerElementsDocument = exports.GetLedgerClosingBookStructuresDocument = exports.ListChartTemplatesDocument = exports.ListLedgerBlockedSourceGraphsDocument = exports.ListLedgerBankAccountsDocument = exports.ListLedgerAgentsDocument = exports.GetLedgerAgentDocument = exports.ListLedgerAccountsDocument = exports.GetLedgerAccountTreeDocument = exports.GetLedgerAccountRollupsDocument = exports.GetInvestorSecurityDocument = exports.ListInvestorSecuritiesDocument = exports.ListInvestorPositionsDocument = exports.GetInvestorPositionDocument = exports.ListInvestorPortfoliosDocument = exports.GetInvestorPortfolioBlockDocument = exports.GetInvestorHoldingsDocument = void 0;
4
+ exports.GetLibraryTaxonomyDocument = exports.ListLibraryTaxonomiesDocument = exports.GetLibraryStructureDocument = exports.ListLibraryStructuresDocument = exports.GetLibraryElementDocument = exports.SearchLibraryElementsDocument = exports.ListLibraryElementsDocument = exports.GetLibraryElementEquivalentsDocument = exports.GetLibraryElementClassificationsDocument = exports.GetLibraryElementArcsDocument = void 0;
5
5
  exports.GetInvestorHoldingsDocument = {
6
6
  kind: 'Document',
7
7
  definitions: [
@@ -1140,6 +1140,71 @@ exports.ListLedgerAgentsDocument = {
1140
1140
  },
1141
1141
  ],
1142
1142
  };
1143
+ exports.ListLedgerBankAccountsDocument = {
1144
+ kind: 'Document',
1145
+ definitions: [
1146
+ {
1147
+ kind: 'OperationDefinition',
1148
+ operation: 'query',
1149
+ name: { kind: 'Name', value: 'ListLedgerBankAccounts' },
1150
+ variableDefinitions: [
1151
+ {
1152
+ kind: 'VariableDefinition',
1153
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'entityId' } },
1154
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
1155
+ },
1156
+ ],
1157
+ selectionSet: {
1158
+ kind: 'SelectionSet',
1159
+ selections: [
1160
+ {
1161
+ kind: 'Field',
1162
+ name: { kind: 'Name', value: 'bankAccounts' },
1163
+ arguments: [
1164
+ {
1165
+ kind: 'Argument',
1166
+ name: { kind: 'Name', value: 'entityId' },
1167
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'entityId' } },
1168
+ },
1169
+ ],
1170
+ selectionSet: {
1171
+ kind: 'SelectionSet',
1172
+ selections: [
1173
+ { kind: 'Field', name: { kind: 'Name', value: 'total' } },
1174
+ {
1175
+ kind: 'Field',
1176
+ name: { kind: 'Name', value: 'accounts' },
1177
+ selectionSet: {
1178
+ kind: 'SelectionSet',
1179
+ selections: [
1180
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
1181
+ { kind: 'Field', name: { kind: 'Name', value: 'code' } },
1182
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
1183
+ { kind: 'Field', name: { kind: 'Name', value: 'kind' } },
1184
+ { kind: 'Field', name: { kind: 'Name', value: 'balanceType' } },
1185
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
1186
+ { kind: 'Field', name: { kind: 'Name', value: 'entityId' } },
1187
+ { kind: 'Field', name: { kind: 'Name', value: 'entityName' } },
1188
+ { kind: 'Field', name: { kind: 'Name', value: 'source' } },
1189
+ { kind: 'Field', name: { kind: 'Name', value: 'connectionId' } },
1190
+ { kind: 'Field', name: { kind: 'Name', value: 'institution' } },
1191
+ { kind: 'Field', name: { kind: 'Name', value: 'feedAccountId' } },
1192
+ { kind: 'Field', name: { kind: 'Name', value: 'feedAccountName' } },
1193
+ { kind: 'Field', name: { kind: 'Name', value: 'feedAccountKind' } },
1194
+ { kind: 'Field', name: { kind: 'Name', value: 'connectionStatus' } },
1195
+ { kind: 'Field', name: { kind: 'Name', value: 'lastSyncAt' } },
1196
+ { kind: 'Field', name: { kind: 'Name', value: 'lastSyncStatus' } },
1197
+ ],
1198
+ },
1199
+ },
1200
+ ],
1201
+ },
1202
+ },
1203
+ ],
1204
+ },
1205
+ },
1206
+ ],
1207
+ };
1143
1208
  exports.ListLedgerBlockedSourceGraphsDocument = {
1144
1209
  kind: 'Document',
1145
1210
  definitions: [
@@ -385,6 +385,35 @@ export type ListLedgerAgentsQuery = {
385
385
  }>
386
386
  }
387
387
 
388
+ export type ListLedgerBankAccountsQueryVariables = Exact<{
389
+ entityId: string | null | undefined
390
+ }>
391
+
392
+ export type ListLedgerBankAccountsQuery = {
393
+ bankAccounts: {
394
+ total: number
395
+ accounts: Array<{
396
+ id: string
397
+ code: string | null
398
+ name: string
399
+ kind: string
400
+ balanceType: string
401
+ isActive: boolean
402
+ entityId: string | null
403
+ entityName: string | null
404
+ source: string | null
405
+ connectionId: string | null
406
+ institution: string | null
407
+ feedAccountId: string | null
408
+ feedAccountName: string | null
409
+ feedAccountKind: string | null
410
+ connectionStatus: string | null
411
+ lastSyncAt: string | null
412
+ lastSyncStatus: string | null
413
+ }>
414
+ } | null
415
+ }
416
+
388
417
  export type ListLedgerBlockedSourceGraphsQueryVariables = Exact<{
389
418
  limit?: number
390
419
  offset?: number
@@ -3278,6 +3307,71 @@ export const ListLedgerAgentsDocument = {
3278
3307
  },
3279
3308
  ],
3280
3309
  } as unknown as DocumentNode<ListLedgerAgentsQuery, ListLedgerAgentsQueryVariables>
3310
+ export const ListLedgerBankAccountsDocument = {
3311
+ kind: 'Document',
3312
+ definitions: [
3313
+ {
3314
+ kind: 'OperationDefinition',
3315
+ operation: 'query',
3316
+ name: { kind: 'Name', value: 'ListLedgerBankAccounts' },
3317
+ variableDefinitions: [
3318
+ {
3319
+ kind: 'VariableDefinition',
3320
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'entityId' } },
3321
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
3322
+ },
3323
+ ],
3324
+ selectionSet: {
3325
+ kind: 'SelectionSet',
3326
+ selections: [
3327
+ {
3328
+ kind: 'Field',
3329
+ name: { kind: 'Name', value: 'bankAccounts' },
3330
+ arguments: [
3331
+ {
3332
+ kind: 'Argument',
3333
+ name: { kind: 'Name', value: 'entityId' },
3334
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'entityId' } },
3335
+ },
3336
+ ],
3337
+ selectionSet: {
3338
+ kind: 'SelectionSet',
3339
+ selections: [
3340
+ { kind: 'Field', name: { kind: 'Name', value: 'total' } },
3341
+ {
3342
+ kind: 'Field',
3343
+ name: { kind: 'Name', value: 'accounts' },
3344
+ selectionSet: {
3345
+ kind: 'SelectionSet',
3346
+ selections: [
3347
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
3348
+ { kind: 'Field', name: { kind: 'Name', value: 'code' } },
3349
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
3350
+ { kind: 'Field', name: { kind: 'Name', value: 'kind' } },
3351
+ { kind: 'Field', name: { kind: 'Name', value: 'balanceType' } },
3352
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
3353
+ { kind: 'Field', name: { kind: 'Name', value: 'entityId' } },
3354
+ { kind: 'Field', name: { kind: 'Name', value: 'entityName' } },
3355
+ { kind: 'Field', name: { kind: 'Name', value: 'source' } },
3356
+ { kind: 'Field', name: { kind: 'Name', value: 'connectionId' } },
3357
+ { kind: 'Field', name: { kind: 'Name', value: 'institution' } },
3358
+ { kind: 'Field', name: { kind: 'Name', value: 'feedAccountId' } },
3359
+ { kind: 'Field', name: { kind: 'Name', value: 'feedAccountName' } },
3360
+ { kind: 'Field', name: { kind: 'Name', value: 'feedAccountKind' } },
3361
+ { kind: 'Field', name: { kind: 'Name', value: 'connectionStatus' } },
3362
+ { kind: 'Field', name: { kind: 'Name', value: 'lastSyncAt' } },
3363
+ { kind: 'Field', name: { kind: 'Name', value: 'lastSyncStatus' } },
3364
+ ],
3365
+ },
3366
+ },
3367
+ ],
3368
+ },
3369
+ },
3370
+ ],
3371
+ },
3372
+ },
3373
+ ],
3374
+ } as unknown as DocumentNode<ListLedgerBankAccountsQuery, ListLedgerBankAccountsQueryVariables>
3281
3375
  export const ListLedgerBlockedSourceGraphsDocument = {
3282
3376
  kind: 'Document',
3283
3377
  definitions: [
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The group's bank and card accounts: every chart account a feed books to,
3
+ * or that a source system types as a bank or card account, with the entity
4
+ * whose chart it is in and the health of the connection that writes to it.
5
+ */
6
+ export declare const LIST_BANK_ACCOUNTS: string;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LIST_BANK_ACCOUNTS = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ /**
6
+ * The group's bank and card accounts: every chart account a feed books to,
7
+ * or that a source system types as a bank or card account, with the entity
8
+ * whose chart it is in and the health of the connection that writes to it.
9
+ */
10
+ exports.LIST_BANK_ACCOUNTS = (0, graphql_request_1.gql) `
11
+ query ListLedgerBankAccounts($entityId: String) {
12
+ bankAccounts(entityId: $entityId) {
13
+ total
14
+ accounts {
15
+ id
16
+ code
17
+ name
18
+ kind
19
+ balanceType
20
+ isActive
21
+ entityId
22
+ entityName
23
+ source
24
+ connectionId
25
+ institution
26
+ feedAccountId
27
+ feedAccountName
28
+ feedAccountKind
29
+ connectionStatus
30
+ lastSyncAt
31
+ lastSyncStatus
32
+ }
33
+ }
34
+ }
35
+ `;
@@ -0,0 +1,33 @@
1
+ import { gql } from 'graphql-request'
2
+
3
+ /**
4
+ * The group's bank and card accounts: every chart account a feed books to,
5
+ * or that a source system types as a bank or card account, with the entity
6
+ * whose chart it is in and the health of the connection that writes to it.
7
+ */
8
+ export const LIST_BANK_ACCOUNTS = gql`
9
+ query ListLedgerBankAccounts($entityId: String) {
10
+ bankAccounts(entityId: $entityId) {
11
+ total
12
+ accounts {
13
+ id
14
+ code
15
+ name
16
+ kind
17
+ balanceType
18
+ isActive
19
+ entityId
20
+ entityName
21
+ source
22
+ connectionId
23
+ institution
24
+ feedAccountId
25
+ feedAccountName
26
+ feedAccountKind
27
+ connectionStatus
28
+ lastSyncAt
29
+ lastSyncStatus
30
+ }
31
+ }
32
+ }
33
+ `