@curviate/sdk 0.12.0 → 0.13.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 +40 -0
- package/dist/index.d.ts +345 -234
- package/dist/index.js +102 -37
- package/package.json +1 -1
- package/src/generated/types.ts +236 -190
package/dist/index.d.ts
CHANGED
|
@@ -166,20 +166,20 @@ interface paths {
|
|
|
166
166
|
seat_id?: string | null;
|
|
167
167
|
/** @description ISO-8601 UTC connection timestamp. */
|
|
168
168
|
connected_at?: string | null;
|
|
169
|
-
/** @description Cached account username.
|
|
169
|
+
/** @description Cached account username. No longer refreshed by background enrichment — null for newly connected accounts (a previously cached value is retained). */
|
|
170
170
|
username?: string | null;
|
|
171
|
-
/** @description Cached premium-membership id.
|
|
171
|
+
/** @description Cached premium-membership id. No longer refreshed by background enrichment — null for newly connected accounts, or for non-premium accounts (a previously cached value is retained). */
|
|
172
172
|
premium_id?: string | null;
|
|
173
|
-
/** @description Cached public profile identifier.
|
|
173
|
+
/** @description Cached public profile identifier. No longer refreshed by background enrichment — null for newly connected accounts (a previously cached value is retained). */
|
|
174
174
|
public_identifier?: string | null;
|
|
175
|
-
/** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until
|
|
175
|
+
/** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until the first background enrichment lands. */
|
|
176
176
|
substrate_created_at?: string | null;
|
|
177
|
-
/** @description Cached signature blocks (title + content) for
|
|
177
|
+
/** @description Cached signature blocks (title + content). No longer refreshed by background enrichment — empty for newly connected accounts (a previously cached value is retained). */
|
|
178
178
|
signatures?: {
|
|
179
179
|
title?: string;
|
|
180
180
|
content?: string;
|
|
181
181
|
}[];
|
|
182
|
-
/** @description Cached group names the account belongs to.
|
|
182
|
+
/** @description Cached group names the account belongs to. No longer refreshed by background enrichment — empty for newly connected accounts (a previously cached value is retained). */
|
|
183
183
|
groups?: string[];
|
|
184
184
|
}[];
|
|
185
185
|
/** @description Next-page cursor; null on the last page. */
|
|
@@ -351,7 +351,7 @@ interface paths {
|
|
|
351
351
|
object?: "account";
|
|
352
352
|
account_id?: string;
|
|
353
353
|
/** @enum {string} */
|
|
354
|
-
status?: "active";
|
|
354
|
+
status?: "active" | "reconnect_needed" | "restricted" | "disconnected";
|
|
355
355
|
/** @enum {string} */
|
|
356
356
|
auth_method?: "credentials" | "cookie";
|
|
357
357
|
full_name?: string | null;
|
|
@@ -363,10 +363,12 @@ interface paths {
|
|
|
363
363
|
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover.
|
|
364
364
|
*/
|
|
365
365
|
attached_seat_id?: string | null;
|
|
366
|
+
/** @description Present and true only when this connect recovered an existing LinkedIn identity already present on the workspace (claiming it into your account) instead of connecting a brand-new one. Absent on a normal connect. The account's status reflects its real observed state, which may need a reconnect. */
|
|
367
|
+
recovered?: boolean;
|
|
366
368
|
};
|
|
367
369
|
};
|
|
368
370
|
};
|
|
369
|
-
/** @description A verification challenge is required.
|
|
371
|
+
/** @description A verification challenge is required. Resolve it via the checkpoint sub-resource (POST /v1/accounts/{account_id}/checkpoint/solve) using the returned account_id. */
|
|
370
372
|
202: {
|
|
371
373
|
headers: {
|
|
372
374
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -382,19 +384,24 @@ interface paths {
|
|
|
382
384
|
object?: "checkpoint";
|
|
383
385
|
/** @enum {string} */
|
|
384
386
|
status?: "checkpoint_required";
|
|
385
|
-
/** @description The (provisional) account_id to pass to
|
|
387
|
+
/** @description The (provisional) account_id to pass to the checkpoint sub-resource (POST /v1/accounts/{account_id}/checkpoint/solve). */
|
|
386
388
|
account_id?: string;
|
|
387
389
|
/**
|
|
388
390
|
* @description The verification challenge LinkedIn issued.
|
|
389
391
|
* @enum {string}
|
|
390
392
|
*/
|
|
391
|
-
challenge_type?: "otp" | "two_factor_sms" | "two_factor_app" | "mobile_app_approval";
|
|
393
|
+
challenge_type?: "otp" | "two_factor_sms" | "two_factor_app" | "two_factor_whatsapp" | "mobile_app_approval" | "otp_or_mobile_app_approval" | "contract_selection";
|
|
394
|
+
/** @description Contract picker options (contract_selection only). Solve with the chosen id as the code. */
|
|
395
|
+
contracts?: {
|
|
396
|
+
id?: string;
|
|
397
|
+
name?: string;
|
|
398
|
+
}[];
|
|
392
399
|
/** @description ISO-8601 expiry of the challenge. */
|
|
393
400
|
expires_at?: string;
|
|
394
401
|
};
|
|
395
402
|
};
|
|
396
403
|
};
|
|
397
|
-
/** @description Invalid request — missing seat_id
|
|
404
|
+
/** @description Invalid request — missing seat_id, a malformed auth block, or a cookie connect without user_agent. */
|
|
398
405
|
400: {
|
|
399
406
|
headers: {
|
|
400
407
|
[name: string]: unknown;
|
|
@@ -421,7 +428,16 @@ interface paths {
|
|
|
421
428
|
"application/json": components["schemas"]["Error"];
|
|
422
429
|
};
|
|
423
430
|
};
|
|
424
|
-
/** @description
|
|
431
|
+
/** @description This LinkedIn account is already linked (names your own account_id when your tenant owns it). */
|
|
432
|
+
409: {
|
|
433
|
+
headers: {
|
|
434
|
+
[name: string]: unknown;
|
|
435
|
+
};
|
|
436
|
+
content: {
|
|
437
|
+
"application/json": components["schemas"]["Error"];
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
/** @description The verification challenge cannot be resolved automatically (a dead-end challenge such as a CAPTCHA or a phone-number registration). For those two dead-ends the error body carries a machine-readable challenge_type (captcha | phone_register) so a client can render the right guidance; other unsupported challenges carry no challenge_type. */
|
|
425
441
|
422: {
|
|
426
442
|
headers: {
|
|
427
443
|
[name: string]: unknown;
|
|
@@ -535,20 +551,20 @@ interface paths {
|
|
|
535
551
|
last_checked_at?: string;
|
|
536
552
|
/** @description The seat this account occupies (null for an admin seatless account). */
|
|
537
553
|
seat_id?: string | null;
|
|
538
|
-
/** @description Cached account username.
|
|
554
|
+
/** @description Cached account username. No longer refreshed by background enrichment — null for newly connected accounts (a previously cached value is retained). */
|
|
539
555
|
username?: string | null;
|
|
540
|
-
/** @description Cached premium-membership id.
|
|
556
|
+
/** @description Cached premium-membership id. No longer refreshed by background enrichment — null for newly connected accounts, or for non-premium accounts (a previously cached value is retained). */
|
|
541
557
|
premium_id?: string | null;
|
|
542
|
-
/** @description Cached public profile identifier.
|
|
558
|
+
/** @description Cached public profile identifier. No longer refreshed by background enrichment — null for newly connected accounts (a previously cached value is retained). */
|
|
543
559
|
public_identifier?: string | null;
|
|
544
|
-
/** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until
|
|
560
|
+
/** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account — distinct from connected_at. Null until the first background enrichment lands. */
|
|
545
561
|
substrate_created_at?: string | null;
|
|
546
|
-
/** @description Cached signature blocks (title + content) for
|
|
562
|
+
/** @description Cached signature blocks (title + content). No longer refreshed by background enrichment — empty for newly connected accounts (a previously cached value is retained). */
|
|
547
563
|
signatures?: {
|
|
548
564
|
title?: string;
|
|
549
565
|
content?: string;
|
|
550
566
|
}[];
|
|
551
|
-
/** @description Cached group names the account belongs to.
|
|
567
|
+
/** @description Cached group names the account belongs to. No longer refreshed by background enrichment — empty for newly connected accounts (a previously cached value is retained). */
|
|
552
568
|
groups?: string[];
|
|
553
569
|
/** @description Usage-safety recommendations for this account — one entry per tracked family (messages.daily, connection_requests.daily, profile_views.daily, inmail.daily, profile.endorse, account.per_minute). These are advisory only: Curviate never rejects a request because a daily recommendation is exceeded; only account.per_minute is a binding limit enforced with HTTP 429. */
|
|
554
570
|
quotas?: {
|
|
@@ -737,8 +753,8 @@ interface paths {
|
|
|
737
753
|
options?: never;
|
|
738
754
|
head?: never;
|
|
739
755
|
/**
|
|
740
|
-
* Update
|
|
741
|
-
* @description Update the
|
|
756
|
+
* Update account metadata / proxy configuration
|
|
757
|
+
* @description Update an account's custom metadata (a flat string map that replaces the store wholesale) and/or its custom proxy egress — supply a proxy object to set one, or null to clear it (revert to automatic proxy protection). Credentials and seat binding are untouched. The proxy password is encrypted at rest and never returned.
|
|
742
758
|
*/
|
|
743
759
|
patch: {
|
|
744
760
|
parameters: {
|
|
@@ -753,7 +769,9 @@ interface paths {
|
|
|
753
769
|
requestBody: {
|
|
754
770
|
content: {
|
|
755
771
|
"application/json": {
|
|
756
|
-
/** @description
|
|
772
|
+
/** @description Flat string→string map that replaces this account's custom-data store wholesale (unprovided keys are removed). */
|
|
773
|
+
metadata?: unknown;
|
|
774
|
+
/** @description Custom-proxy egress config, or null to clear it (revert to automatic proxy protection). Omit to leave it unchanged. */
|
|
757
775
|
proxy?: {
|
|
758
776
|
/**
|
|
759
777
|
* @description Proxy protocol. One of http, https, socks5.
|
|
@@ -768,16 +786,12 @@ interface paths {
|
|
|
768
786
|
username?: string;
|
|
769
787
|
/** @description Proxy auth password (optional). Encrypted at rest, never logged or returned. */
|
|
770
788
|
password?: string;
|
|
771
|
-
};
|
|
772
|
-
/** @description Managed proxy location hint as an ISO 3166-1 alpha-2 country code (e.g. US, DE). */
|
|
773
|
-
country?: string;
|
|
774
|
-
/** @description IPv4 address used to infer the managed proxy location. */
|
|
775
|
-
ip?: string;
|
|
789
|
+
} | null;
|
|
776
790
|
};
|
|
777
791
|
};
|
|
778
792
|
};
|
|
779
793
|
responses: {
|
|
780
|
-
/** @description The
|
|
794
|
+
/** @description The account metadata / proxy configuration was updated. */
|
|
781
795
|
200: {
|
|
782
796
|
headers: {
|
|
783
797
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -795,7 +809,7 @@ interface paths {
|
|
|
795
809
|
};
|
|
796
810
|
};
|
|
797
811
|
};
|
|
798
|
-
/** @description Invalid proxy
|
|
812
|
+
/** @description Invalid request — a malformed proxy object or an unsupported field (country/ip are no longer accepted). */
|
|
799
813
|
400: {
|
|
800
814
|
headers: {
|
|
801
815
|
[name: string]: unknown;
|
|
@@ -834,7 +848,7 @@ interface paths {
|
|
|
834
848
|
"application/json": components["schemas"]["Error"];
|
|
835
849
|
};
|
|
836
850
|
};
|
|
837
|
-
/** @description This
|
|
851
|
+
/** @description This proxy configuration is not supported for this account (e.g. the requested proxy mode is unavailable on the account's current plan). Not retryable as-is — change the request rather than resubmitting. */
|
|
838
852
|
501: {
|
|
839
853
|
headers: {
|
|
840
854
|
[name: string]: unknown;
|
|
@@ -885,7 +899,7 @@ interface paths {
|
|
|
885
899
|
put?: never;
|
|
886
900
|
/**
|
|
887
901
|
* Generate a hosted connection link
|
|
888
|
-
* @description Mint a one-time hosted URL the end user opens to authorize a LinkedIn connection. Credentials land server-side and never transit the API or LLM context. `
|
|
902
|
+
* @description Mint a one-time hosted URL the end user opens to authorize a NEW LinkedIn connection. Credentials land server-side and never transit the API or LLM context. `seat_id` (the empty seat the new account fills) is required; `expires_in_seconds` (60–3600, default 900) and `redirect_url` are optional. To re-authorize an EXISTING account, use POST /v1/accounts/{account_id}/reconnect-link instead.
|
|
889
903
|
*/
|
|
890
904
|
post: {
|
|
891
905
|
parameters: {
|
|
@@ -897,28 +911,20 @@ interface paths {
|
|
|
897
911
|
requestBody: {
|
|
898
912
|
content: {
|
|
899
913
|
"application/json": {
|
|
900
|
-
/** @description
|
|
901
|
-
seat_id
|
|
902
|
-
/** @description Account to reconnect for 'reconnect' purpose (required when purpose=reconnect) */
|
|
903
|
-
account_id?: string;
|
|
904
|
-
/**
|
|
905
|
-
* @description 'create' = new account onboarding; 'reconnect' = re-auth of existing account
|
|
906
|
-
* @default create
|
|
907
|
-
* @enum {string}
|
|
908
|
-
*/
|
|
909
|
-
purpose?: "create" | "reconnect";
|
|
914
|
+
/** @description The empty seat the newly connected account will fill. */
|
|
915
|
+
seat_id: string;
|
|
910
916
|
/**
|
|
911
917
|
* @description Seconds until the link expires (60–3600, default 900)
|
|
912
918
|
* @default 900
|
|
913
919
|
*/
|
|
914
920
|
expires_in_seconds?: number;
|
|
915
|
-
/** @description
|
|
921
|
+
/** @description Where the user's browser is sent after the connect flow completes. Must be an absolute https URL you control; you are responsible for its safety. Omit to return the user to a Curviate confirmation page. */
|
|
916
922
|
redirect_url?: string;
|
|
917
923
|
};
|
|
918
924
|
};
|
|
919
925
|
};
|
|
920
926
|
responses: {
|
|
921
|
-
/** @description A one-time hosted authorization link. Contains no credential material. */
|
|
927
|
+
/** @description A one-time hosted authorization link for a new connection. Contains no credential material. */
|
|
922
928
|
201: {
|
|
923
929
|
headers: {
|
|
924
930
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -937,12 +943,12 @@ interface paths {
|
|
|
937
943
|
/** @description Poll handle for GET /v1/accounts/connect-sessions/{session_id}. */
|
|
938
944
|
session_id?: string;
|
|
939
945
|
expires_at?: string;
|
|
940
|
-
|
|
941
|
-
|
|
946
|
+
/** @description The seat the new account will fill. */
|
|
947
|
+
seat_id?: string;
|
|
942
948
|
};
|
|
943
949
|
};
|
|
944
950
|
};
|
|
945
|
-
/** @description Invalid request — missing
|
|
951
|
+
/** @description Invalid request — missing or invalid seat_id. */
|
|
946
952
|
400: {
|
|
947
953
|
headers: {
|
|
948
954
|
[name: string]: unknown;
|
|
@@ -960,7 +966,133 @@ interface paths {
|
|
|
960
966
|
"application/json": components["schemas"]["Error"];
|
|
961
967
|
};
|
|
962
968
|
};
|
|
963
|
-
/** @description The referenced seat
|
|
969
|
+
/** @description The referenced seat was not found. */
|
|
970
|
+
404: {
|
|
971
|
+
headers: {
|
|
972
|
+
[name: string]: unknown;
|
|
973
|
+
};
|
|
974
|
+
content: {
|
|
975
|
+
"application/json": components["schemas"]["Error"];
|
|
976
|
+
};
|
|
977
|
+
};
|
|
978
|
+
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
979
|
+
429: {
|
|
980
|
+
headers: {
|
|
981
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
982
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
983
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
984
|
+
[name: string]: unknown;
|
|
985
|
+
};
|
|
986
|
+
content: {
|
|
987
|
+
"application/json": components["schemas"]["Error"];
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
/** @description Internal error. */
|
|
991
|
+
500: {
|
|
992
|
+
headers: {
|
|
993
|
+
[name: string]: unknown;
|
|
994
|
+
};
|
|
995
|
+
content: {
|
|
996
|
+
"application/json": components["schemas"]["Error"];
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
/** @description A temporary error occurred. Please try again. */
|
|
1000
|
+
502: {
|
|
1001
|
+
headers: {
|
|
1002
|
+
[name: string]: unknown;
|
|
1003
|
+
};
|
|
1004
|
+
content: {
|
|
1005
|
+
"application/json": components["schemas"]["Error"];
|
|
1006
|
+
};
|
|
1007
|
+
};
|
|
1008
|
+
/** @description Service unavailable. */
|
|
1009
|
+
503: {
|
|
1010
|
+
headers: {
|
|
1011
|
+
[name: string]: unknown;
|
|
1012
|
+
};
|
|
1013
|
+
content: {
|
|
1014
|
+
"application/json": components["schemas"]["Error"];
|
|
1015
|
+
};
|
|
1016
|
+
};
|
|
1017
|
+
/** @description Gateway timeout. */
|
|
1018
|
+
504: {
|
|
1019
|
+
headers: {
|
|
1020
|
+
[name: string]: unknown;
|
|
1021
|
+
};
|
|
1022
|
+
content: {
|
|
1023
|
+
"application/json": components["schemas"]["Error"];
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
delete?: never;
|
|
1029
|
+
options?: never;
|
|
1030
|
+
head?: never;
|
|
1031
|
+
patch?: never;
|
|
1032
|
+
trace?: never;
|
|
1033
|
+
};
|
|
1034
|
+
"/v1/accounts/{account_id}/reconnect-link": {
|
|
1035
|
+
parameters: {
|
|
1036
|
+
query?: never;
|
|
1037
|
+
header?: never;
|
|
1038
|
+
path?: never;
|
|
1039
|
+
cookie?: never;
|
|
1040
|
+
};
|
|
1041
|
+
get?: never;
|
|
1042
|
+
put?: never;
|
|
1043
|
+
/**
|
|
1044
|
+
* Generate a hosted re-authorization link
|
|
1045
|
+
* @description Mint a one-time hosted URL the end user opens to re-authorize an EXISTING connected account in place (same account_id, same seat) after it became disconnected. Credentials land server-side and never transit the API or LLM context. `expires_in_seconds` (60–3600, default 900) and `redirect_url` are optional. For a brand-new connection, use POST /v1/accounts/connect-link instead.
|
|
1046
|
+
*/
|
|
1047
|
+
post: {
|
|
1048
|
+
parameters: {
|
|
1049
|
+
query?: never;
|
|
1050
|
+
header?: never;
|
|
1051
|
+
path: {
|
|
1052
|
+
/** @description The account ID (`acc_…`) of the account to re-authorize. */
|
|
1053
|
+
account_id: string;
|
|
1054
|
+
};
|
|
1055
|
+
cookie?: never;
|
|
1056
|
+
};
|
|
1057
|
+
requestBody: {
|
|
1058
|
+
content: {
|
|
1059
|
+
"application/json": {
|
|
1060
|
+
/**
|
|
1061
|
+
* @description Seconds until the link expires (60–3600, default 900)
|
|
1062
|
+
* @default 900
|
|
1063
|
+
*/
|
|
1064
|
+
expires_in_seconds?: number;
|
|
1065
|
+
/** @description Where the user's browser is sent after the connect flow completes. Must be an absolute https URL you control; you are responsible for its safety. Omit to return the user to a Curviate confirmation page. */
|
|
1066
|
+
redirect_url?: string;
|
|
1067
|
+
};
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1070
|
+
responses: {
|
|
1071
|
+
/** @description A one-time hosted re-authorization link for an existing account. Contains no credential material. */
|
|
1072
|
+
201: {
|
|
1073
|
+
headers: {
|
|
1074
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1075
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
1076
|
+
[name: string]: unknown;
|
|
1077
|
+
};
|
|
1078
|
+
content: {
|
|
1079
|
+
"application/json": {
|
|
1080
|
+
/**
|
|
1081
|
+
* @description Response type discriminator.
|
|
1082
|
+
* @enum {string}
|
|
1083
|
+
*/
|
|
1084
|
+
object?: "hosted_auth_url";
|
|
1085
|
+
/** @description The hosted URL the end user opens. */
|
|
1086
|
+
url?: string;
|
|
1087
|
+
/** @description Poll handle for GET /v1/accounts/connect-sessions/{session_id}. */
|
|
1088
|
+
session_id?: string;
|
|
1089
|
+
expires_at?: string;
|
|
1090
|
+
/** @description The account being re-authorized. */
|
|
1091
|
+
account_id?: string;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
/** @description No such account for this tenant. */
|
|
964
1096
|
404: {
|
|
965
1097
|
headers: {
|
|
966
1098
|
[name: string]: unknown;
|
|
@@ -1154,7 +1286,7 @@ interface paths {
|
|
|
1154
1286
|
put?: never;
|
|
1155
1287
|
/**
|
|
1156
1288
|
* Reconnect a LinkedIn account
|
|
1157
|
-
* @description Re-authorize an account in place (same account_id, same seat) after it became disconnected. Accepts the same auth methods and optional auth-knob set as link.
|
|
1289
|
+
* @description Re-authorize an account in place (same account_id, same seat) after it became disconnected. Accepts the same auth methods and optional auth-knob set as link. May return a 202 checkpoint challenge (resolve it via the checkpoint sub-resource) exactly like link.
|
|
1158
1290
|
*/
|
|
1159
1291
|
post: {
|
|
1160
1292
|
parameters: {
|
|
@@ -1245,7 +1377,7 @@ interface paths {
|
|
|
1245
1377
|
};
|
|
1246
1378
|
};
|
|
1247
1379
|
};
|
|
1248
|
-
/** @description A verification challenge is required (same as link).
|
|
1380
|
+
/** @description A verification challenge is required (same as link). Resolve it via the checkpoint sub-resource (POST /v1/accounts/{account_id}/checkpoint/solve). */
|
|
1249
1381
|
202: {
|
|
1250
1382
|
headers: {
|
|
1251
1383
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -1261,13 +1393,18 @@ interface paths {
|
|
|
1261
1393
|
object?: "checkpoint";
|
|
1262
1394
|
/** @enum {string} */
|
|
1263
1395
|
status?: "checkpoint_required";
|
|
1264
|
-
/** @description The (provisional) account_id to pass to
|
|
1396
|
+
/** @description The (provisional) account_id to pass to the checkpoint sub-resource (POST /v1/accounts/{account_id}/checkpoint/solve). */
|
|
1265
1397
|
account_id?: string;
|
|
1266
1398
|
/**
|
|
1267
1399
|
* @description The verification challenge LinkedIn issued.
|
|
1268
1400
|
* @enum {string}
|
|
1269
1401
|
*/
|
|
1270
|
-
challenge_type?: "otp" | "two_factor_sms" | "two_factor_app" | "mobile_app_approval";
|
|
1402
|
+
challenge_type?: "otp" | "two_factor_sms" | "two_factor_app" | "two_factor_whatsapp" | "mobile_app_approval" | "otp_or_mobile_app_approval" | "contract_selection";
|
|
1403
|
+
/** @description Contract picker options (contract_selection only). Solve with the chosen id as the code. */
|
|
1404
|
+
contracts?: {
|
|
1405
|
+
id?: string;
|
|
1406
|
+
name?: string;
|
|
1407
|
+
}[];
|
|
1271
1408
|
/** @description ISO-8601 expiry of the challenge. */
|
|
1272
1409
|
expires_at?: string;
|
|
1273
1410
|
};
|
|
@@ -1300,56 +1437,8 @@ interface paths {
|
|
|
1300
1437
|
"application/json": components["schemas"]["Error"];
|
|
1301
1438
|
};
|
|
1302
1439
|
};
|
|
1303
|
-
/** @description
|
|
1304
|
-
|
|
1305
|
-
headers: {
|
|
1306
|
-
[name: string]: unknown;
|
|
1307
|
-
};
|
|
1308
|
-
content: {
|
|
1309
|
-
"application/json": components["schemas"]["Error"];
|
|
1310
|
-
};
|
|
1311
|
-
};
|
|
1312
|
-
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
1313
|
-
429: {
|
|
1314
|
-
headers: {
|
|
1315
|
-
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1316
|
-
RateLimit: components["headers"]["RateLimit"];
|
|
1317
|
-
"Retry-After": components["headers"]["Retry-After"];
|
|
1318
|
-
[name: string]: unknown;
|
|
1319
|
-
};
|
|
1320
|
-
content: {
|
|
1321
|
-
"application/json": components["schemas"]["Error"];
|
|
1322
|
-
};
|
|
1323
|
-
};
|
|
1324
|
-
/** @description Internal error. */
|
|
1325
|
-
500: {
|
|
1326
|
-
headers: {
|
|
1327
|
-
[name: string]: unknown;
|
|
1328
|
-
};
|
|
1329
|
-
content: {
|
|
1330
|
-
"application/json": components["schemas"]["Error"];
|
|
1331
|
-
};
|
|
1332
|
-
};
|
|
1333
|
-
/** @description A temporary error occurred. Please try again. */
|
|
1334
|
-
502: {
|
|
1335
|
-
headers: {
|
|
1336
|
-
[name: string]: unknown;
|
|
1337
|
-
};
|
|
1338
|
-
content: {
|
|
1339
|
-
"application/json": components["schemas"]["Error"];
|
|
1340
|
-
};
|
|
1341
|
-
};
|
|
1342
|
-
/** @description Service unavailable. */
|
|
1343
|
-
503: {
|
|
1344
|
-
headers: {
|
|
1345
|
-
[name: string]: unknown;
|
|
1346
|
-
};
|
|
1347
|
-
content: {
|
|
1348
|
-
"application/json": components["schemas"]["Error"];
|
|
1349
|
-
};
|
|
1350
|
-
};
|
|
1351
|
-
/** @description Gateway timeout. */
|
|
1352
|
-
504: {
|
|
1440
|
+
/** @description This LinkedIn account is already linked. */
|
|
1441
|
+
409: {
|
|
1353
1442
|
headers: {
|
|
1354
1443
|
[name: string]: unknown;
|
|
1355
1444
|
};
|
|
@@ -1357,66 +1446,8 @@ interface paths {
|
|
|
1357
1446
|
"application/json": components["schemas"]["Error"];
|
|
1358
1447
|
};
|
|
1359
1448
|
};
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
delete?: never;
|
|
1363
|
-
options?: never;
|
|
1364
|
-
head?: never;
|
|
1365
|
-
patch?: never;
|
|
1366
|
-
trace?: never;
|
|
1367
|
-
};
|
|
1368
|
-
"/v1/accounts/{account_id}/refresh": {
|
|
1369
|
-
parameters: {
|
|
1370
|
-
query?: never;
|
|
1371
|
-
header?: never;
|
|
1372
|
-
path?: never;
|
|
1373
|
-
cookie?: never;
|
|
1374
|
-
};
|
|
1375
|
-
get?: never;
|
|
1376
|
-
put?: never;
|
|
1377
|
-
/**
|
|
1378
|
-
* Refresh a frozen account's sources
|
|
1379
|
-
* @description Force a state re-sync to restart sources on a frozen account, without changing credentials or seat binding. Returns the current account status inline.
|
|
1380
|
-
*/
|
|
1381
|
-
post: {
|
|
1382
|
-
parameters: {
|
|
1383
|
-
query?: never;
|
|
1384
|
-
header?: never;
|
|
1385
|
-
path: {
|
|
1386
|
-
/** @description The account ID (`acc_…`) of the account to refresh. */
|
|
1387
|
-
account_id: string;
|
|
1388
|
-
};
|
|
1389
|
-
cookie?: never;
|
|
1390
|
-
};
|
|
1391
|
-
requestBody: {
|
|
1392
|
-
content: {
|
|
1393
|
-
"application/json": Record<string, never>;
|
|
1394
|
-
};
|
|
1395
|
-
};
|
|
1396
|
-
responses: {
|
|
1397
|
-
/** @description The account's sources were restarted; current status returned. */
|
|
1398
|
-
200: {
|
|
1399
|
-
headers: {
|
|
1400
|
-
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
1401
|
-
RateLimit: components["headers"]["RateLimit"];
|
|
1402
|
-
[name: string]: unknown;
|
|
1403
|
-
};
|
|
1404
|
-
content: {
|
|
1405
|
-
"application/json": {
|
|
1406
|
-
/**
|
|
1407
|
-
* @description Response type discriminator.
|
|
1408
|
-
* @enum {string}
|
|
1409
|
-
*/
|
|
1410
|
-
object?: "account";
|
|
1411
|
-
account_id?: string;
|
|
1412
|
-
/** @enum {string} */
|
|
1413
|
-
status?: "active" | "reconnect_needed" | "restricted";
|
|
1414
|
-
last_checked_at?: string;
|
|
1415
|
-
};
|
|
1416
|
-
};
|
|
1417
|
-
};
|
|
1418
|
-
/** @description No such account for this tenant. */
|
|
1419
|
-
404: {
|
|
1449
|
+
/** @description The account is restricted and cannot be re-authorized. */
|
|
1450
|
+
422: {
|
|
1420
1451
|
headers: {
|
|
1421
1452
|
[name: string]: unknown;
|
|
1422
1453
|
};
|
|
@@ -1480,7 +1511,7 @@ interface paths {
|
|
|
1480
1511
|
patch?: never;
|
|
1481
1512
|
trace?: never;
|
|
1482
1513
|
};
|
|
1483
|
-
"/v1/accounts/
|
|
1514
|
+
"/v1/accounts/{account_id}/checkpoint/solve": {
|
|
1484
1515
|
parameters: {
|
|
1485
1516
|
query?: never;
|
|
1486
1517
|
header?: never;
|
|
@@ -1490,28 +1521,29 @@ interface paths {
|
|
|
1490
1521
|
get?: never;
|
|
1491
1522
|
put?: never;
|
|
1492
1523
|
/**
|
|
1493
|
-
*
|
|
1494
|
-
* @description Resolve the pending verification challenge for an account by submitting the OTP / 2FA code
|
|
1524
|
+
* Solve a checkpoint verification challenge
|
|
1525
|
+
* @description Resolve the pending verification challenge for an account by submitting the code — an OTP / 2FA code, the chosen contract id (for a contract_selection challenge), or the special value TRY_ANOTHER_WAY to switch the challenge method. A chained challenge returns another 202.
|
|
1495
1526
|
*/
|
|
1496
1527
|
post: {
|
|
1497
1528
|
parameters: {
|
|
1498
1529
|
query?: never;
|
|
1499
1530
|
header?: never;
|
|
1500
|
-
path
|
|
1531
|
+
path: {
|
|
1532
|
+
/** @description The account ID (`acc_…`) whose checkpoint is mid-flight (returned with the 202 checkpoint_required response). */
|
|
1533
|
+
account_id: string;
|
|
1534
|
+
};
|
|
1501
1535
|
cookie?: never;
|
|
1502
1536
|
};
|
|
1503
1537
|
requestBody: {
|
|
1504
1538
|
content: {
|
|
1505
1539
|
"application/json": {
|
|
1506
|
-
/** @description The
|
|
1507
|
-
account_id: string;
|
|
1508
|
-
/** @description The OTP / 2FA verification code. Special value TRY_ANOTHER_WAY switches the challenge type (e.g. in-app → 2FA). */
|
|
1540
|
+
/** @description The OTP / 2FA verification code, the chosen contract id (contract_selection), or the special value TRY_ANOTHER_WAY to switch the challenge method. */
|
|
1509
1541
|
code: string;
|
|
1510
1542
|
};
|
|
1511
1543
|
};
|
|
1512
1544
|
};
|
|
1513
1545
|
responses: {
|
|
1514
|
-
/** @description The challenge was resolved; the account is now
|
|
1546
|
+
/** @description The challenge was resolved; the account is now connected. */
|
|
1515
1547
|
201: {
|
|
1516
1548
|
headers: {
|
|
1517
1549
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -1527,7 +1559,7 @@ interface paths {
|
|
|
1527
1559
|
object?: "account";
|
|
1528
1560
|
account_id?: string;
|
|
1529
1561
|
/** @enum {string} */
|
|
1530
|
-
status?: "active";
|
|
1562
|
+
status?: "active" | "reconnect_needed" | "restricted" | "disconnected";
|
|
1531
1563
|
/** @description The seat this account occupies (canonical — supersedes the deprecated attached_seat_id). */
|
|
1532
1564
|
seat_id?: string | null;
|
|
1533
1565
|
/**
|
|
@@ -1535,10 +1567,12 @@ interface paths {
|
|
|
1535
1567
|
* @description Deprecated — use seat_id (same value). Removed at the GA /v1 cutover.
|
|
1536
1568
|
*/
|
|
1537
1569
|
attached_seat_id?: string | null;
|
|
1570
|
+
/** @description Present and true only when this connect recovered an existing LinkedIn identity already present on the workspace (claiming it into your account) instead of connecting a brand-new one. Absent on a normal connect. The account's status reflects its real observed state, which may need a reconnect. */
|
|
1571
|
+
recovered?: boolean;
|
|
1538
1572
|
};
|
|
1539
1573
|
};
|
|
1540
1574
|
};
|
|
1541
|
-
/** @description A chained challenge follows (e.g. OTP -> 2FA).
|
|
1575
|
+
/** @description A chained challenge follows (e.g. OTP -> 2FA). Solve the next code at the same account's checkpoint/solve. */
|
|
1542
1576
|
202: {
|
|
1543
1577
|
headers: {
|
|
1544
1578
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -1554,13 +1588,18 @@ interface paths {
|
|
|
1554
1588
|
object?: "checkpoint";
|
|
1555
1589
|
/** @enum {string} */
|
|
1556
1590
|
status?: "checkpoint_required";
|
|
1557
|
-
/** @description The (provisional) account_id to pass to
|
|
1591
|
+
/** @description The (provisional) account_id to pass to the checkpoint sub-resource (POST /v1/accounts/{account_id}/checkpoint/solve). */
|
|
1558
1592
|
account_id?: string;
|
|
1559
1593
|
/**
|
|
1560
1594
|
* @description The verification challenge LinkedIn issued.
|
|
1561
1595
|
* @enum {string}
|
|
1562
1596
|
*/
|
|
1563
|
-
challenge_type?: "otp" | "two_factor_sms" | "two_factor_app" | "mobile_app_approval";
|
|
1597
|
+
challenge_type?: "otp" | "two_factor_sms" | "two_factor_app" | "two_factor_whatsapp" | "mobile_app_approval" | "otp_or_mobile_app_approval" | "contract_selection";
|
|
1598
|
+
/** @description Contract picker options (contract_selection only). Solve with the chosen id as the code. */
|
|
1599
|
+
contracts?: {
|
|
1600
|
+
id?: string;
|
|
1601
|
+
name?: string;
|
|
1602
|
+
}[];
|
|
1564
1603
|
/** @description ISO-8601 expiry of the challenge. */
|
|
1565
1604
|
expires_at?: string;
|
|
1566
1605
|
};
|
|
@@ -1649,7 +1688,7 @@ interface paths {
|
|
|
1649
1688
|
patch?: never;
|
|
1650
1689
|
trace?: never;
|
|
1651
1690
|
};
|
|
1652
|
-
"/v1/accounts/
|
|
1691
|
+
"/v1/accounts/{account_id}/checkpoint/request": {
|
|
1653
1692
|
parameters: {
|
|
1654
1693
|
query?: never;
|
|
1655
1694
|
header?: never;
|
|
@@ -1659,22 +1698,22 @@ interface paths {
|
|
|
1659
1698
|
get?: never;
|
|
1660
1699
|
put?: never;
|
|
1661
1700
|
/**
|
|
1662
|
-
*
|
|
1663
|
-
* @description Re-
|
|
1701
|
+
* Re-request a checkpoint verification notification
|
|
1702
|
+
* @description Re-issue the pending verification challenge notification for an account. Meaningful for code-delivery challenges (otp / two_factor_sms / mobile_app_approval); a two_factor_app challenge has nothing to re-request (the code is generated on the device) and returns resent:false rather than an error — the response never claims a re-send that did not happen. Does not reset the checkpoint's expiry.
|
|
1664
1703
|
*/
|
|
1665
1704
|
post: {
|
|
1666
1705
|
parameters: {
|
|
1667
1706
|
query?: never;
|
|
1668
1707
|
header?: never;
|
|
1669
|
-
path
|
|
1708
|
+
path: {
|
|
1709
|
+
/** @description The account ID (`acc_…`) whose pending checkpoint notification should be re-issued. */
|
|
1710
|
+
account_id: string;
|
|
1711
|
+
};
|
|
1670
1712
|
cookie?: never;
|
|
1671
1713
|
};
|
|
1672
1714
|
requestBody: {
|
|
1673
1715
|
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
|
-
};
|
|
1716
|
+
"application/json": Record<string, never>;
|
|
1678
1717
|
};
|
|
1679
1718
|
};
|
|
1680
1719
|
responses: {
|
|
@@ -1780,7 +1819,7 @@ interface paths {
|
|
|
1780
1819
|
patch?: never;
|
|
1781
1820
|
trace?: never;
|
|
1782
1821
|
};
|
|
1783
|
-
"/v1/accounts/
|
|
1822
|
+
"/v1/accounts/{account_id}/checkpoint/poll": {
|
|
1784
1823
|
parameters: {
|
|
1785
1824
|
query?: never;
|
|
1786
1825
|
header?: never;
|
|
@@ -1791,21 +1830,21 @@ interface paths {
|
|
|
1791
1830
|
put?: never;
|
|
1792
1831
|
/**
|
|
1793
1832
|
* Poll a mobile-app-approval checkpoint
|
|
1794
|
-
* @description Poll the pending mobile-app-approval challenge for an account to check whether the user has approved the sign-in on their LinkedIn mobile app.
|
|
1833
|
+
* @description Poll the pending mobile-app-approval challenge for an account to check whether the user has approved the sign-in on their LinkedIn mobile app. There is no code to submit — approve on the phone, then poll. Returns status:"pending" while waiting, status:"active" once approved, or status:"expired"/"failed" on timeout/failure. Valid for mobile_app_approval and the in-app branch of otp_or_mobile_app_approval — use solve for code-based challenges.
|
|
1795
1834
|
*/
|
|
1796
1835
|
post: {
|
|
1797
1836
|
parameters: {
|
|
1798
1837
|
query?: never;
|
|
1799
1838
|
header?: never;
|
|
1800
|
-
path
|
|
1839
|
+
path: {
|
|
1840
|
+
/** @description The account ID (`acc_…`) whose mobile-app-approval connect is mid-flight (returned with the 202 checkpoint_required response). */
|
|
1841
|
+
account_id: string;
|
|
1842
|
+
};
|
|
1801
1843
|
cookie?: never;
|
|
1802
1844
|
};
|
|
1803
1845
|
requestBody: {
|
|
1804
1846
|
content: {
|
|
1805
|
-
"application/json":
|
|
1806
|
-
/** @description The account whose mobile-app-approval connect is mid-flight (returned with the 202 checkpoint_required response). */
|
|
1807
|
-
account_id: string;
|
|
1808
|
-
};
|
|
1847
|
+
"application/json": Record<string, never>;
|
|
1809
1848
|
};
|
|
1810
1849
|
};
|
|
1811
1850
|
responses: {
|
|
@@ -1840,6 +1879,13 @@ interface paths {
|
|
|
1840
1879
|
attached_seat_id?: string | null;
|
|
1841
1880
|
/** @description ISO-8601 expiry. Present on status:"pending". */
|
|
1842
1881
|
expires_at?: string;
|
|
1882
|
+
/**
|
|
1883
|
+
* @description Machine-readable challenge discriminator. Present on status:"expired" so a client can render the right recovery guidance without parsing prose.
|
|
1884
|
+
* @enum {string}
|
|
1885
|
+
*/
|
|
1886
|
+
challenge_type?: "mobile_app_approval";
|
|
1887
|
+
/** @description Human-readable, actionable next step when the approval timed out. Present on status:"expired". */
|
|
1888
|
+
recovery_hint?: string;
|
|
1843
1889
|
};
|
|
1844
1890
|
};
|
|
1845
1891
|
};
|
|
@@ -3006,7 +3052,7 @@ interface paths {
|
|
|
3006
3052
|
"application/json": components["schemas"]["Error"];
|
|
3007
3053
|
};
|
|
3008
3054
|
};
|
|
3009
|
-
/** @description
|
|
3055
|
+
/** @description The account does not have the required Core seat. */
|
|
3010
3056
|
403: {
|
|
3011
3057
|
headers: {
|
|
3012
3058
|
[name: string]: unknown;
|
|
@@ -3015,7 +3061,7 @@ interface paths {
|
|
|
3015
3061
|
"application/json": components["schemas"]["Error"];
|
|
3016
3062
|
};
|
|
3017
3063
|
};
|
|
3018
|
-
/** @description
|
|
3064
|
+
/** @description Company not found, or you do not administer this company's page. */
|
|
3019
3065
|
404: {
|
|
3020
3066
|
headers: {
|
|
3021
3067
|
[name: string]: unknown;
|
|
@@ -17060,7 +17106,7 @@ interface paths {
|
|
|
17060
17106
|
/** @description Replace the delivery URL. Must be an HTTPS URL. */
|
|
17061
17107
|
request_url?: string;
|
|
17062
17108
|
/** @description Replace the human-readable name (1–100 chars), or null to clear it. */
|
|
17063
|
-
name?: string;
|
|
17109
|
+
name?: string | null;
|
|
17064
17110
|
/** @description Enable or disable the webhook. A disabled webhook delivers nothing. */
|
|
17065
17111
|
enabled?: boolean;
|
|
17066
17112
|
/** @description Replace the custom headers added to each delivery POST (whole-array). */
|
|
@@ -17373,32 +17419,30 @@ type AccountLinkCreated = paths["/v1/accounts/link"]["post"]["responses"]["201"]
|
|
|
17373
17419
|
type AccountLinkCheckpoint = paths["/v1/accounts/link"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
17374
17420
|
/** Union returned by `accounts.link()` — account or checkpoint. */
|
|
17375
17421
|
type AccountLinkResult = AccountLinkCreated | AccountLinkCheckpoint;
|
|
17376
|
-
/** `POST /v1/accounts/
|
|
17377
|
-
type
|
|
17378
|
-
/** `POST /v1/accounts/
|
|
17379
|
-
type
|
|
17380
|
-
/** `POST /v1/accounts/
|
|
17381
|
-
type
|
|
17382
|
-
/** `POST /v1/accounts/
|
|
17383
|
-
type AccountPollCheckpointResult = paths["/v1/accounts/
|
|
17384
|
-
/** `POST /v1/accounts/checkpoints/resend` request body. */
|
|
17385
|
-
type AccountResendCheckpointBody = paths["/v1/accounts/checkpoints/resend"]["post"]["requestBody"]["content"]["application/json"];
|
|
17386
|
-
/** `POST /v1/accounts/checkpoints/resend` 200 body. */
|
|
17387
|
-
type AccountResendCheckpointResult = paths["/v1/accounts/checkpoints/resend"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17422
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/solve` request body. */
|
|
17423
|
+
type AccountSolveCheckpointBody = paths["/v1/accounts/{account_id}/checkpoint/solve"]["post"]["requestBody"]["content"]["application/json"];
|
|
17424
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/solve` result — 201 (active) or 202 (chained challenge). */
|
|
17425
|
+
type AccountSolveCheckpointResult = paths["/v1/accounts/{account_id}/checkpoint/solve"]["post"]["responses"]["201"]["content"]["application/json"] | paths["/v1/accounts/{account_id}/checkpoint/solve"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
17426
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/request` 200 body. */
|
|
17427
|
+
type AccountRequestCheckpointResult = paths["/v1/accounts/{account_id}/checkpoint/request"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17428
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/poll` 200 body. */
|
|
17429
|
+
type AccountPollCheckpointResult = paths["/v1/accounts/{account_id}/checkpoint/poll"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17388
17430
|
/** `POST /v1/accounts/connect-link` request body. */
|
|
17389
17431
|
type AccountConnectLinkBody = paths["/v1/accounts/connect-link"]["post"]["requestBody"]["content"]["application/json"];
|
|
17390
17432
|
/** `POST /v1/accounts/connect-link` 201 body. */
|
|
17391
17433
|
type AccountConnectLinkResult = paths["/v1/accounts/connect-link"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
17434
|
+
/** `POST /v1/accounts/{account_id}/reconnect-link` request body. */
|
|
17435
|
+
type AccountReconnectLinkBody = paths["/v1/accounts/{account_id}/reconnect-link"]["post"]["requestBody"]["content"]["application/json"];
|
|
17436
|
+
/** `POST /v1/accounts/{account_id}/reconnect-link` 201 body. */
|
|
17437
|
+
type AccountReconnectLinkResult = paths["/v1/accounts/{account_id}/reconnect-link"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
17392
17438
|
/** `GET /v1/accounts/connect-sessions/{session_id}` 200 body. */
|
|
17393
17439
|
type AccountConnectSessionResult = paths["/v1/accounts/connect-sessions/{session_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
17394
17440
|
/** `GET /v1/accounts/{account_id}` 200 body. */
|
|
17395
17441
|
type AccountDetail = paths["/v1/accounts/{account_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
17396
17442
|
/** `POST /v1/accounts/{account_id}/reconnect` request body. */
|
|
17397
17443
|
type AccountReconnectBody = paths["/v1/accounts/{account_id}/reconnect"]["post"]["requestBody"]["content"]["application/json"];
|
|
17398
|
-
/** `POST /v1/accounts/{account_id}/reconnect` 200
|
|
17399
|
-
type AccountReconnectResult = paths["/v1/accounts/{account_id}/reconnect"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17400
|
-
/** `POST /v1/accounts/{account_id}/refresh` 200 body. */
|
|
17401
|
-
type AccountRefreshResult = paths["/v1/accounts/{account_id}/refresh"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17444
|
+
/** `POST /v1/accounts/{account_id}/reconnect` result — 200 (active) or 202 (checkpoint). */
|
|
17445
|
+
type AccountReconnectResult = paths["/v1/accounts/{account_id}/reconnect"]["post"]["responses"]["200"]["content"]["application/json"] | paths["/v1/accounts/{account_id}/reconnect"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
17402
17446
|
/** `PATCH /v1/accounts/{account_id}` request body. */
|
|
17403
17447
|
type AccountUpdateBody = paths["/v1/accounts/{account_id}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
17404
17448
|
/** `PATCH /v1/accounts/{account_id}` 200 body. */
|
|
@@ -17428,36 +17472,92 @@ declare class AccountsResource {
|
|
|
17428
17472
|
* Connect a LinkedIn account to an empty seat.
|
|
17429
17473
|
*
|
|
17430
17474
|
* Returns an account (201) or a checkpoint challenge (202) when LinkedIn
|
|
17431
|
-
* requires verification. Callers discriminate on `result.object
|
|
17475
|
+
* requires verification. Callers discriminate on `result.object`; resolve a
|
|
17476
|
+
* 202 with {@link solveCheckpoint} (code) or {@link pollCheckpoint}
|
|
17477
|
+
* (mobile-app approval).
|
|
17478
|
+
*
|
|
17479
|
+
* For `auth_method: "cookie"`, `user_agent` is **required** — connecting by
|
|
17480
|
+
* session cookie without one is rejected with `INVALID_REQUEST`. It stays
|
|
17481
|
+
* optional for `auth_method: "credentials"`.
|
|
17482
|
+
*
|
|
17483
|
+
* On a 201 account, `recovered` is `true` only when the connect reclaimed a
|
|
17484
|
+
* LinkedIn identity already present on the workspace (claiming it into your
|
|
17485
|
+
* account) rather than connecting a brand-new one — it is absent on a normal
|
|
17486
|
+
* connect. Its `status` reflects the account's real observed state: as well as
|
|
17487
|
+
* `active` it may be `reconnect_needed`, `restricted`, or `disconnected` (a
|
|
17488
|
+
* recovered identity often needs a reconnect).
|
|
17432
17489
|
*/
|
|
17433
17490
|
link(body: AccountLinkBody): Promise<AccountLinkResult>;
|
|
17434
17491
|
/**
|
|
17435
|
-
*
|
|
17492
|
+
* Solve a checkpoint challenge by submitting an OTP or 2FA code.
|
|
17493
|
+
*
|
|
17494
|
+
* The account is addressed by `accountId` (the provisional `account_id`
|
|
17495
|
+
* returned on the 202 `checkpoint_required` response); the body carries the
|
|
17496
|
+
* `code`. Returns the connected account (201) or, when LinkedIn chains a
|
|
17497
|
+
* second challenge, another checkpoint (202) — resolve that one with a
|
|
17498
|
+
* further `solveCheckpoint` call for the same `accountId`.
|
|
17499
|
+
*
|
|
17500
|
+
* On the 201 account, `recovered` is `true` only when solving the challenge
|
|
17501
|
+
* reclaimed a LinkedIn identity already present on the workspace (rather than
|
|
17502
|
+
* connecting a brand-new one); it is absent otherwise. Its `status` reflects
|
|
17503
|
+
* the account's real observed state — as well as `active` it may be
|
|
17504
|
+
* `reconnect_needed`, `restricted`, or `disconnected`.
|
|
17505
|
+
*
|
|
17506
|
+
* @param accountId - the provisional `account_id` from the 202 response.
|
|
17507
|
+
* @param body - the verification `code`.
|
|
17436
17508
|
*/
|
|
17437
|
-
|
|
17509
|
+
solveCheckpoint(accountId: string, body: AccountSolveCheckpointBody): Promise<AccountSolveCheckpointResult>;
|
|
17438
17510
|
/**
|
|
17439
|
-
*
|
|
17511
|
+
* Re-request the pending verification challenge notification for an account.
|
|
17512
|
+
*
|
|
17513
|
+
* Useful when the end user says they never received the code or push
|
|
17514
|
+
* notification for a pending checkpoint. `resent` echoes the outcome
|
|
17515
|
+
* honestly: `true` once the notification was actually re-sent, `false` when
|
|
17516
|
+
* there was nothing to re-send for that challenge type (this call never
|
|
17517
|
+
* throws just because a re-send wasn't applicable). Does not reset the
|
|
17518
|
+
* checkpoint's expiry.
|
|
17519
|
+
*
|
|
17520
|
+
* @param accountId - the provisional `account_id` from the 202 response.
|
|
17440
17521
|
*/
|
|
17441
|
-
|
|
17522
|
+
requestCheckpoint(accountId: string): Promise<AccountRequestCheckpointResult>;
|
|
17442
17523
|
/**
|
|
17443
|
-
*
|
|
17524
|
+
* Poll for mobile-app approval of a pending checkpoint challenge.
|
|
17444
17525
|
*
|
|
17445
|
-
*
|
|
17446
|
-
*
|
|
17447
|
-
*
|
|
17448
|
-
*
|
|
17449
|
-
*
|
|
17450
|
-
* the
|
|
17526
|
+
* The account is addressed by `accountId` (the provisional `account_id`
|
|
17527
|
+
* from the 202 response). `status` is `pending` until the end user approves
|
|
17528
|
+
* on their device, then `active` (the account is connected), or
|
|
17529
|
+
* `expired` / `failed`. Poll until it leaves `pending`.
|
|
17530
|
+
*
|
|
17531
|
+
* On `status: "expired"` (the approval timed out), the response carries
|
|
17532
|
+
* `challenge_type` (`"mobile_app_approval"`) and a human-readable
|
|
17533
|
+
* `recovery_hint` — the actionable next step — so a client can render the
|
|
17534
|
+
* right recovery guidance without parsing prose.
|
|
17535
|
+
*
|
|
17536
|
+
* @param accountId - the provisional `account_id` from the 202 response.
|
|
17451
17537
|
*/
|
|
17452
|
-
|
|
17538
|
+
pollCheckpoint(accountId: string): Promise<AccountPollCheckpointResult>;
|
|
17453
17539
|
/**
|
|
17454
|
-
* Generate a one-time hosted connection link the end user opens to authorize
|
|
17455
|
-
* LinkedIn connection without credentials transiting the API or LLM
|
|
17540
|
+
* Generate a one-time hosted connection link the end user opens to authorize
|
|
17541
|
+
* a new LinkedIn connection without credentials transiting the API or LLM
|
|
17542
|
+
* context. Poll completion with {@link getConnectSession} using the returned
|
|
17543
|
+
* `session_id`. To re-authorize an existing account, use
|
|
17544
|
+
* {@link createReconnectLink} instead.
|
|
17456
17545
|
*/
|
|
17457
17546
|
createConnectLink(body: AccountConnectLinkBody): Promise<AccountConnectLinkResult>;
|
|
17458
17547
|
/**
|
|
17459
|
-
*
|
|
17460
|
-
*
|
|
17548
|
+
* Generate a one-time hosted **re-authorization** link for an existing
|
|
17549
|
+
* account that became disconnected — the hosted counterpart of
|
|
17550
|
+
* {@link reconnect}. The end user opens the returned `url`; poll completion
|
|
17551
|
+
* with {@link getConnectSession} using the returned `session_id`. The account
|
|
17552
|
+
* keeps its `account_id` and seat.
|
|
17553
|
+
*
|
|
17554
|
+
* @param accountId - the account to re-authorize.
|
|
17555
|
+
* @param body - optional `expires_in_seconds` and `redirect_url`.
|
|
17556
|
+
*/
|
|
17557
|
+
createReconnectLink(accountId: string, body?: AccountReconnectLinkBody): Promise<AccountReconnectLinkResult>;
|
|
17558
|
+
/**
|
|
17559
|
+
* Poll a hosted connect session minted by {@link createConnectLink} or
|
|
17560
|
+
* {@link createReconnectLink} (its `session_id`).
|
|
17461
17561
|
*
|
|
17462
17562
|
* A pure status read — it makes no external call and does not itself complete
|
|
17463
17563
|
* the connection. `status` is `pending` until the end user finishes the
|
|
@@ -17474,22 +17574,31 @@ declare class AccountsResource {
|
|
|
17474
17574
|
* seat this account occupies, `null` for an admin seatless account).
|
|
17475
17575
|
*
|
|
17476
17576
|
* This is a stale-while-revalidate read — it always returns immediately
|
|
17477
|
-
* from the cached row (never blocks on a live substrate call)
|
|
17478
|
-
*
|
|
17479
|
-
*
|
|
17480
|
-
* `
|
|
17577
|
+
* from the cached row (never blocks on a live substrate call). The cached
|
|
17578
|
+
* enrichment fields `full_name` and `substrate_created_at` are populated by
|
|
17579
|
+
* a background enrichment pass; `username`, `premium_id`,
|
|
17580
|
+
* `public_identifier`, `signatures`, and `groups` are not sourced on the
|
|
17581
|
+
* current connection surface and read `null`/`[]`.
|
|
17481
17582
|
*/
|
|
17482
17583
|
get(accountId: string): Promise<AccountDetail>;
|
|
17483
17584
|
/**
|
|
17484
|
-
* Re-authorize a disconnected account in place (same account_id
|
|
17585
|
+
* Re-authorize a disconnected account in place (same `account_id`, same
|
|
17586
|
+
* seat). Returns the reconnected account (200) or a checkpoint challenge
|
|
17587
|
+
* (202) when LinkedIn requires verification — resolve a 202 with
|
|
17588
|
+
* {@link solveCheckpoint} / {@link pollCheckpoint}, exactly like {@link link}.
|
|
17589
|
+
*
|
|
17590
|
+
* For `auth_method: "cookie"`, `user_agent` is **required** (as on
|
|
17591
|
+
* {@link link}). For the hosted re-auth flow, use {@link createReconnectLink}.
|
|
17485
17592
|
*/
|
|
17486
17593
|
reconnect(accountId: string, body: AccountReconnectBody): Promise<AccountReconnectResult>;
|
|
17487
17594
|
/**
|
|
17488
|
-
*
|
|
17489
|
-
|
|
17490
|
-
|
|
17491
|
-
|
|
17492
|
-
*
|
|
17595
|
+
* Update an account's configuration.
|
|
17596
|
+
*
|
|
17597
|
+
* `metadata` is a flat string→string map that **replaces** the account's
|
|
17598
|
+
* custom-data store wholesale (keys not provided are removed). `proxy` sets a
|
|
17599
|
+
* custom egress proxy, or clears it (reverting to automatic proxy protection)
|
|
17600
|
+
* when passed as `null`. The `proxy.password`, if given, is stored securely
|
|
17601
|
+
* and never returned.
|
|
17493
17602
|
*/
|
|
17494
17603
|
update(accountId: string, body: AccountUpdateBody): Promise<AccountUpdateResult>;
|
|
17495
17604
|
/**
|
|
@@ -18406,7 +18515,9 @@ declare class Curviate {
|
|
|
18406
18515
|
* The taxonomy is additive-only: new codes may be appended, existing ones are
|
|
18407
18516
|
* never removed or renamed.
|
|
18408
18517
|
*/
|
|
18409
|
-
type ErrorCode = "UNAUTHORIZED" | "INVALID_REQUEST" | "UNSUPPORTED_MEDIA_TYPE" | "PAYLOAD_TOO_LARGE" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_RESTRICTED"
|
|
18518
|
+
type ErrorCode = "UNAUTHORIZED" | "INVALID_REQUEST" | "UNSUPPORTED_MEDIA_TYPE" | "PAYLOAD_TOO_LARGE" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_RESTRICTED"
|
|
18519
|
+
/** Duplicate connect — reconnect or adopt the existing account instead of linking again. Not retryable. */
|
|
18520
|
+
| "ACCOUNT_ALREADY_LINKED" | "RESOURCE_NOT_FOUND" | "RESOURCE_ACCESS_RESTRICTED" | "TIER_NOT_ACTIVE" | "LINKEDIN_FEATURE_NOT_SUBSCRIBED" | "RATE_LIMIT_ACCOUNT" | "RATE_LIMIT_TENANT" | "PLATFORM_RATE_LIMIT" | "PLATFORM_ERROR" | "PLATFORM_NOT_IMPLEMENTED" | "CHECKPOINT_NOT_FOUND" | "CHECKPOINT_EXPIRED" | "CHECKPOINT_INVALID_CODE" | "CHECKPOINT_MAX_ATTEMPTS" | "CHECKPOINT_ALREADY_RESOLVED" | "CHECKPOINT_UNSUPPORTED" | "CONNECTION_IN_PROGRESS" | "LINKEDIN_AUTH_FAILED" | "LINKEDIN_RATE_LIMITED" | "LINKEDIN_COOKIE_INVALID" | "LINKEDIN_SERVICE_UNAVAILABLE" | "MESSAGE_WINDOW_EXPIRED" | "RECIPIENT_UNREACHABLE" | "PAYMENT_REQUIRED" | "PAYMENT_FAILED" | "SUBSCRIPTION_BUSY" | "SUBSCRIPTION_NOT_FOUND" | "SEAT_NOT_FOUND" | "SEAT_CANCELLED" | "INTERNAL";
|
|
18410
18521
|
/**
|
|
18411
18522
|
* The product tier a caller needs, surfaced on `TIER_NOT_ACTIVE` so an agent
|
|
18412
18523
|
* can route an upgrade without parsing the message. `sn` and `sales_nav` are
|