@curviate/sdk 0.19.0 → 0.20.1
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 +417 -234
- package/README.md +24 -4
- package/dist/index.d.ts +1525 -1337
- package/dist/index.js +246 -194
- package/package.json +5 -2
- package/src/generated/types.ts +1277 -1128
package/dist/index.js
CHANGED
|
@@ -8,11 +8,17 @@ var ERROR_CODES = [
|
|
|
8
8
|
// Account state
|
|
9
9
|
"ACCOUNT_NOT_FOUND",
|
|
10
10
|
"ACCOUNT_RESTRICTED",
|
|
11
|
-
// Duplicate connect
|
|
11
|
+
// Duplicate connect: reconnect or adopt the existing account instead of
|
|
12
12
|
// linking again. Not retryable.
|
|
13
13
|
"ACCOUNT_ALREADY_LINKED",
|
|
14
14
|
"RESOURCE_NOT_FOUND",
|
|
15
15
|
"RESOURCE_ACCESS_RESTRICTED",
|
|
16
|
+
// Search filter resolution: a plain-string filter value matched several
|
|
17
|
+
// LinkedIn taxonomy options and one has to be picked (422). The body carries
|
|
18
|
+
// `unresolved[]` naming every offending field with its candidate ids, plus a
|
|
19
|
+
// `next_action` sentence. user_fixable, never retryable as sent; re-send
|
|
20
|
+
// with a chosen id.
|
|
21
|
+
"FILTER_CANDIDATES_REQUIRED",
|
|
16
22
|
// Tier / subscription gating
|
|
17
23
|
"TIER_NOT_ACTIVE",
|
|
18
24
|
"LINKEDIN_FEATURE_NOT_SUBSCRIBED",
|
|
@@ -23,13 +29,13 @@ var ERROR_CODES = [
|
|
|
23
29
|
// LinkedIn-platform-level throttling on the Recruiter / Sales Navigator read
|
|
24
30
|
// surface (carries dedicated RateLimit-Policy / RateLimit / Retry-After
|
|
25
31
|
// response headers). Distinct from the account/tenant/platform trio above.
|
|
26
|
-
// Always retry-safe (retry_likely_to_succeed: true)
|
|
32
|
+
// Always retry-safe (retry_likely_to_succeed: true); see RETRYABLE_CODES.
|
|
27
33
|
"RATE_LIMITED",
|
|
28
34
|
// Platform errors
|
|
29
35
|
"PLATFORM_ERROR",
|
|
30
36
|
"PLATFORM_NOT_IMPLEMENTED",
|
|
31
37
|
// Permanent LinkedIn platform limitation for the attempted operation (e.g.
|
|
32
|
-
// listing a non-self user's following list). Not a transient failure
|
|
38
|
+
// listing a non-self user's following list). Not a transient failure,
|
|
33
39
|
// retrying will not help.
|
|
34
40
|
"LINKEDIN_OPERATION_NOT_SUPPORTED",
|
|
35
41
|
// Checkpoint (account connect flow)
|
|
@@ -40,15 +46,15 @@ var ERROR_CODES = [
|
|
|
40
46
|
"CHECKPOINT_ALREADY_RESOLVED",
|
|
41
47
|
"CHECKPOINT_UNSUPPORTED",
|
|
42
48
|
"CONNECTION_IN_PROGRESS",
|
|
43
|
-
// One-premium boundary rejection
|
|
49
|
+
// One-premium boundary rejection: LinkedIn permits only one individual
|
|
44
50
|
// Premium subscription per profile. Surfaces on connect/reconnect (a seat
|
|
45
51
|
// resolving to both premiums) and on the billing seat/tier endpoints (a
|
|
46
52
|
// "naked enable" of one premium while the seat already holds the other).
|
|
47
|
-
// user_fixable, never retryable
|
|
53
|
+
// user_fixable, never retryable; the remedy is two seats, or pairing
|
|
48
54
|
// enable with disable of the current premium in one call.
|
|
49
55
|
"PREMIUM_CONFLICT",
|
|
50
56
|
// A reconnect whose seat-derived scope differs from the account's recorded
|
|
51
|
-
// scope was attempted with cookie auth
|
|
57
|
+
// scope was attempted with cookie auth; a cookie replay cannot change
|
|
52
58
|
// scope, so a full credentials re-authentication is required. user_fixable,
|
|
53
59
|
// never retryable.
|
|
54
60
|
"REAUTH_REQUIRED",
|
|
@@ -62,7 +68,7 @@ var ERROR_CODES = [
|
|
|
62
68
|
"RECIPIENT_UNREACHABLE",
|
|
63
69
|
// Duplicate / already-connected connect-request conflict: a send to a
|
|
64
70
|
// recipient who already has a pending request from this account, or is already
|
|
65
|
-
// a first-degree connection. user_fixable, never retryable
|
|
71
|
+
// a first-degree connection. user_fixable, never retryable; do not re-send.
|
|
66
72
|
"CONNECTION_REQUEST_CONFLICT",
|
|
67
73
|
// Billing (surface: tenant-management)
|
|
68
74
|
"PAYMENT_REQUIRED",
|
|
@@ -92,7 +98,7 @@ var CurviateError = class _CurviateError extends Error {
|
|
|
92
98
|
}
|
|
93
99
|
/**
|
|
94
100
|
* Explicit, credential-safe serialization. Only the documented structured
|
|
95
|
-
* fields are emitted
|
|
101
|
+
* fields are emitted, never a credential, auth header, or any reference to
|
|
96
102
|
* the client. `JSON.stringify(error)` calls this automatically.
|
|
97
103
|
*/
|
|
98
104
|
toJSON() {
|
|
@@ -285,15 +291,46 @@ async function execute(method, path, opts) {
|
|
|
285
291
|
}
|
|
286
292
|
}
|
|
287
293
|
|
|
294
|
+
// src/internal/path.ts
|
|
295
|
+
function encodePathParam(value) {
|
|
296
|
+
return encodeURIComponent(String(value));
|
|
297
|
+
}
|
|
298
|
+
var UNSAFE_SEGMENT = /^(?:\.{1,2})?$/;
|
|
299
|
+
function assertPathIsSendable(path) {
|
|
300
|
+
const segments = path.split("/").slice(1);
|
|
301
|
+
for (const segment of segments) {
|
|
302
|
+
if (!UNSAFE_SEGMENT.test(segment)) continue;
|
|
303
|
+
throw new CurviateError({
|
|
304
|
+
code: "INVALID_REQUEST",
|
|
305
|
+
message: `A path parameter cannot be ${segment === "" ? "empty" : `"${segment}"`}. The URL parser resolves that away before the request is sent, so the call would reach a different endpoint. Pass the id itself.`,
|
|
306
|
+
userFixable: true,
|
|
307
|
+
retryLikelyToSucceed: false
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
function apiPath(strings, ...values) {
|
|
312
|
+
let out = strings[0] ?? "";
|
|
313
|
+
for (let i = 0; i < values.length; i++) {
|
|
314
|
+
out += encodePathParam(values[i]) + (strings[i + 1] ?? "");
|
|
315
|
+
}
|
|
316
|
+
return out;
|
|
317
|
+
}
|
|
318
|
+
|
|
288
319
|
// src/internal/context.ts
|
|
289
320
|
var ACCOUNT_ID_PLACEHOLDER = "{account_id}";
|
|
290
321
|
function injectAccountIdIntoPath(path, accountId) {
|
|
291
322
|
if (accountId === void 0) return path;
|
|
292
|
-
return path.split(ACCOUNT_ID_PLACEHOLDER).join(accountId);
|
|
323
|
+
return path.split(ACCOUNT_ID_PLACEHOLDER).join(encodePathParam(accountId));
|
|
293
324
|
}
|
|
294
325
|
function createContext(config, accountId) {
|
|
295
326
|
const request = (args) => {
|
|
296
|
-
|
|
327
|
+
let path;
|
|
328
|
+
try {
|
|
329
|
+
path = injectAccountIdIntoPath(args.path, accountId);
|
|
330
|
+
assertPathIsSendable(path);
|
|
331
|
+
} catch (err) {
|
|
332
|
+
return Promise.reject(err);
|
|
333
|
+
}
|
|
297
334
|
return execute(args.method, path, {
|
|
298
335
|
apiKey: config.apiKey,
|
|
299
336
|
baseUrl: config.baseUrl,
|
|
@@ -332,10 +369,10 @@ var AccountsResource = class {
|
|
|
332
369
|
*
|
|
333
370
|
* Each item also carries a small set of cached account-detail fields
|
|
334
371
|
* (`username`, `premium_id`, `public_identifier`, `substrate_created_at`,
|
|
335
|
-
* `signatures`, `groups`) populated by an async background enrichment
|
|
372
|
+
* `signatures`, `groups`) populated by an async background enrichment,
|
|
336
373
|
* `null`/`[]` until the account's first enrichment pass completes.
|
|
337
374
|
*
|
|
338
|
-
* @param params - optional `limit` (1
|
|
375
|
+
* @param params - optional `limit` (1-250) and `cursor` (from a prior page).
|
|
339
376
|
* @returns a page of accounts and the next-page `cursor` (null when exhausted).
|
|
340
377
|
*
|
|
341
378
|
* @example
|
|
@@ -354,7 +391,7 @@ var AccountsResource = class {
|
|
|
354
391
|
* central `quotas[]` view for all tracked quota families and `seat_id` (the
|
|
355
392
|
* seat this account occupies, `null` for an admin seatless account).
|
|
356
393
|
*
|
|
357
|
-
* This is a stale-while-revalidate read
|
|
394
|
+
* This is a stale-while-revalidate read; it always returns immediately
|
|
358
395
|
* from the cached row (never blocks on a live substrate call). The cached
|
|
359
396
|
* enrichment fields `full_name` and `substrate_created_at` are populated by
|
|
360
397
|
* a background enrichment pass; `username`, `premium_id`,
|
|
@@ -364,13 +401,13 @@ var AccountsResource = class {
|
|
|
364
401
|
get(accountId) {
|
|
365
402
|
return this.ctx.request({
|
|
366
403
|
method: "GET",
|
|
367
|
-
path: `/v1/accounts/${accountId}`
|
|
404
|
+
path: apiPath`/v1/accounts/${accountId}`
|
|
368
405
|
});
|
|
369
406
|
}
|
|
370
407
|
/**
|
|
371
408
|
* Update an account's configuration.
|
|
372
409
|
*
|
|
373
|
-
* `metadata` is a flat string
|
|
410
|
+
* `metadata` is a flat string->string map that **replaces** the account's
|
|
374
411
|
* custom-data store wholesale (keys not provided are removed). `proxy` sets a
|
|
375
412
|
* custom egress proxy, or clears it (reverting to automatic proxy protection)
|
|
376
413
|
* when passed as `null`. The `proxy.password`, if given, is stored securely
|
|
@@ -379,7 +416,7 @@ var AccountsResource = class {
|
|
|
379
416
|
update(accountId, body) {
|
|
380
417
|
return this.ctx.request({
|
|
381
418
|
method: "PATCH",
|
|
382
|
-
path: `/v1/accounts/${accountId}`,
|
|
419
|
+
path: apiPath`/v1/accounts/${accountId}`,
|
|
383
420
|
body
|
|
384
421
|
});
|
|
385
422
|
}
|
|
@@ -389,7 +426,7 @@ var AccountsResource = class {
|
|
|
389
426
|
disconnect(accountId) {
|
|
390
427
|
return this.ctx.request({
|
|
391
428
|
method: "DELETE",
|
|
392
|
-
path: `/v1/accounts/${accountId}`
|
|
429
|
+
path: apiPath`/v1/accounts/${accountId}`
|
|
393
430
|
});
|
|
394
431
|
}
|
|
395
432
|
};
|
|
@@ -405,17 +442,17 @@ var AuthResource = class {
|
|
|
405
442
|
* Omit `account_id` to connect a NEW account into an empty seat; include it
|
|
406
443
|
* to re-authenticate an EXISTING account in place. Returns the account on
|
|
407
444
|
* success (200 re-authenticated in place / 201 new), or a checkpoint
|
|
408
|
-
* challenge (202) when LinkedIn requires verification
|
|
445
|
+
* challenge (202) when LinkedIn requires verification; resolve it with
|
|
409
446
|
* {@link solveCheckpoint} (code) or {@link pollCheckpoint} (mobile-app
|
|
410
447
|
* approval).
|
|
411
448
|
*
|
|
412
|
-
* For `auth_method: "cookie"`, `user_agent` is **required
|
|
449
|
+
* For `auth_method: "cookie"`, `user_agent` is **required**; connecting by
|
|
413
450
|
* session cookie without one is rejected with `INVALID_REQUEST`. It stays
|
|
414
451
|
* optional for `auth_method: "credentials"`.
|
|
415
452
|
*
|
|
416
453
|
* On a 201 account, `recovered` is `true` only when the connect reclaimed a
|
|
417
454
|
* LinkedIn identity already present on the workspace (claiming it into your
|
|
418
|
-
* account) rather than connecting a brand-new one
|
|
455
|
+
* account) rather than connecting a brand-new one; it is absent on a normal
|
|
419
456
|
* connect.
|
|
420
457
|
*
|
|
421
458
|
* Connection scope (which LinkedIn products are enabled: classic, company,
|
|
@@ -441,7 +478,7 @@ var AuthResource = class {
|
|
|
441
478
|
* special value `TRY_ANOTHER_WAY` to switch challenge method).
|
|
442
479
|
*
|
|
443
480
|
* Returns the connected account (201) or, when LinkedIn chains a second
|
|
444
|
-
* challenge
|
|
481
|
+
* challenge (another checkpoint, 202); resolve that one with a further
|
|
445
482
|
* `solveCheckpoint` call for the same `accountId`.
|
|
446
483
|
*
|
|
447
484
|
* @param accountId - the (provisional) `account_id` from the 202 response.
|
|
@@ -458,7 +495,7 @@ var AuthResource = class {
|
|
|
458
495
|
* Re-request the pending checkpoint notification (OTP / 2FA / mobile-app
|
|
459
496
|
* push). `resent` is honest: `true` once the notification was actually
|
|
460
497
|
* re-sent, `false` when there was nothing to re-send for that challenge
|
|
461
|
-
* type (e.g. an authenticator-app code)
|
|
498
|
+
* type (e.g. an authenticator-app code); this call never throws just
|
|
462
499
|
* because a re-send wasn't applicable. Does not reset the checkpoint's
|
|
463
500
|
* expiry.
|
|
464
501
|
*
|
|
@@ -488,17 +525,17 @@ var AuthResource = class {
|
|
|
488
525
|
});
|
|
489
526
|
}
|
|
490
527
|
/**
|
|
491
|
-
* Poll a credential connect session by its account id
|
|
528
|
+
* Poll a credential connect session by its account id, a pure status read
|
|
492
529
|
* that makes no external call and does not itself complete the connection.
|
|
493
530
|
* `status` is `checkpoint_required` until resolved, then `done` (with
|
|
494
531
|
* `account_id`), or `expired` / `failed`.
|
|
495
532
|
*
|
|
496
|
-
* @param sessionId - the acc_
|
|
533
|
+
* @param sessionId - the acc_... id returned by {@link intent} or a checkpoint response.
|
|
497
534
|
*/
|
|
498
535
|
getSession(sessionId) {
|
|
499
536
|
return this.ctx.request({
|
|
500
537
|
method: "GET",
|
|
501
|
-
path: `/v1/auth/sessions/${sessionId}`
|
|
538
|
+
path: apiPath`/v1/auth/sessions/${sessionId}`
|
|
502
539
|
});
|
|
503
540
|
}
|
|
504
541
|
};
|
|
@@ -536,7 +573,7 @@ var MessagingResource = class {
|
|
|
536
573
|
getChat(chatId) {
|
|
537
574
|
return this.ctx.request({
|
|
538
575
|
method: "GET",
|
|
539
|
-
path: `/v1/{account_id}/chats/${chatId}`
|
|
576
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}`
|
|
540
577
|
});
|
|
541
578
|
}
|
|
542
579
|
/**
|
|
@@ -546,7 +583,7 @@ var MessagingResource = class {
|
|
|
546
583
|
markChatRead(chatId, body) {
|
|
547
584
|
return this.ctx.request({
|
|
548
585
|
method: "PATCH",
|
|
549
|
-
path: `/v1/{account_id}/chats/${chatId}`,
|
|
586
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}`,
|
|
550
587
|
body
|
|
551
588
|
});
|
|
552
589
|
}
|
|
@@ -557,7 +594,7 @@ var MessagingResource = class {
|
|
|
557
594
|
listMessages(chatId, params) {
|
|
558
595
|
return this.ctx.request({
|
|
559
596
|
method: "GET",
|
|
560
|
-
path: `/v1/{account_id}/chats/${chatId}/messages`,
|
|
597
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages`,
|
|
561
598
|
...params ? { query: params } : {}
|
|
562
599
|
});
|
|
563
600
|
}
|
|
@@ -592,7 +629,7 @@ var MessagingResource = class {
|
|
|
592
629
|
sendMessage(chatId, body) {
|
|
593
630
|
return this.ctx.request({
|
|
594
631
|
method: "POST",
|
|
595
|
-
path: `/v1/{account_id}/chats/${chatId}/messages`,
|
|
632
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages`,
|
|
596
633
|
body
|
|
597
634
|
});
|
|
598
635
|
}
|
|
@@ -603,7 +640,7 @@ var MessagingResource = class {
|
|
|
603
640
|
getMessage(chatId, messageId) {
|
|
604
641
|
return this.ctx.request({
|
|
605
642
|
method: "GET",
|
|
606
|
-
path: `/v1/{account_id}/chats/${chatId}/messages/${messageId}`
|
|
643
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages/${messageId}`
|
|
607
644
|
});
|
|
608
645
|
}
|
|
609
646
|
/**
|
|
@@ -613,7 +650,7 @@ var MessagingResource = class {
|
|
|
613
650
|
editMessage(chatId, messageId, body) {
|
|
614
651
|
return this.ctx.request({
|
|
615
652
|
method: "PATCH",
|
|
616
|
-
path: `/v1/{account_id}/chats/${chatId}/messages/${messageId}`,
|
|
653
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages/${messageId}`,
|
|
617
654
|
body
|
|
618
655
|
});
|
|
619
656
|
}
|
|
@@ -624,7 +661,7 @@ var MessagingResource = class {
|
|
|
624
661
|
deleteMessage(chatId, messageId) {
|
|
625
662
|
return this.ctx.request({
|
|
626
663
|
method: "DELETE",
|
|
627
|
-
path: `/v1/{account_id}/chats/${chatId}/messages/${messageId}`
|
|
664
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages/${messageId}`
|
|
628
665
|
});
|
|
629
666
|
}
|
|
630
667
|
/**
|
|
@@ -634,19 +671,19 @@ var MessagingResource = class {
|
|
|
634
671
|
addReaction(chatId, messageId, body) {
|
|
635
672
|
return this.ctx.request({
|
|
636
673
|
method: "POST",
|
|
637
|
-
path: `/v1/{account_id}/chats/${chatId}/messages/${messageId}/reactions`,
|
|
674
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages/${messageId}/reactions`,
|
|
638
675
|
body
|
|
639
676
|
});
|
|
640
677
|
}
|
|
641
678
|
/**
|
|
642
679
|
* Download a message attachment. Returns raw binary.
|
|
643
680
|
* `GET /v1/{account_id}/chats/{chat_id}/messages/{message_id}/attachments/{attachment_id}`
|
|
644
|
-
* Returns `ArrayBuffer
|
|
681
|
+
* Returns `ArrayBuffer`, binary response; the SDK does not cache or store it.
|
|
645
682
|
*/
|
|
646
683
|
getAttachment(chatId, messageId, attachmentId) {
|
|
647
684
|
return this.ctx.request({
|
|
648
685
|
method: "GET",
|
|
649
|
-
path: `/v1/{account_id}/chats/${chatId}/messages/${messageId}/attachments/${attachmentId}`
|
|
686
|
+
path: apiPath`/v1/{account_id}/chats/${chatId}/messages/${messageId}/attachments/${attachmentId}`
|
|
650
687
|
});
|
|
651
688
|
}
|
|
652
689
|
/** Send an InMail. `POST /v1/{account_id}/messages/inmail` */
|
|
@@ -658,7 +695,7 @@ var MessagingResource = class {
|
|
|
658
695
|
});
|
|
659
696
|
}
|
|
660
697
|
/**
|
|
661
|
-
* Free-text search the account's own inbox
|
|
698
|
+
* Free-text search the account's own inbox; matches participant names
|
|
662
699
|
* and message content. `GET /v1/{account_id}/chats/search`
|
|
663
700
|
*
|
|
664
701
|
* @param params - `query` (required free-text term) plus `limit` and an
|
|
@@ -687,25 +724,25 @@ var UsersResource = class {
|
|
|
687
724
|
get(userId, params) {
|
|
688
725
|
return this.ctx.request({
|
|
689
726
|
method: "GET",
|
|
690
|
-
path: `/v1/{account_id}/users/${userId}`,
|
|
727
|
+
path: apiPath`/v1/{account_id}/users/${userId}`,
|
|
691
728
|
...params ? { query: params } : {}
|
|
692
729
|
});
|
|
693
730
|
}
|
|
694
731
|
/**
|
|
695
732
|
* Update the caller's own profile. `PATCH /v1/{account_id}/users/{user_id}`
|
|
696
733
|
* Only `first_name`, `last_name`, `bio`, `headline`, `skills`, `picture`,
|
|
697
|
-
* `background_picture` are accepted
|
|
734
|
+
* `background_picture` are accepted; there is no `description` key.
|
|
698
735
|
* `description` is not part of the update contract: TypeScript already
|
|
699
736
|
* rejects it at the call site, but an untyped/JS caller (or an `as`-cast)
|
|
700
737
|
* could still smuggle it onto the object, so it is also stripped
|
|
701
|
-
* defensively at runtime before the request goes out
|
|
738
|
+
* defensively at runtime before the request goes out, the caller's
|
|
702
739
|
* object is never mutated.
|
|
703
740
|
*/
|
|
704
741
|
update(userId, body) {
|
|
705
742
|
const { description: _description, ...safeBody } = body;
|
|
706
743
|
return this.ctx.request({
|
|
707
744
|
method: "PATCH",
|
|
708
|
-
path: `/v1/{account_id}/users/${userId}`,
|
|
745
|
+
path: apiPath`/v1/{account_id}/users/${userId}`,
|
|
709
746
|
body: safeBody
|
|
710
747
|
});
|
|
711
748
|
}
|
|
@@ -725,7 +762,7 @@ var UsersResource = class {
|
|
|
725
762
|
listFollowers(userId, params) {
|
|
726
763
|
return this.ctx.request({
|
|
727
764
|
method: "GET",
|
|
728
|
-
path: `/v1/{account_id}/users/${userId}/followers`,
|
|
765
|
+
path: apiPath`/v1/{account_id}/users/${userId}/followers`,
|
|
729
766
|
...params ? { query: params } : {}
|
|
730
767
|
});
|
|
731
768
|
}
|
|
@@ -733,7 +770,7 @@ var UsersResource = class {
|
|
|
733
770
|
listFollowing(userId, params) {
|
|
734
771
|
return this.ctx.request({
|
|
735
772
|
method: "GET",
|
|
736
|
-
path: `/v1/{account_id}/users/${userId}/following`,
|
|
773
|
+
path: apiPath`/v1/{account_id}/users/${userId}/following`,
|
|
737
774
|
...params ? { query: params } : {}
|
|
738
775
|
});
|
|
739
776
|
}
|
|
@@ -745,18 +782,18 @@ var UsersResource = class {
|
|
|
745
782
|
follow(userId) {
|
|
746
783
|
return this.ctx.request({
|
|
747
784
|
method: "POST",
|
|
748
|
-
path: `/v1/{account_id}/users/${userId}/follow`
|
|
785
|
+
path: apiPath`/v1/{account_id}/users/${userId}/follow`
|
|
749
786
|
});
|
|
750
787
|
}
|
|
751
788
|
/**
|
|
752
789
|
* Unfollow a user (bodyless). `DELETE /v1/{account_id}/users/{user_id}/follow`
|
|
753
|
-
* Idempotent
|
|
790
|
+
* Idempotent: unfollowing a user this account does not currently follow
|
|
754
791
|
* still returns 200.
|
|
755
792
|
*/
|
|
756
793
|
unfollow(userId) {
|
|
757
794
|
return this.ctx.request({
|
|
758
795
|
method: "DELETE",
|
|
759
|
-
path: `/v1/{account_id}/users/${userId}/follow`
|
|
796
|
+
path: apiPath`/v1/{account_id}/users/${userId}/follow`
|
|
760
797
|
});
|
|
761
798
|
}
|
|
762
799
|
/**
|
|
@@ -780,7 +817,7 @@ var UsersResource = class {
|
|
|
780
817
|
endorseSkill(userId, body) {
|
|
781
818
|
return this.ctx.request({
|
|
782
819
|
method: "POST",
|
|
783
|
-
path: `/v1/{account_id}/users/${userId}/endorse-skill`,
|
|
820
|
+
path: apiPath`/v1/{account_id}/users/${userId}/endorse-skill`,
|
|
784
821
|
body
|
|
785
822
|
});
|
|
786
823
|
}
|
|
@@ -823,7 +860,7 @@ var InvitesResource = class {
|
|
|
823
860
|
accept(invitationId) {
|
|
824
861
|
return this.ctx.request({
|
|
825
862
|
method: "POST",
|
|
826
|
-
path: `/v1/{account_id}/invites/received/${invitationId}/accept`
|
|
863
|
+
path: apiPath`/v1/{account_id}/invites/received/${invitationId}/accept`
|
|
827
864
|
});
|
|
828
865
|
}
|
|
829
866
|
/**
|
|
@@ -834,7 +871,7 @@ var InvitesResource = class {
|
|
|
834
871
|
decline(invitationId) {
|
|
835
872
|
return this.ctx.request({
|
|
836
873
|
method: "POST",
|
|
837
|
-
path: `/v1/{account_id}/invites/received/${invitationId}/decline`
|
|
874
|
+
path: apiPath`/v1/{account_id}/invites/received/${invitationId}/decline`
|
|
838
875
|
});
|
|
839
876
|
}
|
|
840
877
|
/**
|
|
@@ -845,7 +882,7 @@ var InvitesResource = class {
|
|
|
845
882
|
cancel(invitationId) {
|
|
846
883
|
return this.ctx.request({
|
|
847
884
|
method: "DELETE",
|
|
848
|
-
path: `/v1/{account_id}/invites/sent/${invitationId}`
|
|
885
|
+
path: apiPath`/v1/{account_id}/invites/sent/${invitationId}`
|
|
849
886
|
});
|
|
850
887
|
}
|
|
851
888
|
};
|
|
@@ -936,7 +973,7 @@ var SearchResource = class {
|
|
|
936
973
|
/**
|
|
937
974
|
* Run a pasted LinkedIn search/saved-search/lead-list URL directly.
|
|
938
975
|
* `POST /v1/{account_id}/search`
|
|
939
|
-
* `url` is the ONLY accepted body field
|
|
976
|
+
* `url` is the ONLY accepted body field, the sole home of URL-mode search;
|
|
940
977
|
* the structured endpoints above no longer accept `url`. The response is
|
|
941
978
|
* polymorphic, each item discriminated individually by its own `object`.
|
|
942
979
|
*/
|
|
@@ -972,7 +1009,7 @@ var SearchResource = class {
|
|
|
972
1009
|
* `POST /v1/{account_id}/search/services`
|
|
973
1010
|
* `limit`/`cursor` are top-level query params, never in the body. Resolve
|
|
974
1011
|
* `service_category`/`location` filter values with `getServiceParameters()`
|
|
975
|
-
* first
|
|
1012
|
+
* first, both take opaque ids, not free text.
|
|
976
1013
|
*/
|
|
977
1014
|
services(body) {
|
|
978
1015
|
const split = splitPagination(body);
|
|
@@ -1009,26 +1046,39 @@ var PostsResource = class {
|
|
|
1009
1046
|
listComments(postId, params) {
|
|
1010
1047
|
return this.ctx.request({
|
|
1011
1048
|
method: "GET",
|
|
1012
|
-
path: `/v1/{account_id}/posts/${postId}/comments`,
|
|
1049
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments`,
|
|
1013
1050
|
...params ? { query: params } : {}
|
|
1014
1051
|
});
|
|
1015
1052
|
}
|
|
1016
|
-
/**
|
|
1053
|
+
/**
|
|
1054
|
+
* Get a single post. `GET /v1/{account_id}/posts/{post_id}`
|
|
1055
|
+
*
|
|
1056
|
+
* @param postId - the post's `id` as returned by {@link listUserPosts} or
|
|
1057
|
+
* {@link create}. A bare numeric id (`7332661864792854528`), a URN
|
|
1058
|
+
* (`urn:li:activity:N`, `urn:li:ugcPost:N`, `urn:li:share:N`), and a full
|
|
1059
|
+
* share URL (`https://www.linkedin.com/posts/...` or
|
|
1060
|
+
* `https://www.linkedin.com/feed/update/urn:li:activity:N`) all resolve to
|
|
1061
|
+
* the same post. Pass the value as-is; it is percent-encoded into the path
|
|
1062
|
+
* for you, so do not encode it yourself.
|
|
1063
|
+
*
|
|
1064
|
+
* {@link listComments} and the reaction operations are stricter: they take
|
|
1065
|
+
* the opaque `id` form only.
|
|
1066
|
+
*/
|
|
1017
1067
|
get(postId) {
|
|
1018
1068
|
return this.ctx.request({
|
|
1019
1069
|
method: "GET",
|
|
1020
|
-
path: `/v1/{account_id}/posts/${postId}`
|
|
1070
|
+
path: apiPath`/v1/{account_id}/posts/${postId}`
|
|
1021
1071
|
});
|
|
1022
1072
|
}
|
|
1023
1073
|
/** Delete a post (bodyless, 204). `DELETE /v1/{account_id}/posts/{post_id}` */
|
|
1024
1074
|
delete(postId) {
|
|
1025
1075
|
return this.ctx.request({
|
|
1026
1076
|
method: "DELETE",
|
|
1027
|
-
path: `/v1/{account_id}/posts/${postId}`
|
|
1077
|
+
path: apiPath`/v1/{account_id}/posts/${postId}`
|
|
1028
1078
|
});
|
|
1029
1079
|
}
|
|
1030
1080
|
/**
|
|
1031
|
-
* Publish a new post. Always `application/json
|
|
1081
|
+
* Publish a new post. Always `application/json`; attachments (if any) are
|
|
1032
1082
|
* base64-encoded objects, never `FormData`/multipart.
|
|
1033
1083
|
* `POST /v1/{account_id}/posts`
|
|
1034
1084
|
*/
|
|
@@ -1046,7 +1096,7 @@ var PostsResource = class {
|
|
|
1046
1096
|
listUserPosts(userId, params) {
|
|
1047
1097
|
return this.ctx.request({
|
|
1048
1098
|
method: "GET",
|
|
1049
|
-
path: `/v1/{account_id}/users/${userId}/posts`,
|
|
1099
|
+
path: apiPath`/v1/{account_id}/users/${userId}/posts`,
|
|
1050
1100
|
...params ? { query: params } : {}
|
|
1051
1101
|
});
|
|
1052
1102
|
}
|
|
@@ -1054,7 +1104,7 @@ var PostsResource = class {
|
|
|
1054
1104
|
listReactions(postId, params) {
|
|
1055
1105
|
return this.ctx.request({
|
|
1056
1106
|
method: "GET",
|
|
1057
|
-
path: `/v1/{account_id}/posts/${postId}/reactions`,
|
|
1107
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/reactions`,
|
|
1058
1108
|
...params ? { query: params } : {}
|
|
1059
1109
|
});
|
|
1060
1110
|
}
|
|
@@ -1062,19 +1112,19 @@ var PostsResource = class {
|
|
|
1062
1112
|
react(postId, body) {
|
|
1063
1113
|
return this.ctx.request({
|
|
1064
1114
|
method: "POST",
|
|
1065
|
-
path: `/v1/{account_id}/posts/${postId}/reactions`,
|
|
1115
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/reactions`,
|
|
1066
1116
|
body
|
|
1067
1117
|
});
|
|
1068
1118
|
}
|
|
1069
1119
|
/**
|
|
1070
|
-
* Remove this account's reaction from a post
|
|
1120
|
+
* Remove this account's reaction from a post, a **DELETE-with-body**:
|
|
1071
1121
|
* the reaction value to remove travels in the JSON body, not the path.
|
|
1072
1122
|
* `DELETE /v1/{account_id}/posts/{post_id}/reactions`
|
|
1073
1123
|
*/
|
|
1074
1124
|
unreact(postId, body) {
|
|
1075
1125
|
return this.ctx.request({
|
|
1076
1126
|
method: "DELETE",
|
|
1077
|
-
path: `/v1/{account_id}/posts/${postId}/reactions`,
|
|
1127
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/reactions`,
|
|
1078
1128
|
body
|
|
1079
1129
|
});
|
|
1080
1130
|
}
|
|
@@ -1085,15 +1135,15 @@ var PostsResource = class {
|
|
|
1085
1135
|
listUserReactions(userId, params) {
|
|
1086
1136
|
return this.ctx.request({
|
|
1087
1137
|
method: "GET",
|
|
1088
|
-
path: `/v1/{account_id}/users/${userId}/reactions`,
|
|
1138
|
+
path: apiPath`/v1/{account_id}/users/${userId}/reactions`,
|
|
1089
1139
|
...params ? { query: params } : {}
|
|
1090
1140
|
});
|
|
1091
1141
|
}
|
|
1092
1142
|
/**
|
|
1093
|
-
* List the connected account's own saved posts (a private bookmark list)
|
|
1094
|
-
*
|
|
1143
|
+
* List the connected account's own saved posts (a private bookmark list),
|
|
1144
|
+
* newest-saved-first. A self resource: there is no other-member
|
|
1095
1145
|
* saved-posts view, so this takes no target param. Each item is a
|
|
1096
|
-
* PREVIEW
|
|
1146
|
+
* PREVIEW, `snippet` capped at <=140 chars, never the full post body.
|
|
1097
1147
|
* `GET /v1/{account_id}/saved-posts`
|
|
1098
1148
|
*
|
|
1099
1149
|
* @param params - optional `limit` (default 20, a page-aligned lower
|
|
@@ -1108,14 +1158,14 @@ var PostsResource = class {
|
|
|
1108
1158
|
}
|
|
1109
1159
|
/**
|
|
1110
1160
|
* Save a post to the connected account's private bookmark list. Any post
|
|
1111
|
-
* may be saved
|
|
1161
|
+
* may be saved; it does not notify the author and is never visible to
|
|
1112
1162
|
* third parties. Idempotent: saving an already-saved post re-asserts
|
|
1113
1163
|
* `saved:true`.
|
|
1114
1164
|
* `POST /v1/{account_id}/saved-posts`
|
|
1115
1165
|
*
|
|
1116
1166
|
* @param postId - the post to save. Accepts `urn:li:activity:<id>` or a
|
|
1117
|
-
* bare numeric `<id
|
|
1118
|
-
* shape (`urn:li:ugcPost
|
|
1167
|
+
* bare numeric `<id>`, both normalize to the same target. Any other
|
|
1168
|
+
* shape (`urn:li:ugcPost:...`, `urn:li:share:...`, a URL) is rejected with
|
|
1119
1169
|
* `400 INVALID_REQUEST`.
|
|
1120
1170
|
*/
|
|
1121
1171
|
save(postId) {
|
|
@@ -1127,7 +1177,7 @@ var PostsResource = class {
|
|
|
1127
1177
|
});
|
|
1128
1178
|
}
|
|
1129
1179
|
/**
|
|
1130
|
-
* Unsave a post
|
|
1180
|
+
* Unsave a post, the reverse of {@link save}, over the SAME underlying
|
|
1131
1181
|
* save-state call (a distinct product endpoint, one substrate call).
|
|
1132
1182
|
* Idempotent: unsaving a not-currently-saved post re-asserts
|
|
1133
1183
|
* `saved:false`.
|
|
@@ -1138,7 +1188,7 @@ var PostsResource = class {
|
|
|
1138
1188
|
unsave(postId) {
|
|
1139
1189
|
return this.ctx.request({
|
|
1140
1190
|
method: "DELETE",
|
|
1141
|
-
path: `/v1/{account_id}/saved-posts/${postId}`
|
|
1191
|
+
path: apiPath`/v1/{account_id}/saved-posts/${postId}`
|
|
1142
1192
|
});
|
|
1143
1193
|
}
|
|
1144
1194
|
};
|
|
@@ -1156,7 +1206,7 @@ var CommentsResource = class {
|
|
|
1156
1206
|
listUserComments(userId, params) {
|
|
1157
1207
|
return this.ctx.request({
|
|
1158
1208
|
method: "GET",
|
|
1159
|
-
path: `/v1/{account_id}/users/${userId}/comments`,
|
|
1209
|
+
path: apiPath`/v1/{account_id}/users/${userId}/comments`,
|
|
1160
1210
|
...params ? { query: params } : {}
|
|
1161
1211
|
});
|
|
1162
1212
|
}
|
|
@@ -1168,7 +1218,7 @@ var CommentsResource = class {
|
|
|
1168
1218
|
create(postId, body) {
|
|
1169
1219
|
return this.ctx.request({
|
|
1170
1220
|
method: "POST",
|
|
1171
|
-
path: `/v1/{account_id}/posts/${postId}/comments`,
|
|
1221
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments`,
|
|
1172
1222
|
body
|
|
1173
1223
|
});
|
|
1174
1224
|
}
|
|
@@ -1179,7 +1229,7 @@ var CommentsResource = class {
|
|
|
1179
1229
|
edit(postId, commentId, body) {
|
|
1180
1230
|
return this.ctx.request({
|
|
1181
1231
|
method: "PATCH",
|
|
1182
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}`,
|
|
1232
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}`,
|
|
1183
1233
|
body
|
|
1184
1234
|
});
|
|
1185
1235
|
}
|
|
@@ -1190,18 +1240,18 @@ var CommentsResource = class {
|
|
|
1190
1240
|
delete(postId, commentId) {
|
|
1191
1241
|
return this.ctx.request({
|
|
1192
1242
|
method: "DELETE",
|
|
1193
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}`
|
|
1243
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}`
|
|
1194
1244
|
});
|
|
1195
1245
|
}
|
|
1196
1246
|
/**
|
|
1197
|
-
* Reply to a comment. Shares its path with `edit
|
|
1247
|
+
* Reply to a comment. Shares its path with `edit`; POST creates a reply
|
|
1198
1248
|
* under the target comment, PATCH edits the target comment's own text.
|
|
1199
1249
|
* `POST /v1/{account_id}/posts/{post_id}/comments/{comment_id}`
|
|
1200
1250
|
*/
|
|
1201
1251
|
reply(postId, commentId, body) {
|
|
1202
1252
|
return this.ctx.request({
|
|
1203
1253
|
method: "POST",
|
|
1204
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}`,
|
|
1254
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}`,
|
|
1205
1255
|
body
|
|
1206
1256
|
});
|
|
1207
1257
|
}
|
|
@@ -1212,7 +1262,7 @@ var CommentsResource = class {
|
|
|
1212
1262
|
listReplies(postId, commentId, params) {
|
|
1213
1263
|
return this.ctx.request({
|
|
1214
1264
|
method: "GET",
|
|
1215
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}/replies`,
|
|
1265
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}/replies`,
|
|
1216
1266
|
...params ? { query: params } : {}
|
|
1217
1267
|
});
|
|
1218
1268
|
}
|
|
@@ -1223,7 +1273,7 @@ var CommentsResource = class {
|
|
|
1223
1273
|
listReactions(postId, commentId, params) {
|
|
1224
1274
|
return this.ctx.request({
|
|
1225
1275
|
method: "GET",
|
|
1226
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}/reactions`,
|
|
1276
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}/reactions`,
|
|
1227
1277
|
...params ? { query: params } : {}
|
|
1228
1278
|
});
|
|
1229
1279
|
}
|
|
@@ -1233,19 +1283,19 @@ var CommentsResource = class {
|
|
|
1233
1283
|
addReaction(postId, commentId, body) {
|
|
1234
1284
|
return this.ctx.request({
|
|
1235
1285
|
method: "POST",
|
|
1236
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}/reactions`,
|
|
1286
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}/reactions`,
|
|
1237
1287
|
body
|
|
1238
1288
|
});
|
|
1239
1289
|
}
|
|
1240
1290
|
/**
|
|
1241
|
-
* Remove this account's reaction from a comment
|
|
1291
|
+
* Remove this account's reaction from a comment, a **DELETE-with-body**:
|
|
1242
1292
|
* the reaction value to remove travels in the JSON body, not the path.
|
|
1243
1293
|
* `DELETE /v1/{account_id}/posts/{post_id}/comments/{comment_id}/reactions`
|
|
1244
1294
|
*/
|
|
1245
1295
|
removeReaction(postId, commentId, body) {
|
|
1246
1296
|
return this.ctx.request({
|
|
1247
1297
|
method: "DELETE",
|
|
1248
|
-
path: `/v1/{account_id}/posts/${postId}/comments/${commentId}/reactions`,
|
|
1298
|
+
path: apiPath`/v1/{account_id}/posts/${postId}/comments/${commentId}/reactions`,
|
|
1249
1299
|
body
|
|
1250
1300
|
});
|
|
1251
1301
|
}
|
|
@@ -1257,7 +1307,7 @@ var ProfileResource = class {
|
|
|
1257
1307
|
this.ctx = ctx;
|
|
1258
1308
|
}
|
|
1259
1309
|
/**
|
|
1260
|
-
* Read the connected account's premium subscription
|
|
1310
|
+
* Read the connected account's premium subscription: its full entitlement
|
|
1261
1311
|
* inventory, primary plan title, and LinkedIn management links.
|
|
1262
1312
|
* `GET /v1/{account_id}/profile/subscription`
|
|
1263
1313
|
*
|
|
@@ -1273,7 +1323,7 @@ var ProfileResource = class {
|
|
|
1273
1323
|
});
|
|
1274
1324
|
}
|
|
1275
1325
|
/**
|
|
1276
|
-
* Read the connected account's performance headline metrics
|
|
1326
|
+
* Read the connected account's performance headline metrics, profile
|
|
1277
1327
|
* viewers, followers, post impressions, and search appearances.
|
|
1278
1328
|
* `GET /v1/{account_id}/profile/analytics`
|
|
1279
1329
|
*
|
|
@@ -1293,13 +1343,13 @@ var ProfileResource = class {
|
|
|
1293
1343
|
* cursor-paginated and classified by disclosure fidelity.
|
|
1294
1344
|
* `GET /v1/{account_id}/profile/visitors`
|
|
1295
1345
|
*
|
|
1296
|
-
* Each item's `kind` is `identified`, `semi-anonymous`, or `aggregate
|
|
1346
|
+
* Each item's `kind` is `identified`, `semi-anonymous`, or `aggregate`,
|
|
1297
1347
|
* a Premium account sees identified viewers, a free account is capped at a
|
|
1298
1348
|
* lower fidelity (still a `200`, never a permission error). Page with the
|
|
1299
1349
|
* returned `cursor`: a non-null `cursor` means more may exist, even if a
|
|
1300
1350
|
* page held zero identified individuals; `cursor: null` means exhausted.
|
|
1301
1351
|
*
|
|
1302
|
-
* @param params - `limit` (1
|
|
1352
|
+
* @param params - `limit` (1-100, default 20) and an opaque `cursor` from
|
|
1303
1353
|
* a prior response.
|
|
1304
1354
|
*/
|
|
1305
1355
|
visitors(params) {
|
|
@@ -1310,7 +1360,7 @@ var ProfileResource = class {
|
|
|
1310
1360
|
});
|
|
1311
1361
|
}
|
|
1312
1362
|
/**
|
|
1313
|
-
* Read the connected account's Social Selling Index
|
|
1363
|
+
* Read the connected account's Social Selling Index, the overall score,
|
|
1314
1364
|
* its four pillar breakdowns, and industry/network percentile ranks.
|
|
1315
1365
|
* `GET /v1/{account_id}/profile/ssi`
|
|
1316
1366
|
*
|
|
@@ -1350,7 +1400,7 @@ var GroupsResource = class {
|
|
|
1350
1400
|
});
|
|
1351
1401
|
}
|
|
1352
1402
|
/**
|
|
1353
|
-
* Retrieve a single LinkedIn group's full detail
|
|
1403
|
+
* Retrieve a single LinkedIn group's full detail: its name, description,
|
|
1354
1404
|
* member count, membership status, and admin contact.
|
|
1355
1405
|
* `GET /v1/{account_id}/groups/{group}`
|
|
1356
1406
|
*
|
|
@@ -1359,14 +1409,14 @@ var GroupsResource = class {
|
|
|
1359
1409
|
get(group) {
|
|
1360
1410
|
return this.ctx.request({
|
|
1361
1411
|
method: "GET",
|
|
1362
|
-
path: `/v1/{account_id}/groups/${group}`
|
|
1412
|
+
path: apiPath`/v1/{account_id}/groups/${group}`
|
|
1363
1413
|
});
|
|
1364
1414
|
}
|
|
1365
1415
|
/**
|
|
1366
1416
|
* List a group's members, cursor-paginated, each carrying its profile URL,
|
|
1367
1417
|
* name, and headline. `GET /v1/{account_id}/groups/{group}/members`
|
|
1368
1418
|
*
|
|
1369
|
-
* Pass `{ name }` to search the roster by member name
|
|
1419
|
+
* Pass `{ name }` to search the roster by member name, the folded-in
|
|
1370
1420
|
* member search, not a separate endpoint.
|
|
1371
1421
|
*
|
|
1372
1422
|
* @param group - the group's id or LinkedIn group URL.
|
|
@@ -1376,7 +1426,7 @@ var GroupsResource = class {
|
|
|
1376
1426
|
members(group, params) {
|
|
1377
1427
|
return this.ctx.request({
|
|
1378
1428
|
method: "GET",
|
|
1379
|
-
path: `/v1/{account_id}/groups/${group}/members`,
|
|
1429
|
+
path: apiPath`/v1/{account_id}/groups/${group}/members`,
|
|
1380
1430
|
...params ? { query: params } : {}
|
|
1381
1431
|
});
|
|
1382
1432
|
}
|
|
@@ -1393,11 +1443,11 @@ var FeedResource = class {
|
|
|
1393
1443
|
*
|
|
1394
1444
|
* Pass `{ sort }` to choose the order: `recent` (reverse-chronological,
|
|
1395
1445
|
* the default) or `relevant` (LinkedIn's ranked "top" feed). The feed is an
|
|
1396
|
-
* unbounded, reordering stream with no total count
|
|
1446
|
+
* unbounded, reordering stream with no total count; walk it with the
|
|
1397
1447
|
* returned `cursor` until `cursor` is null. When a `cursor` is supplied its
|
|
1398
1448
|
* carrier is authoritative and `sort` is ignored.
|
|
1399
1449
|
*
|
|
1400
|
-
* @param params - optional `{ sort }`, `limit` (1
|
|
1450
|
+
* @param params - optional `{ sort }`, `limit` (1-100, default 20), and an
|
|
1401
1451
|
* opaque `cursor` from a prior response.
|
|
1402
1452
|
*/
|
|
1403
1453
|
home(params) {
|
|
@@ -1472,13 +1522,13 @@ var InboxesResource = class {
|
|
|
1472
1522
|
*
|
|
1473
1523
|
* @param inboxId - the inbox id from `list()` (e.g. `"CLASSIC_PRIMARY"`
|
|
1474
1524
|
* or `"COMPANY_83734124_PRIMARY"`).
|
|
1475
|
-
* @param params - optional `limit` (1
|
|
1525
|
+
* @param params - optional `limit` (1-25, default 20) and an opaque
|
|
1476
1526
|
* `cursor` for pagination.
|
|
1477
1527
|
*/
|
|
1478
1528
|
listChats(inboxId, params) {
|
|
1479
1529
|
return this.ctx.request({
|
|
1480
1530
|
method: "GET",
|
|
1481
|
-
path: `/v1/{account_id}/inboxes/${inboxId}/chats`,
|
|
1531
|
+
path: apiPath`/v1/{account_id}/inboxes/${inboxId}/chats`,
|
|
1482
1532
|
...params ? { query: params } : {}
|
|
1483
1533
|
});
|
|
1484
1534
|
}
|
|
@@ -1490,8 +1540,8 @@ var NotificationsResource = class {
|
|
|
1490
1540
|
this.ctx = ctx;
|
|
1491
1541
|
}
|
|
1492
1542
|
/**
|
|
1493
|
-
* List the connected account's notification cards
|
|
1494
|
-
* the account-level `unread_count` (the unseen badge
|
|
1543
|
+
* List the connected account's notification cards, newest first, plus
|
|
1544
|
+
* the account-level `unread_count` (the unseen badge, NOT a count of
|
|
1495
1545
|
* `items`) and `latest_published_at` (a cheap poll watermark). Injected
|
|
1496
1546
|
* promo/suggestion cards are included and flagged (`injected:true`),
|
|
1497
1547
|
* never filtered.
|
|
@@ -1510,45 +1560,45 @@ var NotificationsResource = class {
|
|
|
1510
1560
|
}
|
|
1511
1561
|
/**
|
|
1512
1562
|
* Delete one of the connected account's own notification cards by its
|
|
1513
|
-
* card urn. A self-action
|
|
1563
|
+
* card urn. A self-action, no third party is notified. This cannot be
|
|
1514
1564
|
* undone.
|
|
1515
1565
|
*
|
|
1516
1566
|
* **Safe to retry.** Idempotent: deleting a card you already deleted
|
|
1517
|
-
* succeeds with `200`, not an error
|
|
1567
|
+
* succeeds with `200`, not an error; a client that retries after a
|
|
1518
1568
|
* timeout is never punished for it. Only a `card_urn` that never existed
|
|
1519
1569
|
* on this account 404s.
|
|
1520
1570
|
*
|
|
1521
1571
|
* **Timing.** The removal takes effect within a few seconds; a
|
|
1522
1572
|
* {@link list} read immediately after this call may still include the
|
|
1523
|
-
* card for a moment. That is not a failure signal
|
|
1573
|
+
* card for a moment. That is not a failure signal; the `200` is already
|
|
1524
1574
|
* confirmation the card was resolved and the removal accepted. Re-read
|
|
1525
1575
|
* after a short delay, not instantly, if you need to visually confirm.
|
|
1526
1576
|
*
|
|
1527
1577
|
* `DELETE /v1/{account_id}/notifications/{card_urn}`
|
|
1528
1578
|
*
|
|
1529
1579
|
* @param cardUrn - the card's entity urn, raw/unencoded (the `card_urn`
|
|
1530
|
-
* field of a {@link list} item
|
|
1580
|
+
* field of a {@link list} item, `urn:li:fsd_notificationCard:(...)`,
|
|
1531
1581
|
* NOT `object_urn`, which targets the wrong notification). The SDK
|
|
1532
1582
|
* percent-encodes it into the path.
|
|
1533
1583
|
*/
|
|
1534
1584
|
delete(cardUrn) {
|
|
1535
1585
|
return this.ctx.request({
|
|
1536
1586
|
method: "DELETE",
|
|
1537
|
-
path: `/v1/{account_id}/notifications/${
|
|
1587
|
+
path: apiPath`/v1/{account_id}/notifications/${cardUrn}`
|
|
1538
1588
|
});
|
|
1539
1589
|
}
|
|
1540
1590
|
/**
|
|
1541
1591
|
* Apply "show less like this" to the source of one of the connected
|
|
1542
|
-
* account's own notification cards
|
|
1592
|
+
* account's own notification cards, a self-action, same card handle and
|
|
1543
1593
|
* timing/retry contract as {@link delete}. For network-activity cards (a
|
|
1544
1594
|
* repost, comment, or reaction by your network) this **removes the
|
|
1545
|
-
* card**, the same effect as `delete
|
|
1595
|
+
* card**, the same effect as `delete`; LinkedIn exposes no separate,
|
|
1546
1596
|
* softer signal for these cards; this method exists so the calling
|
|
1547
1597
|
* intent reads clearly, not because it behaves differently. This cannot
|
|
1548
1598
|
* be undone.
|
|
1549
1599
|
*
|
|
1550
1600
|
* **Safe to retry**, same timing as {@link delete}: idempotent (a repeat
|
|
1551
|
-
* is a `200`, not an error), effective within a few seconds
|
|
1601
|
+
* is a `200`, not an error), effective within a few seconds, a
|
|
1552
1602
|
* still-visible card on an immediate {@link list} re-read is not a
|
|
1553
1603
|
* failure signal.
|
|
1554
1604
|
*
|
|
@@ -1560,7 +1610,7 @@ var NotificationsResource = class {
|
|
|
1560
1610
|
showLess(cardUrn) {
|
|
1561
1611
|
return this.ctx.request({
|
|
1562
1612
|
method: "POST",
|
|
1563
|
-
path: `/v1/{account_id}/notifications/${
|
|
1613
|
+
path: apiPath`/v1/{account_id}/notifications/${cardUrn}/show-less`
|
|
1564
1614
|
});
|
|
1565
1615
|
}
|
|
1566
1616
|
};
|
|
@@ -1608,7 +1658,7 @@ var SalesNavigatorResource = class {
|
|
|
1608
1658
|
}
|
|
1609
1659
|
/**
|
|
1610
1660
|
* Start a new Sales Navigator chat. `attachments[]`, when supplied, carry
|
|
1611
|
-
* base64-encoded file bytes
|
|
1661
|
+
* base64-encoded file bytes, always sent as JSON, never multipart.
|
|
1612
1662
|
* `POST /v1/{account_id}/sales-navigator/chats`
|
|
1613
1663
|
*/
|
|
1614
1664
|
startChat(body) {
|
|
@@ -1625,7 +1675,7 @@ var SalesNavigatorResource = class {
|
|
|
1625
1675
|
getProfile(identifier, query) {
|
|
1626
1676
|
return this.ctx.request({
|
|
1627
1677
|
method: "GET",
|
|
1628
|
-
path: `/v1/{account_id}/sales-navigator/profiles/${identifier}`,
|
|
1678
|
+
path: apiPath`/v1/{account_id}/sales-navigator/profiles/${identifier}`,
|
|
1629
1679
|
// cast needed: with_sections is string[] but transport encodes arrays as repeated params
|
|
1630
1680
|
...query ? { query } : {}
|
|
1631
1681
|
});
|
|
@@ -1660,7 +1710,7 @@ var SalesNavigatorResource = class {
|
|
|
1660
1710
|
browseAccountList(listId, body, query) {
|
|
1661
1711
|
return this.ctx.request({
|
|
1662
1712
|
method: "POST",
|
|
1663
|
-
path: `/v1/{account_id}/sales-navigator/account-lists/${listId}`,
|
|
1713
|
+
path: apiPath`/v1/{account_id}/sales-navigator/account-lists/${listId}`,
|
|
1664
1714
|
body: body ?? {},
|
|
1665
1715
|
...query ? { query } : {}
|
|
1666
1716
|
});
|
|
@@ -1673,37 +1723,37 @@ var SalesNavigatorResource = class {
|
|
|
1673
1723
|
browseLeadList(listId, body, query) {
|
|
1674
1724
|
return this.ctx.request({
|
|
1675
1725
|
method: "POST",
|
|
1676
|
-
path: `/v1/{account_id}/sales-navigator/lead-lists/${listId}`,
|
|
1726
|
+
path: apiPath`/v1/{account_id}/sales-navigator/lead-lists/${listId}`,
|
|
1677
1727
|
body: body ?? {},
|
|
1678
1728
|
...query ? { query } : {}
|
|
1679
1729
|
});
|
|
1680
1730
|
}
|
|
1681
1731
|
/**
|
|
1682
|
-
* Save a LinkedIn company into an account list. Body is just `{company_id}
|
|
1683
|
-
*
|
|
1732
|
+
* Save a LinkedIn company into an account list. Body is just `{company_id}`;
|
|
1733
|
+
* `account_id` lives in the path, not the body.
|
|
1684
1734
|
* `POST /v1/{account_id}/sales-navigator/account-lists/{list_id}/save`
|
|
1685
1735
|
*
|
|
1686
|
-
* No `saved` boolean is invented
|
|
1736
|
+
* No `saved` boolean is invented; a `2xx` response body is the success
|
|
1687
1737
|
* signal (the substrate returns no success flag).
|
|
1688
1738
|
*/
|
|
1689
1739
|
saveAccount(input) {
|
|
1690
1740
|
const { list_id, ...body } = input;
|
|
1691
1741
|
return this.ctx.request({
|
|
1692
1742
|
method: "POST",
|
|
1693
|
-
path: `/v1/{account_id}/sales-navigator/account-lists/${list_id}/save`,
|
|
1743
|
+
path: apiPath`/v1/{account_id}/sales-navigator/account-lists/${list_id}/save`,
|
|
1694
1744
|
body
|
|
1695
1745
|
});
|
|
1696
1746
|
}
|
|
1697
1747
|
/**
|
|
1698
|
-
* Save a Sales Navigator member into a lead list. Body is just `{user_id}
|
|
1699
|
-
*
|
|
1748
|
+
* Save a Sales Navigator member into a lead list. Body is just `{user_id}`;
|
|
1749
|
+
* `account_id` lives in the path, not the body.
|
|
1700
1750
|
* `POST /v1/{account_id}/sales-navigator/lead-lists/{list_id}/save`
|
|
1701
1751
|
*/
|
|
1702
1752
|
saveLead(input) {
|
|
1703
1753
|
const { list_id, ...body } = input;
|
|
1704
1754
|
return this.ctx.request({
|
|
1705
1755
|
method: "POST",
|
|
1706
|
-
path: `/v1/{account_id}/sales-navigator/lead-lists/${list_id}/save`,
|
|
1756
|
+
path: apiPath`/v1/{account_id}/sales-navigator/lead-lists/${list_id}/save`,
|
|
1707
1757
|
body
|
|
1708
1758
|
});
|
|
1709
1759
|
}
|
|
@@ -1752,12 +1802,12 @@ var RecruiterResource = class {
|
|
|
1752
1802
|
getProfile(identifier, params) {
|
|
1753
1803
|
return this.ctx.request({
|
|
1754
1804
|
method: "GET",
|
|
1755
|
-
path: `/v1/{account_id}/recruiter/profiles/${identifier}`,
|
|
1805
|
+
path: apiPath`/v1/{account_id}/recruiter/profiles/${identifier}`,
|
|
1756
1806
|
...params ? { query: params } : {}
|
|
1757
1807
|
});
|
|
1758
1808
|
}
|
|
1759
1809
|
/**
|
|
1760
|
-
* Start a Recruiter chat (InMail). JSON-only
|
|
1810
|
+
* Start a Recruiter chat (InMail). JSON-only, `subject` and `signature`
|
|
1761
1811
|
* are REQUIRED; optional attachments ride the body as base64-encoded
|
|
1762
1812
|
* objects (no multipart). `POST /v1/{account_id}/recruiter/chats`
|
|
1763
1813
|
*/
|
|
@@ -1782,7 +1832,7 @@ var RecruiterResource = class {
|
|
|
1782
1832
|
}
|
|
1783
1833
|
/**
|
|
1784
1834
|
* Resolve human-readable terms to opaque Recruiter filter ids. POST (was
|
|
1785
|
-
* GET): the body is a `source`-discriminated oneOf
|
|
1835
|
+
* GET): the body is a `source`-discriminated oneOf, `APPLICANTS`/`PIPELINE`
|
|
1786
1836
|
* require `project_id`. `POST /v1/{account_id}/recruiter/search/parameters`
|
|
1787
1837
|
*/
|
|
1788
1838
|
searchParameters(body, params) {
|
|
@@ -1802,13 +1852,13 @@ var RecruiterResource = class {
|
|
|
1802
1852
|
searchTalentPool(projectId, body, params) {
|
|
1803
1853
|
return this.ctx.request({
|
|
1804
1854
|
method: "POST",
|
|
1805
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/search`,
|
|
1855
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/search`,
|
|
1806
1856
|
body,
|
|
1807
1857
|
...params ? { query: params } : {}
|
|
1808
1858
|
});
|
|
1809
1859
|
}
|
|
1810
1860
|
/**
|
|
1811
|
-
* Search from a pasted Recruiter search / talent-pool / applicant URL
|
|
1861
|
+
* Search from a pasted Recruiter search / talent-pool / applicant URL,
|
|
1812
1862
|
* nothing else in the body. The response is a 3-way oneOf (people-search,
|
|
1813
1863
|
* job-applicant list, or pipeline-candidate list) keyed by the URL kind.
|
|
1814
1864
|
* `POST /v1/{account_id}/recruiter/search`
|
|
@@ -1839,18 +1889,18 @@ var RecruiterResource = class {
|
|
|
1839
1889
|
getProject(projectId) {
|
|
1840
1890
|
return this.ctx.request({
|
|
1841
1891
|
method: "GET",
|
|
1842
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}`
|
|
1892
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}`
|
|
1843
1893
|
});
|
|
1844
1894
|
}
|
|
1845
1895
|
/**
|
|
1846
|
-
* Edit a Recruiter project's config
|
|
1896
|
+
* Edit a Recruiter project's config: all fields optional; omitted fields
|
|
1847
1897
|
* are left unchanged. Returns a thin acknowledgement only.
|
|
1848
1898
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}`
|
|
1849
1899
|
*/
|
|
1850
1900
|
updateProject(projectId, body) {
|
|
1851
1901
|
return this.ctx.request({
|
|
1852
1902
|
method: "PATCH",
|
|
1853
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}`,
|
|
1903
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}`,
|
|
1854
1904
|
body
|
|
1855
1905
|
});
|
|
1856
1906
|
}
|
|
@@ -1863,48 +1913,48 @@ var RecruiterResource = class {
|
|
|
1863
1913
|
listPipeline(projectId, body = {}, params) {
|
|
1864
1914
|
return this.ctx.request({
|
|
1865
1915
|
method: "POST",
|
|
1866
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/pipeline`,
|
|
1916
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/pipeline`,
|
|
1867
1917
|
body,
|
|
1868
1918
|
...params ? { query: params } : {}
|
|
1869
1919
|
});
|
|
1870
1920
|
}
|
|
1871
1921
|
/**
|
|
1872
1922
|
* Get the single job posting attached to a Recruiter project (the surface
|
|
1873
|
-
* returns one posting, not a list
|
|
1923
|
+
* returns one posting, not a list; a project with no attached job 404s).
|
|
1874
1924
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
1875
1925
|
*/
|
|
1876
1926
|
getProjectJob(projectId) {
|
|
1877
1927
|
return this.ctx.request({
|
|
1878
1928
|
method: "GET",
|
|
1879
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/jobs`
|
|
1929
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/jobs`
|
|
1880
1930
|
});
|
|
1881
1931
|
}
|
|
1882
1932
|
/**
|
|
1883
|
-
* Create a job-posting DRAFT attached to an EXISTING project
|
|
1933
|
+
* Create a job-posting DRAFT attached to an EXISTING project, `project_name`
|
|
1884
1934
|
* is not accepted (the project comes from the path). Never publishes, never
|
|
1885
1935
|
* spends money. `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
1886
1936
|
*/
|
|
1887
1937
|
createProjectJob(projectId, body) {
|
|
1888
1938
|
return this.ctx.request({
|
|
1889
1939
|
method: "POST",
|
|
1890
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/jobs`,
|
|
1940
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/jobs`,
|
|
1891
1941
|
body
|
|
1892
1942
|
});
|
|
1893
1943
|
}
|
|
1894
1944
|
/**
|
|
1895
|
-
* Get pricing to publish a project's job posting
|
|
1945
|
+
* Get pricing to publish a project's job posting; price a publish before
|
|
1896
1946
|
* committing any money.
|
|
1897
1947
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/budget`
|
|
1898
1948
|
*/
|
|
1899
1949
|
getProjectJobBudget(projectId, jobId) {
|
|
1900
1950
|
return this.ctx.request({
|
|
1901
1951
|
method: "GET",
|
|
1902
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}/budget`
|
|
1952
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}/budget`
|
|
1903
1953
|
});
|
|
1904
1954
|
}
|
|
1905
1955
|
/**
|
|
1906
|
-
* Create a job-posting DRAFT together with a brand-new hiring project
|
|
1907
|
-
* `project_name` is REQUIRED; `description` must be
|
|
1956
|
+
* Create a job-posting DRAFT together with a brand-new hiring project,
|
|
1957
|
+
* `project_name` is REQUIRED; `description` must be >= 200 characters. Never
|
|
1908
1958
|
* publishes, never spends money. `POST /v1/{account_id}/recruiter/jobs`
|
|
1909
1959
|
*/
|
|
1910
1960
|
createJob(body) {
|
|
@@ -1931,7 +1981,7 @@ var RecruiterResource = class {
|
|
|
1931
1981
|
* `GET /v1/{account_id}/recruiter/jobs/{job_id}`
|
|
1932
1982
|
*
|
|
1933
1983
|
* Accepts a bare numeric job id or a full LinkedIn job URL
|
|
1934
|
-
* (`https://www.linkedin.com/jobs/view/{id}`)
|
|
1984
|
+
* (`https://www.linkedin.com/jobs/view/{id}`); the id is extracted
|
|
1935
1985
|
* client-side; the wire request always carries the numeric id. Throws
|
|
1936
1986
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously if neither
|
|
1937
1987
|
* form can be recognized.
|
|
@@ -1940,11 +1990,11 @@ var RecruiterResource = class {
|
|
|
1940
1990
|
const jobId = resolveJobId(jobIdOrUrl);
|
|
1941
1991
|
return this.ctx.request({
|
|
1942
1992
|
method: "GET",
|
|
1943
|
-
path: `/v1/{account_id}/recruiter/jobs/${jobId}`
|
|
1993
|
+
path: apiPath`/v1/{account_id}/recruiter/jobs/${jobId}`
|
|
1944
1994
|
});
|
|
1945
1995
|
}
|
|
1946
1996
|
/**
|
|
1947
|
-
* Apply a partial update to a project's job posting
|
|
1997
|
+
* Apply a partial update to a project's job posting, only included fields
|
|
1948
1998
|
* change. MONEY WARNING: editing an already-published (LISTED) posting
|
|
1949
1999
|
* mutates a live, money-spending listing.
|
|
1950
2000
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}`
|
|
@@ -1952,14 +2002,14 @@ var RecruiterResource = class {
|
|
|
1952
2002
|
updateProjectJob(projectId, jobId, body) {
|
|
1953
2003
|
return this.ctx.request({
|
|
1954
2004
|
method: "PATCH",
|
|
1955
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}`,
|
|
2005
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}`,
|
|
1956
2006
|
body
|
|
1957
2007
|
});
|
|
1958
2008
|
}
|
|
1959
2009
|
/**
|
|
1960
2010
|
* Publish a project's job posting draft. `mode` is a discriminated oneOf:
|
|
1961
2011
|
* `FREE` (requires free-posting eligibility, spends nothing) or
|
|
1962
|
-
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget
|
|
2012
|
+
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget`; THIS SPENDS REAL MONEY on
|
|
1963
2013
|
* the connected account's LinkedIn payment method; supplying `budget` IS the
|
|
1964
2014
|
* explicit opt-in).
|
|
1965
2015
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/publish`
|
|
@@ -1967,31 +2017,31 @@ var RecruiterResource = class {
|
|
|
1967
2017
|
publishJob(projectId, jobId, body) {
|
|
1968
2018
|
return this.ctx.request({
|
|
1969
2019
|
method: "POST",
|
|
1970
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}/publish`,
|
|
2020
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}/publish`,
|
|
1971
2021
|
body
|
|
1972
2022
|
});
|
|
1973
2023
|
}
|
|
1974
2024
|
/**
|
|
1975
2025
|
* Close a project's job posting so it stops accepting applications
|
|
1976
2026
|
* (bodyless). Closing an already-published (LISTED) posting cannot be
|
|
1977
|
-
* undone
|
|
2027
|
+
* undone; there is no re-open operation.
|
|
1978
2028
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/close`
|
|
1979
2029
|
*/
|
|
1980
2030
|
closeJob(projectId, jobId) {
|
|
1981
2031
|
return this.ctx.request({
|
|
1982
2032
|
method: "POST",
|
|
1983
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}/close`
|
|
2033
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/jobs/${jobId}/close`
|
|
1984
2034
|
});
|
|
1985
2035
|
}
|
|
1986
2036
|
/**
|
|
1987
2037
|
* Save a candidate (or user profile) to a project's pipeline at the given
|
|
1988
|
-
* stage
|
|
2038
|
+
* stage, the sole surviving pipeline write.
|
|
1989
2039
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/pipeline/candidate/save`
|
|
1990
2040
|
*/
|
|
1991
2041
|
saveCandidate(projectId, body) {
|
|
1992
2042
|
return this.ctx.request({
|
|
1993
2043
|
method: "POST",
|
|
1994
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/pipeline/candidate/save`,
|
|
2044
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/pipeline/candidate/save`,
|
|
1995
2045
|
body
|
|
1996
2046
|
});
|
|
1997
2047
|
}
|
|
@@ -2004,7 +2054,7 @@ var RecruiterResource = class {
|
|
|
2004
2054
|
listApplicants(projectId, body, params) {
|
|
2005
2055
|
return this.ctx.request({
|
|
2006
2056
|
method: "POST",
|
|
2007
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/applicants`,
|
|
2057
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/applicants`,
|
|
2008
2058
|
body,
|
|
2009
2059
|
...params ? { query: params } : {}
|
|
2010
2060
|
});
|
|
@@ -2016,18 +2066,18 @@ var RecruiterResource = class {
|
|
|
2016
2066
|
getApplicant(projectId, applicantId) {
|
|
2017
2067
|
return this.ctx.request({
|
|
2018
2068
|
method: "GET",
|
|
2019
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/applicants/${applicantId}`
|
|
2069
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/applicants/${applicantId}`
|
|
2020
2070
|
});
|
|
2021
2071
|
}
|
|
2022
2072
|
/**
|
|
2023
2073
|
* Download a talent-pool applicant's résumé as raw binary.
|
|
2024
2074
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}/resume`
|
|
2025
|
-
* Returns `ArrayBuffer
|
|
2075
|
+
* Returns `ArrayBuffer`; the SDK does not cache or store it.
|
|
2026
2076
|
*/
|
|
2027
2077
|
downloadResume(projectId, applicantId) {
|
|
2028
2078
|
return this.ctx.request({
|
|
2029
2079
|
method: "GET",
|
|
2030
|
-
path: `/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/applicants/${applicantId}/resume`
|
|
2080
|
+
path: apiPath`/v1/{account_id}/recruiter/projects/${projectId}/talent-pool/applicants/${applicantId}/resume`
|
|
2031
2081
|
});
|
|
2032
2082
|
}
|
|
2033
2083
|
};
|
|
@@ -2040,7 +2090,7 @@ var JobsResource = class {
|
|
|
2040
2090
|
/**
|
|
2041
2091
|
* List the connected account's own classic job postings.
|
|
2042
2092
|
* `GET /v1/{account_id}/jobs`
|
|
2043
|
-
* `state` is REQUIRED
|
|
2093
|
+
* `state` is REQUIRED, filtering is LinkedIn-side and best-effort (see
|
|
2044
2094
|
* the generated type's own field description).
|
|
2045
2095
|
*/
|
|
2046
2096
|
list(params) {
|
|
@@ -2066,7 +2116,7 @@ var JobsResource = class {
|
|
|
2066
2116
|
* `GET /v1/{account_id}/jobs/{job_id}`
|
|
2067
2117
|
*
|
|
2068
2118
|
* Accepts a bare numeric job id or a full job URL
|
|
2069
|
-
* (`https://www.linkedin.com/jobs/view/{id}`)
|
|
2119
|
+
* (`https://www.linkedin.com/jobs/view/{id}`); the id is extracted
|
|
2070
2120
|
* client-side; the wire request always carries the numeric id. Throws
|
|
2071
2121
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously if neither
|
|
2072
2122
|
* form can be recognized.
|
|
@@ -2075,43 +2125,43 @@ var JobsResource = class {
|
|
|
2075
2125
|
const jobId = resolveJobId(jobIdOrUrl);
|
|
2076
2126
|
return this.ctx.request({
|
|
2077
2127
|
method: "GET",
|
|
2078
|
-
path: `/v1/{account_id}/jobs/${jobId}`,
|
|
2128
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}`,
|
|
2079
2129
|
...params ? { query: params } : {}
|
|
2080
2130
|
});
|
|
2081
2131
|
}
|
|
2082
2132
|
/**
|
|
2083
|
-
* Apply a partial update to a job posting this account owns
|
|
2133
|
+
* Apply a partial update to a job posting this account owns, only
|
|
2084
2134
|
* included fields change. Can affect real money on an already-published
|
|
2085
2135
|
* (LISTED) posting. `PATCH /v1/{account_id}/jobs/{job_id}`
|
|
2086
2136
|
*/
|
|
2087
2137
|
update(jobId, body) {
|
|
2088
2138
|
return this.ctx.request({
|
|
2089
2139
|
method: "PATCH",
|
|
2090
|
-
path: `/v1/{account_id}/jobs/${jobId}`,
|
|
2140
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}`,
|
|
2091
2141
|
body
|
|
2092
2142
|
});
|
|
2093
2143
|
}
|
|
2094
2144
|
/**
|
|
2095
|
-
* Get pricing to publish a job posting
|
|
2145
|
+
* Get pricing to publish a job posting; price a publish before
|
|
2096
2146
|
* committing any money. `GET /v1/{account_id}/jobs/{job_id}/budget`
|
|
2097
2147
|
*/
|
|
2098
2148
|
getBudget(jobId) {
|
|
2099
2149
|
return this.ctx.request({
|
|
2100
2150
|
method: "GET",
|
|
2101
|
-
path: `/v1/{account_id}/jobs/${jobId}/budget`
|
|
2151
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}/budget`
|
|
2102
2152
|
});
|
|
2103
2153
|
}
|
|
2104
2154
|
/**
|
|
2105
2155
|
* Publish a classic job posting draft. `mode` is a discriminated oneOf:
|
|
2106
2156
|
* `FREE` (requires free-posting eligibility, spends nothing) or
|
|
2107
|
-
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget
|
|
2157
|
+
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget`; THIS SPENDS REAL MONEY
|
|
2108
2158
|
* on the connected account's LinkedIn payment method; supplying `budget`
|
|
2109
2159
|
* IS the explicit opt-in). `POST /v1/{account_id}/jobs/{job_id}/publish`
|
|
2110
2160
|
*/
|
|
2111
2161
|
publish(jobId, body) {
|
|
2112
2162
|
return this.ctx.request({
|
|
2113
2163
|
method: "POST",
|
|
2114
|
-
path: `/v1/{account_id}/jobs/${jobId}/publish`,
|
|
2164
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}/publish`,
|
|
2115
2165
|
body
|
|
2116
2166
|
});
|
|
2117
2167
|
}
|
|
@@ -2123,11 +2173,11 @@ var JobsResource = class {
|
|
|
2123
2173
|
close(jobId) {
|
|
2124
2174
|
return this.ctx.request({
|
|
2125
2175
|
method: "POST",
|
|
2126
|
-
path: `/v1/{account_id}/jobs/${jobId}/close`
|
|
2176
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}/close`
|
|
2127
2177
|
});
|
|
2128
2178
|
}
|
|
2129
2179
|
/**
|
|
2130
|
-
* List applicants to a job posting this account owns
|
|
2180
|
+
* List applicants to a job posting this account owns, a read; POST
|
|
2131
2181
|
* carries the filter body, matching the `/search/*` convention. Omit
|
|
2132
2182
|
* `ratings` to see the full applicant funnel. `limit`/`cursor` stay
|
|
2133
2183
|
* TOP-LEVEL query params, never in the body.
|
|
@@ -2138,7 +2188,7 @@ var JobsResource = class {
|
|
|
2138
2188
|
const hasQuery = cursor !== void 0 || limit !== void 0;
|
|
2139
2189
|
return this.ctx.request({
|
|
2140
2190
|
method: "POST",
|
|
2141
|
-
path: `/v1/{account_id}/jobs/${jobId}/applicants`,
|
|
2191
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}/applicants`,
|
|
2142
2192
|
body,
|
|
2143
2193
|
...hasQuery ? {
|
|
2144
2194
|
query: {
|
|
@@ -2155,18 +2205,18 @@ var JobsResource = class {
|
|
|
2155
2205
|
getApplicant(jobId, applicantId) {
|
|
2156
2206
|
return this.ctx.request({
|
|
2157
2207
|
method: "GET",
|
|
2158
|
-
path: `/v1/{account_id}/jobs/${jobId}/applicants/${applicantId}`
|
|
2208
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}/applicants/${applicantId}`
|
|
2159
2209
|
});
|
|
2160
2210
|
}
|
|
2161
2211
|
/**
|
|
2162
2212
|
* Download an applicant's résumé. Returns raw binary.
|
|
2163
2213
|
* `GET /v1/{account_id}/jobs/{job_id}/applicants/{applicant_id}/resume`
|
|
2164
|
-
* Returns `ArrayBuffer
|
|
2214
|
+
* Returns `ArrayBuffer`; the SDK does not cache or store it.
|
|
2165
2215
|
*/
|
|
2166
2216
|
downloadResume(jobId, applicantId) {
|
|
2167
2217
|
return this.ctx.request({
|
|
2168
2218
|
method: "GET",
|
|
2169
|
-
path: `/v1/{account_id}/jobs/${jobId}/applicants/${applicantId}/resume`
|
|
2219
|
+
path: apiPath`/v1/{account_id}/jobs/${jobId}/applicants/${applicantId}/resume`
|
|
2170
2220
|
});
|
|
2171
2221
|
}
|
|
2172
2222
|
};
|
|
@@ -2186,22 +2236,22 @@ var CompaniesResource = class {
|
|
|
2186
2236
|
get(identifier) {
|
|
2187
2237
|
return this.ctx.request({
|
|
2188
2238
|
method: "GET",
|
|
2189
|
-
path: `/v1/{account_id}/companies/${identifier}`
|
|
2239
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}`
|
|
2190
2240
|
});
|
|
2191
2241
|
}
|
|
2192
2242
|
/**
|
|
2193
2243
|
* List people who currently work at the company.
|
|
2194
2244
|
* `GET /v1/{account_id}/companies/{identifier}/employees`
|
|
2195
2245
|
*
|
|
2196
|
-
* A facade over people search with the company filter applied
|
|
2246
|
+
* A facade over people search with the company filter applied, filter
|
|
2197
2247
|
* further with `keywords` or `location`. `identifier` must be the
|
|
2198
|
-
* company's numeric provider_id (the same `id` field `get()` returns)
|
|
2248
|
+
* company's numeric provider_id (the same `id` field `get()` returns),
|
|
2199
2249
|
* a handle or URN is rejected before any upstream call.
|
|
2200
2250
|
*/
|
|
2201
2251
|
employees(identifier, params) {
|
|
2202
2252
|
return this.ctx.request({
|
|
2203
2253
|
method: "GET",
|
|
2204
|
-
path: `/v1/{account_id}/companies/${identifier}/employees`,
|
|
2254
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/employees`,
|
|
2205
2255
|
...params ? { query: params } : {}
|
|
2206
2256
|
});
|
|
2207
2257
|
}
|
|
@@ -2215,7 +2265,7 @@ var CompaniesResource = class {
|
|
|
2215
2265
|
posts(identifier, params) {
|
|
2216
2266
|
return this.ctx.request({
|
|
2217
2267
|
method: "GET",
|
|
2218
|
-
path: `/v1/{account_id}/companies/${identifier}/posts`,
|
|
2268
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/posts`,
|
|
2219
2269
|
...params ? { query: params } : {}
|
|
2220
2270
|
});
|
|
2221
2271
|
}
|
|
@@ -2223,7 +2273,7 @@ var CompaniesResource = class {
|
|
|
2223
2273
|
* List the company's open job postings.
|
|
2224
2274
|
* `GET /v1/{account_id}/companies/{identifier}/jobs`
|
|
2225
2275
|
*
|
|
2226
|
-
* A facade over job search with the company filter applied
|
|
2276
|
+
* A facade over job search with the company filter applied, filter
|
|
2227
2277
|
* further with `keywords`. An empty `items[]` is a valid result (the
|
|
2228
2278
|
* company currently has no open postings). `identifier` must be the
|
|
2229
2279
|
* company's numeric provider_id.
|
|
@@ -2231,7 +2281,7 @@ var CompaniesResource = class {
|
|
|
2231
2281
|
jobs(identifier, params) {
|
|
2232
2282
|
return this.ctx.request({
|
|
2233
2283
|
method: "GET",
|
|
2234
|
-
path: `/v1/{account_id}/companies/${identifier}/jobs`,
|
|
2284
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/jobs`,
|
|
2235
2285
|
...params ? { query: params } : {}
|
|
2236
2286
|
});
|
|
2237
2287
|
}
|
|
@@ -2241,7 +2291,7 @@ var CompaniesResource = class {
|
|
|
2241
2291
|
*
|
|
2242
2292
|
* The `id` on each returned page is the numeric provider_id `followers()`,
|
|
2243
2293
|
* `invitableFollowers()`, `employees()`, `posts()`, and `jobs()` consume.
|
|
2244
|
-
* An empty `items[]` is valid
|
|
2294
|
+
* An empty `items[]` is valid; the account administers no pages.
|
|
2245
2295
|
*/
|
|
2246
2296
|
managed(params) {
|
|
2247
2297
|
return this.ctx.request({
|
|
@@ -2260,7 +2310,7 @@ var CompaniesResource = class {
|
|
|
2260
2310
|
followers(identifier, params) {
|
|
2261
2311
|
return this.ctx.request({
|
|
2262
2312
|
method: "GET",
|
|
2263
|
-
path: `/v1/{account_id}/companies/${identifier}/followers`,
|
|
2313
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/followers`,
|
|
2264
2314
|
...params ? { query: params } : {}
|
|
2265
2315
|
});
|
|
2266
2316
|
}
|
|
@@ -2269,13 +2319,13 @@ var CompaniesResource = class {
|
|
|
2269
2319
|
* company page. `GET /v1/{account_id}/companies/{identifier}/invitable-followers`
|
|
2270
2320
|
*
|
|
2271
2321
|
* The connected account must administer the page. `identifier` must be the
|
|
2272
|
-
* company's numeric provider_id. An empty `items[]` is valid
|
|
2322
|
+
* company's numeric provider_id. An empty `items[]` is valid; nobody is
|
|
2273
2323
|
* currently invitable.
|
|
2274
2324
|
*/
|
|
2275
2325
|
invitableFollowers(identifier, params) {
|
|
2276
2326
|
return this.ctx.request({
|
|
2277
2327
|
method: "GET",
|
|
2278
|
-
path: `/v1/{account_id}/companies/${identifier}/invitable-followers`,
|
|
2328
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/invitable-followers`,
|
|
2279
2329
|
...params ? { query: params } : {}
|
|
2280
2330
|
});
|
|
2281
2331
|
}
|
|
@@ -2285,7 +2335,7 @@ var CompaniesResource = class {
|
|
|
2285
2335
|
*
|
|
2286
2336
|
* The account must administer the page with the invite-to-follow
|
|
2287
2337
|
* entitlement (see `managed()`). `identifier` must be the company's numeric
|
|
2288
|
-
* provider_id. Pass the `AC
|
|
2338
|
+
* provider_id. Pass the `AC...` member ids from an `invitableFollowers()`
|
|
2289
2339
|
* read. All-or-nothing: for an all-valid request, resolves to one outcome
|
|
2290
2340
|
* per requested invitee, in request order. If any invitee id is invalid,
|
|
2291
2341
|
* the whole request rejects with a 404, not a partial result.
|
|
@@ -2295,7 +2345,7 @@ var CompaniesResource = class {
|
|
|
2295
2345
|
followInvite(identifier, body) {
|
|
2296
2346
|
return this.ctx.request({
|
|
2297
2347
|
method: "POST",
|
|
2298
|
-
path: `/v1/{account_id}/companies/${identifier}/follow-invite`,
|
|
2348
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/follow-invite`,
|
|
2299
2349
|
body
|
|
2300
2350
|
});
|
|
2301
2351
|
}
|
|
@@ -2306,14 +2356,14 @@ var CompaniesResource = class {
|
|
|
2306
2356
|
*
|
|
2307
2357
|
* The connected account must administer the page. `identifier` must be the
|
|
2308
2358
|
* company's numeric provider_id. Content passes through verbatim and is
|
|
2309
|
-
* never stored. Beta
|
|
2359
|
+
* never stored. Beta: single-page listing and termination are verified;
|
|
2310
2360
|
* deep pagination (many pages / large cursor round-trips) is provisional
|
|
2311
2361
|
* until validated against a busier inbox.
|
|
2312
2362
|
*/
|
|
2313
2363
|
chats(identifier, params) {
|
|
2314
2364
|
return this.ctx.request({
|
|
2315
2365
|
method: "GET",
|
|
2316
|
-
path: `/v1/{account_id}/companies/${identifier}/chats`,
|
|
2366
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/chats`,
|
|
2317
2367
|
...params ? { query: params } : {}
|
|
2318
2368
|
});
|
|
2319
2369
|
}
|
|
@@ -2321,12 +2371,12 @@ var CompaniesResource = class {
|
|
|
2321
2371
|
* Retrieve one conversation from a company page's admin inbox.
|
|
2322
2372
|
* `GET /v1/{account_id}/companies/{identifier}/chats/{chat_id}`
|
|
2323
2373
|
*
|
|
2324
|
-
* The connected account must administer the page. Beta
|
|
2374
|
+
* The connected account must administer the page. Beta: see `chats()`.
|
|
2325
2375
|
*/
|
|
2326
2376
|
chat(identifier, chatId) {
|
|
2327
2377
|
return this.ctx.request({
|
|
2328
2378
|
method: "GET",
|
|
2329
|
-
path: `/v1/{account_id}/companies/${identifier}/chats/${chatId}`
|
|
2379
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/chats/${chatId}`
|
|
2330
2380
|
});
|
|
2331
2381
|
}
|
|
2332
2382
|
/**
|
|
@@ -2334,12 +2384,12 @@ var CompaniesResource = class {
|
|
|
2334
2384
|
* `GET /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
2335
2385
|
*
|
|
2336
2386
|
* The connected account must administer the page. Content passes through
|
|
2337
|
-
* verbatim and is never stored. Beta
|
|
2387
|
+
* verbatim and is never stored. Beta: see `chats()`.
|
|
2338
2388
|
*/
|
|
2339
2389
|
messages(identifier, chatId, params) {
|
|
2340
2390
|
return this.ctx.request({
|
|
2341
2391
|
method: "GET",
|
|
2342
|
-
path: `/v1/{account_id}/companies/${identifier}/chats/${chatId}/messages`,
|
|
2392
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/chats/${chatId}/messages`,
|
|
2343
2393
|
...params ? { query: params } : {}
|
|
2344
2394
|
});
|
|
2345
2395
|
}
|
|
@@ -2347,12 +2397,12 @@ var CompaniesResource = class {
|
|
|
2347
2397
|
* Retrieve one message from a company-inbox conversation.
|
|
2348
2398
|
* `GET /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages/{message_id}`
|
|
2349
2399
|
*
|
|
2350
|
-
* The connected account must administer the page. Beta
|
|
2400
|
+
* The connected account must administer the page. Beta: see `chats()`.
|
|
2351
2401
|
*/
|
|
2352
2402
|
message(identifier, chatId, messageId) {
|
|
2353
2403
|
return this.ctx.request({
|
|
2354
2404
|
method: "GET",
|
|
2355
|
-
path: `/v1/{account_id}/companies/${identifier}/chats/${chatId}/messages/${messageId}`
|
|
2405
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/chats/${chatId}/messages/${messageId}`
|
|
2356
2406
|
});
|
|
2357
2407
|
}
|
|
2358
2408
|
/**
|
|
@@ -2360,14 +2410,14 @@ var CompaniesResource = class {
|
|
|
2360
2410
|
* `GET /v1/{account_id}/companies/{identifier}/chats/search`
|
|
2361
2411
|
*
|
|
2362
2412
|
* Exactly one mode per call: free-text `query` (matches participant names
|
|
2363
|
-
* and message content), a `topic` card, or `unread`-only
|
|
2413
|
+
* and message content), a `topic` card, or `unread`-only; the three are
|
|
2364
2414
|
* mutually exclusive and enforced server-side. The connected account must
|
|
2365
|
-
* administer the page. Beta
|
|
2415
|
+
* administer the page. Beta: see `chats()`.
|
|
2366
2416
|
*/
|
|
2367
2417
|
searchChats(identifier, params) {
|
|
2368
2418
|
return this.ctx.request({
|
|
2369
2419
|
method: "GET",
|
|
2370
|
-
path: `/v1/{account_id}/companies/${identifier}/chats/search`,
|
|
2420
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/chats/search`,
|
|
2371
2421
|
...params ? { query: params } : {}
|
|
2372
2422
|
});
|
|
2373
2423
|
}
|
|
@@ -2375,7 +2425,7 @@ var CompaniesResource = class {
|
|
|
2375
2425
|
* Reply to a company-inbox conversation, AS THE PAGE.
|
|
2376
2426
|
* `POST /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
2377
2427
|
*
|
|
2378
|
-
* `chatId` is the `2
|
|
2428
|
+
* `chatId` is the `2-...` conversation id that `chats()` / `chat()` /
|
|
2379
2429
|
* `searchChats()` return for this page. The endpoint resolves the page
|
|
2380
2430
|
* mailbox internally from `identifier`, so no special send-ready id is
|
|
2381
2431
|
* needed: pass the id straight from the company chat reads.
|
|
@@ -2404,7 +2454,7 @@ var CompaniesResource = class {
|
|
|
2404
2454
|
sendMessage(identifier, chatId, body) {
|
|
2405
2455
|
return this.ctx.request({
|
|
2406
2456
|
method: "POST",
|
|
2407
|
-
path: `/v1/{account_id}/companies/${identifier}/chats/${chatId}/messages`,
|
|
2457
|
+
path: apiPath`/v1/{account_id}/companies/${identifier}/chats/${chatId}/messages`,
|
|
2408
2458
|
body
|
|
2409
2459
|
});
|
|
2410
2460
|
}
|
|
@@ -2440,7 +2490,9 @@ var WebhooksResource = class {
|
|
|
2440
2490
|
});
|
|
2441
2491
|
}
|
|
2442
2492
|
/**
|
|
2443
|
-
* Return the complete canonical webhook event catalogue
|
|
2493
|
+
* Return the complete canonical webhook event catalogue, grouped by source.
|
|
2494
|
+
* The response counts itself; no size is stated here, because a hand-typed
|
|
2495
|
+
* one is wrong the next time the catalogue grows.
|
|
2444
2496
|
* `GET /v1/webhooks/events`
|
|
2445
2497
|
*/
|
|
2446
2498
|
listEvents() {
|
|
@@ -2452,12 +2504,12 @@ var WebhooksResource = class {
|
|
|
2452
2504
|
/**
|
|
2453
2505
|
* Return a single webhook owned by the calling tenant.
|
|
2454
2506
|
* `GET /v1/webhooks/{id}`
|
|
2455
|
-
* The plaintext secret is never present on a read
|
|
2507
|
+
* The plaintext secret is never present on a read, only `secret_prefix`.
|
|
2456
2508
|
*/
|
|
2457
2509
|
get(id) {
|
|
2458
2510
|
return this.ctx.request({
|
|
2459
2511
|
method: "GET",
|
|
2460
|
-
path: `/v1/webhooks/${id}`
|
|
2512
|
+
path: apiPath`/v1/webhooks/${id}`
|
|
2461
2513
|
});
|
|
2462
2514
|
}
|
|
2463
2515
|
/**
|
|
@@ -2467,7 +2519,7 @@ var WebhooksResource = class {
|
|
|
2467
2519
|
update(id, body) {
|
|
2468
2520
|
return this.ctx.request({
|
|
2469
2521
|
method: "PATCH",
|
|
2470
|
-
path: `/v1/webhooks/${id}`,
|
|
2522
|
+
path: apiPath`/v1/webhooks/${id}`,
|
|
2471
2523
|
body
|
|
2472
2524
|
});
|
|
2473
2525
|
}
|
|
@@ -2478,7 +2530,7 @@ var WebhooksResource = class {
|
|
|
2478
2530
|
delete(id) {
|
|
2479
2531
|
return this.ctx.request({
|
|
2480
2532
|
method: "DELETE",
|
|
2481
|
-
path: `/v1/webhooks/${id}`
|
|
2533
|
+
path: apiPath`/v1/webhooks/${id}`
|
|
2482
2534
|
});
|
|
2483
2535
|
}
|
|
2484
2536
|
};
|
|
@@ -2540,7 +2592,7 @@ var Curviate = class {
|
|
|
2540
2592
|
* Return an account-scoped accessor that fixes `account_id` on every call,
|
|
2541
2593
|
* so callers need not repeat it per method.
|
|
2542
2594
|
*
|
|
2543
|
-
* @param accountId - a Curviate account id (`acc_
|
|
2595
|
+
* @param accountId - a Curviate account id (`acc_...`). Empty throws
|
|
2544
2596
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously, no network call.
|
|
2545
2597
|
*
|
|
2546
2598
|
* @example
|