@curviate/sdk 0.37.1 → 0.38.0

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/CHANGELOG.md CHANGED
@@ -9,6 +9,64 @@ Versioning: semantic. Minor for additive changes, patch for bug fixes; no stabil
9
9
 
10
10
  ## [Unreleased]
11
11
 
12
+ ## [0.38.0] - 2026-09-26
13
+
14
+ Fixture and types regenerated against the deployed production document
15
+ (`https://api.curviate.com`, 130 paths, server
16
+ `f06ce7e52877ead27c1cfc62dde311c8cda9a325`). Adds programmatic connect at
17
+ scale: your own end-user id on accounts, tenant-wide account-status webhooks,
18
+ challenge selection on checkpoints, and seat purchase over the API.
19
+
20
+ ### Added
21
+
22
+ - **`accounts.addSeats({ qty })`, `accounts.cancelSeat(seatId)`,
23
+ `accounts.revertSeatCancellation(seatId)`.** Buy seats, schedule a seat's
24
+ end-of-period cancellation, and undo it, without the dashboard. Every
25
+ `addSeats` call buys the seats it asks for, so a repeated call buys again,
26
+ and the SDK never retries it. On `SUBSCRIPTION_BUSY` (503) the purchase could
27
+ not be confirmed: check the seat count with `accounts.listSeats()` before
28
+ trying again. A trialing workspace gets `TRIAL_ACTIVE_SEAT_LIMIT`.
29
+ Their types include the 402 refusals (no subscription, past due, dispute,
30
+ and on add a declined card) and the 503 `SUBSCRIPTION_BUSY`.
31
+ - **`external_id` on accounts.** Pass your own id for the account's end user on
32
+ `auth.intent` or `accounts.update` (`null` clears it). It is returned on
33
+ `accounts.get`/`list`, on the connect responses, and on every `account.*`
34
+ webhook payload (`AccountPayload.external_id`, `null` when unset).
35
+ `accounts.list({ external_id })` returns only that end user's accounts.
36
+ - **`metadata` is stored and read back.** `accounts.update({ metadata })` now
37
+ persists the map (at most 16 keys) and `accounts.get`/`list` return it;
38
+ `null` clears it.
39
+ - **`timezone` and `products` on `auth.intent`.** `timezone` is an IANA zone
40
+ name; `products` narrows the premium products asked for
41
+ (`["sales_navigator"]`, `["recruiter"]`, or `[]`).
42
+ - **Challenge selection.** A checkpoint can now be
43
+ `challenge_type: "challenge_selection"` with a `challenges` list
44
+ (`{ id, label, description }`). Answer it with
45
+ `auth.requestCheckpoint(accountId, { challenge: id })`, which returns the next
46
+ checkpoint.
47
+ - **Tenant-wide account-status webhooks.** `webhooks.create` with
48
+ `source: "account_status"` no longer needs `account_ids`: omit it to cover
49
+ every current and future account. `webhooks.update(id, { account_ids: null })`
50
+ switches an existing one.
51
+
52
+ ### Changed
53
+
54
+ - **`auth.requestCheckpoint` returns `200 | 202`.** Without a body it still
55
+ re-sends and returns `{ resent }`; with `{ challenge }` it returns the next
56
+ checkpoint. Code reading `result.resent` must narrow first
57
+ (`"status" in result` for the 202 checkpoint, `"resent" in result` for the
58
+ 200 re-send; each narrows only its true branch).
59
+ - **Webhook `account_ids` is `string[] | null` on reads.** `null` means a
60
+ tenant-wide `account_status` webhook.
61
+ - **Empty optional text is refused.** An empty `headline` on `users.update`,
62
+ an empty `subject` on `messaging.startChat` and an empty `message` on
63
+ `invites.send` are now rejected with `INVALID_REQUEST`. `bio: ""` is still
64
+ accepted (its type now reads `"" | string`).
65
+ - **`account.restricted` documented as "connected, some actions fail".** The
66
+ event also fires when one LinkedIn product on the account (Sales Navigator,
67
+ Recruiter) is failing, not only for a LinkedIn restriction. Surface it to a
68
+ human; a reconnect may restore a single failing product.
69
+
12
70
  ## [0.37.1] - 2026-09-23
13
71
 
14
72
  Fixture and types regenerated against the deployed production document