@curviate/sdk 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +226 -8
- package/README.md +70 -0
- package/dist/index.d.ts +373 -161
- package/dist/index.js +261 -33
- package/package.json +1 -1
- package/src/generated/types.ts +116 -119
package/dist/index.js
CHANGED
|
@@ -27,18 +27,32 @@ var ERROR_CODES = [
|
|
|
27
27
|
// `next_action` sentence. user_fixable, never retryable as sent; re-send
|
|
28
28
|
// with a chosen id.
|
|
29
29
|
"FILTER_CANDIDATES_REQUIRED",
|
|
30
|
-
//
|
|
31
|
-
|
|
30
|
+
// Entitlement gating. THREE INDEPENDENT REFUSALS, three codes, three
|
|
31
|
+
// different remedies. Read the code, never the message, to tell them apart:
|
|
32
|
+
//
|
|
33
|
+
// - `NO_ACTIVE_SEAT`: this Curviate tenant has no active paid seat covering
|
|
34
|
+
// the account. The remedy is billing, inside Curviate. There is no product
|
|
35
|
+
// tier to buy: one paid seat entitles every operation, so nothing here
|
|
36
|
+
// names a tier or asks for an upgrade.
|
|
37
|
+
// - `LINKEDIN_FEATURE_NOT_SUBSCRIBED`: the seat is fine, but the LinkedIn
|
|
38
|
+
// account itself lacks the LinkedIn subscription the operation needs
|
|
39
|
+
// (Sales Navigator, Recruiter). The remedy is on LinkedIn, not in
|
|
40
|
+
// Curviate, and no amount of Curviate billing lifts it.
|
|
41
|
+
// - `BETA_NOT_ENABLED`: the operation is beta-gated and this tenant has not
|
|
42
|
+
// consented to beta. The remedy is a human enabling beta in the dashboard,
|
|
43
|
+
// or the per-request `X-Curviate-Beta` header. Nothing is wrong with the
|
|
44
|
+
// seat or the LinkedIn subscription.
|
|
45
|
+
//
|
|
46
|
+
// All three are 403 and all three are user_fixable, which is exactly why the
|
|
47
|
+
// code has to carry the distinction: the messages read alike and the fixes
|
|
48
|
+
// are in three different systems.
|
|
49
|
+
"NO_ACTIVE_SEAT",
|
|
32
50
|
"LINKEDIN_FEATURE_NOT_SUBSCRIBED",
|
|
51
|
+
"BETA_NOT_ENABLED",
|
|
33
52
|
// Rate limits
|
|
34
53
|
"RATE_LIMIT_ACCOUNT",
|
|
35
54
|
"RATE_LIMIT_TENANT",
|
|
36
55
|
"PLATFORM_RATE_LIMIT",
|
|
37
|
-
// LinkedIn-platform-level throttling on the Recruiter / Sales Navigator read
|
|
38
|
-
// surface (carries dedicated RateLimit-Policy / RateLimit / Retry-After
|
|
39
|
-
// response headers). Distinct from the account/tenant/platform trio above.
|
|
40
|
-
// Always retry-safe (retry_likely_to_succeed: true); see RETRYABLE_CODES.
|
|
41
|
-
"RATE_LIMITED",
|
|
42
56
|
// Curviate's OWN account-safety ceiling, not a request-rate limit and not
|
|
43
57
|
// LinkedIn refusing. A 429 that never reached LinkedIn and spent nothing:
|
|
44
58
|
// the budget row named by `budgetRow` is at the ceiling configured on
|
|
@@ -62,13 +76,6 @@ var ERROR_CODES = [
|
|
|
62
76
|
"CHECKPOINT_ALREADY_RESOLVED",
|
|
63
77
|
"CHECKPOINT_UNSUPPORTED",
|
|
64
78
|
"CONNECTION_IN_PROGRESS",
|
|
65
|
-
// One-premium boundary rejection: LinkedIn permits only one individual
|
|
66
|
-
// Premium subscription per profile. Surfaces on connect/reconnect (a seat
|
|
67
|
-
// resolving to both premiums) and on the billing seat/tier endpoints (a
|
|
68
|
-
// "naked enable" of one premium while the seat already holds the other).
|
|
69
|
-
// user_fixable, never retryable; the remedy is two seats, or pairing
|
|
70
|
-
// enable with disable of the current premium in one call.
|
|
71
|
-
"PREMIUM_CONFLICT",
|
|
72
79
|
// A reconnect whose seat-derived scope differs from the account's recorded
|
|
73
80
|
// scope was attempted with cookie auth; a cookie replay cannot change
|
|
74
81
|
// scope, so a full credentials re-authentication is required. user_fixable,
|
|
@@ -101,12 +108,66 @@ var ERROR_CODES = [
|
|
|
101
108
|
"SUBSCRIPTION_NOT_FOUND",
|
|
102
109
|
"SEAT_NOT_FOUND",
|
|
103
110
|
"SEAT_CANCELLED",
|
|
111
|
+
// ── Codes that used to collapse to INTERNAL ──────────────────────────────
|
|
112
|
+
//
|
|
113
|
+
// Every code below is returned by a `/v1` route, the `/v1` catch-all, or a
|
|
114
|
+
// shared handler one of them calls. Because this union did not carry them,
|
|
115
|
+
// the transport decoded each to `INTERNAL`: a refusal the caller could
|
|
116
|
+
// usually fix arrived looking like a server fault, with no `switch` arm
|
|
117
|
+
// possible and nothing but `retryLikelyToSucceed` left to branch on. They
|
|
118
|
+
// are grouped by what a caller does about them rather than by HTTP status.
|
|
119
|
+
// Routing. A path this API does not serve, which is also what a mistyped
|
|
120
|
+
// URL returns, so check the path shape before the ids.
|
|
121
|
+
"NOT_FOUND",
|
|
122
|
+
// The reaction you asked to remove is not on that post (422). Not a
|
|
123
|
+
// transport failure and not a bad id shape: re-read the post's reactions
|
|
124
|
+
// before retrying.
|
|
125
|
+
"REACTION_NOT_FOUND",
|
|
126
|
+
// Upstream failures on the connect and billing paths. All transient in the
|
|
127
|
+
// ordinary sense (502/503 from a dependency), so a retry is reasonable.
|
|
128
|
+
"SUBSTRATE_LINK_FAILED",
|
|
129
|
+
"SUBSTRATE_CAP_REACHED",
|
|
130
|
+
"BILLING_CHECKOUT_FAILED",
|
|
131
|
+
"BILLING_PORTAL_UNAVAILABLE",
|
|
132
|
+
// Tenant standing. The workspace's billing state forbids the operation
|
|
133
|
+
// (delinquent, disputed, linking switched off). The remedy is in billing,
|
|
134
|
+
// and none of these clears on retry.
|
|
135
|
+
"ACCOUNT_DISPUTED",
|
|
136
|
+
"ACCOUNT_LINKING_DISABLED",
|
|
137
|
+
"PERIOD_LOCKED",
|
|
138
|
+
// Seat and subscription state conflicts. The request is well formed and the
|
|
139
|
+
// target is in a state that refuses it, so read the state before resending.
|
|
140
|
+
"SEAT_NOT_EMPTY",
|
|
141
|
+
"SEAT_PROVISIONAL",
|
|
142
|
+
"SUBSCRIPTION_ALREADY_EXISTS",
|
|
143
|
+
"ALREADY_CANCELLED",
|
|
144
|
+
"CANCELLATION_ALREADY_EFFECTIVE",
|
|
145
|
+
"INVALID_CANCELLATION_SOURCE",
|
|
146
|
+
// Free-trial limits and the trial abuse gate. `TRIAL_EXPIRED` is the 402;
|
|
147
|
+
// the rest are 409/422 refusals on connect. All user_fixable, none
|
|
148
|
+
// retryable as sent.
|
|
149
|
+
"TRIAL_EXPIRED",
|
|
150
|
+
"TRIAL_SEAT_LIMIT",
|
|
151
|
+
"TRIAL_ACTIVE_SEAT_LIMIT",
|
|
152
|
+
"TRIAL_IDENTITY_ALREADY_USED",
|
|
153
|
+
"TRIAL_IDENTITY_UNRESOLVED",
|
|
154
|
+
// Admin-tenant refusal (400): an admin workspace has no Stripe billing, so
|
|
155
|
+
// the billing operations do not apply to it. Documented here because it is
|
|
156
|
+
// returned by `/v1` billing routes at nine sites; it was previously cited
|
|
157
|
+
// in this file as a code that never reaches a caller, which was wrong.
|
|
158
|
+
"ADMIN_BYPASS",
|
|
159
|
+
// Checkout refused closed (503): Curviate's own seat-price configuration
|
|
160
|
+
// disagrees with the price it displays, so completing checkout would charge
|
|
161
|
+
// an amount you were never shown. A misconfiguration on Curviate's side, not
|
|
162
|
+
// a mistake in the request and not a transient fault: user_fixable false,
|
|
163
|
+
// and a retry fails the same way until Curviate corrects the price. Nothing
|
|
164
|
+
// was charged. Stop and surface it to a human (or support) rather than
|
|
165
|
+
// backing off.
|
|
166
|
+
"STRIPE_DRIFT_DETECTED",
|
|
104
167
|
// Generic
|
|
105
168
|
"INTERNAL"
|
|
106
169
|
];
|
|
107
170
|
var KNOWN_ERROR_CODES = new Set(ERROR_CODES);
|
|
108
|
-
var REQUIRED_TIERS = ["core", "sn", "sales_nav", "recruiter"];
|
|
109
|
-
var KNOWN_REQUIRED_TIERS = new Set(REQUIRED_TIERS);
|
|
110
171
|
var CurviateError = class _CurviateError extends Error {
|
|
111
172
|
constructor(init) {
|
|
112
173
|
super(init.message);
|
|
@@ -116,7 +177,6 @@ var CurviateError = class _CurviateError extends Error {
|
|
|
116
177
|
this.retryHint = init.retryHint ?? null;
|
|
117
178
|
this.userFixable = init.userFixable;
|
|
118
179
|
this.retryLikelyToSucceed = init.retryLikelyToSucceed;
|
|
119
|
-
this.requiredTier = init.requiredTier;
|
|
120
180
|
this.retryAfterMs = init.retryAfterMs;
|
|
121
181
|
this.budgetRow = init.budgetRow;
|
|
122
182
|
this.retryAfterSeconds = init.retryAfterSeconds;
|
|
@@ -141,7 +201,6 @@ var CurviateError = class _CurviateError extends Error {
|
|
|
141
201
|
retryLikelyToSucceed: this.retryLikelyToSucceed
|
|
142
202
|
};
|
|
143
203
|
if (this.httpStatus !== void 0) json.httpStatus = this.httpStatus;
|
|
144
|
-
if (this.requiredTier !== void 0) json.requiredTier = this.requiredTier;
|
|
145
204
|
if (this.retryAfterMs !== void 0) json.retryAfterMs = this.retryAfterMs;
|
|
146
205
|
if (this.budgetRow !== void 0) json.budgetRow = this.budgetRow;
|
|
147
206
|
if (this.retryAfterSeconds !== void 0) json.retryAfterSeconds = this.retryAfterSeconds;
|
|
@@ -186,8 +245,7 @@ var RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
|
186
245
|
"PLATFORM_ERROR",
|
|
187
246
|
"PLATFORM_RATE_LIMIT",
|
|
188
247
|
"RATE_LIMIT_ACCOUNT",
|
|
189
|
-
"RATE_LIMIT_TENANT"
|
|
190
|
-
"RATE_LIMITED"
|
|
248
|
+
"RATE_LIMIT_TENANT"
|
|
191
249
|
// BUDGET_EXHAUSTED is deliberately NOT here, even though it is a 429. It is
|
|
192
250
|
// Curviate's own account-safety ceiling rather than a request-rate limit:
|
|
193
251
|
// nothing reached LinkedIn, nothing was spent, and a monthly row's reset can
|
|
@@ -236,7 +294,6 @@ async function errorFromResponse(res) {
|
|
|
236
294
|
} catch {
|
|
237
295
|
env = void 0;
|
|
238
296
|
}
|
|
239
|
-
const requiredTier = env?.required_tier && KNOWN_REQUIRED_TIERS.has(env.required_tier) ? env.required_tier : void 0;
|
|
240
297
|
const safetyHint = toSafetyHint(env?.hint);
|
|
241
298
|
const safetyReason = toSafetyReason(env?.reason);
|
|
242
299
|
return new CurviateError({
|
|
@@ -246,7 +303,6 @@ async function errorFromResponse(res) {
|
|
|
246
303
|
retryHint: toRetryHint(env?.retry_hint),
|
|
247
304
|
userFixable: env?.user_fixable ?? false,
|
|
248
305
|
retryLikelyToSucceed: env?.retry_likely_to_succeed ?? false,
|
|
249
|
-
...requiredTier !== void 0 ? { requiredTier } : {},
|
|
250
306
|
...retryAfterMs !== void 0 ? { retryAfterMs } : {},
|
|
251
307
|
...typeof env?.row === "string" ? { budgetRow: env.row } : {},
|
|
252
308
|
// `retry_after` is DELIBERATELY NOT folded into `retryAfterMs`. Everything
|
|
@@ -547,16 +603,31 @@ var AuthResource = class {
|
|
|
547
603
|
* account) rather than connecting a brand-new one; it is absent on a normal
|
|
548
604
|
* connect.
|
|
549
605
|
*
|
|
550
|
-
* Connection scope (which LinkedIn products are enabled
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
* the account
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
606
|
+
* Connection scope (which LinkedIn products are enabled) is not something
|
|
607
|
+
* you enumerate and it is NOT derived from the seat: the connect asks for
|
|
608
|
+
* every product (classic, company, sales_navigator, recruiter) and LinkedIn
|
|
609
|
+
* activates whichever ones the account actually holds. The recorded scope is
|
|
610
|
+
* readable back as `requested_products` on the account
|
|
611
|
+
* (`accounts.list()` / `accounts.get()`), and it is what was ASKED for, not
|
|
612
|
+
* proof of attachment.
|
|
613
|
+
*
|
|
614
|
+
* `linkedin_premium` (`"sales_navigator"` | `"recruiter"`) is the one
|
|
615
|
+
* optional narrowing. A LinkedIn account can hold only one of the two
|
|
616
|
+
* premium surfaces, and when both are asked for Sales Navigator wins, so set
|
|
617
|
+
* it to `"recruiter"` for an account that holds both and needs the Recruiter
|
|
618
|
+
* surface. **It applies to this connection only and is never remembered**:
|
|
619
|
+
* a later connect or reconnect that omits it widens the scope back to every
|
|
620
|
+
* product, so state it on every call where Recruiter must win. There is no
|
|
621
|
+
* account-level premium preference to set once.
|
|
622
|
+
*
|
|
623
|
+
* A reconnect that would change scope must use `auth_method: "credentials"`,
|
|
624
|
+
* since a cookie replay cannot change scope and throws
|
|
625
|
+
* `CurviateError(code: "REAUTH_REQUIRED")` instead. Asking for a premium the
|
|
626
|
+
* LinkedIn account does not hold throws
|
|
627
|
+
* `CurviateError(code: "LINKEDIN_FEATURE_NOT_SUBSCRIBED")` (403); the remedy
|
|
628
|
+
* is to activate the subscription on LinkedIn or to point `linkedin_premium`
|
|
629
|
+
* at the premium the account really has. Pin a managed proxy with the
|
|
630
|
+
* optional `country`/`ip`, or supply `proxy` to override it entirely.
|
|
560
631
|
*/
|
|
561
632
|
intent(body) {
|
|
562
633
|
return this.ctx.request({
|
|
@@ -1598,6 +1669,10 @@ var InboxesResource = class {
|
|
|
1598
1669
|
* const companyPage = (items ?? []).find((i) => i.kind === "company");
|
|
1599
1670
|
* console.log(companyPage?.id, companyPage?.name, hint);
|
|
1600
1671
|
* // companyPage?.id is what you pass to listChats(), e.g. "COMPANY_83734124_PRIMARY"
|
|
1672
|
+
*
|
|
1673
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1674
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1675
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1601
1676
|
*/
|
|
1602
1677
|
list(params) {
|
|
1603
1678
|
return this.ctx.request({
|
|
@@ -1634,6 +1709,10 @@ var InboxesResource = class {
|
|
|
1634
1709
|
* or `"COMPANY_83734124_PRIMARY"`).
|
|
1635
1710
|
* @param params - optional `limit` (1-25, default 20) and an opaque
|
|
1636
1711
|
* `cursor` for pagination.
|
|
1712
|
+
*
|
|
1713
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1714
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1715
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1637
1716
|
*/
|
|
1638
1717
|
listChats(inboxId, params) {
|
|
1639
1718
|
return this.ctx.request({
|
|
@@ -1733,7 +1812,10 @@ var SalesNavigatorResource = class {
|
|
|
1733
1812
|
/**
|
|
1734
1813
|
* Search LinkedIn members using the full Sales Navigator filter set.
|
|
1735
1814
|
* `POST /v1/{account_id}/sales-navigator/search/people`
|
|
1736
|
-
*
|
|
1815
|
+
*
|
|
1816
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1817
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1818
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1737
1819
|
*/
|
|
1738
1820
|
searchPeople(body, query) {
|
|
1739
1821
|
return this.ctx.request({
|
|
@@ -1746,6 +1828,10 @@ var SalesNavigatorResource = class {
|
|
|
1746
1828
|
/**
|
|
1747
1829
|
* Search LinkedIn companies using the full Sales Navigator company filter set.
|
|
1748
1830
|
* `POST /v1/{account_id}/sales-navigator/search/companies`
|
|
1831
|
+
*
|
|
1832
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1833
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1834
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1749
1835
|
*/
|
|
1750
1836
|
searchCompanies(body, query) {
|
|
1751
1837
|
return this.ctx.request({
|
|
@@ -1758,6 +1844,10 @@ var SalesNavigatorResource = class {
|
|
|
1758
1844
|
/**
|
|
1759
1845
|
* Resolve human-readable terms to opaque Sales Navigator filter IDs.
|
|
1760
1846
|
* `GET /v1/{account_id}/sales-navigator/search/parameters`
|
|
1847
|
+
*
|
|
1848
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1849
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1850
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1761
1851
|
*/
|
|
1762
1852
|
getParameters(query) {
|
|
1763
1853
|
return this.ctx.request({
|
|
@@ -1770,6 +1860,10 @@ var SalesNavigatorResource = class {
|
|
|
1770
1860
|
* Start a new Sales Navigator chat. `attachments[]`, when supplied, carry
|
|
1771
1861
|
* base64-encoded file bytes, always sent as JSON, never multipart.
|
|
1772
1862
|
* `POST /v1/{account_id}/sales-navigator/chats`
|
|
1863
|
+
*
|
|
1864
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1865
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1866
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1773
1867
|
*/
|
|
1774
1868
|
startChat(body) {
|
|
1775
1869
|
return this.ctx.request({
|
|
@@ -1781,6 +1875,10 @@ var SalesNavigatorResource = class {
|
|
|
1781
1875
|
/**
|
|
1782
1876
|
* Retrieve a LinkedIn profile with Sales Navigator enrichment.
|
|
1783
1877
|
* `GET /v1/{account_id}/sales-navigator/profiles/{identifier}`
|
|
1878
|
+
*
|
|
1879
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1880
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1881
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1784
1882
|
*/
|
|
1785
1883
|
getProfile(identifier, query) {
|
|
1786
1884
|
return this.ctx.request({
|
|
@@ -1793,6 +1891,10 @@ var SalesNavigatorResource = class {
|
|
|
1793
1891
|
/**
|
|
1794
1892
|
* List the saved-account (company) lists on the operator's Sales Navigator seat.
|
|
1795
1893
|
* `GET /v1/{account_id}/sales-navigator/account-lists`
|
|
1894
|
+
*
|
|
1895
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1896
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1897
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1796
1898
|
*/
|
|
1797
1899
|
accountLists(query) {
|
|
1798
1900
|
return this.ctx.request({
|
|
@@ -1804,6 +1906,10 @@ var SalesNavigatorResource = class {
|
|
|
1804
1906
|
/**
|
|
1805
1907
|
* List the saved-lead (member) lists on the operator's Sales Navigator seat.
|
|
1806
1908
|
* `GET /v1/{account_id}/sales-navigator/lead-lists`
|
|
1909
|
+
*
|
|
1910
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1911
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1912
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1807
1913
|
*/
|
|
1808
1914
|
leadLists(query) {
|
|
1809
1915
|
return this.ctx.request({
|
|
@@ -1816,6 +1922,10 @@ var SalesNavigatorResource = class {
|
|
|
1816
1922
|
* Browse the saved accounts (companies) in one account list. Pass optional
|
|
1817
1923
|
* `persona` / `filter` / `sort_by` / `sort_order` filters in the body.
|
|
1818
1924
|
* `POST /v1/{account_id}/sales-navigator/account-lists/{list_id}`
|
|
1925
|
+
*
|
|
1926
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1927
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1928
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1819
1929
|
*/
|
|
1820
1930
|
browseAccountList(listId, body, query) {
|
|
1821
1931
|
return this.ctx.request({
|
|
@@ -1829,6 +1939,10 @@ var SalesNavigatorResource = class {
|
|
|
1829
1939
|
* Browse the saved leads (members) in one lead list. Pass optional
|
|
1830
1940
|
* `spotlight` / `sort_by` / `sort_order` filters in the body.
|
|
1831
1941
|
* `POST /v1/{account_id}/sales-navigator/lead-lists/{list_id}`
|
|
1942
|
+
*
|
|
1943
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1944
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1945
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1832
1946
|
*/
|
|
1833
1947
|
browseLeadList(listId, body, query) {
|
|
1834
1948
|
return this.ctx.request({
|
|
@@ -1845,6 +1959,10 @@ var SalesNavigatorResource = class {
|
|
|
1845
1959
|
*
|
|
1846
1960
|
* No `saved` boolean is invented; a `2xx` response body is the success
|
|
1847
1961
|
* signal (the substrate returns no success flag).
|
|
1962
|
+
*
|
|
1963
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1964
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1965
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1848
1966
|
*/
|
|
1849
1967
|
saveAccount(input) {
|
|
1850
1968
|
const { list_id, ...body } = input;
|
|
@@ -1858,6 +1976,10 @@ var SalesNavigatorResource = class {
|
|
|
1858
1976
|
* Save a Sales Navigator member into a lead list. Body is just `{user_id}`;
|
|
1859
1977
|
* `account_id` lives in the path, not the body.
|
|
1860
1978
|
* `POST /v1/{account_id}/sales-navigator/lead-lists/{list_id}/save`
|
|
1979
|
+
*
|
|
1980
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1981
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1982
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1861
1983
|
*/
|
|
1862
1984
|
saveLead(input) {
|
|
1863
1985
|
const { list_id, ...body } = input;
|
|
@@ -1872,6 +1994,10 @@ var SalesNavigatorResource = class {
|
|
|
1872
1994
|
* `POST /v1/{account_id}/sales-navigator/search`
|
|
1873
1995
|
* `url` is the only accepted body field. Response items are polymorphic,
|
|
1874
1996
|
* each discriminated individually by its own `object`.
|
|
1997
|
+
*
|
|
1998
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1999
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2000
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1875
2001
|
*/
|
|
1876
2002
|
searchFromUrl(body, query) {
|
|
1877
2003
|
return this.ctx.request({
|
|
@@ -1908,6 +2034,10 @@ var RecruiterResource = class {
|
|
|
1908
2034
|
* target's public identifier, or a member id. Request specific profile
|
|
1909
2035
|
* sections via `with_sections` (repeatable query param).
|
|
1910
2036
|
* `GET /v1/{account_id}/recruiter/profiles/{user_id}`
|
|
2037
|
+
*
|
|
2038
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2039
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2040
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1911
2041
|
*/
|
|
1912
2042
|
getProfile(identifier, params) {
|
|
1913
2043
|
return this.ctx.request({
|
|
@@ -1920,6 +2050,10 @@ var RecruiterResource = class {
|
|
|
1920
2050
|
* Start a Recruiter chat (InMail). JSON-only, `subject` and `signature`
|
|
1921
2051
|
* are REQUIRED; optional attachments ride the body as base64-encoded
|
|
1922
2052
|
* objects (no multipart). `POST /v1/{account_id}/recruiter/chats`
|
|
2053
|
+
*
|
|
2054
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2055
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2056
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1923
2057
|
*/
|
|
1924
2058
|
startChat(body) {
|
|
1925
2059
|
return this.ctx.request({
|
|
@@ -1931,6 +2065,10 @@ var RecruiterResource = class {
|
|
|
1931
2065
|
/**
|
|
1932
2066
|
* Search LinkedIn members using Recruiter filters. `limit`/`cursor` stay
|
|
1933
2067
|
* TOP-LEVEL query params. `POST /v1/{account_id}/recruiter/search/people`
|
|
2068
|
+
*
|
|
2069
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2070
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2071
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1934
2072
|
*/
|
|
1935
2073
|
searchPeople(body, params) {
|
|
1936
2074
|
return this.ctx.request({
|
|
@@ -1944,6 +2082,10 @@ var RecruiterResource = class {
|
|
|
1944
2082
|
* Resolve human-readable terms to opaque Recruiter filter ids. POST (was
|
|
1945
2083
|
* GET): the body is a `source`-discriminated oneOf, `APPLICANTS`/`PIPELINE`
|
|
1946
2084
|
* require `project_id`. `POST /v1/{account_id}/recruiter/search/parameters`
|
|
2085
|
+
*
|
|
2086
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2087
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2088
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1947
2089
|
*/
|
|
1948
2090
|
searchParameters(body, params) {
|
|
1949
2091
|
return this.ctx.request({
|
|
@@ -1958,6 +2100,10 @@ var RecruiterResource = class {
|
|
|
1958
2100
|
* `RECRUITER_SEARCH` talent-pool channel) is REQUIRED. `limit`/`cursor` stay
|
|
1959
2101
|
* TOP-LEVEL query params.
|
|
1960
2102
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/search`
|
|
2103
|
+
*
|
|
2104
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2105
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2106
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1961
2107
|
*/
|
|
1962
2108
|
searchTalentPool(projectId, body, params) {
|
|
1963
2109
|
return this.ctx.request({
|
|
@@ -1972,6 +2118,10 @@ var RecruiterResource = class {
|
|
|
1972
2118
|
* nothing else in the body. The response is a 3-way oneOf (people-search,
|
|
1973
2119
|
* job-applicant list, or pipeline-candidate list) keyed by the URL kind.
|
|
1974
2120
|
* `POST /v1/{account_id}/recruiter/search`
|
|
2121
|
+
*
|
|
2122
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2123
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2124
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1975
2125
|
*/
|
|
1976
2126
|
searchFromUrl(body, params) {
|
|
1977
2127
|
return this.ctx.request({
|
|
@@ -1984,6 +2134,10 @@ var RecruiterResource = class {
|
|
|
1984
2134
|
/**
|
|
1985
2135
|
* List Recruiter hiring projects visible to the account.
|
|
1986
2136
|
* `GET /v1/{account_id}/recruiter/projects`
|
|
2137
|
+
*
|
|
2138
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2139
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2140
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1987
2141
|
*/
|
|
1988
2142
|
listProjects(params) {
|
|
1989
2143
|
return this.ctx.request({
|
|
@@ -1995,6 +2149,10 @@ var RecruiterResource = class {
|
|
|
1995
2149
|
/**
|
|
1996
2150
|
* Get a single Recruiter hiring project (owner, metadata, talent_pool,
|
|
1997
2151
|
* pipeline). `GET /v1/{account_id}/recruiter/projects/{project_id}`
|
|
2152
|
+
*
|
|
2153
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2154
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2155
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1998
2156
|
*/
|
|
1999
2157
|
getProject(projectId) {
|
|
2000
2158
|
return this.ctx.request({
|
|
@@ -2006,6 +2164,10 @@ var RecruiterResource = class {
|
|
|
2006
2164
|
* Edit a Recruiter project's config: all fields optional; omitted fields
|
|
2007
2165
|
* are left unchanged. Returns a thin acknowledgement only.
|
|
2008
2166
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}`
|
|
2167
|
+
*
|
|
2168
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2169
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2170
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2009
2171
|
*/
|
|
2010
2172
|
updateProject(projectId, body) {
|
|
2011
2173
|
return this.ctx.request({
|
|
@@ -2019,6 +2181,10 @@ var RecruiterResource = class {
|
|
|
2019
2181
|
* an all-optional filter set, no state mutates). `limit`/`cursor` stay
|
|
2020
2182
|
* TOP-LEVEL query params.
|
|
2021
2183
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/pipeline`
|
|
2184
|
+
*
|
|
2185
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2186
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2187
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2022
2188
|
*/
|
|
2023
2189
|
listPipeline(projectId, body = {}, params) {
|
|
2024
2190
|
return this.ctx.request({
|
|
@@ -2032,6 +2198,10 @@ var RecruiterResource = class {
|
|
|
2032
2198
|
* Get the single job posting attached to a Recruiter project (the surface
|
|
2033
2199
|
* returns one posting, not a list; a project with no attached job 404s).
|
|
2034
2200
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
2201
|
+
*
|
|
2202
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2203
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2204
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2035
2205
|
*/
|
|
2036
2206
|
getProjectJob(projectId) {
|
|
2037
2207
|
return this.ctx.request({
|
|
@@ -2043,6 +2213,10 @@ var RecruiterResource = class {
|
|
|
2043
2213
|
* Create a job-posting DRAFT attached to an EXISTING project, `project_name`
|
|
2044
2214
|
* is not accepted (the project comes from the path). Never publishes, never
|
|
2045
2215
|
* spends money. `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
2216
|
+
*
|
|
2217
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2218
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2219
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2046
2220
|
*/
|
|
2047
2221
|
createProjectJob(projectId, body) {
|
|
2048
2222
|
return this.ctx.request({
|
|
@@ -2055,6 +2229,10 @@ var RecruiterResource = class {
|
|
|
2055
2229
|
* Get pricing to publish a project's job posting; price a publish before
|
|
2056
2230
|
* committing any money.
|
|
2057
2231
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/budget`
|
|
2232
|
+
*
|
|
2233
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2234
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2235
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2058
2236
|
*/
|
|
2059
2237
|
getProjectJobBudget(projectId, jobId) {
|
|
2060
2238
|
return this.ctx.request({
|
|
@@ -2066,6 +2244,10 @@ var RecruiterResource = class {
|
|
|
2066
2244
|
* Create a job-posting DRAFT together with a brand-new hiring project,
|
|
2067
2245
|
* `project_name` is REQUIRED; `description` must be >= 200 characters. Never
|
|
2068
2246
|
* publishes, never spends money. `POST /v1/{account_id}/recruiter/jobs`
|
|
2247
|
+
*
|
|
2248
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2249
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2250
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2069
2251
|
*/
|
|
2070
2252
|
createJob(body) {
|
|
2071
2253
|
return this.ctx.request({
|
|
@@ -2077,6 +2259,10 @@ var RecruiterResource = class {
|
|
|
2077
2259
|
/**
|
|
2078
2260
|
* List Recruiter job postings. `limit`/`cursor` stay TOP-LEVEL query params.
|
|
2079
2261
|
* `GET /v1/{account_id}/recruiter/jobs`
|
|
2262
|
+
*
|
|
2263
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2264
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2265
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2080
2266
|
*/
|
|
2081
2267
|
listJobs(params) {
|
|
2082
2268
|
return this.ctx.request({
|
|
@@ -2095,6 +2281,10 @@ var RecruiterResource = class {
|
|
|
2095
2281
|
* client-side; the wire request always carries the numeric id. Throws
|
|
2096
2282
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously if neither
|
|
2097
2283
|
* form can be recognized.
|
|
2284
|
+
*
|
|
2285
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2286
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2287
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2098
2288
|
*/
|
|
2099
2289
|
getJob(jobIdOrUrl) {
|
|
2100
2290
|
const jobId = resolveJobId(jobIdOrUrl);
|
|
@@ -2108,6 +2298,10 @@ var RecruiterResource = class {
|
|
|
2108
2298
|
* change. MONEY WARNING: editing an already-published (LISTED) posting
|
|
2109
2299
|
* mutates a live, money-spending listing.
|
|
2110
2300
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}`
|
|
2301
|
+
*
|
|
2302
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2303
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2304
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2111
2305
|
*/
|
|
2112
2306
|
updateProjectJob(projectId, jobId, body) {
|
|
2113
2307
|
return this.ctx.request({
|
|
@@ -2123,6 +2317,10 @@ var RecruiterResource = class {
|
|
|
2123
2317
|
* the connected account's LinkedIn payment method; supplying `budget` IS the
|
|
2124
2318
|
* explicit opt-in).
|
|
2125
2319
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/publish`
|
|
2320
|
+
*
|
|
2321
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2322
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2323
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2126
2324
|
*/
|
|
2127
2325
|
publishJob(projectId, jobId, body) {
|
|
2128
2326
|
return this.ctx.request({
|
|
@@ -2136,6 +2334,10 @@ var RecruiterResource = class {
|
|
|
2136
2334
|
* (bodyless). Closing an already-published (LISTED) posting cannot be
|
|
2137
2335
|
* undone; there is no re-open operation.
|
|
2138
2336
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/close`
|
|
2337
|
+
*
|
|
2338
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2339
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2340
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2139
2341
|
*/
|
|
2140
2342
|
closeJob(projectId, jobId) {
|
|
2141
2343
|
return this.ctx.request({
|
|
@@ -2147,6 +2349,10 @@ var RecruiterResource = class {
|
|
|
2147
2349
|
* Save a candidate (or user profile) to a project's pipeline at the given
|
|
2148
2350
|
* stage, the sole surviving pipeline write.
|
|
2149
2351
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/pipeline/candidate/save`
|
|
2352
|
+
*
|
|
2353
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2354
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2355
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2150
2356
|
*/
|
|
2151
2357
|
saveCandidate(projectId, body) {
|
|
2152
2358
|
return this.ctx.request({
|
|
@@ -2160,6 +2366,10 @@ var RecruiterResource = class {
|
|
|
2160
2366
|
* filters, no state mutates). `channel_id` (a `JOB_POSTING` talent-pool
|
|
2161
2367
|
* channel) is REQUIRED. `limit`/`cursor` stay TOP-LEVEL query params.
|
|
2162
2368
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants`
|
|
2369
|
+
*
|
|
2370
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2371
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2372
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2163
2373
|
*/
|
|
2164
2374
|
listApplicants(projectId, body, params) {
|
|
2165
2375
|
return this.ctx.request({
|
|
@@ -2172,6 +2382,10 @@ var RecruiterResource = class {
|
|
|
2172
2382
|
/**
|
|
2173
2383
|
* Get full detail for one talent-pool applicant (profile guaranteed full,
|
|
2174
2384
|
* includes PII). `GET /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}`
|
|
2385
|
+
*
|
|
2386
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2387
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2388
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2175
2389
|
*/
|
|
2176
2390
|
getApplicant(projectId, applicantId) {
|
|
2177
2391
|
return this.ctx.request({
|
|
@@ -2183,6 +2397,10 @@ var RecruiterResource = class {
|
|
|
2183
2397
|
* Download a talent-pool applicant's résumé as raw binary.
|
|
2184
2398
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}/resume`
|
|
2185
2399
|
* Returns `ArrayBuffer`; the SDK does not cache or store it.
|
|
2400
|
+
*
|
|
2401
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2402
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2403
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2186
2404
|
*/
|
|
2187
2405
|
downloadResume(projectId, applicantId) {
|
|
2188
2406
|
return this.ctx.request({
|
|
@@ -2469,6 +2687,11 @@ var CompaniesResource = class {
|
|
|
2469
2687
|
* never stored. Beta: single-page listing and termination are verified;
|
|
2470
2688
|
* deep pagination (many pages / large cursor round-trips) is provisional
|
|
2471
2689
|
* until validated against a busier inbox.
|
|
2690
|
+
*
|
|
2691
|
+
* @beta Beta operation. While beta-gated it refuses `BETA_NOT_ENABLED`
|
|
2692
|
+
* (403) until a human enables beta in Settings, or the request carries the
|
|
2693
|
+
* `X-Curviate-Beta` header. Sibling methods on this namespace are stable;
|
|
2694
|
+
* the badge is per operation.
|
|
2472
2695
|
*/
|
|
2473
2696
|
chats(identifier, params) {
|
|
2474
2697
|
return this.ctx.request({
|
|
@@ -2523,6 +2746,11 @@ var CompaniesResource = class {
|
|
|
2523
2746
|
* and message content), a `topic` card, or `unread`-only; the three are
|
|
2524
2747
|
* mutually exclusive and enforced server-side. The connected account must
|
|
2525
2748
|
* administer the page. Beta: see `chats()`.
|
|
2749
|
+
*
|
|
2750
|
+
* @beta Beta operation. While beta-gated it refuses `BETA_NOT_ENABLED`
|
|
2751
|
+
* (403) until a human enables beta in Settings, or the request carries the
|
|
2752
|
+
* `X-Curviate-Beta` header. Sibling methods on this namespace are stable;
|
|
2753
|
+
* the badge is per operation.
|
|
2526
2754
|
*/
|
|
2527
2755
|
searchChats(identifier, params) {
|
|
2528
2756
|
return this.ctx.request({
|