[{"data":1,"prerenderedAt":5718},["ShallowReactive",2],{"docs-navigation":3,"content-query-gzYgjM8pPn":315},[4,7,10,13,16,19,22,25,28,31,34,37,40,43,46,49,52,55,58,61,64,67,70,73,76,79,82,85,88,91,94,97,100,103,106,109,112,115,118,121,124,127,130,133,136,139,142,145,148,151,154,157,160,163,166,169,172,175,178,181,184,187,190,193,196,199,202,205,208,211,214,217,220,223,226,229,232,235,238,241,244,247,250,253,256,258,261,264,267,270,273,276,279,282,285,288,291,294,297,300,303,306,309,312],{"_path":5,"title":6},"/docs/account/account-management","Account management",{"_path":8,"title":9},"/docs/account/mfa","Multi-factor authentication (MFA)",{"_path":11,"title":12},"/docs/account/team","Teams and sub-accounts",{"_path":14,"title":15},"/docs/account/billing-and-subscriptions","Billing & subscriptions",{"_path":17,"title":18},"/docs/account/access-tokens","Webhook Relay access tokens: permissions and subscription scopes",{"_path":20,"title":21},"/docs/clawhub","Webhook Relay on ClawHub",{"_path":23,"title":24},"/docs/email","Receive emails as webhooks",{"_path":26,"title":27},"/docs/email/payload","Email webhook payload",{"_path":29,"title":30},"/docs/email/filtering-and-policy","Sender filtering & policy",{"_path":32,"title":33},"/docs/email/cli","Create & poll email addresses from the CLI",{"_path":35,"title":36},"/docs","Getting Started",{"_path":38,"title":39},"/docs/installation/cli","CLI",{"_path":41,"title":42},"/docs/installation/docker","Docker container",{"_path":44,"title":45},"/docs/installation/docker-compose","Docker Compose",{"_path":47,"title":48},"/docs/installation/kubernetes","Kubernetes",{"_path":50,"title":51},"/docs/installation/autostart-windows","Autostart (Windows)",{"_path":53,"title":54},"/docs/installation/autostart-linux","Autostart (Linux)",{"_path":56,"title":57},"/docs/installation/autostart-macos","Autostart (MacOS)",{"_path":59,"title":60},"/docs/installation/behind-proxy","HTTP proxy configuration",{"_path":62,"title":63},"/docs/mcp","MCP Server",{"_path":65,"title":66},"/docs/outbound","Outbound Gateway: send webhooks to your customers",{"_path":68,"title":69},"/docs/outbound/setup","Set up the Outbound Gateway",{"_path":71,"title":72},"/docs/outbound/receiving","Receive and verify outbound webhooks",{"_path":74,"title":75},"/docs/outbound/operating","Monitor, retry and recover deliveries",{"_path":77,"title":78},"/docs/security","Security & Tech",{"_path":80,"title":81},"/docs/service-connections","Service Connections",{"_path":83,"title":84},"/docs/service-connections/ai-providers","AI provider connections",{"_path":86,"title":87},"/docs/service-connections/aws_s3","AWS S3",{"_path":89,"title":90},"/docs/service-connections/aws_sns","AWS SNS",{"_path":92,"title":93},"/docs/service-connections/aws_sqs","AWS SQS",{"_path":95,"title":96},"/docs/service-connections/azure","Azure",{"_path":98,"title":99},"/docs/service-connections/gcp_gcs","GCP Cloud Storage",{"_path":101,"title":102},"/docs/service-connections/gcp_pubsub","GCP Pub/Sub",{"_path":104,"title":105},"/docs/service-connections/secrets","Secrets",{"_path":107,"title":108},"/docs/skills","Agent Skills",{"_path":110,"title":111},"/docs/skills-cli","skills.sh — the Agent Skills CLI",{"_path":113,"title":114},"/docs/tunnels/demoing-your-website","Demoing your website",{"_path":116,"title":117},"/docs/tunnels/regions","Regions",{"_path":119,"title":120},"/docs/tutorials/cicd/jenkins-bitbucket","Jenkins and Bitbucket",{"_path":122,"title":123},"/docs/tutorials/cicd/jenkins-github","Jenkins and GitHub",{"_path":125,"title":126},"/docs/tutorials/cicd/jenkins-plugin","Jenkins Plugin",{"_path":128,"title":129},"/docs/tutorials/cicd/jenkins-plugin-multibranch","Jenkins Multibranch Pipelines",{"_path":131,"title":132},"/docs/tutorials/cicd/kubernetes-operator","Kubernetes Operator",{"_path":134,"title":135},"/docs/tutorials/cicd/terraform-atlantis","Terraform Atlantis",{"_path":137,"title":138},"/docs/tutorials/cicd/webhook-exec","Execute scripts on webhook",{"_path":140,"title":141},"/docs/tutorials/edge/home-assistant","Home Assistant",{"_path":143,"title":144},"/docs/tutorials/edge/javascript-app","JavaScript app",{"_path":146,"title":147},"/docs/tutorials/edge/node-red","Node-RED",{"_path":149,"title":150},"/docs/tutorials/email/airtable","Email to Airtable",{"_path":152,"title":153},"/docs/tutorials/email/api","Email to API",{"_path":155,"title":156},"/docs/tutorials/email/database","Email to Database",{"_path":158,"title":159},"/docs/tutorials/email/discord","Email to Discord",{"_path":161,"title":162},"/docs/tutorials/email/google-sheets","Email to Google Sheets",{"_path":164,"title":165},"/docs/tutorials/email/microsoft-teams","Email to Microsoft Teams",{"_path":167,"title":168},"/docs/tutorials/email/notion","Email to Notion",{"_path":170,"title":171},"/docs/tutorials/email/slack","Email to Slack",{"_path":173,"title":174},"/docs/tutorials","Tutorials",{"_path":176,"title":177},"/docs/tutorials/n8n/email-trigger","n8n Email Trigger (Inbound Email)",{"_path":179,"title":180},"/docs/tutorials/n8n/webhook-trigger","n8n Webhook Trigger (No Public IP)",{"_path":182,"title":183},"/docs/tutorials/n8n/whatsapp-cloud-api-webhook","n8n WhatsApp Cloud API Webhook Setup",{"_path":185,"title":186},"/docs/tutorials/transform/docker-to-slack","DockerHub webhook to Slack notification",{"_path":188,"title":189},"/docs/tutorials/transform/enrich-webhooks","Enrich webhooks from APIs",{"_path":191,"title":192},"/docs/tutorials/transform/stripe-to-plain","Sync Stripe subscriptions to Plain.com tenants",{"_path":194,"title":195},"/docs/tutorials/warehouse/bigquery","GCP BigQuery",{"_path":197,"title":198},"/docs/webhooks/alerts","Alerts",{"_path":200,"title":201},"/docs/webhooks/auth/username-password","Username and password",{"_path":203,"title":204},"/docs/webhooks/auth/hmac","HMAC",{"_path":206,"title":207},"/docs/webhooks/auth/jwt","JWT authentication",{"_path":209,"title":210},"/docs/webhooks/auth/http-method","Auth using request method",{"_path":212,"title":213},"/docs/webhooks/cors","CORS for webhooks",{"_path":215,"title":216},"/docs/webhooks/cron/using-cron-webhooks","Schedule recurring webhooks",{"_path":218,"title":219},"/docs/webhooks/custom-domains","Custom webhook domains",{"_path":221,"title":222},"/docs/webhooks/custom-subdomains","Custom webhook subdomains",{"_path":224,"title":225},"/docs/webhooks/custom-webhook-response","Custom response to webhooks",{"_path":227,"title":228},"/docs/webhooks/durable-webhooks","Durable webhooks: reliable delivery with automatic retries",{"_path":230,"title":231},"/docs/webhooks/functions/manipulating-json","JSON encoding",{"_path":233,"title":234},"/docs/webhooks/functions/make-http-request","Make HTTP request",{"_path":236,"title":237},"/docs/webhooks/functions/modify-request","Modify webhook headers, body, method and path",{"_path":239,"title":240},"/docs/webhooks/functions/multipart-form-data","Multipart form to JSON",{"_path":242,"title":243},"/docs/webhooks/functions/url-encoded-data","URL Encoded Form",{"_path":245,"title":246},"/docs/webhooks/functions/working-with-time","Working with time",{"_path":248,"title":249},"/docs/webhooks/functions/send-emails","Sending emails",{"_path":251,"title":252},"/docs/webhooks/functions/crypto-functions","Base64, encryption",{"_path":254,"title":255},"/docs/webhooks/functions/integrate-into-cicd","Integrating into CI/CD",{"_path":257,"title":195},"/docs/webhooks/functions/big-query",{"_path":259,"title":260},"/docs/webhooks/functions/accessing-metadata","Accessing metadata",{"_path":262,"title":263},"/docs/webhooks/functions/response-functions","Response (post-delivery) functions",{"_path":265,"title":266},"/docs/webhooks/functions/alerting","Alerting from functions",{"_path":268,"title":269},"/docs/webhooks/functions/helper-libraries","Helper libraries",{"_path":271,"title":272},"/docs/webhooks/functions/transform-webhook-payload","Transform a webhook payload",{"_path":274,"title":275},"/docs/webhooks/functions/filter-webhooks","Filter or drop webhooks before forwarding",{"_path":277,"title":278},"/docs/webhooks/functions/provider-helpers","Provider-aware function helpers",{"_path":280,"title":281},"/docs/webhooks/functions","Webhook transformations (functions): modify body, headers, method and path",{"_path":283,"title":284},"/docs/webhooks/internal/localhost","Receive webhooks on localhost with the relay CLI",{"_path":286,"title":287},"/docs/webhooks/large-webhooks","Large Webhooks",{"_path":289,"title":290},"/docs/webhooks/outbound-throttling","Outbound throttling: control webhook delivery speed",{"_path":292,"title":293},"/docs/webhooks/polling-webhooks","Polling webhooks with /v1/events",{"_path":295,"title":296},"/docs/webhooks/public/public-destination","Forward to public URL",{"_path":298,"title":299},"/docs/webhooks/public/multiple-destination-urls","Forward webhooks to multiple destinations",{"_path":301,"title":302},"/docs/webhooks/replay-on-agent-connect","Webhook replay on agent connect: recover missed webhooks",{"_path":304,"title":305},"/docs/webhooks/static-ip-address","Static IP Address",{"_path":307,"title":308},"/docs/webhooks/tls-ssl-errors","Fix TLS/SSL handshake errors: unsupported protocol, wrong version number, handshake failure",{"_path":310,"title":311},"/docs/webhooks/websocket-server","Connecting to websocket server",{"_path":313,"title":314},"/docs/webhooks/zero-retention-buckets","Zero Retention Buckets",{"_path":268,"_dir":316,"_draft":317,"_partial":317,"_locale":318,"title":269,"description":319,"intro":320,"type":321,"layout":322,"tags":323,"body":326,"_type":5711,"_id":5712,"_source":5713,"_file":5714,"_stem":5715,"_extension":5716,"sitemap":5717},"functions",false,"","Import curated helper libraries into Webhook Relay functions with require() — JMESPath queries, JSON Schema validation, CSV, XML, YAML, JWT, HMAC, Mustache templates, time and HTML utilities.","JavaScript and Lua functions can import a curated set of helper libraries with require() — no npm, no dependencies to manage.","example","doc",[324,325],"Functions","Webhook Forwarding",{"type":327,"children":328,"toc":5700},"root",[329,346,721,726,733,1423,1436,1447,1514,1520,1567,2234,2257,2625,2631,2652,3448,3454,3477,3897,3902,3992,3998,4015,4785,4819,4825,4845,5395,5414,5420,5573,5579,5604,5610,5622,5662,5674,5694],{"type":330,"tag":331,"props":332,"children":333},"element","p",{},[334,337,344],{"type":335,"value":336},"text","JavaScript and Lua functions can import a curated set of built-in helper libraries with ",{"type":330,"tag":338,"props":339,"children":341},"code",{"className":340},[],[342],{"type":335,"value":343},"require()",{"type":335,"value":345},". They cover the things webhook transformations need most — safely reading nested data, querying JSON, converting between formats, verifying signatures and rendering templates — without npm packages or dependency management.",{"type":330,"tag":347,"props":348,"children":349},"code-switcher",{},[350,508],{"type":330,"tag":351,"props":352,"children":353},"template",{"v-slot:javascript":318},[354],{"type":330,"tag":355,"props":356,"children":360},"pre",{"className":357,"code":358,"language":359,"meta":318,"style":318},"language-javascript shiki shiki-themes github-dark","const data = require(\"data\")\n\nconst event = JSON.parse(r.body)\nconst city = data.get(event, \"customer.address.city\", \"unknown\")\n","javascript",[361],{"type":330,"tag":338,"props":362,"children":363},{"__ignoreMap":318},[364,410,420,457],{"type":330,"tag":365,"props":366,"children":369},"span",{"class":367,"line":368},"line",1,[370,376,382,387,393,399,405],{"type":330,"tag":365,"props":371,"children":373},{"style":372},"--shiki-default:#F97583",[374],{"type":335,"value":375},"const",{"type":330,"tag":365,"props":377,"children":379},{"style":378},"--shiki-default:#79B8FF",[380],{"type":335,"value":381}," data",{"type":330,"tag":365,"props":383,"children":384},{"style":372},[385],{"type":335,"value":386}," =",{"type":330,"tag":365,"props":388,"children":390},{"style":389},"--shiki-default:#B392F0",[391],{"type":335,"value":392}," require",{"type":330,"tag":365,"props":394,"children":396},{"style":395},"--shiki-default:#E1E4E8",[397],{"type":335,"value":398},"(",{"type":330,"tag":365,"props":400,"children":402},{"style":401},"--shiki-default:#9ECBFF",[403],{"type":335,"value":404},"\"data\"",{"type":330,"tag":365,"props":406,"children":407},{"style":395},[408],{"type":335,"value":409},")\n",{"type":330,"tag":365,"props":411,"children":413},{"class":367,"line":412},2,[414],{"type":330,"tag":365,"props":415,"children":417},{"emptyLinePlaceholder":416},true,[418],{"type":335,"value":419},"\n",{"type":330,"tag":365,"props":421,"children":423},{"class":367,"line":422},3,[424,428,433,437,442,447,452],{"type":330,"tag":365,"props":425,"children":426},{"style":372},[427],{"type":335,"value":375},{"type":330,"tag":365,"props":429,"children":430},{"style":378},[431],{"type":335,"value":432}," event",{"type":330,"tag":365,"props":434,"children":435},{"style":372},[436],{"type":335,"value":386},{"type":330,"tag":365,"props":438,"children":439},{"style":378},[440],{"type":335,"value":441}," JSON",{"type":330,"tag":365,"props":443,"children":444},{"style":395},[445],{"type":335,"value":446},".",{"type":330,"tag":365,"props":448,"children":449},{"style":389},[450],{"type":335,"value":451},"parse",{"type":330,"tag":365,"props":453,"children":454},{"style":395},[455],{"type":335,"value":456},"(r.body)\n",{"type":330,"tag":365,"props":458,"children":460},{"class":367,"line":459},4,[461,465,470,474,479,484,489,494,499,504],{"type":330,"tag":365,"props":462,"children":463},{"style":372},[464],{"type":335,"value":375},{"type":330,"tag":365,"props":466,"children":467},{"style":378},[468],{"type":335,"value":469}," city",{"type":330,"tag":365,"props":471,"children":472},{"style":372},[473],{"type":335,"value":386},{"type":330,"tag":365,"props":475,"children":476},{"style":395},[477],{"type":335,"value":478}," data.",{"type":330,"tag":365,"props":480,"children":481},{"style":389},[482],{"type":335,"value":483},"get",{"type":330,"tag":365,"props":485,"children":486},{"style":395},[487],{"type":335,"value":488},"(event, ",{"type":330,"tag":365,"props":490,"children":491},{"style":401},[492],{"type":335,"value":493},"\"customer.address.city\"",{"type":330,"tag":365,"props":495,"children":496},{"style":395},[497],{"type":335,"value":498},", ",{"type":330,"tag":365,"props":500,"children":501},{"style":401},[502],{"type":335,"value":503},"\"unknown\"",{"type":330,"tag":365,"props":505,"children":506},{"style":395},[507],{"type":335,"value":409},{"type":330,"tag":351,"props":509,"children":510},{"v-slot:lua":318},[511],{"type":330,"tag":355,"props":512,"children":516},{"className":513,"code":514,"language":515,"meta":318,"style":318},"language-lua shiki shiki-themes github-dark","local json = require(\"json\")\nlocal data = require(\"data\")\n\nlocal event, err = json.decode(r.RequestBody)\nif err then error(err) end\n\nlocal city = data.get(event, \"customer.address.city\", \"unknown\")\n","lua",[517],{"type":330,"tag":338,"props":518,"children":519},{"__ignoreMap":318},[520,555,587,594,634,668,676],{"type":330,"tag":365,"props":521,"children":522},{"class":367,"line":368},[523,528,533,538,542,546,551],{"type":330,"tag":365,"props":524,"children":525},{"style":372},[526],{"type":335,"value":527},"local",{"type":330,"tag":365,"props":529,"children":530},{"style":395},[531],{"type":335,"value":532}," json ",{"type":330,"tag":365,"props":534,"children":535},{"style":372},[536],{"type":335,"value":537},"=",{"type":330,"tag":365,"props":539,"children":540},{"style":378},[541],{"type":335,"value":392},{"type":330,"tag":365,"props":543,"children":544},{"style":395},[545],{"type":335,"value":398},{"type":330,"tag":365,"props":547,"children":548},{"style":401},[549],{"type":335,"value":550},"\"json\"",{"type":330,"tag":365,"props":552,"children":553},{"style":395},[554],{"type":335,"value":409},{"type":330,"tag":365,"props":556,"children":557},{"class":367,"line":412},[558,562,567,571,575,579,583],{"type":330,"tag":365,"props":559,"children":560},{"style":372},[561],{"type":335,"value":527},{"type":330,"tag":365,"props":563,"children":564},{"style":395},[565],{"type":335,"value":566}," data ",{"type":330,"tag":365,"props":568,"children":569},{"style":372},[570],{"type":335,"value":537},{"type":330,"tag":365,"props":572,"children":573},{"style":378},[574],{"type":335,"value":392},{"type":330,"tag":365,"props":576,"children":577},{"style":395},[578],{"type":335,"value":398},{"type":330,"tag":365,"props":580,"children":581},{"style":401},[582],{"type":335,"value":404},{"type":330,"tag":365,"props":584,"children":585},{"style":395},[586],{"type":335,"value":409},{"type":330,"tag":365,"props":588,"children":589},{"class":367,"line":422},[590],{"type":330,"tag":365,"props":591,"children":592},{"emptyLinePlaceholder":416},[593],{"type":335,"value":419},{"type":330,"tag":365,"props":595,"children":596},{"class":367,"line":459},[597,601,606,610,615,620,625,630],{"type":330,"tag":365,"props":598,"children":599},{"style":372},[600],{"type":335,"value":527},{"type":330,"tag":365,"props":602,"children":603},{"style":395},[604],{"type":335,"value":605}," event, err ",{"type":330,"tag":365,"props":607,"children":608},{"style":372},[609],{"type":335,"value":537},{"type":330,"tag":365,"props":611,"children":612},{"style":395},[613],{"type":335,"value":614}," json.",{"type":330,"tag":365,"props":616,"children":617},{"style":378},[618],{"type":335,"value":619},"decode",{"type":330,"tag":365,"props":621,"children":622},{"style":395},[623],{"type":335,"value":624},"(r.",{"type":330,"tag":365,"props":626,"children":627},{"style":389},[628],{"type":335,"value":629},"RequestBody",{"type":330,"tag":365,"props":631,"children":632},{"style":395},[633],{"type":335,"value":409},{"type":330,"tag":365,"props":635,"children":637},{"class":367,"line":636},5,[638,643,648,653,658,663],{"type":330,"tag":365,"props":639,"children":640},{"style":372},[641],{"type":335,"value":642},"if",{"type":330,"tag":365,"props":644,"children":645},{"style":395},[646],{"type":335,"value":647}," err ",{"type":330,"tag":365,"props":649,"children":650},{"style":372},[651],{"type":335,"value":652},"then",{"type":330,"tag":365,"props":654,"children":655},{"style":378},[656],{"type":335,"value":657}," error",{"type":330,"tag":365,"props":659,"children":660},{"style":395},[661],{"type":335,"value":662},"(err) ",{"type":330,"tag":365,"props":664,"children":665},{"style":372},[666],{"type":335,"value":667},"end\n",{"type":330,"tag":365,"props":669,"children":671},{"class":367,"line":670},6,[672],{"type":330,"tag":365,"props":673,"children":674},{"emptyLinePlaceholder":416},[675],{"type":335,"value":419},{"type":330,"tag":365,"props":677,"children":679},{"class":367,"line":678},7,[680,684,689,693,697,701,705,709,713,717],{"type":330,"tag":365,"props":681,"children":682},{"style":372},[683],{"type":335,"value":527},{"type":330,"tag":365,"props":685,"children":686},{"style":395},[687],{"type":335,"value":688}," city ",{"type":330,"tag":365,"props":690,"children":691},{"style":372},[692],{"type":335,"value":537},{"type":330,"tag":365,"props":694,"children":695},{"style":395},[696],{"type":335,"value":478},{"type":330,"tag":365,"props":698,"children":699},{"style":378},[700],{"type":335,"value":483},{"type":330,"tag":365,"props":702,"children":703},{"style":395},[704],{"type":335,"value":488},{"type":330,"tag":365,"props":706,"children":707},{"style":401},[708],{"type":335,"value":493},{"type":330,"tag":365,"props":710,"children":711},{"style":395},[712],{"type":335,"value":498},{"type":330,"tag":365,"props":714,"children":715},{"style":401},[716],{"type":335,"value":503},{"type":330,"tag":365,"props":718,"children":719},{"style":395},[720],{"type":335,"value":409},{"type":330,"tag":331,"props":722,"children":723},{},[724],{"type":335,"value":725},"The same module names and camelCase methods are available in both runtimes. Only the documented built-in modules can be imported — npm packages, filesystem modules and arbitrary host modules are not available.",{"type":330,"tag":727,"props":728,"children":730},"h2",{"id":729},"available-modules",[731],{"type":335,"value":732},"Available modules",{"type":330,"tag":734,"props":735,"children":736},"table",{},[737,756],{"type":330,"tag":738,"props":739,"children":740},"thead",{},[741],{"type":330,"tag":742,"props":743,"children":744},"tr",{},[745,751],{"type":330,"tag":746,"props":747,"children":748},"th",{},[749],{"type":335,"value":750},"Module",{"type":330,"tag":746,"props":752,"children":753},{},[754],{"type":335,"value":755},"Methods",{"type":330,"tag":757,"props":758,"children":759},"tbody",{},[760,865,886,914,962,989,1015,1041,1069,1103,1145,1165,1221,1256,1284,1305,1332,1353,1374,1395],{"type":330,"tag":742,"props":761,"children":762},{},[763,773],{"type":330,"tag":764,"props":765,"children":766},"td",{},[767],{"type":330,"tag":338,"props":768,"children":770},{"className":769},[],[771],{"type":335,"value":772},"data",{"type":330,"tag":764,"props":774,"children":775},{},[776,781,782,788,789,795,796,802,803,809,810,816,817,823,824,830,831,837,838,844,845,851,852,858,859],{"type":330,"tag":338,"props":777,"children":779},{"className":778},[],[780],{"type":335,"value":483},{"type":335,"value":498},{"type":330,"tag":338,"props":783,"children":785},{"className":784},[],[786],{"type":335,"value":787},"set",{"type":335,"value":498},{"type":330,"tag":338,"props":790,"children":792},{"className":791},[],[793],{"type":335,"value":794},"pick",{"type":335,"value":498},{"type":330,"tag":338,"props":797,"children":799},{"className":798},[],[800],{"type":335,"value":801},"omit",{"type":335,"value":498},{"type":330,"tag":338,"props":804,"children":806},{"className":805},[],[807],{"type":335,"value":808},"renameKeys",{"type":335,"value":498},{"type":330,"tag":338,"props":811,"children":813},{"className":812},[],[814],{"type":335,"value":815},"deepMerge",{"type":335,"value":498},{"type":330,"tag":338,"props":818,"children":820},{"className":819},[],[821],{"type":335,"value":822},"flatten",{"type":335,"value":498},{"type":330,"tag":338,"props":825,"children":827},{"className":826},[],[828],{"type":335,"value":829},"unflatten",{"type":335,"value":498},{"type":330,"tag":338,"props":832,"children":834},{"className":833},[],[835],{"type":335,"value":836},"groupBy",{"type":335,"value":498},{"type":330,"tag":338,"props":839,"children":841},{"className":840},[],[842],{"type":335,"value":843},"keyBy",{"type":335,"value":498},{"type":330,"tag":338,"props":846,"children":848},{"className":847},[],[849],{"type":335,"value":850},"uniqBy",{"type":335,"value":498},{"type":330,"tag":338,"props":853,"children":855},{"className":854},[],[856],{"type":335,"value":857},"sortBy",{"type":335,"value":498},{"type":330,"tag":338,"props":860,"children":862},{"className":861},[],[863],{"type":335,"value":864},"chunk",{"type":330,"tag":742,"props":866,"children":867},{},[868,877],{"type":330,"tag":764,"props":869,"children":870},{},[871],{"type":330,"tag":338,"props":872,"children":874},{"className":873},[],[875],{"type":335,"value":876},"jmespath",{"type":330,"tag":764,"props":878,"children":879},{},[880],{"type":330,"tag":338,"props":881,"children":883},{"className":882},[],[884],{"type":335,"value":885},"search(expression, value)",{"type":330,"tag":742,"props":887,"children":888},{},[889,898],{"type":330,"tag":764,"props":890,"children":891},{},[892],{"type":330,"tag":338,"props":893,"children":895},{"className":894},[],[896],{"type":335,"value":897},"schema",{"type":330,"tag":764,"props":899,"children":900},{},[901,907,908],{"type":330,"tag":338,"props":902,"children":904},{"className":903},[],[905],{"type":335,"value":906},"validate(schema, value)",{"type":335,"value":498},{"type":330,"tag":338,"props":909,"children":911},{"className":910},[],[912],{"type":335,"value":913},"assert(schema, value)",{"type":330,"tag":742,"props":915,"children":916},{},[917,926],{"type":330,"tag":764,"props":918,"children":919},{},[920],{"type":330,"tag":338,"props":921,"children":923},{"className":922},[],[924],{"type":335,"value":925},"url",{"type":330,"tag":764,"props":927,"children":928},{},[929,934,935,941,942,948,949,955,956],{"type":330,"tag":338,"props":930,"children":932},{"className":931},[],[933],{"type":335,"value":451},{"type":335,"value":498},{"type":330,"tag":338,"props":936,"children":938},{"className":937},[],[939],{"type":335,"value":940},"build",{"type":335,"value":498},{"type":330,"tag":338,"props":943,"children":945},{"className":944},[],[946],{"type":335,"value":947},"encodeQuery",{"type":335,"value":498},{"type":330,"tag":338,"props":950,"children":952},{"className":951},[],[953],{"type":335,"value":954},"decodeQuery",{"type":335,"value":498},{"type":330,"tag":338,"props":957,"children":959},{"className":958},[],[960],{"type":335,"value":961},"encodeForm",{"type":330,"tag":742,"props":963,"children":964},{},[965,974],{"type":330,"tag":764,"props":966,"children":967},{},[968],{"type":330,"tag":338,"props":969,"children":971},{"className":970},[],[972],{"type":335,"value":973},"csv",{"type":330,"tag":764,"props":975,"children":976},{},[977,982,983],{"type":330,"tag":338,"props":978,"children":980},{"className":979},[],[981],{"type":335,"value":451},{"type":335,"value":498},{"type":330,"tag":338,"props":984,"children":986},{"className":985},[],[987],{"type":335,"value":988},"stringify",{"type":330,"tag":742,"props":990,"children":991},{},[992,1001],{"type":330,"tag":764,"props":993,"children":994},{},[995],{"type":330,"tag":338,"props":996,"children":998},{"className":997},[],[999],{"type":335,"value":1000},"xml",{"type":330,"tag":764,"props":1002,"children":1003},{},[1004,1009,1010],{"type":330,"tag":338,"props":1005,"children":1007},{"className":1006},[],[1008],{"type":335,"value":451},{"type":335,"value":498},{"type":330,"tag":338,"props":1011,"children":1013},{"className":1012},[],[1014],{"type":335,"value":988},{"type":330,"tag":742,"props":1016,"children":1017},{},[1018,1027],{"type":330,"tag":764,"props":1019,"children":1020},{},[1021],{"type":330,"tag":338,"props":1022,"children":1024},{"className":1023},[],[1025],{"type":335,"value":1026},"yaml",{"type":330,"tag":764,"props":1028,"children":1029},{},[1030,1035,1036],{"type":330,"tag":338,"props":1031,"children":1033},{"className":1032},[],[1034],{"type":335,"value":451},{"type":335,"value":498},{"type":330,"tag":338,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":335,"value":988},{"type":330,"tag":742,"props":1042,"children":1043},{},[1044,1053],{"type":330,"tag":764,"props":1045,"children":1046},{},[1047],{"type":330,"tag":338,"props":1048,"children":1050},{"className":1049},[],[1051],{"type":335,"value":1052},"id",{"type":330,"tag":764,"props":1054,"children":1055},{},[1056,1062,1063],{"type":330,"tag":338,"props":1057,"children":1059},{"className":1058},[],[1060],{"type":335,"value":1061},"uuid",{"type":335,"value":498},{"type":330,"tag":338,"props":1064,"children":1066},{"className":1065},[],[1067],{"type":335,"value":1068},"ulid",{"type":330,"tag":742,"props":1070,"children":1071},{},[1072,1081],{"type":330,"tag":764,"props":1073,"children":1074},{},[1075],{"type":330,"tag":338,"props":1076,"children":1078},{"className":1077},[],[1079],{"type":335,"value":1080},"jwt",{"type":330,"tag":764,"props":1082,"children":1083},{},[1084,1090,1091,1097,1098],{"type":330,"tag":338,"props":1085,"children":1087},{"className":1086},[],[1088],{"type":335,"value":1089},"sign",{"type":335,"value":498},{"type":330,"tag":338,"props":1092,"children":1094},{"className":1093},[],[1095],{"type":335,"value":1096},"verify",{"type":335,"value":498},{"type":330,"tag":338,"props":1099,"children":1101},{"className":1100},[],[1102],{"type":335,"value":619},{"type":330,"tag":742,"props":1104,"children":1105},{},[1106,1115],{"type":330,"tag":764,"props":1107,"children":1108},{},[1109],{"type":330,"tag":338,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":335,"value":1114},"secure",{"type":330,"tag":764,"props":1116,"children":1117},{},[1118,1124,1125,1131,1132,1138,1139],{"type":330,"tag":338,"props":1119,"children":1121},{"className":1120},[],[1122],{"type":335,"value":1123},"equal",{"type":335,"value":498},{"type":330,"tag":338,"props":1126,"children":1128},{"className":1127},[],[1129],{"type":335,"value":1130},"verifyHMAC",{"type":335,"value":498},{"type":330,"tag":338,"props":1133,"children":1135},{"className":1134},[],[1136],{"type":335,"value":1137},"base64urlEncode",{"type":335,"value":498},{"type":330,"tag":338,"props":1140,"children":1142},{"className":1141},[],[1143],{"type":335,"value":1144},"base64urlDecode",{"type":330,"tag":742,"props":1146,"children":1147},{},[1148,1156],{"type":330,"tag":764,"props":1149,"children":1150},{},[1151],{"type":330,"tag":338,"props":1152,"children":1154},{"className":1153},[],[1155],{"type":335,"value":351},{"type":330,"tag":764,"props":1157,"children":1158},{},[1159],{"type":330,"tag":338,"props":1160,"children":1162},{"className":1161},[],[1163],{"type":335,"value":1164},"render",{"type":330,"tag":742,"props":1166,"children":1167},{},[1168,1177],{"type":330,"tag":764,"props":1169,"children":1170},{},[1171],{"type":330,"tag":338,"props":1172,"children":1174},{"className":1173},[],[1175],{"type":335,"value":1176},"time",{"type":330,"tag":764,"props":1178,"children":1179},{},[1180,1186,1187,1193,1194,1200,1201,1207,1208,1214,1215],{"type":330,"tag":338,"props":1181,"children":1183},{"className":1182},[],[1184],{"type":335,"value":1185},"parseISO",{"type":335,"value":498},{"type":330,"tag":338,"props":1188,"children":1190},{"className":1189},[],[1191],{"type":335,"value":1192},"formatISO",{"type":335,"value":498},{"type":330,"tag":338,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":335,"value":1199},"add",{"type":335,"value":498},{"type":330,"tag":338,"props":1202,"children":1204},{"className":1203},[],[1205],{"type":335,"value":1206},"subtract",{"type":335,"value":498},{"type":330,"tag":338,"props":1209,"children":1211},{"className":1210},[],[1212],{"type":335,"value":1213},"startOf",{"type":335,"value":498},{"type":330,"tag":338,"props":1216,"children":1218},{"className":1217},[],[1219],{"type":335,"value":1220},"endOf",{"type":330,"tag":742,"props":1222,"children":1223},{},[1224,1233],{"type":330,"tag":764,"props":1225,"children":1226},{},[1227],{"type":330,"tag":338,"props":1228,"children":1230},{"className":1229},[],[1231],{"type":335,"value":1232},"html",{"type":330,"tag":764,"props":1234,"children":1235},{},[1236,1242,1243,1249,1250],{"type":330,"tag":338,"props":1237,"children":1239},{"className":1238},[],[1240],{"type":335,"value":1241},"sanitize",{"type":335,"value":498},{"type":330,"tag":338,"props":1244,"children":1246},{"className":1245},[],[1247],{"type":335,"value":1248},"toText",{"type":335,"value":498},{"type":330,"tag":338,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":335,"value":1255},"toMarkdown",{"type":330,"tag":742,"props":1257,"children":1258},{},[1259,1268],{"type":330,"tag":764,"props":1260,"children":1261},{},[1262],{"type":330,"tag":338,"props":1263,"children":1265},{"className":1264},[],[1266],{"type":335,"value":1267},"slack",{"type":330,"tag":764,"props":1269,"children":1270},{},[1271,1277,1278],{"type":330,"tag":338,"props":1272,"children":1274},{"className":1273},[],[1275],{"type":335,"value":1276},"message",{"type":335,"value":498},{"type":330,"tag":338,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":335,"value":1283},"blocks",{"type":330,"tag":742,"props":1285,"children":1286},{},[1287,1296],{"type":330,"tag":764,"props":1288,"children":1289},{},[1290],{"type":330,"tag":338,"props":1291,"children":1293},{"className":1292},[],[1294],{"type":335,"value":1295},"discord",{"type":330,"tag":764,"props":1297,"children":1298},{},[1299],{"type":330,"tag":338,"props":1300,"children":1302},{"className":1301},[],[1303],{"type":335,"value":1304},"embed",{"type":330,"tag":742,"props":1306,"children":1307},{},[1308,1317],{"type":330,"tag":764,"props":1309,"children":1310},{},[1311],{"type":330,"tag":338,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":335,"value":1316},"telegram",{"type":330,"tag":764,"props":1318,"children":1319},{},[1320,1325,1326],{"type":330,"tag":338,"props":1321,"children":1323},{"className":1322},[],[1324],{"type":335,"value":1276},{"type":335,"value":498},{"type":330,"tag":338,"props":1327,"children":1329},{"className":1328},[],[1330],{"type":335,"value":1331},"answerCallback",{"type":330,"tag":742,"props":1333,"children":1334},{},[1335,1344],{"type":330,"tag":764,"props":1336,"children":1337},{},[1338],{"type":330,"tag":338,"props":1339,"children":1341},{"className":1340},[],[1342],{"type":335,"value":1343},"notion",{"type":330,"tag":764,"props":1345,"children":1346},{},[1347],{"type":330,"tag":338,"props":1348,"children":1350},{"className":1349},[],[1351],{"type":335,"value":1352},"properties",{"type":330,"tag":742,"props":1354,"children":1355},{},[1356,1365],{"type":330,"tag":764,"props":1357,"children":1358},{},[1359],{"type":330,"tag":338,"props":1360,"children":1362},{"className":1361},[],[1363],{"type":335,"value":1364},"airtable",{"type":330,"tag":764,"props":1366,"children":1367},{},[1368],{"type":330,"tag":338,"props":1369,"children":1371},{"className":1370},[],[1372],{"type":335,"value":1373},"fields",{"type":330,"tag":742,"props":1375,"children":1376},{},[1377,1386],{"type":330,"tag":764,"props":1378,"children":1379},{},[1380],{"type":330,"tag":338,"props":1381,"children":1383},{"className":1382},[],[1384],{"type":335,"value":1385},"sheets",{"type":330,"tag":764,"props":1387,"children":1388},{},[1389],{"type":330,"tag":338,"props":1390,"children":1392},{"className":1391},[],[1393],{"type":335,"value":1394},"row",{"type":330,"tag":742,"props":1396,"children":1397},{},[1398,1407],{"type":330,"tag":764,"props":1399,"children":1400},{},[1401],{"type":330,"tag":338,"props":1402,"children":1404},{"className":1403},[],[1405],{"type":335,"value":1406},"supabase",{"type":330,"tag":764,"props":1408,"children":1409},{},[1410,1416,1417],{"type":330,"tag":338,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":335,"value":1415},"insert",{"type":335,"value":498},{"type":330,"tag":338,"props":1418,"children":1420},{"className":1419},[],[1421],{"type":335,"value":1422},"upsert",{"type":330,"tag":331,"props":1424,"children":1425},{},[1426,1428,1434],{"type":335,"value":1427},"The provider helpers build destination-ready payloads and request descriptors.\nThey do not perform writes. Use the result with a configured output so Webhook\nRelay keeps delivery retries, logs, throttling and response functions in the\nnormal path. See ",{"type":330,"tag":1429,"props":1430,"children":1431},"a",{"href":277},[1432],{"type":335,"value":1433},"provider-aware helper examples",{"type":335,"value":1435},"\nfor Webhook Relay AI, OpenAI, Gemini, Anthropic, Slack, Discord, Telegram, Notion, Airtable,\nGoogle Sheets and Supabase.",{"type":330,"tag":331,"props":1437,"children":1438},{},[1439,1445],{"type":330,"tag":338,"props":1440,"children":1442},{"className":1441},[],[1443],{"type":335,"value":1444},"ai.generate()",{"type":335,"value":1446}," is a connection-bound helper for bounded synchronous\nenrichment. It supports credential-free Webhook Relay AI plus OpenAI, Gemini,\nAnthropic and custom Chat Completions APIs; customer-provider API keys stay\noutside function source and runtime values.",{"type":330,"tag":331,"props":1448,"children":1449},{},[1450,1452,1458,1459,1465,1466,1472,1473,1478,1479,1484,1485,1491,1493,1499,1501,1506,1508,1513],{"type":335,"value":1451},"The existing runtime modules (",{"type":330,"tag":338,"props":1453,"children":1455},{"className":1454},[],[1456],{"type":335,"value":1457},"http",{"type":335,"value":498},{"type":330,"tag":338,"props":1460,"children":1462},{"className":1461},[],[1463],{"type":335,"value":1464},"json",{"type":335,"value":498},{"type":330,"tag":338,"props":1467,"children":1469},{"className":1468},[],[1470],{"type":335,"value":1471},"crypto",{"type":335,"value":498},{"type":330,"tag":338,"props":1474,"children":1476},{"className":1475},[],[1477],{"type":335,"value":1176},{"type":335,"value":498},{"type":330,"tag":338,"props":1480,"children":1482},{"className":1481},[],[1483],{"type":335,"value":1080},{"type":335,"value":498},{"type":330,"tag":338,"props":1486,"children":1488},{"className":1487},[],[1489],{"type":335,"value":1490},"bigquery",{"type":335,"value":1492}," and ",{"type":330,"tag":338,"props":1494,"children":1496},{"className":1495},[],[1497],{"type":335,"value":1498},"mailgun",{"type":335,"value":1500},", where supported) remain available and can also be imported with ",{"type":330,"tag":338,"props":1502,"children":1504},{"className":1503},[],[1505],{"type":335,"value":343},{"type":335,"value":1507},". The full generated API reference — every method with parameters, returns and tested examples in both languages — is available in the function editor's autocomplete and via the ",{"type":330,"tag":1429,"props":1509,"children":1510},{"href":62},[1511],{"type":335,"value":1512},"MCP server",{"type":335,"value":446},{"type":330,"tag":727,"props":1515,"children":1517},{"id":1516},"reading-and-reshaping-data",[1518],{"type":335,"value":1519},"Reading and reshaping data",{"type":330,"tag":331,"props":1521,"children":1522},{},[1523,1525,1530,1532,1538,1540,1546,1548,1553,1554,1559,1560,1565],{"type":335,"value":1524},"The ",{"type":330,"tag":338,"props":1526,"children":1528},{"className":1527},[],[1529],{"type":335,"value":772},{"type":335,"value":1531}," module works with dotted paths and zero-based array indexes, such as ",{"type":330,"tag":338,"props":1533,"children":1535},{"className":1534},[],[1536],{"type":335,"value":1537},"customer.address.city",{"type":335,"value":1539}," or ",{"type":330,"tag":338,"props":1541,"children":1543},{"className":1542},[],[1544],{"type":335,"value":1545},"items[0].sku",{"type":335,"value":1547},". Methods that write (",{"type":330,"tag":338,"props":1549,"children":1551},{"className":1550},[],[1552],{"type":335,"value":787},{"type":335,"value":498},{"type":330,"tag":338,"props":1555,"children":1557},{"className":1556},[],[1558],{"type":335,"value":801},{"type":335,"value":498},{"type":330,"tag":338,"props":1561,"children":1563},{"className":1562},[],[1564],{"type":335,"value":815},{"type":335,"value":1566}," and the array helpers) return new values and never mutate the input:",{"type":330,"tag":347,"props":1568,"children":1569},{},[1570,1839],{"type":330,"tag":351,"props":1571,"children":1572},{"v-slot:javascript":318},[1573],{"type":330,"tag":355,"props":1574,"children":1576},{"className":357,"code":1575,"language":359,"meta":318,"style":318},"const data = require(\"data\")\n\nconst event = JSON.parse(r.body)\n\n// pick only the fields the destination needs\nconst summary = data.pick(event, [\"id\", \"type\", \"customer.email\"])\n\n// group line items by SKU\nconst bySku = data.groupBy(data.get(event, \"items\", []), \"sku\")\n\nr.setBody(JSON.stringify({ summary: summary, by_sku: bySku }))\n",[1577],{"type":330,"tag":338,"props":1578,"children":1579},{"__ignoreMap":318},[1580,1611,1618,1649,1656,1665,1722,1729,1738,1795,1803],{"type":330,"tag":365,"props":1581,"children":1582},{"class":367,"line":368},[1583,1587,1591,1595,1599,1603,1607],{"type":330,"tag":365,"props":1584,"children":1585},{"style":372},[1586],{"type":335,"value":375},{"type":330,"tag":365,"props":1588,"children":1589},{"style":378},[1590],{"type":335,"value":381},{"type":330,"tag":365,"props":1592,"children":1593},{"style":372},[1594],{"type":335,"value":386},{"type":330,"tag":365,"props":1596,"children":1597},{"style":389},[1598],{"type":335,"value":392},{"type":330,"tag":365,"props":1600,"children":1601},{"style":395},[1602],{"type":335,"value":398},{"type":330,"tag":365,"props":1604,"children":1605},{"style":401},[1606],{"type":335,"value":404},{"type":330,"tag":365,"props":1608,"children":1609},{"style":395},[1610],{"type":335,"value":409},{"type":330,"tag":365,"props":1612,"children":1613},{"class":367,"line":412},[1614],{"type":330,"tag":365,"props":1615,"children":1616},{"emptyLinePlaceholder":416},[1617],{"type":335,"value":419},{"type":330,"tag":365,"props":1619,"children":1620},{"class":367,"line":422},[1621,1625,1629,1633,1637,1641,1645],{"type":330,"tag":365,"props":1622,"children":1623},{"style":372},[1624],{"type":335,"value":375},{"type":330,"tag":365,"props":1626,"children":1627},{"style":378},[1628],{"type":335,"value":432},{"type":330,"tag":365,"props":1630,"children":1631},{"style":372},[1632],{"type":335,"value":386},{"type":330,"tag":365,"props":1634,"children":1635},{"style":378},[1636],{"type":335,"value":441},{"type":330,"tag":365,"props":1638,"children":1639},{"style":395},[1640],{"type":335,"value":446},{"type":330,"tag":365,"props":1642,"children":1643},{"style":389},[1644],{"type":335,"value":451},{"type":330,"tag":365,"props":1646,"children":1647},{"style":395},[1648],{"type":335,"value":456},{"type":330,"tag":365,"props":1650,"children":1651},{"class":367,"line":459},[1652],{"type":330,"tag":365,"props":1653,"children":1654},{"emptyLinePlaceholder":416},[1655],{"type":335,"value":419},{"type":330,"tag":365,"props":1657,"children":1658},{"class":367,"line":636},[1659],{"type":330,"tag":365,"props":1660,"children":1662},{"style":1661},"--shiki-default:#6A737D",[1663],{"type":335,"value":1664},"// pick only the fields the destination needs\n",{"type":330,"tag":365,"props":1666,"children":1667},{"class":367,"line":670},[1668,1672,1677,1681,1685,1689,1694,1699,1703,1708,1712,1717],{"type":330,"tag":365,"props":1669,"children":1670},{"style":372},[1671],{"type":335,"value":375},{"type":330,"tag":365,"props":1673,"children":1674},{"style":378},[1675],{"type":335,"value":1676}," summary",{"type":330,"tag":365,"props":1678,"children":1679},{"style":372},[1680],{"type":335,"value":386},{"type":330,"tag":365,"props":1682,"children":1683},{"style":395},[1684],{"type":335,"value":478},{"type":330,"tag":365,"props":1686,"children":1687},{"style":389},[1688],{"type":335,"value":794},{"type":330,"tag":365,"props":1690,"children":1691},{"style":395},[1692],{"type":335,"value":1693},"(event, [",{"type":330,"tag":365,"props":1695,"children":1696},{"style":401},[1697],{"type":335,"value":1698},"\"id\"",{"type":330,"tag":365,"props":1700,"children":1701},{"style":395},[1702],{"type":335,"value":498},{"type":330,"tag":365,"props":1704,"children":1705},{"style":401},[1706],{"type":335,"value":1707},"\"type\"",{"type":330,"tag":365,"props":1709,"children":1710},{"style":395},[1711],{"type":335,"value":498},{"type":330,"tag":365,"props":1713,"children":1714},{"style":401},[1715],{"type":335,"value":1716},"\"customer.email\"",{"type":330,"tag":365,"props":1718,"children":1719},{"style":395},[1720],{"type":335,"value":1721},"])\n",{"type":330,"tag":365,"props":1723,"children":1724},{"class":367,"line":678},[1725],{"type":330,"tag":365,"props":1726,"children":1727},{"emptyLinePlaceholder":416},[1728],{"type":335,"value":419},{"type":330,"tag":365,"props":1730,"children":1732},{"class":367,"line":1731},8,[1733],{"type":330,"tag":365,"props":1734,"children":1735},{"style":1661},[1736],{"type":335,"value":1737},"// group line items by SKU\n",{"type":330,"tag":365,"props":1739,"children":1741},{"class":367,"line":1740},9,[1742,1746,1751,1755,1759,1763,1768,1772,1776,1781,1786,1791],{"type":330,"tag":365,"props":1743,"children":1744},{"style":372},[1745],{"type":335,"value":375},{"type":330,"tag":365,"props":1747,"children":1748},{"style":378},[1749],{"type":335,"value":1750}," bySku",{"type":330,"tag":365,"props":1752,"children":1753},{"style":372},[1754],{"type":335,"value":386},{"type":330,"tag":365,"props":1756,"children":1757},{"style":395},[1758],{"type":335,"value":478},{"type":330,"tag":365,"props":1760,"children":1761},{"style":389},[1762],{"type":335,"value":836},{"type":330,"tag":365,"props":1764,"children":1765},{"style":395},[1766],{"type":335,"value":1767},"(data.",{"type":330,"tag":365,"props":1769,"children":1770},{"style":389},[1771],{"type":335,"value":483},{"type":330,"tag":365,"props":1773,"children":1774},{"style":395},[1775],{"type":335,"value":488},{"type":330,"tag":365,"props":1777,"children":1778},{"style":401},[1779],{"type":335,"value":1780},"\"items\"",{"type":330,"tag":365,"props":1782,"children":1783},{"style":395},[1784],{"type":335,"value":1785},", []), ",{"type":330,"tag":365,"props":1787,"children":1788},{"style":401},[1789],{"type":335,"value":1790},"\"sku\"",{"type":330,"tag":365,"props":1792,"children":1793},{"style":395},[1794],{"type":335,"value":409},{"type":330,"tag":365,"props":1796,"children":1798},{"class":367,"line":1797},10,[1799],{"type":330,"tag":365,"props":1800,"children":1801},{"emptyLinePlaceholder":416},[1802],{"type":335,"value":419},{"type":330,"tag":365,"props":1804,"children":1806},{"class":367,"line":1805},11,[1807,1812,1817,1821,1826,1830,1834],{"type":330,"tag":365,"props":1808,"children":1809},{"style":395},[1810],{"type":335,"value":1811},"r.",{"type":330,"tag":365,"props":1813,"children":1814},{"style":389},[1815],{"type":335,"value":1816},"setBody",{"type":330,"tag":365,"props":1818,"children":1819},{"style":395},[1820],{"type":335,"value":398},{"type":330,"tag":365,"props":1822,"children":1823},{"style":378},[1824],{"type":335,"value":1825},"JSON",{"type":330,"tag":365,"props":1827,"children":1828},{"style":395},[1829],{"type":335,"value":446},{"type":330,"tag":365,"props":1831,"children":1832},{"style":389},[1833],{"type":335,"value":988},{"type":330,"tag":365,"props":1835,"children":1836},{"style":395},[1837],{"type":335,"value":1838},"({ summary: summary, by_sku: bySku }))\n",{"type":330,"tag":351,"props":1840,"children":1841},{"v-slot:lua":318},[1842],{"type":330,"tag":355,"props":1843,"children":1845},{"className":513,"code":1844,"language":515,"meta":318,"style":318},"local json = require(\"json\")\nlocal data = require(\"data\")\n\nlocal event, err = json.decode(r.RequestBody)\nif err then error(err) end\n\n-- pick only the fields the destination needs\nlocal summary = data.pick(event, {\"id\", \"type\", \"customer.email\"})\n\n-- group line items by SKU\nlocal by_sku = data.groupBy(data.get(event, \"items\", {}), \"sku\")\n\nlocal encoded, err = json.encode({summary = summary, by_sku = by_sku})\nif err then error(err) end\n\nr:SetRequestBody(encoded)\n",[1846],{"type":330,"tag":338,"props":1847,"children":1848},{"__ignoreMap":318},[1849,1880,1911,1918,1953,1980,1987,1995,2049,2056,2064,2117,2125,2174,2202,2210],{"type":330,"tag":365,"props":1850,"children":1851},{"class":367,"line":368},[1852,1856,1860,1864,1868,1872,1876],{"type":330,"tag":365,"props":1853,"children":1854},{"style":372},[1855],{"type":335,"value":527},{"type":330,"tag":365,"props":1857,"children":1858},{"style":395},[1859],{"type":335,"value":532},{"type":330,"tag":365,"props":1861,"children":1862},{"style":372},[1863],{"type":335,"value":537},{"type":330,"tag":365,"props":1865,"children":1866},{"style":378},[1867],{"type":335,"value":392},{"type":330,"tag":365,"props":1869,"children":1870},{"style":395},[1871],{"type":335,"value":398},{"type":330,"tag":365,"props":1873,"children":1874},{"style":401},[1875],{"type":335,"value":550},{"type":330,"tag":365,"props":1877,"children":1878},{"style":395},[1879],{"type":335,"value":409},{"type":330,"tag":365,"props":1881,"children":1882},{"class":367,"line":412},[1883,1887,1891,1895,1899,1903,1907],{"type":330,"tag":365,"props":1884,"children":1885},{"style":372},[1886],{"type":335,"value":527},{"type":330,"tag":365,"props":1888,"children":1889},{"style":395},[1890],{"type":335,"value":566},{"type":330,"tag":365,"props":1892,"children":1893},{"style":372},[1894],{"type":335,"value":537},{"type":330,"tag":365,"props":1896,"children":1897},{"style":378},[1898],{"type":335,"value":392},{"type":330,"tag":365,"props":1900,"children":1901},{"style":395},[1902],{"type":335,"value":398},{"type":330,"tag":365,"props":1904,"children":1905},{"style":401},[1906],{"type":335,"value":404},{"type":330,"tag":365,"props":1908,"children":1909},{"style":395},[1910],{"type":335,"value":409},{"type":330,"tag":365,"props":1912,"children":1913},{"class":367,"line":422},[1914],{"type":330,"tag":365,"props":1915,"children":1916},{"emptyLinePlaceholder":416},[1917],{"type":335,"value":419},{"type":330,"tag":365,"props":1919,"children":1920},{"class":367,"line":459},[1921,1925,1929,1933,1937,1941,1945,1949],{"type":330,"tag":365,"props":1922,"children":1923},{"style":372},[1924],{"type":335,"value":527},{"type":330,"tag":365,"props":1926,"children":1927},{"style":395},[1928],{"type":335,"value":605},{"type":330,"tag":365,"props":1930,"children":1931},{"style":372},[1932],{"type":335,"value":537},{"type":330,"tag":365,"props":1934,"children":1935},{"style":395},[1936],{"type":335,"value":614},{"type":330,"tag":365,"props":1938,"children":1939},{"style":378},[1940],{"type":335,"value":619},{"type":330,"tag":365,"props":1942,"children":1943},{"style":395},[1944],{"type":335,"value":624},{"type":330,"tag":365,"props":1946,"children":1947},{"style":389},[1948],{"type":335,"value":629},{"type":330,"tag":365,"props":1950,"children":1951},{"style":395},[1952],{"type":335,"value":409},{"type":330,"tag":365,"props":1954,"children":1955},{"class":367,"line":636},[1956,1960,1964,1968,1972,1976],{"type":330,"tag":365,"props":1957,"children":1958},{"style":372},[1959],{"type":335,"value":642},{"type":330,"tag":365,"props":1961,"children":1962},{"style":395},[1963],{"type":335,"value":647},{"type":330,"tag":365,"props":1965,"children":1966},{"style":372},[1967],{"type":335,"value":652},{"type":330,"tag":365,"props":1969,"children":1970},{"style":378},[1971],{"type":335,"value":657},{"type":330,"tag":365,"props":1973,"children":1974},{"style":395},[1975],{"type":335,"value":662},{"type":330,"tag":365,"props":1977,"children":1978},{"style":372},[1979],{"type":335,"value":667},{"type":330,"tag":365,"props":1981,"children":1982},{"class":367,"line":670},[1983],{"type":330,"tag":365,"props":1984,"children":1985},{"emptyLinePlaceholder":416},[1986],{"type":335,"value":419},{"type":330,"tag":365,"props":1988,"children":1989},{"class":367,"line":678},[1990],{"type":330,"tag":365,"props":1991,"children":1992},{"style":1661},[1993],{"type":335,"value":1994},"-- pick only the fields the destination needs\n",{"type":330,"tag":365,"props":1996,"children":1997},{"class":367,"line":1731},[1998,2002,2007,2011,2015,2019,2024,2028,2032,2036,2040,2044],{"type":330,"tag":365,"props":1999,"children":2000},{"style":372},[2001],{"type":335,"value":527},{"type":330,"tag":365,"props":2003,"children":2004},{"style":395},[2005],{"type":335,"value":2006}," summary ",{"type":330,"tag":365,"props":2008,"children":2009},{"style":372},[2010],{"type":335,"value":537},{"type":330,"tag":365,"props":2012,"children":2013},{"style":395},[2014],{"type":335,"value":478},{"type":330,"tag":365,"props":2016,"children":2017},{"style":378},[2018],{"type":335,"value":794},{"type":330,"tag":365,"props":2020,"children":2021},{"style":395},[2022],{"type":335,"value":2023},"(event, {",{"type":330,"tag":365,"props":2025,"children":2026},{"style":401},[2027],{"type":335,"value":1698},{"type":330,"tag":365,"props":2029,"children":2030},{"style":395},[2031],{"type":335,"value":498},{"type":330,"tag":365,"props":2033,"children":2034},{"style":401},[2035],{"type":335,"value":1707},{"type":330,"tag":365,"props":2037,"children":2038},{"style":395},[2039],{"type":335,"value":498},{"type":330,"tag":365,"props":2041,"children":2042},{"style":401},[2043],{"type":335,"value":1716},{"type":330,"tag":365,"props":2045,"children":2046},{"style":395},[2047],{"type":335,"value":2048},"})\n",{"type":330,"tag":365,"props":2050,"children":2051},{"class":367,"line":1740},[2052],{"type":330,"tag":365,"props":2053,"children":2054},{"emptyLinePlaceholder":416},[2055],{"type":335,"value":419},{"type":330,"tag":365,"props":2057,"children":2058},{"class":367,"line":1797},[2059],{"type":330,"tag":365,"props":2060,"children":2061},{"style":1661},[2062],{"type":335,"value":2063},"-- group line items by SKU\n",{"type":330,"tag":365,"props":2065,"children":2066},{"class":367,"line":1805},[2067,2071,2076,2080,2084,2088,2092,2096,2100,2104,2109,2113],{"type":330,"tag":365,"props":2068,"children":2069},{"style":372},[2070],{"type":335,"value":527},{"type":330,"tag":365,"props":2072,"children":2073},{"style":395},[2074],{"type":335,"value":2075}," by_sku ",{"type":330,"tag":365,"props":2077,"children":2078},{"style":372},[2079],{"type":335,"value":537},{"type":330,"tag":365,"props":2081,"children":2082},{"style":395},[2083],{"type":335,"value":478},{"type":330,"tag":365,"props":2085,"children":2086},{"style":378},[2087],{"type":335,"value":836},{"type":330,"tag":365,"props":2089,"children":2090},{"style":395},[2091],{"type":335,"value":1767},{"type":330,"tag":365,"props":2093,"children":2094},{"style":378},[2095],{"type":335,"value":483},{"type":330,"tag":365,"props":2097,"children":2098},{"style":395},[2099],{"type":335,"value":488},{"type":330,"tag":365,"props":2101,"children":2102},{"style":401},[2103],{"type":335,"value":1780},{"type":330,"tag":365,"props":2105,"children":2106},{"style":395},[2107],{"type":335,"value":2108},", {}), ",{"type":330,"tag":365,"props":2110,"children":2111},{"style":401},[2112],{"type":335,"value":1790},{"type":330,"tag":365,"props":2114,"children":2115},{"style":395},[2116],{"type":335,"value":409},{"type":330,"tag":365,"props":2118,"children":2120},{"class":367,"line":2119},12,[2121],{"type":330,"tag":365,"props":2122,"children":2123},{"emptyLinePlaceholder":416},[2124],{"type":335,"value":419},{"type":330,"tag":365,"props":2126,"children":2128},{"class":367,"line":2127},13,[2129,2133,2138,2142,2146,2151,2156,2160,2165,2169],{"type":330,"tag":365,"props":2130,"children":2131},{"style":372},[2132],{"type":335,"value":527},{"type":330,"tag":365,"props":2134,"children":2135},{"style":395},[2136],{"type":335,"value":2137}," encoded, err ",{"type":330,"tag":365,"props":2139,"children":2140},{"style":372},[2141],{"type":335,"value":537},{"type":330,"tag":365,"props":2143,"children":2144},{"style":395},[2145],{"type":335,"value":614},{"type":330,"tag":365,"props":2147,"children":2148},{"style":378},[2149],{"type":335,"value":2150},"encode",{"type":330,"tag":365,"props":2152,"children":2153},{"style":395},[2154],{"type":335,"value":2155},"({summary ",{"type":330,"tag":365,"props":2157,"children":2158},{"style":372},[2159],{"type":335,"value":537},{"type":330,"tag":365,"props":2161,"children":2162},{"style":395},[2163],{"type":335,"value":2164}," summary, by_sku ",{"type":330,"tag":365,"props":2166,"children":2167},{"style":372},[2168],{"type":335,"value":537},{"type":330,"tag":365,"props":2170,"children":2171},{"style":395},[2172],{"type":335,"value":2173}," by_sku})\n",{"type":330,"tag":365,"props":2175,"children":2177},{"class":367,"line":2176},14,[2178,2182,2186,2190,2194,2198],{"type":330,"tag":365,"props":2179,"children":2180},{"style":372},[2181],{"type":335,"value":642},{"type":330,"tag":365,"props":2183,"children":2184},{"style":395},[2185],{"type":335,"value":647},{"type":330,"tag":365,"props":2187,"children":2188},{"style":372},[2189],{"type":335,"value":652},{"type":330,"tag":365,"props":2191,"children":2192},{"style":378},[2193],{"type":335,"value":657},{"type":330,"tag":365,"props":2195,"children":2196},{"style":395},[2197],{"type":335,"value":662},{"type":330,"tag":365,"props":2199,"children":2200},{"style":372},[2201],{"type":335,"value":667},{"type":330,"tag":365,"props":2203,"children":2205},{"class":367,"line":2204},15,[2206],{"type":330,"tag":365,"props":2207,"children":2208},{"emptyLinePlaceholder":416},[2209],{"type":335,"value":419},{"type":330,"tag":365,"props":2211,"children":2213},{"class":367,"line":2212},16,[2214,2219,2224,2229],{"type":330,"tag":365,"props":2215,"children":2216},{"style":389},[2217],{"type":335,"value":2218},"r",{"type":330,"tag":365,"props":2220,"children":2221},{"style":395},[2222],{"type":335,"value":2223},":",{"type":330,"tag":365,"props":2225,"children":2226},{"style":378},[2227],{"type":335,"value":2228},"SetRequestBody",{"type":330,"tag":365,"props":2230,"children":2231},{"style":395},[2232],{"type":335,"value":2233},"(encoded)\n",{"type":330,"tag":331,"props":2235,"children":2236},{},[2237,2239,2245,2247,2255],{"type":335,"value":2238},"For more complex queries, ",{"type":330,"tag":338,"props":2240,"children":2242},{"className":2241},[],[2243],{"type":335,"value":2244},"jmespath.search",{"type":335,"value":2246}," evaluates a full ",{"type":330,"tag":1429,"props":2248,"children":2252},{"href":2249,"rel":2250},"https://jmespath.org/",[2251],"nofollow",[2253],{"type":335,"value":2254},"JMESPath",{"type":335,"value":2256}," expression against the payload:",{"type":330,"tag":347,"props":2258,"children":2259},{},[2260,2415],{"type":330,"tag":351,"props":2261,"children":2262},{"v-slot:javascript":318},[2263],{"type":330,"tag":355,"props":2264,"children":2266},{"className":357,"code":2265,"language":359,"meta":318,"style":318},"const jmespath = require(\"jmespath\")\n\nconst event = JSON.parse(r.body)\n\n// names of all completed orders over $100\nconst bigOrders = jmespath.search(\n  \"orders[?status == 'completed' && total > `100`].name\",\n  event\n)\n",[2267],{"type":330,"tag":338,"props":2268,"children":2269},{"__ignoreMap":318},[2270,2303,2310,2341,2348,2356,2387,2400,2408],{"type":330,"tag":365,"props":2271,"children":2272},{"class":367,"line":368},[2273,2277,2282,2286,2290,2294,2299],{"type":330,"tag":365,"props":2274,"children":2275},{"style":372},[2276],{"type":335,"value":375},{"type":330,"tag":365,"props":2278,"children":2279},{"style":378},[2280],{"type":335,"value":2281}," jmespath",{"type":330,"tag":365,"props":2283,"children":2284},{"style":372},[2285],{"type":335,"value":386},{"type":330,"tag":365,"props":2287,"children":2288},{"style":389},[2289],{"type":335,"value":392},{"type":330,"tag":365,"props":2291,"children":2292},{"style":395},[2293],{"type":335,"value":398},{"type":330,"tag":365,"props":2295,"children":2296},{"style":401},[2297],{"type":335,"value":2298},"\"jmespath\"",{"type":330,"tag":365,"props":2300,"children":2301},{"style":395},[2302],{"type":335,"value":409},{"type":330,"tag":365,"props":2304,"children":2305},{"class":367,"line":412},[2306],{"type":330,"tag":365,"props":2307,"children":2308},{"emptyLinePlaceholder":416},[2309],{"type":335,"value":419},{"type":330,"tag":365,"props":2311,"children":2312},{"class":367,"line":422},[2313,2317,2321,2325,2329,2333,2337],{"type":330,"tag":365,"props":2314,"children":2315},{"style":372},[2316],{"type":335,"value":375},{"type":330,"tag":365,"props":2318,"children":2319},{"style":378},[2320],{"type":335,"value":432},{"type":330,"tag":365,"props":2322,"children":2323},{"style":372},[2324],{"type":335,"value":386},{"type":330,"tag":365,"props":2326,"children":2327},{"style":378},[2328],{"type":335,"value":441},{"type":330,"tag":365,"props":2330,"children":2331},{"style":395},[2332],{"type":335,"value":446},{"type":330,"tag":365,"props":2334,"children":2335},{"style":389},[2336],{"type":335,"value":451},{"type":330,"tag":365,"props":2338,"children":2339},{"style":395},[2340],{"type":335,"value":456},{"type":330,"tag":365,"props":2342,"children":2343},{"class":367,"line":459},[2344],{"type":330,"tag":365,"props":2345,"children":2346},{"emptyLinePlaceholder":416},[2347],{"type":335,"value":419},{"type":330,"tag":365,"props":2349,"children":2350},{"class":367,"line":636},[2351],{"type":330,"tag":365,"props":2352,"children":2353},{"style":1661},[2354],{"type":335,"value":2355},"// names of all completed orders over $100\n",{"type":330,"tag":365,"props":2357,"children":2358},{"class":367,"line":670},[2359,2363,2368,2372,2377,2382],{"type":330,"tag":365,"props":2360,"children":2361},{"style":372},[2362],{"type":335,"value":375},{"type":330,"tag":365,"props":2364,"children":2365},{"style":378},[2366],{"type":335,"value":2367}," bigOrders",{"type":330,"tag":365,"props":2369,"children":2370},{"style":372},[2371],{"type":335,"value":386},{"type":330,"tag":365,"props":2373,"children":2374},{"style":395},[2375],{"type":335,"value":2376}," jmespath.",{"type":330,"tag":365,"props":2378,"children":2379},{"style":389},[2380],{"type":335,"value":2381},"search",{"type":330,"tag":365,"props":2383,"children":2384},{"style":395},[2385],{"type":335,"value":2386},"(\n",{"type":330,"tag":365,"props":2388,"children":2389},{"class":367,"line":678},[2390,2395],{"type":330,"tag":365,"props":2391,"children":2392},{"style":401},[2393],{"type":335,"value":2394},"  \"orders[?status == 'completed' && total > `100`].name\"",{"type":330,"tag":365,"props":2396,"children":2397},{"style":395},[2398],{"type":335,"value":2399},",\n",{"type":330,"tag":365,"props":2401,"children":2402},{"class":367,"line":1731},[2403],{"type":330,"tag":365,"props":2404,"children":2405},{"style":395},[2406],{"type":335,"value":2407},"  event\n",{"type":330,"tag":365,"props":2409,"children":2410},{"class":367,"line":1740},[2411],{"type":330,"tag":365,"props":2412,"children":2413},{"style":395},[2414],{"type":335,"value":409},{"type":330,"tag":351,"props":2416,"children":2417},{"v-slot:lua":318},[2418],{"type":330,"tag":355,"props":2419,"children":2421},{"className":513,"code":2420,"language":515,"meta":318,"style":318},"local json = require(\"json\")\nlocal jmespath = require(\"jmespath\")\n\nlocal event, err = json.decode(r.RequestBody)\nif err then error(err) end\n\n-- names of all completed orders over $100\nlocal big_orders = jmespath.search(\n  \"orders[?status == 'completed' && total > `100`].name\",\n  event\n)\n",[2422],{"type":330,"tag":338,"props":2423,"children":2424},{"__ignoreMap":318},[2425,2456,2488,2495,2530,2557,2564,2572,2600,2611,2618],{"type":330,"tag":365,"props":2426,"children":2427},{"class":367,"line":368},[2428,2432,2436,2440,2444,2448,2452],{"type":330,"tag":365,"props":2429,"children":2430},{"style":372},[2431],{"type":335,"value":527},{"type":330,"tag":365,"props":2433,"children":2434},{"style":395},[2435],{"type":335,"value":532},{"type":330,"tag":365,"props":2437,"children":2438},{"style":372},[2439],{"type":335,"value":537},{"type":330,"tag":365,"props":2441,"children":2442},{"style":378},[2443],{"type":335,"value":392},{"type":330,"tag":365,"props":2445,"children":2446},{"style":395},[2447],{"type":335,"value":398},{"type":330,"tag":365,"props":2449,"children":2450},{"style":401},[2451],{"type":335,"value":550},{"type":330,"tag":365,"props":2453,"children":2454},{"style":395},[2455],{"type":335,"value":409},{"type":330,"tag":365,"props":2457,"children":2458},{"class":367,"line":412},[2459,2463,2468,2472,2476,2480,2484],{"type":330,"tag":365,"props":2460,"children":2461},{"style":372},[2462],{"type":335,"value":527},{"type":330,"tag":365,"props":2464,"children":2465},{"style":395},[2466],{"type":335,"value":2467}," jmespath ",{"type":330,"tag":365,"props":2469,"children":2470},{"style":372},[2471],{"type":335,"value":537},{"type":330,"tag":365,"props":2473,"children":2474},{"style":378},[2475],{"type":335,"value":392},{"type":330,"tag":365,"props":2477,"children":2478},{"style":395},[2479],{"type":335,"value":398},{"type":330,"tag":365,"props":2481,"children":2482},{"style":401},[2483],{"type":335,"value":2298},{"type":330,"tag":365,"props":2485,"children":2486},{"style":395},[2487],{"type":335,"value":409},{"type":330,"tag":365,"props":2489,"children":2490},{"class":367,"line":422},[2491],{"type":330,"tag":365,"props":2492,"children":2493},{"emptyLinePlaceholder":416},[2494],{"type":335,"value":419},{"type":330,"tag":365,"props":2496,"children":2497},{"class":367,"line":459},[2498,2502,2506,2510,2514,2518,2522,2526],{"type":330,"tag":365,"props":2499,"children":2500},{"style":372},[2501],{"type":335,"value":527},{"type":330,"tag":365,"props":2503,"children":2504},{"style":395},[2505],{"type":335,"value":605},{"type":330,"tag":365,"props":2507,"children":2508},{"style":372},[2509],{"type":335,"value":537},{"type":330,"tag":365,"props":2511,"children":2512},{"style":395},[2513],{"type":335,"value":614},{"type":330,"tag":365,"props":2515,"children":2516},{"style":378},[2517],{"type":335,"value":619},{"type":330,"tag":365,"props":2519,"children":2520},{"style":395},[2521],{"type":335,"value":624},{"type":330,"tag":365,"props":2523,"children":2524},{"style":389},[2525],{"type":335,"value":629},{"type":330,"tag":365,"props":2527,"children":2528},{"style":395},[2529],{"type":335,"value":409},{"type":330,"tag":365,"props":2531,"children":2532},{"class":367,"line":636},[2533,2537,2541,2545,2549,2553],{"type":330,"tag":365,"props":2534,"children":2535},{"style":372},[2536],{"type":335,"value":642},{"type":330,"tag":365,"props":2538,"children":2539},{"style":395},[2540],{"type":335,"value":647},{"type":330,"tag":365,"props":2542,"children":2543},{"style":372},[2544],{"type":335,"value":652},{"type":330,"tag":365,"props":2546,"children":2547},{"style":378},[2548],{"type":335,"value":657},{"type":330,"tag":365,"props":2550,"children":2551},{"style":395},[2552],{"type":335,"value":662},{"type":330,"tag":365,"props":2554,"children":2555},{"style":372},[2556],{"type":335,"value":667},{"type":330,"tag":365,"props":2558,"children":2559},{"class":367,"line":670},[2560],{"type":330,"tag":365,"props":2561,"children":2562},{"emptyLinePlaceholder":416},[2563],{"type":335,"value":419},{"type":330,"tag":365,"props":2565,"children":2566},{"class":367,"line":678},[2567],{"type":330,"tag":365,"props":2568,"children":2569},{"style":1661},[2570],{"type":335,"value":2571},"-- names of all completed orders over $100\n",{"type":330,"tag":365,"props":2573,"children":2574},{"class":367,"line":1731},[2575,2579,2584,2588,2592,2596],{"type":330,"tag":365,"props":2576,"children":2577},{"style":372},[2578],{"type":335,"value":527},{"type":330,"tag":365,"props":2580,"children":2581},{"style":395},[2582],{"type":335,"value":2583}," big_orders ",{"type":330,"tag":365,"props":2585,"children":2586},{"style":372},[2587],{"type":335,"value":537},{"type":330,"tag":365,"props":2589,"children":2590},{"style":395},[2591],{"type":335,"value":2376},{"type":330,"tag":365,"props":2593,"children":2594},{"style":378},[2595],{"type":335,"value":2381},{"type":330,"tag":365,"props":2597,"children":2598},{"style":395},[2599],{"type":335,"value":2386},{"type":330,"tag":365,"props":2601,"children":2602},{"class":367,"line":1740},[2603,2607],{"type":330,"tag":365,"props":2604,"children":2605},{"style":401},[2606],{"type":335,"value":2394},{"type":330,"tag":365,"props":2608,"children":2609},{"style":395},[2610],{"type":335,"value":2399},{"type":330,"tag":365,"props":2612,"children":2613},{"class":367,"line":1797},[2614],{"type":330,"tag":365,"props":2615,"children":2616},{"style":395},[2617],{"type":335,"value":2407},{"type":330,"tag":365,"props":2619,"children":2620},{"class":367,"line":1805},[2621],{"type":330,"tag":365,"props":2622,"children":2623},{"style":395},[2624],{"type":335,"value":409},{"type":330,"tag":727,"props":2626,"children":2628},{"id":2627},"validating-payloads-with-json-schema",[2629],{"type":335,"value":2630},"Validating payloads with JSON Schema",{"type":330,"tag":331,"props":2632,"children":2633},{},[2634,2636,2642,2644,2650],{"type":335,"value":2635},"Reject malformed webhooks before they reach your destination. ",{"type":330,"tag":338,"props":2637,"children":2639},{"className":2638},[],[2640],{"type":335,"value":2641},"schema.validate",{"type":335,"value":2643}," returns a result you can inspect; ",{"type":330,"tag":338,"props":2645,"children":2647},{"className":2646},[],[2648],{"type":335,"value":2649},"schema.assert",{"type":335,"value":2651}," stops the function with an error when validation fails:",{"type":330,"tag":347,"props":2653,"children":2654},{},[2655,2992],{"type":330,"tag":351,"props":2656,"children":2657},{"v-slot:javascript":318},[2658],{"type":330,"tag":355,"props":2659,"children":2661},{"className":357,"code":2660,"language":359,"meta":318,"style":318},"const schema = require(\"schema\")\n\nconst event = JSON.parse(r.body)\n\nconst result = schema.validate({\n  type: \"object\",\n  required: [\"id\", \"email\"],\n  properties: {\n    id: { type: \"string\" },\n    email: { type: \"string\", format: \"email\" }\n  }\n}, event)\n\nif (!result.valid) {\n  r.setResponseStatus(400)\n  r.setResponseBody(\"invalid payload\")\n  r.stopForwarding()\n}\n",[2662],{"type":330,"tag":338,"props":2663,"children":2664},{"__ignoreMap":318},[2665,2698,2705,2736,2743,2774,2791,2817,2825,2843,2869,2877,2885,2892,2914,2940,2965,2983],{"type":330,"tag":365,"props":2666,"children":2667},{"class":367,"line":368},[2668,2672,2677,2681,2685,2689,2694],{"type":330,"tag":365,"props":2669,"children":2670},{"style":372},[2671],{"type":335,"value":375},{"type":330,"tag":365,"props":2673,"children":2674},{"style":378},[2675],{"type":335,"value":2676}," schema",{"type":330,"tag":365,"props":2678,"children":2679},{"style":372},[2680],{"type":335,"value":386},{"type":330,"tag":365,"props":2682,"children":2683},{"style":389},[2684],{"type":335,"value":392},{"type":330,"tag":365,"props":2686,"children":2687},{"style":395},[2688],{"type":335,"value":398},{"type":330,"tag":365,"props":2690,"children":2691},{"style":401},[2692],{"type":335,"value":2693},"\"schema\"",{"type":330,"tag":365,"props":2695,"children":2696},{"style":395},[2697],{"type":335,"value":409},{"type":330,"tag":365,"props":2699,"children":2700},{"class":367,"line":412},[2701],{"type":330,"tag":365,"props":2702,"children":2703},{"emptyLinePlaceholder":416},[2704],{"type":335,"value":419},{"type":330,"tag":365,"props":2706,"children":2707},{"class":367,"line":422},[2708,2712,2716,2720,2724,2728,2732],{"type":330,"tag":365,"props":2709,"children":2710},{"style":372},[2711],{"type":335,"value":375},{"type":330,"tag":365,"props":2713,"children":2714},{"style":378},[2715],{"type":335,"value":432},{"type":330,"tag":365,"props":2717,"children":2718},{"style":372},[2719],{"type":335,"value":386},{"type":330,"tag":365,"props":2721,"children":2722},{"style":378},[2723],{"type":335,"value":441},{"type":330,"tag":365,"props":2725,"children":2726},{"style":395},[2727],{"type":335,"value":446},{"type":330,"tag":365,"props":2729,"children":2730},{"style":389},[2731],{"type":335,"value":451},{"type":330,"tag":365,"props":2733,"children":2734},{"style":395},[2735],{"type":335,"value":456},{"type":330,"tag":365,"props":2737,"children":2738},{"class":367,"line":459},[2739],{"type":330,"tag":365,"props":2740,"children":2741},{"emptyLinePlaceholder":416},[2742],{"type":335,"value":419},{"type":330,"tag":365,"props":2744,"children":2745},{"class":367,"line":636},[2746,2750,2755,2759,2764,2769],{"type":330,"tag":365,"props":2747,"children":2748},{"style":372},[2749],{"type":335,"value":375},{"type":330,"tag":365,"props":2751,"children":2752},{"style":378},[2753],{"type":335,"value":2754}," result",{"type":330,"tag":365,"props":2756,"children":2757},{"style":372},[2758],{"type":335,"value":386},{"type":330,"tag":365,"props":2760,"children":2761},{"style":395},[2762],{"type":335,"value":2763}," schema.",{"type":330,"tag":365,"props":2765,"children":2766},{"style":389},[2767],{"type":335,"value":2768},"validate",{"type":330,"tag":365,"props":2770,"children":2771},{"style":395},[2772],{"type":335,"value":2773},"({\n",{"type":330,"tag":365,"props":2775,"children":2776},{"class":367,"line":670},[2777,2782,2787],{"type":330,"tag":365,"props":2778,"children":2779},{"style":395},[2780],{"type":335,"value":2781},"  type: ",{"type":330,"tag":365,"props":2783,"children":2784},{"style":401},[2785],{"type":335,"value":2786},"\"object\"",{"type":330,"tag":365,"props":2788,"children":2789},{"style":395},[2790],{"type":335,"value":2399},{"type":330,"tag":365,"props":2792,"children":2793},{"class":367,"line":678},[2794,2799,2803,2807,2812],{"type":330,"tag":365,"props":2795,"children":2796},{"style":395},[2797],{"type":335,"value":2798},"  required: [",{"type":330,"tag":365,"props":2800,"children":2801},{"style":401},[2802],{"type":335,"value":1698},{"type":330,"tag":365,"props":2804,"children":2805},{"style":395},[2806],{"type":335,"value":498},{"type":330,"tag":365,"props":2808,"children":2809},{"style":401},[2810],{"type":335,"value":2811},"\"email\"",{"type":330,"tag":365,"props":2813,"children":2814},{"style":395},[2815],{"type":335,"value":2816},"],\n",{"type":330,"tag":365,"props":2818,"children":2819},{"class":367,"line":1731},[2820],{"type":330,"tag":365,"props":2821,"children":2822},{"style":395},[2823],{"type":335,"value":2824},"  properties: {\n",{"type":330,"tag":365,"props":2826,"children":2827},{"class":367,"line":1740},[2828,2833,2838],{"type":330,"tag":365,"props":2829,"children":2830},{"style":395},[2831],{"type":335,"value":2832},"    id: { type: ",{"type":330,"tag":365,"props":2834,"children":2835},{"style":401},[2836],{"type":335,"value":2837},"\"string\"",{"type":330,"tag":365,"props":2839,"children":2840},{"style":395},[2841],{"type":335,"value":2842}," },\n",{"type":330,"tag":365,"props":2844,"children":2845},{"class":367,"line":1797},[2846,2851,2855,2860,2864],{"type":330,"tag":365,"props":2847,"children":2848},{"style":395},[2849],{"type":335,"value":2850},"    email: { type: ",{"type":330,"tag":365,"props":2852,"children":2853},{"style":401},[2854],{"type":335,"value":2837},{"type":330,"tag":365,"props":2856,"children":2857},{"style":395},[2858],{"type":335,"value":2859},", format: ",{"type":330,"tag":365,"props":2861,"children":2862},{"style":401},[2863],{"type":335,"value":2811},{"type":330,"tag":365,"props":2865,"children":2866},{"style":395},[2867],{"type":335,"value":2868}," }\n",{"type":330,"tag":365,"props":2870,"children":2871},{"class":367,"line":1805},[2872],{"type":330,"tag":365,"props":2873,"children":2874},{"style":395},[2875],{"type":335,"value":2876},"  }\n",{"type":330,"tag":365,"props":2878,"children":2879},{"class":367,"line":2119},[2880],{"type":330,"tag":365,"props":2881,"children":2882},{"style":395},[2883],{"type":335,"value":2884},"}, event)\n",{"type":330,"tag":365,"props":2886,"children":2887},{"class":367,"line":2127},[2888],{"type":330,"tag":365,"props":2889,"children":2890},{"emptyLinePlaceholder":416},[2891],{"type":335,"value":419},{"type":330,"tag":365,"props":2893,"children":2894},{"class":367,"line":2176},[2895,2899,2904,2909],{"type":330,"tag":365,"props":2896,"children":2897},{"style":372},[2898],{"type":335,"value":642},{"type":330,"tag":365,"props":2900,"children":2901},{"style":395},[2902],{"type":335,"value":2903}," (",{"type":330,"tag":365,"props":2905,"children":2906},{"style":372},[2907],{"type":335,"value":2908},"!",{"type":330,"tag":365,"props":2910,"children":2911},{"style":395},[2912],{"type":335,"value":2913},"result.valid) {\n",{"type":330,"tag":365,"props":2915,"children":2916},{"class":367,"line":2204},[2917,2922,2927,2931,2936],{"type":330,"tag":365,"props":2918,"children":2919},{"style":395},[2920],{"type":335,"value":2921},"  r.",{"type":330,"tag":365,"props":2923,"children":2924},{"style":389},[2925],{"type":335,"value":2926},"setResponseStatus",{"type":330,"tag":365,"props":2928,"children":2929},{"style":395},[2930],{"type":335,"value":398},{"type":330,"tag":365,"props":2932,"children":2933},{"style":378},[2934],{"type":335,"value":2935},"400",{"type":330,"tag":365,"props":2937,"children":2938},{"style":395},[2939],{"type":335,"value":409},{"type":330,"tag":365,"props":2941,"children":2942},{"class":367,"line":2212},[2943,2947,2952,2956,2961],{"type":330,"tag":365,"props":2944,"children":2945},{"style":395},[2946],{"type":335,"value":2921},{"type":330,"tag":365,"props":2948,"children":2949},{"style":389},[2950],{"type":335,"value":2951},"setResponseBody",{"type":330,"tag":365,"props":2953,"children":2954},{"style":395},[2955],{"type":335,"value":398},{"type":330,"tag":365,"props":2957,"children":2958},{"style":401},[2959],{"type":335,"value":2960},"\"invalid payload\"",{"type":330,"tag":365,"props":2962,"children":2963},{"style":395},[2964],{"type":335,"value":409},{"type":330,"tag":365,"props":2966,"children":2968},{"class":367,"line":2967},17,[2969,2973,2978],{"type":330,"tag":365,"props":2970,"children":2971},{"style":395},[2972],{"type":335,"value":2921},{"type":330,"tag":365,"props":2974,"children":2975},{"style":389},[2976],{"type":335,"value":2977},"stopForwarding",{"type":330,"tag":365,"props":2979,"children":2980},{"style":395},[2981],{"type":335,"value":2982},"()\n",{"type":330,"tag":365,"props":2984,"children":2986},{"class":367,"line":2985},18,[2987],{"type":330,"tag":365,"props":2988,"children":2989},{"style":395},[2990],{"type":335,"value":2991},"}\n",{"type":330,"tag":351,"props":2993,"children":2994},{"v-slot:lua":318},[2995],{"type":330,"tag":355,"props":2996,"children":2998},{"className":513,"code":2997,"language":515,"meta":318,"style":318},"local json = require(\"json\")\nlocal schema = require(\"schema\")\n\nlocal event, err = json.decode(r.RequestBody)\nif err then error(err) end\n\nlocal result = schema.validate({\n  type = \"object\",\n  required = {\"id\", \"email\"},\n  properties = {\n    id = { type = \"string\" },\n    email = { type = \"string\", format = \"email\" }\n  }\n}, event)\n\nif not result.valid then\n  r:SetResponseStatusCode(400)\n  r:SetResponseBody(\"invalid payload\")\n  r:StopForwarding()\nend\n",[2999],{"type":330,"tag":338,"props":3000,"children":3001},{"__ignoreMap":318},[3002,3033,3065,3072,3107,3134,3141,3169,3190,3224,3241,3271,3314,3321,3328,3335,3362,3391,3419,3440],{"type":330,"tag":365,"props":3003,"children":3004},{"class":367,"line":368},[3005,3009,3013,3017,3021,3025,3029],{"type":330,"tag":365,"props":3006,"children":3007},{"style":372},[3008],{"type":335,"value":527},{"type":330,"tag":365,"props":3010,"children":3011},{"style":395},[3012],{"type":335,"value":532},{"type":330,"tag":365,"props":3014,"children":3015},{"style":372},[3016],{"type":335,"value":537},{"type":330,"tag":365,"props":3018,"children":3019},{"style":378},[3020],{"type":335,"value":392},{"type":330,"tag":365,"props":3022,"children":3023},{"style":395},[3024],{"type":335,"value":398},{"type":330,"tag":365,"props":3026,"children":3027},{"style":401},[3028],{"type":335,"value":550},{"type":330,"tag":365,"props":3030,"children":3031},{"style":395},[3032],{"type":335,"value":409},{"type":330,"tag":365,"props":3034,"children":3035},{"class":367,"line":412},[3036,3040,3045,3049,3053,3057,3061],{"type":330,"tag":365,"props":3037,"children":3038},{"style":372},[3039],{"type":335,"value":527},{"type":330,"tag":365,"props":3041,"children":3042},{"style":395},[3043],{"type":335,"value":3044}," schema ",{"type":330,"tag":365,"props":3046,"children":3047},{"style":372},[3048],{"type":335,"value":537},{"type":330,"tag":365,"props":3050,"children":3051},{"style":378},[3052],{"type":335,"value":392},{"type":330,"tag":365,"props":3054,"children":3055},{"style":395},[3056],{"type":335,"value":398},{"type":330,"tag":365,"props":3058,"children":3059},{"style":401},[3060],{"type":335,"value":2693},{"type":330,"tag":365,"props":3062,"children":3063},{"style":395},[3064],{"type":335,"value":409},{"type":330,"tag":365,"props":3066,"children":3067},{"class":367,"line":422},[3068],{"type":330,"tag":365,"props":3069,"children":3070},{"emptyLinePlaceholder":416},[3071],{"type":335,"value":419},{"type":330,"tag":365,"props":3073,"children":3074},{"class":367,"line":459},[3075,3079,3083,3087,3091,3095,3099,3103],{"type":330,"tag":365,"props":3076,"children":3077},{"style":372},[3078],{"type":335,"value":527},{"type":330,"tag":365,"props":3080,"children":3081},{"style":395},[3082],{"type":335,"value":605},{"type":330,"tag":365,"props":3084,"children":3085},{"style":372},[3086],{"type":335,"value":537},{"type":330,"tag":365,"props":3088,"children":3089},{"style":395},[3090],{"type":335,"value":614},{"type":330,"tag":365,"props":3092,"children":3093},{"style":378},[3094],{"type":335,"value":619},{"type":330,"tag":365,"props":3096,"children":3097},{"style":395},[3098],{"type":335,"value":624},{"type":330,"tag":365,"props":3100,"children":3101},{"style":389},[3102],{"type":335,"value":629},{"type":330,"tag":365,"props":3104,"children":3105},{"style":395},[3106],{"type":335,"value":409},{"type":330,"tag":365,"props":3108,"children":3109},{"class":367,"line":636},[3110,3114,3118,3122,3126,3130],{"type":330,"tag":365,"props":3111,"children":3112},{"style":372},[3113],{"type":335,"value":642},{"type":330,"tag":365,"props":3115,"children":3116},{"style":395},[3117],{"type":335,"value":647},{"type":330,"tag":365,"props":3119,"children":3120},{"style":372},[3121],{"type":335,"value":652},{"type":330,"tag":365,"props":3123,"children":3124},{"style":378},[3125],{"type":335,"value":657},{"type":330,"tag":365,"props":3127,"children":3128},{"style":395},[3129],{"type":335,"value":662},{"type":330,"tag":365,"props":3131,"children":3132},{"style":372},[3133],{"type":335,"value":667},{"type":330,"tag":365,"props":3135,"children":3136},{"class":367,"line":670},[3137],{"type":330,"tag":365,"props":3138,"children":3139},{"emptyLinePlaceholder":416},[3140],{"type":335,"value":419},{"type":330,"tag":365,"props":3142,"children":3143},{"class":367,"line":678},[3144,3148,3153,3157,3161,3165],{"type":330,"tag":365,"props":3145,"children":3146},{"style":372},[3147],{"type":335,"value":527},{"type":330,"tag":365,"props":3149,"children":3150},{"style":395},[3151],{"type":335,"value":3152}," result ",{"type":330,"tag":365,"props":3154,"children":3155},{"style":372},[3156],{"type":335,"value":537},{"type":330,"tag":365,"props":3158,"children":3159},{"style":395},[3160],{"type":335,"value":2763},{"type":330,"tag":365,"props":3162,"children":3163},{"style":378},[3164],{"type":335,"value":2768},{"type":330,"tag":365,"props":3166,"children":3167},{"style":395},[3168],{"type":335,"value":2773},{"type":330,"tag":365,"props":3170,"children":3171},{"class":367,"line":1731},[3172,3177,3181,3186],{"type":330,"tag":365,"props":3173,"children":3174},{"style":395},[3175],{"type":335,"value":3176},"  type ",{"type":330,"tag":365,"props":3178,"children":3179},{"style":372},[3180],{"type":335,"value":537},{"type":330,"tag":365,"props":3182,"children":3183},{"style":401},[3184],{"type":335,"value":3185}," \"object\"",{"type":330,"tag":365,"props":3187,"children":3188},{"style":395},[3189],{"type":335,"value":2399},{"type":330,"tag":365,"props":3191,"children":3192},{"class":367,"line":1740},[3193,3198,3202,3207,3211,3215,3219],{"type":330,"tag":365,"props":3194,"children":3195},{"style":395},[3196],{"type":335,"value":3197},"  required ",{"type":330,"tag":365,"props":3199,"children":3200},{"style":372},[3201],{"type":335,"value":537},{"type":330,"tag":365,"props":3203,"children":3204},{"style":395},[3205],{"type":335,"value":3206}," {",{"type":330,"tag":365,"props":3208,"children":3209},{"style":401},[3210],{"type":335,"value":1698},{"type":330,"tag":365,"props":3212,"children":3213},{"style":395},[3214],{"type":335,"value":498},{"type":330,"tag":365,"props":3216,"children":3217},{"style":401},[3218],{"type":335,"value":2811},{"type":330,"tag":365,"props":3220,"children":3221},{"style":395},[3222],{"type":335,"value":3223},"},\n",{"type":330,"tag":365,"props":3225,"children":3226},{"class":367,"line":1797},[3227,3232,3236],{"type":330,"tag":365,"props":3228,"children":3229},{"style":395},[3230],{"type":335,"value":3231},"  properties ",{"type":330,"tag":365,"props":3233,"children":3234},{"style":372},[3235],{"type":335,"value":537},{"type":330,"tag":365,"props":3237,"children":3238},{"style":395},[3239],{"type":335,"value":3240}," {\n",{"type":330,"tag":365,"props":3242,"children":3243},{"class":367,"line":1805},[3244,3249,3253,3258,3262,3267],{"type":330,"tag":365,"props":3245,"children":3246},{"style":395},[3247],{"type":335,"value":3248},"    id ",{"type":330,"tag":365,"props":3250,"children":3251},{"style":372},[3252],{"type":335,"value":537},{"type":330,"tag":365,"props":3254,"children":3255},{"style":395},[3256],{"type":335,"value":3257}," { type ",{"type":330,"tag":365,"props":3259,"children":3260},{"style":372},[3261],{"type":335,"value":537},{"type":330,"tag":365,"props":3263,"children":3264},{"style":401},[3265],{"type":335,"value":3266}," \"string\" ",{"type":330,"tag":365,"props":3268,"children":3269},{"style":395},[3270],{"type":335,"value":3223},{"type":330,"tag":365,"props":3272,"children":3273},{"class":367,"line":2119},[3274,3279,3283,3287,3291,3296,3301,3305,3310],{"type":330,"tag":365,"props":3275,"children":3276},{"style":395},[3277],{"type":335,"value":3278},"    email ",{"type":330,"tag":365,"props":3280,"children":3281},{"style":372},[3282],{"type":335,"value":537},{"type":330,"tag":365,"props":3284,"children":3285},{"style":395},[3286],{"type":335,"value":3257},{"type":330,"tag":365,"props":3288,"children":3289},{"style":372},[3290],{"type":335,"value":537},{"type":330,"tag":365,"props":3292,"children":3293},{"style":401},[3294],{"type":335,"value":3295}," \"string\"",{"type":330,"tag":365,"props":3297,"children":3298},{"style":395},[3299],{"type":335,"value":3300},", format ",{"type":330,"tag":365,"props":3302,"children":3303},{"style":372},[3304],{"type":335,"value":537},{"type":330,"tag":365,"props":3306,"children":3307},{"style":401},[3308],{"type":335,"value":3309}," \"email\" ",{"type":330,"tag":365,"props":3311,"children":3312},{"style":395},[3313],{"type":335,"value":2991},{"type":330,"tag":365,"props":3315,"children":3316},{"class":367,"line":2127},[3317],{"type":330,"tag":365,"props":3318,"children":3319},{"style":395},[3320],{"type":335,"value":2876},{"type":330,"tag":365,"props":3322,"children":3323},{"class":367,"line":2176},[3324],{"type":330,"tag":365,"props":3325,"children":3326},{"style":395},[3327],{"type":335,"value":2884},{"type":330,"tag":365,"props":3329,"children":3330},{"class":367,"line":2204},[3331],{"type":330,"tag":365,"props":3332,"children":3333},{"emptyLinePlaceholder":416},[3334],{"type":335,"value":419},{"type":330,"tag":365,"props":3336,"children":3337},{"class":367,"line":2212},[3338,3342,3347,3352,3357],{"type":330,"tag":365,"props":3339,"children":3340},{"style":372},[3341],{"type":335,"value":642},{"type":330,"tag":365,"props":3343,"children":3344},{"style":372},[3345],{"type":335,"value":3346}," not",{"type":330,"tag":365,"props":3348,"children":3349},{"style":395},[3350],{"type":335,"value":3351}," result.",{"type":330,"tag":365,"props":3353,"children":3354},{"style":389},[3355],{"type":335,"value":3356},"valid",{"type":330,"tag":365,"props":3358,"children":3359},{"style":372},[3360],{"type":335,"value":3361}," then\n",{"type":330,"tag":365,"props":3363,"children":3364},{"class":367,"line":2967},[3365,3370,3374,3379,3383,3387],{"type":330,"tag":365,"props":3366,"children":3367},{"style":389},[3368],{"type":335,"value":3369},"  r",{"type":330,"tag":365,"props":3371,"children":3372},{"style":395},[3373],{"type":335,"value":2223},{"type":330,"tag":365,"props":3375,"children":3376},{"style":378},[3377],{"type":335,"value":3378},"SetResponseStatusCode",{"type":330,"tag":365,"props":3380,"children":3381},{"style":395},[3382],{"type":335,"value":398},{"type":330,"tag":365,"props":3384,"children":3385},{"style":378},[3386],{"type":335,"value":2935},{"type":330,"tag":365,"props":3388,"children":3389},{"style":395},[3390],{"type":335,"value":409},{"type":330,"tag":365,"props":3392,"children":3393},{"class":367,"line":2985},[3394,3398,3402,3407,3411,3415],{"type":330,"tag":365,"props":3395,"children":3396},{"style":389},[3397],{"type":335,"value":3369},{"type":330,"tag":365,"props":3399,"children":3400},{"style":395},[3401],{"type":335,"value":2223},{"type":330,"tag":365,"props":3403,"children":3404},{"style":378},[3405],{"type":335,"value":3406},"SetResponseBody",{"type":330,"tag":365,"props":3408,"children":3409},{"style":395},[3410],{"type":335,"value":398},{"type":330,"tag":365,"props":3412,"children":3413},{"style":401},[3414],{"type":335,"value":2960},{"type":330,"tag":365,"props":3416,"children":3417},{"style":395},[3418],{"type":335,"value":409},{"type":330,"tag":365,"props":3420,"children":3422},{"class":367,"line":3421},19,[3423,3427,3431,3436],{"type":330,"tag":365,"props":3424,"children":3425},{"style":389},[3426],{"type":335,"value":3369},{"type":330,"tag":365,"props":3428,"children":3429},{"style":395},[3430],{"type":335,"value":2223},{"type":330,"tag":365,"props":3432,"children":3433},{"style":378},[3434],{"type":335,"value":3435},"StopForwarding",{"type":330,"tag":365,"props":3437,"children":3438},{"style":395},[3439],{"type":335,"value":2982},{"type":330,"tag":365,"props":3441,"children":3443},{"class":367,"line":3442},20,[3444],{"type":330,"tag":365,"props":3445,"children":3446},{"style":372},[3447],{"type":335,"value":667},{"type":330,"tag":727,"props":3449,"children":3451},{"id":3450},"converting-between-formats",[3452],{"type":335,"value":3453},"Converting between formats",{"type":330,"tag":331,"props":3455,"children":3456},{},[3457,3458,3463,3464,3469,3470,3475],{"type":335,"value":1524},{"type":330,"tag":338,"props":3459,"children":3461},{"className":3460},[],[3462],{"type":335,"value":973},{"type":335,"value":498},{"type":330,"tag":338,"props":3465,"children":3467},{"className":3466},[],[3468],{"type":335,"value":1000},{"type":335,"value":1492},{"type":330,"tag":338,"props":3471,"children":3473},{"className":3472},[],[3474],{"type":335,"value":1026},{"type":335,"value":3476}," modules convert to and from JSON-compatible values, so you can accept a webhook in one format and forward it in another:",{"type":330,"tag":347,"props":3478,"children":3479},{},[3480,3640],{"type":330,"tag":351,"props":3481,"children":3482},{"v-slot:javascript":318},[3483],{"type":330,"tag":355,"props":3484,"children":3486},{"className":357,"code":3485,"language":359,"meta":318,"style":318},"const csv = require(\"csv\")\n\n// header-aware by default: returns an array of objects\nconst rows = csv.parse(r.body)\n\nr.setBody(JSON.stringify({ rows: rows }))\nr.setHeader(\"Content-Type\", \"application/json\")\n",[3487],{"type":330,"tag":338,"props":3488,"children":3489},{"__ignoreMap":318},[3490,3523,3530,3538,3567,3574,3606],{"type":330,"tag":365,"props":3491,"children":3492},{"class":367,"line":368},[3493,3497,3502,3506,3510,3514,3519],{"type":330,"tag":365,"props":3494,"children":3495},{"style":372},[3496],{"type":335,"value":375},{"type":330,"tag":365,"props":3498,"children":3499},{"style":378},[3500],{"type":335,"value":3501}," csv",{"type":330,"tag":365,"props":3503,"children":3504},{"style":372},[3505],{"type":335,"value":386},{"type":330,"tag":365,"props":3507,"children":3508},{"style":389},[3509],{"type":335,"value":392},{"type":330,"tag":365,"props":3511,"children":3512},{"style":395},[3513],{"type":335,"value":398},{"type":330,"tag":365,"props":3515,"children":3516},{"style":401},[3517],{"type":335,"value":3518},"\"csv\"",{"type":330,"tag":365,"props":3520,"children":3521},{"style":395},[3522],{"type":335,"value":409},{"type":330,"tag":365,"props":3524,"children":3525},{"class":367,"line":412},[3526],{"type":330,"tag":365,"props":3527,"children":3528},{"emptyLinePlaceholder":416},[3529],{"type":335,"value":419},{"type":330,"tag":365,"props":3531,"children":3532},{"class":367,"line":422},[3533],{"type":330,"tag":365,"props":3534,"children":3535},{"style":1661},[3536],{"type":335,"value":3537},"// header-aware by default: returns an array of objects\n",{"type":330,"tag":365,"props":3539,"children":3540},{"class":367,"line":459},[3541,3545,3550,3554,3559,3563],{"type":330,"tag":365,"props":3542,"children":3543},{"style":372},[3544],{"type":335,"value":375},{"type":330,"tag":365,"props":3546,"children":3547},{"style":378},[3548],{"type":335,"value":3549}," rows",{"type":330,"tag":365,"props":3551,"children":3552},{"style":372},[3553],{"type":335,"value":386},{"type":330,"tag":365,"props":3555,"children":3556},{"style":395},[3557],{"type":335,"value":3558}," csv.",{"type":330,"tag":365,"props":3560,"children":3561},{"style":389},[3562],{"type":335,"value":451},{"type":330,"tag":365,"props":3564,"children":3565},{"style":395},[3566],{"type":335,"value":456},{"type":330,"tag":365,"props":3568,"children":3569},{"class":367,"line":636},[3570],{"type":330,"tag":365,"props":3571,"children":3572},{"emptyLinePlaceholder":416},[3573],{"type":335,"value":419},{"type":330,"tag":365,"props":3575,"children":3576},{"class":367,"line":670},[3577,3581,3585,3589,3593,3597,3601],{"type":330,"tag":365,"props":3578,"children":3579},{"style":395},[3580],{"type":335,"value":1811},{"type":330,"tag":365,"props":3582,"children":3583},{"style":389},[3584],{"type":335,"value":1816},{"type":330,"tag":365,"props":3586,"children":3587},{"style":395},[3588],{"type":335,"value":398},{"type":330,"tag":365,"props":3590,"children":3591},{"style":378},[3592],{"type":335,"value":1825},{"type":330,"tag":365,"props":3594,"children":3595},{"style":395},[3596],{"type":335,"value":446},{"type":330,"tag":365,"props":3598,"children":3599},{"style":389},[3600],{"type":335,"value":988},{"type":330,"tag":365,"props":3602,"children":3603},{"style":395},[3604],{"type":335,"value":3605},"({ rows: rows }))\n",{"type":330,"tag":365,"props":3607,"children":3608},{"class":367,"line":678},[3609,3613,3618,3622,3627,3631,3636],{"type":330,"tag":365,"props":3610,"children":3611},{"style":395},[3612],{"type":335,"value":1811},{"type":330,"tag":365,"props":3614,"children":3615},{"style":389},[3616],{"type":335,"value":3617},"setHeader",{"type":330,"tag":365,"props":3619,"children":3620},{"style":395},[3621],{"type":335,"value":398},{"type":330,"tag":365,"props":3623,"children":3624},{"style":401},[3625],{"type":335,"value":3626},"\"Content-Type\"",{"type":330,"tag":365,"props":3628,"children":3629},{"style":395},[3630],{"type":335,"value":498},{"type":330,"tag":365,"props":3632,"children":3633},{"style":401},[3634],{"type":335,"value":3635},"\"application/json\"",{"type":330,"tag":365,"props":3637,"children":3638},{"style":395},[3639],{"type":335,"value":409},{"type":330,"tag":351,"props":3641,"children":3642},{"v-slot:lua":318},[3643],{"type":330,"tag":355,"props":3644,"children":3646},{"className":513,"code":3645,"language":515,"meta":318,"style":318},"local json = require(\"json\")\nlocal csv = require(\"csv\")\n\n-- header-aware by default: returns an array of objects\nlocal rows = csv.parse(r.RequestBody)\n\nlocal encoded, err = json.encode({rows = rows})\nif err then error(err) end\n\nr:SetRequestBody(encoded)\nr:SetRequestHeader(\"Content-Type\", \"application/json\")\n",[3647],{"type":330,"tag":338,"props":3648,"children":3649},{"__ignoreMap":318},[3650,3681,3713,3720,3728,3764,3771,3808,3835,3842,3861],{"type":330,"tag":365,"props":3651,"children":3652},{"class":367,"line":368},[3653,3657,3661,3665,3669,3673,3677],{"type":330,"tag":365,"props":3654,"children":3655},{"style":372},[3656],{"type":335,"value":527},{"type":330,"tag":365,"props":3658,"children":3659},{"style":395},[3660],{"type":335,"value":532},{"type":330,"tag":365,"props":3662,"children":3663},{"style":372},[3664],{"type":335,"value":537},{"type":330,"tag":365,"props":3666,"children":3667},{"style":378},[3668],{"type":335,"value":392},{"type":330,"tag":365,"props":3670,"children":3671},{"style":395},[3672],{"type":335,"value":398},{"type":330,"tag":365,"props":3674,"children":3675},{"style":401},[3676],{"type":335,"value":550},{"type":330,"tag":365,"props":3678,"children":3679},{"style":395},[3680],{"type":335,"value":409},{"type":330,"tag":365,"props":3682,"children":3683},{"class":367,"line":412},[3684,3688,3693,3697,3701,3705,3709],{"type":330,"tag":365,"props":3685,"children":3686},{"style":372},[3687],{"type":335,"value":527},{"type":330,"tag":365,"props":3689,"children":3690},{"style":395},[3691],{"type":335,"value":3692}," csv ",{"type":330,"tag":365,"props":3694,"children":3695},{"style":372},[3696],{"type":335,"value":537},{"type":330,"tag":365,"props":3698,"children":3699},{"style":378},[3700],{"type":335,"value":392},{"type":330,"tag":365,"props":3702,"children":3703},{"style":395},[3704],{"type":335,"value":398},{"type":330,"tag":365,"props":3706,"children":3707},{"style":401},[3708],{"type":335,"value":3518},{"type":330,"tag":365,"props":3710,"children":3711},{"style":395},[3712],{"type":335,"value":409},{"type":330,"tag":365,"props":3714,"children":3715},{"class":367,"line":422},[3716],{"type":330,"tag":365,"props":3717,"children":3718},{"emptyLinePlaceholder":416},[3719],{"type":335,"value":419},{"type":330,"tag":365,"props":3721,"children":3722},{"class":367,"line":459},[3723],{"type":330,"tag":365,"props":3724,"children":3725},{"style":1661},[3726],{"type":335,"value":3727},"-- header-aware by default: returns an array of objects\n",{"type":330,"tag":365,"props":3729,"children":3730},{"class":367,"line":636},[3731,3735,3740,3744,3748,3752,3756,3760],{"type":330,"tag":365,"props":3732,"children":3733},{"style":372},[3734],{"type":335,"value":527},{"type":330,"tag":365,"props":3736,"children":3737},{"style":395},[3738],{"type":335,"value":3739}," rows ",{"type":330,"tag":365,"props":3741,"children":3742},{"style":372},[3743],{"type":335,"value":537},{"type":330,"tag":365,"props":3745,"children":3746},{"style":395},[3747],{"type":335,"value":3558},{"type":330,"tag":365,"props":3749,"children":3750},{"style":378},[3751],{"type":335,"value":451},{"type":330,"tag":365,"props":3753,"children":3754},{"style":395},[3755],{"type":335,"value":624},{"type":330,"tag":365,"props":3757,"children":3758},{"style":389},[3759],{"type":335,"value":629},{"type":330,"tag":365,"props":3761,"children":3762},{"style":395},[3763],{"type":335,"value":409},{"type":330,"tag":365,"props":3765,"children":3766},{"class":367,"line":670},[3767],{"type":330,"tag":365,"props":3768,"children":3769},{"emptyLinePlaceholder":416},[3770],{"type":335,"value":419},{"type":330,"tag":365,"props":3772,"children":3773},{"class":367,"line":678},[3774,3778,3782,3786,3790,3794,3799,3803],{"type":330,"tag":365,"props":3775,"children":3776},{"style":372},[3777],{"type":335,"value":527},{"type":330,"tag":365,"props":3779,"children":3780},{"style":395},[3781],{"type":335,"value":2137},{"type":330,"tag":365,"props":3783,"children":3784},{"style":372},[3785],{"type":335,"value":537},{"type":330,"tag":365,"props":3787,"children":3788},{"style":395},[3789],{"type":335,"value":614},{"type":330,"tag":365,"props":3791,"children":3792},{"style":378},[3793],{"type":335,"value":2150},{"type":330,"tag":365,"props":3795,"children":3796},{"style":395},[3797],{"type":335,"value":3798},"({rows ",{"type":330,"tag":365,"props":3800,"children":3801},{"style":372},[3802],{"type":335,"value":537},{"type":330,"tag":365,"props":3804,"children":3805},{"style":395},[3806],{"type":335,"value":3807}," rows})\n",{"type":330,"tag":365,"props":3809,"children":3810},{"class":367,"line":1731},[3811,3815,3819,3823,3827,3831],{"type":330,"tag":365,"props":3812,"children":3813},{"style":372},[3814],{"type":335,"value":642},{"type":330,"tag":365,"props":3816,"children":3817},{"style":395},[3818],{"type":335,"value":647},{"type":330,"tag":365,"props":3820,"children":3821},{"style":372},[3822],{"type":335,"value":652},{"type":330,"tag":365,"props":3824,"children":3825},{"style":378},[3826],{"type":335,"value":657},{"type":330,"tag":365,"props":3828,"children":3829},{"style":395},[3830],{"type":335,"value":662},{"type":330,"tag":365,"props":3832,"children":3833},{"style":372},[3834],{"type":335,"value":667},{"type":330,"tag":365,"props":3836,"children":3837},{"class":367,"line":1740},[3838],{"type":330,"tag":365,"props":3839,"children":3840},{"emptyLinePlaceholder":416},[3841],{"type":335,"value":419},{"type":330,"tag":365,"props":3843,"children":3844},{"class":367,"line":1797},[3845,3849,3853,3857],{"type":330,"tag":365,"props":3846,"children":3847},{"style":389},[3848],{"type":335,"value":2218},{"type":330,"tag":365,"props":3850,"children":3851},{"style":395},[3852],{"type":335,"value":2223},{"type":330,"tag":365,"props":3854,"children":3855},{"style":378},[3856],{"type":335,"value":2228},{"type":330,"tag":365,"props":3858,"children":3859},{"style":395},[3860],{"type":335,"value":2233},{"type":330,"tag":365,"props":3862,"children":3863},{"class":367,"line":1805},[3864,3868,3872,3877,3881,3885,3889,3893],{"type":330,"tag":365,"props":3865,"children":3866},{"style":389},[3867],{"type":335,"value":2218},{"type":330,"tag":365,"props":3869,"children":3870},{"style":395},[3871],{"type":335,"value":2223},{"type":330,"tag":365,"props":3873,"children":3874},{"style":378},[3875],{"type":335,"value":3876},"SetRequestHeader",{"type":330,"tag":365,"props":3878,"children":3879},{"style":395},[3880],{"type":335,"value":398},{"type":330,"tag":365,"props":3882,"children":3883},{"style":401},[3884],{"type":335,"value":3626},{"type":330,"tag":365,"props":3886,"children":3887},{"style":395},[3888],{"type":335,"value":498},{"type":330,"tag":365,"props":3890,"children":3891},{"style":401},[3892],{"type":335,"value":3635},{"type":330,"tag":365,"props":3894,"children":3895},{"style":395},[3896],{"type":335,"value":409},{"type":330,"tag":331,"props":3898,"children":3899},{},[3900],{"type":335,"value":3901},"A few safety notes on the format helpers:",{"type":330,"tag":3903,"props":3904,"children":3905},"ul",{},[3906,3942,3981],{"type":330,"tag":3907,"props":3908,"children":3909},"li",{},[3910,3916,3918,3924,3926,3932,3934,3940],{"type":330,"tag":338,"props":3911,"children":3913},{"className":3912},[],[3914],{"type":335,"value":3915},"csv.stringify",{"type":335,"value":3917}," prefixes spreadsheet-formula cells by default to prevent formula injection — only disable it (",{"type":330,"tag":338,"props":3919,"children":3921},{"className":3920},[],[3922],{"type":335,"value":3923},"preventFormulaInjection: false",{"type":335,"value":3925},") for trusted data. ",{"type":330,"tag":338,"props":3927,"children":3929},{"className":3928},[],[3930],{"type":335,"value":3931},"delimiter",{"type":335,"value":3933}," supports CSV or TSV, and ",{"type":330,"tag":338,"props":3935,"children":3937},{"className":3936},[],[3938],{"type":335,"value":3939},"header: false",{"type":335,"value":3941}," switches to plain arrays.",{"type":330,"tag":3907,"props":3943,"children":3944},{},[3945,3951,3953,3959,3960,3966,3967,3973,3974,3979],{"type":330,"tag":338,"props":3946,"children":3948},{"className":3947},[],[3949],{"type":335,"value":3950},"xml.parse",{"type":335,"value":3952}," returns an explicit element tree with ",{"type":330,"tag":338,"props":3954,"children":3956},{"className":3955},[],[3957],{"type":335,"value":3958},"name",{"type":335,"value":498},{"type":330,"tag":338,"props":3961,"children":3963},{"className":3962},[],[3964],{"type":335,"value":3965},"attributes",{"type":335,"value":498},{"type":330,"tag":338,"props":3968,"children":3970},{"className":3969},[],[3971],{"type":335,"value":3972},"children",{"type":335,"value":1492},{"type":330,"tag":338,"props":3975,"children":3977},{"className":3976},[],[3978],{"type":335,"value":335},{"type":335,"value":3980},". External entity resolution is disabled.",{"type":330,"tag":3907,"props":3982,"children":3983},{},[3984,3990],{"type":330,"tag":338,"props":3985,"children":3987},{"className":3986},[],[3988],{"type":335,"value":3989},"yaml.parse",{"type":335,"value":3991}," accepts a single document and returns JSON-compatible values.",{"type":330,"tag":727,"props":3993,"children":3995},{"id":3994},"verifying-jwts-and-signatures",[3996],{"type":335,"value":3997},"Verifying JWTs and signatures",{"type":330,"tag":331,"props":3999,"children":4000},{},[4001,4002,4007,4008,4013],{"type":335,"value":1524},{"type":330,"tag":338,"props":4003,"children":4005},{"className":4004},[],[4006],{"type":335,"value":1080},{"type":335,"value":1492},{"type":330,"tag":338,"props":4009,"children":4011},{"className":4010},[],[4012],{"type":335,"value":1114},{"type":335,"value":4014}," modules handle token and webhook-signature verification with pinned algorithms and constant-time comparison:",{"type":330,"tag":347,"props":4016,"children":4017},{},[4018,4377],{"type":330,"tag":351,"props":4019,"children":4020},{"v-slot:javascript":318},[4021],{"type":330,"tag":355,"props":4022,"children":4024},{"className":357,"code":4023,"language":359,"meta":318,"style":318},"const jwt = require(\"jwt\")\nconst secure = require(\"secure\")\n\n// verify a JWT from a header (HS256, HS384, HS512 supported)\nconst claims = jwt.verify(r.headers[\"X-Auth-Token\"], cfg.get(\"jwt_secret\"), {\n  algorithm: \"HS256\",\n  issuer: \"my-app\"\n})\n\n// or verify a provider HMAC signature, e.g. \"sha256=\u003Chex>\"\nconst ok = secure.verifyHMAC(\"sha256\", cfg.get(\"signing_secret\"), r.body,\n  r.headers[\"X-Hub-Signature-256\"], { prefix: \"sha256=\" })\n\nif (!ok) {\n  r.setResponseStatus(401)\n  r.stopForwarding()\n}\n",[4025],{"type":330,"tag":338,"props":4026,"children":4027},{"__ignoreMap":318},[4028,4061,4094,4101,4109,4167,4184,4197,4204,4211,4219,4276,4304,4311,4331,4355,4370],{"type":330,"tag":365,"props":4029,"children":4030},{"class":367,"line":368},[4031,4035,4040,4044,4048,4052,4057],{"type":330,"tag":365,"props":4032,"children":4033},{"style":372},[4034],{"type":335,"value":375},{"type":330,"tag":365,"props":4036,"children":4037},{"style":378},[4038],{"type":335,"value":4039}," jwt",{"type":330,"tag":365,"props":4041,"children":4042},{"style":372},[4043],{"type":335,"value":386},{"type":330,"tag":365,"props":4045,"children":4046},{"style":389},[4047],{"type":335,"value":392},{"type":330,"tag":365,"props":4049,"children":4050},{"style":395},[4051],{"type":335,"value":398},{"type":330,"tag":365,"props":4053,"children":4054},{"style":401},[4055],{"type":335,"value":4056},"\"jwt\"",{"type":330,"tag":365,"props":4058,"children":4059},{"style":395},[4060],{"type":335,"value":409},{"type":330,"tag":365,"props":4062,"children":4063},{"class":367,"line":412},[4064,4068,4073,4077,4081,4085,4090],{"type":330,"tag":365,"props":4065,"children":4066},{"style":372},[4067],{"type":335,"value":375},{"type":330,"tag":365,"props":4069,"children":4070},{"style":378},[4071],{"type":335,"value":4072}," secure",{"type":330,"tag":365,"props":4074,"children":4075},{"style":372},[4076],{"type":335,"value":386},{"type":330,"tag":365,"props":4078,"children":4079},{"style":389},[4080],{"type":335,"value":392},{"type":330,"tag":365,"props":4082,"children":4083},{"style":395},[4084],{"type":335,"value":398},{"type":330,"tag":365,"props":4086,"children":4087},{"style":401},[4088],{"type":335,"value":4089},"\"secure\"",{"type":330,"tag":365,"props":4091,"children":4092},{"style":395},[4093],{"type":335,"value":409},{"type":330,"tag":365,"props":4095,"children":4096},{"class":367,"line":422},[4097],{"type":330,"tag":365,"props":4098,"children":4099},{"emptyLinePlaceholder":416},[4100],{"type":335,"value":419},{"type":330,"tag":365,"props":4102,"children":4103},{"class":367,"line":459},[4104],{"type":330,"tag":365,"props":4105,"children":4106},{"style":1661},[4107],{"type":335,"value":4108},"// verify a JWT from a header (HS256, HS384, HS512 supported)\n",{"type":330,"tag":365,"props":4110,"children":4111},{"class":367,"line":636},[4112,4116,4121,4125,4130,4134,4139,4144,4149,4153,4157,4162],{"type":330,"tag":365,"props":4113,"children":4114},{"style":372},[4115],{"type":335,"value":375},{"type":330,"tag":365,"props":4117,"children":4118},{"style":378},[4119],{"type":335,"value":4120}," claims",{"type":330,"tag":365,"props":4122,"children":4123},{"style":372},[4124],{"type":335,"value":386},{"type":330,"tag":365,"props":4126,"children":4127},{"style":395},[4128],{"type":335,"value":4129}," jwt.",{"type":330,"tag":365,"props":4131,"children":4132},{"style":389},[4133],{"type":335,"value":1096},{"type":330,"tag":365,"props":4135,"children":4136},{"style":395},[4137],{"type":335,"value":4138},"(r.headers[",{"type":330,"tag":365,"props":4140,"children":4141},{"style":401},[4142],{"type":335,"value":4143},"\"X-Auth-Token\"",{"type":330,"tag":365,"props":4145,"children":4146},{"style":395},[4147],{"type":335,"value":4148},"], cfg.",{"type":330,"tag":365,"props":4150,"children":4151},{"style":389},[4152],{"type":335,"value":483},{"type":330,"tag":365,"props":4154,"children":4155},{"style":395},[4156],{"type":335,"value":398},{"type":330,"tag":365,"props":4158,"children":4159},{"style":401},[4160],{"type":335,"value":4161},"\"jwt_secret\"",{"type":330,"tag":365,"props":4163,"children":4164},{"style":395},[4165],{"type":335,"value":4166},"), {\n",{"type":330,"tag":365,"props":4168,"children":4169},{"class":367,"line":670},[4170,4175,4180],{"type":330,"tag":365,"props":4171,"children":4172},{"style":395},[4173],{"type":335,"value":4174},"  algorithm: ",{"type":330,"tag":365,"props":4176,"children":4177},{"style":401},[4178],{"type":335,"value":4179},"\"HS256\"",{"type":330,"tag":365,"props":4181,"children":4182},{"style":395},[4183],{"type":335,"value":2399},{"type":330,"tag":365,"props":4185,"children":4186},{"class":367,"line":678},[4187,4192],{"type":330,"tag":365,"props":4188,"children":4189},{"style":395},[4190],{"type":335,"value":4191},"  issuer: ",{"type":330,"tag":365,"props":4193,"children":4194},{"style":401},[4195],{"type":335,"value":4196},"\"my-app\"\n",{"type":330,"tag":365,"props":4198,"children":4199},{"class":367,"line":1731},[4200],{"type":330,"tag":365,"props":4201,"children":4202},{"style":395},[4203],{"type":335,"value":2048},{"type":330,"tag":365,"props":4205,"children":4206},{"class":367,"line":1740},[4207],{"type":330,"tag":365,"props":4208,"children":4209},{"emptyLinePlaceholder":416},[4210],{"type":335,"value":419},{"type":330,"tag":365,"props":4212,"children":4213},{"class":367,"line":1797},[4214],{"type":330,"tag":365,"props":4215,"children":4216},{"style":1661},[4217],{"type":335,"value":4218},"// or verify a provider HMAC signature, e.g. \"sha256=\u003Chex>\"\n",{"type":330,"tag":365,"props":4220,"children":4221},{"class":367,"line":1805},[4222,4226,4231,4235,4240,4244,4248,4253,4258,4262,4266,4271],{"type":330,"tag":365,"props":4223,"children":4224},{"style":372},[4225],{"type":335,"value":375},{"type":330,"tag":365,"props":4227,"children":4228},{"style":378},[4229],{"type":335,"value":4230}," ok",{"type":330,"tag":365,"props":4232,"children":4233},{"style":372},[4234],{"type":335,"value":386},{"type":330,"tag":365,"props":4236,"children":4237},{"style":395},[4238],{"type":335,"value":4239}," secure.",{"type":330,"tag":365,"props":4241,"children":4242},{"style":389},[4243],{"type":335,"value":1130},{"type":330,"tag":365,"props":4245,"children":4246},{"style":395},[4247],{"type":335,"value":398},{"type":330,"tag":365,"props":4249,"children":4250},{"style":401},[4251],{"type":335,"value":4252},"\"sha256\"",{"type":330,"tag":365,"props":4254,"children":4255},{"style":395},[4256],{"type":335,"value":4257},", cfg.",{"type":330,"tag":365,"props":4259,"children":4260},{"style":389},[4261],{"type":335,"value":483},{"type":330,"tag":365,"props":4263,"children":4264},{"style":395},[4265],{"type":335,"value":398},{"type":330,"tag":365,"props":4267,"children":4268},{"style":401},[4269],{"type":335,"value":4270},"\"signing_secret\"",{"type":330,"tag":365,"props":4272,"children":4273},{"style":395},[4274],{"type":335,"value":4275},"), r.body,\n",{"type":330,"tag":365,"props":4277,"children":4278},{"class":367,"line":2119},[4279,4284,4289,4294,4299],{"type":330,"tag":365,"props":4280,"children":4281},{"style":395},[4282],{"type":335,"value":4283},"  r.headers[",{"type":330,"tag":365,"props":4285,"children":4286},{"style":401},[4287],{"type":335,"value":4288},"\"X-Hub-Signature-256\"",{"type":330,"tag":365,"props":4290,"children":4291},{"style":395},[4292],{"type":335,"value":4293},"], { prefix: ",{"type":330,"tag":365,"props":4295,"children":4296},{"style":401},[4297],{"type":335,"value":4298},"\"sha256=\"",{"type":330,"tag":365,"props":4300,"children":4301},{"style":395},[4302],{"type":335,"value":4303}," })\n",{"type":330,"tag":365,"props":4305,"children":4306},{"class":367,"line":2127},[4307],{"type":330,"tag":365,"props":4308,"children":4309},{"emptyLinePlaceholder":416},[4310],{"type":335,"value":419},{"type":330,"tag":365,"props":4312,"children":4313},{"class":367,"line":2176},[4314,4318,4322,4326],{"type":330,"tag":365,"props":4315,"children":4316},{"style":372},[4317],{"type":335,"value":642},{"type":330,"tag":365,"props":4319,"children":4320},{"style":395},[4321],{"type":335,"value":2903},{"type":330,"tag":365,"props":4323,"children":4324},{"style":372},[4325],{"type":335,"value":2908},{"type":330,"tag":365,"props":4327,"children":4328},{"style":395},[4329],{"type":335,"value":4330},"ok) {\n",{"type":330,"tag":365,"props":4332,"children":4333},{"class":367,"line":2204},[4334,4338,4342,4346,4351],{"type":330,"tag":365,"props":4335,"children":4336},{"style":395},[4337],{"type":335,"value":2921},{"type":330,"tag":365,"props":4339,"children":4340},{"style":389},[4341],{"type":335,"value":2926},{"type":330,"tag":365,"props":4343,"children":4344},{"style":395},[4345],{"type":335,"value":398},{"type":330,"tag":365,"props":4347,"children":4348},{"style":378},[4349],{"type":335,"value":4350},"401",{"type":330,"tag":365,"props":4352,"children":4353},{"style":395},[4354],{"type":335,"value":409},{"type":330,"tag":365,"props":4356,"children":4357},{"class":367,"line":2212},[4358,4362,4366],{"type":330,"tag":365,"props":4359,"children":4360},{"style":395},[4361],{"type":335,"value":2921},{"type":330,"tag":365,"props":4363,"children":4364},{"style":389},[4365],{"type":335,"value":2977},{"type":330,"tag":365,"props":4367,"children":4368},{"style":395},[4369],{"type":335,"value":2982},{"type":330,"tag":365,"props":4371,"children":4372},{"class":367,"line":2967},[4373],{"type":330,"tag":365,"props":4374,"children":4375},{"style":395},[4376],{"type":335,"value":2991},{"type":330,"tag":351,"props":4378,"children":4379},{"v-slot:lua":318},[4380],{"type":330,"tag":355,"props":4381,"children":4383},{"className":513,"code":4382,"language":515,"meta":318,"style":318},"local jwt = require(\"jwt\")\nlocal secure = require(\"secure\")\n\n-- verify a JWT from a header (HS256, HS384, HS512 supported)\nlocal claims = jwt.verify(r.RequestHeader[\"X-Auth-Token\"], cfg:GetValue(\"jwt_secret\"), {\n  algorithm = \"HS256\",\n  issuer = \"my-app\"\n})\n\n-- or verify a provider HMAC signature, e.g. \"sha256=\u003Chex>\"\nlocal ok = secure.verifyHMAC(\"sha256\", cfg:GetValue(\"signing_secret\"), r.RequestBody,\n  r.RequestHeader[\"X-Hub-Signature-256\"], { prefix = \"sha256=\" })\n\nif not ok then\n  r:SetResponseStatusCode(401)\n  r:StopForwarding()\nend\n",[4384],{"type":330,"tag":338,"props":4385,"children":4386},{"__ignoreMap":318},[4387,4419,4451,4458,4466,4539,4560,4577,4584,4591,4599,4668,4705,4712,4732,4759,4778],{"type":330,"tag":365,"props":4388,"children":4389},{"class":367,"line":368},[4390,4394,4399,4403,4407,4411,4415],{"type":330,"tag":365,"props":4391,"children":4392},{"style":372},[4393],{"type":335,"value":527},{"type":330,"tag":365,"props":4395,"children":4396},{"style":395},[4397],{"type":335,"value":4398}," jwt ",{"type":330,"tag":365,"props":4400,"children":4401},{"style":372},[4402],{"type":335,"value":537},{"type":330,"tag":365,"props":4404,"children":4405},{"style":378},[4406],{"type":335,"value":392},{"type":330,"tag":365,"props":4408,"children":4409},{"style":395},[4410],{"type":335,"value":398},{"type":330,"tag":365,"props":4412,"children":4413},{"style":401},[4414],{"type":335,"value":4056},{"type":330,"tag":365,"props":4416,"children":4417},{"style":395},[4418],{"type":335,"value":409},{"type":330,"tag":365,"props":4420,"children":4421},{"class":367,"line":412},[4422,4426,4431,4435,4439,4443,4447],{"type":330,"tag":365,"props":4423,"children":4424},{"style":372},[4425],{"type":335,"value":527},{"type":330,"tag":365,"props":4427,"children":4428},{"style":395},[4429],{"type":335,"value":4430}," secure ",{"type":330,"tag":365,"props":4432,"children":4433},{"style":372},[4434],{"type":335,"value":537},{"type":330,"tag":365,"props":4436,"children":4437},{"style":378},[4438],{"type":335,"value":392},{"type":330,"tag":365,"props":4440,"children":4441},{"style":395},[4442],{"type":335,"value":398},{"type":330,"tag":365,"props":4444,"children":4445},{"style":401},[4446],{"type":335,"value":4089},{"type":330,"tag":365,"props":4448,"children":4449},{"style":395},[4450],{"type":335,"value":409},{"type":330,"tag":365,"props":4452,"children":4453},{"class":367,"line":422},[4454],{"type":330,"tag":365,"props":4455,"children":4456},{"emptyLinePlaceholder":416},[4457],{"type":335,"value":419},{"type":330,"tag":365,"props":4459,"children":4460},{"class":367,"line":459},[4461],{"type":330,"tag":365,"props":4462,"children":4463},{"style":1661},[4464],{"type":335,"value":4465},"-- verify a JWT from a header (HS256, HS384, HS512 supported)\n",{"type":330,"tag":365,"props":4467,"children":4468},{"class":367,"line":636},[4469,4473,4478,4482,4486,4490,4494,4499,4504,4508,4513,4518,4522,4527,4531,4535],{"type":330,"tag":365,"props":4470,"children":4471},{"style":372},[4472],{"type":335,"value":527},{"type":330,"tag":365,"props":4474,"children":4475},{"style":395},[4476],{"type":335,"value":4477}," claims ",{"type":330,"tag":365,"props":4479,"children":4480},{"style":372},[4481],{"type":335,"value":537},{"type":330,"tag":365,"props":4483,"children":4484},{"style":395},[4485],{"type":335,"value":4129},{"type":330,"tag":365,"props":4487,"children":4488},{"style":378},[4489],{"type":335,"value":1096},{"type":330,"tag":365,"props":4491,"children":4492},{"style":395},[4493],{"type":335,"value":624},{"type":330,"tag":365,"props":4495,"children":4496},{"style":389},[4497],{"type":335,"value":4498},"RequestHeader",{"type":330,"tag":365,"props":4500,"children":4501},{"style":395},[4502],{"type":335,"value":4503},"[",{"type":330,"tag":365,"props":4505,"children":4506},{"style":401},[4507],{"type":335,"value":4143},{"type":330,"tag":365,"props":4509,"children":4510},{"style":395},[4511],{"type":335,"value":4512},"], ",{"type":330,"tag":365,"props":4514,"children":4515},{"style":389},[4516],{"type":335,"value":4517},"cfg",{"type":330,"tag":365,"props":4519,"children":4520},{"style":395},[4521],{"type":335,"value":2223},{"type":330,"tag":365,"props":4523,"children":4524},{"style":378},[4525],{"type":335,"value":4526},"GetValue",{"type":330,"tag":365,"props":4528,"children":4529},{"style":395},[4530],{"type":335,"value":398},{"type":330,"tag":365,"props":4532,"children":4533},{"style":401},[4534],{"type":335,"value":4161},{"type":330,"tag":365,"props":4536,"children":4537},{"style":395},[4538],{"type":335,"value":4166},{"type":330,"tag":365,"props":4540,"children":4541},{"class":367,"line":670},[4542,4547,4551,4556],{"type":330,"tag":365,"props":4543,"children":4544},{"style":395},[4545],{"type":335,"value":4546},"  algorithm ",{"type":330,"tag":365,"props":4548,"children":4549},{"style":372},[4550],{"type":335,"value":537},{"type":330,"tag":365,"props":4552,"children":4553},{"style":401},[4554],{"type":335,"value":4555}," \"HS256\"",{"type":330,"tag":365,"props":4557,"children":4558},{"style":395},[4559],{"type":335,"value":2399},{"type":330,"tag":365,"props":4561,"children":4562},{"class":367,"line":678},[4563,4568,4572],{"type":330,"tag":365,"props":4564,"children":4565},{"style":395},[4566],{"type":335,"value":4567},"  issuer ",{"type":330,"tag":365,"props":4569,"children":4570},{"style":372},[4571],{"type":335,"value":537},{"type":330,"tag":365,"props":4573,"children":4574},{"style":401},[4575],{"type":335,"value":4576}," \"my-app\"\n",{"type":330,"tag":365,"props":4578,"children":4579},{"class":367,"line":1731},[4580],{"type":330,"tag":365,"props":4581,"children":4582},{"style":395},[4583],{"type":335,"value":2048},{"type":330,"tag":365,"props":4585,"children":4586},{"class":367,"line":1740},[4587],{"type":330,"tag":365,"props":4588,"children":4589},{"emptyLinePlaceholder":416},[4590],{"type":335,"value":419},{"type":330,"tag":365,"props":4592,"children":4593},{"class":367,"line":1797},[4594],{"type":330,"tag":365,"props":4595,"children":4596},{"style":1661},[4597],{"type":335,"value":4598},"-- or verify a provider HMAC signature, e.g. \"sha256=\u003Chex>\"\n",{"type":330,"tag":365,"props":4600,"children":4601},{"class":367,"line":1805},[4602,4606,4611,4615,4619,4623,4627,4631,4635,4639,4643,4647,4651,4655,4660,4664],{"type":330,"tag":365,"props":4603,"children":4604},{"style":372},[4605],{"type":335,"value":527},{"type":330,"tag":365,"props":4607,"children":4608},{"style":395},[4609],{"type":335,"value":4610}," ok ",{"type":330,"tag":365,"props":4612,"children":4613},{"style":372},[4614],{"type":335,"value":537},{"type":330,"tag":365,"props":4616,"children":4617},{"style":395},[4618],{"type":335,"value":4239},{"type":330,"tag":365,"props":4620,"children":4621},{"style":378},[4622],{"type":335,"value":1130},{"type":330,"tag":365,"props":4624,"children":4625},{"style":395},[4626],{"type":335,"value":398},{"type":330,"tag":365,"props":4628,"children":4629},{"style":401},[4630],{"type":335,"value":4252},{"type":330,"tag":365,"props":4632,"children":4633},{"style":395},[4634],{"type":335,"value":498},{"type":330,"tag":365,"props":4636,"children":4637},{"style":389},[4638],{"type":335,"value":4517},{"type":330,"tag":365,"props":4640,"children":4641},{"style":395},[4642],{"type":335,"value":2223},{"type":330,"tag":365,"props":4644,"children":4645},{"style":378},[4646],{"type":335,"value":4526},{"type":330,"tag":365,"props":4648,"children":4649},{"style":395},[4650],{"type":335,"value":398},{"type":330,"tag":365,"props":4652,"children":4653},{"style":401},[4654],{"type":335,"value":4270},{"type":330,"tag":365,"props":4656,"children":4657},{"style":395},[4658],{"type":335,"value":4659},"), r.",{"type":330,"tag":365,"props":4661,"children":4662},{"style":389},[4663],{"type":335,"value":629},{"type":330,"tag":365,"props":4665,"children":4666},{"style":395},[4667],{"type":335,"value":2399},{"type":330,"tag":365,"props":4669,"children":4670},{"class":367,"line":2119},[4671,4675,4679,4683,4687,4692,4696,4701],{"type":330,"tag":365,"props":4672,"children":4673},{"style":395},[4674],{"type":335,"value":2921},{"type":330,"tag":365,"props":4676,"children":4677},{"style":389},[4678],{"type":335,"value":4498},{"type":330,"tag":365,"props":4680,"children":4681},{"style":395},[4682],{"type":335,"value":4503},{"type":330,"tag":365,"props":4684,"children":4685},{"style":401},[4686],{"type":335,"value":4288},{"type":330,"tag":365,"props":4688,"children":4689},{"style":395},[4690],{"type":335,"value":4691},"], { prefix ",{"type":330,"tag":365,"props":4693,"children":4694},{"style":372},[4695],{"type":335,"value":537},{"type":330,"tag":365,"props":4697,"children":4698},{"style":401},[4699],{"type":335,"value":4700}," \"sha256=\" ",{"type":330,"tag":365,"props":4702,"children":4703},{"style":395},[4704],{"type":335,"value":2048},{"type":330,"tag":365,"props":4706,"children":4707},{"class":367,"line":2127},[4708],{"type":330,"tag":365,"props":4709,"children":4710},{"emptyLinePlaceholder":416},[4711],{"type":335,"value":419},{"type":330,"tag":365,"props":4713,"children":4714},{"class":367,"line":2176},[4715,4719,4723,4727],{"type":330,"tag":365,"props":4716,"children":4717},{"style":372},[4718],{"type":335,"value":642},{"type":330,"tag":365,"props":4720,"children":4721},{"style":372},[4722],{"type":335,"value":3346},{"type":330,"tag":365,"props":4724,"children":4725},{"style":395},[4726],{"type":335,"value":4610},{"type":330,"tag":365,"props":4728,"children":4729},{"style":372},[4730],{"type":335,"value":4731},"then\n",{"type":330,"tag":365,"props":4733,"children":4734},{"class":367,"line":2204},[4735,4739,4743,4747,4751,4755],{"type":330,"tag":365,"props":4736,"children":4737},{"style":389},[4738],{"type":335,"value":3369},{"type":330,"tag":365,"props":4740,"children":4741},{"style":395},[4742],{"type":335,"value":2223},{"type":330,"tag":365,"props":4744,"children":4745},{"style":378},[4746],{"type":335,"value":3378},{"type":330,"tag":365,"props":4748,"children":4749},{"style":395},[4750],{"type":335,"value":398},{"type":330,"tag":365,"props":4752,"children":4753},{"style":378},[4754],{"type":335,"value":4350},{"type":330,"tag":365,"props":4756,"children":4757},{"style":395},[4758],{"type":335,"value":409},{"type":330,"tag":365,"props":4760,"children":4761},{"class":367,"line":2212},[4762,4766,4770,4774],{"type":330,"tag":365,"props":4763,"children":4764},{"style":389},[4765],{"type":335,"value":3369},{"type":330,"tag":365,"props":4767,"children":4768},{"style":395},[4769],{"type":335,"value":2223},{"type":330,"tag":365,"props":4771,"children":4772},{"style":378},[4773],{"type":335,"value":3435},{"type":330,"tag":365,"props":4775,"children":4776},{"style":395},[4777],{"type":335,"value":2982},{"type":330,"tag":365,"props":4779,"children":4780},{"class":367,"line":2967},[4781],{"type":330,"tag":365,"props":4782,"children":4783},{"style":372},[4784],{"type":335,"value":667},{"type":330,"tag":331,"props":4786,"children":4787},{},[4788,4794,4796,4802,4804,4810,4812,4817],{"type":330,"tag":338,"props":4789,"children":4791},{"className":4790},[],[4792],{"type":335,"value":4793},"jwt.decode",{"type":335,"value":4795}," returns the header and claims with ",{"type":330,"tag":338,"props":4797,"children":4799},{"className":4798},[],[4800],{"type":335,"value":4801},"verified: false",{"type":335,"value":4803}," — it is for inspection only and must never be used for authorization. ",{"type":330,"tag":338,"props":4805,"children":4807},{"className":4806},[],[4808],{"type":335,"value":4809},"secure.verifyHMAC",{"type":335,"value":4811}," accepts hex, base64 and base64url signatures plus an optional provider prefix. See ",{"type":330,"tag":1429,"props":4813,"children":4814},{"href":203},[4815],{"type":335,"value":4816},"webhook signature verification",{"type":335,"value":4818}," for provider-specific walkthroughs.",{"type":330,"tag":727,"props":4820,"children":4822},{"id":4821},"rendering-templates",[4823],{"type":335,"value":4824},"Rendering templates",{"type":330,"tag":331,"props":4826,"children":4827},{},[4828,4834,4836,4843],{"type":330,"tag":338,"props":4829,"children":4831},{"className":4830},[],[4832],{"type":335,"value":4833},"template.render",{"type":335,"value":4835}," renders ",{"type":330,"tag":1429,"props":4837,"children":4840},{"href":4838,"rel":4839},"https://mustache.github.io/",[2251],[4841],{"type":335,"value":4842},"Mustache",{"type":335,"value":4844}," templates — handy for building notification messages without string concatenation:",{"type":330,"tag":347,"props":4846,"children":4847},{},[4848,5061],{"type":330,"tag":351,"props":4849,"children":4850},{"v-slot:javascript":318},[4851],{"type":330,"tag":355,"props":4852,"children":4854},{"className":357,"code":4853,"language":359,"meta":318,"style":318},"const template = require(\"template\")\n\nconst event = JSON.parse(r.body)\n\nconst text = template.render(\n  \"Deploy {{version}} to {{environment}} finished with status {{status}}\",\n  event\n)\n\nr.setBody(JSON.stringify({ text: text }))\nr.setHeader(\"Content-Type\", \"application/json\")\n",[4855],{"type":330,"tag":338,"props":4856,"children":4857},{"__ignoreMap":318},[4858,4891,4898,4929,4936,4965,4977,4984,4991,4998,5030],{"type":330,"tag":365,"props":4859,"children":4860},{"class":367,"line":368},[4861,4865,4870,4874,4878,4882,4887],{"type":330,"tag":365,"props":4862,"children":4863},{"style":372},[4864],{"type":335,"value":375},{"type":330,"tag":365,"props":4866,"children":4867},{"style":378},[4868],{"type":335,"value":4869}," template",{"type":330,"tag":365,"props":4871,"children":4872},{"style":372},[4873],{"type":335,"value":386},{"type":330,"tag":365,"props":4875,"children":4876},{"style":389},[4877],{"type":335,"value":392},{"type":330,"tag":365,"props":4879,"children":4880},{"style":395},[4881],{"type":335,"value":398},{"type":330,"tag":365,"props":4883,"children":4884},{"style":401},[4885],{"type":335,"value":4886},"\"template\"",{"type":330,"tag":365,"props":4888,"children":4889},{"style":395},[4890],{"type":335,"value":409},{"type":330,"tag":365,"props":4892,"children":4893},{"class":367,"line":412},[4894],{"type":330,"tag":365,"props":4895,"children":4896},{"emptyLinePlaceholder":416},[4897],{"type":335,"value":419},{"type":330,"tag":365,"props":4899,"children":4900},{"class":367,"line":422},[4901,4905,4909,4913,4917,4921,4925],{"type":330,"tag":365,"props":4902,"children":4903},{"style":372},[4904],{"type":335,"value":375},{"type":330,"tag":365,"props":4906,"children":4907},{"style":378},[4908],{"type":335,"value":432},{"type":330,"tag":365,"props":4910,"children":4911},{"style":372},[4912],{"type":335,"value":386},{"type":330,"tag":365,"props":4914,"children":4915},{"style":378},[4916],{"type":335,"value":441},{"type":330,"tag":365,"props":4918,"children":4919},{"style":395},[4920],{"type":335,"value":446},{"type":330,"tag":365,"props":4922,"children":4923},{"style":389},[4924],{"type":335,"value":451},{"type":330,"tag":365,"props":4926,"children":4927},{"style":395},[4928],{"type":335,"value":456},{"type":330,"tag":365,"props":4930,"children":4931},{"class":367,"line":459},[4932],{"type":330,"tag":365,"props":4933,"children":4934},{"emptyLinePlaceholder":416},[4935],{"type":335,"value":419},{"type":330,"tag":365,"props":4937,"children":4938},{"class":367,"line":636},[4939,4943,4948,4952,4957,4961],{"type":330,"tag":365,"props":4940,"children":4941},{"style":372},[4942],{"type":335,"value":375},{"type":330,"tag":365,"props":4944,"children":4945},{"style":378},[4946],{"type":335,"value":4947}," text",{"type":330,"tag":365,"props":4949,"children":4950},{"style":372},[4951],{"type":335,"value":386},{"type":330,"tag":365,"props":4953,"children":4954},{"style":395},[4955],{"type":335,"value":4956}," template.",{"type":330,"tag":365,"props":4958,"children":4959},{"style":389},[4960],{"type":335,"value":1164},{"type":330,"tag":365,"props":4962,"children":4963},{"style":395},[4964],{"type":335,"value":2386},{"type":330,"tag":365,"props":4966,"children":4967},{"class":367,"line":670},[4968,4973],{"type":330,"tag":365,"props":4969,"children":4970},{"style":401},[4971],{"type":335,"value":4972},"  \"Deploy {{version}} to {{environment}} finished with status {{status}}\"",{"type":330,"tag":365,"props":4974,"children":4975},{"style":395},[4976],{"type":335,"value":2399},{"type":330,"tag":365,"props":4978,"children":4979},{"class":367,"line":678},[4980],{"type":330,"tag":365,"props":4981,"children":4982},{"style":395},[4983],{"type":335,"value":2407},{"type":330,"tag":365,"props":4985,"children":4986},{"class":367,"line":1731},[4987],{"type":330,"tag":365,"props":4988,"children":4989},{"style":395},[4990],{"type":335,"value":409},{"type":330,"tag":365,"props":4992,"children":4993},{"class":367,"line":1740},[4994],{"type":330,"tag":365,"props":4995,"children":4996},{"emptyLinePlaceholder":416},[4997],{"type":335,"value":419},{"type":330,"tag":365,"props":4999,"children":5000},{"class":367,"line":1797},[5001,5005,5009,5013,5017,5021,5025],{"type":330,"tag":365,"props":5002,"children":5003},{"style":395},[5004],{"type":335,"value":1811},{"type":330,"tag":365,"props":5006,"children":5007},{"style":389},[5008],{"type":335,"value":1816},{"type":330,"tag":365,"props":5010,"children":5011},{"style":395},[5012],{"type":335,"value":398},{"type":330,"tag":365,"props":5014,"children":5015},{"style":378},[5016],{"type":335,"value":1825},{"type":330,"tag":365,"props":5018,"children":5019},{"style":395},[5020],{"type":335,"value":446},{"type":330,"tag":365,"props":5022,"children":5023},{"style":389},[5024],{"type":335,"value":988},{"type":330,"tag":365,"props":5026,"children":5027},{"style":395},[5028],{"type":335,"value":5029},"({ text: text }))\n",{"type":330,"tag":365,"props":5031,"children":5032},{"class":367,"line":1805},[5033,5037,5041,5045,5049,5053,5057],{"type":330,"tag":365,"props":5034,"children":5035},{"style":395},[5036],{"type":335,"value":1811},{"type":330,"tag":365,"props":5038,"children":5039},{"style":389},[5040],{"type":335,"value":3617},{"type":330,"tag":365,"props":5042,"children":5043},{"style":395},[5044],{"type":335,"value":398},{"type":330,"tag":365,"props":5046,"children":5047},{"style":401},[5048],{"type":335,"value":3626},{"type":330,"tag":365,"props":5050,"children":5051},{"style":395},[5052],{"type":335,"value":498},{"type":330,"tag":365,"props":5054,"children":5055},{"style":401},[5056],{"type":335,"value":3635},{"type":330,"tag":365,"props":5058,"children":5059},{"style":395},[5060],{"type":335,"value":409},{"type":330,"tag":351,"props":5062,"children":5063},{"v-slot:lua":318},[5064],{"type":330,"tag":355,"props":5065,"children":5067},{"className":513,"code":5066,"language":515,"meta":318,"style":318},"local json = require(\"json\")\nlocal template = require(\"template\")\n\nlocal event, err = json.decode(r.RequestBody)\nif err then error(err) end\n\nlocal text = template.render(\n  \"Deploy {{version}} to {{environment}} finished with status {{status}}\",\n  event\n)\n\nlocal encoded, err = json.encode({text = text})\nif err then error(err) end\n\nr:SetRequestBody(encoded)\nr:SetRequestHeader(\"Content-Type\", \"application/json\")\n",[5068],{"type":330,"tag":338,"props":5069,"children":5070},{"__ignoreMap":318},[5071,5102,5134,5141,5176,5203,5210,5238,5249,5256,5263,5270,5307,5334,5341,5360],{"type":330,"tag":365,"props":5072,"children":5073},{"class":367,"line":368},[5074,5078,5082,5086,5090,5094,5098],{"type":330,"tag":365,"props":5075,"children":5076},{"style":372},[5077],{"type":335,"value":527},{"type":330,"tag":365,"props":5079,"children":5080},{"style":395},[5081],{"type":335,"value":532},{"type":330,"tag":365,"props":5083,"children":5084},{"style":372},[5085],{"type":335,"value":537},{"type":330,"tag":365,"props":5087,"children":5088},{"style":378},[5089],{"type":335,"value":392},{"type":330,"tag":365,"props":5091,"children":5092},{"style":395},[5093],{"type":335,"value":398},{"type":330,"tag":365,"props":5095,"children":5096},{"style":401},[5097],{"type":335,"value":550},{"type":330,"tag":365,"props":5099,"children":5100},{"style":395},[5101],{"type":335,"value":409},{"type":330,"tag":365,"props":5103,"children":5104},{"class":367,"line":412},[5105,5109,5114,5118,5122,5126,5130],{"type":330,"tag":365,"props":5106,"children":5107},{"style":372},[5108],{"type":335,"value":527},{"type":330,"tag":365,"props":5110,"children":5111},{"style":395},[5112],{"type":335,"value":5113}," template ",{"type":330,"tag":365,"props":5115,"children":5116},{"style":372},[5117],{"type":335,"value":537},{"type":330,"tag":365,"props":5119,"children":5120},{"style":378},[5121],{"type":335,"value":392},{"type":330,"tag":365,"props":5123,"children":5124},{"style":395},[5125],{"type":335,"value":398},{"type":330,"tag":365,"props":5127,"children":5128},{"style":401},[5129],{"type":335,"value":4886},{"type":330,"tag":365,"props":5131,"children":5132},{"style":395},[5133],{"type":335,"value":409},{"type":330,"tag":365,"props":5135,"children":5136},{"class":367,"line":422},[5137],{"type":330,"tag":365,"props":5138,"children":5139},{"emptyLinePlaceholder":416},[5140],{"type":335,"value":419},{"type":330,"tag":365,"props":5142,"children":5143},{"class":367,"line":459},[5144,5148,5152,5156,5160,5164,5168,5172],{"type":330,"tag":365,"props":5145,"children":5146},{"style":372},[5147],{"type":335,"value":527},{"type":330,"tag":365,"props":5149,"children":5150},{"style":395},[5151],{"type":335,"value":605},{"type":330,"tag":365,"props":5153,"children":5154},{"style":372},[5155],{"type":335,"value":537},{"type":330,"tag":365,"props":5157,"children":5158},{"style":395},[5159],{"type":335,"value":614},{"type":330,"tag":365,"props":5161,"children":5162},{"style":378},[5163],{"type":335,"value":619},{"type":330,"tag":365,"props":5165,"children":5166},{"style":395},[5167],{"type":335,"value":624},{"type":330,"tag":365,"props":5169,"children":5170},{"style":389},[5171],{"type":335,"value":629},{"type":330,"tag":365,"props":5173,"children":5174},{"style":395},[5175],{"type":335,"value":409},{"type":330,"tag":365,"props":5177,"children":5178},{"class":367,"line":636},[5179,5183,5187,5191,5195,5199],{"type":330,"tag":365,"props":5180,"children":5181},{"style":372},[5182],{"type":335,"value":642},{"type":330,"tag":365,"props":5184,"children":5185},{"style":395},[5186],{"type":335,"value":647},{"type":330,"tag":365,"props":5188,"children":5189},{"style":372},[5190],{"type":335,"value":652},{"type":330,"tag":365,"props":5192,"children":5193},{"style":378},[5194],{"type":335,"value":657},{"type":330,"tag":365,"props":5196,"children":5197},{"style":395},[5198],{"type":335,"value":662},{"type":330,"tag":365,"props":5200,"children":5201},{"style":372},[5202],{"type":335,"value":667},{"type":330,"tag":365,"props":5204,"children":5205},{"class":367,"line":670},[5206],{"type":330,"tag":365,"props":5207,"children":5208},{"emptyLinePlaceholder":416},[5209],{"type":335,"value":419},{"type":330,"tag":365,"props":5211,"children":5212},{"class":367,"line":678},[5213,5217,5222,5226,5230,5234],{"type":330,"tag":365,"props":5214,"children":5215},{"style":372},[5216],{"type":335,"value":527},{"type":330,"tag":365,"props":5218,"children":5219},{"style":395},[5220],{"type":335,"value":5221}," text ",{"type":330,"tag":365,"props":5223,"children":5224},{"style":372},[5225],{"type":335,"value":537},{"type":330,"tag":365,"props":5227,"children":5228},{"style":395},[5229],{"type":335,"value":4956},{"type":330,"tag":365,"props":5231,"children":5232},{"style":378},[5233],{"type":335,"value":1164},{"type":330,"tag":365,"props":5235,"children":5236},{"style":395},[5237],{"type":335,"value":2386},{"type":330,"tag":365,"props":5239,"children":5240},{"class":367,"line":1731},[5241,5245],{"type":330,"tag":365,"props":5242,"children":5243},{"style":401},[5244],{"type":335,"value":4972},{"type":330,"tag":365,"props":5246,"children":5247},{"style":395},[5248],{"type":335,"value":2399},{"type":330,"tag":365,"props":5250,"children":5251},{"class":367,"line":1740},[5252],{"type":330,"tag":365,"props":5253,"children":5254},{"style":395},[5255],{"type":335,"value":2407},{"type":330,"tag":365,"props":5257,"children":5258},{"class":367,"line":1797},[5259],{"type":330,"tag":365,"props":5260,"children":5261},{"style":395},[5262],{"type":335,"value":409},{"type":330,"tag":365,"props":5264,"children":5265},{"class":367,"line":1805},[5266],{"type":330,"tag":365,"props":5267,"children":5268},{"emptyLinePlaceholder":416},[5269],{"type":335,"value":419},{"type":330,"tag":365,"props":5271,"children":5272},{"class":367,"line":2119},[5273,5277,5281,5285,5289,5293,5298,5302],{"type":330,"tag":365,"props":5274,"children":5275},{"style":372},[5276],{"type":335,"value":527},{"type":330,"tag":365,"props":5278,"children":5279},{"style":395},[5280],{"type":335,"value":2137},{"type":330,"tag":365,"props":5282,"children":5283},{"style":372},[5284],{"type":335,"value":537},{"type":330,"tag":365,"props":5286,"children":5287},{"style":395},[5288],{"type":335,"value":614},{"type":330,"tag":365,"props":5290,"children":5291},{"style":378},[5292],{"type":335,"value":2150},{"type":330,"tag":365,"props":5294,"children":5295},{"style":395},[5296],{"type":335,"value":5297},"({text ",{"type":330,"tag":365,"props":5299,"children":5300},{"style":372},[5301],{"type":335,"value":537},{"type":330,"tag":365,"props":5303,"children":5304},{"style":395},[5305],{"type":335,"value":5306}," text})\n",{"type":330,"tag":365,"props":5308,"children":5309},{"class":367,"line":2127},[5310,5314,5318,5322,5326,5330],{"type":330,"tag":365,"props":5311,"children":5312},{"style":372},[5313],{"type":335,"value":642},{"type":330,"tag":365,"props":5315,"children":5316},{"style":395},[5317],{"type":335,"value":647},{"type":330,"tag":365,"props":5319,"children":5320},{"style":372},[5321],{"type":335,"value":652},{"type":330,"tag":365,"props":5323,"children":5324},{"style":378},[5325],{"type":335,"value":657},{"type":330,"tag":365,"props":5327,"children":5328},{"style":395},[5329],{"type":335,"value":662},{"type":330,"tag":365,"props":5331,"children":5332},{"style":372},[5333],{"type":335,"value":667},{"type":330,"tag":365,"props":5335,"children":5336},{"class":367,"line":2176},[5337],{"type":330,"tag":365,"props":5338,"children":5339},{"emptyLinePlaceholder":416},[5340],{"type":335,"value":419},{"type":330,"tag":365,"props":5342,"children":5343},{"class":367,"line":2204},[5344,5348,5352,5356],{"type":330,"tag":365,"props":5345,"children":5346},{"style":389},[5347],{"type":335,"value":2218},{"type":330,"tag":365,"props":5349,"children":5350},{"style":395},[5351],{"type":335,"value":2223},{"type":330,"tag":365,"props":5353,"children":5354},{"style":378},[5355],{"type":335,"value":2228},{"type":330,"tag":365,"props":5357,"children":5358},{"style":395},[5359],{"type":335,"value":2233},{"type":330,"tag":365,"props":5361,"children":5362},{"class":367,"line":2212},[5363,5367,5371,5375,5379,5383,5387,5391],{"type":330,"tag":365,"props":5364,"children":5365},{"style":389},[5366],{"type":335,"value":2218},{"type":330,"tag":365,"props":5368,"children":5369},{"style":395},[5370],{"type":335,"value":2223},{"type":330,"tag":365,"props":5372,"children":5373},{"style":378},[5374],{"type":335,"value":3876},{"type":330,"tag":365,"props":5376,"children":5377},{"style":395},[5378],{"type":335,"value":398},{"type":330,"tag":365,"props":5380,"children":5381},{"style":401},[5382],{"type":335,"value":3626},{"type":330,"tag":365,"props":5384,"children":5385},{"style":395},[5386],{"type":335,"value":498},{"type":330,"tag":365,"props":5388,"children":5389},{"style":401},[5390],{"type":335,"value":3635},{"type":330,"tag":365,"props":5392,"children":5393},{"style":395},[5394],{"type":335,"value":409},{"type":330,"tag":331,"props":5396,"children":5397},{},[5398,5404,5406,5412],{"type":330,"tag":338,"props":5399,"children":5401},{"className":5400},[],[5402],{"type":335,"value":5403},"{{name}}",{"type":335,"value":5405}," is HTML-escaped; triple braces (",{"type":330,"tag":338,"props":5407,"children":5409},{"className":5408},[],[5410],{"type":335,"value":5411},"{{{name}}}",{"type":335,"value":5413},") insert raw text. Partials are not available.",{"type":330,"tag":727,"props":5415,"children":5417},{"id":5416},"time-ids-urls-and-html",[5418],{"type":335,"value":5419},"Time, IDs, URLs and HTML",{"type":330,"tag":3903,"props":5421,"children":5422},{},[5423,5462,5488,5537],{"type":330,"tag":3907,"props":5424,"children":5425},{},[5426,5431,5433,5438,5440,5446,5448,5453,5455,5460],{"type":330,"tag":338,"props":5427,"children":5429},{"className":5428},[],[5430],{"type":335,"value":1176},{"type":335,"value":5432}," — portable date arithmetic: ",{"type":330,"tag":338,"props":5434,"children":5436},{"className":5435},[],[5437],{"type":335,"value":1185},{"type":335,"value":5439}," returns Unix seconds, the other methods accept RFC3339 text or Unix seconds and return RFC3339 text. Timezone options use IANA names, for example ",{"type":330,"tag":338,"props":5441,"children":5443},{"className":5442},[],[5444],{"type":335,"value":5445},"{ timezone: \"America/New_York\" }",{"type":335,"value":5447},". See ",{"type":330,"tag":1429,"props":5449,"children":5450},{"href":245},[5451],{"type":335,"value":5452},"working with time",{"type":335,"value":5454}," for the existing runtime ",{"type":330,"tag":338,"props":5456,"children":5458},{"className":5457},[],[5459],{"type":335,"value":1176},{"type":335,"value":5461}," module.",{"type":330,"tag":3907,"props":5463,"children":5464},{},[5465,5470,5472,5478,5480,5486],{"type":330,"tag":338,"props":5466,"children":5468},{"className":5467},[],[5469],{"type":335,"value":1052},{"type":335,"value":5471}," — generate ",{"type":330,"tag":338,"props":5473,"children":5475},{"className":5474},[],[5476],{"type":335,"value":5477},"uuid()",{"type":335,"value":5479}," or sortable ",{"type":330,"tag":338,"props":5481,"children":5483},{"className":5482},[],[5484],{"type":335,"value":5485},"ulid()",{"type":335,"value":5487}," identifiers for correlation IDs and idempotency keys.",{"type":330,"tag":3907,"props":5489,"children":5490},{},[5491,5496,5498,5503,5505,5510,5512,5517,5518,5523,5524,5529,5531,5536],{"type":330,"tag":338,"props":5492,"children":5494},{"className":5493},[],[5495],{"type":335,"value":925},{"type":335,"value":5497}," — ",{"type":330,"tag":338,"props":5499,"children":5501},{"className":5500},[],[5502],{"type":335,"value":451},{"type":335,"value":5504},"/",{"type":330,"tag":338,"props":5506,"children":5508},{"className":5507},[],[5509],{"type":335,"value":940},{"type":335,"value":5511}," URLs and ",{"type":330,"tag":338,"props":5513,"children":5515},{"className":5514},[],[5516],{"type":335,"value":947},{"type":335,"value":5504},{"type":330,"tag":338,"props":5519,"children":5521},{"className":5520},[],[5522],{"type":335,"value":954},{"type":335,"value":5504},{"type":330,"tag":338,"props":5525,"children":5527},{"className":5526},[],[5528],{"type":335,"value":961},{"type":335,"value":5530}," query strings and form bodies. See also ",{"type":330,"tag":1429,"props":5532,"children":5533},{"href":242},[5534],{"type":335,"value":5535},"URL-encoded data",{"type":335,"value":446},{"type":330,"tag":3907,"props":5538,"children":5539},{},[5540,5545,5546,5551,5553,5558,5559,5564,5566,5571],{"type":330,"tag":338,"props":5541,"children":5543},{"className":5542},[],[5544],{"type":335,"value":1232},{"type":335,"value":5497},{"type":330,"tag":338,"props":5547,"children":5549},{"className":5548},[],[5550],{"type":335,"value":1241},{"type":335,"value":5552}," untrusted HTML, or convert it with ",{"type":330,"tag":338,"props":5554,"children":5556},{"className":5555},[],[5557],{"type":335,"value":1248},{"type":335,"value":1492},{"type":330,"tag":338,"props":5560,"children":5562},{"className":5561},[],[5563],{"type":335,"value":1255},{"type":335,"value":5565},", useful when relaying ",{"type":330,"tag":1429,"props":5567,"children":5568},{"href":23},[5569],{"type":335,"value":5570},"emails as webhooks",{"type":335,"value":5572}," into chat tools.",{"type":330,"tag":727,"props":5574,"children":5576},{"id":5575},"limits",[5577],{"type":335,"value":5578},"Limits",{"type":330,"tag":331,"props":5580,"children":5581},{},[5582,5584,5590,5591,5596,5597,5602],{"type":335,"value":5583},"Helper inputs and outputs must be JSON-compatible and are bounded to ",{"type":330,"tag":5585,"props":5586,"children":5587},"strong",{},[5588],{"type":335,"value":5589},"1 MiB",{"type":335,"value":498},{"type":330,"tag":5585,"props":5592,"children":5593},{},[5594],{"type":335,"value":5595},"10,000 nested items",{"type":335,"value":1492},{"type":330,"tag":5585,"props":5598,"children":5599},{},[5600],{"type":335,"value":5601},"64 levels of nesting",{"type":335,"value":5603},". A helper error stops the function with the module and method named in the error message. HTTP calls made from functions follow the platform egress policy.",{"type":330,"tag":727,"props":5605,"children":5607},{"id":5606},"using-secrets-in-functions",[5608],{"type":335,"value":5609},"Using secrets in functions",{"type":330,"tag":331,"props":5611,"children":5612},{},[5613,5615,5620],{"type":335,"value":5614},"API tokens and signing secrets used by your functions don't belong in source code. Store them as write-only ",{"type":330,"tag":1429,"props":5616,"children":5617},{"href":104},[5618],{"type":335,"value":5619},"secret service connections",{"type":335,"value":5621}," and import them by alias:",{"type":330,"tag":355,"props":5623,"children":5625},{"className":357,"code":5624,"language":359,"meta":318,"style":318},"const apiToken = require(\"secret:api-token\")\n",[5626],{"type":330,"tag":338,"props":5627,"children":5628},{"__ignoreMap":318},[5629],{"type":330,"tag":365,"props":5630,"children":5631},{"class":367,"line":368},[5632,5636,5641,5645,5649,5653,5658],{"type":330,"tag":365,"props":5633,"children":5634},{"style":372},[5635],{"type":335,"value":375},{"type":330,"tag":365,"props":5637,"children":5638},{"style":378},[5639],{"type":335,"value":5640}," apiToken",{"type":330,"tag":365,"props":5642,"children":5643},{"style":372},[5644],{"type":335,"value":386},{"type":330,"tag":365,"props":5646,"children":5647},{"style":389},[5648],{"type":335,"value":392},{"type":330,"tag":365,"props":5650,"children":5651},{"style":395},[5652],{"type":335,"value":398},{"type":330,"tag":365,"props":5654,"children":5655},{"style":401},[5656],{"type":335,"value":5657},"\"secret:api-token\"",{"type":330,"tag":365,"props":5659,"children":5660},{"style":395},[5661],{"type":335,"value":409},{"type":330,"tag":331,"props":5663,"children":5664},{},[5665,5667,5672],{"type":335,"value":5666},"See the ",{"type":330,"tag":1429,"props":5668,"children":5669},{"href":104},[5670],{"type":335,"value":5671},"secrets documentation",{"type":335,"value":5673}," for the full setup and binding flow.",{"type":330,"tag":331,"props":5675,"children":5676},{},[5677,5679,5684,5686,5692],{"type":335,"value":5678},"AI providers use a typed ",{"type":330,"tag":1429,"props":5680,"children":5681},{"href":83},[5682],{"type":335,"value":5683},"AI service connection",{"type":335,"value":5685},"\nand a static import such as ",{"type":330,"tag":338,"props":5687,"children":5689},{"className":5688},[],[5690],{"type":335,"value":5691},"require(\"ai:classifier\")",{"type":335,"value":5693},". Webhook Relay AI needs\nno key and shares the account agent's monthly AI allowance.",{"type":330,"tag":5695,"props":5696,"children":5697},"style",{},[5698],{"type":335,"value":5699},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":318,"searchDepth":422,"depth":422,"links":5701},[5702,5703,5704,5705,5706,5707,5708,5709,5710],{"id":729,"depth":412,"text":732},{"id":1516,"depth":412,"text":1519},{"id":2627,"depth":412,"text":2630},{"id":3450,"depth":412,"text":3453},{"id":3994,"depth":412,"text":3997},{"id":4821,"depth":412,"text":4824},{"id":5416,"depth":412,"text":5419},{"id":5575,"depth":412,"text":5578},{"id":5606,"depth":412,"text":5609},"markdown","content:docs:webhooks:functions:15.helper-libraries.md","content","docs/webhooks/functions/15.helper-libraries.md","docs/webhooks/functions/15.helper-libraries","md",{"loc":268},1791655643638]