@curviate/sdk 0.40.1 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -625,7 +625,7 @@ export interface paths {
625
625
  put?: never;
626
626
  /**
627
627
  * Search posts
628
- * @description Searches LinkedIn posts using structured filters. To search from a pasted LinkedIn search URL instead, use POST .../search. Post text, engagement counters, author, and attachments are returned.
628
+ * @description Searches LinkedIn posts using structured filters. To search from a pasted LinkedIn search URL instead, use POST .../search. Returns text, counts, author and attachments; the text can repeat fragments around links, mentions and hashtags, so get the post by its id for the clean body.
629
629
  */
630
630
  post: operations["postV1AccountIdSearchPosts"];
631
631
  delete?: never;
@@ -2292,8 +2292,8 @@ export interface paths {
2292
2292
  options?: never;
2293
2293
  head?: never;
2294
2294
  /**
2295
- * Update account metadata / proxy configuration
2296
- * @description Updates an account's metadata (a flat string map, replaced wholesale) and/or its custom proxy egress; pass a proxy object to set one, or null to clear it. Credentials and seat are untouched.
2295
+ * Update an account's metadata or connection location
2296
+ * @description Updates metadata, external_id, the connection location (country) or your own proxy (null plus a country returns to a managed location). Returns the account; connection_location is re-read after a location change.
2297
2297
  */
2298
2298
  patch: operations["patchV1AccountsAccountId"];
2299
2299
  trace?: never;
@@ -2789,6 +2789,20 @@ export interface components {
2789
2789
  challenge_type?: string;
2790
2790
  /** @description Present on ACCOUNT_ALREADY_LINKED: the id of your own existing account for this LinkedIn profile, so you can reuse it instead of linking again. Only ever an account of the calling tenant. */
2791
2791
  account_id?: string;
2792
+ /** @description Present on CONNECTION_LOCATION_UNAVAILABLE after a location PATCH that did not land where asked: where the account connects from now (country, current_country, mode, strict), re-read after the change. */
2793
+ connection_location?: {
2794
+ /** @description Configured country (ISO 3166-1 alpha-2). */
2795
+ country?: string | null;
2796
+ /** @description Country of the connection in use now. */
2797
+ current_country?: string | null;
2798
+ /**
2799
+ * @description auto: managed. custom: your own proxy.
2800
+ * @enum {string|null}
2801
+ */
2802
+ mode?: "auto" | "custom" | null;
2803
+ /** @description true: never connects from another country. */
2804
+ strict?: boolean | null;
2805
+ };
2792
2806
  /** @description Present on RATE_LIMIT_ACCOUNT: the per-account request ceiling that was breached, with its name, the units remaining and total, and the absolute reset_time. Wait until reset_time before retrying. */
2793
2807
  quota?: Record<string, never>;
2794
2808
  /** @description Present on TOOLSET_DISABLED: the name of the toolset that is switched off for this tenant, so you can enable it or use another tool. */
@@ -5960,13 +5974,20 @@ export interface operations {
5960
5974
  id: string;
5961
5975
  /** @description Shareable post URL. Present when available. */
5962
5976
  share_url?: string;
5963
- /** @description Post text content. Present when available. */
5977
+ /** @description Post text content. Present when available. Can repeat fragments around links, mentions and hashtags; get the post by its id for the clean body. */
5964
5978
  text?: string;
5979
+ /** @description ISO-8601 UTC datetime the post was published, derived from the post's own activity identity (the same source as get-post's `created_at`). null when the result carries no activity identity to derive it from. */
5980
+ created_at: string | null;
5965
5981
  /** @description Post author object. Present when available. */
5966
5982
  author?: {
5967
5983
  id?: string;
5984
+ /** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
5968
5985
  name?: string | null;
5986
+ /** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
5987
+ display_name?: string;
5969
5988
  is_company?: boolean;
5989
+ /** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
5990
+ type?: string;
5970
5991
  public_identifier?: string | null;
5971
5992
  } & {
5972
5993
  [key: string]: unknown;
@@ -9048,13 +9069,20 @@ export interface operations {
9048
9069
  id: string;
9049
9070
  /** @description Shareable post URL. Present when available. */
9050
9071
  share_url?: string;
9051
- /** @description Post text content. Present when available. */
9072
+ /** @description Post text content. Present when available. Can repeat fragments around links, mentions and hashtags; get the post by its id for the clean body. */
9052
9073
  text?: string;
9074
+ /** @description ISO-8601 UTC datetime the post was published, derived from the post's own activity identity (the same source as get-post's `created_at`). null when the result carries no activity identity to derive it from. */
9075
+ created_at: string | null;
9053
9076
  /** @description Post author object. Present when available. */
9054
9077
  author?: {
9055
9078
  id?: string;
9079
+ /** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
9056
9080
  name?: string | null;
9081
+ /** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
9082
+ display_name?: string;
9057
9083
  is_company?: boolean;
9084
+ /** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
9085
+ type?: string;
9058
9086
  public_identifier?: string | null;
9059
9087
  } & {
9060
9088
  [key: string]: unknown;
@@ -9577,13 +9605,20 @@ export interface operations {
9577
9605
  id: string;
9578
9606
  /** @description Shareable post URL. Present when available. */
9579
9607
  share_url?: string;
9580
- /** @description Post text content. Present when available. */
9608
+ /** @description Post text content. Present when available. Can repeat fragments around links, mentions and hashtags; get the post by its id for the clean body. */
9581
9609
  text?: string;
9610
+ /** @description ISO-8601 UTC datetime the post was published, derived from the post's own activity identity (the same source as get-post's `created_at`). null when the result carries no activity identity to derive it from. */
9611
+ created_at: string | null;
9582
9612
  /** @description Post author object. Present when available. */
9583
9613
  author?: {
9584
9614
  id?: string;
9615
+ /** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
9585
9616
  name?: string | null;
9617
+ /** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
9618
+ display_name?: string;
9586
9619
  is_company?: boolean;
9620
+ /** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
9621
+ type?: string;
9587
9622
  public_identifier?: string | null;
9588
9623
  } & {
9589
9624
  [key: string]: unknown;
@@ -12904,7 +12939,7 @@ export interface operations {
12904
12939
  };
12905
12940
  requestBody?: never;
12906
12941
  responses: {
12907
- /** @description The connected account's home feed as agent-actionable posts. `sort=recent` (default) resolves each post's activity id + author name + post URL + kind; `sort=relevant` resolves the full shape (text, engagement, author id-triple). An empty feed is a valid 200 (items:[], cursor:null). Page until cursor is null. */
12942
+ /** @description The connected account's home feed as agent-actionable posts. `sort=recent` (default) resolves each post's activity id + created_at + text + author name + post URL + kind, with engagement null; `sort=relevant` resolves the full shape (text, engagement, author id-triple). An empty feed is a valid 200 (items:[], cursor:null). Page until cursor is null. */
12908
12943
  200: {
12909
12944
  headers: {
12910
12945
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -12951,8 +12986,10 @@ export interface operations {
12951
12986
  /** @description Canonical profile URL. */
12952
12987
  profile_url: string | null;
12953
12988
  };
12954
- /** @description Full post body, verbatim (relevant). null on recent (the body is nested deep in the source). Pass-through, never stored. */
12989
+ /** @description Full post body, verbatim, on both sorts. null when the post has no body. Pass-through, never stored. */
12955
12990
  text: string | null;
12991
+ /** @description ISO-8601 UTC datetime the feed activity was created, derived from the activity id (the same source as get-post's `created_at`). Both sorts. For a reshare this is when the reshare was made. null when the id does not carry a time. */
12992
+ created_at: string | null;
12956
12993
  /** @description Canonical post URL (recent). null on relevant. */
12957
12994
  post_url: string | null;
12958
12995
  /** @description Post type parsed from the URL slug: ugcPost | share | groupPost | activity | post (recent). Open enum. null on relevant. */
@@ -12968,14 +13005,14 @@ export interface operations {
12968
13005
  /** @description Original post body (pass-through; never stored). */
12969
13006
  text: string | null;
12970
13007
  } | null;
12971
- /** @description Engagement counts. All 0 on recent. */
13008
+ /** @description Engagement counts. Every count is null on recent, which cannot read them; use sort=relevant for counts. A null count is unknown, never zero. */
12972
13009
  engagement: {
12973
- /** @description Reaction count. Defaults 0. */
12974
- likes: number;
12975
- /** @description Comment count. Defaults 0. */
12976
- comments: number;
12977
- /** @description Reshare count. Defaults 0. */
12978
- shares: number;
13010
+ /** @description Reaction count, or null when the sort cannot read it. */
13011
+ likes: number | null;
13012
+ /** @description Comment count, or null when the sort cannot read it. */
13013
+ comments: number | null;
13014
+ /** @description Reshare count, or null when the sort cannot read it. */
13015
+ shares: number | null;
12979
13016
  };
12980
13017
  }[];
12981
13018
  /** @description Opaque cursor for the next page; null when the walk is exhausted. Self-describing of the sort, pass it back verbatim as `cursor`. The relevant cursor expires (~1h). There is no total (an unbounded, reordering stream); page until cursor is null. */
@@ -18030,7 +18067,7 @@ export interface operations {
18030
18067
  title?: string | null;
18031
18068
  /** @description Full post text (content pass-through, never stored). */
18032
18069
  text?: string | null;
18033
- /** @description ISO-8601 UTC datetime this post was created, or null if unavailable. Derived from the post's own identity, so it does not change with the route you used to reach it. For a repost this is when the repost was made, not when the post it reshares was, so it is safe to sort by recency. */
18070
+ /** @description ISO-8601 UTC datetime this post was published, or null when it cannot be told reliably. Derived from the post's own activity identity, so it does not change with the route you used to reach it. null when the post carries no activity identity of its own (often a video or image post), never a guess. For a repost this is when the repost was made, not when the post it reshares was. */
18034
18071
  created_at?: string | null;
18035
18072
  /** @description Total comment count, or null when the platform hides it. */
18036
18073
  comment_count?: number | null;
@@ -18514,7 +18551,7 @@ export interface operations {
18514
18551
  title?: string | null;
18515
18552
  /** @description Full post text (content pass-through, never stored). */
18516
18553
  text?: string | null;
18517
- /** @description ISO-8601 UTC datetime this post was created, or null if unavailable. Derived from the post's own identity, so it does not change with the route you used to reach it. For a repost this is when the repost was made, not when the post it reshares was, so it is safe to sort by recency. */
18554
+ /** @description ISO-8601 UTC datetime this post was published, or null when it cannot be told reliably. Derived from the post's own activity identity, so it does not change with the route you used to reach it. null when the post carries no activity identity of its own (often a video or image post), never a guess. For a repost this is when the repost was made, not when the post it reshares was. */
18518
18555
  created_at?: string | null;
18519
18556
  /** @description Total comment count, or null when the platform hides it. */
18520
18557
  comment_count?: number | null;
@@ -27862,6 +27899,20 @@ export interface operations {
27862
27899
  items?: {
27863
27900
  /** @description Curviate account id (acc_...). */
27864
27901
  account_id?: string;
27902
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
27903
+ connection_location?: {
27904
+ /** @description Configured country (ISO 3166-1 alpha-2). */
27905
+ country?: string | null;
27906
+ /** @description Country of the connection in use right now. */
27907
+ current_country?: string | null;
27908
+ /**
27909
+ * @description auto: managed connection. custom: your own proxy.
27910
+ * @enum {string|null}
27911
+ */
27912
+ mode?: "auto" | "custom" | null;
27913
+ /** @description true: never connects from another country. */
27914
+ strict?: boolean | null;
27915
+ };
27865
27916
  /**
27866
27917
  * @description Stable status whitelist.
27867
27918
  * @enum {string}
@@ -27997,6 +28048,20 @@ export interface operations {
27997
28048
  metadata?: {
27998
28049
  [key: string]: string;
27999
28050
  } | null;
28051
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
28052
+ connection_location?: {
28053
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28054
+ country?: string | null;
28055
+ /** @description Country of the connection in use right now. */
28056
+ current_country?: string | null;
28057
+ /**
28058
+ * @description auto: managed connection. custom: your own proxy.
28059
+ * @enum {string|null}
28060
+ */
28061
+ mode?: "auto" | "custom" | null;
28062
+ /** @description true: never connects from another country. */
28063
+ strict?: boolean | null;
28064
+ };
28000
28065
  /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account, distinct from connected_at. Null until the first background enrichment lands. */
28001
28066
  substrate_created_at?: string | null;
28002
28067
  /** @description Account-safety rows for this account: one entry per counted action for the current window of its grain, plus the derived total and the invitation backlog. Each row reports where the account stands, what it is allowed, which band that puts it in, what happens at the ceiling, whether the ceiling was raised above the Curviate default, and any active pause the platform caused. Whether a breach is refused or merely reported is `posture`, and the default is to report: nothing here refuses until you configure it to. Pacing is still the caller's responsibility, and nothing on this array paces for you. The per-minute REQUEST ceiling is a different thing and is deliberately not in this array: it protects Curviate's own servers rather than your LinkedIn account, it counts requests where these count platform operations, it is always enforced with HTTP 429 whatever your posture, and its envelope is returned on that refusal. Read this array to see where the account stands; read the safety events surface to see what has already been refused or flagged. */
@@ -28266,27 +28331,34 @@ export interface operations {
28266
28331
  } | null;
28267
28332
  /** @description Your own id for this account's end user (1-255 chars), or null to clear it. Omit to leave it unchanged. */
28268
28333
  external_id?: string | null;
28269
- /** @description Custom-proxy egress config, or null to clear it (revert to automatic proxy protection). Omit to leave it unchanged. */
28334
+ /** @description Your own proxy, or null to stop using it and return to a managed location (null requires country in the same request). Omit to leave it unchanged. */
28270
28335
  proxy?: {
28271
28336
  /**
28272
- * @description Proxy protocol. One of http, https, socks5.
28337
+ * @description Proxy protocol. One of http, https, socks5, socks4.
28273
28338
  * @enum {string}
28274
28339
  */
28275
- protocol: "http" | "https" | "socks5";
28340
+ protocol: "http" | "https" | "socks5" | "socks4";
28276
28341
  /** @description Proxy host or IP. */
28277
28342
  host: string;
28278
28343
  /** @description Proxy port (1-65535). */
28279
28344
  port: number;
28280
28345
  /** @description Proxy auth username (optional). */
28281
28346
  username?: string;
28282
- /** @description Proxy auth password (optional). Encrypted at rest, never logged or returned. */
28347
+ /** @description Proxy auth password (optional). Passed to the connection only: never stored, logged or returned. */
28283
28348
  password?: string;
28284
28349
  } | null;
28350
+ /**
28351
+ * @description Move this account's connection location to this supported ISO 3166-1 alpha-2 country (e.g. US, DE). LinkedIn sees a new IP in that country and may ask the owner to verify, so change it only when the current location is wrong. Strict unless allow_country_fallback is true. On an account using your own proxy, send proxy: null with it.
28352
+ * @enum {string}
28353
+ */
28354
+ country?: "AE" | "AO" | "AR" | "AT" | "AU" | "BD" | "BE" | "BG" | "BR" | "CA" | "CH" | "CL" | "CN" | "CO" | "CY" | "CZ" | "DE" | "DK" | "EE" | "EG" | "ES" | "FI" | "FR" | "GB" | "GT" | "HK" | "ID" | "IE" | "IL" | "IN" | "IT" | "JP" | "KR" | "KZ" | "MA" | "MX" | "MY" | "NL" | "NO" | "PA" | "PH" | "PK" | "PL" | "PR" | "PT" | "RO" | "SA" | "SE" | "SG" | "TH" | "TN" | "TR" | "UA" | "US" | "VN" | "ZA";
28355
+ /** @description Optional. false (the default with country or ip): only ever connect from that country; a connect fails when no connection is free there. true: a connection from another country may be used when none is free in the chosen one. Not accepted with proxy. */
28356
+ allow_country_fallback?: boolean;
28285
28357
  };
28286
28358
  };
28287
28359
  };
28288
28360
  responses: {
28289
- /** @description The account was updated. metadata and external_id are stored by Curviate and read back on GET; a PATCH carrying only those makes no LinkedIn call. */
28361
+ /** @description The updated account: the object GET /v1/accounts/{account_id} returns, without quotas and event_log (read those on GET). After a location change, connection_location is re-read from LinkedIn's side, so it shows where the account really connects from now. metadata and external_id are stored by Curviate; a PATCH carrying only those makes no LinkedIn call. */
28290
28362
  200: {
28291
28363
  headers: {
28292
28364
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -28301,11 +28373,55 @@ export interface operations {
28301
28373
  */
28302
28374
  object?: "account";
28303
28375
  account_id?: string;
28376
+ /** @enum {string} */
28377
+ status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
28378
+ auth_method?: string;
28379
+ full_name?: string | null;
28380
+ headline?: string | null;
28381
+ /** @description ISO-8601 UTC connection timestamp. */
28382
+ connected_at?: string | null;
28383
+ /** @description ISO-8601 UTC time the account state was last checked. */
28384
+ last_checked_at?: string;
28385
+ /** @description The seat this account occupies (null for an admin seatless account). */
28386
+ seat_id?: string | null;
28387
+ /** @description The connection scope this account was last connected with (e.g. ["classic","company","sales_navigator","recruiter"]). A connect asks for every product and LinkedIn activates the ones the account actually has, so this is what was ASKED for, narrowed only by an explicit linkedin_premium on that connect. A linkedin_premium narrowing is not remembered between connects, so this shows what the LAST connect asked for and a reconnect that omits the field widens it again. Null for accounts connected before this was recorded; not attachment truth for Company Pages. */
28388
+ requested_products?: ("classic" | "company" | "sales_navigator" | "recruiter")[] | null;
28389
+ /** @description Your own id for this account's end user, as set on connect or PATCH. Null when none. Not unique. */
28390
+ external_id?: string | null;
28391
+ /** @description Your own flat string map for this account, as last set by PATCH. Null when none. */
28392
+ metadata?: {
28393
+ [key: string]: string;
28394
+ } | null;
28395
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
28396
+ connection_location?: {
28397
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28398
+ country?: string | null;
28399
+ /** @description Country of the connection in use right now. */
28400
+ current_country?: string | null;
28401
+ /**
28402
+ * @description auto: managed connection. custom: your own proxy.
28403
+ * @enum {string|null}
28404
+ */
28405
+ mode?: "auto" | "custom" | null;
28406
+ /** @description true: never connects from another country. */
28407
+ strict?: boolean | null;
28408
+ };
28409
+ /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account, distinct from connected_at. Null until the first background enrichment lands. */
28410
+ substrate_created_at?: string | null;
28411
+ /** @description Platform conditions this LinkedIn account is currently in, additive to `status` and independent of it. `recruiter_session_evicted`: the account is signed in somewhere else and LinkedIn allows one session at a time for it, so a person has to close the other session; reconnecting will not help. `commercial_use_limited`: LinkedIn's commercial-use limit has tripped, so people search returns only a handful of results per query. It is a paywall, not a penalty, and nothing else about the account is affected. `profile_view_limited`: profile views outside this account's own network are being blocked; first-degree views still work. The two limits are detected from their symptom: LinkedIn publishes no threshold for either, exposes no counter, and lifts neither on request, so no number is reported. `commercial_use_limited` is a present-tense reading and a genuinely narrow search can also produce the shape it looks for, so treat it as a reason to check rather than a certainty; the next people search that returns a full page clears it. An account in none of these reports an empty array. */
28412
+ account_states?: ("recruiter_session_evicted" | "commercial_use_limited" | "profile_view_limited")[];
28413
+ /** @description The account's activity window, the hours in which Curviate reports or refuses live writes to LinkedIn. Reads and anything served from Curviate's own store are never affected, at any hour. Configure it on the account's safety policy. */
28414
+ activity_window?: {
28415
+ /** @description The IANA zone the window is read in, or null when none is set. */
28416
+ timezone?: string | null;
28417
+ /** @description True when no zone is set, which DISABLES the activity window. Curviate never guesses a zone: a guess eight hours wrong inverts the window, refusing every daytime write and permitting every nocturnal one. If you configured a window and it never fires, this is why. */
28418
+ timezone_unset?: boolean;
28419
+ };
28304
28420
  safety_warning?: components["schemas"]["SafetyWarning"];
28305
28421
  };
28306
28422
  };
28307
28423
  };
28308
- /** @description Invalid request: a malformed proxy object, metadata over its limits (16 keys, key 40 chars, value 500), external_id outside 1-255 chars, or an unsupported field (country/ip). */
28424
+ /** @description INVALID_REQUEST: a malformed proxy object; proxy together with country or allow_country_fallback; country on an account that uses your own proxy without proxy: null; allow_country_fallback alone on such an account; an unsupported country; ip (not changeable after connect; reconnect with ip instead); metadata over its limits (16 keys, key 40 chars, value 500); external_id outside 1-255 chars. CONNECTION_LOCATION_REQUIRED: proxy: null without country (clearing your own proxy alone would let the connection land anywhere). */
28309
28425
  400: {
28310
28426
  headers: {
28311
28427
  [name: string]: unknown;
@@ -28323,6 +28439,15 @@ export interface operations {
28323
28439
  "application/json": components["schemas"]["Error"];
28324
28440
  };
28325
28441
  };
28442
+ /** @description REAUTH_REQUIRED: the account is disconnected, so its location cannot change in place. Reconnect it (POST /v1/auth/intent with account_id) and pass country there. */
28443
+ 409: {
28444
+ headers: {
28445
+ [name: string]: unknown;
28446
+ };
28447
+ content: {
28448
+ "application/json": components["schemas"]["Error"];
28449
+ };
28450
+ };
28326
28451
  /** @description Payload too large, the request body exceeds the size limit. */
28327
28452
  413: {
28328
28453
  headers: {
@@ -28332,6 +28457,15 @@ export interface operations {
28332
28457
  "application/json": components["schemas"]["Error"];
28333
28458
  };
28334
28459
  };
28460
+ /** @description CONNECTION_LOCATION_UNAVAILABLE: no connection is free in that country right now, or the account did not end up there. When the change was applied but landed elsewhere, the body carries connection_location with where the account connects from now. Try a nearby country, or allow fallback. */
28461
+ 422: {
28462
+ headers: {
28463
+ [name: string]: unknown;
28464
+ };
28465
+ content: {
28466
+ "application/json": components["schemas"]["Error"];
28467
+ };
28468
+ };
28335
28469
  /** @description Rate limited, slow down and retry after the hinted delay. */
28336
28470
  429: {
28337
28471
  headers: {
@@ -28520,24 +28654,29 @@ export interface operations {
28520
28654
  external_id?: string;
28521
28655
  /** @description Optional allow-list of premium products to ask for: sales_navigator, recruiter. Omit to ask for both; [] asks for none. Classic LinkedIn and company pages are always included. */
28522
28656
  products?: ("sales_navigator" | "recruiter")[];
28523
- /** @description Managed proxy location hint as an ISO 3166-1 alpha-2 country code (e.g. US, DE). */
28524
- country?: string;
28525
- /** @description IPv4 address used to infer the managed proxy location. */
28657
+ /**
28658
+ * @description Where LinkedIn sees this account connecting from: a supported ISO 3166-1 alpha-2 country code (e.g. US, DE; case-insensitive). Pick the country the account owner normally signs in from. A new connect needs exactly one of country, ip or proxy. Strict by default: the connect fails rather than use another country, unless allow_country_fallback is true.
28659
+ * @enum {string}
28660
+ */
28661
+ country?: "AE" | "AO" | "AR" | "AT" | "AU" | "BD" | "BE" | "BG" | "BR" | "CA" | "CH" | "CL" | "CN" | "CO" | "CY" | "CZ" | "DE" | "DK" | "EE" | "EG" | "ES" | "FI" | "FR" | "GB" | "GT" | "HK" | "ID" | "IE" | "IL" | "IN" | "IT" | "JP" | "KR" | "KZ" | "MA" | "MX" | "MY" | "NL" | "NO" | "PA" | "PH" | "PK" | "PL" | "PR" | "PT" | "RO" | "SA" | "SE" | "SG" | "TH" | "TN" | "TR" | "UA" | "US" | "VN" | "ZA";
28662
+ /** @description A public IPv4 address; its country becomes the connection location (strict by default). An alternative to country: send exactly one of country, ip or proxy on a new connect. */
28526
28663
  ip?: string;
28527
- /** @description Managed-proxy egress configuration for this account's outbound traffic. */
28664
+ /** @description Optional. false (the default with country or ip): only ever connect from that country; a connect fails when no connection is free there. true: a connection from another country may be used when none is free in the chosen one. Not accepted with proxy. */
28665
+ allow_country_fallback?: boolean;
28666
+ /** @description Your own proxy for this account's traffic. The proxy decides where LinkedIn sees the account connecting from, so country, ip and allow_country_fallback are not accepted with it. */
28528
28667
  proxy?: {
28529
28668
  /**
28530
- * @description Proxy protocol. One of http, https, socks5.
28669
+ * @description Proxy protocol. One of http, https, socks5, socks4.
28531
28670
  * @enum {string}
28532
28671
  */
28533
- protocol: "http" | "https" | "socks5";
28672
+ protocol: "http" | "https" | "socks5" | "socks4";
28534
28673
  /** @description Proxy host or IP. */
28535
28674
  host: string;
28536
28675
  /** @description Proxy port (1-65535). */
28537
28676
  port: number;
28538
28677
  /** @description Proxy auth username (optional). */
28539
28678
  username?: string;
28540
- /** @description Proxy auth password (optional). Encrypted at rest, never logged or returned. */
28679
+ /** @description Proxy auth password (optional). Passed to the connection only: never stored, logged or returned. */
28541
28680
  password?: string;
28542
28681
  };
28543
28682
  /** @description Exact browser User-Agent to pin for this account. REQUIRED for a cookie connect: send the User-Agent of the browser the li_at cookie was copied from. Optional for a credentials connect, where it helps an account that hits disconnection issues. */
@@ -28574,6 +28713,22 @@ export interface operations {
28574
28713
  status?: "active";
28575
28714
  /** @description Your own id for this account's end user, as set on connect or PATCH. Null when none. Not unique. */
28576
28715
  external_id?: string | null;
28716
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
28717
+ connection_location?: {
28718
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28719
+ country?: string | null;
28720
+ /** @description Country of the connection in use right now. */
28721
+ current_country?: string | null;
28722
+ /**
28723
+ * @description auto: managed connection. custom: your own proxy.
28724
+ * @enum {string|null}
28725
+ */
28726
+ mode?: "auto" | "custom" | null;
28727
+ /** @description true: never connects from another country. */
28728
+ strict?: boolean | null;
28729
+ /** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
28730
+ previous_country?: string;
28731
+ };
28577
28732
  safety_warning?: components["schemas"]["SafetyWarning"];
28578
28733
  };
28579
28734
  };
@@ -28610,6 +28765,22 @@ export interface operations {
28610
28765
  external_id?: string | null;
28611
28766
  /** @description Present and true only when this connect reactivated an account you had previously disconnected, instead of opening a brand-new one. Absent on a normal connect. The account keeps its original id, and its status reflects its real observed state, which may need a reconnect. */
28612
28767
  recovered?: boolean;
28768
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
28769
+ connection_location?: {
28770
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28771
+ country?: string | null;
28772
+ /** @description Country of the connection in use right now. */
28773
+ current_country?: string | null;
28774
+ /**
28775
+ * @description auto: managed connection. custom: your own proxy.
28776
+ * @enum {string|null}
28777
+ */
28778
+ mode?: "auto" | "custom" | null;
28779
+ /** @description true: never connects from another country. */
28780
+ strict?: boolean | null;
28781
+ /** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
28782
+ previous_country?: string;
28783
+ };
28613
28784
  safety_warning?: components["schemas"]["SafetyWarning"];
28614
28785
  };
28615
28786
  };
@@ -28659,7 +28830,7 @@ export interface operations {
28659
28830
  };
28660
28831
  };
28661
28832
  };
28662
- /** @description INVALID_REQUEST. The most common causes: the auth block is at the top level instead of nested (send `credentials: { email, password }` or `cookie: { li_at }`, not bare `email`/`password`/`li_at`); `seat_id` is missing on a new connect; or a cookie connect has no top-level `user_agent`. SEAT_NOT_FOUND if the seat id is unknown or is not yours. */
28833
+ /** @description CONNECTION_LOCATION_REQUIRED: a new connect names no location; send exactly one of `country` (a supported ISO code, e.g. `US`), `ip` (a public IPv4) or your own `proxy`. INVALID_REQUEST. The most common causes: two location sources at once (`ip` overrides `country`, `proxy` overrides both, so send one); an unsupported `country` (use `proxy` for a location we don't serve); a private or reserved `ip`; `allow_country_fallback` together with `proxy`; your own proxy rejected its credentials, could not be reached or timed out (the message names which); the auth block is at the top level instead of nested (send `credentials: { email, password }` or `cookie: { li_at }`, not bare `email`/`password`/`li_at`); `seat_id` is missing on a new connect; or a cookie connect has no top-level `user_agent`. SEAT_NOT_FOUND if the seat id is unknown or is not yours. */
28663
28834
  400: {
28664
28835
  headers: {
28665
28836
  [name: string]: unknown;
@@ -28695,7 +28866,7 @@ export interface operations {
28695
28866
  "application/json": components["schemas"]["Error"];
28696
28867
  };
28697
28868
  };
28698
- /** @description This LinkedIn account is already linked (names your own account_id when your tenant owns it). */
28869
+ /** @description ACCOUNT_ALREADY_LINKED: this LinkedIn account is already linked. It names your own account_id when your tenant owns it; otherwise no id is named, it is not one you can manage here, and retrying will not help. CONNECTION_IN_PROGRESS: another connection attempt for this identity is open; wait for it to finish or expire. */
28699
28870
  409: {
28700
28871
  headers: {
28701
28872
  [name: string]: unknown;
@@ -28713,7 +28884,7 @@ export interface operations {
28713
28884
  "application/json": components["schemas"]["Error"];
28714
28885
  };
28715
28886
  };
28716
- /** @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. */
28887
+ /** @description CONNECTION_LOCATION_UNAVAILABLE: no connection is free in the country you chose right now (it is strict); try a nearby country, or send allow_country_fallback: true. Also returned when the connect re-attached an account you already had and its location could not be changed here (sent as ip): the body carries connection_location, and PATCH /v1/accounts/{account_id} with country moves it. CHECKPOINT_UNSUPPORTED: 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. */
28717
28888
  422: {
28718
28889
  headers: {
28719
28890
  [name: string]: unknown;
@@ -28818,6 +28989,22 @@ export interface operations {
28818
28989
  external_id?: string | null;
28819
28990
  /** @description Present and true only when this connect reactivated an account you had previously disconnected, instead of opening a brand-new one. Absent on a normal connect. The account keeps its original id, and its status reflects its real observed state, which may need a reconnect. */
28820
28991
  recovered?: boolean;
28992
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. */
28993
+ connection_location?: {
28994
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28995
+ country?: string | null;
28996
+ /** @description Country of the connection in use right now. */
28997
+ current_country?: string | null;
28998
+ /**
28999
+ * @description auto: managed connection. custom: your own proxy.
29000
+ * @enum {string|null}
29001
+ */
29002
+ mode?: "auto" | "custom" | null;
29003
+ /** @description true: never connects from another country. */
29004
+ strict?: boolean | null;
29005
+ /** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
29006
+ previous_country?: string;
29007
+ };
28821
29008
  safety_warning?: components["schemas"]["SafetyWarning"];
28822
29009
  };
28823
29010
  };
@@ -28901,7 +29088,7 @@ export interface operations {
28901
29088
  "application/json": components["schemas"]["Error"];
28902
29089
  };
28903
29090
  };
28904
- /** @description The submitted code was incorrect, or the challenge type is unsupported. */
29091
+ /** @description The submitted code was incorrect, or the challenge type is unsupported. CONNECTION_LOCATION_UNAVAILABLE: the connect completed onto an account you already had, and the location you sent could not be applied (no connection free in that country, or it was an ip); the account stays connected, the body carries its actual connection_location, and PATCH /v1/accounts/{account_id} with country moves it. */
28905
29092
  422: {
28906
29093
  headers: {
28907
29094
  [name: string]: unknown;
@@ -29197,6 +29384,22 @@ export interface operations {
29197
29384
  attached_seat_id?: string | null;
29198
29385
  /** @description Your own id for this account's end user, as passed on connect. Present on status:"active". */
29199
29386
  external_id?: string | null;
29387
+ /** @description Where LinkedIn sees this account connecting from. country: the configured country (ISO 3166-1 alpha-2), the one the account is set to use. current_country: the country of the connection in use right now; it differs from country only after a fallback, which can happen only when strict is false. mode: auto (a managed connection in country) or custom (your own proxy). strict: true when the account never connects from another country, null when unknown. Each field is null until known; an account connected through ip or your own proxy may show null until the next background refresh. Change it with PATCH /v1/accounts/{account_id} (country), or by reconnecting with country. Present on object:"account". */
29388
+ connection_location?: {
29389
+ /** @description Configured country (ISO 3166-1 alpha-2). */
29390
+ country?: string | null;
29391
+ /** @description Country of the connection in use right now. */
29392
+ current_country?: string | null;
29393
+ /**
29394
+ * @description auto: managed connection. custom: your own proxy.
29395
+ * @enum {string|null}
29396
+ */
29397
+ mode?: "auto" | "custom" | null;
29398
+ /** @description true: never connects from another country. */
29399
+ strict?: boolean | null;
29400
+ /** @description Present only when this connect landed on an account you already had and changed its configured country (to another one, to unknown with ip, or to your own proxy). It names the country before. */
29401
+ previous_country?: string;
29402
+ };
29200
29403
  /** @description ISO-8601 expiry. Present on status:"pending" and status:"checkpoint_required". */
29201
29404
  expires_at?: string;
29202
29405
  /**
@@ -29251,7 +29454,7 @@ export interface operations {
29251
29454
  "application/json": components["schemas"]["Error"];
29252
29455
  };
29253
29456
  };
29254
- /** @description The pending checkpoint is code-based, not mobile_app_approval, use submit instead. */
29457
+ /** @description The pending checkpoint is code-based, not mobile_app_approval, use submit instead. CONNECTION_LOCATION_UNAVAILABLE: the approval completed onto an account you already had, and the location you sent could not be applied; the account stays connected, the body carries its actual connection_location, and PATCH /v1/accounts/{account_id} with country moves it. */
29255
29458
  422: {
29256
29459
  headers: {
29257
29460
  [name: string]: unknown;
@@ -31701,7 +31904,7 @@ export interface operations {
31701
31904
  "application/json": components["schemas"]["Error"];
31702
31905
  };
31703
31906
  };
31704
- /** @description The purchase failed after today's charge was taken; the charge was refunded in full and the seat count was confirmed unchanged, so no seats were added. Safe to retry. */
31907
+ /** @description No seats were added. Branch on retry_likely_to_succeed. true: today's charge was refunded in full and the seat count was confirmed unchanged, so a retry is safe. false: whether today's charge went through could not be confirmed; a retry is a new purchase and could charge twice, so check your invoices first. */
31705
31908
  502: {
31706
31909
  headers: {
31707
31910
  [name: string]: unknown;