@rundit-sdk/embed 0.3.5-rc.15 → 0.3.5-rc.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -124,7 +124,7 @@ export interface SdkCompanyPositionDto {
124
124
  }
125
125
 
126
126
  export interface SdkMetricUnitDto {
127
- unit: { }
127
+ unit: "Percentage" | "Currency" | "Number" | "Second" | "Minute" | "Hour" | "Day" | "Week" | "Month" | "Quarter" | "Year"
128
128
  currencyCode?: string | null
129
129
  }
130
130
 
@@ -143,14 +143,11 @@ export interface SdkMetricTypeRangeConfigDto {
143
143
  step: number
144
144
  }
145
145
 
146
- export interface SdkMetricTypeDto {
146
+ export interface SdkMetricTypeSummaryDto {
147
147
  id: number
148
148
  name: string
149
149
  shortName?: string | null
150
- description?: string | null
151
- origin?: { }
152
- aggMethod: { }
153
- valueType?: { }
150
+ valueType?: "numeric" | "option"
154
151
  unit?: SdkMetricUnitDto
155
152
  optionConfig?: SdkMetricTypeOptionConfigDto
156
153
  rangeConfig?: SdkMetricTypeRangeConfigDto
@@ -158,7 +155,7 @@ export interface SdkMetricTypeDto {
158
155
 
159
156
  export interface SdkMetricPointDto {
160
157
  date: string
161
- timeframe: { }
158
+ timeframe: "Month" | "Quarter" | "Year"
162
159
  value: number | null
163
160
  optionValue: string | null
164
161
  valueError?: string | null
@@ -167,7 +164,7 @@ export interface SdkMetricPointDto {
167
164
 
168
165
  export interface SdkCompanyMetricDto {
169
166
  id: number
170
- metricType: SdkMetricTypeDto
167
+ metricType: SdkMetricTypeSummaryDto
171
168
  points: SdkMetricPointDto[]
172
169
  }
173
170
 
@@ -359,7 +356,7 @@ export interface SdkCompanyReportSummaryDto {
359
356
  id: number
360
357
  title: string
361
358
  date: string
362
- timeframe: { }
359
+ timeframe: "Month" | "Quarter" | "Year"
363
360
  publishedAt: string | null
364
361
  company: SdkCompanyReferenceDto
365
362
  }
@@ -387,7 +384,9 @@ export interface GetBatchDashboardBodyDto {
387
384
  companyIds: number[]
388
385
  currency: string
389
386
  metricsFrom?: string
387
+ metricsTo?: string
390
388
  metricsTimeframe?: "Month" | "Quarter" | "Year"
389
+ metricsPointLimit?: number
391
390
  metricTypeNames?: string[]
392
391
  metricTypeIds?: number[]
393
392
  conversionStrategy?: "LATEST_FX_RATE" | "ENTITY_DATE_RATE"
@@ -582,6 +581,19 @@ export interface SdkTransactionsListResponseDto {
582
581
  meta: SdkPaginationMetaDto
583
582
  }
584
583
 
584
+ export interface SdkMetricTypeDto {
585
+ id: number
586
+ name: string
587
+ shortName?: string | null
588
+ valueType?: "numeric" | "option"
589
+ unit?: SdkMetricUnitDto
590
+ optionConfig?: SdkMetricTypeOptionConfigDto
591
+ rangeConfig?: SdkMetricTypeRangeConfigDto
592
+ description?: string | null
593
+ origin?: "Predefined" | "UserDefined"
594
+ aggMethod: "SUM" | "LAST_AVAILABLE" | "AVG" | "NONE"
595
+ }
596
+
585
597
  export interface SdkMetricTypesListResponseDto {
586
598
  data: SdkMetricTypeDto[]
587
599
  meta: SdkPaginationMetaDto
@@ -611,6 +623,7 @@ export interface MetricSearchDto {
611
623
  to?: string
612
624
  currency?: string
613
625
  conversionStrategy?: "LATEST_FX_RATE" | "ENTITY_DATE_RATE"
626
+ pointLimit?: number
614
627
  }
615
628
 
616
629
  export interface SdkMetricTypeReferenceDto {
@@ -627,7 +640,7 @@ export interface SdkMetricCompareValueDto {
627
640
 
628
641
  export interface SdkMetricCompareRowDto {
629
642
  date: string
630
- timeframe: { }
643
+ timeframe: "Month" | "Quarter" | "Year"
631
644
  values: SdkMetricCompareValueDto[]
632
645
  }
633
646
 
@@ -643,7 +656,8 @@ export interface SdkMetricCompareMultiResponseDto {
643
656
  }
644
657
 
645
658
  export interface MetricCompareDto {
646
- metricTypeIds: number[]
659
+ metricTypeIds?: number[]
660
+ metricTypeNames?: string[]
647
661
  companyIds?: number[]
648
662
  companyNameSearch?: string[]
649
663
  companyGroupIds?: number[]
@@ -657,7 +671,7 @@ export interface MetricCompareDto {
657
671
 
658
672
  export interface SdkAggregatedPointDto {
659
673
  date: string
660
- timeframe: { }
674
+ timeframe: "Month" | "Quarter" | "Year"
661
675
  value: number | null
662
676
  companyCount: number
663
677
  }
@@ -678,7 +692,8 @@ export interface SdkMetricAggregateResponseDto {
678
692
  export interface MetricAggregateDto {
679
693
  limit?: number
680
694
  cursor?: string
681
- metricTypeIds: number[]
695
+ metricTypeIds?: number[]
696
+ metricTypeNames?: string[]
682
697
  aggregation: "SUM" | "AVG" | "MEDIAN" | "MIN" | "MAX" | "COUNT"
683
698
  companyIds?: number[]
684
699
  companyNameSearch?: string[]
@@ -772,7 +787,7 @@ export interface SdkCompanyReportDto {
772
787
  id: number
773
788
  title: string
774
789
  date: string
775
- timeframe: { }
790
+ timeframe: "Month" | "Quarter" | "Year"
776
791
  publishedAt: string | null
777
792
  company: SdkCompanyReferenceDto
778
793
  createdBy: SdkUserReferenceDto
@@ -833,6 +848,30 @@ export interface CompaniesGetDashboardQuery {
833
848
  * Lower bound for metric data points (ISO 8601). Omit to include all available history.
834
849
  */
835
850
  metricsFrom?: string
851
+ /**
852
+ * Inclusive upper bound for metric data points (ISO 8601). Pair with metricsPointLimit: 1 for latest values as of this date; omit to allow future-dated points.
853
+ */
854
+ metricsTo?: string
855
+ /**
856
+ * Restrict metric data points to this reporting period granularity.
857
+ */
858
+ metricsTimeframe?: "Month" | "Quarter" | "Year"
859
+ /**
860
+ * Keep only the most recent N data points per metric (applied after `metricsFrom` / `metricsTo` / `metricsTimeframe`). Omit for the full history; `1` yields the latest dated point, which may be in the future. Set `metricsTo` to today for current values and `metricsTimeframe` for a single granularity.
861
+ */
862
+ metricsPointLimit?: number
863
+ /**
864
+ * Metric type names to include (case-insensitive exact match on display name or `shortName`). Omit to include all metrics. Names that match no accessible metric type are ignored.
865
+ */
866
+ metricTypeNames?: string[]
867
+ /**
868
+ * Metric type identifiers to include. Intersected with `metricTypeNames` when both are provided.
869
+ */
870
+ metricTypeIds?: number[]
871
+ /**
872
+ * FX rate selection when converting monetary metrics. `LATEST_FX_RATE` (default) uses the most recent rate; `ENTITY_DATE_RATE` uses the rate on each point's date.
873
+ */
874
+ conversionStrategy?: "LATEST_FX_RATE" | "ENTITY_DATE_RATE"
836
875
  /**
837
876
  * Maximum number of transactions to include (most recent first). Defaults to 10.
838
877
  */
@@ -894,6 +933,19 @@ export interface PositionsGetPortfolioSummaryQuery {
894
933
  * Opaque cursor from a previous response's `meta.nextCursor`. Carries the page size it was issued with, so a follow-up call needs only the cursor. Valid solely for the endpoint, filters, and caller that produced it — change any of them and you get 422; start again without a cursor. Paging reflects the data as of each request, so rows added or removed mid-walk can shift positions.
895
934
  */
896
935
  cursor?: string
936
+ /**
937
+ * CompanyGroup (default) returns one row per company and fund. Company combines all selected, accessible funds into one row per company using the investment engine totals; companyGroupId is null and companyGroup is omitted.
938
+ */
939
+ groupBy?: "CompanyGroup" | "Company"
940
+ /**
941
+ * Sort before pagination. For the top companies by fair value use groupBy: Company, sortBy: fairValue, sortDirection: desc, limit: 3. Missing values sort last; company and fund ids break ties.
942
+ */
943
+ sortBy?: "companyId" | "fairValue" | "invested" | "realized" | "multiple"
944
+ sortDirection?: "asc" | "desc"
945
+ /**
946
+ * Include the latest monthly metric snapshot as of date (defaults to today). Set false for position-only queries: skips metric computation and returns latestMetrics: [].
947
+ */
948
+ includeMetrics?: boolean
897
949
  /**
898
950
  * Restrict to companies that belong to any of these company groups.
899
951
  */
@@ -930,7 +982,7 @@ export interface PositionsGetCompanyPositionsQuery {
930
982
  */
931
983
  companyGroupIds?: number[]
932
984
  /**
933
- * Reporting currency code
985
+ * Reporting currency code (ISO 4217)
934
986
  */
935
987
  currency: string
936
988
  /**
@@ -949,7 +1001,7 @@ export interface PositionsGetPortfolioPositionsQuery {
949
1001
  */
950
1002
  companyIds?: number[]
951
1003
  /**
952
- * Reporting currency code
1004
+ * Reporting currency code (ISO 4217)
953
1005
  */
954
1006
  currency: string
955
1007
  /**
@@ -1052,6 +1104,10 @@ export interface MetricsGetTypesQuery {
1052
1104
  * Opaque cursor from a previous response's `meta.nextCursor`. Carries the page size it was issued with, so a follow-up call needs only the cursor. Valid solely for the endpoint, filters, and caller that produced it — change any of them and you get 422; start again without a cursor. Paging reflects the data as of each request, so rows added or removed mid-walk can shift positions.
1053
1105
  */
1054
1106
  cursor?: string
1107
+ /**
1108
+ * Case-insensitive substring match on metric type name or `shortName`. Pass an array to look up several types in one call — a type matches if ANY listed substring occurs (OR semantics). Use it to find ids or exact names without paging the whole catalogue.
1109
+ */
1110
+ nameSearch?: string[]
1055
1111
  }
1056
1112
 
1057
1113
  export interface CompanyReportsListQuery {
@@ -1063,6 +1119,10 @@ export interface CompanyReportsListQuery {
1063
1119
  * Opaque cursor from a previous response's `meta.nextCursor`. Carries the page size it was issued with, so a follow-up call needs only the cursor. Valid solely for the endpoint, filters, and caller that produced it — change any of them and you get 422; start again without a cursor. Paging reflects the data as of each request, so rows added or removed mid-walk can shift positions.
1064
1120
  */
1065
1121
  cursor?: string
1122
+ /**
1123
+ * Descending sort, with report id descending as a tiebreaker and missing dates last. date (default) is the reporting period; publishedAt is the publication timestamp. Use publishedAt with limit: 1 for the most recently published report.
1124
+ */
1125
+ sortBy?: "date" | "publishedAt"
1066
1126
  /**
1067
1127
  * Restrict results to these companies. Defaults to all companies the caller can access.
1068
1128
  */
@@ -1092,15 +1152,15 @@ export interface CompanyReportsListQuery {
1092
1152
  export interface CompaniesNamespace {
1093
1153
  /**
1094
1154
  * PREFERRED tool for multi-company analysis — full dashboards for many companies in one call
1095
- * PREFERRED tool for multi-company analysis. Returns full dashboards (company metadata, positions, metrics with data points, recent transactions, report summaries) for many companies in a single request, grouped per company. Use this instead of looping `GET /companies/:id/dashboard` (the N+1 pattern) whenever the agent needs to look at more than one company — it returns the same shape per company but in one round trip. Typical workflow: resolve company ids (e.g. `GET /companies?nameSearch=["acme","beta"]`), then call this with their `companyIds`. Use `metricTypeIds` or `metricTypeNames` (case-insensitive exact match on full name or `shortName`) to scope the returned metrics. `metricsFrom` (ISO 8601) sets a lower-bound date for metric data points; omit to include all history. `metricsTimeframe` restricts data point granularity to Month, Quarter, or Year. `currency` (ISO 4217, required) FX-converts all monetary metrics across the batch. `conversionStrategy` controls which rate is applied: `LATEST_FX_RATE` (default) or `ENTITY_DATE_RATE` (the rate on each point's own date). `transactionLimit` / `reportLimit` cap list sizes per company (defaults: 10 and 5 respectively). Dashboards come back in the order the `companyIds` were requested, so `limit`/`cursor` paging is stable.
1155
+ * PREFERRED tool for multi-company analysis. Returns full dashboards (company metadata, positions, metrics with data points, recent transactions, report summaries) for many companies in a single request, grouped per company. Use this instead of looping `GET /companies/:id/dashboard` (the N+1 pattern) whenever the agent needs to look at more than one company — it returns the same shape per company but in one round trip. Typical workflow: resolve company ids (e.g. `GET /companies?nameSearch=["acme","beta"]`), then call this with their `companyIds`. Use `metricTypeIds` or `metricTypeNames` (case-insensitive exact match on full name or `shortName`) to scope the returned metrics. `metricsFrom` (ISO 8601) sets a lower-bound date for metric data points; omit to include all history. `metricsTimeframe` restricts data point granularity to Month, Quarter, or Year. `metricsPointLimit` keeps only the most recent N points per metric (`1` = latest dated point; set `metricsTo` to today to exclude future values) — full histories for many companies add up quickly. `currency` (ISO 4217, required) FX-converts all monetary metrics across the batch. `conversionStrategy` controls which rate is applied: `LATEST_FX_RATE` (default) or `ENTITY_DATE_RATE` (the rate on each point's own date). `transactionLimit` / `reportLimit` cap list sizes per company (defaults: 10 and 5 respectively). Dashboards come back in the order the `companyIds` were requested, so `limit`/`cursor` paging is stable.
1096
1156
  * Parameters: body: CompaniesGetDashboardsBody
1097
1157
  * Returns: CompaniesGetDashboardsResponse
1098
1158
  */
1099
1159
  getDashboards(body: CompaniesGetDashboardsBody, init?: RequestOptions): Promise<CompaniesGetDashboardsResponse>
1100
1160
  /**
1101
1161
  * Get full company dashboard for ONE company
1102
- * Returns company metadata, positions per fund, all metrics with data points, recent transactions, and report summaries for a single company. For more than one company, prefer POST /companies/dashboards (`companies.getDashboards`) instead — it returns the same payload per company in one call and avoids the N+1 pattern. Use `metricsFrom` to limit metric history, `transactionLimit` and `reportLimit` to cap list sizes.
1103
- * Parameters: path: id (number); query: currency (string), metricsFrom? (string), transactionLimit? (number), reportLimit? (number)
1162
+ * Returns company metadata, positions per fund, metrics with data points, recent transactions, and report summaries for a single company. For more than one company, prefer POST /companies/dashboards (`companies.getDashboards`) instead — it returns the same payload per company in one call and avoids the N+1 pattern. Takes the same metric options as the batch route: `metricTypeNames` / `metricTypeIds` scope which metrics are included, `metricsTimeframe` picks a granularity, `metricsFrom`, `metricsTo`, and `metricsPointLimit` limit history (`metricsPointLimit: 1` = latest dated point; set `metricsTo` to today for current values — prefer it over `metricsFrom` for "latest" reads, since a date lower bound hides values last reported before it). `transactionLimit` and `reportLimit` cap list sizes.
1163
+ * Parameters: path: id (number); query: currency (string), metricsFrom? (string), metricsTo? (string), metricsTimeframe? ("Month" | "Quarter" | "Year"), metricsPointLimit? (number), metricTypeNames? (string[]), metricTypeIds? (number[]), conversionStrategy? ("LATEST_FX_RATE" | "ENTITY_DATE_RATE"), transactionLimit? (number), reportLimit? (number)
1104
1164
  * Returns: CompaniesGetDashboardResponse
1105
1165
  */
1106
1166
  getDashboard(id: number, query?: CompaniesGetDashboardQuery, init?: RequestOptions): Promise<CompaniesGetDashboardResponse>
@@ -1140,8 +1200,8 @@ export interface CompanyGroupsNamespace {
1140
1200
  export interface PositionsNamespace {
1141
1201
  /**
1142
1202
  * Get portfolio summary with positions and key metrics per company
1143
- * Returns one row per company *per fund* — a company held by two funds appears twice, distinguished by `companyGroupId` — with position data (invested, fair value, multiple, ROI) and latest values for selected metrics. Defaults to MRR, Cash Balance, Headcount, Net Burn Rate, and Runway. Override with `metricTypeNames` (case-insensitive exact match on full name or `shortName`). Designed for portfolio overview tables. Ordered by company id, then fund id.
1144
- * Parameters: query: limit? (number), cursor? (string), companyGroupIds? (number[]), companyIds? (number[]), currency (string), date? (string), metricTypeNames? (string[])
1203
+ * Returns position data (invested, fair value, multiple, ROI) and latest monthly metrics as of `date` (today by default). One row per company and fund by default; `groupBy: Company` combines selected accessible funds into one row per company. For top 3 companies by fair value use `groupBy: Company`, `sortBy: fairValue`, `sortDirection: desc`, `limit: 3`, `includeMetrics: false`. Sorting happens before pagination; metrics are loaded only for the returned page. Default metrics are MRR, Cash Balance, Headcount, Net Burn Rate, and Runway. Override with `metricTypeNames` or set `includeMetrics: false` to skip metrics entirely. Without a limit all rows are returned and can be large. Default order is company id, then fund id.
1204
+ * Parameters: query: limit? (number), cursor? (string), groupBy? ("CompanyGroup" | "Company"), sortBy? ("companyId" | "fairValue" | "invested" | "realized" | "multiple"), sortDirection? ("asc" | "desc"), includeMetrics? (boolean), companyGroupIds? (number[]), companyIds? (number[]), currency (string), date? (string), metricTypeNames? (string[])
1145
1205
  * Returns: PositionsGetPortfolioSummaryResponse
1146
1206
  */
1147
1207
  getPortfolioSummary(query?: PositionsGetPortfolioSummaryQuery, init?: RequestOptions): Promise<PositionsGetPortfolioSummaryResponse>
@@ -1188,28 +1248,28 @@ export interface TransactionsNamespace {
1188
1248
  export interface MetricsNamespace {
1189
1249
  /**
1190
1250
  * List metric types available to the SDK consumer
1191
- * Returns predefined metric types plus user-defined metric types scoped to the caller — VC group custom types for VC users, company custom types for company users. Each entry carries the metric shape needed to interpret values: `valueType` is `"numeric"` (read `point.value` as a number; may carry `rangeConfig` with min/max/step for ranged metrics) or `"option"` (read `point.optionValue` as a string from `optionConfig.options[]` — this is how boolean / yes-no metrics are encoded, as two options typically labelled "Yes"/"No"). `unit.unit` describes the measurement (`Currency`, `Percentage`, `Number`, time units, ...); `unit.currencyCode` is intentionally null on this endpoint because monetary types resolve their concrete currency per company — call /metrics to receive `unit.currencyCode` populated with each company's native currency, or pass `currency` to convert all monetary metrics to a chosen target. Ordered by metric type id ascending.
1192
- * Parameters: query: limit? (number), cursor? (string)
1251
+ * Returns predefined metric types plus user-defined metric types scoped to the caller — VC group custom types for VC users, company custom types for company users. Each entry carries the metric shape needed to interpret values: `valueType` is `"numeric"` (read `point.value` as a number; may carry `rangeConfig` with min/max/step for ranged metrics) or `"option"` (read `point.optionValue` as a string from `optionConfig.options[]` — this is how boolean / yes-no metrics are encoded, as two options typically labelled "Yes"/"No"). `unit.unit` describes the measurement (`Currency`, `Percentage`, `Number`, time units, ...); `unit.currencyCode` is intentionally null on this endpoint because monetary types resolve their concrete currency per company — call /metrics to receive `unit.currencyCode` populated with each company's native currency, or pass `currency` to convert all monetary metrics to a chosen target. Filter with `nameSearch` (case-insensitive substring on name or `shortName`, OR across an array) to find a few types without paging the whole catalogue — e.g. `nameSearch=["mrr","burn"]`. Ordered by metric type id ascending.
1252
+ * Parameters: query: limit? (number), cursor? (string), nameSearch? (string[])
1193
1253
  * Returns: MetricsGetTypesResponse
1194
1254
  */
1195
1255
  getTypes(query?: MetricsGetTypesQuery, init?: RequestOptions): Promise<MetricsGetTypesResponse>
1196
1256
  /**
1197
1257
  * Read metric values for accessible companies, grouped by company
1198
- * Returns metric data points for companies the caller can access (companies in the caller's VC group portfolio, or the caller's own company for company users). Each entry carries company and metric type references with id and human-readable name. Each point carries both `value` (number, for `valueType === "numeric"`, including ranged numerics constrained by the type's `rangeConfig`) and `optionValue` (string, for `valueType === "option"`, matching one of `metricType.optionConfig.options[].value` — this is how boolean/yes-no metrics report their reading); read whichever matches the metric type's `valueType`. Filter by company id, company name substring (`companyNameSearch`), company group, metric type id, metric type name (`metricTypeNames` — case-insensitive exact match on either the full name or the `shortName`, so "MRR" and "MRR - Monthly Recurring Revenue" both work), timeframe, and date range to narrow the response. Pass `currency` (ISO 4217) to FX-convert monetary metrics to that target currency in one call instead of fetching company currencies separately. Entries are ordered by company id ascending — one entry per company, so `limit` pages whole companies, never partial metric lists.
1258
+ * Returns metric data points for companies the caller can access (companies in the caller's VC group portfolio, or the caller's own company for company users). Each entry carries company and metric type references with id and human-readable name. Each point carries both `value` (number, for `valueType === "numeric"`, including ranged numerics constrained by the type's `rangeConfig`) and `optionValue` (string, for `valueType === "option"`, matching one of `metricType.optionConfig.options[].value` — this is how boolean/yes-no metrics report their reading); read whichever matches the metric type's `valueType`. Each entry embeds a metric type *summary* (id, name, shortName, valueType, unit, plus option/range config when relevant); the full definition lives on /metrics/types. Filter by company id, company name substring (`companyNameSearch`), company group, metric type id, metric type name (`metricTypeNames` — case-insensitive exact match on either the full name or the `shortName`, so "MRR" and "MRR - Monthly Recurring Revenue" both work), timeframe, and date range to narrow the response. Pass `currency` (ISO 4217) to FX-convert monetary metrics to that target currency in one call instead of fetching company currencies separately. Use `pointLimit` to keep only the most recent N points per metric (`pointLimit: 1` = latest dated point; set `to` to today to exclude future values) — without it every historical point is returned, which can be very large across a portfolio. Entries are ordered by company id ascending — one entry per company, so `limit` pages whole companies, never partial metric lists.
1199
1259
  * Parameters: body: MetricsSearchBody
1200
1260
  * Returns: MetricsSearchResponse
1201
1261
  */
1202
1262
  search(body: MetricsSearchBody, init?: RequestOptions): Promise<MetricsSearchResponse>
1203
1263
  /**
1204
1264
  * Compare metrics across companies
1205
- * Returns date-aligned rows for one or more metric types across multiple companies. Pass `metricTypeIds` (resolve from /metrics/types) to compare several metrics in a single round trip; names are not accepted on this endpoint to keep selection stable. Each row contains one value per company for a given period. Optionally includes period-over-period percentage change. Use `companyIds`, `companyNameSearch`, or `companyGroupIds` to select companies.
1265
+ * Returns date-aligned rows for one or more metric types across multiple companies. Select metric types with `metricTypeIds` and/or `metricTypeNames` (case-insensitive exact match on name or `shortName`, e.g. "MRR"); several metrics are compared in a single round trip, one entry per metric type in `metricTypeIds` order; name-only selections follow catalogue order. Each row contains one value per company for a given period. Optionally includes period-over-period percentage change. Use `companyIds`, `companyNameSearch`, or `companyGroupIds` to select companies.
1206
1266
  * Parameters: body: MetricsCompareBody
1207
1267
  * Returns: MetricsCompareResponse
1208
1268
  */
1209
1269
  compare(body: MetricsCompareBody, init?: RequestOptions): Promise<MetricsCompareResponse>
1210
1270
  /**
1211
1271
  * Aggregate metrics across portfolio companies
1212
- * Returns aggregated metric values (SUM, AVG, MEDIAN, MIN, MAX, COUNT) across companies for each reporting period. Pass `metricTypeIds` (resolve from /metrics/types) to select what to aggregate; names are not accepted on this endpoint to keep selection stable. Optionally group results by fund (`companyGroupId`) for fund-level breakdowns. MIN, MAX, and COUNT are always computed. SUM, AVG, and MEDIAN are only produced when the metric type enables them in its `summaryAggregationMethods` configuration; otherwise `point.value` is `null` for that aggregation. Every requested metric type the caller can access yields one entry (per fund when grouped) — with an empty `points` array when none of the selected companies has a value for it, so "no data" is explicit rather than a missing row. Ids that match no accessible metric type produce no entry. Select companies with `companyIds`, `companyNameSearch`, or `companyGroupIds`; when those select no company at all the response is an empty list. Ordered by fund id, then by the order of the requested `metricTypeIds`.
1272
+ * Returns aggregated metric values (SUM, AVG, MEDIAN, MIN, MAX, COUNT) across companies for each reporting period. Select metric types with `metricTypeIds` and/or `metricTypeNames` (case-insensitive exact match on name or `shortName`, e.g. "MRR"). Optionally group results by fund (`companyGroupId`) for fund-level breakdowns. MIN, MAX, and COUNT are always computed. SUM, AVG, and MEDIAN are only produced when the metric type enables them in its `summaryAggregationMethods` configuration; otherwise `point.value` is `null` for that aggregation. Every requested metric type the caller can access yields one entry (per fund when grouped) — with an empty `points` array when none of the selected companies has a value for it, so "no data" is explicit rather than a missing row. Ids that match no accessible metric type produce no entry. Select companies with `companyIds`, `companyNameSearch`, or `companyGroupIds`; when those select no company at all the response is an empty list. Ordered by fund id, then in the order the metric types were requested (`metricTypeIds` order; name-resolved types follow the catalogue order).
1213
1273
  * Parameters: body: MetricsAggregateBody
1214
1274
  * Returns: MetricsAggregateResponse
1215
1275
  */
@@ -1219,8 +1279,8 @@ export interface MetricsNamespace {
1219
1279
  export interface CompanyReportsNamespace {
1220
1280
  /**
1221
1281
  * List published company reports accessible to the caller (metadata only)
1222
- * Returns lightweight report metadata (id, title, period, publisher company reference). Use GET /company-reports/:id to fetch the full content of a specific report. Visibility is determined by the caller's roles — VC users see reports for managed-portfolio companies, company employees see their own company's reports, portfolio investors see Published reports shared with their visibility groups. Filters narrow the list by company ids, funds (`companyGroupIds`), company name substring (`companyNameSearch`), and reporting period (timeframe + date range). Ordered by report date descending, then id descending — newest first.
1223
- * Parameters: query: limit? (number), cursor? (string), companyIds? (number[]), companyGroupIds? (number[]), companyNameSearch? (string[]), timeframe? ("Month" | "Quarter" | "Year"), from? (string), to? (string)
1282
+ * Returns lightweight report metadata (id, title, period, publisher company reference). Use GET /company-reports/:id to fetch the full content of a specific report. Visibility is determined by the caller's roles — VC users see reports for managed-portfolio companies, company employees see their own company's reports, portfolio investors see Published reports shared with their visibility groups. Filters narrow the list by company ids, funds (`companyGroupIds`), company name substring (`companyNameSearch`), and reporting period (timeframe + date range). Ordered by reporting period date descending, then id descending by default. Use `sortBy: publishedAt` and `limit: 1` for the most recently published report; publication order can differ from period order.
1283
+ * Parameters: query: limit? (number), cursor? (string), sortBy? ("date" | "publishedAt"), companyIds? (number[]), companyGroupIds? (number[]), companyNameSearch? (string[]), timeframe? ("Month" | "Quarter" | "Year"), from? (string), to? (string)
1224
1284
  * Returns: CompanyReportsListResponse
1225
1285
  */
1226
1286
  list(query?: CompanyReportsListQuery, init?: RequestOptions): Promise<CompanyReportsListResponse>
@@ -1246,8 +1306,8 @@ export declare function createEmbedClient(options: CreateEmbedClientOptions): Em
1246
1306
 
1247
1307
  export declare const routeManifest: {
1248
1308
  companies: {
1249
- getDashboards: { method: "POST"; path: "/companies/dashboards"; summary: "PREFERRED tool for multi-company analysis — full dashboards for many companies in one call"; description: "PREFERRED tool for multi-company analysis. Returns full dashboards (company metadata, positions, metrics with data points, recent transactions, report summaries) for many companies in a single request, grouped per company. Use this instead of looping `GET /companies/:id/dashboard` (the N+1 pattern) whenever the agent needs to look at more than one company — it returns the same shape per company but in one round trip. Typical workflow: resolve company ids (e.g. `GET /companies?nameSearch=[\"acme\",\"beta\"]`), then call this with their `companyIds`. Use `metricTypeIds` or `metricTypeNames` (case-insensitive exact match on full name or `shortName`) to scope the returned metrics. `metricsFrom` (ISO 8601) sets a lower-bound date for metric data points; omit to include all history. `metricsTimeframe` restricts data point granularity to Month, Quarter, or Year. `currency` (ISO 4217, required) FX-converts all monetary metrics across the batch. `conversionStrategy` controls which rate is applied: `LATEST_FX_RATE` (default) or `ENTITY_DATE_RATE` (the rate on each point's own date). `transactionLimit` / `reportLimit` cap list sizes per company (defaults: 10 and 5 respectively). Dashboards come back in the order the `companyIds` were requested, so `limit`/`cursor` paging is stable."; exampleCall: "client.companies.getDashboards({ companyIds: [123], currency: 'USD' })"; responseType: "CompaniesGetDashboardsResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1250
- getDashboard: { method: "GET"; path: "/companies/:id/dashboard"; summary: "Get full company dashboard for ONE company"; description: "Returns company metadata, positions per fund, all metrics with data points, recent transactions, and report summaries for a single company. For more than one company, prefer POST /companies/dashboards (`companies.getDashboards`) instead — it returns the same payload per company in one call and avoids the N+1 pattern. Use `metricsFrom` to limit metric history, `transactionLimit` and `reportLimit` to cap list sizes."; exampleCall: "client.companies.getDashboard(123, { currency: 'USD' })"; responseType: "CompaniesGetDashboardResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1309
+ getDashboards: { method: "POST"; path: "/companies/dashboards"; summary: "PREFERRED tool for multi-company analysis — full dashboards for many companies in one call"; description: "PREFERRED tool for multi-company analysis. Returns full dashboards (company metadata, positions, metrics with data points, recent transactions, report summaries) for many companies in a single request, grouped per company. Use this instead of looping `GET /companies/:id/dashboard` (the N+1 pattern) whenever the agent needs to look at more than one company — it returns the same shape per company but in one round trip. Typical workflow: resolve company ids (e.g. `GET /companies?nameSearch=[\"acme\",\"beta\"]`), then call this with their `companyIds`. Use `metricTypeIds` or `metricTypeNames` (case-insensitive exact match on full name or `shortName`) to scope the returned metrics. `metricsFrom` (ISO 8601) sets a lower-bound date for metric data points; omit to include all history. `metricsTimeframe` restricts data point granularity to Month, Quarter, or Year. `metricsPointLimit` keeps only the most recent N points per metric (`1` = latest dated point; set `metricsTo` to today to exclude future values) — full histories for many companies add up quickly. `currency` (ISO 4217, required) FX-converts all monetary metrics across the batch. `conversionStrategy` controls which rate is applied: `LATEST_FX_RATE` (default) or `ENTITY_DATE_RATE` (the rate on each point's own date). `transactionLimit` / `reportLimit` cap list sizes per company (defaults: 10 and 5 respectively). Dashboards come back in the order the `companyIds` were requested, so `limit`/`cursor` paging is stable."; exampleCall: "client.companies.getDashboards({ companyIds: [123], currency: 'USD' })"; responseType: "CompaniesGetDashboardsResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1310
+ getDashboard: { method: "GET"; path: "/companies/:id/dashboard"; summary: "Get full company dashboard for ONE company"; description: "Returns company metadata, positions per fund, metrics with data points, recent transactions, and report summaries for a single company. For more than one company, prefer POST /companies/dashboards (`companies.getDashboards`) instead — it returns the same payload per company in one call and avoids the N+1 pattern. Takes the same metric options as the batch route: `metricTypeNames` / `metricTypeIds` scope which metrics are included, `metricsTimeframe` picks a granularity, `metricsFrom`, `metricsTo`, and `metricsPointLimit` limit history (`metricsPointLimit: 1` = latest dated point; set `metricsTo` to today for current values — prefer it over `metricsFrom` for \"latest\" reads, since a date lower bound hides values last reported before it). `transactionLimit` and `reportLimit` cap list sizes."; exampleCall: "client.companies.getDashboard(123, { currency: 'USD' })"; responseType: "CompaniesGetDashboardResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1251
1311
  getOne: { method: "GET"; path: "/companies/:id"; summary: "Get one company available to the SDK consumer"; description: "Returns the full company object for a single company. Includes all compact-list fields (id, name, type, currency, website, logo) plus extended metadata: legal name, status, description, vision, address, city, state, country, operating countries, VAT number, founding year, established date, total funding, and accessible fund ids (as `companyGroupIds`). Returns 403 (not 404) both when the company does not exist and when it is outside the caller's access — existence is deliberately not disclosed. Once the request is authenticated and carries the required scope, a 403 on this route therefore means an unknown or inaccessible id; resolve ids via `GET /companies` first. (A missing API key scope also yields 403, with an \"Insufficient API key scopes\" message.)"; exampleCall: "client.companies.getOne(123)"; responseType: "CompaniesGetOneResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1252
1312
  getAll: { method: "GET"; path: "/companies"; summary: "List companies available to the SDK consumer"; description: "Returns the compact form (id, name, currency, type, website, logo) for every company the caller can read. Filter by `companyIds`, `companyGroupIds`, and/or `nameSearch` (case-insensitive substring on display name; accepts an array to resolve multiple companies at once with OR semantics — e.g. `nameSearch=[\"acme\",\"beta\",\"gamma\"]` returns any company whose name contains any of the three substrings). Avoids listing the full portfolio when the agent only knows companies by name. Ordered by company id ascending."; exampleCall: "client.companies.getAll({ limit: 123 })"; responseType: "CompaniesGetAllResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1253
1313
  }
@@ -1256,7 +1316,7 @@ export declare const routeManifest: {
1256
1316
  getOne: { method: "GET"; path: "/company-groups/:id"; summary: "Get one fund available to the SDK consumer"; description: "Returns full fund details. Includes all compact-list fields (id, name, type, currency, logo) plus extended fund metadata: legal name, domicile, management company, GP, vintage year, fund currency, opening and closing dates, legal form, investment policy, fees, regulatory info, and service providers. Also includes the list of member companies the caller can access. Returns 403 (not 404) both when the fund does not exist and when it is outside the caller's access — existence is deliberately not disclosed. Once the request is authenticated and carries the required scope, a 403 on this route therefore means an unknown or inaccessible id; resolve ids via `GET /company-groups` first. (A missing API key scope also yields 403, with an \"Insufficient API key scopes\" message.)"; exampleCall: "client.companyGroups.getOne(123)"; responseType: "CompanyGroupsGetOneResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1257
1317
  }
1258
1318
  positions: {
1259
- getPortfolioSummary: { method: "GET"; path: "/positions/portfolio/summary"; summary: "Get portfolio summary with positions and key metrics per company"; description: "Returns one row per company *per fund* — a company held by two funds appears twice, distinguished by `companyGroupId` — with position data (invested, fair value, multiple, ROI) and latest values for selected metrics. Defaults to MRR, Cash Balance, Headcount, Net Burn Rate, and Runway. Override with `metricTypeNames` (case-insensitive exact match on full name or `shortName`). Designed for portfolio overview tables. Ordered by company id, then fund id."; exampleCall: "client.positions.getPortfolioSummary({ currency: 'USD' })"; responseType: "PositionsGetPortfolioSummaryResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1319
+ getPortfolioSummary: { method: "GET"; path: "/positions/portfolio/summary"; summary: "Get portfolio summary with positions and key metrics per company"; description: "Returns position data (invested, fair value, multiple, ROI) and latest monthly metrics as of `date` (today by default). One row per company and fund by default; `groupBy: Company` combines selected accessible funds into one row per company. For top 3 companies by fair value use `groupBy: Company`, `sortBy: fairValue`, `sortDirection: desc`, `limit: 3`, `includeMetrics: false`. Sorting happens before pagination; metrics are loaded only for the returned page. Default metrics are MRR, Cash Balance, Headcount, Net Burn Rate, and Runway. Override with `metricTypeNames` or set `includeMetrics: false` to skip metrics entirely. Without a limit all rows are returned and can be large. Default order is company id, then fund id."; exampleCall: "client.positions.getPortfolioSummary({ currency: 'USD' })"; responseType: "PositionsGetPortfolioSummaryResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1260
1320
  getCompanyPositions: { method: "GET"; path: "/positions/companies/:id"; summary: "Get positions for one company"; description: "Returns all fund-level positions for a single company — one entry per fund (`companyGroupId`) that holds a position in the company. Each entry carries invested amount, fair market value, ownership percentage, share counts, multiple, and ROI, all FX-converted to `currency` (ISO 4217, required). Filter by `companyGroupIds` to scope to specific funds. Use `date` (ISO 8601) for a historical snapshot; omit to use the latest available data. Ordered by fund id ascending."; exampleCall: "client.positions.getCompanyPositions(123, { currency: 'USD' })"; responseType: "PositionsGetCompanyPositionsResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1261
1321
  getPortfolioPositions: { method: "GET"; path: "/positions/portfolio"; summary: "Get aggregated portfolio position totals"; description: "Returns a single aggregated position object that sums invested amount, fair market value, ownership percentage, share counts, multiple, and ROI across all accessible companies (optionally filtered by `companyIds` and/or `companyGroupIds` to scope to specific funds). `currency` (ISO 4217, required) converts all monetary values. Use `date` (ISO 8601) for a historical snapshot; omit for the latest available data. For a per-company breakdown instead of a single aggregate, use `GET /positions/portfolio/summary`."; exampleCall: "client.positions.getPortfolioPositions({ currency: 'USD' })"; responseType: "PositionsGetPortfolioPositionsResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1262
1322
  }
@@ -1266,13 +1326,13 @@ export declare const routeManifest: {
1266
1326
  getTransactions: { method: "GET"; path: "/transactions"; summary: "Get transactions for multiple companies"; description: "Returns transactions across multiple companies. Each transaction is a typed variant — narrow it via its `type` field. Filter by `companyIds`, `companyGroupIds`, `types`, and `priorTo` (ISO 8601 upper-bound date for a historical snapshot). When `companyIds` is provided, the caller must have transaction read access on every listed company. Ordered by date descending, then id descending."; exampleCall: "client.transactions.getTransactions({ limit: 123 })"; responseType: "TransactionsGetTransactionsResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1267
1327
  }
1268
1328
  metrics: {
1269
- getTypes: { method: "GET"; path: "/metrics/types"; summary: "List metric types available to the SDK consumer"; description: "Returns predefined metric types plus user-defined metric types scoped to the caller — VC group custom types for VC users, company custom types for company users. Each entry carries the metric shape needed to interpret values: `valueType` is `\"numeric\"` (read `point.value` as a number; may carry `rangeConfig` with min/max/step for ranged metrics) or `\"option\"` (read `point.optionValue` as a string from `optionConfig.options[]` — this is how boolean / yes-no metrics are encoded, as two options typically labelled \"Yes\"/\"No\"). `unit.unit` describes the measurement (`Currency`, `Percentage`, `Number`, time units, ...); `unit.currencyCode` is intentionally null on this endpoint because monetary types resolve their concrete currency per company — call /metrics to receive `unit.currencyCode` populated with each company's native currency, or pass `currency` to convert all monetary metrics to a chosen target. Ordered by metric type id ascending."; exampleCall: "client.metrics.getTypes({ limit: 123 })"; responseType: "MetricsGetTypesResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1270
- search: { method: "POST"; path: "/metrics"; summary: "Read metric values for accessible companies, grouped by company"; description: "Returns metric data points for companies the caller can access (companies in the caller's VC group portfolio, or the caller's own company for company users). Each entry carries company and metric type references with id and human-readable name. Each point carries both `value` (number, for `valueType === \"numeric\"`, including ranged numerics constrained by the type's `rangeConfig`) and `optionValue` (string, for `valueType === \"option\"`, matching one of `metricType.optionConfig.options[].value` — this is how boolean/yes-no metrics report their reading); read whichever matches the metric type's `valueType`. Filter by company id, company name substring (`companyNameSearch`), company group, metric type id, metric type name (`metricTypeNames` — case-insensitive exact match on either the full name or the `shortName`, so \"MRR\" and \"MRR - Monthly Recurring Revenue\" both work), timeframe, and date range to narrow the response. Pass `currency` (ISO 4217) to FX-convert monetary metrics to that target currency in one call instead of fetching company currencies separately. Entries are ordered by company id ascending — one entry per company, so `limit` pages whole companies, never partial metric lists."; exampleCall: "client.metrics.search({})"; responseType: "MetricsSearchResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1271
- compare: { method: "POST"; path: "/metrics/compare"; summary: "Compare metrics across companies"; description: "Returns date-aligned rows for one or more metric types across multiple companies. Pass `metricTypeIds` (resolve from /metrics/types) to compare several metrics in a single round trip; names are not accepted on this endpoint to keep selection stable. Each row contains one value per company for a given period. Optionally includes period-over-period percentage change. Use `companyIds`, `companyNameSearch`, or `companyGroupIds` to select companies."; exampleCall: "client.metrics.compare({ metricTypeIds: [1,7] })"; responseType: "MetricsCompareResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1272
- aggregate: { method: "POST"; path: "/metrics/aggregate"; summary: "Aggregate metrics across portfolio companies"; description: "Returns aggregated metric values (SUM, AVG, MEDIAN, MIN, MAX, COUNT) across companies for each reporting period. Pass `metricTypeIds` (resolve from /metrics/types) to select what to aggregate; names are not accepted on this endpoint to keep selection stable. Optionally group results by fund (`companyGroupId`) for fund-level breakdowns. MIN, MAX, and COUNT are always computed. SUM, AVG, and MEDIAN are only produced when the metric type enables them in its `summaryAggregationMethods` configuration; otherwise `point.value` is `null` for that aggregation. Every requested metric type the caller can access yields one entry (per fund when grouped) — with an empty `points` array when none of the selected companies has a value for it, so \"no data\" is explicit rather than a missing row. Ids that match no accessible metric type produce no entry. Select companies with `companyIds`, `companyNameSearch`, or `companyGroupIds`; when those select no company at all the response is an empty list. Ordered by fund id, then by the order of the requested `metricTypeIds`."; exampleCall: "client.metrics.aggregate({ metricTypeIds: [1,7], aggregation: \"SUM\" })"; responseType: "MetricsAggregateResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1329
+ getTypes: { method: "GET"; path: "/metrics/types"; summary: "List metric types available to the SDK consumer"; description: "Returns predefined metric types plus user-defined metric types scoped to the caller — VC group custom types for VC users, company custom types for company users. Each entry carries the metric shape needed to interpret values: `valueType` is `\"numeric\"` (read `point.value` as a number; may carry `rangeConfig` with min/max/step for ranged metrics) or `\"option\"` (read `point.optionValue` as a string from `optionConfig.options[]` — this is how boolean / yes-no metrics are encoded, as two options typically labelled \"Yes\"/\"No\"). `unit.unit` describes the measurement (`Currency`, `Percentage`, `Number`, time units, ...); `unit.currencyCode` is intentionally null on this endpoint because monetary types resolve their concrete currency per company — call /metrics to receive `unit.currencyCode` populated with each company's native currency, or pass `currency` to convert all monetary metrics to a chosen target. Filter with `nameSearch` (case-insensitive substring on name or `shortName`, OR across an array) to find a few types without paging the whole catalogue — e.g. `nameSearch=[\"mrr\",\"burn\"]`. Ordered by metric type id ascending."; exampleCall: "client.metrics.getTypes({ limit: 123 })"; responseType: "MetricsGetTypesResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1330
+ search: { method: "POST"; path: "/metrics"; summary: "Read metric values for accessible companies, grouped by company"; description: "Returns metric data points for companies the caller can access (companies in the caller's VC group portfolio, or the caller's own company for company users). Each entry carries company and metric type references with id and human-readable name. Each point carries both `value` (number, for `valueType === \"numeric\"`, including ranged numerics constrained by the type's `rangeConfig`) and `optionValue` (string, for `valueType === \"option\"`, matching one of `metricType.optionConfig.options[].value` — this is how boolean/yes-no metrics report their reading); read whichever matches the metric type's `valueType`. Each entry embeds a metric type *summary* (id, name, shortName, valueType, unit, plus option/range config when relevant); the full definition lives on /metrics/types. Filter by company id, company name substring (`companyNameSearch`), company group, metric type id, metric type name (`metricTypeNames` — case-insensitive exact match on either the full name or the `shortName`, so \"MRR\" and \"MRR - Monthly Recurring Revenue\" both work), timeframe, and date range to narrow the response. Pass `currency` (ISO 4217) to FX-convert monetary metrics to that target currency in one call instead of fetching company currencies separately. Use `pointLimit` to keep only the most recent N points per metric (`pointLimit: 1` = latest dated point; set `to` to today to exclude future values) — without it every historical point is returned, which can be very large across a portfolio. Entries are ordered by company id ascending — one entry per company, so `limit` pages whole companies, never partial metric lists."; exampleCall: "client.metrics.search({})"; responseType: "MetricsSearchResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1331
+ compare: { method: "POST"; path: "/metrics/compare"; summary: "Compare metrics across companies"; description: "Returns date-aligned rows for one or more metric types across multiple companies. Select metric types with `metricTypeIds` and/or `metricTypeNames` (case-insensitive exact match on name or `shortName`, e.g. \"MRR\"); several metrics are compared in a single round trip, one entry per metric type in `metricTypeIds` order; name-only selections follow catalogue order. Each row contains one value per company for a given period. Optionally includes period-over-period percentage change. Use `companyIds`, `companyNameSearch`, or `companyGroupIds` to select companies."; exampleCall: "client.metrics.compare({})"; responseType: "MetricsCompareResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1332
+ aggregate: { method: "POST"; path: "/metrics/aggregate"; summary: "Aggregate metrics across portfolio companies"; description: "Returns aggregated metric values (SUM, AVG, MEDIAN, MIN, MAX, COUNT) across companies for each reporting period. Select metric types with `metricTypeIds` and/or `metricTypeNames` (case-insensitive exact match on name or `shortName`, e.g. \"MRR\"). Optionally group results by fund (`companyGroupId`) for fund-level breakdowns. MIN, MAX, and COUNT are always computed. SUM, AVG, and MEDIAN are only produced when the metric type enables them in its `summaryAggregationMethods` configuration; otherwise `point.value` is `null` for that aggregation. Every requested metric type the caller can access yields one entry (per fund when grouped) — with an empty `points` array when none of the selected companies has a value for it, so \"no data\" is explicit rather than a missing row. Ids that match no accessible metric type produce no entry. Select companies with `companyIds`, `companyNameSearch`, or `companyGroupIds`; when those select no company at all the response is an empty list. Ordered by fund id, then in the order the metric types were requested (`metricTypeIds` order; name-resolved types follow the catalogue order)."; exampleCall: "client.metrics.aggregate({ aggregation: \"SUM\" })"; responseType: "MetricsAggregateResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1273
1333
  }
1274
1334
  companyReports: {
1275
- list: { method: "GET"; path: "/company-reports"; summary: "List published company reports accessible to the caller (metadata only)"; description: "Returns lightweight report metadata (id, title, period, publisher company reference). Use GET /company-reports/:id to fetch the full content of a specific report. Visibility is determined by the caller's roles — VC users see reports for managed-portfolio companies, company employees see their own company's reports, portfolio investors see Published reports shared with their visibility groups. Filters narrow the list by company ids, funds (`companyGroupIds`), company name substring (`companyNameSearch`), and reporting period (timeframe + date range). Ordered by report date descending, then id descending — newest first."; exampleCall: "client.companyReports.list({ limit: 123 })"; responseType: "CompanyReportsListResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1335
+ list: { method: "GET"; path: "/company-reports"; summary: "List published company reports accessible to the caller (metadata only)"; description: "Returns lightweight report metadata (id, title, period, publisher company reference). Use GET /company-reports/:id to fetch the full content of a specific report. Visibility is determined by the caller's roles — VC users see reports for managed-portfolio companies, company employees see their own company's reports, portfolio investors see Published reports shared with their visibility groups. Filters narrow the list by company ids, funds (`companyGroupIds`), company name substring (`companyNameSearch`), and reporting period (timeframe + date range). Ordered by reporting period date descending, then id descending by default. Use `sortBy: publishedAt` and `limit: 1` for the most recently published report; publication order can differ from period order."; exampleCall: "client.companyReports.list({ limit: 123 })"; responseType: "CompanyReportsListResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1276
1336
  getOne: { method: "GET"; path: "/company-reports/:id"; summary: "Fetch the full content of a single company report"; description: "Returns the report metadata plus structured sections (text/markdown/image) and attachments with pre-signed URLs. Returns 404 if the report does not exist and 403 if the caller cannot access it under their role-based permissions."; exampleCall: "client.companyReports.getOne(123)"; responseType: "CompanyReportsGetOneResponse"; pathParams: { name: string; type: string; description: string | null }[]; queryParams: { name: string; type: string; required: boolean; description: string | null }[] }
1277
1337
  }
1278
1338
  }