@robosystems/client 0.3.38 → 0.3.39

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,5 +1,5 @@
1
1
  import type { TokenProvider } from './graphql/client';
2
- import { type GetLibraryElementArcsQuery, type GetLibraryElementClassificationsQuery, type GetLibraryElementEquivalentsQuery, type GetLibraryElementQuery, type GetLibraryTaxonomyQuery, type ListLibraryElementsQuery, type ListLibraryTaxonomiesQuery, type ListLibraryTaxonomyArcsQuery, type SearchLibraryElementsQuery } from './graphql/generated/graphql';
2
+ import { type GetLibraryElementArcsQuery, type GetLibraryElementClassificationsQuery, type GetLibraryElementEquivalentsQuery, type GetLibraryElementQuery, type GetLibraryTaxonomyQuery, type ListLibraryElementsQuery, type ListLibraryStructuresQuery, type ListLibraryTaxonomiesQuery, type ListLibraryTaxonomyArcsQuery, type SearchLibraryElementsQuery } from './graphql/generated/graphql';
3
3
  export type LibraryTaxonomy = ListLibraryTaxonomiesQuery['libraryTaxonomies'][number];
4
4
  export type LibraryTaxonomyDetail = NonNullable<GetLibraryTaxonomyQuery['libraryTaxonomy']>;
5
5
  export type LibraryElement = ListLibraryElementsQuery['libraryElements'][number];
@@ -8,6 +8,7 @@ export type LibrarySearchResult = SearchLibraryElementsQuery['searchLibraryEleme
8
8
  export type LibraryLabel = LibraryElementDetail['labels'][number];
9
9
  export type LibraryReference = LibraryElementDetail['references'][number];
10
10
  export type LibraryArc = ListLibraryTaxonomyArcsQuery['libraryTaxonomyArcs'][number];
11
+ export type LibraryStructure = ListLibraryStructuresQuery['libraryStructures'][number];
11
12
  export type LibraryElementArc = GetLibraryElementArcsQuery['libraryElementArcs'][number];
12
13
  export type LibraryElementClassification = GetLibraryElementClassificationsQuery['libraryElementClassifications'][number];
13
14
  export type LibraryEquivalence = NonNullable<GetLibraryElementEquivalentsQuery['libraryElementEquivalents']>;
@@ -32,6 +33,8 @@ export interface SearchLibraryElementsOptions {
32
33
  }
33
34
  export interface ListLibraryTaxonomyArcsOptions {
34
35
  associationType?: string;
36
+ /** Scope to a single structure (one presentation/calculation hierarchy). */
37
+ structureId?: string;
35
38
  limit?: number;
36
39
  offset?: number;
37
40
  }
@@ -39,6 +42,11 @@ export interface ListLibraryTaxonomyArcsResult {
39
42
  arcs: LibraryArc[];
40
43
  count: number;
41
44
  }
45
+ export interface ListLibraryStructuresOptions {
46
+ taxonomyId?: string;
47
+ /** Filter to one statement kind (balance_sheet | income_statement | …). */
48
+ blockType?: string;
49
+ }
42
50
  export interface GetLibraryElementIdentifier {
43
51
  id?: string;
44
52
  qname?: string;
@@ -102,6 +110,15 @@ export declare class LibraryClient {
102
110
  * type-subtype) this is the primary browse view.
103
111
  */
104
112
  listLibraryTaxonomyArcs(graphId: string, taxonomyId: string, options?: ListLibraryTaxonomyArcsOptions): Promise<ListLibraryTaxonomyArcsResult>;
113
+ /**
114
+ * List the structures (extended link roles) a taxonomy contributes —
115
+ * the named presentation/calculation hierarchies (BS-classified,
116
+ * IS-multistep, the calc DAG roots, …). Pair a structure's `id` with
117
+ * `listLibraryTaxonomyArcs({ structureId })` to load just that
118
+ * hierarchy's arcs — the hierarchy view uses this to scope a tree to
119
+ * one role at a time.
120
+ */
121
+ listLibraryStructures(graphId: string, options?: ListLibraryStructuresOptions): Promise<LibraryStructure[]>;
105
122
  /**
106
123
  * All mapping arcs where this element is source or target. Covers
107
124
  * every `taxonomy_type='mapping'` bridge — equivalence,
@@ -87,6 +87,7 @@ class LibraryClient {
87
87
  return this.gqlQuery(graphId, graphql_1.ListLibraryTaxonomyArcsDocument, {
88
88
  taxonomyId,
89
89
  associationType: options?.associationType ?? null,
90
+ structureId: options?.structureId ?? null,
90
91
  limit: options?.limit ?? 200,
91
92
  offset: options?.offset ?? 0,
92
93
  }, 'List library taxonomy arcs', (data) => ({
@@ -94,6 +95,21 @@ class LibraryClient {
94
95
  count: data.libraryTaxonomyArcCount,
95
96
  }));
96
97
  }
98
+ // ── Structures ───────────────────────────────────────────────────────
99
+ /**
100
+ * List the structures (extended link roles) a taxonomy contributes —
101
+ * the named presentation/calculation hierarchies (BS-classified,
102
+ * IS-multistep, the calc DAG roots, …). Pair a structure's `id` with
103
+ * `listLibraryTaxonomyArcs({ structureId })` to load just that
104
+ * hierarchy's arcs — the hierarchy view uses this to scope a tree to
105
+ * one role at a time.
106
+ */
107
+ async listLibraryStructures(graphId, options) {
108
+ return this.gqlQuery(graphId, graphql_1.ListLibraryStructuresDocument, {
109
+ taxonomyId: options?.taxonomyId ?? null,
110
+ blockType: options?.blockType ?? null,
111
+ }, 'List library structures', (data) => data.libraryStructures);
112
+ }
97
113
  /**
98
114
  * All mapping arcs where this element is source or target. Covers
99
115
  * every `taxonomy_type='mapping'` bridge — equivalence,
@@ -37,6 +37,7 @@ import {
37
37
  GetLibraryElementEquivalentsDocument,
38
38
  GetLibraryTaxonomyDocument,
39
39
  ListLibraryElementsDocument,
40
+ ListLibraryStructuresDocument,
40
41
  ListLibraryTaxonomiesDocument,
41
42
  ListLibraryTaxonomyArcsDocument,
42
43
  SearchLibraryElementsDocument,
@@ -46,6 +47,7 @@ import {
46
47
  type GetLibraryElementQuery,
47
48
  type GetLibraryTaxonomyQuery,
48
49
  type ListLibraryElementsQuery,
50
+ type ListLibraryStructuresQuery,
49
51
  type ListLibraryTaxonomiesQuery,
50
52
  type ListLibraryTaxonomyArcsQuery,
51
53
  type SearchLibraryElementsQuery,
@@ -67,6 +69,7 @@ export type LibraryLabel = LibraryElementDetail['labels'][number]
67
69
  export type LibraryReference = LibraryElementDetail['references'][number]
68
70
 
69
71
  export type LibraryArc = ListLibraryTaxonomyArcsQuery['libraryTaxonomyArcs'][number]
72
+ export type LibraryStructure = ListLibraryStructuresQuery['libraryStructures'][number]
70
73
  export type LibraryElementArc = GetLibraryElementArcsQuery['libraryElementArcs'][number]
71
74
  export type LibraryElementClassification =
72
75
  GetLibraryElementClassificationsQuery['libraryElementClassifications'][number]
@@ -99,6 +102,8 @@ export interface SearchLibraryElementsOptions {
99
102
 
100
103
  export interface ListLibraryTaxonomyArcsOptions {
101
104
  associationType?: string
105
+ /** Scope to a single structure (one presentation/calculation hierarchy). */
106
+ structureId?: string
102
107
  limit?: number
103
108
  offset?: number
104
109
  }
@@ -108,6 +113,12 @@ export interface ListLibraryTaxonomyArcsResult {
108
113
  count: number
109
114
  }
110
115
 
116
+ export interface ListLibraryStructuresOptions {
117
+ taxonomyId?: string
118
+ /** Filter to one statement kind (balance_sheet | income_statement | …). */
119
+ blockType?: string
120
+ }
121
+
111
122
  export interface GetLibraryElementIdentifier {
112
123
  id?: string
113
124
  qname?: string
@@ -276,6 +287,7 @@ export class LibraryClient {
276
287
  {
277
288
  taxonomyId,
278
289
  associationType: options?.associationType ?? null,
290
+ structureId: options?.structureId ?? null,
279
291
  limit: options?.limit ?? 200,
280
292
  offset: options?.offset ?? 0,
281
293
  },
@@ -287,6 +299,32 @@ export class LibraryClient {
287
299
  )
288
300
  }
289
301
 
302
+ // ── Structures ───────────────────────────────────────────────────────
303
+
304
+ /**
305
+ * List the structures (extended link roles) a taxonomy contributes —
306
+ * the named presentation/calculation hierarchies (BS-classified,
307
+ * IS-multistep, the calc DAG roots, …). Pair a structure's `id` with
308
+ * `listLibraryTaxonomyArcs({ structureId })` to load just that
309
+ * hierarchy's arcs — the hierarchy view uses this to scope a tree to
310
+ * one role at a time.
311
+ */
312
+ async listLibraryStructures(
313
+ graphId: string,
314
+ options?: ListLibraryStructuresOptions
315
+ ): Promise<LibraryStructure[]> {
316
+ return this.gqlQuery(
317
+ graphId,
318
+ ListLibraryStructuresDocument,
319
+ {
320
+ taxonomyId: options?.taxonomyId ?? null,
321
+ blockType: options?.blockType ?? null,
322
+ },
323
+ 'List library structures',
324
+ (data) => data.libraryStructures
325
+ )
326
+ }
327
+
290
328
  /**
291
329
  * All mapping arcs where this element is source or target. Covers
292
330
  * every `taxonomy_type='mapping'` bridge — equivalence,
@@ -915,15 +915,21 @@ export type LibraryAssociation = {
915
915
  /** presentation | calculation | mapping | equivalence | general-special | essence-alias */
916
916
  associationType: Scalars['String']['output'];
917
917
  fromElementId: Scalars['String']['output'];
918
+ fromElementIsAbstract: Maybe<Scalars['Boolean']['output']>;
918
919
  fromElementName: Maybe<Scalars['String']['output']>;
919
920
  fromElementQname: Maybe<Scalars['String']['output']>;
921
+ /** Primary elementsOfFinancialStatements trait (for node coloring) */
922
+ fromElementTrait: Maybe<Scalars['String']['output']>;
920
923
  id: Scalars['String']['output'];
921
924
  orderValue: Maybe<Scalars['Float']['output']>;
922
925
  structureId: Scalars['String']['output'];
923
926
  structureName: Maybe<Scalars['String']['output']>;
924
927
  toElementId: Scalars['String']['output'];
928
+ toElementIsAbstract: Maybe<Scalars['Boolean']['output']>;
925
929
  toElementName: Maybe<Scalars['String']['output']>;
926
930
  toElementQname: Maybe<Scalars['String']['output']>;
931
+ /** Primary elementsOfFinancialStatements trait (for node coloring) */
932
+ toElementTrait: Maybe<Scalars['String']['output']>;
927
933
  weight: Maybe<Scalars['Float']['output']>;
928
934
  };
929
935
  /** A library element (concept, abstract, axis, member, or hypercube). */
@@ -3588,6 +3594,7 @@ export type ListLedgerUnmappedElementsQuery = {
3588
3594
  export type ListLibraryTaxonomyArcsQueryVariables = Exact<{
3589
3595
  taxonomyId: Scalars['ID']['input'];
3590
3596
  associationType: InputMaybe<Scalars['String']['input']>;
3597
+ structureId: InputMaybe<Scalars['ID']['input']>;
3591
3598
  limit?: Scalars['Int']['input'];
3592
3599
  offset?: Scalars['Int']['input'];
3593
3600
  }>;
@@ -3600,9 +3607,13 @@ export type ListLibraryTaxonomyArcsQuery = {
3600
3607
  fromElementId: string;
3601
3608
  fromElementQname: string | null;
3602
3609
  fromElementName: string | null;
3610
+ fromElementTrait: string | null;
3611
+ fromElementIsAbstract: boolean | null;
3603
3612
  toElementId: string;
3604
3613
  toElementQname: string | null;
3605
3614
  toElementName: string | null;
3615
+ toElementTrait: string | null;
3616
+ toElementIsAbstract: boolean | null;
3606
3617
  associationType: string;
3607
3618
  arcrole: string | null;
3608
3619
  orderValue: number | null;
@@ -3766,6 +3777,33 @@ export type GetLibraryElementQuery = {
3766
3777
  }>;
3767
3778
  } | null;
3768
3779
  };
3780
+ export type ListLibraryStructuresQueryVariables = Exact<{
3781
+ taxonomyId: InputMaybe<Scalars['ID']['input']>;
3782
+ blockType: InputMaybe<Scalars['String']['input']>;
3783
+ }>;
3784
+ export type ListLibraryStructuresQuery = {
3785
+ libraryStructures: Array<{
3786
+ id: string;
3787
+ name: string;
3788
+ blockType: string;
3789
+ taxonomyId: string;
3790
+ roleUri: string | null;
3791
+ isActive: boolean;
3792
+ }>;
3793
+ };
3794
+ export type GetLibraryStructureQueryVariables = Exact<{
3795
+ id: Scalars['ID']['input'];
3796
+ }>;
3797
+ export type GetLibraryStructureQuery = {
3798
+ libraryStructure: {
3799
+ id: string;
3800
+ name: string;
3801
+ blockType: string;
3802
+ taxonomyId: string;
3803
+ roleUri: string | null;
3804
+ isActive: boolean;
3805
+ } | null;
3806
+ };
3769
3807
  export type ListLibraryTaxonomiesQueryVariables = Exact<{
3770
3808
  standard: InputMaybe<Scalars['String']['input']>;
3771
3809
  includeElementCount?: Scalars['Boolean']['input'];
@@ -3855,5 +3893,7 @@ export declare const GetLibraryElementEquivalentsDocument: DocumentNode<GetLibra
3855
3893
  export declare const ListLibraryElementsDocument: DocumentNode<ListLibraryElementsQuery, ListLibraryElementsQueryVariables>;
3856
3894
  export declare const SearchLibraryElementsDocument: DocumentNode<SearchLibraryElementsQuery, SearchLibraryElementsQueryVariables>;
3857
3895
  export declare const GetLibraryElementDocument: DocumentNode<GetLibraryElementQuery, GetLibraryElementQueryVariables>;
3896
+ export declare const ListLibraryStructuresDocument: DocumentNode<ListLibraryStructuresQuery, ListLibraryStructuresQueryVariables>;
3897
+ export declare const GetLibraryStructureDocument: DocumentNode<GetLibraryStructureQuery, GetLibraryStructureQueryVariables>;
3858
3898
  export declare const ListLibraryTaxonomiesDocument: DocumentNode<ListLibraryTaxonomiesQuery, ListLibraryTaxonomiesQueryVariables>;
3859
3899
  export declare const GetLibraryTaxonomyDocument: DocumentNode<GetLibraryTaxonomyQuery, GetLibraryTaxonomyQueryVariables>;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ListLibraryTaxonomiesDocument = exports.GetLibraryElementDocument = exports.SearchLibraryElementsDocument = exports.ListLibraryElementsDocument = exports.GetLibraryElementEquivalentsDocument = exports.GetLibraryElementClassificationsDocument = 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.GetLedgerReportDocument = exports.ListLedgerPublishListsDocument = exports.GetLedgerPublishListDocument = exports.GetLedgerPeriodDraftsDocument = exports.GetLedgerPeriodCloseStatusDocument = exports.ListLedgerMappingsDocument = exports.GetLedgerMappingCoverageDocument = exports.MappingCandidatesDocument = exports.GetLedgerMappingDocument = exports.GetLedgerMappedTrialBalanceDocument = exports.ListInformationBlocksDocument = exports.GetInformationBlockDocument = exports.GetLedgerFiscalCalendarDocument = exports.ListLedgerEventBlocksDocument = exports.GetLedgerEventBlockDocument = exports.GetLedgerEntityDocument = exports.ListLedgerEntitiesDocument = exports.ListLedgerElementsDocument = exports.GetLedgerClosingBookStructuresDocument = 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 = void 0;
3
+ exports.ListLibraryStructuresDocument = exports.GetLibraryElementDocument = exports.SearchLibraryElementsDocument = exports.ListLibraryElementsDocument = exports.GetLibraryElementEquivalentsDocument = exports.GetLibraryElementClassificationsDocument = 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.GetLedgerReportDocument = exports.ListLedgerPublishListsDocument = exports.GetLedgerPublishListDocument = exports.GetLedgerPeriodDraftsDocument = exports.GetLedgerPeriodCloseStatusDocument = exports.ListLedgerMappingsDocument = exports.GetLedgerMappingCoverageDocument = exports.MappingCandidatesDocument = exports.GetLedgerMappingDocument = exports.GetLedgerMappedTrialBalanceDocument = exports.ListInformationBlocksDocument = exports.GetInformationBlockDocument = exports.GetLedgerFiscalCalendarDocument = exports.ListLedgerEventBlocksDocument = exports.GetLedgerEventBlockDocument = exports.GetLedgerEntityDocument = exports.ListLedgerEntitiesDocument = exports.ListLedgerElementsDocument = exports.GetLedgerClosingBookStructuresDocument = 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 = void 0;
5
5
  exports.GetInvestorHoldingsDocument = {
6
6
  kind: 'Document',
7
7
  definitions: [
@@ -4052,6 +4052,11 @@ exports.ListLibraryTaxonomyArcsDocument = {
4052
4052
  variable: { kind: 'Variable', name: { kind: 'Name', value: 'associationType' } },
4053
4053
  type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
4054
4054
  },
4055
+ {
4056
+ kind: 'VariableDefinition',
4057
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'structureId' } },
4058
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
4059
+ },
4055
4060
  {
4056
4061
  kind: 'VariableDefinition',
4057
4062
  variable: { kind: 'Variable', name: { kind: 'Name', value: 'limit' } },
@@ -4083,6 +4088,16 @@ exports.ListLibraryTaxonomyArcsDocument = {
4083
4088
  name: { kind: 'Name', value: 'taxonomyId' },
4084
4089
  value: { kind: 'Variable', name: { kind: 'Name', value: 'taxonomyId' } },
4085
4090
  },
4091
+ {
4092
+ kind: 'Argument',
4093
+ name: { kind: 'Name', value: 'associationType' },
4094
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'associationType' } },
4095
+ },
4096
+ {
4097
+ kind: 'Argument',
4098
+ name: { kind: 'Name', value: 'structureId' },
4099
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'structureId' } },
4100
+ },
4086
4101
  ],
4087
4102
  },
4088
4103
  {
@@ -4099,6 +4114,11 @@ exports.ListLibraryTaxonomyArcsDocument = {
4099
4114
  name: { kind: 'Name', value: 'associationType' },
4100
4115
  value: { kind: 'Variable', name: { kind: 'Name', value: 'associationType' } },
4101
4116
  },
4117
+ {
4118
+ kind: 'Argument',
4119
+ name: { kind: 'Name', value: 'structureId' },
4120
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'structureId' } },
4121
+ },
4102
4122
  {
4103
4123
  kind: 'Argument',
4104
4124
  name: { kind: 'Name', value: 'limit' },
@@ -4119,9 +4139,13 @@ exports.ListLibraryTaxonomyArcsDocument = {
4119
4139
  { kind: 'Field', name: { kind: 'Name', value: 'fromElementId' } },
4120
4140
  { kind: 'Field', name: { kind: 'Name', value: 'fromElementQname' } },
4121
4141
  { kind: 'Field', name: { kind: 'Name', value: 'fromElementName' } },
4142
+ { kind: 'Field', name: { kind: 'Name', value: 'fromElementTrait' } },
4143
+ { kind: 'Field', name: { kind: 'Name', value: 'fromElementIsAbstract' } },
4122
4144
  { kind: 'Field', name: { kind: 'Name', value: 'toElementId' } },
4123
4145
  { kind: 'Field', name: { kind: 'Name', value: 'toElementQname' } },
4124
4146
  { kind: 'Field', name: { kind: 'Name', value: 'toElementName' } },
4147
+ { kind: 'Field', name: { kind: 'Name', value: 'toElementTrait' } },
4148
+ { kind: 'Field', name: { kind: 'Name', value: 'toElementIsAbstract' } },
4125
4149
  { kind: 'Field', name: { kind: 'Name', value: 'associationType' } },
4126
4150
  { kind: 'Field', name: { kind: 'Name', value: 'arcrole' } },
4127
4151
  { kind: 'Field', name: { kind: 'Name', value: 'orderValue' } },
@@ -4712,6 +4736,107 @@ exports.GetLibraryElementDocument = {
4712
4736
  },
4713
4737
  ],
4714
4738
  };
4739
+ exports.ListLibraryStructuresDocument = {
4740
+ kind: 'Document',
4741
+ definitions: [
4742
+ {
4743
+ kind: 'OperationDefinition',
4744
+ operation: 'query',
4745
+ name: { kind: 'Name', value: 'ListLibraryStructures' },
4746
+ variableDefinitions: [
4747
+ {
4748
+ kind: 'VariableDefinition',
4749
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'taxonomyId' } },
4750
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
4751
+ },
4752
+ {
4753
+ kind: 'VariableDefinition',
4754
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'blockType' } },
4755
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
4756
+ },
4757
+ ],
4758
+ selectionSet: {
4759
+ kind: 'SelectionSet',
4760
+ selections: [
4761
+ {
4762
+ kind: 'Field',
4763
+ name: { kind: 'Name', value: 'libraryStructures' },
4764
+ arguments: [
4765
+ {
4766
+ kind: 'Argument',
4767
+ name: { kind: 'Name', value: 'taxonomyId' },
4768
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'taxonomyId' } },
4769
+ },
4770
+ {
4771
+ kind: 'Argument',
4772
+ name: { kind: 'Name', value: 'blockType' },
4773
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'blockType' } },
4774
+ },
4775
+ ],
4776
+ selectionSet: {
4777
+ kind: 'SelectionSet',
4778
+ selections: [
4779
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
4780
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
4781
+ { kind: 'Field', name: { kind: 'Name', value: 'blockType' } },
4782
+ { kind: 'Field', name: { kind: 'Name', value: 'taxonomyId' } },
4783
+ { kind: 'Field', name: { kind: 'Name', value: 'roleUri' } },
4784
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
4785
+ ],
4786
+ },
4787
+ },
4788
+ ],
4789
+ },
4790
+ },
4791
+ ],
4792
+ };
4793
+ exports.GetLibraryStructureDocument = {
4794
+ kind: 'Document',
4795
+ definitions: [
4796
+ {
4797
+ kind: 'OperationDefinition',
4798
+ operation: 'query',
4799
+ name: { kind: 'Name', value: 'GetLibraryStructure' },
4800
+ variableDefinitions: [
4801
+ {
4802
+ kind: 'VariableDefinition',
4803
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
4804
+ type: {
4805
+ kind: 'NonNullType',
4806
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
4807
+ },
4808
+ },
4809
+ ],
4810
+ selectionSet: {
4811
+ kind: 'SelectionSet',
4812
+ selections: [
4813
+ {
4814
+ kind: 'Field',
4815
+ name: { kind: 'Name', value: 'libraryStructure' },
4816
+ arguments: [
4817
+ {
4818
+ kind: 'Argument',
4819
+ name: { kind: 'Name', value: 'id' },
4820
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
4821
+ },
4822
+ ],
4823
+ selectionSet: {
4824
+ kind: 'SelectionSet',
4825
+ selections: [
4826
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
4827
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
4828
+ { kind: 'Field', name: { kind: 'Name', value: 'blockType' } },
4829
+ { kind: 'Field', name: { kind: 'Name', value: 'taxonomyId' } },
4830
+ { kind: 'Field', name: { kind: 'Name', value: 'roleUri' } },
4831
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
4832
+ ],
4833
+ },
4834
+ },
4835
+ ],
4836
+ },
4837
+ },
4838
+ ],
4839
+ };
4715
4840
  exports.ListLibraryTaxonomiesDocument = {
4716
4841
  kind: 'Document',
4717
4842
  definitions: [
@@ -932,15 +932,21 @@ export type LibraryAssociation = {
932
932
  /** presentation | calculation | mapping | equivalence | general-special | essence-alias */
933
933
  associationType: Scalars['String']['output']
934
934
  fromElementId: Scalars['String']['output']
935
+ fromElementIsAbstract: Maybe<Scalars['Boolean']['output']>
935
936
  fromElementName: Maybe<Scalars['String']['output']>
936
937
  fromElementQname: Maybe<Scalars['String']['output']>
938
+ /** Primary elementsOfFinancialStatements trait (for node coloring) */
939
+ fromElementTrait: Maybe<Scalars['String']['output']>
937
940
  id: Scalars['String']['output']
938
941
  orderValue: Maybe<Scalars['Float']['output']>
939
942
  structureId: Scalars['String']['output']
940
943
  structureName: Maybe<Scalars['String']['output']>
941
944
  toElementId: Scalars['String']['output']
945
+ toElementIsAbstract: Maybe<Scalars['Boolean']['output']>
942
946
  toElementName: Maybe<Scalars['String']['output']>
943
947
  toElementQname: Maybe<Scalars['String']['output']>
948
+ /** Primary elementsOfFinancialStatements trait (for node coloring) */
949
+ toElementTrait: Maybe<Scalars['String']['output']>
944
950
  weight: Maybe<Scalars['Float']['output']>
945
951
  }
946
952
 
@@ -3673,6 +3679,7 @@ export type ListLedgerUnmappedElementsQuery = {
3673
3679
  export type ListLibraryTaxonomyArcsQueryVariables = Exact<{
3674
3680
  taxonomyId: Scalars['ID']['input']
3675
3681
  associationType: InputMaybe<Scalars['String']['input']>
3682
+ structureId: InputMaybe<Scalars['ID']['input']>
3676
3683
  limit?: Scalars['Int']['input']
3677
3684
  offset?: Scalars['Int']['input']
3678
3685
  }>
@@ -3686,9 +3693,13 @@ export type ListLibraryTaxonomyArcsQuery = {
3686
3693
  fromElementId: string
3687
3694
  fromElementQname: string | null
3688
3695
  fromElementName: string | null
3696
+ fromElementTrait: string | null
3697
+ fromElementIsAbstract: boolean | null
3689
3698
  toElementId: string
3690
3699
  toElementQname: string | null
3691
3700
  toElementName: string | null
3701
+ toElementTrait: string | null
3702
+ toElementIsAbstract: boolean | null
3692
3703
  associationType: string
3693
3704
  arcrole: string | null
3694
3705
  orderValue: number | null
@@ -3829,6 +3840,37 @@ export type GetLibraryElementQuery = {
3829
3840
  } | null
3830
3841
  }
3831
3842
 
3843
+ export type ListLibraryStructuresQueryVariables = Exact<{
3844
+ taxonomyId: InputMaybe<Scalars['ID']['input']>
3845
+ blockType: InputMaybe<Scalars['String']['input']>
3846
+ }>
3847
+
3848
+ export type ListLibraryStructuresQuery = {
3849
+ libraryStructures: Array<{
3850
+ id: string
3851
+ name: string
3852
+ blockType: string
3853
+ taxonomyId: string
3854
+ roleUri: string | null
3855
+ isActive: boolean
3856
+ }>
3857
+ }
3858
+
3859
+ export type GetLibraryStructureQueryVariables = Exact<{
3860
+ id: Scalars['ID']['input']
3861
+ }>
3862
+
3863
+ export type GetLibraryStructureQuery = {
3864
+ libraryStructure: {
3865
+ id: string
3866
+ name: string
3867
+ blockType: string
3868
+ taxonomyId: string
3869
+ roleUri: string | null
3870
+ isActive: boolean
3871
+ } | null
3872
+ }
3873
+
3832
3874
  export type ListLibraryTaxonomiesQueryVariables = Exact<{
3833
3875
  standard: InputMaybe<Scalars['String']['input']>
3834
3876
  includeElementCount?: Scalars['Boolean']['input']
@@ -7941,6 +7983,11 @@ export const ListLibraryTaxonomyArcsDocument = {
7941
7983
  variable: { kind: 'Variable', name: { kind: 'Name', value: 'associationType' } },
7942
7984
  type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
7943
7985
  },
7986
+ {
7987
+ kind: 'VariableDefinition',
7988
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'structureId' } },
7989
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
7990
+ },
7944
7991
  {
7945
7992
  kind: 'VariableDefinition',
7946
7993
  variable: { kind: 'Variable', name: { kind: 'Name', value: 'limit' } },
@@ -7972,6 +8019,16 @@ export const ListLibraryTaxonomyArcsDocument = {
7972
8019
  name: { kind: 'Name', value: 'taxonomyId' },
7973
8020
  value: { kind: 'Variable', name: { kind: 'Name', value: 'taxonomyId' } },
7974
8021
  },
8022
+ {
8023
+ kind: 'Argument',
8024
+ name: { kind: 'Name', value: 'associationType' },
8025
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'associationType' } },
8026
+ },
8027
+ {
8028
+ kind: 'Argument',
8029
+ name: { kind: 'Name', value: 'structureId' },
8030
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'structureId' } },
8031
+ },
7975
8032
  ],
7976
8033
  },
7977
8034
  {
@@ -7988,6 +8045,11 @@ export const ListLibraryTaxonomyArcsDocument = {
7988
8045
  name: { kind: 'Name', value: 'associationType' },
7989
8046
  value: { kind: 'Variable', name: { kind: 'Name', value: 'associationType' } },
7990
8047
  },
8048
+ {
8049
+ kind: 'Argument',
8050
+ name: { kind: 'Name', value: 'structureId' },
8051
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'structureId' } },
8052
+ },
7991
8053
  {
7992
8054
  kind: 'Argument',
7993
8055
  name: { kind: 'Name', value: 'limit' },
@@ -8008,9 +8070,13 @@ export const ListLibraryTaxonomyArcsDocument = {
8008
8070
  { kind: 'Field', name: { kind: 'Name', value: 'fromElementId' } },
8009
8071
  { kind: 'Field', name: { kind: 'Name', value: 'fromElementQname' } },
8010
8072
  { kind: 'Field', name: { kind: 'Name', value: 'fromElementName' } },
8073
+ { kind: 'Field', name: { kind: 'Name', value: 'fromElementTrait' } },
8074
+ { kind: 'Field', name: { kind: 'Name', value: 'fromElementIsAbstract' } },
8011
8075
  { kind: 'Field', name: { kind: 'Name', value: 'toElementId' } },
8012
8076
  { kind: 'Field', name: { kind: 'Name', value: 'toElementQname' } },
8013
8077
  { kind: 'Field', name: { kind: 'Name', value: 'toElementName' } },
8078
+ { kind: 'Field', name: { kind: 'Name', value: 'toElementTrait' } },
8079
+ { kind: 'Field', name: { kind: 'Name', value: 'toElementIsAbstract' } },
8014
8080
  { kind: 'Field', name: { kind: 'Name', value: 'associationType' } },
8015
8081
  { kind: 'Field', name: { kind: 'Name', value: 'arcrole' } },
8016
8082
  { kind: 'Field', name: { kind: 'Name', value: 'orderValue' } },
@@ -8607,6 +8673,107 @@ export const GetLibraryElementDocument = {
8607
8673
  },
8608
8674
  ],
8609
8675
  } as unknown as DocumentNode<GetLibraryElementQuery, GetLibraryElementQueryVariables>
8676
+ export const ListLibraryStructuresDocument = {
8677
+ kind: 'Document',
8678
+ definitions: [
8679
+ {
8680
+ kind: 'OperationDefinition',
8681
+ operation: 'query',
8682
+ name: { kind: 'Name', value: 'ListLibraryStructures' },
8683
+ variableDefinitions: [
8684
+ {
8685
+ kind: 'VariableDefinition',
8686
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'taxonomyId' } },
8687
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
8688
+ },
8689
+ {
8690
+ kind: 'VariableDefinition',
8691
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'blockType' } },
8692
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'String' } },
8693
+ },
8694
+ ],
8695
+ selectionSet: {
8696
+ kind: 'SelectionSet',
8697
+ selections: [
8698
+ {
8699
+ kind: 'Field',
8700
+ name: { kind: 'Name', value: 'libraryStructures' },
8701
+ arguments: [
8702
+ {
8703
+ kind: 'Argument',
8704
+ name: { kind: 'Name', value: 'taxonomyId' },
8705
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'taxonomyId' } },
8706
+ },
8707
+ {
8708
+ kind: 'Argument',
8709
+ name: { kind: 'Name', value: 'blockType' },
8710
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'blockType' } },
8711
+ },
8712
+ ],
8713
+ selectionSet: {
8714
+ kind: 'SelectionSet',
8715
+ selections: [
8716
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
8717
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
8718
+ { kind: 'Field', name: { kind: 'Name', value: 'blockType' } },
8719
+ { kind: 'Field', name: { kind: 'Name', value: 'taxonomyId' } },
8720
+ { kind: 'Field', name: { kind: 'Name', value: 'roleUri' } },
8721
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
8722
+ ],
8723
+ },
8724
+ },
8725
+ ],
8726
+ },
8727
+ },
8728
+ ],
8729
+ } as unknown as DocumentNode<ListLibraryStructuresQuery, ListLibraryStructuresQueryVariables>
8730
+ export const GetLibraryStructureDocument = {
8731
+ kind: 'Document',
8732
+ definitions: [
8733
+ {
8734
+ kind: 'OperationDefinition',
8735
+ operation: 'query',
8736
+ name: { kind: 'Name', value: 'GetLibraryStructure' },
8737
+ variableDefinitions: [
8738
+ {
8739
+ kind: 'VariableDefinition',
8740
+ variable: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
8741
+ type: {
8742
+ kind: 'NonNullType',
8743
+ type: { kind: 'NamedType', name: { kind: 'Name', value: 'ID' } },
8744
+ },
8745
+ },
8746
+ ],
8747
+ selectionSet: {
8748
+ kind: 'SelectionSet',
8749
+ selections: [
8750
+ {
8751
+ kind: 'Field',
8752
+ name: { kind: 'Name', value: 'libraryStructure' },
8753
+ arguments: [
8754
+ {
8755
+ kind: 'Argument',
8756
+ name: { kind: 'Name', value: 'id' },
8757
+ value: { kind: 'Variable', name: { kind: 'Name', value: 'id' } },
8758
+ },
8759
+ ],
8760
+ selectionSet: {
8761
+ kind: 'SelectionSet',
8762
+ selections: [
8763
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
8764
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
8765
+ { kind: 'Field', name: { kind: 'Name', value: 'blockType' } },
8766
+ { kind: 'Field', name: { kind: 'Name', value: 'taxonomyId' } },
8767
+ { kind: 'Field', name: { kind: 'Name', value: 'roleUri' } },
8768
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
8769
+ ],
8770
+ },
8771
+ },
8772
+ ],
8773
+ },
8774
+ },
8775
+ ],
8776
+ } as unknown as DocumentNode<GetLibraryStructureQuery, GetLibraryStructureQueryVariables>
8610
8777
  export const ListLibraryTaxonomiesDocument = {
8611
8778
  kind: 'Document',
8612
8779
  definitions: [
@@ -12,13 +12,19 @@ exports.LIST_LIBRARY_TAXONOMY_ARCS = (0, graphql_request_1.gql) `
12
12
  query ListLibraryTaxonomyArcs(
13
13
  $taxonomyId: ID!
14
14
  $associationType: String
15
+ $structureId: ID
15
16
  $limit: Int! = 200
16
17
  $offset: Int! = 0
17
18
  ) {
18
- libraryTaxonomyArcCount(taxonomyId: $taxonomyId)
19
+ libraryTaxonomyArcCount(
20
+ taxonomyId: $taxonomyId
21
+ associationType: $associationType
22
+ structureId: $structureId
23
+ )
19
24
  libraryTaxonomyArcs(
20
25
  taxonomyId: $taxonomyId
21
26
  associationType: $associationType
27
+ structureId: $structureId
22
28
  limit: $limit
23
29
  offset: $offset
24
30
  ) {
@@ -28,9 +34,13 @@ exports.LIST_LIBRARY_TAXONOMY_ARCS = (0, graphql_request_1.gql) `
28
34
  fromElementId
29
35
  fromElementQname
30
36
  fromElementName
37
+ fromElementTrait
38
+ fromElementIsAbstract
31
39
  toElementId
32
40
  toElementQname
33
41
  toElementName
42
+ toElementTrait
43
+ toElementIsAbstract
34
44
  associationType
35
45
  arcrole
36
46
  orderValue
@@ -10,13 +10,19 @@ export const LIST_LIBRARY_TAXONOMY_ARCS = gql`
10
10
  query ListLibraryTaxonomyArcs(
11
11
  $taxonomyId: ID!
12
12
  $associationType: String
13
+ $structureId: ID
13
14
  $limit: Int! = 200
14
15
  $offset: Int! = 0
15
16
  ) {
16
- libraryTaxonomyArcCount(taxonomyId: $taxonomyId)
17
+ libraryTaxonomyArcCount(
18
+ taxonomyId: $taxonomyId
19
+ associationType: $associationType
20
+ structureId: $structureId
21
+ )
17
22
  libraryTaxonomyArcs(
18
23
  taxonomyId: $taxonomyId
19
24
  associationType: $associationType
25
+ structureId: $structureId
20
26
  limit: $limit
21
27
  offset: $offset
22
28
  ) {
@@ -26,9 +32,13 @@ export const LIST_LIBRARY_TAXONOMY_ARCS = gql`
26
32
  fromElementId
27
33
  fromElementQname
28
34
  fromElementName
35
+ fromElementTrait
36
+ fromElementIsAbstract
29
37
  toElementId
30
38
  toElementQname
31
39
  toElementName
40
+ toElementTrait
41
+ toElementIsAbstract
32
42
  associationType
33
43
  arcrole
34
44
  orderValue
@@ -0,0 +1,19 @@
1
+ /**
2
+ * List the structures (extended link roles) contributed by a taxonomy —
3
+ * the named presentation/calculation hierarchies (BS-classified,
4
+ * IS-multistep, CashFlow, the calc DAG roots, etc). Pair a structure's
5
+ * ``id`` with ``listLibraryTaxonomyArcs`` + a ``structureId`` filter to
6
+ * load just that hierarchy's arcs — this is how the hierarchy view scopes
7
+ * a tree to one role at a time.
8
+ *
9
+ * Pass ``taxonomyId`` to scope to a single taxonomy; pass ``blockType``
10
+ * to filter to one statement kind (balance_sheet, income_statement,
11
+ * cash_flow_statement, …).
12
+ */
13
+ export declare const LIST_LIBRARY_STRUCTURES: string;
14
+ /**
15
+ * Fetch one structure by id. Returns null when the id doesn't resolve.
16
+ * Metadata only — pair with ``listLibraryTaxonomyArcs`` + a ``structureId``
17
+ * filter to load the structure's arcs.
18
+ */
19
+ export declare const GET_LIBRARY_STRUCTURE: string;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_LIBRARY_STRUCTURE = exports.LIST_LIBRARY_STRUCTURES = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ /**
6
+ * List the structures (extended link roles) contributed by a taxonomy —
7
+ * the named presentation/calculation hierarchies (BS-classified,
8
+ * IS-multistep, CashFlow, the calc DAG roots, etc). Pair a structure's
9
+ * ``id`` with ``listLibraryTaxonomyArcs`` + a ``structureId`` filter to
10
+ * load just that hierarchy's arcs — this is how the hierarchy view scopes
11
+ * a tree to one role at a time.
12
+ *
13
+ * Pass ``taxonomyId`` to scope to a single taxonomy; pass ``blockType``
14
+ * to filter to one statement kind (balance_sheet, income_statement,
15
+ * cash_flow_statement, …).
16
+ */
17
+ exports.LIST_LIBRARY_STRUCTURES = (0, graphql_request_1.gql) `
18
+ query ListLibraryStructures($taxonomyId: ID, $blockType: String) {
19
+ libraryStructures(taxonomyId: $taxonomyId, blockType: $blockType) {
20
+ id
21
+ name
22
+ blockType
23
+ taxonomyId
24
+ roleUri
25
+ isActive
26
+ }
27
+ }
28
+ `;
29
+ /**
30
+ * Fetch one structure by id. Returns null when the id doesn't resolve.
31
+ * Metadata only — pair with ``listLibraryTaxonomyArcs`` + a ``structureId``
32
+ * filter to load the structure's arcs.
33
+ */
34
+ exports.GET_LIBRARY_STRUCTURE = (0, graphql_request_1.gql) `
35
+ query GetLibraryStructure($id: ID!) {
36
+ libraryStructure(id: $id) {
37
+ id
38
+ name
39
+ blockType
40
+ taxonomyId
41
+ roleUri
42
+ isActive
43
+ }
44
+ }
45
+ `;
@@ -0,0 +1,44 @@
1
+ import { gql } from 'graphql-request'
2
+
3
+ /**
4
+ * List the structures (extended link roles) contributed by a taxonomy —
5
+ * the named presentation/calculation hierarchies (BS-classified,
6
+ * IS-multistep, CashFlow, the calc DAG roots, etc). Pair a structure's
7
+ * ``id`` with ``listLibraryTaxonomyArcs`` + a ``structureId`` filter to
8
+ * load just that hierarchy's arcs — this is how the hierarchy view scopes
9
+ * a tree to one role at a time.
10
+ *
11
+ * Pass ``taxonomyId`` to scope to a single taxonomy; pass ``blockType``
12
+ * to filter to one statement kind (balance_sheet, income_statement,
13
+ * cash_flow_statement, …).
14
+ */
15
+ export const LIST_LIBRARY_STRUCTURES = gql`
16
+ query ListLibraryStructures($taxonomyId: ID, $blockType: String) {
17
+ libraryStructures(taxonomyId: $taxonomyId, blockType: $blockType) {
18
+ id
19
+ name
20
+ blockType
21
+ taxonomyId
22
+ roleUri
23
+ isActive
24
+ }
25
+ }
26
+ `
27
+
28
+ /**
29
+ * Fetch one structure by id. Returns null when the id doesn't resolve.
30
+ * Metadata only — pair with ``listLibraryTaxonomyArcs`` + a ``structureId``
31
+ * filter to load the structure's arcs.
32
+ */
33
+ export const GET_LIBRARY_STRUCTURE = gql`
34
+ query GetLibraryStructure($id: ID!) {
35
+ libraryStructure(id: $id) {
36
+ id
37
+ name
38
+ blockType
39
+ taxonomyId
40
+ roleUri
41
+ isActive
42
+ }
43
+ }
44
+ `
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robosystems/client",
3
- "version": "0.3.38",
3
+ "version": "0.3.39",
4
4
  "description": "TypeScript client library for RoboSystems Financial Knowledge Graph API",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",