|
1 | 1 | # Changelog |
2 | 2 |
|
3 | | -All notable changes to this project will be documented in this file. |
4 | | - |
5 | | -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
6 | | -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
7 | | - |
8 | | -## [0.1.0] - 2026-03-17 |
9 | | - |
10 | | -### Added |
11 | | - |
12 | | -- **VyncoClient** with options-based configuration (`apiKey`, `baseUrl`, `timeout`, `maxRetries`) |
13 | | -- **12 resource modules** covering 45 VynCo API endpoints: |
14 | | - - `companies` — search, get by UID, count, statistics, change history, board members, dossier, relationships, hierarchy, compare |
15 | | - - `persons` — get by ID, search by name |
16 | | - - `dossiers` — generate AI company reports (summary/standard/comprehensive) |
17 | | - - `apiKeys` — list, create, revoke API keys |
18 | | - - `credits` — balance, usage breakdown, transaction history |
19 | | - - `billing` — Stripe checkout and portal sessions |
20 | | - - `webhooks` — list, create, get, update, delete, test |
21 | | - - `teams` — get current team, create team |
22 | | - - `users` — get profile, update profile, change password |
23 | | - - `settings` — get/update preferences, get/update notifications |
24 | | - - `analytics` — company stats, cantons, auditors, clustering, anomaly detection, RFM segments, cohorts, cross-tabulation |
25 | | - - `sync` — data sync status |
26 | | -- **Response metadata** via `VyncoResponse<T>` wrapper exposing API headers: |
27 | | - - `X-Request-Id` — request tracing |
28 | | - - `X-Credits-Used` — credits consumed |
29 | | - - `X-Credits-Remaining` — remaining balance |
30 | | - - `X-Rate-Limit-Limit` — tier rate limit |
31 | | - - `X-Data-Source` — OGD compliance (Zefix/LINDAS) |
32 | | -- **Typed error handling** with error classes mapping HTTP status codes: |
33 | | - - `AuthenticationError` (401), `InsufficientCreditsError` (402), `ForbiddenError` (403) |
34 | | - - `NotFoundError` (404), `ValidationError` (400/422), `RateLimitError` (429), `ServerError` (5xx) |
35 | | - - `NetworkError` (connection failures), `DeserializeError` (JSON parse), `TimeoutError`, `ConfigError` |
36 | | -- **Automatic retry** with exponential backoff on 429 and 5xx responses |
37 | | -- **Retry-After header** support for rate-limited requests |
38 | | -- **Dual ESM/CJS output** with TypeScript declarations via tsup |
39 | | -- **Zero runtime dependencies** — uses native `fetch` (Node.js 18+ / browsers) |
40 | | -- **33 tests** with vitest and msw covering auth, error mapping, resource methods, and metadata parsing |
| 3 | +## 2.0.0 (2026-03-31) |
| 4 | + |
| 5 | +Major release aligning the TypeScript SDK with the Rust SDK (`vynco` v2.0.0). |
| 6 | + |
| 7 | +### Breaking Changes |
| 8 | + |
| 9 | +- **Base URL** changed from `https://api.vynco.ch/v1` to `https://api.vynco.ch` — the `/v1` prefix is now part of each endpoint path. Health check is at `/health` (no `/v1` prefix). |
| 10 | +- **Removed resources:** `Watches`, `Notifications`, `Enrichments`, `Users`, `Settings`, `Sync` — replaced by new equivalents or removed from the API. |
| 11 | +- **Removed methods:** `companies.search()` (POST), `companies.batch()`, `changes.review()`, `changes.batch()`, `changes.bySogcId()`, `persons.get()`, `persons.search()`, `persons.roles()`, `persons.connections()`, `persons.networkStats()`, `dossiers.generate()`, `dossiers.statistics()`, `analytics.velocity()`. |
| 12 | +- **Renamed types:** `PaginatedResponse` → `PagedResponse`, `UsageBreakdown` → `CreditUsage`, `ApiKeyInfo` → `ApiKey`, `CheckoutSessionResponse`/`PortalSessionResponse` → `SessionUrl`. |
| 13 | +- **Changed method signatures:** `companies.compare()` now takes `CompareRequest` object, `dossiers.create()` replaces `dossiers.generate()`, `changes.byCompany()` replaces `changes.get()`. |
| 14 | +- **Type changes:** `CompanyChange`, `ChangeListParams`, `ChangeStatistics`, `Company`, `CompanyStatistics`, `Team`, `CreateTeamRequest`, `CreateApiKeyRequest`, `ApiKeyCreated`, `Dossier` fields updated to match API. |
| 15 | +- **ResponseMeta:** Rate limit headers changed from `x-rate-limit-limit` to `x-ratelimit-limit` (no hyphen). Added `rateLimitRemaining` and `rateLimitReset`. |
| 16 | + |
| 17 | +### New Resources (8) |
| 18 | + |
| 19 | +- **`auditors`** — `history(uid)`, `tenures(params?)` — auditor appointment history and long-tenure queries. |
| 20 | +- **`dashboard`** — `get()` — dashboard summary data. |
| 21 | +- **`screening`** — `screen(request)` — sanctions and watchlist screening. |
| 22 | +- **`watchlists`** — `list()`, `create()`, `delete()`, `companies()`, `addCompanies()`, `removeCompany()`, `events()` — company monitoring lists with events. |
| 23 | +- **`webhooks`** — `list()`, `create()`, `update()`, `delete()`, `test()`, `deliveries()` — webhook subscriptions with signing secrets and delivery tracking. |
| 24 | +- **`exports`** — `create()`, `get()`, `download()` — bulk data export jobs with binary file downloads. |
| 25 | +- **`ai`** — `dossier()`, `search()`, `riskScore()` — AI-powered company intelligence, natural language search, and risk scoring. |
| 26 | +- **`graph`** — `get()`, `export()`, `analyze()` — corporate relationship graphs with network analysis. |
| 27 | + |
| 28 | +### New Company Methods (5) |
| 29 | + |
| 30 | +- `companies.events(uid, limit?)` — company change events (CloudEvent format) |
| 31 | +- `companies.reports(uid)` — financial report metadata |
| 32 | +- `companies.fingerprint(uid)` — extended company data profile |
| 33 | +- `companies.nearby(params)` — geo-proximity company search |
| 34 | +- `companies.relationships(uid)` — now returns typed `Relationship[]` |
| 35 | + |
| 36 | +### New Team Methods (5) |
| 37 | + |
| 38 | +- `teams.members()` — list team members |
| 39 | +- `teams.inviteMember(request)` — invite by email |
| 40 | +- `teams.updateMemberRole(id, request)` — change member role |
| 41 | +- `teams.removeMember(id)` — remove a member |
| 42 | +- `teams.billingSummary()` — team billing overview |
| 43 | + |
| 44 | +### New Analytics Methods (4) |
| 45 | + |
| 46 | +- `analytics.anomalies(request)` — anomaly detection |
| 47 | +- `analytics.cohorts(params?)` — cohort analysis |
| 48 | +- `analytics.statistics()` — company statistics |
| 49 | +- `analytics.candidates(params?)` — audit candidate ranking |
| 50 | + |
| 51 | +### Other Improvements |
| 52 | + |
| 53 | +- Added `ConflictError` (HTTP 409) to error mapping |
| 54 | +- Added `_requestBytes()` internal method for binary file downloads |
| 55 | +- Credits `history()` now returns typed `CreditHistory` instead of `unknown` |
| 56 | +- Analytics `cantons()` and `auditors()` return typed arrays instead of `AnalyticsResult` |
| 57 | +- GitHub Actions publish workflow now creates a GitHub Release automatically |
| 58 | +- CI workflow now includes package verification step |
| 59 | + |
| 60 | +## 1.0.0 (2026-03-18) |
| 61 | + |
| 62 | +Initial major release. |
| 63 | + |
| 64 | +- 16 resource modules covering 60+ API endpoints |
| 65 | +- Response metadata wrapper with API headers |
| 66 | +- Typed error handling (11 error classes) |
| 67 | +- Automatic retry with exponential backoff |
| 68 | +- Dual ESM/CJS output with zero dependencies |
| 69 | + |
| 70 | +## 0.1.0 (2026-03-17) |
| 71 | + |
| 72 | +Alpha release. |
0 commit comments