@robosystems/client 0.3.14 → 0.3.15

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
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GetLibraryTaxonomyDocument = 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.GetLedgerMappingDocument = exports.GetLedgerMappedTrialBalanceDocument = exports.ListInformationBlocksDocument = exports.GetInformationBlockDocument = exports.GetLedgerFiscalCalendarDocument = exports.GetLedgerEntityDocument = exports.ListLedgerEntitiesDocument = exports.ListLedgerElementsDocument = exports.GetLedgerClosingBookStructuresDocument = exports.ListLedgerAccountsDocument = exports.GetLedgerAccountTreeDocument = exports.GetLedgerAccountRollupsDocument = exports.GetInvestorSecurityDocument = exports.ListInvestorSecuritiesDocument = exports.ListInvestorPositionsDocument = exports.GetInvestorPositionDocument = exports.ListInvestorPortfoliosDocument = exports.GetInvestorPortfolioDocument = exports.GetInvestorHoldingsDocument = void 0;
3
+ exports.GetLibraryTaxonomyDocument = 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.GetLedgerMappingDocument = exports.GetLedgerMappedTrialBalanceDocument = exports.ListInformationBlocksDocument = exports.GetInformationBlockDocument = exports.GetLedgerFiscalCalendarDocument = exports.GetLedgerEntityDocument = exports.ListLedgerEntitiesDocument = exports.ListLedgerElementsDocument = exports.GetLedgerClosingBookStructuresDocument = exports.ListLedgerAccountsDocument = exports.GetLedgerAccountTreeDocument = exports.GetLedgerAccountRollupsDocument = exports.GetInvestorSecurityDocument = exports.ListInvestorSecuritiesDocument = exports.ListInvestorPositionsDocument = exports.GetInvestorPositionDocument = exports.ListInvestorPortfoliosDocument = exports.GetInvestorPortfolioBlockDocument = exports.GetInvestorHoldingsDocument = void 0;
4
4
  exports.GetInvestorHoldingsDocument = {
5
5
  kind: 'Document',
6
6
  definitions: [
@@ -75,13 +75,13 @@ exports.GetInvestorHoldingsDocument = {
75
75
  },
76
76
  ],
77
77
  };
78
- exports.GetInvestorPortfolioDocument = {
78
+ exports.GetInvestorPortfolioBlockDocument = {
79
79
  kind: 'Document',
80
80
  definitions: [
81
81
  {
82
82
  kind: 'OperationDefinition',
83
83
  operation: 'query',
84
- name: { kind: 'Name', value: 'GetInvestorPortfolio' },
84
+ name: { kind: 'Name', value: 'GetInvestorPortfolioBlock' },
85
85
  variableDefinitions: [
86
86
  {
87
87
  kind: 'VariableDefinition',
@@ -97,7 +97,7 @@ exports.GetInvestorPortfolioDocument = {
97
97
  selections: [
98
98
  {
99
99
  kind: 'Field',
100
- name: { kind: 'Name', value: 'portfolio' },
100
+ name: { kind: 'Name', value: 'portfolioBlock' },
101
101
  arguments: [
102
102
  {
103
103
  kind: 'Argument',
@@ -114,6 +114,67 @@ exports.GetInvestorPortfolioDocument = {
114
114
  { kind: 'Field', name: { kind: 'Name', value: 'strategy' } },
115
115
  { kind: 'Field', name: { kind: 'Name', value: 'inceptionDate' } },
116
116
  { kind: 'Field', name: { kind: 'Name', value: 'baseCurrency' } },
117
+ {
118
+ kind: 'Field',
119
+ name: { kind: 'Name', value: 'owner' },
120
+ selectionSet: {
121
+ kind: 'SelectionSet',
122
+ selections: [
123
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
124
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
125
+ { kind: 'Field', name: { kind: 'Name', value: 'sourceGraphId' } },
126
+ ],
127
+ },
128
+ },
129
+ {
130
+ kind: 'Field',
131
+ name: { kind: 'Name', value: 'positions' },
132
+ selectionSet: {
133
+ kind: 'SelectionSet',
134
+ selections: [
135
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
136
+ { kind: 'Field', name: { kind: 'Name', value: 'quantity' } },
137
+ { kind: 'Field', name: { kind: 'Name', value: 'quantityType' } },
138
+ { kind: 'Field', name: { kind: 'Name', value: 'costBasisDollars' } },
139
+ { kind: 'Field', name: { kind: 'Name', value: 'currentValueDollars' } },
140
+ { kind: 'Field', name: { kind: 'Name', value: 'valuationDate' } },
141
+ { kind: 'Field', name: { kind: 'Name', value: 'valuationSource' } },
142
+ { kind: 'Field', name: { kind: 'Name', value: 'acquisitionDate' } },
143
+ { kind: 'Field', name: { kind: 'Name', value: 'status' } },
144
+ { kind: 'Field', name: { kind: 'Name', value: 'notes' } },
145
+ {
146
+ kind: 'Field',
147
+ name: { kind: 'Name', value: 'security' },
148
+ selectionSet: {
149
+ kind: 'SelectionSet',
150
+ selections: [
151
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
152
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
153
+ { kind: 'Field', name: { kind: 'Name', value: 'securityType' } },
154
+ { kind: 'Field', name: { kind: 'Name', value: 'securitySubtype' } },
155
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
156
+ { kind: 'Field', name: { kind: 'Name', value: 'sourceGraphId' } },
157
+ {
158
+ kind: 'Field',
159
+ name: { kind: 'Name', value: 'issuer' },
160
+ selectionSet: {
161
+ kind: 'SelectionSet',
162
+ selections: [
163
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
164
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
165
+ { kind: 'Field', name: { kind: 'Name', value: 'sourceGraphId' } },
166
+ ],
167
+ },
168
+ },
169
+ ],
170
+ },
171
+ },
172
+ ],
173
+ },
174
+ },
175
+ { kind: 'Field', name: { kind: 'Name', value: 'totalCostBasisDollars' } },
176
+ { kind: 'Field', name: { kind: 'Name', value: 'totalCurrentValueDollars' } },
177
+ { kind: 'Field', name: { kind: 'Name', value: 'activePositionCount' } },
117
178
  { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } },
118
179
  { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } },
119
180
  ],
@@ -213,6 +213,12 @@ export type ElementList = {
213
213
  pagination: PaginationInfo
214
214
  }
215
215
 
216
+ export type EntityLite = {
217
+ id: Scalars['String']['output']
218
+ name: Scalars['String']['output']
219
+ sourceGraphId: Maybe<Scalars['String']['output']>
220
+ }
221
+
216
222
  export type FactRow = {
217
223
  depth: Scalars['Int']['output']
218
224
  elementId: Scalars['String']['output']
@@ -783,6 +789,22 @@ export type Portfolio = {
783
789
  updatedAt: Scalars['DateTime']['output']
784
790
  }
785
791
 
792
+ export type PortfolioBlock = {
793
+ activePositionCount: Scalars['Int']['output']
794
+ baseCurrency: Scalars['String']['output']
795
+ createdAt: Scalars['DateTime']['output']
796
+ description: Maybe<Scalars['String']['output']>
797
+ id: Scalars['String']['output']
798
+ inceptionDate: Maybe<Scalars['Date']['output']>
799
+ name: Scalars['String']['output']
800
+ owner: Maybe<EntityLite>
801
+ positions: Array<PositionBlock>
802
+ strategy: Maybe<Scalars['String']['output']>
803
+ totalCostBasisDollars: Scalars['Float']['output']
804
+ totalCurrentValueDollars: Maybe<Scalars['Float']['output']>
805
+ updatedAt: Scalars['DateTime']['output']
806
+ }
807
+
786
808
  export type PortfolioList = {
787
809
  pagination: PaginationInfo
788
810
  portfolios: Array<Portfolio>
@@ -811,6 +833,20 @@ export type Position = {
811
833
  valuationSource: Maybe<Scalars['String']['output']>
812
834
  }
813
835
 
836
+ export type PositionBlock = {
837
+ acquisitionDate: Maybe<Scalars['Date']['output']>
838
+ costBasisDollars: Scalars['Float']['output']
839
+ currentValueDollars: Maybe<Scalars['Float']['output']>
840
+ id: Scalars['String']['output']
841
+ notes: Maybe<Scalars['String']['output']>
842
+ quantity: Scalars['Float']['output']
843
+ quantityType: Scalars['String']['output']
844
+ security: SecurityLite
845
+ status: Scalars['String']['output']
846
+ valuationDate: Maybe<Scalars['Date']['output']>
847
+ valuationSource: Maybe<Scalars['String']['output']>
848
+ }
849
+
814
850
  export type PositionList = {
815
851
  pagination: PaginationInfo
816
852
  positions: Array<Position>
@@ -884,7 +920,7 @@ export type Query = {
884
920
  mappings: Maybe<StructureList>
885
921
  periodCloseStatus: Maybe<PeriodCloseStatus>
886
922
  periodDrafts: Maybe<PeriodDrafts>
887
- portfolio: Maybe<Portfolio>
923
+ portfolioBlock: Maybe<PortfolioBlock>
888
924
  portfolios: Maybe<PortfolioList>
889
925
  position: Maybe<Position>
890
926
  positions: Maybe<PositionList>
@@ -1053,7 +1089,7 @@ export type QueryPeriodDraftsArgs = {
1053
1089
  period: Scalars['String']['input']
1054
1090
  }
1055
1091
 
1056
- export type QueryPortfolioArgs = {
1092
+ export type QueryPortfolioBlockArgs = {
1057
1093
  portfolioId: Scalars['String']['input']
1058
1094
  }
1059
1095
 
@@ -1189,22 +1225,22 @@ export type ReportList = {
1189
1225
 
1190
1226
  export type ReportPackage = {
1191
1227
  aiGenerated: Scalars['Boolean']['output']
1192
- createdAt: Scalars['String']['output']
1228
+ createdAt: Scalars['DateTime']['output']
1193
1229
  createdBy: Scalars['String']['output']
1194
1230
  description: Maybe<Scalars['String']['output']>
1195
1231
  entityName: Maybe<Scalars['String']['output']>
1196
- filedAt: Maybe<Scalars['String']['output']>
1232
+ filedAt: Maybe<Scalars['DateTime']['output']>
1197
1233
  filedBy: Maybe<Scalars['String']['output']>
1198
1234
  filingStatus: Scalars['String']['output']
1199
1235
  generationStatus: Scalars['String']['output']
1200
1236
  id: Scalars['ID']['output']
1201
1237
  items: Array<ReportPackageItem>
1202
- lastGenerated: Maybe<Scalars['String']['output']>
1238
+ lastGenerated: Maybe<Scalars['DateTime']['output']>
1203
1239
  name: Scalars['String']['output']
1204
- periodEnd: Maybe<Scalars['String']['output']>
1205
- periodStart: Maybe<Scalars['String']['output']>
1240
+ periodEnd: Maybe<Scalars['Date']['output']>
1241
+ periodStart: Maybe<Scalars['Date']['output']>
1206
1242
  periodType: Scalars['String']['output']
1207
- sharedAt: Maybe<Scalars['String']['output']>
1243
+ sharedAt: Maybe<Scalars['DateTime']['output']>
1208
1244
  sourceGraphId: Maybe<Scalars['String']['output']>
1209
1245
  sourceReportId: Maybe<Scalars['String']['output']>
1210
1246
  supersededById: Maybe<Scalars['String']['output']>
@@ -1240,6 +1276,16 @@ export type SecurityList = {
1240
1276
  securities: Array<Security>
1241
1277
  }
1242
1278
 
1279
+ export type SecurityLite = {
1280
+ id: Scalars['String']['output']
1281
+ isActive: Scalars['Boolean']['output']
1282
+ issuer: Maybe<EntityLite>
1283
+ name: Scalars['String']['output']
1284
+ securitySubtype: Maybe<Scalars['String']['output']>
1285
+ securityType: Scalars['String']['output']
1286
+ sourceGraphId: Maybe<Scalars['String']['output']>
1287
+ }
1288
+
1243
1289
  export type Statement = {
1244
1290
  periods: Array<PeriodSpec>
1245
1291
  reportId: Scalars['String']['output']
@@ -1425,20 +1471,45 @@ export type GetInvestorHoldingsQuery = {
1425
1471
  } | null
1426
1472
  }
1427
1473
 
1428
- export type GetInvestorPortfolioQueryVariables = Exact<{
1474
+ export type GetInvestorPortfolioBlockQueryVariables = Exact<{
1429
1475
  portfolioId: Scalars['String']['input']
1430
1476
  }>
1431
1477
 
1432
- export type GetInvestorPortfolioQuery = {
1433
- portfolio: {
1478
+ export type GetInvestorPortfolioBlockQuery = {
1479
+ portfolioBlock: {
1434
1480
  id: string
1435
1481
  name: string
1436
1482
  description: string | null
1437
1483
  strategy: string | null
1438
1484
  inceptionDate: any | null
1439
1485
  baseCurrency: string
1486
+ totalCostBasisDollars: number
1487
+ totalCurrentValueDollars: number | null
1488
+ activePositionCount: number
1440
1489
  createdAt: any
1441
1490
  updatedAt: any
1491
+ owner: { id: string; name: string; sourceGraphId: string | null } | null
1492
+ positions: Array<{
1493
+ id: string
1494
+ quantity: number
1495
+ quantityType: string
1496
+ costBasisDollars: number
1497
+ currentValueDollars: number | null
1498
+ valuationDate: any | null
1499
+ valuationSource: string | null
1500
+ acquisitionDate: any | null
1501
+ status: string
1502
+ notes: string | null
1503
+ security: {
1504
+ id: string
1505
+ name: string
1506
+ securityType: string
1507
+ securitySubtype: string | null
1508
+ isActive: boolean
1509
+ sourceGraphId: string | null
1510
+ issuer: { id: string; name: string; sourceGraphId: string | null } | null
1511
+ }
1512
+ }>
1442
1513
  } | null
1443
1514
  }
1444
1515
 
@@ -2269,21 +2340,21 @@ export type GetLedgerReportPackageQuery = {
2269
2340
  description: string | null
2270
2341
  taxonomyId: string
2271
2342
  periodType: string
2272
- periodStart: string | null
2273
- periodEnd: string | null
2343
+ periodStart: any | null
2344
+ periodEnd: any | null
2274
2345
  generationStatus: string
2275
- lastGenerated: string | null
2346
+ lastGenerated: any | null
2276
2347
  filingStatus: string
2277
- filedAt: string | null
2348
+ filedAt: any | null
2278
2349
  filedBy: string | null
2279
2350
  supersedesId: string | null
2280
2351
  supersededById: string | null
2281
2352
  sourceGraphId: string | null
2282
2353
  sourceReportId: string | null
2283
- sharedAt: string | null
2354
+ sharedAt: any | null
2284
2355
  entityName: string | null
2285
2356
  aiGenerated: boolean
2286
- createdAt: string
2357
+ createdAt: any
2287
2358
  createdBy: string
2288
2359
  items: Array<{
2289
2360
  factSetId: string
@@ -2917,13 +2988,13 @@ export const GetInvestorHoldingsDocument = {
2917
2988
  },
2918
2989
  ],
2919
2990
  } as unknown as DocumentNode<GetInvestorHoldingsQuery, GetInvestorHoldingsQueryVariables>
2920
- export const GetInvestorPortfolioDocument = {
2991
+ export const GetInvestorPortfolioBlockDocument = {
2921
2992
  kind: 'Document',
2922
2993
  definitions: [
2923
2994
  {
2924
2995
  kind: 'OperationDefinition',
2925
2996
  operation: 'query',
2926
- name: { kind: 'Name', value: 'GetInvestorPortfolio' },
2997
+ name: { kind: 'Name', value: 'GetInvestorPortfolioBlock' },
2927
2998
  variableDefinitions: [
2928
2999
  {
2929
3000
  kind: 'VariableDefinition',
@@ -2939,7 +3010,7 @@ export const GetInvestorPortfolioDocument = {
2939
3010
  selections: [
2940
3011
  {
2941
3012
  kind: 'Field',
2942
- name: { kind: 'Name', value: 'portfolio' },
3013
+ name: { kind: 'Name', value: 'portfolioBlock' },
2943
3014
  arguments: [
2944
3015
  {
2945
3016
  kind: 'Argument',
@@ -2956,6 +3027,67 @@ export const GetInvestorPortfolioDocument = {
2956
3027
  { kind: 'Field', name: { kind: 'Name', value: 'strategy' } },
2957
3028
  { kind: 'Field', name: { kind: 'Name', value: 'inceptionDate' } },
2958
3029
  { kind: 'Field', name: { kind: 'Name', value: 'baseCurrency' } },
3030
+ {
3031
+ kind: 'Field',
3032
+ name: { kind: 'Name', value: 'owner' },
3033
+ selectionSet: {
3034
+ kind: 'SelectionSet',
3035
+ selections: [
3036
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
3037
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
3038
+ { kind: 'Field', name: { kind: 'Name', value: 'sourceGraphId' } },
3039
+ ],
3040
+ },
3041
+ },
3042
+ {
3043
+ kind: 'Field',
3044
+ name: { kind: 'Name', value: 'positions' },
3045
+ selectionSet: {
3046
+ kind: 'SelectionSet',
3047
+ selections: [
3048
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
3049
+ { kind: 'Field', name: { kind: 'Name', value: 'quantity' } },
3050
+ { kind: 'Field', name: { kind: 'Name', value: 'quantityType' } },
3051
+ { kind: 'Field', name: { kind: 'Name', value: 'costBasisDollars' } },
3052
+ { kind: 'Field', name: { kind: 'Name', value: 'currentValueDollars' } },
3053
+ { kind: 'Field', name: { kind: 'Name', value: 'valuationDate' } },
3054
+ { kind: 'Field', name: { kind: 'Name', value: 'valuationSource' } },
3055
+ { kind: 'Field', name: { kind: 'Name', value: 'acquisitionDate' } },
3056
+ { kind: 'Field', name: { kind: 'Name', value: 'status' } },
3057
+ { kind: 'Field', name: { kind: 'Name', value: 'notes' } },
3058
+ {
3059
+ kind: 'Field',
3060
+ name: { kind: 'Name', value: 'security' },
3061
+ selectionSet: {
3062
+ kind: 'SelectionSet',
3063
+ selections: [
3064
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
3065
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
3066
+ { kind: 'Field', name: { kind: 'Name', value: 'securityType' } },
3067
+ { kind: 'Field', name: { kind: 'Name', value: 'securitySubtype' } },
3068
+ { kind: 'Field', name: { kind: 'Name', value: 'isActive' } },
3069
+ { kind: 'Field', name: { kind: 'Name', value: 'sourceGraphId' } },
3070
+ {
3071
+ kind: 'Field',
3072
+ name: { kind: 'Name', value: 'issuer' },
3073
+ selectionSet: {
3074
+ kind: 'SelectionSet',
3075
+ selections: [
3076
+ { kind: 'Field', name: { kind: 'Name', value: 'id' } },
3077
+ { kind: 'Field', name: { kind: 'Name', value: 'name' } },
3078
+ { kind: 'Field', name: { kind: 'Name', value: 'sourceGraphId' } },
3079
+ ],
3080
+ },
3081
+ },
3082
+ ],
3083
+ },
3084
+ },
3085
+ ],
3086
+ },
3087
+ },
3088
+ { kind: 'Field', name: { kind: 'Name', value: 'totalCostBasisDollars' } },
3089
+ { kind: 'Field', name: { kind: 'Name', value: 'totalCurrentValueDollars' } },
3090
+ { kind: 'Field', name: { kind: 'Name', value: 'activePositionCount' } },
2959
3091
  { kind: 'Field', name: { kind: 'Name', value: 'createdAt' } },
2960
3092
  { kind: 'Field', name: { kind: 'Name', value: 'updatedAt' } },
2961
3093
  ],
@@ -2965,7 +3097,10 @@ export const GetInvestorPortfolioDocument = {
2965
3097
  },
2966
3098
  },
2967
3099
  ],
2968
- } as unknown as DocumentNode<GetInvestorPortfolioQuery, GetInvestorPortfolioQueryVariables>
3100
+ } as unknown as DocumentNode<
3101
+ GetInvestorPortfolioBlockQuery,
3102
+ GetInvestorPortfolioBlockQueryVariables
3103
+ >
2969
3104
  export const ListInvestorPortfoliosDocument = {
2970
3105
  kind: 'Document',
2971
3106
  definitions: [
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Portfolio Block — molecule envelope for a portfolio.
3
+ *
4
+ * Returns the portfolio plus its active positions, the underlying
5
+ * securities, and the owner / issuer entity references in a single
6
+ * read. `sourceGraphId` on `SecurityLite` and `EntityLite` is the
7
+ * cross-graph bridge that lets investor flows traverse to the
8
+ * issuer's RoboLedger graph.
9
+ */
10
+ export declare const GET_PORTFOLIO_BLOCK: string;
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_PORTFOLIO_BLOCK = void 0;
4
+ const graphql_request_1 = require("graphql-request");
5
+ /**
6
+ * Portfolio Block — molecule envelope for a portfolio.
7
+ *
8
+ * Returns the portfolio plus its active positions, the underlying
9
+ * securities, and the owner / issuer entity references in a single
10
+ * read. `sourceGraphId` on `SecurityLite` and `EntityLite` is the
11
+ * cross-graph bridge that lets investor flows traverse to the
12
+ * issuer's RoboLedger graph.
13
+ */
14
+ exports.GET_PORTFOLIO_BLOCK = (0, graphql_request_1.gql) `
15
+ query GetInvestorPortfolioBlock($portfolioId: String!) {
16
+ portfolioBlock(portfolioId: $portfolioId) {
17
+ id
18
+ name
19
+ description
20
+ strategy
21
+ inceptionDate
22
+ baseCurrency
23
+ owner {
24
+ id
25
+ name
26
+ sourceGraphId
27
+ }
28
+ positions {
29
+ id
30
+ quantity
31
+ quantityType
32
+ costBasisDollars
33
+ currentValueDollars
34
+ valuationDate
35
+ valuationSource
36
+ acquisitionDate
37
+ status
38
+ notes
39
+ security {
40
+ id
41
+ name
42
+ securityType
43
+ securitySubtype
44
+ isActive
45
+ sourceGraphId
46
+ issuer {
47
+ id
48
+ name
49
+ sourceGraphId
50
+ }
51
+ }
52
+ }
53
+ totalCostBasisDollars
54
+ totalCurrentValueDollars
55
+ activePositionCount
56
+ createdAt
57
+ updatedAt
58
+ }
59
+ }
60
+ `;
@@ -0,0 +1,58 @@
1
+ import { gql } from 'graphql-request'
2
+
3
+ /**
4
+ * Portfolio Block — molecule envelope for a portfolio.
5
+ *
6
+ * Returns the portfolio plus its active positions, the underlying
7
+ * securities, and the owner / issuer entity references in a single
8
+ * read. `sourceGraphId` on `SecurityLite` and `EntityLite` is the
9
+ * cross-graph bridge that lets investor flows traverse to the
10
+ * issuer's RoboLedger graph.
11
+ */
12
+ export const GET_PORTFOLIO_BLOCK = gql`
13
+ query GetInvestorPortfolioBlock($portfolioId: String!) {
14
+ portfolioBlock(portfolioId: $portfolioId) {
15
+ id
16
+ name
17
+ description
18
+ strategy
19
+ inceptionDate
20
+ baseCurrency
21
+ owner {
22
+ id
23
+ name
24
+ sourceGraphId
25
+ }
26
+ positions {
27
+ id
28
+ quantity
29
+ quantityType
30
+ costBasisDollars
31
+ currentValueDollars
32
+ valuationDate
33
+ valuationSource
34
+ acquisitionDate
35
+ status
36
+ notes
37
+ security {
38
+ id
39
+ name
40
+ securityType
41
+ securitySubtype
42
+ isActive
43
+ sourceGraphId
44
+ issuer {
45
+ id
46
+ name
47
+ sourceGraphId
48
+ }
49
+ }
50
+ }
51
+ totalCostBasisDollars
52
+ totalCurrentValueDollars
53
+ activePositionCount
54
+ createdAt
55
+ updatedAt
56
+ }
57
+ }
58
+ `