Last active
February 28, 2020 03:14
-
-
Save sandbochs/16edc0e05f87d91536ca439ca59651cb to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
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
const stepIdentity = Machine({ | |
id: 'identity', | |
initial: 'not_started', | |
states: { | |
'not_started': { | |
on: { | |
'iss_country_submitted': 'in_progress', | |
'document_submitted': 'in_progress', | |
'address_submitted': 'in_progress', | |
} | |
}, | |
'in_progress': { | |
on: { | |
'check_submitted': 'waiting_vendor', | |
} | |
}, | |
'waiting_vendor': { | |
on: { | |
'check_cleared': 'approved', | |
'document_breakdown_age_verification': 'blocked', | |
'document_breakdown_visual_authenticity': 'blocked', | |
'document_breakdown_visual_authenticity_other': 'under_review', | |
'document_breakdown_visual_authenticity_original': 'under_review', | |
'document_breakdown_visual_authenticity_face': 'under_review', | |
'document_breakdown_data_comparison': 'under_review', | |
'document_breakdown_data_consistency': 'under_review', | |
'document_breakdown_data_validation_mrz_invalid': 'rejected', | |
'document_breakdown_numbers_invalid': 'rejected', | |
'document_breakdown_data_validation': 'under_review', | |
'document_breakdown_image_integrity': 'under_review', | |
'document_breakdown_data_validation_retry': 'rejected', | |
'document_breakdown_data_validation_expiration': 'under_review', | |
'document_breakdown_police_record': 'blocked', | |
'document_breakdown_compromised_document': 'blocked', | |
'watchlist_breakdown_multiple': 'under_review' | |
}, | |
}, | |
'under_review': { | |
on: { | |
// waiting_vendor | |
'document_breakdown_age_verification': 'blocked', | |
'document_breakdown_visual_authenticity': 'blocked', | |
'document_breakdown_data_validation_mrz_invalid': 'rejected', | |
'document_breakdown_numbers_invalid': 'rejected', | |
'document_breakdown_data_validation_retry': 'rejected', | |
'document_breakdown_police_record': 'blocked', | |
'document_breakdown_compromised_document': 'blocked', | |
// under_review | |
'original_doc_not_present': 'blocked', | |
'face_not_present': 'rejected', | |
'data_comparison_rejected': 'rejected', | |
'data_consistency_malicious': 'blocked', | |
'data_consistency_rejected': 'rejected', | |
'data_validation_dob_invalid': 'rejected', | |
'data_validation_gender_invalid': 'rejected', | |
'retry_denied': 'blocked', | |
'retry_approved': 'rejected', | |
'watchlist_blocked': 'blocked', | |
'all_reports_processed': 'approved' | |
} | |
}, | |
'rejected': { | |
on: { | |
// waiting_vendor | |
'document_breakdown_age_verification': 'blocked', | |
'document_breakdown_visual_authenticity': 'blocked', | |
'document_breakdown_police_record': 'blocked', | |
'document_breakdown_compromised_document': 'blocked', | |
// under_review | |
'original_doc_not_present': 'blocked', | |
'data_consistency_malicious': 'blocked', | |
'retry_denied': 'blocked', | |
'watchlist_blocked': 'blocked', | |
} | |
}, | |
'approved': { | |
type: 'final' | |
}, | |
'blocked': { | |
type: 'final' | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment