-
-
Save NewAlexandria/6986bfb76e95fda5057eb78df1acf0e4 to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
This file contains hidden or 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) | |
const fetchMachine = Machine({ | |
initial: 'SUBSCRIPTION_AGR_REQUEST', | |
states: { | |
['SUBSCRIPTION_AGR_REQUEST']: { | |
id: 'SUBSCRIPTION_AGR_REQUEST', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
on: { | |
['DONE']: { | |
target: | |
'#SUBSCRIPTION_AGR_SUBMIT', | |
}, | |
}, | |
}, | |
}, | |
}, | |
['SUBSCRIPTION_AGR_SUBMIT']: { | |
id: 'SUBSCRIPTION_AGR_SUBMIT', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
on: { | |
['DONE']: { | |
target: | |
'#VALIDATE_AUTH_SIG_LIST', | |
}, | |
['CANCEL']: { | |
target: '#CANCELLED', | |
}, | |
['HELLOWORKS_DONE']: { | |
target: | |
'READY', | |
}, | |
}, | |
}, | |
}, | |
}, | |
['VALIDATE_AUTH_SIG_LIST']: { | |
id: 'VALIDATE_AUTH_SIG_LIST', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
on: { | |
['DONE']: { | |
target: | |
'#SUBSCRIPTION_AGR_SIGN', | |
}, | |
}, | |
}, | |
}, | |
}, | |
['SUBSCRIPTION_AGR_SIGN']: { | |
id: 'SUBSCRIPTION_AGR_SIGN', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
on: { | |
['HELLOSIGN_DONE']: { | |
target: | |
'READY', | |
}, | |
['DONE']: { | |
target: | |
'#SUBSCRIPTION_AGR_REVIEW', | |
}, | |
}, | |
}, | |
}, | |
}, | |
['SUBSCRIPTION_AGR_REVIEW']: { | |
id: 'SUBSCRIPTION_AGR_REVIEW', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
on: { | |
['SAVE_DOC_DECISIONS']: { target: 'READY', }, | |
['SAVE_KYC']: { target: `READY`, }, | |
['DONE']: { target: '#GP_COUNTERSIGN', }, | |
['REJECTED']: { target: '#REJECTED', }, | |
['RETURN_TO_INVESTOR']: { target: '#SUBSCRIPTION_AGR_SUBMIT', }, | |
}, | |
}, | |
}, | |
}, | |
['GP_COUNTERSIGN']: { | |
id: 'GP_COUNTERSIGN', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
on: { | |
['HELLOSIGN_DONE']: { | |
target: | |
'READY', | |
}, | |
['DONE']: { | |
target: | |
'#FINALIZE_SUBSCRIPTION', | |
}, | |
}, | |
}, | |
}, | |
}, | |
['FINALIZE_SUBSCRIPTION']: { | |
id: 'FINALIZE_SUBSCRIPTION', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
type: 'final', | |
}, | |
}, | |
}, | |
['CANCELLED']: { | |
id: 'CANCELLED', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
type: 'final', | |
}, | |
}, | |
}, | |
['REJECTED']: { | |
id: 'REJECTED', | |
initial: 'READY', | |
states: { | |
['READY']: { | |
type: 'final', | |
}, | |
}, | |
}, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment