PageSourceSearch

https://wiza.co/_nuxt_frontend_next/C-KPXpKC.js

js wiza.co collected 2026-09-25 19:44:13 UTC 8,310 bytes, 1 lines download raw bytes

1import{_ as F}from"./zK3p3hdG.js";import{_ as O}from"./DU13BYyF.js";import{_ as P}from"./COK-tdMz.js";import{_ as D}from"./WnhdvwRK.js";import{d as Y,f as q,g as C,Q as J,J as Q,r as G,w as K,n as i,c as f,a as l,p as t,q as s,F as R,y as B,a0 as X,t as w,z as Z,o as m,A as a,O as ee,B as k,s as z,M as te}from"#entry";import{_ as oe}from"./CmuEa5cR.js";import{_ as se}from"./BPRuos37.js";import{_ as le}from"./Bg7m6sOX.js";import{U as ae}from"./BL9dVaR6.js";import{U as ne}from"./Ds_9rOhi.js";import{C as ie}from"./Ce4iMkIQ.js";import{s as re}from"./CGZC3h-Z.js";import"./Di_JOaSa.js";import"./Cq0sJs5o.js";/* empty css        */import{b as U}from"./CtOU-Zf9.js";import"./CKSEDCUj.js";import"./BiJ_2gBy.js";import"./D10hWv6n.js";import"./Cx8AE5yN.js";import"./BrXX2iGn.js";import"./BTSHbX71.js";const de={key:0},me={class:"flex flex-row mb-8 justify-between items-center border-b border-b-neutral-50 pb-5"},ue={class:"flex flex-row space-x-4 items-center"},ce={class:"max-w-2xl mx-auto"},_e={class:"mb-8"},fe={class:"list-decimal pl-5 space-y-1"},pe={key:0,class:"flex justify-center py-16"},be={class:"flex justify-between items-start mb-1"},ke={key:0,class:"border border-dashed border-neutral-100 rounded-lg p-8 text-center mt-4"},ye={key:1,class:"space-y-3 mt-4"},xe={class:"flex items-start justify-between mb-3"},ve={class:"flex items-center gap-2 min-w-0"},we={class:"flex space-x-2 flex-none ml-4"},he={class:"space-y-4"},ge={class:"flex justify-end items-center mt-8"},Ce={class:"flex space-x-4"},Je=Y({__name:"clay",setup(ze){const h={people:{title:"Contact webhooks",subtitle:"Used when syncing lists of contacts and individual contacts.",emptyHint:"No webhooks added for contacts."},accounts:{title:"Company webhooks",subtitle:"Used when syncing lists of companies and individual companies.",emptyHint:"No webhooks added for companies."}},{$app:y}=q(),c=C(()=>J.value?.find(n=>n.network==="clay")),b=Q(!1),o=G({form:{name:"",webhook_url:"",auth_token:"",record_type:null},webhooks:[],loading:!1,submitting:!1}),A=C(()=>o.webhooks.filter(n=>n.record_type==="people")),V=C(()=>o.webhooks.filter(n=>n.record_type==="accounts"));async function x(){if(!c.value){o.webhooks=[];return}o.loading=!0;const n=await y.get(`/integrations/${c.value.id}/clay_webhooks`);n.status===200&&(o.webhooks=n.data),o.loading=!1}K(()=>c.value?.id,n=>{n&&x()},{immediate:!0});function N(n){o.form.name="",o.form.webhook_url="",o.form.auth_token="",o.form.record_type=n,b.value=!0}async function T(){o.submitting=!0;const n=await y.post(`/integrations/${c.value.id}/clay_webhooks`,{clay_webhook:{name:o.form.name,webhook_url:o.form.webhook_url,auth_token:o.form.auth_token,record_type:o.form.record_type}});o.submitting=!1,U(n),n.status===200&&(b.value=!1,await x())}async function L(n){if(!await re({title:`Remove "${n.name}"?`,message:"Wiza will no longer push to this Clay webhook.",color:"danger",confirmButtonText:"Yes, remove",closeButtonText:"Cancel"}))return;const v=await y.delete(`/integrations/${c.value.id}/clay_webhooks/${n.id}`);U(v),v.status===200&&await x()}async function M(n){const e=await y.put(`/integrations/${c.value.id}/clay_webhooks/${n.id}`,{clay_webhook:{active:!0}});U(e),e.status===200&&await x()}return(n,e)=>{const v=F,_=O,S=P,$=D,u=Z,I=ee,p=oe,W=se,j=le,g=ae,H=ne;return i(c)?(m(),f("div",de,[l("div",me,[l("div",ue,[t(S,{to:"/app/integrations"},{default:s(()=>[t(_,{variant:"secondary",size:"sm",class:"h-8 w-8"},{default:s(()=>[t(v,{class:"w-5 h-5"})]),_:1})]),_:1}),t(_,{variant:"secondary",size:"sm",class:"h-10 w-10",rounded:"full"},{default:s(()=>e[4]||(e[4]=[l("img",{src:ie,class:"w-5 h-5"},null,-1)])),_:1,__:[4]}),l("div",null,[t($,{size:"medium",class:"text-neutral-900"},{default:s(()=>e[5]||(e[5]=[a(" Sync data to Clay ")])),_:1,__:[5]}),t(u,{size:"small",class:"text-neutral-500"},{default:s(()=>e[6]||(e[6]=[a(" Push enriched contact and company data into your Clay tables. ")])),_:1,__:[6]})])])]),l("div",ce,[l("div",_e,[t($,{size:"medium",class:"text-neutral-700 mb-2 inline-block"},{default:s(()=>e[7]||(e[7]=[a(" How it works ")])),_:1,__:[7]}),l("ol",fe,[l("li",null,[t(u,{size:"small",class:"text-neutral-600"},{default:s(()=>e[8]||(e[8]=[a(" Open your Clay workbook, and click "),l("strong",null,"+ Add",-1),a(" in the table footer. ")])),_:1,__:[8]})]),l("li",null,[t(u,{size:"small",class:"text-neutral-600"},{default:s(()=>e[9]||(e[9]=[a(" Select "),l("strong",null,"Webhook",-1),a(" from the list. ")])),_:1,__:[9]})]),l("li",null,[t(u,{size:"small",class:"text-neutral-600"},{default:s(()=>e[10]||(e[10]=[a(" (optional) Add auth token. ")])),_:1,__:[10]})]),l("li",null,[t(u,{size:"small",class:"text-neutral-600"},{default:s(()=>e[11]||(e[11]=[a(" Copy the Webhook URL from the new Clay table and paste it below. ")])),_:1,__:[11]})])])]),i(o).loading?(m(),f("div",pe,[t(I,{class:"w-6 h-6 animate-spin text-neutral-400"})])):(m(),f(R,{key:1},B(["people","accounts"],d=>l("div",{key:d,class:"mb-16"},[l("div",be,[l("div",null,[t(p,{size:"medium",class:"text-neutral-700"},{default:s(()=>[a(k(h[d].title),1)]),_:2},1024),t(u,{size:"xsmall",class:"text-neutral-500"},{default:s(()=>
1[a(k(h[d].subtitle),1)]),_:2},1024)]),t(_,{size:"md",onClick:r=>N(d)},{left:s(()=>[t(W,{class:"w-5 h-5"})]),default:s(()=>[e[12]||(e[12]=a(" Add Webhook "))]),_:2,__:[12]},1032,["onClick"])]),(d==="people"?i(A):i(V)).length===0?(m(),f("div",ke,[t(u,{size:"small",class:"text-neutral-500"},{default:s(()=>[a(k(h[d].emptyHint),1)]),_:2},1024)])):(m(),f("div",ye,[(m(!0),f(R,null,B(d==="people"?i(A):i(V),r=>(m(),f("div",{key:r.id,class:"border border-neutral-50 rounded-lg p-4"},[l("div",xe,[l("div",ve,[t(p,{size:"medium",class:"text-neutral-900 truncate"},{default:s(()=>[a(k(r.name),1)]),_:2},1024),r.active?(m(),z(j,{key:0,color:"bg-primary-25","text-color":"text-primary-100",size:"xsmall",rounded:"normal",text:"Active",border:!1,editable:!1})):w("",!0)]),l("div",we,[r.active?w("",!0):(m(),z(_,{key:0,variant:"secondary",size:"sm",onClick:E=>M(r)},{default:s(()=>e[13]||(e[13]=[a(" Set as active ")])),_:2,__:[13]},1032,["onClick"])),t(_,{variant:"secondary",size:"sm",onClick:E=>L(r)},{default:s(()=>e[14]||(e[14]=[a(" Remove ")])),_:2,__:[14]},1032,["onClick"])])]),t(p,{size:"xsmall",class:"text-neutral-600"},{default:s(()=>e[15]||(e[15]=[a("Webhook URL")])),_:1,__:[15]}),t(u,{size:"small",class:"text-neutral-500 font-mono break-all"},{default:s(()=>[a(k(r.webhook_url),1)]),_:2},1024),r.has_auth_token?(m(),z(u,{key:0,size:"xsmall",class:"text-neutral-400 mt-2"},{default:s(()=>e[16]||(e[16]=[a(" Auth token set ")])),_:1,__:[16]})):w("",!0)]))),128))]))])),64))]),t(H,{modelValue:i(b),"onUpdate:modelValue":e[3]||(e[3]=d=>X(b)?b.value=d:null),"header-title":i(o).form.record_type==="accounts"?"Add Company Webhook":"Add Contact Webhook",width:"md"},{icon:s(()=>[t(W,{class:"w-6 h-6"})]),default:s(({close:d})=>[l("form",{onSubmit:te(T,["prevent"])},[l("div",he,[l("div",null,[t(p,{size:"small",class:"mb-1 text-neutral-600 inline-block"},{default:s(()=>e[17]||(e[17]=[a(" Name ")])),_:1,__:[17]}),t(g,{modelValue:i(o).form.name,"onUpdate:modelValue":e[0]||(e[0]=r=>i(o).form.name=r),placeholder:"e.g., Outbound Leads"},null,8,["modelValue"])]),l("div",null,[t(p,{size:"small",class:"mb-1 text-neutral-600 inline-block"},{default:s(()=>e[18]||(e[18]=[a(" Webhook URL ")])),_:1,__:[18]}),t(g,{modelValue:i(o).form.webhook_url,"onUpdate:modelValue":e[1]||(e[1]=r=>i(o).form.webhook_url=r),placeholder:"e.g., https://api.clay.com/v3/sources/webhook/..."},null,8,["modelValue"])]),l("div",null,[t(p,{size:"small",class:"mb-1 text-neutral-600 inline-block"},{default:s(()=>e[19]||(e[19]=[a(" Auth token (optional) ")])),_:1,__:[19]}),t(g,{modelValue:i(o).form.auth_token,"onUpdate:modelValue":e[2]||(e[2]=r=>i(o).form.auth_token=r),placeholder:"e.g., my-secret-token"},null,8,["modelValue"])])]),l("div",ge,[l("div",Ce,[t(_,{type:"button",variant:"secondary",size:"md",onClick:d},{default:s(()=>e[20]||(e[20]=[a(" Cancel ")])),_:2,__:[20]},1032,["onClick"]),t(_,{type:"submit",variant:"primary",size:"md",disabled:i(o).submitting||!i(o).form.name||!i(o).form.webhook_url,loading:i(o).submitting},{default:s(()=>e[21]||(e[21]=[a(" Add webhook ")])),_:1,__:[21]},8,["disabled","loading"])])])],32)]),_:1},8,["modelValue","header-title"])])):w("",!0)}}});export{Je as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.