import{S as Ye,i as Ze,s as xe,O as Xe,e as a,w as b,b as f,c as me,f as m,g as r,h as l,m as he,x as J,P as Ie,Q as et,k as tt,R as lt,n as ot,t as Q,a as W,o as c,d as _e,L as st,C as Je,p as at,r as z,u as nt}from"./index.b110ca95.js";import{S as it}from"./SdkTabs.b01956c7.js";function Qe(i,o,s){const n=i.slice();return n[5]=o[s],n}function We(i,o,s){const n=i.slice();return n[5]=o[s],n}function ze(i,o){let s,n=o[5].code+"",k,v,d,p;function h(){return o[4](o[5])}return{key:i,first:null,c(){s=a("button"),k=b(n),v=f(),m(s,"class","tab-item"),z(s,"active",o[1]===o[5].code),this.first=s},m(y,g){r(y,s,g),l(s,k),l(s,v),d||(p=nt(s,"click",h),d=!0)},p(y,g){o=y,g&4&&n!==(n=o[5].code+"")&&J(k,n),g&6&&z(s,"active",o[1]===o[5].code)},d(y){y&&c(s),d=!1,p()}}}function Ge(i,o){let s,n,k,v;return n=new Xe({props:{content:o[5].body}}),{key:i,first:null,c(){s=a("div"),me(n.$$.fragment),k=f(),m(s,"class","tab-item"),z(s,"active",o[1]===o[5].code),this.first=s},m(d,p){r(d,s,p),he(n,s,null),l(s,k),v=!0},p(d,p){o=d;const h={};p&4&&(h.content=o[5].body),n.$set(h),(!v||p&6)&&z(s,"active",o[1]===o[5].code)},i(d){v||(Q(n.$$.fragment,d),v=!0)},o(d){W(n.$$.fragment,d),v=!1},d(d){d&&c(s),_e(n)}}}function rt(i){var He,Le;let o,s,n=i[0].name+"",k,v,d,p,h,y,g,H=i[0].name+"",G,ke,ve,X,Y,w,Z,D,x,C,L,Se,U,E,$e,ee,j=i[0].name+"",te,ye,le,q,oe,M,se,N,ae,T,ne,ge,ie,P,re,we,ce,Ce,_,Te,B,Pe,Oe,Ve,de,Be,fe,De,Ee,qe,pe,Me,ue,R,be,O,F,$=[],Ne=new Map,Re,K,S=[],Fe=new Map,V;w=new it({props:{js:` import PocketBase from 'pocketbase'; const pb = new PocketBase('${i[3]}'); ... const authData = await pb.collection('${(He=i[0])==null?void 0:He.name}').confirmVerification('TOKEN'); // after the above you can also access the auth data from the authStore console.log(pb.authStore.isValid); console.log(pb.authStore.token); console.log(pb.authStore.model.id); `,dart:` import 'package:pocketbase/pocketbase.dart'; final pb = PocketBase('${i[3]}'); ... final authData = await pb.collection('${(Le=i[0])==null?void 0:Le.name}').confirmVerification('TOKEN'); // after the above you can also access the auth data from the authStore console.log(pb.authStore.isValid); console.log(pb.authStore.token); console.log(pb.authStore.model.id); `}}),B=new Xe({props:{content:"?expand=relField1,relField2.subRelField"}});let I=i[2];const Ke=e=>e[5].code;for(let e=0;ee[5].code;for(let e=0;eParam Type Description
Required token
String The token from the verification request email.`,se=f(),N=a("div"),N.textContent="Query parameters",ae=f(),T=a("table"),ne=a("thead"),ne.innerHTML=`Param Type Description`,ge=f(),ie=a("tbody"),P=a("tr"),re=a("td"),re.textContent="expand",we=f(),ce=a("td"),ce.innerHTML='String',Ce=f(),_=a("td"),Te=b(`Auto expand record relations. Ex.: `),me(B.$$.fragment),Pe=b(` Supports up to 6-levels depth nested relations expansion. `),Oe=a("br"),Ve=b(` The expanded relations will be appended to the record under the `),de=a("code"),de.textContent="expand",Be=b(" property (eg. "),fe=a("code"),fe.textContent='"expand": {"relField1": {...}, ...}',De=b(`). `),Ee=a("br"),qe=b(` Only the relations to which the account has permissions to `),pe=a("strong"),pe.textContent="view",Me=b(" will be expanded."),ue=f(),R=a("div"),R.textContent="Responses",be=f(),O=a("div"),F=a("div");for(let e=0;e<$.length;e+=1)$[e].c();Re=f(),K=a("div");for(let e=0;es(1,v=h.code);return i.$$set=h=>{"collection"in h&&s(0,k=h.collection)},i.$$.update=()=>{i.$$.dirty&1&&s(2,d=[{code:200,body:JSON.stringify({token:"JWT_TOKEN",record:Je.dummyCollectionRecord(k)},null,2)},{code:400,body:` { "code": 400, "message": "Failed to authenticate.", "data": { "token": { "code": "validation_required", "message": "Missing required value." } } } `}])},s(3,n=Je.getApiExampleUrl(at.baseUrl)),[k,v,d,n,p]}class pt extends Ye{constructor(o){super(),Ze(this,o,ct,rt,xe,{collection:0})}}export{pt as default};