@curviate/sdk 0.18.0 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/dist/index.d.ts +10 -14
- package/dist/index.js +6 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,17 @@ Versioning: semantic — minor for additive changes, patch for bug fixes; no sta
|
|
|
9
9
|
|
|
10
10
|
## [Unreleased]
|
|
11
11
|
|
|
12
|
+
## [0.18.1] — 2026-07-18
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- **`companies.sendMessage(identifier, chatId, body)`** now takes the normal `2-…`
|
|
17
|
+
chat id that `companies.chats()` / `chat()` / `searchChats()` return; the endpoint
|
|
18
|
+
resolves the page mailbox internally from `identifier`. The previous send-ready
|
|
19
|
+
`COMPANY_` chat-id requirement is gone: pass the id straight from the company chat
|
|
20
|
+
reads. Method signature and response shape are unchanged (documentation/behavior
|
|
21
|
+
only).
|
|
22
|
+
|
|
12
23
|
## [0.18.0] — 2026-07-17
|
|
13
24
|
|
|
14
25
|
### Added
|
package/dist/index.d.ts
CHANGED
|
@@ -28709,9 +28709,10 @@ declare class JobsResource {
|
|
|
28709
28709
|
* busier inbox.
|
|
28710
28710
|
*
|
|
28711
28711
|
* `sendMessage()` is the inbox's one write: reply to an existing
|
|
28712
|
-
* conversation AS THE PAGE. It
|
|
28713
|
-
*
|
|
28714
|
-
* Reply-only, same admin
|
|
28712
|
+
* conversation AS THE PAGE. It takes the same `2-…` chat id that
|
|
28713
|
+
* `chats()` / `searchChats()` return; the endpoint resolves the page
|
|
28714
|
+
* mailbox internally from `identifier`. Reply-only, same admin
|
|
28715
|
+
* requirement as the reads.
|
|
28715
28716
|
*/
|
|
28716
28717
|
|
|
28717
28718
|
type CompanyProfile = paths["/v1/{account_id}/companies/{identifier}"]["get"]["responses"]["200"]["content"]["application/json"];
|
|
@@ -28866,11 +28867,10 @@ declare class CompaniesResource {
|
|
|
28866
28867
|
* Reply to a company-inbox conversation, AS THE PAGE.
|
|
28867
28868
|
* `POST /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
28868
28869
|
*
|
|
28869
|
-
* `chatId`
|
|
28870
|
-
* `
|
|
28871
|
-
*
|
|
28872
|
-
*
|
|
28873
|
-
* the required form and its source.
|
|
28870
|
+
* `chatId` is the `2-…` conversation id that `chats()` / `chat()` /
|
|
28871
|
+
* `searchChats()` return for this page. The endpoint resolves the page
|
|
28872
|
+
* mailbox internally from `identifier`, so no special send-ready id is
|
|
28873
|
+
* needed: pass the id straight from the company chat reads.
|
|
28874
28874
|
*
|
|
28875
28875
|
* Reply-only: this method can only answer an existing conversation, it
|
|
28876
28876
|
* cannot start a new one on the page's behalf. The connected account
|
|
@@ -28886,13 +28886,9 @@ declare class CompaniesResource {
|
|
|
28886
28886
|
*
|
|
28887
28887
|
* @example
|
|
28888
28888
|
* const acc = curviate.account("acc_YOUR_ACCOUNT_ID");
|
|
28889
|
-
* const { items:
|
|
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"
|
|
28889
|
+
* const { items: chats } = await acc.companies.chats("112013061");
|
|
28894
28890
|
*
|
|
28895
|
-
* const result = await acc.companies.sendMessage("112013061",
|
|
28891
|
+
* const result = await acc.companies.sendMessage("112013061", chats[0]!.id, {
|
|
28896
28892
|
* text: "Thanks for reaching out, happy to help!",
|
|
28897
28893
|
* });
|
|
28898
28894
|
* console.log(result.sent_as); // { kind: "company", company_id: "112013061", name: "RedHire" }
|
package/dist/index.js
CHANGED
|
@@ -2375,11 +2375,10 @@ var CompaniesResource = class {
|
|
|
2375
2375
|
* Reply to a company-inbox conversation, AS THE PAGE.
|
|
2376
2376
|
* `POST /v1/{account_id}/companies/{identifier}/chats/{chat_id}/messages`
|
|
2377
2377
|
*
|
|
2378
|
-
* `chatId`
|
|
2379
|
-
* `
|
|
2380
|
-
*
|
|
2381
|
-
*
|
|
2382
|
-
* the required form and its source.
|
|
2378
|
+
* `chatId` is the `2-…` conversation id that `chats()` / `chat()` /
|
|
2379
|
+
* `searchChats()` return for this page. The endpoint resolves the page
|
|
2380
|
+
* mailbox internally from `identifier`, so no special send-ready id is
|
|
2381
|
+
* needed: pass the id straight from the company chat reads.
|
|
2383
2382
|
*
|
|
2384
2383
|
* Reply-only: this method can only answer an existing conversation, it
|
|
2385
2384
|
* cannot start a new one on the page's behalf. The connected account
|
|
@@ -2395,13 +2394,9 @@ var CompaniesResource = class {
|
|
|
2395
2394
|
*
|
|
2396
2395
|
* @example
|
|
2397
2396
|
* const acc = curviate.account("acc_YOUR_ACCOUNT_ID");
|
|
2398
|
-
* const { items:
|
|
2399
|
-
* const pageInbox = inboxes[0]!; // e.g. id "COMPANY_83734124_PRIMARY"
|
|
2400
|
-
*
|
|
2401
|
-
* const { items: chats } = await acc.inboxes.listChats(pageInbox.id);
|
|
2402
|
-
* const chatId = chats[0]!.id as string; // e.g. "COMPANY_83734124_2-YTQ3ODU3Njgt"
|
|
2397
|
+
* const { items: chats } = await acc.companies.chats("112013061");
|
|
2403
2398
|
*
|
|
2404
|
-
* const result = await acc.companies.sendMessage("112013061",
|
|
2399
|
+
* const result = await acc.companies.sendMessage("112013061", chats[0]!.id, {
|
|
2405
2400
|
* text: "Thanks for reaching out, happy to help!",
|
|
2406
2401
|
* });
|
|
2407
2402
|
* console.log(result.sent_as); // { kind: "company", company_id: "112013061", name: "RedHire" }
|