@curviate/sdk 0.39.0 → 0.40.1
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 +59 -0
- package/dist/index.d.ts +21 -2
- package/dist/index.js +4 -2
- package/package.json +1 -1
- package/src/generated/types.ts +21 -2
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,65 @@ Versioning: semantic. Minor for additive changes, patch for bug fixes; no stabil
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.40.1] - 2026-10-01
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- **`TOOLSET_DISABLED` and `AMBIGUOUS_IDENTIFIER` are no longer part of the
|
|
17
|
+
REST error union.** Both belong to the agent (MCP) surface only; a REST call
|
|
18
|
+
never returns them. They were added to `ERROR_CODES` in 0.40.0 by mistake, so
|
|
19
|
+
a `switch (error.code)` carried two arms that cannot arrive. Remove any such
|
|
20
|
+
arm. No REST response changes; a wire code outside the union still decodes
|
|
21
|
+
to `INTERNAL`, as before 0.40.0.
|
|
22
|
+
|
|
23
|
+
## [0.40.0] - 2026-10-01
|
|
24
|
+
|
|
25
|
+
Fixture and types regenerated against the deployed production document
|
|
26
|
+
(`https://api.curviate.com`, 130 paths, server
|
|
27
|
+
`66421dcfa43949f2fd60b2872ef7fe3b16a79660`).
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- **A blank search filter or keyword is now refused with a `400`.** The
|
|
32
|
+
served document marks every free-text search filter and keyword
|
|
33
|
+
`minLength: 1`, and the server enforces it. A caller that sends an empty
|
|
34
|
+
string (`""`) for a filter or `keywords` used to get a search that ignored
|
|
35
|
+
it, and now gets `INVALID_REQUEST`. Omit the field instead of sending it
|
|
36
|
+
empty. The SDK does not validate this client-side, so the refusal comes from
|
|
37
|
+
the server. This is the one behaviour change in the release: callers that
|
|
38
|
+
pass `""` through from user input need to drop the key first.
|
|
39
|
+
- **`POST /v1/auth/checkpoint/poll` and `POST /v1/auth/checkpoint/solve` now
|
|
40
|
+
return `409 ACCOUNT_ALREADY_LINKED` when the approved LinkedIn identity is
|
|
41
|
+
already connected.** On solve, the body carries `account_id` when the
|
|
42
|
+
existing account is yours, so you can reuse it. When the identity is held by
|
|
43
|
+
another workspace, poll and solve name no account and the error is not
|
|
44
|
+
retryable. The
|
|
45
|
+
`CHECKPOINT_EXPIRED`, `CHECKPOINT_ALREADY_RESOLVED` and
|
|
46
|
+
`CONNECTION_IN_PROGRESS` 409s are unchanged. The generated 409 descriptions
|
|
47
|
+
and the `ACCOUNT_ALREADY_LINKED` note in `errors.ts` say so.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **`TOOLSET_DISABLED` and `AMBIGUOUS_IDENTIFIER` are now in the error
|
|
52
|
+
taxonomy.** The served `Error` type documents an extra field for each
|
|
53
|
+
(`toolset`, `candidates`), but the SDK did not carry either code, so a
|
|
54
|
+
response with one decoded to `INTERNAL`, which is retryable and reads as a
|
|
55
|
+
server fault. They now decode to themselves and are not retried. A new guard
|
|
56
|
+
reads the codes named in the `Error` extras descriptions from the fixture and
|
|
57
|
+
fails if the taxonomy lacks one.
|
|
58
|
+
|
|
59
|
+
### Added
|
|
60
|
+
|
|
61
|
+
- **The generated `Error` type documents the per-code extra fields**, each
|
|
62
|
+
optional and present only on its code: `portal_url` (`PAYMENT_REQUIRED`,
|
|
63
|
+
`ACCOUNT_DISPUTED`; `null` when no portal session could be opened),
|
|
64
|
+
`attempts_remaining` (`CHECKPOINT_INVALID_CODE`), `challenge_type`
|
|
65
|
+
(`CHECKPOINT_UNSUPPORTED`), `account_id` (`ACCOUNT_ALREADY_LINKED`), `quota`
|
|
66
|
+
(`RATE_LIMIT_ACCOUNT`), `toolset` (`TOOLSET_DISABLED`) and `candidates`
|
|
67
|
+
(`AMBIGUOUS_IDENTIFIER`, each `{ id, name }`). These are types only:
|
|
68
|
+
`CurviateError` does not surface them as properties yet, so read them from
|
|
69
|
+
the response body if you need them.
|
|
70
|
+
|
|
12
71
|
## [0.39.0] - 2026-09-28
|
|
13
72
|
|
|
14
73
|
Fixture and types regenerated against the deployed production document
|
package/dist/index.d.ts
CHANGED
|
@@ -2878,6 +2878,25 @@ interface components {
|
|
|
2878
2878
|
name?: string;
|
|
2879
2879
|
}[];
|
|
2880
2880
|
}[];
|
|
2881
|
+
/** @description Present on PAYMENT_REQUIRED and ACCOUNT_DISPUTED: the self-service page where the tenant resolves the payment problem, so an agent can hand a human one link. Null when no portal session could be opened; fall back to the dashboard. */
|
|
2882
|
+
portal_url?: string | null;
|
|
2883
|
+
/** @description Present on CHECKPOINT_INVALID_CODE: how many more verification codes the checkpoint accepts before it locks. Stop and ask the account owner for a fresh code when it reaches zero, rather than guessing. */
|
|
2884
|
+
attempts_remaining?: number;
|
|
2885
|
+
/** @description Present on CHECKPOINT_UNSUPPORTED: the kind of verification challenge LinkedIn raised that cannot be solved through this API. A human has to complete it in LinkedIn, then the account reconnects. */
|
|
2886
|
+
challenge_type?: string;
|
|
2887
|
+
/** @description Present on ACCOUNT_ALREADY_LINKED: the id of your own existing account for this LinkedIn profile, so you can reuse it instead of linking again. Only ever an account of the calling tenant. */
|
|
2888
|
+
account_id?: string;
|
|
2889
|
+
/** @description Present on RATE_LIMIT_ACCOUNT: the per-account request ceiling that was breached, with its name, the units remaining and total, and the absolute reset_time. Wait until reset_time before retrying. */
|
|
2890
|
+
quota?: Record<string, never>;
|
|
2891
|
+
/** @description Present on TOOLSET_DISABLED: the name of the toolset that is switched off for this tenant, so you can enable it or use another tool. */
|
|
2892
|
+
toolset?: string;
|
|
2893
|
+
/** @description Present on AMBIGUOUS_IDENTIFIER: the entries the identifier matched. Pick one and re-send its id. */
|
|
2894
|
+
candidates?: {
|
|
2895
|
+
/** @description The id to send instead of the ambiguous identifier. */
|
|
2896
|
+
id?: string;
|
|
2897
|
+
/** @description Human-readable label for this entry. */
|
|
2898
|
+
name?: string;
|
|
2899
|
+
}[];
|
|
2881
2900
|
/** @description Present on errors that can be recovered programmatically, a plain sentence describing the next call to make. */
|
|
2882
2901
|
next_action?: string;
|
|
2883
2902
|
/** @description Present when something about this response is true but not visible in it. On a search, an entry names a filter value we could not check before sending it, or reports that some of the people on the page were not disclosed to the connected account, so an unexpected result count is explicable rather than silent. Branch on each entry's code, never on its message. */
|
|
@@ -28960,7 +28979,7 @@ interface operations {
|
|
|
28960
28979
|
"application/json": components["schemas"]["Error"];
|
|
28961
28980
|
};
|
|
28962
28981
|
};
|
|
28963
|
-
/** @description
|
|
28982
|
+
/** @description CHECKPOINT_EXPIRED or CHECKPOINT_ALREADY_RESOLVED: restart the connection. ACCOUNT_ALREADY_LINKED: the LinkedIn identity is already connected; it names your own account_id when you own it, otherwise it is not one you can manage here. CONNECTION_IN_PROGRESS: another connection attempt for this identity is open; wait for it to finish or expire. */
|
|
28964
28983
|
409: {
|
|
28965
28984
|
headers: {
|
|
28966
28985
|
[name: string]: unknown;
|
|
@@ -29310,7 +29329,7 @@ interface operations {
|
|
|
29310
29329
|
"application/json": components["schemas"]["Error"];
|
|
29311
29330
|
};
|
|
29312
29331
|
};
|
|
29313
|
-
/** @description The approved LinkedIn identity is already
|
|
29332
|
+
/** @description ACCOUNT_ALREADY_LINKED. The approved LinkedIn identity is already connected and is not one you can manage here; not retryable. CONNECTION_IN_PROGRESS. Another connection attempt for this identity is open; wait for it to finish or expire. */
|
|
29314
29333
|
409: {
|
|
29315
29334
|
headers: {
|
|
29316
29335
|
[name: string]: unknown;
|
package/dist/index.js
CHANGED
|
@@ -8,8 +8,10 @@ var ERROR_CODES = [
|
|
|
8
8
|
// Account state
|
|
9
9
|
"ACCOUNT_NOT_FOUND",
|
|
10
10
|
"ACCOUNT_RESTRICTED",
|
|
11
|
-
// Duplicate connect:
|
|
12
|
-
//
|
|
11
|
+
// Duplicate connect (409): the LinkedIn identity is already connected. When
|
|
12
|
+
// your own tenant holds it the body carries `account_id`, so reuse that
|
|
13
|
+
// account instead of linking again; when another tenant holds it the body
|
|
14
|
+
// names no account and there is nothing you can manage here. Not retryable.
|
|
13
15
|
"ACCOUNT_ALREADY_LINKED",
|
|
14
16
|
"RESOURCE_NOT_FOUND",
|
|
15
17
|
// A read found nothing in Curviate's store and its mode may not fetch, so it
|
package/package.json
CHANGED
package/src/generated/types.ts
CHANGED
|
@@ -2781,6 +2781,25 @@ export interface components {
|
|
|
2781
2781
|
name?: string;
|
|
2782
2782
|
}[];
|
|
2783
2783
|
}[];
|
|
2784
|
+
/** @description Present on PAYMENT_REQUIRED and ACCOUNT_DISPUTED: the self-service page where the tenant resolves the payment problem, so an agent can hand a human one link. Null when no portal session could be opened; fall back to the dashboard. */
|
|
2785
|
+
portal_url?: string | null;
|
|
2786
|
+
/** @description Present on CHECKPOINT_INVALID_CODE: how many more verification codes the checkpoint accepts before it locks. Stop and ask the account owner for a fresh code when it reaches zero, rather than guessing. */
|
|
2787
|
+
attempts_remaining?: number;
|
|
2788
|
+
/** @description Present on CHECKPOINT_UNSUPPORTED: the kind of verification challenge LinkedIn raised that cannot be solved through this API. A human has to complete it in LinkedIn, then the account reconnects. */
|
|
2789
|
+
challenge_type?: string;
|
|
2790
|
+
/** @description Present on ACCOUNT_ALREADY_LINKED: the id of your own existing account for this LinkedIn profile, so you can reuse it instead of linking again. Only ever an account of the calling tenant. */
|
|
2791
|
+
account_id?: string;
|
|
2792
|
+
/** @description Present on RATE_LIMIT_ACCOUNT: the per-account request ceiling that was breached, with its name, the units remaining and total, and the absolute reset_time. Wait until reset_time before retrying. */
|
|
2793
|
+
quota?: Record<string, never>;
|
|
2794
|
+
/** @description Present on TOOLSET_DISABLED: the name of the toolset that is switched off for this tenant, so you can enable it or use another tool. */
|
|
2795
|
+
toolset?: string;
|
|
2796
|
+
/** @description Present on AMBIGUOUS_IDENTIFIER: the entries the identifier matched. Pick one and re-send its id. */
|
|
2797
|
+
candidates?: {
|
|
2798
|
+
/** @description The id to send instead of the ambiguous identifier. */
|
|
2799
|
+
id?: string;
|
|
2800
|
+
/** @description Human-readable label for this entry. */
|
|
2801
|
+
name?: string;
|
|
2802
|
+
}[];
|
|
2784
2803
|
/** @description Present on errors that can be recovered programmatically, a plain sentence describing the next call to make. */
|
|
2785
2804
|
next_action?: string;
|
|
2786
2805
|
/** @description Present when something about this response is true but not visible in it. On a search, an entry names a filter value we could not check before sending it, or reports that some of the people on the page were not disclosed to the connected account, so an unexpected result count is explicable rather than silent. Branch on each entry's code, never on its message. */
|
|
@@ -28864,7 +28883,7 @@ export interface operations {
|
|
|
28864
28883
|
"application/json": components["schemas"]["Error"];
|
|
28865
28884
|
};
|
|
28866
28885
|
};
|
|
28867
|
-
/** @description
|
|
28886
|
+
/** @description CHECKPOINT_EXPIRED or CHECKPOINT_ALREADY_RESOLVED: restart the connection. ACCOUNT_ALREADY_LINKED: the LinkedIn identity is already connected; it names your own account_id when you own it, otherwise it is not one you can manage here. CONNECTION_IN_PROGRESS: another connection attempt for this identity is open; wait for it to finish or expire. */
|
|
28868
28887
|
409: {
|
|
28869
28888
|
headers: {
|
|
28870
28889
|
[name: string]: unknown;
|
|
@@ -29214,7 +29233,7 @@ export interface operations {
|
|
|
29214
29233
|
"application/json": components["schemas"]["Error"];
|
|
29215
29234
|
};
|
|
29216
29235
|
};
|
|
29217
|
-
/** @description The approved LinkedIn identity is already
|
|
29236
|
+
/** @description ACCOUNT_ALREADY_LINKED. The approved LinkedIn identity is already connected and is not one you can manage here; not retryable. CONNECTION_IN_PROGRESS. Another connection attempt for this identity is open; wait for it to finish or expire. */
|
|
29218
29237
|
409: {
|
|
29219
29238
|
headers: {
|
|
29220
29239
|
[name: string]: unknown;
|