rcs-js 2.0.13 → 2.0.14

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 (434) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/audiences/client/Client.d.ts +15 -0
  3. package/dist/cjs/api/resources/audiences/client/Client.js +70 -0
  4. package/dist/cjs/api/resources/audiences/client/requests/ListAudiencesParams.d.ts +10 -0
  5. package/dist/cjs/api/resources/audiences/client/requests/index.d.ts +1 -0
  6. package/dist/cjs/api/resources/brands/client/Client.d.ts +15 -0
  7. package/dist/cjs/api/resources/brands/client/Client.js +70 -0
  8. package/dist/cjs/api/resources/brands/client/requests/ListBrandsParams.d.ts +23 -0
  9. package/dist/cjs/api/resources/brands/client/requests/ListBrandsParams.js +15 -0
  10. package/dist/cjs/api/resources/brands/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.d.ts +15 -0
  12. package/dist/cjs/api/resources/campaigns/resources/dlc/client/Client.js +70 -0
  13. package/dist/cjs/api/resources/campaigns/resources/dlc/client/requests/ListDlcCampaignsParams.d.ts +21 -0
  14. package/dist/cjs/api/resources/campaigns/resources/dlc/client/requests/ListDlcCampaignsParams.js +13 -0
  15. package/dist/cjs/api/resources/campaigns/resources/dlc/client/requests/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.d.ts +15 -0
  17. package/dist/cjs/api/resources/campaigns/resources/rcs/client/Client.js +70 -0
  18. package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/ListRcsCampaignsParams.d.ts +21 -0
  19. package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/ListRcsCampaignsParams.js +13 -0
  20. package/dist/cjs/api/resources/campaigns/resources/rcs/client/requests/index.d.ts +1 -0
  21. package/dist/cjs/api/resources/campaigns/resources/tollFree/client/Client.d.ts +15 -0
  22. package/dist/cjs/api/resources/campaigns/resources/tollFree/client/Client.js +73 -0
  23. package/dist/cjs/api/resources/campaigns/resources/tollFree/client/requests/ListTollFreeCampaignsParams.d.ts +21 -0
  24. package/dist/cjs/api/resources/campaigns/resources/tollFree/client/requests/ListTollFreeCampaignsParams.js +13 -0
  25. package/dist/cjs/api/resources/campaigns/resources/tollFree/client/requests/index.d.ts +1 -0
  26. package/dist/cjs/api/resources/contacts/client/Client.d.ts +15 -0
  27. package/dist/cjs/api/resources/contacts/client/Client.js +70 -0
  28. package/dist/cjs/api/resources/contacts/client/requests/ListContactsParams.d.ts +16 -0
  29. package/dist/cjs/api/resources/contacts/client/requests/index.d.ts +1 -0
  30. package/dist/cjs/api/resources/messages/client/Client.d.ts +21 -0
  31. package/dist/cjs/api/resources/messages/client/Client.js +88 -8
  32. package/dist/cjs/api/resources/messages/client/requests/ListMessagesParams.d.ts +55 -0
  33. package/dist/cjs/api/resources/messages/client/requests/ListMessagesParams.js +33 -0
  34. package/dist/cjs/api/resources/messages/client/requests/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/messages/resources/blast/client/requests/BlastRcs.d.ts +0 -2
  36. package/dist/cjs/api/resources/messages/resources/blasts/client/Client.d.ts +29 -0
  37. package/dist/cjs/api/resources/messages/resources/blasts/client/Client.js +133 -0
  38. package/dist/cjs/api/resources/messages/resources/blasts/client/index.d.ts +1 -0
  39. package/dist/cjs/api/resources/messages/resources/blasts/client/index.js +17 -0
  40. package/dist/cjs/api/resources/messages/resources/blasts/client/requests/ListBlastsParams.d.ts +17 -0
  41. package/dist/cjs/api/resources/messages/resources/blasts/client/requests/ListBlastsParams.js +3 -0
  42. package/dist/cjs/api/resources/messages/resources/blasts/client/requests/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/messages/resources/blasts/client/requests/index.js +2 -0
  44. package/dist/cjs/api/resources/messages/resources/blasts/index.d.ts +1 -0
  45. package/dist/cjs/api/resources/messages/resources/blasts/index.js +17 -0
  46. package/dist/cjs/api/resources/messages/resources/index.d.ts +4 -0
  47. package/dist/cjs/api/resources/messages/resources/index.js +5 -1
  48. package/dist/cjs/api/resources/messages/resources/rcs/client/Client.d.ts +1 -4
  49. package/dist/cjs/api/resources/messages/resources/rcs/client/Client.js +1 -4
  50. package/dist/cjs/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.ts +1 -15
  51. package/dist/cjs/api/resources/messages/resources/rcs/types/SendRichMessageResponse.d.ts +1 -1
  52. package/dist/cjs/api/resources/messages/resources/schedules/client/Client.d.ts +29 -0
  53. package/dist/cjs/api/resources/messages/resources/schedules/client/Client.js +136 -0
  54. package/dist/cjs/api/resources/messages/resources/schedules/client/index.d.ts +1 -0
  55. package/dist/cjs/api/resources/messages/resources/schedules/client/index.js +17 -0
  56. package/dist/cjs/api/resources/messages/resources/schedules/client/requests/ListScheduledMessagesParams.d.ts +27 -0
  57. package/dist/cjs/api/resources/messages/resources/schedules/client/requests/ListScheduledMessagesParams.js +17 -0
  58. package/dist/cjs/api/resources/messages/resources/schedules/client/requests/index.d.ts +1 -0
  59. package/dist/cjs/api/resources/messages/resources/schedules/client/requests/index.js +2 -0
  60. package/dist/cjs/api/resources/messages/resources/schedules/index.d.ts +1 -0
  61. package/dist/cjs/api/resources/messages/resources/schedules/index.js +17 -0
  62. package/dist/cjs/api/resources/phoneNumbers/client/Client.d.ts +15 -0
  63. package/dist/cjs/api/resources/phoneNumbers/client/Client.js +70 -0
  64. package/dist/cjs/api/resources/phoneNumbers/client/requests/ListPhoneNumbersParams.d.ts +8 -0
  65. package/dist/cjs/api/resources/phoneNumbers/client/requests/ListPhoneNumbersParams.js +3 -0
  66. package/dist/cjs/api/resources/phoneNumbers/client/requests/index.d.ts +1 -0
  67. package/dist/cjs/api/resources/rcs/client/Client.d.ts +25 -42
  68. package/dist/cjs/api/resources/rcs/client/Client.js +40 -56
  69. package/dist/cjs/api/resources/rcs/client/requests/RcsCapabilitiesQuery.d.ts +2 -0
  70. package/dist/cjs/api/resources/rcs/client/requests/RcsLinkRequest.d.ts +0 -3
  71. package/dist/cjs/api/resources/rcs/client/requests/index.d.ts +0 -1
  72. package/dist/cjs/api/resources/rcs/index.d.ts +1 -0
  73. package/dist/cjs/api/resources/rcs/index.js +1 -0
  74. package/dist/cjs/api/resources/rcs/resources/agents/client/Client.d.ts +29 -0
  75. package/dist/cjs/api/resources/rcs/resources/agents/client/Client.js +133 -0
  76. package/dist/cjs/api/resources/rcs/resources/agents/client/index.d.ts +1 -0
  77. package/dist/cjs/api/resources/rcs/resources/agents/client/index.js +17 -0
  78. package/dist/cjs/api/resources/rcs/resources/agents/client/requests/ListAgentsParams.d.ts +20 -0
  79. package/dist/cjs/api/resources/rcs/resources/agents/client/requests/ListAgentsParams.js +12 -0
  80. package/dist/cjs/api/resources/rcs/resources/agents/client/requests/index.d.ts +1 -0
  81. package/dist/cjs/api/resources/rcs/resources/agents/client/requests/index.js +2 -0
  82. package/dist/cjs/api/resources/rcs/resources/agents/index.d.ts +1 -0
  83. package/dist/cjs/api/resources/rcs/resources/agents/index.js +17 -0
  84. package/dist/cjs/api/resources/rcs/resources/index.d.ts +6 -0
  85. package/dist/cjs/api/resources/rcs/resources/index.js +45 -0
  86. package/dist/cjs/api/resources/rcs/resources/test/client/Client.d.ts +214 -0
  87. package/dist/cjs/api/resources/rcs/resources/test/client/Client.js +497 -0
  88. package/dist/cjs/api/resources/rcs/resources/test/client/index.d.ts +1 -0
  89. package/dist/cjs/api/resources/rcs/resources/test/client/index.js +17 -0
  90. package/dist/cjs/api/resources/rcs/resources/test/client/requests/CreateTestAgentRequest.d.ts +87 -0
  91. package/dist/cjs/api/resources/rcs/resources/test/client/requests/CreateTestAgentRequest.js +3 -0
  92. package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.d.ts +15 -0
  93. package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.js +3 -0
  94. package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.d.ts +20 -0
  95. package/dist/cjs/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.js +3 -0
  96. package/dist/cjs/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.d.ts +59 -0
  97. package/dist/cjs/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.js +3 -0
  98. package/dist/cjs/api/resources/rcs/resources/test/client/requests/index.d.ts +4 -0
  99. package/dist/cjs/api/resources/rcs/resources/test/client/requests/index.js +2 -0
  100. package/dist/cjs/api/resources/rcs/resources/test/index.d.ts +1 -0
  101. package/dist/cjs/api/resources/rcs/resources/test/index.js +17 -0
  102. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/Client.d.ts +29 -0
  103. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/Client.js +133 -0
  104. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/index.d.ts +1 -0
  105. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/index.js +17 -0
  106. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/requests/ListTestNumbersParams.d.ts +23 -0
  107. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/requests/ListTestNumbersParams.js +13 -0
  108. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/requests/index.d.ts +1 -0
  109. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/client/requests/index.js +2 -0
  110. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/index.d.ts +1 -0
  111. package/dist/cjs/api/resources/rcs/resources/whitelistedNumbers/index.js +17 -0
  112. package/dist/cjs/api/resources/tools/resources/url/client/Client.d.ts +15 -0
  113. package/dist/cjs/api/resources/tools/resources/url/client/Client.js +70 -0
  114. package/dist/cjs/api/resources/tools/resources/url/client/requests/ListLinksParams.d.ts +10 -0
  115. package/dist/cjs/api/resources/tools/resources/url/client/requests/ListLinksParams.js +3 -0
  116. package/dist/cjs/api/resources/tools/resources/url/client/requests/index.d.ts +1 -0
  117. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +15 -0
  118. package/dist/cjs/api/resources/webhooks/client/Client.js +70 -0
  119. package/dist/cjs/api/resources/webhooks/client/requests/ListWebhooksParams.d.ts +19 -0
  120. package/dist/cjs/api/resources/webhooks/client/requests/ListWebhooksParams.js +12 -0
  121. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -0
  122. package/dist/cjs/api/types/AgentEmailEntry.d.ts +9 -0
  123. package/dist/cjs/api/types/AgentEmailEntry.js +3 -0
  124. package/dist/cjs/api/types/AgentPhoneEntry.d.ts +9 -0
  125. package/dist/cjs/api/types/AgentPhoneEntry.js +3 -0
  126. package/dist/cjs/api/types/AgentSummary.d.ts +94 -0
  127. package/dist/cjs/api/types/AgentSummary.js +22 -0
  128. package/dist/cjs/api/types/AgentUseCase.d.ts +15 -0
  129. package/dist/cjs/api/types/AgentUseCase.js +18 -0
  130. package/dist/cjs/api/types/AgentWebsiteEntry.d.ts +9 -0
  131. package/dist/cjs/api/types/AgentWebsiteEntry.js +3 -0
  132. package/dist/cjs/api/types/AudienceSummary.d.ts +12 -0
  133. package/dist/cjs/api/types/AudienceSummary.js +3 -0
  134. package/dist/cjs/api/types/BlastDetails.d.ts +1 -1
  135. package/dist/cjs/api/types/BlastSummary.d.ts +27 -0
  136. package/dist/cjs/api/types/BlastSummary.js +13 -0
  137. package/dist/cjs/api/types/CarrierLaunchStatus.d.ts +12 -0
  138. package/dist/cjs/api/types/CarrierLaunchStatus.js +15 -0
  139. package/dist/cjs/api/types/CarrierLaunches.d.ts +14 -0
  140. package/dist/cjs/api/types/CarrierLaunches.js +3 -0
  141. package/dist/cjs/api/types/DlcCampaignSummary.d.ts +26 -0
  142. package/dist/cjs/api/types/DlcCampaignSummary.js +14 -0
  143. package/dist/cjs/api/types/FallbackMessage.d.ts +6 -5
  144. package/dist/cjs/api/types/LinkSummary.d.ts +10 -0
  145. package/dist/cjs/api/types/LinkSummary.js +3 -0
  146. package/dist/cjs/api/types/ListAgentsResponse.d.ts +6 -0
  147. package/dist/cjs/api/types/ListAgentsResponse.js +3 -0
  148. package/dist/cjs/api/types/ListAudiencesResponse.d.ts +6 -0
  149. package/dist/cjs/api/types/ListAudiencesResponse.js +3 -0
  150. package/dist/cjs/api/types/ListBlastsResponse.d.ts +6 -0
  151. package/dist/cjs/api/types/ListBlastsResponse.js +3 -0
  152. package/dist/cjs/api/types/ListBrandsResponse.d.ts +6 -0
  153. package/dist/cjs/api/types/ListBrandsResponse.js +3 -0
  154. package/dist/cjs/api/types/ListContactsResponse.d.ts +6 -0
  155. package/dist/cjs/api/types/ListContactsResponse.js +3 -0
  156. package/dist/cjs/api/types/ListDlcCampaignsResponse.d.ts +6 -0
  157. package/dist/cjs/api/types/ListDlcCampaignsResponse.js +3 -0
  158. package/dist/cjs/api/types/ListLinksResponse.d.ts +6 -0
  159. package/dist/cjs/api/types/ListLinksResponse.js +3 -0
  160. package/dist/cjs/api/types/ListMessagesResponse.d.ts +6 -0
  161. package/dist/cjs/api/types/ListMessagesResponse.js +3 -0
  162. package/dist/cjs/api/types/ListPhoneNumbersResponse.d.ts +6 -0
  163. package/dist/cjs/api/types/ListPhoneNumbersResponse.js +3 -0
  164. package/dist/cjs/api/types/ListRcsCampaignsResponse.d.ts +6 -0
  165. package/dist/cjs/api/types/ListRcsCampaignsResponse.js +3 -0
  166. package/dist/cjs/api/types/ListScheduledMessagesResponse.d.ts +6 -0
  167. package/dist/cjs/api/types/ListScheduledMessagesResponse.js +3 -0
  168. package/dist/cjs/api/types/ListTestNumbersResponse.d.ts +6 -0
  169. package/dist/cjs/api/types/ListTestNumbersResponse.js +3 -0
  170. package/dist/cjs/api/types/ListTollFreeCampaignsResponse.d.ts +6 -0
  171. package/dist/cjs/api/types/ListTollFreeCampaignsResponse.js +3 -0
  172. package/dist/cjs/api/types/ListWebhooksResponse.d.ts +6 -0
  173. package/dist/cjs/api/types/ListWebhooksResponse.js +3 -0
  174. package/dist/cjs/api/types/Message.d.ts +0 -8
  175. package/dist/cjs/api/types/MessageEvent.d.ts +21 -14
  176. package/dist/cjs/api/types/MessageEvent.js +1 -1
  177. package/dist/cjs/api/types/MessageList.d.ts +1 -1
  178. package/dist/cjs/api/types/MessageSummary.d.ts +71 -0
  179. package/dist/cjs/api/types/MessageSummary.js +36 -0
  180. package/dist/cjs/api/types/{MessageWithReaction.d.ts → MessageWithReactions.d.ts} +7 -7
  181. package/dist/cjs/api/types/{MessageWithReaction.js → MessageWithReactions.js} +5 -5
  182. package/dist/cjs/api/types/OwnedPhoneNumber.d.ts +14 -0
  183. package/dist/cjs/api/types/OwnedPhoneNumber.js +3 -0
  184. package/dist/cjs/api/types/RcsAgentDetails.d.ts +81 -0
  185. package/dist/cjs/api/types/RcsAgentDetails.js +20 -0
  186. package/dist/cjs/api/types/RcsAgentResponse.d.ts +17 -0
  187. package/dist/cjs/api/types/RcsAgentResponse.js +3 -0
  188. package/dist/cjs/api/types/RcsCampaignSummary.d.ts +28 -0
  189. package/dist/cjs/api/types/RcsCampaignSummary.js +14 -0
  190. package/dist/cjs/api/types/RcsWhitelistStatus.d.ts +13 -0
  191. package/dist/cjs/api/types/RcsWhitelistStatus.js +16 -0
  192. package/dist/cjs/api/types/ScheduledMessageSummary.d.ts +29 -0
  193. package/dist/cjs/api/types/ScheduledMessageSummary.js +13 -0
  194. package/dist/cjs/api/types/SendRichMessageOptions.d.ts +0 -2
  195. package/dist/cjs/api/types/SentRichMessageFallbackMms.d.ts +10 -0
  196. package/dist/cjs/api/types/SentRichMessageFallbackMms.js +3 -0
  197. package/dist/cjs/api/types/SentRichMessageFallbackSms.d.ts +10 -0
  198. package/dist/cjs/api/types/SentRichMessageFallbackSms.js +3 -0
  199. package/dist/cjs/api/types/TestAgentResponse.d.ts +19 -0
  200. package/dist/cjs/api/types/TestAgentResponse.js +3 -0
  201. package/dist/cjs/api/types/TestAgentWhitelistResponse.d.ts +7 -0
  202. package/dist/cjs/api/types/TestAgentWhitelistResponse.js +3 -0
  203. package/dist/cjs/api/types/TollFreeCampaignSummary.d.ts +26 -0
  204. package/dist/cjs/api/types/TollFreeCampaignSummary.js +14 -0
  205. package/dist/cjs/api/types/WebhookSummary.d.ts +23 -0
  206. package/dist/cjs/api/types/WebhookSummary.js +13 -0
  207. package/dist/cjs/api/types/WhitelistedNumberSummary.d.ts +19 -0
  208. package/dist/cjs/api/types/WhitelistedNumberSummary.js +13 -0
  209. package/dist/cjs/api/types/index.d.ts +40 -2
  210. package/dist/cjs/api/types/index.js +40 -2
  211. package/dist/cjs/version.d.ts +1 -1
  212. package/dist/cjs/version.js +1 -1
  213. package/dist/esm/Client.mjs +2 -2
  214. package/dist/esm/api/resources/audiences/client/Client.d.mts +15 -0
  215. package/dist/esm/api/resources/audiences/client/Client.mjs +70 -0
  216. package/dist/esm/api/resources/audiences/client/requests/ListAudiencesParams.d.mts +10 -0
  217. package/dist/esm/api/resources/audiences/client/requests/index.d.mts +1 -0
  218. package/dist/esm/api/resources/brands/client/Client.d.mts +15 -0
  219. package/dist/esm/api/resources/brands/client/Client.mjs +70 -0
  220. package/dist/esm/api/resources/brands/client/requests/ListBrandsParams.d.mts +23 -0
  221. package/dist/esm/api/resources/brands/client/requests/ListBrandsParams.mjs +12 -0
  222. package/dist/esm/api/resources/brands/client/requests/index.d.mts +1 -0
  223. package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.d.mts +15 -0
  224. package/dist/esm/api/resources/campaigns/resources/dlc/client/Client.mjs +70 -0
  225. package/dist/esm/api/resources/campaigns/resources/dlc/client/requests/ListDlcCampaignsParams.d.mts +21 -0
  226. package/dist/esm/api/resources/campaigns/resources/dlc/client/requests/ListDlcCampaignsParams.mjs +10 -0
  227. package/dist/esm/api/resources/campaigns/resources/dlc/client/requests/index.d.mts +1 -0
  228. package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.d.mts +15 -0
  229. package/dist/esm/api/resources/campaigns/resources/rcs/client/Client.mjs +70 -0
  230. package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/ListRcsCampaignsParams.d.mts +21 -0
  231. package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/ListRcsCampaignsParams.mjs +10 -0
  232. package/dist/esm/api/resources/campaigns/resources/rcs/client/requests/index.d.mts +1 -0
  233. package/dist/esm/api/resources/campaigns/resources/tollFree/client/Client.d.mts +15 -0
  234. package/dist/esm/api/resources/campaigns/resources/tollFree/client/Client.mjs +73 -0
  235. package/dist/esm/api/resources/campaigns/resources/tollFree/client/requests/ListTollFreeCampaignsParams.d.mts +21 -0
  236. package/dist/esm/api/resources/campaigns/resources/tollFree/client/requests/ListTollFreeCampaignsParams.mjs +10 -0
  237. package/dist/esm/api/resources/campaigns/resources/tollFree/client/requests/index.d.mts +1 -0
  238. package/dist/esm/api/resources/contacts/client/Client.d.mts +15 -0
  239. package/dist/esm/api/resources/contacts/client/Client.mjs +70 -0
  240. package/dist/esm/api/resources/contacts/client/requests/ListContactsParams.d.mts +16 -0
  241. package/dist/esm/api/resources/contacts/client/requests/index.d.mts +1 -0
  242. package/dist/esm/api/resources/messages/client/Client.d.mts +21 -0
  243. package/dist/esm/api/resources/messages/client/Client.mjs +80 -0
  244. package/dist/esm/api/resources/messages/client/requests/ListMessagesParams.d.mts +55 -0
  245. package/dist/esm/api/resources/messages/client/requests/ListMessagesParams.mjs +30 -0
  246. package/dist/esm/api/resources/messages/client/requests/index.d.mts +1 -0
  247. package/dist/esm/api/resources/messages/resources/blast/client/requests/BlastRcs.d.mts +0 -2
  248. package/dist/esm/api/resources/messages/resources/blasts/client/Client.d.mts +29 -0
  249. package/dist/esm/api/resources/messages/resources/blasts/client/Client.mjs +96 -0
  250. package/dist/esm/api/resources/messages/resources/blasts/client/index.d.mts +1 -0
  251. package/dist/esm/api/resources/messages/resources/blasts/client/index.mjs +1 -0
  252. package/dist/esm/api/resources/messages/resources/blasts/client/requests/ListBlastsParams.d.mts +17 -0
  253. package/dist/esm/api/resources/messages/resources/blasts/client/requests/ListBlastsParams.mjs +2 -0
  254. package/dist/esm/api/resources/messages/resources/blasts/client/requests/index.d.mts +1 -0
  255. package/dist/esm/api/resources/messages/resources/blasts/client/requests/index.mjs +1 -0
  256. package/dist/esm/api/resources/messages/resources/blasts/index.d.mts +1 -0
  257. package/dist/esm/api/resources/messages/resources/blasts/index.mjs +1 -0
  258. package/dist/esm/api/resources/messages/resources/index.d.mts +4 -0
  259. package/dist/esm/api/resources/messages/resources/index.mjs +4 -0
  260. package/dist/esm/api/resources/messages/resources/rcs/client/Client.d.mts +1 -4
  261. package/dist/esm/api/resources/messages/resources/rcs/client/Client.mjs +1 -4
  262. package/dist/esm/api/resources/messages/resources/rcs/client/requests/SendTypingIndicatorSchema.d.mts +1 -15
  263. package/dist/esm/api/resources/messages/resources/rcs/types/SendRichMessageResponse.d.mts +1 -1
  264. package/dist/esm/api/resources/messages/resources/schedules/client/Client.d.mts +29 -0
  265. package/dist/esm/api/resources/messages/resources/schedules/client/Client.mjs +99 -0
  266. package/dist/esm/api/resources/messages/resources/schedules/client/index.d.mts +1 -0
  267. package/dist/esm/api/resources/messages/resources/schedules/client/index.mjs +1 -0
  268. package/dist/esm/api/resources/messages/resources/schedules/client/requests/ListScheduledMessagesParams.d.mts +27 -0
  269. package/dist/esm/api/resources/messages/resources/schedules/client/requests/ListScheduledMessagesParams.mjs +14 -0
  270. package/dist/esm/api/resources/messages/resources/schedules/client/requests/index.d.mts +1 -0
  271. package/dist/esm/api/resources/messages/resources/schedules/client/requests/index.mjs +1 -0
  272. package/dist/esm/api/resources/messages/resources/schedules/index.d.mts +1 -0
  273. package/dist/esm/api/resources/messages/resources/schedules/index.mjs +1 -0
  274. package/dist/esm/api/resources/phoneNumbers/client/Client.d.mts +15 -0
  275. package/dist/esm/api/resources/phoneNumbers/client/Client.mjs +70 -0
  276. package/dist/esm/api/resources/phoneNumbers/client/requests/ListPhoneNumbersParams.d.mts +8 -0
  277. package/dist/esm/api/resources/phoneNumbers/client/requests/ListPhoneNumbersParams.mjs +2 -0
  278. package/dist/esm/api/resources/phoneNumbers/client/requests/index.d.mts +1 -0
  279. package/dist/esm/api/resources/rcs/client/Client.d.mts +25 -42
  280. package/dist/esm/api/resources/rcs/client/Client.mjs +40 -56
  281. package/dist/esm/api/resources/rcs/client/requests/RcsCapabilitiesQuery.d.mts +2 -0
  282. package/dist/esm/api/resources/rcs/client/requests/RcsLinkRequest.d.mts +0 -3
  283. package/dist/esm/api/resources/rcs/client/requests/index.d.mts +0 -1
  284. package/dist/esm/api/resources/rcs/index.d.mts +1 -0
  285. package/dist/esm/api/resources/rcs/index.mjs +1 -0
  286. package/dist/esm/api/resources/rcs/resources/agents/client/Client.d.mts +29 -0
  287. package/dist/esm/api/resources/rcs/resources/agents/client/Client.mjs +96 -0
  288. package/dist/esm/api/resources/rcs/resources/agents/client/index.d.mts +1 -0
  289. package/dist/esm/api/resources/rcs/resources/agents/client/index.mjs +1 -0
  290. package/dist/esm/api/resources/rcs/resources/agents/client/requests/ListAgentsParams.d.mts +20 -0
  291. package/dist/esm/api/resources/rcs/resources/agents/client/requests/ListAgentsParams.mjs +9 -0
  292. package/dist/esm/api/resources/rcs/resources/agents/client/requests/index.d.mts +1 -0
  293. package/dist/esm/api/resources/rcs/resources/agents/client/requests/index.mjs +1 -0
  294. package/dist/esm/api/resources/rcs/resources/agents/index.d.mts +1 -0
  295. package/dist/esm/api/resources/rcs/resources/agents/index.mjs +1 -0
  296. package/dist/esm/api/resources/rcs/resources/index.d.mts +6 -0
  297. package/dist/esm/api/resources/rcs/resources/index.mjs +6 -0
  298. package/dist/esm/api/resources/rcs/resources/test/client/Client.d.mts +214 -0
  299. package/dist/esm/api/resources/rcs/resources/test/client/Client.mjs +460 -0
  300. package/dist/esm/api/resources/rcs/resources/test/client/index.d.mts +1 -0
  301. package/dist/esm/api/resources/rcs/resources/test/client/index.mjs +1 -0
  302. package/dist/esm/api/resources/rcs/resources/test/client/requests/CreateTestAgentRequest.d.mts +87 -0
  303. package/dist/esm/api/resources/rcs/resources/test/client/requests/CreateTestAgentRequest.mjs +2 -0
  304. package/dist/esm/api/resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.d.mts +15 -0
  305. package/dist/esm/api/resources/rcs/resources/test/client/requests/TestAgentWhitelistRequest.mjs +2 -0
  306. package/dist/esm/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.d.mts +20 -0
  307. package/dist/esm/api/resources/rcs/resources/test/client/requests/TestGetWhitelistStatusRequest.mjs +2 -0
  308. package/dist/esm/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.d.mts +59 -0
  309. package/dist/esm/api/resources/rcs/resources/test/client/requests/UpdateTestAgentRequest.mjs +2 -0
  310. package/dist/esm/api/resources/rcs/resources/test/client/requests/index.d.mts +4 -0
  311. package/dist/esm/api/resources/rcs/resources/test/client/requests/index.mjs +1 -0
  312. package/dist/esm/api/resources/rcs/resources/test/index.d.mts +1 -0
  313. package/dist/esm/api/resources/rcs/resources/test/index.mjs +1 -0
  314. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/Client.d.mts +29 -0
  315. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/Client.mjs +96 -0
  316. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/index.d.mts +1 -0
  317. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/index.mjs +1 -0
  318. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/requests/ListTestNumbersParams.d.mts +23 -0
  319. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/requests/ListTestNumbersParams.mjs +10 -0
  320. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/requests/index.d.mts +1 -0
  321. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/client/requests/index.mjs +1 -0
  322. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/index.d.mts +1 -0
  323. package/dist/esm/api/resources/rcs/resources/whitelistedNumbers/index.mjs +1 -0
  324. package/dist/esm/api/resources/tools/resources/url/client/Client.d.mts +15 -0
  325. package/dist/esm/api/resources/tools/resources/url/client/Client.mjs +70 -0
  326. package/dist/esm/api/resources/tools/resources/url/client/requests/ListLinksParams.d.mts +10 -0
  327. package/dist/esm/api/resources/tools/resources/url/client/requests/ListLinksParams.mjs +2 -0
  328. package/dist/esm/api/resources/tools/resources/url/client/requests/index.d.mts +1 -0
  329. package/dist/esm/api/resources/webhooks/client/Client.d.mts +15 -0
  330. package/dist/esm/api/resources/webhooks/client/Client.mjs +70 -0
  331. package/dist/esm/api/resources/webhooks/client/requests/ListWebhooksParams.d.mts +19 -0
  332. package/dist/esm/api/resources/webhooks/client/requests/ListWebhooksParams.mjs +9 -0
  333. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -0
  334. package/dist/esm/api/types/AgentEmailEntry.d.mts +9 -0
  335. package/dist/esm/api/types/AgentEmailEntry.mjs +2 -0
  336. package/dist/esm/api/types/AgentPhoneEntry.d.mts +9 -0
  337. package/dist/esm/api/types/AgentPhoneEntry.mjs +2 -0
  338. package/dist/esm/api/types/AgentSummary.d.mts +94 -0
  339. package/dist/esm/api/types/AgentSummary.mjs +19 -0
  340. package/dist/esm/api/types/AgentUseCase.d.mts +15 -0
  341. package/dist/esm/api/types/AgentUseCase.mjs +15 -0
  342. package/dist/esm/api/types/AgentWebsiteEntry.d.mts +9 -0
  343. package/dist/esm/api/types/AgentWebsiteEntry.mjs +2 -0
  344. package/dist/esm/api/types/AudienceSummary.d.mts +12 -0
  345. package/dist/esm/api/types/AudienceSummary.mjs +2 -0
  346. package/dist/esm/api/types/BlastDetails.d.mts +1 -1
  347. package/dist/esm/api/types/BlastSummary.d.mts +27 -0
  348. package/dist/esm/api/types/BlastSummary.mjs +10 -0
  349. package/dist/esm/api/types/CarrierLaunchStatus.d.mts +12 -0
  350. package/dist/esm/api/types/CarrierLaunchStatus.mjs +12 -0
  351. package/dist/esm/api/types/CarrierLaunches.d.mts +14 -0
  352. package/dist/esm/api/types/CarrierLaunches.mjs +2 -0
  353. package/dist/esm/api/types/DlcCampaignSummary.d.mts +26 -0
  354. package/dist/esm/api/types/DlcCampaignSummary.mjs +11 -0
  355. package/dist/esm/api/types/FallbackMessage.d.mts +6 -5
  356. package/dist/esm/api/types/LinkSummary.d.mts +10 -0
  357. package/dist/esm/api/types/LinkSummary.mjs +2 -0
  358. package/dist/esm/api/types/ListAgentsResponse.d.mts +6 -0
  359. package/dist/esm/api/types/ListAgentsResponse.mjs +2 -0
  360. package/dist/esm/api/types/ListAudiencesResponse.d.mts +6 -0
  361. package/dist/esm/api/types/ListAudiencesResponse.mjs +2 -0
  362. package/dist/esm/api/types/ListBlastsResponse.d.mts +6 -0
  363. package/dist/esm/api/types/ListBlastsResponse.mjs +2 -0
  364. package/dist/esm/api/types/ListBrandsResponse.d.mts +6 -0
  365. package/dist/esm/api/types/ListBrandsResponse.mjs +2 -0
  366. package/dist/esm/api/types/ListContactsResponse.d.mts +6 -0
  367. package/dist/esm/api/types/ListContactsResponse.mjs +2 -0
  368. package/dist/esm/api/types/ListDlcCampaignsResponse.d.mts +6 -0
  369. package/dist/esm/api/types/ListDlcCampaignsResponse.mjs +2 -0
  370. package/dist/esm/api/types/ListLinksResponse.d.mts +6 -0
  371. package/dist/esm/api/types/ListLinksResponse.mjs +2 -0
  372. package/dist/esm/api/types/ListMessagesResponse.d.mts +6 -0
  373. package/dist/esm/api/types/ListMessagesResponse.mjs +2 -0
  374. package/dist/esm/api/types/ListPhoneNumbersResponse.d.mts +6 -0
  375. package/dist/esm/api/types/ListPhoneNumbersResponse.mjs +2 -0
  376. package/dist/esm/api/types/ListRcsCampaignsResponse.d.mts +6 -0
  377. package/dist/esm/api/types/ListRcsCampaignsResponse.mjs +2 -0
  378. package/dist/esm/api/types/ListScheduledMessagesResponse.d.mts +6 -0
  379. package/dist/esm/api/types/ListScheduledMessagesResponse.mjs +2 -0
  380. package/dist/esm/api/types/ListTestNumbersResponse.d.mts +6 -0
  381. package/dist/esm/api/types/ListTestNumbersResponse.mjs +2 -0
  382. package/dist/esm/api/types/ListTollFreeCampaignsResponse.d.mts +6 -0
  383. package/dist/esm/api/types/ListTollFreeCampaignsResponse.mjs +2 -0
  384. package/dist/esm/api/types/ListWebhooksResponse.d.mts +6 -0
  385. package/dist/esm/api/types/ListWebhooksResponse.mjs +2 -0
  386. package/dist/esm/api/types/Message.d.mts +0 -8
  387. package/dist/esm/api/types/MessageEvent.d.mts +21 -14
  388. package/dist/esm/api/types/MessageEvent.mjs +1 -1
  389. package/dist/esm/api/types/MessageList.d.mts +1 -1
  390. package/dist/esm/api/types/MessageSummary.d.mts +71 -0
  391. package/dist/esm/api/types/MessageSummary.mjs +33 -0
  392. package/dist/esm/api/types/{MessageWithReaction.d.mts → MessageWithReactions.d.mts} +7 -7
  393. package/dist/esm/api/types/{MessageWithReaction.mjs → MessageWithReactions.mjs} +4 -4
  394. package/dist/esm/api/types/OwnedPhoneNumber.d.mts +14 -0
  395. package/dist/esm/api/types/OwnedPhoneNumber.mjs +2 -0
  396. package/dist/esm/api/types/RcsAgentDetails.d.mts +81 -0
  397. package/dist/esm/api/types/RcsAgentDetails.mjs +17 -0
  398. package/dist/esm/api/types/RcsAgentResponse.d.mts +17 -0
  399. package/dist/esm/api/types/RcsAgentResponse.mjs +2 -0
  400. package/dist/esm/api/types/RcsCampaignSummary.d.mts +28 -0
  401. package/dist/esm/api/types/RcsCampaignSummary.mjs +11 -0
  402. package/dist/esm/api/types/RcsWhitelistStatus.d.mts +13 -0
  403. package/dist/esm/api/types/RcsWhitelistStatus.mjs +13 -0
  404. package/dist/esm/api/types/ScheduledMessageSummary.d.mts +29 -0
  405. package/dist/esm/api/types/ScheduledMessageSummary.mjs +10 -0
  406. package/dist/esm/api/types/SendRichMessageOptions.d.mts +0 -2
  407. package/dist/esm/api/types/SentRichMessageFallbackMms.d.mts +10 -0
  408. package/dist/esm/api/types/SentRichMessageFallbackMms.mjs +2 -0
  409. package/dist/esm/api/types/SentRichMessageFallbackSms.d.mts +10 -0
  410. package/dist/esm/api/types/SentRichMessageFallbackSms.mjs +2 -0
  411. package/dist/esm/api/types/TestAgentResponse.d.mts +19 -0
  412. package/dist/esm/api/types/TestAgentResponse.mjs +2 -0
  413. package/dist/esm/api/types/TestAgentWhitelistResponse.d.mts +7 -0
  414. package/dist/esm/api/types/TestAgentWhitelistResponse.mjs +2 -0
  415. package/dist/esm/api/types/TollFreeCampaignSummary.d.mts +26 -0
  416. package/dist/esm/api/types/TollFreeCampaignSummary.mjs +11 -0
  417. package/dist/esm/api/types/WebhookSummary.d.mts +23 -0
  418. package/dist/esm/api/types/WebhookSummary.mjs +10 -0
  419. package/dist/esm/api/types/WhitelistedNumberSummary.d.mts +19 -0
  420. package/dist/esm/api/types/WhitelistedNumberSummary.mjs +10 -0
  421. package/dist/esm/api/types/index.d.mts +40 -2
  422. package/dist/esm/api/types/index.mjs +40 -2
  423. package/dist/esm/version.d.mts +1 -1
  424. package/dist/esm/version.mjs +1 -1
  425. package/package.json +2 -2
  426. package/reference.md +1413 -155
  427. package/dist/cjs/api/resources/rcs/client/requests/RcsWhitelistRequest.d.ts +0 -13
  428. package/dist/cjs/api/types/RcsWhitelistResponse.d.ts +0 -7
  429. package/dist/esm/api/resources/rcs/client/requests/RcsWhitelistRequest.d.mts +0 -13
  430. package/dist/esm/api/types/RcsWhitelistResponse.d.mts +0 -7
  431. /package/dist/cjs/api/resources/{rcs/client/requests/RcsWhitelistRequest.js → audiences/client/requests/ListAudiencesParams.js} +0 -0
  432. /package/dist/cjs/api/{types/RcsWhitelistResponse.js → resources/contacts/client/requests/ListContactsParams.js} +0 -0
  433. /package/dist/esm/api/resources/{rcs/client/requests/RcsWhitelistRequest.mjs → audiences/client/requests/ListAudiencesParams.mjs} +0 -0
  434. /package/dist/esm/api/{types/RcsWhitelistResponse.mjs → resources/contacts/client/requests/ListContactsParams.mjs} +0 -0
@@ -0,0 +1 @@
1
+ export type { ListScheduledMessagesParams } from "./ListScheduledMessagesParams.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./client/index.mjs";
@@ -95,5 +95,20 @@ export declare class PhoneNumbers {
95
95
  */
96
96
  get(request: Pinnacle.RetrievePhoneNumberDetailsParams, requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<Pinnacle.PhoneNumbersGetResponse>;
97
97
  private __get;
98
+ /**
99
+ * List all owned phone numbers with pagination. Results are sorted by creation date, newest first.
100
+ *
101
+ * @param {Pinnacle.ListPhoneNumbersParams} request
102
+ * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration.
103
+ *
104
+ * @throws {@link Pinnacle.BadRequestError}
105
+ * @throws {@link Pinnacle.UnauthorizedError}
106
+ * @throws {@link Pinnacle.InternalServerError}
107
+ *
108
+ * @example
109
+ * await client.phoneNumbers.list()
110
+ */
111
+ list(request?: Pinnacle.ListPhoneNumbersParams, requestOptions?: PhoneNumbers.RequestOptions): core.HttpResponsePromise<Pinnacle.ListPhoneNumbersResponse>;
112
+ private __list;
98
113
  protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
99
114
  }
@@ -285,6 +285,76 @@ export class PhoneNumbers {
285
285
  }
286
286
  });
287
287
  }
288
+ /**
289
+ * List all owned phone numbers with pagination. Results are sorted by creation date, newest first.
290
+ *
291
+ * @param {Pinnacle.ListPhoneNumbersParams} request
292
+ * @param {PhoneNumbers.RequestOptions} requestOptions - Request-specific configuration.
293
+ *
294
+ * @throws {@link Pinnacle.BadRequestError}
295
+ * @throws {@link Pinnacle.UnauthorizedError}
296
+ * @throws {@link Pinnacle.InternalServerError}
297
+ *
298
+ * @example
299
+ * await client.phoneNumbers.list()
300
+ */
301
+ list(request = {}, requestOptions) {
302
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
303
+ }
304
+ __list() {
305
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
306
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
307
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
308
+ const _response = yield core.fetcher({
309
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "phone-numbers/list"),
310
+ method: "POST",
311
+ headers: _headers,
312
+ contentType: "application/json",
313
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
314
+ requestType: "json",
315
+ body: request,
316
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
317
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
318
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
319
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
320
+ logging: this._options.logging,
321
+ });
322
+ if (_response.ok) {
323
+ return { data: _response.body, rawResponse: _response.rawResponse };
324
+ }
325
+ if (_response.error.reason === "status-code") {
326
+ switch (_response.error.statusCode) {
327
+ case 400:
328
+ throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
329
+ case 401:
330
+ throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
331
+ case 500:
332
+ throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
333
+ default:
334
+ throw new errors.PinnacleError({
335
+ statusCode: _response.error.statusCode,
336
+ body: _response.error.body,
337
+ rawResponse: _response.rawResponse,
338
+ });
339
+ }
340
+ }
341
+ switch (_response.error.reason) {
342
+ case "non-json":
343
+ throw new errors.PinnacleError({
344
+ statusCode: _response.error.statusCode,
345
+ body: _response.error.rawBody,
346
+ rawResponse: _response.rawResponse,
347
+ });
348
+ case "timeout":
349
+ throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /phone-numbers/list.");
350
+ case "unknown":
351
+ throw new errors.PinnacleError({
352
+ message: _response.error.errorMessage,
353
+ rawResponse: _response.rawResponse,
354
+ });
355
+ }
356
+ });
357
+ }
288
358
  _getCustomAuthorizationHeaders() {
289
359
  return __awaiter(this, void 0, void 0, function* () {
290
360
  const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface ListPhoneNumbersParams {
6
+ pageIndex?: number;
7
+ pageSize?: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,3 +1,4 @@
1
1
  export type { BuyPhoneNumberParams } from "./BuyPhoneNumberParams.mjs";
2
+ export type { ListPhoneNumbersParams } from "./ListPhoneNumbersParams.mjs";
2
3
  export type { RetrievePhoneNumberDetailsParams } from "./RetrievePhoneNumberDetailsParams.mjs";
3
4
  export type { SearchPhoneNumberParams } from "./SearchPhoneNumberParams.mjs";
@@ -1,6 +1,9 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import * as Pinnacle from "../../../index.mjs";
4
+ import { Agents } from "../resources/agents/client/Client.mjs";
5
+ import { Test } from "../resources/test/client/Client.mjs";
6
+ import { WhitelistedNumbers } from "../resources/whitelistedNumbers/client/Client.mjs";
4
7
  export declare namespace Rcs {
5
8
  interface Options extends BaseClientOptions {
6
9
  }
@@ -9,74 +12,55 @@ export declare namespace Rcs {
9
12
  }
10
13
  export declare class Rcs {
11
14
  protected readonly _options: Rcs.Options;
15
+ protected _agents: Agents | undefined;
16
+ protected _whitelistedNumbers: WhitelistedNumbers | undefined;
17
+ protected _test: Test | undefined;
12
18
  constructor(_options: Rcs.Options);
19
+ get agents(): Agents;
20
+ get whitelistedNumbers(): WhitelistedNumbers;
21
+ get test(): Test;
13
22
  /**
14
- * Check RCS capabilities for one or more phone numbers.
23
+ * Retrieve details of an RCS agent by its ID.
15
24
  *
16
- * This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
17
- * on specific phone numbers before sending RCS messages to them.
25
+ * Returns the agent's configuration including display name, description, logo, hero image,
26
+ * contact information, and other settings.
18
27
  *
19
- * @param {Pinnacle.RcsCapabilitiesQuery} request
28
+ * @param {string} agentId - The RCS agent ID (must be prefixed with `agent_`).
20
29
  * @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
21
30
  *
22
31
  * @throws {@link Pinnacle.BadRequestError}
23
32
  * @throws {@link Pinnacle.UnauthorizedError}
24
33
  * @throws {@link Pinnacle.ForbiddenError}
34
+ * @throws {@link Pinnacle.NotFoundError}
25
35
  * @throws {@link Pinnacle.InternalServerError}
26
- * @throws {@link Pinnacle.NotImplementedError}
27
36
  *
28
37
  * @example
29
- * await client.rcs.getCapabilities({
30
- * phoneNumbers: ["+12345678901", "+19876543210"]
31
- * })
38
+ * await client.rcs.getAgent("agent_abc123def456")
32
39
  */
33
- getCapabilities(request: Pinnacle.RcsCapabilitiesQuery, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsCapabilitiesResult>;
34
- private __getCapabilities;
40
+ getAgent(agentId: string, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsAgentResponse>;
41
+ private __getAgent;
35
42
  /**
36
- * Whitelist a phone number for testing with your test RCS agent.
37
- *
38
- * ## Overview
39
- * During development and testing, RCS agents can only send messages to whitelisted phone numbers.
40
- * Use this endpoint to whitelist specific phone numbers to send and receive messages from the test agent.
41
- *
42
- * ## Verification Process
43
- * After whitelisting a number, you'll need to complete verification:
44
- *
45
- * 1. Check the test device for message from "RBM Tester Management"
46
- * 2. Click the "Make me a tester" button
47
- * 3. Enter the separate 4-digit verification SMS code in the Pinnacle dashboard at:
48
- * ```
49
- * https://app.pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
50
- * ```
51
- *
52
- * > **⚠️ Important: Re-whitelisting Numbers**
53
- * >
54
- * > If you whitelist a number that's already whitelisted, you'll receive a new message from "RBM Tester Management". **You must click the "Make me a tester" button again to continue sending and receiving messages.**
43
+ * Check RCS capabilities for one or more phone numbers.
55
44
  *
56
- * > **Important Notes**
57
- * >
58
- * > - **Verification required:** Messages cannot be sent nor received until you have clicked the "Make me a tester" button on the test device.
59
- * > - **Testing only:** This is only required for test agents. Production agents can message any RCS-enabled number.
60
- * > - **Network limitations:** Whitelisting may be temporarily unavailable for some carriers but are usually restored shortly.
45
+ * This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
46
+ * on specific phone numbers before sending RCS messages to them.
61
47
  *
62
- * @param {Pinnacle.RcsWhitelistRequest} request
48
+ * @param {Pinnacle.RcsCapabilitiesQuery} request
63
49
  * @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
64
50
  *
65
51
  * @throws {@link Pinnacle.BadRequestError}
66
52
  * @throws {@link Pinnacle.UnauthorizedError}
67
53
  * @throws {@link Pinnacle.ForbiddenError}
68
- * @throws {@link Pinnacle.NotFoundError}
69
54
  * @throws {@link Pinnacle.InternalServerError}
70
55
  * @throws {@link Pinnacle.NotImplementedError}
71
56
  *
72
57
  * @example
73
- * await client.rcs.whitelist({
74
- * agentId: "agent_XXXXXXXXXXXX",
75
- * phoneNumber: "+12345678901"
58
+ * await client.rcs.getCapabilities({
59
+ * phoneNumbers: ["+12345678901", "+19876543210"]
76
60
  * })
77
61
  */
78
- whitelist(request: Pinnacle.RcsWhitelistRequest, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsWhitelistResponse>;
79
- private __whitelist;
62
+ getCapabilities(request: Pinnacle.RcsCapabilitiesQuery, requestOptions?: Rcs.RequestOptions): core.HttpResponsePromise<Pinnacle.RcsCapabilitiesResult>;
63
+ private __getCapabilities;
80
64
  /**
81
65
  * Generate a link for initiating an RCS conversation with your agent.
82
66
  *
@@ -96,7 +80,6 @@ export declare class Rcs {
96
80
  * @example
97
81
  * await client.rcs.getLink({
98
82
  * agentId: "agent_XXXXXXXXXXXX",
99
- * testMode: false,
100
83
  * phoneNumber: "+12345678901",
101
84
  * body: "Hello, I need help with my order"
102
85
  * })
@@ -13,45 +13,55 @@ import * as core from "../../../../core/index.mjs";
13
13
  import * as environments from "../../../../environments.mjs";
14
14
  import * as errors from "../../../../errors/index.mjs";
15
15
  import * as Pinnacle from "../../../index.mjs";
16
+ import { Agents } from "../resources/agents/client/Client.mjs";
17
+ import { Test } from "../resources/test/client/Client.mjs";
18
+ import { WhitelistedNumbers } from "../resources/whitelistedNumbers/client/Client.mjs";
16
19
  export class Rcs {
17
20
  constructor(_options) {
18
21
  this._options = _options;
19
22
  }
23
+ get agents() {
24
+ var _a;
25
+ return ((_a = this._agents) !== null && _a !== void 0 ? _a : (this._agents = new Agents(this._options)));
26
+ }
27
+ get whitelistedNumbers() {
28
+ var _a;
29
+ return ((_a = this._whitelistedNumbers) !== null && _a !== void 0 ? _a : (this._whitelistedNumbers = new WhitelistedNumbers(this._options)));
30
+ }
31
+ get test() {
32
+ var _a;
33
+ return ((_a = this._test) !== null && _a !== void 0 ? _a : (this._test = new Test(this._options)));
34
+ }
20
35
  /**
21
- * Check RCS capabilities for one or more phone numbers.
36
+ * Retrieve details of an RCS agent by its ID.
22
37
  *
23
- * This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
24
- * on specific phone numbers before sending RCS messages to them.
38
+ * Returns the agent's configuration including display name, description, logo, hero image,
39
+ * contact information, and other settings.
25
40
  *
26
- * @param {Pinnacle.RcsCapabilitiesQuery} request
41
+ * @param {string} agentId - The RCS agent ID (must be prefixed with `agent_`).
27
42
  * @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
28
43
  *
29
44
  * @throws {@link Pinnacle.BadRequestError}
30
45
  * @throws {@link Pinnacle.UnauthorizedError}
31
46
  * @throws {@link Pinnacle.ForbiddenError}
47
+ * @throws {@link Pinnacle.NotFoundError}
32
48
  * @throws {@link Pinnacle.InternalServerError}
33
- * @throws {@link Pinnacle.NotImplementedError}
34
49
  *
35
50
  * @example
36
- * await client.rcs.getCapabilities({
37
- * phoneNumbers: ["+12345678901", "+19876543210"]
38
- * })
51
+ * await client.rcs.getAgent("agent_abc123def456")
39
52
  */
40
- getCapabilities(request, requestOptions) {
41
- return core.HttpResponsePromise.fromPromise(this.__getCapabilities(request, requestOptions));
53
+ getAgent(agentId, requestOptions) {
54
+ return core.HttpResponsePromise.fromPromise(this.__getAgent(agentId, requestOptions));
42
55
  }
43
- __getCapabilities(request, requestOptions) {
56
+ __getAgent(agentId, requestOptions) {
44
57
  return __awaiter(this, void 0, void 0, function* () {
45
58
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
46
59
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
47
60
  const _response = yield core.fetcher({
48
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "rcs/capabilities"),
49
- method: "POST",
61
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, `rcs/${core.url.encodePathParam(agentId)}`),
62
+ method: "GET",
50
63
  headers: _headers,
51
- contentType: "application/json",
52
64
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
53
- requestType: "json",
54
- body: request,
55
65
  timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
56
66
  maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
57
67
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -69,10 +79,10 @@ export class Rcs {
69
79
  throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
70
80
  case 403:
71
81
  throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
82
+ case 404:
83
+ throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
72
84
  case 500:
73
85
  throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
74
- case 501:
75
- throw new Pinnacle.NotImplementedError(_response.error.body, _response.rawResponse);
76
86
  default:
77
87
  throw new errors.PinnacleError({
78
88
  statusCode: _response.error.statusCode,
@@ -89,7 +99,7 @@ export class Rcs {
89
99
  rawResponse: _response.rawResponse,
90
100
  });
91
101
  case "timeout":
92
- throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/capabilities.");
102
+ throw new errors.PinnacleTimeoutError("Timeout exceeded when calling GET /rcs/{agentId}.");
93
103
  case "unknown":
94
104
  throw new errors.PinnacleError({
95
105
  message: _response.error.errorMessage,
@@ -99,57 +109,34 @@ export class Rcs {
99
109
  });
100
110
  }
101
111
  /**
102
- * Whitelist a phone number for testing with your test RCS agent.
103
- *
104
- * ## Overview
105
- * During development and testing, RCS agents can only send messages to whitelisted phone numbers.
106
- * Use this endpoint to whitelist specific phone numbers to send and receive messages from the test agent.
107
- *
108
- * ## Verification Process
109
- * After whitelisting a number, you'll need to complete verification:
110
- *
111
- * 1. Check the test device for message from "RBM Tester Management"
112
- * 2. Click the "Make me a tester" button
113
- * 3. Enter the separate 4-digit verification SMS code in the Pinnacle dashboard at:
114
- * ```
115
- * https://app.pinnacle.sh/dashboard/brands/{brandId}?campaignId={campaignId}&campaignType=RCS
116
- * ```
117
- *
118
- * > **⚠️ Important: Re-whitelisting Numbers**
119
- * >
120
- * > If you whitelist a number that's already whitelisted, you'll receive a new message from "RBM Tester Management". **You must click the "Make me a tester" button again to continue sending and receiving messages.**
112
+ * Check RCS capabilities for one or more phone numbers.
121
113
  *
122
- * > **Important Notes**
123
- * >
124
- * > - **Verification required:** Messages cannot be sent nor received until you have clicked the "Make me a tester" button on the test device.
125
- * > - **Testing only:** This is only required for test agents. Production agents can message any RCS-enabled number.
126
- * > - **Network limitations:** Whitelisting may be temporarily unavailable for some carriers but are usually restored shortly.
114
+ * This endpoint allows you to verify which RCS features (cards, buttons, etc.) are supported
115
+ * on specific phone numbers before sending RCS messages to them.
127
116
  *
128
- * @param {Pinnacle.RcsWhitelistRequest} request
117
+ * @param {Pinnacle.RcsCapabilitiesQuery} request
129
118
  * @param {Rcs.RequestOptions} requestOptions - Request-specific configuration.
130
119
  *
131
120
  * @throws {@link Pinnacle.BadRequestError}
132
121
  * @throws {@link Pinnacle.UnauthorizedError}
133
122
  * @throws {@link Pinnacle.ForbiddenError}
134
- * @throws {@link Pinnacle.NotFoundError}
135
123
  * @throws {@link Pinnacle.InternalServerError}
136
124
  * @throws {@link Pinnacle.NotImplementedError}
137
125
  *
138
126
  * @example
139
- * await client.rcs.whitelist({
140
- * agentId: "agent_XXXXXXXXXXXX",
141
- * phoneNumber: "+12345678901"
127
+ * await client.rcs.getCapabilities({
128
+ * phoneNumbers: ["+12345678901", "+19876543210"]
142
129
  * })
143
130
  */
144
- whitelist(request, requestOptions) {
145
- return core.HttpResponsePromise.fromPromise(this.__whitelist(request, requestOptions));
131
+ getCapabilities(request, requestOptions) {
132
+ return core.HttpResponsePromise.fromPromise(this.__getCapabilities(request, requestOptions));
146
133
  }
147
- __whitelist(request, requestOptions) {
134
+ __getCapabilities(request, requestOptions) {
148
135
  return __awaiter(this, void 0, void 0, function* () {
149
136
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
150
137
  const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
151
138
  const _response = yield core.fetcher({
152
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "rcs/whitelist"),
139
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "rcs/capabilities"),
153
140
  method: "POST",
154
141
  headers: _headers,
155
142
  contentType: "application/json",
@@ -173,8 +160,6 @@ export class Rcs {
173
160
  throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
174
161
  case 403:
175
162
  throw new Pinnacle.ForbiddenError(_response.error.body, _response.rawResponse);
176
- case 404:
177
- throw new Pinnacle.NotFoundError(_response.error.body, _response.rawResponse);
178
163
  case 500:
179
164
  throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
180
165
  case 501:
@@ -195,7 +180,7 @@ export class Rcs {
195
180
  rawResponse: _response.rawResponse,
196
181
  });
197
182
  case "timeout":
198
- throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/whitelist.");
183
+ throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/capabilities.");
199
184
  case "unknown":
200
185
  throw new errors.PinnacleError({
201
186
  message: _response.error.errorMessage,
@@ -223,7 +208,6 @@ export class Rcs {
223
208
  * @example
224
209
  * await client.rcs.getLink({
225
210
  * agentId: "agent_XXXXXXXXXXXX",
226
- * testMode: false,
227
211
  * phoneNumber: "+12345678901",
228
212
  * body: "Hello, I need help with my order"
229
213
  * })
@@ -10,4 +10,6 @@ export interface RcsCapabilitiesQuery {
10
10
  * **Limit:** 1 min
11
11
  */
12
12
  phoneNumbers: string[];
13
+ /** Optional RCS agent ID (prefixed with 'agent_') to check capabilities of a number from a specific agent. */
14
+ agentId?: string;
13
15
  }
@@ -2,7 +2,6 @@
2
2
  * @example
3
3
  * {
4
4
  * agentId: "agent_XXXXXXXXXXXX",
5
- * testMode: false,
6
5
  * phoneNumber: "+12345678901",
7
6
  * body: "Hello, I need help with my order"
8
7
  * }
@@ -10,8 +9,6 @@
10
9
  export interface RcsLinkRequest {
11
10
  /** The RCS agent ID (must be prefixed with 'agent_') */
12
11
  agentId: string;
13
- /** Link to the test agent or the production agent if false */
14
- testMode?: boolean;
15
12
  /** Fallback phone number (E.164 format) to use if the phone number does not support RCS. If not provided, no url will be generated. */
16
13
  phoneNumber?: string;
17
14
  /** Optional message body to pre-fill after the user clicks the link */
@@ -1,3 +1,2 @@
1
1
  export type { RcsCapabilitiesQuery } from "./RcsCapabilitiesQuery.mjs";
2
2
  export type { RcsLinkRequest } from "./RcsLinkRequest.mjs";
3
- export type { RcsWhitelistRequest } from "./RcsWhitelistRequest.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./resources/index.mjs";
@@ -1 +1,2 @@
1
1
  export * from "./client/index.mjs";
2
+ export * from "./resources/index.mjs";
@@ -0,0 +1,29 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
+ import * as core from "../../../../../../core/index.mjs";
3
+ import * as Pinnacle from "../../../../../index.mjs";
4
+ export declare namespace Agents {
5
+ interface Options extends BaseClientOptions {
6
+ }
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class Agents {
11
+ protected readonly _options: Agents.Options;
12
+ constructor(_options: Agents.Options);
13
+ /**
14
+ * List all RCS agents with pagination. Results are sorted by creation date, newest first.
15
+ *
16
+ * @param {Pinnacle.rcs.ListAgentsParams} request
17
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link Pinnacle.BadRequestError}
20
+ * @throws {@link Pinnacle.UnauthorizedError}
21
+ * @throws {@link Pinnacle.InternalServerError}
22
+ *
23
+ * @example
24
+ * await client.rcs.agents.list()
25
+ */
26
+ list(request?: Pinnacle.rcs.ListAgentsParams, requestOptions?: Agents.RequestOptions): core.HttpResponsePromise<Pinnacle.ListAgentsResponse>;
27
+ private __list;
28
+ protected _getCustomAuthorizationHeaders(): Promise<Record<string, string | undefined>>;
29
+ }
@@ -0,0 +1,96 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
12
+ import * as core from "../../../../../../core/index.mjs";
13
+ import * as environments from "../../../../../../environments.mjs";
14
+ import * as errors from "../../../../../../errors/index.mjs";
15
+ import * as Pinnacle from "../../../../../index.mjs";
16
+ export class Agents {
17
+ constructor(_options) {
18
+ this._options = _options;
19
+ }
20
+ /**
21
+ * List all RCS agents with pagination. Results are sorted by creation date, newest first.
22
+ *
23
+ * @param {Pinnacle.rcs.ListAgentsParams} request
24
+ * @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
25
+ *
26
+ * @throws {@link Pinnacle.BadRequestError}
27
+ * @throws {@link Pinnacle.UnauthorizedError}
28
+ * @throws {@link Pinnacle.InternalServerError}
29
+ *
30
+ * @example
31
+ * await client.rcs.agents.list()
32
+ */
33
+ list(request = {}, requestOptions) {
34
+ return core.HttpResponsePromise.fromPromise(this.__list(request, requestOptions));
35
+ }
36
+ __list() {
37
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
38
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
39
+ const _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
40
+ const _response = yield core.fetcher({
41
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.PinnacleEnvironment.Default, "rcs/agents/list"),
42
+ method: "POST",
43
+ headers: _headers,
44
+ contentType: "application/json",
45
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
46
+ requestType: "json",
47
+ body: request,
48
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
49
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
50
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
51
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
52
+ logging: this._options.logging,
53
+ });
54
+ if (_response.ok) {
55
+ return { data: _response.body, rawResponse: _response.rawResponse };
56
+ }
57
+ if (_response.error.reason === "status-code") {
58
+ switch (_response.error.statusCode) {
59
+ case 400:
60
+ throw new Pinnacle.BadRequestError(_response.error.body, _response.rawResponse);
61
+ case 401:
62
+ throw new Pinnacle.UnauthorizedError(_response.error.body, _response.rawResponse);
63
+ case 500:
64
+ throw new Pinnacle.InternalServerError(_response.error.body, _response.rawResponse);
65
+ default:
66
+ throw new errors.PinnacleError({
67
+ statusCode: _response.error.statusCode,
68
+ body: _response.error.body,
69
+ rawResponse: _response.rawResponse,
70
+ });
71
+ }
72
+ }
73
+ switch (_response.error.reason) {
74
+ case "non-json":
75
+ throw new errors.PinnacleError({
76
+ statusCode: _response.error.statusCode,
77
+ body: _response.error.rawBody,
78
+ rawResponse: _response.rawResponse,
79
+ });
80
+ case "timeout":
81
+ throw new errors.PinnacleTimeoutError("Timeout exceeded when calling POST /rcs/agents/list.");
82
+ case "unknown":
83
+ throw new errors.PinnacleError({
84
+ message: _response.error.errorMessage,
85
+ rawResponse: _response.rawResponse,
86
+ });
87
+ }
88
+ });
89
+ }
90
+ _getCustomAuthorizationHeaders() {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
93
+ return { "PINNACLE-API-KEY": apiKeyValue };
94
+ });
95
+ }
96
+ }
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1 @@
1
+ export * from "./requests/index.mjs";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface ListAgentsParams {
6
+ pageIndex?: number;
7
+ pageSize?: number;
8
+ /** Filter by agent type. */
9
+ agentType?: ListAgentsParams.AgentType;
10
+ /** Case-insensitive substring search on agent name. */
11
+ name?: string;
12
+ }
13
+ export declare namespace ListAgentsParams {
14
+ /** Filter by agent type. */
15
+ const AgentType: {
16
+ readonly Production: "PRODUCTION";
17
+ readonly Test: "TEST";
18
+ };
19
+ type AgentType = (typeof AgentType)[keyof typeof AgentType];
20
+ }
@@ -0,0 +1,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export var ListAgentsParams;
3
+ (function (ListAgentsParams) {
4
+ /** Filter by agent type. */
5
+ ListAgentsParams.AgentType = {
6
+ Production: "PRODUCTION",
7
+ Test: "TEST",
8
+ };
9
+ })(ListAgentsParams || (ListAgentsParams = {}));