{ "kind": "open-flow-workflow", "version": 1, "name": "Create Stripe Customers from Pipedrive Deals", "content": { "modelVersion": 14, "document": { "bindings": {}, "graph": { "nodes": { "n_8702b5db6ffcb90f": { "name": "Receive Pipedrive deal changes", "kind": "webhook", "bodyFields": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "meta" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "data" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "previous" } ], "method": "POST", "options": { "responseBody": { "kind": "workflow-outputs", "output": "body", "timeoutMs": 60000 }, "responseStatusCodeOutput": "statusCode" } }, "n_52efad151f974698": { "inputs": { "headers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8702b5db6ffcb90f", "output": "headers" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_8702b5db6ffcb90f", "output": "body" } ] }, "expectedAuthorization": { "kind": "unset" }, "companyId": { "kind": "value", "value": "YOUR_COMPANY_ID" } }, "name": "Authenticate and inspect the deal", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "headers" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "expectedAuthorization" }, { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "companyId" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "accepted" }, { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "process" }, { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "integer", "exclusiveMinimum": 0 }, "nullable": false, "handle": "orgId" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Authenticate and inspect the deal", "moduleId": "n_31c0e74222d5a82f", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_be17993ac0b4a01f": { "inputs": {}, "name": "Valid authenticated event?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_52efad151f974698", "output": "accepted" } }, "operator": "isTrue" } ] } ] } ] }, "n_ad265d5c2cb55349": { "inputs": {}, "name": "Won time changed?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_52efad151f974698", "output": "process" } }, "operator": "isTrue" } ] } ] } ] }, "n_cc2626a2f9d1b99f": { "inputs": { "organizationId": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_52efad151f974698", "output": "orgId" } ] } }, "name": "Read the organization", "kind": "task", "task": { "inputs": [ { "description": "Organization ID.", "jsonSchema": { "type": "integer", "exclusiveMinimum": 0, "description": "Organization ID." }, "nullable": false, "handle": "organizationId" }, { "description": "Additional organization fields to include in the response.", "jsonSchema": { "type": "array", "items": { "type": "string", "enum": [ "next_activity_id", "last_activity_id", "open_deals_count", "related_open_deals_count", "closed_deals_count", "related_closed_deals_count", "email_messages_count", "people_count", "activities_count", "done_activities_count", "undone_activities_count", "files_count", "notes_count", "followers_count", "won_deals_count", "related_won_deals_count", "lost_deals_count", "related_lost_deals_count", "smart_bcc_email" ], "description": "Additional organization field accepted by Pipedrive include_fields." }, "minItems": 1, "description": "Additional organization fields to include in the response." }, "nullable": true, "handle": "includeFields", "value": null }, { "description": "Custom field keys to request from Pipedrive.", "jsonSchema": { "type": "array", "items": { "type": "string", "minLength": 1, "description": "Pipedrive custom field key." }, "minItems": 1, "maxItems": 15, "description": "Custom field keys to request from Pipedrive." }, "nullable": true, "handle": "customFields", "value": null } ], "outputs": [ { "description": "Returned organization record.", "jsonSchema": { "type": "object", "properties": { "id": { "type": "integer", "exclusiveMinimum": 0, "description": "Organization ID." }, "name": { "type": "string", "description": "Organization name." }, "owner_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Owner user ID." }, "add_time": { "type": "string", "description": "Creation timestamp." }, "update_time": { "type": "string", "description": "Last update timestamp." }, "is_deleted": { "type": "boolean", "description": "Whether the organization is deleted." }, "visible_to": { "type": "integer", "description": "Pipedrive visibility flag." }, "address": { "type": [ "object", "null" ], "properties": { "value": { "type": [ "string", "null" ], "description": "Full formatted address." }, "country": { "type": [ "string", "null" ], "description": "Country component." }, "admin_area_level_1": { "type": [ "string", "null" ], "description": "First administrative area component." }, "admin_area_level_2": { "type": [ "string", "null" ], "description": "Second administrative area component." }, "locality": { "type": [ "string", "null" ], "description": "City or locality component." }, "sublocality": { "type": [ "string", "null" ], "description": "Neighborhood or sublocality component." }, "route": { "type": [ "string", "null" ], "description": "Street or route component." }, "street_number": { "type": [ "string", "null" ], "description": "Street number component." }, "subpremise": { "type": [ "string", "null" ], "description": "Subpremise component such as suite or apartment." }, "postal_code": { "type": [ "string", "null" ], "description": "Postal code component." } }, "additionalProperties": true, "description": "Organization address." }, "label_ids": { "type": "array", "items": { "type": "integer", "description": "Applied label ID." }, "description": "Applied label IDs." }, "custom_fields": { "type": [ "object", "null" ], "additionalProperties": { "description": "A record value." }, "description": "Custom fields returned by Pipedrive." } }, "required": [ "id", "name" ], "additionalProperties": true, "description": "Returned organization record." }, "nullable": false, "handle": "organization" } ], "name": "Read the organization", "executor": { "kind": "connector", "action": "pipedrive.get_organization" } } }, "n_3b92485e2f69112e": { "inputs": { "organization": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_cc2626a2f9d1b99f", "output": "organization" } ] }, "countryMap": { "kind": "value", "value": {} } }, "name": "Prepare customer lookup", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "id": { "type": "integer", "exclusiveMinimum": 0, "description": "Organization ID." }, "name": { "type": "string", "description": "Organization name." }, "owner_id": { "type": [ "integer", "null" ], "exclusiveMinimum": 0, "description": "Owner user ID." }, "add_time": { "type": "string", "description": "Creation timestamp." }, "update_time": { "type": "string", "description": "Last update timestamp." }, "is_deleted": { "type": "boolean", "description": "Whether the organization is deleted." }, "visible_to": { "type": "integer", "description": "Pipedrive visibility flag." }, "address": { "type": [ "object", "null" ], "properties": { "value": { "type": [ "string", "null" ], "description": "Full formatted address." }, "country": { "type": [ "string", "null" ], "description": "Country component." }, "admin_area_level_1": { "type": [ "string", "null" ], "description": "First administrative area component." }, "admin_area_level_2": { "type": [ "string", "null" ], "description": "Second administrative area component." }, "locality": { "type": [ "string", "null" ], "description": "City or locality component." }, "sublocality": { "type": [ "string", "null" ], "description": "Neighborhood or sublocality component." }, "route": { "type": [ "string", "null" ], "description": "Street or route component." }, "street_number": { "type": [ "string", "null" ], "description": "Street number component." }, "subpremise": { "type": [ "string", "null" ], "description": "Subpremise component such as suite or apartment." }, "postal_code": { "type": [ "string", "null" ], "description": "Postal code component." } }, "additionalProperties": true, "description": "Organization address." }, "label_ids": { "type": "array", "items": { "type": "integer", "description": "Applied label ID." }, "description": "Applied label IDs." }, "custom_fields": { "type": [ "object", "null" ], "additionalProperties": { "description": "A record value." }, "description": "Custom fields returned by Pipedrive." } }, "required": [ "id", "name" ], "additionalProperties": true, "description": "Returned organization record." }, "nullable": false, "handle": "organization" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "countryMap" } ], "outputs": [ { "jsonSchema": { "type": "string", "maxLength": 256 }, "nullable": false, "handle": "name" }, { "jsonSchema": { "type": "object", "properties": { "city": { "type": "string", "description": "City, district, suburb, town, or village." }, "country": { "type": "string", "description": "Two-letter country code, or a freeform country value where Stripe allows it." }, "line1": { "type": "string", "description": "Address line 1, such as the street, PO Box, or company name." }, "line2": { "type": "string", "description": "Address line 2, such as the apartment, suite, unit, or building." }, "postal_code": { "type": "string", "description": "ZIP or postal code." }, "state": { "type": "string", "description": "State, county, province, or region." } }, "additionalProperties": false, "description": "A Stripe address object." }, "nullable": true, "handle": "address" }, { "jsonSchema": { "type": "string", "minLength": 1 }, "nullable": false, "handle": "query" } ], "name": "Prepare customer lookup", "moduleId": "n_df00f0a917acc92b", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_ea7936f876ae79ba": { "inputs": { "query": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3b92485e2f69112e", "output": "query" } ] }, "limit": { "kind": "value", "value": 1 } }, "name": "Search Stripe customers", "kind": "task", "task": { "inputs": [ { "description": "A Stripe customer search query, such as email:'jenny@example.com'.", "jsonSchema": { "type": "string", "minLength": 1, "description": "A Stripe customer search query, such as email:'jenny@example.com'." }, "nullable": false, "handle": "query" }, { "description": "The maximum number of objects to return. Stripe accepts values from 1 to 100.", "jsonSchema": { "type": "integer", "minimum": 1, "maximum": 100, "description": "The maximum number of objects to return. Stripe accepts values from 1 to 100." }, "nullable": true, "handle": "limit", "value": null }, { "description": "A Stripe search pagination token returned by a previous search response.", "jsonSchema": { "type": "string", "description": "A Stripe search pagination token returned by a previous search response." }, "nullable": true, "handle": "page", "value": null } ], "outputs": [ { "description": "A Stripe list response.", "jsonSchema": { "type": "object", "properties": { "object": { "type": "string", "description": "The Stripe response object type." }, "url": { "type": "string", "description": "The Stripe API URL for this list." }, "has_more": { "type": "boolean", "description": "Whether more objects are available after this page." }, "data": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A raw Stripe object returned by the API." }, "description": "Stripe objects returned on this page." } }, "required": [ "object", "url", "has_more", "data" ], "additionalProperties": false, "description": "A Stripe list response." }, "nullable": false, "handle": "customers" } ], "name": "Search Stripe customers", "executor": { "kind": "connector", "action": "stripe.search_customers" } } }, "n_3ed3fca75486dbb4": { "inputs": { "customers": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_ea7936f876ae79ba", "output": "customers" } ] } }, "name": "Check search result", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "object", "properties": { "object": { "type": "string", "description": "The Stripe response object type." }, "url": { "type": "string", "description": "The Stripe API URL for this list." }, "has_more": { "type": "boolean", "description": "Whether more objects are available after this page." }, "data": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": true, "description": "A raw Stripe object returned by the API." }, "description": "Stripe objects returned on this page." } }, "required": [ "object", "url", "has_more", "data" ], "additionalProperties": false, "description": "A Stripe list response." }, "nullable": false, "handle": "customers" } ], "outputs": [ { "jsonSchema": { "type": "boolean" }, "nullable": false, "handle": "create" } ], "name": "Check search result", "moduleId": "n_e50983cf77aaad0f", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_16e6a6d376a16e58": { "inputs": {}, "name": "Customer not found?", "kind": "condition", "matchMode": "first", "cases": [ { "output": "yes", "groups": [ { "expressions": [ { "left": { "kind": "source", "source": { "kind": "node", "nodeId": "n_3ed3fca75486dbb4", "output": "create" } }, "operator": "isTrue" } ] } ] } ] }, "n_2c01915abcdc750d": { "inputs": { "name": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3b92485e2f69112e", "output": "name" } ] }, "address": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_3b92485e2f69112e", "output": "address" } ] } }, "name": "Create Stripe customer", "kind": "task", "task": { "inputs": [ { "description": "The customer's full name or business name.", "jsonSchema": { "type": "string", "maxLength": 256, "description": "The customer's full name or business name." }, "nullable": true, "handle": "name", "value": null }, { "description": "The customer's email address.", "jsonSchema": { "type": "string", "maxLength": 512, "format": "email", "description": "The customer's email address." }, "nullable": true, "handle": "email", "value": null }, { "description": "An arbitrary customer description displayed in the Stripe Dashboard.", "jsonSchema": { "type": "string", "description": "An arbitrary customer description displayed in the Stripe Dashboard." }, "nullable": true, "handle": "description", "value": null }, { "description": "The customer's phone number.", "jsonSchema": { "type": "string", "maxLength": 20, "description": "The customer's phone number." }, "nullable": true, "handle": "phone", "value": null }, { "description": "The customer balance in the smallest currency unit.", "jsonSchema": { "type": "integer", "description": "The customer balance in the smallest currency unit." }, "nullable": true, "handle": "balance", "value": null }, { "description": "A Stripe address object.", "jsonSchema": { "type": "object", "properties": { "city": { "type": "string", "description": "City, district, suburb, town, or village." }, "country": { "type": "string", "description": "Two-letter country code, or a freeform country value where Stripe allows it." }, "line1": { "type": "string", "description": "Address line 1, such as the street, PO Box, or company name." }, "line2": { "type": "string", "description": "Address line 2, such as the apartment, suite, unit, or building." }, "postal_code": { "type": "string", "description": "ZIP or postal code." }, "state": { "type": "string", "description": "State, county, province, or region." } }, "additionalProperties": false, "description": "A Stripe address object." }, "nullable": true, "handle": "address", "value": null }, { "description": "Stripe metadata key-value pairs. Values are forwarded as strings, numbers, booleans, or empty strings.", "jsonSchema": { "type": "object", "additionalProperties": { "anyOf": [ { "type": "string", "description": "A string metadata value." }, { "type": "number", "description": "A numeric metadata value." }, { "type": "boolean", "description": "A boolean metadata value." } ], "description": "One metadata value." }, "description": "Stripe metadata key-value pairs. Values are forwarded as strings, numbers, booleans, or empty strings." }, "nullable": true, "handle": "metadata", "value": null }, { "description": "The customer's tax exemption status.", "jsonSchema": { "type": "string", "enum": [ "none", "exempt", "reverse" ], "description": "The customer's tax exemption status." }, "nullable": true, "handle": "tax_exempt", "value": null } ], "outputs": [ { "description": "A raw Stripe object returned by the API.", "jsonSchema": { "type": [ "object", "null" ], "properties": {}, "additionalProperties": true, "description": "A raw Stripe object returned by the API." }, "nullable": true, "handle": "customer" } ], "name": "Create Stripe customer", "executor": { "kind": "connector", "action": "stripe.create_customer" } } }, "n_e617eece44ca7816": { "inputs": { "status": { "kind": "value", "value": "processed" } }, "name": "Acknowledge the event", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "string" }, "nullable": false, "handle": "status" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Acknowledge the event", "moduleId": "n_1b3475136e32c617", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a63e282c68ad8675": { "inputs": { "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_52efad151f974698", "output": "statusCode" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_52efad151f974698", "output": "body" } ] } }, "name": "Return ignored or rejected event", "kind": "task", "task": { "inputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "outputs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "name": "Return ignored or rejected event", "moduleId": "n_3fba8f33c4f3bb22", "capabilities": [ { "kind": "connector", "mode": "independent", "actions": [] } ] } }, "n_a528c53e780ce160": { "name": "Return webhook response", "kind": "outputs", "outputDefs": [ { "jsonSchema": { "type": "integer" }, "nullable": false, "handle": "statusCode" }, { "jsonSchema": { "type": "object", "additionalProperties": true }, "nullable": false, "handle": "body" } ], "outputMappings": { "statusCode": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a63e282c68ad8675", "output": "statusCode" }, { "kind": "node", "nodeId": "n_e617eece44ca7816", "output": "statusCode" } ] }, "body": { "kind": "sources", "sources": [ { "kind": "node", "nodeId": "n_a63e282c68ad8675", "output": "body" }, { "kind": "node", "nodeId": "n_e617eece44ca7816", "output": "body" } ] } } } }, "edges": [ { "source": "n_8702b5db6ffcb90f", "target": "n_52efad151f974698" }, { "source": "n_52efad151f974698", "target": "n_be17993ac0b4a01f" }, { "source": "n_be17993ac0b4a01f", "target": "n_a63e282c68ad8675", "sourceHandle": "otherwise" }, { "source": "n_be17993ac0b4a01f", "target": "n_ad265d5c2cb55349", "sourceHandle": "yes" }, { "source": "n_ad265d5c2cb55349", "target": "n_a63e282c68ad8675", "sourceHandle": "otherwise" }, { "source": "n_a63e282c68ad8675", "target": "n_a528c53e780ce160" }, { "source": "n_ad265d5c2cb55349", "target": "n_cc2626a2f9d1b99f", "sourceHandle": "yes" }, { "source": "n_cc2626a2f9d1b99f", "target": "n_3b92485e2f69112e" }, { "source": "n_3b92485e2f69112e", "target": "n_ea7936f876ae79ba" }, { "source": "n_ea7936f876ae79ba", "target": "n_3ed3fca75486dbb4" }, { "source": "n_3ed3fca75486dbb4", "target": "n_16e6a6d376a16e58" }, { "source": "n_16e6a6d376a16e58", "target": "n_e617eece44ca7816", "sourceHandle": "otherwise" }, { "source": "n_16e6a6d376a16e58", "target": "n_2c01915abcdc750d", "sourceHandle": "yes" }, { "source": "n_2c01915abcdc750d", "target": "n_e617eece44ca7816" }, { "source": "n_e617eece44ca7816", "target": "n_a528c53e780ce160" } ] } }, "modules": { "n_31c0e74222d5a82f": { "name": "Authenticate and inspect the deal", "imports": [], "source": "import { Buffer } from 'node:buffer';\nexport default function incoming({headers,body,expectedAuthorization,companyId}) {\n const configured=typeof expectedAuthorization==='string'?/^Basic ([A-Za-z0-9+/]+={0,2})$/.exec(expectedAuthorization.trim()):null;\n const secret=configured?Buffer.from(configured[1],'base64').toString('utf8'):'';if(!/^[^:]+:.+$/.test(secret)||/[\\r\\n]/.test(secret))throw Error('Configure the webhook Basic authorization secret');\n const h=Object.entries(headers||{}).filter(([k])=>k.toLowerCase()==='authorization'),match=h.length===1&&typeof h[0][1]==='string'?/^Basic +([A-Za-z0-9+/]+={0,2})$/i.exec(h[0][1].trim()):null,actual=match?Buffer.from(match[1],'base64').toString('utf8'):'';let diff=secret.length^actual.length;for(let i=0;i256||/[\\r\\n]/.test(name))throw Error('Organization name is required');if(raw!=null&&typeof raw!=='object')throw Error('Invalid organization address');const v=k=>raw?.[k];let country=v('country');if(country!=null&&country!==''){if(typeof country!=='string'||!country.trim())throw Error('Invalid country');const codes=new Set('AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW'.split(' ')),key=country.trim().replace(/\\s+/g,' ').toLowerCase(),aliases=countryMap??{};if(typeof aliases!=='object'||Array.isArray(aliases))throw Error('Invalid country mapping');let matches=[];for(const [name,value] of Object.entries(aliases)){if(typeof value!=='string'||!codes.has(value.toUpperCase()))throw Error('Invalid country mapping');if(name.trim().replace(/\\s+/g,' ').toLowerCase()===key)matches.push(value.toUpperCase());}if(matches.length===0){const display=new Intl.DisplayNames(['en'],{type:'region'});for(const c of codes)if(c.toLowerCase()===key||display.of(c).replace(/\\s+/g,' ').toLowerCase()===key)matches.push(c);}matches=[...new Set(matches)];if(matches.length!==1)throw Error('Unknown or ambiguous country; configure a mapping');country=matches[0];}\n const address={};for(const [key,value] of Object.entries({city:v('locality'),line1:[v('route'),v('street_number')].filter(Boolean).join(' '),state:v('admin_area_level_1'),country:country?.toUpperCase(),postal_code:v('postal_code')}))if(value!=null&&value!==''){if(typeof value!=='string')throw Error('Invalid address component');address[key]=value}\n return {name:name.trim(),address,query:\"name:'\"+name.trim().replace(/\\\\/g,'\\\\\\\\').replace(/'/g,\"\\\\'\")+\"'\"};\n}\n" }, "n_e50983cf77aaad0f": { "name": "Check search result", "imports": [], "source": "export default function search({customers}) {if(!customers||!Array.isArray(customers.data)||typeof customers.has_more!=='boolean')throw Error('Invalid Stripe search response');if(customers.data.length===0&&customers.has_more)throw Error('Inconsistent Stripe search page');return {create:customers.data.length===0};}\n" }, "n_1b3475136e32c617": { "name": "Acknowledge the event", "imports": [], "source": "export default function reply({status}){return{statusCode:200,body:{status}}}\n" }, "n_3fba8f33c4f3bb22": { "name": "Return ignored or rejected event", "imports": [], "source": "export default function forward({statusCode,body}){return{statusCode,body}}\n" } } }, "presentation": { "designer": { "version": 1, "flow": { "direction": "vertical" } } } }