@curviate/sdk 0.29.0 → 0.30.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 +173 -8
- package/README.md +70 -0
- package/dist/index.d.ts +369 -145
- package/dist/index.js +278 -32
- package/package.json +1 -1
- package/src/generated/types.ts +112 -103
package/dist/index.js
CHANGED
|
@@ -27,18 +27,47 @@ 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",
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated Replaced by {@link NO_ACTIVE_SEAT}. Product tiers are retired,
|
|
54
|
+
* so no refusal names one any more.
|
|
55
|
+
*
|
|
56
|
+
* STILL EXPORTED ON PURPOSE, and this is not a courtesy: API deployments
|
|
57
|
+
* that predate the seat-based entitlement rollout still emit this code, and
|
|
58
|
+
* a client that stopped recognising it would decode it to `INTERNAL`: a
|
|
59
|
+
* fixable billing refusal arriving as a server fault, against the very
|
|
60
|
+
* deployments most likely to send it. It is withdrawn in the first release
|
|
61
|
+
* after every deployment carries the new contract.
|
|
62
|
+
*
|
|
63
|
+
* Handle both while that is true: `NO_ACTIVE_SEAT` from a current
|
|
64
|
+
* deployment, this from an older one. They mean the same thing to a caller.
|
|
65
|
+
*/
|
|
66
|
+
"TIER_NOT_ACTIVE",
|
|
33
67
|
// Rate limits
|
|
34
68
|
"RATE_LIMIT_ACCOUNT",
|
|
35
69
|
"RATE_LIMIT_TENANT",
|
|
36
70
|
"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
71
|
// Curviate's OWN account-safety ceiling, not a request-rate limit and not
|
|
43
72
|
// LinkedIn refusing. A 429 that never reached LinkedIn and spent nothing:
|
|
44
73
|
// the budget row named by `budgetRow` is at the ceiling configured on
|
|
@@ -62,12 +91,16 @@ var ERROR_CODES = [
|
|
|
62
91
|
"CHECKPOINT_ALREADY_RESOLVED",
|
|
63
92
|
"CHECKPOINT_UNSUPPORTED",
|
|
64
93
|
"CONNECTION_IN_PROGRESS",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Withdrawn with no replacement. The one-premium conflict it
|
|
96
|
+
* reported cannot be expressed on the current input, because
|
|
97
|
+
* `linkedin_premium` is single-valued.
|
|
98
|
+
*
|
|
99
|
+
* STILL EXPORTED for the same reason as {@link TIER_NOT_ACTIVE}: deployments
|
|
100
|
+
* that predate the connect rework can still emit it, and dropping it early
|
|
101
|
+
* would turn a fixable refusal into `INTERNAL` on exactly those. Withdrawn
|
|
102
|
+
* in the first release after every deployment carries the new contract.
|
|
103
|
+
*/
|
|
71
104
|
"PREMIUM_CONFLICT",
|
|
72
105
|
// A reconnect whose seat-derived scope differs from the account's recorded
|
|
73
106
|
// scope was attempted with cookie auth; a cookie replay cannot change
|
|
@@ -101,12 +134,58 @@ var ERROR_CODES = [
|
|
|
101
134
|
"SUBSCRIPTION_NOT_FOUND",
|
|
102
135
|
"SEAT_NOT_FOUND",
|
|
103
136
|
"SEAT_CANCELLED",
|
|
137
|
+
// ── Codes that used to collapse to INTERNAL ──────────────────────────────
|
|
138
|
+
//
|
|
139
|
+
// Every code below is returned by a `/v1` route, the `/v1` catch-all, or a
|
|
140
|
+
// shared handler one of them calls. Because this union did not carry them,
|
|
141
|
+
// the transport decoded each to `INTERNAL`: a refusal the caller could
|
|
142
|
+
// usually fix arrived looking like a server fault, with no `switch` arm
|
|
143
|
+
// possible and nothing but `retryLikelyToSucceed` left to branch on. They
|
|
144
|
+
// are grouped by what a caller does about them rather than by HTTP status.
|
|
145
|
+
// Routing. A path this API does not serve, which is also what a mistyped
|
|
146
|
+
// URL returns, so check the path shape before the ids.
|
|
147
|
+
"NOT_FOUND",
|
|
148
|
+
// The reaction you asked to remove is not on that post (422). Not a
|
|
149
|
+
// transport failure and not a bad id shape: re-read the post's reactions
|
|
150
|
+
// before retrying.
|
|
151
|
+
"REACTION_NOT_FOUND",
|
|
152
|
+
// Upstream failures on the connect and billing paths. All transient in the
|
|
153
|
+
// ordinary sense (502/503 from a dependency), so a retry is reasonable.
|
|
154
|
+
"SUBSTRATE_LINK_FAILED",
|
|
155
|
+
"SUBSTRATE_CAP_REACHED",
|
|
156
|
+
"BILLING_CHECKOUT_FAILED",
|
|
157
|
+
"BILLING_PORTAL_UNAVAILABLE",
|
|
158
|
+
// Tenant standing. The workspace's billing state forbids the operation
|
|
159
|
+
// (delinquent, disputed, linking switched off). The remedy is in billing,
|
|
160
|
+
// and none of these clears on retry.
|
|
161
|
+
"ACCOUNT_DISPUTED",
|
|
162
|
+
"ACCOUNT_LINKING_DISABLED",
|
|
163
|
+
"PERIOD_LOCKED",
|
|
164
|
+
// Seat and subscription state conflicts. The request is well formed and the
|
|
165
|
+
// target is in a state that refuses it, so read the state before resending.
|
|
166
|
+
"SEAT_NOT_EMPTY",
|
|
167
|
+
"SEAT_PROVISIONAL",
|
|
168
|
+
"SUBSCRIPTION_ALREADY_EXISTS",
|
|
169
|
+
"ALREADY_CANCELLED",
|
|
170
|
+
"CANCELLATION_ALREADY_EFFECTIVE",
|
|
171
|
+
"INVALID_CANCELLATION_SOURCE",
|
|
172
|
+
// Free-trial limits and the trial abuse gate. `TRIAL_EXPIRED` is the 402;
|
|
173
|
+
// the rest are 409/422 refusals on connect. All user_fixable, none
|
|
174
|
+
// retryable as sent.
|
|
175
|
+
"TRIAL_EXPIRED",
|
|
176
|
+
"TRIAL_SEAT_LIMIT",
|
|
177
|
+
"TRIAL_ACTIVE_SEAT_LIMIT",
|
|
178
|
+
"TRIAL_IDENTITY_ALREADY_USED",
|
|
179
|
+
"TRIAL_IDENTITY_UNRESOLVED",
|
|
180
|
+
// Admin-tenant refusal (400): an admin workspace has no Stripe billing, so
|
|
181
|
+
// the billing operations do not apply to it. Documented here because it is
|
|
182
|
+
// returned by `/v1` billing routes at nine sites; it was previously cited
|
|
183
|
+
// in this file as a code that never reaches a caller, which was wrong.
|
|
184
|
+
"ADMIN_BYPASS",
|
|
104
185
|
// Generic
|
|
105
186
|
"INTERNAL"
|
|
106
187
|
];
|
|
107
188
|
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
189
|
var CurviateError = class _CurviateError extends Error {
|
|
111
190
|
constructor(init) {
|
|
112
191
|
super(init.message);
|
|
@@ -116,7 +195,6 @@ var CurviateError = class _CurviateError extends Error {
|
|
|
116
195
|
this.retryHint = init.retryHint ?? null;
|
|
117
196
|
this.userFixable = init.userFixable;
|
|
118
197
|
this.retryLikelyToSucceed = init.retryLikelyToSucceed;
|
|
119
|
-
this.requiredTier = init.requiredTier;
|
|
120
198
|
this.retryAfterMs = init.retryAfterMs;
|
|
121
199
|
this.budgetRow = init.budgetRow;
|
|
122
200
|
this.retryAfterSeconds = init.retryAfterSeconds;
|
|
@@ -141,7 +219,6 @@ var CurviateError = class _CurviateError extends Error {
|
|
|
141
219
|
retryLikelyToSucceed: this.retryLikelyToSucceed
|
|
142
220
|
};
|
|
143
221
|
if (this.httpStatus !== void 0) json.httpStatus = this.httpStatus;
|
|
144
|
-
if (this.requiredTier !== void 0) json.requiredTier = this.requiredTier;
|
|
145
222
|
if (this.retryAfterMs !== void 0) json.retryAfterMs = this.retryAfterMs;
|
|
146
223
|
if (this.budgetRow !== void 0) json.budgetRow = this.budgetRow;
|
|
147
224
|
if (this.retryAfterSeconds !== void 0) json.retryAfterSeconds = this.retryAfterSeconds;
|
|
@@ -186,8 +263,7 @@ var RETRYABLE_CODES = /* @__PURE__ */ new Set([
|
|
|
186
263
|
"PLATFORM_ERROR",
|
|
187
264
|
"PLATFORM_RATE_LIMIT",
|
|
188
265
|
"RATE_LIMIT_ACCOUNT",
|
|
189
|
-
"RATE_LIMIT_TENANT"
|
|
190
|
-
"RATE_LIMITED"
|
|
266
|
+
"RATE_LIMIT_TENANT"
|
|
191
267
|
// BUDGET_EXHAUSTED is deliberately NOT here, even though it is a 429. It is
|
|
192
268
|
// Curviate's own account-safety ceiling rather than a request-rate limit:
|
|
193
269
|
// nothing reached LinkedIn, nothing was spent, and a monthly row's reset can
|
|
@@ -236,7 +312,6 @@ async function errorFromResponse(res) {
|
|
|
236
312
|
} catch {
|
|
237
313
|
env = void 0;
|
|
238
314
|
}
|
|
239
|
-
const requiredTier = env?.required_tier && KNOWN_REQUIRED_TIERS.has(env.required_tier) ? env.required_tier : void 0;
|
|
240
315
|
const safetyHint = toSafetyHint(env?.hint);
|
|
241
316
|
const safetyReason = toSafetyReason(env?.reason);
|
|
242
317
|
return new CurviateError({
|
|
@@ -246,7 +321,6 @@ async function errorFromResponse(res) {
|
|
|
246
321
|
retryHint: toRetryHint(env?.retry_hint),
|
|
247
322
|
userFixable: env?.user_fixable ?? false,
|
|
248
323
|
retryLikelyToSucceed: env?.retry_likely_to_succeed ?? false,
|
|
249
|
-
...requiredTier !== void 0 ? { requiredTier } : {},
|
|
250
324
|
...retryAfterMs !== void 0 ? { retryAfterMs } : {},
|
|
251
325
|
...typeof env?.row === "string" ? { budgetRow: env.row } : {},
|
|
252
326
|
// `retry_after` is DELIBERATELY NOT folded into `retryAfterMs`. Everything
|
|
@@ -547,16 +621,31 @@ var AuthResource = class {
|
|
|
547
621
|
* account) rather than connecting a brand-new one; it is absent on a normal
|
|
548
622
|
* connect.
|
|
549
623
|
*
|
|
550
|
-
* Connection scope (which LinkedIn products are enabled
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
-
* the account
|
|
554
|
-
*
|
|
555
|
-
*
|
|
556
|
-
*
|
|
557
|
-
*
|
|
558
|
-
*
|
|
559
|
-
*
|
|
624
|
+
* Connection scope (which LinkedIn products are enabled) is not something
|
|
625
|
+
* you enumerate and it is NOT derived from the seat: the connect asks for
|
|
626
|
+
* every product (classic, company, sales_navigator, recruiter) and LinkedIn
|
|
627
|
+
* activates whichever ones the account actually holds. The recorded scope is
|
|
628
|
+
* readable back as `requested_products` on the account
|
|
629
|
+
* (`accounts.list()` / `accounts.get()`), and it is what was ASKED for, not
|
|
630
|
+
* proof of attachment.
|
|
631
|
+
*
|
|
632
|
+
* `linkedin_premium` (`"sales_navigator"` | `"recruiter"`) is the one
|
|
633
|
+
* optional narrowing. A LinkedIn account can hold only one of the two
|
|
634
|
+
* premium surfaces, and when both are asked for Sales Navigator wins, so set
|
|
635
|
+
* it to `"recruiter"` for an account that holds both and needs the Recruiter
|
|
636
|
+
* surface. **It applies to this connection only and is never remembered**:
|
|
637
|
+
* a later connect or reconnect that omits it widens the scope back to every
|
|
638
|
+
* product, so state it on every call where Recruiter must win. There is no
|
|
639
|
+
* account-level premium preference to set once.
|
|
640
|
+
*
|
|
641
|
+
* A reconnect that would change scope must use `auth_method: "credentials"`,
|
|
642
|
+
* since a cookie replay cannot change scope and throws
|
|
643
|
+
* `CurviateError(code: "REAUTH_REQUIRED")` instead. Asking for a premium the
|
|
644
|
+
* LinkedIn account does not hold throws
|
|
645
|
+
* `CurviateError(code: "LINKEDIN_FEATURE_NOT_SUBSCRIBED")` (403); the remedy
|
|
646
|
+
* is to activate the subscription on LinkedIn or to point `linkedin_premium`
|
|
647
|
+
* at the premium the account really has. Pin a managed proxy with the
|
|
648
|
+
* optional `country`/`ip`, or supply `proxy` to override it entirely.
|
|
560
649
|
*/
|
|
561
650
|
intent(body) {
|
|
562
651
|
return this.ctx.request({
|
|
@@ -1598,6 +1687,10 @@ var InboxesResource = class {
|
|
|
1598
1687
|
* const companyPage = (items ?? []).find((i) => i.kind === "company");
|
|
1599
1688
|
* console.log(companyPage?.id, companyPage?.name, hint);
|
|
1600
1689
|
* // companyPage?.id is what you pass to listChats(), e.g. "COMPANY_83734124_PRIMARY"
|
|
1690
|
+
*
|
|
1691
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1692
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1693
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1601
1694
|
*/
|
|
1602
1695
|
list(params) {
|
|
1603
1696
|
return this.ctx.request({
|
|
@@ -1634,6 +1727,10 @@ var InboxesResource = class {
|
|
|
1634
1727
|
* or `"COMPANY_83734124_PRIMARY"`).
|
|
1635
1728
|
* @param params - optional `limit` (1-25, default 20) and an opaque
|
|
1636
1729
|
* `cursor` for pagination.
|
|
1730
|
+
*
|
|
1731
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1732
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1733
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1637
1734
|
*/
|
|
1638
1735
|
listChats(inboxId, params) {
|
|
1639
1736
|
return this.ctx.request({
|
|
@@ -1733,7 +1830,10 @@ var SalesNavigatorResource = class {
|
|
|
1733
1830
|
/**
|
|
1734
1831
|
* Search LinkedIn members using the full Sales Navigator filter set.
|
|
1735
1832
|
* `POST /v1/{account_id}/sales-navigator/search/people`
|
|
1736
|
-
*
|
|
1833
|
+
*
|
|
1834
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1835
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1836
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1737
1837
|
*/
|
|
1738
1838
|
searchPeople(body, query) {
|
|
1739
1839
|
return this.ctx.request({
|
|
@@ -1746,6 +1846,10 @@ var SalesNavigatorResource = class {
|
|
|
1746
1846
|
/**
|
|
1747
1847
|
* Search LinkedIn companies using the full Sales Navigator company filter set.
|
|
1748
1848
|
* `POST /v1/{account_id}/sales-navigator/search/companies`
|
|
1849
|
+
*
|
|
1850
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1851
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1852
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1749
1853
|
*/
|
|
1750
1854
|
searchCompanies(body, query) {
|
|
1751
1855
|
return this.ctx.request({
|
|
@@ -1758,6 +1862,10 @@ var SalesNavigatorResource = class {
|
|
|
1758
1862
|
/**
|
|
1759
1863
|
* Resolve human-readable terms to opaque Sales Navigator filter IDs.
|
|
1760
1864
|
* `GET /v1/{account_id}/sales-navigator/search/parameters`
|
|
1865
|
+
*
|
|
1866
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1867
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1868
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1761
1869
|
*/
|
|
1762
1870
|
getParameters(query) {
|
|
1763
1871
|
return this.ctx.request({
|
|
@@ -1770,6 +1878,10 @@ var SalesNavigatorResource = class {
|
|
|
1770
1878
|
* Start a new Sales Navigator chat. `attachments[]`, when supplied, carry
|
|
1771
1879
|
* base64-encoded file bytes, always sent as JSON, never multipart.
|
|
1772
1880
|
* `POST /v1/{account_id}/sales-navigator/chats`
|
|
1881
|
+
*
|
|
1882
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1883
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1884
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1773
1885
|
*/
|
|
1774
1886
|
startChat(body) {
|
|
1775
1887
|
return this.ctx.request({
|
|
@@ -1781,6 +1893,10 @@ var SalesNavigatorResource = class {
|
|
|
1781
1893
|
/**
|
|
1782
1894
|
* Retrieve a LinkedIn profile with Sales Navigator enrichment.
|
|
1783
1895
|
* `GET /v1/{account_id}/sales-navigator/profiles/{identifier}`
|
|
1896
|
+
*
|
|
1897
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1898
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1899
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1784
1900
|
*/
|
|
1785
1901
|
getProfile(identifier, query) {
|
|
1786
1902
|
return this.ctx.request({
|
|
@@ -1793,6 +1909,10 @@ var SalesNavigatorResource = class {
|
|
|
1793
1909
|
/**
|
|
1794
1910
|
* List the saved-account (company) lists on the operator's Sales Navigator seat.
|
|
1795
1911
|
* `GET /v1/{account_id}/sales-navigator/account-lists`
|
|
1912
|
+
*
|
|
1913
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1914
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1915
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1796
1916
|
*/
|
|
1797
1917
|
accountLists(query) {
|
|
1798
1918
|
return this.ctx.request({
|
|
@@ -1804,6 +1924,10 @@ var SalesNavigatorResource = class {
|
|
|
1804
1924
|
/**
|
|
1805
1925
|
* List the saved-lead (member) lists on the operator's Sales Navigator seat.
|
|
1806
1926
|
* `GET /v1/{account_id}/sales-navigator/lead-lists`
|
|
1927
|
+
*
|
|
1928
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1929
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1930
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1807
1931
|
*/
|
|
1808
1932
|
leadLists(query) {
|
|
1809
1933
|
return this.ctx.request({
|
|
@@ -1816,6 +1940,10 @@ var SalesNavigatorResource = class {
|
|
|
1816
1940
|
* Browse the saved accounts (companies) in one account list. Pass optional
|
|
1817
1941
|
* `persona` / `filter` / `sort_by` / `sort_order` filters in the body.
|
|
1818
1942
|
* `POST /v1/{account_id}/sales-navigator/account-lists/{list_id}`
|
|
1943
|
+
*
|
|
1944
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1945
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1946
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1819
1947
|
*/
|
|
1820
1948
|
browseAccountList(listId, body, query) {
|
|
1821
1949
|
return this.ctx.request({
|
|
@@ -1829,6 +1957,10 @@ var SalesNavigatorResource = class {
|
|
|
1829
1957
|
* Browse the saved leads (members) in one lead list. Pass optional
|
|
1830
1958
|
* `spotlight` / `sort_by` / `sort_order` filters in the body.
|
|
1831
1959
|
* `POST /v1/{account_id}/sales-navigator/lead-lists/{list_id}`
|
|
1960
|
+
*
|
|
1961
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1962
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1963
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1832
1964
|
*/
|
|
1833
1965
|
browseLeadList(listId, body, query) {
|
|
1834
1966
|
return this.ctx.request({
|
|
@@ -1845,6 +1977,10 @@ var SalesNavigatorResource = class {
|
|
|
1845
1977
|
*
|
|
1846
1978
|
* No `saved` boolean is invented; a `2xx` response body is the success
|
|
1847
1979
|
* signal (the substrate returns no success flag).
|
|
1980
|
+
*
|
|
1981
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
1982
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
1983
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1848
1984
|
*/
|
|
1849
1985
|
saveAccount(input) {
|
|
1850
1986
|
const { list_id, ...body } = input;
|
|
@@ -1858,6 +1994,10 @@ var SalesNavigatorResource = class {
|
|
|
1858
1994
|
* Save a Sales Navigator member into a lead list. Body is just `{user_id}`;
|
|
1859
1995
|
* `account_id` lives in the path, not the body.
|
|
1860
1996
|
* `POST /v1/{account_id}/sales-navigator/lead-lists/{list_id}/save`
|
|
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.
|
|
1861
2001
|
*/
|
|
1862
2002
|
saveLead(input) {
|
|
1863
2003
|
const { list_id, ...body } = input;
|
|
@@ -1872,6 +2012,10 @@ var SalesNavigatorResource = class {
|
|
|
1872
2012
|
* `POST /v1/{account_id}/sales-navigator/search`
|
|
1873
2013
|
* `url` is the only accepted body field. Response items are polymorphic,
|
|
1874
2014
|
* each discriminated individually by its own `object`.
|
|
2015
|
+
*
|
|
2016
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2017
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2018
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1875
2019
|
*/
|
|
1876
2020
|
searchFromUrl(body, query) {
|
|
1877
2021
|
return this.ctx.request({
|
|
@@ -1908,6 +2052,10 @@ var RecruiterResource = class {
|
|
|
1908
2052
|
* target's public identifier, or a member id. Request specific profile
|
|
1909
2053
|
* sections via `with_sections` (repeatable query param).
|
|
1910
2054
|
* `GET /v1/{account_id}/recruiter/profiles/{user_id}`
|
|
2055
|
+
*
|
|
2056
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2057
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2058
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1911
2059
|
*/
|
|
1912
2060
|
getProfile(identifier, params) {
|
|
1913
2061
|
return this.ctx.request({
|
|
@@ -1920,6 +2068,10 @@ var RecruiterResource = class {
|
|
|
1920
2068
|
* Start a Recruiter chat (InMail). JSON-only, `subject` and `signature`
|
|
1921
2069
|
* are REQUIRED; optional attachments ride the body as base64-encoded
|
|
1922
2070
|
* objects (no multipart). `POST /v1/{account_id}/recruiter/chats`
|
|
2071
|
+
*
|
|
2072
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2073
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2074
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1923
2075
|
*/
|
|
1924
2076
|
startChat(body) {
|
|
1925
2077
|
return this.ctx.request({
|
|
@@ -1931,6 +2083,10 @@ var RecruiterResource = class {
|
|
|
1931
2083
|
/**
|
|
1932
2084
|
* Search LinkedIn members using Recruiter filters. `limit`/`cursor` stay
|
|
1933
2085
|
* TOP-LEVEL query params. `POST /v1/{account_id}/recruiter/search/people`
|
|
2086
|
+
*
|
|
2087
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2088
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2089
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1934
2090
|
*/
|
|
1935
2091
|
searchPeople(body, params) {
|
|
1936
2092
|
return this.ctx.request({
|
|
@@ -1944,6 +2100,10 @@ var RecruiterResource = class {
|
|
|
1944
2100
|
* Resolve human-readable terms to opaque Recruiter filter ids. POST (was
|
|
1945
2101
|
* GET): the body is a `source`-discriminated oneOf, `APPLICANTS`/`PIPELINE`
|
|
1946
2102
|
* require `project_id`. `POST /v1/{account_id}/recruiter/search/parameters`
|
|
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.
|
|
1947
2107
|
*/
|
|
1948
2108
|
searchParameters(body, params) {
|
|
1949
2109
|
return this.ctx.request({
|
|
@@ -1958,6 +2118,10 @@ var RecruiterResource = class {
|
|
|
1958
2118
|
* `RECRUITER_SEARCH` talent-pool channel) is REQUIRED. `limit`/`cursor` stay
|
|
1959
2119
|
* TOP-LEVEL query params.
|
|
1960
2120
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/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.
|
|
1961
2125
|
*/
|
|
1962
2126
|
searchTalentPool(projectId, body, params) {
|
|
1963
2127
|
return this.ctx.request({
|
|
@@ -1972,6 +2136,10 @@ var RecruiterResource = class {
|
|
|
1972
2136
|
* nothing else in the body. The response is a 3-way oneOf (people-search,
|
|
1973
2137
|
* job-applicant list, or pipeline-candidate list) keyed by the URL kind.
|
|
1974
2138
|
* `POST /v1/{account_id}/recruiter/search`
|
|
2139
|
+
*
|
|
2140
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2141
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2142
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1975
2143
|
*/
|
|
1976
2144
|
searchFromUrl(body, params) {
|
|
1977
2145
|
return this.ctx.request({
|
|
@@ -1984,6 +2152,10 @@ var RecruiterResource = class {
|
|
|
1984
2152
|
/**
|
|
1985
2153
|
* List Recruiter hiring projects visible to the account.
|
|
1986
2154
|
* `GET /v1/{account_id}/recruiter/projects`
|
|
2155
|
+
*
|
|
2156
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2157
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2158
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1987
2159
|
*/
|
|
1988
2160
|
listProjects(params) {
|
|
1989
2161
|
return this.ctx.request({
|
|
@@ -1995,6 +2167,10 @@ var RecruiterResource = class {
|
|
|
1995
2167
|
/**
|
|
1996
2168
|
* Get a single Recruiter hiring project (owner, metadata, talent_pool,
|
|
1997
2169
|
* pipeline). `GET /v1/{account_id}/recruiter/projects/{project_id}`
|
|
2170
|
+
*
|
|
2171
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2172
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2173
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
1998
2174
|
*/
|
|
1999
2175
|
getProject(projectId) {
|
|
2000
2176
|
return this.ctx.request({
|
|
@@ -2006,6 +2182,10 @@ var RecruiterResource = class {
|
|
|
2006
2182
|
* Edit a Recruiter project's config: all fields optional; omitted fields
|
|
2007
2183
|
* are left unchanged. Returns a thin acknowledgement only.
|
|
2008
2184
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}`
|
|
2185
|
+
*
|
|
2186
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2187
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2188
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2009
2189
|
*/
|
|
2010
2190
|
updateProject(projectId, body) {
|
|
2011
2191
|
return this.ctx.request({
|
|
@@ -2019,6 +2199,10 @@ var RecruiterResource = class {
|
|
|
2019
2199
|
* an all-optional filter set, no state mutates). `limit`/`cursor` stay
|
|
2020
2200
|
* TOP-LEVEL query params.
|
|
2021
2201
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/pipeline`
|
|
2202
|
+
*
|
|
2203
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2204
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2205
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2022
2206
|
*/
|
|
2023
2207
|
listPipeline(projectId, body = {}, params) {
|
|
2024
2208
|
return this.ctx.request({
|
|
@@ -2032,6 +2216,10 @@ var RecruiterResource = class {
|
|
|
2032
2216
|
* Get the single job posting attached to a Recruiter project (the surface
|
|
2033
2217
|
* returns one posting, not a list; a project with no attached job 404s).
|
|
2034
2218
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
2219
|
+
*
|
|
2220
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2221
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2222
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2035
2223
|
*/
|
|
2036
2224
|
getProjectJob(projectId) {
|
|
2037
2225
|
return this.ctx.request({
|
|
@@ -2043,6 +2231,10 @@ var RecruiterResource = class {
|
|
|
2043
2231
|
* Create a job-posting DRAFT attached to an EXISTING project, `project_name`
|
|
2044
2232
|
* is not accepted (the project comes from the path). Never publishes, never
|
|
2045
2233
|
* spends money. `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
2234
|
+
*
|
|
2235
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2236
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2237
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2046
2238
|
*/
|
|
2047
2239
|
createProjectJob(projectId, body) {
|
|
2048
2240
|
return this.ctx.request({
|
|
@@ -2055,6 +2247,10 @@ var RecruiterResource = class {
|
|
|
2055
2247
|
* Get pricing to publish a project's job posting; price a publish before
|
|
2056
2248
|
* committing any money.
|
|
2057
2249
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/budget`
|
|
2250
|
+
*
|
|
2251
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2252
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2253
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2058
2254
|
*/
|
|
2059
2255
|
getProjectJobBudget(projectId, jobId) {
|
|
2060
2256
|
return this.ctx.request({
|
|
@@ -2066,6 +2262,10 @@ var RecruiterResource = class {
|
|
|
2066
2262
|
* Create a job-posting DRAFT together with a brand-new hiring project,
|
|
2067
2263
|
* `project_name` is REQUIRED; `description` must be >= 200 characters. Never
|
|
2068
2264
|
* publishes, never spends money. `POST /v1/{account_id}/recruiter/jobs`
|
|
2265
|
+
*
|
|
2266
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2267
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2268
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2069
2269
|
*/
|
|
2070
2270
|
createJob(body) {
|
|
2071
2271
|
return this.ctx.request({
|
|
@@ -2077,6 +2277,10 @@ var RecruiterResource = class {
|
|
|
2077
2277
|
/**
|
|
2078
2278
|
* List Recruiter job postings. `limit`/`cursor` stay TOP-LEVEL query params.
|
|
2079
2279
|
* `GET /v1/{account_id}/recruiter/jobs`
|
|
2280
|
+
*
|
|
2281
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2282
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2283
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2080
2284
|
*/
|
|
2081
2285
|
listJobs(params) {
|
|
2082
2286
|
return this.ctx.request({
|
|
@@ -2095,6 +2299,10 @@ var RecruiterResource = class {
|
|
|
2095
2299
|
* client-side; the wire request always carries the numeric id. Throws
|
|
2096
2300
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously if neither
|
|
2097
2301
|
* form can be recognized.
|
|
2302
|
+
*
|
|
2303
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2304
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2305
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2098
2306
|
*/
|
|
2099
2307
|
getJob(jobIdOrUrl) {
|
|
2100
2308
|
const jobId = resolveJobId(jobIdOrUrl);
|
|
@@ -2108,6 +2316,10 @@ var RecruiterResource = class {
|
|
|
2108
2316
|
* change. MONEY WARNING: editing an already-published (LISTED) posting
|
|
2109
2317
|
* mutates a live, money-spending listing.
|
|
2110
2318
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}`
|
|
2319
|
+
*
|
|
2320
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2321
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2322
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2111
2323
|
*/
|
|
2112
2324
|
updateProjectJob(projectId, jobId, body) {
|
|
2113
2325
|
return this.ctx.request({
|
|
@@ -2123,6 +2335,10 @@ var RecruiterResource = class {
|
|
|
2123
2335
|
* the connected account's LinkedIn payment method; supplying `budget` IS the
|
|
2124
2336
|
* explicit opt-in).
|
|
2125
2337
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/publish`
|
|
2338
|
+
*
|
|
2339
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2340
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2341
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2126
2342
|
*/
|
|
2127
2343
|
publishJob(projectId, jobId, body) {
|
|
2128
2344
|
return this.ctx.request({
|
|
@@ -2136,6 +2352,10 @@ var RecruiterResource = class {
|
|
|
2136
2352
|
* (bodyless). Closing an already-published (LISTED) posting cannot be
|
|
2137
2353
|
* undone; there is no re-open operation.
|
|
2138
2354
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/close`
|
|
2355
|
+
*
|
|
2356
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2357
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2358
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2139
2359
|
*/
|
|
2140
2360
|
closeJob(projectId, jobId) {
|
|
2141
2361
|
return this.ctx.request({
|
|
@@ -2147,6 +2367,10 @@ var RecruiterResource = class {
|
|
|
2147
2367
|
* Save a candidate (or user profile) to a project's pipeline at the given
|
|
2148
2368
|
* stage, the sole surviving pipeline write.
|
|
2149
2369
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/pipeline/candidate/save`
|
|
2370
|
+
*
|
|
2371
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2372
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2373
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2150
2374
|
*/
|
|
2151
2375
|
saveCandidate(projectId, body) {
|
|
2152
2376
|
return this.ctx.request({
|
|
@@ -2160,6 +2384,10 @@ var RecruiterResource = class {
|
|
|
2160
2384
|
* filters, no state mutates). `channel_id` (a `JOB_POSTING` talent-pool
|
|
2161
2385
|
* channel) is REQUIRED. `limit`/`cursor` stay TOP-LEVEL query params.
|
|
2162
2386
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants`
|
|
2387
|
+
*
|
|
2388
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2389
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2390
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2163
2391
|
*/
|
|
2164
2392
|
listApplicants(projectId, body, params) {
|
|
2165
2393
|
return this.ctx.request({
|
|
@@ -2172,6 +2400,10 @@ var RecruiterResource = class {
|
|
|
2172
2400
|
/**
|
|
2173
2401
|
* Get full detail for one talent-pool applicant (profile guaranteed full,
|
|
2174
2402
|
* includes PII). `GET /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}`
|
|
2403
|
+
*
|
|
2404
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2405
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2406
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2175
2407
|
*/
|
|
2176
2408
|
getApplicant(projectId, applicantId) {
|
|
2177
2409
|
return this.ctx.request({
|
|
@@ -2183,6 +2415,10 @@ var RecruiterResource = class {
|
|
|
2183
2415
|
* Download a talent-pool applicant's résumé as raw binary.
|
|
2184
2416
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}/resume`
|
|
2185
2417
|
* Returns `ArrayBuffer`; the SDK does not cache or store it.
|
|
2418
|
+
*
|
|
2419
|
+
* @beta Beta operation. See the namespace note above: while beta-gated it
|
|
2420
|
+
* refuses `BETA_NOT_ENABLED` (403) until a human enables beta in Settings,
|
|
2421
|
+
* or the request carries the `X-Curviate-Beta` header.
|
|
2186
2422
|
*/
|
|
2187
2423
|
downloadResume(projectId, applicantId) {
|
|
2188
2424
|
return this.ctx.request({
|
|
@@ -2469,6 +2705,11 @@ var CompaniesResource = class {
|
|
|
2469
2705
|
* never stored. Beta: single-page listing and termination are verified;
|
|
2470
2706
|
* deep pagination (many pages / large cursor round-trips) is provisional
|
|
2471
2707
|
* until validated against a busier inbox.
|
|
2708
|
+
*
|
|
2709
|
+
* @beta Beta operation. While beta-gated it refuses `BETA_NOT_ENABLED`
|
|
2710
|
+
* (403) until a human enables beta in Settings, or the request carries the
|
|
2711
|
+
* `X-Curviate-Beta` header. Sibling methods on this namespace are stable;
|
|
2712
|
+
* the badge is per operation.
|
|
2472
2713
|
*/
|
|
2473
2714
|
chats(identifier, params) {
|
|
2474
2715
|
return this.ctx.request({
|
|
@@ -2523,6 +2764,11 @@ var CompaniesResource = class {
|
|
|
2523
2764
|
* and message content), a `topic` card, or `unread`-only; the three are
|
|
2524
2765
|
* mutually exclusive and enforced server-side. The connected account must
|
|
2525
2766
|
* administer the page. Beta: see `chats()`.
|
|
2767
|
+
*
|
|
2768
|
+
* @beta Beta operation. While beta-gated it refuses `BETA_NOT_ENABLED`
|
|
2769
|
+
* (403) until a human enables beta in Settings, or the request carries the
|
|
2770
|
+
* `X-Curviate-Beta` header. Sibling methods on this namespace are stable;
|
|
2771
|
+
* the badge is per operation.
|
|
2526
2772
|
*/
|
|
2527
2773
|
searchChats(identifier, params) {
|
|
2528
2774
|
return this.ctx.request({
|