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
| // https://stately.ai/viz/7fc86d22-a6f6-4f64-a6a5-580c76cb6567 | |
| import { createMachine, assign } from "xstate"; | |
| interface Context {} | |
| const fetchMachine = createMachine<Context>( | |
| { | |
| id: "Shopping Cart Checkout", | |
| initial: "SERVICE CALL", |
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
| ... | |
| validating: { | |
| invoke: { | |
| src: 'validateMobileNumber', | |
| onDone: [ | |
| { | |
| target: 'valid', | |
| actions: assign({mobileNumberError: ''}), | |
| cond: (_ctx, event) => { | |
| const validationResponse = event.data; |
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
| // https://try.jsonata.org/g-X7ev7nl | |
| // Sample Input ---------------------------- | |
| { | |
| "claim_id": 9876543212, | |
| "policy_type": "AUTO", | |
| "auth_token": "ABCDEF" | |
| } |
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
| // Merges the original context with the expected contract and then filters out the original context's properties | |
| $ ~> | $ | | |
| { | |
| "instanceId": $.originatorId, | |
| "event": "CONTINUE", | |
| "context": $ ~> | $ | {}, ["originatorId"] | | |
| }, [ | |
| $filter($keys($), | |
| function($key) { | |
| $key != "instanceId" and $key != "context" and $key != "event" |
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
| { | |
| "Account": { | |
| "Account Name": "Firefly", | |
| "Order": [ | |
| { | |
| "OrderID": "order103", | |
| "Product": [ | |
| { | |
| "Product Name": "Bowler Hat", | |
| "ProductID": 858383, |
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
| { | |
| 'channel': $.channel, | |
| 'blocks': [ | |
| { | |
| 'type': 'section', | |
| 'text': { | |
| 'type':'mrkdwn', | |
| 'text': '------------------------------\n*You have mail!*' | |
| } | |
| }, |
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
| { | |
| 'grant_type': 'urn:ietf:params:oauth:grant-type:jwt-bearer', | |
| /* Custom JSONata-registered JWT creation function ($createSignedJwt is just a pass-through wrapper on top of jsonwebtoken) */ | |
| 'assertion': $createSignedJwt({ | |
| /* Service account email */ | |
| 'iss': '{{client_email}}', | |
| /* Google scoped service (url format) */ |
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
| /* Expression to be executed on the FE to create a serialized expression to be evaluated by Core (SQL as the example) */ | |
| { | |
| "typedValues": [ | |
| { | |
| "value": "John", | |
| "type": "string" | |
| }, | |
| { | |
| "value": "Doe", | |
| "type": "string" |
OlderNewer