contiguity 0.0.4 → 0.0.6

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 (386) hide show
  1. package/README.md +156 -48
  2. package/dist/cjs/client.d.ts +27 -0
  3. package/dist/cjs/client.d.ts.map +1 -0
  4. package/dist/cjs/client.js +43 -0
  5. package/dist/cjs/index.d.ts +13 -0
  6. package/dist/cjs/index.d.ts.map +1 -0
  7. package/dist/cjs/index.js +11 -0
  8. package/dist/cjs/resources/conversations.d.ts +30 -0
  9. package/dist/cjs/resources/conversations.d.ts.map +1 -0
  10. package/dist/cjs/resources/conversations.js +24 -0
  11. package/dist/cjs/resources/domains.d.ts +39 -0
  12. package/dist/cjs/resources/domains.d.ts.map +1 -0
  13. package/dist/cjs/resources/domains.js +28 -0
  14. package/dist/cjs/resources/email.d.ts +17 -0
  15. package/dist/cjs/resources/email.d.ts.map +1 -0
  16. package/dist/cjs/resources/email.js +19 -0
  17. package/dist/cjs/resources/imessage.d.ts +49 -0
  18. package/dist/cjs/resources/imessage.d.ts.map +1 -0
  19. package/dist/cjs/resources/imessage.js +42 -0
  20. package/dist/cjs/resources/lease.d.ts +55 -0
  21. package/dist/cjs/resources/lease.d.ts.map +1 -0
  22. package/dist/cjs/resources/lease.js +34 -0
  23. package/dist/cjs/resources/otp.d.ts +63 -0
  24. package/dist/cjs/resources/otp.d.ts.map +1 -0
  25. package/dist/cjs/resources/otp.js +48 -0
  26. package/dist/cjs/resources/text.d.ts +17 -0
  27. package/dist/cjs/resources/text.d.ts.map +1 -0
  28. package/dist/cjs/resources/text.js +19 -0
  29. package/dist/cjs/resources/voice.d.ts +129 -0
  30. package/dist/cjs/resources/voice.d.ts.map +1 -0
  31. package/dist/cjs/resources/voice.js +95 -0
  32. package/dist/cjs/resources/webhook.d.ts +21 -0
  33. package/dist/cjs/resources/webhook.d.ts.map +1 -0
  34. package/dist/cjs/resources/webhook.js +47 -0
  35. package/dist/cjs/resources/whatsapp.d.ts +33 -0
  36. package/dist/cjs/resources/whatsapp.d.ts.map +1 -0
  37. package/dist/cjs/resources/whatsapp.js +32 -0
  38. package/dist/cjs/schemas/conversations.d.ts +5 -0
  39. package/dist/cjs/schemas/conversations.d.ts.map +1 -0
  40. package/dist/cjs/schemas/conversations.js +5 -0
  41. package/dist/cjs/schemas/domains.d.ts +7 -0
  42. package/dist/cjs/schemas/domains.d.ts.map +1 -0
  43. package/dist/cjs/schemas/domains.js +10 -0
  44. package/dist/cjs/schemas/email.d.ts +16 -0
  45. package/dist/cjs/schemas/email.d.ts.map +1 -0
  46. package/dist/cjs/schemas/email.js +16 -0
  47. package/dist/cjs/schemas/imessage.d.ts +25 -0
  48. package/dist/cjs/schemas/imessage.d.ts.map +1 -0
  49. package/dist/cjs/schemas/imessage.js +25 -0
  50. package/dist/cjs/schemas/index.d.ts +10 -0
  51. package/dist/cjs/schemas/index.d.ts.map +1 -0
  52. package/dist/cjs/schemas/index.js +25 -0
  53. package/dist/cjs/schemas/leases.d.ts +9 -0
  54. package/dist/cjs/schemas/leases.d.ts.map +1 -0
  55. package/dist/cjs/schemas/leases.js +9 -0
  56. package/dist/cjs/schemas/otp.d.ts +25 -0
  57. package/dist/cjs/schemas/otp.d.ts.map +1 -0
  58. package/dist/cjs/schemas/otp.js +16 -0
  59. package/dist/cjs/schemas/text.d.ts +9 -0
  60. package/dist/cjs/schemas/text.d.ts.map +1 -0
  61. package/dist/cjs/schemas/text.js +12 -0
  62. package/dist/cjs/schemas/voice.d.ts +5 -0
  63. package/dist/cjs/schemas/voice.d.ts.map +1 -0
  64. package/dist/cjs/schemas/voice.js +5 -0
  65. package/dist/cjs/schemas/whatsapp.d.ts +25 -0
  66. package/dist/cjs/schemas/whatsapp.d.ts.map +1 -0
  67. package/dist/cjs/schemas/whatsapp.js +25 -0
  68. package/dist/cjs/types/index.d.ts +3 -0
  69. package/dist/cjs/types/index.d.ts.map +1 -0
  70. package/dist/cjs/types/index.js +18 -0
  71. package/dist/cjs/types/responses.d.ts +8 -0
  72. package/dist/cjs/types/responses.d.ts.map +1 -0
  73. package/dist/cjs/types/responses.js +2 -0
  74. package/dist/cjs/types/webhooks.d.ts +10 -0
  75. package/dist/cjs/types/webhooks.d.ts.map +1 -0
  76. package/dist/cjs/types/webhooks.js +2 -0
  77. package/dist/cjs/utils/errors.d.ts +6 -0
  78. package/dist/cjs/utils/errors.d.ts.map +1 -0
  79. package/dist/cjs/utils/errors.js +15 -0
  80. package/dist/cjs/utils/request.d.ts +27 -0
  81. package/dist/cjs/utils/request.d.ts.map +1 -0
  82. package/dist/cjs/utils/request.js +36 -0
  83. package/dist/cjs/utils/response.d.ts +12 -0
  84. package/dist/cjs/utils/response.d.ts.map +1 -0
  85. package/dist/cjs/utils/response.js +12 -0
  86. package/dist/cjs/webhook/parse.d.ts +6 -0
  87. package/dist/cjs/webhook/parse.d.ts.map +1 -0
  88. package/dist/cjs/webhook/parse.js +14 -0
  89. package/dist/cjs/webhook/verify.d.ts +6 -0
  90. package/dist/cjs/webhook/verify.d.ts.map +1 -0
  91. package/dist/cjs/webhook/verify.js +39 -0
  92. package/dist/client.d.ts +23 -0
  93. package/dist/client.d.ts.map +1 -0
  94. package/dist/client.js +44 -0
  95. package/dist/esm/client.d.ts +27 -0
  96. package/dist/esm/client.d.ts.map +1 -0
  97. package/dist/esm/client.js +39 -0
  98. package/dist/esm/index.d.ts +13 -0
  99. package/dist/esm/index.d.ts.map +1 -0
  100. package/dist/esm/index.js +4 -0
  101. package/dist/esm/resources/conversations.d.ts +30 -0
  102. package/dist/esm/resources/conversations.d.ts.map +1 -0
  103. package/dist/esm/resources/conversations.js +20 -0
  104. package/dist/esm/resources/domains.d.ts +39 -0
  105. package/dist/esm/resources/domains.d.ts.map +1 -0
  106. package/dist/esm/resources/domains.js +24 -0
  107. package/dist/esm/resources/email.d.ts +17 -0
  108. package/dist/esm/resources/email.d.ts.map +1 -0
  109. package/dist/esm/resources/email.js +15 -0
  110. package/dist/esm/resources/imessage.d.ts +49 -0
  111. package/dist/esm/resources/imessage.d.ts.map +1 -0
  112. package/dist/esm/resources/imessage.js +38 -0
  113. package/dist/esm/resources/lease.d.ts +55 -0
  114. package/dist/esm/resources/lease.d.ts.map +1 -0
  115. package/dist/esm/resources/lease.js +30 -0
  116. package/dist/esm/resources/otp.d.ts +63 -0
  117. package/dist/esm/resources/otp.d.ts.map +1 -0
  118. package/dist/esm/resources/otp.js +44 -0
  119. package/dist/esm/resources/text.d.ts +17 -0
  120. package/dist/esm/resources/text.d.ts.map +1 -0
  121. package/dist/esm/resources/text.js +15 -0
  122. package/dist/esm/resources/voice.d.ts +129 -0
  123. package/dist/esm/resources/voice.d.ts.map +1 -0
  124. package/dist/esm/resources/voice.js +91 -0
  125. package/dist/esm/resources/webhook.d.ts +21 -0
  126. package/dist/esm/resources/webhook.d.ts.map +1 -0
  127. package/dist/esm/resources/webhook.js +43 -0
  128. package/dist/esm/resources/whatsapp.d.ts +33 -0
  129. package/dist/esm/resources/whatsapp.d.ts.map +1 -0
  130. package/dist/esm/resources/whatsapp.js +28 -0
  131. package/dist/esm/schemas/conversations.d.ts +5 -0
  132. package/dist/esm/schemas/conversations.d.ts.map +1 -0
  133. package/dist/esm/schemas/conversations.js +2 -0
  134. package/dist/esm/schemas/domains.d.ts +7 -0
  135. package/dist/esm/schemas/domains.d.ts.map +1 -0
  136. package/dist/esm/schemas/domains.js +7 -0
  137. package/dist/esm/schemas/email.d.ts +16 -0
  138. package/dist/esm/schemas/email.d.ts.map +1 -0
  139. package/dist/esm/schemas/email.js +13 -0
  140. package/dist/esm/schemas/imessage.d.ts +25 -0
  141. package/dist/esm/schemas/imessage.d.ts.map +1 -0
  142. package/dist/esm/schemas/imessage.js +22 -0
  143. package/dist/esm/schemas/index.d.ts +10 -0
  144. package/dist/esm/schemas/index.d.ts.map +1 -0
  145. package/dist/esm/schemas/index.js +9 -0
  146. package/dist/esm/schemas/leases.d.ts +9 -0
  147. package/dist/esm/schemas/leases.d.ts.map +1 -0
  148. package/dist/esm/schemas/leases.js +6 -0
  149. package/dist/esm/schemas/otp.d.ts +25 -0
  150. package/dist/esm/schemas/otp.d.ts.map +1 -0
  151. package/dist/esm/schemas/otp.js +13 -0
  152. package/dist/esm/schemas/text.d.ts +9 -0
  153. package/dist/esm/schemas/text.d.ts.map +1 -0
  154. package/dist/esm/schemas/text.js +9 -0
  155. package/dist/esm/schemas/voice.d.ts +5 -0
  156. package/dist/esm/schemas/voice.d.ts.map +1 -0
  157. package/dist/esm/schemas/voice.js +2 -0
  158. package/dist/esm/schemas/whatsapp.d.ts +25 -0
  159. package/dist/esm/schemas/whatsapp.d.ts.map +1 -0
  160. package/dist/esm/schemas/whatsapp.js +22 -0
  161. package/dist/esm/types/index.d.ts +3 -0
  162. package/dist/esm/types/index.d.ts.map +1 -0
  163. package/dist/esm/types/index.js +2 -0
  164. package/dist/esm/types/responses.d.ts +8 -0
  165. package/dist/esm/types/responses.d.ts.map +1 -0
  166. package/dist/esm/types/webhooks.d.ts +10 -0
  167. package/dist/esm/types/webhooks.d.ts.map +1 -0
  168. package/dist/esm/types/webhooks.js +1 -0
  169. package/dist/esm/utils/errors.d.ts +6 -0
  170. package/dist/esm/utils/errors.d.ts.map +1 -0
  171. package/dist/esm/utils/errors.js +11 -0
  172. package/dist/esm/utils/request.d.ts +27 -0
  173. package/dist/esm/utils/request.d.ts.map +1 -0
  174. package/dist/esm/utils/request.js +33 -0
  175. package/dist/esm/utils/response.d.ts +12 -0
  176. package/dist/esm/utils/response.d.ts.map +1 -0
  177. package/dist/esm/utils/response.js +9 -0
  178. package/dist/esm/webhook/parse.d.ts +6 -0
  179. package/dist/esm/webhook/parse.d.ts.map +1 -0
  180. package/dist/esm/webhook/parse.js +11 -0
  181. package/dist/esm/webhook/verify.d.ts +6 -0
  182. package/dist/esm/webhook/verify.d.ts.map +1 -0
  183. package/dist/esm/webhook/verify.js +36 -0
  184. package/dist/index.d.ts +13 -27
  185. package/dist/index.d.ts.map +1 -1
  186. package/dist/index.js +4 -12423
  187. package/dist/resources/conversations.d.ts +31 -0
  188. package/dist/resources/conversations.d.ts.map +1 -0
  189. package/dist/resources/conversations.js +21 -0
  190. package/dist/resources/domains.d.ts +39 -0
  191. package/dist/resources/domains.d.ts.map +1 -0
  192. package/dist/resources/domains.js +24 -0
  193. package/dist/resources/email.d.ts +17 -0
  194. package/dist/resources/email.d.ts.map +1 -0
  195. package/dist/resources/email.js +15 -0
  196. package/dist/resources/identity.d.ts +56 -0
  197. package/dist/resources/identity.d.ts.map +1 -0
  198. package/dist/resources/identity.js +43 -0
  199. package/dist/resources/imessage.d.ts +58 -0
  200. package/dist/resources/imessage.d.ts.map +1 -0
  201. package/dist/resources/imessage.js +47 -0
  202. package/dist/resources/lease.d.ts +55 -0
  203. package/dist/resources/lease.d.ts.map +1 -0
  204. package/dist/resources/lease.js +30 -0
  205. package/dist/resources/otp.d.ts +63 -0
  206. package/dist/resources/otp.d.ts.map +1 -0
  207. package/dist/resources/otp.js +44 -0
  208. package/dist/resources/product.d.ts +23 -0
  209. package/dist/resources/product.d.ts.map +1 -0
  210. package/dist/resources/product.js +19 -0
  211. package/dist/resources/text.d.ts +44 -0
  212. package/dist/resources/text.d.ts.map +1 -0
  213. package/dist/resources/text.js +33 -0
  214. package/dist/resources/voice.d.ts +129 -0
  215. package/dist/resources/voice.d.ts.map +1 -0
  216. package/dist/resources/voice.js +91 -0
  217. package/dist/resources/webhook.d.ts +21 -0
  218. package/dist/resources/webhook.d.ts.map +1 -0
  219. package/dist/resources/webhook.js +43 -0
  220. package/dist/resources/whatsapp.d.ts +33 -0
  221. package/dist/resources/whatsapp.d.ts.map +1 -0
  222. package/dist/resources/whatsapp.js +31 -0
  223. package/dist/schemas/conversations.d.ts +8 -0
  224. package/dist/schemas/conversations.d.ts.map +1 -0
  225. package/dist/schemas/conversations.js +8 -0
  226. package/dist/schemas/domains.d.ts +7 -0
  227. package/dist/schemas/domains.d.ts.map +1 -0
  228. package/dist/schemas/domains.js +7 -0
  229. package/dist/schemas/email.d.ts +16 -0
  230. package/dist/schemas/email.d.ts.map +1 -0
  231. package/dist/schemas/email.js +13 -0
  232. package/dist/schemas/imessage.d.ts +44 -0
  233. package/dist/schemas/imessage.d.ts.map +1 -0
  234. package/dist/schemas/imessage.js +36 -0
  235. package/dist/schemas/index.d.ts +10 -0
  236. package/dist/schemas/index.d.ts.map +1 -0
  237. package/dist/schemas/index.js +9 -0
  238. package/dist/schemas/leases.d.ts +9 -0
  239. package/dist/schemas/leases.d.ts.map +1 -0
  240. package/dist/schemas/leases.js +6 -0
  241. package/dist/schemas/otp.d.ts +25 -0
  242. package/dist/schemas/otp.d.ts.map +1 -0
  243. package/dist/schemas/otp.js +13 -0
  244. package/dist/schemas/product.d.ts +12 -0
  245. package/dist/schemas/product.d.ts.map +1 -0
  246. package/dist/schemas/product.js +9 -0
  247. package/dist/schemas/text.d.ts +24 -0
  248. package/dist/schemas/text.d.ts.map +1 -0
  249. package/dist/schemas/text.js +18 -0
  250. package/dist/schemas/voice.d.ts +5 -0
  251. package/dist/schemas/voice.d.ts.map +1 -0
  252. package/dist/schemas/voice.js +2 -0
  253. package/dist/schemas/whatsapp.d.ts +31 -0
  254. package/dist/schemas/whatsapp.d.ts.map +1 -0
  255. package/dist/schemas/whatsapp.js +29 -0
  256. package/dist/types/index.d.ts +3 -0
  257. package/dist/types/index.d.ts.map +1 -0
  258. package/dist/types/index.js +2 -0
  259. package/dist/types/responses.d.ts +8 -0
  260. package/dist/types/responses.d.ts.map +1 -0
  261. package/dist/types/responses.js +1 -0
  262. package/dist/types/webhooks.d.ts +10 -0
  263. package/dist/types/webhooks.d.ts.map +1 -0
  264. package/dist/types/webhooks.js +1 -0
  265. package/dist/utils/errors.d.ts +6 -0
  266. package/dist/utils/errors.d.ts.map +1 -0
  267. package/dist/utils/errors.js +11 -0
  268. package/dist/utils/request.d.ts +26 -5
  269. package/dist/utils/request.d.ts.map +1 -1
  270. package/dist/utils/request.js +31 -45
  271. package/dist/utils/response.d.ts +12 -0
  272. package/dist/utils/response.d.ts.map +1 -0
  273. package/dist/utils/response.js +9 -0
  274. package/dist/webhook/parse.d.ts +6 -0
  275. package/dist/webhook/parse.d.ts.map +1 -0
  276. package/dist/webhook/parse.js +11 -0
  277. package/dist/webhook/verify.d.ts +6 -0
  278. package/dist/webhook/verify.d.ts.map +1 -0
  279. package/dist/webhook/verify.js +36 -0
  280. package/package.json +30 -33
  281. package/LICENSE.md +0 -8
  282. package/dist/client/fetch.d.ts +0 -25
  283. package/dist/client/fetch.d.ts.map +0 -1
  284. package/dist/client/fetch.js +0 -85
  285. package/dist/contiguity.d.ts +0 -81
  286. package/dist/contiguity.d.ts.map +0 -1
  287. package/dist/contiguity.js +0 -106
  288. package/dist/services/domains/delete.d.ts +0 -28
  289. package/dist/services/domains/delete.d.ts.map +0 -1
  290. package/dist/services/domains/delete.js +0 -37
  291. package/dist/services/domains/get.d.ts +0 -98
  292. package/dist/services/domains/get.d.ts.map +0 -1
  293. package/dist/services/domains/get.js +0 -89
  294. package/dist/services/domains/index.d.ts +0 -34
  295. package/dist/services/domains/index.d.ts.map +0 -1
  296. package/dist/services/domains/index.js +0 -37
  297. package/dist/services/domains/list.d.ts +0 -36
  298. package/dist/services/domains/list.d.ts.map +0 -1
  299. package/dist/services/domains/list.js +0 -42
  300. package/dist/services/domains/register.d.ts +0 -67
  301. package/dist/services/domains/register.d.ts.map +0 -1
  302. package/dist/services/domains/register.js +0 -67
  303. package/dist/services/email/index.d.ts +0 -17
  304. package/dist/services/email/index.d.ts.map +0 -1
  305. package/dist/services/email/index.js +0 -16
  306. package/dist/services/email/send.d.ts +0 -66
  307. package/dist/services/email/send.d.ts.map +0 -1
  308. package/dist/services/email/send.js +0 -78
  309. package/dist/services/imessage/index.d.ts +0 -24
  310. package/dist/services/imessage/index.d.ts.map +0 -1
  311. package/dist/services/imessage/index.js +0 -23
  312. package/dist/services/imessage/send.d.ts +0 -57
  313. package/dist/services/imessage/send.d.ts.map +0 -1
  314. package/dist/services/imessage/send.js +0 -60
  315. package/dist/services/imessage/typing.d.ts +0 -40
  316. package/dist/services/imessage/typing.d.ts.map +0 -1
  317. package/dist/services/imessage/typing.js +0 -49
  318. package/dist/services/lease/available.d.ts +0 -193
  319. package/dist/services/lease/available.d.ts.map +0 -1
  320. package/dist/services/lease/available.js +0 -103
  321. package/dist/services/lease/create.d.ts +0 -108
  322. package/dist/services/lease/create.d.ts.map +0 -1
  323. package/dist/services/lease/create.js +0 -78
  324. package/dist/services/lease/details.d.ts +0 -133
  325. package/dist/services/lease/details.d.ts.map +0 -1
  326. package/dist/services/lease/details.js +0 -65
  327. package/dist/services/lease/get.d.ts +0 -96
  328. package/dist/services/lease/get.d.ts.map +0 -1
  329. package/dist/services/lease/get.js +0 -68
  330. package/dist/services/lease/index.d.ts +0 -50
  331. package/dist/services/lease/index.d.ts.map +0 -1
  332. package/dist/services/lease/index.js +0 -51
  333. package/dist/services/lease/leased.d.ts +0 -228
  334. package/dist/services/lease/leased.d.ts.map +0 -1
  335. package/dist/services/lease/leased.js +0 -108
  336. package/dist/services/lease/terminate.d.ts +0 -71
  337. package/dist/services/lease/terminate.d.ts.map +0 -1
  338. package/dist/services/lease/terminate.js +0 -78
  339. package/dist/services/otp/index.d.ts +0 -33
  340. package/dist/services/otp/index.d.ts.map +0 -1
  341. package/dist/services/otp/index.js +0 -37
  342. package/dist/services/otp/new.d.ts +0 -29
  343. package/dist/services/otp/new.d.ts.map +0 -1
  344. package/dist/services/otp/new.js +0 -44
  345. package/dist/services/otp/resend.d.ts +0 -22
  346. package/dist/services/otp/resend.d.ts.map +0 -1
  347. package/dist/services/otp/resend.js +0 -31
  348. package/dist/services/otp/send.d.ts +0 -26
  349. package/dist/services/otp/send.d.ts.map +0 -1
  350. package/dist/services/otp/send.js +0 -38
  351. package/dist/services/otp/verify.d.ts +0 -24
  352. package/dist/services/otp/verify.d.ts.map +0 -1
  353. package/dist/services/otp/verify.js +0 -34
  354. package/dist/services/text/index.d.ts +0 -17
  355. package/dist/services/text/index.d.ts.map +0 -1
  356. package/dist/services/text/index.js +0 -16
  357. package/dist/services/text/send.d.ts +0 -25
  358. package/dist/services/text/send.d.ts.map +0 -1
  359. package/dist/services/text/send.js +0 -37
  360. package/dist/services/whatsapp/index.d.ts +0 -24
  361. package/dist/services/whatsapp/index.d.ts.map +0 -1
  362. package/dist/services/whatsapp/index.js +0 -23
  363. package/dist/services/whatsapp/send.d.ts +0 -57
  364. package/dist/services/whatsapp/send.d.ts.map +0 -1
  365. package/dist/services/whatsapp/send.js +0 -60
  366. package/dist/services/whatsapp/typing.d.ts +0 -40
  367. package/dist/services/whatsapp/typing.d.ts.map +0 -1
  368. package/dist/services/whatsapp/typing.js +0 -49
  369. package/dist/types/base.d.ts +0 -17
  370. package/dist/types/base.d.ts.map +0 -1
  371. package/dist/types/base.js +0 -20
  372. package/dist/types/common.d.ts +0 -56
  373. package/dist/types/common.d.ts.map +0 -1
  374. package/dist/types/common.js +0 -48
  375. package/dist/types/error.d.ts +0 -37
  376. package/dist/types/error.d.ts.map +0 -1
  377. package/dist/types/error.js +0 -54
  378. package/dist/types/metadata.d.ts +0 -10
  379. package/dist/types/metadata.d.ts.map +0 -1
  380. package/dist/types/response.d.ts +0 -10
  381. package/dist/types/response.d.ts.map +0 -1
  382. package/dist/types/response.js +0 -10
  383. package/dist/utils/parse.d.ts +0 -8
  384. package/dist/utils/parse.d.ts.map +0 -1
  385. package/dist/utils/parse.js +0 -36
  386. /package/dist/{types/metadata.js → esm/types/responses.js} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"terminate.d.ts","sourceRoot":"","sources":["../../../src/services/lease/terminate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,qBAAqB;;iBAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;iBASjC,CAAC;AAKH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACzE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEhF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,GAAG,CAAC,CAU3F"}
@@ -1,78 +0,0 @@
1
- import { z } from "zod";
2
- export const LeaseTerminateRequest = z.object({
3
- /** Phone number in E.164 format to terminate lease for */
4
- number: z.string().regex(/^\+[1-9]\d{1,14}$/, "Phone number must be in E.164 format"),
5
- });
6
- export const LeaseTerminateResponse = z.object({
7
- /** Terminated lease ID */
8
- lease_id: z.string(),
9
- /** Number ID */
10
- number_id: z.string(),
11
- /** The lease's new status */
12
- status: z.enum(["active", "expired", "terminated"]),
13
- /** Termination timestamp */
14
- terminated_at: z.number()
15
- });
16
- /**
17
- * Terminates your lease for a number
18
- *
19
- * @example
20
- * ```typescript
21
- * const response = await contiguity.lease.terminate({
22
- * number: "+1234567890"
23
- * });
24
- *
25
- * console.log(`Lease ${response.lease_id} terminated`);
26
- * console.log(`Number: ${response.number_id}`);
27
- * console.log(`Status: ${response.status}`);
28
- * console.log(`Terminated at: ${new Date(response.terminated_at * 1000)}`);
29
- * ```
30
- *
31
- * @example
32
- * ```typescript
33
- * // Terminate lease with confirmation
34
- * try {
35
- * const response = await contiguity.lease.terminate({
36
- * number: "+1234567890"
37
- * });
38
- *
39
- * if (response.status === 'terminated') {
40
- * console.log('✓ Lease successfully terminated');
41
- * console.log(`Termination date: ${new Date(response.terminated_at * 1000).toLocaleDateString()}`);
42
- * }
43
- * } catch (error) {
44
- * console.error('Failed to terminate lease:', error.message);
45
- * }
46
- * ```
47
- *
48
- * @example
49
- * ```typescript
50
- * // Bulk terminate multiple leases
51
- * const numbersToTerminate = ["+1234567890", "+0987654321"];
52
- *
53
- * const results = await Promise.allSettled(
54
- * numbersToTerminate.map(number =>
55
- * contiguity.lease.terminate({ number })
56
- * )
57
- * );
58
- *
59
- * results.forEach((result, index) => {
60
- * const number = numbersToTerminate[index];
61
- * if (result.status === 'fulfilled') {
62
- * console.log(`✓ ${number}: Lease terminated`);
63
- * } else {
64
- * console.log(`✗ ${number}: Failed to terminate - ${result.reason.message}`);
65
- * }
66
- * });
67
- * ```
68
- */
69
- export async function _leaseTerminate(params) {
70
- const validatedParams = LeaseTerminateRequest.parse(params);
71
- const response = await this.request(`/numbers/leased/${encodeURIComponent(validatedParams.number)}`, {
72
- method: "DELETE",
73
- });
74
- return this.parse({
75
- response,
76
- schema: LeaseTerminateResponse
77
- });
78
- }
@@ -1,33 +0,0 @@
1
- import { z } from "zod";
2
- import { ContiguityClient } from "@/client/fetch";
3
- import type { WithMetadata } from "@/types/metadata";
4
- import { type OTPSendParams, OTPSendResponse } from "./send";
5
- import { type OTPVerifyParams, OTPVerifyResponse } from "./verify";
6
- import { type OTPResendParams, OTPResendResponse } from "./resend";
7
- export type OTPSendResponseType = z.infer<typeof OTPSendResponse>;
8
- export type OTPVerifyResponseType = z.infer<typeof OTPVerifyResponse>;
9
- export type OTPResendResponseType = z.infer<typeof OTPResendResponse>;
10
- /**
11
- * OTP service for sending, verifying, and resending one-time passwords
12
- */
13
- export declare class OTPService extends ContiguityClient {
14
- constructor(token: string);
15
- /**
16
- * Send a new OTP to the specified phone number
17
- * @deprecated Use `send()` instead. This method will be removed in a future version.
18
- */
19
- new(params: OTPSendParams): Promise<WithMetadata<OTPSendResponseType>>;
20
- /**
21
- * Send a new OTP to the specified phone number
22
- */
23
- send(params: OTPSendParams): Promise<WithMetadata<OTPSendResponseType>>;
24
- /**
25
- * Verify an OTP code
26
- */
27
- verify(params: OTPVerifyParams): Promise<WithMetadata<OTPVerifyResponseType>>;
28
- /**
29
- * Resend an OTP to the same phone number
30
- */
31
- resend(params: OTPResendParams): Promise<WithMetadata<OTPResendResponseType>>;
32
- }
33
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/otp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAY,KAAK,aAAa,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACvE,OAAO,EAAc,KAAK,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAc,KAAK,eAAe,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE/E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAClE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEtE;;GAEG;AACH,qBAAa,UAAW,SAAQ,gBAAgB;gBAChC,KAAK,EAAE,MAAM;IAIzB;;;OAGG;IACG,GAAG,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAI5E;;OAEG;IACG,IAAI,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;IAI7E;;OAEG;IACG,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;IAInF;;OAEG;IACG,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC,CAAC;CAGtF"}
@@ -1,37 +0,0 @@
1
- import { ContiguityClient } from "@/client/fetch";
2
- import { _otpSend } from "./send";
3
- import { _otpVerify } from "./verify";
4
- import { _otpResend } from "./resend";
5
- /**
6
- * OTP service for sending, verifying, and resending one-time passwords
7
- */
8
- export class OTPService extends ContiguityClient {
9
- constructor(token) {
10
- super(token);
11
- }
12
- /**
13
- * Send a new OTP to the specified phone number
14
- * @deprecated Use `send()` instead. This method will be removed in a future version.
15
- */
16
- async new(params) {
17
- return this.send(params);
18
- }
19
- /**
20
- * Send a new OTP to the specified phone number
21
- */
22
- async send(params) {
23
- return _otpSend.call(this, params);
24
- }
25
- /**
26
- * Verify an OTP code
27
- */
28
- async verify(params) {
29
- return _otpVerify.call(this, params);
30
- }
31
- /**
32
- * Resend an OTP to the same phone number
33
- */
34
- async resend(params) {
35
- return _otpResend.call(this, params);
36
- }
37
- }
@@ -1,29 +0,0 @@
1
- import { z } from "zod";
2
- export declare const OTPNewRequest: z.ZodObject<{
3
- to: z.ZodString;
4
- language: z.ZodString;
5
- name: z.ZodString;
6
- }, z.core.$strip>;
7
- export declare const OTPNewResponse: z.ZodObject<{
8
- otp_id: z.ZodString;
9
- }, z.core.$strip>;
10
- export declare const OTPNewResponseBuilder: import("@/types/base").BaseResponseBuilder<z.ZodObject<{
11
- otp_id: z.ZodString;
12
- }, z.core.$strip>>;
13
- export type OTPNewParams = z.infer<typeof OTPNewRequest>;
14
- export type OTPNewResponse = z.infer<typeof OTPNewResponse>;
15
- /**
16
- * Sends a new OTP to the specified phone number
17
- *
18
- * @example
19
- * ```typescript
20
- * const response = await contiguity.otp.new({
21
- * to: "+1234567890",
22
- * language: "en",
23
- * name: "My App"
24
- * });
25
- * console.log(`OTP ID: ${response.otp_id}`);
26
- * ```
27
- */
28
- export declare function _otpNew(this: any, params: OTPNewParams): Promise<any>;
29
- //# sourceMappingURL=new.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"new.d.ts","sourceRoot":"","sources":["../../../src/services/otp/new.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,aAAa;;;;iBAOxB,CAAA;AAEF,eAAO,MAAM,cAAc;;iBAGzB,CAAA;AAGF,eAAO,MAAM,qBAAqB;;kBAAiC,CAAA;AAEnE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AACzD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;;;;GAYG;AACH,wBAAsB,OAAO,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,CAc3E"}
@@ -1,44 +0,0 @@
1
- import { z } from "zod";
2
- import { createResponse } from "@/types/base";
3
- import { E164PhoneNumber } from "@/types/common";
4
- export const OTPNewRequest = z.object({
5
- /** Recipient's phone number. Must be in E.164 format */
6
- to: E164PhoneNumber,
7
- /** Language of the OTP message */
8
- language: z.string().min(1, "Language cannot be empty"),
9
- /** Your app's name (customizes message to 'Your [name] code is...') */
10
- name: z.string().min(1, "App name cannot be empty"),
11
- });
12
- export const OTPNewResponse = z.object({
13
- /** The OTP's ID. Use it to refer to this verification in the future, such as when verifying the OTP or resending it. */
14
- otp_id: z.string(),
15
- });
16
- // Using the new base response builder - this replaces the manual Flattened/Raw definitions
17
- export const OTPNewResponseBuilder = createResponse(OTPNewResponse);
18
- /**
19
- * Sends a new OTP to the specified phone number
20
- *
21
- * @example
22
- * ```typescript
23
- * const response = await contiguity.otp.new({
24
- * to: "+1234567890",
25
- * language: "en",
26
- * name: "My App"
27
- * });
28
- * console.log(`OTP ID: ${response.otp_id}`);
29
- * ```
30
- */
31
- export async function _otpNew(params) {
32
- const validatedParams = OTPNewRequest.parse(params);
33
- const response = await this.request("/otp/new", {
34
- method: "POST",
35
- body: JSON.stringify(validatedParams),
36
- });
37
- return this.parse({
38
- response,
39
- schemas: {
40
- sdk: OTPNewResponse,
41
- raw: OTPNewResponseBuilder.raw
42
- }
43
- });
44
- }
@@ -1,22 +0,0 @@
1
- import { z } from "zod";
2
- export declare const OTPResendRequest: z.ZodObject<{
3
- otp_id: z.ZodString;
4
- }, z.core.$strip>;
5
- export declare const OTPResendResponse: z.ZodObject<{
6
- resent: z.ZodBoolean;
7
- }, z.core.$strip>;
8
- export type OTPResendParams = z.infer<typeof OTPResendRequest>;
9
- export type OTPResendResponse = z.infer<typeof OTPResendResponse>;
10
- /**
11
- * Resends an OTP to the same phone number
12
- *
13
- * @example
14
- * ```typescript
15
- * const response = await contiguity.otp.resend({
16
- * otp_id: "otp_1234567890"
17
- * });
18
- * console.log(`Resent: ${response.resent}`);
19
- * ```
20
- */
21
- export declare function _otpResend(this: any, params: OTPResendParams): Promise<any>;
22
- //# sourceMappingURL=resend.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resend.d.ts","sourceRoot":"","sources":["../../../src/services/otp/resend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;iBAG3B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;iBAG5B,CAAA;AAKF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;;;;;;;GAUG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAWjF"}
@@ -1,31 +0,0 @@
1
- import { z } from "zod";
2
- export const OTPResendRequest = z.object({
3
- /** The OTP ID you received when sending the OTP */
4
- otp_id: z.string().min(1, "OTP ID cannot be empty"),
5
- });
6
- export const OTPResendResponse = z.object({
7
- /** Whether the OTP was resent */
8
- resent: z.boolean(),
9
- });
10
- /**
11
- * Resends an OTP to the same phone number
12
- *
13
- * @example
14
- * ```typescript
15
- * const response = await contiguity.otp.resend({
16
- * otp_id: "otp_1234567890"
17
- * });
18
- * console.log(`Resent: ${response.resent}`);
19
- * ```
20
- */
21
- export async function _otpResend(params) {
22
- const validatedParams = OTPResendRequest.parse(params);
23
- const response = await this.request("/otp/resend", {
24
- method: "POST",
25
- body: JSON.stringify(validatedParams),
26
- });
27
- return this.parse({
28
- response,
29
- schema: OTPResendResponse
30
- });
31
- }
@@ -1,26 +0,0 @@
1
- import { z } from "zod";
2
- export declare const OTPSendRequest: z.ZodObject<{
3
- to: z.ZodString;
4
- language: z.ZodString;
5
- name: z.ZodString;
6
- }, z.core.$strip>;
7
- export declare const OTPSendResponse: z.ZodObject<{
8
- otp_id: z.ZodString;
9
- }, z.core.$strip>;
10
- export type OTPSendParams = z.infer<typeof OTPSendRequest>;
11
- export type OTPSendResponse = z.infer<typeof OTPSendResponse>;
12
- /**
13
- * Sends a new OTP to the specified phone number
14
- *
15
- * @example
16
- * ```typescript
17
- * const response = await contiguity.otp.send({
18
- * to: "+1234567890",
19
- * language: "en",
20
- * name: "My App"
21
- * });
22
- * console.log(`OTP ID: ${response.otp_id}`);
23
- * ```
24
- */
25
- export declare function _otpSend(this: any, params: OTPSendParams): Promise<any>;
26
- //# sourceMappingURL=send.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/services/otp/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,cAAc;;;;iBAOzB,CAAA;AAEF,eAAO,MAAM,eAAe;;iBAG1B,CAAA;AAEF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,CAW7E"}
@@ -1,38 +0,0 @@
1
- import { z } from "zod";
2
- import { E164PhoneNumber } from "@/types/common";
3
- export const OTPSendRequest = z.object({
4
- /** Recipient's phone number. Must be in E.164 format */
5
- to: E164PhoneNumber,
6
- /** Language of the OTP message */
7
- language: z.string().min(1, "Language cannot be empty"),
8
- /** Your app's name (customizes message to 'Your [name] code is...') */
9
- name: z.string().min(1, "App name cannot be empty"),
10
- });
11
- export const OTPSendResponse = z.object({
12
- /** The OTP's ID. Use it to refer to this verification in the future, such as when verifying the OTP or resending it. */
13
- otp_id: z.string(),
14
- });
15
- /**
16
- * Sends a new OTP to the specified phone number
17
- *
18
- * @example
19
- * ```typescript
20
- * const response = await contiguity.otp.send({
21
- * to: "+1234567890",
22
- * language: "en",
23
- * name: "My App"
24
- * });
25
- * console.log(`OTP ID: ${response.otp_id}`);
26
- * ```
27
- */
28
- export async function _otpSend(params) {
29
- const validatedParams = OTPSendRequest.parse(params);
30
- const response = await this.request("/otp/new", {
31
- method: "POST",
32
- body: JSON.stringify(validatedParams),
33
- });
34
- return this.parse({
35
- response,
36
- schema: OTPSendResponse
37
- });
38
- }
@@ -1,24 +0,0 @@
1
- import { z } from "zod";
2
- export declare const OTPVerifyRequest: z.ZodObject<{
3
- otp_id: z.ZodString;
4
- otp: z.ZodString;
5
- }, z.core.$strip>;
6
- export declare const OTPVerifyResponse: z.ZodObject<{
7
- verified: z.ZodBoolean;
8
- }, z.core.$strip>;
9
- export type OTPVerifyParams = z.infer<typeof OTPVerifyRequest>;
10
- export type OTPVerifyResponse = z.infer<typeof OTPVerifyResponse>;
11
- /**
12
- * Verifies an OTP code
13
- *
14
- * @example
15
- * ```typescript
16
- * const response = await contiguity.otp.verify({
17
- * otp_id: "otp_1234567890",
18
- * otp: "123456"
19
- * });
20
- * console.log(`Verified: ${response.verified}`);
21
- * ```
22
- */
23
- export declare function _otpVerify(this: any, params: OTPVerifyParams): Promise<any>;
24
- //# sourceMappingURL=verify.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../../src/services/otp/verify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;iBAK3B,CAAA;AAEF,eAAO,MAAM,iBAAiB;;iBAG5B,CAAA;AAIF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC/D,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE;;;;;;;;;;;GAWG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAWjF"}
@@ -1,34 +0,0 @@
1
- import { z } from "zod";
2
- export const OTPVerifyRequest = z.object({
3
- /** The OTP ID you received when sending the OTP */
4
- otp_id: z.string().min(1, "OTP ID cannot be empty"),
5
- /** The OTP inputted by the user */
6
- otp: z.string().min(1, "OTP cannot be empty"),
7
- });
8
- export const OTPVerifyResponse = z.object({
9
- /** Whether the OTP was verified or not */
10
- verified: z.boolean(),
11
- });
12
- /**
13
- * Verifies an OTP code
14
- *
15
- * @example
16
- * ```typescript
17
- * const response = await contiguity.otp.verify({
18
- * otp_id: "otp_1234567890",
19
- * otp: "123456"
20
- * });
21
- * console.log(`Verified: ${response.verified}`);
22
- * ```
23
- */
24
- export async function _otpVerify(params) {
25
- const validatedParams = OTPVerifyRequest.parse(params);
26
- const response = await this.request("/otp/verify", {
27
- method: "POST",
28
- body: JSON.stringify(validatedParams),
29
- });
30
- return this.parse({
31
- response,
32
- schema: OTPVerifyResponse
33
- });
34
- }
@@ -1,17 +0,0 @@
1
- import { ContiguityClient } from "@/client/fetch";
2
- import { z } from "zod";
3
- import { TextSendRequest, TextResponse } from "@/services/text/send";
4
- import type { WithMetadata } from "@/types/metadata";
5
- export type TextSendParams = z.infer<typeof TextSendRequest>;
6
- export type TextSendResponse = z.infer<typeof TextResponse>;
7
- /**
8
- * Text service for sending messages
9
- */
10
- export declare class TextService extends ContiguityClient {
11
- constructor(token: string);
12
- /**
13
- * Send a text message
14
- */
15
- send(params: TextSendParams): Promise<WithMetadata<TextSendResponse>>;
16
- }
17
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAE5D;;GAEG;AACH,qBAAa,WAAY,SAAQ,gBAAgB;gBACjC,KAAK,EAAE,MAAM;IAIzB;;OAEG;IACG,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAC;CAG9E"}
@@ -1,16 +0,0 @@
1
- import { ContiguityClient } from "@/client/fetch";
2
- import { _textSend } from "@/services/text/send";
3
- /**
4
- * Text service for sending messages
5
- */
6
- export class TextService extends ContiguityClient {
7
- constructor(token) {
8
- super(token);
9
- }
10
- /**
11
- * Send a text message
12
- */
13
- async send(params) {
14
- return _textSend.call(this, params);
15
- }
16
- }
@@ -1,25 +0,0 @@
1
- import { z } from "zod";
2
- export declare const TextSendRequest: z.ZodObject<{
3
- to: z.ZodString;
4
- from: z.ZodOptional<z.ZodString>;
5
- message: z.ZodString;
6
- }, z.core.$strip>;
7
- export declare const TextResponse: z.ZodObject<{
8
- message_id: z.ZodString;
9
- }, z.core.$strip>;
10
- export type TextSendParams = z.infer<typeof TextSendRequest>;
11
- export type TextSendResponse = z.infer<typeof TextResponse>;
12
- /**
13
- * Sends a text message
14
- *
15
- * @example
16
- * ```typescript
17
- * const response = await contiguity.text.send({
18
- * to: "+1234567890",
19
- * message: "Hello from Contiguity!"
20
- * });
21
- * console.log(`Message ID: ${response.message_id}`);
22
- * ```
23
- */
24
- export declare function _textSend(this: any, params: TextSendParams): Promise<any>;
25
- //# sourceMappingURL=send.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/services/text/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,eAAe;;;;iBAO1B,CAAA;AAEF,eAAO,MAAM,YAAY;;iBAGvB,CAAA;AAIF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC7D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAE5D;;;;;;;;;;;GAWG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,CAW/E"}
@@ -1,37 +0,0 @@
1
- import { z } from "zod";
2
- import { E164PhoneNumber, OptionalSenderNumber, MessageContent } from "@/types/common";
3
- export const TextSendRequest = z.object({
4
- /** Recipient's phone number. Must be in E.164 format */
5
- to: E164PhoneNumber,
6
- /** If you lease a phone number from Contiguity, you can use a specific one by providing it here */
7
- from: OptionalSenderNumber,
8
- /** The text message to send */
9
- message: MessageContent,
10
- });
11
- export const TextResponse = z.object({
12
- /** The message's ID. Use it to refer to this message in the future */
13
- message_id: z.string(),
14
- });
15
- /**
16
- * Sends a text message
17
- *
18
- * @example
19
- * ```typescript
20
- * const response = await contiguity.text.send({
21
- * to: "+1234567890",
22
- * message: "Hello from Contiguity!"
23
- * });
24
- * console.log(`Message ID: ${response.message_id}`);
25
- * ```
26
- */
27
- export async function _textSend(params) {
28
- const validatedParams = TextSendRequest.parse(params);
29
- const response = await this.request("/send/text", {
30
- method: "POST",
31
- body: JSON.stringify(validatedParams),
32
- });
33
- return this.parse({
34
- response,
35
- schema: TextResponse
36
- });
37
- }
@@ -1,24 +0,0 @@
1
- import { ContiguityClient } from "@/client/fetch";
2
- import { z } from "zod";
3
- import { WhatsAppSendRequest, WhatsAppResponse } from "@/services/whatsapp/send";
4
- import { WhatsAppTypingRequest, WhatsAppTypingResponse } from "@/services/whatsapp/typing";
5
- import type { WithMetadata } from "@/types/metadata";
6
- export type WhatsAppSendParams = z.infer<typeof WhatsAppSendRequest>;
7
- export type WhatsAppSendResponse = z.infer<typeof WhatsAppResponse>;
8
- export type WhatsAppTypingParams = z.infer<typeof WhatsAppTypingRequest>;
9
- export type WhatsAppTypingResponseType = z.infer<typeof WhatsAppTypingResponse>;
10
- /**
11
- * WhatsApp service for sending WhatsApp messages and managing typing indicators
12
- */
13
- export declare class WhatsAppService extends ContiguityClient {
14
- constructor(token: string);
15
- /**
16
- * Send a WhatsApp message
17
- */
18
- send(params: WhatsAppSendParams): Promise<WithMetadata<WhatsAppSendResponse>>;
19
- /**
20
- * Start or stop sending typing indicators over WhatsApp
21
- */
22
- typing(params: WhatsAppTypingParams): Promise<WithMetadata<WhatsAppTypingResponseType>>;
23
- }
24
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/whatsapp/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACH,mBAAmB,EACnB,gBAAgB,EACnB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACzE,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEhF;;GAEG;AACH,qBAAa,eAAgB,SAAQ,gBAAgB;gBACrC,KAAK,EAAE,MAAM;IAIzB;;OAEG;IACG,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC;IAInF;;OAEG;IACG,MAAM,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC,0BAA0B,CAAC,CAAC;CAGhG"}
@@ -1,23 +0,0 @@
1
- import { ContiguityClient } from "@/client/fetch";
2
- import { _whatsAppSend } from "@/services/whatsapp/send";
3
- import { _whatsAppTyping } from "@/services/whatsapp/typing";
4
- /**
5
- * WhatsApp service for sending WhatsApp messages and managing typing indicators
6
- */
7
- export class WhatsAppService extends ContiguityClient {
8
- constructor(token) {
9
- super(token);
10
- }
11
- /**
12
- * Send a WhatsApp message
13
- */
14
- async send(params) {
15
- return _whatsAppSend.call(this, params);
16
- }
17
- /**
18
- * Start or stop sending typing indicators over WhatsApp
19
- */
20
- async typing(params) {
21
- return _whatsAppTyping.call(this, params);
22
- }
23
- }
@@ -1,57 +0,0 @@
1
- import { z } from "zod";
2
- export declare const WhatsAppSendRequest: z.ZodObject<{
3
- to: z.ZodString;
4
- from: z.ZodOptional<z.ZodString>;
5
- message: z.ZodString;
6
- fallback: z.ZodOptional<z.ZodObject<{
7
- when: z.ZodArray<z.ZodEnum<{
8
- whatsapp: "whatsapp";
9
- whatsapp_unsupported: "whatsapp_unsupported";
10
- whatsapp_fails: "whatsapp_fails";
11
- }>>;
12
- from: z.ZodOptional<z.ZodString>;
13
- }, z.core.$strip>>;
14
- attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
15
- }, z.core.$strip>;
16
- export declare const WhatsAppResponse: z.ZodObject<{
17
- message_id: z.ZodString;
18
- }, z.core.$strip>;
19
- export type WhatsAppFallbackParams = {
20
- when: ("whatsapp_unsupported" | "whatsapp_fails")[];
21
- from?: string;
22
- };
23
- export type WhatsAppSendParams = z.infer<typeof WhatsAppSendRequest>;
24
- export type WhatsAppSendResponse = z.infer<typeof WhatsAppResponse>;
25
- /**
26
- * Sends a WhatsApp message
27
- *
28
- * @example
29
- * ```typescript
30
- * const response = await contiguity.whatsapp.send({
31
- * to: "+1234567890",
32
- * message: "Hello from Contiguity!"
33
- * });
34
- * console.log(`Message ID: ${response.message_id}`);
35
- * ```
36
- *
37
- * @example
38
- * ```typescript
39
- * // Send with fallback to SMS and attachments
40
- * const response = await contiguity.whatsapp.send({
41
- * to: "+1234567890",
42
- * from: "+15555555555",
43
- * message: "Check out this image!",
44
- * fallback: {
45
- * when: ["whatsapp_unsupported", "whatsapp_fails"],
46
- * from: "+15555555555"
47
- * },
48
- * attachments: [
49
- * "https://example.com/image.png",
50
- * "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34..."
51
- * ]
52
- * });
53
- * console.log(`Message ID: ${response.message_id}`);
54
- * ```
55
- */
56
- export declare function _whatsAppSend(this: any, params: WhatsAppSendParams): Promise<any>;
57
- //# sourceMappingURL=send.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../../src/services/whatsapp/send.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;iBAW9B,CAAA;AAEF,eAAO,MAAM,gBAAgB;;iBAG3B,CAAA;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACpC,IAAI,EAAE,CAAC,sBAAsB,GAAG,gBAAgB,CAAC,EAAE,CAAC;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACrE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,GAAG,CAAC,CAWvF"}