Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a API endpoint for getting mermaid flowcharts
GET {{url}}/api/_action/frosh-tools/state-machines/load-mermaid?stateMachine=order_transaction.state
GET {{url}}/api/_action/frosh-tools/state-machines/load-mermaid?stateMachine=order_delivery.state
GET {{url}}/api/_action/frosh-tools/state-machines/load-mermaid?stateMachine=order.state
Example response:
{ "data": "flowchart TD\nSTART_STATE[Start state] --> 0189e474ee557113994b4f678ba7574a\n\n0189e474ee557113994b4f678ba7574a(Open)\n0189e474ee557113994b4f678c711eb7(Cancelled)\n0189e474ee557113994b4f678c711eb7 --> FINAL_STATE[Final state]\n0189e474ee557113994b4f678d696964(Shipped)\n0189e474ee557113994b4f678db3c16c(Shipped partially)\n0189e474ee557113994b4f678e1eb368(Returned)\n0189e474ee557113994b4f678e1eb368 --> FINAL_STATE[Final state]\n0189e474ee557113994b4f678e75d0e0(Returned partially)\n\n0189e474ee557113994b4f678ba7574a -- ship --> 0189e474ee557113994b4f678d696964\n0189e474ee557113994b4f678ba7574a -- ship_partially --> 0189e474ee557113994b4f678db3c16c\n0189e474ee557113994b4f678ba7574a -- cancel --> 0189e474ee557113994b4f678c711eb7\n0189e474ee557113994b4f678d696964 -- retour --> 0189e474ee557113994b4f678e1eb368\n0189e474ee557113994b4f678d696964 -- retour_partially --> 0189e474ee557113994b4f678e75d0e0\n0189e474ee557113994b4f678d696964 -- cancel --> 0189e474ee557113994b4f678c711eb7\n0189e474ee557113994b4f678db3c16c -- retour --> 0189e474ee557113994b4f678e1eb368\n0189e474ee557113994b4f678db3c16c -- retour_partially --> 0189e474ee557113994b4f678e75d0e0\n0189e474ee557113994b4f678db3c16c -- ship --> 0189e474ee557113994b4f678d696964\n0189e474ee557113994b4f678db3c16c -- cancel --> 0189e474ee557113994b4f678c711eb7\n0189e474ee557113994b4f678c711eb7 -- reopen --> 0189e474ee557113994b4f678ba7574a\n0189e474ee557113994b4f678d696964 -- reopen --> 0189e474ee557113994b4f678ba7574a\n0189e474ee557113994b4f678db3c16c -- reopen --> 0189e474ee557113994b4f678ba7574a\n0189e474ee557113994b4f678e1eb368 -- reopen --> 0189e474ee557113994b4f678ba7574a\n0189e474ee557113994b4f678e75d0e0 -- reopen --> 0189e474ee557113994b4f678ba7574a\n0189e474ee557113994b4f678e75d0e0 -- retour --> 0189e474ee557113994b4f678e1eb368\n" }