@curviate/sdk 0.12.0 → 0.14.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 +56 -0
- package/README.md +1 -1
- package/dist/index.d.ts +509 -253
- package/dist/index.js +114 -38
- package/package.json +1 -1
- package/src/generated/types.ts +352 -195
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;
|
|
@@ -16680,7 +16726,7 @@ interface paths {
|
|
|
16680
16726
|
value: string;
|
|
16681
16727
|
}[];
|
|
16682
16728
|
/** @description Messaging events to subscribe to (default: [message.received]) */
|
|
16683
|
-
events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted")[];
|
|
16729
|
+
events?: ("message.received" | "message.delivered" | "message.read" | "message.reaction" | "message.edited" | "message.deleted" | "chat.updated" | "chat.deleted")[];
|
|
16684
16730
|
/**
|
|
16685
16731
|
* @description Field-remapping keys for the messaging delivery payload
|
|
16686
16732
|
* @default []
|
|
@@ -16715,7 +16761,7 @@ interface paths {
|
|
|
16715
16761
|
value: string;
|
|
16716
16762
|
}[];
|
|
16717
16763
|
/** @description User/relation events to subscribe to (default: [connection.accepted]) */
|
|
16718
|
-
events?: "connection.accepted"[];
|
|
16764
|
+
events?: ("connection.accepted" | "connection.new")[];
|
|
16719
16765
|
/**
|
|
16720
16766
|
* @description Field-remapping keys for the user/relation delivery payload
|
|
16721
16767
|
* @default []
|
|
@@ -16750,7 +16796,7 @@ interface paths {
|
|
|
16750
16796
|
value: string;
|
|
16751
16797
|
}[];
|
|
16752
16798
|
/** @description Account-status events to subscribe to (default: all 7) */
|
|
16753
|
-
events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked")[];
|
|
16799
|
+
events?: ("account.created" | "account.connected" | "account.synced" | "account.reconnected" | "account.reconnect_needed" | "account.creation_failed" | "account.disconnected" | "account.error" | "account.paused" | "account.connecting" | "account.permission_revoked" | "account.initial_sync.running" | "account.initial_sync.completed" | "account.initial_sync.failed")[];
|
|
16754
16800
|
};
|
|
16755
16801
|
};
|
|
16756
16802
|
};
|
|
@@ -16872,7 +16918,7 @@ interface paths {
|
|
|
16872
16918
|
};
|
|
16873
16919
|
/**
|
|
16874
16920
|
* List webhook event types
|
|
16875
|
-
* @description Returns the complete canonical event catalogue (
|
|
16921
|
+
* @description Returns the complete canonical event catalogue (27 events) grouped by source: messaging (8), user (2), account_status (14), plus 3 tier-gated events. No quota consumed.
|
|
16876
16922
|
*/
|
|
16877
16923
|
get: {
|
|
16878
16924
|
parameters: {
|
|
@@ -16914,6 +16960,11 @@ interface paths {
|
|
|
16914
16960
|
* @enum {string}
|
|
16915
16961
|
*/
|
|
16916
16962
|
tier?: "recruiter" | "sales_nav";
|
|
16963
|
+
/**
|
|
16964
|
+
* @description Delivery timing. Omitted (equivalent to 'realtime') on every live-pushed event. 'no_longer_realtime' means no push exists for this event; 'not_realtime' means the event is polled, not pushed, and may lag the underlying LinkedIn event.
|
|
16965
|
+
* @enum {string}
|
|
16966
|
+
*/
|
|
16967
|
+
availability?: "realtime" | "no_longer_realtime" | "not_realtime";
|
|
16917
16968
|
}[];
|
|
16918
16969
|
}[];
|
|
16919
16970
|
};
|
|
@@ -16957,7 +17008,113 @@ interface paths {
|
|
|
16957
17008
|
path?: never;
|
|
16958
17009
|
cookie?: never;
|
|
16959
17010
|
};
|
|
16960
|
-
|
|
17011
|
+
/**
|
|
17012
|
+
* Get a webhook
|
|
17013
|
+
* @description Returns a single webhook owned by the calling tenant. The plaintext secret is never present on a read — only the prefix.
|
|
17014
|
+
*/
|
|
17015
|
+
get: {
|
|
17016
|
+
parameters: {
|
|
17017
|
+
query?: never;
|
|
17018
|
+
header?: never;
|
|
17019
|
+
path: {
|
|
17020
|
+
/** @description Webhook id (wh_-prefixed ULID). */
|
|
17021
|
+
id: string;
|
|
17022
|
+
};
|
|
17023
|
+
cookie?: never;
|
|
17024
|
+
};
|
|
17025
|
+
requestBody?: never;
|
|
17026
|
+
responses: {
|
|
17027
|
+
/** @description The webhook, if owned by the calling tenant. The signing secret is never returned on a read — only the prefix. */
|
|
17028
|
+
200: {
|
|
17029
|
+
headers: {
|
|
17030
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
17031
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
17032
|
+
[name: string]: unknown;
|
|
17033
|
+
};
|
|
17034
|
+
content: {
|
|
17035
|
+
"application/json": {
|
|
17036
|
+
/**
|
|
17037
|
+
* @description Response type discriminator.
|
|
17038
|
+
* @enum {string}
|
|
17039
|
+
*/
|
|
17040
|
+
object?: "webhook";
|
|
17041
|
+
/** @description Webhook id (wh_-prefixed ULID). */
|
|
17042
|
+
id?: string;
|
|
17043
|
+
/**
|
|
17044
|
+
* @description The event source this webhook subscribes to (immutable).
|
|
17045
|
+
* @enum {string}
|
|
17046
|
+
*/
|
|
17047
|
+
source?: "messaging" | "user" | "account_status";
|
|
17048
|
+
/** @description The URL that receives delivery POST requests. */
|
|
17049
|
+
request_url?: string;
|
|
17050
|
+
/** @description Human-readable label. */
|
|
17051
|
+
name?: string | null;
|
|
17052
|
+
/**
|
|
17053
|
+
* @description Delivery body encoding.
|
|
17054
|
+
* @enum {string}
|
|
17055
|
+
*/
|
|
17056
|
+
format?: "json" | "form";
|
|
17057
|
+
/** @description Accounts targeted by this webhook. Non-empty — each id is owned by the tenant. */
|
|
17058
|
+
account_ids?: string[];
|
|
17059
|
+
/** @description A disabled webhook is kept but delivers nothing. */
|
|
17060
|
+
enabled?: boolean;
|
|
17061
|
+
/** @description Custom headers added to each delivery POST. */
|
|
17062
|
+
headers?: {
|
|
17063
|
+
key?: string;
|
|
17064
|
+
value?: string;
|
|
17065
|
+
}[];
|
|
17066
|
+
/** @description Canonical event names this webhook subscribes to. */
|
|
17067
|
+
events?: string[];
|
|
17068
|
+
/** @description Field-remapping keys for the delivery payload (messaging and user sources only). */
|
|
17069
|
+
data?: string[];
|
|
17070
|
+
/** @description First 8 characters of the signing secret. The full secret is never returned on edit — it is preserved unchanged. */
|
|
17071
|
+
secret_prefix?: string;
|
|
17072
|
+
/** @description ISO-8601 creation timestamp. */
|
|
17073
|
+
created_at?: string;
|
|
17074
|
+
};
|
|
17075
|
+
};
|
|
17076
|
+
};
|
|
17077
|
+
/** @description Malformed or empty webhook id. */
|
|
17078
|
+
400: {
|
|
17079
|
+
headers: {
|
|
17080
|
+
[name: string]: unknown;
|
|
17081
|
+
};
|
|
17082
|
+
content: {
|
|
17083
|
+
"application/json": components["schemas"]["Error"];
|
|
17084
|
+
};
|
|
17085
|
+
};
|
|
17086
|
+
/** @description Missing or invalid API key. */
|
|
17087
|
+
401: {
|
|
17088
|
+
headers: {
|
|
17089
|
+
[name: string]: unknown;
|
|
17090
|
+
};
|
|
17091
|
+
content: {
|
|
17092
|
+
"application/json": components["schemas"]["Error"];
|
|
17093
|
+
};
|
|
17094
|
+
};
|
|
17095
|
+
/** @description Webhook not found or not owned by this tenant. */
|
|
17096
|
+
404: {
|
|
17097
|
+
headers: {
|
|
17098
|
+
[name: string]: unknown;
|
|
17099
|
+
};
|
|
17100
|
+
content: {
|
|
17101
|
+
"application/json": components["schemas"]["Error"];
|
|
17102
|
+
};
|
|
17103
|
+
};
|
|
17104
|
+
/** @description Rate limited — slow down and retry after the hinted delay. */
|
|
17105
|
+
429: {
|
|
17106
|
+
headers: {
|
|
17107
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
17108
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
17109
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
17110
|
+
[name: string]: unknown;
|
|
17111
|
+
};
|
|
17112
|
+
content: {
|
|
17113
|
+
"application/json": components["schemas"]["Error"];
|
|
17114
|
+
};
|
|
17115
|
+
};
|
|
17116
|
+
};
|
|
17117
|
+
};
|
|
16961
17118
|
put?: never;
|
|
16962
17119
|
post?: never;
|
|
16963
17120
|
/**
|
|
@@ -17060,7 +17217,7 @@ interface paths {
|
|
|
17060
17217
|
/** @description Replace the delivery URL. Must be an HTTPS URL. */
|
|
17061
17218
|
request_url?: string;
|
|
17062
17219
|
/** @description Replace the human-readable name (1–100 chars), or null to clear it. */
|
|
17063
|
-
name?: string;
|
|
17220
|
+
name?: string | null;
|
|
17064
17221
|
/** @description Enable or disable the webhook. A disabled webhook delivers nothing. */
|
|
17065
17222
|
enabled?: boolean;
|
|
17066
17223
|
/** @description Replace the custom headers added to each delivery POST (whole-array). */
|
|
@@ -17373,32 +17530,30 @@ type AccountLinkCreated = paths["/v1/accounts/link"]["post"]["responses"]["201"]
|
|
|
17373
17530
|
type AccountLinkCheckpoint = paths["/v1/accounts/link"]["post"]["responses"]["202"]["content"]["application/json"];
|
|
17374
17531
|
/** Union returned by `accounts.link()` — account or checkpoint. */
|
|
17375
17532
|
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"];
|
|
17533
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/solve` request body. */
|
|
17534
|
+
type AccountSolveCheckpointBody = paths["/v1/accounts/{account_id}/checkpoint/solve"]["post"]["requestBody"]["content"]["application/json"];
|
|
17535
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/solve` result — 201 (active) or 202 (chained challenge). */
|
|
17536
|
+
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"];
|
|
17537
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/request` 200 body. */
|
|
17538
|
+
type AccountRequestCheckpointResult = paths["/v1/accounts/{account_id}/checkpoint/request"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17539
|
+
/** `POST /v1/accounts/{account_id}/checkpoint/poll` 200 body. */
|
|
17540
|
+
type AccountPollCheckpointResult = paths["/v1/accounts/{account_id}/checkpoint/poll"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
17388
17541
|
/** `POST /v1/accounts/connect-link` request body. */
|
|
17389
17542
|
type AccountConnectLinkBody = paths["/v1/accounts/connect-link"]["post"]["requestBody"]["content"]["application/json"];
|
|
17390
17543
|
/** `POST /v1/accounts/connect-link` 201 body. */
|
|
17391
17544
|
type AccountConnectLinkResult = paths["/v1/accounts/connect-link"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
17545
|
+
/** `POST /v1/accounts/{account_id}/reconnect-link` request body. */
|
|
17546
|
+
type AccountReconnectLinkBody = paths["/v1/accounts/{account_id}/reconnect-link"]["post"]["requestBody"]["content"]["application/json"];
|
|
17547
|
+
/** `POST /v1/accounts/{account_id}/reconnect-link` 201 body. */
|
|
17548
|
+
type AccountReconnectLinkResult = paths["/v1/accounts/{account_id}/reconnect-link"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
17392
17549
|
/** `GET /v1/accounts/connect-sessions/{session_id}` 200 body. */
|
|
17393
17550
|
type AccountConnectSessionResult = paths["/v1/accounts/connect-sessions/{session_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
17394
17551
|
/** `GET /v1/accounts/{account_id}` 200 body. */
|
|
17395
17552
|
type AccountDetail = paths["/v1/accounts/{account_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
17396
17553
|
/** `POST /v1/accounts/{account_id}/reconnect` request body. */
|
|
17397
17554
|
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"];
|
|
17555
|
+
/** `POST /v1/accounts/{account_id}/reconnect` result — 200 (active) or 202 (checkpoint). */
|
|
17556
|
+
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
17557
|
/** `PATCH /v1/accounts/{account_id}` request body. */
|
|
17403
17558
|
type AccountUpdateBody = paths["/v1/accounts/{account_id}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
17404
17559
|
/** `PATCH /v1/accounts/{account_id}` 200 body. */
|
|
@@ -17428,36 +17583,92 @@ declare class AccountsResource {
|
|
|
17428
17583
|
* Connect a LinkedIn account to an empty seat.
|
|
17429
17584
|
*
|
|
17430
17585
|
* Returns an account (201) or a checkpoint challenge (202) when LinkedIn
|
|
17431
|
-
* requires verification. Callers discriminate on `result.object
|
|
17586
|
+
* requires verification. Callers discriminate on `result.object`; resolve a
|
|
17587
|
+
* 202 with {@link solveCheckpoint} (code) or {@link pollCheckpoint}
|
|
17588
|
+
* (mobile-app approval).
|
|
17589
|
+
*
|
|
17590
|
+
* For `auth_method: "cookie"`, `user_agent` is **required** — connecting by
|
|
17591
|
+
* session cookie without one is rejected with `INVALID_REQUEST`. It stays
|
|
17592
|
+
* optional for `auth_method: "credentials"`.
|
|
17593
|
+
*
|
|
17594
|
+
* On a 201 account, `recovered` is `true` only when the connect reclaimed a
|
|
17595
|
+
* LinkedIn identity already present on the workspace (claiming it into your
|
|
17596
|
+
* account) rather than connecting a brand-new one — it is absent on a normal
|
|
17597
|
+
* connect. Its `status` reflects the account's real observed state: as well as
|
|
17598
|
+
* `active` it may be `reconnect_needed`, `restricted`, or `disconnected` (a
|
|
17599
|
+
* recovered identity often needs a reconnect).
|
|
17432
17600
|
*/
|
|
17433
17601
|
link(body: AccountLinkBody): Promise<AccountLinkResult>;
|
|
17434
17602
|
/**
|
|
17435
|
-
*
|
|
17603
|
+
* Solve a checkpoint challenge by submitting an OTP or 2FA code.
|
|
17604
|
+
*
|
|
17605
|
+
* The account is addressed by `accountId` (the provisional `account_id`
|
|
17606
|
+
* returned on the 202 `checkpoint_required` response); the body carries the
|
|
17607
|
+
* `code`. Returns the connected account (201) or, when LinkedIn chains a
|
|
17608
|
+
* second challenge, another checkpoint (202) — resolve that one with a
|
|
17609
|
+
* further `solveCheckpoint` call for the same `accountId`.
|
|
17610
|
+
*
|
|
17611
|
+
* On the 201 account, `recovered` is `true` only when solving the challenge
|
|
17612
|
+
* reclaimed a LinkedIn identity already present on the workspace (rather than
|
|
17613
|
+
* connecting a brand-new one); it is absent otherwise. Its `status` reflects
|
|
17614
|
+
* the account's real observed state — as well as `active` it may be
|
|
17615
|
+
* `reconnect_needed`, `restricted`, or `disconnected`.
|
|
17616
|
+
*
|
|
17617
|
+
* @param accountId - the provisional `account_id` from the 202 response.
|
|
17618
|
+
* @param body - the verification `code`.
|
|
17436
17619
|
*/
|
|
17437
|
-
|
|
17620
|
+
solveCheckpoint(accountId: string, body: AccountSolveCheckpointBody): Promise<AccountSolveCheckpointResult>;
|
|
17438
17621
|
/**
|
|
17439
|
-
*
|
|
17622
|
+
* Re-request the pending verification challenge notification for an account.
|
|
17623
|
+
*
|
|
17624
|
+
* Useful when the end user says they never received the code or push
|
|
17625
|
+
* notification for a pending checkpoint. `resent` echoes the outcome
|
|
17626
|
+
* honestly: `true` once the notification was actually re-sent, `false` when
|
|
17627
|
+
* there was nothing to re-send for that challenge type (this call never
|
|
17628
|
+
* throws just because a re-send wasn't applicable). Does not reset the
|
|
17629
|
+
* checkpoint's expiry.
|
|
17630
|
+
*
|
|
17631
|
+
* @param accountId - the provisional `account_id` from the 202 response.
|
|
17440
17632
|
*/
|
|
17441
|
-
|
|
17633
|
+
requestCheckpoint(accountId: string): Promise<AccountRequestCheckpointResult>;
|
|
17442
17634
|
/**
|
|
17443
|
-
*
|
|
17635
|
+
* Poll for mobile-app approval of a pending checkpoint challenge.
|
|
17444
17636
|
*
|
|
17445
|
-
*
|
|
17446
|
-
*
|
|
17447
|
-
*
|
|
17448
|
-
*
|
|
17449
|
-
*
|
|
17450
|
-
* the
|
|
17637
|
+
* The account is addressed by `accountId` (the provisional `account_id`
|
|
17638
|
+
* from the 202 response). `status` is `pending` until the end user approves
|
|
17639
|
+
* on their device, then `active` (the account is connected), or
|
|
17640
|
+
* `expired` / `failed`. Poll until it leaves `pending`.
|
|
17641
|
+
*
|
|
17642
|
+
* On `status: "expired"` (the approval timed out), the response carries
|
|
17643
|
+
* `challenge_type` (`"mobile_app_approval"`) and a human-readable
|
|
17644
|
+
* `recovery_hint` — the actionable next step — so a client can render the
|
|
17645
|
+
* right recovery guidance without parsing prose.
|
|
17646
|
+
*
|
|
17647
|
+
* @param accountId - the provisional `account_id` from the 202 response.
|
|
17451
17648
|
*/
|
|
17452
|
-
|
|
17649
|
+
pollCheckpoint(accountId: string): Promise<AccountPollCheckpointResult>;
|
|
17453
17650
|
/**
|
|
17454
|
-
* Generate a one-time hosted connection link the end user opens to authorize
|
|
17455
|
-
* LinkedIn connection without credentials transiting the API or LLM
|
|
17651
|
+
* Generate a one-time hosted connection link the end user opens to authorize
|
|
17652
|
+
* a new LinkedIn connection without credentials transiting the API or LLM
|
|
17653
|
+
* context. Poll completion with {@link getConnectSession} using the returned
|
|
17654
|
+
* `session_id`. To re-authorize an existing account, use
|
|
17655
|
+
* {@link createReconnectLink} instead.
|
|
17456
17656
|
*/
|
|
17457
17657
|
createConnectLink(body: AccountConnectLinkBody): Promise<AccountConnectLinkResult>;
|
|
17458
17658
|
/**
|
|
17459
|
-
*
|
|
17460
|
-
*
|
|
17659
|
+
* Generate a one-time hosted **re-authorization** link for an existing
|
|
17660
|
+
* account that became disconnected — the hosted counterpart of
|
|
17661
|
+
* {@link reconnect}. The end user opens the returned `url`; poll completion
|
|
17662
|
+
* with {@link getConnectSession} using the returned `session_id`. The account
|
|
17663
|
+
* keeps its `account_id` and seat.
|
|
17664
|
+
*
|
|
17665
|
+
* @param accountId - the account to re-authorize.
|
|
17666
|
+
* @param body - optional `expires_in_seconds` and `redirect_url`.
|
|
17667
|
+
*/
|
|
17668
|
+
createReconnectLink(accountId: string, body?: AccountReconnectLinkBody): Promise<AccountReconnectLinkResult>;
|
|
17669
|
+
/**
|
|
17670
|
+
* Poll a hosted connect session minted by {@link createConnectLink} or
|
|
17671
|
+
* {@link createReconnectLink} (its `session_id`).
|
|
17461
17672
|
*
|
|
17462
17673
|
* A pure status read — it makes no external call and does not itself complete
|
|
17463
17674
|
* the connection. `status` is `pending` until the end user finishes the
|
|
@@ -17474,22 +17685,31 @@ declare class AccountsResource {
|
|
|
17474
17685
|
* seat this account occupies, `null` for an admin seatless account).
|
|
17475
17686
|
*
|
|
17476
17687
|
* 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
|
-
* `
|
|
17688
|
+
* from the cached row (never blocks on a live substrate call). The cached
|
|
17689
|
+
* enrichment fields `full_name` and `substrate_created_at` are populated by
|
|
17690
|
+
* a background enrichment pass; `username`, `premium_id`,
|
|
17691
|
+
* `public_identifier`, `signatures`, and `groups` are not sourced on the
|
|
17692
|
+
* current connection surface and read `null`/`[]`.
|
|
17481
17693
|
*/
|
|
17482
17694
|
get(accountId: string): Promise<AccountDetail>;
|
|
17483
17695
|
/**
|
|
17484
|
-
* Re-authorize a disconnected account in place (same account_id
|
|
17696
|
+
* Re-authorize a disconnected account in place (same `account_id`, same
|
|
17697
|
+
* seat). Returns the reconnected account (200) or a checkpoint challenge
|
|
17698
|
+
* (202) when LinkedIn requires verification — resolve a 202 with
|
|
17699
|
+
* {@link solveCheckpoint} / {@link pollCheckpoint}, exactly like {@link link}.
|
|
17700
|
+
*
|
|
17701
|
+
* For `auth_method: "cookie"`, `user_agent` is **required** (as on
|
|
17702
|
+
* {@link link}). For the hosted re-auth flow, use {@link createReconnectLink}.
|
|
17485
17703
|
*/
|
|
17486
17704
|
reconnect(accountId: string, body: AccountReconnectBody): Promise<AccountReconnectResult>;
|
|
17487
17705
|
/**
|
|
17488
|
-
*
|
|
17489
|
-
|
|
17490
|
-
|
|
17491
|
-
|
|
17492
|
-
*
|
|
17706
|
+
* Update an account's configuration.
|
|
17707
|
+
*
|
|
17708
|
+
* `metadata` is a flat string→string map that **replaces** the account's
|
|
17709
|
+
* custom-data store wholesale (keys not provided are removed). `proxy` sets a
|
|
17710
|
+
* custom egress proxy, or clears it (reverting to automatic proxy protection)
|
|
17711
|
+
* when passed as `null`. The `proxy.password`, if given, is stored securely
|
|
17712
|
+
* and never returned.
|
|
17493
17713
|
*/
|
|
17494
17714
|
update(accountId: string, body: AccountUpdateBody): Promise<AccountUpdateResult>;
|
|
17495
17715
|
/**
|
|
@@ -18226,12 +18446,13 @@ declare class CompaniesResource {
|
|
|
18226
18446
|
}
|
|
18227
18447
|
|
|
18228
18448
|
/**
|
|
18229
|
-
* Webhooks resource —
|
|
18449
|
+
* Webhooks resource — 7 methods (root-scoped).
|
|
18230
18450
|
*
|
|
18231
18451
|
* Root-scoped: webhooks are tenant-wide, not account-scoped. All methods are
|
|
18232
18452
|
* mounted directly on the root client (like `accounts`).
|
|
18233
18453
|
* `getStateDiff` is placed here because it is tagged Webhooks in the OpenAPI
|
|
18234
18454
|
* (`GET /v1/accounts/:id/state-diff` enables event-driven state sync).
|
|
18455
|
+
* `get` is net-new — a single tenant-scoped read by id.
|
|
18235
18456
|
*/
|
|
18236
18457
|
|
|
18237
18458
|
type WebhookCreateBody = paths["/v1/webhooks"]["post"]["requestBody"]["content"]["application/json"];
|
|
@@ -18239,6 +18460,7 @@ type WebhookCreateResult = paths["/v1/webhooks"]["post"]["responses"]["201"]["co
|
|
|
18239
18460
|
type WebhookListParams = NonNullable<paths["/v1/webhooks"]["get"]["parameters"]["query"]>;
|
|
18240
18461
|
type WebhookListResult = paths["/v1/webhooks"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
18241
18462
|
type WebhookListEventsResult = paths["/v1/webhooks/events"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
18463
|
+
type WebhookGetResult = paths["/v1/webhooks/{id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
18242
18464
|
type WebhookUpdateBody = paths["/v1/webhooks/{id}"]["patch"]["requestBody"]["content"]["application/json"];
|
|
18243
18465
|
type WebhookUpdateResult = paths["/v1/webhooks/{id}"]["patch"]["responses"]["200"]["content"]["application/json"];
|
|
18244
18466
|
type WebhookDeleteResult = paths["/v1/webhooks/{id}"]["delete"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -18260,10 +18482,16 @@ declare class WebhooksResource {
|
|
|
18260
18482
|
*/
|
|
18261
18483
|
list(params?: WebhookListParams): Promise<WebhookListResult>;
|
|
18262
18484
|
/**
|
|
18263
|
-
* Return the complete canonical webhook event catalogue (
|
|
18485
|
+
* Return the complete canonical webhook event catalogue (27 events, grouped by source).
|
|
18264
18486
|
* `GET /v1/webhooks/events`
|
|
18265
18487
|
*/
|
|
18266
18488
|
listEvents(): Promise<WebhookListEventsResult>;
|
|
18489
|
+
/**
|
|
18490
|
+
* Return a single webhook owned by the calling tenant.
|
|
18491
|
+
* `GET /v1/webhooks/{id}`
|
|
18492
|
+
* The plaintext secret is never present on a read — only `secret_prefix`.
|
|
18493
|
+
*/
|
|
18494
|
+
get(id: string): Promise<WebhookGetResult>;
|
|
18267
18495
|
/**
|
|
18268
18496
|
* Update a webhook in place. `source` is immutable.
|
|
18269
18497
|
* `PATCH /v1/webhooks/{id}`
|
|
@@ -18406,7 +18634,9 @@ declare class Curviate {
|
|
|
18406
18634
|
* The taxonomy is additive-only: new codes may be appended, existing ones are
|
|
18407
18635
|
* never removed or renamed.
|
|
18408
18636
|
*/
|
|
18409
|
-
type ErrorCode = "UNAUTHORIZED" | "INVALID_REQUEST" | "UNSUPPORTED_MEDIA_TYPE" | "PAYLOAD_TOO_LARGE" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_RESTRICTED"
|
|
18637
|
+
type ErrorCode = "UNAUTHORIZED" | "INVALID_REQUEST" | "UNSUPPORTED_MEDIA_TYPE" | "PAYLOAD_TOO_LARGE" | "ACCOUNT_NOT_FOUND" | "ACCOUNT_RESTRICTED"
|
|
18638
|
+
/** Duplicate connect — reconnect or adopt the existing account instead of linking again. Not retryable. */
|
|
18639
|
+
| "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
18640
|
/**
|
|
18411
18641
|
* The product tier a caller needs, surfaced on `TIER_NOT_ACTIVE` so an agent
|
|
18412
18642
|
* can route an upgrade without parsing the message. `sn` and `sales_nav` are
|
|
@@ -18547,8 +18777,19 @@ interface AccountPayload {
|
|
|
18547
18777
|
[key: string]: unknown;
|
|
18548
18778
|
}
|
|
18549
18779
|
/**
|
|
18550
|
-
* The complete discriminated union of all
|
|
18551
|
-
* The `type` field is the discriminant.
|
|
18780
|
+
* The complete discriminated union of all 24 canonical, create-subscribable
|
|
18781
|
+
* Curviate webhook events. The `type` field is the discriminant.
|
|
18782
|
+
*
|
|
18783
|
+
* Re-keyed for the v2 catalogue (was 19). Renamed/removed vs. the prior set:
|
|
18784
|
+
* `account.stopped`, `account.sync_started`, `account.sync_complete`,
|
|
18785
|
+
* `account.creation_success`, `account.sync_success`, `account.reconnect_required`,
|
|
18786
|
+
* and `account.checkpoint` are gone — the account-lifecycle names now split
|
|
18787
|
+
* across `account.synced` / `account.reconnected` / `account.reconnect_needed` /
|
|
18788
|
+
* `account.paused` / `account.connecting` / `account.permission_revoked`. Net-new:
|
|
18789
|
+
* `chat.updated`, `chat.deleted`, `connection.new`, and the three
|
|
18790
|
+
* `account.initial_sync.*` events. This union is pinned at compile time against
|
|
18791
|
+
* the generated create-events enum (see `test/webhooks.constructEvent.test.ts`)
|
|
18792
|
+
* — it must never drift from the served catalogue again.
|
|
18552
18793
|
*
|
|
18553
18794
|
* @example
|
|
18554
18795
|
* const event = await constructEvent(rawBody, header, secret);
|
|
@@ -18574,9 +18815,18 @@ type CurviateEvent = {
|
|
|
18574
18815
|
} | {
|
|
18575
18816
|
type: "message.reaction";
|
|
18576
18817
|
data: MessagePayload;
|
|
18818
|
+
} | {
|
|
18819
|
+
type: "chat.updated";
|
|
18820
|
+
data: MessagePayload;
|
|
18821
|
+
} | {
|
|
18822
|
+
type: "chat.deleted";
|
|
18823
|
+
data: MessagePayload;
|
|
18577
18824
|
} | {
|
|
18578
18825
|
type: "connection.accepted";
|
|
18579
18826
|
data: ConnectionPayload;
|
|
18827
|
+
} | {
|
|
18828
|
+
type: "connection.new";
|
|
18829
|
+
data: ConnectionPayload;
|
|
18580
18830
|
} | {
|
|
18581
18831
|
type: "account.created";
|
|
18582
18832
|
data: AccountPayload;
|
|
@@ -18584,34 +18834,40 @@ type CurviateEvent = {
|
|
|
18584
18834
|
type: "account.connected";
|
|
18585
18835
|
data: AccountPayload;
|
|
18586
18836
|
} | {
|
|
18587
|
-
type: "account.
|
|
18837
|
+
type: "account.synced";
|
|
18588
18838
|
data: AccountPayload;
|
|
18589
18839
|
} | {
|
|
18590
|
-
type: "account.
|
|
18840
|
+
type: "account.reconnected";
|
|
18591
18841
|
data: AccountPayload;
|
|
18592
18842
|
} | {
|
|
18593
|
-
type: "account.
|
|
18843
|
+
type: "account.reconnect_needed";
|
|
18594
18844
|
data: AccountPayload;
|
|
18595
18845
|
} | {
|
|
18596
|
-
type: "account.
|
|
18846
|
+
type: "account.creation_failed";
|
|
18597
18847
|
data: AccountPayload;
|
|
18598
18848
|
} | {
|
|
18599
|
-
type: "account.
|
|
18849
|
+
type: "account.disconnected";
|
|
18600
18850
|
data: AccountPayload;
|
|
18601
18851
|
} | {
|
|
18602
|
-
type: "account.
|
|
18852
|
+
type: "account.error";
|
|
18603
18853
|
data: AccountPayload;
|
|
18604
18854
|
} | {
|
|
18605
|
-
type: "account.
|
|
18855
|
+
type: "account.paused";
|
|
18856
|
+
data: AccountPayload;
|
|
18857
|
+
} | {
|
|
18858
|
+
type: "account.connecting";
|
|
18859
|
+
data: AccountPayload;
|
|
18860
|
+
} | {
|
|
18861
|
+
type: "account.permission_revoked";
|
|
18606
18862
|
data: AccountPayload;
|
|
18607
18863
|
} | {
|
|
18608
|
-
type: "account.
|
|
18864
|
+
type: "account.initial_sync.running";
|
|
18609
18865
|
data: AccountPayload;
|
|
18610
18866
|
} | {
|
|
18611
|
-
type: "account.
|
|
18867
|
+
type: "account.initial_sync.completed";
|
|
18612
18868
|
data: AccountPayload;
|
|
18613
18869
|
} | {
|
|
18614
|
-
type: "account.
|
|
18870
|
+
type: "account.initial_sync.failed";
|
|
18615
18871
|
data: AccountPayload;
|
|
18616
18872
|
};
|
|
18617
18873
|
/**
|