@sinch/verification 0.0.0 → 0.0.2

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 (267) hide show
  1. package/README.md +18 -19
  2. package/dist/models/v1/callout-request-event-response/callout-request-event-response.d.ts +0 -6
  3. package/dist/models/v1/callout-request-event-response/callout-request-event-response.js +0 -6
  4. package/dist/models/v1/callout-request-event-response/callout-request-event-response.js.map +1 -1
  5. package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.d.ts +0 -6
  6. package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.js +0 -6
  7. package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.js.map +1 -1
  8. package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.d.ts +0 -6
  9. package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.js +0 -6
  10. package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.js.map +1 -1
  11. package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.d.ts +4 -11
  12. package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js +0 -6
  13. package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js.map +1 -1
  14. package/dist/models/v1/enums.d.ts +4 -12
  15. package/dist/models/v1/{flash-call-request-event-response-flash-call/flash-call-request-event-response-flash-call.d.ts → flashcall-request-event-response/flashcall-request-event-response.d.ts} +9 -7
  16. package/dist/models/v1/flashcall-request-event-response/flashcall-request-event-response.js +3 -0
  17. package/dist/models/v1/flashcall-request-event-response/flashcall-request-event-response.js.map +1 -0
  18. package/dist/models/v1/flashcall-request-event-response/index.d.ts +1 -0
  19. package/dist/models/v1/flashcall-request-event-response/index.js.map +1 -0
  20. package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.d.ts +6 -13
  21. package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.js +0 -6
  22. package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.js.map +1 -1
  23. package/dist/models/v1/flashcall-verification-report-response/index.d.ts +1 -1
  24. package/dist/models/v1/helper.d.ts +13 -0
  25. package/dist/models/v1/helper.js +117 -0
  26. package/dist/models/v1/helper.js.map +1 -0
  27. package/dist/models/v1/identity/identity.d.ts +2 -6
  28. package/dist/models/v1/identity/identity.js +0 -6
  29. package/dist/models/v1/identity/identity.js.map +1 -1
  30. package/dist/models/v1/index.d.ts +9 -24
  31. package/dist/models/v1/index.js +9 -24
  32. package/dist/models/v1/index.js.map +1 -1
  33. package/dist/models/v1/links-object/links-object.d.ts +0 -6
  34. package/dist/models/v1/links-object/links-object.js +0 -6
  35. package/dist/models/v1/links-object/links-object.js.map +1 -1
  36. package/dist/models/v1/price/price.d.ts +0 -6
  37. package/dist/models/v1/price/price.js +0 -6
  38. package/dist/models/v1/price/price.js.map +1 -1
  39. package/dist/models/v1/sms-request-event-response/sms-request-event-response.d.ts +9 -9
  40. package/dist/models/v1/sms-request-event-response/sms-request-event-response.js +0 -6
  41. package/dist/models/v1/sms-request-event-response/sms-request-event-response.js.map +1 -1
  42. package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.d.ts +2 -9
  43. package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.js +0 -6
  44. package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.js.map +1 -1
  45. package/dist/models/v1/start-callout-verification-response/index.d.ts +1 -0
  46. package/dist/models/v1/start-callout-verification-response/index.js.map +1 -0
  47. package/dist/models/v1/{callout-initiate-verification-response/callout-initiate-verification-response.d.ts → start-callout-verification-response/start-callout-verification-response.d.ts} +3 -10
  48. package/dist/models/v1/start-callout-verification-response/start-callout-verification-response.js +3 -0
  49. package/dist/models/v1/start-callout-verification-response/start-callout-verification-response.js.map +1 -0
  50. package/dist/models/v1/start-flashcall-verification-response/index.d.ts +1 -0
  51. package/dist/models/v1/start-flashcall-verification-response/index.js.map +1 -0
  52. package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.d.ts +22 -0
  53. package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.js +3 -0
  54. package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.js.map +1 -0
  55. package/dist/models/v1/start-seamless-verification-response/index.d.ts +1 -0
  56. package/dist/models/v1/start-seamless-verification-response/index.js.map +1 -0
  57. package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.d.ts +13 -0
  58. package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.js +3 -0
  59. package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.js.map +1 -0
  60. package/dist/models/v1/start-sms-verification-response/index.d.ts +1 -0
  61. package/dist/models/v1/start-sms-verification-response/index.js.map +1 -0
  62. package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.d.ts +18 -0
  63. package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.js +3 -0
  64. package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.js.map +1 -0
  65. package/dist/models/v1/start-verification-request/index.d.ts +1 -0
  66. package/dist/models/v1/start-verification-request/index.js.map +1 -0
  67. package/dist/models/v1/start-verification-request/start-verification-request.d.ts +26 -0
  68. package/dist/models/v1/start-verification-request/start-verification-request.js +3 -0
  69. package/dist/models/v1/start-verification-request/start-verification-request.js.map +1 -0
  70. package/dist/models/v1/verification-error/index.d.ts +1 -0
  71. package/dist/models/v1/verification-error/index.js.map +1 -0
  72. package/dist/models/v1/{error/error.d.ts → verification-error/verification-error.d.ts} +1 -7
  73. package/dist/models/v1/verification-error/verification-error.js +3 -0
  74. package/dist/models/v1/verification-error/verification-error.js.map +1 -0
  75. package/dist/models/v1/verification-report-request/index.d.ts +1 -1
  76. package/dist/models/v1/verification-report-request/verification-report-request.d.ts +27 -10
  77. package/dist/models/v1/verification-report-request/verification-report-request.js +0 -6
  78. package/dist/models/v1/verification-report-request/verification-report-request.js.map +1 -1
  79. package/dist/models/v1/verification-report-response/verification-report-response.d.ts +2 -8
  80. package/dist/models/v1/verification-report-response/verification-report-response.js +0 -6
  81. package/dist/models/v1/verification-report-response/verification-report-response.js.map +1 -1
  82. package/dist/models/v1/verification-report-response-price/index.d.ts +1 -0
  83. package/dist/models/v1/verification-report-response-price/index.js.map +1 -0
  84. package/dist/models/v1/{flashcall-verification-report-response-price/flashcall-verification-report-response-price.d.ts → verification-report-response-price/verification-report-response-price.d.ts} +8 -7
  85. package/dist/models/v1/verification-report-response-price/verification-report-response-price.js +3 -0
  86. package/dist/models/v1/verification-report-response-price/verification-report-response-price.js.map +1 -0
  87. package/dist/models/v1/verification-request-event/verification-request-event.d.ts +7 -11
  88. package/dist/models/v1/verification-request-event/verification-request-event.js +0 -6
  89. package/dist/models/v1/verification-request-event/verification-request-event.js.map +1 -1
  90. package/dist/models/v1/verification-request-event-response/verification-request-event-response.d.ts +1 -7
  91. package/dist/models/v1/verification-request-event-response/verification-request-event-response.js +0 -6
  92. package/dist/models/v1/verification-request-event-response/verification-request-event-response.js.map +1 -1
  93. package/dist/models/v1/verification-result-event/verification-result-event.d.ts +4 -9
  94. package/dist/models/v1/verification-result-event/verification-result-event.js +0 -6
  95. package/dist/models/v1/verification-result-event/verification-result-event.js.map +1 -1
  96. package/dist/models/v1/verification-result-event-response/verification-result-event-response.d.ts +1 -7
  97. package/dist/models/v1/verification-result-event-response/verification-result-event-response.js +0 -6
  98. package/dist/models/v1/verification-result-event-response/verification-result-event-response.js.map +1 -1
  99. package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +25 -0
  100. package/dist/rest/v1/callbacks/callbacks-webhook.js +45 -0
  101. package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -0
  102. package/dist/rest/v1/callbacks/index.d.ts +1 -0
  103. package/dist/rest/v1/callbacks/index.js +18 -0
  104. package/dist/rest/v1/callbacks/index.js.map +1 -0
  105. package/dist/rest/v1/index.d.ts +2 -1
  106. package/dist/rest/v1/index.js +2 -1
  107. package/dist/rest/v1/index.js.map +1 -1
  108. package/dist/rest/v1/{verification-api.d.ts → verification-domain-api.d.ts} +1 -1
  109. package/dist/rest/v1/{verification-api.js → verification-domain-api.js} +4 -4
  110. package/dist/rest/v1/verification-domain-api.js.map +1 -0
  111. package/dist/rest/v1/{verification.d.ts → verification-service.d.ts} +1 -7
  112. package/dist/rest/v1/{verification.js → verification-service.js} +4 -4
  113. package/dist/rest/v1/verification-service.js.map +1 -0
  114. package/dist/rest/v1/verification-status/verification-status-api.d.ts +2 -2
  115. package/dist/rest/v1/verification-status/verification-status-api.jest.fixture.d.ts +3 -3
  116. package/dist/rest/v1/verification-status/verification-status-api.jest.fixture.js +3 -3
  117. package/dist/rest/v1/verification-status/verification-status-api.js +2 -2
  118. package/dist/rest/v1/verification-status/verification-status-api.js.map +1 -1
  119. package/dist/rest/v1/verifications/verifications-api.d.ts +97 -22
  120. package/dist/rest/v1/verifications/verifications-api.jest.fixture.d.ts +56 -8
  121. package/dist/rest/v1/verifications/verifications-api.jest.fixture.js +34 -6
  122. package/dist/rest/v1/verifications/verifications-api.jest.fixture.js.map +1 -1
  123. package/dist/rest/v1/verifications/verifications-api.js +216 -18
  124. package/dist/rest/v1/verifications/verifications-api.js.map +1 -1
  125. package/package.json +2 -2
  126. package/dist/models/v1/callout-initiate-verification-response/callout-initiate-verification-response.js +0 -9
  127. package/dist/models/v1/callout-initiate-verification-response/callout-initiate-verification-response.js.map +0 -1
  128. package/dist/models/v1/callout-initiate-verification-response/index.d.ts +0 -1
  129. package/dist/models/v1/callout-initiate-verification-response/index.js.map +0 -1
  130. package/dist/models/v1/callout-verification-report-request/callout-verification-report-request.d.ts +0 -14
  131. package/dist/models/v1/callout-verification-report-request/callout-verification-report-request.js +0 -9
  132. package/dist/models/v1/callout-verification-report-request/callout-verification-report-request.js.map +0 -1
  133. package/dist/models/v1/callout-verification-report-request/index.d.ts +0 -1
  134. package/dist/models/v1/callout-verification-report-request/index.js.map +0 -1
  135. package/dist/models/v1/callout-verification-report-request-callout/callout-verification-report-request-callout.d.ts +0 -13
  136. package/dist/models/v1/callout-verification-report-request-callout/callout-verification-report-request-callout.js +0 -9
  137. package/dist/models/v1/callout-verification-report-request-callout/callout-verification-report-request-callout.js.map +0 -1
  138. package/dist/models/v1/callout-verification-report-request-callout/index.d.ts +0 -1
  139. package/dist/models/v1/callout-verification-report-request-callout/index.js.map +0 -1
  140. package/dist/models/v1/data-initiate-verification-response/data-initiate-verification-response.d.ts +0 -19
  141. package/dist/models/v1/data-initiate-verification-response/data-initiate-verification-response.js +0 -9
  142. package/dist/models/v1/data-initiate-verification-response/data-initiate-verification-response.js.map +0 -1
  143. package/dist/models/v1/data-initiate-verification-response/index.d.ts +0 -1
  144. package/dist/models/v1/data-initiate-verification-response/index.js.map +0 -1
  145. package/dist/models/v1/data-initiate-verification-response-seamless/data-initiate-verification-response-seamless.d.ts +0 -13
  146. package/dist/models/v1/data-initiate-verification-response-seamless/data-initiate-verification-response-seamless.js +0 -9
  147. package/dist/models/v1/data-initiate-verification-response-seamless/data-initiate-verification-response-seamless.js.map +0 -1
  148. package/dist/models/v1/data-initiate-verification-response-seamless/index.d.ts +0 -1
  149. package/dist/models/v1/data-initiate-verification-response-seamless/index.js.map +0 -1
  150. package/dist/models/v1/error/error.js +0 -9
  151. package/dist/models/v1/error/error.js.map +0 -1
  152. package/dist/models/v1/error/index.d.ts +0 -1
  153. package/dist/models/v1/error/index.js.map +0 -1
  154. package/dist/models/v1/flash-call-initiate-verification-response/flash-call-initiate-verification-response.d.ts +0 -19
  155. package/dist/models/v1/flash-call-initiate-verification-response/flash-call-initiate-verification-response.js +0 -9
  156. package/dist/models/v1/flash-call-initiate-verification-response/flash-call-initiate-verification-response.js.map +0 -1
  157. package/dist/models/v1/flash-call-initiate-verification-response/index.d.ts +0 -1
  158. package/dist/models/v1/flash-call-initiate-verification-response/index.js.map +0 -1
  159. package/dist/models/v1/flash-call-initiate-verification-response-flash-call/flash-call-initiate-verification-response-flash-call.d.ts +0 -19
  160. package/dist/models/v1/flash-call-initiate-verification-response-flash-call/flash-call-initiate-verification-response-flash-call.js +0 -9
  161. package/dist/models/v1/flash-call-initiate-verification-response-flash-call/flash-call-initiate-verification-response-flash-call.js.map +0 -1
  162. package/dist/models/v1/flash-call-initiate-verification-response-flash-call/index.d.ts +0 -1
  163. package/dist/models/v1/flash-call-initiate-verification-response-flash-call/index.js.map +0 -1
  164. package/dist/models/v1/flash-call-request-event-response/flash-call-request-event-response.d.ts +0 -14
  165. package/dist/models/v1/flash-call-request-event-response/flash-call-request-event-response.js +0 -9
  166. package/dist/models/v1/flash-call-request-event-response/flash-call-request-event-response.js.map +0 -1
  167. package/dist/models/v1/flash-call-request-event-response/index.d.ts +0 -1
  168. package/dist/models/v1/flash-call-request-event-response/index.js +0 -3
  169. package/dist/models/v1/flash-call-request-event-response/index.js.map +0 -1
  170. package/dist/models/v1/flash-call-request-event-response-flash-call/flash-call-request-event-response-flash-call.js +0 -9
  171. package/dist/models/v1/flash-call-request-event-response-flash-call/flash-call-request-event-response-flash-call.js.map +0 -1
  172. package/dist/models/v1/flash-call-request-event-response-flash-call/index.d.ts +0 -1
  173. package/dist/models/v1/flash-call-request-event-response-flash-call/index.js +0 -3
  174. package/dist/models/v1/flash-call-request-event-response-flash-call/index.js.map +0 -1
  175. package/dist/models/v1/flashcall-verification-report-request/flashcall-verification-report-request.d.ts +0 -14
  176. package/dist/models/v1/flashcall-verification-report-request/flashcall-verification-report-request.js +0 -9
  177. package/dist/models/v1/flashcall-verification-report-request/flashcall-verification-report-request.js.map +0 -1
  178. package/dist/models/v1/flashcall-verification-report-request/index.d.ts +0 -1
  179. package/dist/models/v1/flashcall-verification-report-request/index.js +0 -3
  180. package/dist/models/v1/flashcall-verification-report-request/index.js.map +0 -1
  181. package/dist/models/v1/flashcall-verification-report-request-flash-call/flashcall-verification-report-request-flash-call.d.ts +0 -13
  182. package/dist/models/v1/flashcall-verification-report-request-flash-call/flashcall-verification-report-request-flash-call.js +0 -9
  183. package/dist/models/v1/flashcall-verification-report-request-flash-call/flashcall-verification-report-request-flash-call.js.map +0 -1
  184. package/dist/models/v1/flashcall-verification-report-request-flash-call/index.d.ts +0 -1
  185. package/dist/models/v1/flashcall-verification-report-request-flash-call/index.js +0 -3
  186. package/dist/models/v1/flashcall-verification-report-request-flash-call/index.js.map +0 -1
  187. package/dist/models/v1/flashcall-verification-report-response-price/flashcall-verification-report-response-price.js +0 -9
  188. package/dist/models/v1/flashcall-verification-report-response-price/flashcall-verification-report-response-price.js.map +0 -1
  189. package/dist/models/v1/flashcall-verification-report-response-price/index.d.ts +0 -1
  190. package/dist/models/v1/flashcall-verification-report-response-price/index.js +0 -3
  191. package/dist/models/v1/flashcall-verification-report-response-price/index.js.map +0 -1
  192. package/dist/models/v1/initiate-verification-resource/index.d.ts +0 -1
  193. package/dist/models/v1/initiate-verification-resource/index.js +0 -3
  194. package/dist/models/v1/initiate-verification-resource/index.js.map +0 -1
  195. package/dist/models/v1/initiate-verification-resource/initiate-verification-resource.d.ts +0 -21
  196. package/dist/models/v1/initiate-verification-resource/initiate-verification-resource.js +0 -9
  197. package/dist/models/v1/initiate-verification-resource/initiate-verification-resource.js.map +0 -1
  198. package/dist/models/v1/initiate-verification-resource-flash-call-options/index.d.ts +0 -1
  199. package/dist/models/v1/initiate-verification-resource-flash-call-options/index.js +0 -3
  200. package/dist/models/v1/initiate-verification-resource-flash-call-options/index.js.map +0 -1
  201. package/dist/models/v1/initiate-verification-resource-flash-call-options/initiate-verification-resource-flash-call-options.d.ts +0 -13
  202. package/dist/models/v1/initiate-verification-resource-flash-call-options/initiate-verification-resource-flash-call-options.js +0 -9
  203. package/dist/models/v1/initiate-verification-resource-flash-call-options/initiate-verification-resource-flash-call-options.js.map +0 -1
  204. package/dist/models/v1/initiate-verification-response/index.d.ts +0 -1
  205. package/dist/models/v1/initiate-verification-response/index.js +0 -3
  206. package/dist/models/v1/initiate-verification-response/index.js.map +0 -1
  207. package/dist/models/v1/initiate-verification-response/initiate-verification-response.d.ts +0 -11
  208. package/dist/models/v1/initiate-verification-response/initiate-verification-response.js +0 -9
  209. package/dist/models/v1/initiate-verification-response/initiate-verification-response.js.map +0 -1
  210. package/dist/models/v1/sms-initiate-verification-response/index.d.ts +0 -1
  211. package/dist/models/v1/sms-initiate-verification-response/index.js +0 -3
  212. package/dist/models/v1/sms-initiate-verification-response/index.js.map +0 -1
  213. package/dist/models/v1/sms-initiate-verification-response/sms-initiate-verification-response.d.ts +0 -19
  214. package/dist/models/v1/sms-initiate-verification-response/sms-initiate-verification-response.js +0 -9
  215. package/dist/models/v1/sms-initiate-verification-response/sms-initiate-verification-response.js.map +0 -1
  216. package/dist/models/v1/sms-initiate-verification-response-sms/index.d.ts +0 -1
  217. package/dist/models/v1/sms-initiate-verification-response-sms/index.js +0 -3
  218. package/dist/models/v1/sms-initiate-verification-response-sms/index.js.map +0 -1
  219. package/dist/models/v1/sms-initiate-verification-response-sms/sms-initiate-verification-response-sms.d.ts +0 -15
  220. package/dist/models/v1/sms-initiate-verification-response-sms/sms-initiate-verification-response-sms.js +0 -9
  221. package/dist/models/v1/sms-initiate-verification-response-sms/sms-initiate-verification-response-sms.js.map +0 -1
  222. package/dist/models/v1/sms-request-event-response-sms/index.d.ts +0 -1
  223. package/dist/models/v1/sms-request-event-response-sms/index.js +0 -3
  224. package/dist/models/v1/sms-request-event-response-sms/index.js.map +0 -1
  225. package/dist/models/v1/sms-request-event-response-sms/sms-request-event-response-sms.d.ts +0 -12
  226. package/dist/models/v1/sms-request-event-response-sms/sms-request-event-response-sms.js +0 -9
  227. package/dist/models/v1/sms-request-event-response-sms/sms-request-event-response-sms.js.map +0 -1
  228. package/dist/models/v1/sms-verification-report-request/index.d.ts +0 -1
  229. package/dist/models/v1/sms-verification-report-request/index.js +0 -3
  230. package/dist/models/v1/sms-verification-report-request/index.js.map +0 -1
  231. package/dist/models/v1/sms-verification-report-request/sms-verification-report-request.d.ts +0 -14
  232. package/dist/models/v1/sms-verification-report-request/sms-verification-report-request.js +0 -9
  233. package/dist/models/v1/sms-verification-report-request/sms-verification-report-request.js.map +0 -1
  234. package/dist/models/v1/sms-verification-report-request-sms/index.d.ts +0 -1
  235. package/dist/models/v1/sms-verification-report-request-sms/index.js +0 -3
  236. package/dist/models/v1/sms-verification-report-request-sms/index.js.map +0 -1
  237. package/dist/models/v1/sms-verification-report-request-sms/sms-verification-report-request-sms.d.ts +0 -15
  238. package/dist/models/v1/sms-verification-report-request-sms/sms-verification-report-request-sms.js +0 -9
  239. package/dist/models/v1/sms-verification-report-request-sms/sms-verification-report-request-sms.js.map +0 -1
  240. package/dist/models/v1/sms-verification-report-response-price/index.d.ts +0 -1
  241. package/dist/models/v1/sms-verification-report-response-price/index.js +0 -3
  242. package/dist/models/v1/sms-verification-report-response-price/index.js.map +0 -1
  243. package/dist/models/v1/sms-verification-report-response-price/sms-verification-report-response-price.d.ts +0 -14
  244. package/dist/models/v1/sms-verification-report-response-price/sms-verification-report-response-price.js +0 -9
  245. package/dist/models/v1/sms-verification-report-response-price/sms-verification-report-response-price.js.map +0 -1
  246. package/dist/models/v1/verification-request-event-price/index.d.ts +0 -1
  247. package/dist/models/v1/verification-request-event-price/index.js +0 -3
  248. package/dist/models/v1/verification-request-event-price/index.js.map +0 -1
  249. package/dist/models/v1/verification-request-event-price/verification-request-event-price.d.ts +0 -15
  250. package/dist/models/v1/verification-request-event-price/verification-request-event-price.js +0 -9
  251. package/dist/models/v1/verification-request-event-price/verification-request-event-price.js.map +0 -1
  252. package/dist/models/v1/verification-response/index.d.ts +0 -1
  253. package/dist/models/v1/verification-response/index.js +0 -3
  254. package/dist/models/v1/verification-response/index.js.map +0 -1
  255. package/dist/models/v1/verification-response/verification-response.d.ts +0 -10
  256. package/dist/models/v1/verification-response/verification-response.js +0 -9
  257. package/dist/models/v1/verification-response/verification-response.js.map +0 -1
  258. package/dist/rest/v1/verification-api.js.map +0 -1
  259. package/dist/rest/v1/verification.js.map +0 -1
  260. /package/dist/models/v1/{callout-initiate-verification-response → flashcall-request-event-response}/index.js +0 -0
  261. /package/dist/models/v1/{callout-verification-report-request-callout → start-callout-verification-response}/index.js +0 -0
  262. /package/dist/models/v1/{callout-verification-report-request → start-flashcall-verification-response}/index.js +0 -0
  263. /package/dist/models/v1/{data-initiate-verification-response-seamless → start-seamless-verification-response}/index.js +0 -0
  264. /package/dist/models/v1/{data-initiate-verification-response → start-sms-verification-response}/index.js +0 -0
  265. /package/dist/models/v1/{error → start-verification-request}/index.js +0 -0
  266. /package/dist/models/v1/{flash-call-initiate-verification-response-flash-call → verification-error}/index.js +0 -0
  267. /package/dist/models/v1/{flash-call-initiate-verification-response → verification-report-response-price}/index.js +0 -0
package/README.md CHANGED
@@ -2,13 +2,12 @@
2
2
 
3
3
  This package contains the Sinch Verification SDK for Node.js for use with [Sinch APIs](https://developers.sinch.com/). To use it, you will need a Sinch account. Please [sign up](https://dashboard.sinch.com/signup) or [log in](https://dashboard.sinch.com/login) if you already have one.
4
4
 
5
- <span style="color:red; font-weight:bold">Warning:</span>
6
- **This SDK is currently available for preview purposes only. It should not be used in production environments.**
7
-
5
+ > <span style="color:red; font-weight:bold">Warning:</span>
6
+ > **This SDK is currently available to selected developers for preview use only. It is being provided for the purpose of collecting feedback, and should not be used in production environments.**
8
7
 
9
8
  ## Installation
10
9
 
11
- We recommend to use this SDK as part of the `@sinch/sdk-core` package as it will take care about the authentication plugins to use.
10
+ We recommend to use this SDK as part of the [`@sinch/sdk-core`](../../packages/sdk-core) package in order to make the most out of all the Sinch products.
12
11
 
13
12
  However, it's still possible to use this SDK standalone is you need to access the Verification API only.
14
13
 
@@ -41,17 +40,17 @@ import {
41
40
  InitiateVerificationResponse,
42
41
  StartVerificationRequestData,
43
42
  SinchClient,
44
- SinchClientParameters,
43
+ ApplicationCredentials,
45
44
  } from '@sinch/sdk-core';
46
45
 
47
- const credentials: SinchClientParameters = {
46
+ const credentials: ApplicationCredentials = {
48
47
  applicationKey: 'APPLICATION_ID',
49
48
  applicationSecret: 'APPLICATION_SECRET',
50
49
  };
51
50
  const sinch = new SinchClient(credentials);
52
51
 
53
52
  const requestData: StartVerificationRequestData = {
54
- InitiateVerificationResource: {
53
+ initiateVerificationRequestBody: {
55
54
  identity: {
56
55
  type: 'number',
57
56
  endpoint: '+17813334444',
@@ -60,18 +59,18 @@ const requestData: StartVerificationRequestData = {
60
59
  },
61
60
  };
62
61
 
63
- // Access the 'verification' domain registered on the Sinch Client
62
+ // Access the 'verification' controller registered on the Sinch Client
64
63
  const verificationInitResponse: InitiateVerificationResponse
65
64
  = await sinch.verification.verifications.start(requestData);
66
65
  ```
67
66
 
68
67
  ### Standalone
69
68
 
70
- The SDK can be used standalone if you need to use only the Verification APIs. You will need to import the `XTimestampRequest` and `SigningRequest` plugins from the `@sinch/sdk-client` package to manage the authentication.
69
+ The SDK can be used standalone if you need to use only the Verification APIs.
71
70
 
72
71
  ```typescript
73
72
  import {
74
- SinchClientParameters
73
+ ApplicationCredentials
75
74
  } from '@sinch/sdk-client';
76
75
  import {
77
76
  InitiateVerificationResponse,
@@ -79,16 +78,16 @@ import {
79
78
  Verification,
80
79
  } from '@sinch/verification';
81
80
 
82
- const credentials: SinchClientParameters = {
81
+ const credentials: ApplicationCredentials = {
83
82
  applicationKey: 'APPLICATION_ID',
84
83
  applicationSecret: 'APPLICATION_SECRET',
85
84
  };
86
85
 
87
- // Declare the 'verification' in a standalone way
86
+ // Declare the 'verification' controller in a standalone way
88
87
  const verification = new Verification(credentials);
89
88
 
90
89
  const requestData: StartVerificationRequestData = {
91
- InitiateVerificationResource: {
90
+ initiateVerificationRequestBody: {
92
91
  identity: {
93
92
  type: 'number',
94
93
  endpoint: '+17813334444',
@@ -97,29 +96,29 @@ const requestData: StartVerificationRequestData = {
97
96
  },
98
97
  };
99
98
 
100
- // Use the standalone declaration of the 'verification' domain
99
+ // Use the standalone declaration of the 'verification' controller
101
100
  const verificationInitResponse: InitiateVerificationResponse
102
101
  = await verification.verifications.start(requestData);
103
102
  ```
104
103
 
105
104
  ## Promises
106
105
 
107
- All the methods that interact with the Sinch APIs use Promises. You can use `await` in an `async` method to wait for the response or you can resolve them yourself with `then()` / `catch()`.
106
+ All the methods that interact with the Sinch APIs use Promises. You can use `await` in an `async` method to wait for the response, or you can resolve them yourself with `then()` / `catch()`.
108
107
 
109
108
  ```typescript
110
- // Method 1: Wait for the Promise to complete
109
+ // Method 1: Wait for the Promise to complete (you need to be in an 'async' method)
111
110
  let verificationInitResponse: InitiateVerificationResponse;
112
111
  try {
113
112
  verificationInitResponse = await sinch.verification.verifications.start(requestData);
114
- console.log(`Verification ID = ${response.id}`);
113
+ console.log(`Verification ID = ${verificationInitResponse.id}`);
115
114
  } catch (error: any) {
116
- console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.InitiateVerificationResource.identity.endpoint}`);
115
+ console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.initiateVerificationRequestBody.identity.endpoint}`);
117
116
  }
118
117
 
119
118
  // Method 2: Resolve the promise
120
119
  sinch.verification.verifications.start(requestData)
121
120
  .then(response => console.log(`Verification ID = ${response.id}`))
122
- .catch(error => console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.InitiateVerificationResource.identity.endpoint}`));
121
+ .catch(error => console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.initiateVerificationRequestBody.identity.endpoint}`));
123
122
  ```
124
123
 
125
124
  ## Contact
@@ -1,9 +1,3 @@
1
- /**
2
- * Model: CalloutRequestEventResponse
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
1
  import { CalloutRequestEventResponseCallout } from '../callout-request-event-response-callout';
8
2
  export interface CalloutRequestEventResponse {
9
3
  /** Determines whether the verification can be executed. */
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * Model: CalloutRequestEventResponse
4
- *
5
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
6
- *
7
- */
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  //# sourceMappingURL=callout-request-event-response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout-request-event-response.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-request-event-response/callout-request-event-response.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"callout-request-event-response.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-request-event-response/callout-request-event-response.ts"],"names":[],"mappings":""}
@@ -1,9 +1,3 @@
1
- /**
2
- * Model: CalloutRequestEventResponseCallout
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
1
  import { CalloutRequestEventResponseCalloutSpeech } from '../callout-request-event-response-callout-speech';
8
2
  export interface CalloutRequestEventResponseCallout {
9
3
  /** The Phone Call PIN that should be entered by the user. Sinch servers automatically generate PIN codes for Phone Call verification. If you want to set your own code, you can specify it in the response to the Verification Request Event. */
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * Model: CalloutRequestEventResponseCallout
4
- *
5
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
6
- *
7
- */
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  //# sourceMappingURL=callout-request-event-response-callout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout-request-event-response-callout.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"callout-request-event-response-callout.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.ts"],"names":[],"mappings":""}
@@ -1,9 +1,3 @@
1
- /**
2
- * Model: CalloutRequestEventResponseCalloutSpeech
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
1
  /**
8
2
  * An object defining various properties for the text-to-speech message.
9
3
  */
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * Model: CalloutRequestEventResponseCalloutSpeech
4
- *
5
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
6
- *
7
- */
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  //# sourceMappingURL=callout-request-event-response-callout-speech.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout-request-event-response-callout-speech.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"callout-request-event-response-callout-speech.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.ts"],"names":[],"mappings":""}
@@ -1,17 +1,11 @@
1
- /**
2
- * Model: CalloutVerificationReportResponse
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
- import { FlashcallVerificationReportResponsePrice } from '../flashcall-verification-report-response-price';
1
+ import { VerificationReportResponsePrice } from '../verification-report-response-price';
8
2
  import { VerificationStatusEnum } from '../enums';
9
3
  import { Identity } from '../identity';
10
4
  export interface CalloutVerificationReportResponse {
11
5
  /** The unique ID of the verification request. */
12
6
  id?: string;
13
7
  /** The method of the verification request. This will always be `callout`. */
14
- method?: MethodEnum;
8
+ method?: 'callout';
15
9
  /** The status of the verification request. */
16
10
  status?: VerificationStatusEnum;
17
11
  /** Displays the reason why a verification has `FAILED`, was `DENIED`, or was `ABORTED`. */
@@ -20,8 +14,8 @@ export interface CalloutVerificationReportResponse {
20
14
  callComplete?: boolean;
21
15
  /** The reference ID that was optionally passed together with the verification request. */
22
16
  reference?: string;
23
- /** @see FlashcallVerificationReportResponsePrice */
24
- price?: FlashcallVerificationReportResponsePrice;
17
+ /** @see VerificationReportResponsePrice */
18
+ price?: VerificationReportResponsePrice;
25
19
  /** */
26
20
  identity?: Identity;
27
21
  /** */
@@ -31,5 +25,4 @@ export interface CalloutVerificationReportResponse {
31
25
  /** */
32
26
  callResult?: string;
33
27
  }
34
- export type MethodEnum = 'callout';
35
28
  export type ReasonEnum = 'Fraud' | 'Not enough credit' | 'Blocked' | 'Denied by callback' | 'Invalid callback' | 'Internal error' | 'Destination denied' | 'Network error or number unreachable' | 'Failed pending' | 'SMS delivery failure' | 'Invalid CLI' | 'Invalid code' | 'Expired' | 'Hung up without entering valid code';
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * Model: CalloutVerificationReportResponse
4
- *
5
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
6
- *
7
- */
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  //# sourceMappingURL=callout-verification-report-response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callout-verification-report-response.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-verification-report-response/callout-verification-report-response.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"callout-verification-report-response.js","sourceRoot":"","sources":["../../../../src/models/v1/callout-verification-report-response/callout-verification-report-response.ts"],"names":[],"mappings":""}
@@ -1,18 +1,10 @@
1
- export type { MethodEnum as CalloutInitiateVerificationResponseMethodEnum, } from './callout-initiate-verification-response/callout-initiate-verification-response';
2
1
  export type { ActionEnum as CalloutRequestEventResponseActionEnum, } from './callout-request-event-response/callout-request-event-response';
3
- export type { MethodEnum as CalloutVerificationReportRequestMethodEnum, } from './callout-verification-report-request/callout-verification-report-request';
4
- export type { MethodEnum as CalloutVerificationReportResponseMethodEnum, ReasonEnum as CalloutVerificationReportResponseReasonEnum, } from './callout-verification-report-response/callout-verification-report-response';
5
- export type { MethodEnum as DataInitiateVerificationResponseMethodEnum, } from './data-initiate-verification-response/data-initiate-verification-response';
6
- export type { MethodEnum as FlashCallInitiateVerificationResponseMethodEnum, } from './flash-call-initiate-verification-response/flash-call-initiate-verification-response';
7
- export type { ActionEnum as FlashCallRequestEventResponseActionEnum, } from './flash-call-request-event-response/flash-call-request-event-response';
8
- export type { MethodEnum as FlashcallVerificationReportRequestMethodEnum, } from './flashcall-verification-report-request/flashcall-verification-report-request';
9
- export type { MethodEnum as FlashcallVerificationReportResponseMethodEnum, ReasonEnum as FlashcallVerificationReportResponseReasonEnum, SourceEnum as FlashcallVerificationReportResponseSourceEnum, } from './flashcall-verification-report-response/flashcall-verification-report-response';
2
+ export type { ReasonEnum as CalloutVerificationReportResponseReasonEnum, } from './callout-verification-report-response/callout-verification-report-response';
3
+ export type { ActionEnum as FlashCallRequestEventResponseActionEnum, } from './flashcall-request-event-response/flashcall-request-event-response';
4
+ export type { ReasonEnum as FlashcallVerificationReportResponseReasonEnum, SourceEnum as FlashcallVerificationReportResponseSourceEnum, } from './flashcall-verification-report-response/flashcall-verification-report-response';
10
5
  export type { TypeEnum as IdentityTypeEnum } from './identity/identity';
11
- export type { MethodEnum as InitiateVerificationResourceMethodEnum, } from './initiate-verification-resource/initiate-verification-resource';
12
- export type { MethodEnum as SMSInitiateVerificationResponseMethodEnum, } from './sms-initiate-verification-response/sms-initiate-verification-response';
13
6
  export type { ActionEnum as SMSRequestEventResponseActionEnum, } from './sms-request-event-response/sms-request-event-response';
14
- export type { MethodEnum as SMSVerificationReportResponseMethodEnum, ReasonEnum as SMSVerificationReportResponseReasonEnum, SourceEnum as SMSVerificationReportResponseSourceEnum, } from './sms-verification-report-response/sms-verification-report-response';
15
- export type { MethodEnum as SmsVerificationReportRequestMethodEnum, } from './sms-verification-report-request/sms-verification-report-request';
7
+ export type { ReasonEnum as SMSVerificationReportResponseReasonEnum, SourceEnum as SMSVerificationReportResponseSourceEnum, } from './sms-verification-report-response/sms-verification-report-response';
16
8
  export type { MethodEnum as VerificationRequestEventMethodEnum, } from './verification-request-event/verification-request-event';
17
9
  export type { MethodEnum as VerificationResultEventMethodEnum, ReasonEnum as VerificationResultEventReasonEnum, SourceEnum as VerificationResultEventSourceEnum, } from './verification-result-event/verification-result-event';
18
10
  export type VerificationStatusEnum = 'PENDING' | 'SUCCESSFUL' | 'FAIL' | 'DENIED' | 'ABORTED' | 'ERROR';
@@ -1,12 +1,14 @@
1
- /**
2
- * Model: FlashCallRequestEventResponseFlashCall
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
- export interface FlashCallRequestEventResponseFlashCall {
1
+ export interface FlashCallRequestEventResponse {
2
+ /** Determines whether the verification can be executed. */
3
+ action?: ActionEnum;
4
+ /** @see FlashCallContent */
5
+ flashCall?: FlashCallContent;
6
+ }
7
+ export type ActionEnum = 'allow' | 'deny';
8
+ interface FlashCallContent {
8
9
  /** The phone number that will be displayed to the user when the flashcall is received on the user\'s phone. By default, the Sinch dashboard will randomly select the CLI that will be displayed during a flashcall from a pool of numbers. If you want to set your own CLI, you can specify it in the response to the Verification Request Event. */
9
10
  cli?: string;
10
11
  /** The maximum time that a flashcall verification will be active and can be completed. If the phone number hasn\'t been verified successfully during this time, then the verification request will fail. By default, the Sinch dashboard will automatically optimize dial time out during a flashcall. If you want to set your own dial time out for the flashcall, you can specify it in the response to the Verification Request Event. */
11
12
  dialTimeout?: number;
12
13
  }
14
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=flashcall-request-event-response.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flashcall-request-event-response.js","sourceRoot":"","sources":["../../../../src/models/v1/flashcall-request-event-response/flashcall-request-event-response.ts"],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export type { FlashCallRequestEventResponse } from './flashcall-request-event-response';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/flashcall-request-event-response/index.ts"],"names":[],"mappings":""}
@@ -1,25 +1,19 @@
1
- /**
2
- * Model: FlashcallVerificationReportResponse
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
- import { FlashcallVerificationReportResponsePrice } from '../flashcall-verification-report-response-price';
1
+ import { VerificationReportResponsePrice } from '../verification-report-response-price';
8
2
  import { VerificationStatusEnum } from '../enums';
9
3
  import { Identity } from '../identity';
10
- export interface FlashcallVerificationReportResponse {
4
+ export interface FlashCallVerificationReportResponse {
11
5
  /** The unique ID of the verification request. */
12
6
  id?: string;
13
- /** The method of the verification request. This will always be `flashCall`. */
14
- method?: MethodEnum;
7
+ /** The method of the verification request. This will always be `flashcall`. */
8
+ method?: 'flashcall';
15
9
  /** The status of the verification request. */
16
10
  status?: VerificationStatusEnum;
17
11
  /** Displays the reason why a verification has `FAILED`, was `DENIED`, or was `ABORTED`. */
18
12
  reason?: ReasonEnum;
19
13
  /** The reference ID that was optionally passed together with the verification request. */
20
14
  reference?: string;
21
- /** @see FlashcallVerificationReportResponsePrice */
22
- price?: FlashcallVerificationReportResponsePrice;
15
+ /** @see VerificationReportResponsePrice */
16
+ price?: VerificationReportResponsePrice;
23
17
  /** Free text that the client is sending, used to show if the call/SMS was intercepted or not. */
24
18
  source?: SourceEnum;
25
19
  /** */
@@ -33,6 +27,5 @@ export interface FlashcallVerificationReportResponse {
33
27
  /** */
34
28
  callResult?: string;
35
29
  }
36
- export type MethodEnum = 'flashcall';
37
30
  export type ReasonEnum = 'Fraud' | 'Not enough credit' | 'Blocked' | 'Denied by callback' | 'Invalid callback' | 'Internal error' | 'Destination denied' | 'Network error or number unreachable' | 'Failed pending' | 'SMS delivery failure' | 'Invalid CLI' | 'Invalid code' | 'Expired' | 'Hung up without entering valid code';
38
31
  export type SourceEnum = 'intercepted' | 'manual';
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * Model: FlashcallVerificationReportResponse
4
- *
5
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
6
- *
7
- */
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  //# sourceMappingURL=flashcall-verification-report-response.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"flashcall-verification-report-response.js","sourceRoot":"","sources":["../../../../src/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"flashcall-verification-report-response.js","sourceRoot":"","sources":["../../../../src/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- export type { FlashcallVerificationReportResponse } from './flashcall-verification-report-response';
1
+ export type { FlashCallVerificationReportResponse } from './flashcall-verification-report-response';
@@ -0,0 +1,13 @@
1
+ import { ReportCalloutVerificationByIdentityRequestData, ReportCalloutVerificationByIdRequestData, ReportFlashCallVerificationByIdentityRequestData, ReportFlashCallVerificationByIdRequestData, ReportSmsVerificationByIdentityRequestData, ReportSmsVerificationByIdRequestData, StartCalloutVerificationRequestData, StartFlashCallVerificationRequestData, StartSeamlessVerificationRequestData, StartSmsVerificationRequestData } from '../../rest';
2
+ export declare const verificationsHelper: {
3
+ buildStartSmsVerificationRequest: (phoneNumber: string, reference?: string) => StartSmsVerificationRequestData;
4
+ buildStartCalloutVerificationRequest: (phoneNumber: string, reference?: string) => StartCalloutVerificationRequestData;
5
+ buildStartFlashCallVerificationRequest: (phoneNumber: string, reference?: string, dialTimeout?: number) => StartFlashCallVerificationRequestData;
6
+ buildStartSeamlessVerificationRequest: (phoneNumber: string, reference?: string) => StartSeamlessVerificationRequestData;
7
+ buildReportSmsVerificationByIdRequest: (id: string, code: string, cli?: string) => ReportSmsVerificationByIdRequestData;
8
+ buildReportCalloutVerificationByIdRequest: (id: string, code: string) => ReportCalloutVerificationByIdRequestData;
9
+ buildReportFlashCallVerificationByIdRequest: (id: string, cli: string) => ReportFlashCallVerificationByIdRequestData;
10
+ buildReportSmsVerificationByIdentityRequest: (identity: string, code: string, cli?: string) => ReportSmsVerificationByIdentityRequestData;
11
+ buildReportCalloutVerificationByIdentityRequest: (identity: string, code: string) => ReportCalloutVerificationByIdentityRequestData;
12
+ buildReportFlashCallVerificationByIdentityRequest: (identity: string, cli: string) => ReportFlashCallVerificationByIdentityRequestData;
13
+ };
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.verificationsHelper = void 0;
4
+ exports.verificationsHelper = {
5
+ buildStartSmsVerificationRequest: (phoneNumber, reference) => {
6
+ return {
7
+ startVerificationWithSmsRequestBody: {
8
+ identity: {
9
+ type: 'number',
10
+ endpoint: phoneNumber,
11
+ },
12
+ reference,
13
+ },
14
+ };
15
+ },
16
+ buildStartCalloutVerificationRequest: (phoneNumber, reference) => {
17
+ return {
18
+ startVerificationWithCalloutRequestBody: {
19
+ identity: {
20
+ type: 'number',
21
+ endpoint: phoneNumber,
22
+ },
23
+ reference,
24
+ },
25
+ };
26
+ },
27
+ buildStartFlashCallVerificationRequest: (phoneNumber, reference, dialTimeout) => {
28
+ return {
29
+ startVerificationWithFlashCallRequestBody: {
30
+ identity: {
31
+ type: 'number',
32
+ endpoint: phoneNumber,
33
+ },
34
+ reference,
35
+ ...(dialTimeout !== undefined) ? {
36
+ flashCallOptions: {
37
+ dialTimeout,
38
+ },
39
+ } : {},
40
+ },
41
+ };
42
+ },
43
+ buildStartSeamlessVerificationRequest: (phoneNumber, reference) => {
44
+ return {
45
+ startSeamlessVerificationRequestBody: {
46
+ identity: {
47
+ type: 'number',
48
+ endpoint: phoneNumber,
49
+ },
50
+ reference,
51
+ },
52
+ };
53
+ },
54
+ buildReportSmsVerificationByIdRequest: (id, code, cli) => {
55
+ return {
56
+ id,
57
+ reportSmsVerificationByIdRequestBody: {
58
+ sms: {
59
+ code,
60
+ cli,
61
+ },
62
+ },
63
+ };
64
+ },
65
+ buildReportCalloutVerificationByIdRequest: (id, code) => {
66
+ return {
67
+ id,
68
+ reportCalloutVerificationByIdRequestBody: {
69
+ callout: {
70
+ code,
71
+ },
72
+ },
73
+ };
74
+ },
75
+ buildReportFlashCallVerificationByIdRequest: (id, cli) => {
76
+ return {
77
+ id,
78
+ reportFlashCallVerificationByIdRequestBody: {
79
+ flashCall: {
80
+ cli,
81
+ },
82
+ },
83
+ };
84
+ },
85
+ buildReportSmsVerificationByIdentityRequest: (identity, code, cli) => {
86
+ return {
87
+ endpoint: identity,
88
+ reportSmsVerificationByIdentityRequestBody: {
89
+ sms: {
90
+ code,
91
+ cli,
92
+ },
93
+ },
94
+ };
95
+ },
96
+ buildReportCalloutVerificationByIdentityRequest: (identity, code) => {
97
+ return {
98
+ endpoint: identity,
99
+ reportCalloutVerificationByIdentityRequestBody: {
100
+ callout: {
101
+ code,
102
+ },
103
+ },
104
+ };
105
+ },
106
+ buildReportFlashCallVerificationByIdentityRequest: (identity, cli) => {
107
+ return {
108
+ endpoint: identity,
109
+ reportFlashCallVerificationByIdentityRequestBody: {
110
+ flashCall: {
111
+ cli,
112
+ },
113
+ },
114
+ };
115
+ },
116
+ };
117
+ //# sourceMappingURL=helper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/models/v1/helper.ts"],"names":[],"mappings":";;;AAYa,QAAA,mBAAmB,GAAG;IACjC,gCAAgC,EAAE,CAChC,WAAmB,EACnB,SAAkB,EACe,EAAE;QACnC,OAAO;YACL,mCAAmC,EAAE;gBACnC,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,WAAW;iBACtB;gBACD,SAAS;aACV;SACF,CAAC;IACJ,CAAC;IACD,oCAAoC,EAAE,CACpC,WAAmB,EACnB,SAAkB,EACmB,EAAE;QACvC,OAAO;YACL,uCAAuC,EAAE;gBACvC,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,WAAW;iBACtB;gBACD,SAAS;aACV;SACF,CAAC;IACJ,CAAC;IACD,sCAAsC,EAAE,CACtC,WAAmB,EACnB,SAAkB,EAClB,WAAoB,EACmB,EAAE;QACzC,OAAO;YACL,yCAAyC,EAAE;gBACzC,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,WAAW;iBACtB;gBACD,SAAS;gBACT,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC;oBAC/B,gBAAgB,EAAE;wBAChB,WAAW;qBACZ;iBACF,CAAC,CAAC,CAAC,EAAE;aACP;SACF,CAAC;IACJ,CAAC;IACD,qCAAqC,EAAE,CACrC,WAAmB,EACnB,SAAkB,EACoB,EAAE;QACxC,OAAO;YACL,oCAAoC,EAAE;gBACpC,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,QAAQ,EAAE,WAAW;iBACtB;gBACD,SAAS;aACV;SACF,CAAC;IACJ,CAAC;IACD,qCAAqC,EAAE,CACrC,EAAU,EACV,IAAY,EACZ,GAAY,EAC0B,EAAE;QACxC,OAAO;YACL,EAAE;YACF,oCAAoC,EAAE;gBACpC,GAAG,EAAE;oBACH,IAAI;oBACJ,GAAG;iBACJ;aACF;SACF,CAAC;IACJ,CAAC;IACD,yCAAyC,EAAE,CACzC,EAAU,EACV,IAAY,EAC8B,EAAE;QAC5C,OAAO;YACL,EAAE;YACF,wCAAwC,EAAE;gBACxC,OAAO,EAAE;oBACP,IAAI;iBACL;aACF;SACF,CAAC;IACJ,CAAC;IACD,2CAA2C,EAAE,CAC3C,EAAU,EACV,GAAW,EACiC,EAAE;QAC9C,OAAO;YACL,EAAE;YACF,0CAA0C,EAAE;gBAC1C,SAAS,EAAE;oBACT,GAAG;iBACJ;aACF;SACF,CAAC;IACJ,CAAC;IACD,2CAA2C,EAAE,CAC3C,QAAgB,EAChB,IAAY,EACZ,GAAY,EACgC,EAAE;QAC9C,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,0CAA0C,EAAE;gBAC1C,GAAG,EAAE;oBACH,IAAI;oBACJ,GAAG;iBACJ;aACF;SACF,CAAC;IACJ,CAAC;IACD,+CAA+C,EAAE,CAC/C,QAAgB,EAChB,IAAY,EACoC,EAAE;QAClD,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,8CAA8C,EAAE;gBAC9C,OAAO,EAAE;oBACP,IAAI;iBACL;aACF;SACF,CAAC;IACJ,CAAC;IACD,iDAAiD,EAAE,CACjD,QAAgB,EAChB,GAAW,EACuC,EAAE;QACpD,OAAO;YACL,QAAQ,EAAE,QAAQ;YAClB,gDAAgD,EAAE;gBAChD,SAAS,EAAE;oBACT,GAAG;iBACJ;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,9 +1,3 @@
1
- /**
2
- * Model: Identity
3
- *
4
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
5
- *
6
- */
7
1
  /**
8
2
  * Specifies the type of endpoint that will be verified and the particular endpoint. `number` is currently the only supported endpoint type.
9
3
  */
@@ -12,5 +6,7 @@ export interface Identity {
12
6
  type: TypeEnum;
13
7
  /** For type `number` use an [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537)-compatible phone number. */
14
8
  endpoint: string;
9
+ /** */
10
+ verified?: boolean;
15
11
  }
16
12
  export type TypeEnum = 'number';
@@ -1,9 +1,3 @@
1
1
  "use strict";
2
- /**
3
- * Model: Identity
4
- *
5
- * THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.
6
- *
7
- */
8
2
  Object.defineProperty(exports, "__esModule", { value: true });
9
3
  //# sourceMappingURL=identity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/models/v1/identity/identity.ts"],"names":[],"mappings":";AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/models/v1/identity/identity.ts"],"names":[],"mappings":""}
@@ -1,41 +1,26 @@
1
- export * from './callout-initiate-verification-response';
2
1
  export * from './callout-request-event-response';
3
2
  export * from './callout-request-event-response-callout';
4
3
  export * from './callout-request-event-response-callout-speech';
5
- export * from './callout-verification-report-request';
6
- export * from './callout-verification-report-request-callout';
7
4
  export * from './callout-verification-report-response';
8
- export * from './data-initiate-verification-response';
9
- export * from './data-initiate-verification-response-seamless';
10
- export * from './error';
11
- export * from './flash-call-initiate-verification-response';
12
- export * from './flash-call-initiate-verification-response-flash-call';
13
- export * from './flash-call-request-event-response';
14
- export * from './flash-call-request-event-response-flash-call';
15
- export * from './flashcall-verification-report-request';
16
- export * from './flashcall-verification-report-request-flash-call';
5
+ export * from './flashcall-request-event-response';
17
6
  export * from './flashcall-verification-report-response';
18
- export * from './flashcall-verification-report-response-price';
7
+ export * from './verification-report-response-price';
19
8
  export * from './identity';
20
- export * from './initiate-verification-resource';
21
- export * from './initiate-verification-resource-flash-call-options';
22
- export * from './initiate-verification-response';
9
+ export * from './start-verification-request';
23
10
  export * from './links-object';
24
11
  export * from './price';
25
- export * from './sms-initiate-verification-response';
26
- export * from './sms-initiate-verification-response-sms';
12
+ export * from './start-flashcall-verification-response';
13
+ export * from './start-callout-verification-response';
14
+ export * from './start-seamless-verification-response';
15
+ export * from './start-sms-verification-response';
27
16
  export * from './sms-request-event-response';
28
- export * from './sms-request-event-response-sms';
29
17
  export * from './sms-verification-report-response';
30
- export * from './sms-verification-report-response-price';
31
- export * from './sms-verification-report-request';
32
- export * from './sms-verification-report-request-sms';
33
18
  export * from './verification-report-request';
34
19
  export * from './verification-report-response';
35
20
  export * from './verification-request-event';
36
- export * from './verification-request-event-price';
37
21
  export * from './verification-request-event-response';
38
- export * from './verification-response';
39
22
  export * from './verification-result-event';
40
23
  export * from './verification-result-event-response';
24
+ export * from './verification-error';
41
25
  export * from './enums';
26
+ export * from './helper';