@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.
package/dist/index.d.ts CHANGED
@@ -723,7 +723,7 @@ interface paths {
723
723
  put?: never;
724
724
  /**
725
725
  * Search posts
726
- * @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.
726
+ * @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.
727
727
  */
728
728
  post: operations["postV1AccountIdSearchPosts"];
729
729
  delete?: never;
@@ -2390,8 +2390,8 @@ interface paths {
2390
2390
  options?: never;
2391
2391
  head?: never;
2392
2392
  /**
2393
- * Update account metadata / proxy configuration
2394
- * @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.
2393
+ * Update an account's metadata or connection location
2394
+ * @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.
2395
2395
  */
2396
2396
  patch: operations["patchV1AccountsAccountId"];
2397
2397
  trace?: never;
@@ -2886,6 +2886,20 @@ interface components {
2886
2886
  challenge_type?: string;
2887
2887
  /** @description Present on ACCOUNT_ALREADY_LINKED: the id of your own existing account for this LinkedIn profile, so you can reuse it instead of linking again. Only ever an account of the calling tenant. */
2888
2888
  account_id?: string;
2889
+ /** @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. */
2890
+ connection_location?: {
2891
+ /** @description Configured country (ISO 3166-1 alpha-2). */
2892
+ country?: string | null;
2893
+ /** @description Country of the connection in use now. */
2894
+ current_country?: string | null;
2895
+ /**
2896
+ * @description auto: managed. custom: your own proxy.
2897
+ * @enum {string|null}
2898
+ */
2899
+ mode?: "auto" | "custom" | null;
2900
+ /** @description true: never connects from another country. */
2901
+ strict?: boolean | null;
2902
+ };
2889
2903
  /** @description Present on RATE_LIMIT_ACCOUNT: the per-account request ceiling that was breached, with its name, the units remaining and total, and the absolute reset_time. Wait until reset_time before retrying. */
2890
2904
  quota?: Record<string, never>;
2891
2905
  /** @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. */
@@ -6056,13 +6070,20 @@ interface operations {
6056
6070
  id: string;
6057
6071
  /** @description Shareable post URL. Present when available. */
6058
6072
  share_url?: string;
6059
- /** @description Post text content. Present when available. */
6073
+ /** @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. */
6060
6074
  text?: string;
6075
+ /** @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. */
6076
+ created_at: string | null;
6061
6077
  /** @description Post author object. Present when available. */
6062
6078
  author?: {
6063
6079
  id?: string;
6080
+ /** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
6064
6081
  name?: string | null;
6082
+ /** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
6083
+ display_name?: string;
6065
6084
  is_company?: boolean;
6085
+ /** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
6086
+ type?: string;
6066
6087
  public_identifier?: string | null;
6067
6088
  } & {
6068
6089
  [key: string]: unknown;
@@ -9144,13 +9165,20 @@ interface operations {
9144
9165
  id: string;
9145
9166
  /** @description Shareable post URL. Present when available. */
9146
9167
  share_url?: string;
9147
- /** @description Post text content. Present when available. */
9168
+ /** @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. */
9148
9169
  text?: string;
9170
+ /** @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. */
9171
+ created_at: string | null;
9149
9172
  /** @description Post author object. Present when available. */
9150
9173
  author?: {
9151
9174
  id?: string;
9175
+ /** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
9152
9176
  name?: string | null;
9177
+ /** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
9178
+ display_name?: string;
9153
9179
  is_company?: boolean;
9180
+ /** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
9181
+ type?: string;
9154
9182
  public_identifier?: string | null;
9155
9183
  } & {
9156
9184
  [key: string]: unknown;
@@ -9673,13 +9701,20 @@ interface operations {
9673
9701
  id: string;
9674
9702
  /** @description Shareable post URL. Present when available. */
9675
9703
  share_url?: string;
9676
- /** @description Post text content. Present when available. */
9704
+ /** @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. */
9677
9705
  text?: string;
9706
+ /** @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. */
9707
+ created_at: string | null;
9678
9708
  /** @description Post author object. Present when available. */
9679
9709
  author?: {
9680
9710
  id?: string;
9711
+ /** @description Author's display name, on the shape that carries `name`. Read `name` when present, else `display_name`. */
9681
9712
  name?: string | null;
9713
+ /** @description Author's display name, on the shape that carries `display_name` instead of `name`. */
9714
+ display_name?: string;
9682
9715
  is_company?: boolean;
9716
+ /** @description Author entity type (for example individual or organization), on the shape that carries `display_name`. */
9717
+ type?: string;
9683
9718
  public_identifier?: string | null;
9684
9719
  } & {
9685
9720
  [key: string]: unknown;
@@ -13000,7 +13035,7 @@ interface operations {
13000
13035
  };
13001
13036
  requestBody?: never;
13002
13037
  responses: {
13003
- /** @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. */
13038
+ /** @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. */
13004
13039
  200: {
13005
13040
  headers: {
13006
13041
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -13047,8 +13082,10 @@ interface operations {
13047
13082
  /** @description Canonical profile URL. */
13048
13083
  profile_url: string | null;
13049
13084
  };
13050
- /** @description Full post body, verbatim (relevant). null on recent (the body is nested deep in the source). Pass-through, never stored. */
13085
+ /** @description Full post body, verbatim, on both sorts. null when the post has no body. Pass-through, never stored. */
13051
13086
  text: string | null;
13087
+ /** @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. */
13088
+ created_at: string | null;
13052
13089
  /** @description Canonical post URL (recent). null on relevant. */
13053
13090
  post_url: string | null;
13054
13091
  /** @description Post type parsed from the URL slug: ugcPost | share | groupPost | activity | post (recent). Open enum. null on relevant. */
@@ -13064,14 +13101,14 @@ interface operations {
13064
13101
  /** @description Original post body (pass-through; never stored). */
13065
13102
  text: string | null;
13066
13103
  } | null;
13067
- /** @description Engagement counts. All 0 on recent. */
13104
+ /** @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. */
13068
13105
  engagement: {
13069
- /** @description Reaction count. Defaults 0. */
13070
- likes: number;
13071
- /** @description Comment count. Defaults 0. */
13072
- comments: number;
13073
- /** @description Reshare count. Defaults 0. */
13074
- shares: number;
13106
+ /** @description Reaction count, or null when the sort cannot read it. */
13107
+ likes: number | null;
13108
+ /** @description Comment count, or null when the sort cannot read it. */
13109
+ comments: number | null;
13110
+ /** @description Reshare count, or null when the sort cannot read it. */
13111
+ shares: number | null;
13075
13112
  };
13076
13113
  }[];
13077
13114
  /** @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. */
@@ -18126,7 +18163,7 @@ interface operations {
18126
18163
  title?: string | null;
18127
18164
  /** @description Full post text (content pass-through, never stored). */
18128
18165
  text?: string | null;
18129
- /** @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. */
18166
+ /** @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. */
18130
18167
  created_at?: string | null;
18131
18168
  /** @description Total comment count, or null when the platform hides it. */
18132
18169
  comment_count?: number | null;
@@ -18610,7 +18647,7 @@ interface operations {
18610
18647
  title?: string | null;
18611
18648
  /** @description Full post text (content pass-through, never stored). */
18612
18649
  text?: string | null;
18613
- /** @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. */
18650
+ /** @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. */
18614
18651
  created_at?: string | null;
18615
18652
  /** @description Total comment count, or null when the platform hides it. */
18616
18653
  comment_count?: number | null;
@@ -27958,6 +27995,20 @@ interface operations {
27958
27995
  items?: {
27959
27996
  /** @description Curviate account id (acc_...). */
27960
27997
  account_id?: string;
27998
+ /** @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. */
27999
+ connection_location?: {
28000
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28001
+ country?: string | null;
28002
+ /** @description Country of the connection in use right now. */
28003
+ current_country?: string | null;
28004
+ /**
28005
+ * @description auto: managed connection. custom: your own proxy.
28006
+ * @enum {string|null}
28007
+ */
28008
+ mode?: "auto" | "custom" | null;
28009
+ /** @description true: never connects from another country. */
28010
+ strict?: boolean | null;
28011
+ };
27961
28012
  /**
27962
28013
  * @description Stable status whitelist.
27963
28014
  * @enum {string}
@@ -28093,6 +28144,20 @@ interface operations {
28093
28144
  metadata?: {
28094
28145
  [key: string]: string;
28095
28146
  } | null;
28147
+ /** @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. */
28148
+ connection_location?: {
28149
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28150
+ country?: string | null;
28151
+ /** @description Country of the connection in use right now. */
28152
+ current_country?: string | null;
28153
+ /**
28154
+ * @description auto: managed connection. custom: your own proxy.
28155
+ * @enum {string|null}
28156
+ */
28157
+ mode?: "auto" | "custom" | null;
28158
+ /** @description true: never connects from another country. */
28159
+ strict?: boolean | null;
28160
+ };
28096
28161
  /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account, distinct from connected_at. Null until the first background enrichment lands. */
28097
28162
  substrate_created_at?: string | null;
28098
28163
  /** @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. */
@@ -28362,27 +28427,34 @@ interface operations {
28362
28427
  } | null;
28363
28428
  /** @description Your own id for this account's end user (1-255 chars), or null to clear it. Omit to leave it unchanged. */
28364
28429
  external_id?: string | null;
28365
- /** @description Custom-proxy egress config, or null to clear it (revert to automatic proxy protection). Omit to leave it unchanged. */
28430
+ /** @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. */
28366
28431
  proxy?: {
28367
28432
  /**
28368
- * @description Proxy protocol. One of http, https, socks5.
28433
+ * @description Proxy protocol. One of http, https, socks5, socks4.
28369
28434
  * @enum {string}
28370
28435
  */
28371
- protocol: "http" | "https" | "socks5";
28436
+ protocol: "http" | "https" | "socks5" | "socks4";
28372
28437
  /** @description Proxy host or IP. */
28373
28438
  host: string;
28374
28439
  /** @description Proxy port (1-65535). */
28375
28440
  port: number;
28376
28441
  /** @description Proxy auth username (optional). */
28377
28442
  username?: string;
28378
- /** @description Proxy auth password (optional). Encrypted at rest, never logged or returned. */
28443
+ /** @description Proxy auth password (optional). Passed to the connection only: never stored, logged or returned. */
28379
28444
  password?: string;
28380
28445
  } | null;
28446
+ /**
28447
+ * @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.
28448
+ * @enum {string}
28449
+ */
28450
+ 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";
28451
+ /** @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. */
28452
+ allow_country_fallback?: boolean;
28381
28453
  };
28382
28454
  };
28383
28455
  };
28384
28456
  responses: {
28385
- /** @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. */
28457
+ /** @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. */
28386
28458
  200: {
28387
28459
  headers: {
28388
28460
  "RateLimit-Policy": components["headers"]["RateLimit-Policy"];
@@ -28397,11 +28469,55 @@ interface operations {
28397
28469
  */
28398
28470
  object?: "account";
28399
28471
  account_id?: string;
28472
+ /** @enum {string} */
28473
+ status?: "active" | "reconnect_needed" | "restricted" | "connecting" | "disconnected";
28474
+ auth_method?: string;
28475
+ full_name?: string | null;
28476
+ headline?: string | null;
28477
+ /** @description ISO-8601 UTC connection timestamp. */
28478
+ connected_at?: string | null;
28479
+ /** @description ISO-8601 UTC time the account state was last checked. */
28480
+ last_checked_at?: string;
28481
+ /** @description The seat this account occupies (null for an admin seatless account). */
28482
+ seat_id?: string | null;
28483
+ /** @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. */
28484
+ requested_products?: ("classic" | "company" | "sales_navigator" | "recruiter")[] | null;
28485
+ /** @description Your own id for this account's end user, as set on connect or PATCH. Null when none. Not unique. */
28486
+ external_id?: string | null;
28487
+ /** @description Your own flat string map for this account, as last set by PATCH. Null when none. */
28488
+ metadata?: {
28489
+ [key: string]: string;
28490
+ } | null;
28491
+ /** @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. */
28492
+ connection_location?: {
28493
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28494
+ country?: string | null;
28495
+ /** @description Country of the connection in use right now. */
28496
+ current_country?: string | null;
28497
+ /**
28498
+ * @description auto: managed connection. custom: your own proxy.
28499
+ * @enum {string|null}
28500
+ */
28501
+ mode?: "auto" | "custom" | null;
28502
+ /** @description true: never connects from another country. */
28503
+ strict?: boolean | null;
28504
+ };
28505
+ /** @description ISO-8601 UTC creation timestamp of the underlying LinkedIn account, distinct from connected_at. Null until the first background enrichment lands. */
28506
+ substrate_created_at?: string | null;
28507
+ /** @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. */
28508
+ account_states?: ("recruiter_session_evicted" | "commercial_use_limited" | "profile_view_limited")[];
28509
+ /** @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. */
28510
+ activity_window?: {
28511
+ /** @description The IANA zone the window is read in, or null when none is set. */
28512
+ timezone?: string | null;
28513
+ /** @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. */
28514
+ timezone_unset?: boolean;
28515
+ };
28400
28516
  safety_warning?: components["schemas"]["SafetyWarning"];
28401
28517
  };
28402
28518
  };
28403
28519
  };
28404
- /** @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). */
28520
+ /** @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). */
28405
28521
  400: {
28406
28522
  headers: {
28407
28523
  [name: string]: unknown;
@@ -28419,6 +28535,15 @@ interface operations {
28419
28535
  "application/json": components["schemas"]["Error"];
28420
28536
  };
28421
28537
  };
28538
+ /** @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. */
28539
+ 409: {
28540
+ headers: {
28541
+ [name: string]: unknown;
28542
+ };
28543
+ content: {
28544
+ "application/json": components["schemas"]["Error"];
28545
+ };
28546
+ };
28422
28547
  /** @description Payload too large, the request body exceeds the size limit. */
28423
28548
  413: {
28424
28549
  headers: {
@@ -28428,6 +28553,15 @@ interface operations {
28428
28553
  "application/json": components["schemas"]["Error"];
28429
28554
  };
28430
28555
  };
28556
+ /** @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. */
28557
+ 422: {
28558
+ headers: {
28559
+ [name: string]: unknown;
28560
+ };
28561
+ content: {
28562
+ "application/json": components["schemas"]["Error"];
28563
+ };
28564
+ };
28431
28565
  /** @description Rate limited, slow down and retry after the hinted delay. */
28432
28566
  429: {
28433
28567
  headers: {
@@ -28616,24 +28750,29 @@ interface operations {
28616
28750
  external_id?: string;
28617
28751
  /** @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. */
28618
28752
  products?: ("sales_navigator" | "recruiter")[];
28619
- /** @description Managed proxy location hint as an ISO 3166-1 alpha-2 country code (e.g. US, DE). */
28620
- country?: string;
28621
- /** @description IPv4 address used to infer the managed proxy location. */
28753
+ /**
28754
+ * @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.
28755
+ * @enum {string}
28756
+ */
28757
+ 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";
28758
+ /** @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. */
28622
28759
  ip?: string;
28623
- /** @description Managed-proxy egress configuration for this account's outbound traffic. */
28760
+ /** @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. */
28761
+ allow_country_fallback?: boolean;
28762
+ /** @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. */
28624
28763
  proxy?: {
28625
28764
  /**
28626
- * @description Proxy protocol. One of http, https, socks5.
28765
+ * @description Proxy protocol. One of http, https, socks5, socks4.
28627
28766
  * @enum {string}
28628
28767
  */
28629
- protocol: "http" | "https" | "socks5";
28768
+ protocol: "http" | "https" | "socks5" | "socks4";
28630
28769
  /** @description Proxy host or IP. */
28631
28770
  host: string;
28632
28771
  /** @description Proxy port (1-65535). */
28633
28772
  port: number;
28634
28773
  /** @description Proxy auth username (optional). */
28635
28774
  username?: string;
28636
- /** @description Proxy auth password (optional). Encrypted at rest, never logged or returned. */
28775
+ /** @description Proxy auth password (optional). Passed to the connection only: never stored, logged or returned. */
28637
28776
  password?: string;
28638
28777
  };
28639
28778
  /** @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. */
@@ -28670,6 +28809,22 @@ interface operations {
28670
28809
  status?: "active";
28671
28810
  /** @description Your own id for this account's end user, as set on connect or PATCH. Null when none. Not unique. */
28672
28811
  external_id?: string | null;
28812
+ /** @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. */
28813
+ connection_location?: {
28814
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28815
+ country?: string | null;
28816
+ /** @description Country of the connection in use right now. */
28817
+ current_country?: string | null;
28818
+ /**
28819
+ * @description auto: managed connection. custom: your own proxy.
28820
+ * @enum {string|null}
28821
+ */
28822
+ mode?: "auto" | "custom" | null;
28823
+ /** @description true: never connects from another country. */
28824
+ strict?: boolean | null;
28825
+ /** @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. */
28826
+ previous_country?: string;
28827
+ };
28673
28828
  safety_warning?: components["schemas"]["SafetyWarning"];
28674
28829
  };
28675
28830
  };
@@ -28706,6 +28861,22 @@ interface operations {
28706
28861
  external_id?: string | null;
28707
28862
  /** @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. */
28708
28863
  recovered?: boolean;
28864
+ /** @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. */
28865
+ connection_location?: {
28866
+ /** @description Configured country (ISO 3166-1 alpha-2). */
28867
+ country?: string | null;
28868
+ /** @description Country of the connection in use right now. */
28869
+ current_country?: string | null;
28870
+ /**
28871
+ * @description auto: managed connection. custom: your own proxy.
28872
+ * @enum {string|null}
28873
+ */
28874
+ mode?: "auto" | "custom" | null;
28875
+ /** @description true: never connects from another country. */
28876
+ strict?: boolean | null;
28877
+ /** @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. */
28878
+ previous_country?: string;
28879
+ };
28709
28880
  safety_warning?: components["schemas"]["SafetyWarning"];
28710
28881
  };
28711
28882
  };
@@ -28755,7 +28926,7 @@ interface operations {
28755
28926
  };
28756
28927
  };
28757
28928
  };
28758
- /** @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. */
28929
+ /** @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. */
28759
28930
  400: {
28760
28931
  headers: {
28761
28932
  [name: string]: unknown;
@@ -28791,7 +28962,7 @@ interface operations {
28791
28962
  "application/json": components["schemas"]["Error"];
28792
28963
  };
28793
28964
  };
28794
- /** @description This LinkedIn account is already linked (names your own account_id when your tenant owns it). */
28965
+ /** @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. */
28795
28966
  409: {
28796
28967
  headers: {
28797
28968
  [name: string]: unknown;
@@ -28809,7 +28980,7 @@ interface operations {
28809
28980
  "application/json": components["schemas"]["Error"];
28810
28981
  };
28811
28982
  };
28812
- /** @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. */
28983
+ /** @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. */
28813
28984
  422: {
28814
28985
  headers: {
28815
28986
  [name: string]: unknown;
@@ -28914,6 +29085,22 @@ interface operations {
28914
29085
  external_id?: string | null;
28915
29086
  /** @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. */
28916
29087
  recovered?: boolean;
29088
+ /** @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. */
29089
+ connection_location?: {
29090
+ /** @description Configured country (ISO 3166-1 alpha-2). */
29091
+ country?: string | null;
29092
+ /** @description Country of the connection in use right now. */
29093
+ current_country?: string | null;
29094
+ /**
29095
+ * @description auto: managed connection. custom: your own proxy.
29096
+ * @enum {string|null}
29097
+ */
29098
+ mode?: "auto" | "custom" | null;
29099
+ /** @description true: never connects from another country. */
29100
+ strict?: boolean | null;
29101
+ /** @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. */
29102
+ previous_country?: string;
29103
+ };
28917
29104
  safety_warning?: components["schemas"]["SafetyWarning"];
28918
29105
  };
28919
29106
  };
@@ -28997,7 +29184,7 @@ interface operations {
28997
29184
  "application/json": components["schemas"]["Error"];
28998
29185
  };
28999
29186
  };
29000
- /** @description The submitted code was incorrect, or the challenge type is unsupported. */
29187
+ /** @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. */
29001
29188
  422: {
29002
29189
  headers: {
29003
29190
  [name: string]: unknown;
@@ -29293,6 +29480,22 @@ interface operations {
29293
29480
  attached_seat_id?: string | null;
29294
29481
  /** @description Your own id for this account's end user, as passed on connect. Present on status:"active". */
29295
29482
  external_id?: string | null;
29483
+ /** @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". */
29484
+ connection_location?: {
29485
+ /** @description Configured country (ISO 3166-1 alpha-2). */
29486
+ country?: string | null;
29487
+ /** @description Country of the connection in use right now. */
29488
+ current_country?: string | null;
29489
+ /**
29490
+ * @description auto: managed connection. custom: your own proxy.
29491
+ * @enum {string|null}
29492
+ */
29493
+ mode?: "auto" | "custom" | null;
29494
+ /** @description true: never connects from another country. */
29495
+ strict?: boolean | null;
29496
+ /** @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. */
29497
+ previous_country?: string;
29498
+ };
29296
29499
  /** @description ISO-8601 expiry. Present on status:"pending" and status:"checkpoint_required". */
29297
29500
  expires_at?: string;
29298
29501
  /**
@@ -29347,7 +29550,7 @@ interface operations {
29347
29550
  "application/json": components["schemas"]["Error"];
29348
29551
  };
29349
29552
  };
29350
- /** @description The pending checkpoint is code-based, not mobile_app_approval, use submit instead. */
29553
+ /** @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. */
29351
29554
  422: {
29352
29555
  headers: {
29353
29556
  [name: string]: unknown;
@@ -31797,7 +32000,7 @@ interface operations {
31797
32000
  "application/json": components["schemas"]["Error"];
31798
32001
  };
31799
32002
  };
31800
- /** @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. */
32003
+ /** @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. */
31801
32004
  502: {
31802
32005
  headers: {
31803
32006
  [name: string]: unknown;
@@ -32081,7 +32284,7 @@ declare class AccountsResource {
32081
32284
  * const { items } = await curviate.accounts.listSeats();
32082
32285
  * const free = items.find((seat) => !seat.occupied);
32083
32286
  * if (!free) throw new Error("No seat is free to connect to right now (add a seat, or check billing).");
32084
- * await curviate.auth.intent({ seat_id: free.seat_id, auth_method: "cookie", cookie: { li_at }, user_agent });
32287
+ * await curviate.auth.intent({ seat_id: free.seat_id, auth_method: "cookie", cookie: { li_at }, user_agent, country: "US" });
32085
32288
  */
32086
32289
  listSeats(): Promise<SeatList>;
32087
32290
  /**
@@ -32128,13 +32331,30 @@ declare class AccountsResource {
32128
32331
  * `metadata` is a flat string->string map (at most 16 keys, key 40 chars,
32129
32332
  * value 500) that **replaces** the stored map wholesale; `null` clears it.
32130
32333
  * Both are stored by Curviate, read back on `get`/`list`, and a PATCH
32131
- * carrying only them makes no LinkedIn call. `proxy` sets a custom egress
32132
- * proxy, or clears it (reverting to automatic proxy protection) when passed
32133
- * as `null`. The `proxy.password`, if given, is stored securely and never
32134
- * returned.
32334
+ * carrying only them makes no LinkedIn call.
32335
+ *
32336
+ * `country` moves the account's connection location to that supported ISO
32337
+ * country. LinkedIn sees a new IP there and may ask the owner to verify, so
32338
+ * change it only when the current location is wrong. Strict unless
32339
+ * `allow_country_fallback: true`; `allow_country_fallback` alone changes the
32340
+ * strictness of the configured country. `proxy` sets your own proxy; `null`
32341
+ * returns to a managed location and **requires** a `country` in the same
32342
+ * call (else `CONNECTION_LOCATION_REQUIRED`), and an account on your own
32343
+ * proxy can only take a `country` together with `proxy: null`. The
32344
+ * `proxy.password`, if given, is never returned.
32345
+ *
32346
+ * Returns the account (as `get` returns it, without `quotas` and
32347
+ * `event_log`). After a location change its `connection_location` is re-read,
32348
+ * so it shows where the account really connects from now. A change that did
32349
+ * not land where asked throws `CONNECTION_LOCATION_UNAVAILABLE`, whose
32350
+ * `connectionLocation` carries the actual location.
32135
32351
  *
32136
32352
  * @example
32137
32353
  * await curviate.accounts.update("acc_123", { external_id: "usr_42", metadata: { plan: "pro" } });
32354
+ *
32355
+ * @example
32356
+ * const account = await curviate.accounts.update("acc_123", { country: "DE" });
32357
+ * console.log(account.connection_location?.country); // "DE"
32138
32358
  */
32139
32359
  update(accountId: string, body: AccountUpdateBody): Promise<AccountUpdateResult>;
32140
32360
  /**
@@ -32143,7 +32363,7 @@ declare class AccountsResource {
32143
32363
  disconnect(accountId: string): Promise<AccountDisconnectResult>;
32144
32364
  /**
32145
32365
  * Buy seats on the workspace's active subscription. Returns the new
32146
- * `seat_ids`; connect an account into one with `auth.intent({ seat_id })`.
32366
+ * `seat_ids`; connect an account into one with `auth.intent({ seat_id, country, ... })`.
32147
32367
  *
32148
32368
  * Every call buys the `qty` it asks for, so a repeated call buys again.
32149
32369
  * The SDK never retries it for you. A
@@ -32204,8 +32424,53 @@ declare class AccountsResource {
32204
32424
  * a mid-flight connect/reconnect, never a path placeholder.
32205
32425
  */
32206
32426
 
32207
- /** `POST /v1/auth/intent` request body. */
32208
- type AuthIntentBody = paths["/v1/auth/intent"]["post"]["requestBody"]["content"]["application/json"];
32427
+ /** `POST /v1/auth/intent` request body, as the served document declares it (every location key optional). */
32428
+ type IntentWireBody = paths["/v1/auth/intent"]["post"]["requestBody"]["content"]["application/json"];
32429
+ /** A supported connection-location country (ISO 3166-1 alpha-2), the served enum. */
32430
+ type ConnectionCountry = NonNullable<IntentWireBody["country"]>;
32431
+ type LocationKeys = "country" | "ip" | "proxy" | "allow_country_fallback";
32432
+ /**
32433
+ * Where LinkedIn sees the account connecting from: exactly one of `country`,
32434
+ * `ip` or your own `proxy`. The served document cannot express "exactly one",
32435
+ * so the SDK does: two sources, or `allow_country_fallback` with `proxy`, is a
32436
+ * compile error here and a 400 on the wire.
32437
+ */
32438
+ type ConnectionLocationSource = {
32439
+ country: ConnectionCountry;
32440
+ ip?: never;
32441
+ proxy?: never;
32442
+ allow_country_fallback?: boolean;
32443
+ } | {
32444
+ ip: string;
32445
+ country?: never;
32446
+ proxy?: never;
32447
+ allow_country_fallback?: boolean;
32448
+ } | {
32449
+ proxy: NonNullable<IntentWireBody["proxy"]>;
32450
+ country?: never;
32451
+ ip?: never;
32452
+ allow_country_fallback?: never;
32453
+ };
32454
+ /** No location keys: a reconnect that keeps the account's configured location. */
32455
+ type KeepLocation = {
32456
+ country?: never;
32457
+ ip?: never;
32458
+ proxy?: never;
32459
+ allow_country_fallback?: never;
32460
+ };
32461
+ /**
32462
+ * `POST /v1/auth/intent` request body.
32463
+ *
32464
+ * A NEW connect (no `account_id`) must name a {@link ConnectionLocationSource};
32465
+ * without one the API answers 400 `CONNECTION_LOCATION_REQUIRED`, and this type
32466
+ * refuses it at compile time. A reconnect (`account_id` present) may omit it to
32467
+ * keep the account's configured country and strictness, or send one to move it.
32468
+ */
32469
+ type AuthIntentBody = Omit<IntentWireBody, LocationKeys | "account_id"> & (({
32470
+ account_id?: undefined;
32471
+ } & ConnectionLocationSource) | ({
32472
+ account_id: string;
32473
+ } & (ConnectionLocationSource | KeepLocation)));
32209
32474
  /** `POST /v1/auth/intent` 200 response body, an existing account re-authenticated in place. */
32210
32475
  type AuthIntentReconnected = paths["/v1/auth/intent"]["post"]["responses"]["200"]["content"]["application/json"];
32211
32476
  /** `POST /v1/auth/intent` 201 response body, a new account connected. */
@@ -32285,8 +32550,30 @@ declare class AuthResource {
32285
32550
  * LinkedIn account does not hold throws
32286
32551
  * `CurviateError(code: "LINKEDIN_FEATURE_NOT_SUBSCRIBED")` (403); the remedy
32287
32552
  * is to activate the subscription on LinkedIn or to point `linkedin_premium`
32288
- * at the premium the account really has. Pin a managed proxy with the
32289
- * optional `country`/`ip`, or supply `proxy` to override it entirely.
32553
+ * at the premium the account really has.
32554
+ *
32555
+ * **Connection location.** A NEW connect must say where LinkedIn sees the
32556
+ * account connecting from, with exactly one of: `country` (a supported ISO
32557
+ * code such as `"US"`; pick the one the owner normally signs in from), `ip`
32558
+ * (a public IPv4 whose country is used) or your own `proxy`. Without one the
32559
+ * API throws `CurviateError(code: "CONNECTION_LOCATION_REQUIRED")`, and the
32560
+ * {@link AuthIntentBody} type refuses it at compile time. `country` and `ip`
32561
+ * are strict by default: the connect fails with
32562
+ * `CONNECTION_LOCATION_UNAVAILABLE` rather than use another country, unless
32563
+ * you send `allow_country_fallback: true`. A reconnect may omit the location
32564
+ * to keep the account's configured one. The account's `connection_location`
32565
+ * says where it connects from; when a connect re-attached an account you
32566
+ * already had and moved it, `connection_location.previous_country` names
32567
+ * where it was.
32568
+ *
32569
+ * @example
32570
+ * const result = await curviate.auth.intent({
32571
+ * seat_id: "YOUR_SEAT_ID",
32572
+ * auth_method: "credentials",
32573
+ * credentials: { email: "YOUR_EMAIL", password: "YOUR_PASSWORD" },
32574
+ * country: "US",
32575
+ * });
32576
+ * console.log(result.account_id);
32290
32577
  */
32291
32578
  intent(body: AuthIntentBody): Promise<AuthIntentResult>;
32292
32579
  /**
@@ -32322,7 +32609,7 @@ declare class AuthResource {
32322
32609
  * @param body - optional `{ challenge }` for a `challenge_selection` checkpoint.
32323
32610
  *
32324
32611
  * @example
32325
- * const cp = await curviate.auth.intent({ seat_id, auth_method: "credentials", credentials });
32612
+ * const cp = await curviate.auth.intent({ seat_id, auth_method: "credentials", credentials, country: "US" });
32326
32613
  * if (cp.object === "checkpoint" && cp.challenge_type === "challenge_selection") {
32327
32614
  * const next = await curviate.auth.requestCheckpoint(cp.account_id!, { challenge: cp.challenges![0]!.id });
32328
32615
  * }
@@ -32858,15 +33145,15 @@ declare class PostsResource {
32858
33145
  * Get a single post. `GET /v1/{account_id}/posts/{post_id}`
32859
33146
  *
32860
33147
  * @param postId - the post's `id` as returned by {@link listUserPosts} or
32861
- * {@link create}. A bare numeric id (`7332661864792854528`), a URN
32862
- * (`urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`), and a full
32863
- * share URL (`https://www.linkedin.com/posts/...` or
33148
+ * {@link create}, or a post search result's `id`. A bare numeric id
33149
+ * (`7332661864792854528`), a URN (`urn:li:activity:N`, `urn:li:ugcPost:N`,
33150
+ * `urn:li:share:N`), and a full post URL (`https://www.linkedin.com/posts/...`
33151
+ * with an `activity-`, `ugcPost-` or `share-` slug, or
32864
33152
  * `https://www.linkedin.com/feed/update/urn:li:activity:N`) all resolve to
32865
33153
  * the same post. Pass the value as-is; it is percent-encoded into the path
32866
33154
  * for you, so do not encode it yourself.
32867
33155
  *
32868
- * {@link listComments} and the reaction operations are stricter: they take
32869
- * the opaque `id` form only.
33156
+ * {@link listComments} and the reaction operations accept the same forms.
32870
33157
  */
32871
33158
  get(postId: string): Promise<PostDetail>;
32872
33159
  /** Delete a post (bodyless, 204). `DELETE /v1/{account_id}/posts/{post_id}` */
@@ -34500,7 +34787,7 @@ declare class Curviate {
34500
34787
  * A code the API NEVER emitted is a different case and goes immediately, since
34501
34788
  * no deployment can be sending it: `RATE_LIMITED` went that way in 0.30.0.
34502
34789
  */
34503
- declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "ACCOUNT_NOT_FOUND", "ACCOUNT_RESTRICTED", "ACCOUNT_ALREADY_LINKED", "RESOURCE_NOT_FOUND", "NOT_STORED", "RESOURCE_ACCESS_RESTRICTED", "FILTER_CANDIDATES_REQUIRED", "NO_ACTIVE_SEAT", "LINKEDIN_FEATURE_NOT_SUBSCRIBED", "BETA_NOT_ENABLED", "RATE_LIMIT_ACCOUNT", "RATE_LIMIT_TENANT", "PLATFORM_RATE_LIMIT", "BUDGET_EXHAUSTED", "PLATFORM_ERROR", "PLATFORM_NOT_IMPLEMENTED", "LINKEDIN_OPERATION_NOT_SUPPORTED", "CHECKPOINT_NOT_FOUND", "CHECKPOINT_EXPIRED", "CHECKPOINT_INVALID_CODE", "CHECKPOINT_MAX_ATTEMPTS", "CHECKPOINT_ALREADY_RESOLVED", "CHECKPOINT_UNSUPPORTED", "CONNECTION_IN_PROGRESS", "REAUTH_REQUIRED", "LINKEDIN_AUTH_FAILED", "LINKEDIN_SESSION_EVICTED", "LINKEDIN_RATE_LIMITED", "LINKEDIN_COOKIE_INVALID", "LINKEDIN_SERVICE_UNAVAILABLE", "MESSAGE_WINDOW_EXPIRED", "RECIPIENT_UNREACHABLE", "CONNECTION_REQUEST_CONFLICT", "PAYMENT_REQUIRED", "PAYMENT_FAILED", "SUBSCRIPTION_BUSY", "SUBSCRIPTION_NOT_FOUND", "SEAT_NOT_FOUND", "SEAT_CANCELLED", "NOT_FOUND", "REACTION_NOT_FOUND", "SUBSTRATE_LINK_FAILED", "SUBSTRATE_CAP_REACHED", "BILLING_CHECKOUT_FAILED", "BILLING_PORTAL_UNAVAILABLE", "ACCOUNT_DISPUTED", "ACCOUNT_LINKING_DISABLED", "PERIOD_LOCKED", "SEAT_NOT_EMPTY", "SEAT_PROVISIONAL", "SUBSCRIPTION_ALREADY_EXISTS", "ALREADY_CANCELLED", "CANCELLATION_ALREADY_EFFECTIVE", "INVALID_CANCELLATION_SOURCE", "TRIAL_EXPIRED", "TRIAL_SEAT_LIMIT", "TRIAL_ACTIVE_SEAT_LIMIT", "TRIAL_IDENTITY_ALREADY_USED", "TRIAL_IDENTITY_UNRESOLVED", "ADMIN_BYPASS", "STRIPE_DRIFT_DETECTED", "INTERNAL"];
34790
+ declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPORTED_MEDIA_TYPE", "PAYLOAD_TOO_LARGE", "ACCOUNT_NOT_FOUND", "ACCOUNT_RESTRICTED", "ACCOUNT_ALREADY_LINKED", "RESOURCE_NOT_FOUND", "NOT_STORED", "RESOURCE_ACCESS_RESTRICTED", "FILTER_CANDIDATES_REQUIRED", "NO_ACTIVE_SEAT", "LINKEDIN_FEATURE_NOT_SUBSCRIBED", "BETA_NOT_ENABLED", "RATE_LIMIT_ACCOUNT", "RATE_LIMIT_TENANT", "PLATFORM_RATE_LIMIT", "BUDGET_EXHAUSTED", "PLATFORM_ERROR", "PLATFORM_NOT_IMPLEMENTED", "LINKEDIN_OPERATION_NOT_SUPPORTED", "CHECKPOINT_NOT_FOUND", "CHECKPOINT_EXPIRED", "CHECKPOINT_INVALID_CODE", "CHECKPOINT_MAX_ATTEMPTS", "CHECKPOINT_ALREADY_RESOLVED", "CHECKPOINT_UNSUPPORTED", "CONNECTION_IN_PROGRESS", "CONNECTION_LOCATION_REQUIRED", "CONNECTION_LOCATION_UNAVAILABLE", "REAUTH_REQUIRED", "LINKEDIN_AUTH_FAILED", "LINKEDIN_SESSION_EVICTED", "LINKEDIN_RATE_LIMITED", "LINKEDIN_COOKIE_INVALID", "LINKEDIN_SERVICE_UNAVAILABLE", "MESSAGE_WINDOW_EXPIRED", "RECIPIENT_UNREACHABLE", "CONNECTION_REQUEST_CONFLICT", "PAYMENT_REQUIRED", "PAYMENT_FAILED", "SUBSCRIPTION_BUSY", "SUBSCRIPTION_NOT_FOUND", "SEAT_NOT_FOUND", "SEAT_CANCELLED", "NOT_FOUND", "REACTION_NOT_FOUND", "SUBSTRATE_LINK_FAILED", "SUBSTRATE_CAP_REACHED", "BILLING_CHECKOUT_FAILED", "BILLING_PORTAL_UNAVAILABLE", "ACCOUNT_DISPUTED", "ACCOUNT_LINKING_DISABLED", "PERIOD_LOCKED", "SEAT_NOT_EMPTY", "SEAT_PROVISIONAL", "SUBSCRIPTION_ALREADY_EXISTS", "ALREADY_CANCELLED", "CANCELLATION_ALREADY_EFFECTIVE", "INVALID_CANCELLATION_SOURCE", "TRIAL_EXPIRED", "TRIAL_SEAT_LIMIT", "TRIAL_ACTIVE_SEAT_LIMIT", "TRIAL_IDENTITY_ALREADY_USED", "TRIAL_IDENTITY_UNRESOLVED", "ADMIN_BYPASS", "STRIPE_DRIFT_DETECTED", "INTERNAL"];
34504
34791
  /**
34505
34792
  * The complete set of error codes observable by API callers.
34506
34793
  *
@@ -34508,6 +34795,20 @@ declare const ERROR_CODES: readonly ["UNAUTHORIZED", "INVALID_REQUEST", "UNSUPPO
34508
34795
  * `switch (error.code)` without fear of unknown codes.
34509
34796
  */
34510
34797
  type ErrorCode = (typeof ERROR_CODES)[number];
34798
+ /**
34799
+ * Where LinkedIn sees an account connecting from. Wire field
34800
+ * `connection_location`; the same shape rides every account read.
34801
+ * `country` is the configured country, `current_country` the one in use now
34802
+ * (they differ only after a fallback), `mode` `auto` (managed) or `custom`
34803
+ * (your own proxy), `strict` true when it never connects from another
34804
+ * country. Each is `null` until known.
34805
+ */
34806
+ interface ConnectionLocation {
34807
+ country?: string | null;
34808
+ current_country?: string | null;
34809
+ mode?: "auto" | "custom" | null;
34810
+ strict?: boolean | null;
34811
+ }
34511
34812
  /** Structured retry guidance attached to retryable errors. */
34512
34813
  interface RetryHint {
34513
34814
  kind: "delay" | "backoff" | "never";
@@ -34610,6 +34911,12 @@ interface CurviateErrorInit {
34610
34911
  * moving an account to `enforce` is not a breaking change.
34611
34912
  */
34612
34913
  blocked?: boolean;
34914
+ /**
34915
+ * Where the account connects from now, on a `CONNECTION_LOCATION_UNAVAILABLE`
34916
+ * that followed an applied change (re-read after it). Wire field
34917
+ * `connection_location`. Absent when nothing was changed.
34918
+ */
34919
+ connectionLocation?: ConnectionLocation;
34613
34920
  }
34614
34921
  /** Plain-object shape produced by {@link CurviateError.toJSON}. */
34615
34922
  interface CurviateErrorJSON {
@@ -34627,6 +34934,7 @@ interface CurviateErrorJSON {
34627
34934
  safetyHint?: SafetyHint;
34628
34935
  safetyReason?: SafetyReason;
34629
34936
  blocked?: boolean;
34937
+ connectionLocation?: ConnectionLocation;
34630
34938
  }
34631
34939
  /**
34632
34940
  * The single thrown type for all Curviate API errors.
@@ -34660,6 +34968,8 @@ declare class CurviateError extends Error {
34660
34968
  readonly safetyReason: SafetyReason | undefined;
34661
34969
  /** Whether the action was refused. See {@link CurviateErrorInit.blocked}. */
34662
34970
  readonly blocked: boolean | undefined;
34971
+ /** Where the account connects from now. See {@link CurviateErrorInit.connectionLocation}. */
34972
+ readonly connectionLocation: ConnectionLocation | undefined;
34663
34973
  constructor(init: CurviateErrorInit);
34664
34974
  /**
34665
34975
  * Explicit, credential-safe serialization. Only the documented structured
@@ -34968,4 +35278,4 @@ interface ConstructEventOptions {
34968
35278
  */
34969
35279
  declare function constructEvent(rawBody: string | Buffer, signatureHeader: string, secret: string, opts?: ConstructEventOptions): Promise<CurviateEvent>;
34970
35280
 
34971
- export { type AccountListPage, type AccountListParams, type AccountPayload, type AccountScopedNamespaces, type ConnectionPayload, type ConstructEventOptions, Curviate, type CurviateConfig, CurviateError, type CurviateErrorInit, type CurviateErrorJSON, type CurviateEvent, type CurviateEventEnvelope, ERROR_CODES, type ErrorCode, type EventPayloadBase, type MessagePayload, type ResolvedConfig, type ResourceNamespaces, type RetryHint, type SafetyHint, type SafetyReason, type SeatList, WebhookSignatureError, type components, constructEvent, isCurviateError, type operations, type paths };
35281
+ export { type AccountDetail, type AccountListPage, type AccountListParams, type AccountPayload, type AccountScopedNamespaces, type AccountUpdateBody, type AccountUpdateResult, type AuthIntentBody, type ConnectionCountry, type ConnectionLocation, type ConnectionLocationSource, type ConnectionPayload, type ConstructEventOptions, Curviate, type CurviateConfig, CurviateError, type CurviateErrorInit, type CurviateErrorJSON, type CurviateEvent, type CurviateEventEnvelope, ERROR_CODES, type ErrorCode, type EventPayloadBase, type MessagePayload, type ResolvedConfig, type ResourceNamespaces, type RetryHint, type SafetyHint, type SafetyReason, type SeatList, WebhookSignatureError, type components, constructEvent, isCurviateError, type operations, type paths };