@pipe0/base 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -81,7 +81,7 @@ How do you...`]}},crustdata_post_list:{label:`Crustdata Post list`,type:`json`,f
81
81
  …`,inputType:`text`,minLength:1,maxLength:1e6,expectedTagType:`string`,expectedTagFormat:`markdown`,multiline:!0}),output_fields:P(r.object({[pE.name]:D({fieldName:pE.name})}))})}),hE={"email-send-resend-v1-resend":{allowManagedConnection:!1,provider:`resend`,credits:null,mode:null}},gE=class extends B{pipeId=fE;payload;payloadSchema=mE;billableOperations=hE;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`resend`]}estimateBillableOperations(e){return H(e,`email-send-resend-v1-resend`)}getTemplatedFields(){return[this.payload.config.from,this.payload.config.to,this.payload.config.reply_to,this.payload.config.subject,this.payload.config.body]}getInputRequirement(){return ep(this.getTemplatedFields())}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[pE.name]:this.catalogOutput(pE)}}getConnectionsRequirements(){return[{provider:`resend`,rateLimitRatio:1,rateLimitOperation:`resend_generic`,allowManagedConnection:!1}]}},_E=mE,vE={pipeId:fE,basePipe:U(fE),label:`Send email with Resend`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Send an email with Resend.`,guide:"Send an email via Resend. From, To, Reply-To, Subject and Body are templated config fields — reference upstream fields with `{{ field_name }}` and stored secrets with `{{ SECRETS.KEY }}`. Requires a Resend vault connection (call list_connections to find one).",tags:[V.EMAIL],keywords:[`outreach`,`message`,`mail`,`deliver`,`outbound`,`transactional`],docPath:W(fE),billableOperations:hE,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[`resend`],defaultInputRequirement:null,managedProviders:[],deprecatedProviders:[],defaultPayload:{pipe_id:fE,connector:{strategy:`first`,connections:[]},run_if:null,config:{from:``,to:``,reply_to:``,subject:``,body:``,output_fields:{resend_email_success:{alias:``,enabled:!0}}}}},yE=`email:validate:zerobounce@1`,bE=_(`email`),xE=_(`zerobounce_validation_status`),SE=_(`zerobounce_validation_match`),CE=r.object({pipe_id:r.literal(yE),connector:w(),run_if:x(),config:r.object({input_fields:F(r.object({[bE.name]:T({fieldName:bE.name})})),output_fields:P(r.object({[SE.name]:D({fieldName:SE.name}),[xE.name]:D({fieldName:xE.name})}))}).optional()}),wE=e=>R(G(bE,e)),TE={"email-validate-zerobounce-v1-zerobounce":{provider:`zerobounce`,allowManagedConnection:!0,credits:{default:.4,level1:{credits:.3,weight:1},level2:{credits:.15,weight:6}},mode:`always`}},EE=class extends B{pipeId=yE;payload;payloadSchema=CE;billableOperations=TE;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`zerobounce`]}estimateBillableOperations(e){return H(e,`email-validate-zerobounce-v1-zerobounce`)}getInputRequirement(){return wE(this.payload.config)}getRawOutputFields(){return{[xE.name]:this.catalogOutput(xE),[SE.name]:this.catalogOutput(SE)}}getConnectionsRequirements(){return[{provider:`zerobounce`,rateLimitRatio:1,rateLimitOperation:`zerobounce_generic`,allowManagedConnection:!0}]}},DE=CE,OE={pipeId:yE,basePipe:U(yE),label:`Validate email`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Verify email address against various factors, including syntax, domain, and server existence, to ensure it is deliverable and active.`,tags:[V.EMAIL],keywords:[`verify`,`verification`,`bounce`,`deliverability`,`check`,`clean`],docPath:W(yE),billableOperations:TE,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`zerobounce`],managedProviders:[`zerobounce`],deprecatedProviders:[],defaultInputRequirement:wE(null),defaultPayload:{pipe_id:yE,connector:null,run_if:null,config:{input_fields:{email:{alias:``}},output_fields:{zerobounce_validation_status:{alias:``,enabled:!0},zerobounce_validation_match:{alias:``,enabled:!0}}}}},kE=`email:write@1`,AE=`email-write-v1`,jE=Yc(AE),ME=_(`email_subject`),NE=_(`email_body`),PE=r.object({pipe_id:r.literal(kE),connector:w(),run_if:x(),config:r.object({template:Wl({sectionKey:`general`,label:`Prompt`,path:`config.template`,placeholder:J(`prompt`),groupPath:`config.prompt`,required:!0}),model:wu({sectionKey:`general`,label:`Model`,path:`config.model`,groupPath:`config.prompt`,billableOperations:jE,defaultValue:Bc}),signature:Su({sectionKey:`general`,label:`Signature (Markdown)`,path:`config.signature`,groupPath:`config.email`,minLength:5,rows:10}),persona:Cu({sectionKey:`general`,label:`Persona`,info:`Define the unique tone of your email`,path:`config.persona`,groupPath:`config.prompt`,required:!1,options:[{label:`Sales`,value:`sales`},{label:`Human Resources`,value:`human_resources`},{label:`Customer Success`,value:`customer_success`}]}),output_fields:P(r.object({[ME.name]:D({fieldName:ME.name}),[NE.name]:D({fieldName:NE.name})}))})}),FE=class extends B{pipeId=kE;payload;payloadSchema=PE;billableOperations=jE;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return Hc(this.payload.config.model)}estimateBillableOperations(e){return Zc(e,{model:this.payload.config.model,prefix:AE,inputTokens:600,outputTokens:800})}getInputRequirement(){return ep([this.payload.config.template])}getSecretRequirements(){return q([this.payload.config.template])}getConstantRequirements(){return tp([this.payload.config.template])}getRawOutputFields(){return{[ME.name]:this.catalogOutput(ME),[NE.name]:this.catalogOutput(NE)}}getConnectionsRequirements(){return Uc(this.payload.config.model)}},IE=PE,LE={pipeId:kE,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(kE),label:`Email writer`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`An AI agent specialized in composing emails.`,guide:`AI email composer. Outputs: email_subject, email_body. Pair with email:send:gmail@1 or email:send:resend@1 to send the composed email. Requires 'email' field in input records for the sender pipe.`,tags:[V.AI],keywords:[`ai`,`compose`,`draft`,`generate`,`copywriting`,`personalize`,`outreach`],docPath:W(kE),defaultInputRequirement:null,billableOperations:jE,allowedUserConnectionProviders:Wc(),managedProviders:Wc(),deprecatedProviders:[],defaultPayload:{pipe_id:kE,connector:null,run_if:null,config:{template:``,output_fields:{email_body:{alias:``,enabled:!0},email_subject:{alias:``,enabled:!0}},persona:`sales`,model:Bc,signature:``}}},RE=`field:domainify@1`,zE=_(`url_input`),BE=_(`domain`),VE=r.object({pipe_id:r.literal(RE),run_if:x(),connector:Kl(),config:r.object({input_fields:F(r.object({[zE.name]:T({fieldName:zE.name})})),output_fields:P(r.object({[BE.name]:D({fieldName:BE.name})}))}).optional()}),HE=e=>R(G(zE,e)),UE={"field-domainify-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},WE=class extends B{pipeId=RE;payload;payloadSchema=VE;billableOperations=UE;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getInputRequirement(){return HE(this.payload.config)}getRawOutputFields(){return{[BE.name]:this.catalogOutput(BE)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},GE=VE,KE={pipeId:RE,basePipe:U(RE),label:`Extract domain`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Transform URL input into a domain. Also tolerates bare domains and email addresses (the part after @ is used). Examples: 'https://go.com' → 'go.com'; 'jane@acme.io' → 'acme.io'.`,tags:[V.LOGIC,V.FIELDS],keywords:[`url`,`website`,`hostname`,`clean`,`strip`,`parse`],docPath:W(RE),billableOperations:UE,defaultInputRequirement:HE(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:RE,run_if:null,connector:null,config:{input_fields:{url_input:{alias:``}},output_fields:{domain:{alias:``,enabled:!0}}}}},qE=`field:slugify@1`,JE=_(`string_input`),YE=_(`slugified`),XE=r.object({pipe_id:r.literal(qE),run_if:x(),connector:Kl(),config:r.object({input_fields:F(r.object({[JE.name]:T({fieldName:JE.name})})),output_fields:P(r.object({[YE.name]:D({fieldName:YE.name})}))}).optional()}),ZE=e=>R(G(JE,e)),QE={"field-slugify-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},$E=class extends B{pipeId=qE;payload;payloadSchema=XE;billableOperations=QE;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getInputRequirement(){return ZE(this.payload.config)}getRawOutputFields(){return{[YE.name]:this.catalogOutput(YE)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},eD=XE,tD={pipeId:qE,basePipe:U(qE),label:`Slugify field`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Strip a field value of characters not commonly found in slugs.`,tags:[V.LOGIC,V.FIELDS],keywords:[`clean`,`sanitize`,`normalize`,`url safe`,`format`,`strip`],docPath:W(qE),billableOperations:QE,defaultInputRequirement:ZE(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:qE,run_if:null,connector:null,config:{input_fields:{string_input:{alias:``}},output_fields:{slugified:{alias:``,enabled:!0}}}}},nD=`field:timestamp@1`,rD=_(`timestamp`),iD=r.object({pipe_id:r.literal(nD),run_if:x(),connector:Kl(),config:r.object({offset_days:Eu({label:`Offset (days)`,info:`Shift the stamped moment by this many days: positive = future (a follow-up or expiry date), negative = past. Empty = now.`,path:`config.offset_days`,groupPath:`config.general`,sectionKey:`general`,min:-36500,max:36500}).nullish(),granularity:Cu({label:`Granularity`,description:`"datetime" (default) keeps the full instant; "date" truncates to midnight UTC for stable date-only comparisons and cohort labels.`,path:`config.granularity`,groupPath:`config.general`,sectionKey:`general`,required:!1,options:[{label:`Datetime`,value:`datetime`},{label:`Date`,value:`date`}]}).nullish(),output_fields:P(r.object({[rD.name]:D({fieldName:rD.name})}))}).optional()}),aD={"field-timestamp-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},oD=class extends B{pipeId=nD;payload;payloadSchema=iD;billableOperations=aD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getInputRequirement(){return z()}getRawOutputFields(){return{[rD.name]:this.catalogOutput(rD)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},sD=iD,cD={pipeId:nD,basePipe:U(nD),label:`Timestamp`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Write the moment the pipe ran (ISO 8601, UTC) into a column — optionally offset into the future/past or truncated to a date. The building block for freshness cadences, follow-up dates, and expiry columns.`,guide:`Stamps the run moment into one datetime column (alias it to name the moment: last_attempted_at, next_review_at, valid_until). It has NO typed inputs, so its cell NEVER re-runs on data drift — it recomputes only when force-requeued (rows:enrich@1 run_statuses covering its current status) or when this config changes. Pair with a run_if referencing the field whose attempt it stamps: the run_if reference is what ORDERS this pipe after that field's producer, so list EVERY status the field can end in (completed, failed, no_result, skipped ⇒ effectively always-true) — a narrower set wipes the stamp to skipped on non-matching forced runs. config.offset_days shifts the moment (positive = future: follow-up/expiry dates that feed older_than_days / within_last_days conditions; negative = past); config.granularity 'date' truncates to midnight UTC for stable date-only comparisons. Derives from the run moment + static config ONLY — for date math over a row's own fields, use a dedicated pipe, not this one. Deterministic-local: runs for REAL in sandbox, FREE pipe0 operation.`,tags:[V.LOGIC,V.FIELDS],keywords:[`timestamp`,`now`,`date`,`time`,`stamp`,`enriched at`,`last run`,`freshness`,`expiry`,`follow up`],docPath:W(nD),billableOperations:aD,defaultInputRequirement:null,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:nD,run_if:null,connector:null,config:{offset_days:null,granularity:``,output_fields:{timestamp:{alias:``,enabled:!0}}}}};function lD({name:e,resolvedName:t,source:n}){let r=e===t?`'${e}'`:`'${e}' (resolved to '${t}')`;return n?`${r} (from ${n})`:r}const uD=e=>(e.kind===`all`||e.kind===`any`)&&e.of.length===0;function dD(e){switch(e.kind){case`field`:return lD(e.field);case`optional`:return`[optional ${lD(e.field)}]`;case`all`:case`any`:{let t=e.of.filter(e=>!uD(e));return t.length===0?`(none)`:t.length===1?dD(t[0]):`(${t.map(dD).join(e.kind===`all`?` AND `:` OR `)})`}}}function fD(e,t){return`Pipe input requirement is not satisfied${t?.pipeId!==void 0||t?.index!==void 0?` for pipe${t.index===void 0?``:` at index ${t.index}`}${t.pipeId===void 0?``:` (${t.pipeId})`}`:``}: ${dD(e)}. Map missing fields to existing ones, add a pipe that outputs them, or include them in your inputs.`}var pD=class extends Error{constructor(e){super(`Request validation failed (${e.length} errors): ${e.join(`, `)}`),this.errors=e,this.name=`RequestValidationError`,Object.setPrototypeOf(this,new.target.prototype)}};const mD={ConditionTargetFieldNotFound:({fieldName:e,pipeId:t,pipeIdx:n})=>({code:`ConditionTargetFieldNotFound`,message:`${t} (idx: ${n}) has an invalid condition. Field '${e}' not found.`}),ConditionValueOnJsonField:({fieldName:e,pipeId:t,pipeIdx:n})=>({code:`ConditionValueOnJsonField`,message:`${t} (idx: ${n}) has an invalid condition. '${e}' is a json field — its VALUE cannot be compared. Use a STATUS condition (property: "status"), or extract the nested property into its own flat field first.`}),FaultyEnrichmentOrder:()=>({code:`FaultyEnrichmentOrder`,message:`Enrichment not found while ordering. Was the request invalid?`}),MustDefineAnnotations:()=>({code:`MustDefineAnnotations`,message:`Must define either input or field annoations to validate pipes payload.`}),CircularDependency:({currentPipe:e,circularPipe:t})=>({code:`CircularDependency`,message:`'${e.pipe_id}' (${e.idx}) and '${t.pipeId}' (${t.idx}) create a dependency loop. They both need the other's output to complete. Neither can complete. You can map the pipe outputs or input to fields with different names if you want the pipes to be independent or each other.`}),ValidationFailed:({error:e})=>({code:`ValidationFailed`,message:`Failed to validate task request: ${e instanceof Error?e.message:String(e)}`}),MissingCustomConnections:({pipeId:e,index:t,missingProviders:n})=>({code:`MissingCustomConnections`,message:`Pipe ${e} (index ${t}) requires you to specify custom connections for the providers ${n.join(`, `)}. Create the custom connections in the dashbard and reference them in your request.`}),ResponseGenerationFailed:({error:e})=>({code:`ResponseGenerationFailed`,message:`Failed to generate response: ${e instanceof Error?e.message:String(e)}`}),InputValuesMustHaveSameType:({pipeId:e,fieldNames:t})=>({code:`InputValuesMustHaveSameType`,message:`Pipe ${e} requires all input values to have the same type. But values ${t.join(`, `)} have different types.`}),NotValidated:()=>({code:`NotValidated`,message:`PipelineRequest must be validated before accessing results`}),MissingIdInInput:()=>({code:`MissingIdInInput`,message:`Inputs missing 'id' property.`}),InputDataTypeMismatch:({key:e,derivedInputFieldType:t,fieldType:n})=>({code:`InputDataTypeMismatch`,message:`Input data has values with matching keys '${e}' but different types. Expected type: '${t}'. Actual: '${n}'.`}),UnresolvableDependency:({index:e,dependencyIndex:t})=>({code:`UnresolvableDependency`,message:`Unresolvable dependency at index ${e} to ${t}`}),RequirementUnmet:({requirement:e,pipeId:t,index:n})=>({code:`RequirementUnmet`,message:fD(e,{pipeId:t,index:n})}),HardInputDependencyViolation:({index:e,indexPipeId:t,dependencyIndex:n,dependencyIndexPipeId:r})=>({code:`HardInputDependencyViolation`,message:`Dependency violation: pipe at idx: ${e} (${t}) must come after pipe at idx: ${n} (${r})`}),HardConditionDependencyViolation:({index:e,indexPipeId:t,dependencyIndex:n,dependencyIndexPipeId:r})=>({code:`HardConditionDependencyViolation`,message:`Dependency violation: pipe at idx: ${e} (${t}) has a condition that points to pipe at idx: ${n} (${r}). But pipe index: ${e} (${t}) is always must be processed after pipe at index ${n} (${r}). This is due to input requirements or other conditions.`}),DuplicateInitialField:({name:e})=>({code:`DuplicateInitialField`,message:`Duplicate initial field '${e}' detected. Each field must be defined only once.`}),MissingInputId:({index:e})=>({code:`MissingInputId`,message:`Input record at index ${e} is missing a required ID field.`}),InvalidId:()=>({code:`InvalidId`,message:`Cell IDs must be numbers or strings`}),IDConflict:({index:e,id:t})=>({code:`IDConflict`,message:`Input data at index ${e} has Id conflict. Id '${t}' is not unique.`}),UnknownResolver:({pipeId:e,index:t})=>({code:`UnknownResolver`,message:`Unknown pipe '${e}' specified at position ${t}.`}),DuplicatePipeOutput:({pipeId:e,outputField:t})=>({code:`DuplicateEnrichmentOutput`,message:`Field conflict for '${e}'. Cannot add output field ${lD(t)} to pipeline because it already exists. Try renaming it.`}),ReservedOutputFieldName:({})=>({code:`ReservedOutputFieldName`,message:`'id' is reserved field name. Please rename your output field.`}),InputDataDoesNotMatchOutputField:({index:e,resolvedName:t,type:n,inputValueType:r})=>({code:`InputDataDoesNotMatchOutputField`,message:`Input at position ${e} provided data for field '${t}' that did not match expected type. Expected: '${n}', Actual: '${r}'.`}),AmbiguousDependency:({fieldName:e})=>({code:`AmbiguousDependency`,message:`Found more than one pipe that produces field: ${e}. Rename or disable the field to add it.`}),EmptyObjectProperty:()=>({code:`EmptyObjectProperty`,message:`Input data contains empty object property "". This is not allowed.`}),JSONSchemaMissing:({schemaRef:e,outputName:t})=>({code:`JSONSchemaMissing`,message:`Missing jsonSchema '${e}' for output with name '${t}'.`}),InvalidJSONSchema:({schemaRef:e})=>({code:`InvalidJSONSchema`,message:`JSON Schema (ref: ${e}) is invalid.`}),MissingOutputFieldDescription:({outputName:e})=>({code:`MissingOutputFieldDescription`,message:`The output field ${e} is missing a "description" property. Define it {{ ${e} description="Foo bar" }}`}),InvalidFormatTag:({outputName:e,format:t})=>({code:`InvalidFormatTag`,message:`The output field ${e} has an invalid format tag ${t}.`}),RecursiveExpandedValue:()=>({code:`RecursiveExpandedValue`,message:`Your input values contain a recursive expanded valuetype `})};var hD=class extends Error{},gD=class extends hD{codes;appErrors;constructor(e){super(e.map(e=>e.message).join(`, `)||`Unknown`),this.errors=e,this.codes=e.map(e=>e.code),this.appErrors=e}};const _D=`fields:merge@1`,vD=_(`merge_result`),yD=r.object({pipe_id:r.literal(_D),connector:Kl(),run_if:x(),config:r.object({merge_fields:nu({sectionKey:`general`,groupPath:`config.general`,path:`config.merge_fields`,label:`Fields`,info:`Provide references to input fields`,minItems:1}),output_fields:P(r.object({[vD.name]:D({fieldName:vD.name})}))})}),bD={"fields-merge-v1-pipe0":{credits:{default:0},allowManagedConnection:!0,provider:`pipe0`,mode:`always`}},xD=class extends B{pipeId=_D;payload;payloadSchema=yD;billableOperations=bD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`fields-merge-v1-pipe0`)}getInputRequirement(){let e=this.payload.config.merge_fields.map(e=>e.field_name),t;return gd(...this.payload.config.merge_fields.map(n=>R({format:null,type:r=>{let i=Id(r,e)[n.field_name],a=i?.type?i.type:`unknown`;if(a!==`unknown`){if(t&&t!==a)throw new gD([mD.InputValuesMustHaveSameType({pipeId:this.pipeId,fieldNames:e})]);t=a}return i?.type?i.type:`unknown`},label:``,description:``,name:n.field_name,resolvedName:n.field_name})))}getRawOutputFields(){return{[vD.name]:this.catalogOutput(vD,{resolveType:e=>{let t=Id(e,this.payload.config.merge_fields.map(e=>e.field_name));return Object.values(t).find(e=>!!e.type)?.type||`string`}})}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},SD=yD,CD={pipeId:_D,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(_D),label:`Merge fields`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Join one or more fields into one field. The final result will be the first defined field. A single-source merge pins a stable output name that additional sources can join later without consumers changing.`,tags:[V.FIELDS,V.LOGIC],keywords:[`combine`,`join`,`coalesce`,`fallback`,`concat`,`first defined`,`alias`],docPath:W(_D),defaultInputRequirement:null,billableOperations:bD,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:_D,connector:null,run_if:null,config:{merge_fields:[],output_fields:{merge_result:{alias:``,enabled:!0}}}}},wD=`formula:run@1`,TD=_(`formula_result`),ED=[`string`,`number`,`boolean`,`date`,`json`],DD={string:{type:`string`,format:`text`},number:{type:`number`,format:`decimal`},boolean:{type:`boolean`,format:null},date:{type:`string`,format:`date`},json:{type:`json`,format:`json_object`}},OD=r.object({pipe_id:r.literal(wD),run_if:x(),connector:Kl(),config:r.object({code:Su({label:`Formula`,info:"Synchronous JavaScript body that must `return` a value. Mapped columns are available as `inputs.<column_name>`. Standard built-ins only (Math, String, Array, Date, RegExp, Number, Object, JSON) — no network, imports, or async.",path:`config.code`,groupPath:`config.general`,sectionKey:`general`,rows:8,minLength:1,maxLength:1e4,placeholder:`const days = inputs.primary_seniority === "c_suite" ? 90 : 270;
82
82
  return new Date(Date.now() - days * 86400000).toISOString().slice(0, 10);`}),formula_inputs:nu({label:`Input columns`,info:`Columns injected into the formula as inputs.<column_name>. The formula re-runs when any of them changes.`,path:`config.formula_inputs`,groupPath:`config.general`,sectionKey:`general`}),result_type:Cu({label:`Result type`,info:`Type of the result column. The returned value must match it (a date is a YYYY-MM-DD string).`,path:`config.result_type`,groupPath:`config.general`,sectionKey:`general`,required:!1,defaultValue:`string`,options:[{value:`string`,label:`String`},{value:`number`,label:`Number`},{value:`boolean`,label:`Boolean`},{value:`date`,label:`Date`},{value:`json`,label:`JSON`}]}),output_fields:P(r.object({[TD.name]:D({fieldName:TD.name})}))})}),kD={"formula-run-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},AD=class extends B{pipeId=wD;payload;payloadSchema=OD;billableOperations=kD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getInputRequirement(){return z(...this.payload.config.formula_inputs.map(e=>R({name:e.field_name,resolvedName:e.field_name,label:``,description:``,source:`config.formula_inputs — columns injected as inputs.<column_name>`,type:`unknown`,format:null})))}getRawOutputFields(){let e=DD[this.payload.config.result_type||`string`];return{[TD.name]:this.catalogOutput(TD,{isPrimaryOutput:!0,resolveType:()=>e.type,resolveFormat:()=>e.format})}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_generic`,allowManagedConnection:!0}]}},jD=OD,MD={pipeId:wD,basePipe:U(wD),label:`Formula`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Compute a value per row with a JavaScript formula over mapped columns — cleanup, math, conditionals, date arithmetic — without an external provider.`,guide:"Runs config.code as a synchronous JavaScript body in an isolated remote sandbox: standard built-ins (Math, String, Array, Date, RegExp, Number, Object, JSON) and nothing else — NO network, imports, or async. Mapped columns arrive as `inputs.<column_name>` (null when the cell is empty), typed as JavaScript values — but values arrive AS STORED, so coerce when the type matters (a manually-entered number can arrive as a string: `Number(inputs.x)`). The clock (Date.now(), new Date()) is the real run-time clock — plain JavaScript, no injected globals. The body must `return` a JSON-serializable value matching config.result_type; pick 'date' to emit YYYY-MM-DD strings that date conditions (older_than_days / within_last_days) and date-input pipes can consume — e.g. derive a per-row signal_window_start from primary_seniority for signals:personprofilematch@1. Each mapped column is a typed input: the cell re-runs when an input value changes, and editing the code re-runs every row (config drift). Errors (throw, timeout, non-serializable result, type mismatch) fail the cell with the message. Executes remotely in an isolated worker with strict CPU/memory caps; FREE pipe0 operation.",docPath:W(wD),tags:[V.LOGIC,V.FIELDS],keywords:[`javascript`,`js`,`code`,`compute`,`calculate`,`derive`,`expression`,`transform`],billableOperations:kD,defaultInputRequirement:null,inputFieldMode:`static`,outputFieldMode:`config`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:wD,run_if:null,connector:null,config:{code:``,formula_inputs:[],result_type:`string`,output_fields:{formula_result:{alias:``,enabled:!0}}}}},ND=`http:request@1`,PD=_(`http_response_status`),FD=_(`http_response_body`),ID=_(`http_response_headers`),LD=r.object({pipe_id:r.literal(ND),connector:Kl(),run_if:x(),config:r.object({method:Cu({sectionKey:`general`,groupPath:`config.general`,path:`config.method`,label:`Method`,defaultValue:`GET`,options:[...[{value:`GET`,label:`GET`},{value:`POST`,label:`POST`},{value:`PUT`,label:`PUT`},{value:`PATCH`,label:`PATCH`},{value:`DELETE`,label:`DELETE`}]],required:!0}),url:S({sectionKey:`general`,groupPath:`config.general`,path:`config.url`,label:`Endpoint`,info:"Target URL. Only http/https. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`https://api.example.com/v1/things`,inputType:`text`,minLength:1,maxLength:2048,expectedTagType:`string`,expectedTagFormat:`text`}),query_params:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.query_params`,label:`Query parameters`,info:"Appended to the URL. In the value column, type `/` to insert a field or secret reference.",keyLabel:`Key`,valueLabel:`Value`,keyPlaceholder:`page`,valuePlaceholder:`1`,maxKeys:50}),body:S({sectionKey:`general`,groupPath:`config.general`,path:`config.body`,label:`Body`,info:"Sent verbatim as the request body. Type `@` to insert a field reference or `$` to insert a secret reference. Set Content-Type via Headers.",placeholder:`{
83
83
  "key": "value"
84
- }`,inputType:`text`,maxLength:1e6,expectedTagType:`string`,expectedTagFormat:`text`,multiline:!0}).nullable(),headers:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.headers`,label:`Headers`,info:"In the value column, type `/` to insert a field or secret reference (e.g. `Bearer {{ secret … }}`).",keyLabel:`Header`,valueLabel:`Value`,keyPlaceholder:`Authorization`,valuePlaceholder:`Bearer {{ secret … }}`,maxKeys:50}),expected_response_schema:Ou({sectionKey:`general`,groupPath:`config.advanced`,path:`config.expected_response_schema`,label:`Expected response shape`,description:`Optional JSON Schema. Successful responses that don't satisfy it are marked failed. Extra properties are always tolerated (whitelist).`,allowEmpty:!0}).optional(),output_fields:P(r.object({[PD.name]:D({fieldName:PD.name}),[FD.name]:D({fieldName:FD.name}),[ID.name]:D({fieldName:ID.name})}))})}),RD={"http-request-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:.001},mode:`always`}},zD=class extends B{pipeId=ND;payload;payloadSchema=LD;billableOperations=RD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`http-request-v1-pipe0`)}getTemplatedFields(){return[this.payload.config.url,this.payload.config.body,...Object.values(this.payload.config.query_params??{}),...Object.values(this.payload.config.headers??{})]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[PD.name]:this.catalogOutput(PD),[FD.name]:this.catalogOutput(FD),[ID.name]:this.catalogOutput(ID)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},BD=LD,VD={pipeId:ND,basePipe:U(ND),label:`HTTP request`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Make a generic GET/POST/PUT/PATCH/DELETE HTTP request and capture the JSON response. Optionally validate the response against a JSON schema.`,tags:[V.LOGIC,V.JSON,V.NEW],keywords:[`api`,`rest`,`webhook`,`fetch`,`get`,`post`,`endpoint`,`curl`],docPath:W(ND),billableOperations:RD,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:ND,run_if:null,connector:null,config:{method:`GET`,url:``,query_params:{},body:``,headers:{},expected_response_schema:{},output_fields:{http_response_status:{alias:``,enabled:!0},http_response_body:{alias:``,enabled:!0},http_response_headers:{alias:``,enabled:!1}}}}},HD=`json:extract:multi@1`,UD=r.object({pipe_id:r.literal(HD),run_if:x(),connector:Kl(),config:r.object({json_extraction:pl()})}),WD={"json-extract-multi-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},GD=class extends B{pipeId=HD;payload;payloadSchema=UD;billableOperations=WD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`json-extract-multi-v1-pipe0`)}getInputRequirement(){return R({description:``,name:this.payload.config.json_extraction.field_name,format:null,label:``,type:`json`,resolvedName:this.payload.config.json_extraction.field_name})}getRawOutputFields(){let e={};for(let t of this.payload.config.json_extraction.extractions)e[t.output_field.name||t.output_field.name]={description:`Extracted value from JSON input field ${this.payload.config.json_extraction.field_name}.`,enabled:!0,format:t.output_field.format||null,label:t.output_field.label||`Extract JSON`,name:t.output_field.name,resolvedName:t.output_field.name,jsonMeta:null,type:t.output_field.type,isCatalogFIeld:!1,isPrimaryOutput:!1};return e}getConnectionsRequirements(){return[]}},KD=UD,qD={pipeId:HD,basePipe:U(HD),inputFieldMode:`config`,outputFieldMode:`config`,label:`JSON extract`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Extract nested JSON properties into new output fields.`,guide:'Deterministic JSON extraction — PREFER this over prompt:run@1 whenever you need a value out of a JSON / known-schema column (no LLM, reproducible, schedulable). config.json_extraction.field_name is the source json column; each extraction has a JSONata `path` plus an output_field. Read the source column\'s JSON schema (get_pipe_schema / get_search_schema output fields, or get_sheet_schema) to author the path. Examples over a profile\'s employment_history array: `employment_history[is_current_employer=true][]` (array of current jobs → output_field.type "json"); `employment_history[is_primary_current_employer=true].company_domain` (scalar → output_field.type "string"). Set output_field.type to "json" for an object/array result, "string" for a scalar. CRITICAL for a list you will fan out (e.g. into row:expandappend:sheet@1): a JSONata filter returns the matched ELEMENT when exactly one row matches but an ARRAY when several do — so ALWAYS append the array constructor `[]` to force a consistent array in every row (`employment_history[is_current_employer=true][]`, not `...=true]`). Without it the column is an object in single-match rows and an array in others, and the downstream expand rejects the object rows. To confirm a NEW path resolves the shape you expect before running anything downstream, switch the sheet to SANDBOX (env:change@1) and run just this extraction — it runs for REAL in sandbox (no writes, no spend), so you can read the actual result, fix the path, then switch back to production.',docPath:W(HD),tags:[V.JSON],keywords:[`parse`,`pick`,`path`,`nested`,`property`,`jsonata`,`unpack`],managedProviders:[`pipe0`],deprecatedProviders:[],allowedUserConnectionProviders:[],billableOperations:WD,defaultInputRequirement:null,defaultPayload:{pipe_id:HD,run_if:null,connector:null,config:{json_extraction:{field_name:``,extractions:[]}}}},JD=`lead:enroll:amplemarket@1`,YD={"lead-enroll-amplemarket-v1-amplemarket":{allowManagedConnection:!1,provider:`amplemarket`,credits:null,mode:null}},XD=_(`email`),ZD=_(`profile_url`),QD=_(`amplemarket_sequence_id`),$D=new Set([`active`,`paused`]),eO=[{label:`Demo · Q3 Outbound`,value:`seq_sandbox_1`},{label:`Demo · Founder Intros`,value:`seq_sandbox_2`}],tO=1e4;async function nO({secret:e,signal:t}){let n=[],r=`https://api.amplemarket.com/sequences?page[size]=100`;for(let i=0;i<10&&r;i++){let i=await fetch(r,{headers:{Authorization:`Bearer ${e}`},signal:t});if(!i.ok){let e=await i.text();throw new K.HttpError({msg:e})}let a=await i.json();n.push(...a.sequences??[]);let o=a._links?.next?.href;r=o?new URL(o,`https://api.amplemarket.com`).toString():null}return n}const rO=r.object({pipe_id:r.literal(JD),connector:C(),run_if:x(),config:r.object({sequence_id:ku({sectionKey:`general`,required:!0,label:`Sequence`,groupPath:`config.general`,path:`config.sequence_id`,info:`The Amplemarket sequence to enroll the lead into (must be active or paused).`,enabledIf:v(`amplemarket`),optionsDef:{requires:{connection:`amplemarket`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return eO;if(!t)throw new K.MissingSecretError({providerName:`amplemarket`});let r=(await nO({secret:t,signal:AbortSignal.timeout(tO)})).filter(e=>$D.has(e.status)).map(e=>({label:e.name,value:e.id}));return e?r.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):r},widgets:{provider_logo:{provider:`amplemarket`}}}}),input_fields:F(r.object({[XD.name]:T({fieldName:XD.name}),[ZD.name]:T({fieldName:ZD.name})})),custom_variables:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.custom_variables`,label:`Custom variables`,info:"Amplemarket dynamic fields, sent as the lead's data. The Variable name must match what your sequence references (e.g. `{{ pain_point }}`) — case-sensitive, letters, digits, and underscores, no spaces. In the Value column, type `/` to insert a field or secret; leave a Value empty to skip that row. Amplemarket rejects the enrollment if the sequence references a dynamic field that is missing.",keyLabel:`Variable`,valueLabel:`Value`,keyPlaceholder:`pain_point`,valuePlaceholder:`{{ pain_point }}`,maxKeys:50}).default({}),output_fields:P(r.object({[QD.name]:D({fieldName:QD.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.custom_variables??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`custom_variables`,n]});if(t.includes(`{{`)){r("Variable name must be a literal (no `{{ }}` templating).");continue}if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)){r(`Invalid Amplemarket dynamic-field name "${t}" — use letters, digits, and underscores; no spaces.`);continue}t.length>255&&r(`Dynamic-field name "${t.slice(0,32)}…" exceeds 255 characters.`)}})}),iO=e=>gd(R(G(XD,e)),R(G(ZD,e))),aO=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},oO=class extends B{pipeId=JD;payload;payloadSchema=rO;billableOperations=YD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`amplemarket`]}estimateBillableOperations(e){return H(e,`lead-enroll-amplemarket-v1-amplemarket`)}getCustomVariableValueTemplates(){return Object.values(this.payload.config.custom_variables??{})}getInputRequirement(){return z(iO(this.payload.config),...aO(this.getCustomVariableValueTemplates()))}getSecretRequirements(){return q(this.getCustomVariableValueTemplates())}getConstantRequirements(){return tp(this.getCustomVariableValueTemplates())}getRawOutputFields(){return{[QD.name]:this.catalogOutput(QD)}}getConnectionsRequirements(){return[{provider:`amplemarket`,rateLimitRatio:1,rateLimitOperation:`amplemarket_account_operation`,allowManagedConnection:!1}]}async getAgentContext({connectionSecrets:e,environment:t}){let n=this.payload.config.sequence_id,r=Array.isArray(n)?n[0]:n;if(!r)return null;if(t===`sandbox`)return{summary:`Sandbox: this sequence requires the dynamic fields first_name and pain_point — set each via config.custom_variables.`,data:{sequence_name:`Demo · Q3 Outbound`,sequence_status:`active`,required_dynamic_fields:[`first_name`,`pain_point`],missing_dynamic_fields:[]}};let i=e.amplemarket;if(!i)throw new K.MissingSecretError({providerName:`amplemarket`});let a=await nO({secret:i,signal:AbortSignal.timeout(tO)}),o=a.find(e=>e.id===r);if(!o)return{summary:`No Amplemarket sequence with id "${r}" was found on this connection (checked ${a.length}). Re-resolve config.sequence_id via autocomplete_field before running — don't guess the dynamic fields.`,data:{sequence_found:!1,required_dynamic_fields:[],missing_dynamic_fields:[]}};let s=o.dynamic_fields_used??[],c=new Set(Object.entries(this.payload.config.custom_variables??{}).filter(([e,t])=>e.trim()&&t?.trim()).map(([e])=>e.trim())),l=s.filter(e=>!c.has(e));return{summary:s.length===0?`Sequence "${o.name}" references no dynamic fields — no custom variables to set.`:`Sequence "${o.name}" requires these dynamic fields — set EVERY one via config.custom_variables (the value is a Liquid template over your sheet columns, e.g. {{ pain_point }}): ${s.join(`, `)}. Amplemarket rejects the enrollment if any of them is missing. The lead's email and LinkedIn URL travel via the input fields above, not here.`+(l.length>0?` Still unmapped: ${l.join(`, `)}.`:` All are mapped.`),data:{sequence_found:!0,sequence_name:o.name,sequence_status:o.status,required_dynamic_fields:s,missing_dynamic_fields:l}}}},sO=rO,cO={pipeId:JD,basePipe:U(JD),label:`Enroll Lead in Sequence`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Add a lead to an Amplemarket sequence, with custom dynamic fields.`,tags:[V.EMAIL],keywords:[`campaign`,`outreach`,`add`,`subscribe`,`outbound`,`email marketing`],docPath:W(JD),billableOperations:YD,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`amplemarket`],defaultInputRequirement:iO(null),managedProviders:[],deprecatedProviders:[],defaultPayload:{pipe_id:JD,connector:{strategy:`first`,connections:[]},run_if:null,config:{sequence_id:``,input_fields:{email:{alias:``},profile_url:{alias:``}},custom_variables:{},output_fields:{amplemarket_sequence_id:{alias:``,enabled:!0}}}}},lO=`lead:enroll:lemlist@1`,uO={"lead-enroll-lemlist-v1-lemlist":{allowManagedConnection:!1,provider:`lemlist`,credits:null,mode:null}},dO=_(`email`),fO=_(`name`),pO=_(`first_name`),mO=_(`last_name`),hO=_(`company_name`),gO=_(`job_title`),_O=_(`profile_url`),vO=_(`phone`),yO=_(`lemlist_lead_id`),bO=_(`lemlist_enrollment_result`),xO=new Set([`email`,`firstName`,`lastName`,`name`,`companyName`,`jobTitle`,`linkedinUrl`,`phone`,`companyDomain`,`icebreaker`,`picture`]),SO=[{label:`Demo · Q3 Outbound`,value:`cam_sandbox_1`},{label:`Demo · Founder Intros`,value:`cam_sandbox_2`}],CO={requires:{connection:`lemlist`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return SO;if(!t)throw new K.MissingSecretError({providerName:`lemlist`});let r=await fetch(`https://api.lemlist.com/api/campaigns?limit=100`,{headers:{Authorization:`Basic ${t}`}});if(!r.ok){let e=await r.text();throw new K.HttpError({msg:e})}let i=await r.json(),a=(Array.isArray(i)?i:i.campaigns??[]).map(e=>({label:e.name,value:e._id}));return e?a.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):a},widgets:{provider_logo:{provider:`lemlist`}}};function wO(e){let t=new Set,n=new Set;try{let r=$s(e);for(let[e,i]of Object.entries(r.inputs))(i.required?t:n).add(e)}catch{for(let n of e.matchAll(/\{\{\s*([A-Za-z_][A-Za-z0-9_]*)/g))t.add(n[1])}return{required:[...t],optional:[...n]}}const TO=r.object({pipe_id:r.literal(lO),connector:C(),run_if:x(),config:r.object({campaign_id:ku({sectionKey:`general`,required:!0,label:`Campaign`,groupPath:`config.general`,path:`config.campaign_id`,info:`The lemlist campaign to enroll the lead into.`,enabledIf:v(`lemlist`),optionsDef:CO}),input_fields:F(r.object({[dO.name]:T({fieldName:dO.name}),[fO.name]:T({fieldName:fO.name}),[pO.name]:T({fieldName:pO.name}),[mO.name]:T({fieldName:mO.name}),[hO.name]:T({fieldName:hO.name}),[gO.name]:T({fieldName:gO.name}),[_O.name]:T({fieldName:_O.name}),[vO.name]:T({fieldName:vO.name})})),custom_variables:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.custom_variables`,label:`Custom variables`,info:"lemlist custom variables, set on the lead after enrollment. The Variable name must match what your sequence references (e.g. `{{ painPoint }}`) — case-sensitive, no spaces. In the Value column, type `/` to insert a field or secret; leave a Value empty to skip that row. Standard fields (company, job title, LinkedIn, phone) are set via the fields above, not here.",keyLabel:`Variable`,valueLabel:`Value`,keyPlaceholder:`painPoint`,valuePlaceholder:`{{ pain_point }}`,maxKeys:50}),output_fields:P(r.object({[yO.name]:D({fieldName:yO.name}),[bO.name]:D({fieldName:bO.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.custom_variables??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`custom_variables`,n]});if(t.includes(`{{`)){r("Variable name must be a literal (no `{{ }}` templating).");continue}if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)){r(`Invalid lemlist variable name "${t}" — use letters, digits, and underscores; no spaces.`);continue}xO.has(t)&&r(`"${t}" is a standard lemlist field — set it via the dedicated field above, not as a custom variable.`)}})}),EO=e=>z(R(G(dO,e)),gd(R(G(fO,e)),z(R(G(pO,e)),R(G(mO,e)))),_d(G(hO,e)),_d(G(gO,e)),_d(G(_O,e)),_d(G(vO,e))),DO=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},OO=class extends B{pipeId=lO;payload;payloadSchema=TO;billableOperations=uO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`lemlist`]}estimateBillableOperations(e){return H(e,`lead-enroll-lemlist-v1-lemlist`)}getCustomVariableValueTemplates(){return Object.values(this.payload.config.custom_variables??{})}getInputRequirement(){return z(EO(this.payload.config),...DO(this.getCustomVariableValueTemplates()))}getSecretRequirements(){return q(this.getCustomVariableValueTemplates())}getConstantRequirements(){return tp(this.getCustomVariableValueTemplates())}getRawOutputFields(){return{[yO.name]:this.catalogOutput(yO),[bO.name]:this.catalogOutput(bO)}}getConnectionsRequirements(){return[{provider:`lemlist`,rateLimitRatio:1,rateLimitOperation:`lemlist_create_lead`,allowManagedConnection:!1}]}async getAgentContext({connectionSecrets:e,environment:t}){let n=this.payload.config.campaign_id,r=Array.isArray(n)?n[0]:n;if(!r)return null;if(t===`sandbox`)return{summary:`Sandbox: this sequence references custom variables painPoint and eventLink — set each via config.custom_variables.`,data:{required_custom_variables:[`painPoint`,`eventLink`],used_standard_fields:[`firstName`]}};let i=e.lemlist;if(!i)throw new K.MissingSecretError({providerName:`lemlist`});let a=await fetch(`https://api.lemlist.com/api/campaigns/${encodeURIComponent(r)}/sequences`,{headers:{Authorization:`Basic ${i}`},signal:AbortSignal.timeout(1e4)});if(!a.ok){let e=await a.text();throw new K.HttpError({msg:e})}let o=await a.json(),s=new Set;for(let e of Object.values(o??{}))for(let t of e?.steps??[])for(let e of[t?.subject,t?.message]){if(!e)continue;let{required:t,optional:n}=wO(e);for(let e of[...t,...n])s.add(e)}let c=[...s].filter(e=>xO.has(e)),l=[...s].filter(e=>!xO.has(e));return{summary:l.length===0?`This sequence uses only standard lemlist fields — no custom variables to set.`:`This sequence requires these custom variables — set each via config.custom_variables (the value is a Liquid template over your sheet columns, e.g. {{ pain_point }}): ${l.join(`, `)}. Standard fields (email, firstName, …) are populated by the input fields above, not here.`,data:{required_custom_variables:l,used_standard_fields:c}}}},kO=TO,AO={pipeId:lO,basePipe:U(lO),label:`Enroll Lead in Campaign`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Add a lead to a lemlist campaign sequence, with custom variables.`,tags:[V.EMAIL],keywords:[`sequence`,`outreach`,`add`,`subscribe`,`outbound`,`email marketing`],docPath:W(lO),billableOperations:uO,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`lemlist`],defaultInputRequirement:EO(null),managedProviders:[],deprecatedProviders:[],defaultPayload:{pipe_id:lO,connector:{strategy:`first`,connections:[]},run_if:null,config:{campaign_id:``,input_fields:{email:{alias:``},name:{alias:``},first_name:{alias:``},last_name:{alias:``},company_name:{alias:``},job_title:{alias:``},profile_url:{alias:``},phone:{alias:``}},custom_variables:{},output_fields:{lemlist_lead_id:{alias:``,enabled:!0},lemlist_enrollment_result:{alias:``,enabled:!1}}}}},jO=`message:send-direct:slack@1`,MO=_(`slack_direct_message_success`),NO=r.object({pipe_id:r.literal(jO),connector:C(),run_if:x(),config:r.object({slack_user_id:S({sectionKey:`general`,groupPath:`config.general`,path:`config.slack_user_id`,label:`Slack user ID`,info:"The member to DM (e.g. U024BE7LH) — chains from the Slack channel members search. Type `@` to insert a field reference.",placeholder:`{{ slack_user_id }}`,inputType:`text`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`}),message:S({sectionKey:`general`,groupPath:`config.general`,path:`config.message`,label:`Message`,info:"The message body. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`Hi {{ name }}, …`,inputType:`text`,minLength:1,maxLength:4e4,expectedTagType:`string`,expectedTagFormat:`markdown`,multiline:!0}),output_fields:P(r.object({[MO.name]:D({fieldName:MO.name})}))})}),PO={"message-send-direct-slack-v1-slack":{allowManagedConnection:!1,provider:`slack`,credits:null,mode:null}},FO=class extends B{pipeId=jO;payload;payloadSchema=NO;billableOperations=PO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`slack`]}estimateBillableOperations(e){return H(e,`message-send-direct-slack-v1-slack`)}getTemplatedFields(){return[this.payload.config.slack_user_id,this.payload.config.message]}getInputRequirement(){return ep(this.getTemplatedFields())}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[MO.name]:this.catalogOutput(MO)}}getConnectionsRequirements(){return[{provider:`slack`,rateLimitRatio:1,rateLimitOperation:`slack_post_message`,allowManagedConnection:!1}]}},IO=NO,LO={pipeId:jO,basePipe:U(jO),label:`Send direct message`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Send a Slack direct message to a workspace member.`,guide:"Send a Slack DM to one member per row. `slack_user_id` is the member's workspace ID — the people:channelmembers:slack@1 search outputs it, which makes 'list channel members → DM each' a two-step chain. The message body is templated: reference upstream fields with `{{ field_name }}` and stored secrets with `{{ SECRETS.KEY }}`. The DM comes from the pipe0 app (bots cannot impersonate people). Requires a Slack vault connection (call list_connections to find one).",tags:[V.CHAT],keywords:[`dm`,`direct message`,`private message`,`notify`,`outreach`,`chat`],docPath:W(jO),billableOperations:PO,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[`slack`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:null,defaultPayload:{pipe_id:jO,connector:{strategy:`first`,connections:[]},run_if:null,config:{slack_user_id:`{{ slack_user_id }}`,message:``,output_fields:{slack_direct_message_success:{alias:``,enabled:!0}}}}},RO=[{label:`#demo-general`,value:`C0SANDBOX001`},{label:`#demo-alerts`,value:`C0SANDBOX002`}],zO=`https://slack.com/api/conversations.list?limit=200&exclude_archived=true&types=public_channel,private_channel`,BO={requires:{connection:`slack`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return RO;if(!t)throw new K.MissingSecretError({providerName:`slack`});let r=[],i=null;for(let e=0;e<5;e++){let e=await fetch(i?`${zO}&cursor=${encodeURIComponent(i)}`:zO,{headers:{Authorization:`Bearer ${t}`}});if(!e.ok){let t=await e.text();throw new K.HttpError({msg:t})}let n=await e.json();if(!n.ok)throw new K.HttpError({msg:n.error??`slack_error`});for(let e of n.channels??[])r.push({label:`#${e.name}${e.is_ext_shared?` (Slack Connect)`:``}`,value:e.id});if(i=n.response_metadata?.next_cursor||null,!i)break}return e?r.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):r},widgets:{provider_logo:{provider:`slack`}}},VO=`message:send:slack@1`,HO=_(`slack_message_success`),UO=r.object({pipe_id:r.literal(VO),connector:C(),run_if:x(),config:r.object({channel_id:S({sectionKey:`general`,groupPath:`config.general`,path:`config.channel_id`,label:`Channel ID`,info:"Your connection must be authorized to post to this channel. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`C0123456789`,inputType:`text`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:BO}),message:S({sectionKey:`general`,groupPath:`config.general`,path:`config.message`,label:`Message`,info:"The message body. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`Hi {{ name }}, …`,inputType:`text`,minLength:1,maxLength:4e4,expectedTagType:`string`,expectedTagFormat:`markdown`,multiline:!0}),output_fields:P(r.object({[HO.name]:D({fieldName:HO.name})}))})}),WO={"message-send-slack-v1-slack":{allowManagedConnection:!1,provider:`slack`,credits:null,mode:null}},GO=class extends B{pipeId=VO;payload;payloadSchema=UO;billableOperations=WO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`slack`]}estimateBillableOperations(e){return H(e,`message-send-slack-v1-slack`)}getTemplatedFields(){return[this.payload.config.channel_id,this.payload.config.message]}getInputRequirement(){return ep(this.getTemplatedFields())}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[HO.name]:this.catalogOutput(HO)}}getConnectionsRequirements(){return[{provider:`slack`,rateLimitRatio:1,rateLimitOperation:`slack_post_message`,allowManagedConnection:!1}]}},KO=UO,qO={pipeId:VO,basePipe:U(VO),label:`Send message into channel`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Send a Slack message to a channel.`,guide:"Send a Slack message. The channel ID and message body are templated config fields — reference upstream fields with `{{ field_name }}` and stored secrets with `{{ SECRETS.KEY }}`. Requires a Slack vault connection (call list_connections to find one).",tags:[V.CHAT],keywords:[`notify`,`notification`,`alert`,`post`,`chat`],docPath:W(VO),billableOperations:WO,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[`slack`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:null,defaultPayload:{pipe_id:VO,connector:{strategy:`first`,connections:[]},run_if:null,config:{channel_id:``,message:``,output_fields:{slack_message_success:{alias:``,enabled:!0}}}}},JO=`message:write@1`,YO=_(`message`),XO=`message-write-v1`,ZO=Yc(XO),QO=r.object({pipe_id:r.literal(JO),connector:w(),run_if:x(),config:r.object({template:Wl({sectionKey:`general`,label:`Template`,path:`config.template`,placeholder:J(`prompt`),groupPath:`config.prompt`,required:!0}),model:wu({sectionKey:`general`,label:`Model`,path:`config.model`,groupPath:`config.prompt`,billableOperations:ZO,defaultValue:Bc}),output_fields:P(r.object({[YO.name]:D({fieldName:YO.name})}))})}),$O=class extends B{pipeId=JO;payload;payloadSchema=QO;billableOperations=ZO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return Hc(this.payload.config.model)}estimateBillableOperations(e){return Zc(e,{model:this.payload.config.model,prefix:XO,inputTokens:600,outputTokens:800})}getInputRequirement(){return ep([this.payload.config.template])}getSecretRequirements(){return q([this.payload.config.template])}getConstantRequirements(){return tp([this.payload.config.template])}getRawOutputFields(){return{[YO.name]:this.catalogOutput(YO)}}getConnectionsRequirements(){return Uc(this.payload.config.model)}},ek=QO,tk={pipeId:JO,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(JO),label:`Message writer`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`An AI agent specialized in composing messages for modern workplace communication platforms (Slack, Teams, Discord, etc.)`,guide:`AI message composer for Slack/Teams/Discord. Outputs: message. Pair with message:send:slack@1 to send.`,tags:[V.AI],keywords:[`ai`,`compose`,`draft`,`copywriting`,`outreach`,`slack`,`teams`],docPath:W(JO),defaultInputRequirement:null,billableOperations:ZO,allowedUserConnectionProviders:Wc(),managedProviders:Wc(),deprecatedProviders:[],defaultPayload:{pipe_id:JO,connector:null,run_if:null,config:{model:Bc,template:``,output_fields:{message:{alias:``,enabled:!0}}}}},nk=_(`hubspot_object_id`),rk=_(`hubspot_associated_count`),ik=_(`hubspot_associated_objects`),ak=`object:associations:hubspot@1`,ok=r.object({pipe_id:r.literal(ak),run_if:x(),connector:C(),config:r.object({from_object_type:ku({sectionKey:`general`,required:!0,label:`From object type`,groupPath:`config.general`,path:`config.from_object_type`,info:`The type of the source record (standard or custom object).`,enabledIf:v(`hubspot`),optionsDef:cp}),to_object_type:ku({sectionKey:`general`,required:!0,label:`To object type`,groupPath:`config.general`,path:`config.to_object_type`,info:`The type of the associated records to retrieve (standard or custom object).`,enabledIf:v(`hubspot`),optionsDef:cp}),association_label:ku({sectionKey:`general`,required:!1,label:`Association label`,groupPath:`config.general`,path:`config.association_label`,info:`Only follow associations with this label (labels are portal-specific, e.g. "Decision maker"). Empty = all associations.`,enabledIf:v(`hubspot`),optionsDef:lp}),properties:du({sectionKey:`general`,label:`Properties`,groupPath:`config.general`,path:`config.properties`,placeholder:`name`,info:`HubSpot internal property names of the TARGET object to include per associated record. Empty = HubSpot's default properties.`}),limit:Eu({sectionKey:`general`,label:`Limit`,groupPath:`config.general`,path:`config.limit`,info:``,min:1,max:100}).default(20),input_fields:F(r.object({[nk.name]:T({fieldName:nk.name})})),output_fields:P(r.object({[rk.name]:D({fieldName:rk.name}),[ik.name]:D({fieldName:ik.name})}))})}),sk=e=>R(G(nk,e)),ck={"object-associations-hubspot-v1-hubspot":{allowManagedConnection:!1,credits:null,mode:null,provider:`hubspot`}},lk=class extends B{pipeId=ak;payload;payloadSchema=ok;billableOperations=ck;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`hubspot`]}estimateBillableOperations(e){return H(e,`object-associations-hubspot-v1-hubspot`)}getInputRequirement(){return sk(this.payload.config)}getRawOutputFields(){return{[rk.name]:this.catalogOutput(rk),[ik.name]:this.catalogOutput(ik)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitRatio:1,rateLimitOperation:`hubspot_generic`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.to_object_type,n=Array.isArray(t)?t[0]??``:t;return pp(e,{objectTypes:[[n||`target object`,n||`0-1`]]})}},uk=ok,dk={pipeId:ak,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(ak),label:`HubSpot associated objects`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Retrieve the HubSpot records associated with a source record — one level of joins across standard and custom objects (e.g. a company's deals, or a custom object linked to a company).`,tags:[V.FIELDS],keywords:[`crm`,`join`,`related`,`association`,`custom object`,`linked`],docPath:W(ak),guide:"Associations are HubSpot's joins — the Search API never returns them, so this pipe is the way to fetch related records. The source-record input consumes `hubspot_object_id`, which every HubSpot surface emits (alias it to point at a differently named column); the from-object type must match the record the ID belongs to. Activities (notes, tasks, calls, meetings, emails) are associated objects too — pick them as the to-object to read a record's timeline; when you leave properties empty for an engagement the pipe fills a sensible default set (timestamp + body/subject). Association labels are portal-specific; leave the label empty to follow all associations. Zero associations is a successful result (count = 0). Target-object properties use internal names — call get_provider_context for the portal's catalog.",billableOperations:ck,allowedUserConnectionProviders:[`hubspot`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:sk(null),defaultPayload:{pipe_id:ak,connector:{strategy:`first`,connections:[]},run_if:null,config:{from_object_type:`0-2`,to_object_type:`0-3`,association_label:``,properties:[],limit:20,input_fields:{hubspot_object_id:{alias:``}},output_fields:{hubspot_associated_count:{alias:``,enabled:!0},hubspot_associated_objects:{alias:``,enabled:!0}}}}},fk=_(`hubspot_object_id`),pk=_(`hubspot_update_result`),mk=`object:update:hubspot@1`,hk=r.object({pipe_id:r.literal(mk),run_if:x(),connector:C(),config:r.object({object_type:ku({sectionKey:`general`,required:!0,label:`Object type`,groupPath:`config.general`,path:`config.object_type`,info:`Standard objects plus this portal's custom objects (custom objects need HubSpot Enterprise).`,enabledIf:v(`hubspot`),optionsDef:cp}),properties:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.properties`,label:`Property values`,info:"Property = the HubSpot internal name (e.g. `jobtitle`, custom properties too). In the Value column, type `/` to insert a field reference. Enumeration values must be existing internal option values (case-sensitive).",keyLabel:`Property`,valueLabel:`Value`,keyPlaceholder:`jobtitle`,valuePlaceholder:`{{ job_title }}`,maxKeys:50}),ignore_blank_values:yu({sectionKey:`general`,defaultValue:!0,label:`Ignore blank values`,groupPath:`config.general`,path:`config.ignore_blank_values`,info:`ON: rows whose value renders empty are skipped, preserving CRM data. OFF: empty values CLEAR the property in HubSpot.`}),input_fields:F(r.object({[fk.name]:T({fieldName:fk.name})})),output_fields:P(r.object({[pk.name]:D({fieldName:pk.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.properties??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`properties`,n]});if(t.includes(`{{`)){r("Property name must be a literal internal name (no `{{ }}` templating).");continue}/^[a-z][a-z0-9_]*$/.test(t)||r(`Invalid HubSpot property name "${t}" — internal names are lowercase letters, digits, and underscores.`)}})}),gk=e=>R(G(fk,e)),_k={"object-update-hubspot-v1-hubspot":{allowManagedConnection:!1,credits:null,mode:null,provider:`hubspot`}},vk=class extends B{pipeId=mk;payload;payloadSchema=hk;billableOperations=_k;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`hubspot`]}estimateBillableOperations(e){return H(e,`object-update-hubspot-v1-hubspot`)}getTemplates(){return Object.values(this.payload.config.properties??{}).filter(e=>!!e)}getInputRequirement(){return z(gk(this.payload.config),...ip(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[pk.name]:this.catalogOutput(pk)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitRatio:1,rateLimitOperation:`hubspot_generic`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object_type,n=Array.isArray(t)?t[0]??``:t;return pp(e,{objectTypes:[[n||`contacts`,n||`0-1`]],writableOnly:!0})}},yk=hk,bk={pipeId:mk,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(mk),label:`HubSpot update object`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:`Update a HubSpot record (standard or custom object) by its record ID, mapping columns to properties. Blank values are skipped by default so un-enriched cells never erase CRM data.`,tags:[V.FIELDS],keywords:[`crm`,`write`,`sync`,`record`,`property`,`custom object`],docPath:W(mk),guide:"The object-ID input consumes `hubspot_object_id`, which every HubSpot surface emits — chain from a match pipe (Lookup → Update by ID is the canonical HubSpot recipe; there is no reliable upsert for companies). Call get_provider_context for the selected object type to see WRITABLE properties and enumeration option values — HubSpot rejects read-only properties and unknown enum values (case-sensitive, never auto-created). Property writes fire the portal's workflows; rows where every value renders blank skip the API call entirely. With 'Ignore blank values' OFF, an empty value CLEARS the property in HubSpot.",billableOperations:_k,allowedUserConnectionProviders:[`hubspot`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:gk(null),defaultPayload:{pipe_id:mk,connector:{strategy:`first`,connections:[]},run_if:null,config:{object_type:`0-1`,properties:{},ignore_blank_values:!0,input_fields:{hubspot_object_id:{alias:``}},output_fields:{hubspot_update_result:{alias:``,enabled:!0}}}}},xk=_(`company_domain`),Sk=_(`email`),Ck=_(`salesforce_opportunities_found_count`),wk=_(`salesforce_record_id`),Tk=_(`salesforce_opportunity_matches`),Ek=`opportunity:match:salesforce@1`,Dk=r.object({pipe_id:r.literal(Ek),run_if:x(),connector:C(),config:r.object({status:Cu({sectionKey:`general`,required:!1,label:`Opportunity status`,groupPath:`config.general`,path:`config.status`,description:`Filters on Salesforce's computed IsClosed / IsWon — org-invariant, unlike stage names.`,options:[{label:`Any`,value:`any`},{label:`Open`,value:`open`},{label:`Won`,value:`won`},{label:`Lost`,value:`lost`}]}).default(`any`),stage:ku({sectionKey:`general`,required:!1,label:`Stage`,groupPath:`config.general`,path:`config.stage`,info:`Only match opportunities in this stage (the org's own OpportunityStage list). Empty = all stages.`,enabledIf:v(`salesforce`),optionsDef:Gd}),custom_properties:du({sectionKey:`general`,label:`Custom fields`,groupPath:`config.general`,path:`config.custom_properties`,placeholder:`NextStep`,info:"Field API names added to each match JSON under `custom_properties` (standard-set names are already top-level)."}),input_fields:F(r.object({[xk.name]:T({fieldName:xk.name}),[Sk.name]:T({fieldName:Sk.name})})),output_fields:P(r.object({[Ck.name]:D({fieldName:Ck.name}),[wk.name]:D({fieldName:wk.name}),[Tk.name]:D({fieldName:Tk.name})}))}).optional()}),Ok=e=>gd(R(G(xk,e)),R(G(Sk,e))),kk={"opportunity-match-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},Ak=class extends B{pipeId=Ek;payload;payloadSchema=Dk;billableOperations=kk;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`opportunity-match-salesforce-v1-salesforce`)}getInputRequirement(){return Ok(this.payload.config)}getRawOutputFields(){return{[Ck.name]:this.catalogOutput(Ck),[wk.name]:this.catalogOutput(wk),[Tk.name]:this.catalogOutput(Tk)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[`Opportunity`],includeStages:!0})}},jk=Dk,Mk={pipeId:Ek,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(Ek),label:`Salesforce opportunity match`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Find opportunities in your Salesforce org for a company (by domain, via the matched account) or person (by email, via contact roles) — opportunities have no natural key of their own. A clean miss completes with count = 0.`,tags:[V.WEBSITE,V.EMAIL],keywords:[`crm`,`sfdc`,`deal`,`pipeline`,`lookup`,`exists`,`revenue`],docPath:W(Ek),guide:"Domain input resolves via account match → Opportunity.AccountId (preferred when both inputs are present); email resolves via the contact's OpportunityContactRole (note: OCRs the connected user cannot see are silently missed under private sharing). Filter open/won via `status` (computed IsClosed/IsWon — never assume a stage named 'Closed Won' exists); `stage` values are OpportunityStage ApiNames from get_provider_context. Contact roles ride each match as `contact_roles` edge metadata. found_count = 0 is a successful result.",billableOperations:kk,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:Ok(null),defaultPayload:{pipe_id:Ek,connector:{strategy:`first`,connections:[]},run_if:null,config:{status:`any`,stage:``,custom_properties:[],input_fields:{company_domain:{alias:``},email:{alias:``}},output_fields:{salesforce_opportunities_found_count:{alias:``,enabled:!0},salesforce_record_id:{alias:``,enabled:!0},salesforce_opportunity_matches:{alias:``,enabled:!0}}}}},Nk=`person:devprofileurl:profileurl:waterfall@1`,Pk=_(`profile_url`),Fk=_(`developer_profile_url`),Ik=_(`alternative_developer_profile_urls`),Lk=[`crustdata`],Rk=[{provider:`crustdata`}],zk=r.object({pipe_id:r.literal(Nk),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:Rk,availableProviders:Lk}),input_fields:F(r.object({[Pk.name]:T({fieldName:Pk.name})})),output_fields:P(r.object({[Fk.name]:D({fieldName:Fk.name}),[Ik.name]:D({fieldName:Ik.name})}))}).optional()}),Bk=e=>R(G(Pk,e)),Vk={"person-devprofileurl-profileurl-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:2,level1:{credits:1.3,weight:1}},mode:`onSuccess`}},Hk=class extends B{pipeId=Nk;payload;payloadSchema=zk;billableOperations=Vk;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return Bk(this.payload.config)}getRawOutputFields(){return{[Fk.name]:this.catalogOutput(Fk,{isPrimaryOutput:!0}),[Ik.name]:this.catalogOutput(Ik,{isPrimaryOutput:!1})}}getConnectionsRequirements(){let e={crustdata:`crustdata_realtime_person_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},Uk=zk,Wk={pipeId:Nk,basePipe:U(Nk),label:`GitHub profile from LinkedIn URL`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a developer profile URL (e.g. GitHub) for any prospect using multiple data providers in a waterfall motion.`,docPath:W(Nk),tags:[V.LINKEDIN,V.WATERFALL,V.NEW],keywords:[`developer`,`dev`,`engineer`,`coder`,`git`],billableOperations:Vk,defaultInputRequirement:Bk(null),inputFieldMode:`static`,outputFieldMode:`static`,managedProviders:Lk,allowedUserConnectionProviders:Lk,deprecatedProviders:[],defaultPayload:{pipe_id:Nk,connector:null,run_if:null,config:{providers:Rk,input_fields:{profile_url:{alias:``}},output_fields:{developer_profile_url:{alias:``,enabled:!0},alternative_developer_profile_urls:{alias:``,enabled:!1}}}}},Gk=`person:email:validate:millionverifier@1`,Kk=_(`email`),qk=_(`email_validation_status`),Jk=_(`million_validation_match`),Yk=r.object({pipe_id:r.literal(Gk),connector:w(),run_if:x(),config:r.object({input_fields:F(r.object({[Kk.name]:T({fieldName:Kk.name})})),output_fields:P(r.object({[qk.name]:D({fieldName:qk.name}),[Jk.name]:D({fieldName:Jk.name})}))}).optional()}),Xk=e=>R(G(Kk,e)),Zk={"person-email-validate-millionverifier-v1-millionverifier":{provider:`millionverifier`,allowManagedConnection:!0,credits:{default:.1,level1:{credits:.05,weight:1}},mode:`always`}},Qk=class extends B{pipeId=Gk;payload;payloadSchema=Yk;billableOperations=Zk;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`millionverifier`]}estimateBillableOperations(e){return H(e,`person-email-validate-millionverifier-v1-millionverifier`)}getInputRequirement(){return Xk(this.payload.config)}getRawOutputFields(){return{[qk.name]:this.catalogOutput(qk),[Jk.name]:this.catalogOutput(Jk)}}getConnectionsRequirements(){return[{provider:`millionverifier`,rateLimitRatio:1,rateLimitOperation:`millionverifier_generic`,allowManagedConnection:!0}]}},$k=Yk,eA={pipeId:Gk,basePipe:U(Gk),label:`Validate email`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Verify email addresses to ensure is deliverability.`,tags:[V.EMAIL],keywords:[`verify`,`verification`,`deliverability`,`bounce`,`check`,`clean`],docPath:W(Gk),billableOperations:Zk,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`millionverifier`],managedProviders:[`millionverifier`],deprecatedProviders:[],defaultInputRequirement:Xk(null),defaultPayload:{pipe_id:Gk,connector:null,run_if:null,config:{input_fields:{email:{alias:``}},output_fields:{email_validation_status:{alias:``,enabled:!0},million_validation_match:{alias:``,enabled:!0}}}}},tA=`person:identity:email:waterfall@2`,nA=_(`email`),rA=_(`profile_url`),iA=_(`person_profile_match`),aA=[`hunter`,`crustdata`,`mixrank`],oA=[{provider:`hunter`},{provider:`crustdata`},{provider:`mixrank`}],sA=r.object({pipe_id:r.literal(tA),connector:w(),run_if:x(),config:r.object({providers:E({availableProviders:aA,defaultProviders:oA,sectionKey:`general`}),input_fields:F(r.object({[nA.name]:T({fieldName:nA.name})})),output_fields:P(r.object({[rA.name]:D({fieldName:rA.name}),[iA.name]:D({fieldName:iA.name})}))}).optional()}),cA=e=>R(G(nA,e)),lA={"person-identity-email-waterfall-v2-hunter":{provider:`hunter`,allowManagedConnection:!0,credits:{default:2.5,level1:{credits:1.25,weight:1}},mode:`onSuccess`},"person-identity-email-waterfall-v2-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:5,level1:{credits:2.5,weight:1}},mode:`onSuccess`},"person-identity-email-waterfall-v2-mixrank":{provider:`mixrank`,allowManagedConnection:!0,credits:{default:1.5,level1:{credits:.75,weight:1}},mode:`onSuccess`}},uA=class extends B{pipeId=tA;payload;payloadSchema=sA;billableOperations=lA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return cA(this.payload.config)}getRawOutputFields(){return{[rA.name]:this.catalogOutput(rA),[iA.name]:this.catalogOutput(iA,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={hunter:`hunter_email_enrichment`,crustdata:`crustdata_realtime_person_enrich`,mixrank:`mixrank-person-match`},t=this.payload.config?.providers||[],n=t.map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0})),r=t.findIndex(e=>e.provider===`hunter`);return r!==-1&&n.push({provider:`amplemarket`,rateLimitRatio:Y(r),rateLimitOperation:`amplemarket-person-reveal`,allowManagedConnection:!0}),n}},dA=sA,fA={pipeId:tA,basePipe:U(tA),label:`Full LinkedIn profile from email`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a person's LinkedIn profile URL and a standardized JSON profile from their email address.`,tags:[V.EMAIL,V.PEOPLE_PROFILES,V.LINKEDIN,V.WATERFALL],keywords:[`enrich`,`enrichment`,`reverse lookup`,`contact`,`identity`,`person`],docPath:W(tA),managedProviders:aA,deprecatedProviders:[],allowedUserConnectionProviders:aA,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:lA,defaultInputRequirement:cA(null),defaultPayload:{pipe_id:tA,connector:null,run_if:null,config:{providers:oA,input_fields:{email:{alias:``}},output_fields:{profile_url:{alias:``,enabled:!0},person_profile_match:{alias:``,enabled:!0}}}}},pA=_(`email`),mA=_(`attio_person_found`),hA=_(`attio_record_id`),gA=_(`attio_person_match`),_A=`person:match:attio@1`,vA=r.object({pipe_id:r.literal(_A),run_if:x(),connector:C(),config:r.object({custom_properties:du({sectionKey:`general`,label:`Custom attributes`,groupPath:`config.general`,path:`config.custom_properties`,placeholder:`job_title`,optionsDef:kf({target:`objects`,identifier:`people`}),info:'Attio attribute api_slugs to include in the match output (e.g. `job_title`, not "Job title"). Custom attributes work too and nest under `custom_properties`. Empty = a standard identity set.'}),input_fields:F(r.object({[pA.name]:T({fieldName:pA.name})})),output_fields:P(r.object({[mA.name]:D({fieldName:mA.name}),[hA.name]:D({fieldName:hA.name}),[gA.name]:D({fieldName:gA.name})}))}).optional()}),yA=e=>R(G(pA,e)),bA={"person-match-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},xA=class extends B{pipeId=_A;payload;payloadSchema=vA;billableOperations=bA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`person-match-attio-v1-attio`)}getInputRequirement(){return yA(this.payload.config)}getRawOutputFields(){return{[mA.name]:this.catalogOutput(mA),[hA.name]:this.catalogOutput(hA),[gA.name]:this.catalogOutput(gA)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_query`,allowManagedConnection:!1}]}async getAgentContext(e){return jf(e,{objects:[`people`]})}},SA=vA,CA={pipeId:_A,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(_A),label:`Attio person match`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Check whether a person exists in your Attio workspace by email. email_addresses is Attio's unique identity attribute, so any address on a record matches exactly; a clean miss completes with found = false.`,tags:[V.EMAIL],keywords:[`crm`,`lookup`,`exists`,`dedupe`,`record`,`contact`],docPath:W(_A),guide:"Call get_provider_context first to discover this workspace's attributes; use attribute api_slugs verbatim (e.g. `job_title`). email_addresses is unique + multiselect — one exact match covers every address on the record, so there is no secondary-email option. found = false is a successful result — gate follow-up pipes with run_if on it. Chain the attio_record_id output into record:update:attio@1 or record:lookup:attio@1. No email column yet? Chain a work-email pipe (e.g. people:workemail:waterfall@1) ahead of this one and match on its output.",billableOperations:bA,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:yA(null),defaultPayload:{pipe_id:_A,connector:{strategy:`first`,connections:[]},run_if:null,config:{custom_properties:[],input_fields:{email:{alias:``}},output_fields:{attio_person_found:{alias:``,enabled:!0},attio_record_id:{alias:``,enabled:!0},attio_person_match:{alias:``,enabled:!0}}}}},wA=`person:match:role:waterfall@1`,TA=_(`company_domain`),EA=_(`role_finder_match`),DA=[`amplemarket`,`leadmagic`,`crustdata`],OA=[{provider:`amplemarket`},{provider:`leadmagic`},{provider:`crustdata`}],kA=r.object({pipe_id:r.literal(wA),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:OA,availableProviders:DA}),roles:pu({sectionKey:`general`,groupPath:`config.general`,label:`Roles`,path:`config.roles`,info:`Company roles to include`,maxItems:3,minItems:1,suggestionsDef:g(`titles`),expectedTagType:`string`}),input_fields:F(r.object({[TA.name]:T({fieldName:TA.name})})),output_fields:P(r.object({[EA.name]:D({fieldName:EA.name})}))})}),AA=e=>gd(G(TA,e)),jA={"person-match-role-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-match-role-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-match-role-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`}},MA=class extends B{pipeId=wA;payload;payloadSchema=kA;billableOperations=jA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return AA(this.payload.config)}getSecretRequirements(){return q(this.payload.config?.roles??[])}getConstantRequirements(){return tp(this.payload.config?.roles??[])}getRawOutputFields(){return{[EA.name]:this.catalogOutput(EA,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_role_finder`,amplemarket:`amplemarket_people_search`,crustdata:`crustdata_people_db_search`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},NA=kA,PA={pipeId:wA,basePipe:U(wA),managedProviders:DA,deprecatedProviders:[],allowedUserConnectionProviders:DA,label:`Role finder`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find role matches for a given companies like "CEO" or "CFO".`,tags:[V.PEOPLE_PROFILES],keywords:[`job title`,`title`,`ceo`,`executive`,`decision maker`,`employee`],docPath:W(wA),billableOperations:jA,inputFieldMode:`static`,outputFieldMode:`static`,defaultInputRequirement:AA(null),defaultPayload:{pipe_id:wA,run_if:null,connector:null,config:{roles:[],providers:OA,input_fields:{company_domain:{alias:``}},output_fields:{role_finder_match:{alias:``,enabled:!0}}}}},FA=_(`email`),IA=_(`salesforce_person_found`),LA=_(`salesforce_record_id`),RA=_(`salesforce_person_match`),zA=`person:match:salesforce@1`,BA=r.object({pipe_id:r.literal(zA),run_if:x(),connector:C(),config:r.object({match_scope:Cu({sectionKey:`general`,required:!1,label:`Match scope`,groupPath:`config.general`,path:`config.match_scope`,description:`Which Salesforce person shapes to probe. Person Accounts are included automatically when the org has them.`,options:[{label:`Contacts and leads`,value:`contacts_and_leads`},{label:`Contacts only`,value:`contacts_only`},{label:`Leads only`,value:`leads_only`}]}).default(`contacts_and_leads`),custom_properties:du({sectionKey:`general`,label:`Custom fields`,groupPath:`config.general`,path:`config.custom_properties`,placeholder:`Lead_Score__c`,info:"Field API names added to the match JSON under `custom_properties` (standard-set names are already top-level). Dotted parent paths like `Account.Industry` work."}),input_fields:F(r.object({[FA.name]:T({fieldName:FA.name})})),output_fields:P(r.object({[IA.name]:D({fieldName:IA.name}),[LA.name]:D({fieldName:LA.name}),[RA.name]:D({fieldName:RA.name})}))}).optional()}),VA=e=>R(G(FA,e)),HA={"person-match-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},UA=class extends B{pipeId=zA;payload;payloadSchema=BA;billableOperations=HA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`person-match-salesforce-v1-salesforce`)}getInputRequirement(){return VA(this.payload.config)}getRawOutputFields(){return{[IA.name]:this.catalogOutput(IA),[LA.name]:this.catalogOutput(LA),[RA.name]:this.catalogOutput(RA)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[`Contact`,`Lead`]})}},WA=BA,GA={pipeId:zA,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(zA),label:`Salesforce person match`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Check whether a person exists in your Salesforce org by email — across Contacts, Leads, and Person Accounts in one call, with deterministic precedence and converted-lead redirect. A clean miss completes with found = false.`,tags:[V.EMAIL],keywords:[`crm`,`sfdc`,`contact`,`lead`,`lookup`,`exists`,`dedupe`],docPath:W(zA),guide:"Matches by exact email in ONE API call across up to three shapes, with precedence: live Contact → converted Lead's contact (is_converted_redirect = true) → live Lead → Person Account. found = false is a successful result — gate follow-ups with run_if on it. `object_type` in the match JSON says which shape matched; chain `salesforce_record_id` into record:update:salesforce@1 or record:lookup:salesforce@1. Note: 'no match' can also mean the connected user lacks record access (private sharing).",billableOperations:HA,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:VA(null),defaultPayload:{pipe_id:zA,connector:{strategy:`first`,connections:[]},run_if:null,config:{match_scope:`contacts_and_leads`,custom_properties:[],input_fields:{email:{alias:``}},output_fields:{salesforce_person_found:{alias:``,enabled:!0},salesforce_record_id:{alias:``,enabled:!0},salesforce_person_match:{alias:``,enabled:!0}}}}},KA=`person:mobile:profileurl:waterfall@1`,qA=_(`profile_url`),JA=_(`mobile`),YA=[`leadmagic`,`prospeo`,`amplemarket`,`crustdata`,`findymail`],XA=[`findymail`],ZA=[{provider:`leadmagic`},{provider:`prospeo`},{provider:`amplemarket`},{provider:`crustdata`}],QA=r.object({pipe_id:r.literal(KA),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:ZA,availableProviders:YA,deprecatedProviders:XA}),input_fields:F(r.object({[qA.name]:T({fieldName:qA.name})})),output_fields:P(r.object({[JA.name]:D({fieldName:JA.name})}))}).optional()}),$A=e=>R(G(qA,e)),ej={"person-mobile-profileurl-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-prospeo":{provider:`prospeo`,allowManagedConnection:!0,credits:{default:5,level1:{credits:3,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-findymail":{provider:`findymail`,allowManagedConnection:!0,credits:{default:6,level1:{credits:4,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:4,level1:{credits:3,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:5},mode:`onSuccess`}},tj=class extends B{pipeId=KA;payload;payloadSchema=QA;billableOperations=ej;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return $A(this.payload.config)}getRawOutputFields(){return{[JA.name]:this.catalogOutput(JA,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_lookup`,prospeo:`prospeo_phone_number_lookup`,findymail:`findymail_phone_lookup`,amplemarket:`amplemarket-person-reveal`,crustdata:`crustdata_contact_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},nj=QA,rj={pipeId:KA,basePipe:U(KA),label:`Mobile number from LinkedIn profile`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a mobile phone number for any prospect using multiple data providers in a waterfall motion.`,docPath:W(KA),tags:[V.PHONE,V.WATERFALL],keywords:[`phone`,`phone number`,`cell`,`direct dial`],billableOperations:ej,defaultInputRequirement:$A(null),inputFieldMode:`static`,outputFieldMode:`static`,managedProviders:YA,allowedUserConnectionProviders:YA,deprecatedProviders:XA,defaultPayload:{pipe_id:KA,connector:null,run_if:null,config:{providers:ZA,input_fields:{profile_url:{alias:``}},output_fields:{mobile:{alias:``,enabled:!0}}}}},ij=`person:mobile:workemail:waterfall@1`,aj=_(`work_email`),oj=_(`mobile`),sj=[`leadmagic`,`amplemarket`,`crustdata`],cj=[{provider:`leadmagic`},{provider:`amplemarket`},{provider:`crustdata`}],lj=r.object({pipe_id:r.literal(ij),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,availableProviders:sj,defaultProviders:cj}),input_fields:F(r.object({[aj.name]:T({fieldName:aj.name})})),output_fields:P(r.object({[oj.name]:D({fieldName:oj.name})}))}).optional()}),uj=e=>R(G(aj,e)),dj={"person-mobile-workemail-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`},"person-mobile-workemail-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:5,level1:{credits:4,weight:1}},mode:`onSuccess`},"person-mobile-workemail-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:5},mode:`onSuccess`}},fj=class extends B{pipeId=ij;payload;payloadSchema=lj;billableOperations=dj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return uj(this.payload.config)}getRawOutputFields(){return{[oj.name]:this.catalogOutput(oj,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_lookup`,amplemarket:`amplemarket-person-reveal`,crustdata:`crustdata_contact_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},pj=lj,mj={pipeId:ij,basePipe:U(ij),label:`Mobile number from email`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a mobile phone number for a prospect.`,tags:[V.PHONE,V.WATERFALL],keywords:[`phone`,`phone number`,`cell`,`direct dial`],docPath:W(ij),billableOperations:dj,defaultInputRequirement:uj(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:sj,managedProviders:sj,deprecatedProviders:[],defaultPayload:{pipe_id:ij,connector:null,run_if:null,config:{providers:cj,input_fields:{work_email:{alias:``}},output_fields:{mobile:{alias:``,enabled:!0}}}}},hj=`person:name:join@1`,gj=_(`first_name`),_j=_(`last_name`),vj=_(`name`),yj=r.object({pipe_id:r.literal(hj),run_if:x(),connector:Kl(),config:r.object({input_fields:F(r.object({[gj.name]:T({fieldName:gj.name}),[_j.name]:T({fieldName:_j.name})})),output_fields:P(r.object({[vj.name]:D({fieldName:vj.name})}))}).optional()}),bj=e=>z(G(gj,e),G(_j,e)),xj={"person-name-join-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},Sj=class extends B{pipeId=hj;payload;payloadSchema=yj;billableOperations=xj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`person-name-join-v1-pipe0`)}getInputRequirement(){return bj(this.payload.config)}getRawOutputFields(){return{[vj.name]:this.catalogOutput(vj)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},Cj=yj,wj={pipeId:hj,basePipe:U(hj),label:`Join name`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Combine the first and last names of a prospect into a full name field.`,tags:[V.NAMES],keywords:[`combine`,`concatenate`,`merge`,`first`,`last`,`full`],docPath:W(hj),billableOperations:xj,defaultInputRequirement:bj(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:hj,run_if:null,connector:null,config:{input_fields:{first_name:{alias:``},last_name:{alias:``}},output_fields:{name:{alias:``,enabled:!0}}}}},Tj=`person:name:split@1`,Ej=_(`name`),Dj=_(`first_name`),Oj=_(`last_name`),kj=r.object({pipe_id:r.literal(Tj),connector:Kl(),run_if:x(),config:r.object({input_fields:F(r.object({[Ej.name]:T({fieldName:Ej.name})})),output_fields:P(r.object({[Dj.name]:D({fieldName:Dj.name}),[Oj.name]:D({fieldName:Oj.name})}))}).optional()}),Aj=e=>R(G(Ej,e)),jj={"person-name-split-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},Mj=class extends B{pipeId=Tj;payload;payloadSchema=kj;billableOperations=jj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`person-name-split-v1-pipe0`)}getInputRequirement(){return Aj(this.payload.config)}getRawOutputFields(){return{[Dj.name]:this.catalogOutput(Dj),[Oj.name]:this.catalogOutput(Oj)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},Nj=kj,Pj={pipeId:Tj,basePipe:U(Tj),label:`Split name`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Split a full name into first and last name.`,tags:[V.NAMES],keywords:[`parse`,`separate`,`first`,`last`,`full`],docPath:W(Tj),billableOperations:jj,inputFieldMode:`static`,outputFieldMode:`static`,defaultInputRequirement:Aj(null),allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:Tj,run_if:null,connector:void 0,config:{input_fields:{name:{alias:``}},output_fields:{first_name:{alias:``,enabled:!0},last_name:{alias:``,enabled:!0}}}}},Fj=`person:personalemail:profileurl:waterfall@1`,Ij=_(`profile_url`),Lj=_(`personal_email`),Rj=_(`alternate_personal_emails`),zj=[`leadmagic`,`mixrank`],Bj=[{provider:`leadmagic`},{provider:`mixrank`}],Vj=r.object({pipe_id:r.literal(Fj),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,availableProviders:zj,defaultProviders:Bj}),input_fields:F(r.object({[Ij.name]:T({fieldName:Ij.name})})),output_fields:P(r.object({[Lj.name]:D({fieldName:Lj.name}),[Rj.name]:D({fieldName:Rj.name})}))}).optional()}),Hj=e=>R(G(Ij,e)),Uj={"person-personalemail-profileurl-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-personalemail-profileurl-waterfall-v1-mixrank":{provider:`mixrank`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`}},Wj=class extends B{pipeId=Fj;payload;payloadSchema=Vj;billableOperations=Uj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return Hj(this.payload.config)}getRawOutputFields(){return{[Lj.name]:this.catalogOutput(Lj,{isPrimaryOutput:!0}),[Rj.name]:this.catalogOutput(Rj)}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_personal_email_finder`,mixrank:`mixrank-person-match`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},Gj=Vj,Kj={pipeId:Fj,basePipe:U(Fj),allowedUserConnectionProviders:zj,managedProviders:zj,deprecatedProviders:[],label:`Personal email from LinkedIn`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find the personal email address of a prospect by using a professional profile URL as input.`,tags:[V.EMAIL,V.PERSONAL_EMAIL],keywords:[`gmail`,`private`,`consumer`,`contact`],docPath:W(Fj),billableOperations:Uj,defaultInputRequirement:Hj(null),inputFieldMode:`static`,outputFieldMode:`static`,defaultPayload:{pipe_id:Fj,connector:null,run_if:null,config:{providers:Bj,input_fields:{profile_url:{alias:``}},output_fields:{personal_email:{alias:``,enabled:!0},alternate_personal_emails:{alias:``,enabled:!1}}}}},qj=_(`profile_url`),Jj=_(`post_list_string`),Yj=_(`crustdata_post_list`),Xj=`person:posts:content:crustdata@1`,Zj=r.object({pipe_id:r.literal(Xj),run_if:x(),connector:w(),config:r.object({limit:Eu({path:`config.limit`,groupPath:`config.general`,max:100,min:1,sectionKey:`general`,info:``,label:`Limit`,legend:`Max. 100`}),input_fields:F(r.object({[qj.name]:T({fieldName:qj.name})})),output_fields:P(r.object({[Jj.name]:D({fieldName:Jj.name}),[Yj.name]:D({fieldName:Yj.name})}))}).optional()}),Qj=e=>R(G(qj,e)),$j={"person-posts-crustdata-v1-crustdata":{allowManagedConnection:!0,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`,note:`1.5 credits per post. Posts are fetched in increments of 5.`,provider:`crustdata`}},eM=class extends B{pipeId=Xj;payload;payloadSchema=Zj;billableOperations=$j;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`crustdata`]}estimateBillableOperations(e){return H(e,`person-posts-crustdata-v1-crustdata`)}getInputRequirement(){return Qj(this.payload.config)}getRawOutputFields(){return{[Jj.name]:this.catalogOutput(Jj),[Yj.name]:this.catalogOutput(Yj)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitRatio:1,rateLimitOperation:`crustdata_realtime_post_fetch`,allowManagedConnection:!0}]}},tM=Zj,nM={pipeId:Xj,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(Xj),label:`LinkedIn posts`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Find list of recent LinkedIn posts.`,tags:[V.LINKEDIN],keywords:[`activity`,`content`,`social`,`updates`,`engagement`,`feed`],docPath:W(Xj),billableOperations:$j,allowedUserConnectionProviders:[`crustdata`],managedProviders:[`crustdata`],deprecatedProviders:[],defaultInputRequirement:Qj(null),defaultPayload:{pipe_id:Xj,connector:null,run_if:null,config:{limit:5,input_fields:{profile_url:{alias:``}},output_fields:{crustdata_post_list:{alias:``,enabled:!0},post_list_string:{alias:``,enabled:!0}}}}},rM=`person:profile:waterfall@2`,iM=_(`person_profile_match`),aM=_(`primary_job_title`),oM=_(`primary_seniority`),sM=_(`primary_company_domain`),cM=_(`profile_url`),lM=[`crustdata`,`amplemarket`,`prospeo`],uM=[{provider:`crustdata`},{provider:`amplemarket`},{provider:`prospeo`}],dM=r.object({pipe_id:r.literal(rM),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,availableProviders:lM,defaultProviders:uM}),input_fields:F(r.object({[cM.name]:T({fieldName:cM.name})})),output_fields:P(r.object({[iM.name]:D({fieldName:iM.name}),[aM.name]:D({fieldName:aM.name}),[oM.name]:D({fieldName:oM.name}),[sM.name]:D({fieldName:sM.name})}))}).optional()}),fM=e=>R(G(cM,e)),pM={"person-profile-waterfall-v2-crustdata":{provider:`crustdata`,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`,allowManagedConnection:!0},"person-profile-waterfall-v2-amplemarket":{provider:`amplemarket`,credits:{default:1,level1:{credits:.5,weight:1}},mode:`onSuccess`,allowManagedConnection:!0},"person-profile-waterfall-v2-prospeo":{provider:`prospeo`,credits:{default:1,level1:{credits:.5,weight:1}},mode:`onSuccess`,allowManagedConnection:!0}},mM=class extends B{pipeId=rM;payload;payloadSchema=dM;billableOperations=pM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return fM(this.payload.config)}getRawOutputFields(){return{[iM.name]:this.catalogOutput(iM,{isPrimaryOutput:!0}),[aM.name]:this.catalogOutput(aM),[oM.name]:this.catalogOutput(oM),[sM.name]:this.catalogOutput(sM)}}getConnectionsRequirements(){let e={crustdata:`crustdata_realtime_person_enrich`,amplemarket:`amplemarket-person-reveal`,prospeo:`prospeo_social_profile_lookup`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},hM=dM,gM={pipeId:rM,basePipe:U(rM),label:`Full LinkedIn profile`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a standardized JSON representation of a LinkedIn profile.`,docPath:W(rM),tags:[V.LINKEDIN,V.WATERFALL],keywords:[`enrich`,`enrichment`,`json`,`scrape`,`bio`,`experience`,`education`],managedProviders:lM,deprecatedProviders:[],allowedUserConnectionProviders:lM,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:pM,defaultInputRequirement:fM(null),defaultPayload:{pipe_id:rM,run_if:null,connector:null,config:{providers:uM,input_fields:{profile_url:{alias:``}},output_fields:{person_profile_match:{alias:``,enabled:!0},primary_job_title:{alias:``,enabled:!0},primary_seniority:{alias:``,enabled:!0},primary_company_domain:{alias:``,enabled:!0}}}}},_M=_(`work_email`),vM=_(`crustdata_person_match`),yM=_(`crustdata_profile_match_score`),bM=`person:profile:workemail:crustdata@1`,xM=r.object({pipe_id:r.literal(bM),run_if:x(),connector:w(),config:r.object({input_fields:F(r.object({[_M.name]:T({fieldName:_M.name})})),output_fields:P(r.object({[vM.name]:D({fieldName:vM.name}),[yM.name]:D({fieldName:yM.name})}))}).optional()}),SM=e=>R(G(_M,e)),CM={"person-profile-workemail-crustdata-v1-crustdata":{allowManagedConnection:!0,credits:{default:5},mode:`onSuccess`,provider:`crustdata`}},wM=class extends B{pipeId=bM;payload;payloadSchema=xM;billableOperations=CM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`crustdata`]}estimateBillableOperations(e){return H(e,`person-profile-workemail-crustdata-v1-crustdata`)}getInputRequirement(){return SM(this.payload.config)}getRawOutputFields(){return{[vM.name]:this.catalogOutput(vM),[yM.name]:this.catalogOutput(yM)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitRatio:1,rateLimitOperation:`crustdata_realtime_person_enrich`,allowManagedConnection:!0}]}},TM=xM,EM={pipeId:bM,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(bM),label:`Profile from work email`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Find person profile by their work email address.`,tags:[V.EMAIL,V.PEOPLE_PROFILES],keywords:[`enrich`,`enrichment`,`reverse lookup`,`linkedin`,`person`],docPath:W(bM),billableOperations:CM,allowedUserConnectionProviders:[`crustdata`],managedProviders:[`crustdata`],deprecatedProviders:[],defaultInputRequirement:SM(null),defaultPayload:{pipe_id:bM,connector:null,run_if:null,config:{input_fields:{work_email:{alias:``}},output_fields:{crustdata_person_match:{alias:``,enabled:!0},crustdata_profile_match_score:{alias:``,enabled:!0}}}}},DM=`person:profileurl:email:waterfall@1`,OM=_(`email`),kM=_(`work_email`),AM=_(`profile_url`),jM=[`leadmagic`],MM=[{provider:`leadmagic`}],NM=r.object({pipe_id:r.literal(DM),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:MM,availableProviders:jM}),input_fields:F(r.object({[OM.name]:T({fieldName:OM.name}),[kM.name]:T({fieldName:kM.name})})),output_fields:P(r.object({[AM.name]:D({fieldName:AM.name})}))}).optional()}),PM=e=>gd(G(OM,e),G(kM,e)),FM={"person-profileurl-email-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:3.5},mode:`onSuccess`}},IM=class extends B{pipeId=DM;payload;payloadSchema=NM;billableOperations=FM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return PM(this.payload.config)}getRawOutputFields(){return{[AM.name]:this.catalogOutput(AM,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_to_b2b_profile`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},LM=NM,RM={pipeId:DM,basePipe:U(DM),managedProviders:jM,deprecatedProviders:[],allowedUserConnectionProviders:jM,label:`LinkedIn URL from email`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find the URL for a prospect's LinkedIn profile from their personal or professional email address.`,guide:`Reverse email → LinkedIn profile URL, nothing else. Unless the user specifically asks for a URL-only lookup, FAVOR person:identity:email:waterfall@2: same email input, also resolves profile_url, plus the full standardized person_profile_match JSON profile (employment and education history, seniority, location) in one call — the richer grounding almost every downstream flow (profile enrichment, CRM match) needs anyway. Reach for THIS pipe when the profile URL is genuinely the only thing wanted.`,tags:[V.LINKEDIN],keywords:[`profile`,`reverse lookup`,`social`,`person`],docPath:W(DM),billableOperations:FM,inputFieldMode:`static`,outputFieldMode:`static`,defaultInputRequirement:PM(null),defaultPayload:{pipe_id:DM,run_if:null,connector:null,config:{providers:MM,input_fields:{email:{alias:``},work_email:{alias:``}},output_fields:{profile_url:{alias:``,enabled:!0}}}}},zM=`person:profileurl:name@1`,BM=_(`name`),VM=_(`company_name`),HM=_(`location_hint`),UM=_(`profile_url`),WM=r.object({pipe_id:r.literal(zM),connector:Kl(),run_if:x(),config:r.object({input_fields:F(r.object({[BM.name]:T({fieldName:BM.name}),[VM.name]:T({fieldName:VM.name}),[HM.name]:T({fieldName:HM.name})})),output_fields:P(r.object({[UM.name]:D({fieldName:UM.name})}))}).optional()}),GM=e=>z(R(G(BM,e)),R(G(VM,e)),_d(G(HM,e))),KM={"person-profileurl-name-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:.6},mode:`always`}},qM=class extends B{pipeId=zM;payload;payloadSchema=WM;billableOperations=KM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`person-profileurl-name-v1-pipe0`)}getInputRequirement(){return GM(this.payload.config)}getRawOutputFields(){return{[UM.name]:this.catalogOutput(UM)}}getConnectionsRequirements(){return[{provider:`serper`,rateLimitRatio:1,rateLimitOperation:`serper_search`,allowManagedConnection:!0}]}},JM=WM,YM={pipeId:zM,basePipe:U(zM),label:`LinkedIn URL from name`,executionMode:`single`,categories:[`people_data`],lifecycle:null,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],description:`Find the LinkedIn profile URL by using the prospect's name as input.`,docPath:W(zM),tags:[V.LINKEDIN],keywords:[`profile`,`social`,`lookup`,`person`],billableOperations:KM,defaultInputRequirement:GM(null),inputFieldMode:`static`,outputFieldMode:`static`,defaultPayload:{pipe_id:zM,connector:void 0,run_if:null,config:{input_fields:{company_name:{alias:``},location_hint:{alias:``},name:{alias:``}},output_fields:{profile_url:{alias:``,enabled:!0}}}}},XM=`person:workemail:profileurl:waterfall@1`,ZM=_(`profile_url`),QM=_(`work_email`),$M=_(`email_validation_status`),eN=[`hunter`,`amplemarket`,`findymail`,`leadmagic`,`crustdata`],tN=[`findymail`],nN=[{provider:`hunter`},{provider:`amplemarket`},{provider:`leadmagic`},{provider:`crustdata`}],rN=r.object({pipe_id:r.literal(XM),connector:w(),run_if:x(),config:r.object({providers:E({availableProviders:eN,defaultProviders:nN,deprecatedProviders:tN,sectionKey:`general`}),allow_catch_all_emails:yu({path:`config.allow_catch_all_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:``,label:`Allow catch-all emails`}),allow_risky_emails:yu({path:`config.allow_risky_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:`Higher chance of bouncing or being marked as spam.`,label:`Allow risky emails`}),input_fields:F(r.object({[ZM.name]:T({fieldName:ZM.name})})),output_fields:P(r.object({[QM.name]:D({fieldName:QM.name}),[$M.name]:D({fieldName:$M.name})}))}).optional()}),iN=e=>R(G(ZM,e)),aN={"person-workemail-profileurl-waterfall-v1-hunter":{provider:`hunter`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:2,level1:{credits:.7,weight:1}},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-findymail":{provider:`findymail`,allowManagedConnection:!0,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:2.5,level1:{credits:1.5,weight:1}},mode:`onSuccess`}},oN=class extends B{pipeId=XM;payload;payloadSchema=rN;billableOperations=aN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return iN(this.payload.config)}getRawOutputFields(){return{[QM.name]:this.catalogOutput(QM,{isPrimaryOutput:!0}),[$M.name]:this.catalogOutput($M,{isPrimaryOutput:!1})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_b2b_lookup`,hunter:`prospeo_email_lookup`,amplemarket:`amplemarket-person-reveal`,findymail:`findymail_email_b2b_lookup`,crustdata:`crustdata_realtime_person_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},sN=rN,cN={pipeId:XM,basePipe:U(XM),label:`Work email from LinkedIn URL`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find work email addresses from B2B profile.`,tags:[V.EMAIL,V.WORK_EMAIL,V.WATERFALL],keywords:[`business email`,`b2b`,`corporate`,`contact`],docPath:W(XM),managedProviders:eN,allowedUserConnectionProviders:eN,deprecatedProviders:tN,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:aN,defaultInputRequirement:iN(null),defaultPayload:{pipe_id:XM,connector:null,run_if:null,config:{providers:nN,allow_catch_all_emails:!0,allow_risky_emails:!0,input_fields:{profile_url:{alias:``}},output_fields:{work_email:{alias:``,enabled:!0},email_validation_status:{alias:``,enabled:!1}}}}},lN=`person:workemail:waterfall@1`,uN=_(`name`),dN=_(`company_domain`),fN=_(`company_name`),pN=_(`work_email`),mN=_(`email_validation_status`),hN=[`leadmagic`,`prospeo`,`amplemarket`,`hunter`,`icypeas`,`findymail`],gN=[`icypeas`,`findymail`],_N=[{provider:`leadmagic`},{provider:`prospeo`},{provider:`amplemarket`},{provider:`hunter`}],vN={"person-workemail-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:.5,level1:{credits:.25,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-icypeas":{provider:`icypeas`,allowManagedConnection:!0,credits:{default:.5,level1:{credits:.25,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-prospeo":{provider:`prospeo`,allowManagedConnection:!0,credits:{default:1,level1:{credits:.5,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-findymail":{provider:`findymail`,allowManagedConnection:!0,credits:{default:1.5,level1:{credits:.75,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-hunter":{provider:`hunter`,allowManagedConnection:!0,credits:{default:1.3,level1:{credits:.75,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`}},yN=r.object({pipe_id:r.literal(lN),connector:w(),run_if:x(),config:r.object({providers:E({availableProviders:hN,defaultProviders:_N,deprecatedProviders:gN,sectionKey:`general`,providerCredits:Ed(vN,hN)}),allow_catch_all_emails:yu({path:`config.allow_catch_all_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:`Catch-alls appear valid but remain undeliverable-risk.`,label:`Allow catch-all emails`}),allow_risky_emails:yu({path:`config.allow_risky_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:`DNS configuration and spam reputation may flag emails as high-risk.`,label:`Allow risky emails`}),input_fields:F(r.object({[uN.name]:T({fieldName:uN.name}),[dN.name]:T({fieldName:dN.name}),[fN.name]:T({fieldName:fN.name})})),output_fields:P(r.object({[pN.name]:D({fieldName:pN.name}),[mN.name]:D({fieldName:mN.name})}))}).optional()}),bN=e=>z(R(G(uN,e)),R(G(dN,e))),xN=class extends B{pipeId=lN;payload;payloadSchema=yN;billableOperations=vN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return bN(this.payload.config)}getRawOutputFields(){return{[pN.name]:this.catalogOutput(pN,{isPrimaryOutput:!0}),[mN.name]:this.catalogOutput(mN,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_lookup`,prospeo:`prospeo_email_lookup`,icypeas:`icypeas_email_lookup`,findymail:`findymail_email_lookup`,hunter:`hunter_email_finder`,amplemarket:`amplemarket-person-reveal`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},SN=yN,CN={pipeId:lN,basePipe:U(lN),label:`Work email from name`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find work email addresses in a waterfall motion.`,tags:[V.EMAIL,V.WORK_EMAIL,V.WATERFALL],keywords:[`business email`,`b2b`,`corporate`,`contact`],docPath:W(lN),managedProviders:hN,deprecatedProviders:gN,allowedUserConnectionProviders:hN,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:vN,defaultInputRequirement:bN(null),defaultPayload:{pipe_id:lN,connector:null,run_if:null,config:{providers:_N,allow_catch_all_emails:!0,allow_risky_emails:!0,input_fields:{company_name:{alias:``},company_domain:{alias:``},name:{alias:``}},output_fields:{work_email:{alias:``,enabled:!0},email_validation_status:{alias:``,enabled:!1}}}}},wN=`prompt:run@1`,TN=`prompt-run-v1`,EN=Yc(TN),DN=r.object({pipe_id:r.literal(wN),connector:w(),run_if:x(),config:r.object({prompt:Ul({sectionKey:`general`,path:`config.prompt`,placeholder:J(`prompt`),groupPath:`config.prompt`,supportedTags:[`input`,`output`]}),model:wu({sectionKey:`general`,label:`Model`,path:`config.model`,groupPath:`config.prompt`,billableOperations:EN,defaultValue:zc})})}),ON=class extends B{pipeId=wN;payload;payloadSchema=DN;billableOperations=EN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return Hc(this.payload.config.model)}estimateBillableOperations(e){return Zc(e,{model:this.payload.config.model,prefix:TN,inputTokens:600,outputTokens:800})}getInputRequirement(){return ep([this.payload.config.prompt.template])}getSecretRequirements(){return q([this.payload.config.prompt.template])}getConstantRequirements(){return tp([this.payload.config.prompt.template])}getRawOutputFields(){let e=this.payload.config.prompt.template,t=this.payload.config.prompt.json_schemas??{},n={},r;try{r=$s(e)}catch{return n}for(let e of r.outputs){let r=e.type;if(r===`json`){let i=e.schemaRef?t[e.schemaRef]:void 0;n[e.name]={enabled:!0,name:e.name,label:e.name,resolvedName:e.name,type:r,description:e.description,jsonMeta:{zodSchema:i,exampleValue:null},format:null,isCatalogFIeld:!1,isPrimaryOutput:!1}}else n[e.name]={enabled:!0,name:e.name,label:e.name,resolvedName:e.name,type:r,description:e.description,jsonMeta:null,format:e.format??null,isCatalogFIeld:!1,isPrimaryOutput:!1}}return n}getConnectionsRequirements(){return Uc(this.payload.config.model)}},kN=DN,AN={pipeId:wN,inputFieldMode:`config`,outputFieldMode:`config`,basePipe:U(wN),label:`AI prompt`,executionMode:`single`,categories:[`actions`,`tools`],lifecycle:null,description:`Executes configurable AI prompts with structured output fields.`,guide:`General-purpose AI prompt runner. Inputs and outputs are fully dynamic — defined by the tags in the prompt template. For extracting a value from a JSON / known-schema field, do NOT use this — use the deterministic json:extract:multi@1 (JSONata) instead: it's cheaper, reproducible, and runs on a schedule with no model. Reserve prompt:run@1 for genuine judgment or free-text generation (classify, summarize, rewrite).`,tags:[V.AI],keywords:[`llm`,`gpt`,`chatgpt`,`openai`,`generate`,`classify`,`extract`],docPath:W(wN),defaultInputRequirement:null,billableOperations:EN,allowedUserConnectionProviders:Wc(),managedProviders:Wc(),deprecatedProviders:[],defaultPayload:{pipe_id:wN,connector:null,run_if:null,config:{model:zc,prompt:{template:``,json_schemas:{}}}}},jN=_(`salesforce_record_id`),MN=_(`salesforce_record_created`),NN=_(`salesforce_record_match`),PN=`record:assert:salesforce@1`,FN=r.object({pipe_id:r.literal(PN),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard and custom objects the connected user can create/update.`,enabledIf:v(`salesforce`),optionsDef:Ud({updateableOnly:!0})}),external_id_field:ku({sectionKey:`general`,required:!0,label:`External ID field`,groupPath:`config.general`,path:`config.external_id_field`,info:`The object's External-ID field anchoring the upsert (fields marked External ID in Setup). If the picker is empty, the object has none — create one in Setup; it is the ecosystem-standard idempotency anchor.`,enabledIf:v(`salesforce`),optionsDef:Wd}),external_id_value:S({sectionKey:`general`,label:`External ID value`,inputType:`text`,expectedTagType:`string`,expectedTagFormat:`text`,groupPath:`config.general`,path:`config.external_id_value`,placeholder:`{{ company_domain }}`,info:"The value to match/create on — a literal or a `{{ column }}` reference."}),values:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.values`,label:`Field values`,info:`Field = the Salesforce API name. Include every field required at create (e.g. Name on Account, LastName+Company on Lead) — a create with missing required fields fails and names them. Blank values are skipped, never cleared.`,keyLabel:`Field API name`,valueLabel:`Value`,keyPlaceholder:`Name`,valuePlaceholder:`{{ company_name }}`,maxKeys:50}),bypass_duplicate_alerts:yu({sectionKey:`general`,defaultValue:!1,label:`Bypass duplicate alerts`,groupPath:`config.general`,path:`config.bypass_duplicate_alerts`,info:`Acknowledge ALERT-mode duplicate rules and save anyway. BLOCK-mode rules can never be bypassed — those errors list the matching records.`}),output_fields:P(r.object({[jN.name]:D({fieldName:jN.name}),[MN.name]:D({fieldName:MN.name}),[NN.name]:D({fieldName:NN.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.values??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`values`,n]});if(t.includes(`{{`)){r("Field name must be a literal API name (no `{{ }}` templating).");continue}if(t.includes(`.`)){r(`Invalid field name "${t}" — dotted paths cannot be written; set the lookup ID field (e.g. AccountId) instead.`);continue}/^[a-zA-Z][a-zA-Z0-9_]*$/.test(t)||r(`Invalid Salesforce field name "${t}" — API names are letters, digits, and underscores (custom fields end in __c).`)}})}),IN={"record-assert-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},LN=class extends B{pipeId=PN;payload;payloadSchema=FN;billableOperations=IN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`record-assert-salesforce-v1-salesforce`)}getTemplates(){return[this.payload.config.external_id_value,...Object.values(this.payload.config.values??{})].filter(e=>!!e)}getInputRequirement(){return z(...$d(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[jN.name]:this.catalogOutput(jN),[MN.name]:this.catalogOutput(MN),[NN.name]:this.catalogOutput(NN)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[Qd(this.payload.config.object)||`Account`],writableOnly:!0})}},RN=FN,zN={pipeId:PN,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(PN),label:`Salesforce assert record`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:"Create-or-update (upsert) a Salesforce record anchored on an External ID field — Salesforce's native idempotent write. One matching record updates, none creates; `created` says which happened.",tags:[V.FIELDS],keywords:[`crm`,`sfdc`,`upsert`,`create`,`write`,`sync`,`idempotent`],docPath:W(PN),guide:"The upsert is anchored on the External-ID field: no match creates, one match updates, MULTIPLE matches fail with the record IDs and write nothing (resolve duplicates or use record:update). On the create path Salesforce enforces required fields (the error names them) and duplicate rules may block the save (`bypass_duplicate_alerts` acknowledges ALERT-mode rules only). Call get_provider_context for the object's writable fields; blanks skip, never clear. `salesforce_record_created` = true means a new record — the fresh record rides the output JSON.",billableOperations:IN,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:z(),defaultPayload:{pipe_id:PN,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`Account`,external_id_field:``,external_id_value:`{{ company_domain }}`,values:{},bypass_duplicate_alerts:!1,output_fields:{salesforce_record_id:{alias:``,enabled:!0},salesforce_record_created:{alias:``,enabled:!0},salesforce_record_match:{alias:``,enabled:!0}}}}},BN=_(`attio_record_id`),VN=_(`attio_record_found`),HN=_(`attio_record_match`),UN=`record:lookup:attio@1`,WN=r.object({pipe_id:r.literal(UN),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard objects plus this workspace's custom objects — all objects work.`,enabledIf:v(`attio`),optionsDef:xf}),input_fields:F(r.object({[BN.name]:T({fieldName:BN.name})})),output_fields:P(r.object({[VN.name]:D({fieldName:VN.name}),[HN.name]:D({fieldName:HN.name})}))})}),GN=e=>R(G(BN,e)),KN={"record-lookup-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},qN=class extends B{pipeId=UN;payload;payloadSchema=WN;billableOperations=KN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`record-lookup-attio-v1-attio`)}getInputRequirement(){return GN(this.payload.config)}getRawOutputFields(){return{[VN.name]:this.catalogOutput(VN),[HN.name]:this.catalogOutput(HN)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_generic`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`})}},JN=WN,YN={pipeId:UN,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(UN),label:`Attio lookup record`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Fetch one Attio record of any object (custom objects included) by its record ID — the full record with every attribute. A missing record completes with found = false.`,tags:[V.NEW],keywords:[`crm`,`get`,`fetch`,`by id`,`custom object`,`read`],docPath:W(UN),guide:"Map the record's Attio ID into the `attio_record_id` input — typically chained from a match pipe or search that outputs it. The output JSON carries ALL of the record's attribute values under `values` (id and deep-link url beside them) — extract specific attributes with json:extract downstream. found = false is a successful result. Works on every object in the workspace, custom objects included.",billableOperations:KN,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:GN(null),defaultPayload:{pipe_id:UN,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`people`,input_fields:{attio_record_id:{alias:``}},output_fields:{attio_record_found:{alias:``,enabled:!0},attio_record_match:{alias:``,enabled:!0}}}}},XN=_(`salesforce_record_id`),ZN=_(`salesforce_record_found`),QN=_(`salesforce_record_match`),$N=`record:lookup:salesforce@1`,eP=r.object({pipe_id:r.literal($N),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard and custom objects the connected user can query.`,enabledIf:v(`salesforce`),optionsDef:Ud()}),input_fields:F(r.object({[XN.name]:T({fieldName:XN.name})})),output_fields:P(r.object({[ZN.name]:D({fieldName:ZN.name}),[QN.name]:D({fieldName:QN.name})}))})}),tP=e=>R(G(XN,e)),nP={"record-lookup-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},rP=class extends B{pipeId=$N;payload;payloadSchema=eP;billableOperations=nP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`record-lookup-salesforce-v1-salesforce`)}getInputRequirement(){return tP(this.payload.config)}getRawOutputFields(){return{[ZN.name]:this.catalogOutput(ZN),[QN.name]:this.catalogOutput(QN)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[Qd(this.payload.config.object)||`Contact`]})}},iP=eP,aP={pipeId:$N,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U($N),label:`Salesforce record lookup`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Fetch a full Salesforce record (any standard or custom object) by its record ID — every field visible to the connected user. A deleted or missing record completes with found = false.`,tags:[V.FIELDS],keywords:[`crm`,`sfdc`,`read`,`fetch`,`get`,`record`,`custom object`],docPath:W($N),guide:"The record-ID input consumes `salesforce_record_id`, which every Salesforce surface emits — chain from a match pipe or search (alias it to point at a differently named column). Returns ALL fields the connected user can see, nested under `record` in the output JSON — fields hidden by field-level security are silently absent. found = false (deleted/missing id) is a successful result.",billableOperations:nP,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:tP(null),defaultPayload:{pipe_id:$N,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`Contact`,input_fields:{salesforce_record_id:{alias:``}},output_fields:{salesforce_record_found:{alias:``,enabled:!0},salesforce_record_match:{alias:``,enabled:!0}}}}},oP=_(`attio_record_found`),sP=_(`attio_record_id`),cP=_(`attio_record_match`),lP=`record:match:attio@1`,uP=r.object({pipe_id:r.literal(lP),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard objects plus this workspace's custom objects — all objects work.`,enabledIf:v(`attio`),optionsDef:xf}),matching_attribute:ku({sectionKey:`general`,required:!0,label:`Matching attribute`,groupPath:`config.general`,path:`config.matching_attribute`,info:`The object's UNIQUE attributes — one value maps to at most one record. Deals have none by default (find them via deal:match instead); custom objects list their own unique attributes.`,enabledIf:v(`attio`),optionsDef:Of(`object`)}),value:S({sectionKey:`general`,label:`Value`,inputType:`text`,expectedTagType:`string`,expectedTagFormat:`text`,groupPath:`config.general`,path:`config.value`,placeholder:`{{ serial_number }}`,info:"The value to match — a literal or a `{{ column }}` reference. Matched exactly against the unique attribute."}),output_fields:P(r.object({[oP.name]:D({fieldName:oP.name}),[sP.name]:D({fieldName:sP.name}),[cP.name]:D({fieldName:cP.name})}))})}),dP=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},fP={"record-match-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},pP=class extends B{pipeId=lP;payload;payloadSchema=uP;billableOperations=fP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`record-match-attio-v1-attio`)}getTemplates(){return[this.payload.config.value].filter(e=>!!e)}getInputRequirement(){return z(...dP(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[oP.name]:this.catalogOutput(oP),[sP.name]:this.catalogOutput(sP),[cP.name]:this.catalogOutput(cP)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_query`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`})}},mP=uP,hP={pipeId:lP,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(lP),label:`Attio match record`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Find one record of ANY Attio object (custom objects included) by a unique attribute — the generic find-by-key. A clean miss completes with found = false.`,tags:[V.NEW],keywords:[`crm`,`find`,`exists`,`unique`,`key`,`custom object`,`dedupe`],docPath:W(lP),guide:`Call get_provider_context first — it lists each object's unique attributes (the legal match targets). For people/companies prefer the typed person:match/company:match pipes (identity defaults + richer envelopes); use this for custom objects, users/workspaces, or custom unique attributes. Matching is exact; found = false is a successful result. Chain attio_record_id into record:update:attio@1.`,billableOperations:fP,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:z(),defaultPayload:{pipe_id:lP,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`people`,matching_attribute:`email_addresses`,value:`{{ email }}`,output_fields:{attio_record_found:{alias:``,enabled:!0},attio_record_id:{alias:``,enabled:!0},attio_record_match:{alias:``,enabled:!0}}}}},gP=_(`attio_record_id`),_P=_(`attio_update_result`),vP=`record:update:attio@1`,yP=r.object({pipe_id:r.literal(vP),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard objects plus this workspace's custom objects — all objects work.`,enabledIf:v(`attio`),optionsDef:xf}),input_fields:F(r.object({[gP.name]:T({fieldName:gP.name})})),values:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.values`,label:`Attribute values`,info:"Attribute = the Attio api_slug (e.g. `job_title`, custom attributes too). In the Value column, type `/` to insert a field reference. Select/status values are matched by TITLE (workspace-defined, never auto-created). Leave a value empty to skip that attribute for the row — blank values are skipped, never cleared.",keyLabel:`Attribute slug`,valueLabel:`Value`,keyPlaceholder:`job_title`,valuePlaceholder:`{{ job_title }}`,maxKeys:50}),multiselect_mode:Cu({sectionKey:`general`,required:!1,label:`Multiselect values`,groupPath:`config.general`,path:`config.multiselect_mode`,description:`Only affects multiselect attributes (e.g. domains, email_addresses, multi-selects): append adds the written value to the existing ones; overwrite replaces the full list.`,options:[{label:`Append`,value:`append`},{label:`Overwrite`,value:`overwrite`}]}).default(`append`),output_fields:P(r.object({[_P.name]:D({fieldName:_P.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.values??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`values`,n]});if(t.includes(`{{`)){r("Attribute slug must be a literal api_slug (no `{{ }}` templating).");continue}/^[a-z][a-z0-9_]*$/.test(t)||r(`Invalid Attio attribute slug "${t}" — api_slugs are lowercase letters, digits, and underscores.`)}})}),bP=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},xP=e=>R(G(gP,e)),SP={"record-update-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},CP=class extends B{pipeId=vP;payload;payloadSchema=yP;billableOperations=SP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`record-update-attio-v1-attio`)}getTemplates(){return Object.values(this.payload.config.values??{}).filter(e=>!!e)}getInputRequirement(){return z(xP(this.payload.config),...bP(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[_P.name]:this.catalogOutput(_P)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_write`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`,writableOnly:!0})}},wP=yP,TP={pipeId:vP,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(vP),label:`Attio update record`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:`Update an Attio record (standard or custom object) by its record ID, mapping columns to attributes. Blank values are skipped so un-enriched cells never erase CRM data.`,tags:[V.FIELDS],keywords:[`crm`,`write`,`sync`,`record`,`attribute`,`custom object`],docPath:W(vP),guide:"Resolve the record ID first (person:match/company:match/record:match → Update by ID is the canonical recipe) and map it into the `attio_record_id` input. Call get_provider_context for the selected object to see WRITABLE attributes and select/status titles — Attio rejects read-only (enriched) attributes and unknown option titles (workspace-defined, never auto-created). Value coercion is permissive: select/status by title, domains/emails as plain strings, workspace-member emails for actor references, record IDs for record references. 'Append vs overwrite' only affects multiselect attributes. Blank values are skipped, not cleared.",billableOperations:SP,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:xP(null),defaultPayload:{pipe_id:vP,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`people`,input_fields:{attio_record_id:{alias:``}},values:{},multiselect_mode:`append`,output_fields:{attio_update_result:{alias:``,enabled:!0}}}}},EP=_(`salesforce_record_id`),DP=_(`salesforce_update_result`),OP=`record:update:salesforce@1`,kP=(e,t)=>{let n=e.value;for(let r of Object.keys(n[t]??{})){let n=r.trim();if(!n)continue;let i=n=>e.issues.push({code:`custom`,input:r,message:n,path:[t,r]});if(n.includes(`{{`)){i("Field name must be a literal API name (no `{{ }}` templating).");continue}if(n.includes(`.`)){i(`Invalid field name "${n}" — dotted paths cannot be written; set the lookup ID field (e.g. AccountId) instead.`);continue}/^[a-zA-Z][a-zA-Z0-9_]*$/.test(n)||i(`Invalid Salesforce field name "${n}" — API names are letters, digits, and underscores (custom fields end in __c).`)}},AP=r.object({pipe_id:r.literal(OP),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard and custom objects the connected user can update.`,enabledIf:v(`salesforce`),optionsDef:Ud({updateableOnly:!0})}),values:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.values`,label:`Field values`,info:"Field = the Salesforce API name (`Title`, custom fields like `Lead_Score__c`). In the Value column, type `/` to insert a field reference. Blank values are skipped, never cleared. Restricted-picklist values must match existing entries exactly (case-sensitive); multi-select picklist writes REPLACE the whole set (semicolon-joined).",keyLabel:`Field API name`,valueLabel:`Value`,keyPlaceholder:`Title`,valuePlaceholder:`{{ job_title }}`,maxKeys:50}),bypass_duplicate_alerts:yu({sectionKey:`general`,defaultValue:!1,label:`Bypass duplicate alerts`,groupPath:`config.general`,path:`config.bypass_duplicate_alerts`,info:`Acknowledge ALERT-mode duplicate rules and save anyway. BLOCK-mode rules can never be bypassed — those errors list the matching records.`}),input_fields:F(r.object({[EP.name]:T({fieldName:EP.name})})),output_fields:P(r.object({[DP.name]:D({fieldName:DP.name})}))}).check(e=>kP(e,`values`))}),jP=e=>R(G(EP,e)),MP={"record-update-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},NP=class extends B{pipeId=OP;payload;payloadSchema=AP;billableOperations=MP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`record-update-salesforce-v1-salesforce`)}getTemplates(){return Object.values(this.payload.config.values??{}).filter(e=>!!e)}getInputRequirement(){return z(jP(this.payload.config),...$d(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[DP.name]:this.catalogOutput(DP)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[Qd(this.payload.config.object)||`Contact`],writableOnly:!0})}},PP=AP,FP={pipeId:OP,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(OP),label:`Salesforce update record`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:`Update a Salesforce record (standard or custom object) by its record ID, mapping columns to fields. Blank values are skipped so un-enriched cells never erase CRM data; the output carries the fresh post-save record.`,tags:[V.FIELDS],keywords:[`crm`,`sfdc`,`write`,`sync`,`field`,`custom object`],docPath:W(OP),guide:"The record-ID input consumes `salesforce_record_id`, which every Salesforce surface emits — chain from a match pipe (alias it to point at a differently named column). Call get_provider_context for the object's WRITABLE fields and picklist values — formula fields are read-only, restricted-picklist values are validated before the write (case-sensitive), and converted leads are read-only entirely (update the contact via ConvertedContactId instead). Duplicate rules may block the save; the error includes the admin's message and the matching record IDs, and `bypass_duplicate_alerts` acknowledges ALERT-mode rules only. Rows where every value renders blank skip the API call. Consume post-write values from the result JSON's `record` — formulas and triggers may rewrite fields after save.",billableOperations:MP,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:jP(null),defaultPayload:{pipe_id:OP,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`Contact`,values:{},bypass_duplicate_alerts:!1,input_fields:{salesforce_record_id:{alias:``}},output_fields:{salesforce_update_result:{alias:``,enabled:!0}}}}},IP=[{label:`demo-leads`,value:`demo-leads`},{label:`demo-companies`,value:`demo-companies`},{label:`demo-contacts`,value:`demo-contacts`}],LP=[{label:`Demo project`,value:`demo-project`},{label:`Sales pipeline`,value:`sales-pipeline`}];function RP(e){let t=e?.config?.project;return typeof t==`string`&&t.length>0?t:void 0}function zP(e){if(!e||e.conditions.length===0)return null;let t=JSON.stringify({logic:e.logic,conditions:e.conditions.map(e=>[e.field_name,e.operator,e.value])}),n=2166136261;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,`0`)}function BP(e,t,n){let r=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,40),i=`rr--${r(e)}--${r(t)}`;return n?`${i}--f-${r(n)}`:i}function VP(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n}const HP={requires:{connection:`pipe0`},enabledIf:v(`pipe0`,`Select a pipe0 connection to see sheet suggestions`),options:async({query:e,client:t,environment:n})=>n===`sandbox`?IP:t?(await t.sheets.list({query:e})).map(e=>({label:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},UP={requires:{connection:`pipe0`,fields:[`config.project`]},enabledIf:v(`pipe0`,`Select a pipe0 connection to see sheet suggestions`),options:async({query:e,client:t,environment:n,payload:r})=>n===`sandbox`?IP:t?(await t.sheets.list({query:e,projectSlug:RP(r)})).map(e=>({label:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},WP={requires:{connection:`pipe0`},enabledIf:v(`pipe0`,`Select a pipe0 connection to see project suggestions`),options:async({query:e,client:t,environment:n})=>n===`sandbox`?LP:t?(await t.projects.list({query:e})).map(e=>({label:e.name&&e.name!==e.slug?`${e.name} (${e.slug})`:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},GP=[{value:`email`,label:`email`,data:{type:`string`,format:`email`}},{value:`name`,label:`name`,data:{type:`string`}},{value:`company`,label:`company`,data:{type:`string`}}],KP={"demo-leads":GP,"demo-companies":[{value:`domain`,label:`domain`,data:{type:`string`,format:`website_url`}},{value:`company_name`,label:`company_name`,data:{type:`string`}}],"demo-contacts":GP},qP=e=>({requires:{connection:`pipe0`,fields:[e.sheetPath]},enabledIf:v(`pipe0`,`Select a pipe0 connection to see column suggestions`),options:async({payload:t,client:n,environment:r})=>{let i=VP(t,e.sheetPath);return typeof i!=`string`||!i.trim()||i.includes(`{{`)?[]:r===`sandbox`?KP[i.trim()]??GP:n?(await n.sheets.fields({slug:i.trim()})).filter(t=>(e.includeJson||t.type!==`json`)&&t.name.toLowerCase()!==`id`).map(e=>({value:e.name,label:e.name,data:{type:String(e.type),...e.format?{format:String(e.format)}:{}}})):[]},widgets:{provider_logo:{provider:`pipe0`}}}),JP=`row:append:sheet@1`,YP=_(`sheet_record_id`),XP=_(`created_sheet`),ZP=r.object({pipe_id:r.literal(JP),connector:C(),run_if:x(),config:r.object({project:S({label:`Project`,info:"Project the destination sheet lives in (its org-unique slug). Pick an existing project or type a new slug — a new project is created when `allow_entity_creation` is on.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.project`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:WP}),sheet:S({label:`Sheet ID`,info:'The destination sheet\'s identifier (its slug — NOT the display name). Slugs are org-unique: pick an existing sheet to append into it, or type a NEW slug to create one — a generic slug (e.g. "results", "companies") is likely to match an unrelated existing sheet, so for a new sheet use a short descriptive slug plus a few random chars (e.g. "ceos-x7k2") that can\'t collide. Type `@` to insert a field reference / `$` for a secret.',groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:UP,enabledIf:e=>e.config?.project?{disabled:!1}:{disabled:!0,message:`Select a project first`}}),run_added_rows:yu({defaultValue:!0,groupPath:`config.advanced`,path:`config.run_added_rows`,sectionKey:`general`,description:`Auto-run the destination sheet's pipes over the row this pipe appended. A bounded onward chain is fine (the destination's own write pipes cascade further); auto-run is suppressed only when the destination's write chain could loop back into a sheet on the path.`,label:`Run added rows`}),allow_entity_creation:yu({label:`Allow creating missing entities`,description:`Create missing fields, sheets, and projects as needed (unknown fields become columns; a missing sheet or project is created).`,defaultValue:!0,groupPath:`config.advanced`,path:`config.allow_entity_creation`,sectionKey:`general`}),write_fields:iu({label:`Fields`,info:`All fields are written if empty. An entry's optional alias renames the destination column.`,groupPath:`config.general`,path:`config.write_fields`,sectionKey:`general`,disableSearch:!0}),output_fields:P(r.object({[YP.name]:D({fieldName:YP.name}),[XP.name]:D({fieldName:XP.name})}))})}).check(e=>{let t=e.value.config?.write_fields??[],n=t.map(e=>(e.alias?.trim()||e.field_name).toLowerCase());t.forEach((t,r)=>{let i=t.alias?.trim();i&&(dd(i)&&e.issues.push({code:`custom`,input:i,path:[`config`,`write_fields`,r,`alias`],message:`'${i}' is reserved and cannot be written to the destination sheet.`}),n.filter(e=>e===i.toLowerCase()).length>1&&e.issues.push({code:`custom`,input:i,path:[`config`,`write_fields`,r,`alias`],message:`'${i}' collides with another write_fields destination name.`}))})}),QP={"row-append-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},$P=class extends B{pipeId=JP;payload;payloadSchema=ZP;billableOperations=QP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`row-append-sheet-v1-pipe0`)}getInputRequirement(){let e=[ep([this.payload.config.project,this.payload.config.sheet],{expectedType:`string`})];if(this.payload.config.write_fields?.length)for(let t of this.payload.config.write_fields)e.push(R({name:t.field_name,resolvedName:t.field_name,label:``,description:``,type:e=>{let n=Ld(e,t.field_name);if(!n)throw Error(`Unable to find field with name ${t.field_name}. But needed by prompt parser.`);return n.type||`unknown`},format:null}));return z(...e)}getSecretRequirements(){return q([this.payload.config.project,this.payload.config.sheet])}getConstantRequirements(){return tp([this.payload.config.project,this.payload.config.sheet])}getRawOutputFields(){return{[YP.name]:this.catalogOutput(YP),[XP.name]:this.catalogOutput(XP)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},eF=ZP,tF={pipeId:JP,basePipe:U(JP),label:`Append row to sheet`,executionMode:`single`,categories:[`actions`,`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:"Add rows to a pipe0 sheet in a given project. config.project and config.sheet may each be a literal slug or a `{{ field_name }}` tag.",guide:`Append records to another pipe0 sheet. config.project (REQUIRED) is the destination project's org-unique slug — when working inside a project, pass THAT project's slug (see CURRENT CONTEXT). config.sheet is the destination sheet's slug; both may be a \`{{ field }}\` tag for a per-row destination. config.write_fields is the destination's CONTRACT — list exactly the columns the destination consumes, and use an entry's optional alias to rename its destination column ({ field_name: "email", alias: "signup_email" } reads \`email\` from the source row and writes it as \`signup_email\`); EMPTY write_fields mirrors EVERY source column into the destination, which is almost never what a routing/handoff sheet wants. With allow_entity_creation on, a missing project/sheet (and unknown fields) are created; if the sheet slug already exists in a DIFFERENT project the rows fail. Destination slugs are ORG-UNIQUE, so config.sheet addresses a sheet across your whole org: an existing slug REUSES that sheet (appending into it) when it's in config.project, and FAILS when it lives elsewhere — so for a genuinely NEW sheet use a short descriptive slug plus 3-4 random alphanumeric chars (e.g. "ceos-x7k2") — you cannot see other projects' slugs, so only the random suffix makes a new slug collision-proof; set the display name afterwards (in-app via the name_workspace tool; via API with PATCH /v1/sheets/{sheet_id}). To explode a LIST field into MANY rows (denormalize a 1:N relationship), use row:expandappend:sheet@1 instead. To bulk-copy existing rows across sheets, prefer the rows:copy_to_sheet@1 effect. NON-IDEMPOTENT: each run appends again, so re-running duplicates rows (and you cannot undo rows written to another sheet) — dry-run the flow in sandbox first (env:change@1), and to retry after a partial failure adopt the succeeded cells (rows:adopt@1 with adopt_statuses:["completed"]) then rows:enrich@1. Requires a pipe0 connection (list_connections).`,docPath:W(JP),tags:[V.FIELDS],keywords:[`add`,`insert`,`write`,`push`,`export`],billableOperations:QP,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:JP,connector:{strategy:`first`,connections:[]},run_if:null,config:{project:``,sheet:``,run_added_rows:!0,allow_entity_creation:!0,write_fields:[],output_fields:{sheet_record_id:{alias:``,enabled:!0},created_sheet:{alias:``,enabled:!0}}}}},nF=`row:expandappend:sheet@1`,rF=_(`sheet_record_ids`),iF=_(`input_objects`),aF=`expanded_value`,oF=r.object({pipe_id:r.literal(nF),connector:C(),run_if:x(),config:r.object({project:S({label:`Project`,info:"Project the destination sheet lives in (its org-unique slug). Pick an existing project or type a new slug — a new project is created when `allow_entity_creation` is on.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.project`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:WP}),sheet:S({label:`Sheet ID`,info:`The destination sheet's identifier (its slug — NOT the display name). Slugs are org-unique: pick an existing sheet to write into it, or type a NEW slug to create one. A generic slug (e.g. "results", "companies") is likely to match an unrelated existing sheet, so for a new sheet use a short descriptive slug plus a few random chars (e.g. "ceos-x7k2") that can't collide.`,groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:UP,enabledIf:e=>e.config?.project?{disabled:!1}:{disabled:!0,message:`Select a project first`}}),run_added_rows:yu({defaultValue:!0,groupPath:`config.general`,path:`config.run_added_rows`,sectionKey:`general`,info:`Auto-run the destination sheet's pipes over the rows this pipe appended. A bounded onward chain is fine (the destination's own write pipes cascade further); auto-run is suppressed only when the destination's write chain could loop back into a sheet on the path.`,label:`Run added rows`}),write_fields:iu({label:`Fields`,info:`Source-row fields written onto every exploded row alongside the item (e.g. a join key like user_id). An entry's optional alias renames the destination column. Unlike row:append:sheet@1, empty writes NO source columns.`,groupPath:`config.general`,path:`config.write_fields`,sectionKey:`general`,disableSearch:!0}),allow_entity_creation:yu({label:`Allow creating missing entities`,description:`Create missing entities as needed (a missing sheet or project is created, along with the output column on the destination).`,defaultValue:!0,groupPath:`config.advanced`,path:`config.allow_entity_creation`,sectionKey:`general`}),...bu({groupPath:`config.destination`,sectionKey:`general`,defaultName:aF,nameInfo:`Name of the field each list item is written to on the destination sheet. Each item is stored as-is (objects/arrays as one json cell); extract flat columns afterwards with json:extract:multi@1.`}),input_fields:F(r.object({[iF.name]:T({fieldName:iF.name})})),output_fields:P(r.object({[rF.name]:D({fieldName:rF.name})}))})}).check(e=>{let t=e.value.config?.destination_field_name;t&&dd(t)&&e.issues.push({code:`custom`,input:t,path:[`config`,`destination_field_name`],message:`'${t}' is reserved and cannot be used as a destination field name.`});let n=(t?.trim()||`expanded_value`).toLowerCase(),r=new Set;(e.value.config?.write_fields??[]).forEach((t,i)=>{let a=t.alias?.trim(),o=a||t.field_name,s=a?`alias`:`field_name`,c=o.toLowerCase();dd(o)&&e.issues.push({code:`custom`,input:o,path:[`config`,`write_fields`,i,s],message:`'${o}' is reserved and cannot be written to the destination sheet.`}),c===n&&e.issues.push({code:`custom`,input:o,path:[`config`,`write_fields`,i,s],message:`'${o}' collides with the destination field each item is written to.`}),r.has(c)&&e.issues.push({code:`custom`,input:o,path:[`config`,`write_fields`,i,s],message:`'${o}' is listed more than once.`}),r.add(c)})}),sF={"row-expandappend-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},cF=e=>R(G(iF,e)),lF=class extends B{pipeId=nF;payload;payloadSchema=oF;billableOperations=sF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`row-expandappend-sheet-v1-pipe0`)}getInputRequirement(){return cF(this.payload.config)}getRawOutputFields(){return{[rF.name]:this.catalogOutput(rF)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},uF=oF,dF={pipeId:nF,basePipe:U(nF),label:`Expand list to sheet`,executionMode:`single`,categories:[`actions`,`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:"Expand a list into sheet rows — each item is written as-is to an `expanded_value` column (objects/arrays as json).",guide:`Denormalize a 1:N list into rows on ANOTHER sheet: each item in the input_objects array becomes its own row on config.sheet, inside config.project (REQUIRED — the destination project's org-unique slug; when working inside a project pass THAT slug, see CURRENT CONTEXT). Every item is written AS-IS to a single column on the destination — an object/array lands as one json cell (its fields are NOT spread into separate columns), a primitive as a scalar. That column is \`expanded_value\` by default; rename/retype it via config.destination_field_name / destination_field_type / destination_field_format / destination_field_label (type/format are inferred from the data when left unset). To get flat columns, run json:extract:multi@1 ON THE DESTINATION sheet afterwards to pull out exactly the values you need. config.write_fields copies chosen SOURCE-row fields onto every exploded row alongside the item (e.g. a stable join key like user_id, so downstream sheets can be joined/deleted per source entity); an entry's optional alias renames its destination column ({ field_name: "email", alias: "signup_email" } reads \`email\` from the source row and writes it as \`signup_email\`) — unlike row:append:sheet@1, EMPTY write_fields writes NO source columns (the exploded item is the row). Values are read from the row at run time and are deliberately NOT typed inputs, so editing the list never force-requeues this non-idempotent pipe. With allow_entity_creation on, a missing project/sheet (and the expanded_value column) are created; a sheet slug that exists in a DIFFERENT project fails the rows. Destination slugs are ORG-UNIQUE, so config.sheet addresses a sheet across your whole org: an existing slug REUSES that sheet (appending into it) when it's in config.project, and FAILS when it lives elsewhere — a generic slug like "results"/"companies"/"current-employers" will likely hit an unrelated sheet. When you mean a genuinely NEW sheet, use a short descriptive slug plus 3-4 random alphanumeric chars (e.g. "ceos-x7k2", "prospects-employers-9fq") — you cannot see other projects' slugs, so only the random suffix makes a new slug collision-proof; give the sheet its human-readable display name afterwards (in-app via the name_workspace tool; via API with PATCH /v1/sheets/{sheet_id}). Use it when a column holds a list you need per-element (e.g. a profile's current employers) BEFORE enriching each element — never collapse the list with an LLM. Requires a pipe0 connection (resolve via list_connections). Typical pipeline: json:extract:multi@1 to build the array column → this pipe to explode it into an intermediary sheet → json:extract:multi@1 THERE to flatten the fields you need out of expanded_value → enrich each row (e.g. person:match:role:waterfall@1) → rows:copy_to_sheet@1 to the final sheet. NON-IDEMPOTENT: each run appends again, so re-running duplicates rows (and you cannot undo rows written to another sheet) — dry-run the flow in sandbox first (env:change@1), and to retry after a partial failure adopt the succeeded cells (rows:adopt@1 with adopt_statuses:["completed"]) then rows:enrich@1. In the replace-on-refresh pattern (paired rows:delete:sheet@1 instances), position in the pipes array is NOT execution order — gate THIS pipe with a run_if on each delete's aliased count output (status eq completed): those references are the dependency edges that guarantee delete-before-append and skip the append whenever the deletes were skipped.`,docPath:W(nF),tags:[V.FIELDS],keywords:[`explode`,`denormalize`,`array`,`split`,`one to many`,`fan out`],billableOperations:sF,defaultInputRequirement:cF(null),inputFieldMode:`static`,outputFieldMode:`static`,defaultPayload:{pipe_id:nF,connector:{strategy:`first`,connections:[]},run_if:null,config:{project:``,sheet:``,run_added_rows:!0,allow_entity_creation:!0,write_fields:[],destination_field_name:aF,destination_field_type:``,destination_field_format:``,destination_field_label:``,input_fields:{input_objects:{alias:``}},output_fields:{sheet_record_ids:{alias:``,enabled:!0}}}}},fF=`row:roundrobin:sheet@1`,pF=Ac(v(`pipe0`,`Add a pipe0 connection first`),kc(e=>e.config?.sheet,`Select a sheet first`)),mF=r.object({pipe_id:r.literal(fF),connector:C(),run_if:x(),config:r.object({sheet:ku({label:`Sheet`,info:`The sheet to rotate through — e.g. a roster of sellers. Always another sheet.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet`,required:!0,optionsDef:HP}),sheet_where:Rl({label:`Rotation pool`,info:`Only target-sheet rows matching these conditions rotate. Leave empty to rotate over the whole sheet.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_where`,required:!1,enabledIf:pF,fieldNamePlaceholder:`segment`,optionsDef:qP({sheetPath:`config.sheet`})}),sheet_unique_field:ou({label:`Unique column`,info:`Column of the target sheet that must be filled and unique in every row — checked at run time.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_unique_field`,required:!0,enabledIf:pF,optionsDef:qP({sheetPath:`config.sheet`})}),sheet_copy_fields:au({label:`Fields to bring over`,info:`Target-sheet columns copied from the picked row; each becomes an output column.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_copy_fields`,minItems:1,enabledIf:pF,optionsDef:qP({sheetPath:`config.sheet`,includeJson:!0})}),sheet_weight_field:ou({label:`Weight column`,info:`Numeric target-sheet column scaling each row's share. 0 pauses a row; empty counts as 1. Leave unset for equal shares.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_weight_field`,enabledIf:pF,optionsDef:qP({sheetPath:`config.sheet`})}),counter_field:ou({label:`Counter field`,info:`Column of this sheet whose unique values advance the rotation.`,groupPath:`config.general`,sectionKey:`general`,path:`config.counter_field`,required:!0})})}),hF={"row-roundrobin-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},gF=class extends B{pipeId=fF;payload;payloadSchema=mF;billableOperations=hF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`row-roundrobin-sheet-v1-pipe0`)}getTemplatedFields(){return(this.payload.config.sheet_where?.conditions??[]).map(e=>typeof e.value==`string`?e.value:null)}getInputRequirement(){let e=this.payload.config.counter_field.field_name,t=R({name:e,resolvedName:e,label:``,description:``,source:`config.counter_field — a column of THIS sheet`,type:t=>Ld(t,e)?.type||`unknown`,format:null}),n=ep(this.getTemplatedFields(),{expectedType:`string`});return n.kind===`all`&&n.of.length===0?t:z(t,n)}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getBucketRequirements(){let e=at(this.payload.config.sheet),t=this.payload.config.counter_field.field_name;if(!e||!t)return[];let n=this.payload.config.sheet_where??null;return(n?.conditions??[]).some(e=>typeof e.value==`string`&&e.value.includes(`{{`))?[]:[{slug:BP(e,t,zP(n)),type:`counter`,schema:null,allowCreation:!0}]}getRawOutputFields(){let e={};for(let t of this.payload.config.sheet_copy_fields){if(!t.field_name)continue;let n=t.alias||t.field_name;e[t.field_name]={description:`Value of the target sheet's "${t.field_name}" column on the round-robin-picked row.`,enabled:!0,format:t.format??null,label:n,name:t.field_name,resolvedName:n,jsonMeta:null,type:t.type??`unknown`,isCatalogFIeld:!1,isPrimaryOutput:!1}}return e}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},_F=mF,vF={pipeId:fF,basePipe:U(fF),label:`Round-robin from sheet`,executionMode:`single`,categories:[`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:`Rotate through the rows of another sheet (e.g. a sellers roster): each unique counter value picks the next row round-robin, and the selected columns of the picked row become outputs. Re-run safe — the same counter value always picks the same row.`,guide:"Round-robin assignment from another pipe0 sheet (the roster — e.g. sellers). config.sheet is the target sheet's org-unique slug — one FIXED sheet for the whole pipe, never a per-row reference. config.sheet_where (optional) restricts the ROTATION POOL to target-sheet rows matching the conditions (null = whole sheet); condition field_names are LITERAL target-sheet columns, string values may hold `{{ field }}` refs resolved per lead — e.g. segment eq {{ segment }} routes each lead over its own segment's rows. Each distinct RESOLVED filter cycles on its OWN counter (so slot numbers stay consecutive per pool — strict round robin within each pool); avoid high-cardinality templated filters ({{ email }}-like) — every distinct value creates a counter bucket and will exhaust the org bucket quota. config.sheet_unique_field names a TARGET-sheet column that must be filled in EVERY row and unique across rows — the run fails with a clear message if it has gaps or duplicates (this guarantees every roster row is a distinct assignee). config.sheet_copy_fields are the TARGET-sheet columns copied from the picked row; each becomes an output column named like the column — or like the entry's `alias` when set: use an alias whenever THIS sheet already has a column of that name (e.g. roster `email` → alias `seller_email`), otherwise the copy silently writes into the existing column. Entries are typed by `type`/`format` (snapshotted from the target sheet's schema when picked — if the target column's type drifts later, the run fails with an output-type mismatch; re-pick the column to refresh the snapshot). config.counter_field names a column of the CURRENT sheet: every unique value of it takes the next number from an internal counter bucket (first-seen → 1, next new value → 2, …; the SAME value always keeps the SAME number, so re-runs are stable). For LEAD/SIGNUP ROUTING the counter defaults to the ACCOUNT key — a company domain column (work email → field:domainify@1; personal email → reverse lookup; coalesce with fields:merge@1) — so every lead from the same company keeps the same assignee; counter on the person's email ONLY when account grouping is explicitly unwanted (consumer flows). See the routing:leads:roundrobin@1 playbook. The pick is slot (n − 1) mod W over the pool's rows in creation order, where W is the pool's total weight (= row count when unweighted) — adding pool rows only changes the wrap; deleting or reordering reshuffles subsequent picks. config.sheet_weight_field (optional) names a NUMERIC target-sheet column: a row with weight w takes w of every W slots, spread evenly across the cycle (weight 2 ≠ two consecutive picks); weight 0 pauses the row; an empty cell counts as 1; a negative or non-integer weight fails the run loudly. Editing weights re-shapes FUTURE picks only — the counter and its bucket are untouched, so rotation never restarts. The internal counter is a REAL org-scoped counter bucket (visible in the buckets UI, slug `rr--<sheet>--<counter field>`); changing the sheet or the counter field starts a fresh rotation. A row with a missing/empty counter value is gated to skipped before the runner. Empty roster → all outputs no_result. A copied column that is empty on the picked row resolves to no_result. Missing sheet (bad slug) fails the record naming the slug. The target sheet is NEVER modified. FREE pipe0 operation; requires a pipe0 connection (list_connections).",docPath:W(fF),tags:[V.FIELDS],keywords:[`rotate`,`rotation`,`distribute`,`routing`,`assignment`,`owner`,`alternate`],billableOperations:hF,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`config`,defaultPayload:{pipe_id:fF,connector:{strategy:`first`,connections:[]},run_if:null,config:{sheet:``,sheet_where:null,sheet_unique_field:{field_name:``},sheet_copy_fields:[],sheet_weight_field:{field_name:``},counter_field:{field_name:``}}}},yF=`rows:delete:sheet@1`,bF=_(`sheet_deleted_count`),xF=r.object({pipe_id:r.literal(yF),connector:C(),run_if:x(),config:r.object({sheet:S({label:`Sheet ID`,info:"The sheet to delete from (its org-unique slug — NOT the display name). Type `@` to insert a field reference for a per-row sheet. A sheet that does not exist yet completes with 0 deleted.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:HP}),where:Rl({label:`Delete conditions`,info:"Conditions on the target sheet's columns. Column names are literal; in the value, type `/` to insert a field reference (e.g. `{{ user_id }}`). Rows matching the condition are DELETED.",groupPath:`config.general`,sectionKey:`general`,path:`config.where`,fieldNamePlaceholder:`user_id`,optionsDef:qP({sheetPath:`config.sheet`})}),output_fields:P(r.object({[bF.name]:D({fieldName:bF.name})}))})}),SF={"rows-delete-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},CF=class extends B{pipeId=yF;payload;payloadSchema=xF;billableOperations=SF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`rows-delete-sheet-v1-pipe0`)}getTemplatedFields(){return[this.payload.config.sheet,...(this.payload.config.where?.conditions??[]).map(e=>typeof e.value==`string`?e.value:null)]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[bF.name]:this.catalogOutput(bF)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},wF=xF,TF={pipeId:yF,basePipe:U(yF),label:`Delete rows in sheet`,executionMode:`single`,categories:[`tools`,`actions`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:`Delete rows in ANOTHER pipe0 sheet matching a condition block. The replace-on-refresh building block: delete previously written downstream rows before re-appending fresh ones.`,guide:"Delete rows in another pipe0 sheet whose columns match config.where — the delete half of the replace-on-refresh pattern: pair it with the pipe that appends downstream rows (row:append:sheet@1 / row:expandappend:sheet@1), keyed on a stable join column, e.g. `user_id eq \"{{ user_id }}\"`, so a re-enrichment first clears the rows it previously wrote and then re-appends. Position in the pipes array is NOT execution order (pipes run in dependency waves; independent pipes run concurrently) — delete-before-append is enforced by the APPEND pipe's run_if referencing this pipe's (aliased) count output status eq completed, never by list ordering. config.sheet is the target's org-unique slug (literal or `{{ field }}` tag). config.where semantics match rows:find:sheet@1: field_name is a LITERAL target column (not validated against the target — a wrong name behaves like a null cell and deletes NOTHING); string values may contain `{{ field }}` tags resolved per row; a value resolving to an empty string fails the row (a blank key must not delete everything). A target sheet that does not exist yet completes with sheet_deleted_count 0 — first runs happen before downstream sheets exist, by design. The replace pattern usually needs SEVERAL instances on one sheet (one per downstream target) — output names are sheet-global, so alias each instance's sheet_deleted_count (e.g. experiences_deleted_count / profiles_deleted_count) or the defaults collide and the pipeline won't validate. Skip-propagation protects previously written rows ONLY when the templated key is an enrichment OUTPUT (the typed input skips on upstream failure) — an INPUT column key like user_id is always satisfied, so the delete would run even on a failed refresh: gate it with an explicit run_if on a success flag (e.g. a bucket:claim@1 is_claim_successful value eq true) so failed/no_result refreshes keep the old rows. DESTRUCTIVE and NON-idempotent (deleted rows cannot be restored except via the target's timetravel): rehearse in sandbox (env:change@1, the delete is mocked), and after a partial failure adopt succeeded cells (rows:adopt@1) before re-running. Deletes on the same target serialize (exclusive lock) — expect modest throughput on large refreshes. Requires a pipe0 connection (list_connections).",docPath:W(yF),tags:[V.FIELDS],keywords:[`delete`,`remove`,`clear`,`replace`,`refresh`,`cleanup`,`another sheet`,`downstream`,`purge`],billableOperations:SF,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:yF,connector:{strategy:`first`,connections:[]},run_if:null,config:{sheet:``,where:null,output_fields:{sheet_deleted_count:{alias:``,enabled:!0}}}}},EF=`SELECT table_schema, table_name, column_name, data_type FROM information_schema.columns WHERE table_schema NOT IN ('pg_catalog', 'information_schema') ORDER BY table_schema, table_name, ordinal_position`,DF=`table_catalog NOT IN ('system', '__databricks_internal') AND table_schema <> 'information_schema'`,OF=`SELECT table_catalog, table_schema, table_name FROM system.information_schema.tables WHERE ${DF} ORDER BY table_catalog, table_schema, table_name`,kF=`SELECT table_catalog, table_schema, table_name, column_name, data_type FROM system.information_schema.columns WHERE ${DF} ORDER BY table_catalog, table_schema, table_name, ordinal_position`;function AF(e){return typeof e==`string`?e:String(e??``)}function jF(e){let t=new Map;for(let n of e){let e=AF(n.table_schema),r=AF(n.table_name);if(!r)continue;let i=`${e}.${r}`,a=t.get(i);a||(a={schema:e,name:r,columns:[]},t.set(i,a)),a.columns.push({name:AF(n.column_name),type:AF(n.data_type)})}return t}function MF(e){return`${e.catalog?`${e.catalog}.`:``}${e.schema?`${e.schema}.`:``}${e.name}`}function NF(e,t){if(e.length===0)return{summary:`The connected database exposes no tables outside the system schemas — nothing to query yet.`,data:{tables:[],truncated:t}};let n=e.map(e=>{if(e.columns.length===0)return`- ${MF(e)} — (columns not listed; DESCRIBE or sample to inspect)`;let t=e.columns.slice(0,50),n=e.columns.length-t.length,r=t.map(e=>e.type?`${e.name}:${e.type}`:e.name).join(`, `);return`- ${MF(e)} — ${r}${n>0?` (+${n} more)`:``}`}),r=e.some(e=>e.catalog)?` Names are fully qualified (catalog.schema.table) — use them VERBATIM in config.query.`:``;return{summary:[`Schema map (${e.length} table${e.length===1?``:`s`}${t?`, truncated — the database has more`:``}). Write config.query against these;${r} sample rows free via run_search_oneshot.`,...n].join(`
84
+ }`,inputType:`text`,maxLength:1e6,expectedTagType:`string`,expectedTagFormat:`text`,multiline:!0}).nullable(),headers:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.headers`,label:`Headers`,info:"In the value column, type `/` to insert a field or secret reference (e.g. `Bearer {{ secret … }}`).",keyLabel:`Header`,valueLabel:`Value`,keyPlaceholder:`Authorization`,valuePlaceholder:`Bearer {{ secret … }}`,maxKeys:50}),expected_response_schema:Ou({sectionKey:`general`,groupPath:`config.advanced`,path:`config.expected_response_schema`,label:`Expected response shape`,description:`Optional JSON Schema. Successful responses that don't satisfy it are marked failed. Extra properties are always tolerated (whitelist).`,allowEmpty:!0}).optional(),output_fields:P(r.object({[PD.name]:D({fieldName:PD.name}),[FD.name]:D({fieldName:FD.name}),[ID.name]:D({fieldName:ID.name})}))})}),RD={"http-request-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:.001},mode:`always`}},zD=class extends B{pipeId=ND;payload;payloadSchema=LD;billableOperations=RD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`http-request-v1-pipe0`)}getTemplatedFields(){return[this.payload.config.url,this.payload.config.body,...Object.values(this.payload.config.query_params??{}),...Object.values(this.payload.config.headers??{})]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[PD.name]:this.catalogOutput(PD),[FD.name]:this.catalogOutput(FD),[ID.name]:this.catalogOutput(ID)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},BD=LD,VD={pipeId:ND,basePipe:U(ND),label:`HTTP request`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Make a generic GET/POST/PUT/PATCH/DELETE HTTP request and capture the JSON response. Optionally validate the response against a JSON schema.`,tags:[V.LOGIC,V.JSON,V.NEW],keywords:[`api`,`rest`,`webhook`,`fetch`,`get`,`post`,`endpoint`,`curl`],docPath:W(ND),billableOperations:RD,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:ND,run_if:null,connector:null,config:{method:`GET`,url:``,query_params:{},body:``,headers:{},expected_response_schema:{},output_fields:{http_response_status:{alias:``,enabled:!0},http_response_body:{alias:``,enabled:!0},http_response_headers:{alias:``,enabled:!1}}}}},HD=`json:extract:multi@1`,UD=r.object({pipe_id:r.literal(HD),run_if:x(),connector:Kl(),config:r.object({json_extraction:pl()})}),WD={"json-extract-multi-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},GD=class extends B{pipeId=HD;payload;payloadSchema=UD;billableOperations=WD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`json-extract-multi-v1-pipe0`)}getInputRequirement(){return R({description:``,name:this.payload.config.json_extraction.field_name,format:null,label:``,type:`json`,resolvedName:this.payload.config.json_extraction.field_name})}getRawOutputFields(){let e={};for(let t of this.payload.config.json_extraction.extractions)e[t.output_field.name||t.output_field.name]={description:`Extracted value from JSON input field ${this.payload.config.json_extraction.field_name}.`,enabled:!0,format:t.output_field.format||null,label:t.output_field.label||`Extract JSON`,name:t.output_field.name,resolvedName:t.output_field.name,jsonMeta:null,type:t.output_field.type,isCatalogFIeld:!1,isPrimaryOutput:!1};return e}getConnectionsRequirements(){return[]}},KD=UD,qD={pipeId:HD,basePipe:U(HD),inputFieldMode:`config`,outputFieldMode:`config`,label:`JSON extract`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Extract nested JSON properties into new output fields.`,guide:'Deterministic JSON extraction — PREFER this over prompt:run@1 whenever you need a value out of a JSON / known-schema column (no LLM, reproducible, schedulable). config.json_extraction.field_name is the source json column; each extraction has a JSONata `path` plus an output_field. Read the source column\'s JSON schema (get_pipe_schema / get_search_schema output fields, or get_sheet_schema) to author the path. Examples over a profile\'s employment_history array: `employment_history[is_current_employer=true][]` (array of current jobs → output_field.type "json"); `employment_history[is_primary_current_employer=true].company_domain` (scalar → output_field.type "string"). Set output_field.type to "json" for an object/array result, "string" for a scalar. CRITICAL for a list you will fan out (e.g. into row:expandappend:sheet@1): a JSONata filter returns the matched ELEMENT when exactly one row matches but an ARRAY when several do — so ALWAYS append the array constructor `[]` to force a consistent array in every row (`employment_history[is_current_employer=true][]`, not `...=true]`). Without it the column is an object in single-match rows and an array in others, and the downstream expand rejects the object rows. To confirm a NEW path resolves the shape you expect before running anything downstream, switch the sheet to SANDBOX (env:change@1) and run just this extraction — it runs for REAL in sandbox (no writes, no spend), so you can read the actual result, fix the path, then switch back to production.',docPath:W(HD),tags:[V.JSON],keywords:[`parse`,`pick`,`path`,`nested`,`property`,`jsonata`,`unpack`],managedProviders:[`pipe0`],deprecatedProviders:[],allowedUserConnectionProviders:[],billableOperations:WD,defaultInputRequirement:null,defaultPayload:{pipe_id:HD,run_if:null,connector:null,config:{json_extraction:{field_name:``,extractions:[]}}}},JD=`lead:enroll:amplemarket@1`,YD={"lead-enroll-amplemarket-v1-amplemarket":{allowManagedConnection:!1,provider:`amplemarket`,credits:null,mode:null}},XD=_(`email`),ZD=_(`profile_url`),QD=_(`amplemarket_sequence_id`),$D=new Set([`active`,`paused`]),eO=[{label:`Demo · Q3 Outbound`,value:`seq_sandbox_1`},{label:`Demo · Founder Intros`,value:`seq_sandbox_2`}],tO=1e4;async function nO({secret:e,signal:t}){let n=[],r=`https://api.amplemarket.com/sequences?page[size]=100`;for(let i=0;i<10&&r;i++){let i=await fetch(r,{headers:{Authorization:`Bearer ${e}`},signal:t});if(!i.ok){let e=await i.text();throw new K.HttpError({msg:e})}let a=await i.json();n.push(...a.sequences??[]);let o=a._links?.next?.href;r=o?new URL(o,`https://api.amplemarket.com`).toString():null}return n}const rO=r.object({pipe_id:r.literal(JD),connector:C(),run_if:x(),config:r.object({sequence_id:ku({sectionKey:`general`,required:!0,label:`Sequence`,groupPath:`config.general`,path:`config.sequence_id`,info:`The Amplemarket sequence to enroll the lead into (must be active or paused).`,enabledIf:v(`amplemarket`),optionsDef:{requires:{connection:`amplemarket`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return eO;if(!t)throw new K.MissingSecretError({providerName:`amplemarket`});let r=(await nO({secret:t,signal:AbortSignal.timeout(tO)})).filter(e=>$D.has(e.status)).map(e=>({label:e.name,value:e.id}));return e?r.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):r},widgets:{provider_logo:{provider:`amplemarket`}}}}),input_fields:F(r.object({[XD.name]:T({fieldName:XD.name}),[ZD.name]:T({fieldName:ZD.name})})),custom_variables:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.custom_variables`,label:`Custom variables`,info:"Amplemarket dynamic fields, sent as the lead's data. The Variable name must match what your sequence references (e.g. `{{ pain_point }}`) — case-sensitive, letters, digits, and underscores, no spaces. In the Value column, type `/` to insert a field or secret; leave a Value empty to skip that row. Amplemarket rejects the enrollment if the sequence references a dynamic field that is missing.",keyLabel:`Variable`,valueLabel:`Value`,keyPlaceholder:`pain_point`,valuePlaceholder:`{{ pain_point }}`,maxKeys:50}).default({}),output_fields:P(r.object({[QD.name]:D({fieldName:QD.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.custom_variables??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`custom_variables`,n]});if(t.includes(`{{`)){r("Variable name must be a literal (no `{{ }}` templating).");continue}if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)){r(`Invalid Amplemarket dynamic-field name "${t}" — use letters, digits, and underscores; no spaces.`);continue}t.length>255&&r(`Dynamic-field name "${t.slice(0,32)}…" exceeds 255 characters.`)}})}),iO=e=>gd(R(G(XD,e)),R(G(ZD,e))),aO=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},oO=class extends B{pipeId=JD;payload;payloadSchema=rO;billableOperations=YD;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`amplemarket`]}estimateBillableOperations(e){return H(e,`lead-enroll-amplemarket-v1-amplemarket`)}getCustomVariableValueTemplates(){return Object.values(this.payload.config.custom_variables??{})}getInputRequirement(){return z(iO(this.payload.config),...aO(this.getCustomVariableValueTemplates()))}getSecretRequirements(){return q(this.getCustomVariableValueTemplates())}getConstantRequirements(){return tp(this.getCustomVariableValueTemplates())}getRawOutputFields(){return{[QD.name]:this.catalogOutput(QD)}}getConnectionsRequirements(){return[{provider:`amplemarket`,rateLimitRatio:1,rateLimitOperation:`amplemarket_account_operation`,allowManagedConnection:!1}]}async getAgentContext({connectionSecrets:e,environment:t}){let n=this.payload.config.sequence_id,r=Array.isArray(n)?n[0]:n;if(!r)return null;if(t===`sandbox`)return{summary:`Sandbox: this sequence requires the dynamic fields first_name and pain_point — set each via config.custom_variables.`,data:{sequence_name:`Demo · Q3 Outbound`,sequence_status:`active`,required_dynamic_fields:[`first_name`,`pain_point`],missing_dynamic_fields:[]}};let i=e.amplemarket;if(!i)throw new K.MissingSecretError({providerName:`amplemarket`});let a=await nO({secret:i,signal:AbortSignal.timeout(tO)}),o=a.find(e=>e.id===r);if(!o)return{summary:`No Amplemarket sequence with id "${r}" was found on this connection (checked ${a.length}). Re-resolve config.sequence_id via autocomplete_field before running — don't guess the dynamic fields.`,data:{sequence_found:!1,required_dynamic_fields:[],missing_dynamic_fields:[]}};let s=o.dynamic_fields_used??[],c=new Set(Object.entries(this.payload.config.custom_variables??{}).filter(([e,t])=>e.trim()&&t?.trim()).map(([e])=>e.trim())),l=s.filter(e=>!c.has(e));return{summary:s.length===0?`Sequence "${o.name}" references no dynamic fields — no custom variables to set.`:`Sequence "${o.name}" requires these dynamic fields — set EVERY one via config.custom_variables (the value is a Liquid template over your sheet columns, e.g. {{ pain_point }}): ${s.join(`, `)}. Amplemarket rejects the enrollment if any of them is missing. The lead's email and LinkedIn URL travel via the input fields above, not here.`+(l.length>0?` Still unmapped: ${l.join(`, `)}.`:` All are mapped.`),data:{sequence_found:!0,sequence_name:o.name,sequence_status:o.status,required_dynamic_fields:s,missing_dynamic_fields:l}}}},sO=rO,cO={pipeId:JD,basePipe:U(JD),label:`Enroll Lead in Sequence`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Add a lead to an Amplemarket sequence, with custom dynamic fields.`,tags:[V.EMAIL],keywords:[`campaign`,`outreach`,`add`,`subscribe`,`outbound`,`email marketing`],docPath:W(JD),billableOperations:YD,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`amplemarket`],defaultInputRequirement:iO(null),managedProviders:[],deprecatedProviders:[],defaultPayload:{pipe_id:JD,connector:{strategy:`first`,connections:[]},run_if:null,config:{sequence_id:``,input_fields:{email:{alias:``},profile_url:{alias:``}},custom_variables:{},output_fields:{amplemarket_sequence_id:{alias:``,enabled:!0}}}}},lO=`lead:enroll:lemlist@1`,uO={"lead-enroll-lemlist-v1-lemlist":{allowManagedConnection:!1,provider:`lemlist`,credits:null,mode:null}},dO=_(`email`),fO=_(`name`),pO=_(`first_name`),mO=_(`last_name`),hO=_(`company_name`),gO=_(`job_title`),_O=_(`profile_url`),vO=_(`phone`),yO=_(`lemlist_lead_id`),bO=_(`lemlist_enrollment_result`),xO=new Set([`email`,`firstName`,`lastName`,`name`,`companyName`,`jobTitle`,`linkedinUrl`,`phone`,`companyDomain`,`icebreaker`,`picture`]),SO=[{label:`Demo · Q3 Outbound`,value:`cam_sandbox_1`},{label:`Demo · Founder Intros`,value:`cam_sandbox_2`}],CO={requires:{connection:`lemlist`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return SO;if(!t)throw new K.MissingSecretError({providerName:`lemlist`});let r=await fetch(`https://api.lemlist.com/api/campaigns?limit=100`,{headers:{Authorization:`Basic ${t}`}});if(!r.ok){let e=await r.text();throw new K.HttpError({msg:e})}let i=await r.json(),a=(Array.isArray(i)?i:i.campaigns??[]).map(e=>({label:e.name,value:e._id}));return e?a.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):a},widgets:{provider_logo:{provider:`lemlist`}}};function wO(e){let t=new Set,n=new Set;try{let r=$s(e);for(let[e,i]of Object.entries(r.inputs))(i.required?t:n).add(e)}catch{for(let n of e.matchAll(/\{\{\s*([A-Za-z_][A-Za-z0-9_]*)/g))t.add(n[1])}return{required:[...t],optional:[...n]}}const TO=r.object({pipe_id:r.literal(lO),connector:C(),run_if:x(),config:r.object({campaign_id:ku({sectionKey:`general`,required:!0,label:`Campaign`,groupPath:`config.general`,path:`config.campaign_id`,info:`The lemlist campaign to enroll the lead into.`,enabledIf:v(`lemlist`),optionsDef:CO}),input_fields:F(r.object({[dO.name]:T({fieldName:dO.name}),[fO.name]:T({fieldName:fO.name}),[pO.name]:T({fieldName:pO.name}),[mO.name]:T({fieldName:mO.name}),[hO.name]:T({fieldName:hO.name}),[gO.name]:T({fieldName:gO.name}),[_O.name]:T({fieldName:_O.name}),[vO.name]:T({fieldName:vO.name})})),custom_variables:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.custom_variables`,label:`Custom variables`,info:"lemlist custom variables, set on the lead after enrollment. The Variable name must match what your sequence references (e.g. `{{ painPoint }}`) — case-sensitive, no spaces. In the Value column, type `/` to insert a field or secret; leave a Value empty to skip that row. Standard fields (company, job title, LinkedIn, phone) are set via the fields above, not here.",keyLabel:`Variable`,valueLabel:`Value`,keyPlaceholder:`painPoint`,valuePlaceholder:`{{ pain_point }}`,maxKeys:50}),output_fields:P(r.object({[yO.name]:D({fieldName:yO.name}),[bO.name]:D({fieldName:bO.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.custom_variables??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`custom_variables`,n]});if(t.includes(`{{`)){r("Variable name must be a literal (no `{{ }}` templating).");continue}if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t)){r(`Invalid lemlist variable name "${t}" — use letters, digits, and underscores; no spaces.`);continue}xO.has(t)&&r(`"${t}" is a standard lemlist field — set it via the dedicated field above, not as a custom variable.`)}})}),EO=e=>z(R(G(dO,e)),gd(R(G(fO,e)),z(R(G(pO,e)),R(G(mO,e)))),_d(G(hO,e)),_d(G(gO,e)),_d(G(_O,e)),_d(G(vO,e))),DO=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},OO=class extends B{pipeId=lO;payload;payloadSchema=TO;billableOperations=uO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`lemlist`]}estimateBillableOperations(e){return H(e,`lead-enroll-lemlist-v1-lemlist`)}getCustomVariableValueTemplates(){return Object.values(this.payload.config.custom_variables??{})}getInputRequirement(){return z(EO(this.payload.config),...DO(this.getCustomVariableValueTemplates()))}getSecretRequirements(){return q(this.getCustomVariableValueTemplates())}getConstantRequirements(){return tp(this.getCustomVariableValueTemplates())}getRawOutputFields(){return{[yO.name]:this.catalogOutput(yO),[bO.name]:this.catalogOutput(bO)}}getConnectionsRequirements(){return[{provider:`lemlist`,rateLimitRatio:1,rateLimitOperation:`lemlist_create_lead`,allowManagedConnection:!1}]}async getAgentContext({connectionSecrets:e,environment:t}){let n=this.payload.config.campaign_id,r=Array.isArray(n)?n[0]:n;if(!r)return null;if(t===`sandbox`)return{summary:`Sandbox: this sequence references custom variables painPoint and eventLink — set each via config.custom_variables.`,data:{required_custom_variables:[`painPoint`,`eventLink`],used_standard_fields:[`firstName`]}};let i=e.lemlist;if(!i)throw new K.MissingSecretError({providerName:`lemlist`});let a=await fetch(`https://api.lemlist.com/api/campaigns/${encodeURIComponent(r)}/sequences`,{headers:{Authorization:`Basic ${i}`},signal:AbortSignal.timeout(1e4)});if(!a.ok){let e=await a.text();throw new K.HttpError({msg:e})}let o=await a.json(),s=new Set;for(let e of Object.values(o??{}))for(let t of e?.steps??[])for(let e of[t?.subject,t?.message]){if(!e)continue;let{required:t,optional:n}=wO(e);for(let e of[...t,...n])s.add(e)}let c=[...s].filter(e=>xO.has(e)),l=[...s].filter(e=>!xO.has(e));return{summary:l.length===0?`This sequence uses only standard lemlist fields — no custom variables to set.`:`This sequence requires these custom variables — set each via config.custom_variables (the value is a Liquid template over your sheet columns, e.g. {{ pain_point }}): ${l.join(`, `)}. Standard fields (email, firstName, …) are populated by the input fields above, not here.`,data:{required_custom_variables:l,used_standard_fields:c}}}},kO=TO,AO={pipeId:lO,basePipe:U(lO),label:`Enroll Lead in Campaign`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Add a lead to a lemlist campaign sequence, with custom variables.`,tags:[V.EMAIL],keywords:[`sequence`,`outreach`,`add`,`subscribe`,`outbound`,`email marketing`],docPath:W(lO),billableOperations:uO,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`lemlist`],defaultInputRequirement:EO(null),managedProviders:[],deprecatedProviders:[],defaultPayload:{pipe_id:lO,connector:{strategy:`first`,connections:[]},run_if:null,config:{campaign_id:``,input_fields:{email:{alias:``},name:{alias:``},first_name:{alias:``},last_name:{alias:``},company_name:{alias:``},job_title:{alias:``},profile_url:{alias:``},phone:{alias:``}},custom_variables:{},output_fields:{lemlist_lead_id:{alias:``,enabled:!0},lemlist_enrollment_result:{alias:``,enabled:!1}}}}},jO=`message:send-direct:slack@1`,MO=_(`slack_direct_message_success`),NO=r.object({pipe_id:r.literal(jO),connector:C(),run_if:x(),config:r.object({slack_user_id:S({sectionKey:`general`,groupPath:`config.general`,path:`config.slack_user_id`,label:`Slack user ID`,info:"The member to DM (e.g. U024BE7LH) — chains from the Slack channel members search. Type `@` to insert a field reference.",placeholder:`{{ slack_user_id }}`,inputType:`text`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`}),message:S({sectionKey:`general`,groupPath:`config.general`,path:`config.message`,label:`Message`,info:"The message body. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`Hi {{ name }}, …`,inputType:`text`,minLength:1,maxLength:4e4,expectedTagType:`string`,expectedTagFormat:`markdown`,multiline:!0}),output_fields:P(r.object({[MO.name]:D({fieldName:MO.name})}))})}),PO={"message-send-direct-slack-v1-slack":{allowManagedConnection:!1,provider:`slack`,credits:null,mode:null}},FO=class extends B{pipeId=jO;payload;payloadSchema=NO;billableOperations=PO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`slack`]}estimateBillableOperations(e){return H(e,`message-send-direct-slack-v1-slack`)}getTemplatedFields(){return[this.payload.config.slack_user_id,this.payload.config.message]}getInputRequirement(){return ep(this.getTemplatedFields())}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[MO.name]:this.catalogOutput(MO)}}getConnectionsRequirements(){return[{provider:`slack`,rateLimitRatio:1,rateLimitOperation:`slack_post_message`,allowManagedConnection:!1}]}},IO=NO,LO={pipeId:jO,basePipe:U(jO),label:`Send direct message`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Send a Slack direct message to a workspace member.`,guide:"Send a Slack DM to one member per row. `slack_user_id` is the member's workspace ID — the people:channelmembers:slack@1 search outputs it, which makes 'list channel members → DM each' a two-step chain. The message body is templated: reference upstream fields with `{{ field_name }}` and stored secrets with `{{ SECRETS.KEY }}`. The DM comes from the pipe0 app (bots cannot impersonate people). Requires a Slack vault connection (call list_connections to find one).",tags:[V.CHAT],keywords:[`dm`,`direct message`,`private message`,`notify`,`outreach`,`chat`],docPath:W(jO),billableOperations:PO,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[`slack`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:null,defaultPayload:{pipe_id:jO,connector:{strategy:`first`,connections:[]},run_if:null,config:{slack_user_id:`{{ slack_user_id }}`,message:``,output_fields:{slack_direct_message_success:{alias:``,enabled:!0}}}}},RO=[{label:`#demo-general`,value:`C0SANDBOX001`},{label:`#demo-alerts`,value:`C0SANDBOX002`}],zO=`https://slack.com/api/conversations.list?limit=200&exclude_archived=true&types=public_channel,private_channel`,BO={requires:{connection:`slack`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return RO;if(!t)throw new K.MissingSecretError({providerName:`slack`});let r=[],i=null;for(let e=0;e<5;e++){let e=await fetch(i?`${zO}&cursor=${encodeURIComponent(i)}`:zO,{headers:{Authorization:`Bearer ${t}`}});if(!e.ok){let t=await e.text();throw new K.HttpError({msg:t})}let n=await e.json();if(!n.ok)throw new K.HttpError({msg:n.error??`slack_error`});for(let e of n.channels??[])r.push({label:`#${e.name}${e.is_ext_shared?` (Slack Connect)`:``}`,value:e.id});if(i=n.response_metadata?.next_cursor||null,!i)break}return e?r.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):r},widgets:{provider_logo:{provider:`slack`}}},VO=`message:send:slack@1`,HO=_(`slack_message_success`),UO=r.object({pipe_id:r.literal(VO),connector:C(),run_if:x(),config:r.object({channel_id:S({sectionKey:`general`,groupPath:`config.general`,path:`config.channel_id`,label:`Channel ID`,info:"Your connection must be authorized to post to this channel. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`C0123456789`,inputType:`text`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:BO}),message:S({sectionKey:`general`,groupPath:`config.general`,path:`config.message`,label:`Message`,info:"The message body. Type `@` to insert a field reference or `$` to insert a secret reference.",placeholder:`Hi {{ name }}, …`,inputType:`text`,minLength:1,maxLength:4e4,expectedTagType:`string`,expectedTagFormat:`markdown`,multiline:!0}),output_fields:P(r.object({[HO.name]:D({fieldName:HO.name})}))})}),WO={"message-send-slack-v1-slack":{allowManagedConnection:!1,provider:`slack`,credits:null,mode:null}},GO=class extends B{pipeId=VO;payload;payloadSchema=UO;billableOperations=WO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`slack`]}estimateBillableOperations(e){return H(e,`message-send-slack-v1-slack`)}getTemplatedFields(){return[this.payload.config.channel_id,this.payload.config.message]}getInputRequirement(){return ep(this.getTemplatedFields())}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[HO.name]:this.catalogOutput(HO)}}getConnectionsRequirements(){return[{provider:`slack`,rateLimitRatio:1,rateLimitOperation:`slack_post_message`,allowManagedConnection:!1}]}},KO=UO,qO={pipeId:VO,basePipe:U(VO),label:`Send message into channel`,executionMode:`single`,categories:[`actions`],lifecycle:null,description:`Send a Slack message to a channel.`,guide:"Send a Slack message. The channel ID and message body are templated config fields — reference upstream fields with `{{ field_name }}` and stored secrets with `{{ SECRETS.KEY }}`. Requires a Slack vault connection (call list_connections to find one).",tags:[V.CHAT],keywords:[`notify`,`notification`,`alert`,`post`,`chat`],docPath:W(VO),billableOperations:WO,inputFieldMode:`config`,outputFieldMode:`static`,allowedUserConnectionProviders:[`slack`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:null,defaultPayload:{pipe_id:VO,connector:{strategy:`first`,connections:[]},run_if:null,config:{channel_id:``,message:``,output_fields:{slack_message_success:{alias:``,enabled:!0}}}}},JO=`message:write@1`,YO=_(`message`),XO=`message-write-v1`,ZO=Yc(XO),QO=r.object({pipe_id:r.literal(JO),connector:w(),run_if:x(),config:r.object({template:Wl({sectionKey:`general`,label:`Template`,path:`config.template`,placeholder:J(`prompt`),groupPath:`config.prompt`,required:!0}),model:wu({sectionKey:`general`,label:`Model`,path:`config.model`,groupPath:`config.prompt`,billableOperations:ZO,defaultValue:Bc}),output_fields:P(r.object({[YO.name]:D({fieldName:YO.name})}))})}),$O=class extends B{pipeId=JO;payload;payloadSchema=QO;billableOperations=ZO;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return Hc(this.payload.config.model)}estimateBillableOperations(e){return Zc(e,{model:this.payload.config.model,prefix:XO,inputTokens:600,outputTokens:800})}getInputRequirement(){return ep([this.payload.config.template])}getSecretRequirements(){return q([this.payload.config.template])}getConstantRequirements(){return tp([this.payload.config.template])}getRawOutputFields(){return{[YO.name]:this.catalogOutput(YO)}}getConnectionsRequirements(){return Uc(this.payload.config.model)}},ek=QO,tk={pipeId:JO,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(JO),label:`Message writer`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`An AI agent specialized in composing messages for modern workplace communication platforms (Slack, Teams, Discord, etc.)`,guide:`AI message composer for Slack/Teams/Discord. Outputs: message. Pair with message:send:slack@1 to send.`,tags:[V.AI],keywords:[`ai`,`compose`,`draft`,`copywriting`,`outreach`,`slack`,`teams`],docPath:W(JO),defaultInputRequirement:null,billableOperations:ZO,allowedUserConnectionProviders:Wc(),managedProviders:Wc(),deprecatedProviders:[],defaultPayload:{pipe_id:JO,connector:null,run_if:null,config:{model:Bc,template:``,output_fields:{message:{alias:``,enabled:!0}}}}},nk=_(`hubspot_object_id`),rk=_(`hubspot_associated_count`),ik=_(`hubspot_associated_objects`),ak=`object:associations:hubspot@1`,ok=r.object({pipe_id:r.literal(ak),run_if:x(),connector:C(),config:r.object({from_object_type:ku({sectionKey:`general`,required:!0,label:`From object type`,groupPath:`config.general`,path:`config.from_object_type`,info:`The type of the source record (standard or custom object).`,enabledIf:v(`hubspot`),optionsDef:cp}),to_object_type:ku({sectionKey:`general`,required:!0,label:`To object type`,groupPath:`config.general`,path:`config.to_object_type`,info:`The type of the associated records to retrieve (standard or custom object).`,enabledIf:v(`hubspot`),optionsDef:cp}),association_label:ku({sectionKey:`general`,required:!1,label:`Association label`,groupPath:`config.general`,path:`config.association_label`,info:`Only follow associations with this label (labels are portal-specific, e.g. "Decision maker"). Empty = all associations.`,enabledIf:v(`hubspot`),optionsDef:lp}),properties:du({sectionKey:`general`,label:`Properties`,groupPath:`config.general`,path:`config.properties`,placeholder:`name`,info:`HubSpot internal property names of the TARGET object to include per associated record. Empty = HubSpot's default properties.`}),limit:Eu({sectionKey:`general`,label:`Limit`,groupPath:`config.general`,path:`config.limit`,info:``,min:1,max:100}).default(20),input_fields:F(r.object({[nk.name]:T({fieldName:nk.name})})),output_fields:P(r.object({[rk.name]:D({fieldName:rk.name}),[ik.name]:D({fieldName:ik.name})}))})}),sk=e=>R(G(nk,e)),ck={"object-associations-hubspot-v1-hubspot":{allowManagedConnection:!1,credits:null,mode:null,provider:`hubspot`}},lk=class extends B{pipeId=ak;payload;payloadSchema=ok;billableOperations=ck;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`hubspot`]}estimateBillableOperations(e){return H(e,`object-associations-hubspot-v1-hubspot`)}getInputRequirement(){return sk(this.payload.config)}getRawOutputFields(){return{[rk.name]:this.catalogOutput(rk),[ik.name]:this.catalogOutput(ik)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitRatio:1,rateLimitOperation:`hubspot_generic`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.to_object_type,n=Array.isArray(t)?t[0]??``:t;return pp(e,{objectTypes:[[n||`target object`,n||`0-1`]]})}},uk=ok,dk={pipeId:ak,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(ak),label:`HubSpot associated objects`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Retrieve the HubSpot records associated with a source record — one level of joins across standard and custom objects (e.g. a company's deals, or a custom object linked to a company).`,tags:[V.FIELDS],keywords:[`crm`,`join`,`related`,`association`,`custom object`,`linked`],docPath:W(ak),guide:"Associations are HubSpot's joins — the Search API never returns them, so this pipe is the way to fetch related records. The source-record input consumes `hubspot_object_id`, which every HubSpot surface emits (alias it to point at a differently named column); the from-object type must match the record the ID belongs to. Activities (notes, tasks, calls, meetings, emails) are associated objects too — pick them as the to-object to read a record's timeline; when you leave properties empty for an engagement the pipe fills a sensible default set (timestamp + body/subject). Association labels are portal-specific; leave the label empty to follow all associations. Zero associations is a successful result (count = 0). Target-object properties use internal names — call get_provider_context for the portal's catalog.",billableOperations:ck,allowedUserConnectionProviders:[`hubspot`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:sk(null),defaultPayload:{pipe_id:ak,connector:{strategy:`first`,connections:[]},run_if:null,config:{from_object_type:`0-2`,to_object_type:`0-3`,association_label:``,properties:[],limit:20,input_fields:{hubspot_object_id:{alias:``}},output_fields:{hubspot_associated_count:{alias:``,enabled:!0},hubspot_associated_objects:{alias:``,enabled:!0}}}}},fk=_(`hubspot_object_id`),pk=_(`hubspot_update_result`),mk=`object:update:hubspot@1`,hk=r.object({pipe_id:r.literal(mk),run_if:x(),connector:C(),config:r.object({object_type:ku({sectionKey:`general`,required:!0,label:`Object type`,groupPath:`config.general`,path:`config.object_type`,info:`Standard objects plus this portal's custom objects (custom objects need HubSpot Enterprise).`,enabledIf:v(`hubspot`),optionsDef:cp}),properties:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.properties`,label:`Property values`,info:"Property = the HubSpot internal name (e.g. `jobtitle`, custom properties too). In the Value column, type `/` to insert a field reference. Enumeration values must be existing internal option values (case-sensitive).",keyLabel:`Property`,valueLabel:`Value`,keyPlaceholder:`jobtitle`,valuePlaceholder:`{{ job_title }}`,maxKeys:50}),ignore_blank_values:yu({sectionKey:`general`,defaultValue:!0,label:`Ignore blank values`,groupPath:`config.general`,path:`config.ignore_blank_values`,info:`ON: rows whose value renders empty are skipped, preserving CRM data. OFF: empty values CLEAR the property in HubSpot.`}),input_fields:F(r.object({[fk.name]:T({fieldName:fk.name})})),output_fields:P(r.object({[pk.name]:D({fieldName:pk.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.properties??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`properties`,n]});if(t.includes(`{{`)){r("Property name must be a literal internal name (no `{{ }}` templating).");continue}/^[a-z][a-z0-9_]*$/.test(t)||r(`Invalid HubSpot property name "${t}" — internal names are lowercase letters, digits, and underscores.`)}})}),gk=e=>R(G(fk,e)),_k={"object-update-hubspot-v1-hubspot":{allowManagedConnection:!1,credits:null,mode:null,provider:`hubspot`}},vk=class extends B{pipeId=mk;payload;payloadSchema=hk;billableOperations=_k;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`hubspot`]}estimateBillableOperations(e){return H(e,`object-update-hubspot-v1-hubspot`)}getTemplates(){return Object.values(this.payload.config.properties??{}).filter(e=>!!e)}getInputRequirement(){return z(gk(this.payload.config),...ip(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[pk.name]:this.catalogOutput(pk)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitRatio:1,rateLimitOperation:`hubspot_generic`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object_type,n=Array.isArray(t)?t[0]??``:t;return pp(e,{objectTypes:[[n||`contacts`,n||`0-1`]],writableOnly:!0})}},yk=hk,bk={pipeId:mk,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(mk),label:`HubSpot update object`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:`Update a HubSpot record (standard or custom object) by its record ID, mapping columns to properties. Blank values are skipped by default so un-enriched cells never erase CRM data.`,tags:[V.FIELDS],keywords:[`crm`,`write`,`sync`,`record`,`property`,`custom object`],docPath:W(mk),guide:"The object-ID input consumes `hubspot_object_id`, which every HubSpot surface emits — chain from a match pipe (Lookup → Update by ID is the canonical HubSpot recipe; there is no reliable upsert for companies). Call get_provider_context for the selected object type to see WRITABLE properties and enumeration option values — HubSpot rejects read-only properties and unknown enum values (case-sensitive, never auto-created). Property writes fire the portal's workflows; rows where every value renders blank skip the API call entirely. With 'Ignore blank values' OFF, an empty value CLEARS the property in HubSpot.",billableOperations:_k,allowedUserConnectionProviders:[`hubspot`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:gk(null),defaultPayload:{pipe_id:mk,connector:{strategy:`first`,connections:[]},run_if:null,config:{object_type:`0-1`,properties:{},ignore_blank_values:!0,input_fields:{hubspot_object_id:{alias:``}},output_fields:{hubspot_update_result:{alias:``,enabled:!0}}}}},xk=_(`company_domain`),Sk=_(`email`),Ck=_(`salesforce_opportunities_found_count`),wk=_(`salesforce_record_id`),Tk=_(`salesforce_opportunity_matches`),Ek=`opportunity:match:salesforce@1`,Dk=r.object({pipe_id:r.literal(Ek),run_if:x(),connector:C(),config:r.object({status:Cu({sectionKey:`general`,required:!1,label:`Opportunity status`,groupPath:`config.general`,path:`config.status`,description:`Filters on Salesforce's computed IsClosed / IsWon — org-invariant, unlike stage names.`,options:[{label:`Any`,value:`any`},{label:`Open`,value:`open`},{label:`Won`,value:`won`},{label:`Lost`,value:`lost`}]}).default(`any`),stage:ku({sectionKey:`general`,required:!1,label:`Stage`,groupPath:`config.general`,path:`config.stage`,info:`Only match opportunities in this stage (the org's own OpportunityStage list). Empty = all stages.`,enabledIf:v(`salesforce`),optionsDef:Gd}),custom_properties:du({sectionKey:`general`,label:`Custom fields`,groupPath:`config.general`,path:`config.custom_properties`,placeholder:`NextStep`,info:"Field API names added to each match JSON under `custom_properties` (standard-set names are already top-level)."}),input_fields:F(r.object({[xk.name]:T({fieldName:xk.name}),[Sk.name]:T({fieldName:Sk.name})})),output_fields:P(r.object({[Ck.name]:D({fieldName:Ck.name}),[wk.name]:D({fieldName:wk.name}),[Tk.name]:D({fieldName:Tk.name})}))}).optional()}),Ok=e=>gd(R(G(xk,e)),R(G(Sk,e))),kk={"opportunity-match-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},Ak=class extends B{pipeId=Ek;payload;payloadSchema=Dk;billableOperations=kk;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`opportunity-match-salesforce-v1-salesforce`)}getInputRequirement(){return Ok(this.payload.config)}getRawOutputFields(){return{[Ck.name]:this.catalogOutput(Ck),[wk.name]:this.catalogOutput(wk),[Tk.name]:this.catalogOutput(Tk)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[`Opportunity`],includeStages:!0})}},jk=Dk,Mk={pipeId:Ek,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(Ek),label:`Salesforce opportunity match`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Find opportunities in your Salesforce org for a company (by domain, via the matched account) or person (by email, via contact roles) — opportunities have no natural key of their own. A clean miss completes with count = 0.`,tags:[V.WEBSITE,V.EMAIL],keywords:[`crm`,`sfdc`,`deal`,`pipeline`,`lookup`,`exists`,`revenue`],docPath:W(Ek),guide:"Domain input resolves via account match → Opportunity.AccountId (preferred when both inputs are present); email resolves via the contact's OpportunityContactRole (note: OCRs the connected user cannot see are silently missed under private sharing). Filter open/won via `status` (computed IsClosed/IsWon — never assume a stage named 'Closed Won' exists); `stage` values are OpportunityStage ApiNames from get_provider_context. Contact roles ride each match as `contact_roles` edge metadata. found_count = 0 is a successful result.",billableOperations:kk,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:Ok(null),defaultPayload:{pipe_id:Ek,connector:{strategy:`first`,connections:[]},run_if:null,config:{status:`any`,stage:``,custom_properties:[],input_fields:{company_domain:{alias:``},email:{alias:``}},output_fields:{salesforce_opportunities_found_count:{alias:``,enabled:!0},salesforce_record_id:{alias:``,enabled:!0},salesforce_opportunity_matches:{alias:``,enabled:!0}}}}},Nk=`person:devprofileurl:profileurl:waterfall@1`,Pk=_(`profile_url`),Fk=_(`developer_profile_url`),Ik=_(`alternative_developer_profile_urls`),Lk=[`crustdata`],Rk=[{provider:`crustdata`}],zk=r.object({pipe_id:r.literal(Nk),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:Rk,availableProviders:Lk}),input_fields:F(r.object({[Pk.name]:T({fieldName:Pk.name})})),output_fields:P(r.object({[Fk.name]:D({fieldName:Fk.name}),[Ik.name]:D({fieldName:Ik.name})}))}).optional()}),Bk=e=>R(G(Pk,e)),Vk={"person-devprofileurl-profileurl-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:2,level1:{credits:1.3,weight:1}},mode:`onSuccess`}},Hk=class extends B{pipeId=Nk;payload;payloadSchema=zk;billableOperations=Vk;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return Bk(this.payload.config)}getRawOutputFields(){return{[Fk.name]:this.catalogOutput(Fk,{isPrimaryOutput:!0}),[Ik.name]:this.catalogOutput(Ik,{isPrimaryOutput:!1})}}getConnectionsRequirements(){let e={crustdata:`crustdata_realtime_person_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},Uk=zk,Wk={pipeId:Nk,basePipe:U(Nk),label:`GitHub profile from LinkedIn URL`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a developer profile URL (e.g. GitHub) for any prospect using multiple data providers in a waterfall motion.`,docPath:W(Nk),tags:[V.LINKEDIN,V.WATERFALL,V.NEW],keywords:[`developer`,`dev`,`engineer`,`coder`,`git`],billableOperations:Vk,defaultInputRequirement:Bk(null),inputFieldMode:`static`,outputFieldMode:`static`,managedProviders:Lk,allowedUserConnectionProviders:Lk,deprecatedProviders:[],defaultPayload:{pipe_id:Nk,connector:null,run_if:null,config:{providers:Rk,input_fields:{profile_url:{alias:``}},output_fields:{developer_profile_url:{alias:``,enabled:!0},alternative_developer_profile_urls:{alias:``,enabled:!1}}}}},Gk=`person:email:validate:millionverifier@1`,Kk=_(`email`),qk=_(`email_validation_status`),Jk=_(`million_validation_match`),Yk=r.object({pipe_id:r.literal(Gk),connector:w(),run_if:x(),config:r.object({input_fields:F(r.object({[Kk.name]:T({fieldName:Kk.name})})),output_fields:P(r.object({[qk.name]:D({fieldName:qk.name}),[Jk.name]:D({fieldName:Jk.name})}))}).optional()}),Xk=e=>R(G(Kk,e)),Zk={"person-email-validate-millionverifier-v1-millionverifier":{provider:`millionverifier`,allowManagedConnection:!0,credits:{default:.1,level1:{credits:.05,weight:1}},mode:`always`}},Qk=class extends B{pipeId=Gk;payload;payloadSchema=Yk;billableOperations=Zk;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`millionverifier`]}estimateBillableOperations(e){return H(e,`person-email-validate-millionverifier-v1-millionverifier`)}getInputRequirement(){return Xk(this.payload.config)}getRawOutputFields(){return{[qk.name]:this.catalogOutput(qk),[Jk.name]:this.catalogOutput(Jk)}}getConnectionsRequirements(){return[{provider:`millionverifier`,rateLimitRatio:1,rateLimitOperation:`millionverifier_generic`,allowManagedConnection:!0}]}},$k=Yk,eA={pipeId:Gk,basePipe:U(Gk),label:`Validate email`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Verify email addresses to ensure is deliverability.`,tags:[V.EMAIL],keywords:[`verify`,`verification`,`deliverability`,`bounce`,`check`,`clean`],docPath:W(Gk),billableOperations:Zk,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`millionverifier`],managedProviders:[`millionverifier`],deprecatedProviders:[],defaultInputRequirement:Xk(null),defaultPayload:{pipe_id:Gk,connector:null,run_if:null,config:{input_fields:{email:{alias:``}},output_fields:{email_validation_status:{alias:``,enabled:!0},million_validation_match:{alias:``,enabled:!0}}}}},tA=`person:identity:email:waterfall@2`,nA=_(`email`),rA=_(`profile_url`),iA=_(`person_profile_match`),aA=[`hunter`,`crustdata`,`mixrank`],oA=[{provider:`hunter`},{provider:`crustdata`},{provider:`mixrank`}],sA=r.object({pipe_id:r.literal(tA),connector:w(),run_if:x(),config:r.object({providers:E({availableProviders:aA,defaultProviders:oA,sectionKey:`general`}),input_fields:F(r.object({[nA.name]:T({fieldName:nA.name})})),output_fields:P(r.object({[rA.name]:D({fieldName:rA.name}),[iA.name]:D({fieldName:iA.name})}))}).optional()}),cA=e=>R(G(nA,e)),lA={"person-identity-email-waterfall-v2-hunter":{provider:`hunter`,allowManagedConnection:!0,credits:{default:2.5,level1:{credits:1.25,weight:1}},mode:`onSuccess`},"person-identity-email-waterfall-v2-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:5,level1:{credits:2.5,weight:1}},mode:`onSuccess`},"person-identity-email-waterfall-v2-mixrank":{provider:`mixrank`,allowManagedConnection:!0,credits:{default:1.5,level1:{credits:.75,weight:1}},mode:`onSuccess`}},uA=class extends B{pipeId=tA;payload;payloadSchema=sA;billableOperations=lA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return cA(this.payload.config)}getRawOutputFields(){return{[rA.name]:this.catalogOutput(rA),[iA.name]:this.catalogOutput(iA,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={hunter:`hunter_email_enrichment`,crustdata:`crustdata_realtime_person_enrich`,mixrank:`mixrank-person-match`},t=this.payload.config?.providers||[],n=t.map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0})),r=t.findIndex(e=>e.provider===`hunter`);return r!==-1&&n.push({provider:`amplemarket`,rateLimitRatio:Y(r),rateLimitOperation:`amplemarket-person-reveal`,allowManagedConnection:!0}),n}},dA=sA,fA={pipeId:tA,basePipe:U(tA),label:`Full LinkedIn profile from email`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a person's LinkedIn profile URL and a standardized JSON profile from their email address.`,tags:[V.EMAIL,V.PEOPLE_PROFILES,V.LINKEDIN,V.WATERFALL],keywords:[`enrich`,`enrichment`,`reverse lookup`,`contact`,`identity`,`person`],docPath:W(tA),managedProviders:aA,deprecatedProviders:[],allowedUserConnectionProviders:aA,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:lA,defaultInputRequirement:cA(null),defaultPayload:{pipe_id:tA,connector:null,run_if:null,config:{providers:oA,input_fields:{email:{alias:``}},output_fields:{profile_url:{alias:``,enabled:!0},person_profile_match:{alias:``,enabled:!0}}}}},pA=_(`email`),mA=_(`attio_person_found`),hA=_(`attio_record_id`),gA=_(`attio_person_match`),_A=`person:match:attio@1`,vA=r.object({pipe_id:r.literal(_A),run_if:x(),connector:C(),config:r.object({custom_properties:du({sectionKey:`general`,label:`Custom attributes`,groupPath:`config.general`,path:`config.custom_properties`,placeholder:`job_title`,optionsDef:kf({target:`objects`,identifier:`people`}),info:'Attio attribute api_slugs to include in the match output (e.g. `job_title`, not "Job title"). Custom attributes work too and nest under `custom_properties`. Empty = a standard identity set.'}),input_fields:F(r.object({[pA.name]:T({fieldName:pA.name})})),output_fields:P(r.object({[mA.name]:D({fieldName:mA.name}),[hA.name]:D({fieldName:hA.name}),[gA.name]:D({fieldName:gA.name})}))}).optional()}),yA=e=>R(G(pA,e)),bA={"person-match-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},xA=class extends B{pipeId=_A;payload;payloadSchema=vA;billableOperations=bA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`person-match-attio-v1-attio`)}getInputRequirement(){return yA(this.payload.config)}getRawOutputFields(){return{[mA.name]:this.catalogOutput(mA),[hA.name]:this.catalogOutput(hA),[gA.name]:this.catalogOutput(gA)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_query`,allowManagedConnection:!1}]}async getAgentContext(e){return jf(e,{objects:[`people`]})}},SA=vA,CA={pipeId:_A,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(_A),label:`Attio person match`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Check whether a person exists in your Attio workspace by email. email_addresses is Attio's unique identity attribute, so any address on a record matches exactly; a clean miss completes with found = false.`,tags:[V.EMAIL],keywords:[`crm`,`lookup`,`exists`,`dedupe`,`record`,`contact`],docPath:W(_A),guide:"Call get_provider_context first to discover this workspace's attributes; use attribute api_slugs verbatim (e.g. `job_title`). email_addresses is unique + multiselect — one exact match covers every address on the record, so there is no secondary-email option. found = false is a successful result — gate follow-up pipes with run_if on it. Chain the attio_record_id output into record:update:attio@1 or record:lookup:attio@1. No email column yet? Chain a work-email pipe (e.g. people:workemail:waterfall@1) ahead of this one and match on its output.",billableOperations:bA,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:yA(null),defaultPayload:{pipe_id:_A,connector:{strategy:`first`,connections:[]},run_if:null,config:{custom_properties:[],input_fields:{email:{alias:``}},output_fields:{attio_person_found:{alias:``,enabled:!0},attio_record_id:{alias:``,enabled:!0},attio_person_match:{alias:``,enabled:!0}}}}},wA=`person:match:role:waterfall@1`,TA=_(`company_domain`),EA=_(`role_finder_match`),DA=[`amplemarket`,`leadmagic`,`crustdata`],OA=[{provider:`amplemarket`},{provider:`leadmagic`},{provider:`crustdata`}],kA=r.object({pipe_id:r.literal(wA),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:OA,availableProviders:DA}),roles:pu({sectionKey:`general`,groupPath:`config.general`,label:`Roles`,path:`config.roles`,info:`Company roles to include`,maxItems:3,minItems:1,suggestionsDef:g(`titles`),expectedTagType:`string`}),input_fields:F(r.object({[TA.name]:T({fieldName:TA.name})})),output_fields:P(r.object({[EA.name]:D({fieldName:EA.name})}))})}),AA=e=>gd(G(TA,e)),jA={"person-match-role-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-match-role-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-match-role-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`}},MA=class extends B{pipeId=wA;payload;payloadSchema=kA;billableOperations=jA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return AA(this.payload.config)}getSecretRequirements(){return q(this.payload.config?.roles??[])}getConstantRequirements(){return tp(this.payload.config?.roles??[])}getRawOutputFields(){return{[EA.name]:this.catalogOutput(EA,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_role_finder`,amplemarket:`amplemarket_people_search`,crustdata:`crustdata_people_db_search`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},NA=kA,PA={pipeId:wA,basePipe:U(wA),managedProviders:DA,deprecatedProviders:[],allowedUserConnectionProviders:DA,label:`Role finder`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find role matches for a given companies like "CEO" or "CFO".`,tags:[V.PEOPLE_PROFILES],keywords:[`job title`,`title`,`ceo`,`executive`,`decision maker`,`employee`],docPath:W(wA),billableOperations:jA,inputFieldMode:`static`,outputFieldMode:`static`,defaultInputRequirement:AA(null),defaultPayload:{pipe_id:wA,run_if:null,connector:null,config:{roles:[],providers:OA,input_fields:{company_domain:{alias:``}},output_fields:{role_finder_match:{alias:``,enabled:!0}}}}},FA=_(`email`),IA=_(`salesforce_person_found`),LA=_(`salesforce_record_id`),RA=_(`salesforce_person_match`),zA=`person:match:salesforce@1`,BA=r.object({pipe_id:r.literal(zA),run_if:x(),connector:C(),config:r.object({match_scope:Cu({sectionKey:`general`,required:!1,label:`Match scope`,groupPath:`config.general`,path:`config.match_scope`,description:`Which Salesforce person shapes to probe. Person Accounts are included automatically when the org has them.`,options:[{label:`Contacts and leads`,value:`contacts_and_leads`},{label:`Contacts only`,value:`contacts_only`},{label:`Leads only`,value:`leads_only`}]}).default(`contacts_and_leads`),custom_properties:du({sectionKey:`general`,label:`Custom fields`,groupPath:`config.general`,path:`config.custom_properties`,placeholder:`Lead_Score__c`,info:"Field API names added to the match JSON under `custom_properties` (standard-set names are already top-level). Dotted parent paths like `Account.Industry` work."}),input_fields:F(r.object({[FA.name]:T({fieldName:FA.name})})),output_fields:P(r.object({[IA.name]:D({fieldName:IA.name}),[LA.name]:D({fieldName:LA.name}),[RA.name]:D({fieldName:RA.name})}))}).optional()}),VA=e=>R(G(FA,e)),HA={"person-match-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},UA=class extends B{pipeId=zA;payload;payloadSchema=BA;billableOperations=HA;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`person-match-salesforce-v1-salesforce`)}getInputRequirement(){return VA(this.payload.config)}getRawOutputFields(){return{[IA.name]:this.catalogOutput(IA),[LA.name]:this.catalogOutput(LA),[RA.name]:this.catalogOutput(RA)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[`Contact`,`Lead`]})}},WA=BA,GA={pipeId:zA,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(zA),label:`Salesforce person match`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Check whether a person exists in your Salesforce org by email — across Contacts, Leads, and Person Accounts in one call, with deterministic precedence and converted-lead redirect. A clean miss completes with found = false.`,tags:[V.EMAIL],keywords:[`crm`,`sfdc`,`contact`,`lead`,`lookup`,`exists`,`dedupe`],docPath:W(zA),guide:"Matches by exact email in ONE API call across up to three shapes, with precedence: live Contact → converted Lead's contact (is_converted_redirect = true) → live Lead → Person Account. found = false is a successful result — gate follow-ups with run_if on it. `object_type` in the match JSON says which shape matched; chain `salesforce_record_id` into record:update:salesforce@1 or record:lookup:salesforce@1. Note: 'no match' can also mean the connected user lacks record access (private sharing).",billableOperations:HA,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:VA(null),defaultPayload:{pipe_id:zA,connector:{strategy:`first`,connections:[]},run_if:null,config:{match_scope:`contacts_and_leads`,custom_properties:[],input_fields:{email:{alias:``}},output_fields:{salesforce_person_found:{alias:``,enabled:!0},salesforce_record_id:{alias:``,enabled:!0},salesforce_person_match:{alias:``,enabled:!0}}}}},KA=`person:mobile:profileurl:waterfall@1`,qA=_(`profile_url`),JA=_(`mobile`),YA=[`leadmagic`,`prospeo`,`amplemarket`,`crustdata`,`findymail`],XA=[`findymail`],ZA=[{provider:`leadmagic`},{provider:`prospeo`},{provider:`amplemarket`},{provider:`crustdata`}],QA=r.object({pipe_id:r.literal(KA),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:ZA,availableProviders:YA,deprecatedProviders:XA}),input_fields:F(r.object({[qA.name]:T({fieldName:qA.name})})),output_fields:P(r.object({[JA.name]:D({fieldName:JA.name})}))}).optional()}),$A=e=>R(G(qA,e)),ej={"person-mobile-profileurl-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-prospeo":{provider:`prospeo`,allowManagedConnection:!0,credits:{default:7,level1:{credits:5.5,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-findymail":{provider:`findymail`,allowManagedConnection:!0,credits:{default:6,level1:{credits:4,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:7,level1:{credits:6,weight:1}},mode:`onSuccess`},"person-mobile-profileurl-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:5},mode:`onSuccess`}},tj=class extends B{pipeId=KA;payload;payloadSchema=QA;billableOperations=ej;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return $A(this.payload.config)}getRawOutputFields(){return{[JA.name]:this.catalogOutput(JA,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_lookup`,prospeo:`prospeo_phone_number_lookup`,findymail:`findymail_phone_lookup`,amplemarket:`amplemarket-person-reveal`,crustdata:`crustdata_contact_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},nj=QA,rj={pipeId:KA,basePipe:U(KA),label:`Mobile number from LinkedIn profile`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a mobile phone number for any prospect using multiple data providers in a waterfall motion.`,docPath:W(KA),tags:[V.PHONE,V.WATERFALL],keywords:[`phone`,`phone number`,`cell`,`direct dial`],billableOperations:ej,defaultInputRequirement:$A(null),inputFieldMode:`static`,outputFieldMode:`static`,managedProviders:YA,allowedUserConnectionProviders:YA,deprecatedProviders:XA,defaultPayload:{pipe_id:KA,connector:null,run_if:null,config:{providers:ZA,input_fields:{profile_url:{alias:``}},output_fields:{mobile:{alias:``,enabled:!0}}}}},ij=`person:mobile:workemail:waterfall@1`,aj=_(`work_email`),oj=_(`mobile`),sj=[`leadmagic`,`amplemarket`,`crustdata`],cj=[{provider:`leadmagic`},{provider:`amplemarket`},{provider:`crustdata`}],lj=r.object({pipe_id:r.literal(ij),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,availableProviders:sj,defaultProviders:cj}),input_fields:F(r.object({[aj.name]:T({fieldName:aj.name})})),output_fields:P(r.object({[oj.name]:D({fieldName:oj.name})}))}).optional()}),uj=e=>R(G(aj,e)),dj={"person-mobile-workemail-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`},"person-mobile-workemail-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:7,level1:{credits:6,weight:1}},mode:`onSuccess`},"person-mobile-workemail-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:5},mode:`onSuccess`}},fj=class extends B{pipeId=ij;payload;payloadSchema=lj;billableOperations=dj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return uj(this.payload.config)}getRawOutputFields(){return{[oj.name]:this.catalogOutput(oj,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_lookup`,amplemarket:`amplemarket-person-reveal`,crustdata:`crustdata_contact_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},pj=lj,mj={pipeId:ij,basePipe:U(ij),label:`Mobile number from email`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a mobile phone number for a prospect.`,tags:[V.PHONE,V.WATERFALL],keywords:[`phone`,`phone number`,`cell`,`direct dial`],docPath:W(ij),billableOperations:dj,defaultInputRequirement:uj(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:sj,managedProviders:sj,deprecatedProviders:[],defaultPayload:{pipe_id:ij,connector:null,run_if:null,config:{providers:cj,input_fields:{work_email:{alias:``}},output_fields:{mobile:{alias:``,enabled:!0}}}}},hj=`person:name:join@1`,gj=_(`first_name`),_j=_(`last_name`),vj=_(`name`),yj=r.object({pipe_id:r.literal(hj),run_if:x(),connector:Kl(),config:r.object({input_fields:F(r.object({[gj.name]:T({fieldName:gj.name}),[_j.name]:T({fieldName:_j.name})})),output_fields:P(r.object({[vj.name]:D({fieldName:vj.name})}))}).optional()}),bj=e=>z(G(gj,e),G(_j,e)),xj={"person-name-join-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},Sj=class extends B{pipeId=hj;payload;payloadSchema=yj;billableOperations=xj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`person-name-join-v1-pipe0`)}getInputRequirement(){return bj(this.payload.config)}getRawOutputFields(){return{[vj.name]:this.catalogOutput(vj)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},Cj=yj,wj={pipeId:hj,basePipe:U(hj),label:`Join name`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Combine the first and last names of a prospect into a full name field.`,tags:[V.NAMES],keywords:[`combine`,`concatenate`,`merge`,`first`,`last`,`full`],docPath:W(hj),billableOperations:xj,defaultInputRequirement:bj(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:hj,run_if:null,connector:null,config:{input_fields:{first_name:{alias:``},last_name:{alias:``}},output_fields:{name:{alias:``,enabled:!0}}}}},Tj=`person:name:split@1`,Ej=_(`name`),Dj=_(`first_name`),Oj=_(`last_name`),kj=r.object({pipe_id:r.literal(Tj),connector:Kl(),run_if:x(),config:r.object({input_fields:F(r.object({[Ej.name]:T({fieldName:Ej.name})})),output_fields:P(r.object({[Dj.name]:D({fieldName:Dj.name}),[Oj.name]:D({fieldName:Oj.name})}))}).optional()}),Aj=e=>R(G(Ej,e)),jj={"person-name-split-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},Mj=class extends B{pipeId=Tj;payload;payloadSchema=kj;billableOperations=jj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`person-name-split-v1-pipe0`)}getInputRequirement(){return Aj(this.payload.config)}getRawOutputFields(){return{[Dj.name]:this.catalogOutput(Dj),[Oj.name]:this.catalogOutput(Oj)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},Nj=kj,Pj={pipeId:Tj,basePipe:U(Tj),label:`Split name`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Split a full name into first and last name.`,tags:[V.NAMES],keywords:[`parse`,`separate`,`first`,`last`,`full`],docPath:W(Tj),billableOperations:jj,inputFieldMode:`static`,outputFieldMode:`static`,defaultInputRequirement:Aj(null),allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:Tj,run_if:null,connector:void 0,config:{input_fields:{name:{alias:``}},output_fields:{first_name:{alias:``,enabled:!0},last_name:{alias:``,enabled:!0}}}}},Fj=`person:personalemail:profileurl:waterfall@1`,Ij=_(`profile_url`),Lj=_(`personal_email`),Rj=_(`alternate_personal_emails`),zj=[`leadmagic`,`mixrank`],Bj=[{provider:`leadmagic`},{provider:`mixrank`}],Vj=r.object({pipe_id:r.literal(Fj),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,availableProviders:zj,defaultProviders:Bj}),input_fields:F(r.object({[Ij.name]:T({fieldName:Ij.name})})),output_fields:P(r.object({[Lj.name]:D({fieldName:Lj.name}),[Rj.name]:D({fieldName:Rj.name})}))}).optional()}),Hj=e=>R(G(Ij,e)),Uj={"person-personalemail-profileurl-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-personalemail-profileurl-waterfall-v1-mixrank":{provider:`mixrank`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`}},Wj=class extends B{pipeId=Fj;payload;payloadSchema=Vj;billableOperations=Uj;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return Hj(this.payload.config)}getRawOutputFields(){return{[Lj.name]:this.catalogOutput(Lj,{isPrimaryOutput:!0}),[Rj.name]:this.catalogOutput(Rj)}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_personal_email_finder`,mixrank:`mixrank-person-match`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},Gj=Vj,Kj={pipeId:Fj,basePipe:U(Fj),allowedUserConnectionProviders:zj,managedProviders:zj,deprecatedProviders:[],label:`Personal email from LinkedIn`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find the personal email address of a prospect by using a professional profile URL as input.`,tags:[V.EMAIL,V.PERSONAL_EMAIL],keywords:[`gmail`,`private`,`consumer`,`contact`],docPath:W(Fj),billableOperations:Uj,defaultInputRequirement:Hj(null),inputFieldMode:`static`,outputFieldMode:`static`,defaultPayload:{pipe_id:Fj,connector:null,run_if:null,config:{providers:Bj,input_fields:{profile_url:{alias:``}},output_fields:{personal_email:{alias:``,enabled:!0},alternate_personal_emails:{alias:``,enabled:!1}}}}},qj=_(`profile_url`),Jj=_(`post_list_string`),Yj=_(`crustdata_post_list`),Xj=`person:posts:content:crustdata@1`,Zj=r.object({pipe_id:r.literal(Xj),run_if:x(),connector:w(),config:r.object({limit:Eu({path:`config.limit`,groupPath:`config.general`,max:100,min:1,sectionKey:`general`,info:``,label:`Limit`,legend:`Max. 100`}),input_fields:F(r.object({[qj.name]:T({fieldName:qj.name})})),output_fields:P(r.object({[Jj.name]:D({fieldName:Jj.name}),[Yj.name]:D({fieldName:Yj.name})}))}).optional()}),Qj=e=>R(G(qj,e)),$j={"person-posts-crustdata-v1-crustdata":{allowManagedConnection:!0,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`,note:`1.5 credits per post. Posts are fetched in increments of 5.`,provider:`crustdata`}},eM=class extends B{pipeId=Xj;payload;payloadSchema=Zj;billableOperations=$j;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`crustdata`]}estimateBillableOperations(e){return H(e,`person-posts-crustdata-v1-crustdata`)}getInputRequirement(){return Qj(this.payload.config)}getRawOutputFields(){return{[Jj.name]:this.catalogOutput(Jj),[Yj.name]:this.catalogOutput(Yj)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitRatio:1,rateLimitOperation:`crustdata_realtime_post_fetch`,allowManagedConnection:!0}]}},tM=Zj,nM={pipeId:Xj,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(Xj),label:`LinkedIn posts`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Find list of recent LinkedIn posts.`,tags:[V.LINKEDIN],keywords:[`activity`,`content`,`social`,`updates`,`engagement`,`feed`],docPath:W(Xj),billableOperations:$j,allowedUserConnectionProviders:[`crustdata`],managedProviders:[`crustdata`],deprecatedProviders:[],defaultInputRequirement:Qj(null),defaultPayload:{pipe_id:Xj,connector:null,run_if:null,config:{limit:5,input_fields:{profile_url:{alias:``}},output_fields:{crustdata_post_list:{alias:``,enabled:!0},post_list_string:{alias:``,enabled:!0}}}}},rM=`person:profile:waterfall@2`,iM=_(`person_profile_match`),aM=_(`primary_job_title`),oM=_(`primary_seniority`),sM=_(`primary_company_domain`),cM=_(`profile_url`),lM=[`crustdata`,`amplemarket`,`prospeo`],uM=[{provider:`crustdata`},{provider:`amplemarket`},{provider:`prospeo`}],dM=r.object({pipe_id:r.literal(rM),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,availableProviders:lM,defaultProviders:uM}),input_fields:F(r.object({[cM.name]:T({fieldName:cM.name})})),output_fields:P(r.object({[iM.name]:D({fieldName:iM.name}),[aM.name]:D({fieldName:aM.name}),[oM.name]:D({fieldName:oM.name}),[sM.name]:D({fieldName:sM.name})}))}).optional()}),fM=e=>R(G(cM,e)),pM={"person-profile-waterfall-v2-crustdata":{provider:`crustdata`,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`,allowManagedConnection:!0},"person-profile-waterfall-v2-amplemarket":{provider:`amplemarket`,credits:{default:1,level1:{credits:.5,weight:1}},mode:`onSuccess`,allowManagedConnection:!0},"person-profile-waterfall-v2-prospeo":{provider:`prospeo`,credits:{default:1,level1:{credits:.5,weight:1}},mode:`onSuccess`,allowManagedConnection:!0}},mM=class extends B{pipeId=rM;payload;payloadSchema=dM;billableOperations=pM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return fM(this.payload.config)}getRawOutputFields(){return{[iM.name]:this.catalogOutput(iM,{isPrimaryOutput:!0}),[aM.name]:this.catalogOutput(aM),[oM.name]:this.catalogOutput(oM),[sM.name]:this.catalogOutput(sM)}}getConnectionsRequirements(){let e={crustdata:`crustdata_realtime_person_enrich`,amplemarket:`amplemarket-person-reveal`,prospeo:`prospeo_social_profile_lookup`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},hM=dM,gM={pipeId:rM,basePipe:U(rM),label:`Full LinkedIn profile`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find a standardized JSON representation of a LinkedIn profile.`,docPath:W(rM),tags:[V.LINKEDIN,V.WATERFALL],keywords:[`enrich`,`enrichment`,`json`,`scrape`,`bio`,`experience`,`education`],managedProviders:lM,deprecatedProviders:[],allowedUserConnectionProviders:lM,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:pM,defaultInputRequirement:fM(null),defaultPayload:{pipe_id:rM,run_if:null,connector:null,config:{providers:uM,input_fields:{profile_url:{alias:``}},output_fields:{person_profile_match:{alias:``,enabled:!0},primary_job_title:{alias:``,enabled:!0},primary_seniority:{alias:``,enabled:!0},primary_company_domain:{alias:``,enabled:!0}}}}},_M=_(`work_email`),vM=_(`crustdata_person_match`),yM=_(`crustdata_profile_match_score`),bM=`person:profile:workemail:crustdata@1`,xM=r.object({pipe_id:r.literal(bM),run_if:x(),connector:w(),config:r.object({input_fields:F(r.object({[_M.name]:T({fieldName:_M.name})})),output_fields:P(r.object({[vM.name]:D({fieldName:vM.name}),[yM.name]:D({fieldName:yM.name})}))}).optional()}),SM=e=>R(G(_M,e)),CM={"person-profile-workemail-crustdata-v1-crustdata":{allowManagedConnection:!0,credits:{default:5},mode:`onSuccess`,provider:`crustdata`}},wM=class extends B{pipeId=bM;payload;payloadSchema=xM;billableOperations=CM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`crustdata`]}estimateBillableOperations(e){return H(e,`person-profile-workemail-crustdata-v1-crustdata`)}getInputRequirement(){return SM(this.payload.config)}getRawOutputFields(){return{[vM.name]:this.catalogOutput(vM),[yM.name]:this.catalogOutput(yM)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitRatio:1,rateLimitOperation:`crustdata_realtime_person_enrich`,allowManagedConnection:!0}]}},TM=xM,EM={pipeId:bM,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(bM),label:`Profile from work email`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Find person profile by their work email address.`,tags:[V.EMAIL,V.PEOPLE_PROFILES],keywords:[`enrich`,`enrichment`,`reverse lookup`,`linkedin`,`person`],docPath:W(bM),billableOperations:CM,allowedUserConnectionProviders:[`crustdata`],managedProviders:[`crustdata`],deprecatedProviders:[],defaultInputRequirement:SM(null),defaultPayload:{pipe_id:bM,connector:null,run_if:null,config:{input_fields:{work_email:{alias:``}},output_fields:{crustdata_person_match:{alias:``,enabled:!0},crustdata_profile_match_score:{alias:``,enabled:!0}}}}},DM=`person:profileurl:email:waterfall@1`,OM=_(`email`),kM=_(`work_email`),AM=_(`profile_url`),jM=[`leadmagic`],MM=[{provider:`leadmagic`}],NM=r.object({pipe_id:r.literal(DM),run_if:x(),connector:w(),config:r.object({providers:E({sectionKey:`general`,defaultProviders:MM,availableProviders:jM}),input_fields:F(r.object({[OM.name]:T({fieldName:OM.name}),[kM.name]:T({fieldName:kM.name})})),output_fields:P(r.object({[AM.name]:D({fieldName:AM.name})}))}).optional()}),PM=e=>gd(G(OM,e),G(kM,e)),FM={"person-profileurl-email-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:3.5},mode:`onSuccess`}},IM=class extends B{pipeId=DM;payload;payloadSchema=NM;billableOperations=FM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return PM(this.payload.config)}getRawOutputFields(){return{[AM.name]:this.catalogOutput(AM,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_to_b2b_profile`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},LM=NM,RM={pipeId:DM,basePipe:U(DM),managedProviders:jM,deprecatedProviders:[],allowedUserConnectionProviders:jM,label:`LinkedIn URL from email`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find the URL for a prospect's LinkedIn profile from their personal or professional email address.`,guide:`Reverse email → LinkedIn profile URL, nothing else. Unless the user specifically asks for a URL-only lookup, FAVOR person:identity:email:waterfall@2: same email input, also resolves profile_url, plus the full standardized person_profile_match JSON profile (employment and education history, seniority, location) in one call — the richer grounding almost every downstream flow (profile enrichment, CRM match) needs anyway. Reach for THIS pipe when the profile URL is genuinely the only thing wanted.`,tags:[V.LINKEDIN],keywords:[`profile`,`reverse lookup`,`social`,`person`],docPath:W(DM),billableOperations:FM,inputFieldMode:`static`,outputFieldMode:`static`,defaultInputRequirement:PM(null),defaultPayload:{pipe_id:DM,run_if:null,connector:null,config:{providers:MM,input_fields:{email:{alias:``},work_email:{alias:``}},output_fields:{profile_url:{alias:``,enabled:!0}}}}},zM=`person:profileurl:name@1`,BM=_(`name`),VM=_(`company_name`),HM=_(`location_hint`),UM=_(`profile_url`),WM=r.object({pipe_id:r.literal(zM),connector:Kl(),run_if:x(),config:r.object({input_fields:F(r.object({[BM.name]:T({fieldName:BM.name}),[VM.name]:T({fieldName:VM.name}),[HM.name]:T({fieldName:HM.name})})),output_fields:P(r.object({[UM.name]:D({fieldName:UM.name})}))}).optional()}),GM=e=>z(R(G(BM,e)),R(G(VM,e)),_d(G(HM,e))),KM={"person-profileurl-name-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:.6},mode:`always`}},qM=class extends B{pipeId=zM;payload;payloadSchema=WM;billableOperations=KM;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`person-profileurl-name-v1-pipe0`)}getInputRequirement(){return GM(this.payload.config)}getRawOutputFields(){return{[UM.name]:this.catalogOutput(UM)}}getConnectionsRequirements(){return[{provider:`serper`,rateLimitRatio:1,rateLimitOperation:`serper_search`,allowManagedConnection:!0}]}},JM=WM,YM={pipeId:zM,basePipe:U(zM),label:`LinkedIn URL from name`,executionMode:`single`,categories:[`people_data`],lifecycle:null,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],description:`Find the LinkedIn profile URL by using the prospect's name as input.`,docPath:W(zM),tags:[V.LINKEDIN],keywords:[`profile`,`social`,`lookup`,`person`],billableOperations:KM,defaultInputRequirement:GM(null),inputFieldMode:`static`,outputFieldMode:`static`,defaultPayload:{pipe_id:zM,connector:void 0,run_if:null,config:{input_fields:{company_name:{alias:``},location_hint:{alias:``},name:{alias:``}},output_fields:{profile_url:{alias:``,enabled:!0}}}}},XM=`person:workemail:profileurl:waterfall@1`,ZM=_(`profile_url`),QM=_(`work_email`),$M=_(`email_validation_status`),eN=[`hunter`,`amplemarket`,`findymail`,`leadmagic`,`crustdata`],tN=[`findymail`],nN=[{provider:`hunter`},{provider:`amplemarket`},{provider:`leadmagic`},{provider:`crustdata`}],rN=r.object({pipe_id:r.literal(XM),connector:w(),run_if:x(),config:r.object({providers:E({availableProviders:eN,defaultProviders:nN,deprecatedProviders:tN,sectionKey:`general`}),allow_catch_all_emails:yu({path:`config.allow_catch_all_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:``,label:`Allow catch-all emails`}),allow_risky_emails:yu({path:`config.allow_risky_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:`Higher chance of bouncing or being marked as spam.`,label:`Allow risky emails`}),input_fields:F(r.object({[ZM.name]:T({fieldName:ZM.name})})),output_fields:P(r.object({[QM.name]:D({fieldName:QM.name}),[$M.name]:D({fieldName:$M.name})}))}).optional()}),iN=e=>R(G(ZM,e)),aN={"person-workemail-profileurl-waterfall-v1-hunter":{provider:`hunter`,allowManagedConnection:!0,credits:{default:1},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:2,level1:{credits:.7,weight:1}},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-findymail":{provider:`findymail`,allowManagedConnection:!0,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-crustdata":{provider:`crustdata`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`},"person-workemail-profileurl-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:2.5,level1:{credits:1.5,weight:1}},mode:`onSuccess`}},oN=class extends B{pipeId=XM;payload;payloadSchema=rN;billableOperations=aN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return iN(this.payload.config)}getRawOutputFields(){return{[QM.name]:this.catalogOutput(QM,{isPrimaryOutput:!0}),[$M.name]:this.catalogOutput($M,{isPrimaryOutput:!1})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_b2b_lookup`,hunter:`prospeo_email_lookup`,amplemarket:`amplemarket-person-reveal`,findymail:`findymail_email_b2b_lookup`,crustdata:`crustdata_realtime_person_enrich`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},sN=rN,cN={pipeId:XM,basePipe:U(XM),label:`Work email from LinkedIn URL`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find work email addresses from B2B profile.`,tags:[V.EMAIL,V.WORK_EMAIL,V.WATERFALL],keywords:[`business email`,`b2b`,`corporate`,`contact`],docPath:W(XM),managedProviders:eN,allowedUserConnectionProviders:eN,deprecatedProviders:tN,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:aN,defaultInputRequirement:iN(null),defaultPayload:{pipe_id:XM,connector:null,run_if:null,config:{providers:nN,allow_catch_all_emails:!0,allow_risky_emails:!0,input_fields:{profile_url:{alias:``}},output_fields:{work_email:{alias:``,enabled:!0},email_validation_status:{alias:``,enabled:!1}}}}},lN=`person:workemail:waterfall@1`,uN=_(`name`),dN=_(`company_domain`),fN=_(`company_name`),pN=_(`work_email`),mN=_(`email_validation_status`),hN=[`leadmagic`,`prospeo`,`amplemarket`,`hunter`,`icypeas`,`findymail`],gN=[`icypeas`,`findymail`],_N=[{provider:`leadmagic`},{provider:`prospeo`},{provider:`amplemarket`},{provider:`hunter`}],vN={"person-workemail-waterfall-v1-leadmagic":{provider:`leadmagic`,allowManagedConnection:!0,credits:{default:.5,level1:{credits:.25,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-icypeas":{provider:`icypeas`,allowManagedConnection:!0,credits:{default:.5,level1:{credits:.25,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-prospeo":{provider:`prospeo`,allowManagedConnection:!0,credits:{default:1,level1:{credits:.5,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-findymail":{provider:`findymail`,allowManagedConnection:!0,credits:{default:1.5,level1:{credits:.75,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-hunter":{provider:`hunter`,allowManagedConnection:!0,credits:{default:1.3,level1:{credits:.75,weight:1}},mode:`onSuccess`},"person-workemail-waterfall-v1-amplemarket":{provider:`amplemarket`,allowManagedConnection:!0,credits:{default:3,level1:{credits:2,weight:1}},mode:`onSuccess`}},yN=r.object({pipe_id:r.literal(lN),connector:w(),run_if:x(),config:r.object({providers:E({availableProviders:hN,defaultProviders:_N,deprecatedProviders:gN,sectionKey:`general`,providerCredits:Ed(vN,hN)}),allow_catch_all_emails:yu({path:`config.allow_catch_all_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:`Catch-alls appear valid but remain undeliverable-risk.`,label:`Allow catch-all emails`}),allow_risky_emails:yu({path:`config.allow_risky_emails`,defaultValue:!0,groupPath:`config.general`,sectionKey:`general`,info:`DNS configuration and spam reputation may flag emails as high-risk.`,label:`Allow risky emails`}),input_fields:F(r.object({[uN.name]:T({fieldName:uN.name}),[dN.name]:T({fieldName:dN.name}),[fN.name]:T({fieldName:fN.name})})),output_fields:P(r.object({[pN.name]:D({fieldName:pN.name}),[mN.name]:D({fieldName:mN.name})}))}).optional()}),bN=e=>z(R(G(uN,e)),R(G(dN,e))),xN=class extends B{pipeId=lN;payload;payloadSchema=yN;billableOperations=vN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return this.payload.config?.providers.map(e=>e.provider)||[]}estimateBillableOperations(e){return H(e,...this.getProviderNames().map(e=>X(e,this.billableOperations).billableOperation))}getInputRequirement(){return bN(this.payload.config)}getRawOutputFields(){return{[pN.name]:this.catalogOutput(pN,{isPrimaryOutput:!0}),[mN.name]:this.catalogOutput(mN,{isPrimaryOutput:!0})}}getConnectionsRequirements(){let e={leadmagic:`leadmagic_email_lookup`,prospeo:`prospeo_email_lookup`,icypeas:`icypeas_email_lookup`,findymail:`findymail_email_lookup`,hunter:`hunter_email_finder`,amplemarket:`amplemarket-person-reveal`};return(this.payload.config?.providers||[]).map((t,n)=>({provider:t.provider,rateLimitRatio:Y(n),rateLimitOperation:e[t.provider],allowManagedConnection:!0}))}},SN=yN,CN={pipeId:lN,basePipe:U(lN),label:`Work email from name`,executionMode:`waterfall`,categories:[`people_data`],lifecycle:null,description:`Find work email addresses in a waterfall motion.`,tags:[V.EMAIL,V.WORK_EMAIL,V.WATERFALL],keywords:[`business email`,`b2b`,`corporate`,`contact`],docPath:W(lN),managedProviders:hN,deprecatedProviders:gN,allowedUserConnectionProviders:hN,inputFieldMode:`static`,outputFieldMode:`static`,billableOperations:vN,defaultInputRequirement:bN(null),defaultPayload:{pipe_id:lN,connector:null,run_if:null,config:{providers:_N,allow_catch_all_emails:!0,allow_risky_emails:!0,input_fields:{company_name:{alias:``},company_domain:{alias:``},name:{alias:``}},output_fields:{work_email:{alias:``,enabled:!0},email_validation_status:{alias:``,enabled:!1}}}}},wN=`prompt:run@1`,TN=`prompt-run-v1`,EN=Yc(TN),DN=r.object({pipe_id:r.literal(wN),connector:w(),run_if:x(),config:r.object({prompt:Ul({sectionKey:`general`,path:`config.prompt`,placeholder:J(`prompt`),groupPath:`config.prompt`,supportedTags:[`input`,`output`]}),model:wu({sectionKey:`general`,label:`Model`,path:`config.model`,groupPath:`config.prompt`,billableOperations:EN,defaultValue:zc})})}),ON=class extends B{pipeId=wN;payload;payloadSchema=DN;billableOperations=EN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return Hc(this.payload.config.model)}estimateBillableOperations(e){return Zc(e,{model:this.payload.config.model,prefix:TN,inputTokens:600,outputTokens:800})}getInputRequirement(){return ep([this.payload.config.prompt.template])}getSecretRequirements(){return q([this.payload.config.prompt.template])}getConstantRequirements(){return tp([this.payload.config.prompt.template])}getRawOutputFields(){let e=this.payload.config.prompt.template,t=this.payload.config.prompt.json_schemas??{},n={},r;try{r=$s(e)}catch{return n}for(let e of r.outputs){let r=e.type;if(r===`json`){let i=e.schemaRef?t[e.schemaRef]:void 0;n[e.name]={enabled:!0,name:e.name,label:e.name,resolvedName:e.name,type:r,description:e.description,jsonMeta:{zodSchema:i,exampleValue:null},format:null,isCatalogFIeld:!1,isPrimaryOutput:!1}}else n[e.name]={enabled:!0,name:e.name,label:e.name,resolvedName:e.name,type:r,description:e.description,jsonMeta:null,format:e.format??null,isCatalogFIeld:!1,isPrimaryOutput:!1}}return n}getConnectionsRequirements(){return Uc(this.payload.config.model)}},kN=DN,AN={pipeId:wN,inputFieldMode:`config`,outputFieldMode:`config`,basePipe:U(wN),label:`AI prompt`,executionMode:`single`,categories:[`actions`,`tools`],lifecycle:null,description:`Executes configurable AI prompts with structured output fields.`,guide:`General-purpose AI prompt runner. Inputs and outputs are fully dynamic — defined by the tags in the prompt template. For extracting a value from a JSON / known-schema field, do NOT use this — use the deterministic json:extract:multi@1 (JSONata) instead: it's cheaper, reproducible, and runs on a schedule with no model. Reserve prompt:run@1 for genuine judgment or free-text generation (classify, summarize, rewrite).`,tags:[V.AI],keywords:[`llm`,`gpt`,`chatgpt`,`openai`,`generate`,`classify`,`extract`],docPath:W(wN),defaultInputRequirement:null,billableOperations:EN,allowedUserConnectionProviders:Wc(),managedProviders:Wc(),deprecatedProviders:[],defaultPayload:{pipe_id:wN,connector:null,run_if:null,config:{model:zc,prompt:{template:``,json_schemas:{}}}}},jN=_(`salesforce_record_id`),MN=_(`salesforce_record_created`),NN=_(`salesforce_record_match`),PN=`record:assert:salesforce@1`,FN=r.object({pipe_id:r.literal(PN),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard and custom objects the connected user can create/update.`,enabledIf:v(`salesforce`),optionsDef:Ud({updateableOnly:!0})}),external_id_field:ku({sectionKey:`general`,required:!0,label:`External ID field`,groupPath:`config.general`,path:`config.external_id_field`,info:`The object's External-ID field anchoring the upsert (fields marked External ID in Setup). If the picker is empty, the object has none — create one in Setup; it is the ecosystem-standard idempotency anchor.`,enabledIf:v(`salesforce`),optionsDef:Wd}),external_id_value:S({sectionKey:`general`,label:`External ID value`,inputType:`text`,expectedTagType:`string`,expectedTagFormat:`text`,groupPath:`config.general`,path:`config.external_id_value`,placeholder:`{{ company_domain }}`,info:"The value to match/create on — a literal or a `{{ column }}` reference."}),values:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.values`,label:`Field values`,info:`Field = the Salesforce API name. Include every field required at create (e.g. Name on Account, LastName+Company on Lead) — a create with missing required fields fails and names them. Blank values are skipped, never cleared.`,keyLabel:`Field API name`,valueLabel:`Value`,keyPlaceholder:`Name`,valuePlaceholder:`{{ company_name }}`,maxKeys:50}),bypass_duplicate_alerts:yu({sectionKey:`general`,defaultValue:!1,label:`Bypass duplicate alerts`,groupPath:`config.general`,path:`config.bypass_duplicate_alerts`,info:`Acknowledge ALERT-mode duplicate rules and save anyway. BLOCK-mode rules can never be bypassed — those errors list the matching records.`}),output_fields:P(r.object({[jN.name]:D({fieldName:jN.name}),[MN.name]:D({fieldName:MN.name}),[NN.name]:D({fieldName:NN.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.values??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`values`,n]});if(t.includes(`{{`)){r("Field name must be a literal API name (no `{{ }}` templating).");continue}if(t.includes(`.`)){r(`Invalid field name "${t}" — dotted paths cannot be written; set the lookup ID field (e.g. AccountId) instead.`);continue}/^[a-zA-Z][a-zA-Z0-9_]*$/.test(t)||r(`Invalid Salesforce field name "${t}" — API names are letters, digits, and underscores (custom fields end in __c).`)}})}),IN={"record-assert-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},LN=class extends B{pipeId=PN;payload;payloadSchema=FN;billableOperations=IN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`record-assert-salesforce-v1-salesforce`)}getTemplates(){return[this.payload.config.external_id_value,...Object.values(this.payload.config.values??{})].filter(e=>!!e)}getInputRequirement(){return z(...$d(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[jN.name]:this.catalogOutput(jN),[MN.name]:this.catalogOutput(MN),[NN.name]:this.catalogOutput(NN)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[Qd(this.payload.config.object)||`Account`],writableOnly:!0})}},RN=FN,zN={pipeId:PN,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(PN),label:`Salesforce assert record`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:"Create-or-update (upsert) a Salesforce record anchored on an External ID field — Salesforce's native idempotent write. One matching record updates, none creates; `created` says which happened.",tags:[V.FIELDS],keywords:[`crm`,`sfdc`,`upsert`,`create`,`write`,`sync`,`idempotent`],docPath:W(PN),guide:"The upsert is anchored on the External-ID field: no match creates, one match updates, MULTIPLE matches fail with the record IDs and write nothing (resolve duplicates or use record:update). On the create path Salesforce enforces required fields (the error names them) and duplicate rules may block the save (`bypass_duplicate_alerts` acknowledges ALERT-mode rules only). Call get_provider_context for the object's writable fields; blanks skip, never clear. `salesforce_record_created` = true means a new record — the fresh record rides the output JSON.",billableOperations:IN,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:z(),defaultPayload:{pipe_id:PN,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`Account`,external_id_field:``,external_id_value:`{{ company_domain }}`,values:{},bypass_duplicate_alerts:!1,output_fields:{salesforce_record_id:{alias:``,enabled:!0},salesforce_record_created:{alias:``,enabled:!0},salesforce_record_match:{alias:``,enabled:!0}}}}},BN=_(`attio_record_id`),VN=_(`attio_record_found`),HN=_(`attio_record_match`),UN=`record:lookup:attio@1`,WN=r.object({pipe_id:r.literal(UN),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard objects plus this workspace's custom objects — all objects work.`,enabledIf:v(`attio`),optionsDef:xf}),input_fields:F(r.object({[BN.name]:T({fieldName:BN.name})})),output_fields:P(r.object({[VN.name]:D({fieldName:VN.name}),[HN.name]:D({fieldName:HN.name})}))})}),GN=e=>R(G(BN,e)),KN={"record-lookup-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},qN=class extends B{pipeId=UN;payload;payloadSchema=WN;billableOperations=KN;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`record-lookup-attio-v1-attio`)}getInputRequirement(){return GN(this.payload.config)}getRawOutputFields(){return{[VN.name]:this.catalogOutput(VN),[HN.name]:this.catalogOutput(HN)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_generic`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`})}},JN=WN,YN={pipeId:UN,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(UN),label:`Attio lookup record`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Fetch one Attio record of any object (custom objects included) by its record ID — the full record with every attribute. A missing record completes with found = false.`,tags:[V.NEW],keywords:[`crm`,`get`,`fetch`,`by id`,`custom object`,`read`],docPath:W(UN),guide:"Map the record's Attio ID into the `attio_record_id` input — typically chained from a match pipe or search that outputs it. The output JSON carries ALL of the record's attribute values under `values` (id and deep-link url beside them) — extract specific attributes with json:extract downstream. found = false is a successful result. Works on every object in the workspace, custom objects included.",billableOperations:KN,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:GN(null),defaultPayload:{pipe_id:UN,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`people`,input_fields:{attio_record_id:{alias:``}},output_fields:{attio_record_found:{alias:``,enabled:!0},attio_record_match:{alias:``,enabled:!0}}}}},XN=_(`salesforce_record_id`),ZN=_(`salesforce_record_found`),QN=_(`salesforce_record_match`),$N=`record:lookup:salesforce@1`,eP=r.object({pipe_id:r.literal($N),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard and custom objects the connected user can query.`,enabledIf:v(`salesforce`),optionsDef:Ud()}),input_fields:F(r.object({[XN.name]:T({fieldName:XN.name})})),output_fields:P(r.object({[ZN.name]:D({fieldName:ZN.name}),[QN.name]:D({fieldName:QN.name})}))})}),tP=e=>R(G(XN,e)),nP={"record-lookup-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},rP=class extends B{pipeId=$N;payload;payloadSchema=eP;billableOperations=nP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`record-lookup-salesforce-v1-salesforce`)}getInputRequirement(){return tP(this.payload.config)}getRawOutputFields(){return{[ZN.name]:this.catalogOutput(ZN),[QN.name]:this.catalogOutput(QN)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[Qd(this.payload.config.object)||`Contact`]})}},iP=eP,aP={pipeId:$N,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U($N),label:`Salesforce record lookup`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Fetch a full Salesforce record (any standard or custom object) by its record ID — every field visible to the connected user. A deleted or missing record completes with found = false.`,tags:[V.FIELDS],keywords:[`crm`,`sfdc`,`read`,`fetch`,`get`,`record`,`custom object`],docPath:W($N),guide:"The record-ID input consumes `salesforce_record_id`, which every Salesforce surface emits — chain from a match pipe or search (alias it to point at a differently named column). Returns ALL fields the connected user can see, nested under `record` in the output JSON — fields hidden by field-level security are silently absent. found = false (deleted/missing id) is a successful result.",billableOperations:nP,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:tP(null),defaultPayload:{pipe_id:$N,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`Contact`,input_fields:{salesforce_record_id:{alias:``}},output_fields:{salesforce_record_found:{alias:``,enabled:!0},salesforce_record_match:{alias:``,enabled:!0}}}}},oP=_(`attio_record_found`),sP=_(`attio_record_id`),cP=_(`attio_record_match`),lP=`record:match:attio@1`,uP=r.object({pipe_id:r.literal(lP),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard objects plus this workspace's custom objects — all objects work.`,enabledIf:v(`attio`),optionsDef:xf}),matching_attribute:ku({sectionKey:`general`,required:!0,label:`Matching attribute`,groupPath:`config.general`,path:`config.matching_attribute`,info:`The object's UNIQUE attributes — one value maps to at most one record. Deals have none by default (find them via deal:match instead); custom objects list their own unique attributes.`,enabledIf:v(`attio`),optionsDef:Of(`object`)}),value:S({sectionKey:`general`,label:`Value`,inputType:`text`,expectedTagType:`string`,expectedTagFormat:`text`,groupPath:`config.general`,path:`config.value`,placeholder:`{{ serial_number }}`,info:"The value to match — a literal or a `{{ column }}` reference. Matched exactly against the unique attribute."}),output_fields:P(r.object({[oP.name]:D({fieldName:oP.name}),[sP.name]:D({fieldName:sP.name}),[cP.name]:D({fieldName:cP.name})}))})}),dP=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},fP={"record-match-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},pP=class extends B{pipeId=lP;payload;payloadSchema=uP;billableOperations=fP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`record-match-attio-v1-attio`)}getTemplates(){return[this.payload.config.value].filter(e=>!!e)}getInputRequirement(){return z(...dP(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[oP.name]:this.catalogOutput(oP),[sP.name]:this.catalogOutput(sP),[cP.name]:this.catalogOutput(cP)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_query`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`})}},mP=uP,hP={pipeId:lP,inputFieldMode:`config`,outputFieldMode:`static`,basePipe:U(lP),label:`Attio match record`,executionMode:`single`,categories:[`integrations`],lifecycle:null,description:`Find one record of ANY Attio object (custom objects included) by a unique attribute — the generic find-by-key. A clean miss completes with found = false.`,tags:[V.NEW],keywords:[`crm`,`find`,`exists`,`unique`,`key`,`custom object`,`dedupe`],docPath:W(lP),guide:`Call get_provider_context first — it lists each object's unique attributes (the legal match targets). For people/companies prefer the typed person:match/company:match pipes (identity defaults + richer envelopes); use this for custom objects, users/workspaces, or custom unique attributes. Matching is exact; found = false is a successful result. Chain attio_record_id into record:update:attio@1.`,billableOperations:fP,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:z(),defaultPayload:{pipe_id:lP,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`people`,matching_attribute:`email_addresses`,value:`{{ email }}`,output_fields:{attio_record_found:{alias:``,enabled:!0},attio_record_id:{alias:``,enabled:!0},attio_record_match:{alias:``,enabled:!0}}}}},gP=_(`attio_record_id`),_P=_(`attio_update_result`),vP=`record:update:attio@1`,yP=r.object({pipe_id:r.literal(vP),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard objects plus this workspace's custom objects — all objects work.`,enabledIf:v(`attio`),optionsDef:xf}),input_fields:F(r.object({[gP.name]:T({fieldName:gP.name})})),values:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.values`,label:`Attribute values`,info:"Attribute = the Attio api_slug (e.g. `job_title`, custom attributes too). In the Value column, type `/` to insert a field reference. Select/status values are matched by TITLE (workspace-defined, never auto-created). Leave a value empty to skip that attribute for the row — blank values are skipped, never cleared.",keyLabel:`Attribute slug`,valueLabel:`Value`,keyPlaceholder:`job_title`,valuePlaceholder:`{{ job_title }}`,maxKeys:50}),multiselect_mode:Cu({sectionKey:`general`,required:!1,label:`Multiselect values`,groupPath:`config.general`,path:`config.multiselect_mode`,description:`Only affects multiselect attributes (e.g. domains, email_addresses, multi-selects): append adds the written value to the existing ones; overwrite replaces the full list.`,options:[{label:`Append`,value:`append`},{label:`Overwrite`,value:`overwrite`}]}).default(`append`),output_fields:P(r.object({[_P.name]:D({fieldName:_P.name})}))}).check(e=>{let t=e.value;for(let n of Object.keys(t.values??{})){let t=n.trim();if(!t)continue;let r=t=>e.issues.push({code:`custom`,input:n,message:t,path:[`values`,n]});if(t.includes(`{{`)){r("Attribute slug must be a literal api_slug (no `{{ }}` templating).");continue}/^[a-z][a-z0-9_]*$/.test(t)||r(`Invalid Attio attribute slug "${t}" — api_slugs are lowercase letters, digits, and underscores.`)}})}),bP=e=>{let t=new Set;for(let n of e)if(n)try{let e=$s(n);for(let n of Object.keys(e.inputs))t.add(n)}catch{}return[...t].map(e=>_d({name:e,resolvedName:e,label:e,description:``,type:t=>Ld(t,e)?.type||`string`,format:null}))},xP=e=>R(G(gP,e)),SP={"record-update-attio-v1-attio":{allowManagedConnection:!1,credits:null,mode:null,provider:`attio`}},CP=class extends B{pipeId=vP;payload;payloadSchema=yP;billableOperations=SP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`attio`]}estimateBillableOperations(e){return H(e,`record-update-attio-v1-attio`)}getTemplates(){return Object.values(this.payload.config.values??{}).filter(e=>!!e)}getInputRequirement(){return z(xP(this.payload.config),...bP(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[_P.name]:this.catalogOutput(_P)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitRatio:1,rateLimitOperation:`attio_write`,allowManagedConnection:!1}]}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`,writableOnly:!0})}},wP=yP,TP={pipeId:vP,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(vP),label:`Attio update record`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:`Update an Attio record (standard or custom object) by its record ID, mapping columns to attributes. Blank values are skipped so un-enriched cells never erase CRM data.`,tags:[V.FIELDS],keywords:[`crm`,`write`,`sync`,`record`,`attribute`,`custom object`],docPath:W(vP),guide:"Resolve the record ID first (person:match/company:match/record:match → Update by ID is the canonical recipe) and map it into the `attio_record_id` input. Call get_provider_context for the selected object to see WRITABLE attributes and select/status titles — Attio rejects read-only (enriched) attributes and unknown option titles (workspace-defined, never auto-created). Value coercion is permissive: select/status by title, domains/emails as plain strings, workspace-member emails for actor references, record IDs for record references. 'Append vs overwrite' only affects multiselect attributes. Blank values are skipped, not cleared.",billableOperations:SP,allowedUserConnectionProviders:[`attio`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:xP(null),defaultPayload:{pipe_id:vP,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`people`,input_fields:{attio_record_id:{alias:``}},values:{},multiselect_mode:`append`,output_fields:{attio_update_result:{alias:``,enabled:!0}}}}},EP=_(`salesforce_record_id`),DP=_(`salesforce_update_result`),OP=`record:update:salesforce@1`,kP=(e,t)=>{let n=e.value;for(let r of Object.keys(n[t]??{})){let n=r.trim();if(!n)continue;let i=n=>e.issues.push({code:`custom`,input:r,message:n,path:[t,r]});if(n.includes(`{{`)){i("Field name must be a literal API name (no `{{ }}` templating).");continue}if(n.includes(`.`)){i(`Invalid field name "${n}" — dotted paths cannot be written; set the lookup ID field (e.g. AccountId) instead.`);continue}/^[a-zA-Z][a-zA-Z0-9_]*$/.test(n)||i(`Invalid Salesforce field name "${n}" — API names are letters, digits, and underscores (custom fields end in __c).`)}},AP=r.object({pipe_id:r.literal(OP),run_if:x(),connector:C(),config:r.object({object:ku({sectionKey:`general`,required:!0,label:`Object`,groupPath:`config.general`,path:`config.object`,info:`Standard and custom objects the connected user can update.`,enabledIf:v(`salesforce`),optionsDef:Ud({updateableOnly:!0})}),values:mu({sectionKey:`general`,groupPath:`config.general`,path:`config.values`,label:`Field values`,info:"Field = the Salesforce API name (`Title`, custom fields like `Lead_Score__c`). In the Value column, type `/` to insert a field reference. Blank values are skipped, never cleared. Restricted-picklist values must match existing entries exactly (case-sensitive); multi-select picklist writes REPLACE the whole set (semicolon-joined).",keyLabel:`Field API name`,valueLabel:`Value`,keyPlaceholder:`Title`,valuePlaceholder:`{{ job_title }}`,maxKeys:50}),bypass_duplicate_alerts:yu({sectionKey:`general`,defaultValue:!1,label:`Bypass duplicate alerts`,groupPath:`config.general`,path:`config.bypass_duplicate_alerts`,info:`Acknowledge ALERT-mode duplicate rules and save anyway. BLOCK-mode rules can never be bypassed — those errors list the matching records.`}),input_fields:F(r.object({[EP.name]:T({fieldName:EP.name})})),output_fields:P(r.object({[DP.name]:D({fieldName:DP.name})}))}).check(e=>kP(e,`values`))}),jP=e=>R(G(EP,e)),MP={"record-update-salesforce-v1-salesforce":{allowManagedConnection:!1,credits:null,mode:null,provider:`salesforce`}},NP=class extends B{pipeId=OP;payload;payloadSchema=AP;billableOperations=MP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`salesforce`]}estimateBillableOperations(e){return H(e,`record-update-salesforce-v1-salesforce`)}getTemplates(){return Object.values(this.payload.config.values??{}).filter(e=>!!e)}getInputRequirement(){return z(jP(this.payload.config),...$d(this.getTemplates()))}getSecretRequirements(){return q(this.getTemplates())}getRawOutputFields(){return{[DP.name]:this.catalogOutput(DP)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitRatio:1,rateLimitOperation:`salesforce_api`,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[Qd(this.payload.config.object)||`Contact`],writableOnly:!0})}},PP=AP,FP={pipeId:OP,inputFieldMode:`static`,outputFieldMode:`static`,basePipe:U(OP),label:`Salesforce update record`,executionMode:`single`,categories:[`actions`,`integrations`],lifecycle:null,description:`Update a Salesforce record (standard or custom object) by its record ID, mapping columns to fields. Blank values are skipped so un-enriched cells never erase CRM data; the output carries the fresh post-save record.`,tags:[V.FIELDS],keywords:[`crm`,`sfdc`,`write`,`sync`,`field`,`custom object`],docPath:W(OP),guide:"The record-ID input consumes `salesforce_record_id`, which every Salesforce surface emits — chain from a match pipe (alias it to point at a differently named column). Call get_provider_context for the object's WRITABLE fields and picklist values — formula fields are read-only, restricted-picklist values are validated before the write (case-sensitive), and converted leads are read-only entirely (update the contact via ConvertedContactId instead). Duplicate rules may block the save; the error includes the admin's message and the matching record IDs, and `bypass_duplicate_alerts` acknowledges ALERT-mode rules only. Rows where every value renders blank skip the API call. Consume post-write values from the result JSON's `record` — formulas and triggers may rewrite fields after save.",billableOperations:MP,allowedUserConnectionProviders:[`salesforce`],managedProviders:[],deprecatedProviders:[],defaultInputRequirement:jP(null),defaultPayload:{pipe_id:OP,connector:{strategy:`first`,connections:[]},run_if:null,config:{object:`Contact`,values:{},bypass_duplicate_alerts:!1,input_fields:{salesforce_record_id:{alias:``}},output_fields:{salesforce_update_result:{alias:``,enabled:!0}}}}},IP=[{label:`demo-leads`,value:`demo-leads`},{label:`demo-companies`,value:`demo-companies`},{label:`demo-contacts`,value:`demo-contacts`}],LP=[{label:`Demo project`,value:`demo-project`},{label:`Sales pipeline`,value:`sales-pipeline`}];function RP(e){let t=e?.config?.project;return typeof t==`string`&&t.length>0?t:void 0}function zP(e){if(!e||e.conditions.length===0)return null;let t=JSON.stringify({logic:e.logic,conditions:e.conditions.map(e=>[e.field_name,e.operator,e.value])}),n=2166136261;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619)>>>0;return n.toString(16).padStart(8,`0`)}function BP(e,t,n){let r=e=>e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``).slice(0,40),i=`rr--${r(e)}--${r(t)}`;return n?`${i}--f-${r(n)}`:i}function VP(e,t){let n=e;for(let e of t.split(`.`)){if(typeof n!=`object`||!n)return;n=n[e]}return n}const HP={requires:{connection:`pipe0`},enabledIf:v(`pipe0`,`Select a pipe0 connection to see sheet suggestions`),options:async({query:e,client:t,environment:n})=>n===`sandbox`?IP:t?(await t.sheets.list({query:e})).map(e=>({label:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},UP={requires:{connection:`pipe0`,fields:[`config.project`]},enabledIf:v(`pipe0`,`Select a pipe0 connection to see sheet suggestions`),options:async({query:e,client:t,environment:n,payload:r})=>n===`sandbox`?IP:t?(await t.sheets.list({query:e,projectSlug:RP(r)})).map(e=>({label:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},WP={requires:{connection:`pipe0`},enabledIf:v(`pipe0`,`Select a pipe0 connection to see project suggestions`),options:async({query:e,client:t,environment:n})=>n===`sandbox`?LP:t?(await t.projects.list({query:e})).map(e=>({label:e.name&&e.name!==e.slug?`${e.name} (${e.slug})`:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},GP=[{value:`email`,label:`email`,data:{type:`string`,format:`email`}},{value:`name`,label:`name`,data:{type:`string`}},{value:`company`,label:`company`,data:{type:`string`}}],KP={"demo-leads":GP,"demo-companies":[{value:`domain`,label:`domain`,data:{type:`string`,format:`website_url`}},{value:`company_name`,label:`company_name`,data:{type:`string`}}],"demo-contacts":GP},qP=e=>({requires:{connection:`pipe0`,fields:[e.sheetPath]},enabledIf:v(`pipe0`,`Select a pipe0 connection to see column suggestions`),options:async({payload:t,client:n,environment:r})=>{let i=VP(t,e.sheetPath);return typeof i!=`string`||!i.trim()||i.includes(`{{`)?[]:r===`sandbox`?KP[i.trim()]??GP:n?(await n.sheets.fields({slug:i.trim()})).filter(t=>(e.includeJson||t.type!==`json`)&&t.name.toLowerCase()!==`id`).map(e=>({value:e.name,label:e.name,data:{type:String(e.type),...e.format?{format:String(e.format)}:{}}})):[]},widgets:{provider_logo:{provider:`pipe0`}}}),JP=`row:append:sheet@1`,YP=_(`sheet_record_id`),XP=_(`created_sheet`),ZP=r.object({pipe_id:r.literal(JP),connector:C(),run_if:x(),config:r.object({project:S({label:`Project`,info:"Project the destination sheet lives in (its org-unique slug). Pick an existing project or type a new slug — a new project is created when `allow_entity_creation` is on.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.project`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:WP}),sheet:S({label:`Sheet ID`,info:'The destination sheet\'s identifier (its slug — NOT the display name). Slugs are org-unique: pick an existing sheet to append into it, or type a NEW slug to create one — a generic slug (e.g. "results", "companies") is likely to match an unrelated existing sheet, so for a new sheet use a short descriptive slug plus a few random chars (e.g. "ceos-x7k2") that can\'t collide. Type `@` to insert a field reference / `$` for a secret.',groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:UP,enabledIf:e=>e.config?.project?{disabled:!1}:{disabled:!0,message:`Select a project first`}}),run_added_rows:yu({defaultValue:!0,groupPath:`config.advanced`,path:`config.run_added_rows`,sectionKey:`general`,description:`Auto-run the destination sheet's pipes over the row this pipe appended. A bounded onward chain is fine (the destination's own write pipes cascade further); auto-run is suppressed only when the destination's write chain could loop back into a sheet on the path.`,label:`Run added rows`}),allow_entity_creation:yu({label:`Allow creating missing entities`,description:`Create missing fields, sheets, and projects as needed (unknown fields become columns; a missing sheet or project is created).`,defaultValue:!0,groupPath:`config.advanced`,path:`config.allow_entity_creation`,sectionKey:`general`}),write_fields:iu({label:`Fields`,info:`All fields are written if empty. An entry's optional alias renames the destination column.`,groupPath:`config.general`,path:`config.write_fields`,sectionKey:`general`,disableSearch:!0}),output_fields:P(r.object({[YP.name]:D({fieldName:YP.name}),[XP.name]:D({fieldName:XP.name})}))})}).check(e=>{let t=e.value.config?.write_fields??[],n=t.map(e=>(e.alias?.trim()||e.field_name).toLowerCase());t.forEach((t,r)=>{let i=t.alias?.trim();i&&(dd(i)&&e.issues.push({code:`custom`,input:i,path:[`config`,`write_fields`,r,`alias`],message:`'${i}' is reserved and cannot be written to the destination sheet.`}),n.filter(e=>e===i.toLowerCase()).length>1&&e.issues.push({code:`custom`,input:i,path:[`config`,`write_fields`,r,`alias`],message:`'${i}' collides with another write_fields destination name.`}))})}),QP={"row-append-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},$P=class extends B{pipeId=JP;payload;payloadSchema=ZP;billableOperations=QP;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`row-append-sheet-v1-pipe0`)}getInputRequirement(){let e=[ep([this.payload.config.project,this.payload.config.sheet],{expectedType:`string`})];if(this.payload.config.write_fields?.length)for(let t of this.payload.config.write_fields)e.push(R({name:t.field_name,resolvedName:t.field_name,label:``,description:``,type:e=>{let n=Ld(e,t.field_name);if(!n)throw Error(`Unable to find field with name ${t.field_name}. But needed by prompt parser.`);return n.type||`unknown`},format:null}));return z(...e)}getSecretRequirements(){return q([this.payload.config.project,this.payload.config.sheet])}getConstantRequirements(){return tp([this.payload.config.project,this.payload.config.sheet])}getRawOutputFields(){return{[YP.name]:this.catalogOutput(YP),[XP.name]:this.catalogOutput(XP)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},eF=ZP,tF={pipeId:JP,basePipe:U(JP),label:`Append row to sheet`,executionMode:`single`,categories:[`actions`,`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:"Add rows to a pipe0 sheet in a given project. config.project and config.sheet may each be a literal slug or a `{{ field_name }}` tag.",guide:`Append records to another pipe0 sheet. config.project (REQUIRED) is the destination project's org-unique slug — when working inside a project, pass THAT project's slug (see CURRENT CONTEXT). config.sheet is the destination sheet's slug; both may be a \`{{ field }}\` tag for a per-row destination. config.write_fields is the destination's CONTRACT — list exactly the columns the destination consumes, and use an entry's optional alias to rename its destination column ({ field_name: "email", alias: "signup_email" } reads \`email\` from the source row and writes it as \`signup_email\`); EMPTY write_fields mirrors EVERY source column into the destination, which is almost never what a routing/handoff sheet wants. With allow_entity_creation on, a missing project/sheet (and unknown fields) are created; if the sheet slug already exists in a DIFFERENT project the rows fail. Destination slugs are ORG-UNIQUE, so config.sheet addresses a sheet across your whole org: an existing slug REUSES that sheet (appending into it) when it's in config.project, and FAILS when it lives elsewhere — so for a genuinely NEW sheet use a short descriptive slug plus 3-4 random alphanumeric chars (e.g. "ceos-x7k2") — you cannot see other projects' slugs, so only the random suffix makes a new slug collision-proof; set the display name afterwards (in-app via the name_workspace tool; via API with PATCH /v1/sheets/{sheet_id}). To explode a LIST field into MANY rows (denormalize a 1:N relationship), use row:expandappend:sheet@1 instead. To bulk-copy existing rows across sheets, prefer the rows:copy_to_sheet@1 effect. NON-IDEMPOTENT: each run appends again, so re-running duplicates rows (and you cannot undo rows written to another sheet) — dry-run the flow in sandbox first (env:change@1), and to retry after a partial failure adopt the succeeded cells (rows:adopt@1 with adopt_statuses:["completed"]) then rows:enrich@1. Requires a pipe0 connection (list_connections).`,docPath:W(JP),tags:[V.FIELDS],keywords:[`add`,`insert`,`write`,`push`,`export`],billableOperations:QP,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:JP,connector:{strategy:`first`,connections:[]},run_if:null,config:{project:``,sheet:``,run_added_rows:!0,allow_entity_creation:!0,write_fields:[],output_fields:{sheet_record_id:{alias:``,enabled:!0},created_sheet:{alias:``,enabled:!0}}}}},nF=`row:expandappend:sheet@1`,rF=_(`sheet_record_ids`),iF=_(`input_objects`),aF=`expanded_value`,oF=r.object({pipe_id:r.literal(nF),connector:C(),run_if:x(),config:r.object({project:S({label:`Project`,info:"Project the destination sheet lives in (its org-unique slug). Pick an existing project or type a new slug — a new project is created when `allow_entity_creation` is on.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.project`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:WP}),sheet:S({label:`Sheet ID`,info:`The destination sheet's identifier (its slug — NOT the display name). Slugs are org-unique: pick an existing sheet to write into it, or type a NEW slug to create one. A generic slug (e.g. "results", "companies") is likely to match an unrelated existing sheet, so for a new sheet use a short descriptive slug plus a few random chars (e.g. "ceos-x7k2") that can't collide.`,groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:UP,enabledIf:e=>e.config?.project?{disabled:!1}:{disabled:!0,message:`Select a project first`}}),run_added_rows:yu({defaultValue:!0,groupPath:`config.general`,path:`config.run_added_rows`,sectionKey:`general`,info:`Auto-run the destination sheet's pipes over the rows this pipe appended. A bounded onward chain is fine (the destination's own write pipes cascade further); auto-run is suppressed only when the destination's write chain could loop back into a sheet on the path.`,label:`Run added rows`}),write_fields:iu({label:`Fields`,info:`Source-row fields written onto every exploded row alongside the item (e.g. a join key like user_id). An entry's optional alias renames the destination column. Unlike row:append:sheet@1, empty writes NO source columns.`,groupPath:`config.general`,path:`config.write_fields`,sectionKey:`general`,disableSearch:!0}),allow_entity_creation:yu({label:`Allow creating missing entities`,description:`Create missing entities as needed (a missing sheet or project is created, along with the output column on the destination).`,defaultValue:!0,groupPath:`config.advanced`,path:`config.allow_entity_creation`,sectionKey:`general`}),...bu({groupPath:`config.destination`,sectionKey:`general`,defaultName:aF,nameInfo:`Name of the field each list item is written to on the destination sheet. Each item is stored as-is (objects/arrays as one json cell); extract flat columns afterwards with json:extract:multi@1.`}),input_fields:F(r.object({[iF.name]:T({fieldName:iF.name})})),output_fields:P(r.object({[rF.name]:D({fieldName:rF.name})}))})}).check(e=>{let t=e.value.config?.destination_field_name;t&&dd(t)&&e.issues.push({code:`custom`,input:t,path:[`config`,`destination_field_name`],message:`'${t}' is reserved and cannot be used as a destination field name.`});let n=(t?.trim()||`expanded_value`).toLowerCase(),r=new Set;(e.value.config?.write_fields??[]).forEach((t,i)=>{let a=t.alias?.trim(),o=a||t.field_name,s=a?`alias`:`field_name`,c=o.toLowerCase();dd(o)&&e.issues.push({code:`custom`,input:o,path:[`config`,`write_fields`,i,s],message:`'${o}' is reserved and cannot be written to the destination sheet.`}),c===n&&e.issues.push({code:`custom`,input:o,path:[`config`,`write_fields`,i,s],message:`'${o}' collides with the destination field each item is written to.`}),r.has(c)&&e.issues.push({code:`custom`,input:o,path:[`config`,`write_fields`,i,s],message:`'${o}' is listed more than once.`}),r.add(c)})}),sF={"row-expandappend-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},cF=e=>R(G(iF,e)),lF=class extends B{pipeId=nF;payload;payloadSchema=oF;billableOperations=sF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`row-expandappend-sheet-v1-pipe0`)}getInputRequirement(){return cF(this.payload.config)}getRawOutputFields(){return{[rF.name]:this.catalogOutput(rF)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},uF=oF,dF={pipeId:nF,basePipe:U(nF),label:`Expand list to sheet`,executionMode:`single`,categories:[`actions`,`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:"Expand a list into sheet rows — each item is written as-is to an `expanded_value` column (objects/arrays as json).",guide:`Denormalize a 1:N list into rows on ANOTHER sheet: each item in the input_objects array becomes its own row on config.sheet, inside config.project (REQUIRED — the destination project's org-unique slug; when working inside a project pass THAT slug, see CURRENT CONTEXT). Every item is written AS-IS to a single column on the destination — an object/array lands as one json cell (its fields are NOT spread into separate columns), a primitive as a scalar. That column is \`expanded_value\` by default; rename/retype it via config.destination_field_name / destination_field_type / destination_field_format / destination_field_label (type/format are inferred from the data when left unset). To get flat columns, run json:extract:multi@1 ON THE DESTINATION sheet afterwards to pull out exactly the values you need. config.write_fields copies chosen SOURCE-row fields onto every exploded row alongside the item (e.g. a stable join key like user_id, so downstream sheets can be joined/deleted per source entity); an entry's optional alias renames its destination column ({ field_name: "email", alias: "signup_email" } reads \`email\` from the source row and writes it as \`signup_email\`) — unlike row:append:sheet@1, EMPTY write_fields writes NO source columns (the exploded item is the row). Values are read from the row at run time and are deliberately NOT typed inputs, so editing the list never force-requeues this non-idempotent pipe. With allow_entity_creation on, a missing project/sheet (and the expanded_value column) are created; a sheet slug that exists in a DIFFERENT project fails the rows. Destination slugs are ORG-UNIQUE, so config.sheet addresses a sheet across your whole org: an existing slug REUSES that sheet (appending into it) when it's in config.project, and FAILS when it lives elsewhere — a generic slug like "results"/"companies"/"current-employers" will likely hit an unrelated sheet. When you mean a genuinely NEW sheet, use a short descriptive slug plus 3-4 random alphanumeric chars (e.g. "ceos-x7k2", "prospects-employers-9fq") — you cannot see other projects' slugs, so only the random suffix makes a new slug collision-proof; give the sheet its human-readable display name afterwards (in-app via the name_workspace tool; via API with PATCH /v1/sheets/{sheet_id}). Use it when a column holds a list you need per-element (e.g. a profile's current employers) BEFORE enriching each element — never collapse the list with an LLM. Requires a pipe0 connection (resolve via list_connections). Typical pipeline: json:extract:multi@1 to build the array column → this pipe to explode it into an intermediary sheet → json:extract:multi@1 THERE to flatten the fields you need out of expanded_value → enrich each row (e.g. person:match:role:waterfall@1) → rows:copy_to_sheet@1 to the final sheet. NON-IDEMPOTENT: each run appends again, so re-running duplicates rows (and you cannot undo rows written to another sheet) — dry-run the flow in sandbox first (env:change@1), and to retry after a partial failure adopt the succeeded cells (rows:adopt@1 with adopt_statuses:["completed"]) then rows:enrich@1. In the replace-on-refresh pattern (paired rows:delete:sheet@1 instances), position in the pipes array is NOT execution order — gate THIS pipe with a run_if on each delete's aliased count output (status eq completed): those references are the dependency edges that guarantee delete-before-append and skip the append whenever the deletes were skipped.`,docPath:W(nF),tags:[V.FIELDS],keywords:[`explode`,`denormalize`,`array`,`split`,`one to many`,`fan out`],billableOperations:sF,defaultInputRequirement:cF(null),inputFieldMode:`static`,outputFieldMode:`static`,defaultPayload:{pipe_id:nF,connector:{strategy:`first`,connections:[]},run_if:null,config:{project:``,sheet:``,run_added_rows:!0,allow_entity_creation:!0,write_fields:[],destination_field_name:aF,destination_field_type:``,destination_field_format:``,destination_field_label:``,input_fields:{input_objects:{alias:``}},output_fields:{sheet_record_ids:{alias:``,enabled:!0}}}}},fF=`row:roundrobin:sheet@1`,pF=Ac(v(`pipe0`,`Add a pipe0 connection first`),kc(e=>e.config?.sheet,`Select a sheet first`)),mF=r.object({pipe_id:r.literal(fF),connector:C(),run_if:x(),config:r.object({sheet:ku({label:`Sheet`,info:`The sheet to rotate through — e.g. a roster of sellers. Always another sheet.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet`,required:!0,optionsDef:HP}),sheet_where:Rl({label:`Rotation pool`,info:`Only target-sheet rows matching these conditions rotate. Leave empty to rotate over the whole sheet.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_where`,required:!1,enabledIf:pF,fieldNamePlaceholder:`segment`,optionsDef:qP({sheetPath:`config.sheet`})}),sheet_unique_field:ou({label:`Unique column`,info:`Column of the target sheet that must be filled and unique in every row — checked at run time.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_unique_field`,required:!0,enabledIf:pF,optionsDef:qP({sheetPath:`config.sheet`})}),sheet_copy_fields:au({label:`Fields to bring over`,info:`Target-sheet columns copied from the picked row; each becomes an output column.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_copy_fields`,minItems:1,enabledIf:pF,optionsDef:qP({sheetPath:`config.sheet`,includeJson:!0})}),sheet_weight_field:ou({label:`Weight column`,info:`Numeric target-sheet column scaling each row's share. 0 pauses a row; empty counts as 1. Leave unset for equal shares.`,groupPath:`config.general`,sectionKey:`general`,path:`config.sheet_weight_field`,enabledIf:pF,optionsDef:qP({sheetPath:`config.sheet`})}),counter_field:ou({label:`Counter field`,info:`Column of this sheet whose unique values advance the rotation.`,groupPath:`config.general`,sectionKey:`general`,path:`config.counter_field`,required:!0})})}),hF={"row-roundrobin-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},gF=class extends B{pipeId=fF;payload;payloadSchema=mF;billableOperations=hF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`row-roundrobin-sheet-v1-pipe0`)}getTemplatedFields(){return(this.payload.config.sheet_where?.conditions??[]).map(e=>typeof e.value==`string`?e.value:null)}getInputRequirement(){let e=this.payload.config.counter_field.field_name,t=R({name:e,resolvedName:e,label:``,description:``,source:`config.counter_field — a column of THIS sheet`,type:t=>Ld(t,e)?.type||`unknown`,format:null}),n=ep(this.getTemplatedFields(),{expectedType:`string`});return n.kind===`all`&&n.of.length===0?t:z(t,n)}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getBucketRequirements(){let e=at(this.payload.config.sheet),t=this.payload.config.counter_field.field_name;if(!e||!t)return[];let n=this.payload.config.sheet_where??null;return(n?.conditions??[]).some(e=>typeof e.value==`string`&&e.value.includes(`{{`))?[]:[{slug:BP(e,t,zP(n)),type:`counter`,schema:null,allowCreation:!0}]}getRawOutputFields(){let e={};for(let t of this.payload.config.sheet_copy_fields){if(!t.field_name)continue;let n=t.alias||t.field_name;e[t.field_name]={description:`Value of the target sheet's "${t.field_name}" column on the round-robin-picked row.`,enabled:!0,format:t.format??null,label:n,name:t.field_name,resolvedName:n,jsonMeta:null,type:t.type??`unknown`,isCatalogFIeld:!1,isPrimaryOutput:!1}}return e}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},_F=mF,vF={pipeId:fF,basePipe:U(fF),label:`Round-robin from sheet`,executionMode:`single`,categories:[`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:`Rotate through the rows of another sheet (e.g. a sellers roster): each unique counter value picks the next row round-robin, and the selected columns of the picked row become outputs. Re-run safe — the same counter value always picks the same row.`,guide:"Round-robin assignment from another pipe0 sheet (the roster — e.g. sellers). config.sheet is the target sheet's org-unique slug — one FIXED sheet for the whole pipe, never a per-row reference. config.sheet_where (optional) restricts the ROTATION POOL to target-sheet rows matching the conditions (null = whole sheet); condition field_names are LITERAL target-sheet columns, string values may hold `{{ field }}` refs resolved per lead — e.g. segment eq {{ segment }} routes each lead over its own segment's rows. Each distinct RESOLVED filter cycles on its OWN counter (so slot numbers stay consecutive per pool — strict round robin within each pool); avoid high-cardinality templated filters ({{ email }}-like) — every distinct value creates a counter bucket and will exhaust the org bucket quota. config.sheet_unique_field names a TARGET-sheet column that must be filled in EVERY row and unique across rows — the run fails with a clear message if it has gaps or duplicates (this guarantees every roster row is a distinct assignee). config.sheet_copy_fields are the TARGET-sheet columns copied from the picked row; each becomes an output column named like the column — or like the entry's `alias` when set: use an alias whenever THIS sheet already has a column of that name (e.g. roster `email` → alias `seller_email`), otherwise the copy silently writes into the existing column. Entries are typed by `type`/`format` (snapshotted from the target sheet's schema when picked — if the target column's type drifts later, the run fails with an output-type mismatch; re-pick the column to refresh the snapshot). config.counter_field names a column of the CURRENT sheet: every unique value of it takes the next number from an internal counter bucket (first-seen → 1, next new value → 2, …; the SAME value always keeps the SAME number, so re-runs are stable). For LEAD/SIGNUP ROUTING the counter defaults to the ACCOUNT key — a company domain column (work email → field:domainify@1; personal email → reverse lookup; coalesce with fields:merge@1) — so every lead from the same company keeps the same assignee; counter on the person's email ONLY when account grouping is explicitly unwanted (consumer flows). See the routing:leads:roundrobin@1 playbook. The pick is slot (n − 1) mod W over the pool's rows in creation order, where W is the pool's total weight (= row count when unweighted) — adding pool rows only changes the wrap; deleting or reordering reshuffles subsequent picks. config.sheet_weight_field (optional) names a NUMERIC target-sheet column: a row with weight w takes w of every W slots, spread evenly across the cycle (weight 2 ≠ two consecutive picks); weight 0 pauses the row; an empty cell counts as 1; a negative or non-integer weight fails the run loudly. Editing weights re-shapes FUTURE picks only — the counter and its bucket are untouched, so rotation never restarts. The internal counter is a REAL org-scoped counter bucket (visible in the buckets UI, slug `rr--<sheet>--<counter field>`); changing the sheet or the counter field starts a fresh rotation. A row with a missing/empty counter value is gated to skipped before the runner. Empty roster → all outputs no_result. A copied column that is empty on the picked row resolves to no_result. Missing sheet (bad slug) fails the record naming the slug. The target sheet is NEVER modified. FREE pipe0 operation; requires a pipe0 connection (list_connections).",docPath:W(fF),tags:[V.FIELDS],keywords:[`rotate`,`rotation`,`distribute`,`routing`,`assignment`,`owner`,`alternate`],billableOperations:hF,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`config`,defaultPayload:{pipe_id:fF,connector:{strategy:`first`,connections:[]},run_if:null,config:{sheet:``,sheet_where:null,sheet_unique_field:{field_name:``},sheet_copy_fields:[],sheet_weight_field:{field_name:``},counter_field:{field_name:``}}}},yF=`rows:delete:sheet@1`,bF=_(`sheet_deleted_count`),xF=r.object({pipe_id:r.literal(yF),connector:C(),run_if:x(),config:r.object({sheet:S({label:`Sheet ID`,info:"The sheet to delete from (its org-unique slug — NOT the display name). Type `@` to insert a field reference for a per-row sheet. A sheet that does not exist yet completes with 0 deleted.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:HP}),where:Rl({label:`Delete conditions`,info:"Conditions on the target sheet's columns. Column names are literal; in the value, type `/` to insert a field reference (e.g. `{{ user_id }}`). Rows matching the condition are DELETED.",groupPath:`config.general`,sectionKey:`general`,path:`config.where`,fieldNamePlaceholder:`user_id`,optionsDef:qP({sheetPath:`config.sheet`})}),output_fields:P(r.object({[bF.name]:D({fieldName:bF.name})}))})}),SF={"rows-delete-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},CF=class extends B{pipeId=yF;payload;payloadSchema=xF;billableOperations=SF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`rows-delete-sheet-v1-pipe0`)}getTemplatedFields(){return[this.payload.config.sheet,...(this.payload.config.where?.conditions??[]).map(e=>typeof e.value==`string`?e.value:null)]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[bF.name]:this.catalogOutput(bF)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},wF=xF,TF={pipeId:yF,basePipe:U(yF),label:`Delete rows in sheet`,executionMode:`single`,categories:[`tools`,`actions`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:`Delete rows in ANOTHER pipe0 sheet matching a condition block. The replace-on-refresh building block: delete previously written downstream rows before re-appending fresh ones.`,guide:"Delete rows in another pipe0 sheet whose columns match config.where — the delete half of the replace-on-refresh pattern: pair it with the pipe that appends downstream rows (row:append:sheet@1 / row:expandappend:sheet@1), keyed on a stable join column, e.g. `user_id eq \"{{ user_id }}\"`, so a re-enrichment first clears the rows it previously wrote and then re-appends. Position in the pipes array is NOT execution order (pipes run in dependency waves; independent pipes run concurrently) — delete-before-append is enforced by the APPEND pipe's run_if referencing this pipe's (aliased) count output status eq completed, never by list ordering. config.sheet is the target's org-unique slug (literal or `{{ field }}` tag). config.where semantics match rows:find:sheet@1: field_name is a LITERAL target column (not validated against the target — a wrong name behaves like a null cell and deletes NOTHING); string values may contain `{{ field }}` tags resolved per row; a value resolving to an empty string fails the row (a blank key must not delete everything). A target sheet that does not exist yet completes with sheet_deleted_count 0 — first runs happen before downstream sheets exist, by design. The replace pattern usually needs SEVERAL instances on one sheet (one per downstream target) — output names are sheet-global, so alias each instance's sheet_deleted_count (e.g. experiences_deleted_count / profiles_deleted_count) or the defaults collide and the pipeline won't validate. Skip-propagation protects previously written rows ONLY when the templated key is an enrichment OUTPUT (the typed input skips on upstream failure) — an INPUT column key like user_id is always satisfied, so the delete would run even on a failed refresh: gate it with an explicit run_if on a success flag (e.g. a bucket:claim@1 is_claim_successful value eq true) so failed/no_result refreshes keep the old rows. DESTRUCTIVE and NON-idempotent (deleted rows cannot be restored except via the target's timetravel): rehearse in sandbox (env:change@1, the delete is mocked), and after a partial failure adopt succeeded cells (rows:adopt@1) before re-running. Deletes on the same target serialize (exclusive lock) — expect modest throughput on large refreshes. Requires a pipe0 connection (list_connections).",docPath:W(yF),tags:[V.FIELDS],keywords:[`delete`,`remove`,`clear`,`replace`,`refresh`,`cleanup`,`another sheet`,`downstream`,`purge`],billableOperations:SF,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:yF,connector:{strategy:`first`,connections:[]},run_if:null,config:{sheet:``,where:null,output_fields:{sheet_deleted_count:{alias:``,enabled:!0}}}}},EF=`SELECT table_schema, table_name, column_name, data_type FROM information_schema.columns WHERE table_schema NOT IN ('pg_catalog', 'information_schema') ORDER BY table_schema, table_name, ordinal_position`,DF=`table_catalog NOT IN ('system', '__databricks_internal') AND table_schema <> 'information_schema'`,OF=`SELECT table_catalog, table_schema, table_name FROM system.information_schema.tables WHERE ${DF} ORDER BY table_catalog, table_schema, table_name`,kF=`SELECT table_catalog, table_schema, table_name, column_name, data_type FROM system.information_schema.columns WHERE ${DF} ORDER BY table_catalog, table_schema, table_name, ordinal_position`;function AF(e){return typeof e==`string`?e:String(e??``)}function jF(e){let t=new Map;for(let n of e){let e=AF(n.table_schema),r=AF(n.table_name);if(!r)continue;let i=`${e}.${r}`,a=t.get(i);a||(a={schema:e,name:r,columns:[]},t.set(i,a)),a.columns.push({name:AF(n.column_name),type:AF(n.data_type)})}return t}function MF(e){return`${e.catalog?`${e.catalog}.`:``}${e.schema?`${e.schema}.`:``}${e.name}`}function NF(e,t){if(e.length===0)return{summary:`The connected database exposes no tables outside the system schemas — nothing to query yet.`,data:{tables:[],truncated:t}};let n=e.map(e=>{if(e.columns.length===0)return`- ${MF(e)} — (columns not listed; DESCRIBE or sample to inspect)`;let t=e.columns.slice(0,50),n=e.columns.length-t.length,r=t.map(e=>e.type?`${e.name}:${e.type}`:e.name).join(`, `);return`- ${MF(e)} — ${r}${n>0?` (+${n} more)`:``}`}),r=e.some(e=>e.catalog)?` Names are fully qualified (catalog.schema.table) — use them VERBATIM in config.query.`:``;return{summary:[`Schema map (${e.length} table${e.length===1?``:`s`}${t?`, truncated — the database has more`:``}). Write config.query against these;${r} sample rows free via run_search_oneshot.`,...n].join(`
85
85
  `),data:{tables:e,truncated:t}}}async function PF(e){let t=await e({query:OF,limit:500}),n=new Map;for(let e of t.rows){let t=AF(e.table_catalog),r=AF(e.table_schema),i=AF(e.table_name);i&&n.set(`${t}.${r}.${i}`,{catalog:t,schema:r,name:i,columns:[]})}let r=await e({query:kF,limit:500});for(let e of r.rows)n.get(`${AF(e.table_catalog)}.${AF(e.table_schema)}.${AF(e.table_name)}`)?.columns.push({name:AF(e.column_name),type:AF(e.data_type)});return NF([...n.values()],t.hasMore||r.hasMore)}async function FF(e){let t=await e({query:`SHOW TABLES`,limit:500}),n=t.rows.map(e=>({schema:AF(e.database??e.namespace),name:AF(e.tableName??e.table_name)})).filter(e=>e.name),r=t.hasMore||n.length>25,i=[];for(let{schema:t,name:r}of n.slice(0,25)){let n=(await e({query:`DESCRIBE TABLE ${t?`${t}.`:``}${r}`,limit:500})).rows.map(e=>({name:AF(e.col_name),type:AF(e.data_type)})).filter(e=>e.name&&!e.name.startsWith(`#`));i.push({schema:t,name:r,columns:n})}return NF(i,r)}async function IF(e,t){if(t.environment===`sandbox`)return{summary:`Schema exploration needs the real database connection — it's read-only and free. Switch to production (env:change@1) to explore the schema, then rehearse the pipeline in sandbox.`};if(!t.runQuery)return{summary:`Live schema exploration isn't available in this context.`};if(e===`databricks`)try{return await PF(t.runQuery)}catch{try{let e=await t.runQuery({query:EF,limit:500});return NF([...jF(e.rows).values()],e.hasMore)}catch{return FF(t.runQuery)}}let n=await t.runQuery({query:EF,limit:500});return NF([...jF(n.rows).values()],n.hasMore)}const LF=`rows:find:databricks@1`,RF=_(`db_rows_found_count`),zF=_(`db_found_rows`),BF=r.object({pipe_id:r.literal(LF),connector:C(),run_if:x(),config:r.object({query:Wl({label:`SQL query`,info:`A single read-only SELECT statement, resolved per row — use {{ field }} for input refs, {{ SECRETS.X }} / {{ CONSTANTS.X }} for secrets/constants. Do not add your own LIMIT for capping; use the row limit below.`,groupPath:`config.general`,sectionKey:`general`,path:`config.query`,rows:8,required:!0,maxLength:2e4}),limit:Eu({label:`Row limit`,info:`Maximum number of rows returned in the matching-rows output. The rows-found count is always the true total.`,groupPath:`config.advanced`,sectionKey:`general`,path:`config.limit`,min:1,max:50}),output_fields:P(r.object({[RF.name]:D({fieldName:RF.name}),[zF.name]:D({fieldName:zF.name})}))})}),VF={"rows-find-databricks-v1-databricks":{provider:`databricks`,allowManagedConnection:!1,mode:null,credits:null,note:`Querying your own Databricks SQL warehouse is free.`}},HF=class extends B{pipeId=LF;payload;payloadSchema=BF;billableOperations=VF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`databricks`]}estimateBillableOperations(e){return H(e,`rows-find-databricks-v1-databricks`)}getTemplatedFields(){return[this.payload.config.query]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[RF.name]:this.catalogOutput(RF),[zF.name]:this.catalogOutput(zF)}}getConnectionsRequirements(){return[{provider:`databricks`,rateLimitRatio:1,rateLimitOperation:`databricks_query`,allowManagedConnection:!1}]}async getAgentContext(e){return IF(`databricks`,e)}},UF=BF,WF={pipeId:LF,basePipe:U(LF),label:`Find rows in Databricks`,executionMode:`single`,categories:[`tools`],lifecycle:null,allowedUserConnectionProviders:[`databricks`],managedProviders:[],deprecatedProviders:[],description:`Look up rows in your own Databricks SQL warehouse with a read-only SQL query resolved per row. Outputs the total match count and the matching rows.`,guide:"Databricks SQL dialect; config.query must be a single read-only SELECT, resolved per row via Liquid — `{{ field }}` input refs, `{{ SECRETS.X }}` / `{{ CONSTANTS.X }}` supported. Resolved values are interpolated as text, so quote them in the SQL (WHERE email = '{{ email }}'). To discover the schema, draft a payload with a placeholder config.query like \"SELECT 1\" and the chosen connection in connector.connections, then call get_provider_context once — it returns the workspace-wide table/column map (all Unity catalogs) for free. Always reference tables by their FULLY QUALIFIED three-part name exactly as the map lists them (catalog.schema.table); a bare table name resolves against the warehouse's unpredictable current catalog and usually fails with TABLE_OR_VIEW_NOT_FOUND. Tables under the `samples` catalog (and other built-in demo schemas like `tpch`) are DEMO data, NOT the customer's own — never answer from them without confirming. READ-ONLY and idempotent — the gateway enforces single-statement SELECT validation. db_found_rows is capped by config.limit and a ~25KB size budget (rows are dropped from the end to fit); db_rows_found_count is always the TRUE total. When nothing matches, db_found_rows resolves to no_result (NOT an empty array) — db_rows_found_count (0) still completes, so condition on it to branch on absence. A field resolving to empty renders as an empty string in the SQL — guard with run_if if that must not match. Requires a databricks connection (list_connections).",docPath:W(LF),tags:[V.FIELDS,V.NEW],keywords:[`sql`,`query`,`lookup`,`warehouse`,`database`,`select`],billableOperations:VF,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:LF,connector:{strategy:`first`,connections:[]},run_if:null,config:{query:``,limit:10,output_fields:{db_rows_found_count:{alias:``,enabled:!1},db_found_rows:{alias:``,enabled:!0}}}}},GF=`rows:find:postgres@1`,KF=_(`db_rows_found_count`),qF=_(`db_found_rows`),JF=r.object({pipe_id:r.literal(GF),connector:C(),run_if:x(),config:r.object({query:Wl({label:`SQL query`,info:`A single read-only SELECT statement, resolved per row — use {{ field }} for input refs, {{ SECRETS.X }} / {{ CONSTANTS.X }} for secrets/constants. Do not add your own LIMIT for capping; use the row limit below.`,groupPath:`config.general`,sectionKey:`general`,path:`config.query`,rows:8,required:!0,maxLength:2e4}),limit:Eu({label:`Row limit`,info:`Maximum number of rows returned in the matching-rows output. The rows-found count is always the true total.`,groupPath:`config.advanced`,sectionKey:`general`,path:`config.limit`,min:1,max:50}),output_fields:P(r.object({[KF.name]:D({fieldName:KF.name}),[qF.name]:D({fieldName:qF.name})}))})}),YF={"rows-find-postgres-v1-postgres":{provider:`postgres`,allowManagedConnection:!1,mode:null,credits:null,note:`Querying your own PostgreSQL database is free.`}},XF=class extends B{pipeId=GF;payload;payloadSchema=JF;billableOperations=YF;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`postgres`]}estimateBillableOperations(e){return H(e,`rows-find-postgres-v1-postgres`)}getTemplatedFields(){return[this.payload.config.query]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[KF.name]:this.catalogOutput(KF),[qF.name]:this.catalogOutput(qF)}}getConnectionsRequirements(){return[{provider:`postgres`,rateLimitRatio:1,rateLimitOperation:`postgres_query`,allowManagedConnection:!1}]}async getAgentContext(e){return IF(`postgres`,e)}},ZF=JF,QF={pipeId:GF,basePipe:U(GF),label:`Find rows in Postgres`,executionMode:`single`,categories:[`tools`],lifecycle:null,allowedUserConnectionProviders:[`postgres`],managedProviders:[],deprecatedProviders:[],description:`Look up rows in your own PostgreSQL database with a read-only SQL query resolved per row. Outputs the total match count and the matching rows.`,guide:"PostgreSQL dialect; config.query must be a single read-only SELECT, resolved per row via Liquid — `{{ field }}` input refs, `{{ SECRETS.X }}` / `{{ CONSTANTS.X }}` supported. Resolved values are interpolated as text, so quote them in the SQL (WHERE email = '{{ email }}'). To discover the schema, draft a payload with a placeholder config.query like \"SELECT 1\" and the chosen connection in connector.connections, then call get_provider_context once — it returns the full table/column map for free. READ-ONLY and idempotent — the gateway enforces single-statement SELECT validation and a read-only transaction. db_found_rows is capped by config.limit and a ~25KB size budget (rows are dropped from the end to fit); db_rows_found_count is always the TRUE total. When nothing matches, db_found_rows resolves to no_result (NOT an empty array) — db_rows_found_count (0) still completes, so condition on it to branch on absence. A field resolving to empty renders as an empty string in the SQL — guard with run_if if that must not match. Requires a postgres connection (list_connections).",docPath:W(GF),tags:[V.FIELDS,V.NEW],keywords:[`sql`,`query`,`lookup`,`database`,`select`],billableOperations:YF,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:GF,connector:{strategy:`first`,connections:[]},run_if:null,config:{query:``,limit:10,output_fields:{db_rows_found_count:{alias:``,enabled:!1},db_found_rows:{alias:``,enabled:!0}}}}},$F=`rows:find:sheet@1`,eI=_(`sheet_rows_found_count`),tI=_(`sheet_found_rows`),nI=_(`sheet_found_row_ids`),rI=r.object({pipe_id:r.literal($F),connector:C(),run_if:x(),config:r.object({sheet:S({label:`Sheet ID`,info:"The sheet to search (its org-unique slug — NOT the display name). Type `@` to insert a field reference for a per-row sheet.",groupPath:`config.general`,sectionKey:`general`,inputType:`text`,path:`config.sheet`,minLength:3,expectedTagType:`string`,expectedTagFormat:`text`,optionsDef:HP}),where:Rl({label:`Match conditions`,info:"Conditions on the target sheet's columns. Column names are literal; in the value, type `/` to insert a field reference (e.g. `{{ email }}`).",groupPath:`config.general`,sectionKey:`general`,path:`config.where`,fieldNamePlaceholder:`email`,optionsDef:qP({sheetPath:`config.sheet`})}),limit:Eu({label:`Row limit`,info:`Maximum number of rows returned in the matching-rows output. The rows-found count is always the true total.`,groupPath:`config.advanced`,sectionKey:`general`,path:`config.limit`,min:1,max:100}),output_fields:P(r.object({[eI.name]:D({fieldName:eI.name}),[tI.name]:D({fieldName:tI.name}),[nI.name]:D({fieldName:nI.name})}))})}),iI={"rows-find-sheet-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},aI=class extends B{pipeId=$F;payload;payloadSchema=rI;billableOperations=iI;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`rows-find-sheet-v1-pipe0`)}getTemplatedFields(){return[this.payload.config.sheet,...(this.payload.config.where?.conditions??[]).map(e=>typeof e.value==`string`?e.value:null)]}getInputRequirement(){return ep(this.getTemplatedFields(),{expectedType:`string`})}getSecretRequirements(){return q(this.getTemplatedFields())}getConstantRequirements(){return tp(this.getTemplatedFields())}getRawOutputFields(){return{[eI.name]:this.catalogOutput(eI),[tI.name]:this.catalogOutput(tI),[nI.name]:this.catalogOutput(nI)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_api_operation`,allowManagedConnection:!0}]}},oI=rI,sI={pipeId:$F,basePipe:U($F),label:`Find rows in sheet`,executionMode:`single`,categories:[`tools`],lifecycle:null,allowedUserConnectionProviders:[`pipe0`],managedProviders:[],deprecatedProviders:[],description:`Look up rows in another pipe0 sheet matching a condition block (and/or over eq, neq, gt, gte, lt, lte, contains, matches). Outputs the total match count, the matching rows, and their record IDs.`,guide:'Find rows in another pipe0 sheet. config.sheet is the target sheet\'s org-unique slug (a literal or a `{{ field }}` tag). config.where is a condition block over the TARGET sheet\'s columns: `logic` "and"/"or" combines value conditions; each condition\'s field_name is a LITERAL column name (never templated, NOT validated against the target sheet — a wrong name behaves like a null cell), and its value may be a literal or contain `{{ field }}` tags resolved per row. Operators: eq/neq compare as text (a number cell 42 matches the value "42"; neq ALSO matches rows where the column is missing or null; JSON object/array cells effectively never match); gt/gte/lt/lte compare numerically (non-numeric cells never match; a non-numeric condition value fails the row); contains is case-INsensitive substring; matches is case-SENSITIVE regex (invalid pattern fails the row). A `null` value with eq matches missing/null cells. READ-ONLY and idempotent — one query per row, the target sheet is never modified. sheet_found_rows is capped by config.limit and a ~25KB size budget (rows are dropped from the end to fit); sheet_rows_found_count is always the TRUE total. When nothing matches, sheet_found_rows and sheet_found_row_ids resolve to no_result (NOT an empty array) — sheet_rows_found_count (0) still completes, so condition on it to branch on absence. String condition values that resolve to an empty string fail the row (a blank field must not match everything) — guard with run_if. Requires a pipe0 connection (list_connections).',docPath:W($F),tags:[V.FIELDS],keywords:[`lookup`,`query`,`search`,`match`,`filter`,`vlookup`],billableOperations:iI,defaultInputRequirement:null,inputFieldMode:`config`,outputFieldMode:`static`,defaultPayload:{pipe_id:$F,connector:{strategy:`first`,connections:[]},run_if:null,config:{sheet:``,where:null,limit:10,output_fields:{sheet_rows_found_count:{alias:``,enabled:!1},sheet_found_rows:{alias:``,enabled:!0},sheet_found_row_ids:{alias:``,enabled:!1}}}}},cI=`signals:personprofilematch@1`,lI=_(`person_profile_match`),uI=_(`signal_window_start`),dI=_(`signal_list`),fI=_(`signal_count`),pI={l30d:30,l90d:90,l180d:180,l365d:365},mI=r.object({pipe_id:r.literal(cI),run_if:x(),connector:Kl(),config:r.object({signals:Tu({label:`Signals`,info:`Signal types to emit. Empty = all.`,path:`config.signals`,groupPath:`config.general`,sectionKey:`general`,required:!1,disableSearch:!1,options:Fa.map(e=>({value:e,label:Va[e]}))}).default([]),default_window:Cu({label:`Default window`,info:`Scan window when the window-start input is unmapped or empty for the row. A mapped, non-empty window-start date overrides it per row.`,path:`config.default_window`,groupPath:`config.general`,sectionKey:`general`,required:!1,defaultValue:`l90d`,options:[{value:`l30d`,label:`Last 30 days`},{value:`l90d`,label:`Last 90 days`},{value:`l180d`,label:`Last 180 days`},{value:`l365d`,label:`Last 365 days`}]}),input_fields:F(r.object({[lI.name]:T({fieldName:lI.name}),[uI.name]:T({fieldName:uI.name})})),output_fields:P(r.object({[dI.name]:D({fieldName:dI.name}),[fI.name]:D({fieldName:fI.name})}))}).optional()}),hI=e=>z(R(G(lI,e)),_d(G(uI,e))),gI={"signals-personprofilematch-v1-pipe0":{provider:`pipe0`,allowManagedConnection:!0,credits:{default:0},mode:`always`}},_I=class extends B{pipeId=cI;payload;payloadSchema=mI;billableOperations=gI;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getInputRequirement(){return hI(this.payload.config)}getRawOutputFields(){return{[dI.name]:this.catalogOutput(dI,{isPrimaryOutput:!0}),[fI.name]:this.catalogOutput(fI)}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitRatio:1,rateLimitOperation:`pipe0_logic`,allowManagedConnection:!0}]}},vI=mI,yI={pipeId:cI,basePipe:U(cI),label:`Sales signals from profile`,executionMode:`single`,categories:[`people_data`],lifecycle:null,description:`Detect sales signals — job changes, promotions, role changes, work anniversaries, graduations — from a standardized person profile inside a per-row time window.`,guide:`Scans person_profile_match's employment/education history for moments in time inside (window_start, now]. The window: a mapped, non-empty signal_window_start date wins per row; otherwise config.default_window applies. Compute the per-row date from re-enrichment cadence with formula:run@1 (e.g. seniority -> days -> date) — NEVER from last_successfully_enriched_at: that bucket:countif output is restamped within the same cohort run before this pipe reads it, collapsing the window to zero. Every signal carries a stable signal_id ('sig_' + hash of person, from/to company, YYYY-MM, qualifier) — the same real-world event hashes identically across providers and re-scans, so overlapping windows re-emit but never fork identity. Canonical composition: row:expandappend:sheet@1 explodes signal_list into an append-only signals sheet (same project by default; a dedicated org-wide signals project when several systems feed one stream) with destination_field_name 'signal_match' and NO write_fields — the signals table is standardized to a SINGLE input column holding the payload, because the signal is self-contained (person_name, profile_url, company_domain, metadata all inside). There json:extract:multi@1 flattens whatever columns the consumer needs straight out of signal_match, and bucket:claim@1 on signal_id gates downstream delivery (CRM activity sync) exactly-once. This shape is identical for every signals:* producer, person- or company-scoped, so all of them append into the same table. config.signals narrows the emitted types (empty = all). Outputs are per-scan: signal_list (the JSON list) and signal_count as its condition-friendly flat mirror (0 when the scan found none — the cell always completes). Deterministic-local: runs for REAL in sandbox, FREE pipe0 operation.`,docPath:W(cI),tags:[V.LINKEDIN,V.LOGIC],keywords:[`job change`,`promotion`,`new role`,`trigger`,`moments`,`buying intent`,`champion tracking`,`boomerang`],billableOperations:gI,defaultInputRequirement:hI(null),inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:cI,run_if:null,connector:null,config:{signals:[],default_window:`l90d`,input_fields:{person_profile_match:{alias:``},signal_window_start:{alias:``}},output_fields:{signal_list:{alias:``,enabled:!0},signal_count:{alias:``,enabled:!0}}}}},bI=`template:fill@1`,xI=_(`template_output`),SI=r.object({pipe_id:r.literal(bI),connector:w(),run_if:x(),config:r.object({template:Wl({sectionKey:`general`,path:`config.template`,label:`Template`,placeholder:J(`template`),groupPath:`config.general`,required:!0}),output_fields:P(r.object({[xI.name]:D({fieldName:xI.name})}))})}),CI={"template-fill-v1-pipe0":{credits:{default:0},allowManagedConnection:!0,provider:`pipe0`,mode:`always`}},wI=class extends B{pipeId=bI;payload;payloadSchema=SI;billableOperations=CI;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`template-fill-v1-pipe0`)}getInputRequirement(){return ep([this.payload.config.template])}getSecretRequirements(){return q([this.payload.config.template])}getConstantRequirements(){return tp([this.payload.config.template])}getRawOutputFields(){return{[xI.name]:this.catalogOutput(xI)}}getConnectionsRequirements(){return[]}},TI=SI,EI={pipeId:bI,inputFieldMode:`config`,outputFieldMode:`config`,basePipe:U(bI),label:`Fill a text template`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Replaces template tags like {{ name }} with actual values.`,tags:[V.TEXT],keywords:[`merge`,`personalize`,`liquid`,`placeholder`,`variables`,`mail merge`],docPath:W(bI),defaultInputRequirement:null,billableOperations:CI,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],deprecatedProviders:[],defaultPayload:{pipe_id:bI,connector:null,run_if:null,config:{template:``,output_fields:{template_output:{alias:``,enabled:!0}}}}},DI=`website:extract:firecrawl@1`,OI=_(`website_url`),kI=_(`firecrawl_extract_result`),AI=r.object({pipe_id:r.literal(DI),connector:w(),run_if:x(),config:r.object({json_schema:Ou({sectionKey:`general`,groupPath:`config.extraction`,path:`config.json_schema`,label:`Output JSON schema`,info:`Specify the data you want to extract as a JSON schema.`,allowEmpty:!1}),extraction_prompt:Su({sectionKey:`general`,groupPath:`config.extraction`,path:`config.extraction_prompt`,label:`Extraction Prompt`,info:`Prompt the scraper on what it should extract. Template tags are not supported.`,rows:5,minLength:10,placeholder:`E.g. Extract the company missing and latest news.`}),enable_full_domain_crawl:yu({sectionKey:`general`,groupPath:`config.extraction`,defaultValue:!1,path:`config.enable_full_domain_crawl`,info:`If this option is enabled all URLs from this domain will be scraped.`,label:`Crawl full domain`}),enable_web_search:yu({sectionKey:`general`,groupPath:`config.extraction`,label:`Enable web search`,path:`enable_web_search`,defaultValue:!1,info:`When 'true', the extraction will follow links outside the specified domain.`}),input_fields:F(r.object({[OI.name]:T({fieldName:OI.name})})),output_fields:P(r.object({[kI.name]:D({fieldName:kI.name})}))})}),jI=e=>R(G(OI,e)),MI={"website-extract-firecrawl-v1-firecrawl":{allowManagedConnection:!0,provider:`firecrawl`,credits:{default:2,level1:{credits:1,weight:1}},mode:`onSuccess`}},NI=class extends B{pipeId=DI;payload;payloadSchema=AI;billableOperations=MI;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`firecrawl`]}estimateBillableOperations(e){return H(e,`website-extract-firecrawl-v1-firecrawl`)}getInputRequirement(){return jI(this.payload.config)}getRawOutputFields(){return{[kI.name]:this.catalogOutput(kI)}}getConnectionsRequirements(){return[{provider:`firecrawl`,rateLimitRatio:1,rateLimitOperation:`firecrawl_generic`,allowManagedConnection:!0}]}},PI=AI,FI={pipeId:DI,basePipe:U(DI),label:`Extract`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Perform advanced AI scraping to extract data from any website. Search all subdomains and combine scraped data with search results.`,tags:[V.SCRAPE],keywords:[`scrape`,`crawl`,`ai`,`structured data`,`json`,`web`],docPath:W(DI),billableOperations:MI,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`firecrawl`],managedProviders:[`firecrawl`],deprecatedProviders:[],defaultInputRequirement:jI(null),defaultPayload:{pipe_id:DI,run_if:null,connector:null,config:{json_schema:{type:`object`},enable_full_domain_crawl:!1,enable_web_search:!1,extraction_prompt:``,input_fields:{website_url:{alias:``}},output_fields:{firecrawl_extract_result:{alias:``,enabled:!0}}}}},II=`website:extract:parallel@1`,LI=_(`website_url`),RI=_(`parallel_extract_result`),zI=r.object({pipe_id:r.literal(II),connector:w(),run_if:x(),config:r.object({objective:Su({sectionKey:`general`,groupPath:`config.extraction`,path:`config.objective`,label:`Objective`,info:`Natural-language description of what to extract. Template tags are not supported.`,rows:5,minLength:10,placeholder:`E.g. When was the company founded and what does it do?`}),input_fields:F(r.object({[LI.name]:T({fieldName:LI.name})})),output_fields:P(r.object({[RI.name]:D({fieldName:RI.name})}))})}),BI=e=>R(G(LI,e)),VI={"website-extract-parallel-v1-parallel":{allowManagedConnection:!0,provider:`parallel`,credits:{default:.1},mode:`onSuccess`}},HI=class extends B{pipeId=II;payload;payloadSchema=zI;billableOperations=VI;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`parallel`]}estimateBillableOperations(e){return H(e,`website-extract-parallel-v1-parallel`)}getInputRequirement(){return BI(this.payload.config)}getRawOutputFields(){return{[RI.name]:this.catalogOutput(RI,{isPrimaryOutput:!0})}}getConnectionsRequirements(){return[{provider:`parallel`,rateLimitRatio:1,rateLimitOperation:`parallel_extract`,allowManagedConnection:!0}]}},UI=zI,WI={pipeId:II,basePipe:U(II),label:`Extract (Parallel)`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Extract relevant content from a website using Parallel's Extract API. Returns a flat list of results — page title, publish date and the excerpts most relevant to your objective.`,tags:[V.SCRAPE],keywords:[`scrape`,`crawl`,`content`,`web`,`research`],docPath:W(II),billableOperations:VI,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`parallel`],managedProviders:[`parallel`],deprecatedProviders:[],defaultInputRequirement:BI(null),defaultPayload:{pipe_id:II,run_if:null,connector:null,config:{objective:``,input_fields:{website_url:{alias:``}},output_fields:{parallel_extract_result:{alias:``,enabled:!0}}}}},GI=`website:maplinks:firecrawl@1`,KI={"website-maplinks-firecrawl-v1-firecrawl":{allowManagedConnection:!0,provider:`firecrawl`,credits:{default:1},mode:`onSuccess`}},qI=_(`website_url`),JI=_(`mapped_links`),YI=r.object({pipe_id:r.literal(GI),connector:w(),run_if:x(),config:r.object({page_limit:Eu({label:`Page limit`,info:`Number of pages searched`,groupPath:`config.general`,max:50,min:1,path:`config.page_limit`,sectionKey:`general`}).nullish(),sitemap:Cu({label:`Sitemap`,info:`Include sitemap links`,sectionKey:`general`,groupPath:`config.general`,path:`config.sitemap`,defaultValue:`include`,required:!1,options:[{value:`include`,label:`Include`},{value:`skip`,label:`Skip`},{value:`only`,label:`Only`}]}),search:xu({sectionKey:`general`,label:`Search`,inputType:`text`,info:`Return matching urls`,groupPath:`config.general`,path:`config.search`}).nullable().default(``),input_fields:F(r.object({[qI.name]:T({fieldName:qI.name})})),output_fields:P(r.object({[JI.name]:D({fieldName:JI.name})}))}).optional()}),XI=e=>R(G(qI,e)),ZI=class extends B{pipeId=GI;payload;payloadSchema=YI;billableOperations=KI;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`firecrawl`]}estimateBillableOperations(e){return H(e,`website-maplinks-firecrawl-v1-firecrawl`)}getInputRequirement(){return XI(this.payload.config)}getRawOutputFields(){return{[JI.name]:this.catalogOutput(JI)}}getConnectionsRequirements(){return[{provider:`firecrawl`,rateLimitRatio:1,rateLimitOperation:`firecrawl_map_requests`,allowManagedConnection:!0}]}},QI=YI,$I={pipeId:GI,basePipe:U(GI),label:`Map domain links`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Input a website and get all internal URLs on the website. Results do not include links to external pages.`,tags:[V.SCRAPE],keywords:[`sitemap`,`crawl`,`urls`,`pages`,`discover`,`internal`],docPath:W(GI),billableOperations:KI,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`firecrawl`],managedProviders:[`firecrawl`],deprecatedProviders:[],defaultInputRequirement:XI(null),defaultPayload:{pipe_id:GI,run_if:null,connector:null,config:{page_limit:25,sitemap:`include`,search:``,input_fields:{website_url:{alias:``}},output_fields:{mapped_links:{alias:``,enabled:!0}}}}},eL=`website:scrape:firecrawl@1`,tL=_(`website_url`),nL=_(`website_markdown`),rL=_(`website_html`),iL=_(`website_links`),aL=r.object({pipe_id:r.literal(eL),connector:w(),run_if:x(),config:r.object({scrape_main_only:yu({defaultValue:!1,label:`Scrape main content only?`,info:`If selected, content like headers, footers, and sidebars are excluded from the scrape results.`,sectionKey:`general`,groupPath:`config.general`,path:`config.scrape_main_only`}),input_fields:F(r.object({[tL.name]:T({fieldName:tL.name})})),output_fields:P(r.object({[nL.name]:D({fieldName:nL.name}),[rL.name]:D({fieldName:rL.name}),[iL.name]:D({fieldName:iL.name})}))}).optional()}),oL=e=>R(G(tL,e)),sL={"website-scrape-firecrawl-v1-firecrawl":{allowManagedConnection:!0,provider:`firecrawl`,credits:{default:.1,level1:{credits:.05,weight:1}},mode:`onSuccess`}},cL=class extends B{pipeId=eL;payload;payloadSchema=aL;billableOperations=sL;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`firecrawl`]}estimateBillableOperations(e){return H(e,`website-scrape-firecrawl-v1-firecrawl`)}getInputRequirement(){return oL(this.payload.config)}getRawOutputFields(){return{[nL.name]:this.catalogOutput(nL),[rL.name]:this.catalogOutput(rL),[iL.name]:this.catalogOutput(iL)}}getConnectionsRequirements(){return[{provider:`firecrawl`,rateLimitRatio:1,rateLimitOperation:`firecrawl_generic`,allowManagedConnection:!0}]}},lL=aL,uL={pipeId:eL,basePipe:U(eL),label:`Scrape`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Turn any URL into clean data.`,tags:[V.SCRAPE],keywords:[`crawl`,`html`,`markdown`,`content`,`web page`,`fetch`],docPath:W(eL),billableOperations:sL,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`firecrawl`],managedProviders:[`firecrawl`],deprecatedProviders:[],defaultInputRequirement:oL(null),defaultPayload:{pipe_id:eL,run_if:null,connector:null,config:{scrape_main_only:!0,input_fields:{website_url:{alias:``}},output_fields:{website_markdown:{alias:``,enabled:!0},website_html:{alias:``,enabled:!1},website_links:{alias:``,enabled:!1}}}}},dL=`website:scrapelist:firecrawl@1`,fL={"website-scrapelist-firecrawl-v1-firecrawl":{allowManagedConnection:!0,provider:`firecrawl`,credits:{default:.1,level1:{credits:.05,weight:1}},mode:`onSuccess`,note:`You are charged per url that is scraped.`}},pL=_(`urls`),mL=_(`scrape_list_response`),hL=r.object({pipe_id:r.literal(dL),connector:w(),run_if:x(),config:r.object({scrape_main_only:yu({label:`Scrape main content only?`,defaultValue:!1,info:`If selected headers, footers, and sidebars will be excluded from the results.`,sectionKey:`general`,groupPath:`config.general`,path:`config.scrape_main_only`}),formats:Tu({options:[{label:`Markdown`,value:`markdown`},{label:`HTML`,value:`html`},{label:`Links`,value:`links`}],disableSearch:!0,info:`Choose what you want to scrape from the website`,required:!1,label:`Formats`,sectionKey:`general`,groupPath:`config.general`,path:`config.formats`}).default([]),input_fields:F(r.object({[pL.name]:T({fieldName:pL.name})})),output_fields:P(r.object({[mL.name]:D({fieldName:mL.name})}))}).optional()}),gL=e=>R(G(pL,e)),_L=class extends B{pipeId=dL;payload;payloadSchema=hL;billableOperations=fL;constructor(e){super(),this.payload=this.validatePayload(e)}getProviderNames(){return[`firecrawl`]}estimateBillableOperations(e){return[{billableOperation:`website-scrapelist-firecrawl-v1-firecrawl`,quantity:e.count*5}]}getInputRequirement(){return gL(this.payload.config)}getRawOutputFields(){return{[mL.name]:this.catalogOutput(mL)}}getConnectionsRequirements(){return[{provider:`firecrawl`,rateLimitRatio:1,rateLimitOperation:`firecrawl_generic`,allowManagedConnection:!0}]}},vL=hL,yL={pipeId:dL,basePipe:U(dL),label:`Scrape list`,executionMode:`single`,categories:[`tools`],lifecycle:null,description:`Turn a list of URLs into clean scraped data.`,tags:[V.SCRAPE],keywords:[`crawl`,`html`,`markdown`,`content`,`batch`,`bulk`],docPath:W(dL),billableOperations:fL,inputFieldMode:`static`,outputFieldMode:`static`,allowedUserConnectionProviders:[`firecrawl`],managedProviders:[`firecrawl`],deprecatedProviders:[],defaultInputRequirement:gL(null),defaultPayload:{pipe_id:dL,run_if:null,connector:null,config:{scrape_main_only:!0,formats:[`html`,`markdown`,`links`],input_fields:{urls:{alias:``}},output_fields:{scrape_list_response:{alias:``,enabled:!0}}}}},bL=`companies:profiles:crustdata@1.companies:profiles:crustdata@2.companies:profiles:crustdata@3.companies:profiles:amplemarket@1.companies:profiles:amplemarket@2.people:profiles:crustdata@1.people:profiles:crustdata@2.people:profiles:crustdata@3.people:profiles:amplemarket@1.people:profiles:amplemarket@2.companies:entitysearch:parallel@1.people:entitysearch:parallel@1.people:eventguests:luma@1.people:channelmembers:slack@1.events:googlecalendar@1.sheet:rows@1.bucket:entries@1.query:postgres@1.query:databricks@1.posts:content:crustdata@1.contacts:hubspot@1.companies:hubspot@1.deals:hubspot@1.owners:hubspot@1.contacts:salesforce@1.leads:salesforce@1.accounts:salesforce@1.opportunities:salesforce@1.users:salesforce@1.query:salesforce@1.people:attio@1.companies:attio@1.deals:attio@1.records:attio@1.entries:attio@1.query:attio@1.users:attio@1`.split(`.`),xL=r.enum(bL);function SL(e,t){let n={name:e,config:t};return Ft.hashObject(n)}var Z=class{estimateBillableOperations(e){let{cost:t,billableOperation:n}=this.billing;return t.allowManagedConnection?[{billableOperation:n,quantity:t.mode===`per_result`?e.count:t.mode===`per_page`?e.count/100:1}]:[]}validatePayload(e){try{return this.schema.parse(e)}catch(e){throw e instanceof n?Error(JSON.stringify(r.prettifyError(e))):e}}catalogOutput(e){return{name:e.name,enabled:!!this.payload.config?.output_fields?.[e.name].enabled,type:e.type,format:e.format,resolvedName:this.payload.config?.output_fields?.[e.name]?.alias||e.name,description:e.description,jsonMeta:e.jsonMeta,label:e.label,isCatalogFIeld:!0,order:`order`in e?e.order:void 0}}getOutputFields(){let e={};for(let[t,n]of Object.entries(this.getRawOutputFields()))n.enabled&&(e[t]=n);return e}getStaticFieldDefinitions(){let e={};for(let t of Object.values(this.getOutputFields()))e[t.resolvedName]={type:t.type,label:t.label??null,format:t.format??null,json_metadata:null};return e}getDedupConfig(){return{match:`any`,fields:[]}}async getAgentContext(e){return null}getHashKey(){return SL(this.searchId,this.payload)}};function Q(e){return e.split(`@`)[0]}function $(e){return`/docs/search-catalog/${Q(e)}/${e.split(`@`)[1]}`}const CL=()=>ju({path:`config.custom_properties`,groupPath:`config.general`,sectionKey:`general`,label:`Custom fields`,placeholder:`Lead_Score__c`,info:"Field API names added to the record JSON under `custom_properties` — custom fields included; dotted parent paths like `Account.Industry` work (standard-set names are already top-level)."}),wL=e=>Au({path:`config.filters`,groupPath:`config.general`,sectionKey:`general`,label:`Field filters`,fieldNamePlaceholder:e,info:`Rows filter on any Salesforce field by API name — custom fields and dotted parent paths included. Picklist values are the org's API values (case-sensitive); date values accept ISO dates or SOQL literals like LAST_N_DAYS:30.`}),TL=e=>Uu({path:`config.list_view`,groupPath:`config.general`,sectionKey:`general`,label:`List view`,required:!1,info:`Run one of the org's own list views instead of filters — the view's conditions (including 'My …' scoping) apply server-side. Cannot be combined with filters or shortcuts.`,enabledIf:v(`salesforce`),optionsDef:Zd(e)}),EL=()=>Uu({path:`config.owner`,groupPath:`config.general`,sectionKey:`general`,label:`Owner`,required:!1,info:``,enabledIf:v(`salesforce`),optionsDef:Kd}),DL=[{label:`Any time`,value:``},{label:`Today`,value:`l24h`},{label:`Last 2 days`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}],OL=()=>Hu({required:!1,path:`config.created_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Created at`,description:``,options:DL}).default(``),kL=()=>Hu({required:!1,path:`config.modified_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Last modified`,description:``,options:DL}).default(``),AL=()=>N({path:`config.limit`,min:1,max:500,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Rows per page.`}).default(100),jL=()=>Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),ML=e=>t=>{let n=t.value;if(!Qd(n.list_view))return;let r=[];n.filters&&r.push(`filters`);for(let t of e){let e=n[t];if(!(e==null||e===``||e===!1)){if(typeof e==`object`&&!Array.isArray(e)){let t=e;if((t.include?.length??0)===0&&(t.exclude?.length??0)===0&&t.min==null&&t.max==null)continue}r.push(t)}}r.length>0&&t.issues.push({code:`custom`,input:n.list_view,message:`A list view already carries its own conditions — clear ${r.join(`, `)} or clear the list view.`,path:[`list_view`]})},NL=`accounts:salesforce@1`,PL=_(`salesforce_record_id`),FL=_(`company_name`),IL=_(`company_domain`),LL=_(`salesforce_account_match`),RL=r.object({search_id:r.literal(NL),connector:Jl(),config:r.object({custom_properties:CL(),filters:wL(`Industry`),list_view:TL(`Account`),domains:k({path:`config.domains`,groupPath:`config.general`,sectionKey:`general`,label:`Domains`,placeholder:`acme.com`,info:`Matches exact spellings of the Website URL (Salesforce has no domain field).`}),industry:Uu({path:`config.industry`,groupPath:`config.general`,sectionKey:`general`,label:`Industry`,required:!1,info:`The org's actual Industry picklist values.`,enabledIf:v(`salesforce`),optionsDef:Xd(`Account`,`Industry`)}),owner:EL(),created_within:OL(),modified_within:kL(),limit:AL(),cursor:jL(),output_fields:P(r.object({[PL.name]:A({fieldName:PL.name}),[FL.name]:A({fieldName:FL.name}),[IL.name]:A({fieldName:IL.name}),[LL.name]:A({fieldName:LL.name})}))}).check(e=>ML([`domains`,`industry`,`owner`,`created_within`,`modified_within`])(e))}),zL={allowManagedConnection:!1,mode:null,credits:null,info:`Salesforce searches are free — you bring your own Salesforce connection.`},BL=`accounts-salesforce-v1`,VL=class extends Z{billing={billableOperation:BL,cost:zL};searchId=NL;schema=RL;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[PL.name]:this.catalogOutput(PL),[FL.name]:this.catalogOutput(FL),[IL.name]:this.catalogOutput(IL),[LL.name]:this.catalogOutput(LL)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitOperation:`salesforce_api`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`salesforce_record_id`}]}}async getAgentContext(e){return ef(e,{objects:[`Account`],includeListViewsFor:[`Account`]})}},HL=RL,UL={searchId:NL,billableOperation:BL,baseSearch:Q(NL),outputFieldMode:`static`,paginationType:`cursor`,label:`Salesforce accounts`,categories:[`companies`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List accounts from your Salesforce org: identity columns (id, name, domain) plus a JSON record with the standard field set and any custom fields you pick. Filter with field conditions or run one of the org's own list views.`,tags:[V.WEBSITE,V.NEW],keywords:[`crm`,`sfdc`,`company`,`list`,`records`,`import`,`organization`],docPath:$(NL),guide:"Call get_provider_context first for the org's field API names and picklist values. The domain column is derived from the Website URL (Salesforce has no domain field) — accounts with exotic Website formats yield null. Person accounts (B2C orgs) appear as accounts here. To find stale accounts, filter on `LastActivityDate` (e.g. `LastActivityDate < LAST_N_DAYS:90` — closed tasks + events, not literal touches). `list_view` runs the org's own segmentation (XOR with filters/shortcuts). Results page by record id; rows the connected user cannot see are silently absent.",cost:zL,provider:`salesforce`,defaultPayload:{search_id:NL,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,list_view:``,domains:{include:[],exclude:[]},industry:``,owner:``,created_within:``,modified_within:``,limit:100,cursor:``,output_fields:{salesforce_record_id:{enabled:!0,alias:``},company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},salesforce_account_match:{enabled:!0,alias:``}}}}},WL=`bucket:entries@1`,GL=r.object({search_id:r.literal(WL),connector:Jl(),config:r.object({bucket:Bu({path:`config.bucket`,groupPath:`config.general`,inputType:`text`,label:`Bucket`,sectionKey:`general`,description:`The bucket's org-unique slug. Its entries (one row each) are returned.`}),limit:N({path:`config.limit`,min:1,max:2e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of entries per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),include_metadata:Ru({path:`config.include_metadata`,groupPath:`config.general`,sectionKey:`general`,label:`Include metadata`,description:`Provenance (source sheet/row/run) and expiry as extra columns.`,defaultValue:!1})})}),KL={allowManagedConnection:!0,mode:`per_search`,credits:{default:0},info:`Reading your own bucket is free.`},qL=`bucket-entries-v1-pipe0`,JL=class extends Z{billing={billableOperation:qL,cost:KL};searchId=WL;schema=GL;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitOperation:`pipe0_api_operation`,rateLimitRatio:1,allowManagedConnection:!0}]}},YL=GL,XL={searchId:WL,billableOperation:qL,baseSearch:Q(WL),outputFieldMode:`dynamic`,paginationType:`cursor`,label:`Read bucket entries`,categories:[`data`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`List the entries in a bucket — one row per entry, with its identifying field values (and counter number / expiry).`,tags:[V.FIELDS,V.NEW],keywords:[`claims`,`counter`,`suppression`,`list`,`lookup`,`rows`],docPath:$(WL),cost:KL,provider:`pipe0`,defaultPayload:{search_id:WL,connector:{strategy:`first`,connections:[]},config:{bucket:``,limit:100,cursor:``,include_metadata:!1}}},ZL=()=>N({path:`config.limit`,min:1,max:500,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Rows per page`}).default(100),QL=()=>N({path:`config.page_number`,min:1,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page`,description:`1-based page index (offset pagination; Attio reports no total count)`}).nullable().default(1),$L=(e,t)=>ju({path:`config.custom_properties`,groupPath:`config.general`,sectionKey:`general`,label:`Custom attributes`,placeholder:e,info:`Added to the record JSON alongside the standard set — attribute api_slugs, custom attributes included.`,optionsDef:t}),eR=e=>Au({path:`config.filters`,groupPath:`config.general`,sectionKey:`general`,label:`Attribute filters`,fieldNamePlaceholder:e,info:"Rows filter on any Attio attribute by api_slug — custom attributes included; target value sub-properties as `slug.sub_property` (e.g. `domains.root_domain`). Select/status values are workspace-defined TITLES and support equality only. Operator support varies PER ATTRIBUTE TYPE and is enforced by Attio, not this schema (a 400 names the allowed set) — $eq works everywhere; prefer it unless you know the attribute accepts more."}),tR=e=>Uu({path:`config.saved_view`,groupPath:`config.general`,sectionKey:`general`,label:`Saved view`,required:!1,info:`Filter with one of this workspace's saved Attio views instead of the fields above — views and filters are mutually exclusive.`,optionsDef:e}),nR=()=>Hu({required:!1,path:`config.created_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Created at`,description:``,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``);function rR(e,t){let n=e.value,r=Array.isArray(n.saved_view)?n.saved_view[0]:n.saved_view;if(!r)return;let i=[];(n.filters?.conditions?.length??0)>0&&i.push(`filters`);for(let e of t){let t=n[e];(Array.isArray(t)?t.length>0:typeof t==`object`&&t?Object.values(t).some(e=>Array.isArray(e)?e.length>0:!!e):t)&&i.push(e)}i.length>0&&e.issues.push({code:`custom`,input:r,path:[`saved_view`],message:`A saved view replaces the filter fields — clear ${i.join(`, `)} or clear the saved view (Attio rejects the combination).`})}const iR=`companies:attio@1`,aR=_(`attio_record_id`),oR=_(`company_name`),sR=_(`company_domain`),cR=_(`attio_company_match`),lR=r.object({search_id:r.literal(iR),connector:Jl(),config:r.object({custom_properties:$L(`categories`,kf({target:`objects`,identifier:`companies`})),filters:eR(`categories`),domains:k({path:`config.domains`,groupPath:`config.general`,sectionKey:`general`,label:`Domains`,placeholder:`acme.com`}),domain_match:Hu({required:!1,path:`config.domain_match`,groupPath:`config.general`,sectionKey:`general`,label:`Domain matching`,description:`Exact domain values are unique per company; root domain also matches subdomain records (app.acme.com).`,options:[{label:`Exact domain`,value:`domain`},{label:`Root domain`,value:`root_domain`}]}).default(`domain`),saved_view:tR(Tf({target:`objects`,identifier:`companies`})),created_within:nR(),limit:ZL(),page_number:QL(),output_fields:P(r.object({[aR.name]:A({fieldName:aR.name}),[oR.name]:A({fieldName:oR.name}),[sR.name]:A({fieldName:sR.name}),[cR.name]:A({fieldName:cR.name})}))}).check(e=>rR(e,[`domains`,`created_within`]))}),uR={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own Attio workspace is free.`},dR=`companies-attio-v1`,fR=class extends Z{billing={billableOperation:dR,cost:uR};searchId=iR;schema=lR;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[aR.name]:this.catalogOutput(aR),[oR.name]:this.catalogOutput(oR),[sR.name]:this.catalogOutput(sR),[cR.name]:this.catalogOutput(cR)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_query`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`attio_record_id`}]}}async getAgentContext(e){return jf(e,{objects:[`companies`],includeViewsFor:[`companies`]})}},pR=lR,mR={searchId:iR,billableOperation:dR,baseSearch:Q(iR),outputFieldMode:`static`,paginationType:`page_number`,label:`Attio companies`,categories:[`companies`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List companies from your Attio workspace: identity columns (id, name, domain) plus a JSON record with the standard attribute set and any custom attributes you pick.`,tags:[V.NEW],keywords:[`crm`,`list`,`records`,`import`,`account`,`workspace`],docPath:$(iR),guide:`Call get_provider_context first for this workspace's attribute slugs and enumeration titles — use api_slugs verbatim. Standard attributes become typed columns; everything else rides in the company JSON — expand it or chain json:extract downstream. The domains shortcut matches exact domains by default (unique per company) or root domains (subdomains too); a saved view replaces the filter fields entirely. For staleness, filter or sort on last_interaction (targets its interacted_at timestamp) — Attio's read-only communication-intelligence signal, auto-populated from members' synced email/calendar. Attio reports no total count — page until a short page.`,cost:uR,provider:`attio`,defaultPayload:{search_id:iR,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,domains:{include:[],exclude:[]},domain_match:`domain`,saved_view:``,created_within:``,limit:100,page_number:1,output_fields:{attio_record_id:{enabled:!0,alias:``},company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},attio_company_match:{enabled:!0,alias:``}}}}},hR=`companies:entitysearch:parallel@1`,gR=_(`company_name`),_R=_(`company_domain`),vR=_(`company_description`),yR=_(`company_profile_url`),bR=_(`parallel_company_entity_match`),xR=r.object({search_id:r.literal(hR),connector:Yl(),config:r.object({objective:Vu({path:`config.objective`,sectionKey:`general`,groupPath:`config.general`,label:`Objective`,rows:4,minLength:10,placeholder:`AI startups in Europe that raised a Series A in 2024`,description:`Plain-text natural-language description of the companies to find.`}),limit:N({path:`config.limit`,min:5,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of entities to return (5–1000).`}).default(100),output_fields:P(r.object({[gR.name]:A({fieldName:gR.name}),[_R.name]:A({fieldName:_R.name}),[vR.name]:A({fieldName:vR.name}),[yR.name]:A({fieldName:yR.name}),[bR.name]:A({fieldName:bR.name})}))})}),SR={match:`any`,fields:[{fieldName:`company_profile_url`}]},CR={allowManagedConnection:!0,mode:`per_page`,credits:{default:.5},info:`1 page = 100 results; billed per 100 results returned (e.g. 100 results = 1 page, 1,000 results = 10 pages). A search returns up to your selected limit in a single request.`},wR=`companies-entitysearch-parallel-v1`,TR=class extends Z{billing={billableOperation:wR,cost:CR};searchId=hR;schema=xR;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[gR.name]:this.catalogOutput(gR),[_R.name]:this.catalogOutput(_R),[vR.name]:this.catalogOutput(vR),[yR.name]:this.catalogOutput(yR),[bR.name]:this.catalogOutput(bR)}}getConnectionsRequirements(){return[{provider:`parallel`,rateLimitOperation:`parallel_entity_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return SR}},ER=xR,DR={searchId:hR,billableOperation:wR,baseSearch:Q(hR),label:`Company search (AI)`,categories:[`companies`],paginationType:`page_number`,hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Natural-language company search powered by Parallel Entity Search — for asks static filters can't express.`,tags:[V.COMPANY_PROFILES],keywords:[`find companies`,`accounts`,`prospect`,`natural language`,`organizations`],docPath:$(hR),guide:`Best for asks the static filters of the amplemarket or crustdata company searches can't express — check their schemas first. Returns sparse records (identity basics plus a match rationale) that need further enrichment, where the filter-based datasets return full profiles. When filters get close, prefer a broad filter-based search narrowed by enrichment + row filtering over a natural-language objective.`,cost:CR,provider:`parallel`,defaultPayload:{search_id:hR,connector:null,config:{objective:``,limit:100,output_fields:{company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},company_description:{enabled:!0,alias:``},company_profile_url:{enabled:!0,alias:``},parallel_company_entity_match:{enabled:!1,alias:``}}}}},OR=`companies:hubspot@1`,kR=_(`hubspot_object_id`),AR=_(`company_name`),jR=_(`company_domain`),MR=_(`hubspot_company_match`),NR=r.object({search_id:r.literal(OR),connector:Jl(),config:r.object({query:Bu({path:`config.query`,groupPath:`config.general`,inputType:`text`,label:`Search text`,sectionKey:`general`,info:`Free-text search over HubSpot's default searchable company properties (name, domain, website, phone).`}).nullable(),custom_properties:ju({path:`config.custom_properties`,groupPath:`config.general`,sectionKey:`general`,label:`Custom properties`,placeholder:`account_tier`,info:"Added to the company JSON under `custom_properties` — internal names, custom properties included (standard-set names are already top-level)."}),filters:Au({path:`config.filters`,groupPath:`config.general`,sectionKey:`general`,label:`Property filters`,fieldNamePlaceholder:`industry`,info:`Rows filter on any HubSpot property by internal name — including custom properties. Enumeration values are the portal's internal option values (case-sensitive).`}),domains:k({path:`config.domains`,groupPath:`config.general`,sectionKey:`general`,label:`Domains`,placeholder:`acme.com`}),owner:Uu({path:`config.owner`,groupPath:`config.general`,sectionKey:`general`,label:`Owner`,required:!1,info:``,enabledIf:v(`hubspot`),optionsDef:up}),created_within:Hu({required:!1,path:`config.created_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Created at`,description:``,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``),modified_within:Hu({required:!1,path:`config.modified_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Last modified`,description:``,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``),limit:N({path:`config.limit`,min:1,max:200,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Rows per page (HubSpot search caps pages at 200 and total results at 10,000).`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[kR.name]:A({fieldName:kR.name}),[AR.name]:A({fieldName:AR.name}),[jR.name]:A({fieldName:jR.name}),[MR.name]:A({fieldName:MR.name})}))})}),PR={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own HubSpot portal is free.`},FR=`companies-hubspot-v1`,IR=class extends Z{billing={billableOperation:FR,cost:PR};searchId=OR;schema=NR;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[kR.name]:this.catalogOutput(kR),[AR.name]:this.catalogOutput(AR),[jR.name]:this.catalogOutput(jR),[MR.name]:this.catalogOutput(MR)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitOperation:`hubspot_crm_search`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`hubspot_object_id`}]}}async getAgentContext(e){return pp(e,{objectTypes:[[`companies`,`0-2`]]})}},LR=NR,RR={searchId:OR,billableOperation:FR,baseSearch:Q(OR),outputFieldMode:`static`,paginationType:`cursor`,label:`HubSpot companies`,categories:[`companies`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List companies from your HubSpot portal: identity columns (id, name, domain) plus a JSON record with the standard property set and any custom properties you pick.`,tags:[V.WEBSITE,V.NEW],keywords:[`crm`,`lookup`,`list`,`records`,`import`,`account`],docPath:$(OR),guide:"Call get_provider_context first for this portal's property names and enumeration option values — use internal names verbatim. Domain include/exclude matches the primary `domain` property (lowercased). Newly created records lag search indexing by a few moments; archived records never appear. Total results cap at 10,000 per query.",cost:PR,provider:`hubspot`,defaultPayload:{search_id:OR,connector:{strategy:`first`,connections:[]},config:{query:``,custom_properties:[],filters:null,domains:{include:[],exclude:[]},owner:``,created_within:``,modified_within:``,limit:100,cursor:``,output_fields:{hubspot_object_id:{enabled:!0,alias:``},company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},hubspot_company_match:{enabled:!0,alias:``}}}}};function zR(e){let t=!0,n=e=>{if(t!==!1&&typeof e==`object`&&e){Array.isArray(e)&&e.length>0&&(t=!1);for(let r of Object.values(e))typeof r!=`object`&&r!=null&&r!==``&&(t=!1),typeof r==`object`&&r&&n(r)}};return n(e),t}const BR=`companies:profiles:amplemarket@2`,VR=_(`company_name`),HR=_(`company_domain`),UR=_(`company_description`),WR=_(`company_profile_url`),GR=_(`amplemarket_company_match`),KR=r.object({search_id:r.literal(BR),connector:Yl(),config:r.object({limit:N({label:`Limit`,description:`Max number of search results`,path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`}).default(100),page_number:N({path:`config.page_number`,groupPath:`config.pagination`,label:`Page number`,min:1,sectionKey:`pagination`,description:``}).nullish(),output_fields:P(r.object({[VR.name]:A({fieldName:VR.name}),[HR.name]:A({fieldName:HR.name}),[UR.name]:A({fieldName:UR.name}),[WR.name]:A({fieldName:WR.name}),[GR.name]:A({fieldName:GR.name})})),filters:r.object({hq_locations:M({path:`config.filters.hq_locations`,sectionKey:`config.filters`,label:`HQ locations`,description:``,placeholder:J(`location`),groupPath:`config.filters.location`,optionsDef:g(`locations`)}).default({include:[],exclude:[]}),company_names:k({sectionKey:`config.filters`,path:`config.filters.company_names`,label:`Company names`,description:``,placeholder:J(`company_name`),groupPath:`config.filters.categories`,suggestionsDef:g(`company_names`)}).default({include:[],exclude:[]}),company_domains:k({sectionKey:`config.filters`,path:`config.filters.company_domains`,label:`Company domains`,description:``,placeholder:J(`company_domain`),groupPath:`config.filters.categories`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),company_profile_urls:k({sectionKey:`config.filters`,path:`config.filters.company_profile_urls`,label:`Company LinkedIn URLs`,description:``,groupPath:`config.filters.categories`}).default({include:[],exclude:[]}),company_types:j({sectionKey:`config.filters`,path:`config.filters.company_types`,disableSearch:!1,label:`Company Type`,description:``,groupPath:`config.filters.categories`,options:h(`amplemarket.company_types`),required:!1}).default([]),investors:Wu({sectionKey:`config.filters`,path:`config.filters.investors`,label:`Investor names`,optionsDef:g(`company.crunchbase_investors.crustdata`),description:`A list of company investor names`,placeholder:J(`investor`),groupPath:`config.filters.investors`,disableSearch:!1,required:!1}).default([]),company_industries:Pu({sectionKey:`config.filters`,path:`config.filters.company_industries`,optionsDef:We(`amplemarket.industries`),disableSearch:!1,label:`Industries`,description:``,placeholder:J(`industry`),groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),customer_types:j({sectionKey:`config.filters`,path:`config.filters.customer_types`,options:[{value:`b2b`,label:`B2B`},{value:`b2c`,label:`B2C`}],required:!1,disableSearch:!0,label:`Customer Types`,description:``,groupPath:`config.filters.industry`}).default([]),keywords:k({sectionKey:`config.filters`,path:`config.filters.keywords`,label:`Keywords`,description:``,groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),revenue_groups:j({path:`config.filters.revenue_groups`,sectionKey:`config.filters`,label:`Revenue groups`,description:``,disableSearch:!0,options:h(`amplemarket.company_revenue`),required:!1,groupPath:`config.filters.financials`}).default([]),founded_year:Nu({path:`config.filters.founded_year`,sectionKey:`config.filters`,label:`Founded year`,groupPath:`config.filters.general`,min:0,max:2040,description:``}).default({min:null,max:null}),open_position_titles:O({path:`config.filters.open_position_titles`,sectionKey:`config.filters`,label:`Job openings for titles`,groupPath:`config.filters.job_openings`,description:``,placeholder:J(`title`),suggestionsDef:g(`titles`)}),headcount:j({sectionKey:`config.filters`,path:`config.filters.headcount`,disableSearch:!1,options:h(`amplemarket.company_size`),label:`Company sizes`,required:!1,description:``,groupPath:`config.filters.company_size`}).default([]),headcount_growth_l6m_in_percent:Nu({path:`config.filters.headcount_growth_l6m_in_percent`,sectionKey:`config.filters`,label:`Headcount growth over last 6 months (in %)`,groupPath:`config.filters.company_size`,description:``,max:1e4,min:0}).default({min:null,max:null})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),qR={match:`any`,fields:[{fieldName:`company_profile_url`}]},JR={allowManagedConnection:!0,mode:`per_page`,credits:{default:2}},YR=`companies-profiles-amplemarket-v2`,XR=class extends Z{billing={billableOperation:YR,cost:JR};searchId=BR;schema=KR;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[VR.name]:this.catalogOutput(VR),[HR.name]:this.catalogOutput(HR),[UR.name]:this.catalogOutput(UR),[WR.name]:this.catalogOutput(WR),[GR.name]:this.catalogOutput(GR)}}getConnectionsRequirements(){return[{provider:`amplemarket`,rateLimitOperation:`amplemarket_company_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return qR}},ZR=KR,QR={searchId:BR,billableOperation:YR,baseSearch:Q(`companies:profiles:amplemarket@2`),label:`Company search`,categories:[`companies`],paginationType:`page_number`,hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Filter-based company search on Amplemarket's dataset — precise firmographic filters.`,tags:[V.COMPANY_PROFILES],keywords:[`accounts`,`prospect`,`find companies`,`organizations`,`firmographic`],docPath:$(BR),guide:`The most precise of the three prospecting datasets — prefer it when its filters express the ask exactly. If a needed criterion is missing here, check the crustdata search's wider filter set before falling back to the natural-language parallel search.`,cost:JR,provider:`amplemarket`,defaultPayload:{search_id:BR,connector:null,config:{limit:100,page_number:1,output_fields:{company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},company_description:{enabled:!0,alias:``},company_profile_url:{enabled:!0,alias:``},amplemarket_company_match:{enabled:!0,alias:``}},filters:{company_industries:{include:[],exclude:[]},company_names:{include:[],exclude:[]},company_profile_urls:{include:[],exclude:[]},company_types:[],company_domains:{include:[],exclude:[]},customer_types:[],headcount_growth_l6m_in_percent:{min:null,max:null},founded_year:{min:null,max:null},revenue_groups:[],investors:[],keywords:{include:[],exclude:[]},open_position_titles:[],headcount:[],hq_locations:{include:[],exclude:[]}}}}},$R=`companies:profiles:crustdata@3`,ez=[{label:`Any time`,value:``},{label:`Last month`,value:`l1m`},{label:`Last 3 months`,value:`l3m`},{label:`Last 6 months`,value:`l6m`},{label:`Last 12 months`,value:`l12m`},{label:`Last 2 years`,value:`l24m`}],tz=[{label:`Any time`,value:``},{label:`Last 12 months`,value:`l12m`},{label:`Last 2 years`,value:`l24m`},{label:`Last 5 years`,value:`l60m`}],nz=_(`company_name`),rz=_(`company_domain`),iz=_(`company_profile_url`),az=_(`crustdata_company_match_v2`),oz=r.object({search_id:r.literal($R),connector:Yl(),config:r.object({limit:N({path:`config.limit`,min:1,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page size`,description:`Max number of search results per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[nz.name]:A({fieldName:nz.name}),[rz.name]:A({fieldName:rz.name}),[iz.name]:A({fieldName:iz.name}),[az.name]:A({fieldName:az.name})})),filters:r.object({company_names:k({path:`config.filters.company_names`,sectionKey:`config.filters`,label:`Company name`,description:``,placeholder:J(`company_name`),maxItems:1e3,groupPath:`config.filters.company`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),company_domains:k({path:`config.filters.company_domains`,sectionKey:`config.filters`,label:`Company domain`,description:``,placeholder:J(`company_domain`),maxItems:1e3,groupPath:`config.filters.company`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),company_profile_urls:k({path:`config.filters.company_profile_urls`,sectionKey:`config.filters`,label:`Company LinkedIn URL`,description:``,placeholder:`https://linkedin.com/company/...`,maxItems:1e3,groupPath:`config.filters.company`}).default({include:[],exclude:[]}),company_types:j({path:`config.filters.company_types`,sectionKey:`config.filters`,label:`Company type`,description:``,placeholder:`Public, Private, ...`,disableSearch:!0,required:!1,options:h(`crustdata2.company_types`),groupPath:`config.filters.company`}).default([]),year_founded:Iu({path:`config.filters.year_founded`,sectionKey:`config.filters`,label:`Year founded`,description:``,legend:`e.g. 2018 - 2024`,min:1e3,max:2100,groupPath:`config.filters.company`}),hq_locations:Wu({path:`config.filters.hq_locations`,sectionKey:`config.filters`,label:`HQ location`,description:``,disableSearch:!1,placeholder:J(`location`),required:!1,groupPath:`config.filters.location`,optionsDef:g(`locations`)}).default([]),hq_countries:Pu({path:`config.filters.hq_countries`,sectionKey:`config.filters`,label:`HQ country`,description:``,placeholder:`United States, Germany, ...`,optionsDef:We(`crustdata2.countries`),groupPath:`config.filters.location`}).default({include:[],exclude:[]}),industries:M({path:`config.filters.industries`,sectionKey:`config.filters`,label:`Industry`,description:``,placeholder:J(`industry`),groupPath:`config.filters.industry`,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),categories:M({path:`config.filters.categories`,sectionKey:`config.filters`,label:`Category`,description:``,placeholder:`Artificial Intelligence (AI), SaaS, ...`,groupPath:`config.filters.industry`,optionsDef:g(`company.categories.crustdata`)}).default({include:[],exclude:[]}),specialities_keywords:k({path:`config.filters.specialities_keywords`,sectionKey:`config.filters`,label:`Specialities contain keywords`,description:`Matches the speciality tags a company lists on its profile. Includes match fuzzily; excludes remove exact tags only.`,placeholder:`CRM, Machine Learning, ...`,maxItems:100,groupPath:`config.filters.industry`,suggestionsDef:g(`company.specialities.crustdata`)}).default({include:[],exclude:[]}),headcount_brackets:j({path:`config.filters.headcount_brackets`,sectionKey:`config.filters`,label:`Headcount`,description:``,placeholder:`1-10`,disableSearch:!0,required:!1,options:h(`crustdata.company_size`),groupPath:`config.filters.company_size`}).default([]),engineering_headcount_brackets:j({path:`config.filters.engineering_headcount_brackets`,sectionKey:`config.filters`,label:`Engineering team size`,description:``,placeholder:`11-50`,disableSearch:!0,required:!1,options:h(`crustdata2.function_headcount`),groupPath:`config.filters.company_size`}).default([]),sales_headcount_brackets:j({path:`config.filters.sales_headcount_brackets`,sectionKey:`config.filters`,label:`Sales team size`,description:``,placeholder:`11-50`,disableSearch:!0,required:!1,options:h(`crustdata2.function_headcount`),groupPath:`config.filters.company_size`}).default([]),headcount_growth_l6m_in_percent:Iu({path:`config.filters.headcount_growth_l6m_in_percent`,sectionKey:`config.filters`,label:`Headcount growth over last 6 months in percent`,description:`Negative values match shrinking companies.`,legend:`e.g. 15 - 200`,min:-100,max:1e5,groupPath:`config.filters.company_size`}),revenue_in_usd:Iu({path:`config.filters.revenue_in_usd`,sectionKey:`config.filters`,label:`Estimated annual revenue (USD)`,description:``,legend:`1k - 10B`,min:1e3,max:1e10,groupPath:`config.filters.financials`}),last_funding_round_types:j({path:`config.filters.last_funding_round_types`,sectionKey:`config.filters`,label:`Last funding round`,description:``,placeholder:`Series A`,disableSearch:!0,required:!1,options:h(`crustdata.last_funding_round_type`),groupPath:`config.filters.financials`}).default([]),last_funding_within:Hu({path:`config.filters.last_funding_within`,sectionKey:`config.filters`,label:`Last funding raised within`,description:`Only companies whose latest funding round closed within this time window.`,placeholder:`Last month, last year, ...`,options:ez,required:!1,defaultValue:``,groupPath:`config.filters.financials`}).default(``),last_funding_amount_in_usd:Iu({path:`config.filters.last_funding_amount_in_usd`,sectionKey:`config.filters`,label:`Last funding amount (USD)`,description:``,legend:`1k - 10B`,min:1e3,max:1e10,groupPath:`config.filters.financials`}),total_funding_amount_in_usd:Iu({path:`config.filters.total_funding_amount_in_usd`,sectionKey:`config.filters`,label:`Total funding (USD)`,description:``,legend:`1k - 10B`,min:1e3,max:1e10,groupPath:`config.filters.financials`}),investors:k({path:`config.filters.investors`,sectionKey:`config.filters`,label:`Investors`,description:`Investor names as Crustdata records them, e.g. "Sequoia Capital".`,placeholder:J(`investor`),maxItems:1e3,groupPath:`config.filters.financials`,suggestionsDef:g(`company.crunchbase_investors.crustdata`)}).default({include:[],exclude:[]}),is_acquired:zu({path:`config.filters.is_acquired`,sectionKey:`config.filters`,label:`Acquired`,description:``,defaultValue:null,groupPath:`config.filters.status`}),ipo_within:Hu({path:`config.filters.ipo_within`,sectionKey:`config.filters`,label:`IPO within`,description:`Only companies that went public within this time window.`,placeholder:`Last year, last 5 years, ...`,options:tz,required:!1,defaultValue:``,groupPath:`config.filters.status`}).default(``),markets:Pu({path:`config.filters.markets`,sectionKey:`config.filters`,label:`Stock market`,description:``,placeholder:`NASDAQ, NYSE, ...`,optionsDef:We(`crustdata2.markets`),groupPath:`config.filters.status`}).default({include:[],exclude:[]}),follower_count_brackets:j({path:`config.filters.follower_count_brackets`,sectionKey:`config.filters`,label:`Number of LinkedIn followers`,description:``,placeholder:`1-500`,disableSearch:!0,required:!1,options:h(`crustdata.company_followers`),groupPath:`config.filters.web_presence`}).default([]),follower_growth_l6m_in_percent:Iu({path:`config.filters.follower_growth_l6m_in_percent`,sectionKey:`config.filters`,label:`LinkedIn follower growth over last 6 months in percent`,description:`Negative values match shrinking audiences.`,legend:`e.g. 20 - 500`,min:-100,max:1e5,groupPath:`config.filters.web_presence`}),technologies:M({path:`config.filters.technologies`,sectionKey:`config.filters`,label:`Technologies used`,description:`Technologies detected on the company's web presence and job postings.`,placeholder:`Salesforce, Cloudflare, ...`,groupPath:`config.filters.technology`,optionsDef:g(`company.technologies.crustdata`)}).default({include:[],exclude:[]}),competitor_domains:O({path:`config.filters.competitor_domains`,sectionKey:`config.filters`,label:`Competitor domain`,description:`Companies Crustdata tracks as competitors of the given domains.`,placeholder:J(`company_domain`),maxItems:100,groupPath:`config.filters.competitors`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),sz={match:`any`,fields:[{fieldName:`company_profile_url`}]},cz={allowManagedConnection:!0,mode:`per_result`,credits:{default:.15,level1:{credits:.07,weight:10}},info:`1 page = 100 records; 200 results = 2 pages`},lz=`companies-profiles-crustdata-v3`,uz=class extends Z{billing={billableOperation:lz,cost:cz};searchId=$R;schema=oz;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[nz.name]:this.catalogOutput(nz),[rz.name]:this.catalogOutput(rz),[iz.name]:this.catalogOutput(iz),[az.name]:this.catalogOutput(az)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_company_db_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return sz}},dz=oz,fz={searchId:$R,billableOperation:lz,baseSearch:Q(`companies:profiles:crustdata@2`),paginationType:`cursor`,label:`Company search`,categories:[`companies`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Filter-based company search on Crustdata's dataset — widest filter surface: funding, investors, growth, team composition, technology signals.`,tags:[V.COMPANY_PROFILES],keywords:[`accounts`,`prospect`,`find companies`,`organizations`,`firmographic`,`linkedin`],docPath:$($R),guide:`The general-purpose default among the prospecting datasets, with the widest filter surface (funding, investors, growth, team composition, technology signals). When a criterion isn't an exact filter match, search broadly here and narrow afterwards — enrich the qualifying signal, then filter rows — rather than switching to the natural-language parallel search.`,cost:cz,provider:`crustdata`,defaultPayload:{search_id:$R,connector:null,config:{limit:100,cursor:``,output_fields:{company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},company_profile_url:{enabled:!0,alias:``},crustdata_company_match_v2:{enabled:!0,alias:``}},filters:{company_names:{include:[],exclude:[]},company_domains:{include:[],exclude:[]},company_profile_urls:{include:[],exclude:[]},company_types:[],year_founded:{from:null,to:null},hq_locations:[],hq_countries:{include:[],exclude:[]},industries:{include:[],exclude:[]},categories:{include:[],exclude:[]},specialities_keywords:{include:[],exclude:[]},headcount_brackets:[],engineering_headcount_brackets:[],sales_headcount_brackets:[],headcount_growth_l6m_in_percent:{from:null,to:null},revenue_in_usd:{from:null,to:null},last_funding_round_types:[],last_funding_within:``,last_funding_amount_in_usd:{from:null,to:null},total_funding_amount_in_usd:{from:null,to:null},investors:{include:[],exclude:[]},is_acquired:null,ipo_within:``,markets:{include:[],exclude:[]},follower_count_brackets:[],follower_growth_l6m_in_percent:{from:null,to:null},technologies:{include:[],exclude:[]},competitor_domains:[]}}}},pz=`contacts:hubspot@1`,mz=_(`hubspot_object_id`),hz=_(`email`),gz=_(`first_name`),_z=_(`last_name`),vz=_(`hubspot_contact_match`),yz=r.object({search_id:r.literal(pz),connector:Jl(),config:r.object({query:Bu({path:`config.query`,groupPath:`config.general`,inputType:`text`,label:`Search text`,sectionKey:`general`,info:`Free-text search over HubSpot's default searchable contact properties (name, email, phone, company).`}).nullable(),custom_properties:ju({path:`config.custom_properties`,groupPath:`config.general`,sectionKey:`general`,label:`Custom properties`,placeholder:`product_signup_date`,info:"Added to the contact JSON under `custom_properties` — internal names, custom properties included (standard-set names are already top-level)."}),filters:Au({path:`config.filters`,groupPath:`config.general`,sectionKey:`general`,label:`Property filters`,fieldNamePlaceholder:`lifecyclestage`,info:`Rows filter on any HubSpot property by internal name — including custom properties. Enumeration values are the portal's internal option values (case-sensitive).`}),lifecycle_stage:Uu({path:`config.lifecycle_stage`,groupPath:`config.general`,sectionKey:`general`,label:`Lifecycle stage`,required:!1,info:`This portal's actual stages — custom stages included.`,enabledIf:v(`hubspot`),optionsDef:dp(`contacts`,`lifecyclestage`)}),owner:Uu({path:`config.owner`,groupPath:`config.general`,sectionKey:`general`,label:`Owner`,required:!1,info:``,enabledIf:v(`hubspot`),optionsDef:up}),created_within:Hu({required:!1,path:`config.created_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Created at`,description:``,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``),modified_within:Hu({required:!1,path:`config.modified_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Last modified`,description:``,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``),limit:N({path:`config.limit`,min:1,max:200,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Rows per page (HubSpot search caps pages at 200 and total results at 10,000).`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[mz.name]:A({fieldName:mz.name}),[hz.name]:A({fieldName:hz.name}),[gz.name]:A({fieldName:gz.name}),[_z.name]:A({fieldName:_z.name}),[vz.name]:A({fieldName:vz.name})}))})}),bz={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own HubSpot portal is free.`},xz=`contacts-hubspot-v1`,Sz=class extends Z{billing={billableOperation:xz,cost:bz};searchId=pz;schema=yz;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[mz.name]:this.catalogOutput(mz),[hz.name]:this.catalogOutput(hz),[gz.name]:this.catalogOutput(gz),[_z.name]:this.catalogOutput(_z),[vz.name]:this.catalogOutput(vz)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitOperation:`hubspot_crm_search`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`hubspot_object_id`}]}}async getAgentContext(e){return pp(e,{objectTypes:[[`contacts`,`0-1`]]})}},Cz=yz,wz={searchId:pz,billableOperation:xz,baseSearch:Q(pz),outputFieldMode:`static`,paginationType:`cursor`,label:`HubSpot contacts`,categories:[`people`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List contacts from your HubSpot portal: identity columns (id, email, name) plus a JSON record with the standard property set and any custom properties you pick.`,tags:[V.EMAIL,V.NEW],keywords:[`crm`,`lookup`,`list`,`records`,`import`,`person`],docPath:$(pz),guide:`Call get_provider_context first for this portal's property names and enumeration option values — use internal names verbatim. Standard fields become typed columns; the standard set rides flat in the contact JSON and picked custom properties nest under custom_properties — expand it or chain json:extract downstream. Filters support any property; the lifecycle-stage picker shows the portal's actual stages (custom stages have opaque internal values). Newly created records lag search indexing by a few moments; archived records never appear. Total results cap at 10,000 per query — narrow with filters or date windows.`,cost:bz,provider:`hubspot`,defaultPayload:{search_id:pz,connector:{strategy:`first`,connections:[]},config:{query:``,custom_properties:[],filters:null,lifecycle_stage:``,owner:``,created_within:``,modified_within:``,limit:100,cursor:``,output_fields:{hubspot_object_id:{enabled:!0,alias:``},email:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},hubspot_contact_match:{enabled:!0,alias:``}}}}},Tz=`contacts:salesforce@1`,Ez=_(`salesforce_record_id`),Dz=_(`first_name`),Oz=_(`last_name`),kz=_(`email`),Az=_(`salesforce_contact_match`),jz=r.object({search_id:r.literal(Tz),connector:Jl(),config:r.object({custom_properties:CL(),filters:wL(`Title`),list_view:TL(`Contact`),email_domains:k({path:`config.email_domains`,groupPath:`config.general`,sectionKey:`general`,label:`Email domains`,placeholder:`acme.com`,info:`Matches the email's domain part. Large orgs: domain matching is unindexed — combine with other filters when it times out.`}),has_email:Ru({path:`config.has_email`,groupPath:`config.general`,sectionKey:`general`,label:`Has email`,description:``,defaultValue:!1}),owner:EL(),created_within:OL(),modified_within:kL(),limit:AL(),cursor:jL(),output_fields:P(r.object({[Ez.name]:A({fieldName:Ez.name}),[Dz.name]:A({fieldName:Dz.name}),[Oz.name]:A({fieldName:Oz.name}),[kz.name]:A({fieldName:kz.name}),[Az.name]:A({fieldName:Az.name})}))}).check(e=>ML([`email_domains`,`has_email`,`owner`,`created_within`,`modified_within`])(e))}),Mz={allowManagedConnection:!1,mode:null,credits:null,info:`Salesforce searches are free — you bring your own Salesforce connection.`},Nz=`contacts-salesforce-v1`,Pz=class extends Z{billing={billableOperation:Nz,cost:Mz};searchId=Tz;schema=jz;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[Ez.name]:this.catalogOutput(Ez),[Dz.name]:this.catalogOutput(Dz),[Oz.name]:this.catalogOutput(Oz),[kz.name]:this.catalogOutput(kz),[Az.name]:this.catalogOutput(Az)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitOperation:`salesforce_api`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`salesforce_record_id`}]}}async getAgentContext(e){return ef(e,{objects:[`Contact`],includeListViewsFor:[`Contact`]})}},Fz=jz,Iz={searchId:Tz,billableOperation:Nz,baseSearch:Q(Tz),outputFieldMode:`static`,paginationType:`cursor`,label:`Salesforce contacts`,categories:[`people`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List contacts from your Salesforce org: identity columns (id, name, email) plus a JSON record with the standard field set and any custom fields you pick. Filter with field conditions or run one of the org's own list views.`,tags:[V.EMAIL,V.NEW],keywords:[`crm`,`sfdc`,`lookup`,`list`,`records`,`import`,`person`],docPath:$(Tz),guide:"Call get_provider_context first for the org's field API names and picklist values — use them verbatim (`__c` = custom). Standard fields become typed columns; picked custom fields nest under custom_properties in the contact JSON. Filters accept dotted parent paths (Account.Industry); date values accept SOQL literals like LAST_N_DAYS:30. To find stale records, filter on `LastActivityDate` (e.g. `LastActivityDate < LAST_N_DAYS:90` — it reflects closed tasks + events, not literal touches). `list_view` runs the org's own segmentation (XOR with filters/shortcuts). Results page by record id (creation order) — a cursor never expires. Rows the connected user cannot see are silently absent (sharing rules).",cost:Mz,provider:`salesforce`,defaultPayload:{search_id:Tz,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,list_view:``,email_domains:{include:[],exclude:[]},has_email:!1,owner:``,created_within:``,modified_within:``,limit:100,cursor:``,output_fields:{salesforce_record_id:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},email:{enabled:!0,alias:``},salesforce_contact_match:{enabled:!0,alias:``}}}}},Lz=`query:databricks@1`,Rz=r.object({search_id:r.literal(Lz),connector:Jl(),config:r.object({query:Vu({path:`config.query`,groupPath:`config.general`,sectionKey:`general`,label:`SQL query`,description:`A single read-only SELECT statement. It is wrapped automatically for pagination, so do not add your own LIMIT/OFFSET for paging.`,rows:8,minLength:1,maxLength:2e4}),limit:N({path:`config.limit`,min:1,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of rows per page`}).default(100),page_number:N({path:`config.page_number`,min:1,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page`,description:`1-based page index (offset pagination)`}).nullable().default(1)})}),zz={allowManagedConnection:!1,mode:null,credits:null,info:`Querying your own Databricks SQL warehouse is free.`},Bz=`data-query-databricks-v1`,Vz=class extends Z{billing={billableOperation:Bz,cost:zz};searchId=Lz;schema=Rz;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{}}getConnectionsRequirements(){return[{provider:`databricks`,rateLimitOperation:`databricks_query`,rateLimitRatio:1,allowManagedConnection:!1}]}async getAgentContext(e){return IF(`databricks`,e)}},Hz=Rz,Uz={searchId:Lz,billableOperation:Bz,baseSearch:Q(Lz),outputFieldMode:`dynamic`,paginationType:`page_number`,label:`Query Databricks`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`Run a read-only SQL query against your Databricks SQL warehouse and return the rows.`,guide:"Databricks SQL dialect; config.query must be a single read-only statement (no self-managed LIMIT/OFFSET — pagination is wrapped automatically). To discover the schema, draft a payload with a placeholder config.query like \"SELECT 1\" and the chosen connection in connector.connections, then call get_provider_context once — it returns the workspace-wide table/column map (all Unity catalogs) for free. Always reference tables by their FULLY QUALIFIED three-part name exactly as the map lists them (catalog.schema.table, e.g. samples.accuweather.forecast_daily); a bare table name resolves against the warehouse's unpredictable current catalog and usually fails with TABLE_OR_VIEW_NOT_FOUND. Sample actual rows (also free) with run_search_oneshot, then write the real config.query. Tables under the `samples` catalog (and Databricks' other built-in example schemas like `tpch` and `tpcds_*`) are DEMO data shipped to every workspace, NOT the customer's own data. If the user asks about their data and the only match is under `samples`/a demo schema — or the map shows only demo tables — the connection isn't pointed at their catalog: confirm the intended table with the user before querying, and never answer their question from a demo table.",tags:[V.FIELDS,V.NEW],keywords:[`sql`,`database`,`warehouse`,`select`,`table`,`read data`],docPath:$(Lz),cost:zz,provider:`databricks`,defaultPayload:{search_id:Lz,connector:{strategy:`first`,connections:[]},config:{query:``,limit:100,page_number:1}}},Wz=`query:postgres@1`,Gz=r.object({search_id:r.literal(Wz),connector:Jl(),config:r.object({query:Vu({path:`config.query`,groupPath:`config.general`,sectionKey:`general`,label:`SQL query`,description:`A single read-only SELECT statement. It is wrapped automatically for pagination, so do not add your own LIMIT/OFFSET for paging.`,rows:8,minLength:1,maxLength:2e4}),limit:N({path:`config.limit`,min:1,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of rows per page`}).default(100),page_number:N({path:`config.page_number`,min:1,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page`,description:`1-based page index (offset pagination)`}).nullable().default(1)})}),Kz={allowManagedConnection:!1,mode:null,credits:null,info:`Querying your own PostgreSQL database is free.`},qz=`data-query-postgres-v1`,Jz=class extends Z{billing={billableOperation:qz,cost:Kz};searchId=Wz;schema=Gz;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{}}getConnectionsRequirements(){return[{provider:`postgres`,rateLimitOperation:`postgres_query`,rateLimitRatio:1,allowManagedConnection:!1}]}async getAgentContext(e){return IF(`postgres`,e)}},Yz=Gz,Xz={searchId:Wz,billableOperation:qz,baseSearch:Q(Wz),outputFieldMode:`dynamic`,paginationType:`page_number`,label:`Query Postgres`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`Run a read-only SQL query against your own PostgreSQL database and return the rows.`,guide:`PostgreSQL dialect; config.query must be a single read-only SELECT (no self-managed LIMIT/OFFSET — pagination is wrapped automatically). To discover the schema, draft a payload with a placeholder config.query like "SELECT 1" and the chosen connection in connector.connections, then call get_provider_context once — it returns the full table/column map for free. Sample actual rows (also free) with run_search_oneshot, then write the real config.query.`,tags:[V.FIELDS,V.NEW],keywords:[`sql`,`database`,`select`,`table`,`read data`],docPath:$(Wz),cost:Kz,provider:`postgres`,defaultPayload:{search_id:Wz,connector:{strategy:`first`,connections:[]},config:{query:``,limit:100,page_number:1}}},Zz=`deals:attio@1`,Qz=_(`attio_record_id`),$z=_(`deal_name`),eB=_(`deal_amount`),tB=_(`attio_deal_match`),nB=r.object({search_id:r.literal(Zz),connector:Jl(),config:r.object({custom_properties:$L(`value`,kf({target:`objects`,identifier:`deals`})),filters:eR(`value`),stage:Uu({path:`config.stage`,groupPath:`config.general`,sectionKey:`general`,label:`Deal stage`,required:!1,info:`This workspace's actual stage titles — custom stages included.`,enabledIf:v(`attio`),optionsDef:Sf,multiple:!0}),owner:Uu({path:`config.owner`,groupPath:`config.general`,sectionKey:`general`,label:`Owner`,required:!1,info:``,enabledIf:v(`attio`),optionsDef:Df}),saved_view:tR(Tf({target:`objects`,identifier:`deals`})),created_within:nR(),limit:ZL(),page_number:QL(),output_fields:P(r.object({[Qz.name]:A({fieldName:Qz.name}),[$z.name]:A({fieldName:$z.name}),[eB.name]:A({fieldName:eB.name}),[tB.name]:A({fieldName:tB.name})}))}).check(e=>rR(e,[`stage`,`owner`,`created_within`]))}),rB={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own Attio workspace is free.`},iB=`deals-attio-v1`,aB=class extends Z{billing={billableOperation:iB,cost:rB};searchId=Zz;schema=nB;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[Qz.name]:this.catalogOutput(Qz),[$z.name]:this.catalogOutput($z),[eB.name]:this.catalogOutput(eB),[tB.name]:this.catalogOutput(tB)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_query`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`attio_record_id`}]}}async getAgentContext(e){return jf(e,{objects:[`deals`],includeViewsFor:[`deals`],includeMembers:!0})}},oB=nB,sB={searchId:Zz,billableOperation:iB,baseSearch:Q(Zz),outputFieldMode:`static`,paginationType:`page_number`,label:`Attio deals`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List deals from your Attio workspace: identity columns (id, name, value) plus a JSON record with the standard attribute set and any custom attributes you pick.`,tags:[V.NEW],keywords:[`crm`,`list`,`records`,`import`,`opportunity`,`pipeline`],docPath:$(Zz),guide:"Call get_provider_context first — deal stage titles are workspace-defined (never assume Won/Lost exist). The Deals object is opt-in per workspace; a disabled object fails with a settings hint. Standard attributes become typed columns; everything else rides in the deal JSON. Exact value/date ranges go in the attribute filters (`value` gte/lte); a saved view replaces the filter fields entirely. Multi-pipeline flows live in Attio LISTS — use entries:attio@1 for list-based pipelines. Attio reports no total count — page until a short page.",cost:rB,provider:`attio`,defaultPayload:{search_id:Zz,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,stage:[],owner:``,saved_view:``,created_within:``,limit:100,page_number:1,output_fields:{attio_record_id:{enabled:!0,alias:``},deal_name:{enabled:!0,alias:``},deal_amount:{enabled:!0,alias:``},attio_deal_match:{enabled:!0,alias:``}}}}},cB=`deals:hubspot@1`,lB=_(`hubspot_object_id`),uB=_(`deal_name`),dB=_(`deal_amount`),fB=_(`hubspot_deal_match`),pB=r.object({search_id:r.literal(cB),connector:Jl(),config:r.object({query:Bu({path:`config.query`,groupPath:`config.general`,inputType:`text`,label:`Search text`,sectionKey:`general`,info:`Free-text search over HubSpot's default searchable deal properties (deal name, pipeline, stage, description).`}).nullable(),custom_properties:ju({path:`config.custom_properties`,groupPath:`config.general`,sectionKey:`general`,label:`Custom properties`,placeholder:`contract_term`,info:"Added to the deal JSON under `custom_properties` — internal names, custom properties included (standard-set names are already top-level)."}),filters:r.object({conditions:Au({path:`config.filters.conditions`,groupPath:`config.general`,sectionKey:`general`,label:`Property filters`,fieldNamePlaceholder:`amount`,info:`Rows filter on any HubSpot property by internal name — including custom properties.`}),pipeline:Uu({path:`config.filters.pipeline`,groupPath:`config.general`,sectionKey:`general`,label:`Pipeline`,required:!1,info:``,enabledIf:v(`hubspot`),optionsDef:sp(`deals`)}),deal_stage:Uu({path:`config.filters.deal_stage`,groupPath:`config.general`,sectionKey:`general`,label:`Deal stage`,required:!1,info:`Stages of the selected pipeline (stage ids are numeric outside the default pipeline).`,enabledIf:v(`hubspot`),optionsDef:fp}),status:Hu({required:!1,path:`config.filters.status`,groupPath:`config.general`,sectionKey:`general`,label:`Deal status`,description:`Filters on HubSpot's computed hs_is_closed / hs_is_closed_won — portal-invariant, unlike stage names.`,options:[{label:`Any`,value:`any`},{label:`Open`,value:`open`},{label:`Won`,value:`won`},{label:`Lost`,value:`lost`}]}).default(`any`),owner:Uu({path:`config.filters.owner`,groupPath:`config.general`,sectionKey:`general`,label:`Owner`,required:!1,info:``,enabledIf:v(`hubspot`),optionsDef:up}),created_within:Hu({required:!1,path:`config.filters.created_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Created`,description:`Relative window, resolved at every run — schedule-friendly. Exact date ranges go in the property filters (createdate gte/lte).`,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``),modified_within:Hu({required:!1,path:`config.filters.modified_within`,groupPath:`config.dates`,sectionKey:`general`,label:`Last modified`,description:``,options:[{label:`Any time`,value:``},{label:`Last 24 hours`,value:`l24h`},{label:`Last 48 hours`,value:`l48h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(``)}),limit:N({path:`config.limit`,min:1,max:200,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Rows per page (HubSpot search caps pages at 200 and total results at 10,000).`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[lB.name]:A({fieldName:lB.name}),[uB.name]:A({fieldName:uB.name}),[dB.name]:A({fieldName:dB.name}),[fB.name]:A({fieldName:fB.name})}))})}),mB={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own HubSpot portal is free.`},hB=`deals-hubspot-v1`,gB=class extends Z{billing={billableOperation:hB,cost:mB};searchId=cB;schema=pB;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[lB.name]:this.catalogOutput(lB),[uB.name]:this.catalogOutput(uB),[dB.name]:this.catalogOutput(dB),[fB.name]:this.catalogOutput(fB)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitOperation:`hubspot_crm_search`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`hubspot_object_id`}]}}async getAgentContext(e){return pp(e,{objectTypes:[[`deals`,`0-3`]],includePipelinesFor:[`deals`]})}},_B=pB,vB={searchId:cB,billableOperation:hB,baseSearch:Q(cB),outputFieldMode:`static`,paginationType:`cursor`,label:`HubSpot deals`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List deals from your HubSpot portal: identity columns (id, name, amount) plus a JSON record with the standard property set and any custom properties you pick.`,tags:[V.FIELDS,V.NEW],keywords:[`crm`,`opportunity`,`pipeline`,`list`,`records`,`import`],docPath:$(cB),guide:`Call get_provider_context first — it includes this portal's pipelines with per-pipeline stage ids and labels (stage ids are numeric outside the default pipeline; never assume 'closedwon' exists). Prefer the status filter (computed hs_is_closed/hs_is_closed_won) over stage names for open/won/lost. Standard fields become typed columns; pipeline, stage and close date ride flat in the deal JSON, picked custom properties nest under custom_properties — expand it or chain json:extract downstream. Total results cap at 10,000 per query.`,cost:mB,provider:`hubspot`,defaultPayload:{search_id:cB,connector:{strategy:`first`,connections:[]},config:{query:``,custom_properties:[],filters:{conditions:null,pipeline:``,deal_stage:``,status:`any`,owner:``,created_within:``,modified_within:``},limit:100,cursor:``,output_fields:{hubspot_object_id:{enabled:!0,alias:``},deal_name:{enabled:!0,alias:``},deal_amount:{enabled:!0,alias:``},hubspot_deal_match:{enabled:!0,alias:``}}}}},yB=`companies:profiles:amplemarket@1`,bB=_(`company_name`),xB=_(`company_website_url`),SB=_(`company_description`),CB=_(`company_profile_url`),wB=_(`amplemarket_company_match`),TB=r.object({search_id:r.literal(yB),connector:ws.nullable().optional(),config:r.object({limit:N({label:`Limit`,description:`Max number of search results`,path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`}),page_number:N({path:`config.page_number`,groupPath:`config.pagination`,label:`Page number`,min:1,sectionKey:`pagination`,description:``}).nullish(),output_fields:P(r.object({[bB.name]:A({fieldName:bB.name}),[xB.name]:A({fieldName:xB.name}),[SB.name]:A({fieldName:SB.name}),[CB.name]:A({fieldName:CB.name}),[wB.name]:A({fieldName:wB.name})})),filters:r.object({hq_locations:M({path:`config.filters.hq_locations`,sectionKey:`config.filters`,label:`HQ locations`,description:``,placeholder:J(`location`),groupPath:`config.filters.location`,optionsDef:g(`locations`)}).default({include:[],exclude:[]}),company_names:k({sectionKey:`config.filters`,path:`config.filters.company_names`,label:`Company names`,description:``,placeholder:J(`company_name`),groupPath:`config.filters.categories`,suggestionsDef:g(`company_names`)}).default({include:[],exclude:[]}),company_website_urls:k({sectionKey:`config.filters`,path:`config.filters.company_website_urls`,label:`Company domains`,description:``,placeholder:J(`company_domain`),groupPath:`config.filters.categories`,suggestionsDef:g(`company_domains`,{widgets:{emoji:{char:`🌐`}}})}).default({include:[],exclude:[]}),company_profile_urls:k({sectionKey:`config.filters`,path:`config.filters.company_profile_urls`,label:`Company LinkedIn URLs`,description:``,groupPath:`config.filters.categories`}).default({include:[],exclude:[]}),company_types:j({sectionKey:`config.filters`,path:`config.filters.company_types`,disableSearch:!1,label:`Company Type`,description:``,groupPath:`config.filters.categories`,options:h(`amplemarket.company_types`),required:!1}).default([]),investors:Wu({sectionKey:`config.filters`,path:`config.filters.investors`,label:`Investor names`,optionsDef:g(`company.crunchbase_investors.crustdata`),description:`A list of company investor names`,placeholder:J(`investor`),groupPath:`config.filters.investors`,disableSearch:!1,required:!1}).default([]),company_industries:Pu({sectionKey:`config.filters`,path:`config.filters.company_industries`,optionsDef:We(`amplemarket.industries`),disableSearch:!1,label:`Industries`,description:``,placeholder:J(`industry`),groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),customer_types:j({sectionKey:`config.filters`,path:`config.filters.customer_types`,options:[{value:`b2b`,label:`B2B`},{value:`b2c`,label:`B2C`}],required:!1,disableSearch:!0,label:`Customer Types`,description:``,groupPath:`config.filters.industry`}).default([]),keywords:k({sectionKey:`config.filters`,path:`config.filters.keywords`,label:`Keywords`,description:``,groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),revenue_groups:j({path:`config.filters.revenue_groups`,sectionKey:`config.filters`,label:`Revenue groups`,description:``,disableSearch:!0,options:h(`amplemarket.company_revenue`),required:!1,groupPath:`config.filters.financials`}).default([]),founded_year:Nu({path:`config.filters.founded_year`,sectionKey:`config.filters`,label:`Founded year`,groupPath:`config.filters.general`,min:0,max:2040,description:``}).default({min:null,max:null}),open_positions_titles:O({path:`config.filters.open_positions_titles`,sectionKey:`config.filters`,label:`Job openings for titles`,groupPath:`config.filters.job_openings`,description:``,placeholder:J(`title`),suggestionsDef:g(`titles`)}),headcount:j({sectionKey:`config.filters`,path:`config.filters.company_sizes`,disableSearch:!1,options:h(`amplemarket.company_size`),label:`Headcount groups`,required:!1,description:``,groupPath:`config.filters.company_size`}).default([]),headcount_growth_last_6_months_in_percent:Nu({path:`config.filters.headcount_growth_last_6_months_in_percent`,sectionKey:`config.filters`,label:`Headcount growth over last 6 months (in %)`,groupPath:`config.filters.company_size`,description:``,max:1e4,min:0}).default({min:null,max:null})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),EB={allowManagedConnection:!0,mode:`per_page`,credits:{default:2}},DB=`companies-profiles-amplemarket-v1`,OB=class extends Z{billing={billableOperation:DB,cost:EB};searchId=yB;schema=TB;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[bB.name]:this.catalogOutput(bB),[xB.name]:this.catalogOutput(xB),[SB.name]:this.catalogOutput(SB),[CB.name]:this.catalogOutput(CB),[wB.name]:this.catalogOutput(wB)}}getConnectionsRequirements(){return[{provider:`amplemarket`,rateLimitOperation:`amplemarket_company_search`,rateLimitRatio:1,allowManagedConnection:!0}]}},kB=TB,AB={searchId:yB,billableOperation:DB,baseSearch:Q(`companies:profiles:amplemarket@1`),label:`Company search`,categories:[`deprecated`],paginationType:`page_number`,hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:{deprecatedOn:`2026-06-13`,replacedBy:`companies:profiles:amplemarket@2`},description:`Filter based company search.`,tags:[V.COMPANY_PROFILES],docPath:$(yB),cost:EB,provider:`amplemarket`,defaultPayload:{search_id:yB,connector:null,config:{limit:100,page_number:1,output_fields:{company_name:{enabled:!0,alias:``},company_website_url:{enabled:!0,alias:``},company_description:{enabled:!0,alias:``},company_profile_url:{enabled:!0,alias:``},amplemarket_company_match:{enabled:!0,alias:``}},filters:{company_industries:{include:[],exclude:[]},company_names:{include:[],exclude:[]},company_profile_urls:{include:[],exclude:[]},company_types:[],company_website_urls:{include:[],exclude:[]},customer_types:[],headcount_growth_last_6_months_in_percent:{min:null,max:null},founded_year:{min:null,max:null},revenue_groups:[],investors:[],keywords:{include:[],exclude:[]},open_positions_titles:[],headcount:[],hq_locations:{include:[],exclude:[]}}}}},jB=`companies:profiles:crustdata@1`,MB=_(`company_name`),NB=_(`company_website_url`),PB=_(`company_description`),FB=_(`company_profile_url`),IB=_(`crustdata_company_match`),LB=r.object({search_id:r.literal(jB),connector:ws.nullable().optional(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of search results`}),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[MB.name]:A({fieldName:MB.name}),[NB.name]:A({fieldName:MB.name}),[PB.name]:A({fieldName:PB.name}),[FB.name]:A({fieldName:FB.name}),[IB.name]:A({fieldName:IB.name})})),filters:r.object({hq_locations:M({path:`config.filters.hq_locations`,sectionKey:`config.filters`,label:`HQ locations`,description:``,placeholder:J(`location`),groupPath:`config.filters.location`,optionsDef:g(`locations`)}).default({include:[],exclude:[]}),crunchbase_categories:M({path:`config.filters.crunchbase_categories`,sectionKey:`config.filters`,label:`Crunchbase categories`,placeholder:J(`crunchbase_category`),description:``,groupPath:`config.filters.categories`,optionsDef:g(`company.crunchbase_categories.crustdata`)}).default({include:[],exclude:[]}),crunchbase_investors:M({path:`config.filters.crunchbase_investors`,sectionKey:`config.filters`,label:`Investors to include (Crunchbase)`,description:``,placeholder:J(`investor`),groupPath:`config.filters.investors`,optionsDef:g(`company.crunchbase_investors.crustdata`)}).default({include:[],exclude:[]}),tracxn_investors:M({path:`config.filters.tracxn_investors`,sectionKey:`config.filters`,label:`Investors to include (Tracxn)`,description:``,placeholder:J(`investor`),groupPath:`config.filters.investors`,optionsDef:g(`company.tracxn_investors.crustdata`)}).default({include:[],exclude:[]}),company_types:Pu({sectionKey:`config.filters`,path:`config.filters.company_types`,optionsDef:{type:`static`,options:h(`crustdata.company_types`)},label:`Company types`,placeholder:`Public, Private, ...`,description:``,groupPath:`config.filters.categories`}).default({include:[],exclude:[]}),linkedin_industries:M({sectionKey:`config.filters`,path:`config.filters.linkedin_industries`,optionsDef:g(`linkedin_industries.crustdata`),label:`Industries`,description:``,placeholder:J(`industry`),groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),markets:M({sectionKey:`config.filters`,path:`config.filters.markets`,optionsDef:g(`company.markets.crustdata`),placeholder:`NYSE, TYO, ...`,label:`Markets`,description:``,groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),linkedin_categories:M({sectionKey:`config.filters`,path:`config.filters.linkedin_categories`,optionsDef:g(`company.linkedin_categories.crustdata`),label:`LinkedIn category`,placeholder:`Marketing, Branding, ...`,description:``,groupPath:`config.filters.categories`}).default({include:[],exclude:[]}),headcount:Pu({path:`config.filters.headcount`,sectionKey:`config.filters`,label:`Headcount`,description:``,disableSearch:!0,placeholder:`1-10`,optionsDef:{type:`static`,options:h(`crustdata.company_size`)},groupPath:`config.filters.company_size`}).default({include:[],exclude:[]}),headcount_growth_last_6m_in_percent:j({path:`config.filters.headcount_growth_last_6m_in_percent`,sectionKey:`config.filters`,label:`Headcount growth over last 6 months in percent`,description:``,options:h(`crustdata.headcount_growth`),placeholder:`0-10%`,disableSearch:!0,required:!1,groupPath:`config.filters.company_size`}).default([]),revenue_in_usd:Iu({path:`config.filters.revenue_in_usd`,sectionKey:`config.filters`,label:`Revenue (USD)`,description:``,legend:`1k - 10B`,min:1e3,max:1e10,groupPath:`config.filters.financials`}),last_funding_type:Pu({path:`config.filters.last_funding_type`,sectionKey:`config.filters`,label:`Last funding type`,placeholder:`Series A`,disableSearch:!0,optionsDef:{type:`static`,options:h(`crustdata.funding_rounds`)},description:``,groupPath:`config.filters.financials`}).default({include:[],exclude:[]}),last_funding_amount:Iu({path:`config.filters.last_funding_amount`,sectionKey:`config.filters`,label:`Last funding amount`,legend:`1k - 10B`,min:1e3,max:1e10,description:``,groupPath:`config.filters.financials`}),number_of_followers:j({path:`config.filters.number_of_followers`,sectionKey:`config.filters`,label:`Number of LinkedIn followers`,placeholder:`1-500`,disableSearch:!0,description:``,required:!1,options:h(`crustdata.company_followers`),groupPath:`config.filters.web_presence`}).default([]),follower_growth_last_6m_in_percent:j({path:`config.filters.follower_growth_last_6m_in_percent`,sectionKey:`config.filters`,label:`LinkedIn follower growth within last 6 months`,required:!1,disableSearch:!0,placeholder:`0-10%`,description:``,options:h(`crustdata.follower_growth`),groupPath:`config.filters.web_presence`}).default([]),profile_summary_keywords:k({path:`config.filters.profile_summary_keywords`,sectionKey:`config.filters`,maxItems:50,label:`LinkedIn company description contains`,placeholder:J(`company_profile_keyword`),description:``,groupPath:`config.filters.keywords`}).default({include:[],exclude:[]}),competitor_websites:k({path:`config.filters.competitor_websites`,sectionKey:`config.filters`,maxItems:50,label:`Competitor domains`,description:``,placeholder:J(`company_domain`),groupPath:`config.filters.competitors`,suggestionsDef:g(`company_domains`,{widgets:{emoji:{char:`🌐`}}})}).default({include:[],exclude:[]})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),RB={allowManagedConnection:!0,mode:`per_page`,credits:{default:2}},zB=`companies-profiles-crustdata-v1`,BB=class extends Z{billing={billableOperation:zB,cost:RB};searchId=jB;schema=LB;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[MB.name]:this.catalogOutput(MB),[NB.name]:this.catalogOutput(NB),[PB.name]:this.catalogOutput(PB),[FB.name]:this.catalogOutput(FB),[IB.name]:this.catalogOutput(IB)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_company_db_search`,rateLimitRatio:1,allowManagedConnection:!0}]}},VB=LB,HB={searchId:jB,billableOperation:zB,baseSearch:Q(`companies:profiles:crustdata@1`),label:`Company search`,categories:[`deprecated`],paginationType:`cursor`,hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:{deprecatedOn:`2026-06-13`,replacedBy:`companies:profiles:crustdata@2`},description:`Filter based company search.`,tags:[V.COMPANY_PROFILES],docPath:$(jB),cost:RB,provider:`crustdata`,defaultPayload:{search_id:jB,connector:null,config:{limit:100,cursor:``,output_fields:{company_name:{enabled:!0,alias:``},company_website_url:{enabled:!0,alias:``},company_description:{enabled:!0,alias:``},company_profile_url:{enabled:!0,alias:``},crustdata_company_match:{enabled:!0,alias:``}},filters:{company_types:{include:[],exclude:[]},headcount_growth_last_6m_in_percent:[],last_funding_amount:{from:null,to:null},last_funding_type:{include:[],exclude:[]},linkedin_industries:{include:[],exclude:[]},linkedin_categories:{include:[],exclude:[]},crunchbase_categories:{include:[],exclude:[]},markets:{include:[],exclude:[]},revenue_in_usd:{from:null,to:null},crunchbase_investors:{include:[],exclude:[]},tracxn_investors:{include:[],exclude:[]},follower_growth_last_6m_in_percent:[],headcount:{include:[],exclude:[]},hq_locations:{include:[],exclude:[]},number_of_followers:[],profile_summary_keywords:{include:[],exclude:[]},competitor_websites:{include:[],exclude:[]}}}}},UB=`companies:profiles:crustdata@2`,WB=_(`company_name`),GB=_(`company_domain`),KB=_(`company_description`),qB=_(`company_profile_url`),JB=_(`crustdata_company_match`),YB=r.object({search_id:r.literal(UB),connector:Yl(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of search results`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[WB.name]:A({fieldName:WB.name}),[GB.name]:A({fieldName:GB.name}),[KB.name]:A({fieldName:KB.name}),[qB.name]:A({fieldName:qB.name}),[JB.name]:A({fieldName:JB.name})})),filters:r.object({hq_locations:M({path:`config.filters.hq_locations`,sectionKey:`config.filters`,label:`HQ locations`,description:``,placeholder:J(`location`),groupPath:`config.filters.location`,optionsDef:g(`locations`)}).default({include:[],exclude:[]}),crunchbase_categories:M({path:`config.filters.crunchbase_categories`,sectionKey:`config.filters`,label:`Crunchbase categories`,placeholder:J(`crunchbase_category`),description:``,groupPath:`config.filters.categories`,optionsDef:g(`company.crunchbase_categories.crustdata`)}).default({include:[],exclude:[]}),crunchbase_investors:M({path:`config.filters.crunchbase_investors`,sectionKey:`config.filters`,label:`Investors to include (Crunchbase)`,description:``,placeholder:J(`investor`),groupPath:`config.filters.investors`,optionsDef:g(`company.crunchbase_investors.crustdata`)}).default({include:[],exclude:[]}),tracxn_investors:M({path:`config.filters.tracxn_investors`,sectionKey:`config.filters`,label:`Investors to include (Tracxn)`,description:``,placeholder:J(`investor`),groupPath:`config.filters.investors`,optionsDef:g(`company.tracxn_investors.crustdata`)}).default({include:[],exclude:[]}),company_types:Pu({sectionKey:`config.filters`,path:`config.filters.company_types`,optionsDef:{type:`static`,options:h(`crustdata.company_types`)},label:`Company types`,placeholder:`Public, Private, ...`,description:``,groupPath:`config.filters.categories`}).default({include:[],exclude:[]}),linkedin_industries:M({sectionKey:`config.filters`,path:`config.filters.linkedin_industries`,optionsDef:g(`linkedin_industries.crustdata`),label:`Industries`,description:``,placeholder:J(`industry`),groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),markets:M({sectionKey:`config.filters`,path:`config.filters.markets`,optionsDef:g(`company.markets.crustdata`),placeholder:`NYSE, TYO, ...`,label:`Markets`,description:``,groupPath:`config.filters.industry`}).default({include:[],exclude:[]}),linkedin_categories:M({sectionKey:`config.filters`,path:`config.filters.linkedin_categories`,optionsDef:g(`company.linkedin_categories.crustdata`),label:`LinkedIn category`,placeholder:`Marketing, Branding, ...`,description:``,groupPath:`config.filters.categories`}).default({include:[],exclude:[]}),headcount:Pu({path:`config.filters.headcount`,sectionKey:`config.filters`,label:`Headcount`,description:``,disableSearch:!0,placeholder:`1-10`,optionsDef:{type:`static`,options:h(`crustdata.company_size`)},groupPath:`config.filters.company_size`}).default({include:[],exclude:[]}),linkedin_headcount_ranges:j({path:`config.filters.linkedin_headcount_ranges`,sectionKey:`config.filters`,label:`Size bracket`,description:`Headcount range a company self-reports on its LinkedIn page.`,options:h(`crustdata.linkedin_headcount_ranges`),placeholder:`2-10`,disableSearch:!0,required:!1,groupPath:`config.filters.company_size`}).default([]),headcount_growth_l6m_in_percent:j({path:`config.filters.headcount_growth_l6m_in_percent`,sectionKey:`config.filters`,label:`Headcount growth over last 6 months in percent`,description:``,options:h(`crustdata.headcount_growth`),placeholder:`0-10%`,disableSearch:!0,required:!1,groupPath:`config.filters.company_size`}).default([]),revenue_in_usd:Iu({path:`config.filters.revenue_in_usd`,sectionKey:`config.filters`,label:`Revenue (USD)`,description:``,legend:`1k - 10B`,min:1e3,max:1e10,groupPath:`config.filters.financials`}),last_funding_type:Pu({path:`config.filters.last_funding_type`,sectionKey:`config.filters`,label:`Last funding type`,placeholder:`Series A`,disableSearch:!0,optionsDef:{type:`static`,options:h(`crustdata.funding_rounds`)},description:``,groupPath:`config.filters.financials`}).default({include:[],exclude:[]}),last_funding_amount:Iu({path:`config.filters.last_funding_amount`,sectionKey:`config.filters`,label:`Last funding amount`,legend:`1k - 10B`,min:1e3,max:1e10,description:``,groupPath:`config.filters.financials`}),number_of_followers:j({path:`config.filters.number_of_followers`,sectionKey:`config.filters`,label:`Number of LinkedIn followers`,placeholder:`1-500`,disableSearch:!0,description:``,required:!1,options:h(`crustdata.company_followers`),groupPath:`config.filters.web_presence`}).default([]),follower_growth_l6m_in_percent:j({path:`config.filters.follower_growth_l6m_in_percent`,sectionKey:`config.filters`,label:`LinkedIn follower growth within last 6 months`,required:!1,disableSearch:!0,placeholder:`0-10%`,description:``,options:h(`crustdata.follower_growth`),groupPath:`config.filters.web_presence`}).default([]),profile_summary_keywords:k({path:`config.filters.profile_summary_keywords`,sectionKey:`config.filters`,maxItems:50,label:`LinkedIn company description contains`,placeholder:J(`company_profile_keyword`),description:``,groupPath:`config.filters.keywords`}).default({include:[],exclude:[]}),competitor_domains:k({path:`config.filters.competitor_domains`,sectionKey:`config.filters`,maxItems:50,label:`Competitor domain`,description:``,placeholder:J(`company_domain`),groupPath:`config.filters.competitors`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),company_domains:k({path:`config.filters.company_domains`,sectionKey:`config.filters`,maxItems:400,label:`Company domain`,description:``,placeholder:J(`company_domain`),groupPath:`config.filters.web_presence`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),company_profile_urls:k({path:`config.filters.company_profile_urls`,sectionKey:`config.filters`,maxItems:2e3,label:`Company LinkedIn URL`,description:``,placeholder:`https://linkedin.com/company/...`,groupPath:`config.filters.web_presence`}).default({include:[],exclude:[]}),company_names:k({path:`config.filters.company_names`,sectionKey:`config.filters`,maxItems:2e3,label:`Company name`,description:``,placeholder:J(`company_name`),groupPath:`config.filters.web_presence`}).default({include:[],exclude:[]})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),XB={match:`any`,fields:[{fieldName:`company_profile_url`}]},ZB={allowManagedConnection:!0,mode:`per_page`,credits:{default:2}},QB=`companies-profiles-crustdata-v2`,$B=class extends Z{billing={billableOperation:QB,cost:ZB};searchId=UB;schema=YB;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[WB.name]:this.catalogOutput(WB),[GB.name]:this.catalogOutput(GB),[KB.name]:this.catalogOutput(KB),[qB.name]:this.catalogOutput(qB),[JB.name]:this.catalogOutput(JB)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_company_db_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return XB}},eV=YB,tV={searchId:UB,billableOperation:QB,baseSearch:Q(`companies:profiles:crustdata@2`),label:`Company search`,categories:[`deprecated`],paginationType:`cursor`,hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:{deprecatedOn:`2026-09-30`,replacedBy:`companies:profiles:crustdata@3`},description:`Filter-based company search on Crustdata's dataset — widest filter surface: funding, investors, headcount growth, LinkedIn signals.`,tags:[V.COMPANY_PROFILES],docPath:$(UB),cost:ZB,provider:`crustdata`,defaultPayload:{search_id:UB,connector:null,config:{limit:100,cursor:``,output_fields:{company_name:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},company_description:{enabled:!0,alias:``},company_profile_url:{enabled:!0,alias:``},crustdata_company_match:{enabled:!0,alias:``}},filters:{company_types:{include:[],exclude:[]},headcount_growth_l6m_in_percent:[],last_funding_amount:{from:null,to:null},last_funding_type:{include:[],exclude:[]},linkedin_industries:{include:[],exclude:[]},linkedin_categories:{include:[],exclude:[]},crunchbase_categories:{include:[],exclude:[]},markets:{include:[],exclude:[]},revenue_in_usd:{from:null,to:null},crunchbase_investors:{include:[],exclude:[]},tracxn_investors:{include:[],exclude:[]},follower_growth_l6m_in_percent:[],headcount:{include:[],exclude:[]},linkedin_headcount_ranges:[],hq_locations:{include:[],exclude:[]},number_of_followers:[],profile_summary_keywords:{include:[],exclude:[]},competitor_domains:{include:[],exclude:[]},company_domains:{include:[],exclude:[]},company_profile_urls:{include:[],exclude:[]},company_names:{include:[],exclude:[]}}}}},nV=`people:profiles:amplemarket@1`,rV=_(`name`),iV=_(`company_website_url`),aV=_(`profile_url`),oV=_(`job_title`),sV=_(`amplemarket_person_match`),cV=r.object({search_id:r.literal(nV),connector:ws.nullable().optional(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,label:`Limit`,sectionKey:`pagination`,description:`Max number of search results`}),page_number:N({path:`config.page_number`,groupPath:`config.pagination`,label:`Page number`,min:1,sectionKey:`pagination`,description:``}).nullish(),output_fields:P(r.object({[rV.name]:A({fieldName:rV.name}),[iV.name]:A({fieldName:iV.name}),[aV.name]:A({fieldName:aV.name}),[oV.name]:A({fieldName:oV.name}),[sV.name]:A({fieldName:sV.name})})),filters:r.object({person_names:O({label:`Full name`,path:`config.filters.person_names`,sectionKey:`config.filters`,groupPath:`config.filters.general`}),current_locations:M({path:`config.filters.current_locations`,sectionKey:`config.filters`,label:`Location`,optionsDef:g(`locations`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),current_job_titles:O({path:`config.filters.current_job_titles`,sectionKey:`config.filters`,label:`Title`,placeholder:J(`title`),description:``,order:1,groupPath:`config.filters.current_employer`,suggestionsDef:g(`titles`)}),current_seniority_levels:j({path:`config.filters.current_seniority_levels`,sectionKey:`config.filters`,placeholder:J(`seniority`),label:`Seniority`,required:!1,disableSearch:!1,options:h(`amplemarket.seniority_levels`),description:``,groupPath:`config.filters.current_employer`}).default([]),current_departments:j({path:`config.filters.current_departments`,sectionKey:`config.filters`,label:`Department`,placeholder:J(`department`),disableSearch:!1,required:!1,options:h(`amplemarket.departments`),description:``,groupPath:`config.filters.current_employer`}).default([]),current_job_functions:j({path:`config.filters.current_job_functions`,sectionKey:`config.filters`,label:`Job function`,placeholder:J(`job_function`),disableSearch:!1,required:!1,options:h(`amplemarket.job_functions`),description:``,groupPath:`config.filters.current_employer`}).default([]),current_employer_locations:M({path:`config.filters.current_employer_locations`,sectionKey:`config.filters`,label:`Headquarters`,optionsDef:g(`locations`),groupPath:`config.filters.current_company`,placeholder:J(`location`)}).default({include:[],exclude:[]}),current_employer_names:k({path:`config.filters.current_employer_names`,sectionKey:`config.filters`,label:`Company name`,groupPath:`config.filters.current_company`,description:``,placeholder:J(`company_name`),suggestionsDef:g(`company_names`)}).default({include:[],exclude:[]}),current_employer_website_urls:k({path:`config.filters.current_employer_website_urls`,sectionKey:`config.filters`,label:`Company domain`,description:``,maxItems:200,placeholder:J(`company_domain`),groupPath:`config.filters.current_company`,suggestionsDef:g(`company_domains`,{widgets:{emoji:{char:`🌐`}}})}).default({include:[],exclude:[]}),current_employer_linkedin_industries:j({path:`config.filters.current_employer_linkedin_industries`,sectionKey:`config.filters`,label:`Industry`,disableSearch:!1,groupPath:`config.filters.current_company`,description:``,placeholder:J(`industry`),required:!1,options:h(`linkedin.industries`)}).default([]),current_employer_estimated_revenue:j({path:`config.filters.current_employer_estimated_revenue`,sectionKey:`config.filters`,label:`Estimated revenue`,disableSearch:!1,required:!1,groupPath:`config.filters.current_company`,description:``,options:h(`amplemarket.company_revenue`)}).default([]),current_employer_founded_year:Nu({path:`config.filters.current_employer_founded_year`,sectionKey:`config.filters`,label:`Founded year`,groupPath:`config.filters.current_company`,min:0,max:2040,description:``}).default({min:null,max:null}),current_employer_investors:O({path:`config.filters.current_employer_investors`,sectionKey:`config.filters`,label:`Employer investors`,groupPath:`config.filters.current_company`,placeholder:J(`investor`),description:``}),current_employer_open_positions_titles:O({path:`config.filters.current_employer_open_positions_titles`,sectionKey:`config.filters`,label:`Open positions`,groupPath:`config.filters.current_company`,description:``,placeholder:J(`title`),suggestionsDef:g(`titles`)}),school_names:M({path:`config.filters.school_names`,sectionKey:`config.filters`,label:`School names`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),lV={allowManagedConnection:!0,mode:`per_page`,credits:{default:3},info:`1 page = 100 records; 200 results = 2 pages`},uV=`people-profiles-amplemarket-v1`,dV=class extends Z{billing={billableOperation:uV,cost:lV};searchId=nV;schema=cV;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[rV.name]:this.catalogOutput(rV),[iV.name]:this.catalogOutput(iV),[aV.name]:this.catalogOutput(aV),[oV.name]:this.catalogOutput(oV),[sV.name]:this.catalogOutput(sV)}}getConnectionsRequirements(){return[{provider:`amplemarket`,rateLimitOperation:`amplemarket_people_search`,rateLimitRatio:1,allowManagedConnection:!0}]}},fV=cV,pV={searchId:nV,billableOperation:uV,baseSearch:Q(`people:profiles:amplemarket@1`),paginationType:`page_number`,label:`People search`,categories:[`deprecated`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:{deprecatedOn:`2026-06-13`,replacedBy:`people:profiles:amplemarket@2`},description:`Filter-based people search.`,tags:[V.PEOPLE_PROFILES],docPath:$(nV),cost:lV,provider:`amplemarket`,defaultPayload:{search_id:nV,connector:null,config:{limit:50,page_number:1,output_fields:{name:{enabled:!0,alias:``},job_title:{enabled:!0,alias:``},profile_url:{enabled:!0,alias:``},company_website_url:{enabled:!0,alias:``},amplemarket_person_match:{enabled:!0,alias:``}},filters:{current_employer_names:{include:[],exclude:[]},current_departments:[],current_employer_locations:{include:[],exclude:[]},person_names:[],current_employer_founded_year:{min:null,max:null},current_employer_estimated_revenue:[],current_employer_investors:[],current_employer_open_positions_titles:[],current_job_functions:[],current_locations:{include:[],exclude:[]},current_employer_linkedin_industries:[],current_employer_website_urls:{include:[],exclude:[]},current_seniority_levels:[],school_names:{include:[],exclude:[]},current_job_titles:[]}}}},mV=`people:profiles:crustdata@1`,hV=_(`name`),gV=_(`company_website_url`),_V=_(`profile_url`),vV=_(`job_title`),yV=_(`crustdata_person_match`),bV=r.object({search_id:r.literal(mV),connector:ws.nullable().optional(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of search results`}),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[hV.name]:A({fieldName:hV.name}),[gV.name]:A({fieldName:gV.name}),[_V.name]:A({fieldName:_V.name}),[vV.name]:A({fieldName:vV.name}),[yV.name]:A({fieldName:yV.name})})),filters:r.object({locations:M({path:`config.filters.locations`,sectionKey:`config.filters`,label:`Location`,placeholder:J(`location`),optionsDef:g(`locations`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),current_job_titles:k({path:`config.filters.current_job_titles`,sectionKey:`config.filters`,label:`Title`,description:``,placeholder:J(`title`),order:1,groupPath:`config.filters.current_employer`,suggestionsDef:g(`titles`)}).default({include:[],exclude:[]}),current_employers:k({path:`config.filters.current_employers`,sectionKey:`config.filters`,label:`Company name`,description:``,placeholder:J(`company_name`),maxItems:200,groupPath:`config.filters.current_employer`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),current_employers_website_urls:k({path:`config.filters.current_employers_website_urls`,sectionKey:`config.filters`,label:`Company domain`,placeholder:J(`company_domain`),description:``,maxItems:200,groupPath:`config.filters.current_employer`,suggestionsDef:g(`company_domains`,{widgets:{emoji:{char:`🌐`}}})}).default({include:[],exclude:[]}),current_employers_linkedin_industries:M({path:`config.filters.current_employers_linkedin_industries`,sectionKey:`config.filters`,label:`Industry`,groupPath:`config.filters.current_employer`,placeholder:J(`industry`),description:``,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),years_at_current_company:j({path:`config.filters.years_at_current_company`,sectionKey:`config.filters`,label:`Years at current company`,placeholder:`1 to 2 years`,disableSearch:!1,required:!1,groupPath:`config.filters.current_employer`,description:``,options:h(`crustdata.years_of_experience`)}).default([]),previous_employers_website_urls:k({path:`config.filters.previous_employers_website_urls`,sectionKey:`config.filters`,label:`Previous employer domain`,description:``,placeholder:J(`company_domain`),maxItems:200,groupPath:`config.filters.experience`,suggestionsDef:g(`company_domains`,{widgets:{emoji:{char:`🌐`}}})}).default({include:[],exclude:[]}),previous_seniority_levels:Pu({path:`config.filters.previous_seniority_levels`,sectionKey:`config.filters`,label:`Previous seniority`,placeholder:J(`seniority`),disableSearch:!0,optionsDef:We(`crustdata.person_seniority`),description:``,groupPath:`config.filters.experience`}).default({include:[],exclude:[]}),previous_employers:k({path:`config.filters.previous_employers`,sectionKey:`config.filters`,label:`Previous employer`,description:``,placeholder:J(`company_name`),maxItems:200,groupPath:`config.filters.experience`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),previous_job_titles:k({path:`config.filters.previous_job_titles`,sectionKey:`config.filters`,label:`Previous title`,description:``,placeholder:J(`title`),groupPath:`config.filters.experience`,suggestionsDef:g(`titles`)}).default({include:[],exclude:[]}),previous_employers_linkedin_industries:M({path:`config.filters.previous_employers_linkedin_industries`,sectionKey:`config.filters`,label:`Previous employer industries`,placeholder:J(`industry`),groupPath:`config.filters.experience`,description:``,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),profile_headline_keywords:k({path:`config.filters.profile_headline_keywords`,sectionKey:`config.filters`,label:`Headline contains keywords`,maxItems:100,groupPath:`config.filters.keywords`,placeholder:J(`headline_keywords`)}).default({include:[],exclude:[]}),profile_summary_keywords:k({path:`config.filters.profile_summary_keywords`,sectionKey:`config.filters`,label:`Profile about section contains keywords`,maxItems:100,groupPath:`config.filters.keywords`,placeholder:J(`profile_keywords`)}).default({include:[],exclude:[]}),profile_languages:Pu({path:`config.filters.profile_languages`,sectionKey:`config.filters`,label:`Profile language`,placeholder:J(`languages`),optionsDef:We(`crustdata.person_profile_languages`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),languages:Pu({path:`config.filters.languages`,sectionKey:`config.filters`,label:`Spoken language`,placeholder:J(`languages_1`),optionsDef:We(`crustdata.person_profile_languages`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),skills:M({path:`config.filters.skills`,sectionKey:`config.filters`,label:`Skills`,description:``,placeholder:J(`skills`),groupPath:`config.filters.skills`,optionsDef:g(`skills`)}).default({include:[],exclude:[]}),years_of_experience:j({path:`config.filters.years_of_experience`,sectionKey:`config.filters`,label:`Years of experience`,placeholder:`1 to 2 years`,disableSearch:!0,description:``,required:!1,options:h(`crustdata.years_of_experience`),groupPath:`config.filters.experience`}).default([]),current_seniority_levels:Pu({path:`config.filters.current_seniority_levels`,sectionKey:`config.filters`,disableSearch:!0,label:`Seniority`,placeholder:J(`seniority`),optionsDef:We(`crustdata.person_seniority`),description:``,groupPath:`config.filters.experience`}).default({include:[],exclude:[]}),certifications:k({path:`config.filters.certifications`,sectionKey:`config.filters`,label:`Certifications`,groupPath:`config.filters.certifications_honors`,placeholder:J(`certification`),description:``}).default({include:[],exclude:[]}),honors:k({path:`config.filters.honors`,sectionKey:`config.filters`,label:`Honors`,groupPath:`config.filters.certifications_honors`,placeholder:J(`honor`),description:``}).default({include:[],exclude:[]}),recently_changed_jobs:zu({path:`config.filters.recently_changed_jobs`,sectionKey:`config.filters`,label:`Recently changed jobs`,description:``,defaultValue:null,groupPath:`config.filters.activities`}),fields_of_study:M({path:`config.filters.fields_of_study`,sectionKey:`config.filters`,label:`Fields of study`,placeholder:J(`field_of_study`),description:``,groupPath:`config.filters.education`,optionsDef:g(`person.education_field_of_study.crustdata`)}).default({include:[],exclude:[]}),degree_names:M({path:`config.filters.degree_names`,sectionKey:`config.filters`,label:`Degree names`,placeholder:J(`degree_name`),description:``,groupPath:`config.filters.education`,optionsDef:g(`person.education_degree.crustdata`)}).default({include:[],exclude:[]}),school_names:M({path:`config.filters.school_names`,sectionKey:`config.filters`,label:`School names`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]}),current_school_names:M({path:`config.filters.current_school_names`,sectionKey:`config.filters`,label:`Currently enrolled at`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]}),extracurricular_activities:k({path:`config.filters.extracurricular_activities`,sectionKey:`config.filters`,label:`Extracurricular activities`,description:``,placeholder:J(`extracurricular`),groupPath:`config.filters.education`,suggestionsDef:g(`person.education_activities.crustdata`)}).default({include:[],exclude:[]})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),xV={allowManagedConnection:!0,mode:`per_page`,credits:{default:5},info:`1 page = 100 records; 200 results = 2 pages`},SV=`people-profiles-crustdata-v1`,CV=class extends Z{billing={billableOperation:SV,cost:xV};searchId=mV;schema=bV;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[hV.name]:this.catalogOutput(hV),[gV.name]:this.catalogOutput(gV),[_V.name]:this.catalogOutput(_V),[vV.name]:this.catalogOutput(vV),[yV.name]:this.catalogOutput(yV)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_people_db_search`,rateLimitRatio:1,allowManagedConnection:!0}]}},wV=bV,TV={searchId:mV,billableOperation:SV,baseSearch:Q(`people:profiles:crustdata@1`),paginationType:`cursor`,label:`People search`,categories:[`deprecated`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:{deprecatedOn:`2026-06-13`,replacedBy:`people:profiles:crustdata@2`},description:`Filter-based people search.`,tags:[V.PEOPLE_PROFILES],docPath:$(mV),cost:xV,provider:`crustdata`,defaultPayload:{search_id:mV,connector:null,config:{limit:100,cursor:``,output_fields:{name:{enabled:!0,alias:``},job_title:{enabled:!0,alias:``},profile_url:{enabled:!0,alias:``},company_website_url:{enabled:!0,alias:``},crustdata_person_match:{enabled:!0,alias:``}},filters:{profile_headline_keywords:{include:[],exclude:[]},languages:{include:[],exclude:[]},profile_summary_keywords:{include:[],exclude:[]},previous_job_titles:{include:[],exclude:[]},current_employers:{include:[],exclude:[]},current_school_names:{include:[],exclude:[]},years_at_current_company:[],certifications:{include:[],exclude:[]},honors:{include:[],exclude:[]},current_employers_linkedin_industries:{include:[],exclude:[]},current_employers_website_urls:{include:[],exclude:[]},previous_employers_website_urls:{include:[],exclude:[]},current_seniority_levels:{include:[],exclude:[]},previous_seniority_levels:{include:[],exclude:[]},degree_names:{include:[],exclude:[]},locations:{include:[],exclude:[]},profile_languages:{include:[],exclude:[]},recently_changed_jobs:null,extracurricular_activities:{include:[],exclude:[]},school_names:{include:[],exclude:[]},fields_of_study:{include:[],exclude:[]},previous_employers:{include:[],exclude:[]},current_job_titles:{include:[],exclude:[]},skills:{include:[],exclude:[]},years_of_experience:[],previous_employers_linkedin_industries:{include:[],exclude:[]}}}}},EV=`entries:attio@1`,DV=_(`attio_entry_id`),OV=_(`attio_record_id`),kV=_(`attio_entry_match`),AV=r.object({search_id:r.literal(EV),connector:Jl(),config:r.object({list:Uu({path:`config.list`,groupPath:`config.general`,sectionKey:`general`,label:`List`,required:!0,info:`Attio lists are where pipelines live — entries carry list-level attributes like stage on top of their parent record.`,enabledIf:v(`attio`),optionsDef:Cf}),custom_properties:$L(`parent.name`,Af(`list`)),filters:eR(`stage`),stage:Uu({path:`config.stage`,groupPath:`config.general`,sectionKey:`general`,label:`Stage`,required:!1,info:`The selected list's status attribute — this workspace's actual titles.`,enabledIf:v(`attio`),optionsDef:wf(`list`),multiple:!0}),saved_view:tR(Tf({target:`lists`,fromField:`list`})),created_within:nR(),limit:ZL(),page_number:QL(),output_fields:P(r.object({[DV.name]:A({fieldName:DV.name}),[OV.name]:A({fieldName:OV.name}),[kV.name]:A({fieldName:kV.name})}))}).check(e=>rR(e,[`stage`,`created_within`]))}),jV={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own Attio workspace is free.`},MV=`entries-attio-v1`,NV=class extends Z{billing={billableOperation:MV,cost:jV};searchId=EV;schema=AV;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[DV.name]:this.catalogOutput(DV),[OV.name]:this.catalogOutput(OV),[kV.name]:this.catalogOutput(kV)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_query`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`attio_entry_id`}]}}async getAgentContext(e){return jf(e,{objects:`discover`,includeLists:!0})}},PV=AV,FV={searchId:EV,billableOperation:MV,baseSearch:Q(EV),outputFieldMode:`static`,paginationType:`page_number`,label:`Attio list entries`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List entries of an Attio list — where pipelines live. Each row carries the entry id, the parent record id, and a JSON with the entry's list-level attributes (like stage) plus picked parent-record attributes.`,tags:[V.NEW],keywords:[`crm`,`pipeline`,`stage`,`kanban`,`workflow`,`import`],docPath:$(EV),guide:"Attio pipelines are lists: pick the list, then filter on ENTRY attributes (stage titles come from the list's own status attribute) or on the parent record via `parent.` refs (e.g. `parent.domains.root_domain`, `parent.name.full_name`). Picked `parent.<slug>` attributes land in the entry JSON's custom_properties. attio_record_id is the PARENT record — chain it into record:lookup/record:update. A saved view of the list replaces the filter fields. Attio reports no total count — page until a short page.",cost:jV,provider:`attio`,defaultPayload:{search_id:EV,connector:{strategy:`first`,connections:[]},config:{list:``,custom_properties:[],filters:null,stage:[],saved_view:``,created_within:``,limit:100,page_number:1,output_fields:{attio_entry_id:{enabled:!0,alias:``},attio_record_id:{enabled:!0,alias:``},attio_entry_match:{enabled:!0,alias:``}}}}},IV=`events:googlecalendar@1`,LV=_(`google_calendar_event_id`),RV=_(`event_title`),zV=_(`attendee_emails`),BV=_(`calendar_event_match`),VV=[{value:`meeting`,label:`Meeting`},{value:`out_of_office`,label:`Out of office`},{value:`focus_time`,label:`Focus time`},{value:`working_location`,label:`Working location`},{value:`birthday`,label:`Birthday`},{value:`from_gmail`,label:`From Gmail`}],HV=[`meeting`],UV=[{label:`Primary calendar (primary)`,value:`primary`},{label:`Team calendar (sample)`,value:`cal-sandbox-1`}];async function WV(e){let t=await fetch(`https://www.googleapis.com/calendar/v3/users/me/calendarList`,{headers:{accept:`application/json`,Authorization:`Bearer ${e}`}});if(!t.ok){let e=await t.text();throw Error(`Failed to list Google calendars: ${e}`)}return await t.json()}const GV=r.object({search_id:r.literal(IV),connector:Jl(),config:r.object({calendar_id:Uu({path:`config.calendar_id`,groupPath:`config.general`,sectionKey:`general`,label:`Calendar`,required:!1,info:`Defaults to the account's primary calendar.`,enabledIf:v(`googlecalendar`),optionsDef:{requires:{connection:`googlecalendar`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return UV;if(!t)throw Error(`A Google Calendar connection is required to list calendars.`);let r=((await WV(t)).items||[]).filter(e=>!!e?.id).map(e=>({label:`${e.summaryOverride||e.summary||e.id}${e.primary?` (primary)`:``}`,value:e.id}));return e?r.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):r}}}),time_window:Hu({required:!1,path:`config.time_window`,groupPath:`config.general`,sectionKey:`general`,label:`Time window`,description:`Rolling window relative to when the search runs, not calendar days.`,options:[{label:`Any time`,value:``},{label:`Next 24 hours`,value:`n24h`},{label:`Next 2 days`,value:`n48h`},{label:`Next 7 days`,value:`n7d`},{label:`Next 30 days`,value:`n30d`},{label:`Last 24 hours`,value:`l24h`},{label:`Last 7 days`,value:`l7d`},{label:`Last 30 days`,value:`l30d`}]}).default(`n7d`),event_types:j({path:`config.event_types`,groupPath:`config.general`,sectionKey:`general`,label:`Event types`,placeholder:`Meeting`,disableSearch:!1,required:!1,description:`Defaults to meetings only.`,options:VV}).default(HV),limit:N({path:`config.limit`,min:1,max:250,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of events per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[LV.name]:A({fieldName:LV.name}),[RV.name]:A({fieldName:RV.name}),[zV.name]:A({fieldName:zV.name}),[BV.name]:A({fieldName:BV.name})}))})}),KV={match:`any`,fields:[{fieldName:`google_calendar_event_id`}]},qV={allowManagedConnection:!1,mode:null,credits:null,info:`Google Calendar searches are free — you bring your own Google Calendar connection.`},JV=`events-googlecalendar-v1`,YV=class extends Z{billing={billableOperation:JV,cost:qV};searchId=IV;schema=GV;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[LV.name]:this.catalogOutput(LV),[RV.name]:this.catalogOutput(RV),[zV.name]:this.catalogOutput(zV),[BV.name]:this.catalogOutput(BV)}}getConnectionsRequirements(){return[{provider:`googlecalendar`,rateLimitOperation:`googlecalendar_api`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return KV}async getAgentContext(e){if(e.environment===`sandbox`)return{summary:"Sandbox: calendar list is synthetic. Available calendars: `primary`, `cal-sandbox-1`."};let t=e.connectionSecrets.googlecalendar;if(!t)return null;let n=((await WV(t)).items||[]).filter(e=>!!e?.id).map(e=>({id:e.id,name:e.summaryOverride||e.summary||e.id,timezone:e.timeZone||null,primary:!!e.primary}));return{summary:`Calendars visible to this connection:\n${n.map(e=>`- \`${e.id}\` — ${e.name}${e.primary?` (primary)`:``}`).join(`
86
86
  `)}`,data:{calendars:n}}}},XV=GV,ZV={searchId:IV,billableOperation:JV,baseSearch:Q(IV),outputFieldMode:`static`,paginationType:`cursor`,label:`Google Calendar events`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List events from a Google Calendar: one row per event (recurring events expanded into occurrences) with title, attendee emails, and a standardized calendar_event_match object (times, timezone, type, location, organizer, meeting link).`,tags:[V.EVENTS,V.NEW],keywords:[`gcal`,`meetings`,`appointments`,`agenda`,`schedule`,`meeting prep`],docPath:$(IV),guide:"Time windows are rolling intervals relative to when the search runs (UTC), not calendar days — `n24h` means 'the next 24 hours from now'. Recurring events arrive expanded, one row per occurrence, each with its own stable instance ID (the dedup key). Event types are normalized cross-provider values (meeting, out_of_office, focus_time, working_location, birthday, from_gmail); by default ONLY meeting events are returned — add other values to event_types to include them. Start/end/timezone/location/meeting link live inside calendar_event_match (expand with json:extract:multi@1); all-day events carry bare dates there, and the end date is exclusive. Cancelled events are not returned. 'Any time' on a calendar with long recurring series pages very far — prefer a window. attendee_emails excludes meeting rooms and is the natural input for company-domain enrichment (e.g. company:domain:email@1 → company:newssummary:domain@1 for meeting prep).",cost:qV,provider:`googlecalendar`,defaultPayload:{search_id:IV,connector:{strategy:`first`,connections:[]},config:{calendar_id:``,time_window:`n7d`,event_types:HV,limit:100,cursor:``,output_fields:{google_calendar_event_id:{enabled:!0,alias:``},event_title:{enabled:!0,alias:``},attendee_emails:{enabled:!0,alias:``},calendar_event_match:{enabled:!0,alias:``}}}}},QV=`leads:salesforce@1`,$V=_(`salesforce_record_id`),eH=_(`first_name`),tH=_(`last_name`),nH=_(`email`),rH=_(`company_name`),iH=_(`salesforce_lead_match`),aH=r.object({search_id:r.literal(QV),connector:Jl(),config:r.object({custom_properties:CL(),filters:wL(`LeadSource`),list_view:TL(`Lead`),lead_status:Uu({path:`config.lead_status`,groupPath:`config.general`,sectionKey:`general`,label:`Lead status`,required:!1,info:`The org's actual status values — custom entries included.`,enabledIf:v(`salesforce`),optionsDef:qd}),include_converted:Ru({path:`config.include_converted`,groupPath:`config.general`,sectionKey:`general`,label:`Include converted leads`,description:`Converted leads are read-only history pointing at the contact they became — excluded by default.`,defaultValue:!1}),owner:EL(),created_within:OL(),modified_within:kL(),limit:AL(),cursor:jL(),output_fields:P(r.object({[$V.name]:A({fieldName:$V.name}),[eH.name]:A({fieldName:eH.name}),[tH.name]:A({fieldName:tH.name}),[nH.name]:A({fieldName:nH.name}),[rH.name]:A({fieldName:rH.name}),[iH.name]:A({fieldName:iH.name})}))}).check(e=>ML([`lead_status`,`owner`,`created_within`,`modified_within`])(e))}),oH={allowManagedConnection:!1,mode:null,credits:null,info:`Salesforce searches are free — you bring your own Salesforce connection.`},sH=`leads-salesforce-v1`,cH=class extends Z{billing={billableOperation:sH,cost:oH};searchId=QV;schema=aH;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[$V.name]:this.catalogOutput($V),[eH.name]:this.catalogOutput(eH),[tH.name]:this.catalogOutput(tH),[nH.name]:this.catalogOutput(nH),[rH.name]:this.catalogOutput(rH),[iH.name]:this.catalogOutput(iH)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitOperation:`salesforce_api`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`salesforce_record_id`}]}}async getAgentContext(e){return ef(e,{objects:[`Lead`],includeListViewsFor:[`Lead`]})}},lH=aH,uH={searchId:QV,billableOperation:sH,baseSearch:Q(QV),outputFieldMode:`static`,paginationType:`cursor`,label:`Salesforce leads`,categories:[`people`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List leads from your Salesforce org: identity columns (id, name, email, company) plus a JSON record with the standard field set. Converted leads are excluded by default; filter with field conditions or run one of the org's own list views.`,tags:[V.EMAIL,V.NEW],keywords:[`crm`,`sfdc`,`prospect`,`list`,`records`,`import`,`demand gen`],docPath:$(QV),guide:"Call get_provider_context first for the org's field API names and status values — use them verbatim. Leads are pre-qualification records: Company is plain text (no account link), and converted leads (IsConverted = true) are read-only history excluded by default — the JSON carries IsConverted/ConvertedContactId when you include them. Duplicate emails across leads are normal in demand-gen orgs. To find untouched leads, filter on `LastActivityDate` (e.g. `LastActivityDate < LAST_N_DAYS:90` — closed tasks + events, not literal touches). `list_view` runs the org's own segmentation (XOR with filters/shortcuts). Results page by record id; rows the connected user cannot see are silently absent.",cost:oH,provider:`salesforce`,defaultPayload:{search_id:QV,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,list_view:``,lead_status:``,include_converted:!1,owner:``,created_within:``,modified_within:``,limit:100,cursor:``,output_fields:{salesforce_record_id:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},email:{enabled:!0,alias:``},company_name:{enabled:!0,alias:``},salesforce_lead_match:{enabled:!0,alias:``}}}}},dH=`opportunities:salesforce@1`,fH=_(`salesforce_record_id`),pH=_(`deal_name`),mH=_(`deal_amount`),hH=_(`salesforce_opportunity_match`),gH=r.object({search_id:r.literal(dH),connector:Jl(),config:r.object({custom_properties:CL(),filters:wL(`StageName`),list_view:TL(`Opportunity`),status:Hu({required:!1,path:`config.status`,groupPath:`config.general`,sectionKey:`general`,label:`Status`,description:`Filters on Salesforce's computed IsClosed / IsWon — org-invariant, unlike stage names.`,options:[{label:`Any`,value:`any`},{label:`Open`,value:`open`},{label:`Won`,value:`won`},{label:`Lost`,value:`lost`}]}).default(`any`),stage:Uu({path:`config.stage`,groupPath:`config.general`,sectionKey:`general`,label:`Stage`,required:!1,info:`The org's own OpportunityStage list.`,enabledIf:v(`salesforce`),optionsDef:Gd}),amount:Nu({path:`config.amount`,groupPath:`config.general`,sectionKey:`general`,label:`Amount`,min:0,max:0xe8d4a51000,info:`In multi-currency orgs the bounds compare in the corporate currency.`}),owner:EL(),created_within:OL(),modified_within:kL(),limit:AL(),cursor:jL(),output_fields:P(r.object({[fH.name]:A({fieldName:fH.name}),[pH.name]:A({fieldName:pH.name}),[mH.name]:A({fieldName:mH.name}),[hH.name]:A({fieldName:hH.name})}))}).check(e=>ML([`stage`,`amount`,`owner`,`created_within`,`modified_within`])(e))}),_H={allowManagedConnection:!1,mode:null,credits:null,info:`Salesforce searches are free — you bring your own Salesforce connection.`},vH=`opportunities-salesforce-v1`,yH=class extends Z{billing={billableOperation:vH,cost:_H};searchId=dH;schema=gH;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[fH.name]:this.catalogOutput(fH),[pH.name]:this.catalogOutput(pH),[mH.name]:this.catalogOutput(mH),[hH.name]:this.catalogOutput(hH)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitOperation:`salesforce_api`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`salesforce_record_id`}]}}async getAgentContext(e){return ef(e,{objects:[`Opportunity`],includeStages:!0,includeListViewsFor:[`Opportunity`]})}},bH=gH,xH={searchId:dH,billableOperation:vH,baseSearch:Q(dH),outputFieldMode:`static`,paginationType:`cursor`,label:`Salesforce opportunities`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List opportunities from your Salesforce org: identity columns (id, name, amount) plus a JSON record with the standard field set (including IsClosed/IsWon). Filter by status, stage, amount, or field conditions — or run one of the org's own list views.`,tags:[V.NEW],keywords:[`crm`,`sfdc`,`deal`,`pipeline`,`revenue`,`list`,`records`],docPath:$(dH),guide:"Filter open/won via `status` (computed IsClosed/IsWon — org-invariant); `stage` values are OpportunityStage ApiNames from get_provider_context — never assume a stage named 'Closed Won' exists. Close-date windows go through filter rows (CloseDate lte/gte with ISO dates or SOQL literals). In multi-currency orgs Amount bounds compare in the corporate currency. To find deals gone quiet, filter on `LastActivityDate` (e.g. `LastActivityDate < LAST_N_DAYS:30` — closed tasks + events, not literal touches). `list_view` runs the org's own segmentation (XOR with filters/shortcuts). Results page by record id; rows the connected user cannot see are silently absent.",cost:_H,provider:`salesforce`,defaultPayload:{search_id:dH,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,list_view:``,status:`any`,stage:``,amount:{min:null,max:null},owner:``,created_within:``,modified_within:``,limit:100,cursor:``,output_fields:{salesforce_record_id:{enabled:!0,alias:``},deal_name:{enabled:!0,alias:``},deal_amount:{enabled:!0,alias:``},salesforce_opportunity_match:{enabled:!0,alias:``}}}}},SH=`owners:hubspot@1`,CH=_(`hubspot_owner_id`),wH=_(`email`),TH=_(`first_name`),EH=_(`last_name`),DH=_(`hubspot_owned_count`),OH=_(`hubspot_owner_match`),kH=r.object({search_id:r.literal(SH),connector:Jl(),config:r.object({email:Bu({path:`config.email`,groupPath:`config.general`,inputType:`text`,label:`Email`,sectionKey:`general`,info:`Only return the owner with this exact email.`}).nullable(),include_archived:Ru({path:`config.include_archived`,groupPath:`config.general`,sectionKey:`general`,label:`Include deactivated owners`,description:``,defaultValue:!1}),owned_object_type:Hu({required:!1,path:`config.owned_object_type`,groupPath:`config.counts`,sectionKey:`general`,label:`Count owned`,description:"Which records to count per owner (via `hubspot_owner_id`).",options:[{label:`Companies`,value:`companies`},{label:`Contacts`,value:`contacts`},{label:`Deals`,value:`deals`}]}).default(`companies`),min_owned_count:N({path:`config.min_owned_count`,min:0,groupPath:`config.counts`,sectionKey:`general`,label:`Minimum owned`,description:`Only return owners owning MORE than this many records. Counting costs one search request per owner (~5/second).`}).nullable(),include_ownership_counts:Ru({path:`config.include_ownership_counts`,groupPath:`config.counts`,sectionKey:`general`,label:`Include ownership counts`,description:`Adds an owned-record count column (one search request per owner, ~5/second).`,defaultValue:!0}),limit:N({path:`config.limit`,min:1,max:2e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Maximum number of owners returned.`}).default(500),output_fields:P(r.object({[CH.name]:A({fieldName:CH.name}),[wH.name]:A({fieldName:wH.name}),[TH.name]:A({fieldName:TH.name}),[EH.name]:A({fieldName:EH.name}),[DH.name]:A({fieldName:DH.name}),[OH.name]:A({fieldName:OH.name})}))})}),AH={allowManagedConnection:!1,mode:null,credits:null,info:`Listing your own HubSpot owners is free.`},jH=`owners-hubspot-v1`,MH=class extends Z{billing={billableOperation:jH,cost:AH};searchId=SH;schema=kH;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[CH.name]:this.catalogOutput(CH),[wH.name]:this.catalogOutput(wH),[TH.name]:this.catalogOutput(TH),[EH.name]:this.catalogOutput(EH),[DH.name]:this.catalogOutput(DH),[OH.name]:this.catalogOutput(OH)}}getConnectionsRequirements(){return[{provider:`hubspot`,rateLimitOperation:`hubspot_crm_search`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`hubspot_owner_id`}]}}async getAgentContext(e){return pp(e,{objectTypes:[]})}},NH=kH,PH={searchId:SH,billableOperation:jH,baseSearch:Q(SH),outputFieldMode:`static`,paginationType:`cursor`,label:`HubSpot owners`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List the owners (users) of your HubSpot portal, optionally with how many companies, contacts, or deals each owns — e.g. all owners with more than 50 companies.`,tags:[V.FIELDS,V.NEW],keywords:[`crm`,`users`,`sales reps`,`assignment`,`rollup`,`count`],docPath:$(SH),guide:"HubSpot has no aggregation API — ownership counts are computed with one count-search per owner against the portal's shared 5 requests/second search budget (expect ~N/5 seconds for N owners). Counts are accurate beyond the 10,000-result search cap. The owner id column matches `hubspot_owner_id` values on records.",cost:AH,provider:`hubspot`,defaultPayload:{search_id:SH,connector:{strategy:`first`,connections:[]},config:{email:``,include_archived:!1,owned_object_type:`companies`,min_owned_count:null,include_ownership_counts:!0,limit:500,output_fields:{hubspot_owner_id:{enabled:!0,alias:``},email:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},hubspot_owned_count:{enabled:!0,alias:``},hubspot_owner_match:{enabled:!0,alias:``}}}}},FH=`people:attio@1`,IH=_(`attio_record_id`),LH=_(`email`),RH=_(`first_name`),zH=_(`last_name`),BH=_(`attio_person_match`),VH=r.object({search_id:r.literal(FH),connector:Jl(),config:r.object({custom_properties:$L(`job_title`,kf({target:`objects`,identifier:`people`})),filters:eR(`job_title`),has_email:Ru({path:`config.has_email`,groupPath:`config.general`,sectionKey:`general`,defaultValue:!1,label:`Has email`,info:`Only people with at least one email address.`}),saved_view:tR(Tf({target:`objects`,identifier:`people`})),created_within:nR(),limit:ZL(),page_number:QL(),output_fields:P(r.object({[IH.name]:A({fieldName:IH.name}),[LH.name]:A({fieldName:LH.name}),[RH.name]:A({fieldName:RH.name}),[zH.name]:A({fieldName:zH.name}),[BH.name]:A({fieldName:BH.name})}))}).check(e=>rR(e,[`has_email`,`created_within`]))}),HH={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own Attio workspace is free.`},UH=`people-attio-v1`,WH=class extends Z{billing={billableOperation:UH,cost:HH};searchId=FH;schema=VH;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[IH.name]:this.catalogOutput(IH),[LH.name]:this.catalogOutput(LH),[RH.name]:this.catalogOutput(RH),[zH.name]:this.catalogOutput(zH),[BH.name]:this.catalogOutput(BH)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_query`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`attio_record_id`}]}}async getAgentContext(e){return jf(e,{objects:[`people`],includeViewsFor:[`people`]})}},GH=VH,KH={searchId:FH,billableOperation:UH,baseSearch:Q(FH),outputFieldMode:`static`,paginationType:`page_number`,label:`Attio people`,categories:[`people`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List people from your Attio workspace: identity columns (id, email, name) plus a JSON record with the standard attribute set and any custom attributes you pick.`,tags:[V.EMAIL,V.NEW],keywords:[`crm`,`list`,`records`,`import`,`contact`,`workspace`],docPath:$(FH),guide:`Call get_provider_context first for this workspace's attribute slugs and enumeration titles — use api_slugs verbatim. Standard attributes become typed columns; everything else (standard set + picked custom attributes) rides in the person JSON — expand it or chain json:extract downstream. Filters support any attribute (select/status = equality on workspace-defined titles); a saved view replaces the filter fields entirely. For staleness, filter or sort on last_interaction (targets its interacted_at timestamp) — Attio's read-only communication-intelligence signal, auto-populated from members' synced email/calendar (e.g. people with no interaction in 90 days). Attio reports no total count — page until a short page.`,cost:HH,provider:`attio`,defaultPayload:{search_id:FH,connector:{strategy:`first`,connections:[]},config:{custom_properties:[],filters:null,has_email:!1,saved_view:``,created_within:``,limit:100,page_number:1,output_fields:{attio_record_id:{enabled:!0,alias:``},email:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},attio_person_match:{enabled:!0,alias:``}}}}},qH=`people:channelmembers:slack@1`,JH=_(`name`),YH=_(`email`),XH=_(`slack_user_id`),ZH=_(`slack_member_match`),QH=[{value:`internal`,label:`Workspace members`},{value:`external`,label:`External (Slack Connect)`}],$H=[`internal`],eU=r.object({search_id:r.literal(qH),connector:Jl(),config:r.object({channel_id:Uu({path:`config.channel_id`,groupPath:`config.general`,sectionKey:`general`,label:`Channel`,required:!0,info:"Only public channels and private channels the pipe0 app has been invited to are listed. Slack Connect channels are usually private, so run `/invite @pipe0` in one to make it selectable at all.",enabledIf:v(`slack`),optionsDef:BO}),include_bots:Ru({path:`config.include_bots`,groupPath:`config.general`,sectionKey:`general`,label:`Include bots`,description:`Also list app/bot members of the channel.`,defaultValue:!1}),member_types:j({path:`config.member_types`,groupPath:`config.general`,sectionKey:`general`,label:`Member types`,placeholder:`Workspace members`,disableSearch:!0,required:!0,description:`Defaults to workspace members only.`,info:"External (Slack Connect) members are not in the workspace user directory. Invite the pipe0 app to the shared channel (`/invite @pipe0`) or they return as ID-only rows — and their email is never exposed.",guide:"Select only `external` to list just the partner/customer side of a shared channel.",options:QH}).default($H),limit:N({path:`config.limit`,min:1,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of members per page`}).default(200),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[JH.name]:A({fieldName:JH.name}),[YH.name]:A({fieldName:YH.name}),[XH.name]:A({fieldName:XH.name}),[ZH.name]:A({fieldName:ZH.name})}))})}),tU={match:`any`,fields:[{fieldName:`slack_user_id`}]},nU={allowManagedConnection:!1,mode:null,credits:null,info:`Slack searches are free — you bring your own Slack connection.`},rU=`people-channelmembers-slack-v1`,iU=class extends Z{billing={billableOperation:rU,cost:nU};searchId=qH;schema=eU;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[JH.name]:this.catalogOutput(JH),[YH.name]:this.catalogOutput(YH),[XH.name]:this.catalogOutput(XH),[ZH.name]:this.catalogOutput(ZH)}}getConnectionsRequirements(){return[{provider:`slack`,rateLimitOperation:`slack_api_read`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return tU}async getAgentContext(e){if(e.environment===`sandbox`)return{summary:'Sandbox: channel list is synthetic. Available channels: `C0SANDBOX001` (#demo-general), `C0SANDBOX002` (#demo-alerts). `config.member_types` defaults to `["internal"]`; selecting `"external"` adds synthetic Slack Connect members, including one unresolvable ID-only row.'};let t=this.payload.config.channel_id,n=Array.isArray(t)?t[0]:t;if(!n)return null;let r=e.connectionSecrets.slack;if(!r)return null;let i=await(await fetch(`https://slack.com/api/conversations.info?channel=${encodeURIComponent(n)}`,{headers:{Authorization:`Bearer ${r}`},signal:AbortSignal.timeout(1e4)})).json();if(!i.ok||!i.channel)throw new K.HttpError({msg:i.error??`slack_error`});let a=i.channel,o=a.name?`#${a.name}`:n,s=!!a.is_ext_shared||!!a.is_org_shared,c=a.is_member!==!1,l=a.shared_team_ids?.length??0;return{summary:s?c?`${o} is a Slack Connect channel${l?` shared with ${l} team(s)`:``}. The pipe0 app is in the channel, so external members' names and titles resolve. Add \`"external"\` to \`config.member_types\` to include them — their email is never returned (\`users:read.email\` is workspace-scoped), and each row is flagged \`slack_member_match.is_external\`.`:`${o} is a Slack Connect channel, but the pipe0 app is NOT a member, so external members cannot be resolved — they come back as ID-only rows (\`is_external: true\`, name and email null). Ask the user to run \`/invite @pipe0\` in ${o}, or leave \`config.member_types\` at \`["internal"]\`.`:`${o} is not a Slack Connect channel — every member is in the workspace directory. Leave \`config.member_types\` at \`["internal"]\`.`,data:{channel_name:a.name??null,is_ext_shared:!!a.is_ext_shared,is_org_shared:!!a.is_org_shared,is_member:c,shared_team_ids:a.shared_team_ids??[],pending_connected_team_ids:a.pending_connected_team_ids??[],external_members_resolvable:s&&c}}}},aU=eU,oU={searchId:qH,billableOperation:rU,baseSearch:Q(qH),outputFieldMode:`static`,paginationType:`cursor`,label:`Slack channel members`,categories:[`people`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List the members of a Slack channel: one row per person with full name, email address (when the workspace exposes it), Slack user ID, and a standardized slack_member_match object (handle, title, timezone, admin/guest flags).`,tags:[V.NEW],keywords:[`workspace`,`team roster`,`coworkers`,`colleagues`,`participants`,`audience`],docPath:$(qH),guide:`Rows come from the channel's member list, resolved against the workspace user directory. member_email/email is only present when the connection holds users:read.email AND the workspace exposes emails — treat empty email as 'hidden', not 'does not exist'. Bots and app users are excluded unless include_bots is set; deactivated members are not in channels. slack_user_id is the join key for message:send-direct:slack@1 (DM each member) and the dedup key. The channel picker only sees public channels plus private channels the pipe0 app is in — and Slack Connect channels are usually private, so a shared channel will not even be selectable until someone runs /invite @pipe0 in it. A bot token cannot enumerate private channels it is not a member of, so an absent channel means 'not invited', never 'does not exist'. Title/phone/timezone live inside slack_member_match (expand with json:extract:multi@1). member_types selects which members come back: 'internal' = the workspace directory (users.list), 'external' = Slack Connect members shared in from another workspace. Externals resolve to a name/title only while the pipe0 app is a member of the shared channel, and their email is never exposed — check slack_member_match.is_external per row. Selecting only 'external' lists the partner/customer side of a shared channel. Members that cannot be resolved are dropped unless 'external' is selected. Call get_provider_context once a channel is picked: it reports whether that channel is Slack Connect and whether the app is in it.`,cost:nU,provider:`slack`,defaultPayload:{search_id:qH,connector:{strategy:`first`,connections:[]},config:{channel_id:``,include_bots:!1,member_types:$H,limit:200,cursor:``,output_fields:{name:{enabled:!0,alias:``},email:{enabled:!0,alias:``},slack_user_id:{enabled:!0,alias:``},slack_member_match:{enabled:!0,alias:``}}}}},sU=`people:entitysearch:parallel@1`,cU=_(`name`),lU=_(`job_title`),uU=_(`profile_url`),dU=_(`parallel_person_entity_match`),fU=r.object({search_id:r.literal(sU),connector:Yl(),config:r.object({objective:Vu({path:`config.objective`,sectionKey:`general`,groupPath:`config.general`,label:`Objective`,rows:4,minLength:10,placeholder:`Heads of Engineering at Series B fintech companies in the US`,description:`Plain-text natural-language description of the people to find.`}),limit:N({path:`config.limit`,min:5,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of entities to return (5–1000).`}).default(100),output_fields:P(r.object({[cU.name]:A({fieldName:cU.name}),[lU.name]:A({fieldName:lU.name}),[uU.name]:A({fieldName:uU.name}),[dU.name]:A({fieldName:dU.name})}))})}),pU={match:`any`,fields:[{fieldName:`profile_url`}]},mU={allowManagedConnection:!0,mode:`per_page`,credits:{default:.5},info:`1 page = 100 results; billed per 100 results returned (e.g. 100 results = 1 page, 1,000 results = 10 pages). A search returns up to your selected limit in a single request.`},hU=`people-entitysearch-parallel-v1`,gU=class extends Z{billing={billableOperation:hU,cost:mU};searchId=sU;schema=fU;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[cU.name]:this.catalogOutput(cU),[lU.name]:this.catalogOutput(lU),[uU.name]:this.catalogOutput(uU),[dU.name]:this.catalogOutput(dU)}}getConnectionsRequirements(){return[{provider:`parallel`,rateLimitOperation:`parallel_entity_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return pU}},_U=fU,vU={searchId:sU,billableOperation:hU,baseSearch:Q(sU),label:`People search (AI)`,categories:[`people`],paginationType:`page_number`,hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Natural-language people search powered by Parallel Entity Search — for asks static filters can't express.`,tags:[V.PEOPLE_PROFILES],keywords:[`prospect`,`lead`,`contact`,`find people`,`natural language`],docPath:$(sU),guide:`Best for asks the static filters of the amplemarket or crustdata people searches can't express — check their schemas first. Returns sparse records (identity basics plus a match rationale) that need further enrichment, where the filter-based datasets return full profiles. When filters get close, prefer a broad filter-based search narrowed by enrichment + row filtering over a natural-language objective.`,cost:mU,provider:`parallel`,defaultPayload:{search_id:sU,connector:null,config:{objective:``,limit:100,output_fields:{name:{enabled:!0,alias:``},job_title:{enabled:!0,alias:``},profile_url:{enabled:!0,alias:``},parallel_person_entity_match:{enabled:!1,alias:``}}}}},yU=`people:eventguests:luma@1`,bU=_(`name`),xU=_(`email`),SU=_(`luma_id`),CU=_(`registered_at`),wU=_(`luma_event_guest_match`),TU=[{label:`Sample Meetup — Berlin`,value:`evt-sandbox-1`},{label:`Sample Conference — SF`,value:`evt-sandbox-2`}],EU={requires:{connection:`luma`},options:async({query:e,secret:t,environment:n})=>{if(n===`sandbox`)return TU;if(!t)throw Error(`A Luma connection is required to list events.`);let r=await fetch(`https://public-api.luma.com/v1/calendar/list-events`,{headers:{accept:`application/json`,"x-luma-api-key":t}});if(!r.ok){let e=await r.text();throw Error(`Failed to list Luma events: ${e}`)}let i=((await r.json()).entries||[]).filter(e=>!!e?.id).map(e=>({label:e.name||e.id,value:e.id}));return e?i.filter(t=>t.label.toLowerCase().includes(e.toLowerCase())):i}},DU=r.object({search_id:r.literal(yU),connector:Jl(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of guests per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[bU.name]:A({fieldName:bU.name}),[xU.name]:A({fieldName:xU.name}),[SU.name]:A({fieldName:SU.name}),[CU.name]:A({fieldName:CU.name}),[wU.name]:A({fieldName:wU.name})})),filters:r.object({event_id:Uu({path:`config.filters.event_id`,sectionKey:`config.filters`,groupPath:`config.filters.event`,label:`Event`,required:!0,info:`Pick one of your Luma events; guests of this event are returned.`,enabledIf:v(`luma`),optionsDef:EU}),approval_status:Hu({path:`config.filters.approval_status`,sectionKey:`config.filters`,groupPath:`config.filters.event`,label:`Approval status`,description:`Only return guests with this approval status.`,required:!1,options:[{value:`approved`,label:`Approved`},{value:`pending_approval`,label:`Pending approval`},{value:`declined`,label:`Declined`},{value:`waitlist`,label:`Waitlist`},{value:`invited`,label:`Invited`}]})})})}),OU={match:`any`,fields:[{fieldName:`luma_id`}]},kU={allowManagedConnection:!0,mode:`per_page`,credits:{default:1},info:`1 page = up to 100 guests.`},AU=`people-eventguests-luma-v1`,jU=class extends Z{billing={billableOperation:AU,cost:kU};searchId=yU;schema=DU;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[bU.name]:this.catalogOutput(bU),[xU.name]:this.catalogOutput(xU),[SU.name]:this.catalogOutput(SU),[CU.name]:this.catalogOutput(CU),[wU.name]:this.catalogOutput(wU)}}getConnectionsRequirements(){return[{provider:`luma`,rateLimitOperation:`luma_get_guests`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return OU}},MU=DU,NU={searchId:yU,billableOperation:AU,baseSearch:Q(yU),paginationType:`cursor`,label:`List event guests`,categories:[`people`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`Fetch all guests of a Luma event using your own Luma API key.`,tags:[V.PEOPLE_PROFILES,V.EVENTS,V.NEW],keywords:[`attendees`,`rsvp`,`meetup`,`conference`,`registrations`,`participants`],docPath:$(yU),cost:kU,provider:`luma`,defaultPayload:{search_id:yU,connector:{strategy:`first`,connections:[]},config:{limit:100,cursor:``,output_fields:{name:{enabled:!0,alias:``},email:{enabled:!0,alias:``},luma_id:{enabled:!0,alias:``},registered_at:{enabled:!0,alias:``},luma_event_guest_match:{enabled:!0,alias:``}},filters:{event_id:``,approval_status:``}}}},PU=`people:profiles:amplemarket@2`,FU=_(`name`),IU=_(`company_domain`),LU=_(`profile_url`),RU=_(`job_title`),zU=_(`amplemarket_person_match`),BU=r.object({search_id:r.literal(PU),connector:Yl(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,label:`Page size`,sectionKey:`pagination`,description:`Max number of search results per page`}).default(50),page_number:N({path:`config.page_number`,groupPath:`config.pagination`,label:`Page number`,min:1,sectionKey:`pagination`,description:``}).nullish(),output_fields:P(r.object({[FU.name]:A({fieldName:FU.name}),[IU.name]:A({fieldName:IU.name}),[LU.name]:A({fieldName:LU.name}),[RU.name]:A({fieldName:RU.name}),[zU.name]:A({fieldName:zU.name})})),filters:r.object({person_name:Bu({label:`Full name`,path:`config.filters.person_name`,sectionKey:`config.filters`,inputType:`text`,description:``,groupPath:`config.filters.general`}).default(``),current_locations:M({path:`config.filters.current_locations`,sectionKey:`config.filters`,label:`Location`,optionsDef:g(`locations`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),current_job_titles:O({path:`config.filters.current_job_titles`,sectionKey:`config.filters`,label:`Title`,placeholder:J(`title`),description:``,order:1,groupPath:`config.filters.current_employer`,suggestionsDef:g(`titles`)}),current_seniority_levels:j({path:`config.filters.current_seniority_levels`,sectionKey:`config.filters`,placeholder:J(`seniority`),label:`Seniority`,required:!1,disableSearch:!1,options:h(`amplemarket.seniority_levels`),description:``,groupPath:`config.filters.current_employer`}).default([]),current_departments:j({path:`config.filters.current_departments`,sectionKey:`config.filters`,label:`Department`,placeholder:J(`department`),disableSearch:!1,required:!1,options:h(`amplemarket.departments`),description:``,groupPath:`config.filters.current_employer`}).default([]),current_job_functions:j({path:`config.filters.current_job_functions`,sectionKey:`config.filters`,label:`Job function`,placeholder:J(`job_function`),disableSearch:!1,required:!1,options:h(`amplemarket.job_functions`),description:``,groupPath:`config.filters.current_employer`}).default([]),current_employer_locations:M({path:`config.filters.current_employer_locations`,sectionKey:`config.filters`,label:`Headquarters`,optionsDef:g(`locations`),groupPath:`config.filters.current_company`,placeholder:J(`location`)}).default({include:[],exclude:[]}),current_employer_names:k({path:`config.filters.current_employer_names`,sectionKey:`config.filters`,label:`Company name`,groupPath:`config.filters.current_company`,description:``,placeholder:J(`company_name`),suggestionsDef:g(`company_names`)}).default({include:[],exclude:[]}),current_employer_domains:k({path:`config.filters.current_employer_domains`,sectionKey:`config.filters`,label:`Company domain`,description:``,maxItems:200,placeholder:J(`company_domain`),groupPath:`config.filters.current_company`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),current_employer_linkedin_industries:j({path:`config.filters.current_employer_linkedin_industries`,sectionKey:`config.filters`,label:`Industry`,disableSearch:!1,groupPath:`config.filters.current_company`,description:``,placeholder:J(`industry`),required:!1,options:h(`linkedin.industries`)}).default([]),current_employer_estimated_revenue:j({path:`config.filters.current_employer_estimated_revenue`,sectionKey:`config.filters`,label:`Estimated revenue`,disableSearch:!1,required:!1,groupPath:`config.filters.current_company`,description:``,options:h(`amplemarket.company_revenue`)}).default([]),current_employer_founded_year:Nu({path:`config.filters.current_employer_founded_year`,sectionKey:`config.filters`,label:`Founded year`,groupPath:`config.filters.current_company`,min:0,max:2040,description:``}).default({min:null,max:null}),current_employer_investors:O({path:`config.filters.current_employer_investors`,sectionKey:`config.filters`,label:`Employer investors`,groupPath:`config.filters.current_company`,placeholder:J(`investor`),description:``}),current_employer_open_position_titles:O({path:`config.filters.current_employer_open_position_titles`,sectionKey:`config.filters`,label:`Open positions`,groupPath:`config.filters.current_company`,description:``,placeholder:J(`title`),suggestionsDef:g(`titles`)}),school_names:Wu({path:`config.filters.school_names`,sectionKey:`config.filters`,label:`School names`,disableSearch:!1,description:``,placeholder:J(`school`),required:!1,groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default([])}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),VU={match:`any`,fields:[{fieldName:`profile_url`}]},HU={allowManagedConnection:!0,mode:`per_page`,credits:{default:3},info:`1 page = 100 records; 200 results = 2 pages`},UU=`people-profiles-amplemarket-v2`,WU=class extends Z{billing={billableOperation:UU,cost:HU};searchId=PU;schema=BU;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[FU.name]:this.catalogOutput(FU),[IU.name]:this.catalogOutput(IU),[LU.name]:this.catalogOutput(LU),[RU.name]:this.catalogOutput(RU),[zU.name]:this.catalogOutput(zU)}}getConnectionsRequirements(){return[{provider:`amplemarket`,rateLimitOperation:`amplemarket_people_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return VU}},GU=BU,KU={searchId:PU,billableOperation:UU,baseSearch:Q(`people:profiles:amplemarket@2`),paginationType:`page_number`,label:`People search`,categories:[`people`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Filter-based people search on Amplemarket's dataset — precise prospecting filters.`,tags:[V.PEOPLE_PROFILES],keywords:[`prospect`,`lead`,`contact`,`find people`,`filters`],docPath:$(PU),guide:`The most precise of the three prospecting datasets — prefer it when its filters express the ask exactly. If a needed criterion is missing here, check the crustdata search's wider filter set before falling back to the natural-language parallel search.`,cost:HU,provider:`amplemarket`,defaultPayload:{search_id:PU,connector:null,config:{limit:50,page_number:1,output_fields:{name:{enabled:!0,alias:``},job_title:{enabled:!0,alias:``},profile_url:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},amplemarket_person_match:{enabled:!0,alias:``}},filters:{current_employer_names:{include:[],exclude:[]},current_departments:[],current_employer_locations:{include:[],exclude:[]},person_name:``,current_employer_founded_year:{min:null,max:null},current_employer_estimated_revenue:[],current_employer_investors:[],current_employer_open_position_titles:[],current_job_functions:[],current_locations:{include:[],exclude:[]},current_employer_linkedin_industries:[],current_employer_domains:{include:[],exclude:[]},current_seniority_levels:[],school_names:[],current_job_titles:[]}}}},qU=`people:profiles:crustdata@2`,JU=_(`name`),YU=_(`company_domain`),XU=_(`profile_url`),ZU=_(`job_title`),QU=_(`crustdata_person_match`),$U=r.object({search_id:r.literal(qU),connector:Yl(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page size`,description:`Max number of search results per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[JU.name]:A({fieldName:JU.name}),[YU.name]:A({fieldName:YU.name}),[XU.name]:A({fieldName:XU.name}),[ZU.name]:A({fieldName:ZU.name}),[QU.name]:A({fieldName:QU.name})})),filters:r.object({locations:M({path:`config.filters.locations`,sectionKey:`config.filters`,label:`Location`,placeholder:J(`location`),optionsDef:g(`locations`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),current_job_titles:k({path:`config.filters.current_job_titles`,sectionKey:`config.filters`,label:`Title`,description:``,placeholder:J(`title`),order:1,groupPath:`config.filters.current_employer`,suggestionsDef:g(`titles`)}).default({include:[],exclude:[]}),current_employer_names:k({path:`config.filters.current_employer_names`,sectionKey:`config.filters`,label:`Company name`,description:``,placeholder:J(`company_name`),maxItems:200,groupPath:`config.filters.current_employer`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),current_employer_domains:k({path:`config.filters.current_employer_domains`,sectionKey:`config.filters`,label:`Company domain`,placeholder:J(`company_domain`),description:``,maxItems:200,groupPath:`config.filters.current_employer`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),current_employer_industries:M({path:`config.filters.current_employer_industries`,sectionKey:`config.filters`,label:`Industry`,groupPath:`config.filters.current_employer`,placeholder:J(`industry`),description:``,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),years_at_current_company:j({path:`config.filters.years_at_current_company`,sectionKey:`config.filters`,label:`Years at current company`,placeholder:`1 to 2 years`,disableSearch:!1,required:!1,groupPath:`config.filters.current_employer`,description:``,options:h(`crustdata.years_of_experience`)}).default([]),previous_employer_domains:k({path:`config.filters.previous_employer_domains`,sectionKey:`config.filters`,label:`Previous employer domain`,description:``,placeholder:J(`company_domain`),maxItems:200,groupPath:`config.filters.experience`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),previous_seniority_levels:Pu({path:`config.filters.previous_seniority_levels`,sectionKey:`config.filters`,label:`Previous seniority`,placeholder:J(`seniority`),disableSearch:!0,optionsDef:We(`crustdata.person_seniority`),description:``,groupPath:`config.filters.experience`}).default({include:[],exclude:[]}),previous_employer_names:k({path:`config.filters.previous_employer_names`,sectionKey:`config.filters`,label:`Previous employer`,description:``,placeholder:J(`company_name`),maxItems:200,groupPath:`config.filters.experience`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),previous_job_titles:k({path:`config.filters.previous_job_titles`,sectionKey:`config.filters`,label:`Previous title`,description:``,placeholder:J(`title`),groupPath:`config.filters.experience`,suggestionsDef:g(`titles`)}).default({include:[],exclude:[]}),previous_employer_industries:M({path:`config.filters.previous_employer_industries`,sectionKey:`config.filters`,label:`Previous employer industries`,placeholder:J(`industry`),groupPath:`config.filters.experience`,description:``,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),profile_headline_keywords:k({path:`config.filters.profile_headline_keywords`,sectionKey:`config.filters`,label:`Headline contains keywords`,maxItems:100,groupPath:`config.filters.keywords`,placeholder:J(`headline_keywords`)}).default({include:[],exclude:[]}),profile_summary_keywords:k({path:`config.filters.profile_summary_keywords`,sectionKey:`config.filters`,label:`Profile about section contains keywords`,maxItems:100,groupPath:`config.filters.keywords`,placeholder:J(`profile_keywords`)}).default({include:[],exclude:[]}),profile_languages:Pu({path:`config.filters.profile_languages`,sectionKey:`config.filters`,label:`Profile language`,placeholder:J(`languages`),optionsDef:We(`crustdata.person_profile_languages`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),languages:Pu({path:`config.filters.languages`,sectionKey:`config.filters`,label:`Spoken language`,placeholder:J(`languages_1`),optionsDef:We(`crustdata.person_profile_languages`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),skills:M({path:`config.filters.skills`,sectionKey:`config.filters`,label:`Skills`,description:``,placeholder:J(`skills`),groupPath:`config.filters.skills`,optionsDef:g(`skills`)}).default({include:[],exclude:[]}),years_of_experience:j({path:`config.filters.years_of_experience`,sectionKey:`config.filters`,label:`Years of experience`,placeholder:`1 to 2 years`,disableSearch:!0,description:``,required:!1,options:h(`crustdata.years_of_experience`),groupPath:`config.filters.experience`}).default([]),current_seniority_levels:Pu({path:`config.filters.current_seniority_levels`,sectionKey:`config.filters`,disableSearch:!0,label:`Seniority`,placeholder:J(`seniority`),optionsDef:We(`crustdata.person_seniority`),description:``,groupPath:`config.filters.experience`}).default({include:[],exclude:[]}),certifications:k({path:`config.filters.certifications`,sectionKey:`config.filters`,label:`Certifications`,groupPath:`config.filters.certifications_honors`,placeholder:J(`certification`),description:``}).default({include:[],exclude:[]}),honors:k({path:`config.filters.honors`,sectionKey:`config.filters`,label:`Honors`,groupPath:`config.filters.certifications_honors`,placeholder:J(`honor`),description:``}).default({include:[],exclude:[]}),recently_changed_jobs:zu({path:`config.filters.recently_changed_jobs`,sectionKey:`config.filters`,label:`Recently changed jobs`,description:``,defaultValue:null,groupPath:`config.filters.activities`}),fields_of_study:M({path:`config.filters.fields_of_study`,sectionKey:`config.filters`,label:`Fields of study`,placeholder:J(`field_of_study`),description:``,groupPath:`config.filters.education`,optionsDef:g(`person.education_field_of_study.crustdata`)}).default({include:[],exclude:[]}),degree_names:M({path:`config.filters.degree_names`,sectionKey:`config.filters`,label:`Degree names`,placeholder:J(`degree_name`),description:``,groupPath:`config.filters.education`,optionsDef:g(`person.education_degree.crustdata`)}).default({include:[],exclude:[]}),school_names:M({path:`config.filters.school_names`,sectionKey:`config.filters`,label:`School names`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]}),current_school_names:M({path:`config.filters.current_school_names`,sectionKey:`config.filters`,label:`Currently enrolled at`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]}),extracurricular_activities:k({path:`config.filters.extracurricular_activities`,sectionKey:`config.filters`,label:`Extracurricular activities`,description:``,placeholder:J(`extracurricular`),groupPath:`config.filters.education`,suggestionsDef:g(`person.education_activities.crustdata`)}).default({include:[],exclude:[]}),post_processing_exclude_company_profile_urls:O({path:`config.filters.post_processing_exclude_company_profile_urls`,sectionKey:`config.filters`,groupPath:`config.filters.post_processing`,label:`Exclude company profiles`,maxItems:5e3,placeholder:`https://linkedin.com/company/...`,description:`Company LinkedIn URLs (https://www.linkedin.com/company/{slug}) removed from the search results`}).default([]),post_processing_exclude_company_names:O({path:`config.filters.post_processing_exclude_company_names`,sectionKey:`config.filters`,groupPath:`config.filters.post_processing`,label:`Exclude company names`,maxItems:5e3,placeholder:J(`company_name`),description:`Company names removed from the search results`}).default([])}).check(e=>{let{post_processing_exclude_company_profile_urls:t,post_processing_exclude_company_names:n,...r}=e.value;zR(r)&&e.issues.push({code:`custom`,message:`You must set at least one meaningful filter.`,input:e.value})})})}),eW={match:`any`,fields:[{fieldName:`profile_url`}]},tW={allowManagedConnection:!0,mode:`per_page`,credits:{default:5},info:`1 page = 100 records; 200 results = 2 pages`},nW=`people-profiles-crustdata-v2`,rW=class extends Z{billing={billableOperation:nW,cost:tW};searchId=qU;schema=$U;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[JU.name]:this.catalogOutput(JU),[YU.name]:this.catalogOutput(YU),[XU.name]:this.catalogOutput(XU),[ZU.name]:this.catalogOutput(ZU),[QU.name]:this.catalogOutput(QU)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_people_db_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return eW}},iW=$U,aW={searchId:qU,billableOperation:nW,baseSearch:Q(`people:profiles:crustdata@2`),paginationType:`cursor`,label:`People search`,categories:[`people`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Filter-based people search on Crustdata's dataset — widest filter surface: employer, growth, and LinkedIn signals.`,tags:[V.PEOPLE_PROFILES],keywords:[`prospect`,`lead`,`contact`,`find people`,`linkedin`],docPath:$(qU),guide:`The general-purpose default among the three prospecting datasets, with the widest filter surface (employer, growth, LinkedIn signals). When a criterion isn't an exact filter match, search broadly here and narrow afterwards — enrich the qualifying signal, then filter rows — rather than switching to the natural-language parallel search.`,cost:tW,provider:`crustdata`,defaultPayload:{search_id:qU,connector:null,config:{limit:100,cursor:``,output_fields:{name:{enabled:!0,alias:``},job_title:{enabled:!0,alias:``},profile_url:{enabled:!0,alias:``},company_domain:{enabled:!0,alias:``},crustdata_person_match:{enabled:!0,alias:``}},filters:{profile_headline_keywords:{include:[],exclude:[]},languages:{include:[],exclude:[]},profile_summary_keywords:{include:[],exclude:[]},previous_job_titles:{include:[],exclude:[]},current_employer_names:{include:[],exclude:[]},current_school_names:{include:[],exclude:[]},years_at_current_company:[],certifications:{include:[],exclude:[]},honors:{include:[],exclude:[]},current_employer_industries:{include:[],exclude:[]},current_employer_domains:{include:[],exclude:[]},previous_employer_domains:{include:[],exclude:[]},current_seniority_levels:{include:[],exclude:[]},previous_seniority_levels:{include:[],exclude:[]},degree_names:{include:[],exclude:[]},locations:{include:[],exclude:[]},profile_languages:{include:[],exclude:[]},recently_changed_jobs:null,extracurricular_activities:{include:[],exclude:[]},school_names:{include:[],exclude:[]},fields_of_study:{include:[],exclude:[]},previous_employer_names:{include:[],exclude:[]},current_job_titles:{include:[],exclude:[]},skills:{include:[],exclude:[]},years_of_experience:[],previous_employer_industries:{include:[],exclude:[]},post_processing_exclude_company_profile_urls:[],post_processing_exclude_company_names:[]}}}},oW=`people:profiles:crustdata@3`,sW=_(`name`),cW=_(`profile_url`),lW=_(`person_profile_match`),uW=r.object({search_id:r.literal(oW),connector:Yl(),config:r.object({limit:N({path:`config.limit`,min:1,max:1e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page size`,description:`Max number of search results per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),output_fields:P(r.object({[sW.name]:A({fieldName:sW.name}),[cW.name]:A({fieldName:cW.name}),[lW.name]:A({fieldName:lW.name})})),filters:r.object({recently_changed_jobs:zu({path:`config.filters.recently_changed_jobs`,sectionKey:`config.filters`,label:`Recently changed jobs`,description:``,defaultValue:null,groupPath:`config.filters.activities`}),certifications:k({path:`config.filters.certifications`,sectionKey:`config.filters`,label:`Certifications`,groupPath:`config.filters.certifications_honors`,placeholder:J(`certification`),description:``,suggestionsDef:g(`person.certifications.crustdata`)}).default({include:[],exclude:[]}),honors:k({path:`config.filters.honors`,sectionKey:`config.filters`,label:`Honors`,groupPath:`config.filters.certifications_honors`,placeholder:J(`honor`),description:``,suggestionsDef:g(`person.honors.crustdata`)}).default({include:[],exclude:[]}),current_employer_domains:k({path:`config.filters.current_employer_domains`,sectionKey:`config.filters`,label:`Company domain`,placeholder:J(`company_domain`),description:``,maxItems:200,groupPath:`config.filters.current_employer`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),current_employer_headcount_brackets:j({path:`config.filters.current_employer_headcount_brackets`,sectionKey:`config.filters`,label:`Headcount`,description:``,placeholder:`1-10`,disableSearch:!0,required:!1,options:h(`crustdata.company_size`),groupPath:`config.filters.current_employer`}).default([]),current_employer_industries:M({path:`config.filters.current_employer_industries`,sectionKey:`config.filters`,label:`Industry`,groupPath:`config.filters.current_employer`,placeholder:J(`industry`),description:``,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),current_employer_names:k({path:`config.filters.current_employer_names`,sectionKey:`config.filters`,label:`Company name`,description:``,placeholder:J(`company_name`),maxItems:200,groupPath:`config.filters.current_employer`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),current_employment_job_functions:j({path:`config.filters.current_employment_job_functions`,sectionKey:`config.filters`,label:`Function`,groupPath:`config.filters.current_employer`,placeholder:J(`job_function`),description:``,disableSearch:!0,required:!1,options:h(`employment_function.crustdata`)}).default([]),current_employment_job_titles:k({path:`config.filters.current_employment_job_titles`,sectionKey:`config.filters`,label:`Title`,description:``,placeholder:J(`title`),order:1,groupPath:`config.filters.current_employer`,suggestionsDef:g(`titles`)}).default({include:[],exclude:[]}),current_employment_seniority_levels:j({path:`config.filters.current_employment_seniority_levels`,sectionKey:`config.filters`,disableSearch:!0,label:`Seniority`,placeholder:J(`seniority`),options:We(`crustdata.person_seniority`).options,required:!1,description:``,groupPath:`config.filters.current_employer`}).default([]),current_employment_tenure_brackets:j({path:`config.filters.current_employment_tenure_brackets`,sectionKey:`config.filters`,label:`Years at current company`,placeholder:`1 to 2 years`,disableSearch:!1,required:!1,groupPath:`config.filters.current_employer`,description:``,options:h(`crustdata.years_of_experience`)}).default([]),current_school_names:M({path:`config.filters.current_school_names`,sectionKey:`config.filters`,label:`Currently enrolled at`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]}),degree_names:M({path:`config.filters.degree_names`,sectionKey:`config.filters`,label:`Degree`,placeholder:J(`degree_name`),description:``,groupPath:`config.filters.education`,optionsDef:g(`person.education_degree.crustdata`)}).default({include:[],exclude:[]}),fields_of_study:M({path:`config.filters.fields_of_study`,sectionKey:`config.filters`,label:`Field of study`,placeholder:J(`field_of_study`),description:``,groupPath:`config.filters.education`,optionsDef:g(`person.education_field_of_study.crustdata`)}).default({include:[],exclude:[]}),school_names:M({path:`config.filters.school_names`,sectionKey:`config.filters`,label:`School`,description:``,placeholder:J(`school`),groupPath:`config.filters.education`,optionsDef:g(`schools`)}).default({include:[],exclude:[]}),previous_employer_domains:k({path:`config.filters.previous_employer_domains`,sectionKey:`config.filters`,label:`Previous employer domain`,description:``,placeholder:J(`company_domain`),maxItems:200,groupPath:`config.filters.experience`,suggestionsDef:g(`company_domains`,{widgets:e=>({logo_url:{url:Ht(e.value)}})})}).default({include:[],exclude:[]}),previous_employer_headcount_brackets:j({path:`config.filters.previous_employer_headcount_brackets`,sectionKey:`config.filters`,label:`Previous employer headcount`,description:``,placeholder:`1-10`,disableSearch:!0,required:!1,options:h(`crustdata.company_size`),groupPath:`config.filters.experience`}).default([]),previous_employer_industries:M({path:`config.filters.previous_employer_industries`,sectionKey:`config.filters`,label:`Previous employer industry`,placeholder:J(`industry`),groupPath:`config.filters.experience`,description:``,optionsDef:g(`linkedin_industries.crustdata`,{limit:300})}).default({include:[],exclude:[]}),previous_employer_names:k({path:`config.filters.previous_employer_names`,sectionKey:`config.filters`,label:`Previous employer name`,description:``,placeholder:J(`company_name`),maxItems:200,groupPath:`config.filters.experience`,suggestionsDef:g(`company_names`,{widgets:{emoji:{char:`🏷️`}}})}).default({include:[],exclude:[]}),previous_employment_job_functions:j({path:`config.filters.previous_employment_job_functions`,sectionKey:`config.filters`,label:`Previous function`,groupPath:`config.filters.experience`,placeholder:J(`job_function`),description:``,disableSearch:!0,required:!1,options:h(`employment_function.crustdata`)}).default([]),previous_employment_job_titles:k({path:`config.filters.previous_employment_job_titles`,sectionKey:`config.filters`,label:`Previous title`,description:``,placeholder:J(`title`),groupPath:`config.filters.experience`,suggestionsDef:g(`titles`)}).default({include:[],exclude:[]}),previous_employment_seniority_levels:j({path:`config.filters.previous_employment_seniority_levels`,sectionKey:`config.filters`,label:`Previous seniority`,placeholder:J(`seniority`),disableSearch:!0,options:We(`crustdata.person_seniority`).options,required:!1,description:``,groupPath:`config.filters.experience`}).default([]),previous_employment_tenure_brackets:j({path:`config.filters.previous_employment_tenure_brackets`,sectionKey:`config.filters`,label:`Years at previous company`,placeholder:`1 to 2 years`,disableSearch:!1,required:!1,groupPath:`config.filters.experience`,description:``,options:h(`crustdata.years_of_experience`)}).default([]),total_years_of_experience_brackets:j({path:`config.filters.total_years_of_experience_brackets`,sectionKey:`config.filters`,label:`Years of experience`,placeholder:`1 to 2 years`,disableSearch:!0,description:``,required:!1,options:h(`crustdata.years_of_experience`),groupPath:`config.filters.experience`}).default([]),languages:Pu({path:`config.filters.languages`,sectionKey:`config.filters`,label:`Spoken language`,placeholder:J(`languages_1`),optionsDef:We(`crustdata.person_profile_languages`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),locations:M({path:`config.filters.locations`,sectionKey:`config.filters`,label:`Location`,placeholder:J(`location`),optionsDef:g(`locations`),groupPath:`config.filters.general`}).default({include:[],exclude:[]}),about_section_keywords:k({path:`config.filters.about_section_keywords`,sectionKey:`config.filters`,label:`Profile about section contains keywords`,maxItems:100,groupPath:`config.filters.keywords`,placeholder:J(`profile_keywords`)}).default({include:[],exclude:[]}),profile_headline_keywords:k({path:`config.filters.profile_headline_keywords`,sectionKey:`config.filters`,label:`Headline contains keywords`,maxItems:100,groupPath:`config.filters.keywords`,placeholder:J(`headline_keywords`)}).default({include:[],exclude:[]}),skills:M({path:`config.filters.skills`,sectionKey:`config.filters`,label:`Skills`,description:``,placeholder:J(`skills`),groupPath:`config.filters.skills`,optionsDef:g(`skills`)}).default({include:[],exclude:[]})}).check(e=>{zR(e.value)&&e.issues.push({code:`custom`,message:`You must set at least one filter.`,input:e.value})})})}),dW={match:`any`,fields:[{fieldName:`profile_url`}]},fW={allowManagedConnection:!0,mode:`per_result`,credits:{default:.15,level1:{credits:.07,weight:10}},info:`1 page = 100 records; 200 results = 2 pages`},pW=`people-profiles-crustdata-v3`,mW=class extends Z{billing={billableOperation:pW,cost:fW};searchId=oW;schema=uW;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[sW.name]:this.catalogOutput(sW),[cW.name]:this.catalogOutput(cW),[lW.name]:this.catalogOutput(lW)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_people_db_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return dW}},hW=uW,gW={searchId:oW,billableOperation:pW,baseSearch:Q(`people:profiles:crustdata@2`),paginationType:`cursor`,label:`People search`,categories:[`people`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Filter-based people search on Crustdata's dataset — widest filter surface: employer, growth, and LinkedIn signals.`,tags:[V.PEOPLE_PROFILES],keywords:[`prospect`,`lead`,`contact`,`find people`,`linkedin`],docPath:$(oW),guide:`The general-purpose default among the three prospecting datasets, with the widest filter surface (employer, growth, LinkedIn signals). When a criterion isn't an exact filter match, search broadly here and narrow afterwards — enrich the qualifying signal, then filter rows — rather than switching to the natural-language parallel search.`,cost:fW,provider:`crustdata`,defaultPayload:{search_id:oW,connector:null,config:{limit:100,cursor:``,output_fields:{name:{enabled:!0,alias:``},profile_url:{enabled:!0,alias:``},person_profile_match:{enabled:!0,alias:``}},filters:{recently_changed_jobs:null,certifications:{include:[],exclude:[]},honors:{include:[],exclude:[]},current_employer_domains:{include:[],exclude:[]},current_employer_headcount_brackets:[],current_employer_industries:{include:[],exclude:[]},current_employer_names:{include:[],exclude:[]},current_employment_job_functions:[],current_employment_job_titles:{include:[],exclude:[]},current_employment_seniority_levels:[],current_employment_tenure_brackets:[],current_school_names:{include:[],exclude:[]},degree_names:{include:[],exclude:[]},fields_of_study:{include:[],exclude:[]},school_names:{include:[],exclude:[]},previous_employer_domains:{include:[],exclude:[]},previous_employer_headcount_brackets:[],previous_employer_industries:{include:[],exclude:[]},previous_employer_names:{include:[],exclude:[]},previous_employment_job_functions:[],previous_employment_job_titles:{include:[],exclude:[]},previous_employment_seniority_levels:[],previous_employment_tenure_brackets:[],total_years_of_experience_brackets:[],languages:{include:[],exclude:[]},locations:{include:[],exclude:[]},about_section_keywords:{include:[],exclude:[]},profile_headline_keywords:{include:[],exclude:[]},skills:{include:[],exclude:[]}}}}},_W=`posts:content:crustdata@1`,vW=_(`post_match`),yW=_(`post_text`),bW=_(`post_id`),xW=r.object({search_id:r.literal(_W),connector:Yl(),config:r.object({limit:N({path:`config.limit`,min:1,max:100,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page size`,description:`Max number of search results per page`}).default(100),output_fields:P(r.object({[bW.name]:A({fieldName:bW.name}),[vW.name]:A({fieldName:vW.name}),[yW.name]:A({fieldName:yW.name})})),filters:r.object({keywords:O({path:`config.filters.keywords`,sectionKey:`config.filters`,label:`Search keywords`,groupPath:`config.filters.general`,maxItems:6,placeholder:J(`profile_keywords`),description:``}).default([]),keyword_operator:Hu({path:`config.filters.keyword_operator`,sectionKey:`config.filters`,label:`Keyword operator`,groupPath:`config.filters.general`,options:[{value:`OR`,label:`Any keyword (OR)`},{value:`AND`,label:`All keywords (AND)`}],required:!0,defaultValue:`OR`,description:`Post must match any or all keywords.`}).default(`OR`),date_posted:Hu({path:`config.filters.date_posted`,sectionKey:`config.filters`,label:`Date posted`,groupPath:`config.filters.general`,options:We(`crustdata.post_date_posted`).options,placeholder:`Past 24h, past week, ...`,required:!1,defaultValue:``,description:`Only return posts published within this recency window.`}).default(``),content_types:j({path:`config.filters.content_types`,sectionKey:`config.filters`,label:`Content type`,groupPath:`config.filters.general`,options:h(`crustdata.post_content_type`),disableSearch:!0,required:!1,placeholder:`Photos, jobs, ...`,description:``}).default([]),author_industries:Wu({path:`config.filters.author_industries`,sectionKey:`config.filters`,label:`Author industry`,groupPath:`config.filters.author`,optionsDef:g(`linkedin_industries.crustdata`),disableSearch:!1,required:!1,maxItems:100,placeholder:J(`industry`),description:`Only return posts whose author works in one of these industries.`}).default([]),author_company_profile_url:O({path:`config.filters.author_company_profile_url`,sectionKey:`config.filters`,label:`Author company profile URL`,groupPath:`config.filters.author`,maxItems:50,placeholder:`https://linkedin.com/company/..., ...`,description:`Only return posts whose author currently works at these companies (by LinkedIn profile URL).`}).default([]),author_title:O({path:`config.filters.author_title`,sectionKey:`config.filters`,label:`Author title`,groupPath:`config.filters.author`,maxItems:50,suggestionsDef:g(`titles`),placeholder:J(`title`),description:`Only return posts whose author holds one of these titles.`}).default([]),author_profile_url:O({path:`config.filters.author_profile_url`,sectionKey:`config.filters`,label:`Author profile URL`,groupPath:`config.filters.author`,maxItems:50,placeholder:`https://linkedin.com/in/..., ...`,description:`Only return posts authored by these people (by LinkedIn profile URL).`}).default([]),authoring_company_profile_url:O({path:`config.filters.authoring_company_profile_url`,sectionKey:`config.filters`,label:`Authoring company profile URL`,groupPath:`config.filters.author`,maxItems:50,placeholder:`https://linkedin.com/company/..., ...`,description:`Only return posts authored by these companies (by LinkedIn profile URL).`}).default([]),companies_mentioned_in_post:O({path:`config.filters.companies_mentioned_in_post`,sectionKey:`config.filters`,label:`Companies mentioned in post`,groupPath:`config.filters.mentions`,maxItems:50,placeholder:`https://linkedin.com/company/..., ...`,description:`Only return posts that mention these companies (by LinkedIn profile URL).`}).default([]),people_mentioned_in_post:O({path:`config.filters.people_mentioned_in_post`,sectionKey:`config.filters`,label:`People mentioned in post`,groupPath:`config.filters.mentions`,maxItems:50,placeholder:`https://linkedin.com/in/..., ...`,description:`Only return posts that mention these people (by LinkedIn profile URL).`}).default([])}).check(e=>{let t=e.value,n=t.keywords.some(e=>e.trim()!==``),r=[t.author_industries,t.author_company_profile_url,t.author_title,t.author_profile_url,t.authoring_company_profile_url,t.companies_mentioned_in_post,t.people_mentioned_in_post].some(e=>e.length>0);!n&&!r&&e.issues.push({code:`custom`,message:`Provide a keyword or at least one filter.`,input:e.value,path:[`keywords`]});let i=t.author_industries.length>0||t.author_company_profile_url.length>0||t.author_title.length>0||t.author_profile_url.length>0;t.authoring_company_profile_url.length>0&&i&&e.issues.push({code:`custom`,message:`Authoring company profile URL can't be combined with author profile URL, company name, title, or industry filters.`,input:e.value,path:[`authoring_company_profile_url`]})})})}),SW={match:`any`,fields:[{fieldName:`post_id`}]},CW={allowManagedConnection:!0,mode:`per_result`,credits:{default:2}},wW=`posts-content-crustdata-v1`,TW=class extends Z{billing={billableOperation:wW,cost:CW};searchId=_W;schema=xW;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[bW.name]:this.catalogOutput(bW),[vW.name]:this.catalogOutput(vW),[yW.name]:this.catalogOutput(yW)}}getConnectionsRequirements(){return[{provider:`crustdata`,rateLimitOperation:`crustdata_social_post_search`,rateLimitRatio:1,allowManagedConnection:!0}]}getDedupConfig(){return SW}},EW=xW,DW={searchId:_W,billableOperation:wW,baseSearch:Q(_W),paginationType:`page_number`,label:`LinkedIn post search`,categories:[`people`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`Keyword-based LinkedIn post search.`,tags:[V.LINKEDIN],keywords:[`content`,`social`,`engagement`,`keyword`,`activity`],docPath:$(_W),cost:CW,provider:`crustdata`,defaultPayload:{search_id:_W,connector:null,config:{limit:100,output_fields:{post_id:{enabled:!0,alias:``},post_text:{enabled:!0,alias:``},post_match:{enabled:!0,alias:``}},filters:{keywords:[],keyword_operator:`OR`,date_posted:``,content_types:[],author_industries:[],author_company_profile_url:[],author_title:[],author_profile_url:[],authoring_company_profile_url:[],companies_mentioned_in_post:[],people_mentioned_in_post:[]}}}},OW=`query:attio@1`,kW=r.object({search_id:r.literal(OW),connector:Jl(),config:r.object({query:Vu({path:`config.query`,groupPath:`config.general`,sectionKey:`general`,label:`SQL query`,description:`A single read-only SELECT statement (PostgreSQL dialect; Attio Enterprise plan only). It is wrapped automatically for pagination, so do not add your own LIMIT/OFFSET for paging.`,rows:8,minLength:1,maxLength:2e4}),limit:ZL(),page_number:QL()})}),AW={allowManagedConnection:!1,mode:null,credits:null,info:`Querying your own Attio workspace is free.`},jW=`query-attio-v1`,MW=class extends Z{billing={billableOperation:jW,cost:AW};searchId=OW;schema=kW;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_sql`,rateLimitRatio:1,allowManagedConnection:!1}]}async getAgentContext(e){return jf(e,{objects:`discover`,includeLists:!0})}},NW=kW,PW={searchId:OW,billableOperation:jW,baseSearch:Q(OW),outputFieldMode:`dynamic`,paginationType:`page_number`,label:`Query Attio (SQL)`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`Run a read-only SQL query against your Attio workspace (Enterprise plan) — the only way to aggregate (GROUP BY, COUNT) across objects and lists server-side.`,tags:[V.NEW],keywords:[`sql`,`aggregate`,`count`,`group by`,`report`,`crm`],docPath:$(OW),guide:`Attio Enterprise plan only (other plans get a clear error — list records with an Attio search and aggregate client-side instead). PostgreSQL dialect, SELECT-only; tables are object/list api_slugs, columns are attribute slugs (call get_provider_context for both). Record-reference arrays must be UNNESTed inside a CTE before joining. Ownership attributes are workspace-defined actor-references — discover the slug, never assume one. Example: SELECT owner.id, COUNT(*) FROM companies GROUP BY owner.id.`,cost:AW,provider:`attio`,defaultPayload:{search_id:OW,connector:{strategy:`first`,connections:[]},config:{query:``,limit:100,page_number:1}}},FW=`query:salesforce@1`,IW=r.object({search_id:r.literal(FW),connector:Jl(),config:r.object({soql:Vu({path:`config.soql`,groupPath:`config.general`,sectionKey:`general`,label:`SOQL query`,description:`A single read-only SELECT statement (SOQL, not SQL). Pagination is wrapped automatically — add your own LIMIT/OFFSET only to cap results.`,rows:8,minLength:1,maxLength:2e4}),limit:N({path:`config.limit`,min:1,max:500,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of rows per page`}).default(100),page_number:N({path:`config.page_number`,min:1,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Page`,description:`1-based page index. Salesforce caps OFFSET at 2,000 rows — narrow with WHERE past that, or use the object searches (their cursors have no depth limit).`}).nullable().default(1)})}),LW={allowManagedConnection:!1,mode:null,credits:null,info:`Salesforce searches are free — you bring your own Salesforce connection.`},RW=`query-salesforce-v1`,zW=class extends Z{billing={billableOperation:RW,cost:LW};searchId=FW;schema=IW;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitOperation:`salesforce_api`,rateLimitRatio:1,allowManagedConnection:!1}]}async getAgentContext(e){return ef(e,{objects:[`Contact`,`Lead`,`Account`,`Opportunity`],includeStages:!0})}},BW=IW,VW={searchId:FW,billableOperation:RW,baseSearch:Q(FW),outputFieldMode:`dynamic`,paginationType:`page_number`,label:`Query Salesforce (SOQL)`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`Run a read-only SOQL query against your Salesforce org — including native aggregates (GROUP BY / HAVING / COUNT), e.g. every owner with more than 10 accounts.`,guide:"SOQL SELECT only (no SOSL, no DML). Get object/field API names from get_provider_context and use them verbatim. Aggregates (GROUP BY/HAVING/COUNT) are supported but capped to ONE page — Salesforce can't paginate aggregate results. Use IsClosed = false for open opportunities (never assume stage names); date literals like LAST_N_DAYS:30 work; in multi-currency orgs prefix amount literals (Amount > USD5000). For org-wide activity reports, query Task/Event directly (e.g. `SELECT Subject, ActivityDate, Who.Name FROM Task WHERE TaskSubtype = 'Call' AND ActivityDate = LAST_WEEK`); for a single record's timeline use activities:find:salesforce instead. OFFSET is capped at 2,000 rows — past that, narrow with WHERE or use the object searches.",tags:[V.FIELDS,V.NEW],keywords:[`soql`,`sql`,`crm`,`sfdc`,`aggregate`,`group by`,`report`],docPath:$(FW),cost:LW,provider:`salesforce`,defaultPayload:{search_id:FW,connector:{strategy:`first`,connections:[]},config:{soql:``,limit:100,page_number:1}}},HW=`records:attio@1`,UW=_(`attio_record_id`),WW=_(`attio_record_match`),GW=r.object({search_id:r.literal(HW),connector:Jl(),config:r.object({object:Uu({path:`config.object`,groupPath:`config.general`,sectionKey:`general`,label:`Object`,required:!0,info:`Any object in this workspace — custom objects included.`,enabledIf:v(`attio`),optionsDef:xf}),custom_properties:$L(`name`,kf({target:`objects`,fromField:`object`})),filters:eR(`name`),saved_view:tR(Tf({target:`objects`,fromField:`object`})),created_within:nR(),limit:ZL(),page_number:QL(),output_fields:P(r.object({[UW.name]:A({fieldName:UW.name}),[WW.name]:A({fieldName:WW.name})}))}).check(e=>rR(e,[`created_within`]))}),KW={allowManagedConnection:!1,mode:null,credits:null,info:`Searching your own Attio workspace is free.`},qW=`records-attio-v1`,JW=class extends Z{billing={billableOperation:qW,cost:KW};searchId=HW;schema=GW;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[UW.name]:this.catalogOutput(UW),[WW.name]:this.catalogOutput(WW)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_query`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`attio_record_id`}]}}async getAgentContext(e){let t=this.payload.config.object,n=Array.isArray(t)?t[0]??``:t;return jf(e,{objects:n?[n]:`discover`,...n?{includeViewsFor:[n]}:{}})}},YW=GW,XW={searchId:HW,billableOperation:qW,baseSearch:Q(HW),outputFieldMode:`static`,paginationType:`page_number`,label:`Attio records`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List records of ANY Attio object — custom objects included. Each row carries the record id plus a JSON record with a compact attribute set and any custom attributes you pick.`,tags:[V.NEW],keywords:[`crm`,`list`,`import`,`custom object`,`generic`,`workspace`],docPath:$(HW),guide:"The generic floor for custom objects and users/workspaces — for people/companies/deals prefer the typed Attio searches (typed identity columns). Call get_provider_context first for the selected object's attribute slugs. The record JSON carries a compact default attribute set under `values` (the object's first attributes in UI order) plus your picks under `custom_properties` — pick what you need or chain record:lookup for everything. A saved view replaces the filter fields entirely. Attio reports no total count — page until a short page.",cost:KW,provider:`attio`,defaultPayload:{search_id:HW,connector:{strategy:`first`,connections:[]},config:{object:``,custom_properties:[],filters:null,saved_view:``,created_within:``,limit:100,page_number:1,output_fields:{attio_record_id:{enabled:!0,alias:``},attio_record_match:{enabled:!0,alias:``}}}}},ZW=`sheet:rows@1`,QW=[{label:`Demo leads`,value:`demo-leads`},{label:`Demo companies`,value:`demo-companies`},{label:`Demo contacts`,value:`demo-contacts`}],$W={requires:{connection:`pipe0`},enabledIf:v(`pipe0`,`Select a pipe0 connection to see sheet suggestions`),options:async({query:e,client:t,environment:n})=>n===`sandbox`?QW:t?(await t.sheets.list({query:e})).map(e=>({label:e.slug,value:e.slug})):[],widgets:{provider_logo:{provider:`pipe0`}}},eG=r.object({search_id:r.literal(ZW),connector:Jl(),config:r.object({sheet:Uu({path:`config.sheet`,sectionKey:`general`,groupPath:`config.general`,label:`Sheet`,required:!0,info:`Pick one of your pipe0 sheets; its rows are returned.`,enabledIf:v(`pipe0`),optionsDef:$W}),limit:N({path:`config.limit`,min:1,max:2e3,groupPath:`config.pagination`,sectionKey:`pagination`,label:`Limit`,description:`Max number of rows per page`}).default(100),cursor:Bu({path:`config.cursor`,groupPath:`config.pagination`,inputType:`text`,label:`Cursor`,sectionKey:`pagination`,description:`Pagination cursor`}).nullable(),include_metadata:Ru({path:`config.include_metadata`,groupPath:`config.general`,sectionKey:`general`,label:`Include metadata`,description:`Widgets and prevenance tags.`,defaultValue:!1})})}),tG={allowManagedConnection:!0,mode:`per_search`,credits:{default:0},info:`Reading your own pipe0 sheet is free.`},nG=`sheet-items-v1-pipe0`,rG=class extends Z{billing={billableOperation:nG,cost:tG};searchId=ZW;schema=eG;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{}}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitOperation:`pipe0_api_operation`,rateLimitRatio:1,allowManagedConnection:!0}]}},iG=eG,aG={searchId:ZW,billableOperation:nG,baseSearch:Q(ZW),outputFieldMode:`dynamic`,paginationType:`cursor`,label:`Read sheet rows`,categories:[`data`],hasManagedConnection:!0,allowsUserConnection:!0,lifecycle:null,description:`List rows from a pipe0 sheet.`,tags:[V.FIELDS,V.NEW],keywords:[`lookup`,`list`,`records`,`table`,`fetch`],docPath:$(ZW),cost:tG,provider:`pipe0`,defaultPayload:{search_id:ZW,connector:{strategy:`first`,connections:[]},config:{sheet:``,limit:100,cursor:``,include_metadata:!1}}},oG=`users:attio@1`,sG=_(`attio_workspace_member_id`),cG=_(`email`),lG=_(`first_name`),uG=_(`last_name`),dG=_(`attio_workspace_member_match`),fG=r.object({search_id:r.literal(oG),connector:Jl(),config:r.object({include_suspended:Ru({path:`config.include_suspended`,groupPath:`config.general`,sectionKey:`general`,label:`Include suspended members`,description:``,defaultValue:!1}),limit:ZL(),page_number:QL(),output_fields:P(r.object({[sG.name]:A({fieldName:sG.name}),[cG.name]:A({fieldName:cG.name}),[lG.name]:A({fieldName:lG.name}),[uG.name]:A({fieldName:uG.name}),[dG.name]:A({fieldName:dG.name})}))})}),pG={allowManagedConnection:!1,mode:null,credits:null,info:`Listing your own Attio workspace members is free.`},mG=`users-attio-v1`,hG=class extends Z{billing={billableOperation:mG,cost:pG};searchId=oG;schema=fG;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[sG.name]:this.catalogOutput(sG),[cG.name]:this.catalogOutput(cG),[lG.name]:this.catalogOutput(lG),[uG.name]:this.catalogOutput(uG),[dG.name]:this.catalogOutput(dG)}}getConnectionsRequirements(){return[{provider:`attio`,rateLimitOperation:`attio_generic`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`attio_workspace_member_id`}]}}},gG=fG,_G={searchId:oG,billableOperation:mG,baseSearch:Q(oG),outputFieldMode:`static`,paginationType:`page_number`,label:`Attio users`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List the workspace members (users) of your Attio workspace: id, email, name, and access level — e.g. for building a round-robin assignment list.`,tags:[V.NEW],keywords:[`crm`,`reps`,`team`,`assignment`,`round robin`,`workspace members`,`owner`,`sellers`,`sales`],docPath:$(oG),guide:`Attio's workspace-members endpoint returns the full list in one call with no server-side filtering — suspended members are excluded by default, and pagination is applied locally after fetching. Attio has no universal owner field like HubSpot/Salesforce, so this search has no owned-record count: ownership in Attio is a workspace-defined actor-reference attribute per object, not a fixed system field. The member id column matches those actor-reference attributes (e.g. a deal's owner) on other Attio records and searches.`,cost:pG,provider:`attio`,defaultPayload:{search_id:oG,connector:{strategy:`first`,connections:[]},config:{include_suspended:!1,limit:100,page_number:1,output_fields:{attio_workspace_member_id:{enabled:!0,alias:``},email:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},attio_workspace_member_match:{enabled:!0,alias:``}}}}},vG=`users:salesforce@1`,yG=_(`salesforce_record_id`),bG=_(`first_name`),xG=_(`last_name`),SG=_(`email`),CG=_(`salesforce_owned_count`),wG=_(`salesforce_user_match`),TG=r.object({search_id:r.literal(vG),connector:Jl(),config:r.object({owned_object:Hu({required:!1,path:`config.owned_object`,groupPath:`config.counts`,sectionKey:`general`,label:`Count owned`,description:`Which records to count per user (via OwnerId).`,options:[{label:`Accounts`,value:`accounts`},{label:`Contacts`,value:`contacts`},{label:`Leads`,value:`leads`},{label:`Opportunities`,value:`opportunities`}]}).default(`accounts`),min_owned_count:N({path:`config.min_owned_count`,min:0,groupPath:`config.counts`,sectionKey:`general`,label:`Minimum owned`,description:`Only return users owning MORE than this many records. Counted in ONE aggregate query for all users.`}).nullable(),include_ownership_counts:Ru({path:`config.include_ownership_counts`,groupPath:`config.counts`,sectionKey:`general`,label:`Include ownership counts`,description:`Adds an owned-record count column (one aggregate query, all users at once).`,defaultValue:!0}),include_inactive:Ru({path:`config.include_inactive`,groupPath:`config.general`,sectionKey:`general`,label:`Include deactivated users`,description:``,defaultValue:!1}),custom_properties:CL(),limit:AL(),cursor:jL(),output_fields:P(r.object({[yG.name]:A({fieldName:yG.name}),[bG.name]:A({fieldName:bG.name}),[xG.name]:A({fieldName:xG.name}),[SG.name]:A({fieldName:SG.name}),[CG.name]:A({fieldName:CG.name}),[wG.name]:A({fieldName:wG.name})}))})}),EG={allowManagedConnection:!1,mode:null,credits:null,info:`Salesforce searches are free — you bring your own Salesforce connection.`},DG=`users-salesforce-v1`,OG=class extends Z{billing={billableOperation:DG,cost:EG};searchId=vG;schema=TG;payload;constructor(e){super(),this.payload=this.validatePayload(e)}getRawOutputFields(){return{[yG.name]:this.catalogOutput(yG),[bG.name]:this.catalogOutput(bG),[xG.name]:this.catalogOutput(xG),[SG.name]:this.catalogOutput(SG),[CG.name]:this.catalogOutput(CG),[wG.name]:this.catalogOutput(wG)}}getConnectionsRequirements(){return[{provider:`salesforce`,rateLimitOperation:`salesforce_api`,rateLimitRatio:1,allowManagedConnection:!1}]}getDedupConfig(){return{match:`any`,fields:[{fieldName:`salesforce_record_id`}]}}async getAgentContext(e){return ef(e,{objects:[`User`],includeOwners:!0})}},kG=TG,AG={searchId:vG,billableOperation:DG,baseSearch:Q(vG),outputFieldMode:`static`,paginationType:`cursor`,label:`Salesforce users`,categories:[`data`],hasManagedConnection:!1,allowsUserConnection:!0,lifecycle:null,description:`List users (record owners) from your Salesforce org, with per-user owned-record counts computed in a single aggregate query — e.g. every rep owning more than 10 accounts.`,tags:[V.NEW],keywords:[`crm`,`sfdc`,`owner`,`rep`,`seller`,`team`,`ownership`],docPath:$(vG),guide:"Ownership counts come from ONE `GROUP BY OwnerId` aggregate — cheap even for many users. Caveat: aggregate results don't paginate, so orgs with more than 2,000 distinct owners of the counted object get a precise error — use query:salesforce@1 with your own GROUP BY/HAVING there. The user id chains as `salesforce_record_id` into owner filters on the object searches.",cost:EG,provider:`salesforce`,defaultPayload:{search_id:vG,connector:{strategy:`first`,connections:[]},config:{owned_object:`accounts`,min_owned_count:null,include_ownership_counts:!0,include_inactive:!1,custom_properties:[],limit:100,cursor:``,output_fields:{salesforce_record_id:{enabled:!0,alias:``},first_name:{enabled:!0,alias:``},last_name:{enabled:!0,alias:``},email:{enabled:!0,alias:``},salesforce_owned_count:{enabled:!0,alias:``},salesforce_user_match:{enabled:!0,alias:``}}}}},jG={"people:profiles:crustdata@1":CV,"people:profiles:crustdata@2":rW,"people:profiles:crustdata@3":mW,"companies:profiles:crustdata@1":BB,"companies:profiles:crustdata@2":$B,"companies:profiles:crustdata@3":uz,"people:profiles:amplemarket@1":dV,"people:profiles:amplemarket@2":WU,"companies:profiles:amplemarket@1":OB,"companies:profiles:amplemarket@2":XR,"companies:entitysearch:parallel@1":TR,"people:entitysearch:parallel@1":gU,"people:eventguests:luma@1":jU,"people:channelmembers:slack@1":iU,"events:googlecalendar@1":YV,"posts:content:crustdata@1":TW,"sheet:rows@1":rG,"bucket:entries@1":JL,"query:postgres@1":Jz,"query:databricks@1":Vz,"contacts:hubspot@1":Sz,"companies:hubspot@1":IR,"deals:hubspot@1":gB,"owners:hubspot@1":MH,"contacts:salesforce@1":Pz,"leads:salesforce@1":cH,"accounts:salesforce@1":VL,"opportunities:salesforce@1":yH,"users:salesforce@1":OG,"query:salesforce@1":zW,"people:attio@1":WH,"companies:attio@1":fR,"deals:attio@1":aB,"records:attio@1":JW,"entries:attio@1":NV,"query:attio@1":MW,"users:attio@1":hG},MG={"people:profiles:crustdata@1":wV,"people:profiles:crustdata@2":iW,"people:profiles:crustdata@3":hW,"companies:profiles:crustdata@1":VB,"companies:profiles:crustdata@2":eV,"companies:profiles:crustdata@3":dz,"people:profiles:amplemarket@1":fV,"people:profiles:amplemarket@2":GU,"companies:profiles:amplemarket@1":kB,"companies:profiles:amplemarket@2":ZR,"companies:entitysearch:parallel@1":ER,"people:entitysearch:parallel@1":_U,"people:eventguests:luma@1":MU,"people:channelmembers:slack@1":aU,"events:googlecalendar@1":XV,"posts:content:crustdata@1":EW,"sheet:rows@1":iG,"bucket:entries@1":YL,"query:postgres@1":Yz,"query:databricks@1":Hz,"contacts:hubspot@1":Cz,"companies:hubspot@1":LR,"deals:hubspot@1":_B,"owners:hubspot@1":NH,"contacts:salesforce@1":Fz,"leads:salesforce@1":lH,"accounts:salesforce@1":HL,"opportunities:salesforce@1":bH,"users:salesforce@1":kG,"query:salesforce@1":BW,"people:attio@1":GH,"companies:attio@1":pR,"deals:attio@1":oB,"records:attio@1":YW,"entries:attio@1":PV,"query:attio@1":NW,"users:attio@1":gG},NG={"people:profiles:crustdata@1":TV,"people:profiles:crustdata@2":aW,"people:profiles:crustdata@3":gW,"companies:profiles:crustdata@1":HB,"companies:profiles:crustdata@2":tV,"companies:profiles:crustdata@3":fz,"people:profiles:amplemarket@1":pV,"people:profiles:amplemarket@2":KU,"companies:profiles:amplemarket@1":AB,"companies:profiles:amplemarket@2":QR,"companies:entitysearch:parallel@1":DR,"people:entitysearch:parallel@1":vU,"people:eventguests:luma@1":NU,"people:channelmembers:slack@1":oU,"events:googlecalendar@1":ZV,"posts:content:crustdata@1":DW,"sheet:rows@1":aG,"bucket:entries@1":XL,"query:postgres@1":Xz,"query:databricks@1":Uz,"contacts:hubspot@1":wz,"companies:hubspot@1":RR,"deals:hubspot@1":vB,"owners:hubspot@1":PH,"contacts:salesforce@1":Iz,"leads:salesforce@1":uH,"accounts:salesforce@1":UL,"opportunities:salesforce@1":xH,"users:salesforce@1":AG,"query:salesforce@1":VW,"people:attio@1":KH,"companies:attio@1":mR,"deals:attio@1":sB,"records:attio@1":XW,"entries:attio@1":FV,"query:attio@1":PW,"users:attio@1":_G};function PG(e){return jG[e]}const FG=t.discriminatedUnion(`search_id`,Object.values(MG).map(e=>e)).openapi(`SearchPayloadSchema`);function IG(e,t){return Bt(t,NG[e].defaultPayload)}const LG=t.preprocess(e=>{if(!e||typeof e!=`object`||!(`search_id`in e))return e;let t=IG(e.search_id);return t?{...e,config:Bt(e?.config||{},t.config)}:e},FG),RG=t.object({config:t.object({environment:t.enum([`production`,`sandbox`]).default(`production`),widgets:t.object({enabled:t.boolean().default(!1)}).default({enabled:!1}),field_definitions:t.object({enabled:t.boolean().default(!1)}).default({enabled:!1})}).default({environment:`production`,widgets:{enabled:!1},field_definitions:{enabled:!1}}),search:LG}).openapi(`SearchRequestSchema`),zG=es,BG=t.object({value:Bo,status:zo,type:Lo.optional(),format:rs.nullable().optional(),resolved_by:us.nullable().optional(),widgets:$o.optional()}),VG=t.record(t.string(),BG.nullable());function HG(e){return MG[e]}const UG=t.enum([`cursor`,`page_number`]),WG=t.object({id:t.string(),status:t.enum([`completed`,`failed`,`pending`,`processing`,`canceled`]),search_id:xL,errors:t.array(zG),results:t.array(VG),organization_id:t.string(),next_page:LG.nullable(),pagination_type:UG.nullable(),total_pages:t.int32().nullable(),field_definitions:as.optional()}).openapi(`SearchResponseSchema`);function GG(e){let t=e.split(`@`)[1];if(!t)throw Error(`No search version found`);return Number(t)}function KG(){let e={};for(let t of Object.values(NG)){let{baseSearch:n}=t;e[n]??=[],e[n].push(t)}return Object.entries(e).forEach(([t,n])=>{e[t]=n.sort((e,t)=>{let n=GG(e.searchId);return GG(t.searchId)-n})}),e}function qG(e){return NG[e]}const JG=KG();function YG(e){let t=[];for(let[n,r]of Object.entries(JG)){let i=r[0];if(!i)throw Error(`Found empty entry`);i.lifecycle?.deprecatedOn&&e!==`deprecated`||(e===null||i.categories.includes(e))&&t.push({...i,baseSearch:n,latestVersion:GG(i.searchId)})}return t}function XG(e){let t=NG[e].defaultPayload.config.output_fields;return t?Object.keys(t):[]}function ZG(e,t){let n=e.filter(e=>t===null?!0:e.categories.some(e=>e===t)),r={},i={},a={};for(let e of n){if(e.lifecycle&&e.lifecycle.deprecatedOn){i.Deprecated??=[],i.Deprecated.push(e.searchId);continue}a[e.provider]??=[],a[e.provider].push(e.searchId);for(let t of XG(e.searchId))r[t]??=[],r[t].push(e.searchId);for(let t of e.tags)i[t]??=[],i[t].push(e.searchId)}return{searchIdsByOutputField:r,searchIdsByTag:i,searchIdsByProvider:a,sortedTagEntries:Object.entries(i).sort((e,t)=>e[0].localeCompare(t[0])),sortedOutputFieldEntries:Object.entries(r).sort((e,t)=>e[0].localeCompare(t[0])),sortedProviderEntries:Object.entries(a).sort((e,t)=>e[0].localeCompare(t[0])),searchEntriesByBaseSearch:JG}}function QG(e){let t=qG(e);return{[t.provider]:t.cost.allowManagedConnection?t.cost.credits.default:0}}const $G={"prompt:run@1":ON,"agent:run@1":Bp,"company:newssummary:website@1":zy,"company:newssummary:domain@1":Dg,"company:techstack:builtwith@1":Db,"company:techstack:builtwith@2":e_,"company:websiteurl:email@1":Ib,"company:domain:workemail@1":Lm,"company:funding:leadmagic@1":ov,"company:funding:leadmagic@2":bv,"company:funding:waterfall@1":th,"people:workemail:waterfall@1":Jw,"person:workemail:waterfall@1":xN,"people:email:iswork@1":Gb,"email:iswork@1":nE,"people:name:split@1":gS,"person:name:split@1":Mj,"people:validate:email:zerobounce@1":bw,"people:email:validate:zerobounce@2":ux,"email:validate:zerobounce@1":EE,"people:mobilenumber:workemail:waterfall@1":oS,"person:name:join@1":Sj,"company:overview@1":eb,"company:overview@2":gb,"company:overview@3":Ug,"json:extract:multi@1":GD,"company:lookalikes:companyenrich@1":Zv,"company:lookalikes:companyenrich@2":jh,"company:match:logodev@1":vy,"company:match:logodev@2":Ay,"person:posts:content:crustdata@1":eM,"people:profile:workemail:crustdata@1":QC,"person:profile:workemail:crustdata@1":wM,"people:identity:email:waterfall@1":Dx,"person:identity:email:waterfall@1":bT,"person:identity:email:waterfall@2":uA,"person:identity:amplemarket@1":rT,"email:send:resend@1":gE,"contact:create:resend@1":d_,"lead:enroll:lemlist@1":OO,"lead:enroll:amplemarket@1":oO,"email:send:gmail@1":lE,"email:draft:gmail@1":qT,"email:write@1":FE,"fields:merge@1":xD,"field:slugify@1":$E,"field:domainify@1":WE,"field:timestamp@1":oD,"formula:run@1":AD,"signals:personprofilematch@1":_I,"http:request@1":zD,"template:fill@1":wI,"message:send:slack@1":GO,"message:send-direct:slack@1":FO,"message:write@1":$O,"people:personalemail:profile:waterfall@1":OS,"person:personalemail:profileurl:waterfall@1":Wj,"website:scrape:firecrawl@1":cL,"website:scrapelist:firecrawl@1":_L,"website:extract:firecrawl@1":NI,"website:extract:parallel@1":HI,"website:maplinks:firecrawl@1":ZI,"row:append:sheet@1":$P,"bucket:claim@1":pm,"bucket:count@1":bm,"bucket:check@1":om,"bucket:countif@1":Om,"row:expandappend:sheet@1":lF,"row:roundrobin:sheet@1":gF,"rows:find:sheet@1":aI,"rows:delete:sheet@1":CF,"rows:find:postgres@1":XF,"rows:find:databricks@1":HF,"people:match:role:waterfall@1":Rx,"person:match:role:waterfall@1":MA,"company:match:crustdata@1":oy,"company:match:crustdata@2":sg,"company:match:amplemarket@1":Vh,"contact:match:hubspot@1":S_,"company:match:hubspot@1":vg,"deal:match:hubspot@1":K_,"object:update:hubspot@1":vk,"object:associations:hubspot@1":lk,"activity:log:hubspot@1":xp,"person:match:salesforce@1":UA,"account:match:salesforce@1":uf,"opportunity:match:salesforce@1":Ak,"record:lookup:salesforce@1":rP,"record:update:salesforce@1":NP,"record:assert:salesforce@1":LN,"activities:find:salesforce@1":Zf,"activity:log:salesforce@1":jp,"person:match:attio@1":xA,"company:match:attio@1":Qh,"deal:match:attio@1":P_,"record:match:attio@1":pP,"record:lookup:attio@1":qN,"record:update:attio@1":CP,"activities:find:attio@1":Bf,"person:match:amplemarket@1":kT,"company:identity@2":Hv,"company:identity@3":fh,"company:identity:crustdata@1":Sh,"people:phone:profile:waterfall@1":BS,"person:mobile:profileurl:waterfall@1":tj,"person:devprofileurl:profileurl:waterfall@1":Hk,"people:phone:workemail:waterfall@1":ZS,"person:mobile:workemail:waterfall@1":fj,"people:profile:waterfall@1":HC,"person:profile:waterfall@1":BT,"person:profile:waterfall@2":mM,"people:profileurl:email:waterfall@1":uw,"person:profileurl:email:waterfall@1":IM,"person:profileurl:name@1":qM,"people:email:validate:zerobounce@1":ex,"person:email:validate:millionverifier@1":Qk,"people:workemail:profileurl:waterfall@1":Nw,"person:workemail:profileurl:waterfall@1":oN,"company:identity@1":jv,"people:professionalprofile:waterfall@1":cC,"people:professionalprofileurl:name@1":jC,"people:professionalprofileurl:email:waterfall@1":bC,"people:mobilenumber:professionalprofile:waterfall@1":Yx},eK={"prompt:run@1":kN,"agent:run@1":Vp,"company:newssummary:website@1":By,"company:newssummary:domain@1":Og,"company:techstack:builtwith@1":Ob,"company:techstack:builtwith@2":t_,"company:websiteurl:email@1":Lb,"company:domain:workemail@1":Rm,"company:funding:leadmagic@1":sv,"company:funding:leadmagic@2":xv,"company:funding:waterfall@1":nh,"people:workemail:waterfall@1":Yw,"person:workemail:waterfall@1":SN,"people:email:iswork@1":Kb,"email:iswork@1":rE,"people:name:split@1":_S,"person:name:split@1":Nj,"people:validate:email:zerobounce@1":xw,"people:email:validate:zerobounce@2":dx,"email:validate:zerobounce@1":DE,"people:mobilenumber:workemail:waterfall@1":sS,"person:name:join@1":Cj,"company:overview@1":tb,"company:overview@2":_b,"company:overview@3":Wg,"json:extract:multi@1":KD,"email:write@1":IE,"fields:merge@1":SD,"field:slugify@1":eD,"field:domainify@1":GE,"field:timestamp@1":sD,"formula:run@1":jD,"signals:personprofilematch@1":vI,"http:request@1":BD,"email:send:resend@1":_E,"contact:create:resend@1":f_,"lead:enroll:lemlist@1":kO,"lead:enroll:amplemarket@1":sO,"company:lookalikes:companyenrich@1":Qv,"company:lookalikes:companyenrich@2":Mh,"company:match:logodev@1":yy,"company:match:logodev@2":jy,"person:posts:content:crustdata@1":tM,"people:profile:workemail:crustdata@1":$C,"person:profile:workemail:crustdata@1":TM,"people:identity:email:waterfall@1":Ox,"person:identity:email:waterfall@1":xT,"person:identity:email:waterfall@2":dA,"company:match:crustdata@1":sy,"company:match:crustdata@2":cg,"company:match:amplemarket@1":Hh,"contact:match:hubspot@1":C_,"company:match:hubspot@1":yg,"deal:match:hubspot@1":q_,"object:update:hubspot@1":yk,"object:associations:hubspot@1":uk,"activity:log:hubspot@1":Sp,"person:match:salesforce@1":WA,"account:match:salesforce@1":df,"opportunity:match:salesforce@1":jk,"record:lookup:salesforce@1":iP,"record:update:salesforce@1":PP,"record:assert:salesforce@1":RN,"activities:find:salesforce@1":Qf,"activity:log:salesforce@1":Mp,"person:match:attio@1":SA,"company:match:attio@1":$h,"deal:match:attio@1":F_,"record:match:attio@1":mP,"record:lookup:attio@1":JN,"record:update:attio@1":wP,"activities:find:attio@1":Vf,"person:identity:amplemarket@1":iT,"message:send:slack@1":KO,"message:send-direct:slack@1":IO,"email:send:gmail@1":uE,"email:draft:gmail@1":JT,"message:write@1":ek,"template:fill@1":TI,"website:scrape:firecrawl@1":lL,"website:scrapelist:firecrawl@1":vL,"website:extract:firecrawl@1":PI,"website:extract:parallel@1":UI,"website:maplinks:firecrawl@1":QI,"row:append:sheet@1":eF,"bucket:claim@1":mm,"bucket:count@1":xm,"bucket:check@1":sm,"bucket:countif@1":km,"row:expandappend:sheet@1":uF,"row:roundrobin:sheet@1":_F,"rows:find:sheet@1":oI,"rows:delete:sheet@1":wF,"rows:find:postgres@1":ZF,"rows:find:databricks@1":UF,"people:match:role:waterfall@1":zx,"person:match:role:waterfall@1":NA,"company:identity@2":Uv,"company:identity@3":ph,"company:identity:crustdata@1":Ch,"people:phone:profile:waterfall@1":VS,"person:mobile:profileurl:waterfall@1":nj,"person:devprofileurl:profileurl:waterfall@1":Uk,"people:personalemail:profile:waterfall@1":kS,"person:personalemail:profileurl:waterfall@1":Gj,"people:profile:waterfall@1":UC,"person:profile:waterfall@1":VT,"person:profile:waterfall@2":hM,"people:profileurl:email:waterfall@1":dw,"person:profileurl:email:waterfall@1":LM,"person:profileurl:name@1":JM,"people:email:validate:zerobounce@1":tx,"person:email:validate:millionverifier@1":$k,"people:phone:workemail:waterfall@1":QS,"person:mobile:workemail:waterfall@1":pj,"people:workemail:profileurl:waterfall@1":Pw,"person:workemail:profileurl:waterfall@1":sN,"person:match:amplemarket@1":AT,"company:identity@1":Mv,"people:professionalprofile:waterfall@1":lC,"people:professionalprofileurl:name@1":MC,"people:professionalprofileurl:email:waterfall@1":xC,"people:mobilenumber:professionalprofile:waterfall@1":Xx},tK={"prompt:run@1":AN,"agent:run@1":Hp,"company:newssummary:website@1":Vy,"company:newssummary:domain@1":kg,"company:techstack:builtwith@1":kb,"company:techstack:builtwith@2":n_,"company:websiteurl:email@1":Rb,"company:domain:workemail@1":zm,"company:funding:leadmagic@1":cv,"company:funding:leadmagic@2":Sv,"company:funding:waterfall@1":rh,"people:workemail:waterfall@1":Xw,"person:workemail:waterfall@1":CN,"people:email:iswork@1":qb,"email:iswork@1":iE,"people:name:split@1":vS,"person:name:split@1":Pj,"people:validate:email:zerobounce@1":Sw,"people:mobilenumber:workemail:waterfall@1":cS,"person:name:join@1":wj,"company:overview@1":nb,"company:overview@2":vb,"company:overview@3":Gg,"json:extract:multi@1":qD,"email:send:resend@1":vE,"contact:create:resend@1":p_,"lead:enroll:lemlist@1":AO,"lead:enroll:amplemarket@1":cO,"email:send:gmail@1":dE,"email:draft:gmail@1":YT,"message:send:slack@1":qO,"message:send-direct:slack@1":LO,"message:write@1":tk,"email:write@1":LE,"template:fill@1":EI,"fields:merge@1":CD,"field:slugify@1":tD,"field:domainify@1":KE,"field:timestamp@1":cD,"formula:run@1":MD,"signals:personprofilematch@1":yI,"http:request@1":VD,"row:append:sheet@1":tF,"bucket:claim@1":hm,"bucket:count@1":Sm,"bucket:check@1":cm,"bucket:countif@1":Am,"row:expandappend:sheet@1":dF,"row:roundrobin:sheet@1":vF,"rows:find:sheet@1":sI,"rows:delete:sheet@1":TF,"rows:find:postgres@1":QF,"rows:find:databricks@1":WF,"company:lookalikes:companyenrich@1":$v,"company:lookalikes:companyenrich@2":Nh,"people:match:role:waterfall@1":Bx,"person:match:role:waterfall@1":PA,"company:match:logodev@1":by,"company:match:logodev@2":My,"person:posts:content:crustdata@1":nM,"people:profile:workemail:crustdata@1":ew,"person:profile:workemail:crustdata@1":EM,"people:workemail:profileurl:waterfall@1":Fw,"person:workemail:profileurl:waterfall@1":cN,"people:identity:email:waterfall@1":kx,"person:identity:email:waterfall@1":ST,"person:identity:email:waterfall@2":fA,"company:match:crustdata@1":cy,"company:match:crustdata@2":lg,"company:match:amplemarket@1":Uh,"contact:match:hubspot@1":w_,"company:match:hubspot@1":bg,"deal:match:hubspot@1":J_,"object:update:hubspot@1":bk,"object:associations:hubspot@1":dk,"activity:log:hubspot@1":Cp,"person:match:salesforce@1":GA,"account:match:salesforce@1":ff,"opportunity:match:salesforce@1":Mk,"record:lookup:salesforce@1":aP,"record:update:salesforce@1":FP,"record:assert:salesforce@1":zN,"activities:find:salesforce@1":$f,"activity:log:salesforce@1":Np,"person:match:attio@1":CA,"company:match:attio@1":eg,"deal:match:attio@1":I_,"record:match:attio@1":hP,"record:lookup:attio@1":YN,"record:update:attio@1":TP,"activities:find:attio@1":Hf,"person:identity:amplemarket@1":aT,"email:validate:zerobounce@1":OE,"person:email:validate:millionverifier@1":eA,"people:personalemail:profile:waterfall@1":AS,"person:personalemail:profileurl:waterfall@1":Kj,"people:email:validate:zerobounce@1":nx,"people:email:validate:zerobounce@2":fx,"people:phone:workemail:waterfall@1":$S,"person:mobile:workemail:waterfall@1":mj,"website:scrape:firecrawl@1":uL,"website:scrapelist:firecrawl@1":yL,"website:extract:firecrawl@1":FI,"website:extract:parallel@1":WI,"website:maplinks:firecrawl@1":$I,"person:match:amplemarket@1":jT,"company:identity@2":Wv,"company:identity@3":mh,"company:identity:crustdata@1":wh,"people:phone:profile:waterfall@1":HS,"person:mobile:profileurl:waterfall@1":rj,"person:devprofileurl:profileurl:waterfall@1":Wk,"people:profile:waterfall@1":WC,"person:profile:waterfall@1":HT,"person:profile:waterfall@2":gM,"people:profileurl:email:waterfall@1":fw,"person:profileurl:email:waterfall@1":RM,"person:profileurl:name@1":YM,"company:identity@1":Nv,"people:professionalprofile:waterfall@1":uC,"people:professionalprofileurl:name@1":NC,"people:professionalprofileurl:email:waterfall@1":SC,"people:mobilenumber:professionalprofile:waterfall@1":Zx};function nK(e){return e.defaultPayload?.config?.output_fields?Object.keys(e.defaultPayload?.config?.output_fields||{}):[]}function rK(e){return $G[e]}function iK(e){return tK[e].defaultPayload}function aK(e){return eK[e]}const oK=r.discriminatedUnion(`pipe_id`,Object.values(eK)).openapi(`PipePayload`),sK=r.preprocess(e=>{if(!e||typeof e!=`object`||!(`pipe_id`in e))return e;try{let t=iK(Fo.parse(e.pipe_id));return t?{...e,config:Bt(e?.config||{},t.config)}:e}catch{return e}},oK);function cK(e){return tK[e]}function lK(e,t){let n=cK(e);if(t in n.billableOperations)return n.billableOperations[t];throw Error(`Unable to find billable operation definition for pipeId '${e}' and operation '${t}'`)}function uK(e){let t=e.split(`@`)[1];if(!t)throw Error(`No pipe version found`);return Number(t)}function dK(){let e={};for(let t of Object.values(tK)){let{basePipe:n}=t;e[n]??=[],e[n].push(t)}return Object.entries(e).forEach(([t,n])=>{e[t]=n.sort((e,t)=>{let n=uK(e.pipeId);return uK(t.pipeId)-n})}),e}const fK=e=>{let t=cK(e),n=new Set(t.deprecatedProviders);return Array.from(new Set([...t.managedProviders,...t.allowedUserConnectionProviders])).filter(e=>!n.has(e))},pK=dK();function mK(e,t){let n=new Map;for(let[t,r]of Object.entries(e))for(let e of Object.keys(r.billableOperations)){let r=n.get(e)??[];r.push(`pipe ${t}`),n.set(e,r)}for(let[e,r]of Object.entries(t)){let t=r.billableOperation,i=n.get(t)??[];i.push(`search ${e}`),n.set(t,i)}let r=[...n.entries()].filter(([,e])=>e.length>1);if(r.length>0){let e=r.map(([e,t])=>` "${e}" used by ${t.join(`, `)}`).join(`
87
87
  `);throw Error(`Catalog has ${r.length} duplicate billable-operation key(s):\n${e}`)}}mK(tK,NG);function hK(e){let t=[];for(let[n,r]of Object.entries(pK)){let i=r[0];if(!i)throw Error(`Found empty entry`);let a=i.categories;i.lifecycle?.deprecatedOn&&e!==`deprecated`||(e===null||a.includes(e))&&t.push({...i,basePipe:n,latestVersion:uK(i.pipeId)})}return t}function gK(e,t){let n=e.filter(e=>t===null?!0:e.categories.some(e=>e===t)),r={},i={},a={},o={};for(let e of n){let t=fK(e.defaultPayload.pipe_id);for(let n of t)o[n]??=[],o[n].push(e.defaultPayload.pipe_id);for(let t of nK(e))i[t]??=[],i[t].push(e.defaultPayload.pipe_id);if(e.defaultInputRequirement)for(let{field:t}of yd(e.defaultInputRequirement))r[t.name]??=[],r[t.name]?.push(e.defaultPayload.pipe_id);for(let t of e.tags)a[t]??=[],a[t].push(e.defaultPayload.pipe_id)}return{pipeIdsByInputField:r,pipeIdsByOutputField:i,pipeIdsByTag:a,pipeIdsByProvider:o,sortedTagEntries:Object.entries(a).sort((e,t)=>e[0].localeCompare(t[0])),sortedInputFieldEntries:Object.entries(r).sort((e,t)=>e[0].localeCompare(t[0])),sortedOutputFieldEntries:Object.entries(i).sort((e,t)=>e[0].localeCompare(t[0])),sortedProviderEntries:Object.entries(o).sort((e,t)=>e[0].localeCompare(t[0])),pipeEntriesByBasePipe:pK}}const _K=r.object({id:r.string(),organization_id:r.string(),order:r.array(Ro),field_definitions:_s,errors:r.array(es),records:r.record(Ro,ms),status:r.enum([`completed`,`failed`,`pending`,`processing`,`canceled`])}).openapi(`PipesResponseSchema`),vK=r.object({environment:No.default(`production`),widgets:r.object({enabled:r.boolean().default(!1)}).default({enabled:!1}),field_definitions:r.object({enabled:r.boolean()}).default({enabled:!1}),transform:r.object({include_fields:r.enum([`input`,`annotated`])}).default({include_fields:`input`})}).default({environment:`production`,transform:{include_fields:`input`},widgets:{enabled:!1},field_definitions:{enabled:!1}}).openapi(`PipesRequestConfig`),yK=r.object({config:vK.openapi(`PipesRequestConfig`),field_annotations:as.optional().openapi(`PipesFieldAnnotations`),pipes:r.array(oK),input:r.array(ps.openapi(`PipesInputSchema`)).max(100,`input accepts at most 100 records per request — send larger workloads in chunks`),scopes:r.array(r.string()).optional()});function bK(e){let t=cK(e);return Object.values(t.billableOperations).reduce((e,t)=>{let n=t.allowManagedConnection?t.credits.default:0;return e[t.provider]??=n,e[t.provider]=Math.min(e[t.provider],n),e},{})}function xK(e){let t=[];for(let n of e){if(n instanceof B){t.push(n);continue}let e=sK.parse(n);if(!cK(n.pipe_id))throw Error(`Unknown pipe: ${n.pipe_id}`);let r=new(rK(n.pipe_id))(e);t.push(r)}return t}function SK(e,t){let n=xK(e),r=new Set;return n.forEach(e=>Object.entries(e.inputFields).forEach(([n,i])=>{i.resolvedName===t&&r.add(e.pipeId)})),Array.from(r)}function CK(e,t){let n=e.dependencyGraph,r=new Set;return n.forEach((e,n)=>e.forEach(e=>{e.index===t&&r.add(n)})),Array.from(r).map(t=>{let n=e.orderedPipeInstances[t];if(!n)throw Error(`Internal: Pipe with index ${t} not found.`);return n.pipeId})}function wK(e){return e===`localhost`?!0:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)&&e.includes(`.`)}function TK(e){return/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/.test(e)?e.split(`.`).every(e=>{let t=parseInt(e,10);return t>=0&&t<=255}):/:/.test(e)}function EK(e){if(!e||typeof e!=`string`)return``;let t=e.trim();t.match(/^[a-zA-Z]+:\/\//)||(t=`https://${t}`);try{let e=new URL(t).hostname;if(TK(e))return`https://${e}`;if(!wK(e))throw Error(`Invalid domain`);return`https://${e}`}catch{let t=e.match(/([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}/i);return t?`https://${t[0]}`:``}}function DK(e){if(!e||typeof e!=`string`)return``;let t=e.trim();t.match(/^[a-zA-Z]+:\/\//)||(t=`https://${t}`);try{let e=new URL(t),n=e.hostname;if(TK(n))return`${e.protocol===`http:`?`http:`:`https:`}//${e.host}${e.pathname}${e.search}${e.hash}`;if(!wK(n))throw Error(`Invalid domain`);return`${e.protocol===`http:`?`http:`:`https:`}//${e.host}${e.pathname}${e.search}${e.hash}`}catch{let t=e.match(/^(https?:\/\/)?([^/\s]+)(\/.*)?$/i);if(t){let[,e,n,r=``]=t,i=n?.split(`:`)[0]||``;if(wK(i)||TK(i))return`${e?.toLowerCase()===`http://`?`http:`:`https:`}//${n}${r}`}return``}}function OK(e){try{return EK(e)}catch{console.warn(`Invalid URL: ${e}`);return}}function kK(e,t){if(t)switch(e){case`website_url`:return OK(t);default:return}}function AK(e){let t;if(jK(e))return AK(e.value);let n=typeof e;return t=n===`string`||n===`number`||n===`boolean`?n:e===null?`unknown`:`json`,t}function jK(e,t=0){if(typeof e==`object`&&e&&`value`in e&&`status`in e&&zo.safeParse(e.status).success){if(t>1||typeof e.value==`object`&&jK(e.value,t++))throw new gD([mD.RecursiveExpandedValue()]);return!0}return!1}function MK(e){let t=jK(e),n;return n=t?e.value:e,t?{isExpanded:!0,resolvedInputValue:n,expandedValue:e}:{isExpanded:!1,resolvedInputValue:n,expandedValue:null}}function NK(e){return jK(e)?NK(e.value):e}function PK(e,t,n){if([`processing`,`completed`].includes(n.status)===!1||t==null)return{};try{let r=Eo(e,n.format)?.getStaticWidgets?.(t),i=kK(n.format,t);return qt(Kt(r||{},{display_value:i?{label:i}:void 0}))}catch(e){return console.warn(`Failed to generate UI props: ${e}`),{}}}function FK(e,t,n){if(t==null)return{};try{let r=Eo(e,n)?.getStaticWidgets?.(t),i=kK(n,t);return qt(Kt(r||{},{display_value:i?{label:i}:void 0}))}catch(e){return console.warn(`Failed to generate UI props: ${e}`),{}}}function IK(e,t){for(let[n,r]of Object.entries(t)){let i=n;i===`type`&&e.type===`unknown`&&t.type!==`unknown`&&(e.type=t.type),i!==`type`&&i!==`json_metadata`&&i!==`order`&&(e[i]===void 0||e[i]===null||e[i]===``)&&t[i]&&(e[i]=r),i===`json_metadata`&&e.type===`json`&&!e.json_metadata&&t.json_metadata&&(e.json_metadata=t.json_metadata)}return e}var LK=class e{annotations;constructor(e){this.annotations=e||{}}getAnnotation(e){return this.annotations[e]}static fromInput(t,{probeCount:n=1e5,inferCatalogFields:i=!0,addIdColumn:a=!0}={probeCount:1e5,inferCatalogFields:!0,addIdColumn:!0}){let o={},s=0,c=0;for(let e of t){if(s++,s>n)break;for(let[t,n]of Object.entries(e)){if(t===``||t==null)continue;let{resolvedInputValue:e,expandedValue:a,isExpanded:s}=MK(n),l;l=s&&a.type?a.type:AK(e);let u;Do(t)&&(u=_(t));let d=u&&(u.type===l||l===`unknown`);(!o[t]||o[t].type===`unknown`&&l!==`unknown`)&&(o[t]={type:l===`unknown`&&d&&i&&u?.type?u.type:l,format:d&&i&&u?.format||null,label:u&&i?u.label:null,json_metadata:d&&i&&u?.jsonMeta?{schema:u.jsonMeta.zodSchema?r.toJSONSchema(u.jsonMeta.zodSchema):null,example_value:u.jsonMeta.exampleValue||null}:null,order:o[t]?.order??++c*10})}}return a&&!o.id&&(o.id={format:null,type:`string`,json_metadata:null,label:null}),new e(o)}merge(t,n=!1,{appendOrders:r=!1}={}){let i=structuredClone(this.annotations),a=t instanceof e?t.annotations:t,o=0;if(r&&!n){let e=Object.values(i).map(e=>e.order).filter(e=>typeof e==`number`&&Number.isFinite(e));o=e.length===0?0:Math.ceil(Math.max(...e)/10)*10}let s=e=>o&&typeof e.order==`number`&&Number.isFinite(e.order)?{...e,order:e.order+o}:e;for(let[e,t]of Object.entries(a))if(i[e]===void 0||n)i[e]=s(t);else{let n=i[e];i[e]=IK(n,s(t))}return new e(i)}deleteKey(t){let n=structuredClone(this.annotations);return delete n[t],new e(n)}};function RK(e){let t={};for(let n=0;n<e.length;n++){let r=e[n];Object.values(r.getOutputFields()).forEach(e=>{if(t[e.resolvedName])throw new gD([mD.AmbiguousDependency({fieldName:e.resolvedName})]);t[e.resolvedName]=n})}return t}function zK(e){let t=RK(e),n=[];for(let[r,i]of e.entries()){let e=[];for(let{field:n,required:a}of yd(i.getInputRequirement())){let o=t[n.resolvedName];if(r===o)throw new gD([{code:`SelfReference`,message:`Pipe '${i.pipeId} has an input requirement that points to a field that is produced by itself.'`}]);if(o==null)continue;let s=e.find(e=>e.index===o);s?(s.reason??=[],s.reason=Array.from(new Set([...s.reason,`input`])),s.required=a||s.required):e.push({index:o,required:a,reason:[`input`]})}if(i.payload.run_if){let n=i.payload.run_if.when.conditions.map(e=>e.field_name);for(let r of n){let n=t[r];if(n==null)continue;let i=e.find(e=>e.index===n);i?(i.reason??=[],i.reason=Array.from(new Set([...i.reason,`input`])),i.required=!0):e.push({index:n,required:!0,reason:[`input`]})}}n.push(e)}return n}function BK({config:e,pipes:t,input:n,field_annotations:r}){try{let i=WK({config:e,pipes:t,input:n,fieldAnnotations:r});return VK(i),i}catch(e){throw e instanceof gD?e:new gD([mD.ValidationFailed({error:e})])}}function VK(e){for(let t of e.orderedPipeInstances)for(let{field:n}of yd(t.getInputRequirement()))Pd({pipes:e.orderedPipeInstances,derivedInputFields:e.derivedInputFields},n.type),Fd({pipes:e.orderedPipeInstances,derivedInputFields:e.derivedInputFields},n.format)}function HK(e,t){if(!e&&!t)throw new gD([mD.MustDefineAnnotations()]);return new LK(t||{}).merge(LK.fromInput(e||[]),!1,{appendOrders:!0})}function UK(e,t,n){let r={...t};return e.pipes.forEach((t,i)=>{for(let[a,o]of Object.entries(t.getOutputFields())){if(dd(o.resolvedName))throw new gD([mD.ReservedOutputFieldName({pipeId:t.pipeId,outputField:o})]);let a=r[o.resolvedName];if(a&&a.added_by.ref!==`input`)throw new gD([mD.DuplicatePipeOutput({pipeId:t.pipeId,outputField:o})]);r[o.resolvedName]={type:Pd(e,o.type),added_by:{ref:t.pipeId,config_hash:t.getConfigHashKey(),pipe_index:i},label:a?.label||o.label,format:Fd(e,o.format),is_primary_output:o.isPrimaryOutput,order:n[o.resolvedName]?.order??o.order??null}}}),r}function WK(e){let t=xK(e.pipes),n=HK(e.input,e.fieldAnnotations),r={},i=new Set;t.forEach((e,t)=>{Object.entries(e.getOutputFields()).forEach(([e,t])=>{r[t.resolvedName]=e,i.add(t.resolvedName)}),qK(e,t)});let a={},o={};for(let[e,t]of Object.entries(n.annotations))o[e]={type:t.type,added_by:{ref:`input`,config_hash:null,pipe_index:null},label:t.label||``,format:t.format?t.format:null,is_primary_output:!1,order:t.order??Oo(e)},!i.has(e)&&(a[e]={addedBy:`input`,required:!1,type:t.type,label:t.label||e});let[s,c,l]=GK(t,n),u=UK({pipes:c,derivedInputFields:a},o,n.annotations);for(let e in u){let t=u[e];r[e]&&(n=n.merge({[e]:{type:t.type,format:t.format,json_metadata:null,label:n.annotations[e]?.label?n.annotations[e]?.label:null,order:n.annotations[e]?.order??null}},!0))}return{environment:e.config.environment,dependencyGraph:l,derivedInputFields:a,fieldAnnotations:n,orderedPipePayloads:s,orderedPipeInstances:c,resolvedFieldNames:r,fieldDefinitions:u}}function GK(e,t){let n=zK(e),r=KK(n,e,t),i=[],a=[];return r.forEach(t=>{let n=e[t];if(!n)throw new gD([mD.FaultyEnrichmentOrder()]);i.push(n.payload),a.push(n)}),[i,a,n]}function KK(e,t,n){let r=t.length,i=[],a=new Set,o=new Set,s=[],c=e=>{let n=t[e];return n?yd(n.getInputRequirement()).length>0:!1},l=(n,r=[])=>{if(o.has(n)){let e=n,i=r[r.length-1]||0,a={idx:i,pipe_id:t[i]?.pipeId},o={idx:e,pipeId:t[e]?.pipeId};throw new gD([mD.CircularDependency({currentPipe:a,circularPipe:o})])}if(a.has(n))return;o.add(n),r.push(n);let s=e[n]||[];for(let e of s)l(e.index,r);r.pop(),o.delete(n),a.add(n),i.push(n)};function u(t){if(a.has(t))return;o.add(t);let n=e[t]||[];for(let e of n){if(!a.has(e.index)&&e.required)throw new gD([mD.UnresolvableDependency({index:t,dependencyIndex:e.index})]);!o.has(e.index)&&!e.required&&u(e.index)}o.delete(t),a.add(t),i.push(t)}for(let e=0;e<r;e++)c(e)&&l(e);for(let e=0;e<r;e++)c(e)||l(e);for(let e=0;e<r;e++)u(e);let d=new Set(Object.keys(n.annotations)),f=new Map(Object.entries(n.annotations).map(([e,t])=>[e,t.type]));for(let e of i){let n=t[e];if(!n)throw Error(`Pipe not defined`);Object.values(n.getOutputFields()).forEach(e=>{d.add(e.resolvedName),typeof e.type==`string`&&f.set(e.resolvedName,e.type)})}for(let[n,r]of t.entries()){let a=r.getInputRequirement();vd(a,d)||s.push(mD.RequirementUnmet({requirement:a,pipeId:r.pipeId,index:n}));let o=e[n]||[],c=i.indexOf(n);for(let e of o){let r=i.indexOf(e.index);e.required&&r>c&&s.push(e.reason.includes(`input`)?mD.HardInputDependencyViolation({dependencyIndex:e.index,dependencyIndexPipeId:t[e.index]?.pipeId,index:n,indexPipeId:t[n]?.pipeId}):mD.HardConditionDependencyViolation({dependencyIndex:e.index,dependencyIndexPipeId:t[e.index]?.pipeId,index:n,indexPipeId:t[n]?.pipeId}))}let l=[...r.payload.run_if?[r.payload.run_if.when]:[],...r.getRowConditionBlocks()];for(let e of l)e.conditions.forEach(e=>{if(!d.has(e.field_name))throw new gD([mD.ConditionTargetFieldNotFound({fieldName:e.field_name,pipeId:r.pipeId,pipeIdx:n})]);if(e.property===`value`&&f.get(e.field_name)===`json`)throw new gD([mD.ConditionValueOnJsonField({fieldName:e.field_name,pipeId:r.pipeId,pipeIdx:n})])})}if(s.length>0)throw new gD(s);return i}function qK(e,t){let n=new Set(e.getConnectionsRequirements().filter(e=>e.allowManagedConnection===!1).map(e=>e.provider));if(n.size>0){let r=e.payload.connector;if(!r||(r.connections.map(e=>{if(e.type===`vault`)return _c(e.connection).provider;e.type}).forEach(e=>{e&&n.delete(e)}),n.size>0))throw new gD([mD.MissingCustomConnections({index:t,pipeId:e.pipeId,missingProviders:Array.from(n)})])}}const JK=`fields:add@1`,YK={},XK=r.object({effect_id:r.literal(JK),connector:$l(),config:r.object({name:r.string().min(1).optional(),type:Lo.optional(),format:rs.nullable().optional(),label:r.string().optional(),insert_relative_to:r.string().min(1).optional(),insert_position:r.enum([`before`,`after`]).optional()})}),ZK=class extends I{effectId=JK;schema=XK;payload;billableOperations=YK;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}evolveSchema(e){let{name:t,type:n,format:r,label:i}=this.payload.config,a=e.validationContext.fieldDefinitions,o;if(t){if(dd(t))throw Error(`"${t}" is a reserved field name and cannot be added.`);if(a[t])throw Error(`Field "${t}" already exists on this sheet.`);o=t}else{let e=`field`;o=e;let t=0;for(;a[o];)if(t++,o=`${e}_${t}`,t>1e3)throw Error(`Unable to generate unique field name`)}let s=n??`string`,c=r===void 0?s===`string`?`text`:null:r;if(c&&!Wm[s].includes(c))throw Error(`The field has the type ${s} but format ${c}. Type and format are not compatible.`);Wm[s].length===0&&(c=null);let l={...e.fieldAnnotations};l[o]={type:s,format:c,label:i??o,json_metadata:null};let{insert_relative_to:u,insert_position:d}=this.payload.config;if(u){let t=pd({fieldDefinitions:a,fieldAnnotations:e.fieldAnnotations??{}}).fieldOrder.input??[],n=t.indexOf(u);if(n!==-1){let e=[...t];e.splice(d===`before`?n:n+1,0,o),e.forEach((e,t)=>{let n=l[e];n&&(l[e]={...n,order:(t+1)*10})})}}return nd(BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:l}),e.environment)}},QK=XK,$K={effectId:JK,baseEffect:L(JK),label:`Add field`,description:`Add a new input field (column) to the sheet — named and typed, or empty.`,categories:[`internal`],tags:[],keywords:[`column`,`columns`,`fields`,`input`,`create`,`declare`,`structure`,`empty`,`schema`],lifecycle:null,billableOperations:YK,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,guide:`Adds ONE input column. config {} (the dash gesture) auto-names it (field, field_1, …). Pass config.name (+ type/format/label) to DECLARE a column up front — the column is visible to the REST OF THE CHAIN, so [fields:add ×N, pipe:add <pipe referencing them>] validates and commits in one run_effects; use this to give an empty sheet structure before any rows exist. Rejects a name that already exists on the sheet and the reserved name id. Optional insert_relative_to (an existing input field) + insert_position (before|after) persist the column's display position into the schema's field annotations; a missing anchor appends silently. To rename or retype an existing column use fields:patch@1.`,defaultPayload:{effect_id:JK,connector:null,config:{}}},eq=`fields:deletesparse:input@1`,tq={},nq=r.object({effect_id:r.literal(eq),connector:$l(),config:r.object({fields:su({path:`config.fields`,sectionKey:`general`,groupPath:`config.general`,label:`Candidate fields`,minItems:1,description:`Input fields to delete if they turn out sparsely populated.`}),probe_size:Xu({path:`config.probe_size`,sectionKey:`general`,groupPath:`config.general`,label:`Probe size`,description:`How many rows to sample when measuring column density.`,min:100,max:1e4}).default(1e3),threshold_in_percent:Xu({path:`config.threshold_in_percent`,sectionKey:`general`,groupPath:`config.general`,label:`Density threshold (%)`,description:`Candidates populated in strictly fewer than this percent of probed rows are deleted.`,min:1,max:100}).default(25)})}),rq=class extends I{effectId=eq;schema=nq;payload;billableOperations=tq;constructor(e){if(super(),this.payload=this.validatePayload(e),this.payload.config.fields.some(e=>e.field_name===`id`))throw Error(`Cannot list the id field as a deletion candidate.`)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return this.payload.config.fields.map(e=>e.field_name)}evolveSchema(e){let t=structuredClone(e.fieldAnnotations||{});for(let{field_name:e}of this.payload.config.fields)delete t[e];if(Object.keys(t).filter(e=>e!==`id`).length===0&&e.pipes.length===0)throw Error(`fields:deletesparse:input@1 lists every input column as a candidate — it refuses to empty the sheet. Keep at least one column off the candidate list, or use fields:remove@1 / sheet:reset@1 to clear the sheet explicitly.`);let n=BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:t});return{next:{environment:e.environment,pipes:e.pipes,fieldAnnotations:t,validationContext:n}}}},iq=nq,aq={effectId:eq,baseEffect:L(eq),label:`Delete sparse input columns`,description:`Probe rows to measure how densely candidate input columns are populated and delete the ones below a density threshold.`,guide:`Conditional column cleanup: list every input column you'd consider dropping as config.fields (typically the sparse leftovers rows:copy_to_sheet@1 imports leave behind) — the density check keeps any candidate that turns out well-populated. Probes the first config.probe_size rows (default 1000) and deletes a candidate only when it is populated in strictly fewer than config.threshold_in_percent (default 25) of them. Only listed fields can be deleted; id and pipe-referenced fields cannot be listed (validation error). Static validation treats ALL candidates as removed (aggressive over-approximation), so do not reference a candidate in later steps of the same run — re-read get_sheet_schema afterwards to see which columns survived. Deletes columns, never rows. DESTRUCTIVE (approval-gated), reversible via timetravel. To delete named columns unconditionally use fields:remove@1 instead.`,categories:[`data_hygiene`],tags:[V.NEW],keywords:[`empty`,`cleanup`,`prune`,`remove fields`,`unused`,`blank`],lifecycle:null,billableOperations:tq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`visible`,defaultPayload:{effect_id:eq,connector:null,config:{fields:[],probe_size:1e3,threshold_in_percent:25}}},oq=`fields:duplicate@1`,sq={},cq=r.object({effect_id:r.literal(oq),connector:$l(),config:r.object({fields:su({path:`config.fields`,sectionKey:`general`,groupPath:`config.general`,label:`Fields to duplicate`,minItems:1,description:`Each selected field is copied to a new editable input column.`})})});function lq(e,t){let n=`${e}_copy`;if(!t.has(n))return{name:n,index:null};let r=2;for(;t.has(`${n}_${r}`);)r++;return{name:`${n}_${r}`,index:r}}function uq(e){if(e==null)return null;let{isExpanded:t,expandedValue:n,resolvedInputValue:r}=MK(e);return t&&n.status!==`completed`||r==null?null:typeof r==`object`?structuredClone(r):r}const dq=class extends I{effectId=oq;schema=cq;payload;billableOperations=sq;constructor(e){super(),this.payload=this.validatePayload(e);let t=this.payload.config.fields.map(e=>e.field_name);if(t.includes(`id`))throw Error(`Cannot duplicate the id field.`);if(new Set(t).size!==t.length)throw Error(`Cannot duplicate the same field twice in one effect.`)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[...new Set(this.payload.config.fields.map(e=>e.field_name))]}evolveSchema(e){let t=e.validationContext.fieldDefinitions,n=new Set(Object.keys(t)),r=structuredClone(e.fieldAnnotations||{}),i=[];for(let{field_name:a}of this.payload.config.fields){let o=t[a];if(!o)throw Error(`Field name ${a} not found in current schema.`);let{name:s,index:c}=lq(a,n);n.add(s),i.push({source:a,target:s});let l=e.fieldAnnotations?.[a];r[s]={type:o.type,format:o.format??null,label:c===null?`${o.label} copy`:`${o.label} copy ${c}`,...l?.json_metadata?{json_metadata:structuredClone(l.json_metadata)}:{},...l?.order==null?{}:{order:l.order+1}}}return nd(BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:r}),e.environment,(e,t)=>{for(let{source:n,target:r}of i)e.input[r]=uq(t.input[n]);return e})}},fq=cq,pq={effectId:oq,baseEffect:L(oq),label:`Duplicate fields`,description:`Copy fields into new editable input columns (enrichment values become plain values).`,categories:[`data_hygiene`],tags:[V.NEW],keywords:[`copy`,`clone`,`freeze`,`snapshot`,`column`],lifecycle:null,billableOperations:sq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`visible`,guide:`Copy fields into new editable input columns — works for user-entered AND pipe-output fields, so it freezes an enrichment result into a plain value you can edit or re-enrich over. Copies land as "<field>_copy" (then "<field>_copy_2", …) with the source's type/format; only the RESOLVED VALUE is copied — cells whose status is not "completed" copy as null, and status/provenance never carry over. Put every field to duplicate in ONE effect. Later effects in the same chain may reference the "_copy" names.`,defaultPayload:{effect_id:oq,connector:null,config:{fields:[]}}},mq=`fields:order:reset@1`,hq={},gq=r.object({effect_id:r.literal(mq),connector:$l(),config:r.object({})}),_q=class extends I{effectId=mq;schema=gq;payload;billableOperations=hq;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}evolveSchema(e){let t={};for(let[n,r]of Object.entries(e.fieldAnnotations??{})){let{order:e,...i}=r;t[n]=i}return nd(BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:t}),e.environment)}},vq=gq,yq={effectId:mq,baseEffect:L(mq),label:`Reset column order`,description:`Clear all custom column ordering and return to the default arrangement.`,categories:[`data_hygiene`],tags:[],keywords:[`order`,`reorder`,`columns`,`arrange`,`layout`,`default`,`reset`],lifecycle:null,billableOperations:hq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`visible`,guide:`Clears every column's custom display position (set by dragging or insert placement) so the sheet returns to its DEFAULT arrangement: input columns first, pipe groups in dependency order, primary outputs leading their group. Display-only and idempotent — no values, names, types, or pipes change, and it is not undoable except by re-dragging.`,defaultPayload:{effect_id:mq,connector:null,config:{}}};function bq(e,t,n){if(e==null||typeof e==`number`||typeof e==`boolean`)return e;if(typeof e==`string`){let r=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`),i=new RegExp(r,`g`);return e.replace(i,n)}if(Array.isArray(e))return e.map(e=>bq(e,t,n));if(typeof e==`object`){let r={};for(let i in e)Object.hasOwn(e,i)&&(i.includes(`path`)||[`connector`,`provider`,`pipe_id`,`search_id`].includes(i)?r[i]=e[i]:r[i]=bq(e[i],t,n));return r}return e}function xq(e,t,n){let r={...e};r.config??={};let i=r.config;if(i?.input_fields?.[t]&&(!i.input_fields[t].alias||i.input_fields[t].alias===t)){let e=i.input_fields[t]||{};i.input_fields[t]={...e,alias:n}}return r}function Sq(e,t,n){let r=[];for(let i of e.orderedPipePayloads){let e=bq(i,t,n);r.push(xq(e,t,n))}return r}function Cq(e,t,n,r,i){if(!e.orderedPipeInstances[t])throw Error(`Pipe instance at index ${t} is not defined`);let a={...n};if(cK(n.pipe_id).outputFieldMode===`static`){let n=e.resolvedFieldNames[r]?e.resolvedFieldNames[r]:Object.entries(e.resolvedFieldNames).find(([,e])=>e===r)?.[0];if(!n)throw Error(`Unable to find field name ${r} in pipe at idx ${t}`);a.config??={};let o=a.config,s=o.output_fields?.[n]||{};return o.output_fields??={},o.output_fields[n]??={},o.output_fields[n]={...s,alias:i},xq(a,r,i)}return bq(a,r,i)}function wq(e,t,n,r){let i=[];for(let a=0;a<e.orderedPipePayloads.length;a++){let o=e.orderedPipePayloads[a],s=t.added_by.pipe_index;if(typeof s!=`number`)throw Error(`Pipe index must be number.`);a===s?i.push(Cq(e,a,o,n,r)):i.push(bq(o,n,r))}return i}function Tq(e,t,n){let r=e.fieldDefinitions[t];if(!r)throw Error(`No field definition found for field with name ${t}`);return r?.added_by.ref===`input`?Sq(e,t,n):wq(e,r,t,n)}const Eq=`fields:patch@1`,Dq={},Oq=r.object({effect_id:r.literal(Eq),connector:$l(),config:r.object({field_name:r.string().min(1),new_name:r.string().min(1).optional(),new_format:rs.nullable().optional(),new_type:Lo.optional(),new_label:r.string().optional()})}),kq=class extends I{effectId=Eq;schema=Oq;payload;billableOperations=Dq;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[this.payload.config.field_name]}evolveSchema(e){let{field_name:t,new_name:n,new_label:r,new_format:i,new_type:a}=this.payload.config;if(!e.fieldAnnotations?.[t])throw Error(`Field name ${t} not found in current schema.`);let o=e.validationContext,s=o.fieldDefinitions[t];if(!s)throw Error(`Field definition for field ${t} not found.`);let c={...e.fieldAnnotations},l=!!n&&n!==t,u=[...o.orderedPipePayloads];if(l){u=Tq(o,t,n);let e=c[t];if(!e)throw Error(`Unable to find file annotations for field ${t}.`);c[n]=e,delete c[t]}let d=s.added_by.ref===`input`,f=n||t,p=a||s.type,m=i||s.format;if(a&&a!==s.type){if(!d)throw Error(`Cannot change the type of a pipe output field.`);c[f].type=a,Wm[a].length===0&&(c[f].format=null)}if(i&&i!==s.format){if(!d)throw Error(`Cannot change the format of a pipe output field.`);c[f].format=i}if(Wm[p].length&&m&&!Wm[p].includes(m))throw Error(`After applying your updates the field has the type ${p} but format ${m}. Type and format are not compatible.`);r&&r!==s.label&&(c[f].label=r);let ee=BK({config:{environment:e.environment},pipes:u,field_annotations:c}),te=l?(e,r)=>(e.input[n]=r.input[t]||null,e):void 0;return nd(ee,e.environment,te)}},Aq=Oq,jq={effectId:Eq,baseEffect:L(Eq),label:`Edit field`,description:`Rename, retype, reformat, or relabel a field.`,categories:[`internal`],tags:[],keywords:[`column`,`columns`,`fields`,`rename`,`retype`,`reformat`,`relabel`],guide:`Renames/retypes/reformats/relabels an EXISTING column — config.field_name must already exist on the sheet, and type/format changes apply only to INPUT columns, never pipe outputs. A rename rewrites pipe-payload references and migrates row values. To CREATE a new named column use fields:add@1 with config.name.`,lifecycle:null,billableOperations:Dq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,defaultPayload:{effect_id:Eq,connector:null,config:{field_name:``}}},Mq=`fields:remove@1`,Nq={},Pq=r.object({effect_id:r.literal(Mq),connector:$l(),config:r.object({field_names:r.array(r.string().min(1)).min(1)})}),Fq=class extends I{effectId=Mq;schema=Pq;payload;billableOperations=Nq;constructor(e){if(super(),this.payload=this.validatePayload(e),this.payload.config.field_names.includes(`id`))throw Error(`Cannot remove the id field.`)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return this.payload.config.field_names}evolveSchema(e){let t=structuredClone(e.fieldAnnotations||{});for(let e of this.payload.config.field_names)delete t[e];if(Object.keys(t).length===1){let t=BK({config:{environment:e.environment},pipes:[],field_annotations:{}});return{next:{environment:e.environment,pipes:[],fieldAnnotations:{},validationContext:t}}}let n=BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:t});return{next:{environment:e.environment,pipes:e.pipes,fieldAnnotations:t,validationContext:n}}}},Iq=Pq,Lq={effectId:Mq,baseEffect:L(Mq),label:`Remove fields`,description:`Remove fields (input columns) from the sheet.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:Nq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,defaultPayload:{effect_id:Mq,connector:null,config:{field_names:[]}}},Rq=`pipe:add@1`,zq={},Bq=r.object({effect_id:r.literal(Rq),connector:$l(),config:r.object({pipe_payload:oK.optional()})}),Vq=class extends I{effectId=Rq;schema=Bq;payload;billableOperations=zq;constructor(e){if(super(),this.payload=this.validatePayload(e),!this.payload.config.pipe_payload)throw Error(`pipe:add@1 requires config.pipe_payload`)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}evolveSchema(e){let t=this.payload.config.pipe_payload;if(!t)throw Error(`pipe:add@1 requires config.pipe_payload`);return nd(BK({config:{environment:e.environment},pipes:[...e.pipes,t],field_annotations:e.fieldAnnotations||{}}),e.environment)}},Hq=Bq,Uq={effectId:Rq,baseEffect:L(Rq),label:`Add pipe`,description:`Append a pipe to the sheet's pipeline.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:zq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,defaultPayload:{effect_id:Rq,connector:null,config:{}}},Wq=`pipe:remove@1`,Gq={},Kq=r.object({effect_id:r.literal(Wq),connector:$l(),config:r.object({config_hash:r.string(),hard:r.boolean().default(!1)})}),qq=class extends I{effectId=Wq;schema=Kq;payload;billableOperations=Gq;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}evolveSchema(e){let{config_hash:t,hard:n}=this.payload.config,i=xK(e.pipes).findIndex(e=>e.getConfigHashKey()===t);if(i===-1)throw Error(`Pipe with config hash ${t} not found.`);let a=e.validationContext,o=new Set(Object.entries(a.fieldDefinitions).filter(([,e])=>e.added_by.config_hash===t).map(([e])=>e)),s=new LK(e.fieldAnnotations||{});for(let e of o){let t=a.fieldDefinitions[e];if(!t)continue;if(n){s=s.deleteKey(e);continue}let i=Ao(e,t,a),o=Do(i.fieldName)?_(i.fieldName):null;s=s.merge({[e]:{format:t.format,type:t.type,json_metadata:o?.jsonMeta?{schema:o.jsonMeta.zodSchema?r.toJSONSchema(o.jsonMeta.zodSchema):null,example_value:o.jsonMeta.exampleValue||null}:null,label:t.label}})}let c=e.pipes.slice();c.splice(i,1);let l=BK({config:{environment:e.environment},pipes:c,field_annotations:s.annotations}),u=n?void 0:e=>{let t={...e};for(let e of o){let n=t.input[e];if(!n)continue;let{resolvedInputValue:r}=MK(n);t.input[e]=r}return t};return{next:{environment:e.environment,pipes:c,fieldAnnotations:s.annotations,validationContext:l},rowMigration:u}}},Jq=Kq,Yq={effectId:Wq,baseEffect:L(Wq),label:`Remove pipe`,description:`Remove a pipe from the sheet's pipeline, optionally deleting its fields.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:Gq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,defaultPayload:{effect_id:Wq,connector:null,config:{config_hash:``,hard:!1}}},Xq=`pipe:update@1`,Zq={},Qq=r.object({effect_id:r.literal(Xq),connector:$l(),config:r.object({config_hash:r.string().min(1),pipe_payload:oK.optional()})}),$q=class extends I{effectId=Xq;schema=Qq;payload;billableOperations=Zq;constructor(e){if(super(),this.payload=this.validatePayload(e),!this.payload.config.pipe_payload)throw Error(`pipe:update@1 requires config.pipe_payload`)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}evolveSchema(e){let{config_hash:t,pipe_payload:n}=this.payload.config;if(!n)throw Error(`pipe:update@1 requires config.pipe_payload`);let i=xK(e.pipes).findIndex(e=>e.getConfigHashKey()===t);if(i===-1)throw Error(`Pipe with config hash ${t} not found.`);let a=e.validationContext,o=new Set(Object.entries(a.fieldDefinitions).filter(([,e])=>e.added_by.config_hash===t).map(([e])=>e)),s=[...e.pipes];s.splice(i,1,n);let c=BK({config:{environment:e.environment},pipes:s,field_annotations:e.fieldAnnotations||{}}),l=new(rK(n.pipe_id))(n),u=new Set(Object.entries(c.fieldDefinitions).filter(([,e])=>e.added_by.config_hash===l.getConfigHashKey()).map(([e])=>e));for(let e of u)o.delete(e);let d=new LK(c.fieldAnnotations.annotations);for(let e of o){let t=a.fieldDefinitions[e];if(!t)throw Error(`Previous field def not found`);if(c.resolvedFieldNames[e])continue;let n=Ao(e,t,a),i=Do(n.fieldName)?_(n.fieldName):null;d=d.merge({[e]:{format:t.format,type:t.type,json_metadata:i?.jsonMeta?{schema:i.jsonMeta.zodSchema?r.toJSONSchema(i.jsonMeta.zodSchema):null,example_value:i.jsonMeta.exampleValue||null}:null,label:t.label}})}let f=BK({config:{environment:e.environment},pipes:c.orderedPipePayloads,field_annotations:d.annotations});return{next:{environment:e.environment,pipes:c.orderedPipePayloads,fieldAnnotations:d.annotations,validationContext:f},rowMigration:e=>{let t={...e};for(let e of o){let n=t.input[e];if(!n)continue;let{resolvedInputValue:r}=MK(n);t.input[e]=r}return t}}}},eJ=Qq,tJ={effectId:Xq,baseEffect:L(Xq),label:`Update pipe`,description:`Replace a pipe in the sheet's pipeline and re-run it.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:Zq,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,defaultPayload:{effect_id:Xq,connector:null,config:{config_hash:``}}},nJ=`row:update@1`,rJ={},iJ=r.object({effect_id:r.literal(nJ),connector:$l(),config:r.object({record_id:r.string().min(1),record:ps})}),aJ=class extends I{effectId=nJ;schema=iJ;payload;billableOperations=rJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}},oJ=iJ,sJ={effectId:nJ,baseEffect:L(nJ),label:`Update row`,description:`Update a single row's values.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:rJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`shared`,lockScope:`selection`,catalogVisibility:`hidden`,defaultPayload:{effect_id:nJ,connector:null,config:{record_id:``,record:{}}}},cJ=`rows:add@1`,lJ={},uJ=r.object({effect_id:r.literal(cJ),connector:$l(),config:r.object({input:r.array(ps).min(1).max(100),allow_field_creation:r.boolean().default(!1),allow_empty:r.boolean().default(!1)})}),dJ=class extends I{effectId=cJ;schema=uJ;payload;billableOperations=lJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}producesDynamicFields(){return!1}evolveSchema(e){if(!this.payload.config.allow_field_creation){let t=new Set(Object.keys(e.validationContext.fieldDefinitions)),n=[...new Set(this.payload.config.input.flatMap(e=>Object.keys(e)))].filter(e=>e!==`id`&&!t.has(e));if(n.length>0)throw Error(`records carry fields that do not exist on the sheet: ${n.join(`, `)}. Set allow_field_creation: true to create these columns from the records — do not recreate the sheet.`);return{next:e}}let t=e.validationContext.fieldAnnotations.merge(LK.fromInput(this.payload.config.input).annotations,!1,{appendOrders:!0});return nd(BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:t.annotations}),e.environment)}},fJ=uJ,pJ={effectId:cJ,baseEffect:L(cJ),label:`Add rows`,description:`Append records to the sheet. Each cell accepts a flat value OR a fully expanded field value (input expansion) — pass enriched records unchanged.`,guide:[`Each record is a flat map of field name → cell. A cell is either a flat value`,"(stamped as user input) or an expanded field value `{ value, status, resolved_by,","widgets, ... }` copied unchanged from a pipes/search response — never hand-written",`(its fingerprints are computed by the engine). An expanded cell keeps the pipe that`,"made it, so attaching the same pipe config via `pipe:add@1` afterwards claims the",`column and completed cells stay completed — nothing recomputes, nothing re-bills.`,"Only `completed` cells keep the expanded form; other statuses collapse to their","plain value on insert. `id` is the record identity, never a data column — omit it","and one is minted. Set `allow_field_creation: true` to create missing columns from",`the record keys (types inferred from the real values). Caps at 100 records per`,`effect — put several rows:add@1 effects in one chain for larger batches; for bulk`,"loads use the staging-group import (`rows:import@1`)."].join(` `),categories:[`internal`],tags:[],lifecycle:null,billableOperations:lJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`shared`,lockScope:`self`,catalogVisibility:`hidden`,defaultPayload:{effect_id:cJ,connector:null,config:{input:[],allow_field_creation:!1,allow_empty:!1}}},mJ=r.enum([`pending`,`failed`,`no_result`,`skipped`,`completed`]),hJ=[{value:`pending`,label:`Pending`},{value:`failed`,label:`Failed`},{value:`no_result`,label:`No result`},{value:`skipped`,label:`Skipped`},{value:`completed`,label:`Completed`}],gJ=[`pending`],_J=[`pending`,`failed`,`skipped`];function vJ(e){return{enabled:!0,triggers:{status:e,configHashMismatch:!0,inputHashMismatch:!0}}}const yJ=`rows:adopt@1`,bJ={},xJ=r.object({effect_id:r.literal(yJ),connector:$l(),config:r.object({pipes:r.array(oK).default([]),selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to target.`,placeholder:`{"type":"all"}`},`both`),adopt_statuses:Yu({options:hJ,required:!1,disableSearch:!0,path:`config.adopt_statuses`,sectionKey:`general`,groupPath:`config.general`,label:`Adopt statuses`,description:`Only cells with these statuses are adopted (pinned). Omit to adopt all.`}).optional()})}),SJ=class extends I{effectId=yJ;schema=xJ;payload;billableOperations=bJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}},CJ=xJ,wJ={effectId:yJ,baseEffect:L(yJ),label:`Adopt values`,description:`Pin the selected columns' current values so a config or input change won't regenerate them.`,guide:'Adopt re-stamps each selected cell\'s stored config/input hash to the CURRENT one, so the value is kept as-is instead of being re-run. It never recomputes — use `rows:enrich@1` to (re)compute. Adopting all statuses composes with a follow-up `rows:enrich@1` (`run_statuses: ["failed"]`) to rerun only the failures while completed cells stay pinned — the safe pattern before running a non-idempotent effect twice.',categories:[`internal`],tags:[],lifecycle:null,billableOperations:bJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`shared`,lockScope:`selection`,catalogVisibility:`hidden`,defaultPayload:{effect_id:yJ,connector:null,config:{pipes:[]}}},TJ=`rows:copy_to_sheet@1`,EJ={},DJ=r.object({effect_id:r.literal(TJ),connector:$l(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to copy as JSON.`,placeholder:`{"type":"all"}`},`both`),where:Ll({path:`config.where`,sectionKey:`general`,groupPath:`config.general`,order:1,label:`Condition (optional)`,description:`Only copy selected rows matching this condition. Leave empty to copy all.`}),target_sheet:Ku({path:`config.target_sheet`,sectionKey:`general`,groupPath:`config.general`,order:2,inputType:`text`,label:`Target sheet`,description:`Slug of the destination sheet. Created if missing (see below). Slugs are org-unique — for a NEW sheet use a short descriptive slug plus a few random chars (e.g. "ceos-x7k2") so it can't hit an unrelated existing sheet.`}),create_if_missing:Qu({path:`config.create_if_missing`,sectionKey:`general`,groupPath:`config.general`,order:3,label:`Create if missing`,description:`When the target sheet does not exist, create it in this sheet's project. Off ⇒ fail.`,defaultValue:!0})})}),OJ=class extends I{effectId=TJ;schema=DJ;payload;billableOperations=EJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){let e=this.payload.config.where;return e?[...new Set(e.conditions.map(e=>e.field_name))]:[]}},kJ=DJ,AJ={effectId:TJ,baseEffect:L(TJ),label:`Copy rows to sheet`,description:`Copy selected rows (or every row) into another sheet — all of them, or only those matching a condition. Creates the target sheet in this project if it doesn't exist.`,categories:[`data_hygiene`],tags:[V.NEW],keywords:[`move`,`transfer`,`split`,`push`,`another sheet`],lifecycle:null,billableOperations:EJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`shared`,lockScope:`self`,catalogVisibility:`visible`,defaultPayload:{effect_id:TJ,connector:null,config:{selection:{type:`all`},target_sheet:``,create_if_missing:!0}}},jJ=`rows:dedupe@1`,MJ={"rows-dedupe-v1-pipe0":{allowManagedConnection:!0,provider:`pipe0`,mode:`always`,credits:{default:0},note:`Deduplicating your own sheet is free.`}},NJ=r.object({effect_id:r.literal(jJ),connector:$l(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to target as JSON.`,placeholder:`{"type":"all"}`},`both`),fields:su({path:`config.fields`,sectionKey:`general`,groupPath:`config.general`,label:`Match fields`,minItems:1,description:`Rows are duplicates when these fields match.`}),match:Ju({path:`config.match`,sectionKey:`general`,groupPath:`config.general`,label:`Match condition`,required:!0,defaultValue:`all`,options:[{value:`all`,label:`All fields match (AND)`},{value:`any`,label:`Any field matches (OR)`}]}),strategy:Ju({path:`config.strategy`,sectionKey:`general`,groupPath:`config.general`,label:`Which duplicate to keep`,required:!0,defaultValue:`keep_oldest`,options:[{value:`keep_oldest`,label:`Keep oldest`},{value:`keep_newest`,label:`Keep newest`}]})})}),PJ=class extends I{effectId=jJ;schema=NJ;payload;billableOperations=MJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitOperation:`pipe0_api_operation`,rateLimitRatio:1,allowManagedConnection:!0}]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`rows-dedupe-v1-pipe0`)}getFieldReferences(){return this.payload.config.fields.map(e=>e.field_name)}},FJ=NJ,IJ={effectId:jJ,baseEffect:L(jJ),label:`Remove duplicate rows`,description:`Find duplicate rows by matching fields and keep one row per group.`,categories:[`data_hygiene`],tags:[V.NEW],keywords:[`dedupe`,`deduplicate`,`merge`,`clean`,`unique`],lifecycle:null,billableOperations:MJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`exclusive`,shouldUpgradeSchema:!0,catalogVisibility:`visible`,guide:`Dedupe in ONE run: list every identity field in config.fields and pick config.match — "all" (rows are duplicates only when every field matches) or "any" (a match on ANY listed field makes rows duplicates). To dedupe on several alternative keys (e.g. same email OR same profile_url), use match "any" with all keys in one effect — never run one dedupe per field; if you must combine dedupe with other cleanup, put the effects in one validated chain so the user approves once. Destructive and approval-gated; reversible via timetravel.`,defaultPayload:{effect_id:jJ,connector:null,config:{fields:[],match:`all`,strategy:`keep_oldest`}}},LJ=`rows:duplicate@1`,RJ={"rows-duplicate-v1-pipe0":{allowManagedConnection:!0,provider:`pipe0`,mode:`always`,credits:{default:0},note:`Duplicating rows in your own sheet is free.`}},zJ=r.object({effect_id:r.literal(LJ),connector:$l(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to target as JSON.`,placeholder:`{"type":"all"}`},`both`)})}),BJ=class extends I{effectId=LJ;schema=zJ;payload;billableOperations=RJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[{provider:`pipe0`,rateLimitOperation:`pipe0_api_operation`,rateLimitRatio:1,allowManagedConnection:!0}]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(e){return H(e,`rows-duplicate-v1-pipe0`)}getFieldReferences(){return[]}},VJ=zJ,HJ={effectId:LJ,baseEffect:L(LJ),label:`Duplicate rows`,description:`Copy the selected rows (or every row). Copies get fresh ids and are appended after the existing rows.`,categories:[`data_hygiene`],tags:[V.NEW],keywords:[`copy`,`clone`,`replicate`],lifecycle:null,billableOperations:RJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`shared`,lockScope:`self`,catalogVisibility:`visible`,defaultPayload:{effect_id:LJ,connector:null,config:{}}},UJ=`rows:enrich@1`,WJ={},GJ=r.object({effect_id:r.literal(UJ),connector:$l(),config:r.object({pipes:r.array(oK).default([]),selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to target: all rows, specific record ids, or a window ({"type":"window","count":N}) — the next N rows with queued work. On a schedule the window advances each fire until the list is exhausted.`,placeholder:`{"type":"all"}`},`both`),run_statuses:Yu({options:hJ,required:!1,disableSearch:!0,path:`config.run_statuses`,sectionKey:`general`,groupPath:`config.general`,label:`Run statuses`,description:`Cell statuses to (re)run. Omitted: scheduled runs fill only pending cells; manual runs also re-run failed and skipped.`}).optional(),where:Ll({path:`config.where`,sectionKey:`general`,groupPath:`config.general`,order:2,label:`Condition (optional)`,description:`Only enrich selected rows matching this condition. Leave empty to consider all selected rows.`})})}),KJ=class extends I{effectId=UJ;schema=GJ;payload;billableOperations=WJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getRecordQueueConfig(e){return vJ(this.payload.config.run_statuses??(e?.isScheduled?gJ:_J))}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){let e=this.payload.config.where;return e?[...new Set(e.conditions.map(e=>e.field_name))]:[]}getRowFilter(){return this.payload.config.where??null}},qJ=GJ,JJ={effectId:UJ,baseEffect:L(UJ),label:`Enrich rows`,description:`Run the sheet's pipes over the selected rows.`,categories:[`enrichment`],tags:[],keywords:[`run`,`execute`,`process`,`refresh`,`rerun`,`pipes`],lifecycle:null,billableOperations:WJ,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],catalogVisibility:`visible`,selectionMode:`both`,lockingMode:`shared`,lockScope:`selection`,guide:`Three narrowing axes compose (all AND): config.selection picks the rows in scope, config.where keeps only scoped rows matching a condition, and config.run_statuses decides which CELLS on those rows (re)run — force-rerun is selecting "completed" there. The where travels verbatim in schedules and is re-evaluated per row per run, so a static scheduled payload can express freshness cohorts, e.g. where last_attempted_at older_than_days 90 AND status(profile) eq completed with run_statuses ["completed"]. A finite list drips on a schedule via a window selection instead: {"type":"window","count":N} claims the next N rows with queued work each fire (completed rows leave the work set, so the window auto-advances) until the sheet is exhausted — no cursor or state needed. Omitted run_statuses resolve from the trigger: a scheduled run fills only pending cells; a manual run also re-runs failed/skipped. run_statuses selects which cells START a pipe, not which cells it writes: a pipe resolves all of its output cells in one provider call, so once any cell of a pipe is selected for a row, that pipe's other UNRESOLVED cells on the row (pending/no_result/failed/skipped) are recomputed too — the call is made either way, and the alternative is discarding data you already paid for. Cells that already hold a value are never overwritten this way; that stays run_statuses ["completed"]. A where may reference a json field's STATUS (property "status" — e.g. status(person_profile_match) eq completed), but never its VALUE — compare flat columns for values. A retry cohort keyed on failed/no_result must widen run_statuses to ["failed","completed","skipped"] (resp. no_result) so timestamp/counter cells restamp and previously skipped downstream pipes re-activate on success — the where already restricts which rows are touched.`,defaultPayload:{effect_id:UJ,connector:null,config:{pipes:[]}}},YJ=`rows:filter:prompt@1`,XJ=`rows-filter-prompt-v1`,ZJ=Yc(XJ),QJ=r.object({effect_id:r.literal(YJ),connector:Ql(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to target as JSON.`,placeholder:`{"type":"all"}`},`both`),prompt:qu({path:`config.prompt`,sectionKey:`general`,groupPath:`config.general`,label:`Filter instruction`,rows:4,placeholder:`Only keep rows where the person is a "Head of Growth" at a company doing less than $1M in revenue.`}),model:ed({sectionKey:`general`,label:`Model`,path:`config.model`,groupPath:`config.general`,billableOperations:ZJ,defaultValue:Vc}),fields:su({path:`config.fields`,sectionKey:`general`,groupPath:`config.general`,label:`Fields to consider`,info:`If specified, only these fields are shown to the model. This is useful to drop large JSON columns and save tokens.`})})}),$J=class extends I{effectId=YJ;schema=QJ;payload;billableOperations=ZJ;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return Uc(this.payload.config.model)}getProviderNames(){return Hc(this.payload.config.model)}estimateBillableOperations(e){return Zc(e,{model:this.payload.config.model,prefix:XJ,inputTokens:600,outputTokens:50})}getFieldReferences(){return(this.payload.config.fields??[]).map(e=>e.field_name)}},eY=QJ,tY={effectId:YJ,baseEffect:L(YJ),label:`AI filter rows`,description:`Keep or remove rows by a natural-language instruction, judged per row by an AI model.`,categories:[`data_hygiene`],tags:[V.NEW,V.AI],keywords:[`classify`,`qualify`,`score`,`prompt`,`clean`],lifecycle:null,billableOperations:ZJ,allowedUserConnectionProviders:Wc(),managedProviders:Wc(),selectionMode:`both`,lockingMode:`exclusive`,shouldUpgradeSchema:!0,catalogVisibility:`visible`,defaultPayload:{effect_id:YJ,connector:null,config:{model:Vc,prompt:``,fields:[]}}},nY=`rows:import@1`,rY={},iY=r.object({effect_id:r.literal(nY),connector:$l(),config:r.object({staging_group_id:r.string().min(1),allow_field_creation:r.boolean().default(!1),event_id:r.string().nullable().default(null)})}),aY=class extends I{effectId=nY;schema=iY;payload;billableOperations=rY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}producesDynamicFields(){return this.payload.config.allow_field_creation===!0}},oY=iY,sY={effectId:nY,baseEffect:L(nY),label:`Import rows`,description:`Append records from a staging group (CSV import / search commit).`,categories:[`internal`],tags:[],keywords:[`csv`,`upload`,`excel`,`spreadsheet`,`file`],lifecycle:null,billableOperations:rY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`shared`,lockScope:`self`,catalogVisibility:`hidden`,defaultPayload:{effect_id:nY,connector:null,config:{staging_group_id:``,allow_field_creation:!1,event_id:null}}},cY=`rows:remove@1`,lY={},uY=r.object({effect_id:r.literal(cY),connector:$l(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to delete as JSON.sc`,placeholder:`{"type":"all"}`},`both`),where:Ll({path:`config.where`,sectionKey:`general`,groupPath:`config.general`,order:1,label:`Condition (optional)`,description:`Only delete selected rows matching this condition. Leave empty to delete all.`})})}),dY=class extends I{effectId=cY;schema=uY;payload;billableOperations=lY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){let e=this.payload.config.where;return e?[...new Set(e.conditions.map(e=>e.field_name))]:[]}},fY=uY,pY={effectId:cY,baseEffect:L(cY),label:`Delete rows`,description:`Delete selected rows — all of them, or only those matching a condition.`,categories:[`data_hygiene`],tags:[],keywords:[`remove`,`drop`,`clear`,`clean`,`purge`],lifecycle:null,billableOperations:lY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`exclusive`,lockScope:`selection`,catalogVisibility:`visible`,guide:`Delete rows matching config.where (omit selection to consider ALL rows; omit where to delete the whole selection). Destructive and approval-gated, so make ONE remove do the whole job: or-combine EVERY drop criterion into a single where (logic "or", one condition per field) instead of running several removes — and put the remove in the same validated chain as any fields:remove / rename cleanup so the user approves once. To drop rows whose enrichment yielded nothing, condition on the field's STATUS (property "status", e.g. neq "completed" — catches skipped, failed, and no_result at once). Bracketed cell renderings from get_sheet_rows like "[no_result]"/"[skipped]" are status placeholders for EMPTY cells, never stored values — a value condition cannot match them. After the run, re-read the sheet ONCE to confirm; if the rows you expected gone are still there, stop and report the discrepancy instead of retrying with variant conditions.`,defaultPayload:{effect_id:cY,connector:null,config:{selection:{type:`rows`,record_ids:[]}}}},mY=`rows:removeempty@1`,hY={},gY=r.object({effect_id:r.literal(mY),connector:$l(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to consider as JSON.`,placeholder:`{"type":"all"}`},`both`),fields:su({path:`config.fields`,sectionKey:`general`,groupPath:`config.general`,label:`Fields`,minItems:1,description:`Delete a row when ANY of these fields is empty.`})})}),_Y=class extends I{effectId=mY;schema=gY;payload;billableOperations=hY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return this.payload.config.fields.map(e=>e.field_name)}},vY=gY,yY={effectId:mY,baseEffect:L(mY),label:`Delete rows with empty cells`,description:`Delete selected rows where any of the chosen fields is empty.`,categories:[`data_hygiene`],tags:[V.NEW],keywords:[`blank`,`null`,`missing`,`prune`,`incomplete`,`sparse`],lifecycle:null,billableOperations:hY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`exclusive`,lockScope:`selection`,catalogVisibility:`visible`,guide:`Delete rows where ANY field in config.fields is empty (OR semantics) — list EVERY field to check in ONE effect instead of running several. "Empty" means: missing key, null, empty string, empty array, or — for enrichment output — any cell whose status is not "completed" (catches failed, no_result, and skipped at once); 0, false, and whitespace-only strings count as populated. Omit selection to consider ALL rows. For value-based predicates (e.g. drop rows where score < 3) use rows:remove@1 with a where condition instead. Destructive and approval-gated; after the run, re-read the sheet ONCE to confirm.`,defaultPayload:{effect_id:mY,connector:null,config:{selection:{type:`rows`,record_ids:[]},fields:[]}}};function bY(e){if(e instanceof Z)return e;let t=e.search_id,n=PG(t);if(!n)throw Error(`Unknown pipe: ${e.search_id}`);return new n(LG.parse(e))}const xY=`search:run@1`,SY={},CY=r.object({effect_id:r.literal(xY),connector:$l(),config:r.object({search_payload:td({path:`config.search_payload`,groupPath:`config.general`,sectionKey:`general`,label:`Search`,description:`Pick and configure the search to run.`},LG),max_number_of_results:Xu({path:`config.max_number_of_results`,groupPath:`config.general`,sectionKey:`general`,label:`Max results`,description:`Maximum number of items to find across all pages.`,guide:"This is the FETCH budget — an upper bound on raw results pulled across all pages (it also caps each page's size). De-duplicated results are NOT re-fetched, so this is not the final row count. When you want EXACTLY N unique rows, do NOT set this to N (you'd get fewer the moment any result is a duplicate): set `stop_at_unique_rows_count` to N and set this to the maximum (1000000) so the unique count is the real stop condition. For a plain bulk fetch with no unique target, set this to the number of rows you want.",max:1e6,min:1}).default(1e3),deduplicate:Qu({path:`config.deduplicate`,groupPath:`config.general`,sectionKey:`general`,label:`Unique rows only`,description:`Skip results that already exist in the sheet.`,guide:"Dedup key is the search's own declared key. Discards are NOT topped up with extra pages, so to reliably collect N unique rows pair this with `stop_at_unique_rows_count` and a large `max_number_of_results`.",defaultValue:!0,enabledIf:e=>{let t=e.config?.search_payload;if(!t?.search_id)return{disabled:!0,message:`Configure a search first.`};let n=!1;try{n=bY(t).getDedupConfig().fields.length>0}catch{n=!1}return n?{disabled:!1}:{disabled:!0,message:`This search doesn't support de-duplication.`}}}),stop_at_unique_rows_count:Zu({path:`config.stop_at_unique_rows_count`,groupPath:`config.general`,sectionKey:`general`,label:`Stop at X unique rows`,description:`Stop after this many new rows have been added. Leave empty for no early stop. Bounded by Max results.`,guide:"Set this to the exact unique-row count you want (only works with `deduplicate` on). It paginates full pages until this many NEW rows are added, so set `max_number_of_results` to the maximum (1000000) to give it room — `max_number_of_results` then just acts as a safety backstop.",placeholder:`No early stop`,min:1,max:1e5,enabledIf:e=>e.config?.deduplicate===!0?{disabled:!1}:{disabled:!0,message:`Enable “Unique rows only” to use this.`}})})}),wY=class extends I{effectId=xY;schema=CY;payload;billableOperations=SY;constructor(e){super(),this.payload=this.validatePayload(e)}getSearch(){let e=this.payload.config.search_payload;if(!e?.search_id)return null;try{return bY(e)}catch{return null}}getConnectionsRequirements(){return[]}getProviderNames(){let e=this.getSearch();return e?[qG(e.searchId).provider]:[]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}producesDynamicFields(){let e=this.getSearch();return e?(qG(e.searchId).outputFieldMode??`static`)===`dynamic`:!1}evolveSchema(e){let t=this.getSearch();if(!t||(qG(t.searchId).outputFieldMode??`static`)===`dynamic`)return{next:e};let n=e.validationContext.fieldAnnotations.merge(t.getStaticFieldDefinitions(),!1,{appendOrders:!0});return nd(BK({config:{environment:e.environment},pipes:e.pipes,field_annotations:n.annotations}),e.environment)}},TY=CY,EY={effectId:xY,baseEffect:L(xY),label:`Search`,description:`Run a search and append the results to the sheet.`,categories:[`enrichment`],tags:[V.NEW],keywords:[`find`,`import`,`source`,`prospect`,`add rows`,`results`],lifecycle:null,billableOperations:SY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`visible`,defaultPayload:{effect_id:xY,connector:null,config:{search_payload:{search_id:``},max_number_of_results:1e3,deduplicate:!0,stop_at_unique_rows_count:null}}},DY=`sheet:export@1`,OY={},kY=r.object({effect_id:r.literal(DY),connector:$l(),config:r.object({selection:cu({path:`config.selection`,sectionKey:`general`,groupPath:`config.general`,label:`Selection`,description:`Rows to export as JSON — {"type":"all"} or {"type":"rows","record_ids":["…"]}.`,placeholder:`{"type":"all"}`},`both`)})}),AY=class extends I{effectId=DY;schema=kY;payload;billableOperations=OY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}},jY=kY,MY={effectId:DY,baseEffect:L(DY),label:`Export sheet`,description:`Export the selected rows to a CSV download.`,categories:[`internal`],tags:[],keywords:[`csv`,`download`,`excel`,`spreadsheet`,`file`],lifecycle:null,billableOperations:OY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`both`,lockingMode:`shared`,lockScope:`self`,catalogVisibility:`hidden`,defaultPayload:{effect_id:DY,connector:null,config:{}}},NY=`sheet:reset@1`,PY={},FY=r.object({effect_id:r.literal(NY),connector:$l(),config:r.object({})}),IY=class extends I{effectId=NY;schema=FY;payload;billableOperations=PY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}evolveSchema(e){let t=BK({config:{environment:e.environment},pipes:[],field_annotations:{}});return{next:{environment:e.environment,pipes:[],fieldAnnotations:{},validationContext:t}}}},LY=FY,RY={effectId:NY,baseEffect:L(NY),label:`Reset sheet`,description:`Reset the sheet to its initial state — remove all pipes, fields, and rows. This cannot be partially applied.`,categories:[`data_hygiene`],tags:[],keywords:[`clear`,`wipe`,`empty`,`start over`,`delete all`],lifecycle:null,billableOperations:PY,shouldUpgradeSchema:!0,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`visible`,defaultPayload:{effect_id:NY,connector:null,config:{}}},zY=`timetravel:create@1`,BY={},VY=r.object({effect_id:r.literal(zY),connector:$l(),config:r.object({})}),HY=class extends I{effectId=zY;schema=VY;payload;billableOperations=BY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}},UY=VY,WY={effectId:zY,baseEffect:L(zY),label:`Create restore point`,description:`Snapshot the current sheet state as a timetravel restore point.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:BY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,shouldUpgradeSchema:!0,catalogVisibility:`hidden`,defaultPayload:{effect_id:zY,connector:null,config:{}}},GY=`timetravel:travel@1`,KY={},qY=r.object({effect_id:r.literal(GY),connector:$l(),config:r.object({schema_id:r.string().min(1)})}),JY=class extends I{effectId=GY;schema=qY;payload;billableOperations=KY;constructor(e){super(),this.payload=this.validatePayload(e)}getConnectionsRequirements(){return[]}getProviderNames(){return[`pipe0`]}estimateBillableOperations(){return[]}getFieldReferences(){return[]}producesDynamicFields(){return!0}},YY=qY,XY={effectId:GY,baseEffect:L(GY),label:`Restore to point`,description:`Restore the sheet to a previous point by copying that point's rows into a new schema.`,categories:[`internal`],tags:[],lifecycle:null,billableOperations:KY,allowedUserConnectionProviders:[],managedProviders:[`pipe0`],selectionMode:`sheet`,lockingMode:`exclusive`,lockScope:`sheet`,catalogVisibility:`hidden`,defaultPayload:{effect_id:GY,connector:null,config:{schema_id:``}}},ZY=r.object({reason:r.object({code:r.string(),details:r.string().optional()}),related_record_id:r.string().nullable(),resolved_by:r.object({ref:wt,config_hash:r.string()})}),QY=r.object({value:r.union([r.string(),r.number(),r.boolean(),r.null()])}),$Y=ZY.extend({fields:r.record(r.string(),QY)}),eX=r.object({added:ZY.optional(),updated:$Y.optional(),removed:ZY.optional()}),tX=r.record(r.string(),eX),nX=r.object({shown:r.number().int(),total:r.number().int(),added:r.number().int(),updated:r.number().int(),removed:r.number().int()}),rX=r.object({effect_id:wt,config_hash:r.string(),status:r.enum([`completed`,`failed`,`skipped`]),error:r.string().optional(),source:r.literal(`run_added_rows`).optional()}),iX={"rows:dedupe@1":PJ,"rows:duplicate@1":BJ,"rows:enrich@1":KJ,"rows:adopt@1":SJ,"rows:add@1":dJ,"rows:import@1":aY,"row:update@1":aJ,"rows:remove@1":dY,"rows:removeempty@1":_Y,"rows:copy_to_sheet@1":OJ,"rows:filter:prompt@1":$J,"pipe:add@1":Vq,"pipe:update@1":$q,"pipe:remove@1":qq,"fields:remove@1":Fq,"fields:patch@1":kq,"fields:duplicate@1":dq,"fields:add@1":ZK,"fields:order:reset@1":_q,"fields:deletesparse:input@1":rq,"env:change@1":sd,"timetravel:create@1":HY,"timetravel:travel@1":JY,"sheet:export@1":AY,"search:run@1":wY,"sheet:reset@1":IY},aX={"rows:dedupe@1":FJ,"rows:duplicate@1":VJ,"rows:enrich@1":qJ,"rows:adopt@1":CJ,"rows:add@1":fJ,"rows:import@1":oY,"row:update@1":oJ,"rows:remove@1":fY,"rows:removeempty@1":vY,"rows:copy_to_sheet@1":kJ,"rows:filter:prompt@1":eY,"pipe:add@1":Hq,"pipe:update@1":eJ,"pipe:remove@1":Jq,"fields:remove@1":Iq,"fields:patch@1":Aq,"fields:duplicate@1":fq,"fields:add@1":QK,"fields:order:reset@1":vq,"fields:deletesparse:input@1":iq,"env:change@1":cd,"timetravel:create@1":UY,"timetravel:travel@1":YY,"sheet:export@1":jY,"search:run@1":TY,"sheet:reset@1":LY},oX={"rows:dedupe@1":IJ,"rows:duplicate@1":HJ,"rows:enrich@1":JJ,"rows:adopt@1":wJ,"rows:add@1":pJ,"rows:import@1":sY,"row:update@1":sJ,"rows:remove@1":pY,"rows:removeempty@1":yY,"rows:copy_to_sheet@1":AJ,"rows:filter:prompt@1":tY,"pipe:add@1":Uq,"pipe:update@1":tJ,"pipe:remove@1":Yq,"fields:remove@1":Lq,"fields:patch@1":jq,"fields:duplicate@1":pq,"fields:add@1":$K,"fields:order:reset@1":yq,"fields:deletesparse:input@1":aq,"env:change@1":ld,"timetravel:create@1":WY,"timetravel:travel@1":XY,"sheet:export@1":MY,"search:run@1":EY,"sheet:reset@1":RY};function sX(e){return iX[e]}function cX(e){return oX[e]}function lX(e){return aX[e]}function uX(){return Object.keys(oX).filter(e=>oX[e].agentExposure!==`excluded`)}function dX(e){return oX[e]?.agentExposure!==`excluded`}const fX=t.discriminatedUnion(`effect_id`,Object.values(aX).map(e=>e)).openapi(`EffectPayloadSchema`);function pX(e,t){return Bt(t,oX[e].defaultPayload)}const mX=t.preprocess(e=>{if(!e||typeof e!=`object`||!(`effect_id`in e))return e;let t=oX[e.effect_id];return t?.defaultPayload?{...e,config:Bt(e?.config||{},t.defaultPayload.config)}:e},fX),hX=t.object({diff:t.object({limit:t.number().int().min(0).max(1e3).default(100).openapi({description:"How many per-record diff entries to keep on the result. `counts` stays exact regardless."})}).optional(),run_added_rows:t.boolean().optional().openapi({description:`When true, after this run's effects complete, run the sheet's pipes over exactly the rows the run appended (the contiguous tail). Off by default. Durable on schedules: a scheduled chain that adds rows then enriches them on every fire.`})}),gX=t.object({config:hX.optional(),effects:t.array(mX).min(1)}).openapi(`EffectsRequest`),_X=t.object({id:t.string(),status:zt,effects:t.array(rX),counts:nX.nullable(),diff:tX.nullable(),after_schema_id:t.string().nullable(),before_schema_id:t.string().nullable(),added:t.object({cursor:t.string().nullable(),count:t.number().int()}).nullable().openapi({description:'Present when the run appended rows. `cursor` is the exclusive window cursor isolating exactly the added tail — pass it to a `rows:enrich@1` `{type:"window", cursor, count:null}` selection to run the sheet\'s pipes over the added rows. `count` is how many added rows survive.'})}).openapi(`EffectsResponse`),vX=t.object({effects:t.array(t.unknown()).min(1)}).openapi(`EffectsValidateRequest`),yX=t.object({index:t.number().int(),effect_id:wt,valid:t.boolean(),errors:t.array(t.string())}).openapi(`EffectsValidateStep`),bX=t.object({valid:t.boolean(),errors:t.array(t.string()),steps:t.array(yX).optional()}).openapi(`EffectsValidateResponse`);function xX(e){let t=e.split(`@`)[1];if(!t)throw Error(`No effect version found`);return Number(t)}function SX(){let e={};for(let t of Object.values(oX)){let{baseEffect:n}=t;e[n]??=[],e[n].push(t)}return Object.entries(e).forEach(([t,n])=>{e[t]=n.sort((e,t)=>{let n=xX(e.effectId);return xX(t.effectId)-n})}),e}const CX=SX();function wX(){let e=[];for(let[t,n]of Object.entries(CX)){let r=n[0];if(!r)throw Error(`Found empty entry`);r.lifecycle?.deprecatedOn||r.catalogVisibility!==`hidden`&&e.push({...r,baseEffect:t,latestVersion:xX(r.effectId)})}return e}const TX=[...Ct,...xt];function EX(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=[r];for(let a=1;a<=t.length;a++)i[a]=Math.min((n[a]??0)+1,(i[a-1]??0)+1,(n[a-1]??0)+(e[r-1]===t[a-1]?0:1));n=i}return n[t.length]??0}function DX(e){let t=null,n=1/0;for(let r of TX){let i=EX(e,r);i<n&&(n=i,t=r)}return t&&n<=Math.max(3,Math.floor(e.length/3))?t:null}function OX(e){let t=[];return e.forEach((e,n)=>{if(!e||typeof e!=`object`){t.push(`effects[${n}] must be an object like { effect_id: "...", config: {...} }.`);return}let r=e.effect_id;if(typeof r!=`string`||r.length===0){t.push(`effects[${n}] is missing "effect_id" — every effect needs one (e.g. "rows:add@1"). Use list_effects / get_effect_schema for the catalog.`);return}if(!TX.includes(r)){let e=DX(r);t.push(`effects[${n}]: unknown effect_id "${r}".${e?` Did you mean "${e}"?`:``} Use list_effects to find valid ids — never invent one.`)}}),t}function kX(e){let t=OX(e);if(t.length>0)return{ok:!1,errors:t};let n=[],i=[];return e.forEach((e,t)=>{let a=e.effect_id;if(!Ct.includes(a)){n.push(`effects[${t}] ("${a}") is a REPORT effect — report chains must not be mixed into a sheet chain.`);return}let o=a,s=oX[o],c=s?.defaultPayload?{...e,config:Bt(e.config||{},s.defaultPayload.config)}:e,l=lX(o).safeParse(c);if(!l.success){n.push(`effects[${t}] (${a}): ${r.prettifyError(l.error)}`);return}i.push(l.data)}),n.length>0?{ok:!1,errors:n}:{ok:!0,chain:i}}function AX(e){let t=e.normalize(`NFD`).replace(/[\u0300-\u036f]/g,``).replace(/[^A-Za-z0-9]+/g,`_`).replace(/^_+|_+$/g,``);return t===``?`column`:/^[0-9]/.test(t)?`_${t}`:t}function jX(e){let t=new Set;return e.map(e=>{let n=e,r=2;for(;t.has(n);)n=`${e}_${r}`,r++;return t.add(n),n})}function MX(e){let t=jX(e.map(AX));return e.map((e,n)=>({name:t[n],label:e}))}const NX={completed:`Completed`,failed:`Failed`,no_result:`No result`,pending:`Pending`,processing:`Processing`,queued:`Queued`,skipped:`Skipped`};function PX(e){return NX[e]}const FX=`bachelor.master.mba.phd.ph d.doctor.associate.diploma.b sc.bsc.m sc.msc.b a.m a.b tech.btech.m tech.mtech.b eng.m eng.b com.llb.llm.md.jd.undergraduate.postgraduate.graduate.degree`.split(`.`),IX=[`university`,`college`,`institute of technology`,`polytechnic`,`school of`],LX=e=>` ${e.toLowerCase().replace(/[^a-z ]+/g,` `).replace(/\s+/g,` `).trim()} `,RX=(e,t)=>{if(!e)return!1;let n=LX(e);return t.some(e=>n.includes(` ${e} `))};function zX(e){return RX(e.degree_name,FX)?!0:e.degree_name?!1:RX(e.institution_name,IX)}function BX(e){if(!e.start_date)return 1/0;let t=l(e.start_date);return Number.isNaN(t.getTime())?1/0:t.getTime()}function VX(e){let t=e.education_history.filter(e=>e.is_current_education===!0&&zX(e)),n=null;for(let e of t)(n===null||BX(e)<BX(n))&&(n=e);return{...e,education_history:e.education_history.map(e=>({...e,is_primary_current_education:e===n}))}}function HX(e){let t=e.employment_history.find(e=>e.is_primary_current_employer===!0)??e.employment_history.find(e=>e.is_current_employer===!0)??null;return{...e,primary_job_title:t?.job_title??null,primary_company_domain:t?.company_domain??null}}function UX(e,t,n=new Date){if(!e)return{days:null,years:null};let r=l(e);if(Number.isNaN(r.getTime()))return{days:null,years:null};let i=n;if(t){let e=l(t);Number.isNaN(e.getTime())||(i=e)}let a=o(i,r);return a<0?{days:null,years:null}:{days:a,years:Math.round(a/365.25*100)/100}}const WX={shared:{}},GX={shared:{paths:{"config.cursor":null,"config.offset":null,"config.page_number":null}}},KX={shared:{}};function qX(e,t){let n=e[t];return{sectionMap:{...e.shared.sections,...n?.sections},groupMap:{...e.shared.groups,...n?.groups},pathMap:{...e.shared.paths,...n?.paths}}}const JX=e=>qX(WX,e),YX=e=>qX(GX,e),XX=e=>qX(KX,e),ZX={"config.prompt":{order:1,label:`Prompt`,iconKey:`sparkles`,defaultExpand:!0},"config.general":{order:0,label:`General`,iconKey:`mix`,defaultExpand:!0},"config.advanced":{order:0,label:`Advanced`,iconKey:`sliders`,defaultExpand:!0},"config.bucket_creation":{order:1,label:`Bucket creation`,description:`Applied when the bucket is created on first write; ignored if it already exists.`,iconKey:`sliders`,defaultExpand:!1},"config.input_fields":{order:0,label:`Input config`,description:`Point pipe inputs to new fields.`,iconKey:`input`,defaultExpand:!1},connector:{order:100,label:`Connections`,iconKey:`plug`,defaultExpand:!1},"config.extraction":{order:0,label:`Extraction`,iconKey:`code`,defaultExpand:!0},run_if:{order:99,label:`Run IF`,iconKey:`workflow`,defaultExpand:!1},"config.email":{order:3,label:`Email`,iconKey:`mail`,defaultExpand:!0},"config.json_extraction":{order:1,label:`Extract fields`,iconKey:`braces`,defaultExpand:!0},"config.providers":{order:1,label:`Providers`,iconKey:`tags`,defaultExpand:!0},"config.output_fields":{order:10,label:`Output config`,description:`Toggle or rename output fields.`,iconKey:`output`,defaultExpand:!1},"config.destination":{order:9,label:`Destination`,description:`Name, type, and format of the field written to the destination sheet.`,iconKey:`output`,defaultExpand:!1}},QX={general:{path:`general`,label:`Behavior`,description:`How this pipe runs and selects providers.`,order:1},pagination:{path:`pagination`,label:`Behavior`,order:2},"config.filters":{path:`config.filters`,label:`I/O & conditions`,order:14},pipe_io:{path:``,label:`I/O & conditions`,order:99}},$X=new Set([`context_select_input`,`tagged_text_input`,`condition_block_input`,`field_select_input`,`fields_select_input`,`typed_fields_select_input`,`property_list_input`]);function eZ(e){let t=aK(e),n=[];function i(e){e?.type&&$X.has(e.type)&&e.optionsDef&&n.push(e)}function a(e){let t=y.get(e);if(t&&typeof t!=`function`?i(t):typeof t==`function`&&i(t.staticMeta),typeof e==`object`&&e&&`unwrap`in e&&typeof e.unwrap==`function`&&a(e.unwrap()),e instanceof r.ZodObject)for(let t of Object.values(e.shape))a(t)}return a(t),n}function tZ({pipePayload:e,validationContext:t,store:n,formResolvers:r,customization:i}){let a=aK(e.pipe_id),o=Sd(e.pipe_id,e.config||{});return Vl({schema:a,extractFromSchema:r=>{let i=y.get(r);if(n.field_options??={},i)return i&&typeof i==`function`?i({validationContext:t,pipePayload:e,userConnections:`connections`in n.field_options?(n.field_options.connections.options||[]).map(e=>{let t=e.widgets?.provider_logo?.provider;if(!t)throw Error(`Option is missing provider type'`);return{public_id:e.value,provider:t,is_default:e.data?.is_default===`true`,ownership_level:e.data?.ownership_level||void 0}}):[],pipeEntry:cK(e.pipe_id),hash:o}):i},store:n,formResolvers:r,sectionMap:zl(QX,i?.sectionMap),groupMap:zl(ZX,i?.groupMap),pathMap:i?.pathMap})}const nZ={"config.pagination":{order:-1,label:`Pagination`,iconKey:`list`,defaultExpand:!0},"config.dates":{order:1,label:`Dates`,iconKey:`calendar`,defaultExpand:!1},"config.counts":{order:1,label:`Ownership counts`,iconKey:`user`,defaultExpand:!0},"config.prompt":{order:1,label:`Prompt`,iconKey:`sparkles`,defaultExpand:!0},"config.general":{order:0,label:`General`,iconKey:`mix`,defaultExpand:!0},"config.advanced":{order:0,label:`Advanced`,iconKey:`sliders`,defaultExpand:!0},"config.continue_existing_search":{order:0,label:`Continue existing search`,iconKey:`history`,defaultExpand:!1},"config.output_fields":{order:10,label:`Outputs`,iconKey:`output`,defaultExpand:!1},"config.filters.query":{order:2,label:`Query`,iconKey:`text`,defaultExpand:!0},"config.filters.personal_information":{label:`Personal information`,order:6,iconKey:`user`,defaultExpand:!1},"config.filters.job_information":{label:`Job information`,order:6,iconKey:`job`,defaultExpand:!1},"config.filters.company_information":{order:1,label:`Company information`,iconKey:`office`,defaultExpand:!1},"config.filters.education":{label:`Education`,iconKey:`school`,defaultExpand:!1,order:4},"config.filters.geografic":{label:`Location`,iconKey:`location`,defaultExpand:!1},"config.filters.location":{label:`Location`,iconKey:`location`,defaultExpand:!1},"config.filters.general":{label:`General`,iconKey:`filter`,defaultExpand:!1,order:1},"config.filters.author":{label:`Author`,iconKey:`user`,defaultExpand:!1,order:2},"config.filters.mentions":{label:`Mentions`,iconKey:`tags`,defaultExpand:!1,order:3},"config.filters.job_openings":{label:`Job openings`,iconKey:`calendar`,defaultExpand:!1},"config.filters.website":{label:`Website`,iconKey:`web`,defaultExpand:!1},"config.filters.web_presence":{label:`Web presence`,iconKey:`web`,defaultExpand:!1},"config.filters.keywords":{label:`Keywords`,iconKey:`tags`,defaultExpand:!1},"config.filters.competitors":{label:`Competitors`,iconKey:`cometition`,defaultExpand:!1},"config.filters.categories":{label:`Categories`,iconKey:`boxes`,defaultExpand:!1},"config.filters.investors":{label:`Investors`,iconKey:`handshake`,defaultExpand:!1},"config.filters.account_activities":{label:`Account Activities`,iconKey:`activity`,defaultExpand:!1},"config.filters.financials":{label:`Financials`,iconKey:`chart`,defaultExpand:!1},"config.filters.languages":{label:`Languages`,iconKey:`language`,defaultExpand:!1},"config.filters.company_size":{label:`Company size`,iconKey:`office`,defaultExpand:!1},"config.filters.company":{label:`Company`,iconKey:`office`,defaultExpand:!1},"config.filters.status":{label:`Status`,iconKey:`activity`,defaultExpand:!1},"config.filters.technology":{label:`Technology`,iconKey:`code`,defaultExpand:!1},"config.filters.linkedin":{label:`LinkedIn`,iconKey:`linkedin`,defaultExpand:!1},"config.filters.skills":{label:`Skills`,iconKey:`brain`,defaultExpand:!1},"config.filters.activities":{label:`Activities`,iconKey:`bolt`,defaultExpand:!1},"config.filters.certifications_honors":{label:`Certifications & honors`,iconKey:`award`,defaultExpand:!1},"config.filters.profile":{label:`Profile`,iconKey:`contact`,defaultExpand:!1},"config.filters.experience":{label:`Employment history`,iconKey:`history`,defaultExpand:!1,order:3},"config.filters.current_employer":{label:`Current employment`,iconKey:`briefcase`,defaultExpand:!1,order:2},"config.filters.current_company":{label:`Current Company`,iconKey:`office`,defaultExpand:!1},"config.filters.industry":{label:`Industries`,iconKey:`factory`,defaultExpand:!1},"config.filters.general_search":{label:`General search`,iconKey:`search`,defaultExpand:!1},connector:{order:100,label:`Connections`,iconKey:`plug`,defaultExpand:!1}},rZ={general:{path:`general`,label:`General`,description:`Search settings and pagination.`,order:1},pagination:{path:`pagination`,label:`General`,order:2},"config.filters":{path:`config.filters`,label:`Filters`,description:`Narrow the search results.`,order:10},pipe_io:{path:``,label:`Output fields`,order:99}};function iZ({searchPayload:e,formContext:t,formResolvers:n,customization:r}){return Vl({schema:HG(e.search_id),extractFromSchema:n=>{let r=b.get(n);if(t.field_options??={},r)return typeof r==`function`?r({searchPayload:e,searchEntry:qG(e.search_id),userConnections:`connections`in t.field_options?(t.field_options.connections.options||[]).map(e=>{let t=e.widgets?.provider_logo?.provider;if(!t)throw Error(`Option is missing provider type`);return{public_id:e.value,provider:t,is_default:e.data?.is_default===`true`,ownership_level:e.data?.ownership_level||void 0}}):[]}):r},store:t,formResolvers:n,sectionMap:zl(rZ,r?.sectionMap),groupMap:zl(nZ,r?.groupMap),pathMap:r?.pathMap})}function aZ(e){let t=HG(e),n=[];function i(e){let t=b.get(e);if(t&&typeof t!=`function`&&(t.type===`context_select_input`||t.type===`property_list_input`)&&t.optionsDef&&n.push(t),typeof e==`object`&&e&&`unwrap`in e&&typeof e.unwrap==`function`&&i(e.unwrap()),e instanceof r.ZodObject)for(let t of Object.values(e.shape))i(t)}return i(t),n}const oZ={"config.general":{order:0,label:`General`,iconKey:`mix`,defaultExpand:!0},"config.advanced":{order:1,label:`Advanced`,iconKey:`sliders`,defaultExpand:!0},connector:{order:100,label:`Connections`,iconKey:`plug`,defaultExpand:!1}},sZ={general:{path:`general`,label:`General`,description:`How this effect runs.`,order:1},pagination:{path:`pagination`,label:`General`,order:99},"config.filters":{path:`config.filters`,label:`Filters`,order:99},pipe_io:{path:``,label:`Connections`,order:99}};function cZ({effectPayload:e,validationContext:t,store:n,formResolvers:r,customization:i}){let a=lX(e.effect_id),o=rd(e.effect_id,e.config||{});return Vl({schema:a,extractFromSchema:r=>{let i=tl.get(r);if(n.field_options??={},i)return typeof i==`function`?i({validationContext:t,effectPayload:e,userConnections:`connections`in n.field_options?(n.field_options.connections.options||[]).map(e=>{let t=e.widgets?.provider_logo?.provider;if(!t)throw Error(`Option is missing provider type`);return{public_id:e.value,provider:t,is_default:e.data?.is_default===`true`,ownership_level:e.data?.ownership_level||void 0}}):[],effectEntry:cX(e.effect_id),hash:o}):i},store:n,formResolvers:r,sectionMap:zl(sZ,i?.sectionMap),groupMap:zl(oZ,i?.groupMap),pathMap:i?.pathMap})}function lZ(e){let t=lX(e),n=[];function i(e){let t=tl.get(e);if(t&&typeof t!=`function`&&(t.type===`context_select_input`||t.type===`property_list_input`)&&t.optionsDef&&n.push(t),typeof e==`object`&&e&&`unwrap`in e&&typeof e.unwrap==`function`&&i(e.unwrap()),e instanceof r.ZodObject)for(let t of Object.values(e.shape))i(t)}return i(t),n}const uZ=new Proxy({},{get:(e,t)=>e=>e.type===t}),dZ=`school.user.location.language.brain.book.web.plug.money.office.job.search.output.input.mix.bill.linkedin.text.workflow.letter.source.activity.boxes.cometition.bolt.star.scholar.briefcase.history.sparkles.list.sliders.factory.award.tags.handshake.contact.mail.calendar.chart.code.braces.filter`.split(`.`),fZ=r.enum(dZ),pZ=r.object({provider_logo:r.object({provider:Mo}).optional(),emoji:r.object({char:r.string()}).optional(),icon:r.object({key:fZ}).optional(),logo_url:r.object({url:r.string(),alt:r.string().optional()}).optional(),pricing:r.object({credits:r.number()}).optional(),token_pricing:r.object({inputPerBlock:r.number(),outputPerBlock:r.number(),blockSize:r.number()}).optional(),field_type:r.object({type:r.string(),format:r.string().optional()}).optional()}),mZ=`providers_input.fields_select_input.json_extraction_input.pipes_run_if_input.connector_input.include_exclude_input.include_exclude_select_input.exact_range_input.range_input.date_range_input.boolean_input.nullable_boolean_input.text_input.template_input.output_field_input.textarea_input.prompt_input.select_input.context_select_input.multi_select_input.min_max_int_input.async_multi_select_input.async_include_exclude_select_input.multi_create_input.property_list_input.ordered_multi_create_input.tagged_ordered_multi_create_input.int_input.number_input.json_schema_input`.split(`.`);r.enum(mZ);const hZ=r.object({value:r.string(),label:r.string(),widgets:pZ.optional(),data:r.record(r.string(),r.string()).optional()}),gZ=r.object({field_options:r.record(r.string(),r.object({options:r.array(hZ)}))}),_Z=[{id:`people_data`,label:`People`,color:`#8B7DFF`,order:0},{id:`find_people`,label:`Find People`,color:`#A78BFA`,order:1},{id:`company_data`,label:`Company`,color:`#10B981`,order:2},{id:`find_comapnies`,label:`Find Companies`,color:`#34D399`,order:3},{id:`tools`,label:`Tools`,color:`#EAB308`,order:4},{id:`integrations`,label:`Integrations`,color:`#06B6D4`,order:5},{id:`actions`,label:`Actions`,color:`#F97316`,order:6},{id:`deprecated`,label:`Deprecated`,color:`#94A3B8`,order:7}],vZ=new Map(_Z.map(e=>[e.id,e]));function yZ(e){return vZ.get(e)}function bZ(){return _Z}const xZ={"company:funding:leadmagic@1":[{config:{environment:`production`},pipes:[{pipe_id:`company:funding:leadmagic@1`}],input:[{id:`1`,company_website_url:`https://pipe0.com`}]}],"company:funding:leadmagic@2":[{config:{environment:`production`},pipes:[{pipe_id:`company:funding:leadmagic@2`}],input:[{id:`1`,company_domain:`pipe0.com`}]}],"company:funding:waterfall@1":[{config:{environment:`production`},pipes:[{pipe_id:`company:funding:waterfall@1`}],input:[{id:`1`,company_domain:`retool.com`}]}],"company:identity@1":[{config:{environment:`production`},pipes:[{pipe_id:`company:identity@1`}],input:[{id:`1`,company_name:`Pipe0`}]}],"company:identity@2":[{config:{environment:`production`},pipes:[{pipe_id:`company:identity@2`,config:{}}],input:[{id:`1`,company_name:`Pipe0`}]}],"company:identity@3":[{config:{environment:`production`},pipes:[{pipe_id:`company:identity@3`,config:{}}],input:[{id:`1`,company_name:`Pipe0`}]}],"company:overview@1":[{config:{environment:`production`},pipes:[{pipe_id:`company:overview@1`}],input:[{id:`1`,company_website_url:`Pipe0`}]}],"people:phone:workemail:waterfall@1":[{config:{environment:`production`},pipes:[{pipe_id:`people:phone:workemail:waterfall@1`}],input:[{id:`1`,work_email:`jane@pipe0.com`}]}],"person:mobile:workemail:waterfall@1":[{config:{environment:`production`},pipes:[{pipe_id:`person:mobile:workemail:waterfall@1`}],input:[{id:`1`,work_email:`jane@pipe0.com`}]}],"people:workemail:waterfall@1":[{config:{environment:`production`},pipes:[{pipe_id:`people:workemail:waterfall@1`}],input:[{id:`1`,name:`John Doe`,company_website_url:`https://pipe0.com`}]}],"person:workemail:waterfall@1":[{config:{environment:`production`},pipes:[{pipe_id:`person:workemail:waterfall@1`}],input:[{id:`1`,name:`John Doe`,company_domain:`pipe0.com`}]}],"company:techstack:builtwith@1":[{config:{environment:`production`},pipes:[{pipe_id:`company:techstack:builtwith@1`}],input:[{id:`1`,company_website_url:`https://pipe0.com`}]}],"company:techstack:builtwith@2":[{config:{environment:`production`},pipes:[{pipe_id:`company:techstack:builtwith@2`}],input:[{id:`1`,company_domain:`pipe0.com`}]}],"agent:run@1":[{config:{environment:`production`},pipes:[{pipe_id:`agent:run@1`,config:{agent_type:`web_researcher`,model:zc,prompt:{template:`