@curviate/sdk 0.40.0 → 0.41.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 +62 -0
- package/README.md +7 -1
- package/dist/index.d.ts +364 -54
- package/dist/index.js +70 -25
- package/package.json +1 -1
- package/src/generated/types.ts +239 -36
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,68 @@ Versioning: semantic. Minor for additive changes, patch for bug fixes; no stabil
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.41.0] - 2026-10-03
|
|
13
|
+
|
|
14
|
+
Fixture and types regenerated against the deployed staging document
|
|
15
|
+
(`https://api.staging.curviate.com`, 130 paths, server
|
|
16
|
+
`df3c133205721a75786001d51b3ee4491b4fe697`).
|
|
17
|
+
|
|
18
|
+
### Breaking
|
|
19
|
+
|
|
20
|
+
- **A new connect must name its connection location.** `auth.intent()`
|
|
21
|
+
without `account_id` needs exactly one of `country` (a supported ISO 3166-1
|
|
22
|
+
alpha-2 code, e.g. `"US"`), `ip` (a public IPv4) or your own `proxy`. The
|
|
23
|
+
API refuses a connect without one with `400 CONNECTION_LOCATION_REQUIRED`,
|
|
24
|
+
and `AuthIntentBody` now refuses it at compile time, along with two sources
|
|
25
|
+
at once and `allow_country_fallback` with `proxy`. A reconnect (`account_id`
|
|
26
|
+
present) may still omit it to keep the account's configured location.
|
|
27
|
+
`country` is typed as the served 56-code enum (`ConnectionCountry`).
|
|
28
|
+
- **`accounts.update()` returns the account.** It used to return
|
|
29
|
+
`{ object, account_id }`; it now returns the account as `get` does, without
|
|
30
|
+
`quotas` and `event_log`, with `connection_location` re-read after a
|
|
31
|
+
location change.
|
|
32
|
+
- **`proxy: null` on `accounts.update()` requires a `country`** in the same
|
|
33
|
+
call. Clearing your own proxy alone used to fall back to an automatic
|
|
34
|
+
location; it is now `CONNECTION_LOCATION_REQUIRED`.
|
|
35
|
+
- **Post engagement counts can be `null`.** On `search.posts`, `search.fromUrl`,
|
|
36
|
+
`companies.posts` and `feed.home` items, `likes`, `comments`
|
|
37
|
+
and `shares` are `number | null`, as the served document now declares.
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- **Connection location.** `country` and `allow_country_fallback` on
|
|
42
|
+
`accounts.update()` move an account's location (strict unless
|
|
43
|
+
`allow_country_fallback: true`). Every account read and connect result
|
|
44
|
+
carries `connection_location: { country, current_country, mode, strict }`,
|
|
45
|
+
plus `previous_country` when a connect moved an account you already had.
|
|
46
|
+
The `proxy.protocol` enum gains `socks4`.
|
|
47
|
+
- **`CONNECTION_LOCATION_REQUIRED` and `CONNECTION_LOCATION_UNAVAILABLE`** are
|
|
48
|
+
in `ERROR_CODES`; before this release both decoded to `INTERNAL`.
|
|
49
|
+
`CurviateError.connectionLocation` carries where the account connects from
|
|
50
|
+
now when a `CONNECTION_LOCATION_UNAVAILABLE` followed an applied change.
|
|
51
|
+
- Search and feed post items carry `created_at`, and the author carries
|
|
52
|
+
`display_name` and `type` on the shape without `name`.
|
|
53
|
+
- `AuthIntentBody`, `ConnectionCountry`, `ConnectionLocationSource`,
|
|
54
|
+
`ConnectionLocation`, `AccountDetail`, `AccountUpdateBody` and
|
|
55
|
+
`AccountUpdateResult` are exported.
|
|
56
|
+
|
|
57
|
+
### Documentation
|
|
58
|
+
|
|
59
|
+
- `posts.get` JSDoc: a post search result's `id` and `share-` post URLs are
|
|
60
|
+
accepted post ids, and `listComments` and the reaction operations take the
|
|
61
|
+
same forms (the old note said they took the opaque `id` only).
|
|
62
|
+
|
|
63
|
+
## [0.40.1] - 2026-10-01
|
|
64
|
+
|
|
65
|
+
### Fixed
|
|
66
|
+
|
|
67
|
+
- **`TOOLSET_DISABLED` and `AMBIGUOUS_IDENTIFIER` are no longer part of the
|
|
68
|
+
REST error union.** Both belong to the agent (MCP) surface only; a REST call
|
|
69
|
+
never returns them. They were added to `ERROR_CODES` in 0.40.0 by mistake, so
|
|
70
|
+
a `switch (error.code)` carried two arms that cannot arrive. Remove any such
|
|
71
|
+
arm. No REST response changes; a wire code outside the union still decodes
|
|
72
|
+
to `INTERNAL`, as before 0.40.0.
|
|
73
|
+
|
|
12
74
|
## [0.40.0] - 2026-10-01
|
|
13
75
|
|
|
14
76
|
Fixture and types regenerated against the deployed production document
|
package/README.md
CHANGED
|
@@ -37,7 +37,13 @@ const curviate = new Curviate({
|
|
|
37
37
|
|
|
38
38
|
## Account-scoped accessor
|
|
39
39
|
|
|
40
|
-
Every LinkedIn operation (messages, member profiles, invites, posts) is tied to a **managed account**, a LinkedIn session you have connected via the connect flow (`curviate.auth.intent()`).
|
|
40
|
+
Every LinkedIn operation (messages, member profiles, invites, posts) is tied to a **managed account**, a LinkedIn session you have connected via the connect flow (`curviate.auth.intent()`). A new connect names where LinkedIn sees the account connecting from, with exactly one of `country` (e.g. `"US"`), `ip` or your own `proxy`:
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
await curviate.auth.intent({ seat_id, auth_method: "credentials", credentials: { email, password }, country: "US" });
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The `curviate.account(id)` accessor fixes the `account_id` on every call so you do not have to thread it manually:
|
|
41
47
|
|
|
42
48
|
```ts
|
|
43
49
|
// Root-level: tenant-wide operations (accounts, auth, webhooks)
|