agentphone 1.0.2 → 1.0.3

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.
Files changed (158) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +6 -0
  3. package/dist/cjs/Client.js +18 -8
  4. package/dist/cjs/api/resources/agentWebhooks/client/Client.d.ts +1 -1
  5. package/dist/cjs/api/resources/agentWebhooks/client/Client.js +1 -1
  6. package/dist/cjs/api/resources/agents/client/Client.d.ts +20 -2
  7. package/dist/cjs/api/resources/agents/client/Client.js +56 -2
  8. package/dist/cjs/api/resources/agents/client/requests/CreateAgentRequest.d.ts +1 -0
  9. package/dist/cjs/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.d.ts +11 -0
  10. package/dist/cjs/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.js +3 -0
  11. package/dist/cjs/api/resources/agents/client/requests/UpdateAgentRequest.d.ts +1 -0
  12. package/dist/cjs/api/resources/agents/client/requests/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/calls/client/Client.d.ts +27 -3
  14. package/dist/cjs/api/resources/calls/client/Client.js +68 -4
  15. package/dist/cjs/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.ts +8 -0
  16. package/dist/cjs/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.d.ts +9 -0
  17. package/dist/cjs/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.js +3 -0
  18. package/dist/cjs/api/resources/calls/client/requests/index.d.ts +1 -0
  19. package/dist/cjs/api/resources/contacts/client/Client.d.ts +94 -0
  20. package/dist/cjs/api/resources/contacts/client/Client.js +341 -0
  21. package/dist/cjs/api/resources/contacts/client/index.d.ts +1 -0
  22. package/dist/cjs/api/resources/contacts/client/index.js +17 -0
  23. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.d.ts +13 -0
  24. package/dist/cjs/api/resources/contacts/client/requests/CreateContactRequest.js +3 -0
  25. package/dist/cjs/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.d.ts +9 -0
  26. package/dist/cjs/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.js +3 -0
  27. package/dist/cjs/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.d.ts +9 -0
  28. package/dist/cjs/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.js +3 -0
  29. package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.ts +9 -0
  30. package/dist/cjs/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.js +3 -0
  31. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.d.ts +13 -0
  32. package/dist/cjs/api/resources/contacts/client/requests/UpdateContactRequest.js +3 -0
  33. package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +5 -0
  34. package/dist/cjs/api/resources/contacts/client/requests/index.js +2 -0
  35. package/dist/cjs/api/resources/contacts/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/contacts/index.js +17 -0
  37. package/dist/cjs/api/resources/conversations/client/Client.d.ts +1 -1
  38. package/dist/cjs/api/resources/conversations/client/Client.js +1 -1
  39. package/dist/cjs/api/resources/index.d.ts +4 -0
  40. package/dist/cjs/api/resources/index.js +5 -1
  41. package/dist/cjs/api/resources/messages/client/Client.d.ts +49 -0
  42. package/dist/cjs/api/resources/messages/client/Client.js +183 -0
  43. package/dist/cjs/api/resources/messages/client/index.d.ts +1 -0
  44. package/dist/cjs/api/resources/messages/client/index.js +17 -0
  45. package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.d.ts +15 -0
  46. package/dist/cjs/api/resources/messages/client/requests/SendMessageRequest.js +3 -0
  47. package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.d.ts +11 -0
  48. package/dist/cjs/api/resources/messages/client/requests/SendReactionRequest.js +3 -0
  49. package/dist/cjs/api/resources/messages/client/requests/index.d.ts +2 -0
  50. package/dist/cjs/api/resources/messages/client/requests/index.js +2 -0
  51. package/dist/cjs/api/resources/messages/index.d.ts +1 -0
  52. package/dist/cjs/api/resources/messages/index.js +17 -0
  53. package/dist/cjs/api/resources/numbers/client/Client.d.ts +1 -1
  54. package/dist/cjs/api/resources/numbers/client/Client.js +1 -1
  55. package/dist/cjs/api/resources/usage/client/Client.d.ts +1 -1
  56. package/dist/cjs/api/resources/usage/client/Client.js +1 -1
  57. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +6 -6
  58. package/dist/cjs/api/resources/webhooks/client/Client.js +6 -6
  59. package/dist/cjs/api/types/AgentNumberResponse.d.ts +1 -0
  60. package/dist/cjs/api/types/AgentResponse.d.ts +1 -0
  61. package/dist/cjs/api/types/CallSummary.d.ts +1 -1
  62. package/dist/cjs/api/types/ContactListResponse.d.ts +6 -0
  63. package/dist/cjs/api/types/ContactListResponse.js +3 -0
  64. package/dist/cjs/api/types/ContactResponse.d.ts +9 -0
  65. package/dist/cjs/api/types/ContactResponse.js +3 -0
  66. package/dist/cjs/api/types/MessageInConversation.d.ts +2 -0
  67. package/dist/cjs/api/types/MessageResponse.d.ts +2 -0
  68. package/dist/cjs/api/types/PhoneNumberResponse.d.ts +1 -0
  69. package/dist/cjs/api/types/SendMessageResponse.d.ts +7 -0
  70. package/dist/cjs/api/types/SendMessageResponse.js +3 -0
  71. package/dist/cjs/api/types/SendReactionResponse.d.ts +6 -0
  72. package/dist/cjs/api/types/SendReactionResponse.js +3 -0
  73. package/dist/cjs/api/types/WebhookCreateRequest.d.ts +1 -0
  74. package/dist/cjs/api/types/WebhookResponse.d.ts +1 -0
  75. package/dist/cjs/api/types/index.d.ts +4 -0
  76. package/dist/cjs/api/types/index.js +4 -0
  77. package/dist/cjs/version.d.ts +1 -1
  78. package/dist/cjs/version.js +1 -1
  79. package/dist/esm/BaseClient.mjs +2 -2
  80. package/dist/esm/Client.d.mts +6 -0
  81. package/dist/esm/Client.mjs +10 -0
  82. package/dist/esm/api/resources/agentWebhooks/client/Client.d.mts +1 -1
  83. package/dist/esm/api/resources/agentWebhooks/client/Client.mjs +1 -1
  84. package/dist/esm/api/resources/agents/client/Client.d.mts +20 -2
  85. package/dist/esm/api/resources/agents/client/Client.mjs +56 -2
  86. package/dist/esm/api/resources/agents/client/requests/CreateAgentRequest.d.mts +1 -0
  87. package/dist/esm/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.d.mts +11 -0
  88. package/dist/esm/api/resources/agents/client/requests/DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest.mjs +2 -0
  89. package/dist/esm/api/resources/agents/client/requests/UpdateAgentRequest.d.mts +1 -0
  90. package/dist/esm/api/resources/agents/client/requests/index.d.mts +1 -0
  91. package/dist/esm/api/resources/calls/client/Client.d.mts +27 -3
  92. package/dist/esm/api/resources/calls/client/Client.mjs +68 -4
  93. package/dist/esm/api/resources/calls/client/requests/ListCallsV1CallsGetRequest.d.mts +8 -0
  94. package/dist/esm/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.d.mts +9 -0
  95. package/dist/esm/api/resources/calls/client/requests/StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest.mjs +2 -0
  96. package/dist/esm/api/resources/calls/client/requests/index.d.mts +1 -0
  97. package/dist/esm/api/resources/contacts/client/Client.d.mts +94 -0
  98. package/dist/esm/api/resources/contacts/client/Client.mjs +304 -0
  99. package/dist/esm/api/resources/contacts/client/index.d.mts +1 -0
  100. package/dist/esm/api/resources/contacts/client/index.mjs +1 -0
  101. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.d.mts +13 -0
  102. package/dist/esm/api/resources/contacts/client/requests/CreateContactRequest.mjs +2 -0
  103. package/dist/esm/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.d.mts +9 -0
  104. package/dist/esm/api/resources/contacts/client/requests/DeleteContactV1ContactsContactIdDeleteRequest.mjs +2 -0
  105. package/dist/esm/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.d.mts +9 -0
  106. package/dist/esm/api/resources/contacts/client/requests/GetContactV1ContactsContactIdGetRequest.mjs +2 -0
  107. package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.d.mts +9 -0
  108. package/dist/esm/api/resources/contacts/client/requests/ListContactsV1ContactsGetRequest.mjs +2 -0
  109. package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.d.mts +13 -0
  110. package/dist/esm/api/resources/contacts/client/requests/UpdateContactRequest.mjs +2 -0
  111. package/dist/esm/api/resources/contacts/client/requests/index.d.mts +5 -0
  112. package/dist/esm/api/resources/contacts/client/requests/index.mjs +1 -0
  113. package/dist/esm/api/resources/contacts/index.d.mts +1 -0
  114. package/dist/esm/api/resources/contacts/index.mjs +1 -0
  115. package/dist/esm/api/resources/conversations/client/Client.d.mts +1 -1
  116. package/dist/esm/api/resources/conversations/client/Client.mjs +1 -1
  117. package/dist/esm/api/resources/index.d.mts +4 -0
  118. package/dist/esm/api/resources/index.mjs +4 -0
  119. package/dist/esm/api/resources/messages/client/Client.d.mts +49 -0
  120. package/dist/esm/api/resources/messages/client/Client.mjs +146 -0
  121. package/dist/esm/api/resources/messages/client/index.d.mts +1 -0
  122. package/dist/esm/api/resources/messages/client/index.mjs +1 -0
  123. package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.d.mts +15 -0
  124. package/dist/esm/api/resources/messages/client/requests/SendMessageRequest.mjs +2 -0
  125. package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.d.mts +11 -0
  126. package/dist/esm/api/resources/messages/client/requests/SendReactionRequest.mjs +2 -0
  127. package/dist/esm/api/resources/messages/client/requests/index.d.mts +2 -0
  128. package/dist/esm/api/resources/messages/client/requests/index.mjs +1 -0
  129. package/dist/esm/api/resources/messages/index.d.mts +1 -0
  130. package/dist/esm/api/resources/messages/index.mjs +1 -0
  131. package/dist/esm/api/resources/numbers/client/Client.d.mts +1 -1
  132. package/dist/esm/api/resources/numbers/client/Client.mjs +1 -1
  133. package/dist/esm/api/resources/usage/client/Client.d.mts +1 -1
  134. package/dist/esm/api/resources/usage/client/Client.mjs +1 -1
  135. package/dist/esm/api/resources/webhooks/client/Client.d.mts +6 -6
  136. package/dist/esm/api/resources/webhooks/client/Client.mjs +6 -6
  137. package/dist/esm/api/types/AgentNumberResponse.d.mts +1 -0
  138. package/dist/esm/api/types/AgentResponse.d.mts +1 -0
  139. package/dist/esm/api/types/CallSummary.d.mts +1 -1
  140. package/dist/esm/api/types/ContactListResponse.d.mts +6 -0
  141. package/dist/esm/api/types/ContactListResponse.mjs +2 -0
  142. package/dist/esm/api/types/ContactResponse.d.mts +9 -0
  143. package/dist/esm/api/types/ContactResponse.mjs +2 -0
  144. package/dist/esm/api/types/MessageInConversation.d.mts +2 -0
  145. package/dist/esm/api/types/MessageResponse.d.mts +2 -0
  146. package/dist/esm/api/types/PhoneNumberResponse.d.mts +1 -0
  147. package/dist/esm/api/types/SendMessageResponse.d.mts +7 -0
  148. package/dist/esm/api/types/SendMessageResponse.mjs +2 -0
  149. package/dist/esm/api/types/SendReactionResponse.d.mts +6 -0
  150. package/dist/esm/api/types/SendReactionResponse.mjs +2 -0
  151. package/dist/esm/api/types/WebhookCreateRequest.d.mts +1 -0
  152. package/dist/esm/api/types/WebhookResponse.d.mts +1 -0
  153. package/dist/esm/api/types/index.d.mts +4 -0
  154. package/dist/esm/api/types/index.mjs +4 -0
  155. package/dist/esm/version.d.mts +1 -1
  156. package/dist/esm/version.mjs +1 -1
  157. package/package.json +1 -1
  158. package/reference.md +737 -126
package/reference.md CHANGED
@@ -12,7 +12,7 @@
12
12
  <dl>
13
13
  <dd>
14
14
 
15
- List all agents for this project.
15
+ List all agents for this account.
16
16
  </dd>
17
17
  </dl>
18
18
  </dd>
@@ -349,7 +349,7 @@ await client.agents.updateAgent({
349
349
 
350
350
  Attach an existing phone number to an agent.
351
351
 
352
- The number must belong to the same project and not be released.
352
+ The number must belong to the same account and not be released.
353
353
  </dd>
354
354
  </dl>
355
355
  </dd>
@@ -399,6 +399,74 @@ await client.agents.attachNumberToAgent({
399
399
  </dl>
400
400
 
401
401
 
402
+ </dd>
403
+ </dl>
404
+ </details>
405
+
406
+ <details><summary><code>client.agents.<a href="/src/api/resources/agents/client/Client.ts">detachNumberFromAgent</a>({ ...params }) -> unknown</code></summary>
407
+ <dl>
408
+ <dd>
409
+
410
+ #### 📝 Description
411
+
412
+ <dl>
413
+ <dd>
414
+
415
+ <dl>
416
+ <dd>
417
+
418
+ Detach a phone number from an agent (sets agentId to null).
419
+
420
+ The number remains active and can be re-attached to any agent.
421
+ </dd>
422
+ </dl>
423
+ </dd>
424
+ </dl>
425
+
426
+ #### 🔌 Usage
427
+
428
+ <dl>
429
+ <dd>
430
+
431
+ <dl>
432
+ <dd>
433
+
434
+ ```typescript
435
+ await client.agents.detachNumberFromAgent({
436
+ agent_id: "agent_id",
437
+ number_id: "number_id"
438
+ });
439
+
440
+ ```
441
+ </dd>
442
+ </dl>
443
+ </dd>
444
+ </dl>
445
+
446
+ #### ⚙️ Parameters
447
+
448
+ <dl>
449
+ <dd>
450
+
451
+ <dl>
452
+ <dd>
453
+
454
+ **request:** `AgentPhone.DetachNumberFromAgentV1AgentsAgentIdNumbersNumberIdDeleteRequest`
455
+
456
+ </dd>
457
+ </dl>
458
+
459
+ <dl>
460
+ <dd>
461
+
462
+ **requestOptions:** `AgentsClient.RequestOptions`
463
+
464
+ </dd>
465
+ </dl>
466
+ </dd>
467
+ </dl>
468
+
469
+
402
470
  </dd>
403
471
  </dl>
404
472
  </details>
@@ -546,7 +614,7 @@ await client.agents.listAgentCalls({
546
614
  <dl>
547
615
  <dd>
548
616
 
549
- List all phone numbers for this project.
617
+ List all phone numbers for this account.
550
618
  </dd>
551
619
  </dl>
552
620
  </dd>
@@ -818,7 +886,7 @@ await client.numbers.deleteNumber({
818
886
  <dl>
819
887
  <dd>
820
888
 
821
- Get the master webhook configuration for this project.
889
+ Get the master webhook configuration for this account.
822
890
  </dd>
823
891
  </dl>
824
892
  </dd>
@@ -873,7 +941,7 @@ await client.webhooks.getWebhook();
873
941
  <dl>
874
942
  <dd>
875
943
 
876
- Register or update the webhook URL for this project.
944
+ Register or update the webhook URL for this account.
877
945
 
878
946
  If a webhook already exists, it will be updated.
879
947
  A new secret is generated each time.
@@ -944,7 +1012,7 @@ await client.webhooks.createOrUpdateWebhook({
944
1012
  <dl>
945
1013
  <dd>
946
1014
 
947
- Remove the master webhook for this project.
1015
+ Remove the master webhook for this account.
948
1016
  </dd>
949
1017
  </dl>
950
1018
  </dd>
@@ -999,7 +1067,7 @@ await client.webhooks.deleteWebhook();
999
1067
  <dl>
1000
1068
  <dd>
1001
1069
 
1002
- Get paginated webhook delivery attempts for all project webhooks.
1070
+ Get paginated webhook delivery attempts for all account webhooks.
1003
1071
  </dd>
1004
1072
  </dl>
1005
1073
  </dd>
@@ -1062,7 +1130,7 @@ await client.webhooks.listDeliveries();
1062
1130
  <dl>
1063
1131
  <dd>
1064
1132
 
1065
- Aggregated delivery stats for the project's webhooks over the last N hours.
1133
+ Aggregated delivery stats for the account's webhooks over the last N hours.
1066
1134
  </dd>
1067
1135
  </dl>
1068
1136
  </dd>
@@ -1184,7 +1252,7 @@ Send a test webhook to verify the endpoint is working.
1184
1252
 
1185
1253
  Sends a fake message payload to the configured URL.
1186
1254
  Pass ?agentId=... to control which agent appears in the payload;
1187
- otherwise the first agent in the project is used.
1255
+ otherwise the first agent in the account is used.
1188
1256
  </dd>
1189
1257
  </dl>
1190
1258
  </dd>
@@ -1315,7 +1383,7 @@ await client.agentWebhooks.getAgentWebhook({
1315
1383
 
1316
1384
  Register or update a webhook URL for a specific agent.
1317
1385
 
1318
- When set, this agent's events are delivered here instead of the project default webhook.
1386
+ When set, this agent's events are delivered here instead of the account default webhook.
1319
1387
  </dd>
1320
1388
  </dl>
1321
1389
  </dd>
@@ -1566,8 +1634,8 @@ await client.agentWebhooks.testAgentWebhook({
1566
1634
  </dl>
1567
1635
  </details>
1568
1636
 
1569
- ## Conversations
1570
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">listConversations</a>({ ...params }) -> AgentPhone.AppRoutesConversationsConversationListResponse</code></summary>
1637
+ ## Contacts
1638
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">listContacts</a>({ ...params }) -> AgentPhone.ContactListResponse</code></summary>
1571
1639
  <dl>
1572
1640
  <dd>
1573
1641
 
@@ -1579,9 +1647,9 @@ await client.agentWebhooks.testAgentWebhook({
1579
1647
  <dl>
1580
1648
  <dd>
1581
1649
 
1582
- List all conversations for this project.
1650
+ List all contacts for this account.
1583
1651
 
1584
- Sorted by most recent activity (lastMessageAt desc).
1652
+ Optional `search` query filters by name or phone number (case-insensitive contains).
1585
1653
  </dd>
1586
1654
  </dl>
1587
1655
  </dd>
@@ -1596,7 +1664,7 @@ Sorted by most recent activity (lastMessageAt desc).
1596
1664
  <dd>
1597
1665
 
1598
1666
  ```typescript
1599
- await client.conversations.listConversations();
1667
+ await client.contacts.listContacts();
1600
1668
 
1601
1669
  ```
1602
1670
  </dd>
@@ -1612,7 +1680,7 @@ await client.conversations.listConversations();
1612
1680
  <dl>
1613
1681
  <dd>
1614
1682
 
1615
- **request:** `AgentPhone.ListConversationsV1ConversationsGetRequest`
1683
+ **request:** `AgentPhone.ListContactsV1ContactsGetRequest`
1616
1684
 
1617
1685
  </dd>
1618
1686
  </dl>
@@ -1620,7 +1688,7 @@ await client.conversations.listConversations();
1620
1688
  <dl>
1621
1689
  <dd>
1622
1690
 
1623
- **requestOptions:** `ConversationsClient.RequestOptions`
1691
+ **requestOptions:** `ContactsClient.RequestOptions`
1624
1692
 
1625
1693
  </dd>
1626
1694
  </dl>
@@ -1632,7 +1700,7 @@ await client.conversations.listConversations();
1632
1700
  </dl>
1633
1701
  </details>
1634
1702
 
1635
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
1703
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">createContact</a>({ ...params }) -> AgentPhone.ContactResponse</code></summary>
1636
1704
  <dl>
1637
1705
  <dd>
1638
1706
 
@@ -1644,7 +1712,10 @@ await client.conversations.listConversations();
1644
1712
  <dl>
1645
1713
  <dd>
1646
1714
 
1647
- Get a conversation with its recent messages.
1715
+ Create a new contact.
1716
+
1717
+ Phone number is normalized to E.164 format. Returns 409 if a contact
1718
+ with this phone number already exists for the project.
1648
1719
  </dd>
1649
1720
  </dl>
1650
1721
  </dd>
@@ -1659,8 +1730,9 @@ Get a conversation with its recent messages.
1659
1730
  <dd>
1660
1731
 
1661
1732
  ```typescript
1662
- await client.conversations.getConversation({
1663
- conversation_id: "conversation_id"
1733
+ await client.contacts.createContact({
1734
+ phoneNumber: "phoneNumber",
1735
+ name: "name"
1664
1736
  });
1665
1737
 
1666
1738
  ```
@@ -1677,7 +1749,7 @@ await client.conversations.getConversation({
1677
1749
  <dl>
1678
1750
  <dd>
1679
1751
 
1680
- **request:** `AgentPhone.GetConversationV1ConversationsConversationIdGetRequest`
1752
+ **request:** `AgentPhone.CreateContactRequest`
1681
1753
 
1682
1754
  </dd>
1683
1755
  </dl>
@@ -1685,7 +1757,7 @@ await client.conversations.getConversation({
1685
1757
  <dl>
1686
1758
  <dd>
1687
1759
 
1688
- **requestOptions:** `ConversationsClient.RequestOptions`
1760
+ **requestOptions:** `ContactsClient.RequestOptions`
1689
1761
 
1690
1762
  </dd>
1691
1763
  </dl>
@@ -1697,7 +1769,7 @@ await client.conversations.getConversation({
1697
1769
  </dl>
1698
1770
  </details>
1699
1771
 
1700
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">updateConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
1772
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">getContact</a>({ ...params }) -> AgentPhone.ContactResponse</code></summary>
1701
1773
  <dl>
1702
1774
  <dd>
1703
1775
 
@@ -1709,14 +1781,7 @@ await client.conversations.getConversation({
1709
1781
  <dl>
1710
1782
  <dd>
1711
1783
 
1712
- Update conversation metadata (state).
1713
-
1714
- Use this to store custom context for AI agents:
1715
- - Customer information (name, account ID)
1716
- - Business context (order ID, ticket number)
1717
- - Session state (current topic, preferences)
1718
-
1719
- The metadata is included in webhook payloads as `conversationState`.
1784
+ Get a single contact by ID.
1720
1785
  </dd>
1721
1786
  </dl>
1722
1787
  </dd>
@@ -1731,8 +1796,8 @@ The metadata is included in webhook payloads as `conversationState`.
1731
1796
  <dd>
1732
1797
 
1733
1798
  ```typescript
1734
- await client.conversations.updateConversation({
1735
- conversation_id: "conversation_id"
1799
+ await client.contacts.getContact({
1800
+ contact_id: "contact_id"
1736
1801
  });
1737
1802
 
1738
1803
  ```
@@ -1749,7 +1814,7 @@ await client.conversations.updateConversation({
1749
1814
  <dl>
1750
1815
  <dd>
1751
1816
 
1752
- **request:** `AgentPhone.UpdateConversationRequest`
1817
+ **request:** `AgentPhone.GetContactV1ContactsContactIdGetRequest`
1753
1818
 
1754
1819
  </dd>
1755
1820
  </dl>
@@ -1757,7 +1822,7 @@ await client.conversations.updateConversation({
1757
1822
  <dl>
1758
1823
  <dd>
1759
1824
 
1760
- **requestOptions:** `ConversationsClient.RequestOptions`
1825
+ **requestOptions:** `ContactsClient.RequestOptions`
1761
1826
 
1762
1827
  </dd>
1763
1828
  </dl>
@@ -1769,7 +1834,7 @@ await client.conversations.updateConversation({
1769
1834
  </dl>
1770
1835
  </details>
1771
1836
 
1772
- <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversationMessages</a>({ ...params }) -> AgentPhone.MessagesListResponse</code></summary>
1837
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">deleteContact</a>({ ...params }) -> void</code></summary>
1773
1838
  <dl>
1774
1839
  <dd>
1775
1840
 
@@ -1781,9 +1846,7 @@ await client.conversations.updateConversation({
1781
1846
  <dl>
1782
1847
  <dd>
1783
1848
 
1784
- Get paginated messages for a conversation.
1785
-
1786
- Use before/after for cursor-based pagination.
1849
+ Delete a contact.
1787
1850
  </dd>
1788
1851
  </dl>
1789
1852
  </dd>
@@ -1798,8 +1861,8 @@ Use before/after for cursor-based pagination.
1798
1861
  <dd>
1799
1862
 
1800
1863
  ```typescript
1801
- await client.conversations.getConversationMessages({
1802
- conversation_id: "conversation_id"
1864
+ await client.contacts.deleteContact({
1865
+ contact_id: "contact_id"
1803
1866
  });
1804
1867
 
1805
1868
  ```
@@ -1816,7 +1879,7 @@ await client.conversations.getConversationMessages({
1816
1879
  <dl>
1817
1880
  <dd>
1818
1881
 
1819
- **request:** `AgentPhone.GetConversationMessagesV1ConversationsConversationIdMessagesGetRequest`
1882
+ **request:** `AgentPhone.DeleteContactV1ContactsContactIdDeleteRequest`
1820
1883
 
1821
1884
  </dd>
1822
1885
  </dl>
@@ -1824,7 +1887,7 @@ await client.conversations.getConversationMessages({
1824
1887
  <dl>
1825
1888
  <dd>
1826
1889
 
1827
- **requestOptions:** `ConversationsClient.RequestOptions`
1890
+ **requestOptions:** `ContactsClient.RequestOptions`
1828
1891
 
1829
1892
  </dd>
1830
1893
  </dl>
@@ -1836,8 +1899,7 @@ await client.conversations.getConversationMessages({
1836
1899
  </dl>
1837
1900
  </details>
1838
1901
 
1839
- ## Calls
1840
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCalls</a>({ ...params }) -> unknown</code></summary>
1902
+ <details><summary><code>client.contacts.<a href="/src/api/resources/contacts/client/Client.ts">updateContact</a>({ ...params }) -> AgentPhone.ContactResponse</code></summary>
1841
1903
  <dl>
1842
1904
  <dd>
1843
1905
 
@@ -1849,7 +1911,9 @@ await client.conversations.getConversationMessages({
1849
1911
  <dl>
1850
1912
  <dd>
1851
1913
 
1852
- List all calls for this project.
1914
+ Update a contact's fields.
1915
+
1916
+ If phoneNumber is updated, it's re-normalized and checked for uniqueness (409 on conflict).
1853
1917
  </dd>
1854
1918
  </dl>
1855
1919
  </dd>
@@ -1864,7 +1928,9 @@ List all calls for this project.
1864
1928
  <dd>
1865
1929
 
1866
1930
  ```typescript
1867
- await client.calls.listCalls();
1931
+ await client.contacts.updateContact({
1932
+ contact_id: "contact_id"
1933
+ });
1868
1934
 
1869
1935
  ```
1870
1936
  </dd>
@@ -1880,7 +1946,7 @@ await client.calls.listCalls();
1880
1946
  <dl>
1881
1947
  <dd>
1882
1948
 
1883
- **request:** `AgentPhone.ListCallsV1CallsGetRequest`
1949
+ **request:** `AgentPhone.UpdateContactRequest`
1884
1950
 
1885
1951
  </dd>
1886
1952
  </dl>
@@ -1888,7 +1954,7 @@ await client.calls.listCalls();
1888
1954
  <dl>
1889
1955
  <dd>
1890
1956
 
1891
- **requestOptions:** `CallsClient.RequestOptions`
1957
+ **requestOptions:** `ContactsClient.RequestOptions`
1892
1958
 
1893
1959
  </dd>
1894
1960
  </dl>
@@ -1900,7 +1966,8 @@ await client.calls.listCalls();
1900
1966
  </dl>
1901
1967
  </details>
1902
1968
 
1903
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createOutboundCall</a>({ ...params }) -> unknown</code></summary>
1969
+ ## Conversations
1970
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">listConversations</a>({ ...params }) -> AgentPhone.AppRoutesConversationsConversationListResponse</code></summary>
1904
1971
  <dl>
1905
1972
  <dd>
1906
1973
 
@@ -1912,18 +1979,9 @@ await client.calls.listCalls();
1912
1979
  <dl>
1913
1980
  <dd>
1914
1981
 
1915
- Initiate an outbound call.
1916
-
1917
- This endpoint allows you to programmatically make phone calls from your agent
1918
- to any phone number. Use `fromNumberId` to pick which of the agent's numbers
1919
- to use as caller ID; if omitted, the first assigned number is used.
1982
+ List all conversations for this account.
1920
1983
 
1921
- Flow:
1922
- 1. Validates the agent belongs to your project and has a phone number
1923
- 2. Initiates a call from the agent's number to the destination
1924
- 3. When recipient answers, speaks the initial greeting (if provided)
1925
- 4. Listens for recipient's speech and sends to your webhook
1926
- 5. Continues conversation using your webhook responses
1984
+ Sorted by most recent activity (lastMessageAt desc).
1927
1985
  </dd>
1928
1986
  </dl>
1929
1987
  </dd>
@@ -1938,10 +1996,7 @@ Flow:
1938
1996
  <dd>
1939
1997
 
1940
1998
  ```typescript
1941
- await client.calls.createOutboundCall({
1942
- agentId: "agentId",
1943
- toNumber: "toNumber"
1944
- });
1999
+ await client.conversations.listConversations();
1945
2000
 
1946
2001
  ```
1947
2002
  </dd>
@@ -1957,7 +2012,7 @@ await client.calls.createOutboundCall({
1957
2012
  <dl>
1958
2013
  <dd>
1959
2014
 
1960
- **request:** `AgentPhone.CreateOutboundCallRequest`
2015
+ **request:** `AgentPhone.ListConversationsV1ConversationsGetRequest`
1961
2016
 
1962
2017
  </dd>
1963
2018
  </dl>
@@ -1965,7 +2020,7 @@ await client.calls.createOutboundCall({
1965
2020
  <dl>
1966
2021
  <dd>
1967
2022
 
1968
- **requestOptions:** `CallsClient.RequestOptions`
2023
+ **requestOptions:** `ConversationsClient.RequestOptions`
1969
2024
 
1970
2025
  </dd>
1971
2026
  </dl>
@@ -1977,7 +2032,7 @@ await client.calls.createOutboundCall({
1977
2032
  </dl>
1978
2033
  </details>
1979
2034
 
1980
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createWebCall</a>({ ...params }) -> unknown</code></summary>
2035
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
1981
2036
  <dl>
1982
2037
  <dd>
1983
2038
 
@@ -1989,17 +2044,7 @@ await client.calls.createOutboundCall({
1989
2044
  <dl>
1990
2045
  <dd>
1991
2046
 
1992
- Create a browser-based web call.
1993
-
1994
- Returns an access token that your frontend passes to the AgentPhone Web SDK
1995
- (`agentphone-web-sdk`) to start the call in the browser. The token
1996
- expires 30 seconds after creation.
1997
-
1998
- Flow:
1999
- 1. Validates the agent belongs to your project
2000
- 2. Creates a web call and returns an access token
2001
- 3. Your client calls `webClient.startCall({ accessToken })` to connect
2002
- 4. Call lifecycle (transcripts, webhooks) works the same as phone calls
2047
+ Get a conversation with its recent messages.
2003
2048
  </dd>
2004
2049
  </dl>
2005
2050
  </dd>
@@ -2014,8 +2059,8 @@ Flow:
2014
2059
  <dd>
2015
2060
 
2016
2061
  ```typescript
2017
- await client.calls.createWebCall({
2018
- agentId: "agentId"
2062
+ await client.conversations.getConversation({
2063
+ conversation_id: "conversation_id"
2019
2064
  });
2020
2065
 
2021
2066
  ```
@@ -2032,7 +2077,7 @@ await client.calls.createWebCall({
2032
2077
  <dl>
2033
2078
  <dd>
2034
2079
 
2035
- **request:** `AgentPhone.CreateWebCallRequest`
2080
+ **request:** `AgentPhone.GetConversationV1ConversationsConversationIdGetRequest`
2036
2081
 
2037
2082
  </dd>
2038
2083
  </dl>
@@ -2040,7 +2085,7 @@ await client.calls.createWebCall({
2040
2085
  <dl>
2041
2086
  <dd>
2042
2087
 
2043
- **requestOptions:** `CallsClient.RequestOptions`
2088
+ **requestOptions:** `ConversationsClient.RequestOptions`
2044
2089
 
2045
2090
  </dd>
2046
2091
  </dl>
@@ -2052,7 +2097,7 @@ await client.calls.createWebCall({
2052
2097
  </dl>
2053
2098
  </details>
2054
2099
 
2055
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCall</a>({ ...params }) -> unknown</code></summary>
2100
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">updateConversation</a>({ ...params }) -> AgentPhone.ConversationDetail</code></summary>
2056
2101
  <dl>
2057
2102
  <dd>
2058
2103
 
@@ -2064,7 +2109,14 @@ await client.calls.createWebCall({
2064
2109
  <dl>
2065
2110
  <dd>
2066
2111
 
2067
- Get a specific call with its transcripts.
2112
+ Update conversation metadata (state).
2113
+
2114
+ Use this to store custom context for AI agents:
2115
+ - Customer information (name, account ID)
2116
+ - Business context (order ID, ticket number)
2117
+ - Session state (current topic, preferences)
2118
+
2119
+ The metadata is included in webhook payloads as `conversationState`.
2068
2120
  </dd>
2069
2121
  </dl>
2070
2122
  </dd>
@@ -2079,8 +2131,8 @@ Get a specific call with its transcripts.
2079
2131
  <dd>
2080
2132
 
2081
2133
  ```typescript
2082
- await client.calls.getCall({
2083
- call_id: "call_id"
2134
+ await client.conversations.updateConversation({
2135
+ conversation_id: "conversation_id"
2084
2136
  });
2085
2137
 
2086
2138
  ```
@@ -2097,7 +2149,7 @@ await client.calls.getCall({
2097
2149
  <dl>
2098
2150
  <dd>
2099
2151
 
2100
- **request:** `AgentPhone.GetCallV1CallsCallIdGetRequest`
2152
+ **request:** `AgentPhone.UpdateConversationRequest`
2101
2153
 
2102
2154
  </dd>
2103
2155
  </dl>
@@ -2105,7 +2157,7 @@ await client.calls.getCall({
2105
2157
  <dl>
2106
2158
  <dd>
2107
2159
 
2108
- **requestOptions:** `CallsClient.RequestOptions`
2160
+ **requestOptions:** `ConversationsClient.RequestOptions`
2109
2161
 
2110
2162
  </dd>
2111
2163
  </dl>
@@ -2117,7 +2169,7 @@ await client.calls.getCall({
2117
2169
  </dl>
2118
2170
  </details>
2119
2171
 
2120
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCallTranscript</a>({ ...params }) -> unknown</code></summary>
2172
+ <details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">getConversationMessages</a>({ ...params }) -> AgentPhone.MessagesListResponse</code></summary>
2121
2173
  <dl>
2122
2174
  <dd>
2123
2175
 
@@ -2129,11 +2181,9 @@ await client.calls.getCall({
2129
2181
  <dl>
2130
2182
  <dd>
2131
2183
 
2132
- Get the full transcript for a call.
2184
+ Get paginated messages for a conversation.
2133
2185
 
2134
- Returns the complete, ordered transcript regardless of the webhook
2135
- contextLimit setting. Each entry contains the user utterance and
2136
- the corresponding agent response (when available).
2186
+ Use before/after for cursor-based pagination.
2137
2187
  </dd>
2138
2188
  </dl>
2139
2189
  </dd>
@@ -2148,8 +2198,8 @@ the corresponding agent response (when available).
2148
2198
  <dd>
2149
2199
 
2150
2200
  ```typescript
2151
- await client.calls.getCallTranscript({
2152
- call_id: "call_id"
2201
+ await client.conversations.getConversationMessages({
2202
+ conversation_id: "conversation_id"
2153
2203
  });
2154
2204
 
2155
2205
  ```
@@ -2166,7 +2216,7 @@ await client.calls.getCallTranscript({
2166
2216
  <dl>
2167
2217
  <dd>
2168
2218
 
2169
- **request:** `AgentPhone.GetCallTranscriptV1CallsCallIdTranscriptGetRequest`
2219
+ **request:** `AgentPhone.GetConversationMessagesV1ConversationsConversationIdMessagesGetRequest`
2170
2220
 
2171
2221
  </dd>
2172
2222
  </dl>
@@ -2174,7 +2224,7 @@ await client.calls.getCallTranscript({
2174
2224
  <dl>
2175
2225
  <dd>
2176
2226
 
2177
- **requestOptions:** `CallsClient.RequestOptions`
2227
+ **requestOptions:** `ConversationsClient.RequestOptions`
2178
2228
 
2179
2229
  </dd>
2180
2230
  </dl>
@@ -2186,7 +2236,8 @@ await client.calls.getCallTranscript({
2186
2236
  </dl>
2187
2237
  </details>
2188
2238
 
2189
- <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCallsForNumber</a>({ ...params }) -> unknown</code></summary>
2239
+ ## Calls
2240
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCalls</a>({ ...params }) -> unknown</code></summary>
2190
2241
  <dl>
2191
2242
  <dd>
2192
2243
 
@@ -2198,7 +2249,7 @@ await client.calls.getCallTranscript({
2198
2249
  <dl>
2199
2250
  <dd>
2200
2251
 
2201
- List all calls for a specific phone number.
2252
+ List all calls for this account.
2202
2253
  </dd>
2203
2254
  </dl>
2204
2255
  </dd>
@@ -2213,9 +2264,7 @@ List all calls for a specific phone number.
2213
2264
  <dd>
2214
2265
 
2215
2266
  ```typescript
2216
- await client.calls.listCallsForNumber({
2217
- number_id: "number_id"
2218
- });
2267
+ await client.calls.listCalls();
2219
2268
 
2220
2269
  ```
2221
2270
  </dd>
@@ -2231,7 +2280,7 @@ await client.calls.listCallsForNumber({
2231
2280
  <dl>
2232
2281
  <dd>
2233
2282
 
2234
- **request:** `AgentPhone.ListCallsForNumberV1NumbersNumberIdCallsGetRequest`
2283
+ **request:** `AgentPhone.ListCallsV1CallsGetRequest`
2235
2284
 
2236
2285
  </dd>
2237
2286
  </dl>
@@ -2251,8 +2300,7 @@ await client.calls.listCallsForNumber({
2251
2300
  </dl>
2252
2301
  </details>
2253
2302
 
2254
- ## Usage
2255
- <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getUsage</a>() -> AgentPhone.UsageResponse</code></summary>
2303
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createOutboundCall</a>({ ...params }) -> unknown</code></summary>
2256
2304
  <dl>
2257
2305
  <dd>
2258
2306
 
@@ -2264,13 +2312,18 @@ await client.calls.listCallsForNumber({
2264
2312
  <dl>
2265
2313
  <dd>
2266
2314
 
2267
- Get usage statistics for the current project.
2315
+ Initiate an outbound call.
2268
2316
 
2269
- Returns:
2270
- - Phone number limits (used/limit/remaining)
2271
- - Message statistics (total, last 24h, last 7 days, last 30 days)
2272
- - Call statistics (total, last 24h, last 7 days, last 30 days)
2273
- - Webhook delivery statistics
2317
+ This endpoint allows you to programmatically make phone calls from your agent
2318
+ to any phone number. Use `fromNumberId` to pick which of the agent's numbers
2319
+ to use as caller ID; if omitted, the first assigned number is used.
2320
+
2321
+ Flow:
2322
+ 1. Validates the agent belongs to your account and has a phone number
2323
+ 2. Initiates a call from the agent's number to the destination
2324
+ 3. When recipient answers, speaks the initial greeting (if provided)
2325
+ 4. Listens for recipient's speech and sends to your webhook
2326
+ 5. Continues conversation using your webhook responses
2274
2327
  </dd>
2275
2328
  </dl>
2276
2329
  </dd>
@@ -2285,7 +2338,10 @@ Returns:
2285
2338
  <dd>
2286
2339
 
2287
2340
  ```typescript
2288
- await client.usage.getUsage();
2341
+ await client.calls.createOutboundCall({
2342
+ agentId: "agentId",
2343
+ toNumber: "toNumber"
2344
+ });
2289
2345
 
2290
2346
  ```
2291
2347
  </dd>
@@ -2301,7 +2357,15 @@ await client.usage.getUsage();
2301
2357
  <dl>
2302
2358
  <dd>
2303
2359
 
2304
- **requestOptions:** `UsageClient.RequestOptions`
2360
+ **request:** `AgentPhone.CreateOutboundCallRequest`
2361
+
2362
+ </dd>
2363
+ </dl>
2364
+
2365
+ <dl>
2366
+ <dd>
2367
+
2368
+ **requestOptions:** `CallsClient.RequestOptions`
2305
2369
 
2306
2370
  </dd>
2307
2371
  </dl>
@@ -2313,7 +2377,7 @@ await client.usage.getUsage();
2313
2377
  </dl>
2314
2378
  </details>
2315
2379
 
2316
- <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getDailyUsage</a>({ ...params }) -> AgentPhone.DailyUsageResponse</code></summary>
2380
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">createWebCall</a>({ ...params }) -> unknown</code></summary>
2317
2381
  <dl>
2318
2382
  <dd>
2319
2383
 
@@ -2325,8 +2389,17 @@ await client.usage.getUsage();
2325
2389
  <dl>
2326
2390
  <dd>
2327
2391
 
2328
- Get daily usage breakdown for the last N days (up to 365).
2329
- Returns per-day counts of messages, calls, and webhook deliveries.
2392
+ Create a browser-based web call.
2393
+
2394
+ Returns an access token that your frontend passes to the AgentPhone Web SDK
2395
+ (`agentphone-web-sdk`) to start the call in the browser. The token
2396
+ expires 30 seconds after creation.
2397
+
2398
+ Flow:
2399
+ 1. Validates the agent belongs to your account
2400
+ 2. Creates a web call and returns an access token
2401
+ 3. Your client calls `webClient.startCall({ accessToken })` to connect
2402
+ 4. Call lifecycle (transcripts, webhooks) works the same as phone calls
2330
2403
  </dd>
2331
2404
  </dl>
2332
2405
  </dd>
@@ -2341,7 +2414,9 @@ Returns per-day counts of messages, calls, and webhook deliveries.
2341
2414
  <dd>
2342
2415
 
2343
2416
  ```typescript
2344
- await client.usage.getDailyUsage();
2417
+ await client.calls.createWebCall({
2418
+ agentId: "agentId"
2419
+ });
2345
2420
 
2346
2421
  ```
2347
2422
  </dd>
@@ -2357,7 +2432,7 @@ await client.usage.getDailyUsage();
2357
2432
  <dl>
2358
2433
  <dd>
2359
2434
 
2360
- **request:** `AgentPhone.GetDailyUsageV1UsageDailyGetRequest`
2435
+ **request:** `AgentPhone.CreateWebCallRequest`
2361
2436
 
2362
2437
  </dd>
2363
2438
  </dl>
@@ -2365,7 +2440,7 @@ await client.usage.getDailyUsage();
2365
2440
  <dl>
2366
2441
  <dd>
2367
2442
 
2368
- **requestOptions:** `UsageClient.RequestOptions`
2443
+ **requestOptions:** `CallsClient.RequestOptions`
2369
2444
 
2370
2445
  </dd>
2371
2446
  </dl>
@@ -2377,7 +2452,7 @@ await client.usage.getDailyUsage();
2377
2452
  </dl>
2378
2453
  </details>
2379
2454
 
2380
- <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getMonthlyUsage</a>({ ...params }) -> AgentPhone.MonthlyUsageResponse</code></summary>
2455
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCall</a>({ ...params }) -> unknown</code></summary>
2381
2456
  <dl>
2382
2457
  <dd>
2383
2458
 
@@ -2389,8 +2464,7 @@ await client.usage.getDailyUsage();
2389
2464
  <dl>
2390
2465
  <dd>
2391
2466
 
2392
- Get monthly usage aggregation for the last N months.
2393
- Returns per-month totals of messages, calls, and webhook deliveries.
2467
+ Get a specific call with its transcripts.
2394
2468
  </dd>
2395
2469
  </dl>
2396
2470
  </dd>
@@ -2405,8 +2479,408 @@ Returns per-month totals of messages, calls, and webhook deliveries.
2405
2479
  <dd>
2406
2480
 
2407
2481
  ```typescript
2408
- await client.usage.getMonthlyUsage();
2409
-
2482
+ await client.calls.getCall({
2483
+ call_id: "call_id"
2484
+ });
2485
+
2486
+ ```
2487
+ </dd>
2488
+ </dl>
2489
+ </dd>
2490
+ </dl>
2491
+
2492
+ #### ⚙️ Parameters
2493
+
2494
+ <dl>
2495
+ <dd>
2496
+
2497
+ <dl>
2498
+ <dd>
2499
+
2500
+ **request:** `AgentPhone.GetCallV1CallsCallIdGetRequest`
2501
+
2502
+ </dd>
2503
+ </dl>
2504
+
2505
+ <dl>
2506
+ <dd>
2507
+
2508
+ **requestOptions:** `CallsClient.RequestOptions`
2509
+
2510
+ </dd>
2511
+ </dl>
2512
+ </dd>
2513
+ </dl>
2514
+
2515
+
2516
+ </dd>
2517
+ </dl>
2518
+ </details>
2519
+
2520
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">getCallTranscript</a>({ ...params }) -> unknown</code></summary>
2521
+ <dl>
2522
+ <dd>
2523
+
2524
+ #### 📝 Description
2525
+
2526
+ <dl>
2527
+ <dd>
2528
+
2529
+ <dl>
2530
+ <dd>
2531
+
2532
+ Get the full transcript for a call.
2533
+
2534
+ Returns the complete, ordered transcript regardless of the webhook
2535
+ contextLimit setting. Each entry contains the user utterance and
2536
+ the corresponding agent response (when available).
2537
+ </dd>
2538
+ </dl>
2539
+ </dd>
2540
+ </dl>
2541
+
2542
+ #### 🔌 Usage
2543
+
2544
+ <dl>
2545
+ <dd>
2546
+
2547
+ <dl>
2548
+ <dd>
2549
+
2550
+ ```typescript
2551
+ await client.calls.getCallTranscript({
2552
+ call_id: "call_id"
2553
+ });
2554
+
2555
+ ```
2556
+ </dd>
2557
+ </dl>
2558
+ </dd>
2559
+ </dl>
2560
+
2561
+ #### ⚙️ Parameters
2562
+
2563
+ <dl>
2564
+ <dd>
2565
+
2566
+ <dl>
2567
+ <dd>
2568
+
2569
+ **request:** `AgentPhone.GetCallTranscriptV1CallsCallIdTranscriptGetRequest`
2570
+
2571
+ </dd>
2572
+ </dl>
2573
+
2574
+ <dl>
2575
+ <dd>
2576
+
2577
+ **requestOptions:** `CallsClient.RequestOptions`
2578
+
2579
+ </dd>
2580
+ </dl>
2581
+ </dd>
2582
+ </dl>
2583
+
2584
+
2585
+ </dd>
2586
+ </dl>
2587
+ </details>
2588
+
2589
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">streamCallTranscript</a>({ ...params }) -> unknown</code></summary>
2590
+ <dl>
2591
+ <dd>
2592
+
2593
+ #### 📝 Description
2594
+
2595
+ <dl>
2596
+ <dd>
2597
+
2598
+ <dl>
2599
+ <dd>
2600
+
2601
+ Stream a call's transcript via Server-Sent Events.
2602
+
2603
+ On connect the server replays all existing transcript turns from the
2604
+ database, then streams new turns in real time as they arrive from the
2605
+ voice provider. A ``: heartbeat`` comment is sent every 15 s to keep
2606
+ proxies alive. The stream closes after sending an ``ended`` event
2607
+ when the call completes (or immediately after replay if the call has
2608
+ already ended).
2609
+
2610
+ Works for both live and completed calls — same URL either way.
2611
+ </dd>
2612
+ </dl>
2613
+ </dd>
2614
+ </dl>
2615
+
2616
+ #### 🔌 Usage
2617
+
2618
+ <dl>
2619
+ <dd>
2620
+
2621
+ <dl>
2622
+ <dd>
2623
+
2624
+ ```typescript
2625
+ await client.calls.streamCallTranscript({
2626
+ call_id: "call_id"
2627
+ });
2628
+
2629
+ ```
2630
+ </dd>
2631
+ </dl>
2632
+ </dd>
2633
+ </dl>
2634
+
2635
+ #### ⚙️ Parameters
2636
+
2637
+ <dl>
2638
+ <dd>
2639
+
2640
+ <dl>
2641
+ <dd>
2642
+
2643
+ **request:** `AgentPhone.StreamCallTranscriptV1CallsCallIdTranscriptStreamGetRequest`
2644
+
2645
+ </dd>
2646
+ </dl>
2647
+
2648
+ <dl>
2649
+ <dd>
2650
+
2651
+ **requestOptions:** `CallsClient.RequestOptions`
2652
+
2653
+ </dd>
2654
+ </dl>
2655
+ </dd>
2656
+ </dl>
2657
+
2658
+
2659
+ </dd>
2660
+ </dl>
2661
+ </details>
2662
+
2663
+ <details><summary><code>client.calls.<a href="/src/api/resources/calls/client/Client.ts">listCallsForNumber</a>({ ...params }) -> unknown</code></summary>
2664
+ <dl>
2665
+ <dd>
2666
+
2667
+ #### 📝 Description
2668
+
2669
+ <dl>
2670
+ <dd>
2671
+
2672
+ <dl>
2673
+ <dd>
2674
+
2675
+ List all calls for a specific phone number.
2676
+ </dd>
2677
+ </dl>
2678
+ </dd>
2679
+ </dl>
2680
+
2681
+ #### 🔌 Usage
2682
+
2683
+ <dl>
2684
+ <dd>
2685
+
2686
+ <dl>
2687
+ <dd>
2688
+
2689
+ ```typescript
2690
+ await client.calls.listCallsForNumber({
2691
+ number_id: "number_id"
2692
+ });
2693
+
2694
+ ```
2695
+ </dd>
2696
+ </dl>
2697
+ </dd>
2698
+ </dl>
2699
+
2700
+ #### ⚙️ Parameters
2701
+
2702
+ <dl>
2703
+ <dd>
2704
+
2705
+ <dl>
2706
+ <dd>
2707
+
2708
+ **request:** `AgentPhone.ListCallsForNumberV1NumbersNumberIdCallsGetRequest`
2709
+
2710
+ </dd>
2711
+ </dl>
2712
+
2713
+ <dl>
2714
+ <dd>
2715
+
2716
+ **requestOptions:** `CallsClient.RequestOptions`
2717
+
2718
+ </dd>
2719
+ </dl>
2720
+ </dd>
2721
+ </dl>
2722
+
2723
+
2724
+ </dd>
2725
+ </dl>
2726
+ </details>
2727
+
2728
+ ## Usage
2729
+ <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getUsage</a>() -> AgentPhone.UsageResponse</code></summary>
2730
+ <dl>
2731
+ <dd>
2732
+
2733
+ #### 📝 Description
2734
+
2735
+ <dl>
2736
+ <dd>
2737
+
2738
+ <dl>
2739
+ <dd>
2740
+
2741
+ Get usage statistics for the current account.
2742
+
2743
+ Returns:
2744
+ - Phone number limits (used/limit/remaining)
2745
+ - Message statistics (total, last 24h, last 7 days, last 30 days)
2746
+ - Call statistics (total, last 24h, last 7 days, last 30 days)
2747
+ - Webhook delivery statistics
2748
+ </dd>
2749
+ </dl>
2750
+ </dd>
2751
+ </dl>
2752
+
2753
+ #### 🔌 Usage
2754
+
2755
+ <dl>
2756
+ <dd>
2757
+
2758
+ <dl>
2759
+ <dd>
2760
+
2761
+ ```typescript
2762
+ await client.usage.getUsage();
2763
+
2764
+ ```
2765
+ </dd>
2766
+ </dl>
2767
+ </dd>
2768
+ </dl>
2769
+
2770
+ #### ⚙️ Parameters
2771
+
2772
+ <dl>
2773
+ <dd>
2774
+
2775
+ <dl>
2776
+ <dd>
2777
+
2778
+ **requestOptions:** `UsageClient.RequestOptions`
2779
+
2780
+ </dd>
2781
+ </dl>
2782
+ </dd>
2783
+ </dl>
2784
+
2785
+
2786
+ </dd>
2787
+ </dl>
2788
+ </details>
2789
+
2790
+ <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getDailyUsage</a>({ ...params }) -> AgentPhone.DailyUsageResponse</code></summary>
2791
+ <dl>
2792
+ <dd>
2793
+
2794
+ #### 📝 Description
2795
+
2796
+ <dl>
2797
+ <dd>
2798
+
2799
+ <dl>
2800
+ <dd>
2801
+
2802
+ Get daily usage breakdown for the last N days (up to 365).
2803
+ Returns per-day counts of messages, calls, and webhook deliveries.
2804
+ </dd>
2805
+ </dl>
2806
+ </dd>
2807
+ </dl>
2808
+
2809
+ #### 🔌 Usage
2810
+
2811
+ <dl>
2812
+ <dd>
2813
+
2814
+ <dl>
2815
+ <dd>
2816
+
2817
+ ```typescript
2818
+ await client.usage.getDailyUsage();
2819
+
2820
+ ```
2821
+ </dd>
2822
+ </dl>
2823
+ </dd>
2824
+ </dl>
2825
+
2826
+ #### ⚙️ Parameters
2827
+
2828
+ <dl>
2829
+ <dd>
2830
+
2831
+ <dl>
2832
+ <dd>
2833
+
2834
+ **request:** `AgentPhone.GetDailyUsageV1UsageDailyGetRequest`
2835
+
2836
+ </dd>
2837
+ </dl>
2838
+
2839
+ <dl>
2840
+ <dd>
2841
+
2842
+ **requestOptions:** `UsageClient.RequestOptions`
2843
+
2844
+ </dd>
2845
+ </dl>
2846
+ </dd>
2847
+ </dl>
2848
+
2849
+
2850
+ </dd>
2851
+ </dl>
2852
+ </details>
2853
+
2854
+ <details><summary><code>client.usage.<a href="/src/api/resources/usage/client/Client.ts">getMonthlyUsage</a>({ ...params }) -> AgentPhone.MonthlyUsageResponse</code></summary>
2855
+ <dl>
2856
+ <dd>
2857
+
2858
+ #### 📝 Description
2859
+
2860
+ <dl>
2861
+ <dd>
2862
+
2863
+ <dl>
2864
+ <dd>
2865
+
2866
+ Get monthly usage aggregation for the last N months.
2867
+ Returns per-month totals of messages, calls, and webhook deliveries.
2868
+ </dd>
2869
+ </dl>
2870
+ </dd>
2871
+ </dl>
2872
+
2873
+ #### 🔌 Usage
2874
+
2875
+ <dl>
2876
+ <dd>
2877
+
2878
+ <dl>
2879
+ <dd>
2880
+
2881
+ ```typescript
2882
+ await client.usage.getMonthlyUsage();
2883
+
2410
2884
  ```
2411
2885
  </dd>
2412
2886
  </dl>
@@ -2437,6 +2911,143 @@ await client.usage.getMonthlyUsage();
2437
2911
  </dl>
2438
2912
 
2439
2913
 
2914
+ </dd>
2915
+ </dl>
2916
+ </details>
2917
+
2918
+ ## Messages
2919
+ <details><summary><code>client.messages.<a href="/src/api/resources/messages/client/Client.ts">sendMessage</a>({ ...params }) -> AgentPhone.SendMessageResponse</code></summary>
2920
+ <dl>
2921
+ <dd>
2922
+
2923
+ #### 📝 Description
2924
+
2925
+ <dl>
2926
+ <dd>
2927
+
2928
+ <dl>
2929
+ <dd>
2930
+
2931
+ Send an outbound message (SMS or iMessage) via the provider assigned to the number.
2932
+ </dd>
2933
+ </dl>
2934
+ </dd>
2935
+ </dl>
2936
+
2937
+ #### 🔌 Usage
2938
+
2939
+ <dl>
2940
+ <dd>
2941
+
2942
+ <dl>
2943
+ <dd>
2944
+
2945
+ ```typescript
2946
+ await client.messages.sendMessage({
2947
+ agent_id: "agent_id",
2948
+ to_number: "to_number",
2949
+ body: "body"
2950
+ });
2951
+
2952
+ ```
2953
+ </dd>
2954
+ </dl>
2955
+ </dd>
2956
+ </dl>
2957
+
2958
+ #### ⚙️ Parameters
2959
+
2960
+ <dl>
2961
+ <dd>
2962
+
2963
+ <dl>
2964
+ <dd>
2965
+
2966
+ **request:** `AgentPhone.SendMessageRequest`
2967
+
2968
+ </dd>
2969
+ </dl>
2970
+
2971
+ <dl>
2972
+ <dd>
2973
+
2974
+ **requestOptions:** `MessagesClient.RequestOptions`
2975
+
2976
+ </dd>
2977
+ </dl>
2978
+ </dd>
2979
+ </dl>
2980
+
2981
+
2982
+ </dd>
2983
+ </dl>
2984
+ </details>
2985
+
2986
+ <details><summary><code>client.messages.<a href="/src/api/resources/messages/client/Client.ts">sendReaction</a>({ ...params }) -> AgentPhone.SendReactionResponse</code></summary>
2987
+ <dl>
2988
+ <dd>
2989
+
2990
+ #### 📝 Description
2991
+
2992
+ <dl>
2993
+ <dd>
2994
+
2995
+ <dl>
2996
+ <dd>
2997
+
2998
+ Send a tapback reaction to a message (iMessage only).
2999
+
3000
+ Reactions are an iMessage feature. Attempting to react to a message
3001
+ sent via an SMS/Twilio number will return a clear error.
3002
+ </dd>
3003
+ </dl>
3004
+ </dd>
3005
+ </dl>
3006
+
3007
+ #### 🔌 Usage
3008
+
3009
+ <dl>
3010
+ <dd>
3011
+
3012
+ <dl>
3013
+ <dd>
3014
+
3015
+ ```typescript
3016
+ await client.messages.sendReaction({
3017
+ message_id: "message_id",
3018
+ reaction: "reaction"
3019
+ });
3020
+
3021
+ ```
3022
+ </dd>
3023
+ </dl>
3024
+ </dd>
3025
+ </dl>
3026
+
3027
+ #### ⚙️ Parameters
3028
+
3029
+ <dl>
3030
+ <dd>
3031
+
3032
+ <dl>
3033
+ <dd>
3034
+
3035
+ **request:** `AgentPhone.SendReactionRequest`
3036
+
3037
+ </dd>
3038
+ </dl>
3039
+
3040
+ <dl>
3041
+ <dd>
3042
+
3043
+ **requestOptions:** `MessagesClient.RequestOptions`
3044
+
3045
+ </dd>
3046
+ </dl>
3047
+ </dd>
3048
+ </dl>
3049
+
3050
+
2440
3051
  </dd>
2441
3052
  </dl>
2442
3053
  </details>