Skip to content

Commit

Permalink
Fix comment: revert creation of startVerification API
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch committed Aug 26, 2024
1 parent aefdf24 commit a1726db
Show file tree
Hide file tree
Showing 23 changed files with 263 additions and 539 deletions.
8 changes: 4 additions & 4 deletions examples/integrated-flows-examples/src/verification/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dotenv.config();

const startSmsVerificationFlow = async (phoneNumber: string) => {
const requestData = Verification.startVerificationHelper.buildSmsRequest(phoneNumber);
const response = await sinch.verification.startVerifications.startSms(requestData);
const response = await sinch.verification.verifications.startSms(requestData);
console.log('Verification request sent! Please check the SMS on your you phone to get the OTP.');
const answers = await inquirer.prompt([
{
Expand All @@ -74,7 +74,7 @@ dotenv.config();

const startPhoneCallVerificationFlow = async (phoneNumber: string) => {
const requestData = Verification.startVerificationHelper.buildPhoneCallRequest(phoneNumber);
const response = await sinch.verification.startVerifications.startPhoneCall(requestData);
const response = await sinch.verification.verifications.startPhoneCall(requestData);
console.log('Verification request sent! Please answer to the phone call ans listen to the OTP.');
const answers = await inquirer.prompt([
{
Expand All @@ -91,7 +91,7 @@ dotenv.config();

const startFlashCallVerificationFlow = async (phoneNumber: string) => {
const requestData = Verification.startVerificationHelper.buildFlashCallRequest(phoneNumber);
const response = await sinch.verification.startVerifications.startFlashCall(requestData);
const response = await sinch.verification.verifications.startFlashCall(requestData);
console.log('Verification request sent! Please check the phone number calling you.');
const answers = await inquirer.prompt([
{
Expand All @@ -112,7 +112,7 @@ dotenv.config();
const requestData = Verification.startVerificationHelper.buildDataRequest(phoneNumber);
let response;
try {
response = await sinch.verification.startVerifications.startData(requestData);
response = await sinch.verification.verifications.startData(requestData);
} catch (error: any) {
console.log(`Impossible to process the seamless verification: ${error.data})`);
return;
Expand Down
12 changes: 6 additions & 6 deletions examples/simple-examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ yarn run numbers:regions:list

| Service | Sample application name and location | Required parameters |
|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
| Start Verifications | [./src/verification/start/start-sms.ts](./src/verification/start/start-sms.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/start/start-phonecall.ts](./src/verification/start/start-phonecall.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/start/start-flashcall.ts](./src/verification/start/start-flashcall.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/start/start-data.ts](./src/verification/start/start-data.ts) | `VERIFICATION_IDENTITY` |
| Start Verifications | [./src/verification/verifications/sms/start-sms.ts](./src/verification/verifications/sms/start-sms.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/verifications/phonecall/start-phonecall.ts](./src/verification/verifications/phonecall/start-phonecall.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/verifications/flashcall/start-flashcall.ts](./src/verification/verifications/flashcall/start-flashcall.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/verifications/data/start-data.ts](./src/verification/verifications/data/start-data.ts) | `VERIFICATION_IDENTITY` |
| Verifications | [./src/verification/verifications/sms/report-with-id_sms.ts](./src/verification/verifications/sms/report-with-id_sms.ts) | `VERIFICATION_ID` + `VERIFICATION_CODE` |
| | [./src/verification/verifications/sms/report-with-identity_sms.ts](./src/verification/verifications/sms/report-with-identity_sms.ts) | `VERIFICATION_IDENTITY` + `VERIFICATION_CODE` |
| | [./src/verification/verifications/flashcall/report-with-id_flashcall.ts](./src/verification/verifications/flashcall/report-with-id_flashcall.ts) | `VERIFICATION_ID` + `VERIFICATION_CLI` |
| | [./src/verification/verifications/flashcall/report-with-identity_flashcall.ts](./src/verification/verifications/flashcall/report-with-identity_flashcall.ts) | `VERIFICATION_IDENTITY` + `VERIFICATION_CLI` |
| | [./src/verification/verifications/callout/report-with-id_callout.ts](./src/verification/verifications/callout/report-with-id_callout.ts) | `VERIFICATION_ID` + `VERIFICATION_CODE` |
| | [./src/verification/verifications/callout/report-with-identity_callout.ts](./src/verification/verifications/callout/report-with-identity_callout.ts) | `VERIFICATION_IDENTITY` + `VERIFICATION_CODE` |
| | [./src/verification/verifications/callout/report-with-id_callout.ts](./src/verification/verifications/phonecall/report-with-id_callout.ts) | `VERIFICATION_ID` + `VERIFICATION_CODE` |
| | [./src/verification/verifications/callout/report-with-identity_callout.ts](./src/verification/verifications/phonecall/report-with-identity_callout.ts) | `VERIFICATION_IDENTITY` + `VERIFICATION_CODE` |
| Verification-status | [./src/verification/verification-status/verification-by-id.ts](./src/verification/verification-status/verification-by-id.ts) | `VERIFICATION_ID` |
| | [./src/verification/verification-status/verification-by-identity.ts](./src/verification/verification-status/verification-by-identity.ts) | `VERIFICATION_IDENTITY` |
| | [./src/verification/verification-status/verification-by-reference.ts](./src/verification/verification-status/verification-by-reference.ts) | `VERIFICATION_REFERENCE` |
Expand Down
8 changes: 4 additions & 4 deletions examples/simple-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@
"sms:inbounds:list": "ts-node src/sms/inbounds/list.ts",
"sms:inbounds:get": "ts-node src/sms/inbounds/get.ts",
"verification:verifications:start-sms": "ts-node src/verification/verifications/sms/start-sms.ts",
"verification:verifications:start-callout": "ts-node src/verification/verifications/callout/start-callout.ts",
"verification:verifications:start-phonecall": "ts-node src/verification/verifications/phonecall/start-phonecall.ts",
"verification:verifications:start-flashcall": "ts-node src/verification/verifications/flashcall/start-flashcall.ts",
"verification:verifications:start-seamless": "ts-node src/verification/verifications/seamless/start-seamless.ts",
"verification:verifications:start-data": "ts-node src/verification/verifications/data/start-data.ts",
"verification:verifications:report-with-id:sms": "ts-node src/verification/verifications/sms/report-with-id_sms.ts",
"verification:verifications:report-with-id:callout": "ts-node src/verification/verifications/callout/report-with-id_callout.ts",
"verification:verifications:report-with-id:callout": "ts-node src/verification/verifications/phonecall/report-with-id_callout.ts",
"verification:verifications:report-with-id:flashcall": "ts-node src/verification/verifications/flashcall/report-with-id_flashcall.ts",
"verification:verifications:report-with-identity:sms": "ts-node src/verification/verifications/sms/report-with-identity_sms.ts",
"verification:verifications:report-with-identity:callout": "ts-node src/verification/verifications/callout/report-with-identity_callout.ts",
"verification:verifications:report-with-identity:callout": "ts-node src/verification/verifications/phonecall/report-with-identity_callout.ts",
"verification:verifications:report-with-identity:flashcall": "ts-node src/verification/verifications/flashcall/report-with-identity_flashcall.ts",
"verification:verification-status:verification-by-id": "ts-node src/verification/verification-status/verification-by-id.ts",
"verification:verification-status:verification-by-identity": "ts-node src/verification/verification-status/verification-by-identity.ts",
Expand Down
33 changes: 0 additions & 33 deletions examples/simple-examples/src/verification/start/start-flashcall.ts

This file was deleted.

36 changes: 0 additions & 36 deletions examples/simple-examples/src/verification/start/start-sms.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getVerificationIdentityFromConfig,
initVerificationService,
printFullResponse,
} from '../../config';
} from '../../../config';

(async () => {
console.log('****************************');
Expand All @@ -19,7 +19,7 @@ import {
);

const verificationService = initVerificationService();
const response = await verificationService.startVerifications.startData(requestData);
const response = await verificationService.verifications.startData(requestData);

const printFormat = getPrintFormat(process.argv);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
printFullResponse,
} from '../../../config';

/** @deprecated see ../../start/start-flashcall.ts instead */
(async () => {
console.log('*********************************');
console.log('* StartVerification - flashCall *');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getVerificationIdentityFromConfig,
initVerificationService,
printFullResponse,
} from '../../config';
} from '../../../config';

(async () => {
console.log('**********************************');
Expand All @@ -19,7 +19,7 @@ import {
);

const verificationService = initVerificationService();
const response = await verificationService.startVerifications.startPhoneCall(requestData);
const response = await verificationService.verifications.startPhoneCall(requestData);

const printFormat = getPrintFormat(process.argv);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
printFullResponse,
} from '../../../config';

/** @deprecated see ../../start/start-sms.ts instead */
(async () => {
console.log('***************************');
console.log('* StartVerification - SMS *');
Expand Down
1 change: 0 additions & 1 deletion packages/verification/src/rest/v1/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './callbacks';
export * from './start-verifications';
export * from './verification-status';
export * from './verifications';
export * from './enums';
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit a1726db

Please sign in to comment.