@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/AGENTS.md CHANGED
@@ -34,7 +34,7 @@ console.log(routeManifest)
34
34
  - companies.getDashboard: Get full company dashboard for ONE company
35
35
  - Call: `client.companies.getDashboard(123, { currency: 'USD' })`
36
36
  - Returns: `CompaniesGetDashboardResponse`
37
- - Params: path: id (number); query: currency (string), metricsFrom? (string), transactionLimit? (number), reportLimit? (number)
37
+ - Params: 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)
38
38
  - companies.getOne: Get one company available to the SDK consumer
39
39
  - Call: `client.companies.getOne(123)`
40
40
  - Returns: `CompaniesGetOneResponse`
@@ -60,7 +60,7 @@ console.log(routeManifest)
60
60
  - positions.getPortfolioSummary: Get portfolio summary with positions and key metrics per company
61
61
  - Call: `client.positions.getPortfolioSummary({ currency: 'USD' })`
62
62
  - Returns: `PositionsGetPortfolioSummaryResponse`
63
- - Params: query: limit? (number), cursor? (string), companyGroupIds? (number[]), companyIds? (number[]), currency (string), date? (string), metricTypeNames? (string[])
63
+ - Params: 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[])
64
64
  - positions.getCompanyPositions: Get positions for one company
65
65
  - Call: `client.positions.getCompanyPositions(123, { currency: 'USD' })`
66
66
  - Returns: `PositionsGetCompanyPositionsResponse`
@@ -90,17 +90,17 @@ console.log(routeManifest)
90
90
  - metrics.getTypes: List metric types available to the SDK consumer
91
91
  - Call: `client.metrics.getTypes({ limit: 123 })`
92
92
  - Returns: `MetricsGetTypesResponse`
93
- - Params: query: limit? (number), cursor? (string)
93
+ - Params: query: limit? (number), cursor? (string), nameSearch? (string[])
94
94
  - metrics.search: Read metric values for accessible companies, grouped by company
95
95
  - Call: `client.metrics.search({})`
96
96
  - Returns: `MetricsSearchResponse`
97
97
  - Params: body: MetricsSearchBody
98
98
  - metrics.compare: Compare metrics across companies
99
- - Call: `client.metrics.compare({ metricTypeIds: [1,7] })`
99
+ - Call: `client.metrics.compare({})`
100
100
  - Returns: `MetricsCompareResponse`
101
101
  - Params: body: MetricsCompareBody
102
102
  - metrics.aggregate: Aggregate metrics across portfolio companies
103
- - Call: `client.metrics.aggregate({ metricTypeIds: [1,7], aggregation: "SUM" })`
103
+ - Call: `client.metrics.aggregate({ aggregation: "SUM" })`
104
104
  - Returns: `MetricsAggregateResponse`
105
105
  - Params: body: MetricsAggregateBody
106
106
 
@@ -109,7 +109,7 @@ console.log(routeManifest)
109
109
  - companyReports.list: List published company reports accessible to the caller (metadata only)
110
110
  - Call: `client.companyReports.list({ limit: 123 })`
111
111
  - Returns: `CompanyReportsListResponse`
112
- - Params: query: limit? (number), cursor? (string), companyIds? (number[]), companyGroupIds? (number[]), companyNameSearch? (string[]), timeframe? ("Month" | "Quarter" | "Year"), from? (string), to? (string)
112
+ - Params: query: limit? (number), cursor? (string), sortBy? ("date" | "publishedAt"), companyIds? (number[]), companyGroupIds? (number[]), companyNameSearch? (string[]), timeframe? ("Month" | "Quarter" | "Year"), from? (string), to? (string)
113
113
  - companyReports.getOne: Fetch the full content of a single company report
114
114
  - Call: `client.companyReports.getOne(123)`
115
115
  - Returns: `CompanyReportsGetOneResponse`
package/README.md CHANGED
@@ -60,7 +60,7 @@ Get full company dashboard for ONE company
60
60
  - Call: `client.companies.getDashboard(123, { currency: 'USD' })`
61
61
  - HTTP: `GET /companies/:id/dashboard`
62
62
  - Returns: `CompaniesGetDashboardResponse`
63
- - Params: path: id (number); query: currency (string), metricsFrom? (string), transactionLimit? (number), reportLimit? (number)
63
+ - Params: 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)
64
64
 
65
65
  ### `companies.getOne`
66
66
 
@@ -109,7 +109,7 @@ Get portfolio summary with positions and key metrics per company
109
109
  - Call: `client.positions.getPortfolioSummary({ currency: 'USD' })`
110
110
  - HTTP: `GET /positions/portfolio/summary`
111
111
  - Returns: `PositionsGetPortfolioSummaryResponse`
112
- - Params: query: limit? (number), cursor? (string), companyGroupIds? (number[]), companyIds? (number[]), currency (string), date? (string), metricTypeNames? (string[])
112
+ - Params: 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[])
113
113
 
114
114
  ### `positions.getCompanyPositions`
115
115
 
@@ -167,7 +167,7 @@ List metric types available to the SDK consumer
167
167
  - Call: `client.metrics.getTypes({ limit: 123 })`
168
168
  - HTTP: `GET /metrics/types`
169
169
  - Returns: `MetricsGetTypesResponse`
170
- - Params: query: limit? (number), cursor? (string)
170
+ - Params: query: limit? (number), cursor? (string), nameSearch? (string[])
171
171
 
172
172
  ### `metrics.search`
173
173
 
@@ -182,7 +182,7 @@ Read metric values for accessible companies, grouped by company
182
182
 
183
183
  Compare metrics across companies
184
184
 
185
- - Call: `client.metrics.compare({ metricTypeIds: [1,7] })`
185
+ - Call: `client.metrics.compare({})`
186
186
  - HTTP: `POST /metrics/compare`
187
187
  - Returns: `MetricsCompareResponse`
188
188
  - Params: body: MetricsCompareBody
@@ -191,7 +191,7 @@ Compare metrics across companies
191
191
 
192
192
  Aggregate metrics across portfolio companies
193
193
 
194
- - Call: `client.metrics.aggregate({ metricTypeIds: [1,7], aggregation: "SUM" })`
194
+ - Call: `client.metrics.aggregate({ aggregation: "SUM" })`
195
195
  - HTTP: `POST /metrics/aggregate`
196
196
  - Returns: `MetricsAggregateResponse`
197
197
  - Params: body: MetricsAggregateBody
@@ -205,7 +205,7 @@ List published company reports accessible to the caller (metadata only)
205
205
  - Call: `client.companyReports.list({ limit: 123 })`
206
206
  - HTTP: `GET /company-reports`
207
207
  - Returns: `CompanyReportsListResponse`
208
- - Params: query: limit? (number), cursor? (string), companyIds? (number[]), companyGroupIds? (number[]), companyNameSearch? (string[]), timeframe? ("Month" | "Quarter" | "Year"), from? (string), to? (string)
208
+ - Params: query: limit? (number), cursor? (string), sortBy? ("date" | "publishedAt"), companyIds? (number[]), companyGroupIds? (number[]), companyNameSearch? (string[]), timeframe? ("Month" | "Quarter" | "Year"), from? (string), to? (string)
209
209
 
210
210
  ### `companyReports.getOne`
211
211
 
package/ai-manifest.json CHANGED
@@ -23,7 +23,7 @@
23
23
  {
24
24
  "operation": "getDashboards",
25
25
  "summary": "PREFERRED tool for multi-company analysis — full dashboards for many companies in one call",
26
- "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.",
26
+ "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.",
27
27
  "method": "POST",
28
28
  "path": "/companies/dashboards",
29
29
  "exampleCall": "client.companies.getDashboards({ companyIds: [123], currency: 'USD' })",
@@ -34,7 +34,7 @@
34
34
  {
35
35
  "operation": "getDashboard",
36
36
  "summary": "Get full company dashboard for ONE company",
37
- "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.",
37
+ "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.",
38
38
  "method": "GET",
39
39
  "path": "/companies/:id/dashboard",
40
40
  "exampleCall": "client.companies.getDashboard(123, { currency: 'USD' })",
@@ -59,6 +59,42 @@
59
59
  "type": "string",
60
60
  "description": "Lower bound for metric data points (ISO 8601). Omit to include all available history."
61
61
  },
62
+ {
63
+ "name": "metricsTo",
64
+ "required": false,
65
+ "type": "string",
66
+ "description": "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."
67
+ },
68
+ {
69
+ "name": "metricsTimeframe",
70
+ "required": false,
71
+ "type": "\"Month\" | \"Quarter\" | \"Year\"",
72
+ "description": "Restrict metric data points to this reporting period granularity."
73
+ },
74
+ {
75
+ "name": "metricsPointLimit",
76
+ "required": false,
77
+ "type": "number",
78
+ "description": "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."
79
+ },
80
+ {
81
+ "name": "metricTypeNames",
82
+ "required": false,
83
+ "type": "string[]",
84
+ "description": "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."
85
+ },
86
+ {
87
+ "name": "metricTypeIds",
88
+ "required": false,
89
+ "type": "number[]",
90
+ "description": "Metric type identifiers to include. Intersected with `metricTypeNames` when both are provided."
91
+ },
92
+ {
93
+ "name": "conversionStrategy",
94
+ "required": false,
95
+ "type": "\"LATEST_FX_RATE\" | \"ENTITY_DATE_RATE\"",
96
+ "description": "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."
97
+ },
62
98
  {
63
99
  "name": "transactionLimit",
64
100
  "required": false,
@@ -192,7 +228,7 @@
192
228
  {
193
229
  "operation": "getPortfolioSummary",
194
230
  "summary": "Get portfolio summary with positions and key metrics per company",
195
- "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.",
231
+ "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.",
196
232
  "method": "GET",
197
233
  "path": "/positions/portfolio/summary",
198
234
  "exampleCall": "client.positions.getPortfolioSummary({ currency: 'USD' })",
@@ -211,6 +247,30 @@
211
247
  "type": "string",
212
248
  "description": "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."
213
249
  },
250
+ {
251
+ "name": "groupBy",
252
+ "required": false,
253
+ "type": "\"CompanyGroup\" | \"Company\"",
254
+ "description": "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."
255
+ },
256
+ {
257
+ "name": "sortBy",
258
+ "required": false,
259
+ "type": "\"companyId\" | \"fairValue\" | \"invested\" | \"realized\" | \"multiple\"",
260
+ "description": "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."
261
+ },
262
+ {
263
+ "name": "sortDirection",
264
+ "required": false,
265
+ "type": "\"asc\" | \"desc\"",
266
+ "description": null
267
+ },
268
+ {
269
+ "name": "includeMetrics",
270
+ "required": false,
271
+ "type": "boolean",
272
+ "description": "Include the latest monthly metric snapshot as of date (defaults to today). Set false for position-only queries: skips metric computation and returns latestMetrics: []."
273
+ },
214
274
  {
215
275
  "name": "companyGroupIds",
216
276
  "required": false,
@@ -281,7 +341,7 @@
281
341
  "name": "currency",
282
342
  "required": true,
283
343
  "type": "string",
284
- "description": "Reporting currency code"
344
+ "description": "Reporting currency code (ISO 4217)"
285
345
  },
286
346
  {
287
347
  "name": "date",
@@ -317,7 +377,7 @@
317
377
  "name": "currency",
318
378
  "required": true,
319
379
  "type": "string",
320
- "description": "Reporting currency code"
380
+ "description": "Reporting currency code (ISO 4217)"
321
381
  },
322
382
  {
323
383
  "name": "date",
@@ -490,7 +550,7 @@
490
550
  {
491
551
  "operation": "getTypes",
492
552
  "summary": "List metric types available to the SDK consumer",
493
- "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.",
553
+ "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.",
494
554
  "method": "GET",
495
555
  "path": "/metrics/types",
496
556
  "exampleCall": "client.metrics.getTypes({ limit: 123 })",
@@ -508,13 +568,19 @@
508
568
  "required": false,
509
569
  "type": "string",
510
570
  "description": "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."
571
+ },
572
+ {
573
+ "name": "nameSearch",
574
+ "required": false,
575
+ "type": "string[]",
576
+ "description": "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."
511
577
  }
512
578
  ]
513
579
  },
514
580
  {
515
581
  "operation": "search",
516
582
  "summary": "Read metric values for accessible companies, grouped by company",
517
- "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.",
583
+ "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.",
518
584
  "method": "POST",
519
585
  "path": "/metrics",
520
586
  "exampleCall": "client.metrics.search({})",
@@ -525,10 +591,10 @@
525
591
  {
526
592
  "operation": "compare",
527
593
  "summary": "Compare metrics across companies",
528
- "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.",
594
+ "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.",
529
595
  "method": "POST",
530
596
  "path": "/metrics/compare",
531
- "exampleCall": "client.metrics.compare({ metricTypeIds: [1,7] })",
597
+ "exampleCall": "client.metrics.compare({})",
532
598
  "responseType": "MetricsCompareResponse",
533
599
  "pathParams": [],
534
600
  "queryParams": []
@@ -536,10 +602,10 @@
536
602
  {
537
603
  "operation": "aggregate",
538
604
  "summary": "Aggregate metrics across portfolio companies",
539
- "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`.",
605
+ "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).",
540
606
  "method": "POST",
541
607
  "path": "/metrics/aggregate",
542
- "exampleCall": "client.metrics.aggregate({ metricTypeIds: [1,7], aggregation: \"SUM\" })",
608
+ "exampleCall": "client.metrics.aggregate({ aggregation: \"SUM\" })",
543
609
  "responseType": "MetricsAggregateResponse",
544
610
  "pathParams": [],
545
611
  "queryParams": []
@@ -549,7 +615,7 @@
549
615
  {
550
616
  "operation": "list",
551
617
  "summary": "List published company reports accessible to the caller (metadata only)",
552
- "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.",
618
+ "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.",
553
619
  "method": "GET",
554
620
  "path": "/company-reports",
555
621
  "exampleCall": "client.companyReports.list({ limit: 123 })",
@@ -568,6 +634,12 @@
568
634
  "type": "string",
569
635
  "description": "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."
570
636
  },
637
+ {
638
+ "name": "sortBy",
639
+ "required": false,
640
+ "type": "\"date\" | \"publishedAt\"",
641
+ "description": "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."
642
+ },
571
643
  {
572
644
  "name": "companyIds",
573
645
  "required": false,