@sinch/verification 0.0.1 → 0.0.3
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.
- package/README.md +29 -24
- package/dist/models/v1/callout-request-event-response/callout-request-event-response.d.ts +0 -6
- package/dist/models/v1/callout-request-event-response/callout-request-event-response.js +0 -6
- package/dist/models/v1/callout-request-event-response/callout-request-event-response.js.map +1 -1
- package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.d.ts +0 -6
- package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.js +0 -6
- package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.js.map +1 -1
- package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.d.ts +0 -6
- package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.js +0 -6
- package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.js.map +1 -1
- package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.d.ts +4 -11
- package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js +0 -6
- package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js.map +1 -1
- package/dist/models/v1/enums.d.ts +4 -12
- 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
- package/dist/models/v1/flashcall-request-event-response/flashcall-request-event-response.js +3 -0
- package/dist/models/v1/flashcall-request-event-response/flashcall-request-event-response.js.map +1 -0
- package/dist/models/v1/flashcall-request-event-response/index.d.ts +1 -0
- package/dist/models/v1/flashcall-request-event-response/index.js.map +1 -0
- package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.d.ts +6 -13
- package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.js +0 -6
- package/dist/models/v1/flashcall-verification-report-response/flashcall-verification-report-response.js.map +1 -1
- package/dist/models/v1/flashcall-verification-report-response/index.d.ts +1 -1
- package/dist/models/v1/helper.d.ts +13 -0
- package/dist/models/v1/helper.js +117 -0
- package/dist/models/v1/helper.js.map +1 -0
- package/dist/models/v1/identity/identity.d.ts +0 -6
- package/dist/models/v1/identity/identity.js +0 -6
- package/dist/models/v1/identity/identity.js.map +1 -1
- package/dist/models/v1/index.d.ts +9 -24
- package/dist/models/v1/index.js +9 -24
- package/dist/models/v1/index.js.map +1 -1
- package/dist/models/v1/links-object/links-object.d.ts +0 -6
- package/dist/models/v1/links-object/links-object.js +0 -6
- package/dist/models/v1/links-object/links-object.js.map +1 -1
- package/dist/models/v1/price/price.d.ts +0 -6
- package/dist/models/v1/price/price.js +0 -6
- package/dist/models/v1/price/price.js.map +1 -1
- package/dist/models/v1/sms-request-event-response/sms-request-event-response.d.ts +9 -9
- package/dist/models/v1/sms-request-event-response/sms-request-event-response.js +0 -6
- package/dist/models/v1/sms-request-event-response/sms-request-event-response.js.map +1 -1
- package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.d.ts +2 -9
- package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.js +0 -6
- package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.js.map +1 -1
- package/dist/models/v1/start-callout-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-callout-verification-response/index.js.map +1 -0
- 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
- package/dist/models/v1/start-callout-verification-response/start-callout-verification-response.js +3 -0
- package/dist/models/v1/start-callout-verification-response/start-callout-verification-response.js.map +1 -0
- package/dist/models/v1/start-flashcall-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-flashcall-verification-response/index.js.map +1 -0
- package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.d.ts +22 -0
- package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.js +3 -0
- package/dist/models/v1/start-flashcall-verification-response/start-flashcall-verification-response.js.map +1 -0
- package/dist/models/v1/start-seamless-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-seamless-verification-response/index.js.map +1 -0
- package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.d.ts +13 -0
- package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.js +3 -0
- package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.js.map +1 -0
- package/dist/models/v1/start-sms-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-sms-verification-response/index.js.map +1 -0
- package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.d.ts +18 -0
- package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.js +3 -0
- package/dist/models/v1/start-sms-verification-response/start-sms-verification-response.js.map +1 -0
- package/dist/models/v1/start-verification-request/index.d.ts +1 -0
- package/dist/models/v1/start-verification-request/index.js.map +1 -0
- package/dist/models/v1/start-verification-request/start-verification-request.d.ts +26 -0
- package/dist/models/v1/start-verification-request/start-verification-request.js +3 -0
- package/dist/models/v1/start-verification-request/start-verification-request.js.map +1 -0
- package/dist/models/v1/verification-error/verification-error.d.ts +0 -6
- package/dist/models/v1/verification-error/verification-error.js +0 -6
- package/dist/models/v1/verification-error/verification-error.js.map +1 -1
- package/dist/models/v1/verification-report-request/index.d.ts +1 -1
- package/dist/models/v1/verification-report-request/verification-report-request.d.ts +27 -10
- package/dist/models/v1/verification-report-request/verification-report-request.js +0 -6
- package/dist/models/v1/verification-report-request/verification-report-request.js.map +1 -1
- package/dist/models/v1/verification-report-response/verification-report-response.d.ts +2 -8
- package/dist/models/v1/verification-report-response/verification-report-response.js +0 -6
- package/dist/models/v1/verification-report-response/verification-report-response.js.map +1 -1
- package/dist/models/v1/verification-report-response-price/index.d.ts +1 -0
- package/dist/models/v1/verification-report-response-price/index.js.map +1 -0
- 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
- package/dist/models/v1/verification-report-response-price/verification-report-response-price.js +3 -0
- package/dist/models/v1/verification-report-response-price/verification-report-response-price.js.map +1 -0
- package/dist/models/v1/verification-request-event/verification-request-event.d.ts +5 -11
- package/dist/models/v1/verification-request-event/verification-request-event.js +0 -6
- package/dist/models/v1/verification-request-event/verification-request-event.js.map +1 -1
- package/dist/models/v1/verification-request-event-response/verification-request-event-response.d.ts +1 -7
- package/dist/models/v1/verification-request-event-response/verification-request-event-response.js +0 -6
- package/dist/models/v1/verification-request-event-response/verification-request-event-response.js.map +1 -1
- package/dist/models/v1/verification-result-event/verification-result-event.d.ts +0 -6
- package/dist/models/v1/verification-result-event/verification-result-event.js +0 -6
- package/dist/models/v1/verification-result-event/verification-result-event.js.map +1 -1
- package/dist/models/v1/verification-result-event-response/verification-result-event-response.d.ts +1 -7
- package/dist/models/v1/verification-result-event-response/verification-result-event-response.js +0 -6
- package/dist/models/v1/verification-result-event-response/verification-result-event-response.js.map +1 -1
- package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +23 -1
- package/dist/rest/v1/callbacks/callbacks-webhook.js +40 -14
- package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
- package/dist/rest/v1/index.d.ts +1 -1
- package/dist/rest/v1/index.js +1 -1
- package/dist/rest/v1/index.js.map +1 -1
- package/dist/rest/v1/{verification-api.d.ts → verification-domain-api.d.ts} +1 -1
- package/dist/rest/v1/{verification-api.js → verification-domain-api.js} +4 -4
- package/dist/rest/v1/verification-domain-api.js.map +1 -0
- package/dist/rest/v1/{verification.d.ts → verification-service.d.ts} +1 -7
- package/dist/rest/v1/{verification.js → verification-service.js} +4 -4
- package/dist/rest/v1/verification-service.js.map +1 -0
- package/dist/rest/v1/verification-status/verification-status-api.d.ts +2 -2
- package/dist/rest/v1/verification-status/verification-status-api.jest.fixture.d.ts +3 -3
- package/dist/rest/v1/verification-status/verification-status-api.jest.fixture.js +3 -3
- package/dist/rest/v1/verification-status/verification-status-api.js +2 -2
- package/dist/rest/v1/verification-status/verification-status-api.js.map +1 -1
- package/dist/rest/v1/verifications/verifications-api.d.ts +97 -22
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.d.ts +56 -8
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.js +34 -6
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/verifications/verifications-api.js +216 -18
- package/dist/rest/v1/verifications/verifications-api.js.map +1 -1
- package/package.json +2 -2
- package/dist/models/v1/callout-initiate-verification-response/callout-initiate-verification-response.js +0 -9
- package/dist/models/v1/callout-initiate-verification-response/callout-initiate-verification-response.js.map +0 -1
- package/dist/models/v1/callout-initiate-verification-response/index.d.ts +0 -1
- package/dist/models/v1/callout-initiate-verification-response/index.js.map +0 -1
- package/dist/models/v1/callout-verification-report-request/callout-verification-report-request.d.ts +0 -14
- package/dist/models/v1/callout-verification-report-request/callout-verification-report-request.js +0 -9
- package/dist/models/v1/callout-verification-report-request/callout-verification-report-request.js.map +0 -1
- package/dist/models/v1/callout-verification-report-request/index.d.ts +0 -1
- package/dist/models/v1/callout-verification-report-request/index.js.map +0 -1
- package/dist/models/v1/callout-verification-report-request-callout/callout-verification-report-request-callout.d.ts +0 -13
- package/dist/models/v1/callout-verification-report-request-callout/callout-verification-report-request-callout.js +0 -9
- package/dist/models/v1/callout-verification-report-request-callout/callout-verification-report-request-callout.js.map +0 -1
- package/dist/models/v1/callout-verification-report-request-callout/index.d.ts +0 -1
- package/dist/models/v1/callout-verification-report-request-callout/index.js.map +0 -1
- package/dist/models/v1/data-initiate-verification-response/data-initiate-verification-response.d.ts +0 -19
- package/dist/models/v1/data-initiate-verification-response/data-initiate-verification-response.js +0 -9
- package/dist/models/v1/data-initiate-verification-response/data-initiate-verification-response.js.map +0 -1
- package/dist/models/v1/data-initiate-verification-response/index.d.ts +0 -1
- package/dist/models/v1/data-initiate-verification-response/index.js.map +0 -1
- package/dist/models/v1/data-initiate-verification-response-seamless/data-initiate-verification-response-seamless.d.ts +0 -13
- package/dist/models/v1/data-initiate-verification-response-seamless/data-initiate-verification-response-seamless.js +0 -9
- package/dist/models/v1/data-initiate-verification-response-seamless/data-initiate-verification-response-seamless.js.map +0 -1
- package/dist/models/v1/data-initiate-verification-response-seamless/index.d.ts +0 -1
- package/dist/models/v1/data-initiate-verification-response-seamless/index.js.map +0 -1
- package/dist/models/v1/flash-call-initiate-verification-response/flash-call-initiate-verification-response.d.ts +0 -19
- package/dist/models/v1/flash-call-initiate-verification-response/flash-call-initiate-verification-response.js +0 -9
- package/dist/models/v1/flash-call-initiate-verification-response/flash-call-initiate-verification-response.js.map +0 -1
- package/dist/models/v1/flash-call-initiate-verification-response/index.d.ts +0 -1
- package/dist/models/v1/flash-call-initiate-verification-response/index.js.map +0 -1
- package/dist/models/v1/flash-call-initiate-verification-response-flash-call/flash-call-initiate-verification-response-flash-call.d.ts +0 -19
- package/dist/models/v1/flash-call-initiate-verification-response-flash-call/flash-call-initiate-verification-response-flash-call.js +0 -9
- package/dist/models/v1/flash-call-initiate-verification-response-flash-call/flash-call-initiate-verification-response-flash-call.js.map +0 -1
- package/dist/models/v1/flash-call-initiate-verification-response-flash-call/index.d.ts +0 -1
- package/dist/models/v1/flash-call-initiate-verification-response-flash-call/index.js.map +0 -1
- package/dist/models/v1/flash-call-request-event-response/flash-call-request-event-response.d.ts +0 -14
- package/dist/models/v1/flash-call-request-event-response/flash-call-request-event-response.js +0 -9
- package/dist/models/v1/flash-call-request-event-response/flash-call-request-event-response.js.map +0 -1
- package/dist/models/v1/flash-call-request-event-response/index.d.ts +0 -1
- package/dist/models/v1/flash-call-request-event-response/index.js +0 -3
- package/dist/models/v1/flash-call-request-event-response/index.js.map +0 -1
- package/dist/models/v1/flash-call-request-event-response-flash-call/flash-call-request-event-response-flash-call.js +0 -9
- package/dist/models/v1/flash-call-request-event-response-flash-call/flash-call-request-event-response-flash-call.js.map +0 -1
- package/dist/models/v1/flash-call-request-event-response-flash-call/index.d.ts +0 -1
- package/dist/models/v1/flash-call-request-event-response-flash-call/index.js +0 -3
- package/dist/models/v1/flash-call-request-event-response-flash-call/index.js.map +0 -1
- package/dist/models/v1/flashcall-verification-report-request/flashcall-verification-report-request.d.ts +0 -14
- package/dist/models/v1/flashcall-verification-report-request/flashcall-verification-report-request.js +0 -9
- package/dist/models/v1/flashcall-verification-report-request/flashcall-verification-report-request.js.map +0 -1
- package/dist/models/v1/flashcall-verification-report-request/index.d.ts +0 -1
- package/dist/models/v1/flashcall-verification-report-request/index.js +0 -3
- package/dist/models/v1/flashcall-verification-report-request/index.js.map +0 -1
- package/dist/models/v1/flashcall-verification-report-request-flash-call/flashcall-verification-report-request-flash-call.d.ts +0 -13
- package/dist/models/v1/flashcall-verification-report-request-flash-call/flashcall-verification-report-request-flash-call.js +0 -9
- package/dist/models/v1/flashcall-verification-report-request-flash-call/flashcall-verification-report-request-flash-call.js.map +0 -1
- package/dist/models/v1/flashcall-verification-report-request-flash-call/index.d.ts +0 -1
- package/dist/models/v1/flashcall-verification-report-request-flash-call/index.js +0 -3
- package/dist/models/v1/flashcall-verification-report-request-flash-call/index.js.map +0 -1
- package/dist/models/v1/flashcall-verification-report-response-price/flashcall-verification-report-response-price.js +0 -9
- package/dist/models/v1/flashcall-verification-report-response-price/flashcall-verification-report-response-price.js.map +0 -1
- package/dist/models/v1/flashcall-verification-report-response-price/index.d.ts +0 -1
- package/dist/models/v1/flashcall-verification-report-response-price/index.js +0 -3
- package/dist/models/v1/flashcall-verification-report-response-price/index.js.map +0 -1
- package/dist/models/v1/initiate-verification-resource/index.d.ts +0 -1
- package/dist/models/v1/initiate-verification-resource/index.js +0 -3
- package/dist/models/v1/initiate-verification-resource/index.js.map +0 -1
- package/dist/models/v1/initiate-verification-resource/initiate-verification-resource.d.ts +0 -21
- package/dist/models/v1/initiate-verification-resource/initiate-verification-resource.js +0 -9
- package/dist/models/v1/initiate-verification-resource/initiate-verification-resource.js.map +0 -1
- package/dist/models/v1/initiate-verification-resource-flash-call-options/index.d.ts +0 -1
- package/dist/models/v1/initiate-verification-resource-flash-call-options/index.js +0 -3
- package/dist/models/v1/initiate-verification-resource-flash-call-options/index.js.map +0 -1
- package/dist/models/v1/initiate-verification-resource-flash-call-options/initiate-verification-resource-flash-call-options.d.ts +0 -13
- package/dist/models/v1/initiate-verification-resource-flash-call-options/initiate-verification-resource-flash-call-options.js +0 -9
- package/dist/models/v1/initiate-verification-resource-flash-call-options/initiate-verification-resource-flash-call-options.js.map +0 -1
- package/dist/models/v1/initiate-verification-response/index.d.ts +0 -1
- package/dist/models/v1/initiate-verification-response/index.js +0 -3
- package/dist/models/v1/initiate-verification-response/index.js.map +0 -1
- package/dist/models/v1/initiate-verification-response/initiate-verification-response.d.ts +0 -11
- package/dist/models/v1/initiate-verification-response/initiate-verification-response.js +0 -9
- package/dist/models/v1/initiate-verification-response/initiate-verification-response.js.map +0 -1
- package/dist/models/v1/sms-initiate-verification-response/index.d.ts +0 -1
- package/dist/models/v1/sms-initiate-verification-response/index.js +0 -3
- package/dist/models/v1/sms-initiate-verification-response/index.js.map +0 -1
- package/dist/models/v1/sms-initiate-verification-response/sms-initiate-verification-response.d.ts +0 -19
- package/dist/models/v1/sms-initiate-verification-response/sms-initiate-verification-response.js +0 -9
- package/dist/models/v1/sms-initiate-verification-response/sms-initiate-verification-response.js.map +0 -1
- package/dist/models/v1/sms-initiate-verification-response-sms/index.d.ts +0 -1
- package/dist/models/v1/sms-initiate-verification-response-sms/index.js +0 -3
- package/dist/models/v1/sms-initiate-verification-response-sms/index.js.map +0 -1
- package/dist/models/v1/sms-initiate-verification-response-sms/sms-initiate-verification-response-sms.d.ts +0 -15
- package/dist/models/v1/sms-initiate-verification-response-sms/sms-initiate-verification-response-sms.js +0 -9
- package/dist/models/v1/sms-initiate-verification-response-sms/sms-initiate-verification-response-sms.js.map +0 -1
- package/dist/models/v1/sms-request-event-response-sms/index.d.ts +0 -1
- package/dist/models/v1/sms-request-event-response-sms/index.js +0 -3
- package/dist/models/v1/sms-request-event-response-sms/index.js.map +0 -1
- package/dist/models/v1/sms-request-event-response-sms/sms-request-event-response-sms.d.ts +0 -12
- package/dist/models/v1/sms-request-event-response-sms/sms-request-event-response-sms.js +0 -9
- package/dist/models/v1/sms-request-event-response-sms/sms-request-event-response-sms.js.map +0 -1
- package/dist/models/v1/sms-verification-report-request/index.d.ts +0 -1
- package/dist/models/v1/sms-verification-report-request/index.js +0 -3
- package/dist/models/v1/sms-verification-report-request/index.js.map +0 -1
- package/dist/models/v1/sms-verification-report-request/sms-verification-report-request.d.ts +0 -14
- package/dist/models/v1/sms-verification-report-request/sms-verification-report-request.js +0 -9
- package/dist/models/v1/sms-verification-report-request/sms-verification-report-request.js.map +0 -1
- package/dist/models/v1/sms-verification-report-request-sms/index.d.ts +0 -1
- package/dist/models/v1/sms-verification-report-request-sms/index.js +0 -3
- package/dist/models/v1/sms-verification-report-request-sms/index.js.map +0 -1
- package/dist/models/v1/sms-verification-report-request-sms/sms-verification-report-request-sms.d.ts +0 -15
- package/dist/models/v1/sms-verification-report-request-sms/sms-verification-report-request-sms.js +0 -9
- package/dist/models/v1/sms-verification-report-request-sms/sms-verification-report-request-sms.js.map +0 -1
- package/dist/models/v1/sms-verification-report-response-price/index.d.ts +0 -1
- package/dist/models/v1/sms-verification-report-response-price/index.js +0 -3
- package/dist/models/v1/sms-verification-report-response-price/index.js.map +0 -1
- package/dist/models/v1/sms-verification-report-response-price/sms-verification-report-response-price.d.ts +0 -14
- package/dist/models/v1/sms-verification-report-response-price/sms-verification-report-response-price.js +0 -9
- package/dist/models/v1/sms-verification-report-response-price/sms-verification-report-response-price.js.map +0 -1
- package/dist/models/v1/verification-request-event-price/index.d.ts +0 -1
- package/dist/models/v1/verification-request-event-price/index.js +0 -3
- package/dist/models/v1/verification-request-event-price/index.js.map +0 -1
- package/dist/models/v1/verification-request-event-price/verification-request-event-price.d.ts +0 -15
- package/dist/models/v1/verification-request-event-price/verification-request-event-price.js +0 -9
- package/dist/models/v1/verification-request-event-price/verification-request-event-price.js.map +0 -1
- package/dist/models/v1/verification-response/index.d.ts +0 -1
- package/dist/models/v1/verification-response/index.js +0 -3
- package/dist/models/v1/verification-response/index.js.map +0 -1
- package/dist/models/v1/verification-response/verification-response.d.ts +0 -10
- package/dist/models/v1/verification-response/verification-response.js +0 -9
- package/dist/models/v1/verification-response/verification-response.js.map +0 -1
- package/dist/rest/v1/verification-api.js.map +0 -1
- package/dist/rest/v1/verification.js.map +0 -1
- /package/dist/models/v1/{callout-initiate-verification-response → flashcall-request-event-response}/index.js +0 -0
- /package/dist/models/v1/{callout-verification-report-request-callout → start-callout-verification-response}/index.js +0 -0
- /package/dist/models/v1/{callout-verification-report-request → start-flashcall-verification-response}/index.js +0 -0
- /package/dist/models/v1/{data-initiate-verification-response-seamless → start-seamless-verification-response}/index.js +0 -0
- /package/dist/models/v1/{data-initiate-verification-response → start-sms-verification-response}/index.js +0 -0
- /package/dist/models/v1/{flash-call-initiate-verification-response-flash-call → start-verification-request}/index.js +0 -0
- /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
|
|
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
|
|
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
|
|
|
@@ -37,19 +36,24 @@ The `Verification` API uses the Application Signed Request to authenticate again
|
|
|
37
36
|
If you are using this SDK as part of the Sinch SDK (`@sinch/sdk-core`) you can access it as the `verification` property of the client that you would have instantiated.
|
|
38
37
|
|
|
39
38
|
```typescript
|
|
40
|
-
import {
|
|
39
|
+
import {
|
|
41
40
|
InitiateVerificationResponse,
|
|
42
41
|
StartVerificationRequestData,
|
|
43
42
|
SinchClient,
|
|
44
|
-
|
|
43
|
+
ApplicationCredentials,
|
|
44
|
+
VerificationService,
|
|
45
45
|
} from '@sinch/sdk-core';
|
|
46
46
|
|
|
47
|
-
const credentials:
|
|
47
|
+
const credentials: ApplicationCredentials = {
|
|
48
48
|
applicationKey: 'APPLICATION_ID',
|
|
49
49
|
applicationSecret: 'APPLICATION_SECRET',
|
|
50
50
|
};
|
|
51
|
+
|
|
52
|
+
// Access the 'verification' service registered on the Sinch Client
|
|
51
53
|
const sinch = new SinchClient(credentials);
|
|
54
|
+
const verificationService: VerificationService = sinch.verification;
|
|
52
55
|
|
|
56
|
+
// Build the request data
|
|
53
57
|
const requestData: StartVerificationRequestData = {
|
|
54
58
|
initiateVerificationRequestBody: {
|
|
55
59
|
identity: {
|
|
@@ -60,9 +64,9 @@ const requestData: StartVerificationRequestData = {
|
|
|
60
64
|
},
|
|
61
65
|
};
|
|
62
66
|
|
|
63
|
-
//
|
|
64
|
-
const verificationInitResponse: InitiateVerificationResponse
|
|
65
|
-
|
|
67
|
+
// Use the 'verification' service registered on the Sinch client
|
|
68
|
+
const verificationInitResponse: InitiateVerificationResponse
|
|
69
|
+
= await verificationService.verifications.start(requestData);
|
|
66
70
|
```
|
|
67
71
|
|
|
68
72
|
### Standalone
|
|
@@ -71,22 +75,23 @@ The SDK can be used standalone if you need to use only the Verification APIs.
|
|
|
71
75
|
|
|
72
76
|
```typescript
|
|
73
77
|
import {
|
|
74
|
-
|
|
78
|
+
ApplicationCredentials
|
|
75
79
|
} from '@sinch/sdk-client';
|
|
76
80
|
import {
|
|
77
81
|
InitiateVerificationResponse,
|
|
78
82
|
StartVerificationRequestData,
|
|
79
|
-
|
|
83
|
+
VerificationService,
|
|
80
84
|
} from '@sinch/verification';
|
|
81
85
|
|
|
82
|
-
const credentials:
|
|
86
|
+
const credentials: ApplicationCredentials = {
|
|
83
87
|
applicationKey: 'APPLICATION_ID',
|
|
84
88
|
applicationSecret: 'APPLICATION_SECRET',
|
|
85
89
|
};
|
|
86
90
|
|
|
87
|
-
// Declare the 'verification' in a standalone way
|
|
88
|
-
const
|
|
91
|
+
// Declare the 'verification' service in a standalone way
|
|
92
|
+
const verificationService = new VerificationService(credentials);
|
|
89
93
|
|
|
94
|
+
// Build the request data
|
|
90
95
|
const requestData: StartVerificationRequestData = {
|
|
91
96
|
initiateVerificationRequestBody: {
|
|
92
97
|
identity: {
|
|
@@ -97,29 +102,29 @@ const requestData: StartVerificationRequestData = {
|
|
|
97
102
|
},
|
|
98
103
|
};
|
|
99
104
|
|
|
100
|
-
// Use the standalone declaration of the 'verification'
|
|
105
|
+
// Use the standalone declaration of the 'verification' service
|
|
101
106
|
const verificationInitResponse: InitiateVerificationResponse
|
|
102
|
-
= await
|
|
107
|
+
= await verificationService.verifications.start(requestData);
|
|
103
108
|
```
|
|
104
109
|
|
|
105
110
|
## Promises
|
|
106
111
|
|
|
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()`.
|
|
112
|
+
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
113
|
|
|
109
114
|
```typescript
|
|
110
|
-
// Method 1: Wait for the Promise to complete
|
|
115
|
+
// Method 1: Wait for the Promise to complete (you need to be in an 'async' method)
|
|
111
116
|
let verificationInitResponse: InitiateVerificationResponse;
|
|
112
117
|
try {
|
|
113
|
-
verificationInitResponse = await
|
|
114
|
-
console.log(`Verification ID = ${
|
|
118
|
+
verificationInitResponse = await verificationService.verifications.start(requestData);
|
|
119
|
+
console.log(`Verification ID = ${verificationInitResponse.id}`);
|
|
115
120
|
} catch (error: any) {
|
|
116
|
-
console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.
|
|
121
|
+
console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.initiateVerificationRequestBody.identity.endpoint}`);
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
// Method 2: Resolve the promise
|
|
120
|
-
|
|
125
|
+
verificationService.verifications.start(requestData)
|
|
121
126
|
.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.
|
|
127
|
+
.catch(error => console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.initiateVerificationRequestBody.identity.endpoint}`));
|
|
123
128
|
```
|
|
124
129
|
|
|
125
130
|
## 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 +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":"
|
|
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":"
|
|
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
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":"
|
|
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?:
|
|
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
|
|
24
|
-
price?:
|
|
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';
|
package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js
CHANGED
|
@@ -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":"
|
|
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 {
|
|
4
|
-
export type {
|
|
5
|
-
export type {
|
|
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 {
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
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 {};
|
package/dist/models/v1/flashcall-request-event-response/flashcall-request-event-response.js.map
ADDED
|
@@ -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
|
|
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 `
|
|
14
|
-
method?:
|
|
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
|
|
22
|
-
price?:
|
|
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":"
|
|
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 {
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../../src/models/v1/identity/identity.ts"],"names":[],"mappings":"
|
|
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 './
|
|
9
|
-
export * from './data-initiate-verification-response-seamless';
|
|
10
|
-
export * from './verification-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 './
|
|
7
|
+
export * from './verification-report-response-price';
|
|
19
8
|
export * from './identity';
|
|
20
|
-
export * from './
|
|
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 './
|
|
26
|
-
export * from './
|
|
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';
|