Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add maxAttempts to verifyParameters #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion types/tests/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ mbClient.verify.create('31612345678', (
mbClient.verify.create('31612345678', {
type: "sms",
datacoding: "plain",
tokenLength: 8
tokenLength: 8,
maxAttempts: 3,
}, (
// $ExpectType Error | null
err,
Expand Down
5 changes: 5 additions & 0 deletions types/verify.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export interface VerifyParameter {
* The language in which the message needs to be read to the recipient. Default: en-gb
*/
language?: languages;

/**
* The maximum number of token input attempts a user can do before the Verify object is marked as failed. Must be between 1 and 10. Default: 1
*/
maxAttempts?: number;
}

export interface VerifyMessage {
Expand Down