@curviate/sdk 0.10.0 → 0.11.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 +19 -0
- package/dist/index.d.ts +316 -6
- package/dist/index.js +35 -0
- package/package.json +1 -1
- package/src/generated/types.ts +286 -6
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,25 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.11.0] — 2026-07-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`accounts.getConnectSession(session_id)`.** Poll a hosted connect session minted by `accounts.createConnectLink()`. A pure status read — it makes no external call and does not itself complete the connection (the connection is signalled complete out-of-band once the end user finishes the hosted flow). Returns `{ object: "connect_session", session_id, status, account_id, expires_at }`, where `status` is `"pending" | "resolved" | "expired" | "failed"` and `account_id` is populated only once `status` is `"resolved"`. Poll until it leaves `pending`. Type: `AccountConnectSessionResult`. Extends the Accounts surface to 12 methods.
|
|
15
|
+
- **`accounts.resendCheckpoint({ account_id })`.** Re-sends the pending verification challenge notification for an account (e.g. when the end user says they never received the OTP/2FA code or the mobile-app push). Returns `{ object: "checkpoint", account_id, resent }` — `resent` echoes the outcome honestly (`false` when there was nothing to re-send for that challenge type; this never throws just because a resend wasn't applicable). Does not reset the checkpoint's expiry.
|
|
16
|
+
- **`session_id` on the `accounts.createConnectLink()` 201 response** — the durable poll handle to pass to `accounts.getConnectSession()`. Type: `AccountConnectLinkResult`.
|
|
17
|
+
- **`seat_id` on the account-connection responses.** `accounts.link()` (201), `accounts.submitCheckpoint()` (201), and `accounts.pollCheckpoint()` now carry `seat_id` (`string | null`) — the seat the account occupies. `accounts.createConnectLink()` (201) also carries it. This is the canonical replacement for the deprecated `attached_seat_id` (same value).
|
|
18
|
+
- **`auth_method: "hosted"`** is now a possible value on `accounts.list()` items (accounts connected through a hosted link). Response-only — the `link()` / `reconnect()` request `auth_method` remains `"credentials" | "cookie"`.
|
|
19
|
+
- **`"disconnected"` account status.** Now a possible `status` on `accounts.list()` items, `accounts.get()`, and both sides of the account `state-diff` event — whose `previous_status` / `current_status` are now typed enums (`"active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected"`) rather than free-form strings.
|
|
20
|
+
|
|
21
|
+
### Deprecated
|
|
22
|
+
|
|
23
|
+
- **`attached_seat_id`** (on `accounts.link()`, `accounts.submitCheckpoint()`, and `accounts.pollCheckpoint()` responses) — use `seat_id` instead (identical value). Retained for backward compatibility; slated for removal at the GA `/v1` cutover.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
|
|
27
|
+
- Regenerated types from the current API surface (full refresh). Beyond the additions above, `accounts.update()` (`PATCH /v1/accounts/{account_id}`) gains a `501` response variant, returned when a managed-proxy configuration isn't supported for the account's current plan (not retryable as-is — change the request rather than resubmitting). No resource method signatures changed.
|
|
28
|
+
|
|
10
29
|
## [0.10.0] — 2026-07-03
|
|
11
30
|
|
|
12
31
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -157,9 +157,9 @@ interface paths {
|
|
|
157
157
|
* @description Stable status whitelist.
|
|
158
158
|
* @enum {string}
|
|
159
159
|
*/
|
|
160
|
-
status?: "active" | "reconnect_needed" | "restricted" | "connecting";
|
|
160
|
+
status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
161
161
|
/** @enum {string} */
|
|
162
|
-
auth_method?: "credentials" | "cookie";
|
|
162
|
+
auth_method?: "credentials" | "cookie" | "hosted";
|
|
163
163
|
full_name?: string | null;
|
|
164
164
|
headline?: string | null;
|
|
165
165
|
/** @description The seat this account occupies. */
|
|
@@ -356,6 +356,12 @@ interface paths {
|
|
|
356
356
|
auth_method?: "credentials" | "cookie";
|
|
357
357
|
full_name?: string | null;
|
|
358
358
|
headline?: string | null;
|
|
359
|
+
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). */
|
|
360
|
+
seat_id?: string | null;
|
|
361
|
+
/**
|
|
362
|
+
* @deprecated
|
|
363
|
+
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover.
|
|
364
|
+
*/
|
|
359
365
|
attached_seat_id?: string | null;
|
|
360
366
|
};
|
|
361
367
|
};
|
|
@@ -519,7 +525,7 @@ interface paths {
|
|
|
519
525
|
object?: "account";
|
|
520
526
|
account_id?: string;
|
|
521
527
|
/** @enum {string} */
|
|
522
|
-
status?: "active" | "reconnect_needed" | "restricted" | "connecting";
|
|
528
|
+
status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
523
529
|
auth_method?: string;
|
|
524
530
|
full_name?: string | null;
|
|
525
531
|
headline?: string | null;
|
|
@@ -828,6 +834,15 @@ interface paths {
|
|
|
828
834
|
"application/json": components["schemas"]["Error"];
|
|
829
835
|
};
|
|
830
836
|
};
|
|
837
|
+
/** @description This managed-proxy configuration is not supported for this account (e.g. the requested proxy mode or location is unavailable on the account's current plan). Not retryable as-is — change the request rather than resubmitting. */
|
|
838
|
+
501: {
|
|
839
|
+
headers: {
|
|
840
|
+
[name: string]: unknown;
|
|
841
|
+
};
|
|
842
|
+
content: {
|
|
843
|
+
"application/json": components["schemas"]["Error"];
|
|
844
|
+
};
|
|
845
|
+
};
|
|
831
846
|
/** @description A temporary error occurred. Please try again. */
|
|
832
847
|
502: {
|
|
833
848
|
headers: {
|
|
@@ -919,6 +934,8 @@ interface paths {
|
|
|
919
934
|
object?: "hosted_auth_url";
|
|
920
935
|
/** @description The hosted URL the end user opens. */
|
|
921
936
|
url?: string;
|
|
937
|
+
/** @description Poll handle for GET /v1/accounts/connect-sessions/{session_id}. */
|
|
938
|
+
session_id?: string;
|
|
922
939
|
expires_at?: string;
|
|
923
940
|
seat_id?: string | null;
|
|
924
941
|
account_id?: string | null;
|
|
@@ -1008,6 +1025,124 @@ interface paths {
|
|
|
1008
1025
|
patch?: never;
|
|
1009
1026
|
trace?: never;
|
|
1010
1027
|
};
|
|
1028
|
+
"/v1/accounts/connect-sessions/{session_id}": {
|
|
1029
|
+
parameters: {
|
|
1030
|
+
query?: never;
|
|
1031
|
+
header?: never;
|
|
1032
|
+
path?: never;
|
|
1033
|
+
cookie?: never;
|
|
1034
|
+
};
|
|
1035
|
+
/**
|
|
1036
|
+
* Poll a hosted connect session
|
|
1037
|
+
* @description Return the current status of a hosted connect session created by connect-link. A pure status read — it makes no external call and does not itself complete the connection (completion is signalled out-of-band once the end user finishes the hosted flow). status is `pending` until the hand-off completes, then `resolved` (with `account_id`), or `expired` / `failed`. Poll until it leaves `pending`.
|
|
1038
|
+
*/
|
|
1039
|
+
get: {
|
|
1040
|
+
parameters: {
|
|
1041
|
+
query?: never;
|
|
1042
|
+
header?: never;
|
|
1043
|
+
path: {
|
|
1044
|
+
/** @description The connect session id (`cs_…`) returned by connect-link. */
|
|
1045
|
+
session_id: string;
|
|
1046
|
+
};
|
|
1047
|
+
cookie?: never;
|
|
1048
|
+
};
|
|
1049
|
+
requestBody?: never;
|
|
1050
|
+
responses: {
|
|
1051
|
+
/** @description The current status of a hosted connect session created by connect-link. Poll until status leaves pending; account_id is present only once status is resolved. */
|
|
1052
|
+
200: {
|
|
1053
|
+
headers: {
|
|
1054
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1055
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1056
|
+
[name: string]: unknown;
|
|
1057
|
+
};
|
|
1058
|
+
content: {
|
|
1059
|
+
"application/json": {
|
|
1060
|
+
/**
|
|
1061
|
+
* @description Response type discriminator.
|
|
1062
|
+
* @enum {string}
|
|
1063
|
+
*/
|
|
1064
|
+
object?: "connect_session";
|
|
1065
|
+
/** @description The connect session id (cs_…). */
|
|
1066
|
+
session_id?: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* @description Lifecycle status. pending until the hand-off completes, then resolved / expired / failed.
|
|
1069
|
+
* @enum {string}
|
|
1070
|
+
*/
|
|
1071
|
+
status?: "pending" | "resolved" | "expired" | "failed";
|
|
1072
|
+
/** @description The connected account (acc_…); null until status is resolved. */
|
|
1073
|
+
account_id?: string | null;
|
|
1074
|
+
/** @description ISO-8601 UTC session expiry. */
|
|
1075
|
+
expires_at?: string;
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
/** @description Missing or invalid API key. */
|
|
1080
|
+
401: {
|
|
1081
|
+
headers: {
|
|
1082
|
+
[name: string]: unknown;
|
|
1083
|
+
};
|
|
1084
|
+
content: {
|
|
1085
|
+
"application/json": components["schemas"]["Error"];
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
/** @description No such connect session for this tenant. */
|
|
1089
|
+
404: {
|
|
1090
|
+
headers: {
|
|
1091
|
+
[name: string]: unknown;
|
|
1092
|
+
};
|
|
1093
|
+
content: {
|
|
1094
|
+
"application/json": components["schemas"]["Error"];
|
|
1095
|
+
};
|
|
1096
|
+
};
|
|
1097
|
+
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
1098
|
+
429: {
|
|
1099
|
+
headers: {
|
|
1100
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1101
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1102
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
1103
|
+
[name: string]: unknown;
|
|
1104
|
+
};
|
|
1105
|
+
content: {
|
|
1106
|
+
"application/json": components["schemas"]["Error"];
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
/** @description Internal error. */
|
|
1110
|
+
500: {
|
|
1111
|
+
headers: {
|
|
1112
|
+
[name: string]: unknown;
|
|
1113
|
+
};
|
|
1114
|
+
content: {
|
|
1115
|
+
"application/json": components["schemas"]["Error"];
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
1118
|
+
/** @description Service unavailable. */
|
|
1119
|
+
503: {
|
|
1120
|
+
headers: {
|
|
1121
|
+
[name: string]: unknown;
|
|
1122
|
+
};
|
|
1123
|
+
content: {
|
|
1124
|
+
"application/json": components["schemas"]["Error"];
|
|
1125
|
+
};
|
|
1126
|
+
};
|
|
1127
|
+
/** @description Gateway timeout. */
|
|
1128
|
+
504: {
|
|
1129
|
+
headers: {
|
|
1130
|
+
[name: string]: unknown;
|
|
1131
|
+
};
|
|
1132
|
+
content: {
|
|
1133
|
+
"application/json": components["schemas"]["Error"];
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
1136
|
+
};
|
|
1137
|
+
};
|
|
1138
|
+
put?: never;
|
|
1139
|
+
post?: never;
|
|
1140
|
+
delete?: never;
|
|
1141
|
+
options?: never;
|
|
1142
|
+
head?: never;
|
|
1143
|
+
patch?: never;
|
|
1144
|
+
trace?: never;
|
|
1145
|
+
};
|
|
1011
1146
|
"/v1/accounts/{account_id}/reconnect": {
|
|
1012
1147
|
parameters: {
|
|
1013
1148
|
query?: never;
|
|
@@ -1393,6 +1528,13 @@ interface paths {
|
|
|
1393
1528
|
account_id?: string;
|
|
1394
1529
|
/** @enum {string} */
|
|
1395
1530
|
status?: "active";
|
|
1531
|
+
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). */
|
|
1532
|
+
seat_id?: string | null;
|
|
1533
|
+
/**
|
|
1534
|
+
* @deprecated
|
|
1535
|
+
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover.
|
|
1536
|
+
*/
|
|
1537
|
+
attached_seat_id?: string | null;
|
|
1396
1538
|
};
|
|
1397
1539
|
};
|
|
1398
1540
|
};
|
|
@@ -1507,6 +1649,137 @@ interface paths {
|
|
|
1507
1649
|
patch?: never;
|
|
1508
1650
|
trace?: never;
|
|
1509
1651
|
};
|
|
1652
|
+
"/v1/accounts/checkpoints/resend": {
|
|
1653
|
+
parameters: {
|
|
1654
|
+
query?: never;
|
|
1655
|
+
header?: never;
|
|
1656
|
+
path?: never;
|
|
1657
|
+
cookie?: never;
|
|
1658
|
+
};
|
|
1659
|
+
get?: never;
|
|
1660
|
+
put?: never;
|
|
1661
|
+
/**
|
|
1662
|
+
* Resend a checkpoint verification notification
|
|
1663
|
+
* @description Re-push / re-issue the pending verification challenge notification for an account. Addressed by account_id in the body (the account_id returned with the 202 checkpoint_required response). Meaningful for otp / two_factor_sms / mobile_app_approval challenges; a two_factor_app challenge has nothing to resend (the code is generated on the device) and returns resent:false rather than an error — the response never claims a resend that did not happen. Does not reset the checkpoint's expiry.
|
|
1664
|
+
*/
|
|
1665
|
+
post: {
|
|
1666
|
+
parameters: {
|
|
1667
|
+
query?: never;
|
|
1668
|
+
header?: never;
|
|
1669
|
+
path?: never;
|
|
1670
|
+
cookie?: never;
|
|
1671
|
+
};
|
|
1672
|
+
requestBody: {
|
|
1673
|
+
content: {
|
|
1674
|
+
"application/json": {
|
|
1675
|
+
/** @description The account whose pending checkpoint notification should be re-sent (returned with the 202 checkpoint_required response, or from link/poll). */
|
|
1676
|
+
account_id: string;
|
|
1677
|
+
};
|
|
1678
|
+
};
|
|
1679
|
+
};
|
|
1680
|
+
responses: {
|
|
1681
|
+
/** @description The resend request was processed. resent:true means the substrate confirmed the notification was re-sent; resent:false means the substrate acknowledged the request but had nothing to re-send (e.g. a two_factor_app challenge, where the code is generated on the device) — the response never claims a resend that did not happen. */
|
|
1682
|
+
200: {
|
|
1683
|
+
headers: {
|
|
1684
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1685
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1686
|
+
[name: string]: unknown;
|
|
1687
|
+
};
|
|
1688
|
+
content: {
|
|
1689
|
+
"application/json": {
|
|
1690
|
+
/**
|
|
1691
|
+
* @description Response type discriminator.
|
|
1692
|
+
* @enum {string}
|
|
1693
|
+
*/
|
|
1694
|
+
object?: "checkpoint";
|
|
1695
|
+
account_id?: string;
|
|
1696
|
+
resent?: boolean;
|
|
1697
|
+
};
|
|
1698
|
+
};
|
|
1699
|
+
};
|
|
1700
|
+
/** @description No pending checkpoint for this account. */
|
|
1701
|
+
404: {
|
|
1702
|
+
headers: {
|
|
1703
|
+
[name: string]: unknown;
|
|
1704
|
+
};
|
|
1705
|
+
content: {
|
|
1706
|
+
"application/json": components["schemas"]["Error"];
|
|
1707
|
+
};
|
|
1708
|
+
};
|
|
1709
|
+
/** @description The checkpoint has expired. */
|
|
1710
|
+
409: {
|
|
1711
|
+
headers: {
|
|
1712
|
+
[name: string]: unknown;
|
|
1713
|
+
};
|
|
1714
|
+
content: {
|
|
1715
|
+
"application/json": components["schemas"]["Error"];
|
|
1716
|
+
};
|
|
1717
|
+
};
|
|
1718
|
+
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
1719
|
+
429: {
|
|
1720
|
+
headers: {
|
|
1721
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1722
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1723
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
1724
|
+
[name: string]: unknown;
|
|
1725
|
+
};
|
|
1726
|
+
content: {
|
|
1727
|
+
"application/json": components["schemas"]["Error"];
|
|
1728
|
+
};
|
|
1729
|
+
};
|
|
1730
|
+
/** @description Internal error. */
|
|
1731
|
+
500: {
|
|
1732
|
+
headers: {
|
|
1733
|
+
[name: string]: unknown;
|
|
1734
|
+
};
|
|
1735
|
+
content: {
|
|
1736
|
+
"application/json": components["schemas"]["Error"];
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
/** @description This challenge type does not support resend — there is nothing for the substrate to re-send. Not retryable as-is; resolve the checkpoint via submit, or by completing it directly (e.g. approving on the device), instead of resending. */
|
|
1740
|
+
501: {
|
|
1741
|
+
headers: {
|
|
1742
|
+
[name: string]: unknown;
|
|
1743
|
+
};
|
|
1744
|
+
content: {
|
|
1745
|
+
"application/json": components["schemas"]["Error"];
|
|
1746
|
+
};
|
|
1747
|
+
};
|
|
1748
|
+
/** @description A temporary error occurred. Please try again. */
|
|
1749
|
+
502: {
|
|
1750
|
+
headers: {
|
|
1751
|
+
[name: string]: unknown;
|
|
1752
|
+
};
|
|
1753
|
+
content: {
|
|
1754
|
+
"application/json": components["schemas"]["Error"];
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1757
|
+
/** @description Service unavailable. */
|
|
1758
|
+
503: {
|
|
1759
|
+
headers: {
|
|
1760
|
+
[name: string]: unknown;
|
|
1761
|
+
};
|
|
1762
|
+
content: {
|
|
1763
|
+
"application/json": components["schemas"]["Error"];
|
|
1764
|
+
};
|
|
1765
|
+
};
|
|
1766
|
+
/** @description Gateway timeout. */
|
|
1767
|
+
504: {
|
|
1768
|
+
headers: {
|
|
1769
|
+
[name: string]: unknown;
|
|
1770
|
+
};
|
|
1771
|
+
content: {
|
|
1772
|
+
"application/json": components["schemas"]["Error"];
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
};
|
|
1777
|
+
delete?: never;
|
|
1778
|
+
options?: never;
|
|
1779
|
+
head?: never;
|
|
1780
|
+
patch?: never;
|
|
1781
|
+
trace?: never;
|
|
1782
|
+
};
|
|
1510
1783
|
"/v1/accounts/checkpoints/poll": {
|
|
1511
1784
|
parameters: {
|
|
1512
1785
|
query?: never;
|
|
@@ -1558,7 +1831,12 @@ interface paths {
|
|
|
1558
1831
|
full_name?: string | null;
|
|
1559
1832
|
/** @description Present on status:"active". */
|
|
1560
1833
|
headline?: string | null;
|
|
1561
|
-
/** @description The seat this account occupies. Present on status:"active". */
|
|
1834
|
+
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). Present on status:"active". */
|
|
1835
|
+
seat_id?: string | null;
|
|
1836
|
+
/**
|
|
1837
|
+
* @deprecated
|
|
1838
|
+
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover. Present on status:"active".
|
|
1839
|
+
*/
|
|
1562
1840
|
attached_seat_id?: string | null;
|
|
1563
1841
|
/** @description ISO-8601 expiry. Present on status:"pending". */
|
|
1564
1842
|
expires_at?: string;
|
|
@@ -15243,8 +15521,10 @@ interface paths {
|
|
|
15243
15521
|
/** @description Opaque next-call cursor. */
|
|
15244
15522
|
version?: string;
|
|
15245
15523
|
changes?: {
|
|
15246
|
-
|
|
15247
|
-
|
|
15524
|
+
/** @enum {string|null} */
|
|
15525
|
+
previous_status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected" | null;
|
|
15526
|
+
/** @enum {string} */
|
|
15527
|
+
current_status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
15248
15528
|
detected_at?: string;
|
|
15249
15529
|
}[];
|
|
15250
15530
|
};
|
|
@@ -15397,10 +15677,16 @@ type AccountSubmitCheckpointResult = paths["/v1/accounts/checkpoints/submit"]["p
|
|
|
15397
15677
|
type AccountPollCheckpointBody = paths["/v1/accounts/checkpoints/poll"]["post"]["requestBody"]["content"]["application/json"];
|
|
15398
15678
|
/** `POST /v1/accounts/checkpoints/poll` 200 body. */
|
|
15399
15679
|
type AccountPollCheckpointResult = paths["/v1/accounts/checkpoints/poll"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
15680
|
+
/** `POST /v1/accounts/checkpoints/resend` request body. */
|
|
15681
|
+
type AccountResendCheckpointBody = paths["/v1/accounts/checkpoints/resend"]["post"]["requestBody"]["content"]["application/json"];
|
|
15682
|
+
/** `POST /v1/accounts/checkpoints/resend` 200 body. */
|
|
15683
|
+
type AccountResendCheckpointResult = paths["/v1/accounts/checkpoints/resend"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
15400
15684
|
/** `POST /v1/accounts/connect-link` request body. */
|
|
15401
15685
|
type AccountConnectLinkBody = paths["/v1/accounts/connect-link"]["post"]["requestBody"]["content"]["application/json"];
|
|
15402
15686
|
/** `POST /v1/accounts/connect-link` 201 body. */
|
|
15403
15687
|
type AccountConnectLinkResult = paths["/v1/accounts/connect-link"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
15688
|
+
/** `GET /v1/accounts/connect-sessions/{session_id}` 200 body. */
|
|
15689
|
+
type AccountConnectSessionResult = paths["/v1/accounts/connect-sessions/{session_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
15404
15690
|
/** `GET /v1/accounts/{account_id}` 200 body. */
|
|
15405
15691
|
type AccountDetail = paths["/v1/accounts/{account_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
15406
15692
|
/** `POST /v1/accounts/{account_id}/reconnect` request body. */
|
|
@@ -15449,11 +15735,35 @@ declare class AccountsResource {
|
|
|
15449
15735
|
* Poll for mobile-app approval of a pending checkpoint challenge.
|
|
15450
15736
|
*/
|
|
15451
15737
|
pollCheckpoint(body: AccountPollCheckpointBody): Promise<AccountPollCheckpointResult>;
|
|
15738
|
+
/**
|
|
15739
|
+
* Re-send the pending verification challenge notification for an account.
|
|
15740
|
+
*
|
|
15741
|
+
* Useful when the end user says they never received the code or push
|
|
15742
|
+
* notification for a pending checkpoint. `resent` echoes the result
|
|
15743
|
+
* honestly: `true` once the notification was actually re-sent, `false`
|
|
15744
|
+
* when there was nothing to re-send for that challenge type (this call
|
|
15745
|
+
* never throws just because a resend wasn't applicable). Does not reset
|
|
15746
|
+
* the checkpoint's expiry.
|
|
15747
|
+
*/
|
|
15748
|
+
resendCheckpoint(body: AccountResendCheckpointBody): Promise<AccountResendCheckpointResult>;
|
|
15452
15749
|
/**
|
|
15453
15750
|
* Generate a one-time hosted connection link the end user opens to authorize a
|
|
15454
15751
|
* LinkedIn connection without credentials transiting the API or LLM context.
|
|
15455
15752
|
*/
|
|
15456
15753
|
createConnectLink(body: AccountConnectLinkBody): Promise<AccountConnectLinkResult>;
|
|
15754
|
+
/**
|
|
15755
|
+
* Poll a hosted connect session minted by {@link createConnectLink} (its
|
|
15756
|
+
* `session_id`).
|
|
15757
|
+
*
|
|
15758
|
+
* A pure status read — it makes no external call and does not itself complete
|
|
15759
|
+
* the connection. `status` is `pending` until the end user finishes the
|
|
15760
|
+
* hosted flow, then `resolved` (with `account_id`), or `expired` / `failed`.
|
|
15761
|
+
* Poll until it leaves `pending`.
|
|
15762
|
+
*
|
|
15763
|
+
* @param sessionId - the `session_id` returned on the connect-link 201 body.
|
|
15764
|
+
* @returns the session's current `status` and, once `resolved`, `account_id`.
|
|
15765
|
+
*/
|
|
15766
|
+
getConnectSession(sessionId: string): Promise<AccountConnectSessionResult>;
|
|
15457
15767
|
/**
|
|
15458
15768
|
* Return metadata and current state for one connected account, including the
|
|
15459
15769
|
* central `quotas[]` view for all tracked quota families and `seat_id` (the
|
package/dist/index.js
CHANGED
|
@@ -360,6 +360,23 @@ var AccountsResource = class {
|
|
|
360
360
|
body
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
|
+
/**
|
|
364
|
+
* Re-send the pending verification challenge notification for an account.
|
|
365
|
+
*
|
|
366
|
+
* Useful when the end user says they never received the code or push
|
|
367
|
+
* notification for a pending checkpoint. `resent` echoes the result
|
|
368
|
+
* honestly: `true` once the notification was actually re-sent, `false`
|
|
369
|
+
* when there was nothing to re-send for that challenge type (this call
|
|
370
|
+
* never throws just because a resend wasn't applicable). Does not reset
|
|
371
|
+
* the checkpoint's expiry.
|
|
372
|
+
*/
|
|
373
|
+
resendCheckpoint(body) {
|
|
374
|
+
return this.ctx.request({
|
|
375
|
+
method: "POST",
|
|
376
|
+
path: "/v1/accounts/checkpoints/resend",
|
|
377
|
+
body
|
|
378
|
+
});
|
|
379
|
+
}
|
|
363
380
|
/**
|
|
364
381
|
* Generate a one-time hosted connection link the end user opens to authorize a
|
|
365
382
|
* LinkedIn connection without credentials transiting the API or LLM context.
|
|
@@ -371,6 +388,24 @@ var AccountsResource = class {
|
|
|
371
388
|
body
|
|
372
389
|
});
|
|
373
390
|
}
|
|
391
|
+
/**
|
|
392
|
+
* Poll a hosted connect session minted by {@link createConnectLink} (its
|
|
393
|
+
* `session_id`).
|
|
394
|
+
*
|
|
395
|
+
* A pure status read — it makes no external call and does not itself complete
|
|
396
|
+
* the connection. `status` is `pending` until the end user finishes the
|
|
397
|
+
* hosted flow, then `resolved` (with `account_id`), or `expired` / `failed`.
|
|
398
|
+
* Poll until it leaves `pending`.
|
|
399
|
+
*
|
|
400
|
+
* @param sessionId - the `session_id` returned on the connect-link 201 body.
|
|
401
|
+
* @returns the session's current `status` and, once `resolved`, `account_id`.
|
|
402
|
+
*/
|
|
403
|
+
getConnectSession(sessionId) {
|
|
404
|
+
return this.ctx.request({
|
|
405
|
+
method: "GET",
|
|
406
|
+
path: `/v1/accounts/connect-sessions/${sessionId}`
|
|
407
|
+
});
|
|
408
|
+
}
|
|
374
409
|
/**
|
|
375
410
|
* Return metadata and current state for one connected account, including the
|
|
376
411
|
* central `quotas[]` view for all tracked quota families and `seat_id` (the
|
package/package.json
CHANGED
package/src/generated/types.ts
CHANGED
|
@@ -48,9 +48,9 @@ export interface paths {
|
|
|
48
48
|
* @description Stable status whitelist.
|
|
49
49
|
* @enum {string}
|
|
50
50
|
*/
|
|
51
|
-
status?: "active" | "reconnect_needed" | "restricted" | "connecting";
|
|
51
|
+
status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
52
52
|
/** @enum {string} */
|
|
53
|
-
auth_method?: "credentials" | "cookie";
|
|
53
|
+
auth_method?: "credentials" | "cookie" | "hosted";
|
|
54
54
|
full_name?: string | null;
|
|
55
55
|
headline?: string | null;
|
|
56
56
|
/** @description The seat this account occupies. */
|
|
@@ -247,6 +247,12 @@ export interface paths {
|
|
|
247
247
|
auth_method?: "credentials" | "cookie";
|
|
248
248
|
full_name?: string | null;
|
|
249
249
|
headline?: string | null;
|
|
250
|
+
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). */
|
|
251
|
+
seat_id?: string | null;
|
|
252
|
+
/**
|
|
253
|
+
* @deprecated
|
|
254
|
+
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover.
|
|
255
|
+
*/
|
|
250
256
|
attached_seat_id?: string | null;
|
|
251
257
|
};
|
|
252
258
|
};
|
|
@@ -410,7 +416,7 @@ export interface paths {
|
|
|
410
416
|
object?: "account";
|
|
411
417
|
account_id?: string;
|
|
412
418
|
/** @enum {string} */
|
|
413
|
-
status?: "active" | "reconnect_needed" | "restricted" | "connecting";
|
|
419
|
+
status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
414
420
|
auth_method?: string;
|
|
415
421
|
full_name?: string | null;
|
|
416
422
|
headline?: string | null;
|
|
@@ -719,6 +725,15 @@ export interface paths {
|
|
|
719
725
|
"application/json": components["schemas"]["Error"];
|
|
720
726
|
};
|
|
721
727
|
};
|
|
728
|
+
/** @description This managed-proxy configuration is not supported for this account (e.g. the requested proxy mode or location is unavailable on the account's current plan). Not retryable as-is — change the request rather than resubmitting. */
|
|
729
|
+
501: {
|
|
730
|
+
headers: {
|
|
731
|
+
[name: string]: unknown;
|
|
732
|
+
};
|
|
733
|
+
content: {
|
|
734
|
+
"application/json": components["schemas"]["Error"];
|
|
735
|
+
};
|
|
736
|
+
};
|
|
722
737
|
/** @description A temporary error occurred. Please try again. */
|
|
723
738
|
502: {
|
|
724
739
|
headers: {
|
|
@@ -810,6 +825,8 @@ export interface paths {
|
|
|
810
825
|
object?: "hosted_auth_url";
|
|
811
826
|
/** @description The hosted URL the end user opens. */
|
|
812
827
|
url?: string;
|
|
828
|
+
/** @description Poll handle for GET /v1/accounts/connect-sessions/{session_id}. */
|
|
829
|
+
session_id?: string;
|
|
813
830
|
expires_at?: string;
|
|
814
831
|
seat_id?: string | null;
|
|
815
832
|
account_id?: string | null;
|
|
@@ -899,6 +916,124 @@ export interface paths {
|
|
|
899
916
|
patch?: never;
|
|
900
917
|
trace?: never;
|
|
901
918
|
};
|
|
919
|
+
"/v1/accounts/connect-sessions/{session_id}": {
|
|
920
|
+
parameters: {
|
|
921
|
+
query?: never;
|
|
922
|
+
header?: never;
|
|
923
|
+
path?: never;
|
|
924
|
+
cookie?: never;
|
|
925
|
+
};
|
|
926
|
+
/**
|
|
927
|
+
* Poll a hosted connect session
|
|
928
|
+
* @description Return the current status of a hosted connect session created by connect-link. A pure status read — it makes no external call and does not itself complete the connection (completion is signalled out-of-band once the end user finishes the hosted flow). status is `pending` until the hand-off completes, then `resolved` (with `account_id`), or `expired` / `failed`. Poll until it leaves `pending`.
|
|
929
|
+
*/
|
|
930
|
+
get: {
|
|
931
|
+
parameters: {
|
|
932
|
+
query?: never;
|
|
933
|
+
header?: never;
|
|
934
|
+
path: {
|
|
935
|
+
/** @description The connect session id (`cs_…`) returned by connect-link. */
|
|
936
|
+
session_id: string;
|
|
937
|
+
};
|
|
938
|
+
cookie?: never;
|
|
939
|
+
};
|
|
940
|
+
requestBody?: never;
|
|
941
|
+
responses: {
|
|
942
|
+
/** @description The current status of a hosted connect session created by connect-link. Poll until status leaves pending; account_id is present only once status is resolved. */
|
|
943
|
+
200: {
|
|
944
|
+
headers: {
|
|
945
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
946
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
947
|
+
[name: string]: unknown;
|
|
948
|
+
};
|
|
949
|
+
content: {
|
|
950
|
+
"application/json": {
|
|
951
|
+
/**
|
|
952
|
+
* @description Response type discriminator.
|
|
953
|
+
* @enum {string}
|
|
954
|
+
*/
|
|
955
|
+
object?: "connect_session";
|
|
956
|
+
/** @description The connect session id (cs_…). */
|
|
957
|
+
session_id?: string;
|
|
958
|
+
/**
|
|
959
|
+
* @description Lifecycle status. pending until the hand-off completes, then resolved / expired / failed.
|
|
960
|
+
* @enum {string}
|
|
961
|
+
*/
|
|
962
|
+
status?: "pending" | "resolved" | "expired" | "failed";
|
|
963
|
+
/** @description The connected account (acc_…); null until status is resolved. */
|
|
964
|
+
account_id?: string | null;
|
|
965
|
+
/** @description ISO-8601 UTC session expiry. */
|
|
966
|
+
expires_at?: string;
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
/** @description Missing or invalid API key. */
|
|
971
|
+
401: {
|
|
972
|
+
headers: {
|
|
973
|
+
[name: string]: unknown;
|
|
974
|
+
};
|
|
975
|
+
content: {
|
|
976
|
+
"application/json": components["schemas"]["Error"];
|
|
977
|
+
};
|
|
978
|
+
};
|
|
979
|
+
/** @description No such connect session for this tenant. */
|
|
980
|
+
404: {
|
|
981
|
+
headers: {
|
|
982
|
+
[name: string]: unknown;
|
|
983
|
+
};
|
|
984
|
+
content: {
|
|
985
|
+
"application/json": components["schemas"]["Error"];
|
|
986
|
+
};
|
|
987
|
+
};
|
|
988
|
+
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
989
|
+
429: {
|
|
990
|
+
headers: {
|
|
991
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
992
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
993
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
994
|
+
[name: string]: unknown;
|
|
995
|
+
};
|
|
996
|
+
content: {
|
|
997
|
+
"application/json": components["schemas"]["Error"];
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
/** @description Internal error. */
|
|
1001
|
+
500: {
|
|
1002
|
+
headers: {
|
|
1003
|
+
[name: string]: unknown;
|
|
1004
|
+
};
|
|
1005
|
+
content: {
|
|
1006
|
+
"application/json": components["schemas"]["Error"];
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
/** @description Service unavailable. */
|
|
1010
|
+
503: {
|
|
1011
|
+
headers: {
|
|
1012
|
+
[name: string]: unknown;
|
|
1013
|
+
};
|
|
1014
|
+
content: {
|
|
1015
|
+
"application/json": components["schemas"]["Error"];
|
|
1016
|
+
};
|
|
1017
|
+
};
|
|
1018
|
+
/** @description Gateway timeout. */
|
|
1019
|
+
504: {
|
|
1020
|
+
headers: {
|
|
1021
|
+
[name: string]: unknown;
|
|
1022
|
+
};
|
|
1023
|
+
content: {
|
|
1024
|
+
"application/json": components["schemas"]["Error"];
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
};
|
|
1029
|
+
put?: never;
|
|
1030
|
+
post?: never;
|
|
1031
|
+
delete?: never;
|
|
1032
|
+
options?: never;
|
|
1033
|
+
head?: never;
|
|
1034
|
+
patch?: never;
|
|
1035
|
+
trace?: never;
|
|
1036
|
+
};
|
|
902
1037
|
"/v1/accounts/{account_id}/reconnect": {
|
|
903
1038
|
parameters: {
|
|
904
1039
|
query?: never;
|
|
@@ -1284,6 +1419,13 @@ export interface paths {
|
|
|
1284
1419
|
account_id?: string;
|
|
1285
1420
|
/** @enum {string} */
|
|
1286
1421
|
status?: "active";
|
|
1422
|
+
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). */
|
|
1423
|
+
seat_id?: string | null;
|
|
1424
|
+
/**
|
|
1425
|
+
* @deprecated
|
|
1426
|
+
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover.
|
|
1427
|
+
*/
|
|
1428
|
+
attached_seat_id?: string | null;
|
|
1287
1429
|
};
|
|
1288
1430
|
};
|
|
1289
1431
|
};
|
|
@@ -1398,6 +1540,137 @@ export interface paths {
|
|
|
1398
1540
|
patch?: never;
|
|
1399
1541
|
trace?: never;
|
|
1400
1542
|
};
|
|
1543
|
+
"/v1/accounts/checkpoints/resend": {
|
|
1544
|
+
parameters: {
|
|
1545
|
+
query?: never;
|
|
1546
|
+
header?: never;
|
|
1547
|
+
path?: never;
|
|
1548
|
+
cookie?: never;
|
|
1549
|
+
};
|
|
1550
|
+
get?: never;
|
|
1551
|
+
put?: never;
|
|
1552
|
+
/**
|
|
1553
|
+
* Resend a checkpoint verification notification
|
|
1554
|
+
* @description Re-push / re-issue the pending verification challenge notification for an account. Addressed by account_id in the body (the account_id returned with the 202 checkpoint_required response). Meaningful for otp / two_factor_sms / mobile_app_approval challenges; a two_factor_app challenge has nothing to resend (the code is generated on the device) and returns resent:false rather than an error — the response never claims a resend that did not happen. Does not reset the checkpoint's expiry.
|
|
1555
|
+
*/
|
|
1556
|
+
post: {
|
|
1557
|
+
parameters: {
|
|
1558
|
+
query?: never;
|
|
1559
|
+
header?: never;
|
|
1560
|
+
path?: never;
|
|
1561
|
+
cookie?: never;
|
|
1562
|
+
};
|
|
1563
|
+
requestBody: {
|
|
1564
|
+
content: {
|
|
1565
|
+
"application/json": {
|
|
1566
|
+
/** @description The account whose pending checkpoint notification should be re-sent (returned with the 202 checkpoint_required response, or from link/poll). */
|
|
1567
|
+
account_id: string;
|
|
1568
|
+
};
|
|
1569
|
+
};
|
|
1570
|
+
};
|
|
1571
|
+
responses: {
|
|
1572
|
+
/** @description The resend request was processed. resent:true means the substrate confirmed the notification was re-sent; resent:false means the substrate acknowledged the request but had nothing to re-send (e.g. a two_factor_app challenge, where the code is generated on the device) — the response never claims a resend that did not happen. */
|
|
1573
|
+
200: {
|
|
1574
|
+
headers: {
|
|
1575
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1576
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1577
|
+
[name: string]: unknown;
|
|
1578
|
+
};
|
|
1579
|
+
content: {
|
|
1580
|
+
"application/json": {
|
|
1581
|
+
/**
|
|
1582
|
+
* @description Response type discriminator.
|
|
1583
|
+
* @enum {string}
|
|
1584
|
+
*/
|
|
1585
|
+
object?: "checkpoint";
|
|
1586
|
+
account_id?: string;
|
|
1587
|
+
resent?: boolean;
|
|
1588
|
+
};
|
|
1589
|
+
};
|
|
1590
|
+
};
|
|
1591
|
+
/** @description No pending checkpoint for this account. */
|
|
1592
|
+
404: {
|
|
1593
|
+
headers: {
|
|
1594
|
+
[name: string]: unknown;
|
|
1595
|
+
};
|
|
1596
|
+
content: {
|
|
1597
|
+
"application/json": components["schemas"]["Error"];
|
|
1598
|
+
};
|
|
1599
|
+
};
|
|
1600
|
+
/** @description The checkpoint has expired. */
|
|
1601
|
+
409: {
|
|
1602
|
+
headers: {
|
|
1603
|
+
[name: string]: unknown;
|
|
1604
|
+
};
|
|
1605
|
+
content: {
|
|
1606
|
+
"application/json": components["schemas"]["Error"];
|
|
1607
|
+
};
|
|
1608
|
+
};
|
|
1609
|
+
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
1610
|
+
429: {
|
|
1611
|
+
headers: {
|
|
1612
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1613
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1614
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
1615
|
+
[name: string]: unknown;
|
|
1616
|
+
};
|
|
1617
|
+
content: {
|
|
1618
|
+
"application/json": components["schemas"]["Error"];
|
|
1619
|
+
};
|
|
1620
|
+
};
|
|
1621
|
+
/** @description Internal error. */
|
|
1622
|
+
500: {
|
|
1623
|
+
headers: {
|
|
1624
|
+
[name: string]: unknown;
|
|
1625
|
+
};
|
|
1626
|
+
content: {
|
|
1627
|
+
"application/json": components["schemas"]["Error"];
|
|
1628
|
+
};
|
|
1629
|
+
};
|
|
1630
|
+
/** @description This challenge type does not support resend — there is nothing for the substrate to re-send. Not retryable as-is; resolve the checkpoint via submit, or by completing it directly (e.g. approving on the device), instead of resending. */
|
|
1631
|
+
501: {
|
|
1632
|
+
headers: {
|
|
1633
|
+
[name: string]: unknown;
|
|
1634
|
+
};
|
|
1635
|
+
content: {
|
|
1636
|
+
"application/json": components["schemas"]["Error"];
|
|
1637
|
+
};
|
|
1638
|
+
};
|
|
1639
|
+
/** @description A temporary error occurred. Please try again. */
|
|
1640
|
+
502: {
|
|
1641
|
+
headers: {
|
|
1642
|
+
[name: string]: unknown;
|
|
1643
|
+
};
|
|
1644
|
+
content: {
|
|
1645
|
+
"application/json": components["schemas"]["Error"];
|
|
1646
|
+
};
|
|
1647
|
+
};
|
|
1648
|
+
/** @description Service unavailable. */
|
|
1649
|
+
503: {
|
|
1650
|
+
headers: {
|
|
1651
|
+
[name: string]: unknown;
|
|
1652
|
+
};
|
|
1653
|
+
content: {
|
|
1654
|
+
"application/json": components["schemas"]["Error"];
|
|
1655
|
+
};
|
|
1656
|
+
};
|
|
1657
|
+
/** @description Gateway timeout. */
|
|
1658
|
+
504: {
|
|
1659
|
+
headers: {
|
|
1660
|
+
[name: string]: unknown;
|
|
1661
|
+
};
|
|
1662
|
+
content: {
|
|
1663
|
+
"application/json": components["schemas"]["Error"];
|
|
1664
|
+
};
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
};
|
|
1668
|
+
delete?: never;
|
|
1669
|
+
options?: never;
|
|
1670
|
+
head?: never;
|
|
1671
|
+
patch?: never;
|
|
1672
|
+
trace?: never;
|
|
1673
|
+
};
|
|
1401
1674
|
"/v1/accounts/checkpoints/poll": {
|
|
1402
1675
|
parameters: {
|
|
1403
1676
|
query?: never;
|
|
@@ -1449,7 +1722,12 @@ export interface paths {
|
|
|
1449
1722
|
full_name?: string | null;
|
|
1450
1723
|
/** @description Present on status:"active". */
|
|
1451
1724
|
headline?: string | null;
|
|
1452
|
-
/** @description The seat this account occupies. Present on status:"active". */
|
|
1725
|
+
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). Present on status:"active". */
|
|
1726
|
+
seat_id?: string | null;
|
|
1727
|
+
/**
|
|
1728
|
+
* @deprecated
|
|
1729
|
+
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover. Present on status:"active".
|
|
1730
|
+
*/
|
|
1453
1731
|
attached_seat_id?: string | null;
|
|
1454
1732
|
/** @description ISO-8601 expiry. Present on status:"pending". */
|
|
1455
1733
|
expires_at?: string;
|
|
@@ -15134,8 +15412,10 @@ export interface paths {
|
|
|
15134
15412
|
/** @description Opaque next-call cursor. */
|
|
15135
15413
|
version?: string;
|
|
15136
15414
|
changes?: {
|
|
15137
|
-
|
|
15138
|
-
|
|
15415
|
+
/** @enum {string|null} */
|
|
15416
|
+
previous_status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected" | null;
|
|
15417
|
+
/** @enum {string} */
|
|
15418
|
+
current_status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
|
|
15139
15419
|
detected_at?: string;
|
|
15140
15420
|
}[];
|
|
15141
15421
|
};
|