@curviate/sdk 0.16.0 → 0.17.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 +14 -0
- package/dist/index.d.ts +319 -35
- package/dist/index.js +20 -0
- package/package.json +1 -1
- package/src/generated/types.ts +297 -30
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,20 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.17.0] — 2026-07-17
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **`companies.followInvite(identifier, body)`**: invite the connected
|
|
17
|
+
account's 1st-degree connections to follow a company page it administers with the
|
|
18
|
+
invite-to-follow entitlement. Pass the `AC…` member ids from an `invitableFollowers()`
|
|
19
|
+
read. `POST /v1/{account_id}/companies/{identifier}/follow-invite`. All-or-nothing:
|
|
20
|
+
for an all-valid request, resolves to one outcome per requested invitee, in request
|
|
21
|
+
order (`status: "invited" | "already_invited" | "ineligible" | "not_found"`); if any
|
|
22
|
+
invitee id is invalid, the whole request rejects with a 404, not a partial result.
|
|
23
|
+
Re-inviting an already-invited member is a safe no-op (the same `invitation_id`,
|
|
24
|
+
never a duplicate).
|
|
25
|
+
|
|
12
26
|
## [0.16.0] — 2026-07-17
|
|
13
27
|
|
|
14
28
|
Mostly additive, plus one breaking removal on the connect/reconnect body.
|
package/dist/index.d.ts
CHANGED
|
@@ -428,6 +428,26 @@ interface paths {
|
|
|
428
428
|
patch?: never;
|
|
429
429
|
trace?: never;
|
|
430
430
|
};
|
|
431
|
+
"/v1/{account_id}/companies/{identifier}/follow-invite": {
|
|
432
|
+
parameters: {
|
|
433
|
+
query?: never;
|
|
434
|
+
header?: never;
|
|
435
|
+
path?: never;
|
|
436
|
+
cookie?: never;
|
|
437
|
+
};
|
|
438
|
+
get?: never;
|
|
439
|
+
put?: never;
|
|
440
|
+
/**
|
|
441
|
+
* Invite connections to follow a page
|
|
442
|
+
* @description Invites one or more of the connected account's 1st-degree connections to follow a company page it administers with the invite-to-follow entitlement. Pass the AC… member ids from an invitable-followers read. Returns one outcome per invitee, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate). Only identifiers transit. Nothing is stored.
|
|
443
|
+
*/
|
|
444
|
+
post: operations["postV1AccountIdCompaniesIdentifierFollowInvite"];
|
|
445
|
+
delete?: never;
|
|
446
|
+
options?: never;
|
|
447
|
+
head?: never;
|
|
448
|
+
patch?: never;
|
|
449
|
+
trace?: never;
|
|
450
|
+
};
|
|
431
451
|
"/v1/{account_id}/companies/{identifier}/followers": {
|
|
432
452
|
parameters: {
|
|
433
453
|
query?: never;
|
|
@@ -497,7 +517,7 @@ interface paths {
|
|
|
497
517
|
};
|
|
498
518
|
/**
|
|
499
519
|
* Retrieve one admin conversation
|
|
500
|
-
* @description Returns a single conversation from a company page's admin inbox by id — the same shape as a list item. The connected account must administer the page.
|
|
520
|
+
* @description Returns a single conversation from a company page's admin inbox by id — the same shape as a list item. The connected account must administer the page.
|
|
501
521
|
*/
|
|
502
522
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatId"];
|
|
503
523
|
put?: never;
|
|
@@ -517,7 +537,7 @@ interface paths {
|
|
|
517
537
|
};
|
|
518
538
|
/**
|
|
519
539
|
* List a conversation's messages
|
|
520
|
-
* @description Returns a page of one conversation's messages, newest-first. Message text passes through and is never stored. An unknown conversation returns 404 (the empty page is not trusted at face value); a genuinely empty existing thread returns an empty list. The connected account must administer the page.
|
|
540
|
+
* @description Returns a page of one conversation's messages, newest-first. Message text passes through and is never stored. An unknown conversation returns 404 (the empty page is not trusted at face value); a genuinely empty existing thread returns an empty list. The connected account must administer the page.
|
|
521
541
|
*/
|
|
522
542
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessages"];
|
|
523
543
|
put?: never;
|
|
@@ -537,7 +557,7 @@ interface paths {
|
|
|
537
557
|
};
|
|
538
558
|
/**
|
|
539
559
|
* Retrieve one message from a conversation
|
|
540
|
-
* @description Returns a single message from a company page's admin inbox, scoped to its conversation — the same shape as a messages-list item. Both chat_id and message_id are required. The connected account must administer the page.
|
|
560
|
+
* @description Returns a single message from a company page's admin inbox, scoped to its conversation — the same shape as a messages-list item. Both chat_id and message_id are required. The connected account must administer the page.
|
|
541
561
|
*/
|
|
542
562
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId"];
|
|
543
563
|
put?: never;
|
|
@@ -871,7 +891,7 @@ interface paths {
|
|
|
871
891
|
put?: never;
|
|
872
892
|
/**
|
|
873
893
|
* Send a message
|
|
874
|
-
* @description Sends a message into an existing chat. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored.
|
|
894
|
+
* @description Sends a message into an existing chat. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored. Sending on behalf of a company page: use a COMPANY_ chat id (from GET /v1/{account_id}/inboxes/{inbox_id}/chats) and the message sends AS THE PAGE, no separate parameter needed. The response's sent_as field names the acting identity that was actually used. Company pages are reply-only: this endpoint can answer an existing conversation on a page's behalf, but a page can never start a new one.
|
|
875
895
|
*/
|
|
876
896
|
post: operations["postV1AccountIdChatsChatIdMessages"];
|
|
877
897
|
delete?: never;
|
|
@@ -1017,7 +1037,7 @@ interface paths {
|
|
|
1017
1037
|
};
|
|
1018
1038
|
/**
|
|
1019
1039
|
* List an inbox's conversations
|
|
1020
|
-
* @description Returns a paginated list of an inbox's conversations, newest-activity-first. Each chat's id is send-ready: pass it directly to the send-message endpoint to reply — a company inbox's chat id (e.g. 'COMPANY_83734124_2-…') replies AS THE PAGE, no separate parameter needed. Works identically for personal (CLASSIC_) inboxes. Company pages are reply-only (reply_only:true on the inbox, from GET /inboxes) — they cannot start a new conversation.
|
|
1040
|
+
* @description Returns a paginated list of an inbox's conversations, newest-activity-first. Each chat's id is send-ready: pass it directly to the send-message endpoint to reply — a company inbox's chat id (e.g. 'COMPANY_83734124_2-…') replies AS THE PAGE, no separate parameter needed. Works identically for personal (CLASSIC_) inboxes. Company pages are reply-only (reply_only:true on the inbox, from GET /inboxes) — they cannot start a new conversation. A malformed inbox_id returns 400 INVALID_REQUEST; a well-formed id for a mailbox this account does not administer returns 403 RESOURCE_ACCESS_RESTRICTED (no existence disclosure) — there is no 404 for this endpoint.
|
|
1021
1041
|
*/
|
|
1022
1042
|
get: operations["getV1AccountIdInboxesInboxIdChats"];
|
|
1023
1043
|
put?: never;
|
|
@@ -5474,6 +5494,163 @@ interface operations {
|
|
|
5474
5494
|
};
|
|
5475
5495
|
};
|
|
5476
5496
|
};
|
|
5497
|
+
postV1AccountIdCompaniesIdentifierFollowInvite: {
|
|
5498
|
+
parameters: {
|
|
5499
|
+
query?: never;
|
|
5500
|
+
header?: never;
|
|
5501
|
+
path: {
|
|
5502
|
+
/** @description The connected LinkedIn account, which must administer the page with invite rights. */
|
|
5503
|
+
account_id: string;
|
|
5504
|
+
/** @description The company's numeric id (e.g. 112013061) — the id field of GET /v1/{account_id}/companies/{identifier} or a POST /v1/{account_id}/search/companies result. A public handle or URN is not accepted here — pass the numeric id. */
|
|
5505
|
+
identifier: string;
|
|
5506
|
+
};
|
|
5507
|
+
cookie?: never;
|
|
5508
|
+
};
|
|
5509
|
+
requestBody: {
|
|
5510
|
+
content: {
|
|
5511
|
+
"application/json": {
|
|
5512
|
+
/** @description The AC… member ids to invite to follow the page. Each is the id field of an invitable-followers read. Required, 1 to 50 per request. */
|
|
5513
|
+
invitee_ids: string[];
|
|
5514
|
+
};
|
|
5515
|
+
};
|
|
5516
|
+
};
|
|
5517
|
+
responses: {
|
|
5518
|
+
/** @description One per-invitee outcome for each requested member, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. Re-inviting an already-invited member returns the same invitation id with status "already_invited", an idempotent no-op, never a duplicate. Only identifiers transit; nothing is stored. */
|
|
5519
|
+
200: {
|
|
5520
|
+
headers: {
|
|
5521
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
5522
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
5523
|
+
[name: string]: unknown;
|
|
5524
|
+
};
|
|
5525
|
+
content: {
|
|
5526
|
+
"application/json": {
|
|
5527
|
+
/**
|
|
5528
|
+
* @description Response type discriminator.
|
|
5529
|
+
* @enum {string}
|
|
5530
|
+
*/
|
|
5531
|
+
object: "company_follow_invite_result";
|
|
5532
|
+
/** @description One entry per requested invitee, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. */
|
|
5533
|
+
results: {
|
|
5534
|
+
/**
|
|
5535
|
+
* @description Item type discriminator.
|
|
5536
|
+
* @enum {string}
|
|
5537
|
+
*/
|
|
5538
|
+
object: "company_follow_invite";
|
|
5539
|
+
/** @description The member id from the request, echoed back. */
|
|
5540
|
+
invitee_id: string;
|
|
5541
|
+
/**
|
|
5542
|
+
* @description Per-invitee outcome. "invited": a new follow-invitation was created. "already_invited": a pending invitation already existed (idempotent no-op; the same invitation_id is returned, never a duplicate). "ineligible": the member is not an invitable 1st-degree connection. "not_found": the member id did not resolve.
|
|
5543
|
+
* @enum {string}
|
|
5544
|
+
*/
|
|
5545
|
+
status: "invited" | "already_invited" | "ineligible" | "not_found";
|
|
5546
|
+
/** @description The invitation id, present for "invited" and "already_invited", null for a per-invitee failure. */
|
|
5547
|
+
invitation_id: string | null;
|
|
5548
|
+
/** @description Present only for a per-invitee failure ("ineligible" / "not_found"); null otherwise. */
|
|
5549
|
+
error: {
|
|
5550
|
+
/** @description Canonical error code for this invitee's failure. */
|
|
5551
|
+
code?: string;
|
|
5552
|
+
/** @description Human-readable failure reason. */
|
|
5553
|
+
message?: string;
|
|
5554
|
+
} | null;
|
|
5555
|
+
}[];
|
|
5556
|
+
};
|
|
5557
|
+
};
|
|
5558
|
+
};
|
|
5559
|
+
/** @description Empty, over-cap (>50), or malformed invitee_ids, or a non-numeric identifier, rejected before any send. */
|
|
5560
|
+
400: {
|
|
5561
|
+
headers: {
|
|
5562
|
+
[name: string]: unknown;
|
|
5563
|
+
};
|
|
5564
|
+
content: {
|
|
5565
|
+
"application/json": components["schemas"]["Error"];
|
|
5566
|
+
};
|
|
5567
|
+
};
|
|
5568
|
+
/** @description Missing or invalid API key. */
|
|
5569
|
+
401: {
|
|
5570
|
+
headers: {
|
|
5571
|
+
[name: string]: unknown;
|
|
5572
|
+
};
|
|
5573
|
+
content: {
|
|
5574
|
+
"application/json": components["schemas"]["Error"];
|
|
5575
|
+
};
|
|
5576
|
+
};
|
|
5577
|
+
/** @description The account does not administer this page with the invite-to-follow entitlement (fail-closed), or lacks the required Core seat. */
|
|
5578
|
+
403: {
|
|
5579
|
+
headers: {
|
|
5580
|
+
[name: string]: unknown;
|
|
5581
|
+
};
|
|
5582
|
+
content: {
|
|
5583
|
+
"application/json": components["schemas"]["Error"];
|
|
5584
|
+
};
|
|
5585
|
+
};
|
|
5586
|
+
/** @description The account_id does not belong to this tenant, or a wholly-invalid invitee did not resolve. */
|
|
5587
|
+
404: {
|
|
5588
|
+
headers: {
|
|
5589
|
+
[name: string]: unknown;
|
|
5590
|
+
};
|
|
5591
|
+
content: {
|
|
5592
|
+
"application/json": components["schemas"]["Error"];
|
|
5593
|
+
};
|
|
5594
|
+
};
|
|
5595
|
+
/** @description The account is restricted and cannot perform this operation. */
|
|
5596
|
+
422: {
|
|
5597
|
+
headers: {
|
|
5598
|
+
[name: string]: unknown;
|
|
5599
|
+
};
|
|
5600
|
+
content: {
|
|
5601
|
+
"application/json": components["schemas"]["Error"];
|
|
5602
|
+
};
|
|
5603
|
+
};
|
|
5604
|
+
/** @description The follow-invite credit or rate budget is exhausted. Slow down and retry after the hinted delay. */
|
|
5605
|
+
429: {
|
|
5606
|
+
headers: {
|
|
5607
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
5608
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
5609
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
5610
|
+
[name: string]: unknown;
|
|
5611
|
+
};
|
|
5612
|
+
content: {
|
|
5613
|
+
"application/json": components["schemas"]["Error"];
|
|
5614
|
+
};
|
|
5615
|
+
};
|
|
5616
|
+
/** @description Internal error. */
|
|
5617
|
+
500: {
|
|
5618
|
+
headers: {
|
|
5619
|
+
[name: string]: unknown;
|
|
5620
|
+
};
|
|
5621
|
+
content: {
|
|
5622
|
+
"application/json": components["schemas"]["Error"];
|
|
5623
|
+
};
|
|
5624
|
+
};
|
|
5625
|
+
/** @description A temporary error occurred. Please try again. */
|
|
5626
|
+
502: {
|
|
5627
|
+
headers: {
|
|
5628
|
+
[name: string]: unknown;
|
|
5629
|
+
};
|
|
5630
|
+
content: {
|
|
5631
|
+
"application/json": components["schemas"]["Error"];
|
|
5632
|
+
};
|
|
5633
|
+
};
|
|
5634
|
+
/** @description Service unavailable. */
|
|
5635
|
+
503: {
|
|
5636
|
+
headers: {
|
|
5637
|
+
[name: string]: unknown;
|
|
5638
|
+
};
|
|
5639
|
+
content: {
|
|
5640
|
+
"application/json": components["schemas"]["Error"];
|
|
5641
|
+
};
|
|
5642
|
+
};
|
|
5643
|
+
/** @description Gateway timeout. */
|
|
5644
|
+
504: {
|
|
5645
|
+
headers: {
|
|
5646
|
+
[name: string]: unknown;
|
|
5647
|
+
};
|
|
5648
|
+
content: {
|
|
5649
|
+
"application/json": components["schemas"]["Error"];
|
|
5650
|
+
};
|
|
5651
|
+
};
|
|
5652
|
+
};
|
|
5653
|
+
};
|
|
5477
5654
|
getV1AccountIdCompaniesIdentifierFollowers: {
|
|
5478
5655
|
parameters: {
|
|
5479
5656
|
query?: {
|
|
@@ -9700,7 +9877,7 @@ interface operations {
|
|
|
9700
9877
|
path: {
|
|
9701
9878
|
/** @description The account ID (`acc_…`) that owns the chat. */
|
|
9702
9879
|
account_id: string;
|
|
9703
|
-
/** @description The unique identifier of the chat to send the message to. */
|
|
9880
|
+
/** @description The unique identifier of the chat to send the message to. A COMPANY_ chat id (e.g. 'COMPANY_83734124_2-YTQ3ODU3Njgt', from the inboxes endpoints) sends this message as that company page instead of the connected member. */
|
|
9704
9881
|
chat_id: string;
|
|
9705
9882
|
};
|
|
9706
9883
|
cookie?: never;
|
|
@@ -9725,7 +9902,7 @@ interface operations {
|
|
|
9725
9902
|
};
|
|
9726
9903
|
};
|
|
9727
9904
|
responses: {
|
|
9728
|
-
/** @description Message sent. Returns the new message_id and sent_as
|
|
9905
|
+
/** @description Message sent. Returns the new message_id and sent_as, the acting identity. Reply as a company page simply by sending into one of its chat ids (from GET /v1/{account_id}/inboxes/{inbox_id}/chats): a COMPANY_ chat id (e.g. `COMPANY_83734124_2-…`) sends AS THE PAGE and echoes sent_as:{kind:'company',company_id,name} (company_id is null when the page could not be correlated to a managed page). Any other chat id sends as the connected member and echoes sent_as:{kind:'personal'}. Never infer the acting identity from the message's sender field, only from sent_as. */
|
|
9729
9906
|
201: {
|
|
9730
9907
|
headers: {
|
|
9731
9908
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -9748,10 +9925,10 @@ interface operations {
|
|
|
9748
9925
|
* @enum {string}
|
|
9749
9926
|
*/
|
|
9750
9927
|
kind?: "personal" | "company";
|
|
9751
|
-
/** @description Company inboxes only
|
|
9928
|
+
/** @description Company inboxes only. Null when this page is not one of the account's managed companies on Curviate, even though the page itself, and its name, are still known. */
|
|
9752
9929
|
company_id?: string | null;
|
|
9753
|
-
/** @description Company inboxes only
|
|
9754
|
-
name?: string;
|
|
9930
|
+
/** @description Company inboxes only. The page's display name, or null in the rare case the page itself could not be resolved at all. */
|
|
9931
|
+
name?: string | null;
|
|
9755
9932
|
};
|
|
9756
9933
|
};
|
|
9757
9934
|
};
|
|
@@ -10806,7 +10983,7 @@ interface operations {
|
|
|
10806
10983
|
};
|
|
10807
10984
|
requestBody?: never;
|
|
10808
10985
|
responses: {
|
|
10809
|
-
/** @description The account's inboxes
|
|
10986
|
+
/** @description The account's inboxes: its own personal inbox, plus, when the company product is attached, one entry per company page (e.g. id='COMPANY_83734124_PRIMARY'). When no company inbox exists, hint names the Company Pages reconnect requirement instead of returning silently empty. This is the discovery step of the reply-as-a-page flow: find a company inbox here, read its conversations with GET /v1/{account_id}/inboxes/{inbox_id}/chats, then reply with the existing POST /v1/{account_id}/chats/{chat_id}/messages using one of its chat ids. */
|
|
10810
10987
|
200: {
|
|
10811
10988
|
headers: {
|
|
10812
10989
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -10826,7 +11003,7 @@ interface operations {
|
|
|
10826
11003
|
* @enum {string}
|
|
10827
11004
|
*/
|
|
10828
11005
|
object?: "inbox";
|
|
10829
|
-
/** @description Inbox identifier
|
|
11006
|
+
/** @description Inbox identifier. Pass it to the inbox-chats endpoint below to read its conversations. */
|
|
10830
11007
|
id?: string;
|
|
10831
11008
|
/**
|
|
10832
11009
|
* @description Whether this is the account's own inbox or a company page's.
|
|
@@ -10837,14 +11014,14 @@ interface operations {
|
|
|
10837
11014
|
folder?: string;
|
|
10838
11015
|
/** @description Personal: the folder's display name. Company: the page's display name. */
|
|
10839
11016
|
name?: string | null;
|
|
10840
|
-
/** @description Company inboxes only
|
|
11017
|
+
/** @description Company inboxes only. The managed-company id this mailbox was correlated to, or null when it could not be correlated (never a fabricated id). */
|
|
10841
11018
|
company_id?: string | null;
|
|
10842
|
-
/** @description Company inboxes only
|
|
11019
|
+
/** @description Company inboxes only. The substrate's internal mailbox id (distinct from company_id). */
|
|
10843
11020
|
mailbox_id?: string | null;
|
|
10844
|
-
/** @description
|
|
11021
|
+
/** @description True for company inboxes: a company page can only reply to an existing conversation, it can never start one. */
|
|
10845
11022
|
reply_only?: boolean;
|
|
10846
11023
|
}[];
|
|
10847
|
-
/** @description Present only when no company inbox exists
|
|
11024
|
+
/** @description Present only when no company inbox exists. Names the reconnect requirement. */
|
|
10848
11025
|
hint?: string;
|
|
10849
11026
|
};
|
|
10850
11027
|
};
|
|
@@ -10936,7 +11113,7 @@ interface operations {
|
|
|
10936
11113
|
};
|
|
10937
11114
|
requestBody?: never;
|
|
10938
11115
|
responses: {
|
|
10939
|
-
/** @description A page of the inbox's conversations, newest-activity-first. Each chat's id is send-ready
|
|
11116
|
+
/** @description A page of the inbox's conversations, newest-activity-first, in the same shape as GET /v1/{account_id}/chats. Each chat's id is send-ready: pass it directly to POST /v1/{account_id}/chats/{chat_id}/messages to reply. A company inbox's chats carry ids like 'COMPANY_83734124_2-YTQ3ODU3Njgt'; replying with that id sends AS THE PAGE, no separate parameter needed, and the send response's sent_as field confirms it. Works identically for personal (CLASSIC_) inboxes. */
|
|
10940
11117
|
200: {
|
|
10941
11118
|
headers: {
|
|
10942
11119
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -10950,13 +11127,112 @@ interface operations {
|
|
|
10950
11127
|
* @enum {string}
|
|
10951
11128
|
*/
|
|
10952
11129
|
object?: "inbox_chat_list";
|
|
10953
|
-
items?:
|
|
10954
|
-
|
|
11130
|
+
items?: {
|
|
11131
|
+
/**
|
|
11132
|
+
* @description Response type discriminator.
|
|
11133
|
+
* @enum {string}
|
|
11134
|
+
*/
|
|
11135
|
+
object?: "chat";
|
|
11136
|
+
/** @description Chat identifier. */
|
|
11137
|
+
id?: string;
|
|
11138
|
+
/** @description Account id that owns this chat. */
|
|
11139
|
+
account_id?: string;
|
|
11140
|
+
/** @description Chat display name, or null. */
|
|
11141
|
+
name?: string | null;
|
|
11142
|
+
/**
|
|
11143
|
+
* @description Conversation type.
|
|
11144
|
+
* @enum {string}
|
|
11145
|
+
*/
|
|
11146
|
+
type?: "1to1" | "group" | "channel";
|
|
11147
|
+
is_group?: boolean;
|
|
11148
|
+
is_1to1?: boolean;
|
|
11149
|
+
is_channel?: boolean;
|
|
11150
|
+
is_pinned?: boolean;
|
|
11151
|
+
is_readonly?: boolean;
|
|
11152
|
+
/** @description True if the chat is archived. */
|
|
11153
|
+
is_archived?: boolean;
|
|
11154
|
+
/** @description True if notifications for this chat are muted. */
|
|
11155
|
+
muted_until?: boolean;
|
|
11156
|
+
/** @description Number of unread messages in this chat. */
|
|
11157
|
+
unread_count?: number;
|
|
11158
|
+
/** @description Folder labels assigned to this chat. */
|
|
11159
|
+
folders?: string[];
|
|
11160
|
+
/** @description The platform this chat originates from. */
|
|
11161
|
+
provider?: string;
|
|
11162
|
+
/** @description ISO-8601 UTC creation timestamp. */
|
|
11163
|
+
created_at?: string;
|
|
11164
|
+
/** @description ISO-8601 UTC timestamp of the last message. */
|
|
11165
|
+
last_message_timestamp?: string;
|
|
11166
|
+
/** @description Identifier of the 1:1 counterpart. */
|
|
11167
|
+
user_id?: string;
|
|
11168
|
+
/** @description The most recent message in the chat. */
|
|
11169
|
+
last_message?: {
|
|
11170
|
+
/**
|
|
11171
|
+
* @description Response type discriminator.
|
|
11172
|
+
* @enum {string}
|
|
11173
|
+
*/
|
|
11174
|
+
object?: "message";
|
|
11175
|
+
/** @description Message identifier. */
|
|
11176
|
+
id?: string;
|
|
11177
|
+
/** @description Account id that owns this message. */
|
|
11178
|
+
account_id?: string;
|
|
11179
|
+
/** @description Chat this message belongs to. */
|
|
11180
|
+
chat_id?: string;
|
|
11181
|
+
/** @description Identifier of the sender. */
|
|
11182
|
+
sender_id?: string;
|
|
11183
|
+
/** @description Full message text (content pass-through — never stored). */
|
|
11184
|
+
text?: string | null;
|
|
11185
|
+
/** @description Attachment descriptors (no bytes — use the attachment endpoint to download). */
|
|
11186
|
+
attachments?: {
|
|
11187
|
+
/** @description Attachment identifier. */
|
|
11188
|
+
id?: string;
|
|
11189
|
+
/** @description MIME type of the attachment. */
|
|
11190
|
+
mimetype?: string;
|
|
11191
|
+
/** @description Attachment kind: file | img | video | audio. */
|
|
11192
|
+
type?: string;
|
|
11193
|
+
/** @description Original file name. */
|
|
11194
|
+
filename?: string;
|
|
11195
|
+
/** @description Size in bytes. */
|
|
11196
|
+
file_size?: number;
|
|
11197
|
+
/** @description True when the attachment is no longer available. */
|
|
11198
|
+
unavailable?: boolean | null;
|
|
11199
|
+
}[];
|
|
11200
|
+
/** @description ISO-8601 UTC send timestamp. */
|
|
11201
|
+
timestamp?: string;
|
|
11202
|
+
/** @description True if the connected account sent this message. */
|
|
11203
|
+
is_sender?: boolean;
|
|
11204
|
+
is_seen?: boolean;
|
|
11205
|
+
is_delivered?: boolean;
|
|
11206
|
+
is_edited?: boolean;
|
|
11207
|
+
/** @description True if the account is mentioned in this message. */
|
|
11208
|
+
is_mentionned?: boolean;
|
|
11209
|
+
/** @description Per-type reaction breakdown on the message. */
|
|
11210
|
+
reactions?: {
|
|
11211
|
+
type?: string;
|
|
11212
|
+
count?: number;
|
|
11213
|
+
}[];
|
|
11214
|
+
/** @description Total reaction count across all types (derived). */
|
|
11215
|
+
reaction_count?: number;
|
|
11216
|
+
/** @description The platform this message originates from. */
|
|
11217
|
+
provider?: string;
|
|
11218
|
+
};
|
|
11219
|
+
/** @description The 1:1 counterpart's profile. */
|
|
11220
|
+
user?: {
|
|
11221
|
+
/** @description Identifier of the counterpart. */
|
|
11222
|
+
id?: string;
|
|
11223
|
+
/** @description individual | organization. */
|
|
11224
|
+
type?: string;
|
|
11225
|
+
display_name?: string;
|
|
11226
|
+
profile_url?: string;
|
|
11227
|
+
public_picture_url?: string;
|
|
11228
|
+
};
|
|
11229
|
+
}[];
|
|
11230
|
+
/** @description Next-page cursor. Follow until items is empty. */
|
|
10955
11231
|
cursor?: string | null;
|
|
10956
11232
|
};
|
|
10957
11233
|
};
|
|
10958
11234
|
};
|
|
10959
|
-
/** @description limit out of range (1
|
|
11235
|
+
/** @description limit out of range (1-25), malformed cursor, or a malformed/unknown-folder inbox_id (rejected before the substrate is ever called; see GET /inboxes for valid ids). */
|
|
10960
11236
|
400: {
|
|
10961
11237
|
headers: {
|
|
10962
11238
|
[name: string]: unknown;
|
|
@@ -10974,7 +11250,7 @@ interface operations {
|
|
|
10974
11250
|
"application/json": components["schemas"]["Error"];
|
|
10975
11251
|
};
|
|
10976
11252
|
};
|
|
10977
|
-
/** @description The connected account is not an admin of this page. */
|
|
11253
|
+
/** @description The connected account does not administer this inbox: either it is not an admin of this page, or the mailbox is unknown to this account. No existence disclosure. */
|
|
10978
11254
|
403: {
|
|
10979
11255
|
headers: {
|
|
10980
11256
|
[name: string]: unknown;
|
|
@@ -10983,15 +11259,6 @@ interface operations {
|
|
|
10983
11259
|
"application/json": components["schemas"]["Error"];
|
|
10984
11260
|
};
|
|
10985
11261
|
};
|
|
10986
|
-
/** @description The inbox does not exist for this account. */
|
|
10987
|
-
404: {
|
|
10988
|
-
headers: {
|
|
10989
|
-
[name: string]: unknown;
|
|
10990
|
-
};
|
|
10991
|
-
content: {
|
|
10992
|
-
"application/json": components["schemas"]["Error"];
|
|
10993
|
-
};
|
|
10994
|
-
};
|
|
10995
11262
|
/** @description Rate limited. */
|
|
10996
11263
|
429: {
|
|
10997
11264
|
headers: {
|
|
@@ -28232,7 +28499,7 @@ declare class JobsResource {
|
|
|
28232
28499
|
}
|
|
28233
28500
|
|
|
28234
28501
|
/**
|
|
28235
|
-
* Companies resource —
|
|
28502
|
+
* Companies resource — 13 methods.
|
|
28236
28503
|
*
|
|
28237
28504
|
* Account-scoped: the bound context injects `account_id` as the leading
|
|
28238
28505
|
* `/v1/` path segment on every request (account-first grammar) — the 0.14.1
|
|
@@ -28246,10 +28513,11 @@ declare class JobsResource {
|
|
|
28246
28513
|
* `followers()` — re-added under a different item shape (`company_follower`,
|
|
28247
28514
|
* carrying `degree`/`followed_at`) than the pre-0.15.0 method of the same
|
|
28248
28515
|
* name. `invitableFollowers()` lists connections the account can invite to
|
|
28249
|
-
* follow the page
|
|
28250
|
-
*
|
|
28251
|
-
*
|
|
28252
|
-
* `
|
|
28516
|
+
* follow the page; `followInvite()` sends the invitation —
|
|
28517
|
+
* pass the `AC…` member ids `invitableFollowers()` returned. All four require
|
|
28518
|
+
* the account to administer the target page (`managed()` for the caller's
|
|
28519
|
+
* own set; `followers`/`invitableFollowers`/`followInvite` take the target
|
|
28520
|
+
* company's numeric provider_id, same as `employees`/`posts`/`jobs`).
|
|
28253
28521
|
*
|
|
28254
28522
|
* `chats()` / `chat()` / `messages()` / `message()` / `searchChats()` are the
|
|
28255
28523
|
* company page's admin message inbox — a distinct conversation surface from
|
|
@@ -28272,6 +28540,8 @@ type CompanyFollowerListPage = paths["/v1/{account_id}/companies/{identifier}/fo
|
|
|
28272
28540
|
type CompanyFollowerListQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/followers"]["get"]["parameters"]["query"]>;
|
|
28273
28541
|
type CompanyInvitableFollowerListPage = paths["/v1/{account_id}/companies/{identifier}/invitable-followers"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28274
28542
|
type CompanyInvitableFollowerListQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/invitable-followers"]["get"]["parameters"]["query"]>;
|
|
28543
|
+
type CompanyFollowInviteBody = paths["/v1/{account_id}/companies/{identifier}/follow-invite"]["post"]["requestBody"]["content"]["application/json"];
|
|
28544
|
+
type CompanyFollowInviteResult = paths["/v1/{account_id}/companies/{identifier}/follow-invite"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
28275
28545
|
type CompanyChatListPage = paths["/v1/{account_id}/companies/{identifier}/chats"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28276
28546
|
type CompanyChatListQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/chats"]["get"]["parameters"]["query"]>;
|
|
28277
28547
|
type CompanyChat = paths["/v1/{account_id}/companies/{identifier}/chats/{chat_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -28345,6 +28615,20 @@ declare class CompaniesResource {
|
|
|
28345
28615
|
* currently invitable.
|
|
28346
28616
|
*/
|
|
28347
28617
|
invitableFollowers(identifier: string, params?: CompanyInvitableFollowerListQuery): Promise<CompanyInvitableFollowerListPage>;
|
|
28618
|
+
/**
|
|
28619
|
+
* Invite the connected account's 1st-degree connections to follow the
|
|
28620
|
+
* company page. `POST /v1/{account_id}/companies/{identifier}/follow-invite`
|
|
28621
|
+
*
|
|
28622
|
+
* The account must administer the page with the invite-to-follow
|
|
28623
|
+
* entitlement (see `managed()`). `identifier` must be the company's numeric
|
|
28624
|
+
* provider_id. Pass the `AC…` member ids from an `invitableFollowers()`
|
|
28625
|
+
* read. All-or-nothing: for an all-valid request, resolves to one outcome
|
|
28626
|
+
* per requested invitee, in request order. If any invitee id is invalid,
|
|
28627
|
+
* the whole request rejects with a 404, not a partial result.
|
|
28628
|
+
* Re-inviting an already-invited member is a safe no-op, the same
|
|
28629
|
+
* invitation id, never a duplicate.
|
|
28630
|
+
*/
|
|
28631
|
+
followInvite(identifier: string, body: CompanyFollowInviteBody): Promise<CompanyFollowInviteResult>;
|
|
28348
28632
|
/**
|
|
28349
28633
|
* List the conversations in a company page's admin message inbox,
|
|
28350
28634
|
* newest-activity-first.
|
package/dist/index.js
CHANGED
|
@@ -2279,6 +2279,26 @@ var CompaniesResource = class {
|
|
|
2279
2279
|
...params ? { query: params } : {}
|
|
2280
2280
|
});
|
|
2281
2281
|
}
|
|
2282
|
+
/**
|
|
2283
|
+
* Invite the connected account's 1st-degree connections to follow the
|
|
2284
|
+
* company page. `POST /v1/{account_id}/companies/{identifier}/follow-invite`
|
|
2285
|
+
*
|
|
2286
|
+
* The account must administer the page with the invite-to-follow
|
|
2287
|
+
* entitlement (see `managed()`). `identifier` must be the company's numeric
|
|
2288
|
+
* provider_id. Pass the `AC…` member ids from an `invitableFollowers()`
|
|
2289
|
+
* read. All-or-nothing: for an all-valid request, resolves to one outcome
|
|
2290
|
+
* per requested invitee, in request order. If any invitee id is invalid,
|
|
2291
|
+
* the whole request rejects with a 404, not a partial result.
|
|
2292
|
+
* Re-inviting an already-invited member is a safe no-op, the same
|
|
2293
|
+
* invitation id, never a duplicate.
|
|
2294
|
+
*/
|
|
2295
|
+
followInvite(identifier, body) {
|
|
2296
|
+
return this.ctx.request({
|
|
2297
|
+
method: "POST",
|
|
2298
|
+
path: `/v1/{account_id}/companies/${identifier}/follow-invite`,
|
|
2299
|
+
body
|
|
2300
|
+
});
|
|
2301
|
+
}
|
|
2282
2302
|
/**
|
|
2283
2303
|
* List the conversations in a company page's admin message inbox,
|
|
2284
2304
|
* newest-activity-first.
|
package/package.json
CHANGED
package/src/generated/types.ts
CHANGED
|
@@ -330,6 +330,26 @@ export interface paths {
|
|
|
330
330
|
patch?: never;
|
|
331
331
|
trace?: never;
|
|
332
332
|
};
|
|
333
|
+
"/v1/{account_id}/companies/{identifier}/follow-invite": {
|
|
334
|
+
parameters: {
|
|
335
|
+
query?: never;
|
|
336
|
+
header?: never;
|
|
337
|
+
path?: never;
|
|
338
|
+
cookie?: never;
|
|
339
|
+
};
|
|
340
|
+
get?: never;
|
|
341
|
+
put?: never;
|
|
342
|
+
/**
|
|
343
|
+
* Invite connections to follow a page
|
|
344
|
+
* @description Invites one or more of the connected account's 1st-degree connections to follow a company page it administers with the invite-to-follow entitlement. Pass the AC… member ids from an invitable-followers read. Returns one outcome per invitee, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. Re-inviting an already-invited member is a safe no-op (the same invitation id, never a duplicate). Only identifiers transit. Nothing is stored.
|
|
345
|
+
*/
|
|
346
|
+
post: operations["postV1AccountIdCompaniesIdentifierFollowInvite"];
|
|
347
|
+
delete?: never;
|
|
348
|
+
options?: never;
|
|
349
|
+
head?: never;
|
|
350
|
+
patch?: never;
|
|
351
|
+
trace?: never;
|
|
352
|
+
};
|
|
333
353
|
"/v1/{account_id}/companies/{identifier}/followers": {
|
|
334
354
|
parameters: {
|
|
335
355
|
query?: never;
|
|
@@ -399,7 +419,7 @@ export interface paths {
|
|
|
399
419
|
};
|
|
400
420
|
/**
|
|
401
421
|
* Retrieve one admin conversation
|
|
402
|
-
* @description Returns a single conversation from a company page's admin inbox by id — the same shape as a list item. The connected account must administer the page.
|
|
422
|
+
* @description Returns a single conversation from a company page's admin inbox by id — the same shape as a list item. The connected account must administer the page.
|
|
403
423
|
*/
|
|
404
424
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatId"];
|
|
405
425
|
put?: never;
|
|
@@ -419,7 +439,7 @@ export interface paths {
|
|
|
419
439
|
};
|
|
420
440
|
/**
|
|
421
441
|
* List a conversation's messages
|
|
422
|
-
* @description Returns a page of one conversation's messages, newest-first. Message text passes through and is never stored. An unknown conversation returns 404 (the empty page is not trusted at face value); a genuinely empty existing thread returns an empty list. The connected account must administer the page.
|
|
442
|
+
* @description Returns a page of one conversation's messages, newest-first. Message text passes through and is never stored. An unknown conversation returns 404 (the empty page is not trusted at face value); a genuinely empty existing thread returns an empty list. The connected account must administer the page.
|
|
423
443
|
*/
|
|
424
444
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessages"];
|
|
425
445
|
put?: never;
|
|
@@ -439,7 +459,7 @@ export interface paths {
|
|
|
439
459
|
};
|
|
440
460
|
/**
|
|
441
461
|
* Retrieve one message from a conversation
|
|
442
|
-
* @description Returns a single message from a company page's admin inbox, scoped to its conversation — the same shape as a messages-list item. Both chat_id and message_id are required. The connected account must administer the page.
|
|
462
|
+
* @description Returns a single message from a company page's admin inbox, scoped to its conversation — the same shape as a messages-list item. Both chat_id and message_id are required. The connected account must administer the page.
|
|
443
463
|
*/
|
|
444
464
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId"];
|
|
445
465
|
put?: never;
|
|
@@ -773,7 +793,7 @@ export interface paths {
|
|
|
773
793
|
put?: never;
|
|
774
794
|
/**
|
|
775
795
|
* Send a message
|
|
776
|
-
* @description Sends a message into an existing chat. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored.
|
|
796
|
+
* @description Sends a message into an existing chat. Send application/json with text, base64 attachments (max 5 MiB per file), or both; at least one of text or attachments is required. Message content passes through to the platform and is never stored. Sending on behalf of a company page: use a COMPANY_ chat id (from GET /v1/{account_id}/inboxes/{inbox_id}/chats) and the message sends AS THE PAGE, no separate parameter needed. The response's sent_as field names the acting identity that was actually used. Company pages are reply-only: this endpoint can answer an existing conversation on a page's behalf, but a page can never start a new one.
|
|
777
797
|
*/
|
|
778
798
|
post: operations["postV1AccountIdChatsChatIdMessages"];
|
|
779
799
|
delete?: never;
|
|
@@ -919,7 +939,7 @@ export interface paths {
|
|
|
919
939
|
};
|
|
920
940
|
/**
|
|
921
941
|
* List an inbox's conversations
|
|
922
|
-
* @description Returns a paginated list of an inbox's conversations, newest-activity-first. Each chat's id is send-ready: pass it directly to the send-message endpoint to reply — a company inbox's chat id (e.g. 'COMPANY_83734124_2-…') replies AS THE PAGE, no separate parameter needed. Works identically for personal (CLASSIC_) inboxes. Company pages are reply-only (reply_only:true on the inbox, from GET /inboxes) — they cannot start a new conversation.
|
|
942
|
+
* @description Returns a paginated list of an inbox's conversations, newest-activity-first. Each chat's id is send-ready: pass it directly to the send-message endpoint to reply — a company inbox's chat id (e.g. 'COMPANY_83734124_2-…') replies AS THE PAGE, no separate parameter needed. Works identically for personal (CLASSIC_) inboxes. Company pages are reply-only (reply_only:true on the inbox, from GET /inboxes) — they cannot start a new conversation. A malformed inbox_id returns 400 INVALID_REQUEST; a well-formed id for a mailbox this account does not administer returns 403 RESOURCE_ACCESS_RESTRICTED (no existence disclosure) — there is no 404 for this endpoint.
|
|
923
943
|
*/
|
|
924
944
|
get: operations["getV1AccountIdInboxesInboxIdChats"];
|
|
925
945
|
put?: never;
|
|
@@ -5378,6 +5398,163 @@ export interface operations {
|
|
|
5378
5398
|
};
|
|
5379
5399
|
};
|
|
5380
5400
|
};
|
|
5401
|
+
postV1AccountIdCompaniesIdentifierFollowInvite: {
|
|
5402
|
+
parameters: {
|
|
5403
|
+
query?: never;
|
|
5404
|
+
header?: never;
|
|
5405
|
+
path: {
|
|
5406
|
+
/** @description The connected LinkedIn account, which must administer the page with invite rights. */
|
|
5407
|
+
account_id: string;
|
|
5408
|
+
/** @description The company's numeric id (e.g. 112013061) — the id field of GET /v1/{account_id}/companies/{identifier} or a POST /v1/{account_id}/search/companies result. A public handle or URN is not accepted here — pass the numeric id. */
|
|
5409
|
+
identifier: string;
|
|
5410
|
+
};
|
|
5411
|
+
cookie?: never;
|
|
5412
|
+
};
|
|
5413
|
+
requestBody: {
|
|
5414
|
+
content: {
|
|
5415
|
+
"application/json": {
|
|
5416
|
+
/** @description The AC… member ids to invite to follow the page. Each is the id field of an invitable-followers read. Required, 1 to 50 per request. */
|
|
5417
|
+
invitee_ids: string[];
|
|
5418
|
+
};
|
|
5419
|
+
};
|
|
5420
|
+
};
|
|
5421
|
+
responses: {
|
|
5422
|
+
/** @description One per-invitee outcome for each requested member, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. Re-inviting an already-invited member returns the same invitation id with status "already_invited", an idempotent no-op, never a duplicate. Only identifiers transit; nothing is stored. */
|
|
5423
|
+
200: {
|
|
5424
|
+
headers: {
|
|
5425
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
5426
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
5427
|
+
[name: string]: unknown;
|
|
5428
|
+
};
|
|
5429
|
+
content: {
|
|
5430
|
+
"application/json": {
|
|
5431
|
+
/**
|
|
5432
|
+
* @description Response type discriminator.
|
|
5433
|
+
* @enum {string}
|
|
5434
|
+
*/
|
|
5435
|
+
object: "company_follow_invite_result";
|
|
5436
|
+
/** @description One entry per requested invitee, in request order, for an all-valid request. If any invitee id is invalid, the whole request is rejected (404), with no partial success. */
|
|
5437
|
+
results: {
|
|
5438
|
+
/**
|
|
5439
|
+
* @description Item type discriminator.
|
|
5440
|
+
* @enum {string}
|
|
5441
|
+
*/
|
|
5442
|
+
object: "company_follow_invite";
|
|
5443
|
+
/** @description The member id from the request, echoed back. */
|
|
5444
|
+
invitee_id: string;
|
|
5445
|
+
/**
|
|
5446
|
+
* @description Per-invitee outcome. "invited": a new follow-invitation was created. "already_invited": a pending invitation already existed (idempotent no-op; the same invitation_id is returned, never a duplicate). "ineligible": the member is not an invitable 1st-degree connection. "not_found": the member id did not resolve.
|
|
5447
|
+
* @enum {string}
|
|
5448
|
+
*/
|
|
5449
|
+
status: "invited" | "already_invited" | "ineligible" | "not_found";
|
|
5450
|
+
/** @description The invitation id, present for "invited" and "already_invited", null for a per-invitee failure. */
|
|
5451
|
+
invitation_id: string | null;
|
|
5452
|
+
/** @description Present only for a per-invitee failure ("ineligible" / "not_found"); null otherwise. */
|
|
5453
|
+
error: {
|
|
5454
|
+
/** @description Canonical error code for this invitee's failure. */
|
|
5455
|
+
code?: string;
|
|
5456
|
+
/** @description Human-readable failure reason. */
|
|
5457
|
+
message?: string;
|
|
5458
|
+
} | null;
|
|
5459
|
+
}[];
|
|
5460
|
+
};
|
|
5461
|
+
};
|
|
5462
|
+
};
|
|
5463
|
+
/** @description Empty, over-cap (>50), or malformed invitee_ids, or a non-numeric identifier, rejected before any send. */
|
|
5464
|
+
400: {
|
|
5465
|
+
headers: {
|
|
5466
|
+
[name: string]: unknown;
|
|
5467
|
+
};
|
|
5468
|
+
content: {
|
|
5469
|
+
"application/json": components["schemas"]["Error"];
|
|
5470
|
+
};
|
|
5471
|
+
};
|
|
5472
|
+
/** @description Missing or invalid API key. */
|
|
5473
|
+
401: {
|
|
5474
|
+
headers: {
|
|
5475
|
+
[name: string]: unknown;
|
|
5476
|
+
};
|
|
5477
|
+
content: {
|
|
5478
|
+
"application/json": components["schemas"]["Error"];
|
|
5479
|
+
};
|
|
5480
|
+
};
|
|
5481
|
+
/** @description The account does not administer this page with the invite-to-follow entitlement (fail-closed), or lacks the required Core seat. */
|
|
5482
|
+
403: {
|
|
5483
|
+
headers: {
|
|
5484
|
+
[name: string]: unknown;
|
|
5485
|
+
};
|
|
5486
|
+
content: {
|
|
5487
|
+
"application/json": components["schemas"]["Error"];
|
|
5488
|
+
};
|
|
5489
|
+
};
|
|
5490
|
+
/** @description The account_id does not belong to this tenant, or a wholly-invalid invitee did not resolve. */
|
|
5491
|
+
404: {
|
|
5492
|
+
headers: {
|
|
5493
|
+
[name: string]: unknown;
|
|
5494
|
+
};
|
|
5495
|
+
content: {
|
|
5496
|
+
"application/json": components["schemas"]["Error"];
|
|
5497
|
+
};
|
|
5498
|
+
};
|
|
5499
|
+
/** @description The account is restricted and cannot perform this operation. */
|
|
5500
|
+
422: {
|
|
5501
|
+
headers: {
|
|
5502
|
+
[name: string]: unknown;
|
|
5503
|
+
};
|
|
5504
|
+
content: {
|
|
5505
|
+
"application/json": components["schemas"]["Error"];
|
|
5506
|
+
};
|
|
5507
|
+
};
|
|
5508
|
+
/** @description The follow-invite credit or rate budget is exhausted. Slow down and retry after the hinted delay. */
|
|
5509
|
+
429: {
|
|
5510
|
+
headers: {
|
|
5511
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
5512
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
5513
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
5514
|
+
[name: string]: unknown;
|
|
5515
|
+
};
|
|
5516
|
+
content: {
|
|
5517
|
+
"application/json": components["schemas"]["Error"];
|
|
5518
|
+
};
|
|
5519
|
+
};
|
|
5520
|
+
/** @description Internal error. */
|
|
5521
|
+
500: {
|
|
5522
|
+
headers: {
|
|
5523
|
+
[name: string]: unknown;
|
|
5524
|
+
};
|
|
5525
|
+
content: {
|
|
5526
|
+
"application/json": components["schemas"]["Error"];
|
|
5527
|
+
};
|
|
5528
|
+
};
|
|
5529
|
+
/** @description A temporary error occurred. Please try again. */
|
|
5530
|
+
502: {
|
|
5531
|
+
headers: {
|
|
5532
|
+
[name: string]: unknown;
|
|
5533
|
+
};
|
|
5534
|
+
content: {
|
|
5535
|
+
"application/json": components["schemas"]["Error"];
|
|
5536
|
+
};
|
|
5537
|
+
};
|
|
5538
|
+
/** @description Service unavailable. */
|
|
5539
|
+
503: {
|
|
5540
|
+
headers: {
|
|
5541
|
+
[name: string]: unknown;
|
|
5542
|
+
};
|
|
5543
|
+
content: {
|
|
5544
|
+
"application/json": components["schemas"]["Error"];
|
|
5545
|
+
};
|
|
5546
|
+
};
|
|
5547
|
+
/** @description Gateway timeout. */
|
|
5548
|
+
504: {
|
|
5549
|
+
headers: {
|
|
5550
|
+
[name: string]: unknown;
|
|
5551
|
+
};
|
|
5552
|
+
content: {
|
|
5553
|
+
"application/json": components["schemas"]["Error"];
|
|
5554
|
+
};
|
|
5555
|
+
};
|
|
5556
|
+
};
|
|
5557
|
+
};
|
|
5381
5558
|
getV1AccountIdCompaniesIdentifierFollowers: {
|
|
5382
5559
|
parameters: {
|
|
5383
5560
|
query?: {
|
|
@@ -9604,7 +9781,7 @@ export interface operations {
|
|
|
9604
9781
|
path: {
|
|
9605
9782
|
/** @description The account ID (`acc_…`) that owns the chat. */
|
|
9606
9783
|
account_id: string;
|
|
9607
|
-
/** @description The unique identifier of the chat to send the message to. */
|
|
9784
|
+
/** @description The unique identifier of the chat to send the message to. A COMPANY_ chat id (e.g. 'COMPANY_83734124_2-YTQ3ODU3Njgt', from the inboxes endpoints) sends this message as that company page instead of the connected member. */
|
|
9608
9785
|
chat_id: string;
|
|
9609
9786
|
};
|
|
9610
9787
|
cookie?: never;
|
|
@@ -9629,7 +9806,7 @@ export interface operations {
|
|
|
9629
9806
|
};
|
|
9630
9807
|
};
|
|
9631
9808
|
responses: {
|
|
9632
|
-
/** @description Message sent. Returns the new message_id and sent_as
|
|
9809
|
+
/** @description Message sent. Returns the new message_id and sent_as, the acting identity. Reply as a company page simply by sending into one of its chat ids (from GET /v1/{account_id}/inboxes/{inbox_id}/chats): a COMPANY_ chat id (e.g. `COMPANY_83734124_2-…`) sends AS THE PAGE and echoes sent_as:{kind:'company',company_id,name} (company_id is null when the page could not be correlated to a managed page). Any other chat id sends as the connected member and echoes sent_as:{kind:'personal'}. Never infer the acting identity from the message's sender field, only from sent_as. */
|
|
9633
9810
|
201: {
|
|
9634
9811
|
headers: {
|
|
9635
9812
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -9652,10 +9829,10 @@ export interface operations {
|
|
|
9652
9829
|
* @enum {string}
|
|
9653
9830
|
*/
|
|
9654
9831
|
kind?: "personal" | "company";
|
|
9655
|
-
/** @description Company inboxes only
|
|
9832
|
+
/** @description Company inboxes only. Null when this page is not one of the account's managed companies on Curviate, even though the page itself, and its name, are still known. */
|
|
9656
9833
|
company_id?: string | null;
|
|
9657
|
-
/** @description Company inboxes only
|
|
9658
|
-
name?: string;
|
|
9834
|
+
/** @description Company inboxes only. The page's display name, or null in the rare case the page itself could not be resolved at all. */
|
|
9835
|
+
name?: string | null;
|
|
9659
9836
|
};
|
|
9660
9837
|
};
|
|
9661
9838
|
};
|
|
@@ -10710,7 +10887,7 @@ export interface operations {
|
|
|
10710
10887
|
};
|
|
10711
10888
|
requestBody?: never;
|
|
10712
10889
|
responses: {
|
|
10713
|
-
/** @description The account's inboxes
|
|
10890
|
+
/** @description The account's inboxes: its own personal inbox, plus, when the company product is attached, one entry per company page (e.g. id='COMPANY_83734124_PRIMARY'). When no company inbox exists, hint names the Company Pages reconnect requirement instead of returning silently empty. This is the discovery step of the reply-as-a-page flow: find a company inbox here, read its conversations with GET /v1/{account_id}/inboxes/{inbox_id}/chats, then reply with the existing POST /v1/{account_id}/chats/{chat_id}/messages using one of its chat ids. */
|
|
10714
10891
|
200: {
|
|
10715
10892
|
headers: {
|
|
10716
10893
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -10730,7 +10907,7 @@ export interface operations {
|
|
|
10730
10907
|
* @enum {string}
|
|
10731
10908
|
*/
|
|
10732
10909
|
object?: "inbox";
|
|
10733
|
-
/** @description Inbox identifier
|
|
10910
|
+
/** @description Inbox identifier. Pass it to the inbox-chats endpoint below to read its conversations. */
|
|
10734
10911
|
id?: string;
|
|
10735
10912
|
/**
|
|
10736
10913
|
* @description Whether this is the account's own inbox or a company page's.
|
|
@@ -10741,14 +10918,14 @@ export interface operations {
|
|
|
10741
10918
|
folder?: string;
|
|
10742
10919
|
/** @description Personal: the folder's display name. Company: the page's display name. */
|
|
10743
10920
|
name?: string | null;
|
|
10744
|
-
/** @description Company inboxes only
|
|
10921
|
+
/** @description Company inboxes only. The managed-company id this mailbox was correlated to, or null when it could not be correlated (never a fabricated id). */
|
|
10745
10922
|
company_id?: string | null;
|
|
10746
|
-
/** @description Company inboxes only
|
|
10923
|
+
/** @description Company inboxes only. The substrate's internal mailbox id (distinct from company_id). */
|
|
10747
10924
|
mailbox_id?: string | null;
|
|
10748
|
-
/** @description
|
|
10925
|
+
/** @description True for company inboxes: a company page can only reply to an existing conversation, it can never start one. */
|
|
10749
10926
|
reply_only?: boolean;
|
|
10750
10927
|
}[];
|
|
10751
|
-
/** @description Present only when no company inbox exists
|
|
10928
|
+
/** @description Present only when no company inbox exists. Names the reconnect requirement. */
|
|
10752
10929
|
hint?: string;
|
|
10753
10930
|
};
|
|
10754
10931
|
};
|
|
@@ -10840,7 +11017,7 @@ export interface operations {
|
|
|
10840
11017
|
};
|
|
10841
11018
|
requestBody?: never;
|
|
10842
11019
|
responses: {
|
|
10843
|
-
/** @description A page of the inbox's conversations, newest-activity-first. Each chat's id is send-ready
|
|
11020
|
+
/** @description A page of the inbox's conversations, newest-activity-first, in the same shape as GET /v1/{account_id}/chats. Each chat's id is send-ready: pass it directly to POST /v1/{account_id}/chats/{chat_id}/messages to reply. A company inbox's chats carry ids like 'COMPANY_83734124_2-YTQ3ODU3Njgt'; replying with that id sends AS THE PAGE, no separate parameter needed, and the send response's sent_as field confirms it. Works identically for personal (CLASSIC_) inboxes. */
|
|
10844
11021
|
200: {
|
|
10845
11022
|
headers: {
|
|
10846
11023
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -10854,13 +11031,112 @@ export interface operations {
|
|
|
10854
11031
|
* @enum {string}
|
|
10855
11032
|
*/
|
|
10856
11033
|
object?: "inbox_chat_list";
|
|
10857
|
-
items?:
|
|
10858
|
-
|
|
11034
|
+
items?: {
|
|
11035
|
+
/**
|
|
11036
|
+
* @description Response type discriminator.
|
|
11037
|
+
* @enum {string}
|
|
11038
|
+
*/
|
|
11039
|
+
object?: "chat";
|
|
11040
|
+
/** @description Chat identifier. */
|
|
11041
|
+
id?: string;
|
|
11042
|
+
/** @description Account id that owns this chat. */
|
|
11043
|
+
account_id?: string;
|
|
11044
|
+
/** @description Chat display name, or null. */
|
|
11045
|
+
name?: string | null;
|
|
11046
|
+
/**
|
|
11047
|
+
* @description Conversation type.
|
|
11048
|
+
* @enum {string}
|
|
11049
|
+
*/
|
|
11050
|
+
type?: "1to1" | "group" | "channel";
|
|
11051
|
+
is_group?: boolean;
|
|
11052
|
+
is_1to1?: boolean;
|
|
11053
|
+
is_channel?: boolean;
|
|
11054
|
+
is_pinned?: boolean;
|
|
11055
|
+
is_readonly?: boolean;
|
|
11056
|
+
/** @description True if the chat is archived. */
|
|
11057
|
+
is_archived?: boolean;
|
|
11058
|
+
/** @description True if notifications for this chat are muted. */
|
|
11059
|
+
muted_until?: boolean;
|
|
11060
|
+
/** @description Number of unread messages in this chat. */
|
|
11061
|
+
unread_count?: number;
|
|
11062
|
+
/** @description Folder labels assigned to this chat. */
|
|
11063
|
+
folders?: string[];
|
|
11064
|
+
/** @description The platform this chat originates from. */
|
|
11065
|
+
provider?: string;
|
|
11066
|
+
/** @description ISO-8601 UTC creation timestamp. */
|
|
11067
|
+
created_at?: string;
|
|
11068
|
+
/** @description ISO-8601 UTC timestamp of the last message. */
|
|
11069
|
+
last_message_timestamp?: string;
|
|
11070
|
+
/** @description Identifier of the 1:1 counterpart. */
|
|
11071
|
+
user_id?: string;
|
|
11072
|
+
/** @description The most recent message in the chat. */
|
|
11073
|
+
last_message?: {
|
|
11074
|
+
/**
|
|
11075
|
+
* @description Response type discriminator.
|
|
11076
|
+
* @enum {string}
|
|
11077
|
+
*/
|
|
11078
|
+
object?: "message";
|
|
11079
|
+
/** @description Message identifier. */
|
|
11080
|
+
id?: string;
|
|
11081
|
+
/** @description Account id that owns this message. */
|
|
11082
|
+
account_id?: string;
|
|
11083
|
+
/** @description Chat this message belongs to. */
|
|
11084
|
+
chat_id?: string;
|
|
11085
|
+
/** @description Identifier of the sender. */
|
|
11086
|
+
sender_id?: string;
|
|
11087
|
+
/** @description Full message text (content pass-through — never stored). */
|
|
11088
|
+
text?: string | null;
|
|
11089
|
+
/** @description Attachment descriptors (no bytes — use the attachment endpoint to download). */
|
|
11090
|
+
attachments?: {
|
|
11091
|
+
/** @description Attachment identifier. */
|
|
11092
|
+
id?: string;
|
|
11093
|
+
/** @description MIME type of the attachment. */
|
|
11094
|
+
mimetype?: string;
|
|
11095
|
+
/** @description Attachment kind: file | img | video | audio. */
|
|
11096
|
+
type?: string;
|
|
11097
|
+
/** @description Original file name. */
|
|
11098
|
+
filename?: string;
|
|
11099
|
+
/** @description Size in bytes. */
|
|
11100
|
+
file_size?: number;
|
|
11101
|
+
/** @description True when the attachment is no longer available. */
|
|
11102
|
+
unavailable?: boolean | null;
|
|
11103
|
+
}[];
|
|
11104
|
+
/** @description ISO-8601 UTC send timestamp. */
|
|
11105
|
+
timestamp?: string;
|
|
11106
|
+
/** @description True if the connected account sent this message. */
|
|
11107
|
+
is_sender?: boolean;
|
|
11108
|
+
is_seen?: boolean;
|
|
11109
|
+
is_delivered?: boolean;
|
|
11110
|
+
is_edited?: boolean;
|
|
11111
|
+
/** @description True if the account is mentioned in this message. */
|
|
11112
|
+
is_mentionned?: boolean;
|
|
11113
|
+
/** @description Per-type reaction breakdown on the message. */
|
|
11114
|
+
reactions?: {
|
|
11115
|
+
type?: string;
|
|
11116
|
+
count?: number;
|
|
11117
|
+
}[];
|
|
11118
|
+
/** @description Total reaction count across all types (derived). */
|
|
11119
|
+
reaction_count?: number;
|
|
11120
|
+
/** @description The platform this message originates from. */
|
|
11121
|
+
provider?: string;
|
|
11122
|
+
};
|
|
11123
|
+
/** @description The 1:1 counterpart's profile. */
|
|
11124
|
+
user?: {
|
|
11125
|
+
/** @description Identifier of the counterpart. */
|
|
11126
|
+
id?: string;
|
|
11127
|
+
/** @description individual | organization. */
|
|
11128
|
+
type?: string;
|
|
11129
|
+
display_name?: string;
|
|
11130
|
+
profile_url?: string;
|
|
11131
|
+
public_picture_url?: string;
|
|
11132
|
+
};
|
|
11133
|
+
}[];
|
|
11134
|
+
/** @description Next-page cursor. Follow until items is empty. */
|
|
10859
11135
|
cursor?: string | null;
|
|
10860
11136
|
};
|
|
10861
11137
|
};
|
|
10862
11138
|
};
|
|
10863
|
-
/** @description limit out of range (1
|
|
11139
|
+
/** @description limit out of range (1-25), malformed cursor, or a malformed/unknown-folder inbox_id (rejected before the substrate is ever called; see GET /inboxes for valid ids). */
|
|
10864
11140
|
400: {
|
|
10865
11141
|
headers: {
|
|
10866
11142
|
[name: string]: unknown;
|
|
@@ -10878,7 +11154,7 @@ export interface operations {
|
|
|
10878
11154
|
"application/json": components["schemas"]["Error"];
|
|
10879
11155
|
};
|
|
10880
11156
|
};
|
|
10881
|
-
/** @description The connected account is not an admin of this page. */
|
|
11157
|
+
/** @description The connected account does not administer this inbox: either it is not an admin of this page, or the mailbox is unknown to this account. No existence disclosure. */
|
|
10882
11158
|
403: {
|
|
10883
11159
|
headers: {
|
|
10884
11160
|
[name: string]: unknown;
|
|
@@ -10887,15 +11163,6 @@ export interface operations {
|
|
|
10887
11163
|
"application/json": components["schemas"]["Error"];
|
|
10888
11164
|
};
|
|
10889
11165
|
};
|
|
10890
|
-
/** @description The inbox does not exist for this account. */
|
|
10891
|
-
404: {
|
|
10892
|
-
headers: {
|
|
10893
|
-
[name: string]: unknown;
|
|
10894
|
-
};
|
|
10895
|
-
content: {
|
|
10896
|
-
"application/json": components["schemas"]["Error"];
|
|
10897
|
-
};
|
|
10898
|
-
};
|
|
10899
11166
|
/** @description Rate limited. */
|
|
10900
11167
|
429: {
|
|
10901
11168
|
headers: {
|