@curviate/sdk 0.16.0 → 0.18.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 +25 -0
- package/dist/index.d.ts +545 -36
- package/dist/index.js +62 -0
- package/package.json +1 -1
- package/src/generated/types.ts +480 -31
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,11 +537,15 @@ 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;
|
|
524
|
-
|
|
544
|
+
/**
|
|
545
|
+
* Reply as the company page
|
|
546
|
+
* @description Sends a message into an existing company-inbox conversation, as the page. chat_id must be the send-ready COMPANY_ form from GET /v1/{account_id}/inboxes/{inbox_id}/chats (the 2-… id from this group's chat reads is not send-ready and returns a guiding 400). The connected account must administer the page. Reply-only: a page can never start a new conversation, only answer an existing one. 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. The response's sent_as field names the acting identity that was actually used.
|
|
547
|
+
*/
|
|
548
|
+
post: operations["postV1AccountIdCompaniesIdentifierChatsChatIdMessages"];
|
|
525
549
|
delete?: never;
|
|
526
550
|
options?: never;
|
|
527
551
|
head?: never;
|
|
@@ -537,7 +561,7 @@ interface paths {
|
|
|
537
561
|
};
|
|
538
562
|
/**
|
|
539
563
|
* 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.
|
|
564
|
+
* @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
565
|
*/
|
|
542
566
|
get: operations["getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId"];
|
|
543
567
|
put?: never;
|
|
@@ -871,7 +895,7 @@ interface paths {
|
|
|
871
895
|
put?: never;
|
|
872
896
|
/**
|
|
873
897
|
* 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.
|
|
898
|
+
* @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
899
|
*/
|
|
876
900
|
post: operations["postV1AccountIdChatsChatIdMessages"];
|
|
877
901
|
delete?: never;
|
|
@@ -1017,7 +1041,7 @@ interface paths {
|
|
|
1017
1041
|
};
|
|
1018
1042
|
/**
|
|
1019
1043
|
* 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.
|
|
1044
|
+
* @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
1045
|
*/
|
|
1022
1046
|
get: operations["getV1AccountIdInboxesInboxIdChats"];
|
|
1023
1047
|
put?: never;
|
|
@@ -5474,6 +5498,163 @@ interface operations {
|
|
|
5474
5498
|
};
|
|
5475
5499
|
};
|
|
5476
5500
|
};
|
|
5501
|
+
postV1AccountIdCompaniesIdentifierFollowInvite: {
|
|
5502
|
+
parameters: {
|
|
5503
|
+
query?: never;
|
|
5504
|
+
header?: never;
|
|
5505
|
+
path: {
|
|
5506
|
+
/** @description The connected LinkedIn account, which must administer the page with invite rights. */
|
|
5507
|
+
account_id: string;
|
|
5508
|
+
/** @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. */
|
|
5509
|
+
identifier: string;
|
|
5510
|
+
};
|
|
5511
|
+
cookie?: never;
|
|
5512
|
+
};
|
|
5513
|
+
requestBody: {
|
|
5514
|
+
content: {
|
|
5515
|
+
"application/json": {
|
|
5516
|
+
/** @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. */
|
|
5517
|
+
invitee_ids: string[];
|
|
5518
|
+
};
|
|
5519
|
+
};
|
|
5520
|
+
};
|
|
5521
|
+
responses: {
|
|
5522
|
+
/** @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. */
|
|
5523
|
+
200: {
|
|
5524
|
+
headers: {
|
|
5525
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
5526
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
5527
|
+
[name: string]: unknown;
|
|
5528
|
+
};
|
|
5529
|
+
content: {
|
|
5530
|
+
"application/json": {
|
|
5531
|
+
/**
|
|
5532
|
+
* @description Response type discriminator.
|
|
5533
|
+
* @enum {string}
|
|
5534
|
+
*/
|
|
5535
|
+
object: "company_follow_invite_result";
|
|
5536
|
+
/** @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. */
|
|
5537
|
+
results: {
|
|
5538
|
+
/**
|
|
5539
|
+
* @description Item type discriminator.
|
|
5540
|
+
* @enum {string}
|
|
5541
|
+
*/
|
|
5542
|
+
object: "company_follow_invite";
|
|
5543
|
+
/** @description The member id from the request, echoed back. */
|
|
5544
|
+
invitee_id: string;
|
|
5545
|
+
/**
|
|
5546
|
+
* @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.
|
|
5547
|
+
* @enum {string}
|
|
5548
|
+
*/
|
|
5549
|
+
status: "invited" | "already_invited" | "ineligible" | "not_found";
|
|
5550
|
+
/** @description The invitation id, present for "invited" and "already_invited", null for a per-invitee failure. */
|
|
5551
|
+
invitation_id: string | null;
|
|
5552
|
+
/** @description Present only for a per-invitee failure ("ineligible" / "not_found"); null otherwise. */
|
|
5553
|
+
error: {
|
|
5554
|
+
/** @description Canonical error code for this invitee's failure. */
|
|
5555
|
+
code?: string;
|
|
5556
|
+
/** @description Human-readable failure reason. */
|
|
5557
|
+
message?: string;
|
|
5558
|
+
} | null;
|
|
5559
|
+
}[];
|
|
5560
|
+
};
|
|
5561
|
+
};
|
|
5562
|
+
};
|
|
5563
|
+
/** @description Empty, over-cap (>50), or malformed invitee_ids, or a non-numeric identifier, rejected before any send. */
|
|
5564
|
+
400: {
|
|
5565
|
+
headers: {
|
|
5566
|
+
[name: string]: unknown;
|
|
5567
|
+
};
|
|
5568
|
+
content: {
|
|
5569
|
+
"application/json": components["schemas"]["Error"];
|
|
5570
|
+
};
|
|
5571
|
+
};
|
|
5572
|
+
/** @description Missing or invalid API key. */
|
|
5573
|
+
401: {
|
|
5574
|
+
headers: {
|
|
5575
|
+
[name: string]: unknown;
|
|
5576
|
+
};
|
|
5577
|
+
content: {
|
|
5578
|
+
"application/json": components["schemas"]["Error"];
|
|
5579
|
+
};
|
|
5580
|
+
};
|
|
5581
|
+
/** @description The account does not administer this page with the invite-to-follow entitlement (fail-closed), or lacks the required Core seat. */
|
|
5582
|
+
403: {
|
|
5583
|
+
headers: {
|
|
5584
|
+
[name: string]: unknown;
|
|
5585
|
+
};
|
|
5586
|
+
content: {
|
|
5587
|
+
"application/json": components["schemas"]["Error"];
|
|
5588
|
+
};
|
|
5589
|
+
};
|
|
5590
|
+
/** @description The account_id does not belong to this tenant, or a wholly-invalid invitee did not resolve. */
|
|
5591
|
+
404: {
|
|
5592
|
+
headers: {
|
|
5593
|
+
[name: string]: unknown;
|
|
5594
|
+
};
|
|
5595
|
+
content: {
|
|
5596
|
+
"application/json": components["schemas"]["Error"];
|
|
5597
|
+
};
|
|
5598
|
+
};
|
|
5599
|
+
/** @description The account is restricted and cannot perform this operation. */
|
|
5600
|
+
422: {
|
|
5601
|
+
headers: {
|
|
5602
|
+
[name: string]: unknown;
|
|
5603
|
+
};
|
|
5604
|
+
content: {
|
|
5605
|
+
"application/json": components["schemas"]["Error"];
|
|
5606
|
+
};
|
|
5607
|
+
};
|
|
5608
|
+
/** @description The follow-invite credit or rate budget is exhausted. Slow down and retry after the hinted delay. */
|
|
5609
|
+
429: {
|
|
5610
|
+
headers: {
|
|
5611
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
5612
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
5613
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
5614
|
+
[name: string]: unknown;
|
|
5615
|
+
};
|
|
5616
|
+
content: {
|
|
5617
|
+
"application/json": components["schemas"]["Error"];
|
|
5618
|
+
};
|
|
5619
|
+
};
|
|
5620
|
+
/** @description Internal error. */
|
|
5621
|
+
500: {
|
|
5622
|
+
headers: {
|
|
5623
|
+
[name: string]: unknown;
|
|
5624
|
+
};
|
|
5625
|
+
content: {
|
|
5626
|
+
"application/json": components["schemas"]["Error"];
|
|
5627
|
+
};
|
|
5628
|
+
};
|
|
5629
|
+
/** @description A temporary error occurred. Please try again. */
|
|
5630
|
+
502: {
|
|
5631
|
+
headers: {
|
|
5632
|
+
[name: string]: unknown;
|
|
5633
|
+
};
|
|
5634
|
+
content: {
|
|
5635
|
+
"application/json": components["schemas"]["Error"];
|
|
5636
|
+
};
|
|
5637
|
+
};
|
|
5638
|
+
/** @description Service unavailable. */
|
|
5639
|
+
503: {
|
|
5640
|
+
headers: {
|
|
5641
|
+
[name: string]: unknown;
|
|
5642
|
+
};
|
|
5643
|
+
content: {
|
|
5644
|
+
"application/json": components["schemas"]["Error"];
|
|
5645
|
+
};
|
|
5646
|
+
};
|
|
5647
|
+
/** @description Gateway timeout. */
|
|
5648
|
+
504: {
|
|
5649
|
+
headers: {
|
|
5650
|
+
[name: string]: unknown;
|
|
5651
|
+
};
|
|
5652
|
+
content: {
|
|
5653
|
+
"application/json": components["schemas"]["Error"];
|
|
5654
|
+
};
|
|
5655
|
+
};
|
|
5656
|
+
};
|
|
5657
|
+
};
|
|
5477
5658
|
getV1AccountIdCompaniesIdentifierFollowers: {
|
|
5478
5659
|
parameters: {
|
|
5479
5660
|
query?: {
|
|
@@ -6274,6 +6455,184 @@ interface operations {
|
|
|
6274
6455
|
};
|
|
6275
6456
|
};
|
|
6276
6457
|
};
|
|
6458
|
+
postV1AccountIdCompaniesIdentifierChatsChatIdMessages: {
|
|
6459
|
+
parameters: {
|
|
6460
|
+
query?: never;
|
|
6461
|
+
header?: never;
|
|
6462
|
+
path: {
|
|
6463
|
+
/** @description The connected LinkedIn account, which must administer the page. */
|
|
6464
|
+
account_id: string;
|
|
6465
|
+
/** @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. */
|
|
6466
|
+
identifier: string;
|
|
6467
|
+
/** @description The COMPANY_ chat id to reply to (e.g. 'COMPANY_83734124_2-…'), from GET /v1/{account_id}/inboxes/{inbox_id}/chats, not the 2-… id from this group's chat reads (that form is rejected with a guiding 400). */
|
|
6468
|
+
chat_id: string;
|
|
6469
|
+
};
|
|
6470
|
+
cookie?: never;
|
|
6471
|
+
};
|
|
6472
|
+
requestBody: {
|
|
6473
|
+
content: {
|
|
6474
|
+
"application/json": {
|
|
6475
|
+
/** @description Message text (1–8000 chars). Optional when at least one attachment is supplied. */
|
|
6476
|
+
text?: string;
|
|
6477
|
+
/** @description Optional message ID to quote or reply to. */
|
|
6478
|
+
quote_id?: string;
|
|
6479
|
+
/** @description Optional file attachments (base64-encoded). */
|
|
6480
|
+
attachments?: {
|
|
6481
|
+
/** @description Base64-encoded file bytes. */
|
|
6482
|
+
content: string;
|
|
6483
|
+
/** @description Attachment MIME type (e.g. image/png, application/pdf). */
|
|
6484
|
+
content_type: string;
|
|
6485
|
+
/** @description File name for the attachment. */
|
|
6486
|
+
filename: string;
|
|
6487
|
+
}[];
|
|
6488
|
+
};
|
|
6489
|
+
};
|
|
6490
|
+
};
|
|
6491
|
+
responses: {
|
|
6492
|
+
/** @description Message sent as the page. Returns the new message_id and sent_as, the acting identity, always kind:'company' on this endpoint. company_id is null when the page could not be correlated to a managed page on Curviate, even though the page itself and its name are still known. */
|
|
6493
|
+
201: {
|
|
6494
|
+
headers: {
|
|
6495
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
6496
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
6497
|
+
[name: string]: unknown;
|
|
6498
|
+
};
|
|
6499
|
+
content: {
|
|
6500
|
+
"application/json": {
|
|
6501
|
+
/**
|
|
6502
|
+
* @description Response type discriminator.
|
|
6503
|
+
* @enum {string}
|
|
6504
|
+
*/
|
|
6505
|
+
object?: "message_sent";
|
|
6506
|
+
/** @description The sent message's identifier. */
|
|
6507
|
+
message_id?: string;
|
|
6508
|
+
/** @description The identity this message was actually sent as. */
|
|
6509
|
+
sent_as?: {
|
|
6510
|
+
/**
|
|
6511
|
+
* @description Which identity sent the message.
|
|
6512
|
+
* @enum {string}
|
|
6513
|
+
*/
|
|
6514
|
+
kind?: "personal" | "company";
|
|
6515
|
+
/** @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. */
|
|
6516
|
+
company_id?: string | null;
|
|
6517
|
+
/** @description Company inboxes only. The page's display name, or null in the rare case the page itself could not be resolved at all. */
|
|
6518
|
+
name?: string | null;
|
|
6519
|
+
};
|
|
6520
|
+
};
|
|
6521
|
+
};
|
|
6522
|
+
};
|
|
6523
|
+
/** @description Empty body or neither text nor attachment supplied, a non-numeric identifier, or chat_id is not the send-ready COMPANY_ form (the guiding error names the required form and its /inboxes source). */
|
|
6524
|
+
400: {
|
|
6525
|
+
headers: {
|
|
6526
|
+
[name: string]: unknown;
|
|
6527
|
+
};
|
|
6528
|
+
content: {
|
|
6529
|
+
"application/json": components["schemas"]["Error"];
|
|
6530
|
+
};
|
|
6531
|
+
};
|
|
6532
|
+
/** @description Missing or invalid API key. */
|
|
6533
|
+
401: {
|
|
6534
|
+
headers: {
|
|
6535
|
+
[name: string]: unknown;
|
|
6536
|
+
};
|
|
6537
|
+
content: {
|
|
6538
|
+
"application/json": components["schemas"]["Error"];
|
|
6539
|
+
};
|
|
6540
|
+
};
|
|
6541
|
+
/** @description The account does not administer this page (the substrate's own admin gate), the COMPANY_ chat's mailbox correlates to a DIFFERENT company than {identifier}, or the account lacks the required Core seat. */
|
|
6542
|
+
403: {
|
|
6543
|
+
headers: {
|
|
6544
|
+
[name: string]: unknown;
|
|
6545
|
+
};
|
|
6546
|
+
content: {
|
|
6547
|
+
"application/json": components["schemas"]["Error"];
|
|
6548
|
+
};
|
|
6549
|
+
};
|
|
6550
|
+
/** @description The account_id does not belong to this tenant. */
|
|
6551
|
+
404: {
|
|
6552
|
+
headers: {
|
|
6553
|
+
[name: string]: unknown;
|
|
6554
|
+
};
|
|
6555
|
+
content: {
|
|
6556
|
+
"application/json": components["schemas"]["Error"];
|
|
6557
|
+
};
|
|
6558
|
+
};
|
|
6559
|
+
/** @description Payload too large, an attachment exceeds 5 MiB or the total body exceeds 8 MiB. */
|
|
6560
|
+
413: {
|
|
6561
|
+
headers: {
|
|
6562
|
+
[name: string]: unknown;
|
|
6563
|
+
};
|
|
6564
|
+
content: {
|
|
6565
|
+
"application/json": components["schemas"]["Error"];
|
|
6566
|
+
};
|
|
6567
|
+
};
|
|
6568
|
+
/** @description Unsupported media type, the request must use application/json. */
|
|
6569
|
+
415: {
|
|
6570
|
+
headers: {
|
|
6571
|
+
[name: string]: unknown;
|
|
6572
|
+
};
|
|
6573
|
+
content: {
|
|
6574
|
+
"application/json": components["schemas"]["Error"];
|
|
6575
|
+
};
|
|
6576
|
+
};
|
|
6577
|
+
/** @description The account is restricted and cannot be queried. */
|
|
6578
|
+
422: {
|
|
6579
|
+
headers: {
|
|
6580
|
+
[name: string]: unknown;
|
|
6581
|
+
};
|
|
6582
|
+
content: {
|
|
6583
|
+
"application/json": components["schemas"]["Error"];
|
|
6584
|
+
};
|
|
6585
|
+
};
|
|
6586
|
+
/** @description Rate limited, slow down and retry after the hinted delay. */
|
|
6587
|
+
429: {
|
|
6588
|
+
headers: {
|
|
6589
|
+
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
6590
|
+
RateLimit: components["headers"]["RateLimit"];
|
|
6591
|
+
"Retry-After": components["headers"]["Retry-After"];
|
|
6592
|
+
[name: string]: unknown;
|
|
6593
|
+
};
|
|
6594
|
+
content: {
|
|
6595
|
+
"application/json": components["schemas"]["Error"];
|
|
6596
|
+
};
|
|
6597
|
+
};
|
|
6598
|
+
/** @description Internal error. */
|
|
6599
|
+
500: {
|
|
6600
|
+
headers: {
|
|
6601
|
+
[name: string]: unknown;
|
|
6602
|
+
};
|
|
6603
|
+
content: {
|
|
6604
|
+
"application/json": components["schemas"]["Error"];
|
|
6605
|
+
};
|
|
6606
|
+
};
|
|
6607
|
+
/** @description A temporary error occurred. Please try again. */
|
|
6608
|
+
502: {
|
|
6609
|
+
headers: {
|
|
6610
|
+
[name: string]: unknown;
|
|
6611
|
+
};
|
|
6612
|
+
content: {
|
|
6613
|
+
"application/json": components["schemas"]["Error"];
|
|
6614
|
+
};
|
|
6615
|
+
};
|
|
6616
|
+
/** @description Service unavailable. */
|
|
6617
|
+
503: {
|
|
6618
|
+
headers: {
|
|
6619
|
+
[name: string]: unknown;
|
|
6620
|
+
};
|
|
6621
|
+
content: {
|
|
6622
|
+
"application/json": components["schemas"]["Error"];
|
|
6623
|
+
};
|
|
6624
|
+
};
|
|
6625
|
+
/** @description Gateway timeout. */
|
|
6626
|
+
504: {
|
|
6627
|
+
headers: {
|
|
6628
|
+
[name: string]: unknown;
|
|
6629
|
+
};
|
|
6630
|
+
content: {
|
|
6631
|
+
"application/json": components["schemas"]["Error"];
|
|
6632
|
+
};
|
|
6633
|
+
};
|
|
6634
|
+
};
|
|
6635
|
+
};
|
|
6277
6636
|
getV1AccountIdCompaniesIdentifierChatsChatIdMessagesMessageId: {
|
|
6278
6637
|
parameters: {
|
|
6279
6638
|
query?: never;
|
|
@@ -9700,7 +10059,7 @@ interface operations {
|
|
|
9700
10059
|
path: {
|
|
9701
10060
|
/** @description The account ID (`acc_…`) that owns the chat. */
|
|
9702
10061
|
account_id: string;
|
|
9703
|
-
/** @description The unique identifier of the chat to send the message to. */
|
|
10062
|
+
/** @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
10063
|
chat_id: string;
|
|
9705
10064
|
};
|
|
9706
10065
|
cookie?: never;
|
|
@@ -9725,7 +10084,7 @@ interface operations {
|
|
|
9725
10084
|
};
|
|
9726
10085
|
};
|
|
9727
10086
|
responses: {
|
|
9728
|
-
/** @description Message sent. Returns the new message_id and sent_as
|
|
10087
|
+
/** @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
10088
|
201: {
|
|
9730
10089
|
headers: {
|
|
9731
10090
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -9748,10 +10107,10 @@ interface operations {
|
|
|
9748
10107
|
* @enum {string}
|
|
9749
10108
|
*/
|
|
9750
10109
|
kind?: "personal" | "company";
|
|
9751
|
-
/** @description Company inboxes only
|
|
10110
|
+
/** @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
10111
|
company_id?: string | null;
|
|
9753
|
-
/** @description Company inboxes only
|
|
9754
|
-
name?: string;
|
|
10112
|
+
/** @description Company inboxes only. The page's display name, or null in the rare case the page itself could not be resolved at all. */
|
|
10113
|
+
name?: string | null;
|
|
9755
10114
|
};
|
|
9756
10115
|
};
|
|
9757
10116
|
};
|
|
@@ -10806,7 +11165,7 @@ interface operations {
|
|
|
10806
11165
|
};
|
|
10807
11166
|
requestBody?: never;
|
|
10808
11167
|
responses: {
|
|
10809
|
-
/** @description The account's inboxes
|
|
11168
|
+
/** @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
11169
|
200: {
|
|
10811
11170
|
headers: {
|
|
10812
11171
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -10826,7 +11185,7 @@ interface operations {
|
|
|
10826
11185
|
* @enum {string}
|
|
10827
11186
|
*/
|
|
10828
11187
|
object?: "inbox";
|
|
10829
|
-
/** @description Inbox identifier
|
|
11188
|
+
/** @description Inbox identifier. Pass it to the inbox-chats endpoint below to read its conversations. */
|
|
10830
11189
|
id?: string;
|
|
10831
11190
|
/**
|
|
10832
11191
|
* @description Whether this is the account's own inbox or a company page's.
|
|
@@ -10837,14 +11196,14 @@ interface operations {
|
|
|
10837
11196
|
folder?: string;
|
|
10838
11197
|
/** @description Personal: the folder's display name. Company: the page's display name. */
|
|
10839
11198
|
name?: string | null;
|
|
10840
|
-
/** @description Company inboxes only
|
|
11199
|
+
/** @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
11200
|
company_id?: string | null;
|
|
10842
|
-
/** @description Company inboxes only
|
|
11201
|
+
/** @description Company inboxes only. The substrate's internal mailbox id (distinct from company_id). */
|
|
10843
11202
|
mailbox_id?: string | null;
|
|
10844
|
-
/** @description
|
|
11203
|
+
/** @description True for company inboxes: a company page can only reply to an existing conversation, it can never start one. */
|
|
10845
11204
|
reply_only?: boolean;
|
|
10846
11205
|
}[];
|
|
10847
|
-
/** @description Present only when no company inbox exists
|
|
11206
|
+
/** @description Present only when no company inbox exists. Names the reconnect requirement. */
|
|
10848
11207
|
hint?: string;
|
|
10849
11208
|
};
|
|
10850
11209
|
};
|
|
@@ -10936,7 +11295,7 @@ interface operations {
|
|
|
10936
11295
|
};
|
|
10937
11296
|
requestBody?: never;
|
|
10938
11297
|
responses: {
|
|
10939
|
-
/** @description A page of the inbox's conversations, newest-activity-first. Each chat's id is send-ready
|
|
11298
|
+
/** @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
11299
|
200: {
|
|
10941
11300
|
headers: {
|
|
10942
11301
|
"RateLimit-Policy": components["headers"]["RateLimit-Policy"];
|
|
@@ -10950,13 +11309,112 @@ interface operations {
|
|
|
10950
11309
|
* @enum {string}
|
|
10951
11310
|
*/
|
|
10952
11311
|
object?: "inbox_chat_list";
|
|
10953
|
-
items?:
|
|
10954
|
-
|
|
11312
|
+
items?: {
|
|
11313
|
+
/**
|
|
11314
|
+
* @description Response type discriminator.
|
|
11315
|
+
* @enum {string}
|
|
11316
|
+
*/
|
|
11317
|
+
object?: "chat";
|
|
11318
|
+
/** @description Chat identifier. */
|
|
11319
|
+
id?: string;
|
|
11320
|
+
/** @description Account id that owns this chat. */
|
|
11321
|
+
account_id?: string;
|
|
11322
|
+
/** @description Chat display name, or null. */
|
|
11323
|
+
name?: string | null;
|
|
11324
|
+
/**
|
|
11325
|
+
* @description Conversation type.
|
|
11326
|
+
* @enum {string}
|
|
11327
|
+
*/
|
|
11328
|
+
type?: "1to1" | "group" | "channel";
|
|
11329
|
+
is_group?: boolean;
|
|
11330
|
+
is_1to1?: boolean;
|
|
11331
|
+
is_channel?: boolean;
|
|
11332
|
+
is_pinned?: boolean;
|
|
11333
|
+
is_readonly?: boolean;
|
|
11334
|
+
/** @description True if the chat is archived. */
|
|
11335
|
+
is_archived?: boolean;
|
|
11336
|
+
/** @description True if notifications for this chat are muted. */
|
|
11337
|
+
muted_until?: boolean;
|
|
11338
|
+
/** @description Number of unread messages in this chat. */
|
|
11339
|
+
unread_count?: number;
|
|
11340
|
+
/** @description Folder labels assigned to this chat. */
|
|
11341
|
+
folders?: string[];
|
|
11342
|
+
/** @description The platform this chat originates from. */
|
|
11343
|
+
provider?: string;
|
|
11344
|
+
/** @description ISO-8601 UTC creation timestamp. */
|
|
11345
|
+
created_at?: string;
|
|
11346
|
+
/** @description ISO-8601 UTC timestamp of the last message. */
|
|
11347
|
+
last_message_timestamp?: string;
|
|
11348
|
+
/** @description Identifier of the 1:1 counterpart. */
|
|
11349
|
+
user_id?: string;
|
|
11350
|
+
/** @description The most recent message in the chat. */
|
|
11351
|
+
last_message?: {
|
|
11352
|
+
/**
|
|
11353
|
+
* @description Response type discriminator.
|
|
11354
|
+
* @enum {string}
|
|
11355
|
+
*/
|
|
11356
|
+
object?: "message";
|
|
11357
|
+
/** @description Message identifier. */
|
|
11358
|
+
id?: string;
|
|
11359
|
+
/** @description Account id that owns this message. */
|
|
11360
|
+
account_id?: string;
|
|
11361
|
+
/** @description Chat this message belongs to. */
|
|
11362
|
+
chat_id?: string;
|
|
11363
|
+
/** @description Identifier of the sender. */
|
|
11364
|
+
sender_id?: string;
|
|
11365
|
+
/** @description Full message text (content pass-through — never stored). */
|
|
11366
|
+
text?: string | null;
|
|
11367
|
+
/** @description Attachment descriptors (no bytes — use the attachment endpoint to download). */
|
|
11368
|
+
attachments?: {
|
|
11369
|
+
/** @description Attachment identifier. */
|
|
11370
|
+
id?: string;
|
|
11371
|
+
/** @description MIME type of the attachment. */
|
|
11372
|
+
mimetype?: string;
|
|
11373
|
+
/** @description Attachment kind: file | img | video | audio. */
|
|
11374
|
+
type?: string;
|
|
11375
|
+
/** @description Original file name. */
|
|
11376
|
+
filename?: string;
|
|
11377
|
+
/** @description Size in bytes. */
|
|
11378
|
+
file_size?: number;
|
|
11379
|
+
/** @description True when the attachment is no longer available. */
|
|
11380
|
+
unavailable?: boolean | null;
|
|
11381
|
+
}[];
|
|
11382
|
+
/** @description ISO-8601 UTC send timestamp. */
|
|
11383
|
+
timestamp?: string;
|
|
11384
|
+
/** @description True if the connected account sent this message. */
|
|
11385
|
+
is_sender?: boolean;
|
|
11386
|
+
is_seen?: boolean;
|
|
11387
|
+
is_delivered?: boolean;
|
|
11388
|
+
is_edited?: boolean;
|
|
11389
|
+
/** @description True if the account is mentioned in this message. */
|
|
11390
|
+
is_mentionned?: boolean;
|
|
11391
|
+
/** @description Per-type reaction breakdown on the message. */
|
|
11392
|
+
reactions?: {
|
|
11393
|
+
type?: string;
|
|
11394
|
+
count?: number;
|
|
11395
|
+
}[];
|
|
11396
|
+
/** @description Total reaction count across all types (derived). */
|
|
11397
|
+
reaction_count?: number;
|
|
11398
|
+
/** @description The platform this message originates from. */
|
|
11399
|
+
provider?: string;
|
|
11400
|
+
};
|
|
11401
|
+
/** @description The 1:1 counterpart's profile. */
|
|
11402
|
+
user?: {
|
|
11403
|
+
/** @description Identifier of the counterpart. */
|
|
11404
|
+
id?: string;
|
|
11405
|
+
/** @description individual | organization. */
|
|
11406
|
+
type?: string;
|
|
11407
|
+
display_name?: string;
|
|
11408
|
+
profile_url?: string;
|
|
11409
|
+
public_picture_url?: string;
|
|
11410
|
+
};
|
|
11411
|
+
}[];
|
|
11412
|
+
/** @description Next-page cursor. Follow until items is empty. */
|
|
10955
11413
|
cursor?: string | null;
|
|
10956
11414
|
};
|
|
10957
11415
|
};
|
|
10958
11416
|
};
|
|
10959
|
-
/** @description limit out of range (1
|
|
11417
|
+
/** @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
11418
|
400: {
|
|
10961
11419
|
headers: {
|
|
10962
11420
|
[name: string]: unknown;
|
|
@@ -10974,7 +11432,7 @@ interface operations {
|
|
|
10974
11432
|
"application/json": components["schemas"]["Error"];
|
|
10975
11433
|
};
|
|
10976
11434
|
};
|
|
10977
|
-
/** @description The connected account is not an admin of this page. */
|
|
11435
|
+
/** @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
11436
|
403: {
|
|
10979
11437
|
headers: {
|
|
10980
11438
|
[name: string]: unknown;
|
|
@@ -10983,15 +11441,6 @@ interface operations {
|
|
|
10983
11441
|
"application/json": components["schemas"]["Error"];
|
|
10984
11442
|
};
|
|
10985
11443
|
};
|
|
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
11444
|
/** @description Rate limited. */
|
|
10996
11445
|
429: {
|
|
10997
11446
|
headers: {
|
|
@@ -28232,7 +28681,7 @@ declare class JobsResource {
|
|
|
28232
28681
|
}
|
|
28233
28682
|
|
|
28234
28683
|
/**
|
|
28235
|
-
* Companies resource —
|
|
28684
|
+
* Companies resource — 14 methods.
|
|
28236
28685
|
*
|
|
28237
28686
|
* Account-scoped: the bound context injects `account_id` as the leading
|
|
28238
28687
|
* `/v1/` path segment on every request (account-first grammar) — the 0.14.1
|
|
@@ -28246,10 +28695,11 @@ declare class JobsResource {
|
|
|
28246
28695
|
* `followers()` — re-added under a different item shape (`company_follower`,
|
|
28247
28696
|
* carrying `degree`/`followed_at`) than the pre-0.15.0 method of the same
|
|
28248
28697
|
* name. `invitableFollowers()` lists connections the account can invite to
|
|
28249
|
-
* follow the page
|
|
28250
|
-
*
|
|
28251
|
-
*
|
|
28252
|
-
* `
|
|
28698
|
+
* follow the page; `followInvite()` sends the invitation —
|
|
28699
|
+
* pass the `AC…` member ids `invitableFollowers()` returned. All four require
|
|
28700
|
+
* the account to administer the target page (`managed()` for the caller's
|
|
28701
|
+
* own set; `followers`/`invitableFollowers`/`followInvite` take the target
|
|
28702
|
+
* company's numeric provider_id, same as `employees`/`posts`/`jobs`).
|
|
28253
28703
|
*
|
|
28254
28704
|
* `chats()` / `chat()` / `messages()` / `message()` / `searchChats()` are the
|
|
28255
28705
|
* company page's admin message inbox — a distinct conversation surface from
|
|
@@ -28257,6 +28707,11 @@ declare class JobsResource {
|
|
|
28257
28707
|
* **Beta:** single-page listing and termination are verified; deep pagination
|
|
28258
28708
|
* (many pages / large cursor round-trips) is still being validated against a
|
|
28259
28709
|
* busier inbox.
|
|
28710
|
+
*
|
|
28711
|
+
* `sendMessage()` is the inbox's one write: reply to an existing
|
|
28712
|
+
* conversation AS THE PAGE. It requires the send-ready `COMPANY_` chat id
|
|
28713
|
+
* from `inboxes.listChats()`, not the `2-…` id the reads above return.
|
|
28714
|
+
* Reply-only, same admin requirement as the reads.
|
|
28260
28715
|
*/
|
|
28261
28716
|
|
|
28262
28717
|
type CompanyProfile = paths["/v1/{account_id}/companies/{identifier}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -28272,6 +28727,8 @@ type CompanyFollowerListPage = paths["/v1/{account_id}/companies/{identifier}/fo
|
|
|
28272
28727
|
type CompanyFollowerListQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/followers"]["get"]["parameters"]["query"]>;
|
|
28273
28728
|
type CompanyInvitableFollowerListPage = paths["/v1/{account_id}/companies/{identifier}/invitable-followers"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28274
28729
|
type CompanyInvitableFollowerListQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/invitable-followers"]["get"]["parameters"]["query"]>;
|
|
28730
|
+
type CompanyFollowInviteBody = paths["/v1/{account_id}/companies/{identifier}/follow-invite"]["post"]["requestBody"]["content"]["application/json"];
|
|
28731
|
+
type CompanyFollowInviteResult = paths["/v1/{account_id}/companies/{identifier}/follow-invite"]["post"]["responses"]["200"]["content"]["application/json"];
|
|
28275
28732
|
type CompanyChatListPage = paths["/v1/{account_id}/companies/{identifier}/chats"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28276
28733
|
type CompanyChatListQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/chats"]["get"]["parameters"]["query"]>;
|
|
28277
28734
|
type CompanyChat = paths["/v1/{account_id}/companies/{identifier}/chats/{chat_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -28280,6 +28737,8 @@ type CompanyChatMessageListQuery = NonNullable<paths["/v1/{account_id}/companies
|
|
|
28280
28737
|
type CompanyChatMessage = paths["/v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages/{message_id}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28281
28738
|
type CompanyChatSearchPage = paths["/v1/{account_id}/companies/{identifier}/chats/search"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
28282
28739
|
type CompanyChatSearchQuery = NonNullable<paths["/v1/{account_id}/companies/{identifier}/chats/search"]["get"]["parameters"]["query"]>;
|
|
28740
|
+
type CompanySendMessageBody = paths["/v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages"]["post"]["requestBody"]["content"]["application/json"];
|
|
28741
|
+
type CompanySendMessageResult = paths["/v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages"]["post"]["responses"]["201"]["content"]["application/json"];
|
|
28283
28742
|
declare class CompaniesResource {
|
|
28284
28743
|
protected readonly ctx: RequestContext;
|
|
28285
28744
|
constructor(ctx: RequestContext);
|
|
@@ -28345,6 +28804,20 @@ declare class CompaniesResource {
|
|
|
28345
28804
|
* currently invitable.
|
|
28346
28805
|
*/
|
|
28347
28806
|
invitableFollowers(identifier: string, params?: CompanyInvitableFollowerListQuery): Promise<CompanyInvitableFollowerListPage>;
|
|
28807
|
+
/**
|
|
28808
|
+
* Invite the connected account's 1st-degree connections to follow the
|
|
28809
|
+
* company page. `POST /v1/{account_id}/companies/{identifier}/follow-invite`
|
|
28810
|
+
*
|
|
28811
|
+
* The account must administer the page with the invite-to-follow
|
|
28812
|
+
* entitlement (see `managed()`). `identifier` must be the company's numeric
|
|
28813
|
+
* provider_id. Pass the `AC…` member ids from an `invitableFollowers()`
|
|
28814
|
+
* read. All-or-nothing: for an all-valid request, resolves to one outcome
|
|
28815
|
+
* per requested invitee, in request order. If any invitee id is invalid,
|
|
28816
|
+
* the whole request rejects with a 404, not a partial result.
|
|
28817
|
+
* Re-inviting an already-invited member is a safe no-op, the same
|
|
28818
|
+
* invitation id, never a duplicate.
|
|
28819
|
+
*/
|
|
28820
|
+
followInvite(identifier: string, body: CompanyFollowInviteBody): Promise<CompanyFollowInviteResult>;
|
|
28348
28821
|
/**
|
|
28349
28822
|
* List the conversations in a company page's admin message inbox,
|
|
28350
28823
|
* newest-activity-first.
|
|
@@ -28389,6 +28862,42 @@ declare class CompaniesResource {
|
|
|
28389
28862
|
* administer the page. Beta — see `chats()`.
|
|
28390
28863
|
*/
|
|
28391
28864
|
searchChats(identifier: string, params?: CompanyChatSearchQuery): Promise<CompanyChatSearchPage>;
|
|
28865
|
+
/**
|
|
28866
|
+
* Reply to a company-inbox conversation, AS THE PAGE.
|
|
28867
|
+
* `POST /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
28868
|
+
*
|
|
28869
|
+
* `chatId` must be the send-ready `COMPANY_` chat id, not the `2-…` id
|
|
28870
|
+
* `chats()`/`chat()`/`searchChats()` return. Get the `COMPANY_` id from
|
|
28871
|
+
* `inboxes.listChats()` (`GET /v1/{account_id}/inboxes/{inbox_id}/chats`).
|
|
28872
|
+
* A `2-…` or personal chat id is rejected with a guiding 400 that names
|
|
28873
|
+
* the required form and its source.
|
|
28874
|
+
*
|
|
28875
|
+
* Reply-only: this method can only answer an existing conversation, it
|
|
28876
|
+
* cannot start a new one on the page's behalf. The connected account
|
|
28877
|
+
* must administer the page (`managed()`). `attachments[]`, when
|
|
28878
|
+
* supplied, carry base64-encoded file bytes, always sent as JSON, never
|
|
28879
|
+
* multipart. At least one of `text`/`attachments` is required (enforced
|
|
28880
|
+
* server-side). Message content passes through verbatim and is never
|
|
28881
|
+
* stored.
|
|
28882
|
+
*
|
|
28883
|
+
* The response echoes `sent_as`, the acting identity actually used:
|
|
28884
|
+
* `{ kind: "company", company_id, name }` (`company_id` is `null` when
|
|
28885
|
+
* the page could not be correlated to a managed page on Curviate).
|
|
28886
|
+
*
|
|
28887
|
+
* @example
|
|
28888
|
+
* const acc = curviate.account("acc_YOUR_ACCOUNT_ID");
|
|
28889
|
+
* const { items: inboxes } = await acc.inboxes.list({ kind: "company" });
|
|
28890
|
+
* const pageInbox = inboxes[0]!; // e.g. id "COMPANY_83734124_PRIMARY"
|
|
28891
|
+
*
|
|
28892
|
+
* const { items: chats } = await acc.inboxes.listChats(pageInbox.id);
|
|
28893
|
+
* const chatId = chats[0]!.id as string; // e.g. "COMPANY_83734124_2-YTQ3ODU3Njgt"
|
|
28894
|
+
*
|
|
28895
|
+
* const result = await acc.companies.sendMessage("112013061", chatId, {
|
|
28896
|
+
* text: "Thanks for reaching out, happy to help!",
|
|
28897
|
+
* });
|
|
28898
|
+
* console.log(result.sent_as); // { kind: "company", company_id: "112013061", name: "RedHire" }
|
|
28899
|
+
*/
|
|
28900
|
+
sendMessage(identifier: string, chatId: string, body: CompanySendMessageBody): Promise<CompanySendMessageResult>;
|
|
28392
28901
|
}
|
|
28393
28902
|
|
|
28394
28903
|
/**
|