-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEVEXP-521: E2E Verification/Report (#129)
- Loading branch information
1 parent
ad92b7c
commit 0a321c1
Showing
20 changed files
with
516 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...ples/simple-examples/src/verification/verifications/phonecall/report-with-id_phonecall.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Verification } from '@sinch/sdk-core'; | ||
import { | ||
getPrintFormat, | ||
getVerificationCodeFromConfig, | ||
getVerificationIdFromConfig, | ||
initVerificationService, | ||
printFullResponse, | ||
} from '../../../config'; | ||
|
||
(async () => { | ||
console.log('**************************************'); | ||
console.log('* ReportVerificationById - phoneCall *'); | ||
console.log('**************************************'); | ||
|
||
const verificationId = getVerificationIdFromConfig(); | ||
const verificationCode = getVerificationCodeFromConfig(); | ||
|
||
const requestData = Verification.reportVerificationByIdHelper.buildPhoneCallRequest( | ||
verificationId, verificationCode); | ||
|
||
const verificationService = initVerificationService(); | ||
const response = await verificationService.verifications.reportPhoneCallById(requestData); | ||
|
||
const printFormat = getPrintFormat(process.argv); | ||
|
||
if (printFormat === 'pretty') { | ||
console.log(`Phone call verification status: ${response.status}${response.status === 'SUCCESSFUL'?'':' - Reason: ' + response.reason}`); | ||
} else { | ||
printFullResponse(response); | ||
} | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...imple-examples/src/verification/verifications/phonecall/report-with-identity_phonecall.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { Verification } from '@sinch/sdk-core'; | ||
import { | ||
getPrintFormat, | ||
getVerificationCodeFromConfig, | ||
getVerificationIdentityFromConfig, | ||
initVerificationService, | ||
printFullResponse, | ||
} from '../../../config'; | ||
|
||
(async () => { | ||
console.log('********************************************'); | ||
console.log('* ReportVerificationByIdentity - phoneCall *'); | ||
console.log('********************************************'); | ||
|
||
const verificationIdentity = getVerificationIdentityFromConfig(); | ||
const verificationCode = getVerificationCodeFromConfig(); | ||
|
||
const requestData = Verification.reportVerificationByIdentityHelper.buildPhoneCallRequest( | ||
verificationIdentity, verificationCode); | ||
|
||
const verificationService = initVerificationService(); | ||
const response = await verificationService.verifications.reportPhoneCallByIdentity(requestData); | ||
|
||
const printFormat = getPrintFormat(process.argv); | ||
|
||
if (printFormat === 'pretty') { | ||
console.log(`Phone call verification status: ${response.status}${response.status === 'SUCCESSFUL'?'':' - Reason: ' + response.reason}`); | ||
} else { | ||
printFullResponse(response); | ||
} | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...rc/models/v1/callout-verification-report-response/callout-verification-report-response.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
packages/verification/src/models/v1/callout-verification-report-response/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
export type { CalloutVerificationReportResponse } from './callout-verification-report-response'; | ||
export type { | ||
PhoneCallVerificationReportResponse, | ||
CalloutVerificationReportResponse, | ||
} from './callout-verification-report-response'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
packages/verification/src/models/v1/verification-report-request/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
export type { | ||
SmsVerificationReportRequest, | ||
FlashCallVerificationReportRequest, | ||
PhoneCallVerificationReportRequest, | ||
PhoneCallVerificationReportRequestServerModel, | ||
CalloutVerificationReportRequest, | ||
} from './verification-report-request'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.