-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bebca87
commit c70c1d8
Showing
8 changed files
with
2,769 additions
and
2,308 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,33 @@ | ||
export const promptGuards = { | ||
ifText: (_, event) => event.data.prompt.input.type == "Text", | ||
|
||
ifText: (_,event) => event.data.prompt.input.type == "Text", | ||
ifAudio: (_, event) => event.data.inputType == "Audio", | ||
|
||
ifAudio: (_,event) => event.data.inputType == "Audio", | ||
ifMultipleAadhaar: (_, event) => | ||
event.data == "This mobile number taged with multiple records.", | ||
|
||
ifMultipleAadhaar: (_,event) => event.data == "This mobile number taged with multiple records.", | ||
ifInValidScheme: (_, event) => | ||
!VALID_SCHEMES.includes(event.data.prompt.input.schemeName), | ||
|
||
ifNoRecordsFound: (context,event)=> event.data == `No Record Found for this (${context.userAadhaarNumber}) Aadhar/Ben_id/Mobile.`, | ||
ifNoRecordsFound: (context, event) => | ||
event.data == | ||
`No Record Found for this (${context.userAadhaarNumber}) Aadhar/Ben_id/Mobile.`, | ||
|
||
ifOTPSend: (_,event)=> event.data == 'OTP send successfully!', | ||
ifOTPSend: (_, event) => event.data == "OTP send successfully!", | ||
|
||
ifTryAgain: (_,event)=> event.data == 'Try again', | ||
ifTryAgain: (_, event) => event.data == "Try again", | ||
|
||
ifNotValidAadhaar: (_,event) => event.data == "Please enter a valid Beneficiary ID/Aadhaar Number/Phone number", | ||
ifNotValidAadhaar: (_, event) => | ||
event.data == | ||
"Please enter a valid Beneficiary ID/Aadhaar Number/Phone number", | ||
|
||
ifInvalidOTP: (_,event) => event.data == "OTP not verified", | ||
|
||
resendOTP: (_,event) => event.data.query == "resend OTP", | ||
ifInvalidOTP: (_, event) => event.data == "OTP not verified", | ||
|
||
ifOTPHasBeenVerified: (context,_) => context.isOTPVerified, | ||
resendOTP: (_, event) => event.data.query == "resend OTP", | ||
|
||
ifInvalidClassifier: (_,event) => event.data.class == "invalid", | ||
ifOTPHasBeenVerified: (context, _) => context.isOTPVerified, | ||
|
||
ifConvoStarterOrEnder: (_,event) => event.data.class == "convo" | ||
ifInvalidClassifier: (_, event) => event.data.class == "invalid", | ||
|
||
} | ||
ifConvoStarterOrEnder: (_, event) => event.data.class == "convo", | ||
}; |
Oops, something went wrong.