PageSourceSearch

https://hopinio.com/_next/static/chunks/pages/admin/integration/[profileName]-4d0d0821c92218f7.js

js hopinio.com collected 2026-10-02 01:32:35 UTC 14,760 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9788],{49169:function(e,t,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/integration/[profileName]",function(){return a(52911)}])},3215:function(e,t,a){"use strict";a(85893);var s=a(32484);a(67294),a(41664),s.Z.adminIntegration.href,s.Z.adminAppearance.href,s.Z.adminSettings.href},52911:function(e,t,a){"use strict";a.r(t);var s=a(85893),n=a(67294),i=a(33299);a(3215);var r=a(32484),l=a(23442),o=a(11163),c=a(99076),u=a(14579),d=a(87066),p=a(70625),m=a(89357);let f=[{id:"shopify",title:"Shopify"},{id:"custom",title:"Custom"}];function h(){return(0,s.jsxs)("div",{children:[(0,s.jsxs)("label",{className:"text-base font-semibold text-gray-900",children:["Choose a platform"," "]}),(0,s.jsx)("p",{className:"text-sm text-gray-500",children:"Select your preferred platform for integration"}),(0,s.jsxs)("fieldset",{className:"mt-4",children:[(0,s.jsx)("legend",{className:"sr-only",children:"Notification method"}),(0,s.jsx)("div",{className:"space-y-4 sm:flex sm:items-center sm:space-x-10 sm:space-y-0",children:f.map(e=>(0,s.jsxs)("div",{className:"flex items-center",children:[(0,s.jsx)("input",{id:e.id,name:"notification-method",type:"radio",defaultChecked:"email"===e.id,className:"h-4 w-4 border-gray-300 text-indigo-600 focus:ring-indigo-600"}),(0,s.jsx)("label",{htmlFor:e.id,className:"ml-3 block text-sm font-medium leading-6 text-gray-900",children:e.title})]},e.id))})]})]})}t.default=function(){let e=(0,o.useRouter)(),{profileName:t}=e.query,{data:a}=(0,i.useSession)(),[f,g]=(0,n.useState)({}
1),[x,v]=(0,n.useState)(null),[y,b]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[N,j]=(0,n.useState)(m.c.map(e=>"Integration"===e.name?{...e,current:!0}:{...e,current:!1}));(0,n.useEffect)(()=>{t&&j(m.c.map(e=>"General"===e.name?{...e,href:r.Z.adminSettings.href.replace("{profileName}",t)}:"Integration"===e.name?{...e,href:r.Z.adminIntegration.href.replace("{profileName}",t),current:!0}:"Plan"===e.name?{...e,href:r.Z.adminPlans.href.replace("{profileName}",t)}:void 0))},[t]);let S=a?.user?.accessToken;(0,n.useEffect)(()=>{S&&(C(),P())},[a?.user?.accessToken,t]);let P=async()=>{try{let e=u.Z.GetApiKey,t=a?.user?.accessToken,s={Authorization:`Bearer ${t}`},n=await d.Z.get(e,{headers:s});200===n.status&&(v(n.data.api_key),b(`https://api.hopinio.com/api/v1/inbound/webhook/?api_key=${n.data.api_key}`))}catch(e){await fetch("/api/error-log",{method:"POST",body:JSON.stringify({message:e.message,methodName:"getApiKey",page:window.location.href})}),c.Tb(e)}},C=async()=>{try{let e=u.Z.Config,t=a?.user?.accessToken,s={Authorization:`Bearer ${t}`},n=await d.Z.get(e,{headers:s});200===n.status&&g(n.data)}catch(e){await fetch("/api/error-log",{method:"POST",body:JSON.stringify({message:e.message,methodName:"configHandler",page:window.location.href})}),c.Tb(e)}};return(0,s.jsxs)("div",{className:"min-h-full bg-gray-200",children:[t?(0,s.jsx)(l.Z,{config:f,profileName:t,current:r.Z.adminSettings.name}):"",(0,s.jsx)("div",{className:"mx-auto max-w-7xl px-4 sm:px-6 lg:px-8",children:(0,s.jsx)("div",{className:"flex py-6",children:(0,s.jsxs)("button",{onClick:()=>e.back(),className:"flex justify-center rounded-md bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",children:[(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"mr-2 h-6 w-6",children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.5 19.5 3 12m0 0 7.5-7.5M3 12h18"})}),"Back"]})})}),(0,s.jsxs)("div",{className:"mx-auto max-w-7xl lg:flex lg:gap-x-16 lg:px-8",children:[(0,s.jsx)("aside",{className:"flex overflow-x-auto border-b border-gray-900/5 py-4 lg:block lg:w-64 lg:flex-none lg:border-0 lg:py-20",children:(0,s.jsx)("nav",{className:"flex-none px-4 sm:px-6 lg:px-0",children:(0,s.jsx)("ul",{role:"list",className:"flex gap-x-3 gap-y-1 whitespace-nowrap lg:flex-col",children:N.map(e=>(0,s.jsx)("li",{children:(0,s.jsxs)("a",{href:e.href,className:(0,p.Z)(e.current?"bg-gray-50 text-indigo-600":"text-gray-700 hover:bg-gray-50 hover:text-indigo-600","group flex gap-x-3 rounded-md py-2 pl-2 pr-3 text-sm font-semibold leading-6"),children:[(0,s.jsx)(e.icon,{className:(0,p.Z)(e.current?"text-indigo-600":"text-gray-400 group-hover:text-indigo-600","h-6 w-6 shrink-0"),"aria-hidden":"true"}),e.name]})},e.name))})})}),(0,s.jsx)("main",{className:"px-4 py-16 sm:px-6 lg:flex-auto lg:px-0 lg:py-20",children:(0,s.jsx)("div",{className:"mx-auto max-w-2xl space-y-16 sm:space-y-20 lg:mx-0 lg:max-w-none",children:(0,s.jsxs)("div",{className:"min-h-full bg-gray-200",children:[y&&(0,s.jsxs)("div",{className:"my-2 flex flex-col rounded bg-white p-3 shadow",children:[(0,s.jsx)(h,{}),(0,s.jsx)("h3",{className:"pb-4 text-2xl ",children:"Automate review request using webhook"}),(0,s.jsx)("hr",{className:"mb-4"}),(0,s.jsxs)("div",{className:"flex flex-row justify-between gap-2",children:[(0,s.jsx)("div",{className:"flex flex-col justify-center",children:(0,s.jsx)("span",{className:"rounded-md bg-slate-200 text-center text-sm font-semibold text-gray-500",children:"Fullfilment webhook"})}),(0,s.jsxs)("div",{className:"flex flex-row items-center gap-2 overflow-x-auto",children:[(0,s.jsx)("span",{className:"overflow-x-auto text-sm font-semibold text-gray-500",children:y}),(0,s.jsx)("button",{className:"rounded bg-gray-500 px-4 py-2 font-bold text-white hover:bg-gray-700 sm:px-2 sm:py-1",onClick:()=>{navigator.clipboard.writeText(y),k(!0)},children:w?"Copied":"Copy"})]})]}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)("h3",{className:"pb-2 text-xl",children:"How to automate review request using webhook"})}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsx)("h3",{className:"pb-2 text-xl",children:"Other platforms coming soon..."}),(0,s.jsxs)("p",{children:["We are working hard to make this feature available for other platforms. If you want to get early access, please send us an email at [email protected]",(0,s.jsx)("a",{href:"mailto:[email protected]",className:"text-blue-500"})]})]})]}),(0,s.jsxs)("div",{className:"my-2 flex flex-col rounded bg-white p-3 shadow",children:[(0,s.jsx)("h2",{className:"text-2xl",children:"Widgets"}),(0,s.jsx)("p",{className:"text-gray-500",children:"Embed widgets on your website to show reviews"}),(0,s.jsxs)("div",{className:"flex flex-row justify-between",children:[(0,s.jsx)("div",{className:"flex flex-col",children:(0,s.jsx)("span",{className:"text-sm font-semibold text-gray-500",children:"Product Reviews"})}),(0,s.jsx)("div",{className:"flex flex-row items-center gap-2",children:(0,s.jsx)("a",{href:`${r.Z.Widgets}?profileName=${t}`,className:"rounded bg-gray-500 px-4 py-2 font-bold text-white hover:bg-gray-700 sm:px-2 sm:py-1",children:"Embed"})})]})]})]})})})]})]})}},14579:function(e,t){"use strict";let a="https://api.hopinio.com";t.Z={LoginWithEmail:a+"/auth/jwt/create/new/",CheckEmail:a+"/api/v1/auth/check/email/",LoginInit:a+"/api/v1/auth/login/init/",LoginConfirm:a+"/api/v1/auth/login/confirm/",SignUpInit:a+"/api/v1/auth/signup/init/",SignUpConfirm:a+"/api/v1/auth/signup/confirm/",ReviewsList:a+"/api/v1/reviews/list/",Profile:a+"/api/v1/profile/",GoogleCallback:a+"/api/v1/auth/google/",FbCallback:a+"/api/v1/auth/facebook/",Config:a+"/api/v1/config/",BusinessReview:a+"/api/v1/business/reviews/",OpinionHandler:a+"/api/v1/opinion/",ThreadHandler:a+"/api/v1/opinion/thread/",BusinessHandler:a+"/api/v1/business/",ReviewImageUpload:a+"/api/v1/review-image/upload/",LogoUpload:a+"/api/v1/business/image/create/",LogoConfirm:a+"/api/v1/business/image/update/",CheckBusinessName:a+"/api/v1/business/check-name/",BusinessLinkCreate:a+"/api/v1/business/link/create/",BusinessTheme:a+"/api/v1/theme/",ShopifyScraper:a+"/api/v1/products/shopify/scraper/",GetApiKey:a+"/api/v1/webhook/apikey/",ProductsList:a+"/api/v1/products/list/",SearchInit:a+"/api/v1/search/init/",AppControl:a+"/api/v1/features/app/",FlagList:a+"/api/v1/flags/list/",FlagOpinion:a+"/api/v1/flag/opinion/",UserReview:a+"/api/v1/user/reviews/",ClaimBusiness:a+"/api/v1/claim/business/",PricingPlans:a+"/api/v1/pricing/plans/",CategoryList:a+"/api/v1/business/categories/",SellerList:a+"/api/v1/business/list/",FeaturedSellerList:a+"/api/v1/business/featured/",AdminReplyOpinion:a+"/api/v1/admin/reply/",InviteList:a+"/api/v1/email/invite/list/",InviteCreate:a+"/api/v1/email/invite/create/"}},70625:function(e,t){"use strict";t.Z=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter(Boolean).join(" ")}},89357:function(e,t,a){"use strict";a.d(t,{c:function(){return r}});var s=a(67294);let n=s.forwardRef(function(e,t){let{title:a,titleId:n,...i}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},i),a?s.createElement("title",{id:n},a):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}))}),i=s.forwardRef(function(e,t){let{title:a,titleId:n,...i}=e;return s.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:t,"aria-labelledby":n},i),a?s.createElement("title",{id:n},a):null,s.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 7.5-9-5.25L3 7.5m18 0-9 5.25m9-5.25v9l-9 5.25M3 7.5l9 5.25M3 7.5v9l9 5.25m0-9v9"}))});a(32484);let r=[{name:"General",href:"#",icon:n,current:!1},{name:"Integration",href:"#",icon:n,current:!1},{name:"Plan",href:"#",icon:i,current:!1}]},91266:function(e,t,a){"use strict";let s,n;a.d(t,{pJ:function(){return R}});var i,r=a(7775),l=a(18419),o=a(67294),c=a(9485),u=a(10003),d=a(90961),p=a(51813),m=a(20260),f=a(24358),h=a(84480),g=a(48844),x=a(78961),v=a(18287);let y=null!=(i=o.startTransition)?i:function(e){e()};var b=a(90933),w=((s=w||{})[s.Open=0]="Open",s[s.Closed=1]="Closed",s),k=((n=k||{})[n.ToggleDisclosure=0]="ToggleDisclosure",n[n.CloseDisclosure=1]="CloseDisclosure",n[n.SetButtonId=2]="SetButtonId",n[n.SetPanelId=3]="SetPanelId",n[n.LinkPanel=4]="LinkPanel",n[n.Unl
1inkPanel=5]="UnlinkPanel",n);let N={0:e=>({...e,disclosureState:(0,g.E)(e.disclosureState,{0:1,1:0})}),1:e=>1===e.disclosureState?e:{...e,disclosureState:1},4:e=>!0===e.linkedPanel?e:{...e,linkedPanel:!0},5:e=>!1===e.linkedPanel?e:{...e,linkedPanel:!1},2:(e,t)=>e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId},3:(e,t)=>e.panelId===t.panelId?e:{...e,panelId:t.panelId}},j=(0,o.createContext)(null);function S(e){let t=(0,o.useContext)(j);if(null===t){let t=Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,S),t}return t}j.displayName="DisclosureContext";let P=(0,o.createContext)(null);P.displayName="DisclosureAPIContext";let C=(0,o.createContext)(null);function E(e,t){return(0,g.E)(t.type,N,e,t)}C.displayName="DisclosurePanelContext";let I=o.Fragment,T=v.VN.RenderStrategy|v.VN.Static,R=Object.assign((0,v.yV)(function(e,t){let{defaultOpen:a=!1,...s}=e,n=(0,o.useRef)(null),i=(0,p.T)(t,(0,p.h)(e=>{n.current=e},void 0===e.as||e.as===o.Fragment)),r=(0,o.useRef)(null),l=(0,o.useRef)(null),c=(0,o.useReducer)(E,{disclosureState:a?0:1,linkedPanel:!1,buttonRef:l,panelRef:r,buttonId:null,panelId:null}),[{disclosureState:d,buttonId:h},y]=c,b=(0,u.z)(e=>{y({type:1});let t=(0,x.r)(n);if(!t||!h)return;let a=e?e instanceof HTMLElement?e:e.current instanceof HTMLElement?e.current:t.getElementById(h):t.getElementById(h);null==a||a.focus()}),w=(0,o.useMemo)(()=>({close:b}),[b]),k=(0,o.useMemo)(()=>({open:0===d,close:b}),[d,b]);return o.createElement(j.Provider,{value:c},o.createElement(P.Provider,{value:w},o.createElement(m.Z,{value:b},o.createElement(f.up,{value:(0,g.E)(d,{0:f.ZM.Open,1:f.ZM.Closed})},(0,v.sY)({ourProps:{ref:i},theirProps:s,slot:k,defaultTag:I,name:"Disclosure"})))))}),{Button:(0,v.yV)(function(e,t){let a=(0,o.useId)(),{id:s=`headlessui-disclosure-button-${a}`,disabled:n=!1,autoFocus:i=!1,...m}=e,[f,g]=S("Disclosure.Button"),x=(0,o.useContext)(C),y=null!==x&&x===f.panelId,w=(0,o.useRef)(null),k=(0,p.T)(w,t,y?null:f.buttonRef),N=(0,v.Y2)();(0,o.useEffect)(()=>{if(!y)return g({type:2,buttonId:s}),()=>{g({type:2,buttonId:null})}},[s,g,y]);let j=(0,u.z)(e=>{var t;if(y){if(1===f.disclosureState)return;switch(e.key){case b.R.Space:case b.R.Enter:e.preventDefault(),e.stopPropagation(),g({type:0}),null==(t=f.buttonRef.current)||t.focus()}}else switch(e.key){case b.R.Space:case b.R.Enter:e.preventDefault(),e.stopPropagation(),g({type:0})}}),P=(0,u.z)(e=>{e.key===b.R.Space&&e.preventDefault()}),E=(0,u.z)(e=>{var t;(0,h.P)(e.currentTarget)||n||(y?(g({type:0}),null==(t=f.buttonRef.current)||t.focus()):g({type:0}))}),{isFocusVisible:I,focusProps:T}=(0,r.F)({autoFocus:i}),{isHovered:R,hoverProps:L}=(0,l.X)({isDisabled:n}),{pressed:Z,pressProps:D}=(0,c.x)({disabled:n}),B=(0,o.useMemo)(()=>({open:0===f.disclosureState,hover:R,active:Z,disabled:n,focus:I,autofocus:i}),[f,R,Z,I,n,i]),O=(0,d.f)(e,w),M=y?(0,v.dG)({ref:k,type:O,disabled:n||void 0,autoFocus:i,onKeyDown:j,onClick:E},T,L,D):(0,v.dG)({ref:k,id:s,type:O,"aria-expanded":0===f.disclosureState,"aria-controls":f.linkedPanel?f.panelId:void 0,disabled:n||void 0,autoFocus:i,onKeyDown:j,onKeyUp:P,onClick:E},T,L,D);return(0,v.sY)({mergeRefs:N,ourProps:M,theirProps:m,slot:B,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,v.yV)(function(e,t){let a=(0,o.useId)(),{id:s=`headlessui-disclosure-panel-${a}`,...n}=e,[i,r]=S("Disclosure.Panel"),{close:l}=function e(t){let a=(0,o.useContext)(P);if(null===a){let a=Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(a,e),a}return a}("Disclosure.Panel"),c=(0,v.Y2)(),u=(0,p.T)(t,i.panelRef,e=>{y(()=>r({type:e?4:5}))});(0,o.useEffect)(()=>(r({type:3,panelId:s}),()=>{r({type:3,panelId:null})}),[s,r]);let d=(0,f.oJ)(),m=null!==d?(d&f.ZM.Open)===f.ZM.Open:0===i.disclosureState,h=(0,o.useMemo)(()=>({open:0===i.disclosureState,close:l}),[i,l]);return o.createElement(C.Provider,{value:i.panelId},(0,v.sY)({mergeRefs:c,ourProps:{ref:u,id:s},theirProps:n,slot:h,defaultTag:"div",features:T,visible:m,name:"Disclosure.Panel"}))})})}},function(e){e.O(0,[6342,1664,8833,5675,2699,7066,8121,4750,976,6080,9601,3442,2888,9774,179],function(){return e(e.s=49169)}),_N_E=e.O()}]);

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.