rcs-js 1.0.8 → 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
@@ -3,14 +3,12 @@
3
3
  */
4
4
  import * as Pinnacle from "../index";
5
5
  export interface Card {
6
- /** The title of the card */
6
+ /** The title of the card. */
7
7
  title: string;
8
- /** The subtitle of the card */
8
+ /** Optional subtitle for the card. */
9
9
  subtitle?: string;
10
- /** The URL of the image to be displayed on the card */
11
- imageUrl?: string;
12
- /** Array of buttons attached to the card. Maximum of 4 buttons. */
10
+ /** Optional media URL displayed with the card. */
11
+ mediaUrl?: string;
12
+ /** Optional list of buttons on the card (max 4). */
13
13
  buttons?: Pinnacle.Action[];
14
- /** The style of the card */
15
- cardStyle?: Pinnacle.CardStyle;
16
14
  }
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
- export interface NotFoundErrorBody {
5
- error?: string;
4
+ export interface ForbiddenErrorBody {
5
+ errors?: string[];
6
6
  }
@@ -2,6 +2,5 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface InternalServerErrorBody {
5
- success?: boolean;
6
- error?: string;
5
+ errors?: string[];
7
6
  }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export interface RcsFunctionalities {
5
+ /** Indicates if RCS is enabled. */
6
+ isEnabled: boolean;
7
+ /** Indicates if standalone rich cards are supported. */
8
+ standaloneRichCard: boolean;
9
+ /** Indicates if carousel rich cards are supported. */
10
+ carouselRichCard: boolean;
11
+ /** Indicates if buttons to create a calendar event are supported. */
12
+ createCalendarEventAction: boolean;
13
+ /** Indicates if dial buttons are supported. */
14
+ dialAction: boolean;
15
+ /** Indicates if open URL buttons are supported. */
16
+ openUrlAction: boolean;
17
+ /** Indicates if share location buttons are supported. */
18
+ shareLocationAction: boolean;
19
+ /** Indicates if view location buttons are supported. */
20
+ viewLocationAction: boolean;
21
+ }
@@ -3,6 +3,5 @@
3
3
  */
4
4
  import * as Pinnacle from "../index";
5
5
  export interface RegisterCompanyResponse {
6
- success?: boolean;
7
- brand?: Pinnacle.RegisterCompanyResponseBrand;
6
+ brand: Pinnacle.RegisterCompanyResponseBrand;
8
7
  }
@@ -2,6 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface RegisterCompanyResponseBrand {
5
- name?: string;
6
- id?: number;
5
+ name: string;
6
+ id: number;
7
7
  }
@@ -2,5 +2,5 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface UnauthorizedErrorBody {
5
- error?: string;
5
+ errors?: string[];
6
6
  }
@@ -3,6 +3,5 @@
3
3
  */
4
4
  import * as Pinnacle from "../index";
5
5
  export interface UpdateCompanyResponse {
6
- success?: boolean;
7
- brand?: Pinnacle.UpdateCompanyResponseBrand;
6
+ brand: Pinnacle.UpdateCompanyResponseBrand;
8
7
  }
@@ -2,6 +2,6 @@
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
4
  export interface UpdateCompanyResponseBrand {
5
- name?: string;
6
- id?: number;
5
+ name: string;
6
+ id: number;
7
7
  }
@@ -1,43 +1,12 @@
1
- export * from "./CheckRcsCapabilityResponse";
2
1
  export * from "./BadRequestErrorBody";
3
2
  export * from "./UnauthorizedErrorBody";
4
3
  export * from "./InternalServerErrorBody";
5
- export * from "./UpdateSettingsResponse";
6
- export * from "./GetAccountNumberResponse";
7
- export * from "./SendMessageRequest";
8
- export * from "./SendMessageResponse";
9
- export * from "./NotFoundErrorBody";
10
4
  export * from "./RegisterCompanyResponseBrand";
11
5
  export * from "./RegisterCompanyResponse";
12
- export * from "./BadRequestErrorBodyError";
13
6
  export * from "./UpdateCompanyResponseBrand";
14
7
  export * from "./UpdateCompanyResponse";
15
- export * from "./PhoneNumber";
16
- export * from "./Url";
17
- export * from "./Call";
18
- export * from "./Postback";
19
- export * from "./ShareLocation";
20
- export * from "./LatLng";
21
- export * from "./ViewLocation";
22
- export * from "./Event";
23
- export * from "./Action";
24
- export * from "./SmsMessage";
25
- export * from "./Sms";
26
- export * from "./BasicRcsMessage";
27
- export * from "./BasicRcs";
28
- export * from "./MediaType";
29
- export * from "./MediaRcsMessage";
30
- export * from "./MediaRcs";
31
- export * from "./CardStyleImageAlignment";
32
- export * from "./CardStyleMediaHeight";
33
- export * from "./CardStyleWidth";
34
- export * from "./CardStyleOrientation";
35
- export * from "./CardStyle";
36
- export * from "./Card";
37
- export * from "./CardRcsMessage";
38
- export * from "./CardRcs";
39
- export * from "./CarouselRcsMessage";
40
- export * from "./CarouselRcs";
8
+ export * from "./ForbiddenErrorBody";
9
+ export * from "./RcsFunctionalities";
41
10
  export * from "./CompanyAdditionalWebsitesItem";
42
11
  export * from "./CompanyAdditionalEmailsItem";
43
12
  export * from "./CompanyAdditionalPhoneNumbersItem";
@@ -49,3 +18,7 @@ export * from "./AdditionalWebsite";
49
18
  export * from "./AdditionalPhoneNumber";
50
19
  export * from "./AdditionalEmail";
51
20
  export * from "./Optionals";
21
+ export * from "./Card";
22
+ export * from "./ActionType";
23
+ export * from "./ActionLatLong";
24
+ export * from "./Action";
@@ -14,46 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./CheckRcsCapabilityResponse"), exports);
18
17
  __exportStar(require("./BadRequestErrorBody"), exports);
19
18
  __exportStar(require("./UnauthorizedErrorBody"), exports);
20
19
  __exportStar(require("./InternalServerErrorBody"), exports);
21
- __exportStar(require("./UpdateSettingsResponse"), exports);
22
- __exportStar(require("./GetAccountNumberResponse"), exports);
23
- __exportStar(require("./SendMessageRequest"), exports);
24
- __exportStar(require("./SendMessageResponse"), exports);
25
- __exportStar(require("./NotFoundErrorBody"), exports);
26
20
  __exportStar(require("./RegisterCompanyResponseBrand"), exports);
27
21
  __exportStar(require("./RegisterCompanyResponse"), exports);
28
- __exportStar(require("./BadRequestErrorBodyError"), exports);
29
22
  __exportStar(require("./UpdateCompanyResponseBrand"), exports);
30
23
  __exportStar(require("./UpdateCompanyResponse"), exports);
31
- __exportStar(require("./PhoneNumber"), exports);
32
- __exportStar(require("./Url"), exports);
33
- __exportStar(require("./Call"), exports);
34
- __exportStar(require("./Postback"), exports);
35
- __exportStar(require("./ShareLocation"), exports);
36
- __exportStar(require("./LatLng"), exports);
37
- __exportStar(require("./ViewLocation"), exports);
38
- __exportStar(require("./Event"), exports);
39
- __exportStar(require("./Action"), exports);
40
- __exportStar(require("./SmsMessage"), exports);
41
- __exportStar(require("./Sms"), exports);
42
- __exportStar(require("./BasicRcsMessage"), exports);
43
- __exportStar(require("./BasicRcs"), exports);
44
- __exportStar(require("./MediaType"), exports);
45
- __exportStar(require("./MediaRcsMessage"), exports);
46
- __exportStar(require("./MediaRcs"), exports);
47
- __exportStar(require("./CardStyleImageAlignment"), exports);
48
- __exportStar(require("./CardStyleMediaHeight"), exports);
49
- __exportStar(require("./CardStyleWidth"), exports);
50
- __exportStar(require("./CardStyleOrientation"), exports);
51
- __exportStar(require("./CardStyle"), exports);
52
- __exportStar(require("./Card"), exports);
53
- __exportStar(require("./CardRcsMessage"), exports);
54
- __exportStar(require("./CardRcs"), exports);
55
- __exportStar(require("./CarouselRcsMessage"), exports);
56
- __exportStar(require("./CarouselRcs"), exports);
24
+ __exportStar(require("./ForbiddenErrorBody"), exports);
25
+ __exportStar(require("./RcsFunctionalities"), exports);
57
26
  __exportStar(require("./CompanyAdditionalWebsitesItem"), exports);
58
27
  __exportStar(require("./CompanyAdditionalEmailsItem"), exports);
59
28
  __exportStar(require("./CompanyAdditionalPhoneNumbersItem"), exports);
@@ -65,3 +34,7 @@ __exportStar(require("./AdditionalWebsite"), exports);
65
34
  __exportStar(require("./AdditionalPhoneNumber"), exports);
66
35
  __exportStar(require("./AdditionalEmail"), exports);
67
36
  __exportStar(require("./Optionals"), exports);
37
+ __exportStar(require("./Card"), exports);
38
+ __exportStar(require("./ActionType"), exports);
39
+ __exportStar(require("./ActionLatLong"), exports);
40
+ __exportStar(require("./Action"), exports);
package/dist/Client.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  import * as environments from "./environments";
5
5
  import * as core from "./core";
6
6
  import * as Pinnacle from "./api/index";
7
+ import { Send } from "./api/resources/send/client/Client";
7
8
  export declare namespace PinnacleClient {
8
9
  interface Options {
9
10
  environment?: core.Supplier<environments.PinnacleEnvironment | string>;
@@ -22,9 +23,9 @@ export declare class PinnacleClient {
22
23
  protected readonly _options: PinnacleClient.Options;
23
24
  constructor(_options: PinnacleClient.Options);
24
25
  /**
25
- * Checks if a phone number is able to receive RCS
26
+ * Retrieve the RCS functionality of a phone number. For example checks if a phone number can receive RCS message and if it can receive RCS carousels.
26
27
  *
27
- * @param {Pinnacle.CheckRcsCapabilityRequest} request
28
+ * @param {Pinnacle.GetRcsFunctionalityRequest} request
28
29
  * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
29
30
  *
30
31
  * @throws {@link Pinnacle.BadRequestError}
@@ -32,61 +33,9 @@ export declare class PinnacleClient {
32
33
  * @throws {@link Pinnacle.InternalServerError}
33
34
  *
34
35
  * @example
35
- * await client.checkRcsCapability({
36
- * phoneNumber: "phone_number"
37
- * })
38
- */
39
- checkRcsCapability(request: Pinnacle.CheckRcsCapabilityRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.CheckRcsCapabilityResponse>;
40
- /**
41
- * Initializes settings related to RCS messaging, including webhook registration.
42
- *
43
- * @param {Pinnacle.UpdateSettingsRequest} request
44
- * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
45
- *
46
- * @throws {@link Pinnacle.BadRequestError}
47
- * @throws {@link Pinnacle.UnauthorizedError}
48
- * @throws {@link Pinnacle.InternalServerError}
49
- *
50
- * @example
51
- * await client.updateSettings({
52
- * webhookUrl: "webhook_url"
53
- * })
54
- */
55
- updateSettings(request: Pinnacle.UpdateSettingsRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.UpdateSettingsResponse>;
56
- /**
57
- * Retrieve the phone number associated with the account.
58
- *
59
- * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
60
- *
61
- * @throws {@link Pinnacle.UnauthorizedError}
62
- * @throws {@link Pinnacle.InternalServerError}
63
- *
64
- * @example
65
- * await client.getAccountNumber()
66
- */
67
- getAccountNumber(requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.GetAccountNumberResponse>;
68
- /**
69
- * Send a SMS or RCS message to a phone number
70
- *
71
- * @param {Pinnacle.SendMessageRequest} request
72
- * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
73
- *
74
- * @throws {@link Pinnacle.BadRequestError}
75
- * @throws {@link Pinnacle.UnauthorizedError}
76
- * @throws {@link Pinnacle.InternalServerError}
77
- *
78
- * @example
79
- * await client.sendMessage({
80
- * phoneNumber: "phone_number",
81
- * messageType: "card",
82
- * message: {
83
- * cards: [{
84
- * title: "title"
85
- * }]
86
- * }
87
- * })
36
+ * await client.getRcsFunctionality()
88
37
  */
89
- sendMessage(request: Pinnacle.SendMessageRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.SendMessageResponse>;
38
+ getRcsFunctionality(request?: Pinnacle.GetRcsFunctionalityRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.RcsFunctionalities>;
90
39
  /**
91
40
  * Retrieve the company's information (i.e. approval status, company name, etc.). Search by company ID or company name.
92
41
  *
@@ -95,7 +44,6 @@ export declare class PinnacleClient {
95
44
  *
96
45
  * @throws {@link Pinnacle.BadRequestError}
97
46
  * @throws {@link Pinnacle.UnauthorizedError}
98
- * @throws {@link Pinnacle.NotFoundError}
99
47
  * @throws {@link Pinnacle.InternalServerError}
100
48
  *
101
49
  * @example
@@ -157,6 +105,8 @@ export declare class PinnacleClient {
157
105
  * })
158
106
  */
159
107
  updateCompany(request: Pinnacle.UpdateCompanyRequest, requestOptions?: PinnacleClient.RequestOptions): Promise<Pinnacle.UpdateCompanyResponse>;
108
+ protected _send: Send | undefined;
109
+ get send(): Send;
160
110
  protected _getCustomAuthorizationHeaders(): Promise<{
161
111
  "PINNACLE-API-Key": string;
162
112
  }>;
package/dist/Client.js CHANGED
@@ -45,14 +45,15 @@ const Pinnacle = __importStar(require("./api/index"));
45
45
  const url_join_1 = __importDefault(require("url-join"));
46
46
  const serializers = __importStar(require("./serialization/index"));
47
47
  const errors = __importStar(require("./errors/index"));
48
+ const Client_1 = require("./api/resources/send/client/Client");
48
49
  class PinnacleClient {
49
50
  constructor(_options) {
50
51
  this._options = _options;
51
52
  }
52
53
  /**
53
- * Checks if a phone number is able to receive RCS
54
+ * Retrieve the RCS functionality of a phone number. For example checks if a phone number can receive RCS message and if it can receive RCS carousels.
54
55
  *
55
- * @param {Pinnacle.CheckRcsCapabilityRequest} request
56
+ * @param {Pinnacle.GetRcsFunctionalityRequest} request
56
57
  * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
57
58
  *
58
59
  * @throws {@link Pinnacle.BadRequestError}
@@ -60,229 +61,29 @@ class PinnacleClient {
60
61
  * @throws {@link Pinnacle.InternalServerError}
61
62
  *
62
63
  * @example
63
- * await client.checkRcsCapability({
64
- * phoneNumber: "phone_number"
65
- * })
64
+ * await client.getRcsFunctionality()
66
65
  */
67
- checkRcsCapability(request, requestOptions) {
66
+ getRcsFunctionality(request = {}, requestOptions) {
68
67
  var _a;
69
68
  return __awaiter(this, void 0, void 0, function* () {
70
69
  const { phoneNumber } = request;
71
70
  const _queryParams = {};
72
- _queryParams["phone_number"] = phoneNumber;
73
- const _response = yield core.fetcher({
74
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "check_rcs"),
75
- method: "GET",
76
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
77
- contentType: "application/json",
78
- queryParameters: _queryParams,
79
- requestType: "json",
80
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
81
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
82
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
83
- });
84
- if (_response.ok) {
85
- return serializers.CheckRcsCapabilityResponse.parseOrThrow(_response.body, {
86
- unrecognizedObjectKeys: "passthrough",
87
- allowUnrecognizedUnionMembers: true,
88
- allowUnrecognizedEnumValues: true,
89
- breadcrumbsPrefix: ["response"],
90
- });
91
- }
92
- if (_response.error.reason === "status-code") {
93
- switch (_response.error.statusCode) {
94
- case 400:
95
- throw new Pinnacle.BadRequestError(_response.error.body);
96
- case 401:
97
- throw new Pinnacle.UnauthorizedError(_response.error.body);
98
- case 500:
99
- throw new Pinnacle.InternalServerError(_response.error.body);
100
- default:
101
- throw new errors.PinnacleError({
102
- statusCode: _response.error.statusCode,
103
- body: _response.error.body,
104
- });
105
- }
106
- }
107
- switch (_response.error.reason) {
108
- case "non-json":
109
- throw new errors.PinnacleError({
110
- statusCode: _response.error.statusCode,
111
- body: _response.error.rawBody,
112
- });
113
- case "timeout":
114
- throw new errors.PinnacleTimeoutError();
115
- case "unknown":
116
- throw new errors.PinnacleError({
117
- message: _response.error.errorMessage,
118
- });
71
+ if (phoneNumber != null) {
72
+ _queryParams["phoneNumber"] = phoneNumber;
119
73
  }
120
- });
121
- }
122
- /**
123
- * Initializes settings related to RCS messaging, including webhook registration.
124
- *
125
- * @param {Pinnacle.UpdateSettingsRequest} request
126
- * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
127
- *
128
- * @throws {@link Pinnacle.BadRequestError}
129
- * @throws {@link Pinnacle.UnauthorizedError}
130
- * @throws {@link Pinnacle.InternalServerError}
131
- *
132
- * @example
133
- * await client.updateSettings({
134
- * webhookUrl: "webhook_url"
135
- * })
136
- */
137
- updateSettings(request, requestOptions) {
138
- var _a;
139
- return __awaiter(this, void 0, void 0, function* () {
140
74
  const _response = yield core.fetcher({
141
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "update_settings"),
142
- method: "POST",
143
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
144
- contentType: "application/json",
145
- requestType: "json",
146
- body: serializers.UpdateSettingsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
147
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
148
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
149
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
150
- });
151
- if (_response.ok) {
152
- return serializers.UpdateSettingsResponse.parseOrThrow(_response.body, {
153
- unrecognizedObjectKeys: "passthrough",
154
- allowUnrecognizedUnionMembers: true,
155
- allowUnrecognizedEnumValues: true,
156
- breadcrumbsPrefix: ["response"],
157
- });
158
- }
159
- if (_response.error.reason === "status-code") {
160
- switch (_response.error.statusCode) {
161
- case 400:
162
- throw new Pinnacle.BadRequestError(_response.error.body);
163
- case 401:
164
- throw new Pinnacle.UnauthorizedError(_response.error.body);
165
- case 500:
166
- throw new Pinnacle.InternalServerError(_response.error.body);
167
- default:
168
- throw new errors.PinnacleError({
169
- statusCode: _response.error.statusCode,
170
- body: _response.error.body,
171
- });
172
- }
173
- }
174
- switch (_response.error.reason) {
175
- case "non-json":
176
- throw new errors.PinnacleError({
177
- statusCode: _response.error.statusCode,
178
- body: _response.error.rawBody,
179
- });
180
- case "timeout":
181
- throw new errors.PinnacleTimeoutError();
182
- case "unknown":
183
- throw new errors.PinnacleError({
184
- message: _response.error.errorMessage,
185
- });
186
- }
187
- });
188
- }
189
- /**
190
- * Retrieve the phone number associated with the account.
191
- *
192
- * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
193
- *
194
- * @throws {@link Pinnacle.UnauthorizedError}
195
- * @throws {@link Pinnacle.InternalServerError}
196
- *
197
- * @example
198
- * await client.getAccountNumber()
199
- */
200
- getAccountNumber(requestOptions) {
201
- var _a;
202
- return __awaiter(this, void 0, void 0, function* () {
203
- const _response = yield core.fetcher({
204
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "get_account_number"),
75
+ url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "rcs_functionality"),
205
76
  method: "GET",
206
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
207
- contentType: "application/json",
208
- requestType: "json",
209
- timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
210
- maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
211
- abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
212
- });
213
- if (_response.ok) {
214
- return serializers.GetAccountNumberResponse.parseOrThrow(_response.body, {
215
- unrecognizedObjectKeys: "passthrough",
216
- allowUnrecognizedUnionMembers: true,
217
- allowUnrecognizedEnumValues: true,
218
- breadcrumbsPrefix: ["response"],
219
- });
220
- }
221
- if (_response.error.reason === "status-code") {
222
- switch (_response.error.statusCode) {
223
- case 401:
224
- throw new Pinnacle.UnauthorizedError(_response.error.body);
225
- case 500:
226
- throw new Pinnacle.InternalServerError(_response.error.body);
227
- default:
228
- throw new errors.PinnacleError({
229
- statusCode: _response.error.statusCode,
230
- body: _response.error.body,
231
- });
232
- }
233
- }
234
- switch (_response.error.reason) {
235
- case "non-json":
236
- throw new errors.PinnacleError({
237
- statusCode: _response.error.statusCode,
238
- body: _response.error.rawBody,
239
- });
240
- case "timeout":
241
- throw new errors.PinnacleTimeoutError();
242
- case "unknown":
243
- throw new errors.PinnacleError({
244
- message: _response.error.errorMessage,
245
- });
246
- }
247
- });
248
- }
249
- /**
250
- * Send a SMS or RCS message to a phone number
251
- *
252
- * @param {Pinnacle.SendMessageRequest} request
253
- * @param {PinnacleClient.RequestOptions} requestOptions - Request-specific configuration.
254
- *
255
- * @throws {@link Pinnacle.BadRequestError}
256
- * @throws {@link Pinnacle.UnauthorizedError}
257
- * @throws {@link Pinnacle.InternalServerError}
258
- *
259
- * @example
260
- * await client.sendMessage({
261
- * phoneNumber: "phone_number",
262
- * messageType: "card",
263
- * message: {
264
- * cards: [{
265
- * title: "title"
266
- * }]
267
- * }
268
- * })
269
- */
270
- sendMessage(request, requestOptions) {
271
- var _a;
272
- return __awaiter(this, void 0, void 0, function* () {
273
- const _response = yield core.fetcher({
274
- url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "send"),
275
- method: "POST",
276
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
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())),
277
78
  contentType: "application/json",
79
+ queryParameters: _queryParams,
278
80
  requestType: "json",
279
- body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
280
81
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
281
82
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
282
83
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
283
84
  });
284
85
  if (_response.ok) {
285
- return serializers.SendMessageResponse.parseOrThrow(_response.body, {
86
+ return serializers.RcsFunctionalities.parseOrThrow(_response.body, {
286
87
  unrecognizedObjectKeys: "passthrough",
287
88
  allowUnrecognizedUnionMembers: true,
288
89
  allowUnrecognizedEnumValues: true,
@@ -327,7 +128,6 @@ class PinnacleClient {
327
128
  *
328
129
  * @throws {@link Pinnacle.BadRequestError}
329
130
  * @throws {@link Pinnacle.UnauthorizedError}
330
- * @throws {@link Pinnacle.NotFoundError}
331
131
  * @throws {@link Pinnacle.InternalServerError}
332
132
  *
333
133
  * @example
@@ -347,7 +147,7 @@ class PinnacleClient {
347
147
  const _response = yield core.fetcher({
348
148
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company"),
349
149
  method: "GET",
350
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
150
+ 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())),
351
151
  contentType: "application/json",
352
152
  queryParameters: _queryParams,
353
153
  requestType: "json",
@@ -369,13 +169,6 @@ class PinnacleClient {
369
169
  throw new Pinnacle.BadRequestError(_response.error.body);
370
170
  case 401:
371
171
  throw new Pinnacle.UnauthorizedError(_response.error.body);
372
- case 404:
373
- throw new Pinnacle.NotFoundError(serializers.NotFoundErrorBody.parseOrThrow(_response.error.body, {
374
- unrecognizedObjectKeys: "passthrough",
375
- allowUnrecognizedUnionMembers: true,
376
- allowUnrecognizedEnumValues: true,
377
- breadcrumbsPrefix: ["response"],
378
- }));
379
172
  case 500:
380
173
  throw new Pinnacle.InternalServerError(_response.error.body);
381
174
  default:
@@ -444,7 +237,7 @@ class PinnacleClient {
444
237
  const _response = yield core.fetcher({
445
238
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/register"),
446
239
  method: "POST",
447
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
240
+ 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())),
448
241
  contentType: "application/json",
449
242
  requestType: "json",
450
243
  body: serializers.RegisterCompanyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -511,7 +304,7 @@ class PinnacleClient {
511
304
  const _response = yield core.fetcher({
512
305
  url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.environment))) !== null && _a !== void 0 ? _a : environments.PinnacleEnvironment.Default, "company/update"),
513
306
  method: "POST",
514
- headers: Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "rcs-js", "X-Fern-SDK-Version": "1.0.8", "User-Agent": "rcs-js/1.0.8", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())),
307
+ 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())),
515
308
  contentType: "application/json",
516
309
  requestType: "json",
517
310
  body: serializers.UpdateCompanyRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
@@ -557,6 +350,10 @@ class PinnacleClient {
557
350
  }
558
351
  });
559
352
  }
353
+ get send() {
354
+ var _a;
355
+ return ((_a = this._send) !== null && _a !== void 0 ? _a : (this._send = new Client_1.Send(this._options)));
356
+ }
560
357
  _getCustomAuthorizationHeaders() {
561
358
  return __awaiter(this, void 0, void 0, function* () {
562
359
  const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {}
7
+ */
8
+ export interface GetRcsFunctionalityRequest {
9
+ /**
10
+ * The phone number to check for RCS functionality. Should be in E.164 format (i.e. +12345678901).
11
+ */
12
+ phoneNumber?: string;
13
+ }