rcs-js 1.0.7 → 1.0.9

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 (445) hide show
  1. package/Client.d.ts +7 -57
  2. package/Client.js +18 -221
  3. package/README.md +30 -7
  4. package/api/client/requests/GetRcsFunctionalityRequest.d.ts +13 -0
  5. package/api/client/requests/index.d.ts +1 -2
  6. package/api/errors/ForbiddenError.d.ts +7 -0
  7. package/api/errors/{NotFoundError.js → ForbiddenError.js} +6 -6
  8. package/api/errors/index.d.ts +1 -1
  9. package/api/errors/index.js +1 -1
  10. package/api/index.d.ts +1 -0
  11. package/api/index.js +1 -0
  12. package/api/resources/index.d.ts +3 -0
  13. package/{dist/serialization/types/Call.js → api/resources/index.js} +7 -10
  14. package/api/resources/send/client/Client.d.ts +86 -0
  15. package/api/resources/send/client/Client.js +277 -0
  16. package/api/resources/send/client/index.d.ts +1 -0
  17. package/api/resources/send/client/index.js +17 -0
  18. package/api/resources/send/client/requests/Rcs.d.ts +43 -0
  19. package/api/resources/send/client/requests/SendMmsRequest.d.ts +22 -0
  20. package/api/resources/send/client/requests/SendSmsRequest.d.ts +19 -0
  21. package/api/resources/send/client/requests/index.d.ts +3 -0
  22. package/api/resources/send/client/requests/index.js +2 -0
  23. package/api/resources/send/index.d.ts +2 -0
  24. package/api/resources/send/index.js +18 -0
  25. package/api/resources/send/types/SendMmsResponse.d.ts +9 -0
  26. package/api/resources/send/types/SendRcsResponse.d.ts +9 -0
  27. package/api/resources/send/types/SendSmsResponse.d.ts +9 -0
  28. package/api/resources/send/types/index.d.ts +3 -0
  29. package/api/resources/send/types/index.js +19 -0
  30. package/api/types/Action.d.ts +20 -1
  31. package/api/types/ActionLatLong.d.ts +12 -0
  32. package/api/types/ActionType.d.ts +15 -0
  33. package/api/types/ActionType.js +14 -0
  34. package/api/types/BadRequestErrorBody.d.ts +1 -3
  35. package/api/types/Card.d.ts +5 -7
  36. package/api/types/{NotFoundErrorBody.d.ts → ForbiddenErrorBody.d.ts} +2 -2
  37. package/api/types/InternalServerErrorBody.d.ts +1 -2
  38. package/api/types/RcsFunctionalities.d.ts +21 -0
  39. package/api/types/RegisterCompanyResponse.d.ts +1 -2
  40. package/api/types/RegisterCompanyResponseBrand.d.ts +2 -2
  41. package/api/types/UnauthorizedErrorBody.d.ts +1 -1
  42. package/api/types/UpdateCompanyResponse.d.ts +1 -2
  43. package/api/types/UpdateCompanyResponseBrand.d.ts +2 -2
  44. package/api/types/index.d.ts +6 -33
  45. package/api/types/index.js +6 -33
  46. package/dist/Client.d.ts +7 -57
  47. package/dist/Client.js +18 -221
  48. package/dist/api/client/requests/GetRcsFunctionalityRequest.d.ts +13 -0
  49. package/dist/api/client/requests/index.d.ts +1 -2
  50. package/dist/api/errors/ForbiddenError.d.ts +7 -0
  51. package/dist/api/errors/{NotFoundError.js → ForbiddenError.js} +6 -6
  52. package/dist/api/errors/index.d.ts +1 -1
  53. package/dist/api/errors/index.js +1 -1
  54. package/dist/api/index.d.ts +1 -0
  55. package/dist/api/index.js +1 -0
  56. package/dist/api/resources/index.d.ts +3 -0
  57. package/dist/{serialization/types/CardStyleImageAlignment.js → api/resources/index.js} +7 -6
  58. package/dist/api/resources/send/client/Client.d.ts +86 -0
  59. package/dist/api/resources/send/client/Client.js +277 -0
  60. package/dist/api/resources/send/client/index.d.ts +1 -0
  61. package/dist/api/resources/send/client/index.js +17 -0
  62. package/dist/api/resources/send/client/requests/Rcs.d.ts +43 -0
  63. package/dist/api/resources/send/client/requests/SendMmsRequest.d.ts +22 -0
  64. package/dist/api/resources/send/client/requests/SendSmsRequest.d.ts +19 -0
  65. package/dist/api/resources/send/client/requests/index.d.ts +3 -0
  66. package/dist/api/resources/send/client/requests/index.js +2 -0
  67. package/dist/api/resources/send/index.d.ts +2 -0
  68. package/dist/api/resources/send/index.js +18 -0
  69. package/dist/api/resources/send/types/SendMmsResponse.d.ts +9 -0
  70. package/dist/api/resources/send/types/SendRcsResponse.d.ts +9 -0
  71. package/dist/api/resources/send/types/SendSmsResponse.d.ts +9 -0
  72. package/dist/api/resources/send/types/index.d.ts +3 -0
  73. package/dist/api/resources/send/types/index.js +19 -0
  74. package/dist/api/types/Action.d.ts +20 -1
  75. package/dist/api/types/ActionLatLong.d.ts +12 -0
  76. package/dist/api/types/ActionType.d.ts +15 -0
  77. package/dist/api/types/ActionType.js +14 -0
  78. package/dist/api/types/BadRequestErrorBody.d.ts +1 -3
  79. package/dist/api/types/Card.d.ts +5 -7
  80. package/dist/api/types/{NotFoundErrorBody.d.ts → ForbiddenErrorBody.d.ts} +2 -2
  81. package/dist/api/types/InternalServerErrorBody.d.ts +1 -2
  82. package/dist/api/types/RcsFunctionalities.d.ts +21 -0
  83. package/dist/api/types/RegisterCompanyResponse.d.ts +1 -2
  84. package/dist/api/types/RegisterCompanyResponseBrand.d.ts +2 -2
  85. package/dist/api/types/UnauthorizedErrorBody.d.ts +1 -1
  86. package/dist/api/types/UpdateCompanyResponse.d.ts +1 -2
  87. package/dist/api/types/UpdateCompanyResponseBrand.d.ts +2 -2
  88. package/dist/api/types/index.d.ts +6 -33
  89. package/dist/api/types/index.js +6 -33
  90. package/dist/serialization/client/requests/index.d.ts +0 -1
  91. package/dist/serialization/client/requests/index.js +1 -3
  92. package/dist/serialization/index.d.ts +1 -0
  93. package/dist/serialization/index.js +1 -0
  94. package/dist/serialization/resources/index.d.ts +3 -0
  95. package/dist/serialization/resources/index.js +32 -0
  96. package/dist/serialization/resources/send/client/index.d.ts +1 -0
  97. package/dist/serialization/resources/send/client/index.js +17 -0
  98. package/dist/serialization/resources/send/client/requests/Rcs.d.ts +19 -0
  99. package/dist/serialization/{types/SmsMessage.js → resources/send/client/requests/Rcs.js} +10 -4
  100. package/dist/serialization/resources/send/client/requests/SendMmsRequest.d.ts +15 -0
  101. package/dist/serialization/{types/CheckRcsCapabilityResponse.js → resources/send/client/requests/SendMmsRequest.js} +7 -5
  102. package/dist/serialization/resources/send/client/requests/SendSmsRequest.d.ts +14 -0
  103. package/{serialization/types/BasicRcsMessage.js → dist/serialization/resources/send/client/requests/SendSmsRequest.js} +5 -3
  104. package/dist/serialization/resources/send/client/requests/index.d.ts +3 -0
  105. package/dist/serialization/resources/send/client/requests/index.js +9 -0
  106. package/dist/serialization/resources/send/index.d.ts +2 -0
  107. package/dist/serialization/resources/send/index.js +18 -0
  108. package/dist/serialization/resources/send/types/SendMmsResponse.d.ts +13 -0
  109. package/dist/serialization/resources/send/types/SendMmsResponse.js +34 -0
  110. package/dist/serialization/resources/send/types/SendRcsResponse.d.ts +13 -0
  111. package/dist/serialization/resources/send/types/SendRcsResponse.js +34 -0
  112. package/dist/serialization/resources/send/types/SendSmsResponse.d.ts +13 -0
  113. package/dist/serialization/resources/send/types/SendSmsResponse.js +34 -0
  114. package/dist/serialization/resources/send/types/index.d.ts +3 -0
  115. package/dist/serialization/resources/send/types/index.js +19 -0
  116. package/dist/serialization/types/Action.d.ts +14 -7
  117. package/dist/serialization/types/Action.js +13 -6
  118. package/dist/serialization/types/{LatLng.d.ts → ActionLatLong.d.ts} +4 -4
  119. package/dist/serialization/types/{NotFoundErrorBody.js → ActionLatLong.js} +4 -3
  120. package/dist/serialization/types/ActionType.d.ts +10 -0
  121. package/dist/serialization/types/{BasicRcsMessage.js → ActionType.js} +2 -4
  122. package/dist/serialization/types/BadRequestErrorBody.d.ts +1 -3
  123. package/dist/serialization/types/BadRequestErrorBody.js +1 -3
  124. package/dist/serialization/types/Card.d.ts +1 -3
  125. package/dist/serialization/types/Card.js +1 -3
  126. package/dist/serialization/types/{Call.d.ts → ForbiddenErrorBody.d.ts} +3 -5
  127. package/dist/serialization/types/{GetAccountNumberResponse.js → ForbiddenErrorBody.js} +3 -3
  128. package/dist/serialization/types/InternalServerErrorBody.d.ts +1 -2
  129. package/dist/serialization/types/InternalServerErrorBody.js +1 -2
  130. package/dist/serialization/types/RcsFunctionalities.d.ts +19 -0
  131. package/dist/serialization/types/{BasicRcs.js → RcsFunctionalities.js} +10 -9
  132. package/dist/serialization/types/RegisterCompanyResponse.d.ts +1 -2
  133. package/dist/serialization/types/RegisterCompanyResponse.js +1 -2
  134. package/dist/serialization/types/RegisterCompanyResponseBrand.d.ts +2 -2
  135. package/dist/serialization/types/RegisterCompanyResponseBrand.js +2 -2
  136. package/dist/serialization/types/UnauthorizedErrorBody.d.ts +1 -1
  137. package/dist/serialization/types/UnauthorizedErrorBody.js +1 -1
  138. package/dist/serialization/types/UpdateCompanyResponse.d.ts +1 -2
  139. package/dist/serialization/types/UpdateCompanyResponse.js +1 -2
  140. package/dist/serialization/types/UpdateCompanyResponseBrand.d.ts +2 -2
  141. package/dist/serialization/types/UpdateCompanyResponseBrand.js +2 -2
  142. package/dist/serialization/types/index.d.ts +6 -33
  143. package/dist/serialization/types/index.js +6 -33
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/package.json +1 -1
  147. package/reference.md +205 -0
  148. package/serialization/client/requests/index.d.ts +0 -1
  149. package/serialization/client/requests/index.js +1 -3
  150. package/serialization/index.d.ts +1 -0
  151. package/serialization/index.js +1 -0
  152. package/serialization/resources/index.d.ts +3 -0
  153. package/serialization/resources/index.js +32 -0
  154. package/serialization/resources/send/client/index.d.ts +1 -0
  155. package/serialization/resources/send/client/index.js +17 -0
  156. package/serialization/resources/send/client/requests/Rcs.d.ts +19 -0
  157. package/serialization/{types/SmsMessage.js → resources/send/client/requests/Rcs.js} +10 -4
  158. package/serialization/resources/send/client/requests/SendMmsRequest.d.ts +15 -0
  159. package/serialization/resources/send/client/requests/SendMmsRequest.js +36 -0
  160. package/serialization/resources/send/client/requests/SendSmsRequest.d.ts +14 -0
  161. package/{dist/serialization/client/requests/UpdateSettingsRequest.js → serialization/resources/send/client/requests/SendSmsRequest.js} +6 -4
  162. package/serialization/resources/send/client/requests/index.d.ts +3 -0
  163. package/serialization/resources/send/client/requests/index.js +9 -0
  164. package/serialization/resources/send/index.d.ts +2 -0
  165. package/serialization/resources/send/index.js +18 -0
  166. package/serialization/resources/send/types/SendMmsResponse.d.ts +13 -0
  167. package/serialization/resources/send/types/SendMmsResponse.js +34 -0
  168. package/serialization/resources/send/types/SendRcsResponse.d.ts +13 -0
  169. package/serialization/resources/send/types/SendRcsResponse.js +34 -0
  170. package/serialization/resources/send/types/SendSmsResponse.d.ts +13 -0
  171. package/serialization/resources/send/types/SendSmsResponse.js +34 -0
  172. package/serialization/resources/send/types/index.d.ts +3 -0
  173. package/serialization/resources/send/types/index.js +19 -0
  174. package/serialization/types/Action.d.ts +14 -7
  175. package/serialization/types/Action.js +13 -6
  176. package/{dist/serialization/types/BasicRcsMessage.d.ts → serialization/types/ActionLatLong.d.ts} +4 -3
  177. package/serialization/types/ActionLatLong.js +34 -0
  178. package/serialization/types/ActionType.d.ts +10 -0
  179. package/{dist/serialization/types/CardStyleOrientation.js → serialization/types/ActionType.js} +2 -2
  180. package/serialization/types/BadRequestErrorBody.d.ts +1 -3
  181. package/serialization/types/BadRequestErrorBody.js +1 -3
  182. package/serialization/types/Card.d.ts +1 -3
  183. package/serialization/types/Card.js +1 -3
  184. package/{dist/serialization/types/NotFoundErrorBody.d.ts → serialization/types/ForbiddenErrorBody.d.ts} +3 -3
  185. package/{dist/serialization/types/LatLng.js → serialization/types/ForbiddenErrorBody.js} +3 -4
  186. package/serialization/types/InternalServerErrorBody.d.ts +1 -2
  187. package/serialization/types/InternalServerErrorBody.js +1 -2
  188. package/serialization/types/RcsFunctionalities.d.ts +19 -0
  189. package/{dist/serialization/types/BadRequestErrorBodyError.js → serialization/types/RcsFunctionalities.js} +10 -7
  190. package/serialization/types/RegisterCompanyResponse.d.ts +1 -2
  191. package/serialization/types/RegisterCompanyResponse.js +1 -2
  192. package/serialization/types/RegisterCompanyResponseBrand.d.ts +2 -2
  193. package/serialization/types/RegisterCompanyResponseBrand.js +2 -2
  194. package/serialization/types/UnauthorizedErrorBody.d.ts +1 -1
  195. package/serialization/types/UnauthorizedErrorBody.js +1 -1
  196. package/serialization/types/UpdateCompanyResponse.d.ts +1 -2
  197. package/serialization/types/UpdateCompanyResponse.js +1 -2
  198. package/serialization/types/UpdateCompanyResponseBrand.d.ts +2 -2
  199. package/serialization/types/UpdateCompanyResponseBrand.js +2 -2
  200. package/serialization/types/index.d.ts +6 -33
  201. package/serialization/types/index.js +6 -33
  202. package/version.d.ts +1 -1
  203. package/version.js +1 -1
  204. package/api/client/requests/CheckRcsCapabilityRequest.d.ts +0 -21
  205. package/api/client/requests/UpdateSettingsRequest.d.ts +0 -13
  206. package/api/errors/NotFoundError.d.ts +0 -8
  207. package/api/types/BadRequestErrorBodyError.d.ts +0 -10
  208. package/api/types/BasicRcs.d.ts +0 -13
  209. package/api/types/BasicRcsMessage.d.ts +0 -10
  210. package/api/types/Call.d.ts +0 -11
  211. package/api/types/CardRcs.d.ts +0 -12
  212. package/api/types/CardRcsMessage.d.ts +0 -13
  213. package/api/types/CardStyle.d.ts +0 -16
  214. package/api/types/CardStyleImageAlignment.d.ts +0 -11
  215. package/api/types/CardStyleImageAlignment.js +0 -10
  216. package/api/types/CardStyleMediaHeight.d.ts +0 -12
  217. package/api/types/CardStyleMediaHeight.js +0 -11
  218. package/api/types/CardStyleOrientation.d.ts +0 -11
  219. package/api/types/CardStyleOrientation.js +0 -10
  220. package/api/types/CardStyleWidth.d.ts +0 -11
  221. package/api/types/CardStyleWidth.js +0 -10
  222. package/api/types/CarouselRcs.d.ts +0 -12
  223. package/api/types/CarouselRcsMessage.d.ts +0 -13
  224. package/api/types/CheckRcsCapabilityResponse.d.ts +0 -7
  225. package/api/types/Event.d.ts +0 -17
  226. package/api/types/GetAccountNumberResponse.d.ts +0 -7
  227. package/api/types/LatLng.d.ts +0 -12
  228. package/api/types/MediaRcs.d.ts +0 -12
  229. package/api/types/MediaRcsMessage.d.ts +0 -14
  230. package/api/types/MediaType.d.ts +0 -14
  231. package/api/types/MediaType.js +0 -13
  232. package/api/types/PhoneNumber.d.ts +0 -7
  233. package/api/types/Postback.d.ts +0 -13
  234. package/api/types/SendMessageRequest.d.ts +0 -5
  235. package/api/types/SendMessageRequest.js +0 -5
  236. package/api/types/SendMessageResponse.d.ts +0 -7
  237. package/api/types/SendMessageResponse.js +0 -5
  238. package/api/types/ShareLocation.d.ts +0 -9
  239. package/api/types/ShareLocation.js +0 -5
  240. package/api/types/Sms.d.ts +0 -12
  241. package/api/types/Sms.js +0 -5
  242. package/api/types/SmsMessage.d.ts +0 -12
  243. package/api/types/SmsMessage.js +0 -5
  244. package/api/types/UpdateSettingsResponse.d.ts +0 -6
  245. package/api/types/UpdateSettingsResponse.js +0 -5
  246. package/api/types/Url.d.ts +0 -11
  247. package/api/types/Url.js +0 -5
  248. package/api/types/ViewLocation.d.ts +0 -13
  249. package/api/types/ViewLocation.js +0 -5
  250. package/dist/api/client/requests/CheckRcsCapabilityRequest.d.ts +0 -21
  251. package/dist/api/client/requests/CheckRcsCapabilityRequest.js +0 -5
  252. package/dist/api/client/requests/UpdateSettingsRequest.d.ts +0 -13
  253. package/dist/api/client/requests/UpdateSettingsRequest.js +0 -5
  254. package/dist/api/errors/NotFoundError.d.ts +0 -8
  255. package/dist/api/types/BadRequestErrorBodyError.d.ts +0 -10
  256. package/dist/api/types/BadRequestErrorBodyError.js +0 -5
  257. package/dist/api/types/BasicRcs.d.ts +0 -13
  258. package/dist/api/types/BasicRcs.js +0 -5
  259. package/dist/api/types/BasicRcsMessage.d.ts +0 -10
  260. package/dist/api/types/BasicRcsMessage.js +0 -5
  261. package/dist/api/types/Call.d.ts +0 -11
  262. package/dist/api/types/Call.js +0 -5
  263. package/dist/api/types/CardRcs.d.ts +0 -12
  264. package/dist/api/types/CardRcs.js +0 -5
  265. package/dist/api/types/CardRcsMessage.d.ts +0 -13
  266. package/dist/api/types/CardRcsMessage.js +0 -5
  267. package/dist/api/types/CardStyle.d.ts +0 -16
  268. package/dist/api/types/CardStyle.js +0 -5
  269. package/dist/api/types/CardStyleImageAlignment.d.ts +0 -11
  270. package/dist/api/types/CardStyleImageAlignment.js +0 -10
  271. package/dist/api/types/CardStyleMediaHeight.d.ts +0 -12
  272. package/dist/api/types/CardStyleMediaHeight.js +0 -11
  273. package/dist/api/types/CardStyleOrientation.d.ts +0 -11
  274. package/dist/api/types/CardStyleOrientation.js +0 -10
  275. package/dist/api/types/CardStyleWidth.d.ts +0 -11
  276. package/dist/api/types/CardStyleWidth.js +0 -10
  277. package/dist/api/types/CarouselRcs.d.ts +0 -12
  278. package/dist/api/types/CarouselRcs.js +0 -5
  279. package/dist/api/types/CarouselRcsMessage.d.ts +0 -13
  280. package/dist/api/types/CarouselRcsMessage.js +0 -5
  281. package/dist/api/types/CheckRcsCapabilityResponse.d.ts +0 -7
  282. package/dist/api/types/CheckRcsCapabilityResponse.js +0 -5
  283. package/dist/api/types/Event.d.ts +0 -17
  284. package/dist/api/types/Event.js +0 -5
  285. package/dist/api/types/GetAccountNumberResponse.d.ts +0 -7
  286. package/dist/api/types/GetAccountNumberResponse.js +0 -5
  287. package/dist/api/types/LatLng.d.ts +0 -12
  288. package/dist/api/types/LatLng.js +0 -5
  289. package/dist/api/types/MediaRcs.d.ts +0 -12
  290. package/dist/api/types/MediaRcs.js +0 -5
  291. package/dist/api/types/MediaRcsMessage.d.ts +0 -14
  292. package/dist/api/types/MediaRcsMessage.js +0 -5
  293. package/dist/api/types/MediaType.d.ts +0 -14
  294. package/dist/api/types/MediaType.js +0 -13
  295. package/dist/api/types/NotFoundErrorBody.js +0 -5
  296. package/dist/api/types/PhoneNumber.d.ts +0 -7
  297. package/dist/api/types/PhoneNumber.js +0 -5
  298. package/dist/api/types/Postback.d.ts +0 -13
  299. package/dist/api/types/Postback.js +0 -5
  300. package/dist/api/types/SendMessageRequest.d.ts +0 -5
  301. package/dist/api/types/SendMessageRequest.js +0 -5
  302. package/dist/api/types/SendMessageResponse.d.ts +0 -7
  303. package/dist/api/types/SendMessageResponse.js +0 -5
  304. package/dist/api/types/ShareLocation.d.ts +0 -9
  305. package/dist/api/types/ShareLocation.js +0 -5
  306. package/dist/api/types/Sms.d.ts +0 -12
  307. package/dist/api/types/Sms.js +0 -5
  308. package/dist/api/types/SmsMessage.d.ts +0 -12
  309. package/dist/api/types/SmsMessage.js +0 -5
  310. package/dist/api/types/UpdateSettingsResponse.d.ts +0 -6
  311. package/dist/api/types/UpdateSettingsResponse.js +0 -5
  312. package/dist/api/types/Url.d.ts +0 -11
  313. package/dist/api/types/Url.js +0 -5
  314. package/dist/api/types/ViewLocation.d.ts +0 -13
  315. package/dist/api/types/ViewLocation.js +0 -5
  316. package/dist/serialization/client/requests/UpdateSettingsRequest.d.ts +0 -12
  317. package/dist/serialization/types/BadRequestErrorBodyError.d.ts +0 -16
  318. package/dist/serialization/types/BasicRcs.d.ts +0 -18
  319. package/dist/serialization/types/CardRcs.d.ts +0 -16
  320. package/dist/serialization/types/CardRcs.js +0 -37
  321. package/dist/serialization/types/CardRcsMessage.d.ts +0 -15
  322. package/dist/serialization/types/CardRcsMessage.js +0 -36
  323. package/dist/serialization/types/CardStyle.d.ts +0 -20
  324. package/dist/serialization/types/CardStyle.js +0 -41
  325. package/dist/serialization/types/CardStyleImageAlignment.d.ts +0 -10
  326. package/dist/serialization/types/CardStyleMediaHeight.d.ts +0 -10
  327. package/dist/serialization/types/CardStyleMediaHeight.js +0 -31
  328. package/dist/serialization/types/CardStyleOrientation.d.ts +0 -10
  329. package/dist/serialization/types/CardStyleWidth.d.ts +0 -10
  330. package/dist/serialization/types/CardStyleWidth.js +0 -31
  331. package/dist/serialization/types/CarouselRcs.d.ts +0 -16
  332. package/dist/serialization/types/CarouselRcs.js +0 -37
  333. package/dist/serialization/types/CarouselRcsMessage.d.ts +0 -15
  334. package/dist/serialization/types/CarouselRcsMessage.js +0 -36
  335. package/dist/serialization/types/CheckRcsCapabilityResponse.d.ts +0 -13
  336. package/dist/serialization/types/Event.d.ts +0 -17
  337. package/dist/serialization/types/Event.js +0 -38
  338. package/dist/serialization/types/GetAccountNumberResponse.d.ts +0 -12
  339. package/dist/serialization/types/MediaRcs.d.ts +0 -16
  340. package/dist/serialization/types/MediaRcs.js +0 -37
  341. package/dist/serialization/types/MediaRcsMessage.d.ts +0 -16
  342. package/dist/serialization/types/MediaRcsMessage.js +0 -37
  343. package/dist/serialization/types/MediaType.d.ts +0 -10
  344. package/dist/serialization/types/MediaType.js +0 -31
  345. package/dist/serialization/types/PhoneNumber.d.ts +0 -10
  346. package/dist/serialization/types/PhoneNumber.js +0 -31
  347. package/dist/serialization/types/Postback.d.ts +0 -15
  348. package/dist/serialization/types/Postback.js +0 -36
  349. package/dist/serialization/types/SendMessageRequest.d.ts +0 -15
  350. package/dist/serialization/types/SendMessageRequest.js +0 -36
  351. package/dist/serialization/types/SendMessageResponse.d.ts +0 -12
  352. package/dist/serialization/types/SendMessageResponse.js +0 -33
  353. package/dist/serialization/types/ShareLocation.d.ts +0 -13
  354. package/dist/serialization/types/ShareLocation.js +0 -34
  355. package/dist/serialization/types/Sms.d.ts +0 -16
  356. package/dist/serialization/types/Sms.js +0 -37
  357. package/dist/serialization/types/SmsMessage.d.ts +0 -13
  358. package/dist/serialization/types/UpdateSettingsResponse.d.ts +0 -12
  359. package/dist/serialization/types/UpdateSettingsResponse.js +0 -33
  360. package/dist/serialization/types/Url.d.ts +0 -14
  361. package/dist/serialization/types/Url.js +0 -35
  362. package/dist/serialization/types/ViewLocation.d.ts +0 -16
  363. package/dist/serialization/types/ViewLocation.js +0 -37
  364. package/serialization/client/requests/UpdateSettingsRequest.d.ts +0 -12
  365. package/serialization/client/requests/UpdateSettingsRequest.js +0 -33
  366. package/serialization/types/BadRequestErrorBodyError.d.ts +0 -16
  367. package/serialization/types/BadRequestErrorBodyError.js +0 -37
  368. package/serialization/types/BasicRcs.d.ts +0 -18
  369. package/serialization/types/BasicRcs.js +0 -39
  370. package/serialization/types/BasicRcsMessage.d.ts +0 -12
  371. package/serialization/types/Call.d.ts +0 -14
  372. package/serialization/types/Call.js +0 -35
  373. package/serialization/types/CardRcs.d.ts +0 -16
  374. package/serialization/types/CardRcs.js +0 -37
  375. package/serialization/types/CardRcsMessage.d.ts +0 -15
  376. package/serialization/types/CardRcsMessage.js +0 -36
  377. package/serialization/types/CardStyle.d.ts +0 -20
  378. package/serialization/types/CardStyle.js +0 -41
  379. package/serialization/types/CardStyleImageAlignment.d.ts +0 -10
  380. package/serialization/types/CardStyleImageAlignment.js +0 -31
  381. package/serialization/types/CardStyleMediaHeight.d.ts +0 -10
  382. package/serialization/types/CardStyleMediaHeight.js +0 -31
  383. package/serialization/types/CardStyleOrientation.d.ts +0 -10
  384. package/serialization/types/CardStyleOrientation.js +0 -31
  385. package/serialization/types/CardStyleWidth.d.ts +0 -10
  386. package/serialization/types/CardStyleWidth.js +0 -31
  387. package/serialization/types/CarouselRcs.d.ts +0 -16
  388. package/serialization/types/CarouselRcs.js +0 -37
  389. package/serialization/types/CarouselRcsMessage.d.ts +0 -15
  390. package/serialization/types/CarouselRcsMessage.js +0 -36
  391. package/serialization/types/CheckRcsCapabilityResponse.d.ts +0 -13
  392. package/serialization/types/CheckRcsCapabilityResponse.js +0 -34
  393. package/serialization/types/Event.d.ts +0 -17
  394. package/serialization/types/Event.js +0 -38
  395. package/serialization/types/GetAccountNumberResponse.d.ts +0 -12
  396. package/serialization/types/GetAccountNumberResponse.js +0 -33
  397. package/serialization/types/LatLng.d.ts +0 -13
  398. package/serialization/types/LatLng.js +0 -34
  399. package/serialization/types/MediaRcs.d.ts +0 -16
  400. package/serialization/types/MediaRcs.js +0 -37
  401. package/serialization/types/MediaRcsMessage.d.ts +0 -16
  402. package/serialization/types/MediaRcsMessage.js +0 -37
  403. package/serialization/types/MediaType.d.ts +0 -10
  404. package/serialization/types/MediaType.js +0 -31
  405. package/serialization/types/NotFoundErrorBody.d.ts +0 -12
  406. package/serialization/types/NotFoundErrorBody.js +0 -33
  407. package/serialization/types/PhoneNumber.d.ts +0 -10
  408. package/serialization/types/PhoneNumber.js +0 -31
  409. package/serialization/types/Postback.d.ts +0 -15
  410. package/serialization/types/Postback.js +0 -36
  411. package/serialization/types/SendMessageRequest.d.ts +0 -15
  412. package/serialization/types/SendMessageRequest.js +0 -36
  413. package/serialization/types/SendMessageResponse.d.ts +0 -12
  414. package/serialization/types/SendMessageResponse.js +0 -33
  415. package/serialization/types/ShareLocation.d.ts +0 -13
  416. package/serialization/types/ShareLocation.js +0 -34
  417. package/serialization/types/Sms.d.ts +0 -16
  418. package/serialization/types/Sms.js +0 -37
  419. package/serialization/types/SmsMessage.d.ts +0 -13
  420. package/serialization/types/UpdateSettingsResponse.d.ts +0 -12
  421. package/serialization/types/UpdateSettingsResponse.js +0 -33
  422. package/serialization/types/Url.d.ts +0 -14
  423. package/serialization/types/Url.js +0 -35
  424. package/serialization/types/ViewLocation.d.ts +0 -16
  425. package/serialization/types/ViewLocation.js +0 -37
  426. /package/api/client/requests/{CheckRcsCapabilityRequest.js → GetRcsFunctionalityRequest.js} +0 -0
  427. /package/api/{client/requests/UpdateSettingsRequest.js → resources/send/client/requests/Rcs.js} +0 -0
  428. /package/api/{types/BadRequestErrorBodyError.js → resources/send/client/requests/SendMmsRequest.js} +0 -0
  429. /package/api/{types/BasicRcs.js → resources/send/client/requests/SendSmsRequest.js} +0 -0
  430. /package/api/{types/BasicRcsMessage.js → resources/send/types/SendMmsResponse.js} +0 -0
  431. /package/api/{types/Call.js → resources/send/types/SendRcsResponse.js} +0 -0
  432. /package/api/{types/CardRcs.js → resources/send/types/SendSmsResponse.js} +0 -0
  433. /package/api/types/{CardRcsMessage.js → ActionLatLong.js} +0 -0
  434. /package/api/types/{CardStyle.js → ForbiddenErrorBody.js} +0 -0
  435. /package/api/types/{CarouselRcs.js → RcsFunctionalities.js} +0 -0
  436. /package/{api/types/CarouselRcsMessage.js → dist/api/client/requests/GetRcsFunctionalityRequest.js} +0 -0
  437. /package/{api/types/CheckRcsCapabilityResponse.js → dist/api/resources/send/client/requests/Rcs.js} +0 -0
  438. /package/{api/types/Event.js → dist/api/resources/send/client/requests/SendMmsRequest.js} +0 -0
  439. /package/{api/types/GetAccountNumberResponse.js → dist/api/resources/send/client/requests/SendSmsRequest.js} +0 -0
  440. /package/{api/types/LatLng.js → dist/api/resources/send/types/SendMmsResponse.js} +0 -0
  441. /package/{api/types/MediaRcs.js → dist/api/resources/send/types/SendRcsResponse.js} +0 -0
  442. /package/{api/types/MediaRcsMessage.js → dist/api/resources/send/types/SendSmsResponse.js} +0 -0
  443. /package/{api/types/NotFoundErrorBody.js → dist/api/types/ActionLatLong.js} +0 -0
  444. /package/{api/types/PhoneNumber.js → dist/api/types/ForbiddenErrorBody.js} +0 -0
  445. /package/{api/types/Postback.js → dist/api/types/RcsFunctionalities.js} +0 -0
@@ -0,0 +1,86 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as environments from "../../../../environments";
5
+ import * as core from "../../../../core";
6
+ import * as Pinnacle from "../../../index";
7
+ export declare namespace Send {
8
+ interface Options {
9
+ environment?: core.Supplier<environments.PinnacleEnvironment | string>;
10
+ apiKey: core.Supplier<string>;
11
+ }
12
+ interface RequestOptions {
13
+ /** The maximum time to wait for a response in seconds. */
14
+ timeoutInSeconds?: number;
15
+ /** The number of times to retry the request. Defaults to 2. */
16
+ maxRetries?: number;
17
+ /** A hook to abort the request. */
18
+ abortSignal?: AbortSignal;
19
+ }
20
+ }
21
+ export declare class Send {
22
+ protected readonly _options: Send.Options;
23
+ constructor(_options: Send.Options);
24
+ /**
25
+ * Send an interactive RCS message with text, media, or cards. Each message can only contain either text, media, or card(s).
26
+ *
27
+ * Quick replies can also be added to the message.
28
+ *
29
+ * @param {Pinnacle.Rcs} request
30
+ * @param {Send.RequestOptions} requestOptions - Request-specific configuration.
31
+ *
32
+ * @throws {@link Pinnacle.BadRequestError}
33
+ * @throws {@link Pinnacle.UnauthorizedError}
34
+ * @throws {@link Pinnacle.ForbiddenError}
35
+ * @throws {@link Pinnacle.InternalServerError}
36
+ *
37
+ * @example
38
+ * await client.send.rcs({
39
+ * from: "from",
40
+ * to: "to"
41
+ * })
42
+ */
43
+ rcs(request: Pinnacle.Rcs, requestOptions?: Send.RequestOptions): Promise<Pinnacle.SendRcsResponse>;
44
+ /**
45
+ * Send an SMS message to a recipient.
46
+ *
47
+ * @param {Pinnacle.SendSmsRequest} request
48
+ * @param {Send.RequestOptions} requestOptions - Request-specific configuration.
49
+ *
50
+ * @throws {@link Pinnacle.BadRequestError}
51
+ * @throws {@link Pinnacle.UnauthorizedError}
52
+ * @throws {@link Pinnacle.ForbiddenError}
53
+ * @throws {@link Pinnacle.InternalServerError}
54
+ *
55
+ * @example
56
+ * await client.send.sms({
57
+ * to: "to",
58
+ * from: "from",
59
+ * text: "text"
60
+ * })
61
+ */
62
+ sms(request: Pinnacle.SendSmsRequest, requestOptions?: Send.RequestOptions): Promise<Pinnacle.SendSmsResponse>;
63
+ /**
64
+ * Send an MMS message with media attachments.
65
+ *
66
+ * @param {Pinnacle.SendMmsRequest} request
67
+ * @param {Send.RequestOptions} requestOptions - Request-specific configuration.
68
+ *
69
+ * @throws {@link Pinnacle.BadRequestError}
70
+ * @throws {@link Pinnacle.UnauthorizedError}
71
+ * @throws {@link Pinnacle.ForbiddenError}
72
+ * @throws {@link Pinnacle.InternalServerError}
73
+ *
74
+ * @example
75
+ * await client.send.mms({
76
+ * to: "to",
77
+ * from: "from",
78
+ * text: "text",
79
+ * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
80
+ * })
81
+ */
82
+ mms(request: Pinnacle.SendMmsRequest, requestOptions?: Send.RequestOptions): Promise<Pinnacle.SendMmsResponse>;
83
+ protected _getCustomAuthorizationHeaders(): Promise<{
84
+ "PINNACLE-API-Key": string;
85
+ }>;
86
+ }
@@ -0,0 +1,277 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ var desc = Object.getOwnPropertyDescriptor(m, k);
8
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
+ desc = { enumerable: true, get: function() { return m[k]; } };
10
+ }
11
+ Object.defineProperty(o, k2, desc);
12
+ }) : (function(o, m, k, k2) {
13
+ if (k2 === undefined) k2 = k;
14
+ o[k2] = m[k];
15
+ }));
16
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
18
+ }) : function(o, v) {
19
+ o["default"] = v;
20
+ });
21
+ var __importStar = (this && this.__importStar) || function (mod) {
22
+ if (mod && mod.__esModule) return mod;
23
+ var result = {};
24
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
+ __setModuleDefault(result, mod);
26
+ return result;
27
+ };
28
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
29
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
30
+ return new (P || (P = Promise))(function (resolve, reject) {
31
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
32
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
33
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
34
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
35
+ });
36
+ };
37
+ var __importDefault = (this && this.__importDefault) || function (mod) {
38
+ return (mod && mod.__esModule) ? mod : { "default": mod };
39
+ };
40
+ Object.defineProperty(exports, "__esModule", { value: true });
41
+ exports.Send = void 0;
42
+ const environments = __importStar(require("../../../../environments"));
43
+ const core = __importStar(require("../../../../core"));
44
+ const Pinnacle = __importStar(require("../../../index"));
45
+ const serializers = __importStar(require("../../../../serialization/index"));
46
+ const url_join_1 = __importDefault(require("url-join"));
47
+ const errors = __importStar(require("../../../../errors/index"));
48
+ class Send {
49
+ constructor(_options) {
50
+ this._options = _options;
51
+ }
52
+ /**
53
+ * Send an interactive RCS message with text, media, or cards. Each message can only contain either text, media, or card(s).
54
+ *
55
+ * Quick replies can also be added to the message.
56
+ *
57
+ * @param {Pinnacle.Rcs} request
58
+ * @param {Send.RequestOptions} requestOptions - Request-specific configuration.
59
+ *
60
+ * @throws {@link Pinnacle.BadRequestError}
61
+ * @throws {@link Pinnacle.UnauthorizedError}
62
+ * @throws {@link Pinnacle.ForbiddenError}
63
+ * @throws {@link Pinnacle.InternalServerError}
64
+ *
65
+ * @example
66
+ * await client.send.rcs({
67
+ * from: "from",
68
+ * to: "to"
69
+ * })
70
+ */
71
+ rcs(request, requestOptions) {
72
+ var _a;
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const _response = yield core.fetcher({
75
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/rcs"),
76
+ method: "POST",
77
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "rcs-js/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
78
+ contentType: "application/json",
79
+ requestType: "json",
80
+ body: serializers.Rcs.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
81
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
82
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
83
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
84
+ });
85
+ if (_response.ok) {
86
+ return serializers.SendRcsResponse.parseOrThrow(_response.body, {
87
+ unrecognizedObjectKeys: "passthrough",
88
+ allowUnrecognizedUnionMembers: true,
89
+ allowUnrecognizedEnumValues: true,
90
+ breadcrumbsPrefix: ["response"],
91
+ });
92
+ }
93
+ if (_response.error.reason === "status-code") {
94
+ switch (_response.error.statusCode) {
95
+ case 400:
96
+ throw new Pinnacle.BadRequestError(_response.error.body);
97
+ case 401:
98
+ throw new Pinnacle.UnauthorizedError(_response.error.body);
99
+ case 403:
100
+ throw new Pinnacle.ForbiddenError(_response.error.body);
101
+ case 500:
102
+ throw new Pinnacle.InternalServerError(_response.error.body);
103
+ default:
104
+ throw new errors.PinnacleError({
105
+ statusCode: _response.error.statusCode,
106
+ body: _response.error.body,
107
+ });
108
+ }
109
+ }
110
+ switch (_response.error.reason) {
111
+ case "non-json":
112
+ throw new errors.PinnacleError({
113
+ statusCode: _response.error.statusCode,
114
+ body: _response.error.rawBody,
115
+ });
116
+ case "timeout":
117
+ throw new errors.PinnacleTimeoutError();
118
+ case "unknown":
119
+ throw new errors.PinnacleError({
120
+ message: _response.error.errorMessage,
121
+ });
122
+ }
123
+ });
124
+ }
125
+ /**
126
+ * Send an SMS message to a recipient.
127
+ *
128
+ * @param {Pinnacle.SendSmsRequest} request
129
+ * @param {Send.RequestOptions} requestOptions - Request-specific configuration.
130
+ *
131
+ * @throws {@link Pinnacle.BadRequestError}
132
+ * @throws {@link Pinnacle.UnauthorizedError}
133
+ * @throws {@link Pinnacle.ForbiddenError}
134
+ * @throws {@link Pinnacle.InternalServerError}
135
+ *
136
+ * @example
137
+ * await client.send.sms({
138
+ * to: "to",
139
+ * from: "from",
140
+ * text: "text"
141
+ * })
142
+ */
143
+ sms(request, requestOptions) {
144
+ var _a;
145
+ return __awaiter(this, void 0, void 0, function* () {
146
+ const _response = yield core.fetcher({
147
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/sms"),
148
+ method: "POST",
149
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "rcs-js/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
150
+ contentType: "application/json",
151
+ requestType: "json",
152
+ body: serializers.SendSmsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
153
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
154
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
155
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
156
+ });
157
+ if (_response.ok) {
158
+ return serializers.SendSmsResponse.parseOrThrow(_response.body, {
159
+ unrecognizedObjectKeys: "passthrough",
160
+ allowUnrecognizedUnionMembers: true,
161
+ allowUnrecognizedEnumValues: true,
162
+ breadcrumbsPrefix: ["response"],
163
+ });
164
+ }
165
+ if (_response.error.reason === "status-code") {
166
+ switch (_response.error.statusCode) {
167
+ case 400:
168
+ throw new Pinnacle.BadRequestError(_response.error.body);
169
+ case 401:
170
+ throw new Pinnacle.UnauthorizedError(_response.error.body);
171
+ case 403:
172
+ throw new Pinnacle.ForbiddenError(_response.error.body);
173
+ case 500:
174
+ throw new Pinnacle.InternalServerError(_response.error.body);
175
+ default:
176
+ throw new errors.PinnacleError({
177
+ statusCode: _response.error.statusCode,
178
+ body: _response.error.body,
179
+ });
180
+ }
181
+ }
182
+ switch (_response.error.reason) {
183
+ case "non-json":
184
+ throw new errors.PinnacleError({
185
+ statusCode: _response.error.statusCode,
186
+ body: _response.error.rawBody,
187
+ });
188
+ case "timeout":
189
+ throw new errors.PinnacleTimeoutError();
190
+ case "unknown":
191
+ throw new errors.PinnacleError({
192
+ message: _response.error.errorMessage,
193
+ });
194
+ }
195
+ });
196
+ }
197
+ /**
198
+ * Send an MMS message with media attachments.
199
+ *
200
+ * @param {Pinnacle.SendMmsRequest} request
201
+ * @param {Send.RequestOptions} requestOptions - Request-specific configuration.
202
+ *
203
+ * @throws {@link Pinnacle.BadRequestError}
204
+ * @throws {@link Pinnacle.UnauthorizedError}
205
+ * @throws {@link Pinnacle.ForbiddenError}
206
+ * @throws {@link Pinnacle.InternalServerError}
207
+ *
208
+ * @example
209
+ * await client.send.mms({
210
+ * to: "to",
211
+ * from: "from",
212
+ * text: "text",
213
+ * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
214
+ * })
215
+ */
216
+ mms(request, requestOptions) {
217
+ var _a;
218
+ return __awaiter(this, void 0, void 0, function* () {
219
+ const _response = yield core.fetcher({
220
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send/mms"),
221
+ method: "POST",
222
+ headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.9", "User-Agent": "rcs-js/1.0.9", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
223
+ contentType: "application/json",
224
+ requestType: "json",
225
+ body: serializers.SendMmsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
226
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
227
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
228
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
229
+ });
230
+ if (_response.ok) {
231
+ return serializers.SendMmsResponse.parseOrThrow(_response.body, {
232
+ unrecognizedObjectKeys: "passthrough",
233
+ allowUnrecognizedUnionMembers: true,
234
+ allowUnrecognizedEnumValues: true,
235
+ breadcrumbsPrefix: ["response"],
236
+ });
237
+ }
238
+ if (_response.error.reason === "status-code") {
239
+ switch (_response.error.statusCode) {
240
+ case 400:
241
+ throw new Pinnacle.BadRequestError(_response.error.body);
242
+ case 401:
243
+ throw new Pinnacle.UnauthorizedError(_response.error.body);
244
+ case 403:
245
+ throw new Pinnacle.ForbiddenError(_response.error.body);
246
+ case 500:
247
+ throw new Pinnacle.InternalServerError(_response.error.body);
248
+ default:
249
+ throw new errors.PinnacleError({
250
+ statusCode: _response.error.statusCode,
251
+ body: _response.error.body,
252
+ });
253
+ }
254
+ }
255
+ switch (_response.error.reason) {
256
+ case "non-json":
257
+ throw new errors.PinnacleError({
258
+ statusCode: _response.error.statusCode,
259
+ body: _response.error.rawBody,
260
+ });
261
+ case "timeout":
262
+ throw new errors.PinnacleTimeoutError();
263
+ case "unknown":
264
+ throw new errors.PinnacleError({
265
+ message: _response.error.errorMessage,
266
+ });
267
+ }
268
+ });
269
+ }
270
+ _getCustomAuthorizationHeaders() {
271
+ return __awaiter(this, void 0, void 0, function* () {
272
+ const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
273
+ return { "PINNACLE-API-Key": apiKeyValue };
274
+ });
275
+ }
276
+ }
277
+ exports.Send = Send;
@@ -0,0 +1 @@
1
+ export * from "./requests";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests"), exports);
@@ -0,0 +1,43 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Pinnacle from "../../../../index";
5
+ /**
6
+ * @example
7
+ * {
8
+ * from: "from",
9
+ * to: "to"
10
+ * }
11
+ */
12
+ export interface Rcs {
13
+ /**
14
+ * The id of the RCS agent sending the message.
15
+ *
16
+ * Use 'test' if you want to send from the Pinnacle test agent. The test agent can only send to whitelisted test numbers.
17
+ *
18
+ * See https://dashboard.trypinnacle.app/settings/test-numbers to whitelist a number.
19
+ */
20
+ from: string;
21
+ /** The recipient's RCS-enabled phone number in E.164 format (e.g., +12345678901). */
22
+ to: string;
23
+ /**
24
+ * Text content of the message.
25
+ *
26
+ * Make sure you have either 'text', 'mediaUrl', or 'cards'. An error will be thrown if multiple (i.e. both 'text' and 'mediaUrl') is provided.
27
+ */
28
+ text?: string;
29
+ /**
30
+ * Media URL to be included in the message.
31
+ *
32
+ * Make sure you have either 'text', 'mediaUrl', or 'cards'. An error will be thrown if multiple (i.e. both 'text' and 'mediaUrl') is provided.
33
+ */
34
+ mediaUrl?: string;
35
+ /**
36
+ * List of rich cards. Maximum of 10 cards.
37
+ *
38
+ * Make sure you have either 'text', 'mediaUrl', or 'cards'. An error will be thrown if multiple (i.e. both 'text' and 'mediaUrl') is provided.
39
+ */
40
+ cards?: Pinnacle.Card[];
41
+ /** Optional list of quick reply actions (max 10). */
42
+ quickReplies?: Pinnacle.Action[];
43
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * to: "to",
8
+ * from: "from",
9
+ * text: "text",
10
+ * mediaUrls: ["https://example.com/image1.jpg", "https://example.com/video.mp4"]
11
+ * }
12
+ */
13
+ export interface SendMmsRequest {
14
+ /** The recipient's phone number in E.164 format (e.g., +12345678901). */
15
+ to: string;
16
+ /** The sender's phone number in E.164 format. Must be owned by the user. */
17
+ from: string;
18
+ /** The MMS message content (max 1600 characters). */
19
+ text: string;
20
+ /** The URLs of media to include. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported and have a size limit of 5 MB. 500 KB limit for other types. Up to 10 media URLs can be included. */
21
+ mediaUrls: string[];
22
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * to: "to",
8
+ * from: "from",
9
+ * text: "text"
10
+ * }
11
+ */
12
+ export interface SendSmsRequest {
13
+ /** The recipient's phone number in E.164 format (e.g., +12345678901). */
14
+ to: string;
15
+ /** The sender's phone number in E.164 format. Must be owned by the user. */
16
+ from: string;
17
+ /** The SMS message content (max 1600 characters). */
18
+ text: string;
19
+ }
@@ -0,0 +1,3 @@
1
+ export { type Rcs } from "./Rcs";
2
+ export { type SendSmsRequest } from "./SendSmsRequest";
3
+ export { type SendMmsRequest } from "./SendMmsRequest";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./types";
2
+ export * from "./client";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types"), exports);
18
+ __exportStar(require("./client"), exports);
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SendMmsResponse {
5
+ /** The unique ID of the sent message. */
6
+ messageId: string;
7
+ /** A message indicating the status of the sent message. */
8
+ message: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SendRcsResponse {
5
+ /** The unique ID of the sent message. */
6
+ messageId: string;
7
+ /** A message indicating the status of the sent message. */
8
+ message: string;
9
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface SendSmsResponse {
5
+ /** The unique ID of the sent message. */
6
+ messageId: string;
7
+ /** A message indicating the status of the sent message. */
8
+ message: string;
9
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./SendRcsResponse";
2
+ export * from "./SendSmsResponse";
3
+ export * from "./SendMmsResponse";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./SendRcsResponse"), exports);
18
+ __exportStar(require("./SendSmsResponse"), exports);
19
+ __exportStar(require("./SendMmsResponse"), exports);
@@ -2,4 +2,23 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  import * as Pinnacle from "../index";
5
- export declare type Action = Pinnacle.Url | Pinnacle.Call | Pinnacle.Postback | Pinnacle.ShareLocation | Pinnacle.ViewLocation;
5
+ export interface Action {
6
+ /** Title of the action (must be less than 25 characters). */
7
+ title?: string;
8
+ /** Type of action for the button. 'openUrl' opens a URL, 'call' dials a phone number, 'trigger' sends the predefined payload to the webhook when pressed, 'requestLocation' requests the user's location, 'scheduleEvent' creates a calendar event, 'sendLocation' sends a location. */
9
+ type?: Pinnacle.ActionType;
10
+ /** Optional payload associated with the action. This payload encodes the respective fields for the action type and is required. For 'openUrl', the payload is the URL to open. For 'call', the payload is the phone number to dial. For 'trigger', the payload is the predefined payload to send to the webhook. */
11
+ payload?: string;
12
+ /** Optional metadata. This is sent alongside the payload to the webhook. */
13
+ metadata?: string;
14
+ /** Start time for events. Required for 'scheduleEvent'. */
15
+ eventStartTime?: string;
16
+ /** End time for events. Required for 'scheduleEvent'. */
17
+ eventEndTime?: string;
18
+ /** Event title. Required for 'scheduleEvent'. */
19
+ eventTitle?: string;
20
+ /** Optional event description. */
21
+ eventDescription?: string;
22
+ /** Latitude and longitude coordinates. Required for 'sendLocation'. */
23
+ latLong?: Pinnacle.ActionLatLong;
24
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Latitude and longitude coordinates. Required for 'sendLocation'.
6
+ */
7
+ export interface ActionLatLong {
8
+ /** Latitude value. */
9
+ lat?: number;
10
+ /** Longitude value. */
11
+ lng?: number;
12
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Type of action for the button. 'openUrl' opens a URL, 'call' dials a phone number, 'trigger' sends the predefined payload to the webhook when pressed, 'requestLocation' requests the user's location, 'scheduleEvent' creates a calendar event, 'sendLocation' sends a location.
6
+ */
7
+ export declare type ActionType = "openUrl" | "call" | "trigger" | "requestLocation" | "scheduleEvent" | "sendLocation";
8
+ export declare const ActionType: {
9
+ readonly OpenUrl: "openUrl";
10
+ readonly Call: "call";
11
+ readonly Trigger: "trigger";
12
+ readonly RequestLocation: "requestLocation";
13
+ readonly ScheduleEvent: "scheduleEvent";
14
+ readonly SendLocation: "sendLocation";
15
+ };
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ActionType = void 0;
7
+ exports.ActionType = {
8
+ OpenUrl: "openUrl",
9
+ Call: "call",
10
+ Trigger: "trigger",
11
+ RequestLocation: "requestLocation",
12
+ ScheduleEvent: "scheduleEvent",
13
+ SendLocation: "sendLocation",
14
+ };
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- import * as Pinnacle from "../index";
5
4
  export interface BadRequestErrorBody {
6
- error?: Pinnacle.BadRequestErrorBodyError;
7
- success?: boolean;
5
+ errors?: string[];
8
6
  }