@sinch/verification 1.1.0 → 1.2.1
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 +22 -16
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/models/v1/enums.d.ts +0 -3
- package/dist/models/v1/helper.d.ts +113 -1
- package/dist/models/v1/helper.js +157 -0
- package/dist/models/v1/helper.js.map +1 -1
- package/dist/models/v1/identity/identity.d.ts +4 -4
- package/dist/models/v1/identity/index.d.ts +1 -1
- package/dist/models/v1/index.d.ts +13 -22
- package/dist/models/v1/index.js +24 -22
- package/dist/models/v1/index.js.map +1 -1
- package/dist/models/v1/{flashcall-request-event-response → mod-callbacks/flashcall-request-event-response}/flashcall-request-event-response.d.ts +6 -5
- package/dist/models/v1/mod-callbacks/flashcall-request-event-response/flashcall-request-event-response.js.map +1 -0
- package/dist/models/v1/mod-callbacks/flashcall-request-event-response/index.d.ts +1 -0
- package/dist/models/v1/mod-callbacks/flashcall-request-event-response/index.js.map +1 -0
- package/dist/models/v1/mod-callbacks/index.d.ts +8 -0
- package/dist/models/v1/mod-callbacks/index.js +28 -0
- package/dist/models/v1/mod-callbacks/index.js.map +1 -0
- package/dist/models/v1/mod-callbacks/phonecall-request-event-response/index.d.ts +1 -0
- package/dist/models/v1/mod-callbacks/phonecall-request-event-response/index.js.map +1 -0
- package/dist/models/v1/mod-callbacks/phonecall-request-event-response/phonecall-request-event-response.d.ts +24 -0
- package/dist/models/v1/{callout-request-event-response/callout-request-event-response.js → mod-callbacks/phonecall-request-event-response/phonecall-request-event-response.js} +1 -1
- package/dist/models/v1/mod-callbacks/phonecall-request-event-response/phonecall-request-event-response.js.map +1 -0
- package/dist/models/v1/mod-callbacks/sms-request-event-response/index.d.ts +1 -0
- package/dist/models/v1/mod-callbacks/sms-request-event-response/index.js.map +1 -0
- package/dist/models/v1/{sms-request-event-response → mod-callbacks/sms-request-event-response}/sms-request-event-response.d.ts +9 -6
- package/dist/models/v1/mod-callbacks/sms-request-event-response/sms-request-event-response.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-callback-event.d.ts +3 -0
- package/dist/models/v1/mod-callbacks/verification-callback-event.js +3 -0
- package/dist/models/v1/mod-callbacks/verification-callback-event.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-request-event/index.d.ts +1 -0
- package/dist/models/v1/mod-callbacks/verification-request-event/index.js.map +1 -0
- package/dist/models/v1/{verification-request-event → mod-callbacks/verification-request-event}/verification-request-event.d.ts +2 -2
- package/dist/models/v1/mod-callbacks/verification-request-event/verification-request-event.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-request-event-response/index.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-request-event-response/verification-request-event-response.d.ts +4 -0
- package/dist/models/v1/mod-callbacks/verification-request-event-response/verification-request-event-response.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-result-event/index.js.map +1 -0
- package/dist/models/v1/{verification-result-event → mod-callbacks/verification-result-event}/verification-result-event.d.ts +2 -2
- package/dist/models/v1/mod-callbacks/verification-result-event/verification-result-event.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-result-event-response/index.js.map +1 -0
- package/dist/models/v1/mod-callbacks/verification-result-event-response/verification-result-event-response.d.ts +4 -0
- package/dist/models/v1/mod-callbacks/verification-result-event-response/verification-result-event-response.js.map +1 -0
- package/dist/models/v1/phonecall-verification-report-response/index.d.ts +1 -0
- package/dist/models/v1/phonecall-verification-report-response/index.js.map +1 -0
- package/dist/models/v1/{callout-verification-report-response/callout-verification-report-response.d.ts → phonecall-verification-report-response/phonecall-verification-report-response.d.ts} +3 -1
- package/dist/models/v1/{callout-request-event-response-callout/callout-request-event-response-callout.js → phonecall-verification-report-response/phonecall-verification-report-response.js} +1 -1
- package/dist/models/v1/phonecall-verification-report-response/phonecall-verification-report-response.js.map +1 -0
- package/dist/models/v1/phonecall-verification-status-response/index.d.ts +1 -0
- package/dist/models/v1/phonecall-verification-status-response/index.js.map +1 -0
- package/dist/models/v1/{callout-verification-status-response/callout-verification-status-response.d.ts → phonecall-verification-status-response/phonecall-verification-status-response.d.ts} +3 -1
- package/dist/models/v1/phonecall-verification-status-response/phonecall-verification-status-response.js +3 -0
- package/dist/models/v1/phonecall-verification-status-response/phonecall-verification-status-response.js.map +1 -0
- package/dist/models/v1/requests/verification-status/verification-status-request-data.d.ts +1 -1
- package/dist/models/v1/requests/verifications/verifications-request-data.d.ts +22 -2
- package/dist/models/v1/sms-verification-report-response/index.d.ts +1 -1
- package/dist/models/v1/sms-verification-report-response/sms-verification-report-response.d.ts +3 -1
- package/dist/models/v1/sms-verification-status-response/index.d.ts +1 -1
- package/dist/models/v1/sms-verification-status-response/index.js +0 -15
- package/dist/models/v1/sms-verification-status-response/index.js.map +1 -1
- package/dist/models/v1/sms-verification-status-response/sms-verification-status-response.d.ts +5 -3
- package/dist/models/v1/start-data-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-data-verification-response/index.js.map +1 -0
- package/dist/models/v1/{start-seamless-verification-response/start-seamless-verification-response.d.ts → start-data-verification-response/start-data-verification-response.d.ts} +3 -1
- package/dist/models/v1/start-data-verification-response/start-data-verification-response.js +3 -0
- package/dist/models/v1/start-data-verification-response/start-data-verification-response.js.map +1 -0
- package/dist/models/v1/start-phonecall-verification-response/index.d.ts +1 -0
- package/dist/models/v1/start-phonecall-verification-response/index.js.map +1 -0
- package/dist/models/v1/{start-callout-verification-response/start-callout-verification-response.d.ts → start-phonecall-verification-response/start-phonecall-verification-response.d.ts} +3 -1
- package/dist/models/v1/start-phonecall-verification-response/start-phonecall-verification-response.js +3 -0
- package/dist/models/v1/start-phonecall-verification-response/start-phonecall-verification-response.js.map +1 -0
- package/dist/models/v1/start-verification-request/index.d.ts +1 -1
- package/dist/models/v1/start-verification-request/start-verification-request.d.ts +22 -5
- package/dist/models/v1/verification-price-sms/verification-price-sms.d.ts +3 -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 +12 -1
- package/dist/models/v1/verification-status-response/verification-status-response.d.ts +3 -3
- package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +5 -5
- package/dist/rest/v1/callbacks/callbacks-webhook.js +1 -1
- package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
- package/dist/rest/v1/verification-status/verification-status-api.jest.fixture.d.ts +0 -1
- package/dist/rest/v1/verification-status/verification-status-api.js +5 -1
- package/dist/rest/v1/verification-status/verification-status-api.js.map +1 -1
- package/dist/rest/v1/verifications/verifications-api.d.ts +34 -3
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.d.ts +27 -4
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.js +16 -0
- package/dist/rest/v1/verifications/verifications-api.jest.fixture.js.map +1 -1
- package/dist/rest/v1/verifications/verifications-api.js +156 -13
- package/dist/rest/v1/verifications/verifications-api.js.map +1 -1
- package/package.json +6 -4
- package/dist/models/v1/callout-request-event-response/callout-request-event-response.d.ts +0 -8
- package/dist/models/v1/callout-request-event-response/callout-request-event-response.js.map +0 -1
- package/dist/models/v1/callout-request-event-response/index.d.ts +0 -1
- package/dist/models/v1/callout-request-event-response/index.js.map +0 -1
- package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.d.ts +0 -7
- package/dist/models/v1/callout-request-event-response-callout/callout-request-event-response-callout.js.map +0 -1
- package/dist/models/v1/callout-request-event-response-callout/index.d.ts +0 -1
- package/dist/models/v1/callout-request-event-response-callout/index.js.map +0 -1
- package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.d.ts +0 -7
- package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.js +0 -3
- package/dist/models/v1/callout-request-event-response-callout-speech/callout-request-event-response-callout-speech.js.map +0 -1
- package/dist/models/v1/callout-request-event-response-callout-speech/index.d.ts +0 -1
- package/dist/models/v1/callout-request-event-response-callout-speech/index.js.map +0 -1
- package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js +0 -3
- package/dist/models/v1/callout-verification-report-response/callout-verification-report-response.js.map +0 -1
- package/dist/models/v1/callout-verification-report-response/index.d.ts +0 -1
- package/dist/models/v1/callout-verification-report-response/index.js.map +0 -1
- package/dist/models/v1/callout-verification-status-response/callout-verification-status-response.js +0 -3
- package/dist/models/v1/callout-verification-status-response/callout-verification-status-response.js.map +0 -1
- package/dist/models/v1/callout-verification-status-response/index.d.ts +0 -1
- package/dist/models/v1/callout-verification-status-response/index.js +0 -18
- package/dist/models/v1/callout-verification-status-response/index.js.map +0 -1
- package/dist/models/v1/flashcall-request-event-response/flashcall-request-event-response.js.map +0 -1
- package/dist/models/v1/flashcall-request-event-response/index.d.ts +0 -1
- package/dist/models/v1/flashcall-request-event-response/index.js.map +0 -1
- package/dist/models/v1/sms-request-event-response/index.d.ts +0 -1
- package/dist/models/v1/sms-request-event-response/index.js.map +0 -1
- package/dist/models/v1/sms-request-event-response/sms-request-event-response.js.map +0 -1
- package/dist/models/v1/start-callout-verification-response/index.d.ts +0 -1
- package/dist/models/v1/start-callout-verification-response/index.js.map +0 -1
- package/dist/models/v1/start-callout-verification-response/start-callout-verification-response.js +0 -3
- package/dist/models/v1/start-callout-verification-response/start-callout-verification-response.js.map +0 -1
- package/dist/models/v1/start-seamless-verification-response/index.d.ts +0 -1
- package/dist/models/v1/start-seamless-verification-response/index.js.map +0 -1
- package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.js +0 -3
- package/dist/models/v1/start-seamless-verification-response/start-seamless-verification-response.js.map +0 -1
- package/dist/models/v1/verification-report-response-price/index.d.ts +0 -1
- package/dist/models/v1/verification-report-response-price/index.js.map +0 -1
- package/dist/models/v1/verification-report-response-price/verification-report-response-price.d.ts +0 -19
- package/dist/models/v1/verification-report-response-price/verification-report-response-price.js +0 -3
- package/dist/models/v1/verification-report-response-price/verification-report-response-price.js.map +0 -1
- package/dist/models/v1/verification-request-event/index.d.ts +0 -1
- package/dist/models/v1/verification-request-event/index.js.map +0 -1
- package/dist/models/v1/verification-request-event/verification-request-event.js.map +0 -1
- package/dist/models/v1/verification-request-event-response/index.js.map +0 -1
- package/dist/models/v1/verification-request-event-response/verification-request-event-response.d.ts +0 -4
- package/dist/models/v1/verification-request-event-response/verification-request-event-response.js.map +0 -1
- package/dist/models/v1/verification-result-event/index.js +0 -3
- package/dist/models/v1/verification-result-event/index.js.map +0 -1
- package/dist/models/v1/verification-result-event/verification-result-event.js.map +0 -1
- package/dist/models/v1/verification-result-event-response/index.js +0 -3
- package/dist/models/v1/verification-result-event-response/index.js.map +0 -1
- package/dist/models/v1/verification-result-event-response/verification-result-event-response.d.ts +0 -4
- package/dist/models/v1/verification-result-event-response/verification-result-event-response.js.map +0 -1
- /package/dist/models/v1/{flashcall-request-event-response → mod-callbacks/flashcall-request-event-response}/flashcall-request-event-response.js +0 -0
- /package/dist/models/v1/{callout-request-event-response-callout-speech → mod-callbacks/flashcall-request-event-response}/index.js +0 -0
- /package/dist/models/v1/{callout-request-event-response-callout → mod-callbacks/phonecall-request-event-response}/index.js +0 -0
- /package/dist/models/v1/{callout-request-event-response → mod-callbacks/sms-request-event-response}/index.js +0 -0
- /package/dist/models/v1/{sms-request-event-response → mod-callbacks/sms-request-event-response}/sms-request-event-response.js +0 -0
- /package/dist/models/v1/{flashcall-request-event-response → mod-callbacks/verification-request-event}/index.js +0 -0
- /package/dist/models/v1/{verification-request-event → mod-callbacks/verification-request-event}/verification-request-event.js +0 -0
- /package/dist/models/v1/{verification-request-event-response → mod-callbacks/verification-request-event-response}/index.d.ts +0 -0
- /package/dist/models/v1/{callout-verification-report-response → mod-callbacks/verification-request-event-response}/index.js +0 -0
- /package/dist/models/v1/{verification-request-event-response → mod-callbacks/verification-request-event-response}/verification-request-event-response.js +0 -0
- /package/dist/models/v1/{verification-result-event → mod-callbacks/verification-result-event}/index.d.ts +0 -0
- /package/dist/models/v1/{start-callout-verification-response → mod-callbacks/verification-result-event}/index.js +0 -0
- /package/dist/models/v1/{verification-result-event → mod-callbacks/verification-result-event}/verification-result-event.js +0 -0
- /package/dist/models/v1/{verification-result-event-response → mod-callbacks/verification-result-event-response}/index.d.ts +0 -0
- /package/dist/models/v1/{sms-request-event-response → mod-callbacks/verification-result-event-response}/index.js +0 -0
- /package/dist/models/v1/{verification-result-event-response → mod-callbacks/verification-result-event-response}/verification-result-event-response.js +0 -0
- /package/dist/models/v1/{start-seamless-verification-response → phonecall-verification-report-response}/index.js +0 -0
- /package/dist/models/v1/{verification-report-response-price → phonecall-verification-status-response}/index.js +0 -0
- /package/dist/models/v1/{verification-request-event-response → start-data-verification-response}/index.js +0 -0
- /package/dist/models/v1/{verification-request-event → start-phonecall-verification-response}/index.js +0 -0
package/README.md
CHANGED
|
@@ -50,19 +50,22 @@ const sinch = new SinchClient(credentials);
|
|
|
50
50
|
const verificationService: VerificationService = sinch.verification;
|
|
51
51
|
|
|
52
52
|
// Build the request data
|
|
53
|
-
const requestData: Verification.
|
|
54
|
-
|
|
53
|
+
const requestData: Verification.StartSmsVerificationRequestData = {
|
|
54
|
+
startVerificationWithSmsRequestBody: {
|
|
55
55
|
identity: {
|
|
56
56
|
type: 'number',
|
|
57
57
|
endpoint: '+17813334444',
|
|
58
58
|
},
|
|
59
|
-
|
|
59
|
+
smsOptions: {
|
|
60
|
+
codeType: 'Alphanumeric',
|
|
61
|
+
locale: 'sv-SE',
|
|
62
|
+
},
|
|
60
63
|
},
|
|
61
64
|
};
|
|
62
65
|
|
|
63
66
|
// Use the 'verification' service registered on the Sinch client
|
|
64
|
-
const
|
|
65
|
-
= await verificationService.
|
|
67
|
+
const startVerificationResponse: Verification.StartSmsVerificationResponse
|
|
68
|
+
= await verificationService.startVerifications.startSms(requestData);
|
|
66
69
|
```
|
|
67
70
|
|
|
68
71
|
### Standalone
|
|
@@ -87,19 +90,22 @@ const credentials: ApplicationCredentials = {
|
|
|
87
90
|
const verificationService = new VerificationService(credentials);
|
|
88
91
|
|
|
89
92
|
// Build the request data
|
|
90
|
-
const requestData: Verification.
|
|
91
|
-
|
|
93
|
+
const requestData: Verification.StartSmsVerificationRequestData = {
|
|
94
|
+
startVerificationWithSmsRequestBody: {
|
|
92
95
|
identity: {
|
|
93
96
|
type: 'number',
|
|
94
97
|
endpoint: '+17813334444',
|
|
95
98
|
},
|
|
96
|
-
|
|
99
|
+
smsOptions: {
|
|
100
|
+
codeType: 'Alphanumeric',
|
|
101
|
+
locale: 'sv-SE',
|
|
102
|
+
},
|
|
97
103
|
},
|
|
98
104
|
};
|
|
99
105
|
|
|
100
106
|
// Use the standalone declaration of the 'verification' service
|
|
101
|
-
const
|
|
102
|
-
= await verificationService.
|
|
107
|
+
const startVerificationResponse: Verification.StartSmsVerificationResponse
|
|
108
|
+
= await verificationService.startVerifications.startSms(requestData);
|
|
103
109
|
```
|
|
104
110
|
|
|
105
111
|
## Promises
|
|
@@ -108,18 +114,18 @@ All the methods that interact with the Sinch APIs use Promises. You can use `awa
|
|
|
108
114
|
|
|
109
115
|
```typescript
|
|
110
116
|
// Method 1: Wait for the Promise to complete (you need to be in an 'async' method)
|
|
111
|
-
let
|
|
117
|
+
let startVerificationResponse: Verification.StartSmsVerificationResponse;
|
|
112
118
|
try {
|
|
113
|
-
|
|
114
|
-
console.log(`Verification ID = ${
|
|
119
|
+
startVerificationResponse = await verificationService.startVerifications.startSms(requestData);
|
|
120
|
+
console.log(`Verification ID = ${startVerificationResponse.id}`);
|
|
115
121
|
} catch (error: any) {
|
|
116
|
-
console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.
|
|
122
|
+
console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.startVerificationWithSmsRequestBody.identity.endpoint}`);
|
|
117
123
|
}
|
|
118
124
|
|
|
119
125
|
// Method 2: Resolve the promise
|
|
120
|
-
verificationService.
|
|
126
|
+
verificationService.startVerifications.startSms(requestData)
|
|
121
127
|
.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.
|
|
128
|
+
.catch(error => console.error(`ERROR ${error.statusCode}: Impossible to start the verification for the number ${requestData.startVerificationWithSmsRequestBody.identity.endpoint}`));
|
|
123
129
|
```
|
|
124
130
|
|
|
125
131
|
## Contact
|
package/dist/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yDAAyC;AACzC,yCAAuB;AACvB,oDAAkC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export type { TypeEnum as IdentityTypeEnum } from './identity/identity';
|
|
2
|
-
export type { MethodEnum as VerificationRequestEventMethodEnum, } from './verification-request-event/verification-request-event';
|
|
3
|
-
export type { MethodEnum as VerificationResultEventMethodEnum, } from './verification-result-event/verification-result-event';
|
|
4
1
|
export type ActionEnum = 'allow' | 'deny';
|
|
5
2
|
export type VerificationStatusEnum = 'PENDING' | 'SUCCESSFUL' | 'FAIL' | 'DENIED' | 'ABORTED' | 'ERROR';
|
|
6
3
|
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,18 +1,130 @@
|
|
|
1
|
-
import { ReportCalloutVerificationByIdentityRequestData, ReportCalloutVerificationByIdRequestData, ReportFlashCallVerificationByIdentityRequestData, ReportFlashCallVerificationByIdRequestData, ReportSmsVerificationByIdentityRequestData, ReportSmsVerificationByIdRequestData, StartCalloutVerificationRequestData, StartFlashCallVerificationRequestData, StartSeamlessVerificationRequestData, StartSmsVerificationRequestData } from './requests';
|
|
1
|
+
import { ReportCalloutVerificationByIdentityRequestData, ReportCalloutVerificationByIdRequestData, ReportFlashCallVerificationByIdentityRequestData, ReportFlashCallVerificationByIdRequestData, ReportPhoneCallVerificationByIdentityRequestData, ReportPhoneCallVerificationByIdRequestData, ReportSmsVerificationByIdentityRequestData, ReportSmsVerificationByIdRequestData, StartCalloutVerificationRequestData, StartDataVerificationRequestData, StartFlashCallVerificationRequestData, StartPhoneCallVerificationRequestData, StartSeamlessVerificationRequestData, StartSmsVerificationRequestData } from './requests';
|
|
2
2
|
import { SmsOptions } from './start-verification-request';
|
|
3
3
|
export declare const startVerificationHelper: {
|
|
4
|
+
/**
|
|
5
|
+
* Builds a request object for starting an SMS verification process.
|
|
6
|
+
*
|
|
7
|
+
* @param {string} phoneNumber - The phone number to which the verification SMS should be sent.
|
|
8
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
9
|
+
* @param {SmsOptions} [smsOptions] - Optional parameters for configuring the SMS verification request, with default values assumed for all contained values if not provided.
|
|
10
|
+
* @return {StartSmsVerificationRequestData} The constructed SMS verification request data.
|
|
11
|
+
*/
|
|
4
12
|
buildSmsRequest: (phoneNumber: string, reference?: string, smsOptions?: SmsOptions) => StartSmsVerificationRequestData;
|
|
13
|
+
/**
|
|
14
|
+
* Builds a request object for starting a phone call verification process.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} phoneNumber - The phone number to which the verification call should be made.
|
|
17
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
18
|
+
* @param {string} [locale] - An optional language-region identifier to use for the verification call.
|
|
19
|
+
* @return {StartPhoneCallVerificationRequestData} The request data object for initiating the phone call verification.
|
|
20
|
+
*/
|
|
21
|
+
buildPhoneCallRequest: (phoneNumber: string, reference?: string, locale?: string) => StartPhoneCallVerificationRequestData;
|
|
22
|
+
/**
|
|
23
|
+
* Builds a callout request body with the provided phone number, reference, and locale.
|
|
24
|
+
*
|
|
25
|
+
* @param {string} phoneNumber - The phone number to which the callout will be made.
|
|
26
|
+
* @param {string} [reference] - An optional reference identifier for the callout.
|
|
27
|
+
* @param {string} [locale] - An optional locale string to specify the language or region for the callout.
|
|
28
|
+
* @return {StartCalloutVerificationRequestData} The constructed callout request object.
|
|
29
|
+
* @deprecated Use the method buildPhoneCallRequest() instead
|
|
30
|
+
*/
|
|
5
31
|
buildCalloutRequest: (phoneNumber: string, reference?: string, locale?: string) => StartCalloutVerificationRequestData;
|
|
32
|
+
/**
|
|
33
|
+
* Builds a request object for starting a flash call verification process.
|
|
34
|
+
*
|
|
35
|
+
* @param {string} phoneNumber - The phone number to which the flash call verification should be made.
|
|
36
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
37
|
+
* @param {number} [dialTimeout] - An optional timeout value in seconds for how long to wait for the flash call to be answered.
|
|
38
|
+
* @return {StartFlashCallVerificationRequestData} The request data object for initiating the flash call verification.
|
|
39
|
+
*/
|
|
6
40
|
buildFlashCallRequest: (phoneNumber: string, reference?: string, dialTimeout?: number) => StartFlashCallVerificationRequestData;
|
|
41
|
+
/**
|
|
42
|
+
* Builds a request object for initiating a data verification process.
|
|
43
|
+
*
|
|
44
|
+
* @param {string} phoneNumber - The phone number to be verified.
|
|
45
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
46
|
+
* @return {StartDataVerificationRequestData} The request data object used to start the data verification.
|
|
47
|
+
*/
|
|
48
|
+
buildDataRequest: (phoneNumber: string, reference?: string) => StartDataVerificationRequestData;
|
|
49
|
+
/**
|
|
50
|
+
* Builds a seamless verification request body with the provided phone number and optional reference.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} phoneNumber - The phone number to verify.
|
|
53
|
+
* @param {string} [reference] - An optional reference identifier for the verification request.
|
|
54
|
+
* @return {StartSeamlessVerificationRequestData} The constructed seamless verification request data.
|
|
55
|
+
* @deprecated Use the method buildDataRequest() instead
|
|
56
|
+
*/
|
|
7
57
|
buildSeamlessRequest: (phoneNumber: string, reference?: string) => StartSeamlessVerificationRequestData;
|
|
8
58
|
};
|
|
9
59
|
export declare const reportVerificationByIdHelper: {
|
|
60
|
+
/**
|
|
61
|
+
* Builds a request object for reporting an SMS verification by its ID.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} id - The unique identifier for the SMS verification request.
|
|
64
|
+
* @param {string} code - The verification code received via SMS.
|
|
65
|
+
* @param {string} [cli] - An optional CLI (Caller Line Identification) that can be included in the request.
|
|
66
|
+
* @return {ReportSmsVerificationByIdRequestData} The request data object used to report the SMS verification.
|
|
67
|
+
*/
|
|
10
68
|
buildSmsRequest: (id: string, code: string, cli?: string) => ReportSmsVerificationByIdRequestData;
|
|
69
|
+
/**
|
|
70
|
+
* Builds a request object for reporting a phone call verification by its ID.
|
|
71
|
+
*
|
|
72
|
+
* @param {string} id - The unique identifier for the phone call verification request.
|
|
73
|
+
* @param {string} code - The verification code received during the phone call.
|
|
74
|
+
* @return {ReportPhoneCallVerificationByIdRequestData} The request data object used to report the phone call verification.
|
|
75
|
+
*/
|
|
76
|
+
buildPhoneCallRequest: (id: string, code: string) => ReportPhoneCallVerificationByIdRequestData;
|
|
77
|
+
/**
|
|
78
|
+
* Builds a request object for reporting a callout verification by its ID.
|
|
79
|
+
*
|
|
80
|
+
* @param {string} id - The unique identifier for the callout verification request.
|
|
81
|
+
* @param {string} code - The verification code received during the callout.
|
|
82
|
+
* @return {ReportCalloutVerificationByIdRequestData} The request data object used to report the callout verification.
|
|
83
|
+
* @deprecated Use the method buildPhoneCallRequest() instead
|
|
84
|
+
*/
|
|
11
85
|
buildCalloutRequest: (id: string, code: string) => ReportCalloutVerificationByIdRequestData;
|
|
86
|
+
/**
|
|
87
|
+
* Builds a request object for reporting a flash call verification by its ID.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} id - The unique identifier for the flash call verification request.
|
|
90
|
+
* @param {string} cli - The CLI (Caller Line Identification) received during the flash call.
|
|
91
|
+
* @return {ReportFlashCallVerificationByIdRequestData} The request data object used to report the flash call verification.
|
|
92
|
+
*/
|
|
12
93
|
buildFlashCallRequest: (id: string, cli: string) => ReportFlashCallVerificationByIdRequestData;
|
|
13
94
|
};
|
|
14
95
|
export declare const reportVerificationByIdentityHelper: {
|
|
96
|
+
/**
|
|
97
|
+
* Builds a request object for reporting an SMS verification by the phone number identity.
|
|
98
|
+
*
|
|
99
|
+
* @param {string} identity - The phone number for which the verification process has been initiated.
|
|
100
|
+
* @param {string} code - The verification code received via SMS.
|
|
101
|
+
* @param {string} [cli] - The CLI (Caller Line Identification) that may be used during the verification.
|
|
102
|
+
* @return {ReportSmsVerificationByIdentityRequestData} The request data object used to report the SMS verification.
|
|
103
|
+
*/
|
|
15
104
|
buildSmsRequest: (identity: string, code: string, cli?: string) => ReportSmsVerificationByIdentityRequestData;
|
|
105
|
+
/**
|
|
106
|
+
* Builds a request object for reporting a phone call verification by the phone number identity.
|
|
107
|
+
*
|
|
108
|
+
* @param {string} identity - The phone number for which the verification process has been initiated.
|
|
109
|
+
* @param {string} code - The verification code received via the phone call.
|
|
110
|
+
* @return {ReportPhoneCallVerificationByIdentityRequestData} The request data object used to report the phone call verification.
|
|
111
|
+
*/
|
|
112
|
+
buildPhoneCallRequest: (identity: string, code: string) => ReportPhoneCallVerificationByIdentityRequestData;
|
|
113
|
+
/**
|
|
114
|
+
* Builds a request object for reporting a callout verification by the phone number identity.
|
|
115
|
+
*
|
|
116
|
+
* @param {string} identity - The phone number for which the callout verification process has been initiated.
|
|
117
|
+
* @param {string} code - The verification code received during the callout.
|
|
118
|
+
* @return {ReportCalloutVerificationByIdentityRequestData} The request data object used to report the callout verification.
|
|
119
|
+
* @deprecated Use the method buildPhoneCallRequest() instead
|
|
120
|
+
*/
|
|
16
121
|
buildCalloutRequest: (identity: string, code: string) => ReportCalloutVerificationByIdentityRequestData;
|
|
122
|
+
/**
|
|
123
|
+
* Builds a request object for reporting a flash call verification by the phone number identity.
|
|
124
|
+
*
|
|
125
|
+
* @param {string} identity - The phone number for which the flash call verification process has been initiated.
|
|
126
|
+
* @param {string} cli - The CLI (Caller Line Identification) received during the flash call.
|
|
127
|
+
* @return {ReportFlashCallVerificationByIdentityRequestData} The request data object used to report the flash call verification.
|
|
128
|
+
*/
|
|
17
129
|
buildFlashCallRequest: (identity: string, cli: string) => ReportFlashCallVerificationByIdentityRequestData;
|
|
18
130
|
};
|
package/dist/models/v1/helper.js
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reportVerificationByIdentityHelper = exports.reportVerificationByIdHelper = exports.startVerificationHelper = void 0;
|
|
4
4
|
exports.startVerificationHelper = {
|
|
5
|
+
/**
|
|
6
|
+
* Builds a request object for starting an SMS verification process.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} phoneNumber - The phone number to which the verification SMS should be sent.
|
|
9
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
10
|
+
* @param {SmsOptions} [smsOptions] - Optional parameters for configuring the SMS verification request, with default values assumed for all contained values if not provided.
|
|
11
|
+
* @return {StartSmsVerificationRequestData} The constructed SMS verification request data.
|
|
12
|
+
*/
|
|
5
13
|
buildSmsRequest: (phoneNumber, reference, smsOptions) => {
|
|
6
14
|
return {
|
|
7
15
|
startVerificationWithSmsRequestBody: {
|
|
@@ -18,6 +26,41 @@ exports.startVerificationHelper = {
|
|
|
18
26
|
},
|
|
19
27
|
};
|
|
20
28
|
},
|
|
29
|
+
/**
|
|
30
|
+
* Builds a request object for starting a phone call verification process.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} phoneNumber - The phone number to which the verification call should be made.
|
|
33
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
34
|
+
* @param {string} [locale] - An optional language-region identifier to use for the verification call.
|
|
35
|
+
* @return {StartPhoneCallVerificationRequestData} The request data object for initiating the phone call verification.
|
|
36
|
+
*/
|
|
37
|
+
buildPhoneCallRequest: (phoneNumber, reference, locale) => {
|
|
38
|
+
return {
|
|
39
|
+
startVerificationWithPhoneCallRequestBody: {
|
|
40
|
+
identity: {
|
|
41
|
+
type: 'number',
|
|
42
|
+
endpoint: phoneNumber,
|
|
43
|
+
},
|
|
44
|
+
reference,
|
|
45
|
+
...(locale !== undefined) ? {
|
|
46
|
+
phoneCallOptions: {
|
|
47
|
+
speech: {
|
|
48
|
+
locale,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
} : {},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
/**
|
|
56
|
+
* Builds a callout request body with the provided phone number, reference, and locale.
|
|
57
|
+
*
|
|
58
|
+
* @param {string} phoneNumber - The phone number to which the callout will be made.
|
|
59
|
+
* @param {string} [reference] - An optional reference identifier for the callout.
|
|
60
|
+
* @param {string} [locale] - An optional locale string to specify the language or region for the callout.
|
|
61
|
+
* @return {StartCalloutVerificationRequestData} The constructed callout request object.
|
|
62
|
+
* @deprecated Use the method buildPhoneCallRequest() instead
|
|
63
|
+
*/
|
|
21
64
|
buildCalloutRequest: (phoneNumber, reference, locale) => {
|
|
22
65
|
return {
|
|
23
66
|
startVerificationWithCalloutRequestBody: {
|
|
@@ -36,6 +79,14 @@ exports.startVerificationHelper = {
|
|
|
36
79
|
},
|
|
37
80
|
};
|
|
38
81
|
},
|
|
82
|
+
/**
|
|
83
|
+
* Builds a request object for starting a flash call verification process.
|
|
84
|
+
*
|
|
85
|
+
* @param {string} phoneNumber - The phone number to which the flash call verification should be made.
|
|
86
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
87
|
+
* @param {number} [dialTimeout] - An optional timeout value in seconds for how long to wait for the flash call to be answered.
|
|
88
|
+
* @return {StartFlashCallVerificationRequestData} The request data object for initiating the flash call verification.
|
|
89
|
+
*/
|
|
39
90
|
buildFlashCallRequest: (phoneNumber, reference, dialTimeout) => {
|
|
40
91
|
return {
|
|
41
92
|
startVerificationWithFlashCallRequestBody: {
|
|
@@ -52,6 +103,32 @@ exports.startVerificationHelper = {
|
|
|
52
103
|
},
|
|
53
104
|
};
|
|
54
105
|
},
|
|
106
|
+
/**
|
|
107
|
+
* Builds a request object for initiating a data verification process.
|
|
108
|
+
*
|
|
109
|
+
* @param {string} phoneNumber - The phone number to be verified.
|
|
110
|
+
* @param {string} [reference] - An optional reference identifier used to pass your own reference in the request for tracking purposes.
|
|
111
|
+
* @return {StartDataVerificationRequestData} The request data object used to start the data verification.
|
|
112
|
+
*/
|
|
113
|
+
buildDataRequest: (phoneNumber, reference) => {
|
|
114
|
+
return {
|
|
115
|
+
startDataVerificationRequestBody: {
|
|
116
|
+
identity: {
|
|
117
|
+
type: 'number',
|
|
118
|
+
endpoint: phoneNumber,
|
|
119
|
+
},
|
|
120
|
+
reference,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
/**
|
|
125
|
+
* Builds a seamless verification request body with the provided phone number and optional reference.
|
|
126
|
+
*
|
|
127
|
+
* @param {string} phoneNumber - The phone number to verify.
|
|
128
|
+
* @param {string} [reference] - An optional reference identifier for the verification request.
|
|
129
|
+
* @return {StartSeamlessVerificationRequestData} The constructed seamless verification request data.
|
|
130
|
+
* @deprecated Use the method buildDataRequest() instead
|
|
131
|
+
*/
|
|
55
132
|
buildSeamlessRequest: (phoneNumber, reference) => {
|
|
56
133
|
return {
|
|
57
134
|
startSeamlessVerificationRequestBody: {
|
|
@@ -65,6 +142,14 @@ exports.startVerificationHelper = {
|
|
|
65
142
|
},
|
|
66
143
|
};
|
|
67
144
|
exports.reportVerificationByIdHelper = {
|
|
145
|
+
/**
|
|
146
|
+
* Builds a request object for reporting an SMS verification by its ID.
|
|
147
|
+
*
|
|
148
|
+
* @param {string} id - The unique identifier for the SMS verification request.
|
|
149
|
+
* @param {string} code - The verification code received via SMS.
|
|
150
|
+
* @param {string} [cli] - An optional CLI (Caller Line Identification) that can be included in the request.
|
|
151
|
+
* @return {ReportSmsVerificationByIdRequestData} The request data object used to report the SMS verification.
|
|
152
|
+
*/
|
|
68
153
|
buildSmsRequest: (id, code, cli) => {
|
|
69
154
|
return {
|
|
70
155
|
id,
|
|
@@ -76,6 +161,31 @@ exports.reportVerificationByIdHelper = {
|
|
|
76
161
|
},
|
|
77
162
|
};
|
|
78
163
|
},
|
|
164
|
+
/**
|
|
165
|
+
* Builds a request object for reporting a phone call verification by its ID.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} id - The unique identifier for the phone call verification request.
|
|
168
|
+
* @param {string} code - The verification code received during the phone call.
|
|
169
|
+
* @return {ReportPhoneCallVerificationByIdRequestData} The request data object used to report the phone call verification.
|
|
170
|
+
*/
|
|
171
|
+
buildPhoneCallRequest: (id, code) => {
|
|
172
|
+
return {
|
|
173
|
+
id,
|
|
174
|
+
reportPhoneCallVerificationByIdRequestBody: {
|
|
175
|
+
phoneCall: {
|
|
176
|
+
code,
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
};
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
* Builds a request object for reporting a callout verification by its ID.
|
|
183
|
+
*
|
|
184
|
+
* @param {string} id - The unique identifier for the callout verification request.
|
|
185
|
+
* @param {string} code - The verification code received during the callout.
|
|
186
|
+
* @return {ReportCalloutVerificationByIdRequestData} The request data object used to report the callout verification.
|
|
187
|
+
* @deprecated Use the method buildPhoneCallRequest() instead
|
|
188
|
+
*/
|
|
79
189
|
buildCalloutRequest: (id, code) => {
|
|
80
190
|
return {
|
|
81
191
|
id,
|
|
@@ -86,6 +196,13 @@ exports.reportVerificationByIdHelper = {
|
|
|
86
196
|
},
|
|
87
197
|
};
|
|
88
198
|
},
|
|
199
|
+
/**
|
|
200
|
+
* Builds a request object for reporting a flash call verification by its ID.
|
|
201
|
+
*
|
|
202
|
+
* @param {string} id - The unique identifier for the flash call verification request.
|
|
203
|
+
* @param {string} cli - The CLI (Caller Line Identification) received during the flash call.
|
|
204
|
+
* @return {ReportFlashCallVerificationByIdRequestData} The request data object used to report the flash call verification.
|
|
205
|
+
*/
|
|
89
206
|
buildFlashCallRequest: (id, cli) => {
|
|
90
207
|
return {
|
|
91
208
|
id,
|
|
@@ -98,6 +215,14 @@ exports.reportVerificationByIdHelper = {
|
|
|
98
215
|
},
|
|
99
216
|
};
|
|
100
217
|
exports.reportVerificationByIdentityHelper = {
|
|
218
|
+
/**
|
|
219
|
+
* Builds a request object for reporting an SMS verification by the phone number identity.
|
|
220
|
+
*
|
|
221
|
+
* @param {string} identity - The phone number for which the verification process has been initiated.
|
|
222
|
+
* @param {string} code - The verification code received via SMS.
|
|
223
|
+
* @param {string} [cli] - The CLI (Caller Line Identification) that may be used during the verification.
|
|
224
|
+
* @return {ReportSmsVerificationByIdentityRequestData} The request data object used to report the SMS verification.
|
|
225
|
+
*/
|
|
101
226
|
buildSmsRequest: (identity, code, cli) => {
|
|
102
227
|
return {
|
|
103
228
|
endpoint: identity,
|
|
@@ -109,6 +234,31 @@ exports.reportVerificationByIdentityHelper = {
|
|
|
109
234
|
},
|
|
110
235
|
};
|
|
111
236
|
},
|
|
237
|
+
/**
|
|
238
|
+
* Builds a request object for reporting a phone call verification by the phone number identity.
|
|
239
|
+
*
|
|
240
|
+
* @param {string} identity - The phone number for which the verification process has been initiated.
|
|
241
|
+
* @param {string} code - The verification code received via the phone call.
|
|
242
|
+
* @return {ReportPhoneCallVerificationByIdentityRequestData} The request data object used to report the phone call verification.
|
|
243
|
+
*/
|
|
244
|
+
buildPhoneCallRequest: (identity, code) => {
|
|
245
|
+
return {
|
|
246
|
+
endpoint: identity,
|
|
247
|
+
reportPhoneCallVerificationByIdentityRequestBody: {
|
|
248
|
+
phoneCall: {
|
|
249
|
+
code,
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
};
|
|
253
|
+
},
|
|
254
|
+
/**
|
|
255
|
+
* Builds a request object for reporting a callout verification by the phone number identity.
|
|
256
|
+
*
|
|
257
|
+
* @param {string} identity - The phone number for which the callout verification process has been initiated.
|
|
258
|
+
* @param {string} code - The verification code received during the callout.
|
|
259
|
+
* @return {ReportCalloutVerificationByIdentityRequestData} The request data object used to report the callout verification.
|
|
260
|
+
* @deprecated Use the method buildPhoneCallRequest() instead
|
|
261
|
+
*/
|
|
112
262
|
buildCalloutRequest: (identity, code) => {
|
|
113
263
|
return {
|
|
114
264
|
endpoint: identity,
|
|
@@ -119,6 +269,13 @@ exports.reportVerificationByIdentityHelper = {
|
|
|
119
269
|
},
|
|
120
270
|
};
|
|
121
271
|
},
|
|
272
|
+
/**
|
|
273
|
+
* Builds a request object for reporting a flash call verification by the phone number identity.
|
|
274
|
+
*
|
|
275
|
+
* @param {string} identity - The phone number for which the flash call verification process has been initiated.
|
|
276
|
+
* @param {string} cli - The CLI (Caller Line Identification) received during the flash call.
|
|
277
|
+
* @return {ReportFlashCallVerificationByIdentityRequestData} The request data object used to report the flash call verification.
|
|
278
|
+
*/
|
|
122
279
|
buildFlashCallRequest: (identity, cli) => {
|
|
123
280
|
return {
|
|
124
281
|
endpoint: identity,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/models/v1/helper.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../src/models/v1/helper.ts"],"names":[],"mappings":"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"}
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface Identity {
|
|
5
5
|
/** Currently only `number` type is supported. */
|
|
6
|
-
type:
|
|
6
|
+
type: IdentityType;
|
|
7
7
|
/** For type `number` use an [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537)-compatible phone number. */
|
|
8
8
|
endpoint: string;
|
|
9
|
-
/** */
|
|
10
|
-
verified?: boolean;
|
|
11
9
|
}
|
|
12
|
-
export type
|
|
10
|
+
export type IdentityType = 'number';
|
|
11
|
+
/** @deprecated Use IdentityType instead */
|
|
12
|
+
export type TypeEnum = IdentityType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export type { Identity } from './identity';
|
|
1
|
+
export type { Identity, IdentityType, TypeEnum } from './identity';
|
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
6
|
-
export * from './
|
|
1
|
+
export * from './requests';
|
|
2
|
+
export * from './start-verification-request';
|
|
3
|
+
export * from './verification-report-request';
|
|
4
|
+
export * from './start-sms-verification-response';
|
|
5
|
+
export * from './sms-verification-report-response';
|
|
6
|
+
export * from './sms-verification-status-response';
|
|
7
|
+
export * from './start-phonecall-verification-response';
|
|
8
|
+
export * from './phonecall-verification-report-response';
|
|
9
|
+
export * from './phonecall-verification-status-response';
|
|
10
|
+
export * from './start-flashcall-verification-response';
|
|
7
11
|
export * from './flashcall-verification-report-response';
|
|
8
12
|
export * from './flashcall-verification-status-response';
|
|
9
|
-
export * from './verification-
|
|
13
|
+
export * from './start-data-verification-response';
|
|
14
|
+
export * from './verification-status-response';
|
|
15
|
+
export * from './mod-callbacks';
|
|
10
16
|
export * from './identity';
|
|
11
|
-
export * from './start-verification-request';
|
|
12
17
|
export * from './links-object';
|
|
13
18
|
export * from './price';
|
|
14
|
-
export * from './start-flashcall-verification-response';
|
|
15
|
-
export * from './start-callout-verification-response';
|
|
16
|
-
export * from './start-seamless-verification-response';
|
|
17
|
-
export * from './start-sms-verification-response';
|
|
18
|
-
export * from './sms-request-event-response';
|
|
19
|
-
export * from './sms-verification-report-response';
|
|
20
|
-
export * from './sms-verification-status-response';
|
|
21
19
|
export * from './verification-price-call';
|
|
22
20
|
export * from './verification-price-sms';
|
|
23
|
-
export * from './verification-report-request';
|
|
24
|
-
export * from './verification-status-response';
|
|
25
|
-
export * from './verification-request-event';
|
|
26
|
-
export * from './verification-request-event-response';
|
|
27
|
-
export * from './verification-result-event';
|
|
28
|
-
export * from './verification-result-event-response';
|
|
29
21
|
export * from './verification-error';
|
|
30
22
|
export * from './enums';
|
|
31
23
|
export * from './helper';
|
|
32
|
-
export * from './requests';
|
package/dist/models/v1/index.js
CHANGED
|
@@ -14,36 +14,38 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
18
|
-
__exportStar(require("./
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
|
|
22
|
-
__exportStar(require("./
|
|
17
|
+
// Models associated to API requests
|
|
18
|
+
__exportStar(require("./requests"), exports);
|
|
19
|
+
__exportStar(require("./start-verification-request"), exports);
|
|
20
|
+
__exportStar(require("./verification-report-request"), exports);
|
|
21
|
+
// Models associated to SMS verification workflow
|
|
22
|
+
__exportStar(require("./start-sms-verification-response"), exports);
|
|
23
|
+
__exportStar(require("./sms-verification-report-response"), exports);
|
|
24
|
+
__exportStar(require("./sms-verification-status-response"), exports);
|
|
25
|
+
// Models associated to PhoneCall verification workflow
|
|
26
|
+
__exportStar(require("./start-phonecall-verification-response"), exports);
|
|
27
|
+
__exportStar(require("./phonecall-verification-report-response"), exports);
|
|
28
|
+
__exportStar(require("./phonecall-verification-status-response"), exports);
|
|
29
|
+
// Models associated to Flashcall verification workflow
|
|
30
|
+
__exportStar(require("./start-flashcall-verification-response"), exports);
|
|
23
31
|
__exportStar(require("./flashcall-verification-report-response"), exports);
|
|
24
32
|
__exportStar(require("./flashcall-verification-status-response"), exports);
|
|
25
|
-
|
|
33
|
+
// Models associated to Data verification workflow
|
|
34
|
+
__exportStar(require("./start-data-verification-response"), exports);
|
|
35
|
+
// Wrapper for the various types of Verification Status Response
|
|
36
|
+
__exportStar(require("./verification-status-response"), exports);
|
|
37
|
+
// Models associated to callback events
|
|
38
|
+
__exportStar(require("./mod-callbacks"), exports);
|
|
39
|
+
// Common models
|
|
26
40
|
__exportStar(require("./identity"), exports);
|
|
27
|
-
__exportStar(require("./start-verification-request"), exports);
|
|
28
41
|
__exportStar(require("./links-object"), exports);
|
|
29
42
|
__exportStar(require("./price"), exports);
|
|
30
|
-
__exportStar(require("./start-flashcall-verification-response"), exports);
|
|
31
|
-
__exportStar(require("./start-callout-verification-response"), exports);
|
|
32
|
-
__exportStar(require("./start-seamless-verification-response"), exports);
|
|
33
|
-
__exportStar(require("./start-sms-verification-response"), exports);
|
|
34
|
-
__exportStar(require("./sms-request-event-response"), exports);
|
|
35
|
-
__exportStar(require("./sms-verification-report-response"), exports);
|
|
36
|
-
__exportStar(require("./sms-verification-status-response"), exports);
|
|
37
43
|
__exportStar(require("./verification-price-call"), exports);
|
|
38
44
|
__exportStar(require("./verification-price-sms"), exports);
|
|
39
|
-
|
|
40
|
-
__exportStar(require("./verification-status-response"), exports);
|
|
41
|
-
__exportStar(require("./verification-request-event"), exports);
|
|
42
|
-
__exportStar(require("./verification-request-event-response"), exports);
|
|
43
|
-
__exportStar(require("./verification-result-event"), exports);
|
|
44
|
-
__exportStar(require("./verification-result-event-response"), exports);
|
|
45
|
+
// Error model
|
|
45
46
|
__exportStar(require("./verification-error"), exports);
|
|
47
|
+
// Enums
|
|
46
48
|
__exportStar(require("./enums"), exports);
|
|
49
|
+
// Helper methods
|
|
47
50
|
__exportStar(require("./helper"), exports);
|
|
48
|
-
__exportStar(require("./requests"), exports);
|
|
49
51
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,6CAA2B;AAC3B,+DAA6C;AAC7C,gEAA8C;AAC9C,iDAAiD;AACjD,oEAAkD;AAClD,qEAAmD;AACnD,qEAAmD;AACnD,uDAAuD;AACvD,0EAAwD;AACxD,2EAAyD;AACzD,2EAAyD;AACzD,uDAAuD;AACvD,0EAAwD;AACxD,2EAAyD;AACzD,2EAAyD;AACzD,kDAAkD;AAClD,qEAAmD;AACnD,gEAAgE;AAChE,iEAA+C;AAC/C,uCAAuC;AACvC,kDAAgC;AAChC,gBAAgB;AAChB,6CAA2B;AAC3B,iDAA+B;AAC/B,0CAAwB;AACxB,4DAA0C;AAC1C,2DAAyC;AACzC,cAAc;AACd,uDAAqC;AACrC,QAAQ;AACR,0CAAwB;AACxB,iBAAiB;AACjB,2CAAyB"}
|