Skip to content

Instantly share code, notes, and snippets.

@pyoner
Created December 4, 2019 04:20
Show Gist options
  • Save pyoner/65b033351354dec70eba74b5f098589b to your computer and use it in GitHub Desktop.
Save pyoner/65b033351354dec70eba74b5f098589b to your computer and use it in GitHub Desktop.
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const fetchMachine = Machine({ "id": "root", "states": { "Job State Sketch": { "id": "Job State Sketch", "states": { "clientCounterOffer": { "id": "clientCounterOffer", "states": {}, "on": { "accept": "#termsAcceptedAwaitingEscrow", "decline": "#declined" } }, "declined": { "id": "declined", "states": {} }, "inDispute": { "id": "inDispute", "states": {}, "on": { "markAsComplete": "#complete" } }, "termsAcceptedAwaitingEscrow": { "id": "termsAcceptedAwaitingEscrow", "states": {}, "on": { "authorisedEscrow": "#authorisedEscrow" } }, "offer": { "id": "offer", "states": {}, "on": { "cancel": "#cancelled", "clientCounterOffer": "#clientCounterOffer", "decline": "#declined", "providerCounterOffer": "#providerCounterOffer" } }, "authorisedEscrow": { "id": "authorisedEscrow", "states": {}, "on": { "escrow": "#inEscrow" } }, "workPendingCompletion": { "id": "workPendingCompletion", "states": {}, "on": { "dispute": "#inDispute", "markAsComplete": "#complete" } }, "providerCounterOffer": { "id": "providerCounterOffer", "states": {}, "on": { "accept": "#termsAcceptedAwaitingEscrow", "clientCounterOffer": "#clientCounterOffer" } }, "complete": { "id": "complete", "states": {}, "on": { "review": "#reviewed" } }, "draft": { "id": "draft", "states": {}, "on": { "close": "#closed", "start": "#acceptingOffers" } }, "closed": { "id": "closed", "states": {} }, "cancelled": { "id": "cancelled", "states": {} }, "finishingJob": { "id": "finishingJob", "states": {} }, "processingEscrow": { "id": "processingEscrow", "states": {} }, "reviewed": { "id": "reviewed", "states": {} }, "inEscrow": { "id": "inEscrow", "states": {}, "on": { "markAsComplete": "#workPendingCompletion" } }, "init": { "id": "init", "states": {}, "on": { "draft": "#draft", "start": "#acceptingOffers" } }, "acceptingOffers": { "id": "acceptingOffers", "states": {}, "on": { "close": "#closed", "offer": "#offer" } } }, "initial": "init", "on": {} } }, "initial": "Job State Sketch", "on": {}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment