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