Skip to content

Commit 8963bea

Browse files
mivertowskiclaude
andcommitted
polish: overhaul CLI, README, CHANGELOG, and crate metadata for publishing
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 682436e commit 8963bea

9 files changed

Lines changed: 194 additions & 163 deletions

File tree

CHANGELOG.md

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
## [2.0.0] - 2026-03-30
1111

12+
Major version — SDK rewritten to align with the new Rust-based VynCo API.
13+
1214
### Added
1315

14-
- 6 new resource modules (22 endpoints): auditors, dashboard, screening, watchlists, webhooks, exports, ai
15-
- 9 new resource modules (41 endpoints): api_keys, credits, teams, billing, changes, persons, analytics, dossiers, graph
16-
- 8 new company sub-endpoints: statistics, compare, news, reports, relationships, hierarchy, fingerprint, nearby
17-
- `Client::request_bytes()` for binary file downloads
18-
- `ExportFile` type for downloaded export data
16+
- **18 resource modules** covering 69 endpoints:
17+
- `companies` — list, get, count, events, statistics, compare, news, reports, relationships, hierarchy, fingerprint, nearby
18+
- `auditors` — history, tenures
19+
- `dashboard` — get
20+
- `screening` — screen
21+
- `watchlists` — list, create, delete, companies, add_companies, remove_company, events
22+
- `webhooks` — list, create, update, delete, test, deliveries
23+
- `exports` — create, get, download
24+
- `ai` — dossier, search, risk_score
25+
- `api_keys` — list, create, revoke
26+
- `credits` — balance, usage, history
27+
- `billing` — create_checkout, create_portal
28+
- `teams` — me, create, members, invite_member, update_member_role, remove_member, billing_summary
29+
- `changes` — list, by_company, statistics
30+
- `persons` — board_members
31+
- `analytics` — statistics, cantons, auditors, cluster, anomalies, rfm_segments, cohorts, candidates
32+
- `dossiers` — create, list, get, delete
33+
- `graph` — get, export, analyze
34+
- `health` — check
35+
- `Client::request_bytes()` for binary file downloads (exports, graph XML)
36+
- `ExportFile` type for downloaded export data with content-type and filename
1937
- Company events via `companies().events(uid, limit)` (CloudEvents format)
20-
- `ErrorBody.instance` field (RFC 7807)
21-
22-
### Changed
23-
24-
- Base URL: `https://api.vynco.ch/api/v1``https://api.vynco.ch`
25-
- Serde: Dropped `rename_all = "camelCase"` — API uses snake_case natively
26-
- `HealthResponse`: now `status`, `database`, `redis`, `version` (was `status`, `uptime`, `checks`)
27-
- `Company`: removed `address`, `purpose`; added `share_capital`, `industry`; fields now `Option<String>`
28-
- `PagedResponse<T>`: `total_count: u64``total: i64`, `page_size: u32``page_size: i64`
29-
- `CompanyListParams`: removed `status`, `auditor_category`, `sort_by`, `sort_desc`, `target_status`; added `changed_since`; page types i64
30-
- `ErrorBody`: `detail: String``Option<String>`; removed `message`; added `instance: Option<String>`
31-
- Companies `count()` no longer takes params
38+
- Network graph and analysis endpoints
39+
- Sanctions screening against SECO, FINMA, OpenSanctions
40+
- AI-powered dossier generation, natural language search, multi-signal risk scoring
41+
42+
### Changed (from v1.0.0)
43+
44+
- **Base URL**: `https://api.vynco.ch/api/v1``https://api.vynco.ch`
45+
- **`Company`**: fields now `Option<String>`; added `share_capital`, `industry`; removed `address`, `purpose`
46+
- **`Company` + `PagedResponse<T>`**: now use `#[serde(rename_all = "camelCase")]`
47+
- **`PagedResponse<T>`**: `total_count: u64``total: i64`
48+
- **`HealthResponse`**: now `status`, `database`, `redis`, `version` (was `status`, `uptime`, `checks`)
49+
- **`ErrorBody`**: `detail` is now `Option<String>`; removed `message`; added `instance`
50+
- **`ResponseMeta`**: fixed `X-RateLimit-Limit` header name (was `X-Rate-Limit-Limit`)
3251

3352
### Removed
3453

CLAUDE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ cargo test -- --nocapture # Run tests with stdout visible
6464

6565
### Serde Conventions
6666

67-
- `#[serde(rename_all = "camelCase")]` on `Company` and `PagedResponse<T>` (API returns camelCase for these types)
68-
- Other response types use snake_case natively (no `rename_all` needed)
67+
- `#[serde(rename_all = "camelCase")]` on all API response types (Company, PagedResponse, and all new v2 types)
68+
- Request parameter types use snake_case (no rename_all) since query params are built manually
6969
- `#[serde(default)]` on fields that may be absent
7070
- `#[serde(skip_serializing_if = "Option::is_none")]` on optional request params
7171

Cargo.lock

Lines changed: 0 additions & 116 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ exclude = ["docs/", "CLAUDE.md"]
1818
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
1919
serde = { version = "1", features = ["derive"] }
2020
serde_json = "1"
21-
chrono = { version = "0.4", features = ["serde"] }
2221
thiserror = "2"
2322
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
2423

README.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
[![CI](https://github.com/VynCorp/vc-rust/actions/workflows/ci.yml/badge.svg)](https://github.com/VynCorp/vc-rust/actions/workflows/ci.yml)
66
[![License: Apache-2.0](https://img.shields.io/crates/l/vynco.svg)](LICENSE)
77

8-
Rust SDK for the [VynCo](https://vynco.ch) Swiss Corporate Intelligence API.
9-
10-
Access 500,000+ Swiss companies with event tracking, sanctions screening, AI-powered analysis,
11-
watchlists, webhooks, and bulk data exports.
8+
Rust SDK for the [VynCo](https://vynco.ch) Swiss Corporate Intelligence API. Access 500,000+ Swiss companies from the commercial register with change tracking, sanctions screening, AI-powered risk analysis, network graphs, watchlists, webhooks, and bulk data exports.
129

1310
## Installation
1411

@@ -31,8 +28,7 @@ use vynco::{Client, CompanyListParams};
3128

3229
#[tokio::main]
3330
async fn main() -> Result<(), vynco::VyncoError> {
34-
let client = Client::builder("vc_live_your_api_key")
35-
.build()?;
31+
let client = Client::builder("vc_live_your_api_key").build()?;
3632

3733
// List companies with filtering
3834
let params = CompanyListParams {
@@ -42,34 +38,27 @@ async fn main() -> Result<(), vynco::VyncoError> {
4238
};
4339
let resp = client.companies().list(&params).await?;
4440
println!("Found {} companies", resp.data.total);
45-
println!("Credits used: {:?}", resp.meta.credits_used);
4641

47-
// Get company by UID
42+
// Get a single company
4843
let company = client.companies().get("CHE-105.805.080").await?;
4944
println!("{}: {:?}", company.data.name, company.data.legal_form);
5045

5146
// Sanctions screening
5247
let screening = client.screening().screen(&vynco::ScreeningRequest {
53-
name: "Novartis AG".into(),
54-
uid: None,
55-
sources: None,
48+
name: "Suspicious Corp".into(), uid: None, sources: None,
5649
}).await?;
57-
println!("Risk level: {}", screening.data.risk_level);
50+
println!("Risk: {} ({} hits)", screening.data.risk_level, screening.data.hit_count);
5851

5952
// AI risk score
6053
let risk = client.ai().risk_score(&vynco::RiskScoreRequest {
6154
uid: "CHE-105.805.080".into(),
6255
}).await?;
63-
println!("Risk score: {}/100", risk.data.overall_score);
56+
println!("Risk score: {}/100 ({})", risk.data.overall_score, risk.data.risk_level);
6457

6558
// Credit balance
6659
let credits = client.credits().balance().await?;
6760
println!("Credits remaining: {}", credits.data.balance);
6861

69-
// Team info
70-
let team = client.teams().me().await?;
71-
println!("Team: {} ({})", team.data.name, team.data.tier);
72-
7362
Ok(())
7463
}
7564
```
@@ -147,6 +136,10 @@ cargo run --example vynco_cli -- screen "Test Corp" # Sanctions s
147136
cargo run --example vynco_cli -- dashboard # Admin dashboard
148137
cargo run --example vynco_cli -- auditors --min-years 10 --canton ZH # Long-tenure auditors
149138
cargo run --example vynco_cli -- risk CHE-105.805.649 # AI risk score
139+
cargo run --example vynco_cli -- fingerprint CHE-105.805.649 # Company data fingerprint
140+
cargo run --example vynco_cli -- graph CHE-105.805.649 # Network graph
141+
cargo run --example vynco_cli -- dossier CHE-105.805.649 # Generate AI dossier
142+
cargo run --example vynco_cli -- compare CHE-105.805.649 CHE-109.340.740 # Compare companies
150143
cargo run --example vynco_cli -- credits # Credit balance
151144
cargo run --example vynco_cli -- team # Team info
152145
cargo run --example vynco_cli -- changes --page 1 --page-size 10 # Recent SOGC changes

0 commit comments

Comments
 (0)