@curviate/sdk 0.19.0 → 0.20.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 +347 -234
- package/README.md +24 -4
- package/dist/index.d.ts +1511 -1336
- package/dist/index.js +108 -100
- package/package.json +4 -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() {
|
|
@@ -332,10 +338,10 @@ var AccountsResource = class {
|
|
|
332
338
|
*
|
|
333
339
|
* Each item also carries a small set of cached account-detail fields
|
|
334
340
|
* (`username`, `premium_id`, `public_identifier`, `substrate_created_at`,
|
|
335
|
-
* `signatures`, `groups`) populated by an async background enrichment
|
|
341
|
+
* `signatures`, `groups`) populated by an async background enrichment,
|
|
336
342
|
* `null`/`[]` until the account's first enrichment pass completes.
|
|
337
343
|
*
|
|
338
|
-
* @param params - optional `limit` (1
|
|
344
|
+
* @param params - optional `limit` (1-250) and `cursor` (from a prior page).
|
|
339
345
|
* @returns a page of accounts and the next-page `cursor` (null when exhausted).
|
|
340
346
|
*
|
|
341
347
|
* @example
|
|
@@ -354,7 +360,7 @@ var AccountsResource = class {
|
|
|
354
360
|
* central `quotas[]` view for all tracked quota families and `seat_id` (the
|
|
355
361
|
* seat this account occupies, `null` for an admin seatless account).
|
|
356
362
|
*
|
|
357
|
-
* This is a stale-while-revalidate read
|
|
363
|
+
* This is a stale-while-revalidate read; it always returns immediately
|
|
358
364
|
* from the cached row (never blocks on a live substrate call). The cached
|
|
359
365
|
* enrichment fields `full_name` and `substrate_created_at` are populated by
|
|
360
366
|
* a background enrichment pass; `username`, `premium_id`,
|
|
@@ -370,7 +376,7 @@ var AccountsResource = class {
|
|
|
370
376
|
/**
|
|
371
377
|
* Update an account's configuration.
|
|
372
378
|
*
|
|
373
|
-
* `metadata` is a flat string
|
|
379
|
+
* `metadata` is a flat string->string map that **replaces** the account's
|
|
374
380
|
* custom-data store wholesale (keys not provided are removed). `proxy` sets a
|
|
375
381
|
* custom egress proxy, or clears it (reverting to automatic proxy protection)
|
|
376
382
|
* when passed as `null`. The `proxy.password`, if given, is stored securely
|
|
@@ -405,17 +411,17 @@ var AuthResource = class {
|
|
|
405
411
|
* Omit `account_id` to connect a NEW account into an empty seat; include it
|
|
406
412
|
* to re-authenticate an EXISTING account in place. Returns the account on
|
|
407
413
|
* success (200 re-authenticated in place / 201 new), or a checkpoint
|
|
408
|
-
* challenge (202) when LinkedIn requires verification
|
|
414
|
+
* challenge (202) when LinkedIn requires verification; resolve it with
|
|
409
415
|
* {@link solveCheckpoint} (code) or {@link pollCheckpoint} (mobile-app
|
|
410
416
|
* approval).
|
|
411
417
|
*
|
|
412
|
-
* For `auth_method: "cookie"`, `user_agent` is **required
|
|
418
|
+
* For `auth_method: "cookie"`, `user_agent` is **required**; connecting by
|
|
413
419
|
* session cookie without one is rejected with `INVALID_REQUEST`. It stays
|
|
414
420
|
* optional for `auth_method: "credentials"`.
|
|
415
421
|
*
|
|
416
422
|
* On a 201 account, `recovered` is `true` only when the connect reclaimed a
|
|
417
423
|
* LinkedIn identity already present on the workspace (claiming it into your
|
|
418
|
-
* account) rather than connecting a brand-new one
|
|
424
|
+
* account) rather than connecting a brand-new one; it is absent on a normal
|
|
419
425
|
* connect.
|
|
420
426
|
*
|
|
421
427
|
* Connection scope (which LinkedIn products are enabled: classic, company,
|
|
@@ -441,7 +447,7 @@ var AuthResource = class {
|
|
|
441
447
|
* special value `TRY_ANOTHER_WAY` to switch challenge method).
|
|
442
448
|
*
|
|
443
449
|
* Returns the connected account (201) or, when LinkedIn chains a second
|
|
444
|
-
* challenge
|
|
450
|
+
* challenge (another checkpoint, 202); resolve that one with a further
|
|
445
451
|
* `solveCheckpoint` call for the same `accountId`.
|
|
446
452
|
*
|
|
447
453
|
* @param accountId - the (provisional) `account_id` from the 202 response.
|
|
@@ -458,7 +464,7 @@ var AuthResource = class {
|
|
|
458
464
|
* Re-request the pending checkpoint notification (OTP / 2FA / mobile-app
|
|
459
465
|
* push). `resent` is honest: `true` once the notification was actually
|
|
460
466
|
* re-sent, `false` when there was nothing to re-send for that challenge
|
|
461
|
-
* type (e.g. an authenticator-app code)
|
|
467
|
+
* type (e.g. an authenticator-app code); this call never throws just
|
|
462
468
|
* because a re-send wasn't applicable. Does not reset the checkpoint's
|
|
463
469
|
* expiry.
|
|
464
470
|
*
|
|
@@ -488,12 +494,12 @@ var AuthResource = class {
|
|
|
488
494
|
});
|
|
489
495
|
}
|
|
490
496
|
/**
|
|
491
|
-
* Poll a credential connect session by its account id
|
|
497
|
+
* Poll a credential connect session by its account id, a pure status read
|
|
492
498
|
* that makes no external call and does not itself complete the connection.
|
|
493
499
|
* `status` is `checkpoint_required` until resolved, then `done` (with
|
|
494
500
|
* `account_id`), or `expired` / `failed`.
|
|
495
501
|
*
|
|
496
|
-
* @param sessionId - the acc_
|
|
502
|
+
* @param sessionId - the acc_... id returned by {@link intent} or a checkpoint response.
|
|
497
503
|
*/
|
|
498
504
|
getSession(sessionId) {
|
|
499
505
|
return this.ctx.request({
|
|
@@ -641,7 +647,7 @@ var MessagingResource = class {
|
|
|
641
647
|
/**
|
|
642
648
|
* Download a message attachment. Returns raw binary.
|
|
643
649
|
* `GET /v1/{account_id}/chats/{chat_id}/messages/{message_id}/attachments/{attachment_id}`
|
|
644
|
-
* Returns `ArrayBuffer
|
|
650
|
+
* Returns `ArrayBuffer`, binary response; the SDK does not cache or store it.
|
|
645
651
|
*/
|
|
646
652
|
getAttachment(chatId, messageId, attachmentId) {
|
|
647
653
|
return this.ctx.request({
|
|
@@ -658,7 +664,7 @@ var MessagingResource = class {
|
|
|
658
664
|
});
|
|
659
665
|
}
|
|
660
666
|
/**
|
|
661
|
-
* Free-text search the account's own inbox
|
|
667
|
+
* Free-text search the account's own inbox; matches participant names
|
|
662
668
|
* and message content. `GET /v1/{account_id}/chats/search`
|
|
663
669
|
*
|
|
664
670
|
* @param params - `query` (required free-text term) plus `limit` and an
|
|
@@ -694,11 +700,11 @@ var UsersResource = class {
|
|
|
694
700
|
/**
|
|
695
701
|
* Update the caller's own profile. `PATCH /v1/{account_id}/users/{user_id}`
|
|
696
702
|
* Only `first_name`, `last_name`, `bio`, `headline`, `skills`, `picture`,
|
|
697
|
-
* `background_picture` are accepted
|
|
703
|
+
* `background_picture` are accepted; there is no `description` key.
|
|
698
704
|
* `description` is not part of the update contract: TypeScript already
|
|
699
705
|
* rejects it at the call site, but an untyped/JS caller (or an `as`-cast)
|
|
700
706
|
* could still smuggle it onto the object, so it is also stripped
|
|
701
|
-
* defensively at runtime before the request goes out
|
|
707
|
+
* defensively at runtime before the request goes out, the caller's
|
|
702
708
|
* object is never mutated.
|
|
703
709
|
*/
|
|
704
710
|
update(userId, body) {
|
|
@@ -750,7 +756,7 @@ var UsersResource = class {
|
|
|
750
756
|
}
|
|
751
757
|
/**
|
|
752
758
|
* Unfollow a user (bodyless). `DELETE /v1/{account_id}/users/{user_id}/follow`
|
|
753
|
-
* Idempotent
|
|
759
|
+
* Idempotent: unfollowing a user this account does not currently follow
|
|
754
760
|
* still returns 200.
|
|
755
761
|
*/
|
|
756
762
|
unfollow(userId) {
|
|
@@ -936,7 +942,7 @@ var SearchResource = class {
|
|
|
936
942
|
/**
|
|
937
943
|
* Run a pasted LinkedIn search/saved-search/lead-list URL directly.
|
|
938
944
|
* `POST /v1/{account_id}/search`
|
|
939
|
-
* `url` is the ONLY accepted body field
|
|
945
|
+
* `url` is the ONLY accepted body field, the sole home of URL-mode search;
|
|
940
946
|
* the structured endpoints above no longer accept `url`. The response is
|
|
941
947
|
* polymorphic, each item discriminated individually by its own `object`.
|
|
942
948
|
*/
|
|
@@ -972,7 +978,7 @@ var SearchResource = class {
|
|
|
972
978
|
* `POST /v1/{account_id}/search/services`
|
|
973
979
|
* `limit`/`cursor` are top-level query params, never in the body. Resolve
|
|
974
980
|
* `service_category`/`location` filter values with `getServiceParameters()`
|
|
975
|
-
* first
|
|
981
|
+
* first, both take opaque ids, not free text.
|
|
976
982
|
*/
|
|
977
983
|
services(body) {
|
|
978
984
|
const split = splitPagination(body);
|
|
@@ -1028,7 +1034,7 @@ var PostsResource = class {
|
|
|
1028
1034
|
});
|
|
1029
1035
|
}
|
|
1030
1036
|
/**
|
|
1031
|
-
* Publish a new post. Always `application/json
|
|
1037
|
+
* Publish a new post. Always `application/json`; attachments (if any) are
|
|
1032
1038
|
* base64-encoded objects, never `FormData`/multipart.
|
|
1033
1039
|
* `POST /v1/{account_id}/posts`
|
|
1034
1040
|
*/
|
|
@@ -1067,7 +1073,7 @@ var PostsResource = class {
|
|
|
1067
1073
|
});
|
|
1068
1074
|
}
|
|
1069
1075
|
/**
|
|
1070
|
-
* Remove this account's reaction from a post
|
|
1076
|
+
* Remove this account's reaction from a post, a **DELETE-with-body**:
|
|
1071
1077
|
* the reaction value to remove travels in the JSON body, not the path.
|
|
1072
1078
|
* `DELETE /v1/{account_id}/posts/{post_id}/reactions`
|
|
1073
1079
|
*/
|
|
@@ -1090,10 +1096,10 @@ var PostsResource = class {
|
|
|
1090
1096
|
});
|
|
1091
1097
|
}
|
|
1092
1098
|
/**
|
|
1093
|
-
* List the connected account's own saved posts (a private bookmark list)
|
|
1094
|
-
*
|
|
1099
|
+
* List the connected account's own saved posts (a private bookmark list),
|
|
1100
|
+
* newest-saved-first. A self resource: there is no other-member
|
|
1095
1101
|
* saved-posts view, so this takes no target param. Each item is a
|
|
1096
|
-
* PREVIEW
|
|
1102
|
+
* PREVIEW, `snippet` capped at <=140 chars, never the full post body.
|
|
1097
1103
|
* `GET /v1/{account_id}/saved-posts`
|
|
1098
1104
|
*
|
|
1099
1105
|
* @param params - optional `limit` (default 20, a page-aligned lower
|
|
@@ -1108,14 +1114,14 @@ var PostsResource = class {
|
|
|
1108
1114
|
}
|
|
1109
1115
|
/**
|
|
1110
1116
|
* Save a post to the connected account's private bookmark list. Any post
|
|
1111
|
-
* may be saved
|
|
1117
|
+
* may be saved; it does not notify the author and is never visible to
|
|
1112
1118
|
* third parties. Idempotent: saving an already-saved post re-asserts
|
|
1113
1119
|
* `saved:true`.
|
|
1114
1120
|
* `POST /v1/{account_id}/saved-posts`
|
|
1115
1121
|
*
|
|
1116
1122
|
* @param postId - the post to save. Accepts `urn:li:activity:<id>` or a
|
|
1117
|
-
* bare numeric `<id
|
|
1118
|
-
* shape (`urn:li:ugcPost
|
|
1123
|
+
* bare numeric `<id>`, both normalize to the same target. Any other
|
|
1124
|
+
* shape (`urn:li:ugcPost:...`, `urn:li:share:...`, a URL) is rejected with
|
|
1119
1125
|
* `400 INVALID_REQUEST`.
|
|
1120
1126
|
*/
|
|
1121
1127
|
save(postId) {
|
|
@@ -1127,7 +1133,7 @@ var PostsResource = class {
|
|
|
1127
1133
|
});
|
|
1128
1134
|
}
|
|
1129
1135
|
/**
|
|
1130
|
-
* Unsave a post
|
|
1136
|
+
* Unsave a post, the reverse of {@link save}, over the SAME underlying
|
|
1131
1137
|
* save-state call (a distinct product endpoint, one substrate call).
|
|
1132
1138
|
* Idempotent: unsaving a not-currently-saved post re-asserts
|
|
1133
1139
|
* `saved:false`.
|
|
@@ -1194,7 +1200,7 @@ var CommentsResource = class {
|
|
|
1194
1200
|
});
|
|
1195
1201
|
}
|
|
1196
1202
|
/**
|
|
1197
|
-
* Reply to a comment. Shares its path with `edit
|
|
1203
|
+
* Reply to a comment. Shares its path with `edit`; POST creates a reply
|
|
1198
1204
|
* under the target comment, PATCH edits the target comment's own text.
|
|
1199
1205
|
* `POST /v1/{account_id}/posts/{post_id}/comments/{comment_id}`
|
|
1200
1206
|
*/
|
|
@@ -1238,7 +1244,7 @@ var CommentsResource = class {
|
|
|
1238
1244
|
});
|
|
1239
1245
|
}
|
|
1240
1246
|
/**
|
|
1241
|
-
* Remove this account's reaction from a comment
|
|
1247
|
+
* Remove this account's reaction from a comment, a **DELETE-with-body**:
|
|
1242
1248
|
* the reaction value to remove travels in the JSON body, not the path.
|
|
1243
1249
|
* `DELETE /v1/{account_id}/posts/{post_id}/comments/{comment_id}/reactions`
|
|
1244
1250
|
*/
|
|
@@ -1257,7 +1263,7 @@ var ProfileResource = class {
|
|
|
1257
1263
|
this.ctx = ctx;
|
|
1258
1264
|
}
|
|
1259
1265
|
/**
|
|
1260
|
-
* Read the connected account's premium subscription
|
|
1266
|
+
* Read the connected account's premium subscription: its full entitlement
|
|
1261
1267
|
* inventory, primary plan title, and LinkedIn management links.
|
|
1262
1268
|
* `GET /v1/{account_id}/profile/subscription`
|
|
1263
1269
|
*
|
|
@@ -1273,7 +1279,7 @@ var ProfileResource = class {
|
|
|
1273
1279
|
});
|
|
1274
1280
|
}
|
|
1275
1281
|
/**
|
|
1276
|
-
* Read the connected account's performance headline metrics
|
|
1282
|
+
* Read the connected account's performance headline metrics, profile
|
|
1277
1283
|
* viewers, followers, post impressions, and search appearances.
|
|
1278
1284
|
* `GET /v1/{account_id}/profile/analytics`
|
|
1279
1285
|
*
|
|
@@ -1293,13 +1299,13 @@ var ProfileResource = class {
|
|
|
1293
1299
|
* cursor-paginated and classified by disclosure fidelity.
|
|
1294
1300
|
* `GET /v1/{account_id}/profile/visitors`
|
|
1295
1301
|
*
|
|
1296
|
-
* Each item's `kind` is `identified`, `semi-anonymous`, or `aggregate
|
|
1302
|
+
* Each item's `kind` is `identified`, `semi-anonymous`, or `aggregate`,
|
|
1297
1303
|
* a Premium account sees identified viewers, a free account is capped at a
|
|
1298
1304
|
* lower fidelity (still a `200`, never a permission error). Page with the
|
|
1299
1305
|
* returned `cursor`: a non-null `cursor` means more may exist, even if a
|
|
1300
1306
|
* page held zero identified individuals; `cursor: null` means exhausted.
|
|
1301
1307
|
*
|
|
1302
|
-
* @param params - `limit` (1
|
|
1308
|
+
* @param params - `limit` (1-100, default 20) and an opaque `cursor` from
|
|
1303
1309
|
* a prior response.
|
|
1304
1310
|
*/
|
|
1305
1311
|
visitors(params) {
|
|
@@ -1310,7 +1316,7 @@ var ProfileResource = class {
|
|
|
1310
1316
|
});
|
|
1311
1317
|
}
|
|
1312
1318
|
/**
|
|
1313
|
-
* Read the connected account's Social Selling Index
|
|
1319
|
+
* Read the connected account's Social Selling Index, the overall score,
|
|
1314
1320
|
* its four pillar breakdowns, and industry/network percentile ranks.
|
|
1315
1321
|
* `GET /v1/{account_id}/profile/ssi`
|
|
1316
1322
|
*
|
|
@@ -1350,7 +1356,7 @@ var GroupsResource = class {
|
|
|
1350
1356
|
});
|
|
1351
1357
|
}
|
|
1352
1358
|
/**
|
|
1353
|
-
* Retrieve a single LinkedIn group's full detail
|
|
1359
|
+
* Retrieve a single LinkedIn group's full detail: its name, description,
|
|
1354
1360
|
* member count, membership status, and admin contact.
|
|
1355
1361
|
* `GET /v1/{account_id}/groups/{group}`
|
|
1356
1362
|
*
|
|
@@ -1366,7 +1372,7 @@ var GroupsResource = class {
|
|
|
1366
1372
|
* List a group's members, cursor-paginated, each carrying its profile URL,
|
|
1367
1373
|
* name, and headline. `GET /v1/{account_id}/groups/{group}/members`
|
|
1368
1374
|
*
|
|
1369
|
-
* Pass `{ name }` to search the roster by member name
|
|
1375
|
+
* Pass `{ name }` to search the roster by member name, the folded-in
|
|
1370
1376
|
* member search, not a separate endpoint.
|
|
1371
1377
|
*
|
|
1372
1378
|
* @param group - the group's id or LinkedIn group URL.
|
|
@@ -1393,11 +1399,11 @@ var FeedResource = class {
|
|
|
1393
1399
|
*
|
|
1394
1400
|
* Pass `{ sort }` to choose the order: `recent` (reverse-chronological,
|
|
1395
1401
|
* the default) or `relevant` (LinkedIn's ranked "top" feed). The feed is an
|
|
1396
|
-
* unbounded, reordering stream with no total count
|
|
1402
|
+
* unbounded, reordering stream with no total count; walk it with the
|
|
1397
1403
|
* returned `cursor` until `cursor` is null. When a `cursor` is supplied its
|
|
1398
1404
|
* carrier is authoritative and `sort` is ignored.
|
|
1399
1405
|
*
|
|
1400
|
-
* @param params - optional `{ sort }`, `limit` (1
|
|
1406
|
+
* @param params - optional `{ sort }`, `limit` (1-100, default 20), and an
|
|
1401
1407
|
* opaque `cursor` from a prior response.
|
|
1402
1408
|
*/
|
|
1403
1409
|
home(params) {
|
|
@@ -1472,7 +1478,7 @@ var InboxesResource = class {
|
|
|
1472
1478
|
*
|
|
1473
1479
|
* @param inboxId - the inbox id from `list()` (e.g. `"CLASSIC_PRIMARY"`
|
|
1474
1480
|
* or `"COMPANY_83734124_PRIMARY"`).
|
|
1475
|
-
* @param params - optional `limit` (1
|
|
1481
|
+
* @param params - optional `limit` (1-25, default 20) and an opaque
|
|
1476
1482
|
* `cursor` for pagination.
|
|
1477
1483
|
*/
|
|
1478
1484
|
listChats(inboxId, params) {
|
|
@@ -1490,8 +1496,8 @@ var NotificationsResource = class {
|
|
|
1490
1496
|
this.ctx = ctx;
|
|
1491
1497
|
}
|
|
1492
1498
|
/**
|
|
1493
|
-
* List the connected account's notification cards
|
|
1494
|
-
* the account-level `unread_count` (the unseen badge
|
|
1499
|
+
* List the connected account's notification cards, newest first, plus
|
|
1500
|
+
* the account-level `unread_count` (the unseen badge, NOT a count of
|
|
1495
1501
|
* `items`) and `latest_published_at` (a cheap poll watermark). Injected
|
|
1496
1502
|
* promo/suggestion cards are included and flagged (`injected:true`),
|
|
1497
1503
|
* never filtered.
|
|
@@ -1510,24 +1516,24 @@ var NotificationsResource = class {
|
|
|
1510
1516
|
}
|
|
1511
1517
|
/**
|
|
1512
1518
|
* Delete one of the connected account's own notification cards by its
|
|
1513
|
-
* card urn. A self-action
|
|
1519
|
+
* card urn. A self-action, no third party is notified. This cannot be
|
|
1514
1520
|
* undone.
|
|
1515
1521
|
*
|
|
1516
1522
|
* **Safe to retry.** Idempotent: deleting a card you already deleted
|
|
1517
|
-
* succeeds with `200`, not an error
|
|
1523
|
+
* succeeds with `200`, not an error; a client that retries after a
|
|
1518
1524
|
* timeout is never punished for it. Only a `card_urn` that never existed
|
|
1519
1525
|
* on this account 404s.
|
|
1520
1526
|
*
|
|
1521
1527
|
* **Timing.** The removal takes effect within a few seconds; a
|
|
1522
1528
|
* {@link list} read immediately after this call may still include the
|
|
1523
|
-
* card for a moment. That is not a failure signal
|
|
1529
|
+
* card for a moment. That is not a failure signal; the `200` is already
|
|
1524
1530
|
* confirmation the card was resolved and the removal accepted. Re-read
|
|
1525
1531
|
* after a short delay, not instantly, if you need to visually confirm.
|
|
1526
1532
|
*
|
|
1527
1533
|
* `DELETE /v1/{account_id}/notifications/{card_urn}`
|
|
1528
1534
|
*
|
|
1529
1535
|
* @param cardUrn - the card's entity urn, raw/unencoded (the `card_urn`
|
|
1530
|
-
* field of a {@link list} item
|
|
1536
|
+
* field of a {@link list} item, `urn:li:fsd_notificationCard:(...)`,
|
|
1531
1537
|
* NOT `object_urn`, which targets the wrong notification). The SDK
|
|
1532
1538
|
* percent-encodes it into the path.
|
|
1533
1539
|
*/
|
|
@@ -1539,16 +1545,16 @@ var NotificationsResource = class {
|
|
|
1539
1545
|
}
|
|
1540
1546
|
/**
|
|
1541
1547
|
* Apply "show less like this" to the source of one of the connected
|
|
1542
|
-
* account's own notification cards
|
|
1548
|
+
* account's own notification cards, a self-action, same card handle and
|
|
1543
1549
|
* timing/retry contract as {@link delete}. For network-activity cards (a
|
|
1544
1550
|
* repost, comment, or reaction by your network) this **removes the
|
|
1545
|
-
* card**, the same effect as `delete
|
|
1551
|
+
* card**, the same effect as `delete`; LinkedIn exposes no separate,
|
|
1546
1552
|
* softer signal for these cards; this method exists so the calling
|
|
1547
1553
|
* intent reads clearly, not because it behaves differently. This cannot
|
|
1548
1554
|
* be undone.
|
|
1549
1555
|
*
|
|
1550
1556
|
* **Safe to retry**, same timing as {@link delete}: idempotent (a repeat
|
|
1551
|
-
* is a `200`, not an error), effective within a few seconds
|
|
1557
|
+
* is a `200`, not an error), effective within a few seconds, a
|
|
1552
1558
|
* still-visible card on an immediate {@link list} re-read is not a
|
|
1553
1559
|
* failure signal.
|
|
1554
1560
|
*
|
|
@@ -1608,7 +1614,7 @@ var SalesNavigatorResource = class {
|
|
|
1608
1614
|
}
|
|
1609
1615
|
/**
|
|
1610
1616
|
* Start a new Sales Navigator chat. `attachments[]`, when supplied, carry
|
|
1611
|
-
* base64-encoded file bytes
|
|
1617
|
+
* base64-encoded file bytes, always sent as JSON, never multipart.
|
|
1612
1618
|
* `POST /v1/{account_id}/sales-navigator/chats`
|
|
1613
1619
|
*/
|
|
1614
1620
|
startChat(body) {
|
|
@@ -1679,11 +1685,11 @@ var SalesNavigatorResource = class {
|
|
|
1679
1685
|
});
|
|
1680
1686
|
}
|
|
1681
1687
|
/**
|
|
1682
|
-
* Save a LinkedIn company into an account list. Body is just `{company_id}
|
|
1683
|
-
*
|
|
1688
|
+
* Save a LinkedIn company into an account list. Body is just `{company_id}`;
|
|
1689
|
+
* `account_id` lives in the path, not the body.
|
|
1684
1690
|
* `POST /v1/{account_id}/sales-navigator/account-lists/{list_id}/save`
|
|
1685
1691
|
*
|
|
1686
|
-
* No `saved` boolean is invented
|
|
1692
|
+
* No `saved` boolean is invented; a `2xx` response body is the success
|
|
1687
1693
|
* signal (the substrate returns no success flag).
|
|
1688
1694
|
*/
|
|
1689
1695
|
saveAccount(input) {
|
|
@@ -1695,8 +1701,8 @@ var SalesNavigatorResource = class {
|
|
|
1695
1701
|
});
|
|
1696
1702
|
}
|
|
1697
1703
|
/**
|
|
1698
|
-
* Save a Sales Navigator member into a lead list. Body is just `{user_id}
|
|
1699
|
-
*
|
|
1704
|
+
* Save a Sales Navigator member into a lead list. Body is just `{user_id}`;
|
|
1705
|
+
* `account_id` lives in the path, not the body.
|
|
1700
1706
|
* `POST /v1/{account_id}/sales-navigator/lead-lists/{list_id}/save`
|
|
1701
1707
|
*/
|
|
1702
1708
|
saveLead(input) {
|
|
@@ -1757,7 +1763,7 @@ var RecruiterResource = class {
|
|
|
1757
1763
|
});
|
|
1758
1764
|
}
|
|
1759
1765
|
/**
|
|
1760
|
-
* Start a Recruiter chat (InMail). JSON-only
|
|
1766
|
+
* Start a Recruiter chat (InMail). JSON-only, `subject` and `signature`
|
|
1761
1767
|
* are REQUIRED; optional attachments ride the body as base64-encoded
|
|
1762
1768
|
* objects (no multipart). `POST /v1/{account_id}/recruiter/chats`
|
|
1763
1769
|
*/
|
|
@@ -1782,7 +1788,7 @@ var RecruiterResource = class {
|
|
|
1782
1788
|
}
|
|
1783
1789
|
/**
|
|
1784
1790
|
* Resolve human-readable terms to opaque Recruiter filter ids. POST (was
|
|
1785
|
-
* GET): the body is a `source`-discriminated oneOf
|
|
1791
|
+
* GET): the body is a `source`-discriminated oneOf, `APPLICANTS`/`PIPELINE`
|
|
1786
1792
|
* require `project_id`. `POST /v1/{account_id}/recruiter/search/parameters`
|
|
1787
1793
|
*/
|
|
1788
1794
|
searchParameters(body, params) {
|
|
@@ -1808,7 +1814,7 @@ var RecruiterResource = class {
|
|
|
1808
1814
|
});
|
|
1809
1815
|
}
|
|
1810
1816
|
/**
|
|
1811
|
-
* Search from a pasted Recruiter search / talent-pool / applicant URL
|
|
1817
|
+
* Search from a pasted Recruiter search / talent-pool / applicant URL,
|
|
1812
1818
|
* nothing else in the body. The response is a 3-way oneOf (people-search,
|
|
1813
1819
|
* job-applicant list, or pipeline-candidate list) keyed by the URL kind.
|
|
1814
1820
|
* `POST /v1/{account_id}/recruiter/search`
|
|
@@ -1843,7 +1849,7 @@ var RecruiterResource = class {
|
|
|
1843
1849
|
});
|
|
1844
1850
|
}
|
|
1845
1851
|
/**
|
|
1846
|
-
* Edit a Recruiter project's config
|
|
1852
|
+
* Edit a Recruiter project's config: all fields optional; omitted fields
|
|
1847
1853
|
* are left unchanged. Returns a thin acknowledgement only.
|
|
1848
1854
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}`
|
|
1849
1855
|
*/
|
|
@@ -1870,7 +1876,7 @@ var RecruiterResource = class {
|
|
|
1870
1876
|
}
|
|
1871
1877
|
/**
|
|
1872
1878
|
* Get the single job posting attached to a Recruiter project (the surface
|
|
1873
|
-
* returns one posting, not a list
|
|
1879
|
+
* returns one posting, not a list; a project with no attached job 404s).
|
|
1874
1880
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
1875
1881
|
*/
|
|
1876
1882
|
getProjectJob(projectId) {
|
|
@@ -1880,7 +1886,7 @@ var RecruiterResource = class {
|
|
|
1880
1886
|
});
|
|
1881
1887
|
}
|
|
1882
1888
|
/**
|
|
1883
|
-
* Create a job-posting DRAFT attached to an EXISTING project
|
|
1889
|
+
* Create a job-posting DRAFT attached to an EXISTING project, `project_name`
|
|
1884
1890
|
* is not accepted (the project comes from the path). Never publishes, never
|
|
1885
1891
|
* spends money. `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs`
|
|
1886
1892
|
*/
|
|
@@ -1892,7 +1898,7 @@ var RecruiterResource = class {
|
|
|
1892
1898
|
});
|
|
1893
1899
|
}
|
|
1894
1900
|
/**
|
|
1895
|
-
* Get pricing to publish a project's job posting
|
|
1901
|
+
* Get pricing to publish a project's job posting; price a publish before
|
|
1896
1902
|
* committing any money.
|
|
1897
1903
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/budget`
|
|
1898
1904
|
*/
|
|
@@ -1903,8 +1909,8 @@ var RecruiterResource = class {
|
|
|
1903
1909
|
});
|
|
1904
1910
|
}
|
|
1905
1911
|
/**
|
|
1906
|
-
* Create a job-posting DRAFT together with a brand-new hiring project
|
|
1907
|
-
* `project_name` is REQUIRED; `description` must be
|
|
1912
|
+
* Create a job-posting DRAFT together with a brand-new hiring project,
|
|
1913
|
+
* `project_name` is REQUIRED; `description` must be >= 200 characters. Never
|
|
1908
1914
|
* publishes, never spends money. `POST /v1/{account_id}/recruiter/jobs`
|
|
1909
1915
|
*/
|
|
1910
1916
|
createJob(body) {
|
|
@@ -1931,7 +1937,7 @@ var RecruiterResource = class {
|
|
|
1931
1937
|
* `GET /v1/{account_id}/recruiter/jobs/{job_id}`
|
|
1932
1938
|
*
|
|
1933
1939
|
* Accepts a bare numeric job id or a full LinkedIn job URL
|
|
1934
|
-
* (`https://www.linkedin.com/jobs/view/{id}`)
|
|
1940
|
+
* (`https://www.linkedin.com/jobs/view/{id}`); the id is extracted
|
|
1935
1941
|
* client-side; the wire request always carries the numeric id. Throws
|
|
1936
1942
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously if neither
|
|
1937
1943
|
* form can be recognized.
|
|
@@ -1944,7 +1950,7 @@ var RecruiterResource = class {
|
|
|
1944
1950
|
});
|
|
1945
1951
|
}
|
|
1946
1952
|
/**
|
|
1947
|
-
* Apply a partial update to a project's job posting
|
|
1953
|
+
* Apply a partial update to a project's job posting, only included fields
|
|
1948
1954
|
* change. MONEY WARNING: editing an already-published (LISTED) posting
|
|
1949
1955
|
* mutates a live, money-spending listing.
|
|
1950
1956
|
* `PATCH /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}`
|
|
@@ -1959,7 +1965,7 @@ var RecruiterResource = class {
|
|
|
1959
1965
|
/**
|
|
1960
1966
|
* Publish a project's job posting draft. `mode` is a discriminated oneOf:
|
|
1961
1967
|
* `FREE` (requires free-posting eligibility, spends nothing) or
|
|
1962
|
-
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget
|
|
1968
|
+
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget`; THIS SPENDS REAL MONEY on
|
|
1963
1969
|
* the connected account's LinkedIn payment method; supplying `budget` IS the
|
|
1964
1970
|
* explicit opt-in).
|
|
1965
1971
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/publish`
|
|
@@ -1974,7 +1980,7 @@ var RecruiterResource = class {
|
|
|
1974
1980
|
/**
|
|
1975
1981
|
* Close a project's job posting so it stops accepting applications
|
|
1976
1982
|
* (bodyless). Closing an already-published (LISTED) posting cannot be
|
|
1977
|
-
* undone
|
|
1983
|
+
* undone; there is no re-open operation.
|
|
1978
1984
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/jobs/{job_id}/close`
|
|
1979
1985
|
*/
|
|
1980
1986
|
closeJob(projectId, jobId) {
|
|
@@ -1985,7 +1991,7 @@ var RecruiterResource = class {
|
|
|
1985
1991
|
}
|
|
1986
1992
|
/**
|
|
1987
1993
|
* Save a candidate (or user profile) to a project's pipeline at the given
|
|
1988
|
-
* stage
|
|
1994
|
+
* stage, the sole surviving pipeline write.
|
|
1989
1995
|
* `POST /v1/{account_id}/recruiter/projects/{project_id}/pipeline/candidate/save`
|
|
1990
1996
|
*/
|
|
1991
1997
|
saveCandidate(projectId, body) {
|
|
@@ -2022,7 +2028,7 @@ var RecruiterResource = class {
|
|
|
2022
2028
|
/**
|
|
2023
2029
|
* Download a talent-pool applicant's résumé as raw binary.
|
|
2024
2030
|
* `GET /v1/{account_id}/recruiter/projects/{project_id}/talent-pool/applicants/{applicant_id}/resume`
|
|
2025
|
-
* Returns `ArrayBuffer
|
|
2031
|
+
* Returns `ArrayBuffer`; the SDK does not cache or store it.
|
|
2026
2032
|
*/
|
|
2027
2033
|
downloadResume(projectId, applicantId) {
|
|
2028
2034
|
return this.ctx.request({
|
|
@@ -2040,7 +2046,7 @@ var JobsResource = class {
|
|
|
2040
2046
|
/**
|
|
2041
2047
|
* List the connected account's own classic job postings.
|
|
2042
2048
|
* `GET /v1/{account_id}/jobs`
|
|
2043
|
-
* `state` is REQUIRED
|
|
2049
|
+
* `state` is REQUIRED, filtering is LinkedIn-side and best-effort (see
|
|
2044
2050
|
* the generated type's own field description).
|
|
2045
2051
|
*/
|
|
2046
2052
|
list(params) {
|
|
@@ -2066,7 +2072,7 @@ var JobsResource = class {
|
|
|
2066
2072
|
* `GET /v1/{account_id}/jobs/{job_id}`
|
|
2067
2073
|
*
|
|
2068
2074
|
* Accepts a bare numeric job id or a full job URL
|
|
2069
|
-
* (`https://www.linkedin.com/jobs/view/{id}`)
|
|
2075
|
+
* (`https://www.linkedin.com/jobs/view/{id}`); the id is extracted
|
|
2070
2076
|
* client-side; the wire request always carries the numeric id. Throws
|
|
2071
2077
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously if neither
|
|
2072
2078
|
* form can be recognized.
|
|
@@ -2080,7 +2086,7 @@ var JobsResource = class {
|
|
|
2080
2086
|
});
|
|
2081
2087
|
}
|
|
2082
2088
|
/**
|
|
2083
|
-
* Apply a partial update to a job posting this account owns
|
|
2089
|
+
* Apply a partial update to a job posting this account owns, only
|
|
2084
2090
|
* included fields change. Can affect real money on an already-published
|
|
2085
2091
|
* (LISTED) posting. `PATCH /v1/{account_id}/jobs/{job_id}`
|
|
2086
2092
|
*/
|
|
@@ -2092,7 +2098,7 @@ var JobsResource = class {
|
|
|
2092
2098
|
});
|
|
2093
2099
|
}
|
|
2094
2100
|
/**
|
|
2095
|
-
* Get pricing to publish a job posting
|
|
2101
|
+
* Get pricing to publish a job posting; price a publish before
|
|
2096
2102
|
* committing any money. `GET /v1/{account_id}/jobs/{job_id}/budget`
|
|
2097
2103
|
*/
|
|
2098
2104
|
getBudget(jobId) {
|
|
@@ -2104,7 +2110,7 @@ var JobsResource = class {
|
|
|
2104
2110
|
/**
|
|
2105
2111
|
* Publish a classic job posting draft. `mode` is a discriminated oneOf:
|
|
2106
2112
|
* `FREE` (requires free-posting eligibility, spends nothing) or
|
|
2107
|
-
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget
|
|
2113
|
+
* `PROMOTED`/`PROMOTED_PLUS` (requires `budget`; THIS SPENDS REAL MONEY
|
|
2108
2114
|
* on the connected account's LinkedIn payment method; supplying `budget`
|
|
2109
2115
|
* IS the explicit opt-in). `POST /v1/{account_id}/jobs/{job_id}/publish`
|
|
2110
2116
|
*/
|
|
@@ -2127,7 +2133,7 @@ var JobsResource = class {
|
|
|
2127
2133
|
});
|
|
2128
2134
|
}
|
|
2129
2135
|
/**
|
|
2130
|
-
* List applicants to a job posting this account owns
|
|
2136
|
+
* List applicants to a job posting this account owns, a read; POST
|
|
2131
2137
|
* carries the filter body, matching the `/search/*` convention. Omit
|
|
2132
2138
|
* `ratings` to see the full applicant funnel. `limit`/`cursor` stay
|
|
2133
2139
|
* TOP-LEVEL query params, never in the body.
|
|
@@ -2161,7 +2167,7 @@ var JobsResource = class {
|
|
|
2161
2167
|
/**
|
|
2162
2168
|
* Download an applicant's résumé. Returns raw binary.
|
|
2163
2169
|
* `GET /v1/{account_id}/jobs/{job_id}/applicants/{applicant_id}/resume`
|
|
2164
|
-
* Returns `ArrayBuffer
|
|
2170
|
+
* Returns `ArrayBuffer`; the SDK does not cache or store it.
|
|
2165
2171
|
*/
|
|
2166
2172
|
downloadResume(jobId, applicantId) {
|
|
2167
2173
|
return this.ctx.request({
|
|
@@ -2193,9 +2199,9 @@ var CompaniesResource = class {
|
|
|
2193
2199
|
* List people who currently work at the company.
|
|
2194
2200
|
* `GET /v1/{account_id}/companies/{identifier}/employees`
|
|
2195
2201
|
*
|
|
2196
|
-
* A facade over people search with the company filter applied
|
|
2202
|
+
* A facade over people search with the company filter applied, filter
|
|
2197
2203
|
* further with `keywords` or `location`. `identifier` must be the
|
|
2198
|
-
* company's numeric provider_id (the same `id` field `get()` returns)
|
|
2204
|
+
* company's numeric provider_id (the same `id` field `get()` returns),
|
|
2199
2205
|
* a handle or URN is rejected before any upstream call.
|
|
2200
2206
|
*/
|
|
2201
2207
|
employees(identifier, params) {
|
|
@@ -2223,7 +2229,7 @@ var CompaniesResource = class {
|
|
|
2223
2229
|
* List the company's open job postings.
|
|
2224
2230
|
* `GET /v1/{account_id}/companies/{identifier}/jobs`
|
|
2225
2231
|
*
|
|
2226
|
-
* A facade over job search with the company filter applied
|
|
2232
|
+
* A facade over job search with the company filter applied, filter
|
|
2227
2233
|
* further with `keywords`. An empty `items[]` is a valid result (the
|
|
2228
2234
|
* company currently has no open postings). `identifier` must be the
|
|
2229
2235
|
* company's numeric provider_id.
|
|
@@ -2241,7 +2247,7 @@ var CompaniesResource = class {
|
|
|
2241
2247
|
*
|
|
2242
2248
|
* The `id` on each returned page is the numeric provider_id `followers()`,
|
|
2243
2249
|
* `invitableFollowers()`, `employees()`, `posts()`, and `jobs()` consume.
|
|
2244
|
-
* An empty `items[]` is valid
|
|
2250
|
+
* An empty `items[]` is valid; the account administers no pages.
|
|
2245
2251
|
*/
|
|
2246
2252
|
managed(params) {
|
|
2247
2253
|
return this.ctx.request({
|
|
@@ -2269,7 +2275,7 @@ var CompaniesResource = class {
|
|
|
2269
2275
|
* company page. `GET /v1/{account_id}/companies/{identifier}/invitable-followers`
|
|
2270
2276
|
*
|
|
2271
2277
|
* The connected account must administer the page. `identifier` must be the
|
|
2272
|
-
* company's numeric provider_id. An empty `items[]` is valid
|
|
2278
|
+
* company's numeric provider_id. An empty `items[]` is valid; nobody is
|
|
2273
2279
|
* currently invitable.
|
|
2274
2280
|
*/
|
|
2275
2281
|
invitableFollowers(identifier, params) {
|
|
@@ -2285,7 +2291,7 @@ var CompaniesResource = class {
|
|
|
2285
2291
|
*
|
|
2286
2292
|
* The account must administer the page with the invite-to-follow
|
|
2287
2293
|
* entitlement (see `managed()`). `identifier` must be the company's numeric
|
|
2288
|
-
* provider_id. Pass the `AC
|
|
2294
|
+
* provider_id. Pass the `AC...` member ids from an `invitableFollowers()`
|
|
2289
2295
|
* read. All-or-nothing: for an all-valid request, resolves to one outcome
|
|
2290
2296
|
* per requested invitee, in request order. If any invitee id is invalid,
|
|
2291
2297
|
* the whole request rejects with a 404, not a partial result.
|
|
@@ -2306,7 +2312,7 @@ var CompaniesResource = class {
|
|
|
2306
2312
|
*
|
|
2307
2313
|
* The connected account must administer the page. `identifier` must be the
|
|
2308
2314
|
* company's numeric provider_id. Content passes through verbatim and is
|
|
2309
|
-
* never stored. Beta
|
|
2315
|
+
* never stored. Beta: single-page listing and termination are verified;
|
|
2310
2316
|
* deep pagination (many pages / large cursor round-trips) is provisional
|
|
2311
2317
|
* until validated against a busier inbox.
|
|
2312
2318
|
*/
|
|
@@ -2321,7 +2327,7 @@ var CompaniesResource = class {
|
|
|
2321
2327
|
* Retrieve one conversation from a company page's admin inbox.
|
|
2322
2328
|
* `GET /v1/{account_id}/companies/{identifier}/chats/{chat_id}`
|
|
2323
2329
|
*
|
|
2324
|
-
* The connected account must administer the page. Beta
|
|
2330
|
+
* The connected account must administer the page. Beta: see `chats()`.
|
|
2325
2331
|
*/
|
|
2326
2332
|
chat(identifier, chatId) {
|
|
2327
2333
|
return this.ctx.request({
|
|
@@ -2334,7 +2340,7 @@ var CompaniesResource = class {
|
|
|
2334
2340
|
* `GET /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
2335
2341
|
*
|
|
2336
2342
|
* The connected account must administer the page. Content passes through
|
|
2337
|
-
* verbatim and is never stored. Beta
|
|
2343
|
+
* verbatim and is never stored. Beta: see `chats()`.
|
|
2338
2344
|
*/
|
|
2339
2345
|
messages(identifier, chatId, params) {
|
|
2340
2346
|
return this.ctx.request({
|
|
@@ -2347,7 +2353,7 @@ var CompaniesResource = class {
|
|
|
2347
2353
|
* Retrieve one message from a company-inbox conversation.
|
|
2348
2354
|
* `GET /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages/{message_id}`
|
|
2349
2355
|
*
|
|
2350
|
-
* The connected account must administer the page. Beta
|
|
2356
|
+
* The connected account must administer the page. Beta: see `chats()`.
|
|
2351
2357
|
*/
|
|
2352
2358
|
message(identifier, chatId, messageId) {
|
|
2353
2359
|
return this.ctx.request({
|
|
@@ -2360,9 +2366,9 @@ var CompaniesResource = class {
|
|
|
2360
2366
|
* `GET /v1/{account_id}/companies/{identifier}/chats/search`
|
|
2361
2367
|
*
|
|
2362
2368
|
* Exactly one mode per call: free-text `query` (matches participant names
|
|
2363
|
-
* and message content), a `topic` card, or `unread`-only
|
|
2369
|
+
* and message content), a `topic` card, or `unread`-only; the three are
|
|
2364
2370
|
* mutually exclusive and enforced server-side. The connected account must
|
|
2365
|
-
* administer the page. Beta
|
|
2371
|
+
* administer the page. Beta: see `chats()`.
|
|
2366
2372
|
*/
|
|
2367
2373
|
searchChats(identifier, params) {
|
|
2368
2374
|
return this.ctx.request({
|
|
@@ -2375,7 +2381,7 @@ var CompaniesResource = class {
|
|
|
2375
2381
|
* Reply to a company-inbox conversation, AS THE PAGE.
|
|
2376
2382
|
* `POST /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
2377
2383
|
*
|
|
2378
|
-
* `chatId` is the `2
|
|
2384
|
+
* `chatId` is the `2-...` conversation id that `chats()` / `chat()` /
|
|
2379
2385
|
* `searchChats()` return for this page. The endpoint resolves the page
|
|
2380
2386
|
* mailbox internally from `identifier`, so no special send-ready id is
|
|
2381
2387
|
* needed: pass the id straight from the company chat reads.
|
|
@@ -2440,7 +2446,9 @@ var WebhooksResource = class {
|
|
|
2440
2446
|
});
|
|
2441
2447
|
}
|
|
2442
2448
|
/**
|
|
2443
|
-
* Return the complete canonical webhook event catalogue
|
|
2449
|
+
* Return the complete canonical webhook event catalogue, grouped by source.
|
|
2450
|
+
* The response counts itself; no size is stated here, because a hand-typed
|
|
2451
|
+
* one is wrong the next time the catalogue grows.
|
|
2444
2452
|
* `GET /v1/webhooks/events`
|
|
2445
2453
|
*/
|
|
2446
2454
|
listEvents() {
|
|
@@ -2452,7 +2460,7 @@ var WebhooksResource = class {
|
|
|
2452
2460
|
/**
|
|
2453
2461
|
* Return a single webhook owned by the calling tenant.
|
|
2454
2462
|
* `GET /v1/webhooks/{id}`
|
|
2455
|
-
* The plaintext secret is never present on a read
|
|
2463
|
+
* The plaintext secret is never present on a read, only `secret_prefix`.
|
|
2456
2464
|
*/
|
|
2457
2465
|
get(id) {
|
|
2458
2466
|
return this.ctx.request({
|
|
@@ -2540,7 +2548,7 @@ var Curviate = class {
|
|
|
2540
2548
|
* Return an account-scoped accessor that fixes `account_id` on every call,
|
|
2541
2549
|
* so callers need not repeat it per method.
|
|
2542
2550
|
*
|
|
2543
|
-
* @param accountId - a Curviate account id (`acc_
|
|
2551
|
+
* @param accountId - a Curviate account id (`acc_...`). Empty throws
|
|
2544
2552
|
* `CurviateError({ code: 'INVALID_REQUEST' })` synchronously, no network call.
|
|
2545
2553
|
*
|
|
2546
2554
|
* @example
|